import request from '@/config/axios' export interface SupplieritemVO { supplierCode: string itemCode: string supplierItemCode: string supplierUom: string convertRate: number packUnit: string packQty: number altPackUnit: string altPackQty: number packQtyOfContainer: number defaultWarehouseCode: string defaultLocationCode: string settlementType: string available: number activeTime: Date expireTime: Date remark: string } // 查询供应商物品列表 export const getSupplieritemPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/supplieritem/senior', data }) } else { return await request.get({ url: `/wms/supplieritem/page`, params }) } } // 查询供应商物品详情 export const getSupplieritem = async (id: number) => { return await request.get({ url: `/wms/supplieritem/get?id=` + id }) } // 新增供应商物品 export const createSupplieritem = async (data: SupplieritemVO) => { return await request.post({ url: `/wms/supplieritem/create`, data }) } // 修改供应商物品 export const updateSupplieritem = async (data: SupplieritemVO) => { return await request.put({ url: `/wms/supplieritem/update`, data }) } // 删除供应商物品 export const deleteSupplieritem = async (id: number) => { return await request.delete({ url: `/wms/supplieritem/delete?id=` + id }) } // 导出供应商物品 Excel export const exportSupplieritem = async (params) => { if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior`, data }) } else { return await request.download({ url: `/wms/supplieritem/export-excel`, params }) } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplieritem/get-import-template' }) } // 查询供应商物品列表 export const selectItembasicTypeToSupplieritem = async (params) => { return await request.get({ url: `/wms/supplieritem/pageItembasicTypeToSupplieritem`, params }) }