|
@ -446,14 +446,22 @@ |
|
|
let s = ''; |
|
|
let s = ''; |
|
|
detail.Items.forEach(item => { |
|
|
detail.Items.forEach(item => { |
|
|
let totalHandleQty = 0; |
|
|
let totalHandleQty = 0; |
|
|
|
|
|
var isHandleEmpty =false;//多个库位时 handleQty =0; |
|
|
item.Locations.forEach(lco => { |
|
|
item.Locations.forEach(lco => { |
|
|
lco.Batchs.forEach(batch => { |
|
|
lco.Batchs.forEach(batch => { |
|
|
|
|
|
if(batch.handleQty!=0){ |
|
|
totalHandleQty = calc.add(totalHandleQty, batch.handleQty) |
|
|
totalHandleQty = calc.add(totalHandleQty, batch.handleQty) |
|
|
|
|
|
}else { |
|
|
|
|
|
isHandleEmpty=true; |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
if (item.qty == totalHandleQty) { |
|
|
if(item.qty == totalHandleQty){ |
|
|
|
|
|
if(isHandleEmpty){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
this.submit(); |
|
|
this.submit(); |
|
|
} else { |
|
|
}else { |
|
|
this.$refs.comMessage.showQuestionMessage('实际扫描数量【' + totalHandleQty + |
|
|
this.$refs.comMessage.showQuestionMessage('实际扫描数量【' + totalHandleQty + |
|
|
'】与物料需求数量【' + item.qty + |
|
|
'】与物料需求数量【' + item.qty + |
|
|
'】不一致,是否继续提交', res => { |
|
|
'】不一致,是否继续提交', res => { |
|
@ -462,6 +470,22 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (item.qty == totalHandleQty&&!isHandleEmpty) { |
|
|
|
|
|
// //提交 |
|
|
|
|
|
// console.log("提交") |
|
|
|
|
|
// // this.submit(); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$refs.comMessage.showQuestionMessage('实际扫描数量【' + totalHandleQty + |
|
|
|
|
|
// '】与物料需求数量【' + item.qty + |
|
|
|
|
|
// '】不一致,是否继续提交', res => { |
|
|
|
|
|
// if (res) { |
|
|
|
|
|
// console.log("提交") |
|
|
|
|
|
// // this.submit(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|