From a06fc9ad238199d601ae86795188151f56fdd3fe Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 27 十一月 2024 15:22:11 +0800
Subject: [PATCH] 修改样品出入库

---
 src/components/view/b1-sample.vue |   71 ++++++++++++++++++-----------------
 1 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue
index 1db786b..b2f0a0d 100644
--- a/src/components/view/b1-sample.vue
+++ b/src/components/view/b1-sample.vue
@@ -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  id="ScanCodeInfo0" 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,41 @@
         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.sampleCode = null
+            // this.$message.success('鎵爜锛氭墦寮�')
+            let input = document.getElementById('ScanCodeInfo0');
+            input.focus();
+            this.startTime = setInterval(()=>{
+                input.focus()
+            },1000)
+        }else{
+            // this.$message.warning('鎵爜锛氬叧闂�')
+            clearInterval(this.startTime)
+        }
+      },
+      exportVisible(newVal){
+        if(newVal){
+            // this.$message.success('鎵爜锛氭墦寮�')
+            this.sampleCode = null
+            let input = document.getElementById('ScanCodeInfo0');
+            input.focus();
+            this.startTime = setInterval(()=>{
+                input.focus()
+            },1000)
+        }else{
+            // this.$message.warning('鎵爜锛氬叧闂�')
+            clearInterval(this.startTime)
+        }
+      },
+      isEdit(newVal){
+        if(!newVal){
+          this.shelves = {}
+        }
+      }
+    },
     mounted() {
       this.selectList()
     },
@@ -452,6 +454,7 @@
       keyup(e){
         var code = ''
         try{
+            console.log(2222,this.codeInfo)
             code = this.codeInfo.substring()
             if(code==null||code==undefined||code==''){
                 this.$message.error('璇ヤ簩缁寸爜鏈夎')

--
Gitblit v1.9.3