feat: 简化mlogb逻辑
This commit is contained in:
parent
4855ab4028
commit
5c7a61089b
|
@ -458,20 +458,7 @@ export default {
|
|||
});
|
||||
},
|
||||
table_edit(row) {
|
||||
// let arr = [];
|
||||
// let mlogb = row.mlogb;
|
||||
// this.brothersListorigin.forEach(item => {
|
||||
// let obj = {};
|
||||
// obj.count_ok = null;
|
||||
// obj.material_out = item;
|
||||
// for (let i = 0; i < mlogb.length; i++) {
|
||||
// if (mlogb[i].material_out == item) {
|
||||
// obj.count_ok = mlogb[i].count_ok;
|
||||
// }
|
||||
// }
|
||||
// arr.push(obj)
|
||||
// })
|
||||
// this.brothersList = arr;
|
||||
this.brothersList = row.mlogb;
|
||||
this.dialogSave = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
|
|
|
@ -661,16 +661,7 @@ export default {
|
|||
this.getShiftOptions();
|
||||
this.getRouteOptions();
|
||||
this.getWorkShopMaterial();
|
||||
if (this.activeType == "10车间") {
|
||||
let mlogb = [];
|
||||
this.brothersList.forEach((item) => {
|
||||
let obj = {};
|
||||
obj.material_out = item.material_out;
|
||||
obj.count_ok = item.count_ok;
|
||||
mlogb.push(obj);
|
||||
});
|
||||
this.mlogb = mlogb;
|
||||
}
|
||||
this.mlogb = this.brothersList;
|
||||
if (this.activeType == "10车间") {
|
||||
this.getMaterial(0);
|
||||
} else {
|
||||
|
@ -906,6 +897,7 @@ export default {
|
|||
});
|
||||
this.form.mlogb = newArr;
|
||||
}
|
||||
console.log(this.form.mlogb)
|
||||
let sun = this.form.count_ok + this.form.count_notok;
|
||||
if ((this.activeType == "7车间" || this.activeType == "10车间") && sun != this.form.count_real) {
|
||||
this.isSaveing = false;
|
||||
|
|
Loading…
Reference in New Issue