diff --git a/src/pages/mes/PalletChange/index.vue b/src/pages/mes/PalletChange/index.vue
index f9b1829..3060f26 100644
--- a/src/pages/mes/PalletChange/index.vue
+++ b/src/pages/mes/PalletChange/index.vue
@@ -4,7 +4,7 @@
- 托盘变更
+ 下机台设置
@@ -14,25 +14,41 @@
rfid:
-
+
+ 查询
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 确定
+ 确定
@@ -48,7 +64,7 @@ import { BasePage } from '@/components/base/page';
import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue';
-//import { session } from '@/store/modules/session';
+import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@@ -58,9 +74,14 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
})
export default class PalletChange extends BasePage {
model = model;
- moren = '选择缓存区';
+ moren1 = '选择设备';
+ moren2 = '选择设备类型';
shouciFocus = true;
+ isshow = false;
zaiciFocus = false;
+ DictList: any = [];
+ oldstationNos: any = [];
+ DictTypeList: any = [];
switchListText = [
{
title: '置为正常',
@@ -72,9 +93,13 @@ export default class PalletChange extends BasePage {
},
];
productCodeList: any = {};
+ productCodeTypeList: any = {};
// remove: any = {};
async onReady() {
- await this.model.getDictList();
+ await this.model.getAllEquipmentsType();
+ this.DictTypeList = model.DictTypeList;
+ await this.model.getAllEquipments();
+ this.DictList = model.DictList;
//this.remove = this.model.WlList[0];
}
// selectItem(e: any) {
@@ -83,6 +108,27 @@ export default class PalletChange extends BasePage {
orderNo: any = '';
location: any = '';
locationStatus: any = -1;
+ async query() {
+ if (this.orderNo == '' || this.orderNo.length == 0) {
+ this.customToast('请输入nficl');
+ return;
+ }
+ this.isshow = false;
+ this.$nextTick(() => {
+ this.isshow = true;
+ });
+ await this.model.requestDestinationStation(this.orderNo);
+ let 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;
+ }
generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,
@@ -90,30 +136,32 @@ export default class PalletChange extends BasePage {
return v.toString(16);
});
}
- async query() {
+ async onsubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
return;
}
- var currentDate = new Date();
+ // var currentDate = new Date();
- // 获取年份、月份、日期、小时、分钟和秒
- var year = currentDate.getFullYear();
- var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
- var day = ('0' + currentDate.getDate()).slice(-2);
- var hours = ('0' + currentDate.getHours()).slice(-2);
- var minutes = ('0' + currentDate.getMinutes()).slice(-2);
- var seconds = ('0' + currentDate.getSeconds()).slice(-2);
+ // // 获取年份、月份、日期、小时、分钟和秒
+ // var year = currentDate.getFullYear();
+ // var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
+ // var day = ('0' + currentDate.getDate()).slice(-2);
+ // var hours = ('0' + currentDate.getHours()).slice(-2);
+ // var minutes = ('0' + currentDate.getMinutes()).slice(-2);
+ // var seconds = ('0' + currentDate.getSeconds()).slice(-2);
// 格式化为 "YYYY-MM-DD HH:mm:ss" 结构
- var formattedDate = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
+ //var formattedDate = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
let params = {
rfidNo: this.orderNo,
- reqCode: this.generateGUID(),
- reqTime: formattedDate,
- location: this.location,
- locationStatus: this.locationStatus,
- productionState: this.productCodeList.value,
+ factoryCode: session.FactoryCode,
+ equipmentCode: this.productCodeList.value,
+ // reqCode: this.generateGUID(),
+ // reqTime: formattedDate,
+ // location: this.location,
+ // locationStatus: this.locationStatus,
+ // productionState: this.productCodeList.value,
};
await this.model.palletInforUpdate(params);
if (model.SubmitCode == 10) {
@@ -126,6 +174,7 @@ export default class PalletChange extends BasePage {
this.location = '';
this.locationStatus = -1;
this.productCodeList = {};
+ this.productCodeTypeList = {};
this.shouciFocus = false;
this.$nextTick(() => {
this.shouciFocus = true;
@@ -138,6 +187,15 @@ export default class PalletChange extends BasePage {
async selectProductCode(e: any) {
this.productCodeList = e.pickerName;
}
+ async selectProductCodeType(e: any) {
+ this.productCodeTypeList = e.pickerName;
+ let params = {
+ factoryCode: session.FactoryCode,
+ equipmentTypeCode: this.productCodeTypeList.value,
+ };
+ await this.model.getAllEquipmentsle(params);
+ this.DictList = model.seleDictList;
+ }
}