From 25d10ee678644a6283454ca486d74a938eeccfd1 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 05 十二月 2024 16:50:45 +0800
Subject: [PATCH] Merge branch 'cnas' into master

---
 src/components/do/b1-inspect-order-plan/circuit-parameters1.vue |   11 ++
 src/components/do/b1-inspect-order-plan/circuit-parameters2.vue |   11 ++
 src/main.js                                                     |    2 
 src/components/do/b1-inspect-order-plan/Inspection.vue          |   41 +++++--
 package.json                                                    |    1 
 src/components/view/b1-inspect-order-plan.vue                   |   48 ++++++++-
 src/components/view/b1-sample.vue                               |   53 ++++++++--
 src/components/view/b1-inspection-order.vue                     |   96 ++++++++++--------
 src/view/index.vue                                              |    8 +
 src/components/view/index-index.vue                             |   15 +-
 10 files changed, 202 insertions(+), 84 deletions(-)

diff --git a/package.json b/package.json
index b630f65..adfde49 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
     "vue-axios": "^3.2.4",
     "vue-canvas-poster": "^1.2.1",
     "vue-qr": "^3.2.4",
+    "vue-qrcode-reader": "^5.5.11",
     "vue-router": "^3.0.1",
     "vuedraggable": "^2.24.3",
     "wangeditor": "^4.7.15",
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 32ee71d..b04a320 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -277,10 +277,11 @@
         <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
           :loading="submitLoading">鎻愪氦</el-button>
         <!-- 澶嶆牳 -->
-        <el-button size="small" type="primary" @click="upInsReview(1,'缁х画璇曢獙')" :loading="reviewLoading"
-          v-if="state>1&&!isLook">缁х画璇曢獙</el-button>
+        <!-- <el-button size="small" type="primary" @click="upInsReview(1,'缁х画璇曢獙')" :loading="reviewLoading"
+          v-if="state>1&&!isLook">缁х画娴嬭瘯涓嬩竴涓牱鍝�</el-button>
         <el-button size="small" @click="upInsReview(0,'鍐嶆璇曢獙')" v-if="state>1&&!isLook" type="danger">鍐嶆璇曢獙</el-button>
-        <el-button size="small" @click="upInsReview(2,'缁撴潫璇曢獙')" v-if="state>1&&!isLook">缁撴潫璇曢獙</el-button>
+        <el-button size="small" @click="upInsReview(2,'缁撴潫璇曢獙')" v-if="state>1&&!isLook">姝ゅ鎵樺崟缁撴潫</el-button> -->
+        <el-button size="small" type="primary" @click="upInsReviewDia=true" v-if="state>1&&!isLook">澶嶆牳</el-button>
         <el-button size="small" @click="handleBack" v-if="!noBack">杩斿洖</el-button>
       </el-col>
     </el-row>
@@ -940,6 +941,18 @@
         <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">纭� 瀹�</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="澶嶆牳" :visible.sync="upInsReviewDia" width="400px">
+      <el-radio-group v-model="upInsReviewType" style="display: flex;flex-direction: column">
+        <el-radio :label="1" style="margin: 10px 0; ">缁х画娴嬭瘯涓嬩竴涓牱鍝佹垨鍏朵粬绔欑偣浠诲姟</el-radio>
+        <el-radio :label="0" style="margin: 10px 0; ">鍐嶆妫�楠岃鏍峰搧</el-radio>
+        <el-radio :label="2" style="margin: 10px 0; ">姝ゅ鎵樺崟缁撴潫</el-radio>
+        <p style="font-size: 12px;color:red">鎱庨噸锛氬鏋滆繕鏈夊叾浠栨牱鍝佸湪妫�锛岀偣鍑荤粨鏉熷彲鑳戒細涓柇锛岃纭繚鎵�鏈夋牱鍝侀兘妫�楠屼笖澶嶆牳瀹屾垚鍐嶇偣鍑�</p>
+      </el-radio-group>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="upInsReviewDia = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="upInsReview" :loading="reviewLoading">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -967,6 +980,8 @@
         lookFileVisible:false,//棰勮鏂囦欢
         experimentDia:false,
         experimentDia0:false,
