feat(cw): add budget execution import backend and frontend files

This commit is contained in:
wuzhen committed 2026-01-06 09:47:49 +08:00
1 parent 2dc1c8dcea
commit fe0d528fcc
13 files changed
+904

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
import request from '@/utils/request';
/**
* 导入预算执行数据
* @param file File
*/
export const importBudgetExecution = (file: File) => {
const formData = new FormData();
formData.append('file', file);
return request({
url: '/cw/budgetExecutionImport/importData',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
};
/**
* 下载导入模板
*/
export const downloadBudgetExecutionTemplate = () => {
return request({
url: '/cw/budgetExecutionImport/importTemplate',
method: 'post',
responseType: 'blob'
});
};
/**
* 查询批次分页
*/
export const listImportBatches = (params?: any) => {
return request({
url: '/cw/budgetExecutionImport/batch/list',
method: 'get',
params
});
};
/**
* 查询明细分页
*/
export const listImportItems = (batchId: number, params?: any) => {
return request({
url: '/cw/budgetExecutionImport/item/list',
method: 'get',
params: { batchId, ...params }
});
};