From 69ed1555e7be98d643e5cf9c55b591c44d52d1b9 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 01 十一月 2024 11:24:24 +0800
Subject: [PATCH] 修改标签打印格式

---
 src/components/view/b1-sample.vue |   73 +++++++++++++++++++-----------------
 1 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue
index e91a3b1..1db786b 100644
--- a/src/components/view/b1-sample.vue
+++ b/src/components/view/b1-sample.vue
@@ -195,7 +195,7 @@
         <div class="search_thing">
           <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')">
+            <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-input>
           </div>
@@ -366,7 +366,7 @@
         <el-button type="primary" @click="confirmShelves" :loading="upLoadShelves">纭� 瀹�</el-button>
       </span>
     </el-dialog>
-    <input type="password" id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input>
+    <!-- <input type="password" id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input> -->
   </div>
 </template>
 
@@ -412,39 +412,39 @@
         codeInfo:null,
       }
     },
-    watch:{
-      storageVisible(newVal){
-        if(newVal){
-            // this.$message.success('鎵爜锛氭墦寮�')
-            let input = document.getElementById('ScanCodeInfo');
-            input.focus();
-            this.startTime = setInterval(()=>{
-                input.focus()
-            },1000)
-        }else{
-            // this.$message.warning('鎵爜锛氬叧闂�')
-            clearInterval(this.startTime)
-        }
-      },
-      exportVisible(newVal){
-        if(newVal){
-            // this.$message.success('鎵爜锛氭墦寮�')
-            let input = document.getElementById('ScanCodeInfo');
-            input.focus();
-            this.startTime = setInterval(()=>{
-                input.focus()
-            },1000)
-        }else{
-            // this.$message.warning('鎵爜锛氬叧闂�')
-            clearInterval(this.startTime)
-        }
-      },
-      isEdit(newVal){
-        if(!newVal){
-          this.shelves = {}
-        }
-      }
-    },
+    // watch:{
+    //   storageVisible(newVal){
+    //     if(newVal){
+    //         // this.$message.success('鎵爜锛氭墦寮�')
+    //         let input = document.getElementById('ScanCodeInfo');
+    //         input.focus();
+    //         this.startTime = setInterval(()=>{
+    //             input.focus()
+    //         },1000)
+    //     }else{
+    //         // this.$message.warning('鎵爜锛氬叧闂�')
+    //         clearInterval(this.startTime)
+    //     }
+    //   },
+    //   exportVisible(newVal){
+    //     if(newVal){
+    //         // this.$message.success('鎵爜锛氭墦寮�')
+    //         let input = document.getElementById('ScanCodeInfo');
+    //         input.focus();
+    //         this.startTime = setInterval(()=>{
+    //             input.focus()
+    //         },1000)
+    //     }else{
+    //         // this.$message.warning('鎵爜锛氬叧闂�')
+    //         clearInterval(this.startTime)
+    //     }
+    //   },
+    //   isEdit(newVal){
+    //     if(!newVal){
+    //       this.shelves = {}
+    //     }
+    //   }
+    // },
     mounted() {
       this.selectList()
     },
@@ -811,6 +811,9 @@
       remove(type){
         this.$refs[type].$el.querySelector('input').removeAttribute('readonly')
       },
+      setType(type){
+        this.$refs[type].$el.querySelector('input').setAttribute('readonly', 'true')
+      }
     }
   }
 </script>

--
Gitblit v1.9.3