feat(credit): 添加历史被执行人功能模块
- 创建被执行人历史记录的数据模型和接口定义 - 实现被执行人历史记录的CRUD操作API方法 - 在被执行人页面添加导入历史被执行人的功能按钮 - 开发被执行人历史记录的管理页面和编辑弹窗组件 - 集成被执行人历史记录的搜索、分页、新增、修改、删除功能 - 添加导入历史被执行人数据的功能入口
This commit is contained in:
@@ -40,6 +40,9 @@ export interface CreditJudgmentDebtor {
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 历史ID
|
||||
historyId?: number;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -103,3 +103,30 @@ export async function getCreditJudgmentDebtorHistory(id: number) {
|
||||
}
|
||||
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-history/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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user