WEB/src/api/storage_receiving/receiving.ts

295 lines
6.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/utils/request'
const v = "1.0"
export function getReceivingList(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.getReceivingList',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function getReceivingDetail(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.getReceivingDetail',
v,
timestamp: new Date().getTime()
},
data: data
})
}
// 未使用
// export function getReceivingProduct(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.getReceivingProduct',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
export function batchCancelReceiving(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.batchCancelReceiving',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function reviewReceiving(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.reviewReceiving',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function rejectReceiving(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.rejectReceiving',
v,
timestamp: new Date().getTime()
},
data: data
})
}
// export function exportReceiving(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.exportReceiving',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
export function createReceiving(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.create',
v,
timestamp: new Date().getTime()
},
data: data
})
}
// export function cancelReceiving(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.batchCancelReceiving',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// PDA项目使用,本项目不使用
// export function addItem(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.addItem',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function removeItem(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.removeItem',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function saveReceiving(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.saveReceiving',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function getReceiving(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.get',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function addDetail(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.addDetail',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function deleteDetail(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.deleteDetail',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function detailChange(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.detailChange',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// export function cancelReceivingDetail(data: any): Promise<any> {
// return request({
// url: '/system',
// method: 'post',
// params: {
// method: 'storage.receiving.cancel',
// v,
// timestamp: new Date().getTime()
// },
// data: data
// })
// }
// ------
export function completeReceiving(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.completeReceiving',
v,
timestamp: new Date().getTime()
},
data: data
})
}
// 绑定货主到收货单
export function bindReceivingStore(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.bindStore',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function bindDetailProduct(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.bindDetailProduct',
v,
timestamp: new Date().getTime()
},
data: data,
})
}
export function detailChange(data: any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.receiving.detailChange',
v,
timestamp: new Date().getTime()
},
data
})
}
export function quickPutaway(data: {
/** 收货单ID */
receiving_id: number
/** 可选:指定目标仓库货位等附加信息 */
extra?: Record<string, any>
}): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.inventory.quickPutaway',
v,
timestamp: new Date().getTime()
},
data,
isSystemApi: true
} as any)
}