| | |
| | | }); |
| | | } |
| | | |
| | | /** 查询物料列表 */ |
| | | export function getItemList(params?: Partial<MdmItemApi.Item>) { |
| | | return requestClient.get<MdmItemApi.Item[]>('/mdm/item/list', { params }); |
| | | /** 查询物料列表(按ID列表) */ |
| | | export function getItemList(ids: number[]) { |
| | | return requestClient.get<MdmItemApi.Item[]>('/mdm/item/list-by-ids', { params: { ids: ids.join(',') } }); |
| | | } |
| | | |
| | | /** 获取物料精简列表(启用状态,用于下拉选择) */ |
| | | export function getItemSimpleList() { |
| | | return requestClient.get<MdmItemApi.Item[]>('/mdm/item/simple-list'); |
| | | } |
| | | |
| | | /** 查询物料详情 */ |
| | |
| | | return requestClient.put('/mdm/item/update-status', { id, status }); |
| | | } |
| | | |
| | | /** 更新物料同步状态 */ |
| | | export function updateItemSync(id: number, sync: boolean) { |
| | | return requestClient.put('/mdm/item/update-sync', { id, sync }); |
| | | } |
| | | |
| | | /** 导出物料 */ |
| | | export function exportItem(params: Partial<MdmItemApi.Item>) { |
| | | return requestClient.download('/mdm/item/export-excel', { params }); |
| | | } |
| | | |
| | | /** 下载物料导入模板 */ |
| | | export function importItemTemplate() { |
| | | return requestClient.download('/mdm/item/get-import-template'); |
| | | } |
| | | |
| | | /** 导入物料 */ |
| | | export function importItem(file: File, updateSupport: boolean) { |
| | | return requestClient.upload('/mdm/item/import', { |
| | | file, |
| | | updateSupport, |
| | | }); |
| | | } |