feat(credit): 新增附近企业批量导入功能并优化数据表结构

- 新增 importCreditNearbyCompanyMulti 函数支持多文件同时导入
- 提取 buildImportFormData 工具函数统一处理文件上传逻辑
- 在信用公司页面新增批量导入按钮和上传图标组件
- 将限制高消费表格中的发生时间字段从 occurrenceTime 改为 releaseDate
- 调整股权冻结页面的数据状态列顺序和显示逻辑
- 移除附近企业页面中重复和不必要的表格列配置
- 修改附近企业页面通信地址邮箱列为正确的通信地址邮编
- 更新开发环境配置文件启用本地 API 地址并
This commit is contained in:
2026-03-03 16:32:16 +08:00
parent b1147f7a3d
commit fe20f0f0b3
6 changed files with 95 additions and 84 deletions

View File

@@ -1,7 +1,7 @@
VITE_APP_NAME=后台管理(开发环境) VITE_APP_NAME=后台管理(开发环境)
#VITE_API_URL=http://127.0.0.1:9200/api VITE_API_URL=http://127.0.0.1:9200/api
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api #VITE_SERVER_API_URL=http://127.0.0.1:8000/api
#VITE_API_URL=https://ysb-api.websoft.top/api #VITE_API_URL=https://ysb-api.websoft.top/api
VITE_SERVER_API_URL=https://server.websoft.top/api #VITE_SERVER_API_URL=https://server.websoft.top/api

View File

