fix:添加工艺路线时工艺步骤显示产品名称

This commit is contained in:
shijing 2025-02-27 10:51:40 +08:00
parent 5adfe9cd36
commit dd529e178e
1 changed files with 20 additions and 4 deletions

View File

@ -23,6 +23,7 @@
> >
</el-step> </el-step>
</el-steps> </el-steps>
<div v-if="active === 1" class="productNameText">{{ productName }}</div>
</el-header> </el-header>
<!--基本信息!--> <!--基本信息!-->
<el-main class="nopadding" v-if="active === 0"> <el-main class="nopadding" v-if="active === 0">
@ -224,7 +225,8 @@ export default {
name: [{ required: true, message: "请输入" }], name: [{ required: true, message: "请输入" }],
}, },
routepack: "", routepack: "",
project_code:'' project_code:'',
productName:'',
}; };
}, },
mounted() { mounted() {
@ -261,6 +263,9 @@ export default {
that.materials = res; that.materials = res;
}); });
}, },
handleMaterialChange(val){
console.log("val",val);
},
handleStep(val) { handleStep(val) {
// //
if (this.stepSuc.includes(val) === true) { if (this.stepSuc.includes(val) === true) {
@ -277,14 +282,12 @@ export default {
let form = {}; let form = {};
form.name = that.form.name; form.name = that.form.name;
form.material = that.form.material; form.material = that.form.material;
// console.log("that.form",that.form)
if (that.form.id) { if (that.form.id) {
that.$API.mtm.routepack.update that.$API.mtm.routepack.update
.req(that.form.id, that.form) .req(that.form.id, that.form)
.then((res) => { .then((res) => {
that.routepack = res.id; that.routepack = res.id;
that.query.routepack = res.id; that.query.routepack = res.id;
// console.log("that.query", that.query);
that.apiObj = that.$API.mtm.route.list; that.apiObj = that.$API.mtm.route.list;
that.active = 1; that.active = 1;
// that.$refs.tables.refresh(); // that.$refs.tables.refresh();
@ -294,9 +297,13 @@ export default {
this.active = 1; this.active = 1;
that.form.id = res.id; that.form.id = res.id;
that.routepack = res.id; that.routepack = res.id;
// console.log("that.form",that.form)
}); });
} }
that.materials.forEach((item) => {
if (item.id == that.form.material) {
that.productName = item.full_name;
}
})
}, },
table_add() { table_add() {
this.dialog.save = true; this.dialog.save = true;
@ -377,3 +384,12 @@ export default {
}, },
}; };
</script> </script>
<style>
.productNameText{
position: absolute;
top: 30px;
font-size: 18px;
width: 96%;
text-align: center;
color: #666666;
}</style>