|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item.matnr)"> | 
|---|
|  |  |  | <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="toPrint(item)"> | 
|---|
|  |  |  | <view class="tag"> | 
|---|
|  |  |  | <view style="display: flex;"> | 
|---|
|  |  |  | <view class="wms-tag" :style="baColor" >商品</view> | 
|---|
|  |  |  | 
|---|
|  |  |  | 'token':uni.getStorageSync('token'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | success(result) { | 
|---|
|  |  |  | console.log(result); | 
|---|
|  |  |  | that.tagList = null | 
|---|
|  |  |  | that.matList = [] | 
|---|
|  |  |  | var res = result.data | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | that.showMat(parentId) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | that.baColor = "background-color: #0081ff;" | 
|---|
|  |  |  | } else if (res.code === 403 ) { | 
|---|
|  |  |  | uni.showToast({title: res.msg, icon: "none", position: 'top'}) | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | 
|---|
|  |  |  | 'token':uni.getStorageSync('token'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | success(result) { | 
|---|
|  |  |  | console.log(result); | 
|---|
|  |  |  | that.tagList = null | 
|---|
|  |  |  | var res = result.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | findBySelect(matnr) { | 
|---|
|  |  |  | this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr}); | 
|---|
|  |  |  | uni.navigateBack({ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | toPrint(item) { | 
|---|
|  |  |  | let that = this | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: "../print/print", | 
|---|
|  |  |  | success: function(res) { | 
|---|
|  |  |  | // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的 | 
|---|
|  |  |  | res.eventChannel.emit('data', { | 
|---|
|  |  |  | data: item | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | events: { | 
|---|
|  |  |  | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的 | 
|---|
|  |  |  | acceptDataFromOpenedPage: function(data) { | 
|---|
|  |  |  | that.matnr = data.data | 
|---|
|  |  |  | that.findMat(that.matnr) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|