| | |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="10" |
| | | :focus="barcodeFocus" placeholder-style="line-height: 85rpx;"> |
| | | :focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height: 85rpx;"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | }, |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({title: '托盘码有误请重试', icon: "none", position: 'top'}); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | if (len == 8) { |
| | | this.focuss() |
| | | } |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(()=>{ |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({title: '托盘码有误请重试', icon: "none", position: 'top'}); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | if (len == 8) { |
| | | this.focuss() |
| | | } |
| | | },100) |
| | | }, |
| | | // 托盘码有误重置 |
| | | barcodeFocuss() { |
| | |
| | | return { |
| | | elements:[ |
| | | |
| | | { |
| | | title: '下架管理', |
| | | name: 'offLines', |
| | | color: 'blue', |
| | | cuIcon: 'copy' |
| | | }, |
| | | // { |
| | | // title: '下架管理', |
| | | // name: 'offLines', |
| | | // color: 'blue', |
| | | // cuIcon: 'copy' |
| | | // }, |
| | | { |
| | | title: '组托入库', |
| | | name: 'pakin', |
| | |
| | | color: 'blue', |
| | | cuIcon: 'searchlist' |
| | | }, |
| | | { |
| | | title: '上架', |
| | | name: 'putOnSale', |
| | | color: 'blue', |
| | | cuIcon: 'video' |
| | | }, |
| | | // { |
| | | // title: '上架', |
| | | // name: 'putOnSale', |
| | | // color: 'blue', |
| | | // cuIcon: 'video' |
| | | // }, |
| | | { |
| | | title: '单据出库', |
| | | name: 'orderOut', |