From 4b57538affbc378975c1dc85674f9417acb67aad Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Thu, 19 May 2022 14:53:57 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E5=A7=94=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=BA=93=E4=BD=8D=E9=80=89=E6=8B=A9=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/raw/commission/entrant/index.vue | 2 +- src/pages/raw/commission/goOut/index.vue | 41 ++++++++++++---------- src/pages/raw/commission/goOut/model.ts | 14 +++++++- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index 648f926..48004ce 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -405,7 +405,7 @@ export default class dnReceiptDom extends BasePage { item.wllist.forEach((item: any) => { num += parseFloat(item.receiptAmount); }); - if (num != parseFloat(item.requestAmount)) { + if (num != parseFloat(item.requestAmount) && isTrue == true) { this.customToast(this.$t('message.Pi_tip15') as any); return (isTrue = false); } diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index d0c00a6..8b29d1d 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -111,26 +111,26 @@ export default class dnReceiptDom extends BasePage { //所选择的库位 wlCode: any = ''; materialIndex: any = null; - //页面初始化 - async onReady() { - //页面初始化 获取可选库位 - await this.QueryLoc(); - } async QueryLoc() { - let content = { - loginName: session.loginName, - factoryCode: session.factoryCode, + await this.model.queryItemLoc({ workArea: session.workareaCode, - }; - await this.model.queryCodeAndWorkAreaCode(content); - this.model.LocList.forEach((item: any) => { - let pickerName: any = {}; - pickerName.label = item.locationCode; - pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; - pickerName.sendSpot = item.sendSpot; - this.Loc.push(pickerName); + loginName: session.loginName, + sendSpot: null, + materialCode: this.every.materialCode, + factoryCode: session.factoryCode, }); - this.wlCode = this.Loc[0]; + this.Loc = []; + this.wlCode = ''; + if (this.model.LocList.length == 0) { + uni.showModal({ + content: this.$t('message.selected') as any, + showCancel: false, + confirmText: this.$t('message.workArea_Confirm') as any, + }); + } else { + this.Loc = this.model.LocList; + this.wlCode = this.Loc[0]; + } } empty() { this.list = []; @@ -184,14 +184,16 @@ export default class dnReceiptDom extends BasePage { }); this.every = this.material[0]; this.materialIndex = 0; + await this.QueryLoc(); } //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount materialChoice(e: any) { this.nowAmount = ''; - this.material.forEach((item: any, index: any) => { + this.material.forEach(async (item: any, index: any) => { if (item.materialCode == e.pickerName.value) { this.every = item; this.materialIndex = index; + await this.QueryLoc(); return; } }); @@ -280,7 +282,6 @@ export default class dnReceiptDom extends BasePage { } await this.model.submitOutsourcing(this.list); this.empty(); - await this.QueryLoc(); await this.query(); } async bill() { @@ -452,6 +453,8 @@ export default class dnReceiptDom extends BasePage { .search { padding-left: 1px; text-align: center; + white-space: nowrap; + overflow: scroll; } } .library-right { diff --git a/src/pages/raw/commission/goOut/model.ts b/src/pages/raw/commission/goOut/model.ts index 3af6228..ba84bec 100644 --- a/src/pages/raw/commission/goOut/model.ts +++ b/src/pages/raw/commission/goOut/model.ts @@ -158,7 +158,19 @@ export class ReturningModule extends VuexModule { console.log('LocList', LocList); return { LocList }; } - + @MutationAction + async queryItemLoc(params: any = {}) { + const res: any = await http.post(url.sortscan.save.queryWlByMat, params); + const LocList = []; + res.forEach((item: any) => { + const arr: any = { + label: item.locationCode, + value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')', + }; + LocList.push(arr); + }); + return { LocList }; + } @Action async queryOutsourcing(poNo: any) { const res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, {