feat(credit): 添加被执行人企业归属修正功能和历史行政许可导入功能
- 新增 refreshCreditJudgmentDebtorCompanyId API 接口用于修正被执行人主体企业归属 - 在信用判断债务人页面添加修正主体企业归属按钮功能 - 修改行政许可历史导入组件支持传入企业ID参数 - 移除重复的历史行政许可导入按钮和弹窗组件 - 在企业详情页面的行政许可标签页添加历史行政许可导入按钮 - 更新多个信用模块的搜索工具栏引用路径 - 隐藏司法相关搜索组件中的导入按钮
This commit is contained in:
@@ -163,3 +163,25 @@ export async function importCreditJudgmentDebtorHistory(
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修正被执行人主体企业归属(按企业名称匹配回填 companyId)
|
||||||
|
*
|
||||||
|
* 后端: POST /api/credit/credit-judgment-debtor/company-id/refresh
|
||||||
|
* - onlyNull: 默认 true,仅更新 companyId 为空的数据
|
||||||
|
* - limit: 可选,限制处理条数
|
||||||
|
*/
|
||||||
|
export async function refreshCreditJudgmentDebtorCompanyId(params?: {
|
||||||
|
onlyNull?: boolean;
|
||||||
|
limit?: number;
|
||||||
|
}) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor/company-id/refresh',
|
||||||
|
undefined,
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|||||||
@@ -41,9 +41,11 @@
|
|||||||
(e: 'update:visible', visible: boolean): void;
|
(e: 'update:visible', visible: boolean): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
const props = defineProps<{
|
||||||
// 是否打开弹窗
|
// 是否打开弹窗
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
// 关联企业ID(企业详情下导入时需要)
|
||||||
|
companyId?: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 导入请求状态
|
// 导入请求状态
|
||||||
@@ -74,7 +76,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
importCreditAdministrativeLicenseHistory(file)
|
importCreditAdministrativeLicenseHistory(file, props.companyId)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -93,4 +95,3 @@
|
|||||||
emit('update:visible', value);
|
emit('update:visible', value);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -23,12 +23,6 @@
|
|||||||
@importData="openImport"
|
@importData="openImport"
|
||||||
@exportData="exportData"
|
@exportData="exportData"
|
||||||
/>
|
/>
|
||||||
<a-button type="dashed" class="ele-btn-icon" @click="openImport2">
|
|
||||||
<template #icon>
|
|
||||||
<CloudUploadOutlined />
|
|
||||||
</template>
|
|
||||||
<span class="text-red-500">导入历史行政许可</span>
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
@@ -77,30 +71,24 @@
|
|||||||
v-model:visible="showImport"
|
v-model:visible="showImport"
|
||||||
@done="reload"
|
@done="reload"
|
||||||
/>
|
/>
|
||||||
<!-- 历史导入弹窗 -->
|
|
||||||
<CreditAdministrativeLicenseHistoryImport
|
|
||||||
v-model:visible="showImport2"
|
|
||||||
@done="reload"
|
|
||||||
/>
|
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref } from 'vue';
|
import { createVNode, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined, CloudUploadOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
import { toDateString } from 'ele-admin-pro';
|
import { toDateString } from 'ele-admin-pro';
|
||||||
import type {
|
import type {
|
||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditAdministrativeLicenseEdit from './components/creditAdministrativeLicenseEdit.vue';
|
import CreditAdministrativeLicenseEdit from './components/creditAdministrativeLicenseEdit.vue';
|
||||||
import CreditAdministrativeLicenseImport from './components/credit-administrative-license-import.vue';
|
import CreditAdministrativeLicenseImport from './components/credit-administrative-license-import.vue';
|
||||||
import CreditAdministrativeLicenseHistoryImport from './components/credit-administrative-license-history-import.vue';
|
|
||||||
import {
|
import {
|
||||||
pageCreditAdministrativeLicense,
|
pageCreditAdministrativeLicense,
|
||||||
listCreditAdministrativeLicense,
|
listCreditAdministrativeLicense,
|
||||||
@@ -123,8 +111,6 @@
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 是否显示导入弹窗
|
// 是否显示导入弹窗
|
||||||
const showImport = ref(false);
|
const showImport = ref(false);
|
||||||
// 是否显示历史导入弹窗
|
|
||||||
const showImport2 = ref(false);
|
|
||||||
// 是否显示批量移动弹窗
|
// 是否显示批量移动弹窗
|
||||||
const showMove = ref(false);
|
const showMove = ref(false);
|
||||||
// 加载状态
|
// 加载状态
|
||||||
@@ -267,11 +253,6 @@
|
|||||||
showImport.value = true;
|
showImport.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 打开历史导入弹窗 */
|
|
||||||
const openImport2 = () => {
|
|
||||||
showImport2.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 导出 */
|
/* 导出 */
|
||||||
const exportData = () => {
|
const exportData = () => {
|
||||||
exportCreditData<CreditAdministrativeLicense>({
|
exportCreditData<CreditAdministrativeLicense>({
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditBankruptcyEdit from './components/creditBankruptcyEdit.vue';
|
import CreditBankruptcyEdit from './components/creditBankruptcyEdit.vue';
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditBranchEdit from './components/creditBranchEdit.vue';
|
import CreditBranchEdit from './components/creditBranchEdit.vue';
|
||||||
|
|||||||
@@ -49,6 +49,16 @@
|
|||||||
>
|
>
|
||||||
导入(多)
|
导入(多)
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
v-if="tab.key === '行政许可'"
|
||||||
|
:disabled="!form.id"
|
||||||
|
@click="openAdministrativeLicenseHistoryImport"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<CloudUploadOutlined />
|
||||||
|
</template>
|
||||||
|
导入历史行政许可
|
||||||
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
:loading="tabState[tab.key].loading"
|
:loading="tabState[tab.key].loading"
|
||||||
@click="reloadTab(tab.key)"
|
@click="reloadTab(tab.key)"
|
||||||
@@ -82,17 +92,26 @@
|
|||||||
:importFn="relatedImportFn"
|
:importFn="relatedImportFn"
|
||||||
@done="handleRelatedImportDone"
|
@done="handleRelatedImportDone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 历史行政许可导入(企业详情-行政许可tab) -->
|
||||||
|
<CreditAdministrativeLicenseHistoryImport
|
||||||
|
v-model:visible="showAdministrativeLicenseHistoryImport"
|
||||||
|
:companyId="form.id"
|
||||||
|
@done="handleAdministrativeLicenseHistoryImportDone"
|
||||||
|
/>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, h, reactive, ref, watch } from 'vue';
|
import { computed, h, reactive, ref, watch } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||||
import { assignObject } from 'ele-admin-pro';
|
import { assignObject } from 'ele-admin-pro';
|
||||||
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 CreditCompanyRelatedImport from './credit-company-related-import.vue';
|
import CreditCompanyRelatedImport from './credit-company-related-import.vue';
|
||||||
|
import CreditAdministrativeLicenseHistoryImport from '@/views/credit/creditAdministrativeLicense/components/credit-administrative-license-history-import.vue';
|
||||||
import {
|
import {
|
||||||
pageCreditAdministrativeLicense,
|
pageCreditAdministrativeLicense,
|
||||||
importCreditAdministrativeLicense
|
importCreditAdministrativeLicense
|
||||||
@@ -951,6 +970,22 @@
|
|||||||
reloadTab(activeTab.value);
|
reloadTab(activeTab.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 历史行政许可导入弹窗(企业详情-行政许可tab)
|
||||||
|
const showAdministrativeLicenseHistoryImport = ref(false);
|
||||||
|
|
||||||
|
const openAdministrativeLicenseHistoryImport = () => {
|
||||||
|
if (!form.id) {
|
||||||
|
message.error('缺少企业ID,无法导入');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
showAdministrativeLicenseHistoryImport.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAdministrativeLicenseHistoryImportDone = () => {
|
||||||
|
resetTabPagination('行政许可');
|
||||||
|
reloadTab('行政许可');
|
||||||
|
};
|
||||||
|
|
||||||
const defaultForm: CreditCompany = {
|
const defaultForm: CreditCompany = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditHistoricalLegalPersonEdit from './components/creditHistoricalLegalPersonEdit.vue';
|
import CreditHistoricalLegalPersonEdit from './components/creditHistoricalLegalPersonEdit.vue';
|
||||||
|
|||||||
@@ -125,7 +125,8 @@
|
|||||||
pageCreditJudgmentDebtor,
|
pageCreditJudgmentDebtor,
|
||||||
listCreditJudgmentDebtor,
|
listCreditJudgmentDebtor,
|
||||||
removeCreditJudgmentDebtor,
|
removeCreditJudgmentDebtor,
|
||||||
removeBatchCreditJudgmentDebtor
|
removeBatchCreditJudgmentDebtor,
|
||||||
|
refreshCreditJudgmentDebtorCompanyId
|
||||||
} from '@/api/credit/creditJudgmentDebtor';
|
} from '@/api/credit/creditJudgmentDebtor';
|
||||||
import type {
|
import type {
|
||||||
CreditJudgmentDebtor,
|
CreditJudgmentDebtor,
|
||||||
@@ -359,6 +360,30 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 修正主体企业归属(按企业名称匹配回填 companyId) */
|
||||||
|
const belongToCompany = () => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示',
|
||||||
|
content:
|
||||||
|
'将按被执行人名称匹配企业名称并回填 companyId(默认仅更新 companyId 为0的数据)确定要执行吗?',
|
||||||
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
maskClosable: true,
|
||||||
|
onOk: () => {
|
||||||
|
const hide = message.loading('请求中..', 0);
|
||||||
|
return refreshCreditJudgmentDebtorCompanyId({ onlyNull: true })
|
||||||
|
.then((msg) => {
|
||||||
|
hide();
|
||||||
|
message.success(msg || '操作成功');
|
||||||
|
reload();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
hide();
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/* 查询 */
|
/* 查询 */
|
||||||
const query = () => {
|
const query = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- <span>添加</span>-->
|
<!-- <span>添加</span>-->
|
||||||
<!-- </a-button>-->
|
<!-- </a-button>-->
|
||||||
<a-button class="ele-btn-icon" @click="openImport">
|
<!-- <a-button class="ele-btn-icon" @click="openImport">-->
|
||||||
<template #icon>
|
<!-- <template #icon>-->
|
||||||
<CloudUploadOutlined />
|
<!-- <CloudUploadOutlined />-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
<span>导入(多)</span>
|
<!-- <span>导入(多)</span>-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
<a-button class="ele-btn-icon" @click="exportData">
|
<a-button class="ele-btn-icon" @click="exportData">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<CloudDownloadOutlined />
|
<CloudDownloadOutlined />
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditNearbyCompanyEdit from './components/creditNearbyCompanyEdit.vue';
|
import CreditNearbyCompanyEdit from './components/creditNearbyCompanyEdit.vue';
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditPatentEdit from './components/creditPatentEdit.vue';
|
import CreditPatentEdit from './components/creditPatentEdit.vue';
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditSuspectedRelationshipEdit from './components/creditSuspectedRelationshipEdit.vue';
|
import CreditSuspectedRelationshipEdit from './components/creditSuspectedRelationshipEdit.vue';
|
||||||
|
|||||||
Reference in New Issue
Block a user