工艺流程优化

This commit is contained in:
打豆豆 2024-04-24 17:10:19 +08:00
parent eecd7cf59a
commit 2f8ff982a4

View File

@ -536,6 +536,7 @@ export default {
}, },
machineryList: [], machineryList: [],
formArr: "", formArr: "",
popArr: "",
// //
rules: { rules: {
routeId: [ routeId: [
@ -819,7 +820,8 @@ export default {
this.open = true; this.open = true;
this.title = "添加工艺组成"; this.title = "添加工艺组成";
listRouteprocess({ routeId: this.routeId }).then((response) => { listRouteprocess({ routeId: this.routeId }).then((response) => {
this.form.orderNum = response.rows.pop().orderNum + 1; this.popArr = response.total;
this.form.orderNum = response.total + 1;
}); });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -864,11 +866,9 @@ export default {
mappedArray.forEach((item, index) => { mappedArray.forEach((item, index) => {
item.orderNum = index; item.orderNum = index;
updateRouteprocess(item).then((response) => { updateRouteprocess(item).then((response) => {
this.getList(); updateRouteprocess(item).then((response) => {});
updateRouteprocess(item).then((response) => {
this.getList();
});
}); });
this.getList();
}); });
}); });
this.getList(); this.getList();
@ -889,25 +889,15 @@ export default {
this.open = false; this.open = false;
}); });
} else { } else {
this.form.orderNum = this.form.orderNum - 1;
addRouteprocess(this.form).then((response) => { addRouteprocess(this.form).then((response) => {
if (this.form.orderNum < this.popArr) {
this.process(); this.process();
}
this.getList(); this.getList();
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
}); });
} }
// let aa = { routeId: this.form.routeId, orderNum: this.form.orderNum };
// listRouteprocessTwo(aa).then((resp) => {
// resp.data.forEach((item) => {
// getRouteprocess(item.recordId).then((response) => {
// const { originalName, ...newObj } = response.data;
// updateRouteprocess(newObj).then(() => {});
// });
// });
// this.getList();
// });
} }
}); });
}, },