diff --git a/pages/repleinsh/coms/comRepleishDetailCard.vue b/pages/repleinsh/coms/comRepleishDetailCard.vue index 731e0f58..68aa3247 100644 --- a/pages/repleinsh/coms/comRepleishDetailCard.vue +++ b/pages/repleinsh/coms/comRepleishDetailCard.vue @@ -8,7 +8,7 @@ diff --git a/pages/repleinsh/coms/comScanReplishPack.vue b/pages/repleinsh/coms/comScanReplishPack.vue index 3a574acc..6d9c2054 100644 --- a/pages/repleinsh/coms/comScanReplishPack.vue +++ b/pages/repleinsh/coms/comScanReplishPack.vue @@ -393,6 +393,19 @@ handleQty = calc.add(handleQty,res.qty) }) batch.handleQty = handleQty; + + this.dataContent.forEach(toLocationCode=>{ + toLocationCode.Items.forEach(item=>{ + var itemCodeHandleQty =0; + item.Locations.forEach(batch=>{ + batch.Batchs.forEach(batchHandleQty=>{ + itemCodeHandleQty=calc.add(itemCodeHandleQty,batchHandleQty.handleQty) + }) + }) + item.handleQty=itemCodeHandleQty; + }) + + }) }, addRecord(batch, label, balance, packageInfo) { diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index 10d7b1ea..8f811b34 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -11,7 +11,7 @@ - + @@ -213,15 +213,30 @@ submit() { var scanCount = this.getScanCount(this.subList); - if (scanCount == 0) { - this.showErrorMessage("扫描数为0,请先扫描") - return; + + //允许部分提交 + if(this.jobContent.allowPartialComplete=="TRUE"){ + // 如果扫描数是0,提示扫描数为0,是否提交,点击确定提交,取消提示消失 + if(scanCount == 0){ + this.$refs.comMessage.showQuestionMessage("扫描数为0,是否提交?",res=>{ + if(res){ + this.setSubmitParamsAndSubmit(); + } + }) + }else { + this.setSubmitParamsAndSubmit(); + } + }else { + //不允许部分提交,扫描数必须等于任务数量才可以提交 + if(scanCount == 0){ + this.showErrorMessage("扫描数为0,当前补料任务不允许部分提交,请先扫描") + }else { + this.setSubmitParamsAndSubmit(); + } } - uni.showLoading({ - title: "提交中....", - mask: true - }); - + }, + + setSubmitParamsAndSubmit(){ //目前任务只到一个库位 var itemCodes = [] let locationCode = this.toLocationCode @@ -230,7 +245,7 @@ itemCodes.push(item.itemCode) }) }) - + //使用在途库,不查询管理模式 if (this.jobContent.useOnTheWayLocation == 'TRUE') { this.submitJob(); @@ -249,6 +264,10 @@ }, submitJob() { + uni.showLoading({ + title: "提交中....", + mask: true + }); var params = this.setParams() console.log("提交参数", JSON.stringify(params));