feat: 简化mlogb逻辑

This commit is contained in:
caoqianming 2024-01-28 00:21:32 +08:00
parent 4855ab4028
commit 5c7a61089b
2 changed files with 3 additions and 24 deletions

View File

@ -458,20 +458,7 @@ export default {
}); });
}, },
table_edit(row) { table_edit(row) {
// let arr = []; this.brothersList = row.mlogb;
// 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.dialogSave = true; this.dialogSave = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row); this.$refs.saveDialog.open("edit").setData(row);

View File

@ -661,16 +661,7 @@ export default {
this.getShiftOptions(); this.getShiftOptions();
this.getRouteOptions(); this.getRouteOptions();
this.getWorkShopMaterial(); this.getWorkShopMaterial();
if (this.activeType == "10车间") { this.mlogb = this.brothersList;
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;
}
if (this.activeType == "10车间") { if (this.activeType == "10车间") {
this.getMaterial(0); this.getMaterial(0);
} else { } else {
@ -906,6 +897,7 @@ export default {
}); });
this.form.mlogb = newArr; this.form.mlogb = newArr;
} }
console.log(this.form.mlogb)
let sun = this.form.count_ok + this.form.count_notok; let sun = this.form.count_ok + this.form.count_notok;
if ((this.activeType == "7车间" || this.activeType == "10车间") && sun != this.form.count_real) { if ((this.activeType == "7车间" || this.activeType == "10车间") && sun != this.form.count_real) {
this.isSaveing = false; this.isSaveing = false;