From 4c6e3aee72b5d597885d1cfa820ac3c9c57c8b3b Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期二, 04 六月 2024 16:12:14 +0800
Subject: [PATCH] 部分功能小调整

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   76 +++++++++++++++++++++++++++++++++-----
 1 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 391167a..642ba7f 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -120,6 +120,19 @@
   .collection:active {
     opacity: .7;
   }
+  .table_caret{
+    font-size: 16px;
+    margin: 0 5px;
+    color: rgba(0, 0, 0, 0.1);
+  }
+  .table_caret:hover{
+    color: #409eff;
+    cursor: pointer;
+  }
+
+  .table_caret:active{
+    opacity: .8;
+  }
 </style>
 <style>
   .inspection .el-form-item__label {
@@ -285,6 +298,16 @@
                     </el-select> -->
                     <span :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span>
                   </template>
+                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏍峰搧缂栧彿'">
+                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
+                      <i class="el-icon-caret-left table_caret" @click="caretSample(-1)"></i>
+                      <div :style="`font-family:${n.v.ff} !important;`">{{currentSample.sampleCode}}</div>
+                      <i class="el-icon-caret-right table_caret" @click="caretSample(1)"></i>
+                    </div>
+                  </template>
+                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏍峰搧鍨嬪彿'">
+                    <div :style="`font-family:${n.v.ff} !important;`" v-if="currentSample.model!==undefined&&currentSample.model!==null">{{currentSample.model}}</div>
+                  </template>
                   <span v-else :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span>
                 </div>
               </td>
@@ -325,9 +348,9 @@
         :current-row-key="currentKey" :row-key="record=>record.index" v-if="bushingVisible">
         <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()">
         </el-table-column>
-        <el-table-column prop="color" label="绠¤壊鏍�" min-width="110px" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="num2" label="鏍囬噺" min-width="110px" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="num3" label="娴嬭瘯閲�" min-width="90px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="color" label="绠¤壊鏍�" min-width="100px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="standNum" label="鏍囬噺" min-width="100px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="testNum" label="娴嬭瘯閲�" min-width="100px" show-overflow-tooltip></el-table-column>
       </el-table>
     </el-drawer>
     <el-drawer title="鏍峰搧鍒囨崲" :visible.sync="sampleVisible" :size="500">
@@ -393,9 +416,6 @@
 </template>
 
 <script>
-  import {
-    set
-  } from 'shelljs';
   import ValueTable from '../../tool/value-table.vue'
   export default {
     props: ['sonLaboratory', 'orderId', 'state'],
@@ -501,7 +521,7 @@
             }
           })
           this.sampleProduct = res.data.sampleProduct
-          this.currentSample = this.sampleProduct[0]
+          this.currentSample = this.HaveJson(this.sampleProduct[0])
           this.currentSample.insProduct.forEach(a => {
             this.param[a.id] = {
               insValue: [],
@@ -513,6 +533,7 @@
             }
           })
           if (this.currentSample.index == undefined) this.currentSample['index'] = 1
+          let bushing = this.currentSample.bushing
           this.loading = false
           // this.handleTableData()
           this.getTableLists();
@@ -526,6 +547,9 @@
           this.currentFiberOptic = null;
           this.bushing = []
           this.currentBushing = null;
+          if(bushing&&bushing.length>0){
+            this.bushing = bushing
+          }
         })
       },
       currentTable(val1, val0) {
@@ -596,7 +620,6 @@
         this.currentKey = row.index
       },
       handleChangeSample(row, column, event) {
-        this.currentSample = row;
         this.param = {}
         // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁
         this.fiberOpticTape = []
@@ -605,7 +628,7 @@
         this.currentFiberOptic = null;
         this.bushing = []
         this.currentBushing = null;
-
+        this.currentSample = this.HaveJson(row)
         this.currentSample.insProduct.forEach(a => {
           this.param[a.id] = {
             insValue: [],
@@ -616,7 +639,7 @@
             insResult: null
           }
         })
-        let bushing = this.currentSample.insProduct.bushing
+        let bushing = this.currentSample.bushing
         if(bushing&&bushing.length>0){
           this.bushing = bushing
         }
@@ -733,6 +756,7 @@
           this.tableList = null;
           this.tableList = [this.tableLists[0]]
           this.currentTable = this.tableLists[0].templateId;
+          this.currentSample.insProduct = this.HaveJson(obj.productList)
           this.handleTableData()
         }
       },
@@ -1024,6 +1048,15 @@
                     return res < m.split('<')[1]
                   }else if (m.includes('>')) {
                     return res > m.split('>')[1]
+                  }else if (m.includes('~')) {
+                    let k = m.split('~')
+                    return res >= k[0] && res <= k[1]
+                  }else if(m.includes('-')){
+                    let k = m.split('-')
+                    return res >= k[0] && res <= k[1]
+                  }else if(m.includes('卤')){
+                    let k = m.split('卤')
+                    return res >= (k[0] - k[1]) && res <= (k[0] + k[1])
                   }
                 })
                 if(this.getInspectionValueType(item.i)==1){
@@ -1439,6 +1472,29 @@
         nav.addEventListener("mouseleave", function(event) {
           flag = false;
         });
+      },
+      caretSample(num){
+        let index = this.currentKey + num
+        if(index < 1){
+          this.$message.error('褰撳墠鏄涓�涓牱鍝�')
+          return
+        } else if(index > this.sampleProduct.length){
+          this.$message.error('褰撳墠鏄渶鍚庝竴涓牱鍝�')
+          return
+        }
+        this.currentKey = index
+        this.currentSample = this.HaveJson(this.sampleProduct[index - 1])
+        this.currentSample.insProduct.forEach(a => {
+          this.param[a.id] = {
+            insValue: [],
+            comValue: [],
+            resValue: null,
+            equipValue: [],
+            equipName: [],
+            insResult: null
+          }
+        })
+        this.getTableLists()
       }
     }
   }

--
Gitblit v1.9.3