| | |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input v-model="barcode" type="text" placeholder="扫码 / 输入" |
| | | :focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height: 85rpx;"> |
| | | :focus="barcodeFocus" @input="barcodeInput()" placeholder-style="line-height: 85rpx;"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | setTimeout(()=>{ |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({title: '托盘码有误请重试', icon: "none", position: 'top'}); |
| | | uni.showToast({title: '托盘码'+this.barcode+'有误请重试', icon: "none", position: 'top'}); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | |
| | | let that = this |
| | | let len = that.matnr.length |
| | | let bat = '' |
| | | if (len == 26 || len == 25) { |
| | | let re = /\s+/g |
| | | that.matnr = that.matnr.replace(/\s+/g,'') |
| | | if (len == 26 || len == 25 || len == 27 || len == 28) { |
| | | bat = that.matnr.substring(18,22) |
| | | that.matnr = that.matnr.substring(3,16) + that.matnr.substring(16,17) |
| | | that.matnr = that.matnr.substring(3,17) |
| | | } |
| | | for (var i = 0; i < that.matList.length; i++) { |
| | | if (that.matnr == that.matList[i].matnr) { |