From 58faef5c48c7491fe14e2a3ec0a0db4dba8967a6 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 23 七月 2024 17:23:49 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |  182 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 156 insertions(+), 26 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index b27d4eb..29fce1b 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -296,10 +296,10 @@
             </el-form-item>
           </el-form>
           <el-button type="primary" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='妫�娴嬩腑蹇�'" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">鏁版嵁閲囬泦</el-button>
-          <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='妫�娴嬩腑蹇�'" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button>
+          <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='妫�娴嬩腑蹇�'&&collected" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button>
         </div>
       </div>
-      <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'">
+      <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'&&tableLists.find(m=>m.templateId==currentTable).templateName!='鐑惊鐜楠屽師濮嬭褰�')">
         <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index">
           <tbody>
             <tr v-for="(m,i) in item.arr" :key="i">
@@ -347,7 +347,6 @@
                       <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value">
                       </el-option>
                     </el-select>
-                    <!-- <el-button type="primary" icon="el-icon-document-copy" size="small" circle title="鏁伴噰" v-if="n.isItADataAcquisitionDevice&&PROJECT=='妫�娴嬩腑蹇�'" @click="getDataAcquisitionDevice(n.v.v)"></el-button> -->
                   </template>
                   <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='瑕佹眰鍊�' && state==1">
                     <span :style="`font-family:${n.v.ff} !important;`">{{getTell(n.i)}}</span>
@@ -407,7 +406,7 @@
           </tbody>
         </table>
       </div>
-      <div v-loading="tableLoading" v-else>
+      <div v-loading="tableLoading" v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'">
         <el-divider></el-divider>
         <h4 style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;">娓╁害寰幆妫�楠屽師濮嬭褰�</h4>
         <el-form :inline="true" :model="wareForm" class="form-inline" label-width="100px" style="justify-content: flex-start;display: flex;align-items: center;width: 100%;">
@@ -567,6 +566,59 @@
             </el-table-column>
            </template>
         </el-table>
+      </div>
+      <div v-loading="tableLoading" v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName=='鐑惊鐜楠屽師濮嬭褰�'">
+        <el-divider></el-divider>
+        <h4 style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;">鐑惊鐜楠屽師濮嬭褰�</h4>
+        <el-form :inline="true" :model="wareForm" class="form-inline" label-width="100px" style="justify-content: flex-start;display: flex;align-items: center;width: 100%;">
+        <el-form-item label="鍨嬪彿:" style="margin-bottom: 0;">
+          <el-input clearable v-model="wareForm0.model" disabled size="small" placeholder=""></el-input>
+        </el-form-item>
+        <el-form-item label="璇曢獙鏂规硶:" style="margin-bottom: 0;">
+          <el-input clearable v-model="wareForm0.methodName" disabled size="small" placeholder=""></el-input>
+        </el-form-item>
+        <el-form-item label="寰幆娆℃暟:" style="margin-bottom: 0;">
+          <el-input-number v-model="thermalCyclingInfo.inspectionItem" :min="1" :max="thermalCyclingInfo.max" label="" style="margin-top:4px" size="small" ></el-input-number>
+        </el-form-item>
+        </el-form>
+        <el-divider></el-divider>
+        <el-form :inline="true" :model="equipForm" label-width="100px" style="justify-content: flex-start;display: flex;align-items: center;width: 100%;">
+          <el-form-item label="浠櫒鍚嶇О:">
+            <el-input clearable v-model="equipForm.value0" disabled size="small" placeholder=""></el-input>
+          </el-form-item>
+          <el-form-item label="浠櫒缂栧彿:">
+            <el-select v-model="equipForm.code0" placeholder="璇烽�夋嫨" size="small">
+              <el-option
+                v-for="item in equipOptions"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="浠櫒鍚嶇О:" >
+            <el-input clearable v-model="equipForm.value1" disabled size="small" placeholder=""></el-input>
+          </el-form-item>
+          <el-form-item label="浠櫒缂栧彿:">
+            <el-select v-model="equipForm.code1" placeholder="璇烽�夋嫨" size="small">
+              <el-option
+                v-for="item in equipOptions"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <table border="1" class="tables" cellpadding="10">
+          <tr v-for="(item,index) in thermalCyclingInfo.arr">
+            <td style="width: 100px;text-align: center;">{{ item }}</td>
+            <td>
+              <el-input clearable size="small" placeholder="娓╁害"></el-input>
+              <el-input clearable size="small" placeholder="鐩存祦鐢甸樆"></el-input>
+            </td>
+          </tr>
+        </table>
       </div>
       <el-upload :action="action"
       :data="{
@@ -844,7 +896,14 @@
         dataAcquisitionInfo:{},
         dataAcquisitionEidt:0,
         dataAcquisitionEidtAble:false,
