zhongtianhaoyuan há 3 anos atrás
pai
commit
840462cd99
1 ficheiros alterados com 5 adições e 3 exclusões
  1. 5 3
      src/views/houseSelfCollect/acquisitionManagementAdd.vue

+ 5 - 3
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -15,8 +15,8 @@
           <div class="grid-content">
             <el-form-item label="货名">
               <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable ref="elSelect">
-                <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
-                  :value="item.constValue">
+                <el-option v-for="(item,index) in goodnameList" :key="item.id" :label="item.constValue"
+                  :value="index">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -285,10 +285,12 @@
           if (_goodsNameList.length == 0) {
             this.goodnameList = response
             this.selectVal = response[0].constValue
+            this.baseInfoForm.goodsNameKey = response[0].constKey
           } else {
             this.goodnameList = _list
             if (_list.length != 0) {
               this.selectVal = _list[0].constValue
+              this.baseInfoForm.goodsNameKey = _list[0].constKey
             }
           }
         })
@@ -422,7 +424,7 @@
         })
       },
       goodsChange(e) {
-        
+        this.baseInfoForm.goodsNameKey = this.goodnameList[e].constKey  
       },
       changeBaseWater(val) {
         for (let i = 0; i < this.priceList.length; i++) {