From fe20f0f0b34dd03c90879128e9f07b7887b862ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 3 Mar 2026 16:32:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(credit):=20=E6=96=B0=E5=A2=9E=E9=99=84?= =?UTF-8?q?=E8=BF=91=E4=BC=81=E4=B8=9A=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 importCreditNearbyCompanyMulti 函数支持多文件同时导入 - 提取 buildImportFormData 工具函数统一处理文件上传逻辑 - 在信用公司页面新增批量导入按钮和上传图标组件 - 将限制高消费表格中的发生时间字段从 occurrenceTime 改为 releaseDate - 调整股权冻结页面的数据状态列顺序和显示逻辑 - 移除附近企业页面中重复和不必要的表格列配置 - 修改附近企业页面通信地址邮箱列为正确的通信地址邮编 - 更新开发环境配置文件启用本地 API 地址并 --- .env.development | 4 +- src/api/credit/creditNearbyCompany/index.ts | 49 ++++++++- .../components/creditCompanyInfo.vue | 7 +- src/views/credit/creditGqdj/index.vue | 11 +- .../credit/creditNearbyCompany/index.vue | 104 ++++++------------ src/views/credit/creditXgxf/index.vue | 4 +- 6 files changed, 95 insertions(+), 84 deletions(-) diff --git a/.env.development b/.env.development index 3de4baf..ecb9bfb 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ 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_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 diff --git a/src/api/credit/creditNearbyCompany/index.ts b/src/api/credit/creditNearbyCompany/index.ts index 3e1c9d8..3516e21 100644 --- a/src/api/credit/creditNearbyCompany/index.ts +++ b/src/api/credit/creditNearbyCompany/index.ts @@ -115,11 +115,7 @@ export async function importCreditNearbyCompany( file: File, companyId?: number ) { - const formData = new FormData(); - formData.append('file', file); - if (companyId != null) { - formData.append('companyId', String(companyId)); - } + const formData = buildImportFormData(file, companyId); const res = await request.post>( '/credit/credit-nearby-company/import', formData, @@ -135,6 +131,49 @@ export async function importCreditNearbyCompany( 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>( + '/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 { fileName: string; success: boolean; diff --git a/src/views/credit/creditCompany/components/creditCompanyInfo.vue b/src/views/credit/creditCompany/components/creditCompanyInfo.vue index 4a6a426..4b86731 100644 --- a/src/views/credit/creditCompany/components/creditCompanyInfo.vue +++ b/src/views/credit/creditCompany/components/creditCompanyInfo.vue @@ -952,6 +952,8 @@ }, hidden: ['historyId', 'historyName'] }, + + 限制高消费: { columns: [ { dataIndex: 'id', title: 'ID' }, @@ -963,7 +965,7 @@ }, { dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' }, { dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' }, - { dataIndex: 'occurrenceTime', title: '发生时间' }, + { dataIndex: 'releaseDate', title: '发生时间' }, { dataIndex: 'caseNumber', title: '案号' }, { dataIndex: 'involvedAmount', title: '涉案金额' }, { dataIndex: 'courtName', title: '法院' }, @@ -1174,7 +1176,8 @@ { dataIndex: 'publicDate', title: '公示日期' }, { dataIndex: 'freezeDateStart', title: '冻结开始日期' }, { dataIndex: 'freezeDateEnd', title: '冻结结束日期' }, - { dataIndex: 'dataStatus', title: '数据状态' }, + { dataIndex: 'dataStatus', title: '状态' }, + { dataIndex: 'dataType', title: '数据状态' }, { dataIndex: 'realName', title: '操作人' }, { dataIndex: 'createTime', title: '创建时间' } ] diff --git a/src/views/credit/creditGqdj/index.vue b/src/views/credit/creditGqdj/index.vue index 10b98ad..747c7b8 100644 --- a/src/views/credit/creditGqdj/index.vue +++ b/src/views/credit/creditGqdj/index.vue @@ -40,6 +40,9 @@ 显示 隐藏 +