From fea084033aca37e6e7d863153c30eb5e525402d3 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Sat, 3 Aug 2024 14:23:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=89=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AE=8C=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/coms/comNoReceiptPopup.vue | 9 ++++++--- src/pages/fg/receiptByPlan.vue | 10 +++++---- src/pages/fg/receiptNoPlan.vue | 27 +++++++++++++++++-------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/pages/fg/coms/comNoReceiptPopup.vue b/src/pages/fg/coms/comNoReceiptPopup.vue index 560fbd70..dc7942dc 100644 --- a/src/pages/fg/coms/comNoReceiptPopup.vue +++ b/src/pages/fg/coms/comNoReceiptPopup.vue @@ -27,7 +27,7 @@ - + 物料代码: @@ -194,7 +195,7 @@ openRequestPopup() { this.initData(); this.planDate = getCurrDate() - this.batch = this.planDate.replace('-', '') + this.batch = this.planDate.replace('-', '').replace('-', '') this.$refs.popup.open('bottom') }, initData() { @@ -321,11 +322,12 @@ this.planQty = 0; this.goodQty = 0 this.planNumber = "" + this.bomVersion = "" }, confirmSelectDate(data) { this.planDate = data[0].label - this.batch = this.planDate.replace('-', ''); + this.batch = this.planDate.replace('-', '').replace('-', ''); }, showSelectDate() { @@ -462,6 +464,7 @@ let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit); this.packQtyHint = pack[0].packQty + "(" + this .getUomInfo(pack[0].uom) + ")"; + this.uom = this.getUomInfo(pack[0].uom); this.packQty = pack[0].packQty }, getUomInfo(uom) { diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index 70686a9b..0b852e6f 100644 --- a/src/pages/fg/receiptByPlan.vue +++ b/src/pages/fg/receiptByPlan.vue @@ -56,7 +56,7 @@ - + @@ -339,7 +339,8 @@ } uni.hideLoading() this.showCommitSuccessMessage("提交成功
生成装配收货记录
" + list[0].requestNumber, list) - + this.showList = []; + this.dataContent.handleQty = 0; } catch (error) { uni.hideLoading() var hint = error.message ? error.message : error @@ -422,7 +423,8 @@ }, calcFgQty() { - this.dataContent.handleQty = this.allList.length; + this.dataContent.handleQty = this.showList.length; + // this.dataContent.handleQty = this.allList.length; if (this.dataContent.handleQty == this.dataContent.packQty) { if (this.$refs.scanPopup) { this.$refs.scanPopup.closeScanPopup(); @@ -445,7 +447,7 @@ showCommitSuccessMessage(hint, pointData) { this.$refs.comMessage.showSuccessMessage(hint, res => { if (pointData.length > 0) { - uni.redirectTo({ + uni.navigateTo({ url: `/pages/point/index?points=${JSON.stringify(pointData)}` }); } diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index 0375986d..d5ec36b8 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -16,9 +16,15 @@
- 计划数 + 报工数量 {{dataContent.planQty}}{{dataContent.uom}} + + + 已报工数量 + {{scanedQty}}{{dataContent.uom}} + +
@@ -140,7 +146,8 @@ allList: [], index: 1, loadingType: "", - pageSize: 20 + pageSize: 20, + scanedQty: 0 }; }, @@ -259,6 +266,7 @@ title: "提交中...", mask: true }) + let params = this.setParams() console.log(JSON.stringify(params)) @@ -284,7 +292,8 @@ requestNumber: item.requestNumber }) }) - } else { + } + else { throw new Error("提交失败") } @@ -295,10 +304,12 @@ createInspectRequestByPlan(list[0].requestNumber) }) } - - uni.hideLoading() this.showCommitSuccessMessage("提交成功
生成装配收货记录
" + list[0].requestNumber, list) - + this.scanedQty = this.scanedQty + this.showList.length; + this.showList = []; + this.dataContent.handleQty = 0; + this.$forceUpdate(); + uni.hideLoading() } catch (error) { uni.hideLoading() var hint = error.message ? error.message : error @@ -380,7 +391,7 @@ }, calcFgQty() { - this.dataContent.handleQty = this.allList.length; + this.dataContent.handleQty = this.showList.length; if (this.dataContent.handleQty == this.dataContent.packQty) { if (this.$refs.scanPopup) { this.$refs.scanPopup.closeScanPopup(); @@ -403,7 +414,7 @@ showCommitSuccessMessage(hint, pointData) { this.$refs.comMessage.showSuccessMessage(hint, res => { if (pointData.length > 0) { - uni.redirectTo({ + uni.navigateTo({ url: `/pages/point/index?points=${JSON.stringify(pointData)}` }); }