| | |
| | | </view> |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()" |
| | | <input v-model="matnrId" type="text" placeholder="扫码 / 输入" @input="findMat()" |
| | | :focus="focus" @focus="focuss" > |
| | | <!-- @focus="focuss" --> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons> |
| | |
| | | type: 'center', |
| | | searchBox: 'hide', |
| | | pick:'hide', |
| | | matnr:'', |
| | | matnrId:'', |
| | | // matList:[{matnr:'1101842-10000',batch:'22047515999'}], |
| | | matList:[], |
| | | result: '', |
| | |
| | | resst() { |
| | | this.matList = [] |
| | | this.barcode = '' |
| | | this.matnr = '' |
| | | this.matnrId = '' |
| | | uni.vibrateShort(); |
| | | }, |
| | | removeBarcode() { |
| | |
| | | this.$nextTick(function() { |
| | | this.focus = true; |
| | | }); |
| | | this.matnr = '' |
| | | this.matnrId = '' |
| | | uni.vibrateShort(); |
| | | }, |
| | | remove(item,index) { |
| | |
| | | |
| | | findMat() { |
| | | let that = this |
| | | let str = that.matnr.split('-') |
| | | that.matnr = str[0]+'-'+str[1] |
| | | let str = that.matnrId.split('-') |
| | | let matnr = str[0]+'-'+str[1] |
| | | // that.matnr = str[0]+'-'+str[1] |
| | | uni.showLoading(); |
| | | uni.request({ |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr:that.matnr |
| | | matnr:matnr |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | |
| | | // uni.hideKeyboard(); |
| | | that.matList.unshift(res.data) |
| | | } |
| | | that.matnr = '' |
| | | that.matnrId = '' |
| | | that.listLen = that.matList.length; |
| | | uni.hideLoading(); |
| | | } else if (res.code == 403) { |