licp
2024-10-28 e703b41ee825c66016f5f0fb80b5564d901ae666
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 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()
    },