Forráskód Böngészése

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccjgmwz 3 éve
szülő
commit
5c9a1a22fc

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

@@ -15,8 +15,7 @@
           <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,index) in goodnameList" :key="item.id" :label="item.constValue"
-                  :value="index">
+                <el-option v-for="item in goodnameList" :key="item.id" :label="item.constValue" :value="item.constValue">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -424,7 +423,12 @@
         })
       },
       goodsChange(e) {
-        this.baseInfoForm.goodsNameKey = this.goodnameList[e].constKey  
+        for(let num = 0 ; num < this.goodnameList.length ; num++){
+          if(e == this.goodnameList[num].constValue){
+             this.baseInfoForm.goodsNameKey = this.goodnameList[num].constKey
+             break  
+          }
+        }
       },
       changeBaseWater(val) {
         for (let i = 0; i < this.priceList.length; i++) {