| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <view class="code-decs">料箱码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | this.barcode = this.barcode.split('_')[1] |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 10) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | title: '料箱码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | |
| | | that.stationCodeFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 托盘码有误重置 |
| | | // 料箱码有误重置 |
| | | barcodeFocuss() { |
| | | let that = this; |
| | | that.barcodeFocus = false; |