| | |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input readonly="value" v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8" |
| | | :focus="barcodeFocus"> |
| | | :focus="barcodeFocus" @input="nextInput"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | const UPORT = uni.getStorageSync('UPORT'); |
| | | this.basePORT = UPORT |
| | | }, |
| | | onLoad() { |
| | | setInterval(()=>{ |
| | | uni.hideKeyboard() |
| | | },20) |
| | | }, |
| | | methods: { |
| | | nextInput() { |
| | | if (this.barcode.length == 8) { |
| | | this.foucss() |
| | | } |
| | | }, |
| | | foucss() { |
| | | let that = this; |
| | | that.focus = false; |
| | | setTimeout(()=>{ |
| | | that.matnrId = ''; |
| | | that.focus = true; |
| | | |
| | | }, 100); |
| | | }, |
| | | clear() { |
| | |
| | | this.$refs.message.open() |
| | | }, |
| | | resst() { |
| | | this.barcodeFocus = true |
| | | this.matnrId = ''; |
| | | this.matList = []; |
| | | this.barcode = ''; |
| | |
| | | let res = result.data |
| | | if (res.code === 200 && res.data) { |
| | | let add = true; |
| | | |
| | | let mat = res.data; |
| | | mat['batch'] = str[2]; |
| | | mat['anfme'] = 1 |
| | |
| | | if(that.matList[i].batch == str[2]) { |
| | | that.messageToggle('warn'); |
| | | that.messageText = '重复扫描'; |
| | | that.foucss(); |
| | | add = false; |
| | | } |
| | | } |