From 68e809db99672283aae5d3a998a7aa5375410b3d Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Fri, 11 Feb 2022 14:42:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=80=80=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/raw/handover/returning/index.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index 4872688..f37feb0 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -10,7 +10,7 @@ - + {{ $t('message.screen') }} - + @@ -119,7 +119,7 @@ export default class returningDom extends BasePage { // tlName: null, // 退料类型name materialCode: null, // 物料类型code wlName: '', // 物料类型name - wlCode: '', + wlCode: '' as any, totalBackAmount: '0', }; prdOrder: any = []; @@ -151,7 +151,7 @@ export default class returningDom extends BasePage { } LocationChoice(e: any) { console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e); - this.form.wlCode = e.pickerName.label; + this.wlCode = e.pickerName; this.form.wkposCode = e.pickerName.sendSpot; } // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 @@ -164,8 +164,7 @@ export default class returningDom extends BasePage { let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); if (JSON.parse(sessionStorage.getItem('data') as any)) { this.data = JSON.parse(sessionStorage.getItem('data') as any); - console.log('this.data',this.data) - this.prdOrder = this.data.label; + this.form.prdOrder = this.data.label; this.form.wlName = this.data.value; this.form.sendSpot = this.data.sendSpot; // this.form.amount = this.data.amount; @@ -222,12 +221,13 @@ export default class returningDom extends BasePage { } else { this.$form.validate(async (valid: boolean) => { if (!valid) return; - if (!this.model.orderInInfo.sapFactoryCode) { - this.customToast(this.$t('message.return_Tip2') as string); - } + // if (!this.model.orderInInfo.sapFactoryCode) { + // this.customToast(this.$t('message.return_Tip2') as string); + // } // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; // delete this.form.wlName; + this.form.wlCode = this.wlCode.label await this.model.tluSubmit(this.form); this.$form.resetFields(); this.operatorName = ''; From cefa62b325e393c494261be87fad07e62550244f Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Fri, 11 Feb 2022 18:01:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8B=A3=E9=85=8D=E4=BC=98=E5=8C=96=20=20?= =?UTF-8?q?=E9=80=80=E6=96=99=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/raw/handover/picking/ByOrder.vue | 3 +-- src/pages/raw/handover/picking/BySummary.vue | 20 +++++++++++++++++- src/pages/raw/handover/picking/model.ts | 9 +++++++- src/pages/raw/handover/returning/index.vue | 22 ++++++++++++++++---- src/pages/raw/handover/returning/model.ts | 2 ++ 5 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue index 297c8d2..3a6dd5c 100644 --- a/src/pages/raw/handover/picking/ByOrder.vue +++ b/src/pages/raw/handover/picking/ByOrder.vue @@ -304,10 +304,9 @@ export default class RawReceiptDetail extends BasePage { async GetLocation() { this.Location = []; let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); - let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); let content = { loginName: means.session.user.loginName, - sendSpot: sendSpot, + sendSpot: null, factoryCode: means.session.user.factoryCode, workArea: session.workareaCode, }; diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue index 499ca19..7430b2b 100644 --- a/src/pages/raw/handover/picking/BySummary.vue +++ b/src/pages/raw/handover/picking/BySummary.vue @@ -139,7 +139,7 @@ export default class RawReceiptDetail extends BasePage { this.wlCode = e.pickerName; } //选取某一条需要分配库位的物料数据 - handleRow({ data }: any) { + async handleRow({ data }: any) { if (!this.model.aggregateList[data[0].index].sendSpot) { uni.showModal({ content: this.$t('message.SAPLocation') as any, @@ -159,6 +159,24 @@ export default class RawReceiptDetail extends BasePage { this.model.aggregateList[this.someIndex].currentAmount = 0; this.LocationList = []; this.qty = ''; + this.model.LocList.length = 0 + await this.model.queryItemLoc({ + workArea:session.workareaCode, + loginName:session.loginName, + sendSpot:null, + materialCode:this.some.materialCode, + factoryCode:this.some.factoryCode + }) + this.Location = []; + this.model.LocList.forEach((item:any) =>{ + let arr:any = { + label:item.locationCode, + value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')', + sendSpot:item.sendSpot + } + this.Location.push(arr) + }) + console.log('this.Location',this.Location) } //添加库位和数量到数据和表格中 Add() { diff --git a/src/pages/raw/handover/picking/model.ts b/src/pages/raw/handover/picking/model.ts index b3774ba..6aeb17f 100644 --- a/src/pages/raw/handover/picking/model.ts +++ b/src/pages/raw/handover/picking/model.ts @@ -22,6 +22,7 @@ export class PickingModule extends VuexModule { code = ''; orderOutIdList: any; NEWparams: any; + LocList:any = [] /** * 查询结果列表(按单列表) @@ -334,7 +335,13 @@ export class PickingModule extends VuexModule { console.log('code', code); return { code }; } - + @MutationAction + async queryItemLoc(params:any = {}) { + const res: any = await http.post(url.sortscan.save.order, params); + const LocList = res.data + console.log('list',LocList) + return { LocList }; + } /** * 解锁数据 * @param list diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index f37feb0..b0d6992 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -10,7 +10,7 @@ - + {{ $t('message.screen') }}