| | |
| | | }); |
| | | } |
| | | |
| | | /** 库存现有量导入结果 */ |
| | | export interface ImportResult { |
| | | /** 新建库存记录成功的行,元素格式「物料编码-仓库」 */ |
| | | createNames?: string[]; |
| | | /** 已存在库存记录调整成功的行,元素格式「物料编码-仓库」 */ |
| | | updateNames?: string[]; |
| | | /** 导入失败的记录,key 为「物料编码-仓库」,value 为失败原因 */ |
| | | failureNames?: Record<string, string>; |
| | | } |
| | | |
| | | /** 下载库存现有量导入模板 */ |
| | | export function importMaterialStockTemplate() { |
| | | return requestClient.download('/mes/wm/material-stock/import-template'); |
| | | } |
| | | |
| | | /** 导入库存现有量 */ |
| | | export function importMaterialStock(file: File) { |
| | | return requestClient.upload<MesWmMaterialStockApi.ImportResult>( |
| | | '/mes/wm/material-stock/import', |
| | | { file }, |
| | | ); |
| | | } |
| | | |
| | | /** 库存调整(自定义出入库)- 入库 */ |
| | | export interface MaterialStockAdjustInParams { |
| | | itemId: number; // 物料ID |