diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index 0a3a401..450e30a 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -129,11 +129,10 @@ export default class dnReceiptDom extends BasePage { factoryCode: session.factoryCode, workArea: session.workareaCode, }; - let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); - console.log('res res', res); + await this.model.queryByFactoryCodeAndWorkAreaCode(content); // 库位列表是undefined 委外入库、委外出库都是同样的问题 //guoshuang 修改 库位列表undefiend - res.forEach((item: any) => { + this.model.LoctionList.forEach((item: any) => { let pickerName: any = {}; pickerName.label = item.locationCode; pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; diff --git a/src/pages/raw/commission/entrant/model.ts b/src/pages/raw/commission/entrant/model.ts index 2fb2736..3b2edc7 100644 --- a/src/pages/raw/commission/entrant/model.ts +++ b/src/pages/raw/commission/entrant/model.ts @@ -37,6 +37,7 @@ export class ReturningModule extends VuexModule { */ materielList: any[] = []; locationCodeList: any[] = []; + LoctionList:any[] = [] //条码扫描的返回的结果 oneMaterielDetail: any = {}; @@ -198,13 +199,14 @@ export class ReturningModule extends VuexModule { const materielList: any = []; return { code, materielList }; } - @Action({ commit: "updateCheckedOrderInInfoListKw" }) + @MutationAction async queryByFactoryCodeAndWorkAreaCode(content: any) { - let res = await http.post( + let res:any = await http.post( "/wmspda/fg/queryByFactoryCodeAndWorkAreaCode", content ); - return res; + const LoctionList = res + return {LoctionList}; } @Action diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index 218a1f5..1b394b8 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -47,7 +47,7 @@ {{ $t('message.CommissionedLocation') }} - + {{ $t('message.CommissionedThisNumber') }} @@ -107,7 +107,7 @@ export default class dnReceiptDom extends BasePage { border = true; nowAmount: any = ''; //库位 - Location: any = []; + Loc: any = []; //所选择的库位 wlCode: any = ''; materialIndex:any = null @@ -122,16 +122,13 @@ export default class dnReceiptDom extends BasePage { factoryCode: means.session.user.factoryCode, workArea: session.workareaCode, }; - let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); - console.log('////res', res); - //库位为undefined,打印的res信息格式为[[],[]],且里面两个arry相同 - //guoshuang 修改 库位列表undefined - res.forEach((item: any) => { + 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.Location.push(pickerName); + this.Loc.push(pickerName); }); } empty() { @@ -140,7 +137,7 @@ export default class dnReceiptDom extends BasePage { this.nowAmount = ''; this.every = ''; this.materialList = []; - this.Location = []; + this.Loc = []; } async close(){ if (this.form.documentNo == '') { @@ -353,7 +350,7 @@ export default class dnReceiptDom extends BasePage { height: 100%; display: flex; view { - width: 110rpx; + width: 130rpx; height: 100%; line-height: 100rpx; } diff --git a/src/pages/raw/commission/goOut/model.ts b/src/pages/raw/commission/goOut/model.ts index a736984..dba4904 100644 --- a/src/pages/raw/commission/goOut/model.ts +++ b/src/pages/raw/commission/goOut/model.ts @@ -17,7 +17,7 @@ class OrderInInfo { namespaced: true, dynamic: true, store, - name: 'product.outbound.stoOutbound', + name: 'product.outbound.stoOut', }) export class ReturningModule extends VuexModule { /** @@ -30,6 +30,7 @@ export class ReturningModule extends VuexModule { */ materielList: any[] = []; locationCodeList: any[] = []; + LocList:any[] = [] //条码扫描的返回的结果 oneMaterielDetail: any = {}; /** @@ -149,11 +150,14 @@ export class ReturningModule extends VuexModule { //委外出库 初始化获取库位 - @Action({ commit: 'updateCheckedOrderInInfoListKw' }) - async queryByFactoryCodeAndWorkAreaCode(content: any) { - let res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + // @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + @MutationAction + async queryCodeAndWorkAreaCode(content: any) { + let res:any = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', res); - return res; + const LocList = res + console.log('LocList',LocList) + return {LocList}; } @Action