You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

169 lines
5.4 KiB

import request from '@/config/axios'
export interface InventorymoveRequestMainVO {
number: string
businessType: string
remark: string
createTime: Date
creator: string
requestTime: Date
dueTime: Date
departmentCode: string
status: string
updateTime: Date
updater: string
fromWarehouseOde: string
fromLocationTypes: string
fromAreaCodes: string
toWarehouseCode: string
toLocationTypes: string
toAreaCodes: string
useOnTheWayLocation: string
autoCommit: string
autoAgree: string
autoExecute: string
directCreateRecord: string
}
// 查询库存转移申请主列表
export const getInventorymoveRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/senior', data })
} else {
return await request.get({ url: `/wms/inventorymove-request-main/page`, params })
}
}
// 查询库存转移申请主详情
export const getInventorymoveRequestMain = async (id: number) => {
return await request.get({ url: `/wms/inventorymove-request-main/get?id=` + id })
}
// 新增库存转移申请主
export const createInventorymoveRequestMain = async (data: InventorymoveRequestMainVO) => {
return await request.post({ url: `/wms/inventorymove-request-main/create`, data })
}
// 修改库存转移申请主
export const updateInventorymoveRequestMain = async (data: InventorymoveRequestMainVO) => {
return await request.put({ url: `/wms/inventorymove-request-main/update`, data })
}
// 删除库存转移申请主
export const deleteInventorymoveRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/inventorymove-request-main/delete?id=` + id })
}
// 导出库存转移申请主 Excel
export const exportInventorymoveRequestMain = async (params) => {
params.businessType = 'Move'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出合格转隔离申请主 Excel
export const exportOkToHoldRequestMain = async (params) => {
params.businessType = 'OkToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出隔离转合格申请主 Excel
export const exportHoldToOkRequestMain = async (params) => {
params.businessType = 'HoldToOk'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出隔离转报废申请主 Excel
export const exportHoldToScrapRequestMain = async (params) => {
params.businessType = 'HoldToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出合格转报废申请主 Excel
export const exportOkToScrapRequestMain = async (params) => {
params.businessType = 'OkToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出报废转隔离申请主 Excel
export const exportScrapToHoldRequestMain = async (params) => {
params.businessType = 'ScrapToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template' })
}
// 下载用户导入模板(除库存移动外)
export const importTemplateExceptMove = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template-exceptMove' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/handle?id=' + id })
}