mes现场提测问题修改

master
guoshuang 2 years ago
parent e325366d5b
commit 40a650436f

@ -82,11 +82,11 @@ export default class ChangePalletNew extends BasePage {
zaiciFocus = false; zaiciFocus = false;
switchListText = [ switchListText = [
{ {
title: '', title: 'AGV',
value: 0, value: 0,
}, },
{ {
title: '', title: '人工',
value: 1, value: 1,
}, },
]; ];
@ -131,6 +131,18 @@ export default class ChangePalletNew extends BasePage {
this.customToast('请输入nficl'); this.customToast('请输入nficl');
return; 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(); var currentDate = new Date();
// //
@ -156,7 +168,7 @@ export default class ChangePalletNew extends BasePage {
//productionState: this.productCodeList.value, //productionState: this.productCodeList.value,
}; };
await this.model.palletInforUpdate(params); await this.model.palletInforUpdate(params);
if (model.SubmitCode == 10) { if (model.SubmitCode == 200) {
this.uni.showToast({ title: '成功' }); this.uni.showToast({ title: '成功' });
this.Clear(); this.Clear();
} }

@ -7,7 +7,7 @@ import { session } from '@/store/modules/session';
namespaced: true, namespaced: true,
dynamic: true, dynamic: true,
store, store,
name: 'page.mes.PalletChange', name: 'page.mes.PalletChangeNew',
}) })
export class ChangePalletNew extends VuexModule { export class ChangePalletNew extends VuexModule {
orderNoItemList: any = []; orderNoItemList: any = [];

@ -29,13 +29,13 @@
<choose-one @switchfunction="switchChangeFun" :switchType="'text'" :defaultColor="'#4A72F9'" :highColor="'#FFFFFF'" :defaultValue="locationStatus" :switchList="switchListText"></choose-one> <choose-one @switchfunction="switchChangeFun" :switchType="'text'" :defaultColor="'#4A72F9'" :highColor="'#FFFFFF'" :defaultValue="locationStatus" :switchList="switchListText"></choose-one>
</u-form-item> --> </u-form-item> -->
<div v-show="isshow"> <div v-show="isshow">
<div v-if="oldstationNos.length"> <!-- <div v-if="oldstationNos.length">
<u-form-item label="设备:"> <u-form-item label="设备:">
<jPicker sureColor="#ff0000" :moren="moren1" @bindpicker="selectProductCode" showKey="label" valKey="value" :val="productCodeList.value" :options="oldstationNos" /> <jPicker sureColor="#ff0000" :moren="moren1" @bindpicker="selectProductCode" showKey="label" valKey="value" :val="productCodeList.value" :options="oldstationNos" />
</u-form-item> </u-form-item>
</div> </div> -->
<div v-else> <div>
<u-form-item label="设备类型:"> <u-form-item label="设备类型:">
<jPicker sureColor="#ff0000" :moren="moren2" @bindpicker="selectProductCodeType" showKey="label" valKey="value" :val="productCodeTypeList.value" :options="DictTypeList" /> <jPicker sureColor="#ff0000" :moren="moren2" @bindpicker="selectProductCodeType" showKey="label" valKey="value" :val="productCodeTypeList.value" :options="DictTypeList" />
</u-form-item> </u-form-item>
@ -119,21 +119,25 @@ export default class PalletChange extends BasePage {
this.isshow = true; this.isshow = true;
}); });
await this.model.requestDestinationStation(this.orderNo); await this.model.requestDestinationStation(this.orderNo);
const stationNos = model.orderNoItemList.stationNos; // const stationNos = model.orderNoItemList.stationNos;
for (let i = 0; i < stationNos.length; i++) { // for (let i = 0; i < stationNos.length; i++) {
for (let j = 0; j < this.DictList.length; j++) { // for (let j = 0; j < this.DictList.length; j++) {
if (stationNos[i].stationNo === this.DictList[j].equipmentCode) { // if (stationNos[i].stationNo === this.DictList[j].equipmentCode) {
stationNos[i].equipmentName = this.DictList[j].equipmentName; // stationNos[i].equipmentName = this.DictList[j].equipmentName;
break; // break;
} // }
} // }
} // }
console.log('111', stationNos); // this.oldstationNos = stationNos.map((item) => ({
this.oldstationNos = stationNos.map((item) => ({ // label: item.equipmentName,
label: item.equipmentName, // value: item.stationNo,
value: item.stationNo, // ...item,
...item, // }));
})); // console.log('111', stationNos);
// if (this.oldstationNos.some((item) => !item.label || item.label == undefined)) {
// this.oldstationNo = [];
// }
// console.log('fffff',this.oldstationNos)
} }
generateGUID() { generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {

@ -76,6 +76,14 @@ export default class RawHome extends BasePage {
onReady() { onReady() {
if (session.FactoryCode != undefined) { if (session.FactoryCode != undefined) {
this.factoryList.value = session.FactoryCode; 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'); this.newmenuList = this.menuList.filter((item) => item.perms == 'wms' || item.perms == 'mes' || item.perms == 'equipment');
console.log('1234', this.menuList); console.log('1234', this.menuList);

Loading…
Cancel
Save