#
whycq
2023-10-04 d78a337df4af502f6e886dd4cb1533f2ec02843c
pages/AGV/AGVPakinBing.vue
@@ -8,7 +8,8 @@
         </view>
         <view class="item">
            <view class="code-decs">暂存位:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="stationCode" :focus="matFocus">
            <input type="text" placeholder=" 扫码 / 输入" v-model="stationCode" :focus="stationCodeFocus"
               @input="stationCodeInput()">
            <view class="item-right">
               <button></button>
               <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> -->
@@ -142,6 +143,7 @@
            token: '',
            barcode: '',
            stationCode: '',
            stationCodeFocus: false,
            dataList: [],
            count: 0,
            rowNum: '',
@@ -171,12 +173,28 @@
            this.msgType1 = type
            this.$refs.message.open()
         },
         stationCodeInput() {
            setTimeout(() => {
               var len = this.stationCode.length
               if (len != 15) {
                  this.stationCode = ''
                  this.stationCodeFocus = true
                  uni.showToast({
                     title: '暂存码有误请重试',
                     icon: "none",
                     position: 'top'
                  });
                  return;
               }
               this.focuss()
            }, 200)
         },
         // barcode input 事件
         barcodeInput() {
            // 不设置定时器 会出现扫入的字符串不全
            setTimeout(() => {
               var len = this.barcode.length
               if (len != 8) {
               if (len != 10) {
                  uni.showToast({
                     title: '托盘码有误请重试',
                     icon: "none",
@@ -185,8 +203,16 @@
                  this.barcodeFocuss()
                  return;
               }
               this.focuss()
               this.stationCodeFocuss()
            }, 200)
         },
         // 暂存位有误重置
         stationCodeFocuss() {
            let that = this;
            that.stationCodeFocus = false;
            setTimeout(() => {
               that.stationCodeFocus = true;
            }, 100);
         },
         // 托盘码有误重置
         barcodeFocuss() {
@@ -420,6 +446,7 @@
         // 确认重置
         resetConfirm() {
            this.dataList = []
            this.barcode = ''
            this.stationCode = ''
            this.messageText = "重置完成"
            this.messageToggle('success')