diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index f9310b66..f2b15e7a 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -385,6 +385,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js'; batch.detail = fromLocation.Batchs[0].detail; } fromLocation.Batchs.unshift(batch); + that.$emit("afterScan"); } }) } else { diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 960b38c0..176fa4f8 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -446,14 +446,22 @@ let s = ''; detail.Items.forEach(item => { let totalHandleQty = 0; + var isHandleEmpty =false;//多个库位时 handleQty =0; item.Locations.forEach(lco => { lco.Batchs.forEach(batch => { - totalHandleQty = calc.add(totalHandleQty, batch.handleQty) + if(batch.handleQty!=0){ + totalHandleQty = calc.add(totalHandleQty, batch.handleQty) + }else { + isHandleEmpty=true; + } }) }) - if (item.qty == totalHandleQty) { + if(item.qty == totalHandleQty){ + if(isHandleEmpty){ + return; + } this.submit(); - } else { + }else { this.$refs.comMessage.showQuestionMessage('实际扫描数量【' + totalHandleQty + '】与物料需求数量【' + item.qty + '】不一致,是否继续提交', 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(); + // } + // }); + // } }) }) },