✨ feat(mes): 添加领料出库单数量校验功能
新增校验领料出库单数量的接口,确保每行明细数量之和等于行领料数量。此功能提升了数据一致性检查,避免了潜在的数量不匹配问题。pull/871/MERGE
parent
1afe2e79e4
commit
0d3ddca266
|
|
@ -78,6 +78,11 @@ export const WmProductionIssueApi = {
|
|||
return await request.put({ url: '/mes/wm/production-issue/finish?id=' + id })
|
||||
},
|
||||
|
||||
// 校验领料出库单数量(每行明细数量之和是否等于行领料数量)
|
||||
checkProductionIssueQuantity: async (id: number) => {
|
||||
return await request.get({ url: '/mes/wm/production-issue/check-quantity?id=' + id })
|
||||
},
|
||||
|
||||
// 导出领料出库单 Excel
|
||||
exportProductionIssue: async (params: any) => {
|
||||
return await request.download({ url: '/mes/wm/production-issue/export-excel', params })
|
||||
|
|
|
|||
|
|
@ -177,8 +177,12 @@ const submitForm = async () => {
|
|||
/** 执行拣货 */
|
||||
const handleStock = async () => {
|
||||
try {
|
||||
await message.confirm('确认执行拣货?')
|
||||
formLoading.value = true
|
||||
// 校验领料数量与拣货数量是否一致
|
||||
const quantityMatch = await WmProductionIssueApi.checkProductionIssueQuantity(formData.value.id!)
|
||||
if (!quantityMatch) {
|
||||
await message.confirm('领料数量与拣货数量不一致,确认执行拣货?')
|
||||
}
|
||||
await WmProductionIssueApi.stockProductionIssue(formData.value.id!)
|
||||
message.success('拣货成功')
|
||||
dialogVisible.value = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue