| | |
| | | }, |
| | | analysis() { |
| | | let that = this |
| | | let str = that.orderNo.split(';') |
| | | |
| | | that.orderNo = str[0] |
| | | if(that.matList.length>0) { |
| | | if(str[1] != that.matList[0].orderno){ |
| | | uni.showToast({title: '请确认上架单号', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | } |
| | | // var param = {} |
| | | // param['orderNo'] = that.orderNo |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | data: { |
| | | orderno:str[0], |
| | | matnr:str[1], |
| | | batch:str[2] |
| | | }, |
| | | url: that.commonUrl + '/orderDetl/list/auth', |
| | | data:{order_no:that.orderNo}, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | method:'GET', |
| | | success(result) { |
| | | uni.vibrateShort(); |
| | | console.log(result); |
| | | let res = result.data |
| | | if (res.code === 200 && res.data) { |
| | | res.data['orderno'] = str[1] |
| | | res.data.batch = str[2] |
| | | that.matData = res.data |
| | | that.matnr = '' |
| | | uni.navigateTo({ |
| | | url: "matQuery", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | matList: function(data) { |
| | | that.matList.push(data.data) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('matData', { data: that.matData }) |
| | | }, |
| | | }); |
| | | that.matList = res.data.records |
| | | } else if(res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |