#
whycq
2024-04-15 d3e9d00e6b73a2f7d782e16975239f6e166ccdc9
#
3个文件已修改
57 ■■■■■ 已修改文件
pages/phyz/checkLocDetl/checkLocDetl.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/checkLocDetl/locDetl.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/stationDetl.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/checkLocDetl/checkLocDetl.vue
@@ -65,7 +65,6 @@
                bay1: '',
                lev1: '',
                dataList: [],
            }
        },
        onLoad() {
@@ -140,6 +139,31 @@
            },
            goToLocDetl() {
                this.$refs.check.open()
            },
            checkClose() {
                this.$refs.check.close()
            },
            checkConfirm() {
                let _this = this
                let param = {
                    barcode : _this.barcode,
                    locNo : _this.locNo
                }
                uni.navigateTo({
                    url: "./locDetl",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('item', {
                            item: param
                        })
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            _this.searchValueFocus = true
                        }
                    },
                });
            }
            
        }
pages/phyz/checkLocDetl/locDetl.vue
@@ -8,11 +8,36 @@
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
            }
        },
        onShow() {
            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.getLocDetl(data.item.locNo,data.item.barcode)
            })
        },
        methods: {
            getLocDetl(locNo,barcode) {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/check/detl/v1`,
                    header: {'token': uni.getStorageSync('token')},
                    data: { locNo: locNo,barcode: barcode },
                    method: 'GET',
                    success(res) {
                        res = res.data
                        console.log(res);
                    }
                })
            }
        }
    }
</script>
pages/phyz/stationManage/stationDetl.vue
@@ -152,6 +152,8 @@
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                station: null,
                reload: {
                    loading: false,