From 40a650436f60d9e0f3386f1b769146df112ef9e3 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Mon, 23 Oct 2023 15:21:33 +0800 Subject: [PATCH] =?UTF-8?q?mes=E7=8E=B0=E5=9C=BA=E6=8F=90=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mes/ChangePalletNew/index.vue | 18 +++++++++-- src/pages/mes/ChangePalletNew/model.ts | 2 +- src/pages/mes/PalletChange/index.vue | 40 ++++++++++++++----------- src/pages/shouye/index.vue | 8 +++++ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/pages/mes/ChangePalletNew/index.vue b/src/pages/mes/ChangePalletNew/index.vue index cb41751..120e0a4 100644 --- a/src/pages/mes/ChangePalletNew/index.vue +++ b/src/pages/mes/ChangePalletNew/index.vue @@ -82,11 +82,11 @@ export default class ChangePalletNew extends BasePage { zaiciFocus = false; switchListText = [ { - title: '是', + title: 'AGV', value: 0, }, { - title: '否', + title: '人工', value: 1, }, ]; @@ -131,6 +131,18 @@ export default class ChangePalletNew extends BasePage { this.customToast('请输入nficl'); return; } + if (Object.keys(this.orderNoItemList).length === 0) { + this.customToast('请先查询出nficl数据'); + return; + } + if (this.productCodelocList.value == '' || this.productCodelocList.value == undefined) { + this.customToast('请选择缓存区'); + return; + } + if (this.productCodeList.value == '' || this.productCodeList.value == undefined) { + this.customToast('请选择库位'); + return; + } var currentDate = new Date(); // 获取年份、月份、日期、小时、分钟和秒 @@ -156,7 +168,7 @@ export default class ChangePalletNew extends BasePage { //productionState: this.productCodeList.value, }; await this.model.palletInforUpdate(params); - if (model.SubmitCode == 10) { + if (model.SubmitCode == 200) { this.uni.showToast({ title: '成功' }); this.Clear(); } diff --git a/src/pages/mes/ChangePalletNew/model.ts b/src/pages/mes/ChangePalletNew/model.ts index bc9ef01..ed6344c 100644 --- a/src/pages/mes/ChangePalletNew/model.ts +++ b/src/pages/mes/ChangePalletNew/model.ts @@ -7,7 +7,7 @@ import { session } from '@/store/modules/session'; namespaced: true, dynamic: true, store, - name: 'page.mes.PalletChange', + name: 'page.mes.PalletChangeNew', }) export class ChangePalletNew extends VuexModule { orderNoItemList: any = []; diff --git a/src/pages/mes/PalletChange/index.vue b/src/pages/mes/PalletChange/index.vue index 956a959..54fc0d6 100644 --- a/src/pages/mes/PalletChange/index.vue +++ b/src/pages/mes/PalletChange/index.vue @@ -29,13 +29,13 @@ -->
-
+ -
+
@@ -119,21 +119,25 @@ export default class PalletChange extends BasePage { this.isshow = true; }); await this.model.requestDestinationStation(this.orderNo); - const stationNos = model.orderNoItemList.stationNos; - for (let i = 0; i < stationNos.length; i++) { - for (let j = 0; j < this.DictList.length; j++) { - if (stationNos[i].stationNo === this.DictList[j].equipmentCode) { - stationNos[i].equipmentName = this.DictList[j].equipmentName; - break; - } - } - } - console.log('111', stationNos); - this.oldstationNos = stationNos.map((item) => ({ - label: item.equipmentName, - value: item.stationNo, - ...item, - })); + // const stationNos = model.orderNoItemList.stationNos; + // for (let i = 0; i < stationNos.length; i++) { + // for (let j = 0; j < this.DictList.length; j++) { + // if (stationNos[i].stationNo === this.DictList[j].equipmentCode) { + // stationNos[i].equipmentName = this.DictList[j].equipmentName; + // break; + // } + // } + // } + // this.oldstationNos = stationNos.map((item) => ({ + // label: item.equipmentName, + // value: item.stationNo, + // ...item, + // })); + // console.log('111', stationNos); + // if (this.oldstationNos.some((item) => !item.label || item.label == undefined)) { + // this.oldstationNo = []; + // } + // console.log('fffff',this.oldstationNos) } generateGUID() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { diff --git a/src/pages/shouye/index.vue b/src/pages/shouye/index.vue index 817343b..56d44e8 100644 --- a/src/pages/shouye/index.vue +++ b/src/pages/shouye/index.vue @@ -76,6 +76,14 @@ export default class RawHome extends BasePage { onReady() { if (session.FactoryCode != undefined) { this.factoryList.value = session.FactoryCode; + } else { + this.factoryList.value = this.areas[0].factory; + const factory: string = this.areas[0].factory; + const poolName: string = this.areas[0].poolName; + session.setFactory({ + factoryCode: factory, + poolName: poolName, + }); } this.newmenuList = this.menuList.filter((item) => item.perms == 'wms' || item.perms == 'mes' || item.perms == 'equipment'); console.log('1234', this.menuList);