import request from '@/config/axios' export interface UnplannedreceiptRequestMainVO { toWarehouseCode: string number: string businessType: string remark: string createTime: Date creator: string requestTime: Date dueTime: Date departmentCode: string status: string updateTime: Date updater: string toAreaTypes: string toAreaCodes: string autoCommit: string autoAgree: string autoExecute: string directCreateRecord: string } // 查询计划外入库申请主列表 export const getUnplannedreceiptRequestMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/wms/unplannedreceipt-request-main/senior', data }) } else { return await request.get({ url: `/wms/unplannedreceipt-request-main/page`, params }) } } // 查询计划外入库申请主详情 export const getUnplannedreceiptRequestMain = async (id: number) => { return await request.get({ url: `/wms/unplannedreceipt-request-main/get?id=` + id }) } // 新增计划外入库申请主 export const createUnplannedreceiptRequestMain = async (data: UnplannedreceiptRequestMainVO) => { return await request.post({ url: `/wms/unplannedreceipt-request-main/create`, data }) } // 修改计划外入库申请主 export const updateUnplannedreceiptRequestMain = async (data: UnplannedreceiptRequestMainVO) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/update`, data }) } // 删除计划外入库申请主 export const deleteUnplannedreceiptRequestMain = async (id: number) => { return await request.delete({ url: `/wms/unplannedreceipt-request-main/delete?id=` + id }) } // 导出计划外入库申请主 Excel export const exportUnplannedreceiptRequestMain = async (params) => { if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/unplannedreceipt-request-main/export-excel-senior`, data }) } else { return await request.download({ url: `/wms/unplannedreceipt-request-main/export-excel`, params }) } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/unplannedreceipt-request-main/get-import-template' }) } // 关闭-计划外入库申请 export const closeUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/close?id=` + id }) } // 重新添加-计划外入库申请 export const reAddUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/reAdd?id=` + id }) } // 提交审批-计划外入库申请 export const submitUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/submit?id=` + id }) } // 审批驳回-计划外入库申请 export const refusedUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/refused?id=` + id }) } // 审批通过-计划外入库申请 export const agreeUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/agree?id=` + id }) } // 处理-计划外入库申请 export const handleUnplannedreceiptRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/handle?id=` + id }) } export const handleSparepartReturnRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedreceipt-request-main/handleBack?id=` + id }) }