This commit is contained in:
吴红兵
2026-03-03 15:32:36 +08:00
parent 168e134e1b
commit 4c735f93a0
5 changed files with 131 additions and 41 deletions

View File

@@ -87,3 +87,42 @@ export function editObj(obj: any) {
});
}
/**
* 下载导入模板
*/
export function downloadTemplate() {
return request({
url: '/purchase/purchasingcategory/import/template',
method: 'get',
responseType: 'blob'
});
}
/**
* 导入数据
* @param file 文件对象
*/
export function importData(file: File) {
const formData = new FormData();
formData.append('file', file);
return request({
url: '/purchase/purchasingcategory/import',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
}
/**
* 导出数据
*/
export function exportData() {
return request({
url: '/purchase/purchasingcategory/export',
method: 'get',
responseType: 'blob'
});
}