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) {
// 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);

View File

@ -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;