src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
@@ -63,7 +63,8 @@
          <div>
            <div>
              <span>耗材名称:</span>
              <el-select v-model="formTwo.id" filterable placeholder="请选择耗材名称" size="small" style="width: 70%">
              <el-select v-model="formTwo.id" filterable placeholder="请选择耗材名称" size="small" style="width: 70%"
                @change="handleConsumableChange">
                <el-option v-for="(v, i) in consumableOptions" :key="i" :label="v.consumablesName"
                  :value="v.id"></el-option>
              </el-select>
@@ -296,6 +297,11 @@
      console.log(val)
      return this.options.find(item => item.value === val).label
    },
    // 选择耗材名称后,单价自动带出耗材列表里的参考价格(仍可手动修改)
    handleConsumableChange(id) {
      const item = this.consumableOptions.find(v => v.id === id)
      this.formTwo.unitPrice = item && item.referencePrice != null ? item.referencePrice : null
    },
    // 添加表格数据
    addTableData() {
      this.$nextTick()