+        upInsReviewDia:false,
+        upInsReviewType:1,
         experimentInfo:{
           note:'',
           term:''
@@ -3224,23 +3239,19 @@
         })
       },
       // 澶嶆牳
-      upInsReview(e,type) {
-        this.$confirm(type=='缁撴潫璇曢獙'?'纭缁撴潫璇曢獙锛熺‘瀹氬悗姝ゅ鎵樺崟鍋滄璇曢獙锛屽苟涓旀棤娉曞啀娆℃楠岋紒':`鏄惁${type}?`, "鎻愮ず", {
-          confirmButtonText: "纭畾",
-          cancelButtonText: "鍙栨秷",
-          type: "warning"
-        }).then(() => {
-          if (e == 1||e==2) {
+      upInsReview() {
+        if (this.upInsReviewType == 1||this.upInsReviewType==2) {
           // 缁х画璇曢獙
           this.reviewLoading = true;
           this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
             sampleId: this.orderId,
-            type: e,
+            type: this.upInsReviewType,
             laboratory: this.sonLaboratory,
             tell: null
           }).then(res => {
             if (res.code === 200) {
               this.$message.success("鎿嶄綔鎴愬姛")
+              this.upInsReviewDia = false;
               this.$emit('goback')
             }
             this.reviewLoading = false;
@@ -3252,7 +3263,6 @@
           // 鍐嶆璇曢獙
           this.reviewDia = true;
         }
-        })
       },
       handleReviewDia() {
         if (this.noReason) {
@@ -3315,6 +3325,9 @@
         }
         if(!this.otherForm.humidity){
           this.$message.error('璇疯緭鍏ユ箍搴�')
+          return
+        }
+        if(this.sonLaboratory === '鐢佃矾璇曢獙'&&!this.$refs.CircuitParameters.saveAll()){
           return
         }
         this.experimentDia = true
@@ -3820,7 +3833,9 @@
             cancelButtonText: '鍙栨秷',
             type: 'warning'
           }).then(() => {
-            this.$emit('goback')
+            if(this.$refs.CircuitParameters.saveAll()){
+              this.$emit('goback')
+            }
           })
         }else{
           this.$emit('goback')
diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
index b58a998..6c61c11 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -797,6 +797,17 @@
         console.log(err)
       })
     },
+    saveAll(){
+      if(this.allBandList.find(m=>!m.band)){
+        this.$message.error('璇峰厛濉啓棰戞')
+        return false
+      }else{
+        this.allBandList.forEach((h,j)=>{
+          this.save(h,j)
+        })
+        return true
+      }
+    },
     // 鏇存柊妯℃澘
     upTemplate(obj){
       this.upTemplateState = true;
diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
index 4e84e59..6cb01b7 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -673,6 +673,17 @@
         console.log(err)
       })
     },
