|  |  | 
 |  |  | <template> | 
 |  |  |    <view> | 
 |  |  |       <view class="code"> | 
 |  |  |       <!--    <view class="item"> | 
 |  |  |             <view class="code-decs">托盘码:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" | 
 |  |  |                @input="barcodeInput()"> | 
 |  |  |          </view> --> | 
 |  |  |          <view class="item"> | 
 |  |  |             <view class="code-decs">物料码:</view> | 
 |  |  |             <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> | 
 |  |  | 
 |  |  |                      <uni-tag :text="item.batch" type="warning"></uni-tag> | 
 |  |  |                   </view> | 
 |  |  |                </view> | 
 |  |  |                <!-- <view class="list-left-item"> | 
 |  |  |                   <view class="desc">重量:</view> | 
 |  |  |                   <view class="left-item"> | 
 |  |  |                      <uni-tag :text="item.weight" type="warning"></uni-tag> | 
 |  |  |                   </view> | 
 |  |  |                </view> --> | 
 |  |  |                <view class="list-left-item"> | 
 |  |  |                   <view class="desc">数量:</view> | 
 |  |  |                   <view class="left-item">{{item.anfme}}</view> | 
 |  |  | 
 |  |  |                         style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"> | 
 |  |  |                   </view> | 
 |  |  |                </view> | 
 |  |  |                <!-- <view class="popup-item"> | 
 |  |  |                   <view class="popup-item-left">批号:</view> | 
 |  |  |                   <view class="popup-item-right"><input type="text" v-model="batch"></view> | 
 |  |  |                </view> --> | 
 |  |  |                <!-- <view class="popup-item"> | 
 |  |  |                   <view class="popup-item-left">重量:</view> | 
 |  |  |                   <view class="popup-item-right"><input type="text" v-model="weight"></view> | 
 |  |  |                </view> --> | 
 |  |  |                <view class="popup-item"> | 
 |  |  |                   <view class="popup-item-left">数量:</view> | 
 |  |  |                   <view class="popup-item-right" style="border: none;justify-content: center;"> | 
 |  |  | 
 |  |  |                @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog> | 
 |  |  |          </uni-popup> | 
 |  |  |       </view> | 
 |  |  | 		 | 
 |  |  |       <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> | 
 |  |  |          <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> | 
 |  |  |       </view> | 
 |  |  |    </view> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | 
 |  |  |             messageText: '', | 
 |  |  |             title: '', | 
 |  |  |             content: '', | 
 |  |  |             barcodeFocus: true, | 
 |  |  |             matFocus: false, | 
 |  |  |             matFocus: true, | 
 |  |  |             matData: '', | 
 |  |  |             removeNum: 0, | 
 |  |  |             hide: true, | 
 |  |  |             hidebg: 'kb-bgtr' | 
 |  |  |          } | 
 |  |  |       }, | 
 |  |  |       onLoad() { | 
 |  |  |  | 
 |  |  |          // #ifdef APP | 
 |  |  |          setInterval(()=>{ | 
 |  |  |             if (this.hide) { | 
 |  |  |                uni.hideKeyboard() | 
 |  |  |             } else { | 
 |  |  | 					 | 
 |  |  |             } | 
 |  |  |          },20) | 
 |  |  |          // #endif | 
 |  |  |       }, | 
 |  |  |       onBackPress() { | 
 |  |  |          this.hide = false | 
 |  |  |       }, | 
 |  |  |       onShow() { | 
 |  |  |          this.baseUrl = uni.getStorageSync('baseUrl'); | 
 |  |  |          this.token = uni.getStorageSync('token'); | 
 |  |  |       }, | 
 |  |  |       methods: { | 
 |  |  |          hideKeyboard() { | 
 |  |  |             this.hide = this.hide ? false : true | 
 |  |  |             if (this.hide) { | 
 |  |  |                this.hidebg = 'kb-bgtr' | 
 |  |  |             } else { | 
 |  |  |                this.hidebg = 'kb-bgfa' | 
 |  |  |             } | 
 |  |  |          }, | 
 |  |  |          messageToggle(type) { | 
 |  |  |             this.msgType1 = type | 
 |  |  |             this.$refs.message.open() | 
 |  |  | 
 |  |  |             }, 200) | 
 |  |  |          }, | 
 |  |  |          // 托盘码有误重置 | 
 |  |  |          barcodeFocuss() { | 
 |  |  |          matFocuss() { | 
 |  |  |             let that = this; | 
 |  |  |             that.barcodeFocus = false; | 
 |  |  |             that.matFocus = false; | 
 |  |  |             setTimeout(() => { | 
 |  |  |                that.barcode = ''; | 
 |  |  |                that.barcodeFocus = true; | 
 |  |  |                that.matnr = ''; | 
 |  |  |                that.matFocus = true; | 
 |  |  |             }, 100); | 
 |  |  |          }, | 
 |  |  |          // 商品光标清空重置 | 
 |  |  | 
 |  |  |                         events: { | 
 |  |  |                            matList: function(data) { | 
 |  |  |                               that.checkMat(data.data) | 
 |  |  |                               that.focuss() | 
 |  |  |                               setTimeout(()=>{ | 
 |  |  |                                  that.matFocuss() | 
 |  |  |                               },100) | 
 |  |  |                            }, | 
 |  |  |                         }, | 
 |  |  |                      }); | 
 |  |  | 
 |  |  |          // 清空 | 
 |  |  |          resst() { | 
 |  |  |             this.dataList = [] | 
 |  |  |             this.barcode = '' | 
 |  |  |             this.barcodeFocuss() | 
 |  |  |             this.matFocuss() | 
 |  |  |          }, | 
 |  |  |       } | 
 |  |  |    } | 
 |  |  | 
 |  |  | <style> | 
 |  |  |    @import url('../../static/css/wms.css/wms.css'); | 
 |  |  |  | 
 |  |  |    .keyboard{ | 
 |  |  |       top: 120rpx; | 
 |  |  |    } | 
 |  |  |    .list:first-child { | 
 |  |  |       margin-top: 220rpx; | 
 |  |  |    } |