From 05a1c0f7784264abeebacf3de8458b4036dd0829 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 16:54:46 +0800 Subject: [PATCH 1/9] =?UTF-8?q?YT-985=E6=96=B0=E5=A2=9E=EF=BC=8C=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=9D=A5=E6=BA=90=E5=BA=93=E4=BD=8D=EF=BC=8C=E5=8F=89?= =?UTF-8?q?=E6=8E=89=E8=BF=98=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=BA=94=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=20YT-956=E6=89=AB=E6=8F=8F=E7=9B=B8=E5=90=8C=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=B8=8D=E5=90=8C=E6=89=B9=E6=AC=A1=EF=BC=8C=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E8=BE=93?= =?UTF-8?q?=E5=85=A52=EF=BC=8C=E5=B8=A6=E5=87=BA=E7=9A=84=E6=98=AF?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/inventoryMove/coms/comMoveRecord.vue | 8 ++++---- .../inventoryMove/coms/okToHoldRecordPack.vue | 14 +++++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 520cff17..5b636627 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -444,7 +444,7 @@ } console.log(detail) if (detail == undefined) { - let newDetail = createDetailInfo(balance, pack); + let newDetail = createDetailInfoForLabel(balance, pack, result.label); // newDetail.inventoryStatus = balance.inventoryStatus; if (this.businessTypeCode == "Move") { newDetail.toInventoryStatus = balance.inventoryStatus; @@ -452,9 +452,9 @@ newDetail.toInventoryStatus = this.toInventoryStatus; } - if (newDetail.packingNumber == '') { - newDetail.packingNumber = pack.number; - } + // if (newDetail.packingNumber == '') { + // newDetail.packingNumber = pack.number; + // } newDetail.toLocationCode = this.toLocationCode; newDetail.managementTypeParams = managementTypeParams; newDetail.fromLocationCode = result.fromLocationCode diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue index 6b70c023..cd1e0d55 100644 --- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue +++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue @@ -10,7 +10,8 @@ 来源库位: - + + @@ -19,7 +20,8 @@ 零件: - + + @@ -28,7 +30,8 @@ 批次: - + + @@ -73,7 +76,8 @@ fromLocationCode:'', itemCode:'', batch:'', - showOne:false + showOne:false, + isFromLocationFocus:false } }, props: { @@ -126,9 +130,9 @@ }, fromLocationScanMsg(){ if (this.fromLocationCode) { - console.log(111,this.fromLocationCode) this.scanMsg = this.fromLocationCode this.fromWitch = 'fromLocationScanMsg' + this.isFromLocationFocus = false this.handelScanMsg() } }, From f812cf71e1b6ddf5d3647f4ecb81c5cd164ef925 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 18:12:18 +0800 Subject: [PATCH 2/9] =?UTF-8?q?YT-918=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8CPDA=E6=89=AB=E6=8F=8F=E5=90=8E?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=A7=BB=E9=99=A4=E6=89=AB=E6=8F=8F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=90=8E=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/package/packageList.vue | 12 +++---- .../coms/comReceiptDetailCardBacth.vue | 10 +++--- .../purchaseReceipt/job/receiptDetail.vue | 31 ++++++++++++++----- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index a4458dd7..445cf283 100644 --- a/src/mycomponents/package/packageList.vue +++ b/src/mycomponents/package/packageList.vue @@ -131,13 +131,13 @@ this.edit(item) } else if (e.content.text == "移除") { if (type == 'parent') { - this.removeParent(item); + this.removeParent(item,type); } else { - this.remove(item,index,ele) + this.remove(item,type,index,ele) } } }, - removeParent(item) { + removeParent(item,type) { this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", res => { if (res) { @@ -148,7 +148,7 @@ subItem.handleQty = null; }) - this.$emit('updateData') + this.$emit('updateData',type,item) this.$forceUpdate() } }); @@ -156,14 +156,14 @@ - remove(item,index,ele) { + remove(item,type,index,ele) { this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", res => { if (res) { item.scaned = false item.handleQty = null; this.collapseChange() - this.$emit('updateData',ele,index) + this.$emit('updateData',type,item,index,ele) this.$forceUpdate() } }); diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue index 2d37cfe3..7013495f 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue +++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue @@ -174,13 +174,11 @@ item.subList.forEach(lst => { lst.scaned = false; lst.handleQty = null; - lst.packList.forEach(pack => { - pack.scaned = false; - pack.handleQty = null; - }) + lst.packList=[] }) // this.$forceUpdate() // this.$emit('remove', item) + this.updateData() } }); }, @@ -200,8 +198,8 @@ this.editItem.handleQty = qty; this.$emit('updateData') }, - updateData(index,packList) { - this.$emit('updateData',index,packList) + updateData(item,type,index,ele) { + this.$emit('updateData',item,type,index,ele) } } } diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 2e755ac3..7f684684 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -575,19 +575,36 @@ } }, - updateData(ele,index) { - // if(this.managementType == 'BY_BATCH'){ - // }else{ - // calcTreeHandleQty(this.detailSource) - // } - if(ele){ + updateData(type,item,index,ele) { + if(type == 'parent'){ + item.packList=[] + item.scaned = false + }else if(type == 'child'){ + console.log(ele) ele.packList.splice(index,1) if(ele.packList.length == 0){ ele.scaned = false } - this.packingNumberList.splice(index,1) } + this.packingNumberList = [] + this.detailSource.forEach(item=>{ + item.subList.forEach(cur=>{ + if(cur.packList.length>0){ + cur.packList.forEach(i=>{ + this.packingNumberList.push(i) + }) + } + }) + }) + setTimeout(()=>{ + this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{ + item.resizeCollapse() + item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{ + cur.resize() + }) + }) + },500) calcTreeHandleQty(this.detailSource); }, From 2d0f95fe5a3f4185b4f2cea39c62a43c7a11661c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 18:30:31 +0800 Subject: [PATCH 3/9] =?UTF-8?q?YT-933=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E4=BB=BB=E5=8A=A1=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E6=97=B6PDA=E4=BB=BB=E5=8A=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/detail/comRecommendDetailCard.vue | 5 ++--- src/pages/unPlanned/job/receiptJobDetail.vue | 13 +++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mycomponents/detail/comRecommendDetailCard.vue b/src/mycomponents/detail/comRecommendDetailCard.vue index 4eda6a01..090774ac 100644 --- a/src/mycomponents/detail/comRecommendDetailCard.vue +++ b/src/mycomponents/detail/comRecommendDetailCard.vue @@ -13,14 +13,13 @@ -
- +
@@ -30,7 +29,7 @@ 际
- +
diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index cee1ad27..34389bae 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -17,7 +17,7 @@ :locationAreaTypeList='toLocationAreaTypeList'> --> + @remove="updateData" @updateData="updateData" @openDetail="openDetail" :isShowFromLocation='false' :isShowBatch='item.isShowBatch'>
@@ -105,7 +105,7 @@ managementList: [], managementType:'', jobStatus: "", - jobToLocationCode: "" + jobToLocationCode: "", }; }, onLoad(option) { @@ -190,6 +190,13 @@ this.detailSource.forEach(item => { itemCodes.push(item.itemCode) item.scaned = false + item.subList.forEach((cur,index)=>{ + if(index == 0){ + console.log(222,cur) + cur.batch = '' + } + cur.isShowBatch = cur.batch ? true :false + }) }) getManagementPrecisions(itemCodes, that.jobToLocationCode, res => { if (res.success) { @@ -385,8 +392,6 @@ return; } } - console.log(11,scanCount) - console.log(11,this.subList.length) if (scanCount < this.subList.length){ if(this.jobContent.allowPartialComplete == "TRUE"){ this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { From 3438e6fc38480919fcb2ca5572ee5742fde3bbb2 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 18:37:59 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unPlanned/job/receiptJobDetail.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index 34389bae..381aad86 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -190,13 +190,6 @@ this.detailSource.forEach(item => { itemCodes.push(item.itemCode) item.scaned = false - item.subList.forEach((cur,index)=>{ - if(index == 0){ - console.log(222,cur) - cur.batch = '' - } - cur.isShowBatch = cur.batch ? true :false - }) }) getManagementPrecisions(itemCodes, that.jobToLocationCode, res => { if (res.success) { From 70243b2a36c7288fd535f909ce892d0332452926 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 18:49:10 +0800 Subject: [PATCH 5/9] =?UTF-8?q?YT-983pda=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E5=85=81=E8=AE=B8=E4=BF=AE=E6=94=B9=E5=BA=93?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=8E=A8=E8=8D=90=E4=BB=A5?= =?UTF-8?q?=E4=B8=BA=E7=9A=84=E5=BA=93=E4=BD=8D=EF=BC=8C=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index f8af2d29..3b518718 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -617,7 +617,7 @@ autoCommit(){ // this.$throttle(this.submit, 2000, this)() // this.jobContent.allowSmallerQty = 'FALSE' - this.jobContent.allowBiggerQty = 'FALSE' + // this.jobContent.allowBiggerQty = 'FALSE' let str="" let str1="" let str2="" From 603b69e497fe4a26c69e32223336bbf504914980 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 10:08:53 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/comJobDetailCardBatch.vue | 2 +- src/mycomponents/qty/compareQty.vue | 1 + src/pages/putaway/job/putawayDetail.vue | 404 ++++++++++++------ 3 files changed, 277 insertions(+), 130 deletions(-) diff --git a/src/mycomponents/detail/comJobDetailCardBatch.vue b/src/mycomponents/detail/comJobDetailCardBatch.vue index bb2be74f..521db21e 100644 --- a/src/mycomponents/detail/comJobDetailCardBatch.vue +++ b/src/mycomponents/detail/comJobDetailCardBatch.vue @@ -13,7 +13,7 @@ @updateData="updateData" :isShowStatus="isShowStatus" :isShowPackListStatus="isShowPackListStatus" - > + >{ diff --git a/src/mycomponents/qty/compareQty.vue b/src/mycomponents/qty/compareQty.vue index 3c55af38..3d4afc90 100644 --- a/src/mycomponents/qty/compareQty.vue +++ b/src/mycomponents/qty/compareQty.vue @@ -3,6 +3,7 @@ + diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index d5af8ddb..58b69b33 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -16,7 +16,7 @@ - @@ -277,7 +277,11 @@ updateData() { console.log("updateData") // this.calcHandleQty(); + if (this.managementType == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') { + calcHandleQty(this.detailSource); + } else { calcTreeHandleQty(this.detailSource) + } }, //模拟扫描功能 openScanPopupSimulate(message) { @@ -329,36 +333,168 @@ }, getScanResult(result, managementPrecision) { - try { this.managementType = managementPrecision + let array1 = []//记录推荐的库位 + let array2 = []//记录推荐的批次 + this.detailSource.forEach(item=>{ + item.subList.forEach(cur=>{ + array1.push(cur.fromLocationCode) + array2.push(cur.batch) + }) + }) + // 扫描的库位是否在 + const obj1 = array1.find(item=>item == result.fromLocationCode) + const obj2 = array2.find(item=>item == result.label.batch) + // this.jobContent.allowModifyLocation = 'FALSE' + // this.jobContent.allowModifyBatch = 'FALSE' + if(this.jobContent.allowModifyLocation == 'FALSE'){ + if(!obj1){ + this.showErrorMessage(`不可以扫描推荐库位【${array1.join(',')}】以外的库位`) + return + } + } + if(this.jobContent.allowModifyBatch == 'FALSE'){ + if(!obj2){ + this.showErrorMessage(`不可以扫描推荐批次【${array2.join(',')}】以外的批次`) + return + } + } + if(!obj1){ + this.recommendQty = 0 + }else{ + this.recommendQty = result.balance.qty + } + // + if (this.managementType == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') { + this.setDataBatch(result, managementPrecision) + } else { + this.setData(result, managementPrecision) + } + + }, + resizeCollapse() { + this.$nextTick(r => { + this.$refs.comJobDetailCardBatchRef.forEach(r => { + r.resizeCollapse(); + }) + }); + }, + // 按批次的时候校验 代码和按包装的代码基本一致,只不过是校验提示不一致 + setDataBatch(result, managementPrecision){ + try { + var packingNumber = result.label.packingNumber; + var batch = result.label.batch; + var qty = result.label.qty; + var itemCode = result.label.itemCode; + var locationCode = result.fromLocationCode; + + if (!result.balance) { + this.showMessage("箱码【" + packingNumber + "】没有库存余额") + return; + } + + // var inventoryStatus = "OK"; + var detail = this.detailSource.find(r => r.itemCode == itemCode); + + if (detail == undefined) { + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + } else { + detail.scaned = true + + var itemDetail = detail.subList.find(r => { + return r.batch == batch && + r.fromLocationCode == result.fromLocationCode + }) + + if (itemDetail == undefined) { + // let newItemDetail = {} + detail.subList.push({ + scaned:true, + fromLocationCode:result.fromLocationCode, + toLocationCode:this.toLocationCode, + batch:result.label.batch, + handleQty:result.label.qty, + qty:this.recommendQty, + inventoryStatus:result.balance.inventoryStatus, + toLocation:result.balance.toLocation, + balance:result.balance, + balanceQty:result.balance.qty, + packQty:result.package.packQty, + packUnit:result.package.packUnit, + uom:result.balance.uom, + }) + setTimeout(r => { + this.resizeCollapse(); + this.$forceUpdate() + }, 100) + calcHandleQty(this.detailSource); + } else { + var scanedLength = 0; + itemDetail.packList.forEach(res => { + if (res.scaned) { + scanedLength++; + } + }) + + //大哥让加的 + itemDetail.fromInventoryStatus = result.balance.inventoryStatus; + + if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList + .length) { + // this.showMessage("箱码【" + packingNumber + "】已经扫描") + // this.showMessage("批次【" + batch + "】已经扫描") + itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty) + } else { + itemDetail.scaned = true; + itemDetail.balanceQty = result.balance.qty; + this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 + itemDetail.handleQty = result.label.qty; + // itemDetail.toInventoryStatus = "OK" + itemDetail.packList.forEach(pac => { + pac.scaned = true + pac.handleQty = Number(pac.qty); + pac.toLocationCode = this.toLocationCode; + }) + + this.continueScan() + this.$forceUpdate() + } + calcHandleQty(this.detailSource); + } + } + } catch (e) { + this.showMessage(e.message) + } + }, + + setData(result, managementPrecision){ + try { var packingNumber = result.label.packingNumber; var batch = result.label.batch; var qty = result.label.qty; var itemCode = result.label.itemCode; var locationCode = result.fromLocationCode; - + if (!result.balance) { this.showMessage("箱码【" + packingNumber + "】没有库存余额") return; } - + // var inventoryStatus = "OK"; var detail = this.detailSource.find(r => r.itemCode == itemCode); - + if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { detail.scaned = true - if (this.managementType == 'BY_BATCH') { - this.verificationBatch(detail, packingNumber, batch, qty, itemCode, locationCode, result) - } else { - + + var itemDetail = detail.subList.find(r => { return r.packingNumber == packingNumber && r.batch == batch && r.fromLocationCode == result.fromLocationCode }) - + if (itemDetail == undefined) { var isExit; for (let subItem of detail.subList) { @@ -391,7 +527,7 @@ } else { qty = Number(result.label.qty); } - + isExit.handleQty = Number(result.label.qty); isExit.toLocationCode = this.toLocationCode; } @@ -406,10 +542,10 @@ scanedLength++; } }) - + //大哥让加的 itemDetail.fromInventoryStatus = result.balance.inventoryStatus; - + if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList .length) { this.showMessage("箱码【" + packingNumber + "】已经扫描") @@ -423,13 +559,12 @@ pac.handleQty = Number(pac.qty); pac.toLocationCode = this.toLocationCode; }) - + calcTreeHandleQty(this.detailSource); this.continueScan() this.$forceUpdate() } } - } } if (this.managementType == 'BY_BATCH') { this.detailSource.forEach(item => { @@ -442,88 +577,6 @@ this.showMessage(e.message) } }, - // 按批次的时候校验 代码和按包装的代码基本一致,只不过是校验提示不一致 - verificationBatch(detail,packingNumber,batch,qty,itemCode,locationCode,result){ - var itemDetail = detail.subList.find(r => { - return r.batch == batch && - r.fromLocationCode == result.fromLocationCode - }) - - if (itemDetail == undefined) { - var isExit; - for (let subItem of detail.subList) { - var item; - for (let pack of subItem.packList) { - if (pack.batch == batch) { - item = pack; - isExit = pack; - break; - } - } - if (item != undefined) { - subItem.scaned = true - subItem.handleQty = 0; - item = undefined - } - } - - if (isExit == undefined) { - this.showErrorMessage("批次【" + batch + "】库位【" + result - .fromLocationCode + "】不在列表中") - } else { - if (!isExit.cancleScanedHiht && isExit.scaned) { - // this.showMessage("批次【" + batch + "】已经扫描") - isExit.handleQty = calc.add(Number(result.label.qty),isExit.handleQty) - } else { - isExit.scaned = true - let qty = 0; - if (result.balance != null) { - qty = Number(result.balance.qty); - } else { - qty = Number(result.label.qty); - } - - isExit.handleQty = Number(result.label.qty); - isExit.toLocationCode = this.toLocationCode; - } - } - calcTreeHandleQty(this.detailSource); - this.continueScan() - this.$forceUpdate() - } else { - var scanedLength = 0; - itemDetail.packList.forEach(res => { - if (res.scaned) { - scanedLength++; - } - }) - - //大哥让加的 - itemDetail.fromInventoryStatus = result.balance.inventoryStatus; - - if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList - .length) { - // this.showMessage("箱码【" + packingNumber + "】已经扫描") - // this.showMessage("批次【" + batch + "】已经扫描") - itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty) - } else { - itemDetail.scaned = true; - this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 - itemDetail.handleQty = result.label.qty; - // itemDetail.toInventoryStatus = "OK" - itemDetail.packList.forEach(pac => { - pac.scaned = true - pac.handleQty = Number(pac.qty); - pac.toLocationCode = this.toLocationCode; - }) - - this.continueScan() - this.$forceUpdate() - } - calcTreeHandleQty(this.detailSource); - } - - }, scanLocationCode(location, code) { this.toLocationCode = code this.detailSource.forEach(item => { @@ -556,17 +609,8 @@ } }); }, - - commit() { - this.scanCount = getScanCount(this.subList); - if (this.scanCount == 0) { - this.showErrorMessage("扫描数为0,请先扫描") - return; - } - if (!this.checkLocation()) { - return - } - + // 校验 + check(){ //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { this.submitJob(); @@ -583,47 +627,149 @@ //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { - this.openScanPopup(); + this.openScanPopup(this.jobToLocationCode); } }); } } + + }, + //按批次的校验 + checkBatch(){ + //扫描数量和任务数量相等,直接提交 + let str = '' + let str1 = '' + let str2 = '' + var scanCount=0; + // this.jobContent.allowBiggerQty = "FALSE" + // this.jobContent.allowSmallerQty = "FALSE" + // this.jobContent.allowPartialComplete = "TRUE" + 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` + } + if(parseFloat(cur.qty)parseFloat(cur.balanceQty)){ + str2 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}】\n` + } + } + }) + }) + if (scanCount == 0) { + this.showErrorMessage("扫描数为0,请先扫描") + return; + } + if (!this.checkLocation()) { + return + } + if(this.jobContent.allowBiggerQty == "FALSE"){ + if(str1){ + this.$refs.comMessage.showErrorMessage(str1); + return; + } + } + if(this.jobContent.allowSmallerQty == "FALSE"){ + if(str){ + this.$refs.comMessage.showErrorMessage(str); + return; + } + } + if(str2){ + this.$refs.comMessage.showErrorMessage(str2); + return; + } + return; + if(this.scanCount < this.subList.length){ + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(this.jobToLocationCode); + } + }); + } + }else{ + this.submitJob(); + } }, - submitJob() { - uni.showLoading({ - title: "提交中....", - mask: true - }); - + commit() { var itemCodes = [] this.detailSource.forEach(item => { itemCodes.push(item.itemCode) }) - //获取管理模式,封装参数 getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { this.managementList = res.list; - var params = this.setParams() - console.log("提交参数", JSON.stringify(params)); - putawayJobSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - this.showCommitSuccessMessage("提交成功\n生成采购上架记录\n" + res.data) - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) - }) + this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' + if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){ + this.checkBatch() + }else{ + this.check() + } } else { uni.hideLoading(); this.showErrorMessage(res.message); } + }) + //扫描数量和任务数量相等,直接提交 + // if (this.scanCount == this.subList.length) { + // this.submitJob(); + // } else if (this.scanCount < this.subList.length) { + // //扫描数量小于任务数量,判断是否允许部分提交 + // if (this.jobContent.allowPartialComplete == "TRUE") { + // //提交 + // this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + // if (res) { + // this.submitJob() + // } + // }); + // } else { + // //不允许部分提交,提示 + // this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } + }, + + submitJob() { + uni.showLoading({ + title: "提交中....", + mask: true }); + + var params = this.setParams() + console.log("提交参数", JSON.stringify(params)); + putawayJobSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功\n生成采购上架记录\n" + res.data) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + }, setParams() { var subList = [] From 3c3a6da71b75db85f4d90fa1880d888f7109f818 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 10:10:01 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89return?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/putaway/job/putawayDetail.vue | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index 58b69b33..2ee771c1 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -683,7 +683,6 @@ this.$refs.comMessage.showErrorMessage(str2); return; } - return; if(this.scanCount < this.subList.length){ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { @@ -726,27 +725,6 @@ this.showErrorMessage(res.message); } }) - //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { - // if (res) { - // this.submitJob() - // } - // }); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { @@ -754,8 +732,6 @@ title: "提交中....", mask: true }); - - var params = this.setParams() console.log("提交参数", JSON.stringify(params)); putawayJobSubmit(params).then(res => { From 2699634ad0a0b5f954527d0c8d4505d68218b120 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 10:47:13 +0800 Subject: [PATCH 8/9] =?UTF-8?q?YT-985=E6=96=B0=E5=A2=9E=EF=BC=8C=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=9D=A5=E6=BA=90=E5=BA=93=E4=BD=8D=EF=BC=8C=E5=8F=89?= =?UTF-8?q?=E6=8E=89=E8=BF=98=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=BA=94=E6=B8=85?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winScanPackAndLocation.vue | 3 --- src/pages/inventoryMove/coms/comMoveRecord.vue | 2 ++ src/pages/inventoryMove/coms/okToHoldRecordPack.vue | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index ba3aeae9..acc6abb2 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -320,14 +320,11 @@ // return; // } else // 直接合格转隔离直接调用的时候需要 - console.log(88,businessType) if(businessType){ this.businessType = businessType; this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //出库库存状态 this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //出库库区 - console.log(99,this.fromInventoryStatuses) - console.log(99,this.balanceFromInventoryStatuses) } diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 5b636627..53118cf2 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -237,6 +237,7 @@ openScanPopup() { this.isJustReplay = true + this.fromLocationCode = this.$refs.okToHoldRecordPackRef.fromLocationCode || ' ' if (this.fromLocationCode == "") { this.showFromLocationPopup(); return @@ -244,6 +245,7 @@ this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); }, showFromLocationPopup() { + // this.$refs.scanPopup. this.$refs.scanFromLocationCode.openScanPopup(); }, showPopup() { diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue index cd1e0d55..f65a64fe 100644 --- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue +++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue @@ -10,7 +10,7 @@ 来源库位: - + From 470d015e922fe00ef82485597d78e17730c23f45 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 11:01:16 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E6=89=B9=E6=AC=A1=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/detail/comRecommendDetailCard.vue | 5 ++--- src/pages/unPlanned/job/receiptJobDetail.vue | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mycomponents/detail/comRecommendDetailCard.vue b/src/mycomponents/detail/comRecommendDetailCard.vue index 090774ac..463a4fbd 100644 --- a/src/mycomponents/detail/comRecommendDetailCard.vue +++ b/src/mycomponents/detail/comRecommendDetailCard.vue @@ -18,8 +18,7 @@ 推
- - +
@@ -29,7 +28,7 @@ 际
- +
diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index 381aad86..1a222414 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -17,7 +17,7 @@ :locationAreaTypeList='toLocationAreaTypeList'> --> + @remove="updateData" @updateData="updateData" @openDetail="openDetail" :isShowFromLocation='false'>