From b90ca753a7d2ffb254b06a176f8da969fa87cedf Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Fri, 19 Jan 2024 15:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=8E=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/qty/CountQtyEdit.vue | 2 +- pages/count/job/countDetail.vue | 118 ++++-------------------------- static/config.json | 2 +- 3 files changed, 16 insertions(+), 106 deletions(-) diff --git a/mycomponents/qty/CountQtyEdit.vue b/mycomponents/qty/CountQtyEdit.vue index 62ac8adb..9cd344c8 100644 --- a/mycomponents/qty/CountQtyEdit.vue +++ b/mycomponents/qty/CountQtyEdit.vue @@ -184,7 +184,7 @@ initData(item, detailList) { this.dataContent = item; this.inventoryStatus = this.dataContent.inventoryStatus; - this.allQty = Number(this.dataContent.qty); + this.allQty = Number(this.dataContent.handleQty); this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty); this.detailList = detailList; }, diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index cca9d4ed..ccbde924 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -395,42 +395,11 @@ } }) - if (mode == 'edit') { - //新增的盘点结果 - // if (that.currentEditItem.id == '0') { - // let a = detail.subList.find(that.currentEditItem); - // let index = that.currentEditItem.index; - // // detail.subList - // detail.subList.splice(index, 1) - - // } else { - // - // that.currentEditItem.handleQty = 0; - // that.currentEditItem.scaned = false; - // that.currentEditItem = {}; - // } - } - - if (itemEditInfo == undefined) { //不在任务列表中,提示是否添加到列表 if (mode == 'edit') { - that.currentEditItem.handleQty = 0; + that.currentEditItem.handleQty = qty; that.currentEditItem.inventoryStatus = inventoryStatus; - - //新增的盘点结果 - // if (that.currentEditItem.id == '0') { - // let a = detail.subList.find(that.currentEditItem); - // let index = that.currentEditItem.index; - // // detail.subList - // detail.subList.splice(index, 1) - - // } else { - // - // that.currentEditItem.handleQty = 0; - // that.currentEditItem.scaned = false; - // that.currentEditItem = {}; - // } } else { that.addExistItemCodeToList(detail, qty, inventoryStatus); } @@ -441,6 +410,13 @@ itemEditInfo.balanceQty = that.balance.qty; itemEditInfo.stdPackQty = that.package.stdPackQty; itemEditInfo.stdPackUnit = that.package.stdPackUnit; + + //编辑后的结果对应到其它明细,当前编辑结果为0 + if (mode == 'edit') { + itemEditInfo.scaned = false; + that.currentEditItem.handleQty = 0; + } + // this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail // .subList); that.updateData() @@ -457,74 +433,6 @@ this.scanPopupGetFocus(); }, - //盲盘 - getUnOpenScanResult(result) { - try { - //盘点了没有库存余额的数据 - if (result.balance.length == 0) { - - } - let label = result.label; - this.balance = result.balance[0]; - - var packingNumber = label.packingNumber; - var batch = label.batch; - var itemCode = label.itemCode; - - var balanceQty = this.balance.qty; - var inventoryStatus = this.balance.inventoryStatus; - - var detail = this.detailSource.find(r => r.itemCode == itemCode); - var itemEditInfo; - //检查物料号是否存在 - if (detail == undefined) { - //物料号不存在,创建物料号数据添加到列表。设置为已经扫描 - this.addNewItemCodeToList() - } else { - //物料号存在,查询是否在任务列表中 - itemEditInfo = detail.subList.find(item => { - if (item.packingNumber == packingNumber && - item.batch == batch && - item.inventoryStatus == inventoryStatus) { - return item; - } - }) - - if (itemEditInfo == undefined) { - //不在任务列表中,提示是否添加到列表 - this.addExistItemCodeToList(detail); - - } else { - //在列表中,更新已扫描状态, - if (itemEditInfo.scaned) { - this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber + - "】已经完成盘点,是否要编辑数量", - res => { - if (res) { - this.$refs.countQtyEdit.openEditPopup(itemEditInfo, - detail.subList); - } else { - this.scanPopupGetFocus(); - } - }) - - } else { - itemEditInfo.scaned = true; - itemEditInfo.handleQty = balanceQty; - itemEditInfo.balanceQty = balanceQty; - itemEditInfo.stdPackQty = result.package.stdPackQty; - itemEditInfo.stdPackUnit = result.package.stdPackUnit; - this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail - .subList); - this.updateData() - } - } - } - } catch (e) { - this.showErrorMessage(e.message) - } - }, - addNewItemCodeToList() { this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?", res => { @@ -540,15 +448,17 @@ }, addExistItemCodeToList(detail, qty, inventoryStatus) { - this.$refs.comMessage.showQuestionMessage("盘点明细不在列表中,是否添加到列表?", + let that = this; + that.scanPopupLoseFocus(); + this.$refs.comMessage.showQuestionMessage("盘点结果不在明细列表中,是否添加到列表?", res => { if (res) { detail.qty = calc.add(qty, qty) - let newDetail = this.createAddDetailInfo(qty, inventoryStatus); // + let newDetail = that.createAddDetailInfo(qty, inventoryStatus); // detail.subList.push(newDetail); - this.updateData() - + that.updateData() } + that.scanPopupGetFocus(); }) }, diff --git a/static/config.json b/static/config.json index 4fb72ee7..c47cdf8a 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.178:12080/admin-api", + "value": "http://192.168.0.158:12080/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",