feat(credit): 添加历史被执行人导入功能
- 新增 importCreditJudgmentDebtorHistory API 接口用于导入历史被执行人数据 - 修复历史被执行人导入组件中的 API 路径引用错误 - 更新导入按钮文字为"导入历史被执行人" - 在表格中添加 updateTime 列显示更新时间 - 新增历史被执行人导入弹窗组件并集成到主页面 - 重命名 createTime 列为 updateTime 以匹配实际字段 - 添加打开历史被执行人导入弹窗的功能函数
This commit is contained in:
@@ -136,3 +136,30 @@ export async function importCreditJudgmentDebtor(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtorHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user