| | |
| | | productUnitId?: number; // 产品单位编号 |
| | | productUnitName?: string; // 产品单位名称 |
| | | productBarCode?: string; // 产品条码 |
| | | productPrice?: number; // 产品单价(参考价) |
| | | productPrice?: number; // 含税单价(参考价) |
| | | count: number; // 数量 |
| | | taxPercent?: number; // 税率 |
| | | totalPrice?: number; // 不含税金额 |
| | | taxPrice?: number; // 税额 |
| | | demandTime?: string; // 需求日期 |
| | | remark?: string; // 备注 |
| | | qcCheckFlag?: boolean; // 是否质检 |
| | | inCount?: number; // 入库数量 |
| | | } |
| | | } |
| | | |
| | | /** 采购申请导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的采购申请单号 */ |
| | | createList?: string[]; |
| | | /** 更新成功的采购申请单号 */ |
| | | updateList?: string[]; |
| | | /** 导入失败集合,key 为采购申请单号或行号,value 为失败原因 */ |
| | | failureList?: Record<string, string>; |
| | | } |
| | | |
| | | /** 创建采购申请 */ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** 下载采购申请导入模板 */ |
| | | 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 }); |
| | | } |