chris 3 vuotta sitten
vanhempi
commit
aa1c8d79e9

+ 5 - 0
src/views/modules/common/cus-component.vue

@@ -50,6 +50,11 @@
     mounted () {
       this.init()
     },
+    watch: {
+      cusId (value) {
+        this.value = value
+      }
+    },
     methods: {
       async init () {
         this.getList()

+ 8 - 7
src/views/modules/tech/product-add-or-update.vue

@@ -56,7 +56,7 @@
           <el-row class="my-row">
             <el-col :span="8">
               <el-form-item label="产品来源" prop="source">
-                <cus-component v-model="dataForm.source" :cus-id="dataForm.source"></cus-component>
+                <cus-component v-model="dataForm.source" :cus-id.sync="dataForm.source"></cus-component>
               </el-form-item>
             </el-col>
             <el-col :span="16">
@@ -219,7 +219,7 @@
         visible: false,
         display: false,
         optionsType: [],
-        optionsTech: [],
+        // optionsTech: [],
         fileList: [],
         dataList: [],
         id: 0,
@@ -247,7 +247,8 @@
         this.dataForm = {}
         this.productDetails = []
         this.materialList = []
-        this.optionsTech = []
+        // this.optionsTech = []
+        // this.optionsDraw = []
         this.visible = true
         this.id = id || 0
         this.display = display
@@ -302,10 +303,10 @@
                     })
                   })
                 }
-                this.optionsDraw.push({
-                  code: item.drawingId,
-                  value: item.drawingName
-                })
+                // this.optionsDraw.push({
+                //   code: item.drawingId,
+                //   value: item.drawingName
+                // })
                 this.dataForm.drawingIdList.push(item.drawingId)
               })
             }