chencc 1 năm trước cách đây
mục cha
commit
db0159b46c

+ 15 - 8
src/views/productionPlan/components/factoryAdd/index.vue

@@ -17,7 +17,7 @@
       >
         <el-row :gutter="24">
           <el-col :span="8">
-            <el-form-item label="名称:" prop="productName">
+            <el-form-item label="产品名称:" prop="productName">
               <el-input
                 @click.native="handleAdd"
                 placeholder="请选择物料"
@@ -126,7 +126,9 @@
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
-                ></el-option>
+                >
+              </el-option>
+
               </el-select>
             </el-form-item>
           </el-col>
@@ -314,13 +316,13 @@
           productName: [
             { required: true, message: '请选择名称', trigger: 'change' }
           ],
-          bomCategoryId: [
-            { required: true, message: '请选择BOM版本', trigger: 'blur' }
-          ],
+          // bomCategoryId: [
+          //   { required: true, message: '请选择BOM版本', trigger: 'blur' }
+          // ],
 
-          produceRoutingId: [
-            { required: true, message: '请选择工艺路线', trigger: 'blur' }
-          ],
+          // produceRoutingId: [
+          //   { required: true, message: '请选择工艺路线', trigger: 'blur' }
+          // ],
 
           reqMoldTime: [
             { required: true, message: '请选择要求完成日期', trigger: 'blur' }
@@ -451,10 +453,15 @@
       },
 
       changeRoute() {
+        console.log(this.routingList,this.form.produceRoutingId);
+        this.$forceUpdate()
         this.routingList.forEach((f) => {
           if (f.id == this.form.produceRoutingId) {
+            this.$set(this.form, 'produceRoutingId', f.id);
             this.$set(this.form, 'produceRoutingName', f.name);
             this.$set(this.form, 'produceVersionName', f.version);
+
+            console.log(this.form,'1111111');
           }
         });
       },

+ 6 - 1
src/views/saleOrder/salesToProduction.vue

@@ -57,8 +57,10 @@
           </el-col>
 
           <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }" v-if="clientEnvironmentId != 4">
+            {{ form.produceRoutingId }}99999
             <el-form-item label="工艺路线:" prop="produceRoutingId">
               <!--  @click.native="openVersion"   -->
+
               <el-select v-model="form.produceRoutingId" style="width: 100%" @change="changeRoute">
                   <el-option
                     v-for="item of routingList"
@@ -644,7 +646,6 @@ export default {
       form: {
         planType: 1,
         produceRoutingId: '',
-
         stockCountBase: '',
         salesOrders: [],
         produceRoutingName: '',
@@ -798,6 +799,10 @@ export default {
 
 
     changeRoute() {
+
+      console.log(this.routingList);
+      console.log(this.form.produceRoutingId);
+
       this.routingList.forEach((f) => {
         if(f.id == this.form.produceRoutingId) {
           this.$set(this.form, 'produceRoutingName', f.name);

+ 2 - 2
vue.config.js

@@ -33,8 +33,8 @@ module.exports = {
       '/api': {
         // target: 'http://192.168.1.210:86/',
         // target: 'http://192.168.1.116:18086',
-        target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.125:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''