|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<!-- :close-on-click-modal="false" -->
|
|
|
- <ele-modal width="80vw" :visible.sync="visible" custom-class="ele-dialog-form"
|
|
|
- :title="title" :maxable="true">
|
|
|
+ <ele-modal width="80vw" :visible.sync="visible" custom-class="ele-dialog-form" :title="title" :maxable="true">
|
|
|
<div class="form-wrapper">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="90px" class="formbox">
|
|
|
<el-row :gutter="24">
|
|
|
@@ -60,7 +59,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="工艺路线:" prop="produceRoutingId">
|
|
|
+ <el-form-item label="工艺路线:" prop="produceRoutingId" v-if="clientEnvironmentId !== 4">
|
|
|
<el-select v-model="form.produceRoutingId" style="width: 100%" @change="changeRoute" size="mini">
|
|
|
<el-option v-for="item of routingList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
@@ -68,6 +67,13 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="工艺路线:" prop="produceRoutingId" v-if="clientEnvironmentId == 4">
|
|
|
+ <el-input v-model="form.produceRoutingName" style="width: 100%" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="24">
|
|
|
@@ -167,18 +173,22 @@ export default {
|
|
|
deep: true,
|
|
|
handler(val) {
|
|
|
|
|
|
+
|
|
|
// this.type = val;
|
|
|
this.title = !val.id ? '新增临时计划' : '编辑临时计划';
|
|
|
// this.form = this.factoryObj;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.form = val;
|
|
|
// 修改
|
|
|
this.$nextTick(() => {
|
|
|
if (val.id) {
|
|
|
this.bomListVersion();
|
|
|
- if(val.bomCategoryId){
|
|
|
+ if (val.bomCategoryId) {
|
|
|
this.getPlanRouting();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -215,11 +225,14 @@ export default {
|
|
|
productName: [
|
|
|
{ required: true, message: '请选择名称', trigger: 'change' }
|
|
|
],
|
|
|
-
|
|
|
+
|
|
|
bomCategoryId: [
|
|
|
{ required: true, message: '请选择BOM版本', trigger: 'blur' }
|
|
|
],
|
|
|
|
|
|
+ produceType: [
|
|
|
+ { required: true, message: '请选择工艺路线', trigger: 'blur' }
|
|
|
+ ],
|
|
|
produceRoutingId: [
|
|
|
{ required: true, message: '请选择工艺路线', trigger: 'blur' }
|
|
|
],
|
|
|
@@ -246,9 +259,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- open(){
|
|
|
+ open() {
|
|
|
|
|
|
this.visible = true;
|
|
|
+ console.log(this.clientEnvironmentId, '999999999');
|
|
|
+
|
|
|
+ //this.clientEnvironmentId 环境判断 宝悦环境
|
|
|
+ if (this.clientEnvironmentId == 4) {
|
|
|
+ this.getPlanRoutingNew();
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.getPlanRoutingNew();
|
|
|
},
|
|
|
|
|
|
handleAdd() {
|
|
|
@@ -256,6 +277,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
confirmChoose(list) {
|
|
|
+
|
|
|
+ console.log(list, '6666666666666666');
|
|
|
+ if (this.clientEnvironmentId == '4') {
|
|
|
+ let data = {};
|
|
|
+ if (list[0].name.includes('板材')) {
|
|
|
+
|
|
|
+ data = {
|
|
|
+ id: '1856970794952372226',
|
|
|
+ name: '板材',
|
|
|
+ produceVersionName: '板材'
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data = {
|
|
|
+ id: '1857313733642596353',
|
|
|
+ name: '砌块',
|
|
|
+ produceVersionName: '砌块'
|
|
|
+ };
|
|
|
+ }
|
|
|
+ this.$set(this.form, 'produceRoutingName', data.name);
|
|
|
+ this.$set(this.form, 'produceRoutingId', data.id);
|
|
|
+ this.$set(this.form, 'produceVersionName', data.produceVersionName);
|
|
|
+ }
|
|
|
+
|
|
|
this.$set(this.form, 'categoryId', list[0].id);
|
|
|
this.$set(this.form, 'productName', list[0].name);
|
|
|
this.$set(this.form, 'productCode', list[0].code);
|
|
|
@@ -264,6 +308,9 @@ export default {
|
|
|
this.$set(this.form, 'modelType', list[0].modelType);
|
|
|
this.$set(this.form, 'measuringUnit', list[0].measuringUnit);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.bomListVersion();
|
|
|
},
|
|
|
|
|
|
@@ -279,7 +326,7 @@ export default {
|
|
|
} catch (err) { }
|
|
|
},
|
|
|
initForm() {
|
|
|
- this.form= {
|
|
|
+ this.form = {
|
|
|
timeDimensionPlanType: 3,
|
|
|
categoryId: '',
|
|
|
productName: '',
|
|
|
@@ -342,12 +389,23 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 工艺路线
|
|
|
+
|
|
|
getPlanRouting() {
|
|
|
bomRoutingList(this.form.bomCategoryId).then((res) => {
|
|
|
this.routingList = res || [];
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 宝悦 工艺路线
|
|
|
+ getPlanRoutingNew() {
|
|
|
+
|
|
|
+ // bomRoutingList(this.form.bomCategoryId).then((res) => {
|
|
|
+ // this.routingList = res || []
|
|
|
+ // })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
changeProduceType() {
|
|
|
this.form.bomCategoryId = '';
|
|
|
this.form['bomCategoryName'] = '';
|