| | |
| | | <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> |
| | |
| | | checkedData:[], |
| | | batch:'', |
| | | memo: '', |
| | | ck1: false, |
| | | ck2: true, |
| | | frozen: 0, |
| | | ck1: true, |
| | | ck2: false, |
| | | frozen: 1, |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | } else { |
| | | this.frozen = 0 |
| | | } |
| | | console.log(this.frozen); |
| | | }, |
| | | // 获取url |
| | | getUrl() { |
| | |
| | | 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; |
| | | } |
| | |
| | | that.matnr = '' |
| | | }, |
| | | findMat() { |
| | | let that = this |
| | | let that = this |
| | | let len = that.matnr.length |
| | | let bat = '' |
| | | 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,17) |
| | | } |
| | | for (var i = 0; i < that.matList.length; i++) { |
| | | if (that.matnr == that.matList[i].matnr) { |
| | | uni.showToast({title: that.matnr + "当前物料提取,请勿重复扫描!", icon: "none",position: 'top'}) |
| | | setTimeout(()=>{ |
| | | that.matnr = ''; |
| | | that.focus = true; |
| | | }, 100); |
| | | return; |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | data: { |
| | |
| | | if (res.code === 200 && res.data) { |
| | | that.matData = res.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | that.matData['batch'] = bat |
| | | uni.navigateTo({ |
| | | url: "matQuery", |
| | | events: { |
| | |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | // setTimeout(()=>{ |
| | | // that.matnr = ''; |
| | | // that.focus = true; |
| | | // }, 100); |
| | | // uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | |
| | | // 添加商品 |
| | |
| | | var today = date.getFullYear() + '/' + (date.getMonth()+1) + '/' + date.getDate() |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.matnr == this.matList[i].matnr) { |
| | | this.matList[i].anfme += mat.anfme |
| | | uni.showToast({title: mat.matnr + "当前物料提取,请勿重复扫描!", icon: "none",position: 'top'}) |
| | | // this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |