diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 53118cf2..e780a050 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -418,6 +418,7 @@ newDetail.managementTypeParams = managementTypeParams; newDetail.fromLocationCode = result.fromLocationCode newDetail.handleQty = Number(result.label.qty) + newDetail.batch = result.label.batch newDetail.packQty = balance.packQty; newDetail.packUnit = balance.packUnit; itemp.subList.push(newDetail); @@ -460,6 +461,7 @@ newDetail.toLocationCode = this.toLocationCode; newDetail.managementTypeParams = managementTypeParams; newDetail.fromLocationCode = result.fromLocationCode + newDetail.batch = result.label.batch newDetail.handleQty = result.label.qty newDetail.packQty = balance.packQty; newDetail.packUnit = balance.packUnit; diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index 61d85710..9a17e858 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -551,20 +551,21 @@ let str1 = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { - if (cur.qty != cur.handleQty) { - var tempHandleQty = 0 - if (cur.handleQty) { - tempHandleQty = cur.handleQty - } else { - tempHandleQty = 0 - } - str += - `物料号【${item.itemCode}】批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` - if( cur.handleQty > cur.balance.balanceQty){ - console.log(2333,cur.handleQty) - console.log(2333,cur.balance.balanceQty) - str1 += - `物料号【${item.itemCode}】批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】` + + if(cur.scaned){ + if (cur.qty != cur.handleQty) { + var tempHandleQty = 0 + if (cur.handleQty) { + tempHandleQty = cur.handleQty + } else { + tempHandleQty = 0 + } + str += + `物料号【${item.itemCode}】批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` + if(cur.handleQty > cur.balance.balanceQty){ + str1 += + `物料号【${item.itemCode}】批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】` + } } } }) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 090066d4..cd4a2765 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -621,6 +621,7 @@ let str="" let str1="" let str2="" + let str3="" var totalQty =0; var taskQty =0; console.log(877,this.detailSource) @@ -628,46 +629,47 @@ detail.subList.forEach(item => { if(item.scaned){ taskQty =calc.add(taskQty,item.qty) - totalQty =calc.add(totalQty,item.handleQty) - if (this.jobContent.allowSmallerQty == "FALSE") { - if(parseFloat(item.handleQty) parseFloat(item.qty)){ - str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` - } + totalQty =calc.add(totalQty,item.handleQty) + if(parseFloat(item.handleQty) parseFloat(item.qty)){ + str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` } + if(parseFloat(item.handleQty)>parseFloat( item.balance.qty)){ str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` } + } }) }) - console.log(877,str) - if (str) { - str1 = '不允许提交\n' + str - this.showErrorMessage(str) - return + if (this.jobContent.allowSmallerQty == "FALSE") { + if (str) { + str = '不允许提交\n' + str + this.showErrorMessage(str) + return + } } - if (str1) { - str1 = '不允许提交\n' + str1 - this.showErrorMessage(str1) - return + if (this.jobContent.allowBiggerQty == 'FALSE') { + if (str1) { + str1 = '不允许提交\n' + str1 + this.showErrorMessage(str1) + return + } } + if (str2) { str2 = '不允许提交\n' + str2 this.showErrorMessage(str2) return } - if(str){ - str = '任务明细未全部完成,是否提交?\n' + str - } - if(totalQty!=taskQty){ - str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" - this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { + console.log(str3) + if(str3){ + str3 = str3+",是否提交" + this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => { if (res) { //防止重复点击 this.$throttle(this.submit, 2000, this)() diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue index 7013495f..830e13cf 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue +++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue @@ -11,7 +11,7 @@ - diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 7f684684..6e80ce4e 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -5,7 +5,7 @@ - 整单收货 @@ -507,7 +507,8 @@ pack.qty = batchDetailList[i].qty pack.toLocationCode = this.toLocationCode; - pack.labelQty = Number(qty); + console.log(999,result.package) + pack.labelQty = Number(result.package.packQty); pack.scaned = true; // 当前批次剩余可以扫进的数量大于当前扫描的标签数量的时候直接插入当前的批次 if(handleQtySub >= parseFloat(qty)){ @@ -691,15 +692,16 @@ let str = '' let str1 = '' var scanCount=0; + this.jobContent.allowBiggerQty = "FALSE" this.detailSource.forEach((item) => { item.subList.forEach(cur=>{ if(cur.scaned){ scanCount++; if(parseFloat(cur.qty)>parseFloat(cur.handleQty)){ - str += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以小于任务数量【${cur.qty}】\n` + str += `物料号【${item.itemCode}】批次【${cur.batch}】扫描数量【${cur.handleQty}】小于任务推荐数量【${cur.qty}】,\n请修改后再提交` } if(parseFloat(cur.qty)parseFloat(cur.balanceQty)){ - str2 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}】\n` + str2 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.balanceQty}】\n` } } })