From 6f0995ad7a8f01e5e57e084fe4bcc69582cbb109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Fri, 25 Oct 2024 15:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B4=E6=8E=A5=E4=B8=8A?= =?UTF-8?q?=E6=9E=B6=202024/8/3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/receiptNoPlan.vue | 51 +++++++++---------- .../record/productPutawayRecord.vue | 6 ++- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index 22d65d93..3f5d8f9b 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -151,8 +151,7 @@ export default { }; }, - onShow() { - }, + onShow() {}, onLoad() { this.options = getRemoveOption() @@ -234,26 +233,21 @@ export default { if (e.content.text == "移除") { this.$refs.comMessage.showQuestionMessage("是否要移除", res => { if (res) { - this.allList.splice(index, 1); - this.initList() + this.showList.splice(index, 1); + this.calcFgQty(); + //this.initList() } - }) } - }, submit() { - this.scanedQty = this.scanedQty + this.showList.length; - this.showList = []; - this.dataContent.handleQty = 0; - return; - if (this.allList.length == 0) { + if (this.showList.length == 0) { this.showErrorMessage("请先扫描唯一码") return; } - if (this.allList.length < this.dataContent.packQty) { + if (this.showList.length < this.dataContent.packQty) { this.$refs.comMessage.showQuestionMessage("扫描数量小于包装规格数量,是否提交?", res => { if (res) { this.commit() @@ -308,7 +302,7 @@ export default { createPutawayRequestByPlan(list[0].requestNumber).then(res => { createInspectRequestByPlan(list[0].requestNumber) }) - }else { //创建检验申请 + } else { //创建检验申请 createInspectRequestByPlan(list[0].requestNumber) } this.showCommitSuccessMessage("提交成功
生成装配收货记录
" + list[0].requestNumber, list) @@ -325,12 +319,12 @@ export default { }, setParams() { - this.allList.forEach(res => { + this.showList.forEach(res => { res.outsideItemCode = res.itemCode res.outsideProduceDate = null res.outsideSerialNumber = res.order }) - this.dataContent.subList = this.allList + this.dataContent.subList = this.showList return this.dataContent }, @@ -363,7 +357,7 @@ export default { isCheckMesCode(result.content).then(res => { if (res.data) { if (that.dataContent) { - var itemIndex = this.allList.findIndex(r => + var itemIndex = this.showList.findIndex(r => r.content == result.content); //不存在 if (itemIndex == -1) { @@ -372,9 +366,9 @@ export default { // return; // } result.countTime = new Date(); - this.allList.push(result); - this.allList.sort(compare('countTime')); //按扫描信息排序 - this.initList() + this.showList.push(result); + this.showList.sort(compare('countTime')); //按扫描信息排序 + //this.initList() this.scanPopupGetFocus(); this.calcFgQty(); } else { @@ -382,9 +376,9 @@ export default { '】已经扫描,是否移除', res => { if (res) { - this.allList.splice(itemIndex, 1) - this.allList.sort(compare('countTime')); //按扫描信息排序 - this.initList() + this.showList.splice(itemIndex, 1) + this.showList.sort(compare('countTime')); //按扫描信息排序 + //this.initList() that.calcFgQty(); } }) @@ -421,11 +415,16 @@ export default { showCommitSuccessMessage(hint, pointData) { this.$refs.comMessage.showSuccessMessage(hint, res => { if (pointData.length > 0) { - uni.navigateTo({ - url: `/pages/point/index?points=${JSON.stringify(pointData)}` - }); + if (this.scanedQty + this.showList.length == this.dataContent.planQty) { + uni.redirectTo({ + url: `/pages/point/index?points=${JSON.stringify(pointData)}` + }); + } else { + uni.navigateTo({ + url: `/pages/point/index?points=${JSON.stringify(pointData)}` + }); + } } - }) }, diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index 14091bae..121703d9 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -24,7 +24,7 @@ + @click="cancel">取消 @@ -431,6 +431,10 @@ import {ref, getCurrentInstance, nextTick, onMounted} from 'vue' } } } + const cancel = () => { + this.clearData(); + this.openScanPopup(); + }