| | |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | acceptDataFromOpenedPage: function(data) { |
| | | that.matData = data.data |
| | | console.log(data.data); |
| | | that.matData = data.data.item |
| | | that.orderNo = data.data.orderNo |
| | | setTimeout(()=> { |
| | | that.findMat1() |
| | | },100) |
| | |
| | | condition:null, |
| | | tag: [], |
| | | data: [], |
| | | orderNo: '' |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | if (res.code === 200) { |
| | | if (res.data != null && res.data[0].combMats.length > 0) { |
| | | that.data = res.data[0].combMats |
| | | that.orderNo = res.data[0].orderNo |
| | | } else { |
| | | that.showMat(parentId) |
| | | } |
| | |
| | | }, |
| | | findBySelect(item) { |
| | | console.log(item); |
| | | this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: item}); |
| | | let newItem = { |
| | | orderNo: this.orderNo, |
| | | item: item |
| | | } |
| | | this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: newItem}); |
| | | uni.vibrateShort(); |
| | | uni.navigateBack({ |
| | | |