| | |
| | | resst() { |
| | | this.matList = [] |
| | | this.locno = '' |
| | | this.barcodeFocuss() |
| | | // this.barcodeFocuss() |
| | | uni.vibrateShort(); |
| | | }, |
| | | comb() { |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | if (that.barcode === '') { |
| | | uni.showToast({title: '请扫描托盘条码', icon: "none", position: 'top'}); |
| | | if (that.locno === '') { |
| | | uni.showToast({title: '请扫描库位条码', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | if (that.matList.length === 0) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 提取商品 |
| | | selectMat() { |
| | | let that = this |
| | | uni.vibrateShort(); |
| | | uni.navigateTo({ |
| | | url: "matSelect", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | acceptDataFromOpenedPage: function(data) { |
| | | that.matnr = data.data |
| | | that.findMat(that.matnr) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('commonUrl', {commonUrl:that.commonUrl }) |
| | | }, |
| | | |
| | | }); |
| | | that.matnr = '' |
| | | }, |
| | | findMat() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | data: { |
| | | matnr:that.matnr |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | uni.vibrateShort(); |
| | | let res = result.data |
| | | if (res.code === 200 && res.data) { |
| | | that.matData = res.data |
| | | that.matnr = '' |
| | | uni.navigateTo({ |
| | | url: "matQuery", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | matList: function(data) { |
| | | console.log(data) |
| | | that.matList.push(data.data) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('matData', { data: that.matData }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |