Browse Source

修改发料自动提交

hella_online_20240829
lijuncheng 5 months ago
parent
commit
c779e95e98
  1. 1
      src/pages/issue/coms/comScanIssuePack.vue
  2. 28
      src/pages/issue/job/issueDetail.vue

1
src/pages/issue/coms/comScanIssuePack.vue

@ -385,6 +385,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
batch.detail = fromLocation.Batchs[0].detail; batch.detail = fromLocation.Batchs[0].detail;
} }
fromLocation.Batchs.unshift(batch); fromLocation.Batchs.unshift(batch);
that.$emit("afterScan");
} }
}) })
} else { } else {

28
src/pages/issue/job/issueDetail.vue

@ -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();
// }
// });
// }
}) })
}) })
}, },

Loading…
Cancel
Save