-        dataAcquisitionLoading:false
+        dataAcquisitionLoading:false,
+        collected:false,
+        // 鐑惊鐜�---寮�濮�
+        thermalCyclingInfo:{
+          max:0,
+          inspectionItem:1,
+          arr:[]
+        }
       }
     },
     computed: {
@@ -947,7 +1006,7 @@
       equipForm:{
         deep:true,
         handler(val){
-          if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'&&this.equipOptions&&this.equipOptions.length>0){
+          if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='鐑惊鐜楠屽師濮嬭褰�')&&this.equipOptions&&this.equipOptions.length>0){
             this.param[this.currentSample.insProduct[0].id].equipValue = []
             this.param[this.currentSample.insProduct[0].id].equipName = []
             if(this.equipForm.code0){
@@ -1026,7 +1085,8 @@
                   })
                   list[index].forEach((n,i)=>{
                     if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('妫�楠屽��')){
-                      if(n.v.ps.value.includes(this.dataAcquisitionInfo.frequency)&&!n.v.ps.value.includes(this.dataAcquisitionInfo.frequency+'0')){
+                      let arr = n.v.ps.value.split('鍊�')
+                      if(arr[1] ==this.dataAcquisitionInfo.frequency){
                         setTimeout(()=>{
                           this.$delete(n.v,'v')
                           this.$set(n.v,'v',this.dataAcquisitionInfo[m.v.m])
@@ -1115,7 +1175,6 @@
         if(this.PROJECT!='妫�娴嬩腑蹇�'||!this.tableLists.find(m=>m.templateId==this.currentTable)||this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'){
           return
         }
-        // this.$refs.wareTableData&&this.$refs.wareTableData.doLayout()
         if(m&&type){
           this.wareForm[type] = m
         }
@@ -1261,6 +1320,18 @@
         this.getEquipOptions(true,this.currentSample.insProduct[0].id)
         // this.$refs.wareTableData&&this.$refs.wareTableData.doLayout()
       },
+      thermalCyclingChange(){
+        // this.wareTableDataLoading = true
+        this.$axios.post(this.$api.insOrderPlan.temCycle,{
+          sampleId:this.currentSample.id,
+          inspectionItem:this.thermalCyclingInfo.inspectionItem
+        }).then(res => {
+          // this.wareTableDataLoading = false
+          if (res.code == 201) return
+          console.log(res.data)
+          this.getEquipOptions(true,this.currentSample.insProduct[0].id)
+        })
+      },
       subOtherForm(m,type){
         let ids = []
         for (let i in this.param) {
@@ -1283,6 +1354,7 @@
         let power = JSON.parse(sessionStorage.getItem('power'))
         let fileDel = false
         let fileAdd = false
+        let collected = false
         for (var i = 0; i < power.length; i++) {
 					if (power[i].menuMethod == 'uploadFile') {
 						fileAdd = true
@@ -1290,11 +1362,15 @@
 					if (power[i].menuMethod == 'delfile') {
 						fileDel = true
 					}
+          if (power[i].menuMethod == 'isItAllowedToModifyTheCollectedValues') {
+						collected = true
+					}
 				}
         if (!fileDel) {
 					this.componentData0.do.splice(1, 1)
 				}
         this.fileAdd = fileAdd
+        this.collected = collected
       },
       async getCurrentProduct(id,type){
         this.tableLoading = true;
@@ -1540,7 +1616,7 @@
         this.excelMethodList = []
         this.widthList = this.tableList[0].style.columnlen;
         // 娓╁害寰幆妫�楠屽師濮嬭褰�--寮�濮�
-        if(this.tableLists.find(m=>m.templateId==this.currentTable)||this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'){
+        if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'){
           let ask = this.currentSample.insProduct[0].ask
           let askList = ask.split(';')
           this.numOptions = []
@@ -1566,6 +1642,19 @@
           this.wareFormChange()
         }
         // 娓╁害寰幆妫�楠屽師濮嬭褰�---缁撴潫
+        // 鐑惊鐜楠屽師濮嬭褰�---寮�濮�
+        if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='鐑惊鐜楠屽師濮嬭褰�'){
+          let ask = this.currentSample.insProduct[0].ask
+          let askList = ask.split(';')
+          this.thermalCyclingInfo.max = Number(askList[askList.length-1])
+          let arr = []
+          for (let i = 0; i < askList.length-1; i++) {
+            arr.push(askList[i].split(',')[0])
+          }
+          this.thermalCyclingInfo.arr = arr;
+          console.log(this.thermalCyclingInfo)
+          this.thermalCyclingChange()
+        }
         this.tableList.forEach(a => {
           let mcList = []
           a.template.forEach(b => {
@@ -1604,22 +1693,44 @@
             if (size1 < size2) {
               let str = ''
               let count4 = 0
+              let isThree = 0
               a.template.forEach(c => {
                 if (b.r === c.r) {
-                  if (c.v.ps != undefined && c.v.ps.value === '妫�楠岄」') {
-                    if (count4 === 0) {
-                      str += c.v.v
-                      count4 += 1
+                  if(c.v.ps != undefined && c.v.ps.value === '妫�楠岄」鍒嗙被'&&count4 === 0){
+                    // 涓夌骇鍒嗙被
+                    isThree = 1
+                  }else if(c.v.ps != undefined && c.v.ps.value === '妫�楠岄」'&&count4 === 0){
+                    // 浜岀骇鍒嗙被
+                    isThree = 0
+                  }
+                  if(isThree==0){
+                    if (c.v.ps != undefined && c.v.ps.value === '妫�楠岄」') {
+                      if (count4 === 0) {
+                        str += c.v.v
+                        count4 += 1
+                      }
+                    } else if (c.v.ps != undefined && c.v.ps.value === '妫�楠屽瓙椤�') {
+                      if (count4 === 1) {
+                        str += c.v.v
+                        count4 += 1
+                      }
                     }
-                  } else if (c.v.ps != undefined && c.v.ps.value === '妫�楠屽瓙椤�') {
-                    if (count4 === 1) {
-                      str += c.v.v
-                      count4 += 1
-                    }
-                  }else if (c.v.ps != undefined && c.v.ps.value === '妫�楠屽瓙瀛愰」'&&this.PROJECT=='瑁呭鐢电紗') {
-                    if (count4 === 2) {
-                      str += c.v.v
-                      count4 += 1
+                  }else if(isThree==1){
+                    if (c.v.ps != undefined && c.v.ps.value === '妫�楠岄」鍒嗙被') {
+                      if (count4 === 0) {
+                        str += c.v.v
+                        count4 += 1
+                      }
+                    }else if (c.v.ps != undefined && c.v.ps.value === '妫�楠岄」') {
+                      if (count4 === 1) {
+                        str += c.v.v
+                        count4 += 1
+                      }
+                    } else if (c.v.ps != undefined && c.v.ps.value === '妫�楠屽瓙椤�') {
+                      if (count4 === 2) {
+                        str += c.v.v
+                        count4 += 1
+                      }
                     }
                   }
                 }
@@ -1627,8 +1738,16 @@
               if (str != '') {
                 let count2 = 0
                 for (let i in this.currentSample.insProduct) {
-                  if (this.currentSample.insProduct[i].templateId === a.templateId && this.currentSample
-                  .insProduct[i].inspectionItem +(this.currentSample.insProduct[i].inspectionItemSubclass == null ? '' : this.currentSample.insProduct[i].inspectionItemSubclass)+(this.currentSample.insProduct[i].inspectionItemClass==null||this.PROJECT!='瑁呭鐢电紗'?'':this.currentSample.insProduct[i].inspectionItemClass) ===
+                  let inspectionItemClass = this.currentSample.insProduct[i].inspectionItemClass==null||this.currentSample.insProduct[i].inspectionItemClass==undefined?'':this.currentSample.insProduct[i].inspectionItemClass
+                  let inspectionItem = this.currentSample
+                  .insProduct[i].inspectionItem==null||this.currentSample
+                  .insProduct[i].inspectionItem==undefined?'':this.currentSample
+                  .insProduct[i].inspectionItem
+                  let inspectionItemSubclass = this.currentSample
+                  .insProduct[i].inspectionItemSubclass==null||this.currentSample
+                  .insProduct[i].inspectionItemSubclass==undefined?'':this.currentSample
+                  .insProduct[i].inspectionItemSubclass
+                  if (this.currentSample.insProduct[i].templateId === a.templateId && inspectionItemClass +inspectionItem+inspectionItemSubclass ===
                     str) {
                     ids.push({
                       r: b.r,
@@ -1863,7 +1982,7 @@
           switch (this.result.method){
             case 'saveInsContext':
               this.$nextTick(()=>{
-                this.$delete(this.tableList[0],'arr')
+                // this.$delete(this.tableList[0],'arr')
                 this.$set(this.tableList[0],'arr',this.result.value.tableList[0].arr)
                 this.param = this.result.value.param
                 for (var i in this.param){
@@ -1875,6 +1994,18 @@
                     }
                   }
                 }
+                // let obj = this.param[code.split('-')[3]]
+                // this.tableList[0].arr.forEach(item=>{
+                //   item.forEach(m=>{
+                //     if(obj&&obj.insResult&&m.c==obj.insResult.c&&m.r==obj.insResult.r){
+                //       m.v.v = obj.insResult.v.v
+                //     }
+                //     if(obj&&obj.resValue&&m.c==obj.resValue.c&&m.r==obj.resValue.r){
+                //       m.v.v = obj.resValue.v.v
+                //     }
+                //   })
+                // })
+                // console.log(this.tableList,this.param)
                 this.saveInsContext()
               })
               break;
@@ -2088,7 +2219,6 @@
               this.equipOptions = res.data.map(m => {
                 m.value = m.managementNumber
                 m.label = m.deviceName
-                m.isItADataAcquisitionDevice = m.isItADataAcquisitionDevice
                 return m
               })
             }

--
Gitblit v1.9.3