From 31b98f80ba059fc2a519075437e7a35b1c5f32ed Mon Sep 17 00:00:00 2001 From: zhoulei Date: Thu, 16 Dec 2021 10:35:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=90=8E=E8=A1=A8=E5=8D=95=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/J-Picker/jPicker.vue | 1 - .../raw/ingoods/dnReceipt/dnReceiving.vue | 20 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/J-Picker/jPicker.vue b/src/components/J-Picker/jPicker.vue index 4ecf3e5..947f94e 100644 --- a/src/components/J-Picker/jPicker.vue +++ b/src/components/J-Picker/jPicker.vue @@ -78,7 +78,6 @@ export default { handler() { this.selByValKey(); }, - deep: true, }, }, mounted() { diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 5e4d161..70797a5 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -134,8 +134,13 @@ export default class dnReceiptDom extends BasePage { poNo: any = null; // 需求数量 requestAmount: number = null; - //页面初始化 + async onReady() { + // this.initLocation(); + } + // 页面初始化 + // 页面需要清空仓库,因此需要复用该方法 + async initLocation() { //页面初始化 获取可选库位 let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); @@ -156,13 +161,15 @@ export default class dnReceiptDom extends BasePage { } //输入单号 查询数据 async query() { - if (this.form.documentNo == '') { + if (!this.form.documentNo) { uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips1') as any, }); return; } + // 查询时初始化仓库 + this.initLocation(); await this.model.queryOrderInInfo(this.form.documentNo); let list: any = localStorage.getItem('list'); localStorage.removeItem('list'); @@ -264,21 +271,29 @@ export default class dnReceiptDom extends BasePage { } // 重置页面数据 resetForm() { + this.form.documentNo = ''; // 清空 add table this.LocationList = []; + // 仓库 + this.Location = []; this.poNo = ''; + this.poList = []; // 清空 当前选择的库位对象 this.wl = { value: null, }; // 清空 物料对象 this.every = {}; + // 清空 原始物料列表 + // this.material = []; // 清空 去重后的物料列表 this.materialList = []; + // 清空 当前累计数量 this.receiptAmount = null; } async onSubmit() { + this.resetForm(); if (this.LocationList.length === 0) { uni.showToast({ icon: 'none', @@ -287,6 +302,7 @@ export default class dnReceiptDom extends BasePage { return null; } this.every.wllist = this.LocationList; + console.log('new this.every :::: ', this.every); await this.model.submitOrderInEnter([this.every]); this.resetForm(); }