feat(credit): 企业详情页面增加子表数据导入功能
- 为18个信用相关API的导入方法添加companyId参数支持 - 在企业详情页面的各个子表tab中添加导入和刷新按钮 - 创建credit-company-related-import组件实现统一的导入弹窗 - 新增taxpayerCode字段到用户信息模型中 - 移除企业详情页面中冗余的描述项注释代码 - 实现基于企业ID或纳税人识别号的数据加载缓存机制 - 添加导入模板下载功能和文件类型验证
This commit is contained in:
@@ -107,9 +107,12 @@ export async function getCreditBreachOfTrust(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入失信被执行人
|
* 导入失信被执行人
|
||||||
*/
|
*/
|
||||||
export async function importCreditBreachOfTrust(file: File) {
|
export async function importCreditBreachOfTrust(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-breach-of-trust/import',
|
'/credit/credit-breach-of-trust/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditCaseFiling(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入司法大数据
|
* 导入司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditCaseFiling(file: File) {
|
export async function importCreditCaseFiling(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-case-filing/import',
|
'/credit/credit-case-filing/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditCompetitor(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入竞争对手
|
* 导入竞争对手
|
||||||
*/
|
*/
|
||||||
export async function importCreditCompetitor(file: File) {
|
export async function importCreditCompetitor(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-competitor/import',
|
'/credit/credit-competitor/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditCourtAnnouncement(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入法院公告司法大数据
|
* 导入法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditCourtAnnouncement(file: File) {
|
export async function importCreditCourtAnnouncement(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-announcement/import',
|
'/credit/credit-court-announcement/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditCourtSession(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入开庭公告司法大数据
|
* 导入开庭公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditCourtSession(file: File) {
|
export async function importCreditCourtSession(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-session/import',
|
'/credit/credit-court-session/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditCustomer(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入客户
|
* 导入客户
|
||||||
*/
|
*/
|
||||||
export async function importCreditCustomer(file: File) {
|
export async function importCreditCustomer(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-customer/import',
|
'/credit/credit-customer/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditDeliveryNotice(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入送达公告司法大数据
|
* 导入送达公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditDeliveryNotice(file: File) {
|
export async function importCreditDeliveryNotice(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-delivery-notice/import',
|
'/credit/credit-delivery-notice/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditExternal(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入对外投资
|
* 导入对外投资
|
||||||
*/
|
*/
|
||||||
export async function importCreditExternal(file: File) {
|
export async function importCreditExternal(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-external/import',
|
'/credit/credit-external/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditFinalVersion(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入终本案件
|
* 导入终本案件
|
||||||
*/
|
*/
|
||||||
export async function importCreditFinalVersion(file: File) {
|
export async function importCreditFinalVersion(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-final-version/import',
|
'/credit/credit-final-version/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditGqdj(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入股权冻结
|
* 导入股权冻结
|
||||||
*/
|
*/
|
||||||
export async function importCreditGqdj(file: File) {
|
export async function importCreditGqdj(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-gqdj/import',
|
'/credit/credit-gqdj/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditJudgmentDebtor(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入被执行人
|
* 导入被执行人
|
||||||
*/
|
*/
|
||||||
export async function importCreditJudgmentDebtor(file: File) {
|
export async function importCreditJudgmentDebtor(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-judgment-debtor/import',
|
'/credit/credit-judgment-debtor/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditJudicialDocument(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入裁判文书司法大数据
|
* 导入裁判文书司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditJudicialDocument(file: File) {
|
export async function importCreditJudicialDocument(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-judicial-document/import',
|
'/credit/credit-judicial-document/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditJudiciary(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入司法案件
|
* 导入司法案件
|
||||||
*/
|
*/
|
||||||
export async function importCreditJudiciaries(file: File) {
|
export async function importCreditJudiciaries(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-judiciary/import',
|
'/credit/credit-judiciary/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditMediation(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入诉前调解司法大数据
|
* 导入诉前调解司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditMediation(file: File) {
|
export async function importCreditMediation(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-mediation/import',
|
'/credit/credit-mediation/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditProject(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入招投标
|
* 导入招投标
|
||||||
*/
|
*/
|
||||||
export async function importCreditProject(file: File) {
|
export async function importCreditProject(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-project/import',
|
'/credit/credit-project/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditRiskRelation(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入风险关系表
|
* 导入风险关系表
|
||||||
*/
|
*/
|
||||||
export async function importCreditRiskRelation(file: File) {
|
export async function importCreditRiskRelation(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-risk-relation/import',
|
'/credit/credit-risk-relation/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditSupplier(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入供应商
|
* 导入供应商
|
||||||
*/
|
*/
|
||||||
export async function importCreditSupplier(file: File) {
|
export async function importCreditSupplier(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-supplier/import',
|
'/credit/credit-supplier/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ export async function getCreditXgxf(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入限制高消费
|
* 导入限制高消费
|
||||||
*/
|
*/
|
||||||
export async function importCreditXgxf(file: File) {
|
export async function importCreditXgxf(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-xgxf/import',
|
'/credit/credit-xgxf/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ export interface PageParam {
|
|||||||
tenantId?: number;
|
tenantId?: number;
|
||||||
// 企业ID
|
// 企业ID
|
||||||
companyId?: number;
|
companyId?: number;
|
||||||
|
// 企业税号/统一社会信用代码
|
||||||
|
taxpayerCode?: string;
|
||||||
// 商户ID
|
// 商户ID
|
||||||
merchantId?: number;
|
merchantId?: number;
|
||||||
merchantName?: string;
|
merchantName?: string;
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<!-- 企业详情子表导入弹窗 -->
|
||||||
|
<template>
|
||||||
|
<ele-modal
|
||||||
|
:width="520"
|
||||||
|
:footer="null"
|
||||||
|
:title="title"
|
||||||
|
:visible="visible"
|
||||||
|
@update:visible="updateVisible"
|
||||||
|
>
|
||||||
|
<a-spin :spinning="loading">
|
||||||
|
<a-upload-dragger
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:show-upload-list="false"
|
||||||
|
:customRequest="doUpload"
|
||||||
|
style="padding: 24px 0; margin-bottom: 16px"
|
||||||
|
>
|
||||||
|
<p class="ant-upload-drag-icon">
|
||||||
|
<cloud-upload-outlined />
|
||||||
|
</p>
|
||||||
|
<p class="ant-upload-hint">将文件拖到此处,或点击上传</p>
|
||||||
|
</a-upload-dragger>
|
||||||
|
</a-spin>
|
||||||
|
<div class="ele-text-center">
|
||||||
|
<span>只能上传xls、xlsx文件,</span>
|
||||||
|
<a :href="templateUrl" :download="`${title}.xlsx`">下载导入模板</a>
|
||||||
|
</div>
|
||||||
|
</ele-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
import { message } from 'ant-design-vue/es';
|
||||||
|
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { API_BASE_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done'): void;
|
||||||
|
(e: 'update:visible', visible: boolean): void;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
// 是否打开弹窗
|
||||||
|
visible: boolean;
|
||||||
|
// 弹窗标题
|
||||||
|
title: string;
|
||||||
|
// 模板下载相对路径(保持与当前接口域名一致)
|
||||||
|
templatePath: string;
|
||||||
|
// 当前企业ID(用于导入关联)
|
||||||
|
companyId?: number;
|
||||||
|
// 导入方法:必须支持传 companyId
|
||||||
|
importFn: (file: File, companyId?: number) => Promise<string>;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
// 导入请求状态
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const templateUrl = computed(() => {
|
||||||
|
const base = (localStorage.getItem('ApiUrl') || API_BASE_URL || '').replace(
|
||||||
|
/\/$/,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
const path = (props.templatePath || '').startsWith('/')
|
||||||
|
? props.templatePath
|
||||||
|
: `/${props.templatePath}`;
|
||||||
|
return `${base}${path}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 上传 */
|
||||||
|
const doUpload = ({ file }) => {
|
||||||
|
if (
|
||||||
|
![
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
].includes(file.type)
|
||||||
|
) {
|
||||||
|
message.error('只能选择 excel 文件');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (file.size / 1024 / 1024 > 10) {
|
||||||
|
message.error('大小不能超过 10MB');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!props.companyId) {
|
||||||
|
message.error('缺少企业ID,无法导入');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
loading.value = true;
|
||||||
|
props
|
||||||
|
.importFn(file, props.companyId)
|
||||||
|
.then((msg) => {
|
||||||
|
loading.value = false;
|
||||||
|
message.success(msg);
|
||||||
|
updateVisible(false);
|
||||||
|
emit('done');
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
loading.value = false;
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 更新 visible */
|
||||||
|
const updateVisible = (value: boolean) => {
|
||||||
|
emit('update:visible', value);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -33,145 +33,6 @@
|
|||||||
<a-descriptions-item label="更多电话">
|
<a-descriptions-item label="更多电话">
|
||||||
{{ formatValue(form.moreTel) }}
|
{{ formatValue(form.moreTel) }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
|
|
||||||
<!-- <a-descriptions-item label="登记状态">-->
|
|
||||||
<!-- {{ formatValue(form.registrationStatus) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="法定代表人">-->
|
|
||||||
<!-- {{ formatValue(form.legalPerson) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="注册资本">-->
|
|
||||||
<!-- {{ formatValue(form.registeredCapital) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="实缴资本">-->
|
|
||||||
<!-- {{ formatValue(form.paidinCapital) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="成立日期">-->
|
|
||||||
<!-- {{ formatValue(form.establishDate) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="更多电话">-->
|
|
||||||
<!-- {{ formatValue(form.moreTel) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="邮箱">-->
|
|
||||||
<!-- {{ formatValue(form.email) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="更多邮箱">-->
|
|
||||||
<!-- {{ formatValue(form.moreEmail) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="所在国家">-->
|
|
||||||
<!-- {{ formatValue(form.country) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="所属省份">-->
|
|
||||||
<!-- {{ formatValue(form.province) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="所属城市">-->
|
|
||||||
<!-- {{ formatValue(form.city) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="所属区县">-->
|
|
||||||
<!-- {{ formatValue(form.region) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企业(机构)类型">-->
|
|
||||||
<!-- {{ formatValue(form.institutionType) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="纳税人识别号">-->
|
|
||||||
<!-- {{ formatValue(form.taxpayerCode) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="注册号">-->
|
|
||||||
<!-- {{ formatValue(form.registrationNumber) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="组织机构代码">-->
|
|
||||||
<!-- {{ formatValue(form.organizationalCode) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="参保人数">-->
|
|
||||||
<!-- {{ formatValue(form.numberOfInsuredPersons) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="参保人数所属年报">-->
|
|
||||||
<!-- {{ formatValue(form.annualReport) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="营业期限">-->
|
|
||||||
<!-- {{ formatValue(form.businessTerm) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="国标行业门类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="国标行业大类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories2) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="国标行业中类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories3) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="国标行业小类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories4) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企查查行业门类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories5) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企查查行业大类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories6) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企查查行业中类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories7) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企查查行业小类">-->
|
|
||||||
<!-- {{ formatValue(form.nationalStandardIndustryCategories8) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企业规模">-->
|
|
||||||
<!-- {{ formatValue(form.companySize) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="曾用名">-->
|
|
||||||
<!-- {{ formatValue(form.formerName) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="英文名">-->
|
|
||||||
<!-- {{ formatValue(form.englishName) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="官网">-->
|
|
||||||
<!-- {{ formatValue(form.domain) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="通信地址">-->
|
|
||||||
<!-- {{ formatValue(form.mailingAddress) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企业简介">-->
|
|
||||||
<!-- {{ formatValue(form.companyProfile) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="经营范围">-->
|
|
||||||
<!-- {{ formatValue(form.natureOfBusiness) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="登记机关">-->
|
|
||||||
<!-- {{ formatValue(form.registrationAuthority) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="纳税人资质">-->
|
|
||||||
<!-- {{ formatValue(form.taxpayerQualification) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="最新年报年份">-->
|
|
||||||
<!-- {{ formatValue(form.latestAnnualReportYear) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="最新年报营业收入">-->
|
|
||||||
<!-- {{ formatValue(form.latestAnnualReportOnOperatingRevenue) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="企查分">-->
|
|
||||||
<!-- {{ formatValue(form.enterpriseScoreCheck) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="信用等级">-->
|
|
||||||
<!-- {{ formatValue(form.creditRating) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="科创分">-->
|
|
||||||
<!-- {{ formatValue(form.cechnologyScore) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="科创等级">-->
|
|
||||||
<!-- {{ formatValue(form.cechnologyLevel) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="是否小微企业">-->
|
|
||||||
<!-- {{ formatValue(form.smallEnterprise) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="备注">-->
|
|
||||||
<!-- {{ formatValue(form.comments) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="排序">-->
|
|
||||||
<!-- {{ formatValue(form.sortNumber) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
<!-- <a-descriptions-item label="状态">-->
|
|
||||||
<!-- {{ formatStatus(form.status) }}-->
|
|
||||||
<!-- </a-descriptions-item>-->
|
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
<a-divider style="margin: 16px 0" />
|
<a-divider style="margin: 16px 0" />
|
||||||
<a-tabs
|
<a-tabs
|
||||||
@@ -180,6 +41,21 @@
|
|||||||
class="credit-company-tabs"
|
class="credit-company-tabs"
|
||||||
>
|
>
|
||||||
<a-tab-pane v-for="tab in tabList" :key="tab.key" :tab="tab.label">
|
<a-tab-pane v-for="tab in tabList" :key="tab.key" :tab="tab.label">
|
||||||
|
<a-space style="margin-bottom: 12px">
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="!form.id"
|
||||||
|
@click="openRelatedImport(tab.key)"
|
||||||
|
>
|
||||||
|
导入
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
:loading="tabState[tab.key].loading"
|
||||||
|
@click="reloadTab(tab.key)"
|
||||||
|
>
|
||||||
|
刷新
|
||||||
|
</a-button>
|
||||||
|
</a-space>
|
||||||
<a-table
|
<a-table
|
||||||
v-if="tabState[tab.key].columns.length"
|
v-if="tabState[tab.key].columns.length"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -196,6 +72,16 @@
|
|||||||
/>
|
/>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
|
<!-- 企业详情子表导入 -->
|
||||||
|
<CreditCompanyRelatedImport
|
||||||
|
v-model:visible="showRelatedImport"
|
||||||
|
:title="relatedImportTitle"
|
||||||
|
:templatePath="relatedImportTemplatePath"
|
||||||
|
:companyId="form.id"
|
||||||
|
:importFn="relatedImportFn"
|
||||||
|
@done="handleRelatedImportDone"
|
||||||
|
/>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -206,7 +92,25 @@
|
|||||||
import { CreditCompany } from '@/api/credit/creditCompany/model';
|
import { CreditCompany } from '@/api/credit/creditCompany/model';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { pageCreditUser } from '@/api/credit/creditUser';
|
import CreditCompanyRelatedImport from './credit-company-related-import.vue';
|
||||||
|
import { pageCreditProject, importCreditProject } from '@/api/credit/creditProject';
|
||||||
|
import { pageCreditExternal, importCreditExternal } from '@/api/credit/creditExternal';
|
||||||
|
import { pageCreditRiskRelation, importCreditRiskRelation } from '@/api/credit/creditRiskRelation';
|
||||||
|
import { pageCreditCompetitor, importCreditCompetitor } from '@/api/credit/creditCompetitor';
|
||||||
|
import { pageCreditSupplier, importCreditSupplier } from '@/api/credit/creditSupplier';
|
||||||
|
import { pageCreditCustomer, importCreditCustomer } from '@/api/credit/creditCustomer';
|
||||||
|
import { pageCreditCaseFiling, importCreditCaseFiling } from '@/api/credit/creditCaseFiling';
|
||||||
|
import { pageCreditMediation, importCreditMediation } from '@/api/credit/creditMediation';
|
||||||
|
import { pageCreditCourtSession, importCreditCourtSession } from '@/api/credit/creditCourtSession';
|
||||||
|
import { pageCreditCourtAnnouncement, importCreditCourtAnnouncement } from '@/api/credit/creditCourtAnnouncement';
|
||||||
|
import { pageCreditDeliveryNotice, importCreditDeliveryNotice } from '@/api/credit/creditDeliveryNotice';
|
||||||
|
import { pageCreditJudicialDocument, importCreditJudicialDocument } from '@/api/credit/creditJudicialDocument';
|
||||||
|
import { pageCreditJudgmentDebtor, importCreditJudgmentDebtor } from '@/api/credit/creditJudgmentDebtor';
|
||||||
|
import { pageCreditBreachOfTrust, importCreditBreachOfTrust } from '@/api/credit/creditBreachOfTrust';
|
||||||
|
import { pageCreditFinalVersion, importCreditFinalVersion } from '@/api/credit/creditFinalVersion';
|
||||||
|
import { pageCreditXgxf, importCreditXgxf } from '@/api/credit/creditXgxf';
|
||||||
|
import { pageCreditGqdj, importCreditGqdj } from '@/api/credit/creditGqdj';
|
||||||
|
import { pageCreditJudiciary, importCreditJudiciaries } from '@/api/credit/creditJudiciary';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
@@ -249,6 +153,105 @@
|
|||||||
{ key: '司法案件', label: '司法案件' }
|
{ key: '司法案件', label: '司法案件' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
type TabApiConfig = {
|
||||||
|
page: (params: any) => Promise<{ list: Record<string, any>[] } | undefined>;
|
||||||
|
importFn: (file: File, companyId?: number) => Promise<string>;
|
||||||
|
templatePath: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const tabApiMap: Record<string, TabApiConfig> = {
|
||||||
|
招投标: {
|
||||||
|
page: pageCreditProject as any,
|
||||||
|
importFn: importCreditProject as any,
|
||||||
|
templatePath: '/credit/credit-project/import/template'
|
||||||
|
},
|
||||||
|
对外投资: {
|
||||||
|
page: pageCreditExternal as any,
|
||||||
|
importFn: importCreditExternal as any,
|
||||||
|
templatePath: '/credit/credit-external/import/template'
|
||||||
|
},
|
||||||
|
风险关系: {
|
||||||
|
page: pageCreditRiskRelation as any,
|
||||||
|
importFn: importCreditRiskRelation as any,
|
||||||
|
templatePath: '/credit/credit-risk-relation/import/template'
|
||||||
|
},
|
||||||
|
竞争对手: {
|
||||||
|
page: pageCreditCompetitor as any,
|
||||||
|
importFn: importCreditCompetitor as any,
|
||||||
|
templatePath: '/credit/credit-competitor/import/template'
|
||||||
|
},
|
||||||
|
供应商: {
|
||||||
|
page: pageCreditSupplier as any,
|
||||||
|
importFn: importCreditSupplier as any,
|
||||||
|
templatePath: '/credit/credit-supplier/import/template'
|
||||||
|
},
|
||||||
|
客户: {
|
||||||
|
page: pageCreditCustomer as any,
|
||||||
|
importFn: importCreditCustomer as any,
|
||||||
|
templatePath: '/credit/credit-customer/import/template'
|
||||||
|
},
|
||||||
|
立案信息: {
|
||||||
|
page: pageCreditCaseFiling as any,
|
||||||
|
importFn: importCreditCaseFiling as any,
|
||||||
|
templatePath: '/credit/credit-case-filing/import/template'
|
||||||
|
},
|
||||||
|
诉前调解: {
|
||||||
|
page: pageCreditMediation as any,
|
||||||
|
importFn: importCreditMediation as any,
|
||||||
|
templatePath: '/credit/credit-mediation/import/template'
|
||||||
|
},
|
||||||
|
开庭公告: {
|
||||||
|
page: pageCreditCourtSession as any,
|
||||||
|
importFn: importCreditCourtSession as any,
|
||||||
|
templatePath: '/credit/credit-court-session/import/template'
|
||||||
|
},
|
||||||
|
法院公告: {
|
||||||
|
page: pageCreditCourtAnnouncement as any,
|
||||||
|
importFn: importCreditCourtAnnouncement as any,
|
||||||
|
templatePath: '/credit/credit-court-announcement/import/template'
|
||||||
|
},
|
||||||
|
送达公告: {
|
||||||
|
page: pageCreditDeliveryNotice as any,
|
||||||
|
importFn: importCreditDeliveryNotice as any,
|
||||||
|
templatePath: '/credit/credit-delivery-notice/import/template'
|
||||||
|
},
|
||||||
|
裁判文书: {
|
||||||
|
page: pageCreditJudicialDocument as any,
|
||||||
|
importFn: importCreditJudicialDocument as any,
|
||||||
|
templatePath: '/credit/credit-judicial-document/import/template'
|
||||||
|
},
|
||||||
|
被执行人: {
|
||||||
|
page: pageCreditJudgmentDebtor as any,
|
||||||
|
importFn: importCreditJudgmentDebtor as any,
|
||||||
|
templatePath: '/credit/credit-judgment-debtor/import/template'
|
||||||
|
},
|
||||||
|
失信被执行人: {
|
||||||
|
page: pageCreditBreachOfTrust as any,
|
||||||
|
importFn: importCreditBreachOfTrust as any,
|
||||||
|
templatePath: '/credit/credit-breach-of-trust/import/template'
|
||||||
|
},
|
||||||
|
终本案件: {
|
||||||
|
page: pageCreditFinalVersion as any,
|
||||||
|
importFn: importCreditFinalVersion as any,
|
||||||
|
templatePath: '/credit/credit-final-version/import/template'
|
||||||
|
},
|
||||||
|
'限制高消费': {
|
||||||
|
page: pageCreditXgxf as any,
|
||||||
|
importFn: importCreditXgxf as any,
|
||||||
|
templatePath: '/credit/credit-xgxf/import/template'
|
||||||
|
},
|
||||||
|
股权冻结: {
|
||||||
|
page: pageCreditGqdj as any,
|
||||||
|
importFn: importCreditGqdj as any,
|
||||||
|
templatePath: '/credit/credit-gqdj/import/template'
|
||||||
|
},
|
||||||
|
司法案件: {
|
||||||
|
page: pageCreditJudiciary as any,
|
||||||
|
importFn: importCreditJudiciaries as any,
|
||||||
|
templatePath: '/credit/credit-judiciary/import/template'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
type TableColumn = {
|
type TableColumn = {
|
||||||
title: string;
|
title: string;
|
||||||
dataIndex: string;
|
dataIndex: string;
|
||||||
@@ -260,6 +263,7 @@
|
|||||||
loading: boolean;
|
loading: boolean;
|
||||||
data: Record<string, any>[];
|
data: Record<string, any>[];
|
||||||
columns: TableColumn[];
|
columns: TableColumn[];
|
||||||
|
loadedIdentity?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const tabState = reactive<Record<string, TabState>>({});
|
const tabState = reactive<Record<string, TabState>>({});
|
||||||
@@ -267,11 +271,48 @@
|
|||||||
tabState[tab.key] = {
|
tabState[tab.key] = {
|
||||||
loading: false,
|
loading: false,
|
||||||
data: [],
|
data: [],
|
||||||
columns: []
|
columns: [],
|
||||||
|
loadedIdentity: undefined
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const activeTab = ref(tabList[0].key);
|
const activeTab = ref(tabList[0].key);
|
||||||
|
|
||||||
|
// 子表导入弹窗
|
||||||
|
const showRelatedImport = ref(false);
|
||||||
|
const relatedImportTabKey = ref(tabList[0].key);
|
||||||
|
const relatedImportConfig = computed(() => tabApiMap[relatedImportTabKey.value]);
|
||||||
|
const relatedImportTitle = computed(() => {
|
||||||
|
const tab = tabList.find((t) => t.key === relatedImportTabKey.value);
|
||||||
|
return `${tab?.label ?? relatedImportTabKey.value}批量导入`;
|
||||||
|
});
|
||||||
|
const relatedImportTemplatePath = computed(
|
||||||
|
() => relatedImportConfig.value?.templatePath ?? ''
|
||||||
|
);
|
||||||
|
const relatedImportFn = (file: File, companyId?: number) => {
|
||||||
|
const fn = relatedImportConfig.value?.importFn;
|
||||||
|
if (!fn) {
|
||||||
|
return Promise.reject(new Error('未配置导入接口'));
|
||||||
|
}
|
||||||
|
return fn(file, companyId);
|
||||||
|
};
|
||||||
|
|
||||||
|
const openRelatedImport = (key: string) => {
|
||||||
|
if (!form.id) {
|
||||||
|
message.error('缺少企业ID,无法导入');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!tabApiMap[key]) {
|
||||||
|
message.error('未配置该Tab的导入功能');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
relatedImportTabKey.value = key;
|
||||||
|
showRelatedImport.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRelatedImportDone = () => {
|
||||||
|
reloadTab(activeTab.value);
|
||||||
|
};
|
||||||
|
|
||||||
const defaultForm: CreditCompany = {
|
const defaultForm: CreditCompany = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
@@ -385,31 +426,60 @@
|
|||||||
tabState[tab.key].data = [];
|
tabState[tab.key].data = [];
|
||||||
tabState[tab.key].columns = [];
|
tabState[tab.key].columns = [];
|
||||||
tabState[tab.key].loading = false;
|
tabState[tab.key].loading = false;
|
||||||
|
tabState[tab.key].loadedIdentity = undefined;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadTabData = async (key: string) => {
|
const loadTabData = async (key: string, force = false) => {
|
||||||
const keywords = form.matchName ?? props.data?.matchName;
|
const taxpayerCode = form.code ?? props.data?.code;
|
||||||
|
const companyId = form.id ?? props.data?.id;
|
||||||
|
const identity = taxpayerCode
|
||||||
|
? `tax:${taxpayerCode}`
|
||||||
|
: companyId
|
||||||
|
? `id:${companyId}`
|
||||||
|
: undefined;
|
||||||
const state = tabState[key];
|
const state = tabState[key];
|
||||||
if (!keywords) {
|
const api = tabApiMap[key]?.page;
|
||||||
|
if (!api) {
|
||||||
state.data = [];
|
state.data = [];
|
||||||
state.columns = [];
|
state.columns = [];
|
||||||
|
state.loadedIdentity = undefined;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!identity) {
|
||||||
|
state.data = [];
|
||||||
|
state.columns = [];
|
||||||
|
state.loadedIdentity = undefined;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!force && state.loadedIdentity === identity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.loading = true;
|
state.loading = true;
|
||||||
try {
|
try {
|
||||||
const res = await pageCreditUser({ keywords });
|
const res = await api({
|
||||||
|
taxpayerCode,
|
||||||
|
companyId,
|
||||||
|
page: 1,
|
||||||
|
limit: 500
|
||||||
|
});
|
||||||
state.data = res?.list || [];
|
state.data = res?.list || [];
|
||||||
state.columns = buildColumns(state.data);
|
state.columns = buildColumns(state.data);
|
||||||
|
state.loadedIdentity = identity;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
state.data = [];
|
state.data = [];
|
||||||
state.columns = [];
|
state.columns = [];
|
||||||
|
state.loadedIdentity = undefined;
|
||||||
message.error(e?.message ?? '查询失败');
|
message.error(e?.message ?? '查询失败');
|
||||||
} finally {
|
} finally {
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const reloadTab = (key: string) => {
|
||||||
|
loadTabData(key, true);
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => activeTab.value,
|
() => activeTab.value,
|
||||||
(key) => {
|
(key) => {
|
||||||
@@ -421,14 +491,16 @@
|
|||||||
() => props.visible,
|
() => props.visible,
|
||||||
(visible) => {
|
(visible) => {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
showRelatedImport.value = false;
|
||||||
resetForm();
|
resetForm();
|
||||||
clearTabData();
|
clearTabData();
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
}
|
}
|
||||||
activeTab.value = tabList[0].key;
|
activeTab.value = tabList[0].key;
|
||||||
loadTabData(activeTab.value);
|
loadTabData(activeTab.value, true);
|
||||||
} else {
|
} else {
|
||||||
|
showRelatedImport.value = false;
|
||||||
resetForm();
|
resetForm();
|
||||||
clearTabData();
|
clearTabData();
|
||||||
}
|
}
|
||||||
@@ -442,10 +514,11 @@
|
|||||||
if (!props.visible || !data) {
|
if (!props.visible || !data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
showRelatedImport.value = false;
|
||||||
resetForm();
|
resetForm();
|
||||||
clearTabData();
|
clearTabData();
|
||||||
assignObject(form, data);
|
assignObject(form, data);
|
||||||
loadTabData(activeTab.value);
|
loadTabData(activeTab.value, true);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user