| | |
| | | } |
| | | } |
| | | |
| | | /** 采购申请导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的采购申请单号 */ |
| | | createList?: string[]; |
| | | /** 更新成功的采购申请单号 */ |
| | | updateList?: string[]; |
| | | /** 导入失败集合,key 为采购申请单号或行号,value 为失败原因 */ |
| | | failureList?: Record<string, string>; |
| | | } |
| | | |
| | | /** 创建采购申请 */ |
| | | export function createPurchaseRequest(data: ErpPurchaseRequestApi.PurchaseRequest) { |
| | | return requestClient.post('/erp/purchase-request/create', data); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** 下载采购申请导入模板 */ |
| | | export function importPurchaseRequestTemplate() { |
| | | return requestClient.download('/erp/purchase-request/get-import-template'); |
| | | } |
| | | |
| | | /** 导入采购申请 */ |
| | | export function importPurchaseRequest(file: File) { |
| | | return requestClient.upload<ImportResult>('/erp/purchase-request/import', { file }); |
| | | } |