import request from '@/config/axios' export interface InventorychangeRequestMainVO { warehouseCode: string number: string businessType: string remark: string createTime: Date creator: string requestTime: Date dueTime: Date departmentCode: string status: string updateTime: Date updater: string autoCommit: string autoAgree: string autoExecute: string directCreateRecord: string } // 查询库存修改申请主列表 export const getInventorychangeRequestMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/wms/inventorychange-request-main/senior', data }) } else { return await request.get({ url: `/wms/inventorychange-request-main/page`, params }) } } // 查询库存修改申请主详情 export const getInventorychangeRequestMain = async (id: number) => { return await request.get({ url: `/wms/inventorychange-request-main/get?id=` + id }) } // 新增库存修改申请主 export const createInventorychangeRequestMain = async (data: InventorychangeRequestMainVO) => { return await request.post({ url: `/wms/inventorychange-request-main/create`, data }) } // 修改库存修改申请主 export const updateInventorychangeRequestMain = async (data: InventorychangeRequestMainVO) => { return await request.put({ url: `/wms/inventorychange-request-main/update`, data }) } // 删除库存修改申请主 export const deleteInventorychangeRequestMain = async (id: number) => { return await request.delete({ url: `/wms/inventorychange-request-main/delete?id=` + id }) } // 导出库存修改申请主 Excel export const exportInventorychangeRequestMain = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/wms/inventorychange-request-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/inventorychange-request-main/export-excel`, params }) } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/inventorychange-request-main/get-import-template' }) } // 关闭 export const close = (id) => { return request.put({ url: '/wms/inventorychange-request-main/close?id=' + id }) } // 重新添加 export const reAdd = (id) => { return request.put({ url: '/wms/inventorychange-request-main/reAdd?id=' + id }) } // 提交审批 export const submit = (id) => { return request.put({ url: '/wms/inventorychange-request-main/submit?id=' + id }) } // 驳回 export const refused = (id) => { return request.put({ url: '/wms/inventorychange-request-main/refused?id=' + id }) } // 审批通过 export const agree = (id) => { return request.put({ url: '/wms/inventorychange-request-main/agree?id=' + id }) } // 处理 export const handle = (id) => { return request.put({ url: '/wms/inventorychange-request-main/handle?id=' + id }) }