From 204d493184956af8531b53da41c3557c5675bbe8 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 6 Nov 2024 09:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E6=A0=BC=E8=BD=AC=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 7 + .../inventoryMove/coms/comMoveRecord.vue | 122 +++++++++++++++++- .../inventoryMove/coms/okToHoldRecordPack.vue | 94 ++++++++++---- .../inventoryMove/record/okToHoldRecord.vue | 2 +- .../record/okToQuarantineRecord.vue | 15 +-- 5 files changed, 201 insertions(+), 39 deletions(-) diff --git a/src/pages.json b/src/pages.json index 8c6a03a4..65ae2f48 100644 --- a/src/pages.json +++ b/src/pages.json @@ -2213,6 +2213,13 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/inventoryMove/record/okToHoldRecord", + "style": { + "navigationBarTitleText": "物料隔离记录", + "enablePullDownRefresh": false + } + }, { "path": "pages/inventoryMove/record/okToQuarantineRecord", "style": { diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 47038b41..4f130f8a 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -34,6 +34,8 @@ + + { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(balance, pack); + let newDetail = createDetailInfo(balance, pack); + + if (newDetail.packingNumber == '') { + newDetail.packingNumber = pack.number; + } + if (this.businessTypeCode == "Move") { + newDetail.toInventoryStatus = balance.inventoryStatus; + } else { + newDetail.toInventoryStatus = this.toInventoryStatus; + } + newDetail.toLocationCode = this.toLocationCode; + newDetail.fromLocationCode = result.fromLocationCode + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + } else { + if( balance.inventoryStatus != this.toInventoryStatus){ + this.showErrorMessage("库存状态的库存") + return + } + var detail = item.subList.find(r => { + if (r.batch == pack.batch && + r.fromLocationCode == balance.locationCode && + r.toInventoryStatus == balance.inventoryStatus && + r.scaned == true) { + return r; + } + }) + console.log(2333,detail) + + if (detail == undefined) { + let newDetail = createDetailInfo(balance, pack); + // newDetail.inventoryStatus = balance.inventoryStatus; + if (this.businessTypeCode == "Move") { + newDetail.toInventoryStatus = balance.inventoryStatus; + } else { + newDetail.toInventoryStatus = this.toInventoryStatus; + } + + if (newDetail.packingNumber == '') { + newDetail.packingNumber = pack.number; + } + newDetail.toLocationCode = this.toLocationCode; + newDetail.fromLocationCode = result.fromLocationCode + item.subList.push(newDetail); + } else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } + } + calcHandleQty(this.detailSource); + }, + showErrorMessage(message) { if (this.$refs.scanPopup) { this.$refs.scanPopup.packLoseFocus() diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue index 07416065..03b52c4c 100644 --- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue +++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue @@ -1,6 +1,6 @@ @@ -54,36 +57,76 @@ components: { winScanLocation }, + emits: ["showFromLocationPopup",'itemCodeClick','confirm','fromLocationBlur'], data() { return { show:true, - businessTypeCode: "OkToHold", + handleQty:0, + fromLocationCode:'', + itemCode:'', + batch:'', } }, props: { + fromLocationCodeProps:{ + type: String, + default: '' + }, + // 是否显示第一层弹窗 + showOnePop: { + type: Boolean, + default: false + }, + itemCodeProps:{ + type: String, + default: '' + }, + batchProps:{ + type: String, + default: '' + }, + }, + mounted() { }, methods: { // 打开扫描来源库位组件 - openFromLocation(){ - this.$refs.scanLocationCode.openScanPopup() + fromLocationClick(){ + // this.$refs.scanLocationCode.openScanPopup() + this.$emit("showFromLocationPopup"); + }, + // 显示箱码 + itemCodeClick(){ + // this.$refs.scanLocationCode.openScanPopup() + this.$emit("itemCodeClick"); }, - getLocation(location, code){ - console.log(location,code) + confirm(){ + // this.$refs.scanLocationCode.openScanPopup() + let obj = { + fromLocationCode:this.fromLocationCode, + itemCode:this.itemCode, + batch:this.batch, + handleQty:this.handleQty, + } + this.$emit("confirm",obj); }, - getBusinessTypeFunc() { - getBusinessType(this.businessTypeCode, res => { - if (res.success) { - this.businessType = res.businessType; - this.fromInventoryStatuses = res.fromInventoryStatuses.split(','); - this.fromLocationAreaTypeList = res.fromLocationAreaTypeList - this.openFromLocation(); - } else { - this.showErrorMessage(res.message) - } - }); + fromLocationBlur(){ + // this.$refs.scanLocationCode.openScanPopup() + console.log(this.fromLocationCode) + this.$emit("fromLocationBlur"); + }, + }, + watch: { + fromLocationCodeProps(newVal) { + console.log(newVal) + this.fromLocationCode = newVal + }, + itemCodeProps(newVal) { + this.itemCode = newVal + }, + batchProps(newVal) { + this.batch = newVal }, - } } @@ -122,6 +165,10 @@ width: 0px; height: 80rpx; border: 1px solid #dedede; + display: flex; + align-items: center; + font-size: 32rpx; + padding: 0px 20rpx; } .value1{ flex:1; @@ -129,6 +176,7 @@ height: 80rpx; display: flex; align-items: center; + font-size: 32rpx; } .searchIcon{ width: 40rpx; diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue index e025da9a..a086b2bd 100644 --- a/src/pages/inventoryMove/record/okToHoldRecord.vue +++ b/src/pages/inventoryMove/record/okToHoldRecord.vue @@ -1,6 +1,6 @@ diff --git a/src/pages/inventoryMove/record/okToQuarantineRecord.vue b/src/pages/inventoryMove/record/okToQuarantineRecord.vue index 3ff2250d..4cd14afc 100644 --- a/src/pages/inventoryMove/record/okToQuarantineRecord.vue +++ b/src/pages/inventoryMove/record/okToQuarantineRecord.vue @@ -1,28 +1,25 @@