licp
2024-04-17 dff404a76987de5b632ae635a6dea6c95dc37a4d
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1,4 +1,13 @@
<style scoped>
  .inspection {
    height: 100%;
    overflow-y: auto;
  }
  .inspection::-webkit-scrollbar {
    width: 0;
  }
   .title {
      height: 60px;
      line-height: 60px;
@@ -18,11 +27,11 @@
   .center {
      width: calc(100% - 40px);
      max-height: 580px;
    /* max-height: 580px; */
      background-color: #fff;
      border-radius: 3px;
      padding: 20px;
    overflow-y: auto;
    overflow: auto;
   }
   .center-box {
@@ -118,7 +127,7 @@
   }
</style>
<template>
   <div v-loading="loading">
  <div v-loading="loading" class="inspection">
      <el-row class="title">
         <el-col :span="12" style="padding-left: 20px;">检验单详情</el-col>
         <el-col :span="12" style="text-align: right;">
@@ -175,7 +184,8 @@
                                 @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
                              <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
                                 :autosize="{ minRows: 1}" v-model="n.v.v" :disabled="state>1" />
                              <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" :disabled="state>1">
                    <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v"
                      :disabled="state>1">
                                 <el-option label="是" value="是"></el-option>
                                 <el-option label="否" value="否"></el-option>
                              </el-select>
@@ -192,12 +202,9 @@
                              <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span>
                           </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='设备'">
                              <el-select v-model="n.v.v" placeholder="请选择" @visible-change="e=>getEquipOptions(e,n.i)" :disabled="state>1">
                      <el-option
                        v-for="item in equipOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.label">
                    <el-select v-model="n.v.v" placeholder="请选择" @visible-change="e=>getEquipOptions(e,n.i)"
                      :disabled="state>1">
                      <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.label">
                      </el-option>
                    </el-select>
                           </template>
@@ -245,7 +252,8 @@
         <div class="body" style="display: flex;" v-if="reviewDia">
            <div class="search_label" style="width: 120px;"><span class="required-span">* </span>不通过原因:</div>
            <div class="search_input">
               <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 3, maxRows: 5}"></el-input>
          <el-input size="small" clearable v-model="noReason" type="textarea"
            :autosize="{ minRows: 3, maxRows: 5}"></el-input>
            </div>
         </div>
         <span slot="footer" class="dialog-footer">
@@ -439,7 +447,7 @@
            this.tableList = JSON.parse(JSON.stringify(this.currentSample.insProduct)).filter(m => {
               let num0 = mySet1.size;
               mySet1.add(JSON.stringify({
                  inspectionItem: m.inspectionItem,
            template: m.template,
                  templateId: m.templateId
               }))
               let num1 = mySet1.size;
@@ -451,17 +459,27 @@
               let dels = []
               let ids = []
          a.template.forEach(b => {
             if (b.v.ps != undefined && b.v.ps.value === '检验子项') {
            if (b.v.ps != undefined && b.v.ps.value === '检验项') {
                let count = 0
                for (let i in this.currentSample.insProduct) {
                   if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
                      .insProduct[i].templateId === a.templateId) {
                if (this.currentSample.insProduct[i].templateId === a.templateId && this.currentSample.insProduct[i].inspectionItem === b.v.v) {
                  let count2 = 0
                  for (var c in a.template) {
                    if (a.template[c].r === b.r && a.template[c].v.ps != undefined && a.template[c].v.ps.value === '检验子项') {
                      if(this.currentSample.insProduct[i].inspectionItemSubclass === a.template[c].v.v){
                      ids.push({
                         r: b.r,
                         id: this.currentSample.insProduct[i].id,
                         product: this.currentSample.insProduct[i]
                      })
                      break
                      }
                    }
                    count2++
                  }
                  if (count2 < a.template.length) {
                    break
                  }
                   }
                   count++
                }
@@ -544,7 +562,8 @@
              }
                     conclusionList.forEach((n,i)=>{
                if(n.r==b.r&&n.c==b.c){
                  b.v.f = `(${this.comparisonList.find(j=>j.value==(finalList[i].c)).label}${finalList[i].r+1})`
                  b.v.f =
                    `(${this.comparisonList.find(j=>j.value==(finalList[i].c)).label}${finalList[i].r+1})`
                }
              })
                  }
@@ -598,8 +617,7 @@
               try{
                 this.param[a.id].resValue.v.v = a.lastValue
                 this.param[a.id].insResult.v.v = a.insResult
               }catch(e){
               }
          } catch (e) {}
            })
            this.handleExcelMethod()
         },
@@ -818,7 +836,9 @@
      getEquipOptions(e,id){
        if(e){
          let category = this.currentSample.insProduct.find(m=>m.id==id).deviceGroup
          this.$axios.post(this.$api.deviceScope.selectDeviceByCategory, {category}).then(res => {
          this.$axios.post(this.$api.deviceScope.selectDeviceByCategory, {
            category
          }).then(res => {
            if (res.code === 200 && res.data) {
              this.equipOptions = res.data.map(m=>{
                m.value = m.id