|
|
|
@ -812,7 +812,29 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
item.checkType = this.selectList.value;
|
|
|
|
|
item.orderCode = this.clickitem.orderNo;
|
|
|
|
|
item.files = [];
|
|
|
|
|
item.babtype = this.defectCodelist;
|
|
|
|
|
let defectObj = {};
|
|
|
|
|
if (item.defectNames != null) {
|
|
|
|
|
item.defectNames.split(',').forEach((item) => {
|
|
|
|
|
let [key, value] = item.split(':');
|
|
|
|
|
defectObj[key.trim()] = parseFloat(value.trim());
|
|
|
|
|
});
|
|
|
|
|
// console.log(defectObj, '缺陷对象');
|
|
|
|
|
// console.log(this.defectCodelist, '缺陷列表');
|
|
|
|
|
let olddefectCodelist = [];
|
|
|
|
|
olddefectCodelist = JSON.parse(JSON.stringify(this.defectCodelist));
|
|
|
|
|
// console.log(olddefectCodelist, 'old缺陷列表');
|
|
|
|
|
olddefectCodelist.forEach((item) => {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(defectObj, item.label)) {
|
|
|
|
|
// console.log('什么数据。。。', defectObj[item.label]);
|
|
|
|
|
item.numberall = defectObj[item.label];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
item.babtype = olddefectCodelist;
|
|
|
|
|
} else {
|
|
|
|
|
item.babtype = this.defectCodelist;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//this.defectCodelist;
|
|
|
|
|
item.defectlabel = null;
|
|
|
|
|
});
|
|
|
|
|
//this.determine();
|
|
|
|
@ -865,6 +887,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
// await this.model.getpalletLocation(params); //参数:成型区2,烘房3
|
|
|
|
|
}
|
|
|
|
|
async selectbabTypelist(babtypelist, index) {
|
|
|
|
|
//console.log('9990000',babtypelist, index);
|
|
|
|
|
this.detaillistceshi[index].babtype = babtypelist;
|
|
|
|
|
let defectCode = [];
|
|
|
|
|
let defectQuality = [];
|
|
|
|
@ -894,10 +917,12 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//console.log(mergedObject, '合并后的对象');
|
|
|
|
|
const array3 = Object.keys(mergedObject).map((defectCode) => ({
|
|
|
|
|
defectCode,
|
|
|
|
|
value: mergedObject[defectCode],
|
|
|
|
|
}));
|
|
|
|
|
//console.log(array3, '合并后的数组');
|
|
|
|
|
|
|
|
|
|
for (let index = 0; index < array3.length; index++) {
|
|
|
|
|
this.detaillistdefects.forEach((item) => {
|
|
|
|
@ -1000,6 +1025,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
focustype(item, value, index) {
|
|
|
|
|
//console.log('什么呀这是。。。。',item,value,index);
|
|
|
|
|
this.isfocus = false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.isfocus = true;
|
|
|
|
@ -1147,13 +1173,13 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.selectdisqualificationType.value === null || this.selectdisqualificationType.value === '') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '不良分类不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (this.selectdisqualificationType.value === null || this.selectdisqualificationType.value === '') {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '不良分类不能为空',
|
|
|
|
|
// type: 'default',
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//来料oa校验
|
|
|
|
|