fix:玻纤排一次棒工艺步骤添加工艺参数

This commit is contained in:
shijing 2025-08-25 15:39:07 +08:00
parent ee37dee001
commit c261aed544
1 changed files with 92 additions and 23 deletions

View File

@ -24,6 +24,7 @@
clearable
filterable
style="width: 100%"
@change="processChange"
>
<el-option
v-for="item in options"
@ -46,25 +47,6 @@
/>
</el-form-item>
</el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="指定工段">
<el-select
v-model="form.mgroup"
placeholder="物料"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in mgroups"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24">
<el-form-item label="输入物料" prop="material_in">
<el-select
@ -153,6 +135,64 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="project_code=='bxerp'&&processName=='排一次棒'">
<el-col :md="12" :sm="24">
<el-form-item label="一次丝对边">
<el-input-number
v-model="params_json.duibian1"
:min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="二次丝对边">
<el-input-number
v-model="params_json.duibian2"
:min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="一次丝长度">
<el-input-number
v-model="params_json.changdu1"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="二次丝长度">
<el-input-number
v-model="params_json.changdu2"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="排板根数">
<el-input-number
v-model="params_json.pbnum"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="排板丝高">
<el-input-number
v-model="params_json.pbsigao"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="计划时长" prop="hour_work">
<el-input-number
@ -267,6 +307,14 @@ export default {
{ required: true, message: "请选择工序", trigger: "blur" },
],
},
params_json:{
duibian1:0,
duibian2:0,
changdu1:0,
changdu2:0,
pbnum:0,
pbsigao:0,
},
visible: false,
isSaveing: false,
materialsIn: [],
@ -278,6 +326,7 @@ export default {
titleMap: { add: "新增", edit: "编辑" },
setFiltersVisible: false,
routeId: "",
processName: "",
project_code: "",
addTemplate:{
id:'',
@ -363,6 +412,14 @@ export default {
});
}).catch(() => {});
},
processChange(){
let that = this;
that.options.forEach((item) => {
if (item.id == that.form.process) {
that.processName = item.name;
}
})
},
//
open(mode = "add") {
this.mode = mode;
@ -371,10 +428,19 @@ export default {
},
//
setData(data) {
Object.assign(this.form, data);
this.routeId = data.id;
this.addTemplate.route = data.id;
this.getroutemats();
let that = this;
Object.assign(that.form, data);
that.routeId = data.id;
that.addTemplate.route = data.id;
that.params_json=that.form.params_json;
setTimeout(() => {
that.options.forEach((item) => {
if (item.id == data.process) {
that.processName = item.name;
}
})
},500)
that.getroutemats();
},
//
submit() {
@ -382,6 +448,9 @@ export default {
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
that.isSaveing = true;
if(that.processName=='排一次棒'){
that.form.params_json = that.params_json;
}
if (that.mode === "add") {
that.$API.mtm.route.create.req(that.form).then((res) => {
that.isSaveing = false;