Browse Source

新增样品名称相同的情况

wyh 1 year ago
parent
commit
9b14a3c6f4
1 changed files with 9 additions and 2 deletions
  1. 9 2
      itdmWeb/src/views/module-iTDM/weituo/modules/step/Step3.vue

+ 9 - 2
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step3.vue

@@ -9,10 +9,10 @@
 
       <template slot="yangpinKeyId" slot-scope="text, record,index">
         <a-form-model-item :prop="'list.'+index+'.yangpinKeyId'" :rules="validatorRules.yangpinKeyId">
-          <a-select :disabled="formDisabled" v-model="record.yangpinKeyId" allowClear :dropdownMatchSelectWidth="false" option-label-prop="label">
+          <a-select :disabled="formDisabled" v-model="record.yangpinKeyId" allowClear :dropdownMatchSelectWidth="false" option-label-prop="label" @change="handleChange2">
             <!-- 针对样品名称有相同的情况,做以下更改 -->
             <!-- <a-select-option v-for="d in yangpins" :key="d.sampleName"> -->
-            <a-select-option v-for="d in yangpins" :key="d.key" :label="d.sampleName">
+            <a-select-option v-for="d in yangpins" :key="d.key" :label="d.sampleName" :channel="d">
               <!-- <el-row>
                 <el-col :span="12">{{ d.sampleName }}</el-col>
                 <el-col :span="12">{{ d.sampleModelSpecification }}</el-col>
@@ -222,6 +222,13 @@ export default {
       })
     },
 
+    // 获得选中项信息
+    handleChange2(value,optipn) {
+      console.log(777,value,optipn);
+      const a = optipn.data.attrs.channel
+      console.log(a)
+    },
+
     newMember() {
       this.model.list.push({
         key: this.count + '',