| | |
| | | }); |
| | | } |
| | | |
| | | /** 采购订单导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的采购单编号 */ |
| | | createList?: string[]; |
| | | /** 更新成功的采购单编号 */ |
| | | updateList?: string[]; |
| | | /** 导入失败集合,key 为采购单编号或行号,value 为失败原因 */ |
| | | failureList?: Record<string, string>; |
| | | } |
| | | |
| | | /** 获取采购审核流程列表响应 */ |
| | | export interface ProcessDefinition { |
| | | id: string; // 流程定义ID |
| | |
| | | params: { id }, |
| | | }); |
| | | } |
| | | |
| | | /** 下载采购订单导入模板 */ |
| | | export function importPurchaseOrderTemplate() { |
| | | return requestClient.download('/erp/purchase-order/get-import-template'); |
| | | } |
| | | |
| | | /** 导入采购订单 */ |
| | | export function importPurchaseOrder(file: File, directApprove: boolean) { |
| | | return requestClient.upload<ImportResult>( |
| | | '/erp/purchase-order/import', |
| | | { file, directApprove }, |
| | | ); |
| | | } |