@@ -115,11 +115,7 @@ export async function importCreditNearbyCompany(
file: File, file: File,
companyId?: number companyId?: number
) { ) {
const formData = new FormData(); const formData = buildImportFormData(file, companyId);
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-nearby-company/import', '/credit/credit-nearby-company/import',
formData, formData,
@@ -135,6 +131,49 @@ export async function importCreditNearbyCompany(
return Promise.reject(new Error(res.data.message)); return Promise.reject(new Error(res.data.message));
} }
/**
* 导入附近企业(多文件,同一次请求)
*
* 约定:后端需支持 multipart 同名字段 `file` 多次出现(常见于 MultipartFile[] file
*/
export async function importCreditNearbyCompanyMulti(
files: File[] | FileList,
companyId?: number
) {
const formData = buildImportFormData(files, companyId);
const res = await request.post<ApiResult<unknown>>(
'/credit/credit-nearby-company/import',
formData,
{
headers: {
'Content-Type': 'multipart/form-data'
}
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
function buildImportFormData(
fileOrFiles: File | File[] | FileList,
companyId?: number
) {
const formData = new FormData();
if (Array.isArray(fileOrFiles)) {
fileOrFiles.forEach((f) => formData.append('file', f));
} else if (fileOrFiles instanceof FileList) {
Array.from(fileOrFiles).forEach((f) => formData.append('file', f));
} else {
formData.append('file', fileOrFiles);
}
if (companyId != null) {
formData.append('companyId', String(companyId));
}
return formData;
}
export interface ImportBatchCreditNearbyCompanyItem { export interface ImportBatchCreditNearbyCompanyItem {
fileName: string; fileName: string;
success: boolean; success: boolean;

View File

@@ -952,6 +952,8 @@
}, },
hidden: ['historyId', 'historyName'] hidden: ['historyId', 'historyName']
}, },
限制高消费: { 限制高消费: {
columns: [ columns: [
{ dataIndex: 'id', title: 'ID' }, { dataIndex: 'id', title: 'ID' },
@@ -963,7 +965,7 @@
}, },
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' }, { dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' }, { dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' }, { dataIndex: 'releaseDate', title: '发生时间' },
{ dataIndex: 'caseNumber', title: '案号' }, { dataIndex: 'caseNumber', title: '案号' },
{ dataIndex: 'involvedAmount', title: '涉案金额' }, { dataIndex: 'involvedAmount', title: '涉案金额' },
{ dataIndex: 'courtName', title: '法院' }, { dataIndex: 'courtName', title: '法院' },
@@ -1174,7 +1176,8 @@
{ dataIndex: 'publicDate', title: '公示日期' }, { dataIndex: 'publicDate', title: '公示日期' },
{ dataIndex: 'freezeDateStart', title: '冻结开始日期' }, { dataIndex: 'freezeDateStart', title: '冻结开始日期' },
{ dataIndex: 'freezeDateEnd', title: '冻结结束日期' }, { dataIndex: 'freezeDateEnd', title: '冻结结束日期' },
{ dataIndex: 'dataStatus', title: '数据状态' }, { dataIndex: 'dataStatus', title: '状态' },
{ dataIndex: 'dataType', title: '数据状态' },
{ dataIndex: 'realName', title: '操作人' }, { dataIndex: 'realName', title: '操作人' },
{ dataIndex: 'createTime', title: '创建时间' } { dataIndex: 'createTime', title: '创建时间' }
] ]

View File

@@ -40,6 +40,9 @@
<a-tag v-if="record.status === 0" color="green">显示</a-tag> <a-tag v-if="record.status === 0" color="green">显示</a-tag>
<a-tag v-if="record.status === 1" color="red">隐藏</a-tag> <a-tag v-if="record.status === 1" color="red">隐藏</a-tag>
</template> </template>
<template v-if="column.key === 'dataType'">
{{ record.dataType }}
</template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<a-space> <a-space>
<a @click="openEdit(record)">修改</a> <a @click="openEdit(record)">修改</a>
@@ -185,13 +188,13 @@
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'dataType', dataIndex: 'dataStatus',
key: 'dataType' key: 'dataStatus'
}, },
{ {
title: '数据状态', title: '数据状态',
dataIndex: 'dataStatus', dataIndex: 'dataType',
key: 'dataStatus' key: 'dataType'
}, },
{ {
title: '操作人', title: '操作人',

View File

@@ -14,6 +14,12 @@
> >
<template #toolbar> <template #toolbar>
<a-space class="flex"> <a-space class="flex">
<a-button class="ele-btn-icon" @click="openImport">
<template #icon>
<CloudUploadOutlined />
</template>
<span>导入()</span>
</a-button>
<RefreshCompanyIdButton <RefreshCompanyIdButton
module="credit-nearby-company" module="credit-nearby-company"
@done="reload" @done="reload"
@@ -90,6 +96,7 @@
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue'; import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
import { exportCreditData } from '../utils/export'; import { exportCreditData } from '../utils/export';
import { getPageTitle } from '@/utils/common'; import { getPageTitle } from '@/utils/common';
import { CloudUploadOutlined } from '@ant-design/icons-vue';
import CreditNearbyCompanyEdit from './components/creditNearbyCompanyEdit.vue'; import CreditNearbyCompanyEdit from './components/creditNearbyCompanyEdit.vue';
import CreditNearbyCompanyImport from './components/credit-nearby-company-import.vue'; import CreditNearbyCompanyImport from './components/credit-nearby-company-import.vue';
import { import {
@@ -213,12 +220,6 @@
key: 'email', key: 'email',
ellipsis: true ellipsis: true
}, },
{
title: '邮箱',
dataIndex: 'moreEmail',
key: 'moreEmail',
ellipsis: true
},
{ {
title: '所在国家', title: '所在国家',
dataIndex: 'country', dataIndex: 'country',
@@ -322,7 +323,7 @@
key: 'mailingAddress' key: 'mailingAddress'
}, },
{ {
title: '通信地址邮', title: '通信地址邮',
dataIndex: 'mailingEmail', dataIndex: 'mailingEmail',
key: 'mailingEmail' key: 'mailingEmail'
}, },
@@ -338,11 +339,6 @@
key: 'natureOfBusiness', key: 'natureOfBusiness',
ellipsis: true ellipsis: true
}, },
{
title: '电话',
dataIndex: 'tel',
key: 'tel'
},
{ {
title: '企查查行业门类', title: '企查查行业门类',
dataIndex: 'nationalStandardIndustryCategories5', dataIndex: 'nationalStandardIndustryCategories5',
@@ -363,62 +359,33 @@
dataIndex: 'nationalStandardIndustryCategories8', dataIndex: 'nationalStandardIndustryCategories8',
key: 'nationalStandardIndustryCategories8' key: 'nationalStandardIndustryCategories8'
}, },
{ // {
title: '类型', // title: '实缴资本',
dataIndex: 'type', // dataIndex: 'paidinCapital',
key: 'type', // key: 'paidinCapital'
width: 120 // },
}, // {
{ // title: '登记机关',
title: '实缴资本', // dataIndex: 'registrationAuthority',
dataIndex: 'paidinCapital', // key: 'registrationAuthority'
key: 'paidinCapital' // },
}, // {
{ // title: '纳税人资质',
title: '登记机关', // dataIndex: 'taxpayerQualification',
dataIndex: 'registrationAuthority', // key: 'taxpayerQualification'
key: 'registrationAuthority' // },
}, // {
{ // title: '最新年报年份',
title: '纳税人资质', // dataIndex: 'latestAnnualReportYear',
dataIndex: 'taxpayerQualification', // key: 'latestAnnualReportYear'
key: 'taxpayerQualification' // },
}, // {
{ // title: '最新年报营业收入',
title: '最新年报年份', // dataIndex: 'latestAnnualReportOnOperatingRevenue',
dataIndex: 'latestAnnualReportYear', // key: 'latestAnnualReportOnOperatingRevenue'
key: 'latestAnnualReportYear' // },
},
{
title: '最新年报营业收入',
dataIndex: 'latestAnnualReportOnOperatingRevenue',
key: 'latestAnnualReportOnOperatingRevenue'
},
{
title: '企查分',
dataIndex: 'enterpriseScoreCheck',
key: 'enterpriseScoreCheck'
},
{
title: '信用等级',
dataIndex: 'creditRating',
key: 'creditRating'
},
{
title: '科创分',
dataIndex: 'cechnologyScore',
key: 'cechnologyScore'
},
{
title: '科创等级',
dataIndex: 'cechnologyLevel',
key: 'cechnologyLevel'
},
{
title: '是否小微企业',
dataIndex: 'smallEnterprise',
key: 'smallEnterprise'
},
// { // {
// title: '备注', // title: '备注',
// dataIndex: 'comments', // dataIndex: 'comments',
@@ -552,7 +519,6 @@
{ title: '通信地址邮箱', dataIndex: 'mailingEmail' }, { title: '通信地址邮箱', dataIndex: 'mailingEmail' },
{ title: '企业简介', dataIndex: 'companyProfile' }, { title: '企业简介', dataIndex: 'companyProfile' },
{ title: '经营范围', dataIndex: 'natureOfBusiness' }, { title: '经营范围', dataIndex: 'natureOfBusiness' },
{ title: '电话', dataIndex: 'tel' },
{ {
title: '企查查行业门类', title: '企查查行业门类',
dataIndex: 'nationalStandardIndustryCategories5' dataIndex: 'nationalStandardIndustryCategories5'

View File

@@ -159,8 +159,8 @@
}, },
{ {
title: '发生时间', title: '发生时间',
dataIndex: 'occurrenceTime', dataIndex: 'releaseDate',
key: 'occurrenceTime' key: 'releaseDate'
}, },
{ {
title: '案号', title: '案号',