From 3a484c20fbcad190c25dafba31c7f910ca3671e2 Mon Sep 17 00:00:00 2001 From: Niext <85552560@qq.com> Date: Tue, 26 Dec 2023 19:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E6=A0=BC=E8=BD=AC?= =?UTF-8?q?=E9=9A=94=E7=A6=BB=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/qty/balanceQtyEdit.vue | 18 +++-- .../coms/comInventoryDetailCard.vue | 3 +- pages/inventoryMove/coms/comMove.vue | 8 ++- pages/inventoryMove/coms/comMoveJob.vue | 6 +- pages/inventoryMove/coms/comMoveRecord.vue | 9 ++- .../inventoryMove/job/inventoryMoveDetail.vue | 72 ++++++++++++++----- pages/inventoryMove/job/okToHoldMoveJob.vue | 2 +- static/config.json | 2 +- 8 files changed, 84 insertions(+), 36 deletions(-) diff --git a/mycomponents/qty/balanceQtyEdit.vue b/mycomponents/qty/balanceQtyEdit.vue index 854153c5..e59f0b90 100644 --- a/mycomponents/qty/balanceQtyEdit.vue +++ b/mycomponents/qty/balanceQtyEdit.vue @@ -35,7 +35,8 @@ 数量 : - + @@ -48,7 +49,8 @@ - + 库存状态 : { + setTimeout(res => { this.$refs.popup.open('bottom') - },500) + }, 500) }, closeEditPopup() { this.$refs.popup.close() @@ -141,7 +143,7 @@ this.closeEditPopup(); }, calcQty(val) { - if(val>0){ + if (val > 0) { this.allQty = val * Number(this.dataContent.stdPackQty); } }, @@ -162,8 +164,10 @@ } }, callback() { - this.dataContent.toInventoryStatus = this.inventoryStatus - this.$emit("confirm", Number(this.allQty)); + let qty = Number(this.allQty); + this.dataContent.toInventoryStatus = this.inventoryStatus; + this.dataContent.handleQty = qty; + this.$emit("confirm", qty); this.closeEditPopup(); }, updateStatus(value) { diff --git a/pages/inventoryMove/coms/comInventoryDetailCard.vue b/pages/inventoryMove/coms/comInventoryDetailCard.vue index 5742dd5b..d456c28e 100644 --- a/pages/inventoryMove/coms/comInventoryDetailCard.vue +++ b/pages/inventoryMove/coms/comInventoryDetailCard.vue @@ -124,7 +124,8 @@ }); }, confirm(qty) { - this.editItem.qty = qty; + // this.editItem.handleQty=qty; + //this.editItem.qty = qty; this.$emit('updateData') }, showLocation(item) { diff --git a/pages/inventoryMove/coms/comMove.vue b/pages/inventoryMove/coms/comMove.vue index be6915d0..380cebd6 100644 --- a/pages/inventoryMove/coms/comMove.vue +++ b/pages/inventoryMove/coms/comMove.vue @@ -287,7 +287,6 @@ this.toWarehouseCode = "" }, commit() { - if (this.toLocationCode == "") { this.showMessage("请先选择目标库位") return; @@ -373,7 +372,6 @@ detail.itemDesc2 = detail.package.itemDesc2; detail.fromInventoryStatus = detail.inventoryStatus; - // detail.toInventoryStatus = this.toInventoryStatus; detail.fromPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber; @@ -385,7 +383,11 @@ detail.toBatch = info.batch; detail.fromLocationCode = detail.locationCode; - detail.toLocationCode = detail.toLocationCode; + + if (this.businessType != '') { + detail.toLocationCode = this.toLocationCode; + detail.toInventoryStatus = this.toInventoryStatus; + } subList.push(detail) } diff --git a/pages/inventoryMove/coms/comMoveJob.vue b/pages/inventoryMove/coms/comMoveJob.vue index 17d78497..9c1f04df 100644 --- a/pages/inventoryMove/coms/comMoveJob.vue +++ b/pages/inventoryMove/coms/comMoveJob.vue @@ -199,12 +199,10 @@ that.showMessage(error) }) }, - - - + openJobDetail(item) { uni.navigateTo({ - url: './inventoryMoveDetail?id=' + item.id + '&status=' + item.status + url: './inventoryMoveDetail?id=' + item.id + '&status=' + item.status+'&businessTypeCode='+this.businessTypeCode }); }, diff --git a/pages/inventoryMove/coms/comMoveRecord.vue b/pages/inventoryMove/coms/comMoveRecord.vue index 5df8a95a..74ddf94b 100644 --- a/pages/inventoryMove/coms/comMoveRecord.vue +++ b/pages/inventoryMove/coms/comMoveRecord.vue @@ -24,7 +24,8 @@ - + @@ -82,10 +83,10 @@ type: Boolean, default: false }, - + }, watch: { - + }, data() { @@ -170,7 +171,9 @@ }); }, confirm(qty) { + debugger; this.editItem.qty = qty; + this.editItem.handleQty = qty; this.$emit('updateData') } } diff --git a/pages/inventoryMove/job/inventoryMoveDetail.vue b/pages/inventoryMove/job/inventoryMoveDetail.vue index e425e564..5affa16e 100644 --- a/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -9,6 +9,7 @@ + @@ -63,7 +64,7 @@ navigateBack, getCurrDateTime, getPackingNumberAndBatchByList, - getInventoryStatusName + getInventoryStatusName, } from '@/common/basic.js'; import winScanButton from '@/mycomponents/scan/winScanButton.vue' @@ -77,7 +78,7 @@ export default { - name: 'returnDetail', + name: 'inventoryMoveDetail', components: { winScanButton, winScanPack, @@ -99,11 +100,18 @@ toLocationInfo: {}, businessTypeInfo: {}, locationTypeList: [], - managementList: [] + managementList: [], + businessTypeCode: '', + toLocationCode: '', + toinventoryStatus: '' }; + }, + props: { + }, onLoad(option) { this.id = option.id; + this.businessTypeCode = option.businessTypeCode; if (this.id != undefined) { // //新建的任务自动接收 if (option.status == "1") { @@ -114,6 +122,7 @@ } else { this.getDetail(); } + this.initData(); } }, //返回首页 @@ -151,6 +160,38 @@ }, methods: { + initData() { + var name = "" + if (this.businessTypeCode == "Move") { + name = "库存转移"; + } else if (this.businessTypeCode == "HoldToOk") { + name = "隔离转合格"; + this.toLocationCode = ''; + this.toinventoryStatus = 'Ok'; + } else if (this.businessTypeCode == "HoldToScrap") { + name = "隔离转报废"; + this.toLocationCode = 'Scrap'; + this.toinventoryStatus = 'Scrap'; + } else if (this.businessTypeCode == "OkToHold") { + name = "合格转隔离"; + this.toLocationCode = 'Hold'; + this.toinventoryStatus = 'Hold'; + } else if (this.businessTypeCode == "OktoScrap") { + name = "合格转报废"; + this.toLocationCode = 'Scrap'; + this.toinventoryStatus = 'Scrap'; + } else if (this.businessTypeCode == "ScrapToHold") { + name = "报废转隔离"; + this.toLocationCode = 'Hold'; + this.toinventoryStatus = 'Hold'; + } + + uni.setNavigationBarTitle({ + title: name + '详情' + }) + }, + + //接收 receive(callback) { uni.showLoading({ @@ -209,7 +250,6 @@ this.$refs.jobDetailPopup.openPopup(item) }, - updateData() { this.calcHandleQty(); }, @@ -273,7 +313,7 @@ if (res) { itemDetail.scaned = true; itemDetail.handleQty = Number(result.balance.qty); - itemDetail.toInventoryStatus = result.balance.inventoryStatus; + itemDetail.fromInventoryStatus = result.balance.inventoryStatus; itemDetail.balance = result.balance; itemDetail.balance.balanceQty = Number(result.balance.qty); itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) @@ -293,7 +333,7 @@ } else { itemDetail.scaned = true; itemDetail.handleQty = Number(result.balance.qty); - itemDetail.toInventoryStatus = result.balance.inventoryStatus; + itemDetail.fromInventoryStatus = result.balance.inventoryStatus; itemDetail.balance = result.balance; itemDetail.balance.balanceQty = Number(result.balance.qty); itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) @@ -344,14 +384,14 @@ title: "提交中....", mask: true }); - + //查询管理模式 this.managementList = []; var precisionStrategParams = this.setPrecisionStrategParams() getPrecisionStrategyList(precisionStrategParams, res => { if (res.success) { this.managementList = res.list; - + var params = this.setParams() console.log("提交" + JSON.stringify(params)) inventoryMoveSubmit(params).then(res => { @@ -373,27 +413,27 @@ }) }, - - setPrecisionStrategParams(){ + + setPrecisionStrategParams() { var itemList = [] this.detailSource.forEach(item => { item.subList.forEach(detail => { if (detail.scaned) { var filterResult = itemList.filter(res => { - if (res.itemCode == item.itemCode - &&res.locationCode == detail.toLocationCode) { + if (res.itemCode == item.itemCode && + res.locationCode == detail.toLocationCode) { return res } }) //去掉重复元素 - if(filterResult.length==0){ + if (filterResult.length == 0) { var result = { itemCode: item.itemCode, locationCode: detail.toLocationCode } itemList.push(result) } - + } }) }) @@ -412,8 +452,8 @@ detail.toPackingNumber = info.packingNumber; detail.toBatch = info.batch; detail.toContainerNumber = ''; - - detail.toLocationCode = detail.toLocationCode; + // detail.toLocationCode = this.toLocationCode; + detail.toinventoryStatus=this.toinventoryStatus; subList.push(detail) } }) diff --git a/pages/inventoryMove/job/okToHoldMoveJob.vue b/pages/inventoryMove/job/okToHoldMoveJob.vue index 4c2bcca0..5e2f8ec2 100644 --- a/pages/inventoryMove/job/okToHoldMoveJob.vue +++ b/pages/inventoryMove/job/okToHoldMoveJob.vue @@ -1,6 +1,6 @@ diff --git a/static/config.json b/static/config.json index 310a012c..3f6576ad 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.176:12080/admin-api", + "value": "http://dev.ccwin-in.com:25100/api/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",