| | |
| | | eventChannel.on('mat', function(data) { |
| | | that.mat = data.data |
| | | console.log(data.data); |
| | | if (data.data.maxNum) { |
| | | if (data.data.maxNum > 0) { |
| | | that.mat.anfme = data.data.maxNum |
| | | } else { |
| | | that.max = data.data.maxNum |
| | | } else if (data.data.maxNum == 0) { |
| | | uni.showToast({title: '当前物料最大可入数量为 0', icon: "none", position: 'top'}); |
| | | that.mat.anfme = 0 |
| | | that.max = data.data.maxNum |
| | | } |
| | | |
| | | }) |
| | |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | if (that.maxAnfme) { |
| | | if (that.maxAnfme > 0) { |
| | | that.matData['maxNum'] = that.maxAnfme |
| | | } else if (that.maxAnfme == 0){ |
| | | that.matData['maxNum'] = 0 |
| | | } |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | | url: that.baseUrl + '/mobile/comb/auth2', |
| | | data: JSON.stringify({ |
| | | bomCode: that.bomCode, |
| | | barcode: that.barcode, |
| | | combMats: that.dataList |
| | | }), |