From dd6aa18a74f7c47d816ae57be4667274a48ebee3 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 09 八月 2024 09:29:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/components/do/b1-ins-order/add.vue                 |   12 ++-
 src/components/tool/value-table.vue                    |   25 ++++----
 src/main.js                                            |    2 
 src/components/do/b1-inspect-order-plan/Inspection.vue |   26 ++++----
 src/components/do/b1-ins-order/fiberoptic-config.vue   |   59 +++++++++----------
 src/components/view/b1-inspection-order.vue            |   16 ++--
 6 files changed, 71 insertions(+), 69 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 548df9e..f383120 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -1600,10 +1600,8 @@
             }
           }
 
-          console.log('isHaveBushing===', this.totalArr)
-          // inspectionItem
-          let spcialItem = null//this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�'))
-          // console.log('isHaveBushing===', isHaveBushing)
+          // console.log('isHaveBushing===', this.totalArr)
+          let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�'))
           if (productListSelected && select[2] === '鍏夌紗' && isHaveBushing === false) {
             this.$message.error('鍏夌紗娓╁害寰幆椤圭洰蹇呴』杩涜鍏夌氦閰嶇疆')
             this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
@@ -2442,6 +2440,11 @@
         this.$axios.post(this.$api.insOrder.selectInsOrderTemplateById + '?id=' + e).then(res => {
           if (res.code == 201) return
           let obj = JSON.parse(res.data)
+          console.log(obj);
+          //鍒跺崟浜鸿缃负褰撳墠鐧诲綍鐢ㄦ埛
+          let user = JSON.parse(localStorage.getItem('user'))
+          obj.addObj.custom = user.name
+          obj.addObj.userId = user.userId
           this.addObj = obj.addObj;
           this.sampleList = obj.sampleList;
           this.selectTree = obj.selectTree
@@ -2997,7 +3000,6 @@
       getTotal() {
         this.totalArr = []
         this.total = 0;
-        // console.log(this.sampleList)
         this.sampleList.forEach(item => {
           if (item.insProduct && item.insProduct.length > 0) {
             item.insProduct.forEach(a => {
diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 99b9bed..6ffdb00 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -134,7 +134,7 @@
               <div class="search-item" style="width: 50%;margin-right: 16px;">
                 <label style="width: 80px;">绾ゅ甫绫诲瀷</label>
                 <el-select v-model="miresModel" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"
-                  
+
                   >
                   <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value">
                   </el-option>
@@ -476,7 +476,7 @@
               this.fiberList.push(b)
             })
             }
-            
+
           }else{
             this.fiberList = []
             a.fiber.forEach(b=>{
@@ -485,7 +485,7 @@
           }
         })
       }
-      
+
       this.getTypeDicts1()
       this.getStandTreeBySampleType()
       this.getStandTreeBySampleType2()
@@ -514,7 +514,7 @@
               }
             })
           })
-          
+
       }
       if(this.detectionItems.type == 0) {
         // 璧嬪�兼娴嬮」淇℃伅 鍏夌氦
@@ -527,7 +527,8 @@
             })
           })
 
-          if(this.multiFiberList.length == 1) {
+          // 閫夋嫨鐨勬椂鍊欏氨灏唂iberList鐨勫�艰祴鍊肩粰瀵瑰簲鐨刦iberList
+          if(this.multiFiberList.length > 0) {
             this.multiFiberList.forEach(item => {
             this.fibersList.forEach(a => {
               if(a.ident == item.ident){
@@ -535,10 +536,6 @@
               }
             })
           })
-          }else if(this.multiFiberList.length > 1) {
-            this.fibersList.forEach(item => {
-              item.fiber = this.fiberList
-            })
           }
         }
       },
@@ -587,7 +584,7 @@
       },
       // 濂楃妫�娴嬮噺璧嬪��
       addTestNum() {
-        
+
         if(parseInt(this.packageInfo.testNum) > parseInt(this.packageInfo.standNum)) {
           this.packageInfo.testNum = this.packageInfo.standNum
           this.$message.error('妫�娴嬮噺涓嶈兘澶т簬鏍囧噯閲�')
@@ -606,7 +603,7 @@
         this.fiberList = []
         this.fibersList = []
         this.detectionItems = []
-        
+
         // 椤甸潰鏄惁鍚湁鍏夌氦甯�
         if(this.packageInfo.ismiers) {
           // 鍏ㄦ
@@ -649,8 +646,8 @@
           }
         }
 
-        
-        
+
+
       },
       upNum() {
         this.fiberList = []
@@ -711,7 +708,7 @@
                 }
                 a.fibers.push(fibers)
                 this.fibersList.push(fibers)
-              } 
+              }
         })
       } else {
           this.bushing = []
@@ -785,7 +782,7 @@
         //     this.addFiber()
         //   }, 200)
         // })
-        
+
           // 灏嗕笅鎷夋鍊艰祴鍊肩粰鍏夌氦  鐩戝惉鍘婚櫎
           if(this.selectFiberList.length == 0) {
             this.$message.error('璇烽�夋嫨鏁版嵁')
@@ -822,7 +819,7 @@
           this.detectionType = 0
            this.$set(this.detectionItems,'type',0)
           }
-          
+
         })
       },
       methodChange2(val) {
@@ -919,7 +916,7 @@
                 fibersIdent: a.ident,
                 productList: []
               }
-              this.fiberList.push(fiber) 
+              this.fiberList.push(fiber)
             }
           })
         } else {
@@ -940,7 +937,7 @@
           })
         }
       }else {
-        this.fiberList = [] 
+        this.fiberList = []
         let flag = true
         // 鎸夌収椤哄簭鐢熸垚鍏夌氦鑹叉爣
         let colors2 = []
@@ -982,7 +979,7 @@
         //   this.$message.error('鏈�夋嫨濂楃')
         //   return
         // }
-        // this.fiberList = [] 
+        // this.fiberList = []
         // let flag = true
         // // 鎸夌収椤哄簭鐢熸垚鍏夌氦鑹叉爣
         // let colors2 = []
@@ -1191,11 +1188,11 @@
               let product =  JSON.parse(JSON.stringify(row.productList))
               setTimeout(() => {
                 product.forEach(p => {
-                let rowToSelect = this.detectionItems.find(item => item.id === p.id);  
-                if (rowToSelect) {  
+                let rowToSelect = this.detectionItems.find(item => item.id === p.id);
+                if (rowToSelect) {
                   this.toggleSelection(rowToSelect);
                 }
-              });  
+              });
             },200)
             }
           }
@@ -1216,7 +1213,7 @@
         }
         this.$axios.post(this.$api.standardTree.selectStandardProductList, {
           model: this.mireModel.split(' - ')[1],
-          standardMethodListId: this.mireStandard,  
+          standardMethodListId: this.mireStandard,
           factory: ''
         }, {
           headers: {
@@ -1231,16 +1228,16 @@
           this.detectionItems = res.data
           this.detectionType = 0
           this.$set(this.detectionItems,'type',0)
-         
-          if (row.productList != null && row.productList.length > 0) { 
-            let product =  JSON.parse(JSON.stringify(row.productList)) 
+
+          if (row.productList != null && row.productList.length > 0) {
+            let product =  JSON.parse(JSON.stringify(row.productList))
             setTimeout(() => {
-              product.forEach(p => {  
-                let rowToSelect = this.detectionItems.find(item => item.id === p.id);  
-                if (rowToSelect) {  
+              product.forEach(p => {
+                let rowToSelect = this.detectionItems.find(item => item.id === p.id);
+                if (rowToSelect) {
                   this.toggleSelection(rowToSelect);
-                }  
-              });  
+                }
+              });
             },200)
             }
           }
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index fa001fe..c454335 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1150,16 +1150,16 @@
         })
       },
       currentTable(val1, val0) {
-        if(val0 !=null && val1 != val0){
-        if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){
-          if(this.casing.length>0){
-            this.handleChange(this.casing[0].id,3)
+        if (val0 != null && val1 != val0) {
+          if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){
+            if(this.casing.length>0){
+              this.handleChange(this.casing[0].id,3)
+            }
+            return
           }
-          return
-        }
-        if(this.changeType && this.changeType>0){
-          return
-        }
+          if(this.changeType&&this.changeType>0){
+            return
+          }
           this.tableLists.forEach(async (m, i) => {
             if (m.templateId == val1) {
               let list = await this.getCurrentProduct(this.currentSample.id,0)
@@ -1203,7 +1203,6 @@
               }
             }
           })
-          this.handleCasing()
         }
       },
       equipForm:{
@@ -2116,7 +2115,7 @@
         })
       },
       async handleChange(m,type){
-        this.changeType = type;
+        this.changeType = type
         if(m){
           let list = await this.getCurrentProduct(m,type)
           if(list.length>0){
@@ -2677,16 +2676,19 @@
             this.tableList[0].arr.forEach(item=>{
               item.forEach(m=>{
                 if(m.i==pId&&m.v.ps&&m.v.ps.value=='缁撹'){
-                    this.$set(m.v,'v',3)
+                  this.$set(m.v,'v',3)
                 }
               })
             })
             if(this.param[pId].insResult&&this.param[pId].insResult.v){
+              this.param[pId].insResult.v.v = 3
             }
             this.saveInsContext()
             return
           }
         }
+        // this.currentTable.
+        // if(!this.param[pId].equipValue||this.param[pId].equipValue.length==0||!this.param[pId].equipValue[0].v.v){}
         if (n) {
           // if (this.PROJECT === '瑁呭鐢电紗') {
           //   let num2 = new this.$Big(n.v.v)
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index d9df2a2..200cd41 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -124,17 +124,17 @@
         <el-table-column type="index" align="center" label="搴忓彿" :width="selectionWidth" v-if="data.isIndex" :key="Math.random()">
         </el-table-column>
         <el-table-column :prop="a.label" :label="a.value" :sortable="a.sort === 'custom' ? 'custom' : false" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero"
-          v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
+          v-for="(a, ai) in tableHead" :key="ai+'bbbbb'" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
           <template slot-scope="scope">
             <div v-if="showType(a.label, data.tagField) != null">
               <template v-if="typeof(scope.row[a.label]) == 'object'">
                 <template v-for="(param, i) in scope.row[a.label]">
-                  <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi" v-if="b.value == param"
+                  <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi+'cccc'" v-if="b.value == param"
                     :type="b.type" size="medium" style="margin-right: 5px;">{{b.label}}</el-tag>
                 </template>
               </template>
               <template v-else>
-                <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi" v-if="b.value == scope.row[a.label]"
+                <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi+'ddddd'" v-show="b.value == scope.row[a.label]"
                   :type="b.type" size="medium">{{b.label}}</el-tag>
               </template>
             </div>
@@ -148,7 +148,8 @@
         </el-table-column>
         <el-table-column fixed="right" align="center" label="鎿嶄綔" :width="getWidth()" v-if="data.do.length > 0">
           <template slot-scope="scope">
-            <el-button v-for="(a, ai) in data.do" :key="ai" :type="a.type"
+            <el-button v-for="(a, ai) in data.do" :key="ai
+            +'qqqq'" :type="a.type"
               :disabled="a.disabFun ? a.disabFun(scope.row,scope.$index) : false" @click="main(scope.row, a)"
               class="handleBtn">
               <span v-if="a.type!='upload'">{{a.font}}</span>
@@ -172,7 +173,7 @@
     <el-dialog title="缂栬緫" :visible.sync="upDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body>
       <div class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
-          <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
+          <div v-for="(a, ai) in upHead" :key="ai+'ffff'" style="line-height: 50px;">
             <el-col :span="6/data.row" style="text-align: right;" :offset="1">
               <span class="required-span" v-if="showUpReq(a.label)">* </span>{{a.value}}锛�
             </el-col>
@@ -183,7 +184,7 @@
               <el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small"
                 v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)"
                 clearable filterable>
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'eeeee'" :value="b.value"
                   :label="b.label">
                 </el-option>
               </el-select>
@@ -204,7 +205,7 @@
           </div>
         </div>
         <div v-else>
-          <el-row v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
+          <el-row v-for="(a, ai) in upHead" :key="ai+'ggggg'" style="line-height: 50px;">
             <el-col :span="6" style="text-align: right;">
               <span class="required-span" v-if="showUpReq(a.label)">* </span>{{a.value}}锛�
             </el-col>
@@ -215,7 +216,7 @@
               <el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small"
                 v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)"
                 clearable filterable>
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'fffff'" :value="b.value"
                   :label="b.label"></el-option>
               </el-select>
               <el-upload :action="javaApi+data.addUploadConfig.url" v-if="showUpload(a.label)" :multiple="false"
@@ -241,7 +242,7 @@
     <el-dialog title="鏂板" :visible.sync="addDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body>
       <div class="body" v-if="addDia" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
-          <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
+          <div v-for="(a, ai) in upHead" :key="ai+'yyyyy'" style="line-height: 50px;">
             <el-col :span="6/data.row" style="text-align: right;" :offset="1"><span class="required-span"
                 v-if="showAddReq(a.label)">*
               </span>{{a.value}}锛�</el-col>
@@ -251,7 +252,7 @@
               <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null"
               :multiple="data.selectField[a.label].choose"
                 style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable filterable>
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'hhhh'" :value="b.value"
                   :label="b.label"></el-option>
               </el-select>
               <el-upload :action="javaApi+data.addUploadConfig.url" v-if="showUpload(a.label)"
@@ -270,7 +271,7 @@
           </div>
         </div>
         <div v-else>
-          <el-row v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
+          <el-row v-for="(a, ai) in upHead" :key="ai+'jjjjj'" style="line-height: 50px;">
             <el-col :span="6" style="text-align: right;"><span class="required-span" v-if="showAddReq(a.label)">*
               </span>{{a.value}}锛�</el-col>
             <el-col :span="16" :offset="1">
@@ -279,7 +280,7 @@
               <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null"
               :multiple="data.selectField[a.label].choose"
                 style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable>
-                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
+                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'mmmmmm'" :value="b.value"
                   :label="b.label"></el-option>
               </el-select>
               <el-upload :action="javaApi+data.addUploadConfig.url" v-if="showUpload(a.label)"
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 3aee027..9dc3b69 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -234,12 +234,11 @@
 			</div>
 			<div class="table">
 				<ul class="tab">
-					<li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
+					<li v-for="(m,i) in tabList" :key="i+'afgh'" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
 				</ul>
 				<ValueTable :style="getStyle()" ref="ValueTable"
-                    :isColumnWidth="true"
                     :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData"
-					:key="'b'+upIndex"  />
+                    :upIndex="upIndex"  />
 			</div>
 			<!-- 瀹℃牳 -->
 			<el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose">
@@ -297,7 +296,7 @@
 							<div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>鎸囨淳浜哄憳锛�</div>
 							<div class="search_input">
 								<el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable @change="changeUser">
-									<el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
+									<el-option v-for="(item,i) in personList" :key="i+'gbnm.'" :label="item.label" :value="item.value">
 									</el-option>
 								</el-select>
 							</div>
@@ -306,7 +305,7 @@
 							<div class="search_label"><span class="required-span" >* </span>璇曢獙瀹わ細</div>
 							<div class="search_input">
 								<el-select v-model="distributeData.sonLaboratory" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable>
-									<el-option v-for="(item,i) in sonLaboratoryList" :key="i" :label="item.label" :value="item.value">
+									<el-option v-for="(item,i) in sonLaboratoryList" :key="i+'oooo'" :label="item.label" :value="item.value">
 									</el-option>
 								</el-select>
 							</div>
@@ -351,7 +350,7 @@
           v-model="checkAll"
           @change="handleCheckAllChange">鍏ㄩ��</el-checkbox>
           <el-checkbox-group @change="changePrintCode()" v-model="checkIndexList">
-            <el-card class="box-card" v-for="(item, i) in qrData" :key="i" style="margin-bottom: 15px; font-size: 16px !important;">
+            <el-card class="box-card" v-for="(item, i) in qrData" :key="i+'wwwww'" style="margin-bottom: 15px; font-size: 16px !important;">
                   <el-checkbox :label="i" :key="i" style="position: relative;top:-20px;left:5px"><br></el-checkbox>
                    <div>
                     <el-row style="font-size: 14px;padding-left: 20px;">
@@ -402,7 +401,7 @@
     </el-dialog>
     <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
         <div id="printMOrder" class="printMOrder" ref="printMOrder">
-          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
+          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i+'uuuuu'" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
             <div style="display: flex;">
               <div>
                 <el-col :span="10" :offset="2">
@@ -1120,7 +1119,8 @@
 			handleTab(m, i) {
 				this.tabIndex = i;
 				this.componentData.entity.state = m.value
-				this.refreshTable()
+				this.refreshTable('page')
+        this.upIndex++
 			},
 			getUserMenu() {
 				this.$axios.get(this.$api.user.getUserMenu).then(res => {
diff --git a/src/main.js b/src/main.js
index ddc5532..c3b1ea1 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,7 +20,7 @@
 //鏈湴
 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
 // const javaApi = 'http://127.0.0.1:8001';
-const javaApi = 'http://192.168.92.249:8001';
+const javaApi = 'http://192.168.0.104:8001';
 //浜�
 // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
 // const javaApi = 'http://114.132.189.42:1234';

--
Gitblit v1.9.3