+    saveAll(){
+      if(this.allBandList.find(m=>!m.band)){
+        this.$message.error('璇峰厛濉啓棰戞')
+        return false
+      }else{
+        this.allBandList.forEach((h,j)=>{
+          this.save(h,j)
+        })
+        return true
+      }
+    },
     // 鏇存柊妯℃澘
     upTemplate(obj){
       this.upTemplateState = true;
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index 0a3f2cf..2e0232d 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -332,7 +332,7 @@
 		<div style="width: 100%;height: 100%;" v-if="activeFace >0">
 			<Add :active="activeFace" :currentId="currentId" :examine="examine"/>
 		</div>
-    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" />
+    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" ref="Inspection" />
       <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="80%">
 				<div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
 					<ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
@@ -391,6 +391,13 @@
             </el-input>
           </div>
         </el-col>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label" style="width: 90px"><span class="required-span">* </span>璁㈠崟缂栧彿锛�</div>
+          <div class="search_input">
+            <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
+            </el-input>
+          </div>
+        </el-col>
       </el-row>
       <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id"
                :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
@@ -414,12 +421,19 @@
     <el-dialog title="鍑哄簱" :visible.sync="exportVisible" width="400px">
       <el-row>
         <el-col class="search_thing" :span="24">
-          <div class="search_label" style="width: 90px"><span class="required-span">* </span>鏍峰搧缂栧彿锛�</div>
+          <div class="search_label" style="width: 90px"><span class="required-span">* </span>濮旀墭缂栧彿锛�</div>
           <div class="search_input">
             <el-input v-model="sampleCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
               <el-tooltip :content="sampleCodeBtnDisabled?'鎵嬪姩杈撳叆':'鎵爜鏋緭鍏�'" placement="top" slot="append">
                 <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button>
               </el-tooltip>
+            </el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label" style="width: 90px"><span class="required-span">* </span>濮旀墭缂栧彿锛�</div>
+          <div class="search_input">
+            <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
             </el-input>
           </div>
         </el-col>
@@ -676,6 +690,7 @@
         scanInsOrderState:false,
         qrCodeVisible: false,
         sampleCode: '',
+        entrustCode:'',
         storageList:[],
         expandedKeys: [],
         selectTree: [],
@@ -695,6 +710,7 @@
         if(newVal){
             // this.$message.success('鎵爜锛氭墦寮�')
             this.sampleCode = null
+            this.entrustCode = null
             let input = document.getElementById('ScanCodeInfo');
             input.focus();
             this.startTime = setInterval(()=>{
@@ -710,6 +726,7 @@
         if(newVal){
             // this.$message.success('鎵爜锛氭墦寮�')
             this.sampleCode = null
+            this.entrustCode = null
             let input = document.getElementById('ScanCodeInfo');
             input.focus();
             this.startTime = setInterval(()=>{
@@ -725,7 +742,8 @@
         if(!val){
           this.startTime&&clearInterval(this.startTime)
         }else if(this.exportVisible||this.qrCodeVisible){
-          this.sampleCode = null
+          // this.sampleCode = null
+          // this.entrustCode = null
           let input = document.getElementById('ScanCodeInfo');
           input.focus();
           this.startTime = setInterval(()=>{
@@ -796,6 +814,10 @@
           this.$message.error('璇峰~鍐欐牱鍝佺紪鍙�')
           return
         }
+        if (!this.entrustCode) {
+          this.$message.error('璇峰~鍐欒鍗曠紪鍙�')
+          return
+        }
         if (this.selectTree.length < 4) {
           this.$message.error('璇烽�夋嫨鏍峰搧鍏ュ簱浣嶇疆')
           return
@@ -804,11 +826,13 @@
         this.$axios.post(this.$api.insOrderPlan.scanInsOrderState, {
           trees: this.selectTree.join('-'),
           sampleCode:this.sampleCode,
+          entrustCode:this.entrustCode,
           sonLaboratory: this.componentData.entity.sonLaboratory
         }).then(res => {
           this.upLoadStorage = false;
           this.qrCodeVisible = false
           this.sampleCode = '';
+          this.entrustCode = '';
           this.selectTree = []
           if (res.code == 201) {
             this.$message.error('娣诲姞澶辫触')
@@ -824,14 +848,20 @@
           this.$message.error('璇峰~鍐欐牱鍝佺紪鍙�')
           return
         }
+        if (!this.entrustCode) {
+          this.$message.error('璇峰~鍐欒鍗曠紪鍙�')
+          return
+        }
         this.upLoadExport = true;
         this.$axios.post(this.$api.insOrderPlan.outInsOrderState, {
           sampleCode:this.sampleCode,
+          entrustCode:this.entrustCode,
           sonLaboratory: this.componentData.entity.sonLaboratory
         }).then(res => {
           this.upLoadExport = false;
           this.exportVisible = false
           this.sampleCode = '';
+          this.entrustCode = '';
           if (res.code == 201) {
             this.$message.error('鍑哄簱澶辫触')
             return
@@ -842,13 +872,15 @@
       },
       // 鎵爜鏋寜涓�
       keyup(e){
-        var code = ''
+        var codeInfo = null
         try{
-          code = this.codeInfo.substring()
-          if(code==null||code==undefined||code==''){
-            this.$message.error('璇ヤ簩缁寸爜鏈夎')
+          console.log(2222,this.codeInfo)
+          codeInfo = JSON.parse(this.codeInfo)
+          if(!codeInfo||codeInfo.sampleCode==undefined||codeInfo.entrustCode==undefined){
+              this.$message.error('璇ヤ簩缁寸爜鏈夎')
           }else{
-            this.sampleCode = code
+              this.sampleCode = codeInfo.sampleCode
+              this.entrustCode = codeInfo.entrustCode
           }
         }catch(e){
           this.$message.error('璇疯皟鑷宠嫳鏂囬敭鐩�')
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 79b0741..3c82c0d 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -397,10 +397,27 @@
             <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:-10px;left:5px"><br></el-checkbox>
               <div>
-                <p style="text-align: center;font-size: 18px;font-weight: 700;">{{ item.sample }}</p>
-                <barcode :value="item.sampleCode" :height="34" :width="2" :displayValue="false" style="display: flex;justify-content: center;width: 100%;"></barcode>
-                <div>
-                  <div style="width: 100%;line-height: 30px;">
+                <p style="text-align: center;font-size: 26px;font-weight: 700;">{{ item.sample }}锛坽{item.model}}锛�</p>
+                <p style="text-align: center;font-size: 16px;">{{ item.sampleCode }}</p>
+                <el-divider></el-divider>
+                <el-row style="font-size: 16px;">
+                  <el-col :span="16" style="text-align: left;line-height: 28px;">
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鐢垫満缂栧彿:&nbsp; </span>{{ item.motorNumber }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鏍锋満瀹屾垚鏃堕棿:&nbsp; </span>{{ item.issueTime }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鏍锋満鍛�:&nbsp; </span>{{ item.issueName }}</p>
+                    <p class="ellipsis-multiline"><span>&nbsp;&nbsp;&nbsp;&nbsp;妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</p>
+                  </el-col>
+                  <el-col :span="8" style="text-align: left;">
+                    <vueQr
+                      :text="item.str"
+                      :size="140"
+                      :margin="2"
+                    ></vueQr>
+                  </el-col>
+                </el-row>
+                <!-- <div>
+                  <div>
                     <el-row style="font-size: 16px;">
                       <el-col :span="16" style="text-align: left;"><span>&nbsp;&nbsp;&nbsp;&nbsp;鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
                       <el-col :span="8" style="text-align: left;"><span>&nbsp;&nbsp;&nbsp;&nbsp;瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
@@ -417,7 +434,7 @@
                       <el-col style="text-align: left;"><span>&nbsp;&nbsp;&nbsp;&nbsp;妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
                     </el-row>
                   </div>
-                </div>
+                </div> -->
               </div>
             </el-card>
           </el-checkbox-group>
@@ -434,28 +451,27 @@
         <div id="printMOrder" class="printMOrder" ref="printMOrder">
           <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i+'uuuuu'" style="font-size: 16px !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
             <div>
-              <p style="text-align: center;font-size: 18px;font-weight: 500;margin-top: 10px;">{{ item.sample }}</p>
-              <barcode :value="item.sampleCode" :height="34" :width="2" :displayValue="false" style="display: flex;justify-content: center;width: 100%;"></barcode>
-              <div>
-                <div style="width: 100%;line-height: 30px;">
-                  <el-row style="font-size: 16px;">
-                    <el-col :span="16" style="text-align: left;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
-                    <el-col :span="7" style="text-align: left;"><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
-                  </el-row>
-                  <el-row style="margin-top: 1px;font-size: 16px;">
-                    <el-col :span="16" style="text-align: left;"><span>濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</el-col>
-                    <el-col :span="7" style="text-align: left;"><span>鐢垫満缂栧彿:&nbsp; </span>{{ item.motorNumber }}</el-col>
-                  </el-row>
-                  <el-row style="margin-top: 1px;font-size: 16px;">
-                    <el-col :span="16" style="text-align: left;"><span>鏍锋満瀹屾垚鏃堕棿:&nbsp; </span>{{ item.issueTime }}</el-col>
-                    <el-col :span="7" style="text-align: left;"><span>鏍锋満鍛�:&nbsp; </span>{{ item.issueName }}</el-col>
-                  </el-row>
-                  <el-row style="margin-top: 1px;font-size: 16px;" class="ellipsis-multiline">
-                    <el-col style="text-align: left;"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
-                  </el-row>
-                </div>
+                <p style="text-align: center;font-size: 26px;font-weight: 700;margin-top: 20px;">{{ item.sample }}锛坽{item.model}}锛�</p>
+                <p style="text-align: center;font-size: 16px;">{{ item.sampleCode }}</p>
+                <!-- <el-divider></el-divider> -->
+                 <p style="width: 100%;height:1px;background-color: #333333;margin: 6px 0;"></p>
+                <el-row style="font-size: 16px;">
+                  <el-col :span="16" style="text-align: left;line-height: 28px;">
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鐢垫満缂栧彿:&nbsp; </span>{{ item.motorNumber }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鏍锋満瀹屾垚鏃堕棿:&nbsp; </span>{{ item.issueTime }}</p>
+                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;鏍锋満鍛�:&nbsp; </span>{{ item.issueName }}</p>
+                    <p class="ellipsis-multiline"><span>&nbsp;&nbsp;&nbsp;&nbsp;妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</p>
+                  </el-col>
+                  <el-col :span="8" style="text-align: left;">
+                    <vueQr
+                      :text="item.str"
+                      :size="140"
+                      :margin="2"
+                    ></vueQr>
+                  </el-col>
+                </el-row>
               </div>
-            </div>
           </el-card>
         </div>
     </div>
@@ -937,7 +953,13 @@
             })
             a.item = [...new Set(arr1)].join(',')
           })
-          this.qrData = arr
+          this.qrData = arr.map(m=>{
+            m.str = JSON.stringify({
+              sampleCode:m.sampleCode,
+              entrustCode:m.code
+            })
+            return m
+          })
           // console.log(this.qrData)
 				})
       },
@@ -972,27 +994,17 @@
           targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
           printable: 'printMOrder',//椤甸潰
           type: "html",//鏂囨。绫诲瀷
-          maxWidth:720,
-          header: '',
+          documentTitle: "浜岀淮鐮�",
           style:
             `@page {
-              margin: 0.4cm;
-              margin-right: 0.4cm;
-              margin-top: 0.4cm;
-              margin-bottom: 0.4cm;
-              padding-bottom: 0px;
-              size: 800px 600px collapse;
+              margin: 0;
+              size: landscape;
             }
-            html{
+            body{
               zoom:100%;
-
-            }
-            @media print{
-              width: 800px;
-              height: 600px;
+              padding:30px 0;
               margin:0;
             }`,
-          font_size: '16px',
         });
       },
       async print(){
diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue
index 0bc487e..e0f44c6 100644
--- a/src/components/view/b1-sample.vue
+++ b/src/components/view/b1-sample.vue
@@ -196,9 +196,13 @@
           <div class="search_label">鏍峰搧缂栧彿锛�</div>
           <div class="search_input">
             <el-input placeholder="璇疯緭鍏ユ牱鍝佺紪鍙�" v-model="searchSampleCode" size="small" autocomplete="off" ref="organization" readonly="readonly" @focus="remove('organization')" @blur="setType('organization')">
-              <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
+              <!-- <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button> -->
             </el-input>
           </div>
+        </div>
+        <div class="search_thing">
+          <el-button size="small" @click="handleShelf(entity.shelfId,''),searchSampleCode=''">閲嶇疆</el-button>
+          <el-button size="small" type="primary" @click="handleShelf(entity.shelfId,searchSampleCode)">鏌ヨ</el-button>
         </div>
         <!-- <div class="search_thing" style="padding-left: 30px;">
 					<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -262,6 +266,13 @@
             </el-input>
           </div>
         </el-col>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label" style="width: 90px"><span class="required-span">* </span>璁㈠崟缂栧彿锛�</div>
+          <div class="search_input">
+            <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
+            </el-input>
+          </div>
+        </el-col>
       </el-row>
       <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id"
         :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
@@ -295,6 +306,13 @@
               <el-tooltip :content="sampleCodeBtnDisabled?'鎵嬪姩杈撳叆':'鎵爜鏋緭鍏�'" placement="top" slot="append">
                 <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button>
               </el-tooltip>
+            </el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label" style="width: 90px"><span class="required-span">* </span>濮旀墭缂栧彿锛�</div>
+          <div class="search_input">
+            <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
             </el-input>
           </div>
         </el-col>
@@ -416,6 +434,7 @@
         currentEdit:null,//褰撳墠瑕佺淮鎶ょ殑淇℃伅
         tableLoading:false,
         sampleCode:'',
+        entrustCode:'',
         currentId:null,
         searchSampleCode:null,
         codeInfo:null,
@@ -425,6 +444,7 @@
       storageVisible(newVal){
         if(newVal){
             this.sampleCode = null
+            this.entrustCode = null
             // this.$message.success('鎵爜锛氭墦寮�')
             let input = document.getElementById('ScanCodeInfo0');
             input.focus();
@@ -441,6 +461,7 @@
         if(newVal){
             // this.$message.success('鎵爜锛氭墦寮�')
             this.sampleCode = null
+            this.entrustCode = null
             let input = document.getElementById('ScanCodeInfo0');
             input.focus();
             this.startTime = setInterval(()=>{
@@ -456,7 +477,6 @@
         if(!val){
           this.startTime&&clearInterval(this.startTime)
         }else if(this.exportVisible||this.storageVisible){
-          this.sampleCode = null
           let input = document.getElementById('ScanCodeInfo');
           input.focus();
           this.startTime = setInterval(()=>{
@@ -475,14 +495,15 @@
     },
     methods: {
       keyup(e){
-        var code = ''
+        var codeInfo = null
         try{
             console.log(2222,this.codeInfo)
-            code = this.codeInfo.substring()
-            if(code==null||code==undefined||code==''){
+            codeInfo = JSON.parse(this.codeInfo)
+            if(!codeInfo||codeInfo.sampleCode==undefined||codeInfo.entrustCode==undefined){
                 this.$message.error('璇ヤ簩缁寸爜鏈夎')
             }else{
-                this.sampleCode = code
+                this.sampleCode = codeInfo.sampleCode
+                this.entrustCode = codeInfo.entrustCode
             }
         }catch(e){
             this.$message.error('璇疯皟鑷宠嫳鏂囬敭鐩�')
@@ -555,6 +576,10 @@
           this.$message.error('璇峰~鍐欐牱鍝佺紪鍙�')
           return
         }
+        if (!this.entrustCode) {
+          this.$message.error('璇峰~鍐欒鍗曠紪鍙�')
+          return
+        }
         if (this.selectTree.length < 4) {
           this.$message.error('璇烽�夋嫨鏍峰搧鍏ュ簱浣嶇疆')
           return
@@ -562,11 +587,13 @@
         this.upLoadStorage = true;
         this.$axios.post(this.$api.warehouse.inWarehouse, {
             trees: this.selectTree.join('-'),
-            sampleCode:this.sampleCode
+            sampleCode:this.sampleCode,
+            entrustCode:this.entrustCode
           }).then(res => {
             this.upLoadStorage = false;
             this.storageVisible = false
             this.sampleCode = '';
+            this.entrustCode = '';
             this.selectTree = []
             if (res.code == 201) {
               this.$message.error('鍏ュ簱澶辫触')
@@ -582,13 +609,19 @@
           this.$message.error('璇峰~鍐欐牱鍝佺紪鍙�')
           return
         }
+        if (!this.entrustCode) {
+          this.$message.error('璇峰~鍐欒鍗曠紪鍙�')
+          return
+        }
         this.upLoadExport = true;
         this.$axios.post(this.$api.warehouse.outWarehouse, {
-            sampleCode:this.sampleCode
+            sampleCode:this.sampleCode,
+            entrustCode:this.entrustCode,
           }).then(res => {
             this.upLoadExport = false;
             this.exportVisible = false
             this.sampleCode = '';
+            this.entrustCode = '';
             if (res.code == 201) {
               this.$message.error('鍑哄簱澶辫触')
               return
@@ -783,10 +816,10 @@
         this.shelf = map.warehouseShelfList;
         this.entity.shelfId = '';
       },
-      handleShelf(e){
+      handleShelf(e,sampleCode=''){
         if(e){
           this.tableLoading = true;
-          this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e).then(res => {
+          this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e+'&sampleCode='+sampleCode).then(res => {
             this.tableLoading = false;
             let data = res.data;
             let set =new Set()
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 5f9be9f..f6fc701 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -296,13 +296,14 @@
                 <div>
                   <span style="font-size: 12px;margin-bottom: 8px;">{{ m.text }}</span>
                   <div class="tags" style="display: flex;align-items: end;flex-wrap: wrap;margin-bottom: 8px;">
-                    <el-tag
-                      v-for="(item,index) in m.sample.split(',')"
-                      :key="index"
-                      :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')"
-                      effect="dark" size="mini" style="margin: 2px;">
-                      {{ item }}
-                    </el-tag>
+                    <el-tooltip class="item" effect="dark" :content="item" placement="top" v-for="(item,index) in m.sample?m.sample.split(','):[]"
+                    :key="index">
+                      <el-tag
+                        :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')"
+                        effect="dark" size="mini" style="margin: 2px;" class="single-line-ellipsis">
+                        {{ item }}
+                      </el-tag>
+                    </el-tooltip>
                   </div>
                   <span style="display: inline-block;height: 22px;width: 70px;border-radius: 10px;line-height: 22px;text-align: center;background: #C0C4CC;color: #fff;font-size: 14px;">{{ m.name }}</span>
                 </div>
diff --git a/src/main.js b/src/main.js
index fc67442..107ecf3 100644
--- a/src/main.js
+++ b/src/main.js
@@ -21,7 +21,7 @@
 //鏈湴
 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
 // const javaApi = 'http://127.0.0.1:8001';
-// const javaApi = 'http://172.20.10.5:8001';
+const javaApi = 'http://172.20.10.5:8001';
 
 // //閫氫俊娴嬭瘯搴�
 // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";
diff --git a/src/view/index.vue b/src/view/index.vue
index 5a8417f..efe8884 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -519,9 +519,11 @@
             cancelButtonText: '鍙栨秷',
             type: 'warning'
           }).then(() => {
-            this.tabs.splice(index, 1);
-            let data = this.tabs[this.tabs.length - 1]
-            this.upTabActive(data.k)
+            if(obj.$refs.Inspection.$refs.CircuitParameters.saveAll()){
+              this.tabs.splice(index, 1);
+              let data = this.tabs[this.tabs.length - 1]
+              this.upTabActive(data.k)
+            }
           })
           return
         }

--
Gitblit v1.9.3