#
whycq
2024-04-08 fff541726267dcf7fc11f56eb3ac64e19c7d9fde
#
3个文件已修改
1个文件已添加
98 ■■■■■ 已修改文件
pages.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/order/orderCar.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/order/pakinOrderSelect.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/stationManage.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -578,6 +578,14 @@
                "enablePullDownRefresh": false
            }
            
        },
        {
            "path" : "pages/phyz/order/orderCar",
            "style" :
            {
                "navigationBarTitleText" : "待组托列表",
                "enablePullDownRefresh" : false
            }
        }
    ],
    "globalStyle": {
pages/phyz/order/orderCar.vue
New file
@@ -0,0 +1,54 @@
<template>
    <view>
        <view class="list list-font-color shop-car" :class="orderDetl.color" v-for="orderDetl in orderCarList" >
            <view class="list-left">
                <view class="detl-threeCode">{{orderDetl.threeCode}}</view>
                <view>主单号:{{orderDetl.orderNo}}</view>
                <view>编号:{{orderDetl.matnr}}</view>
                <view>名称:{{orderDetl.maktx}}</view>
                <view>总数量:{{orderDetl.anfme}}</view>
                <view>入库数量:{{orderDetl.anfme}}</view>
            </view>
            <view class="list-right" @click="addItem(orderDetl)">
                <uni-icons type="settings" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                orderCarList: []
            }
        },
        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) {
                _this.orderCarList = data.item
                console.log(data.item);
            })
        },
        methods: {
        }
    }
</script>
<style>
    @import url('../../../static/css/common/order.css');
    .shop-car {
        background-color: #2299ff;
        color: #fff;
    }
    .detl-threeCode {
        font-size: 28px;
        font-weight: bold;
    }
</style>
pages/phyz/order/pakinOrderSelect.vue
@@ -20,16 +20,18 @@
                <view>总数量:{{orderDetl.anfme}}</view>
                <view>已入数量:{{orderDetl.qty}}</view>
            </view>
            <view class="list-right">
            <view class="list-right" @click="addItem(orderDetl)">
                <uni-icons type="folder-add" size="25"  color="#fff"></uni-icons>
            </view>
        </view>
        <view class="shop-car">
        <view class="shop-car" @click="orderCar()">
            <view class="car-left">
                <uni-icons type="cart-filled" size="35"  color="#fff"></uni-icons>
            </view>
            <view class="car-right">
                <text>10</text>
                <text>{{orderCarList.length}}</text>
            </view>
        </view>
        <view style="height: 50rpx;"></view>
@@ -46,6 +48,7 @@
                searchValue: '',
                total: '',
                dataList: [],
                orderCarList: [],
                data: {
                    curr: 1,
                    limit: 100,
@@ -54,7 +57,7 @@
                
            }
        },
        onShow() {
        onLoad() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.searchValue = uni.getStorageSync('threeCode');
@@ -99,6 +102,27 @@
            },
            clear() {
                this.getOrderDetlList(this.searchValue,30)
            },
            // 添加入库商品至 待组托列表
            addItem(orderDetl) {
                this.orderCarList.push(orderDetl)
            },
            // 点击前往 待组托列表
            orderCar() {
                let _this = this
                uni.navigateTo({
                    url: './orderCar',
                    success(res) {
                        res.eventChannel.emit('item', {
                            item: _this.orderCarList
                        })
                    },
                    events: {
                        acceptDataFromOpenedPage: function(data) {
                            console.log(data);
                        }
                    }
                })
            }
        }
    }
pages/phyz/stationManage/stationManage.vue
@@ -378,14 +378,14 @@
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('item', {
                            item: e
                        }),
                        })
                        _this.searchValue = ''
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            _this.searchValueFocus = true
                        },
                        }
                    },
                });
            }