feat(credit): 新增客户导入与数据导出功能

- 在信用客户模块中添加了导入客户的功能,支持通过文件上传方式导入客户数据
- 实现了多个信用相关模块的数据导出功能,包括企业、司法案件、风险关系、供应商及用户模块
- 更新了搜索组件以支持导出事件,并在各模块中实现了具体的导出逻辑
- 简化了部分表单项的标签显示并移除了冗余字段,优化了用户体验
- 修复了一些潜在的代码格式问题和不必要的注释块
This commit is contained in:
2025-12-22 10:00:49 +08:00
parent ebdc9b5933
commit ecd571c60b
11 changed files with 389 additions and 473 deletions

View File

@@ -26,21 +26,21 @@
v-model:value="form.name"
/>
</a-form-item>
<a-form-item label="企业状态(如存续、注销等)" name="statusTxt">
<a-form-item label="状态" name="statusTxt">
<a-input
allow-clear
placeholder="请输入企业状态(如存续、注销等)"
v-model:value="form.statusTxt"
/>
</a-form-item>
<a-form-item label="法定代表人姓名" name="legalRepresentative">
<a-form-item label="法定代表人" name="legalRepresentative">
<a-input
allow-clear
placeholder="请输入法定代表人姓名"
v-model:value="form.legalRepresentative"
/>
</a-form-item>
<a-form-item label="注册资本(金额)" name="registeredCapital">
<a-form-item label="注册资本" name="registeredCapital">
<a-input
allow-clear
placeholder="请输入注册资本(金额)"
@@ -125,49 +125,12 @@
v-model:value="form.comments"
/>
</a-form-item>
<a-form-item label="是否推荐" name="recommend">
<a-input
allow-clear
placeholder="请输入是否推荐"
v-model:value="form.recommend"
/>
</a-form-item>
<a-form-item label="排序(数字越小越靠前)" name="sortNumber">
<a-input-number
:min="0"
:max="9999"
class="ele-fluid"
placeholder="请输入排序号"
v-model:value="form.sortNumber"
/>
</a-form-item>
<a-form-item label="状态, 0正常, 1冻结" name="status">
<a-radio-group v-model:value="form.status">
<a-radio :value="0">显示</a-radio>
<a-radio :value="1">隐藏</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否删除, 0否, 1是" name="deleted">
<a-input
allow-clear
placeholder="请输入是否删除, 0否, 1是"
v-model:value="form.deleted"
/>
</a-form-item>
<a-form-item label="用户ID" name="userId">
<a-input
allow-clear
placeholder="请输入用户ID"
v-model:value="form.userId"
/>
</a-form-item>
<a-form-item label="修改时间" name="updateTime">
<a-input
allow-clear
placeholder="请输入修改时间"
v-model:value="form.updateTime"
/>
</a-form-item>
<!-- <a-form-item label="状态, 0正常, 1冻结" name="status">-->
<!-- <a-radio-group v-model:value="form.status">-->
<!-- <a-radio :value="0">显示</a-radio>-->
<!-- <a-radio :value="1">隐藏</a-radio>-->
<!-- </a-radio-group>-->
<!-- </a-form-item>-->
</a-form>
</ele-modal>
</template>
@@ -176,7 +139,10 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addCreditExternal, updateCreditExternal } from '@/api/credit/creditExternal';
import {
addCreditExternal,
updateCreditExternal
} from '@/api/credit/creditExternal';
import { CreditExternal } from '@/api/credit/creditExternal/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
@@ -289,7 +255,9 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateCreditExternal : addCreditExternal;
const saveOrUpdate = isUpdate.value
? updateCreditExternal
: addCreditExternal;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -312,12 +280,12 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
if(props.data.image){
if (props.data.image) {
images.value.push({
uid: uuid(),
url: props.data.image,
status: 'done'
})
});
}
isUpdate.value = true;
} else {