pages/phyz/stationManage/stationDetl.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/phyz/stationManage/stationManage.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pages/phyz/stationManage/stationDetl.vue
@@ -1,6 +1,13 @@ <template> <view> <!-- 站点详情 --> <view class="station" :class="station.style" > <view class="station-title">{{station.devNo}}</view> <view>站点类型:{{station.locType1$}}区</view> <view>货架前两位:{{station.locType2$}}</view> <view>站点状态:{{station.locSts$}}</view> <view>货架码:{{station.barcode}}</view> </view> </view> </template> @@ -8,8 +15,21 @@ export default { data() { return { station: null, } }, onLoad() { let _this = this this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE const eventChannel = this.getOpenerEventChannel(); // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 eventChannel.on('item', function(data) { console.log(data); _this.station = data.item }) }, methods: { @@ -18,5 +38,21 @@ </script> <style> .station-title { font-size: 32px; font-weight: bold; padding: 24rpx 0; } .station { font-size: 18px; padding: 24rpx; } .station-wrk { background-color: #ff7356; color: #fff; } .station-nowrk { background-color: #3eb689; color: #fff; } </style> pages/phyz/stationManage/stationManage.vue
@@ -8,7 +8,7 @@ <view class="list" :class="item.style" v-if="stations" v-for="item in stations"> <view class="list-left"> <view>工位编号:{{item.devNo}}</view> <view>工位状态:{{item.locSts$}}</view> <view>站点状态:{{item.locSts$}}</view> <view>条形码:{{item.barcode}}</view> <view>站点类型:{{item.locType1$}}</view> <!-- <view class="card-id">{{i + 1}}</view> --> @@ -20,7 +20,7 @@ <view class="list" style="background-color: #3eb689;color: #fff;" v-if="station"> <view class="list-left"> <view>工位编号:{{station.devNo}}</view> <view>工位状态:{{station.locSts$}}</view> <view>站点状态:{{station.locSts$}}</view> <view>条形码:{{station.barcode}}</view> <!-- <view class="card-id">{{i + 1}}</view> --> </view> @@ -370,6 +370,26 @@ reviseConfirm() { this.startPakin('empty') this.$refs.revise.close() }, // 前往站点明细页面 getOrderDetl(item) { let _this = this uni.navigateTo({ url: "./stationDetl", success: function(res) { // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 res.eventChannel.emit('item', { item: item }) }, events: { // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 acceptDataFromOpenedPage: function(data) { // _this.matnr = data.data _this.input(_this.matnr) }, }, }); } } }