小小儁爺
2026-01-22 519f571634e66a541a40cf9694d933552a0f3802
src/views/qualityManager/processCheck.vue
@@ -74,7 +74,21 @@
          </div>
        </div>
        <div class="content2" style="width: 60%;margin-left: 30px;">
          <div class="orderMsg">方案名称:{{ form.checkstandname }}</div>
          <div class="orderMsg">方案名称:
            <el-select
              v-model="form.checkstandcode"
              placeholder="请选择"
              @change="selectChange"
            >
              <el-option
                v-for="item in checkstandArr"
                :key="item.checkstandcode"
                :label="item.checkstandname"
                :value="item.checkstandcode"
              />
            </el-select>
          </div>
          <!--          <div class="orderMsg">方案名称:{{ form.checkstandname }}</div>-->
          <div class="orderMsg">抽样方式:{{
            form.sampmethod === 'FIXED' ? '固时抽检' : form.sampmethod === 'SCARE' ? '比例抽检' : ''
          }}
@@ -307,7 +321,9 @@
      stepActive: 0, // 当前处于第几件
      checkItemArr: [],
      check_result: ''
      check_result: '',
      checkstandArr: []
    }
  },
@@ -344,6 +360,18 @@
    this.getFocus()
  },
  methods: {
    // 下拉切换
    async  selectChange(val) {
      this.stepActive = 0
      const t = this.checkstandArr.find(i => i.checkstandcode === val)
      this.form.sampmethod = t.sampmethod
      this.form.sampscare = t.sampmethod === 'FIXED' ? t.sampscare : Math.ceil(this
        .form.good_qty * t.sampscare / 100)
      this.form.sampscare = this.form.sampscare <= this.form.good_qty ? this.form.sampscare : this.form.good_qty
      await this.getMesOrderStepCheckItemList()
    },
    // 获取聚焦
    getFocus() {
      this.$nextTick(() => {
@@ -365,6 +393,8 @@
      this.form.stepname = res.labcont[0].stepname
      this.form.good_qty = res.labcont[0].good_qty
      this.checkstandArr = res.chekstand
      this.form.checkstandcode = res.chekstand[0].checkstandcode
      this.form.checkstandname = res.chekstand[0].checkstandname
      this.form.sampmethod = res.chekstand[0].sampmethod