#
whycq
2024-04-11 1919058aab930e928de36ac9a6745b729d8dd01e
#
2个文件已修改
79 ■■■■■ 已修改文件
pages/phyz/orderOut/orderCheck.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/orderOut/orderList.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/orderOut/orderCheck.vue
@@ -1,6 +1,26 @@
<template>
    <view>
        <view class="list">
            <view class="list-left">
                <view>编号:{{data.matnr}}</view>
                <view>名称:{{data.maktx}}</view>
                <view>规格:{{data.specs}}</view>
                <view>批号:{{data.batch}}</view>
                <view class="list-anfme">数量:{{data.anfme}}</view>
                <view class="list-qty-1" v-if="data.anfme > data.qty">作业数量:{{data.qty}}</view>
                <view class="list-qty-2" v-if="data.anfme <= data.qty">作业数量:{{data.qty}}</view>
                <view>货位:{{data.locNo}}</view>
                <view style="display: flex;">出库站:
                    <view class="dropdown" @click="toggleDropdown(data)">
                        <input type="text" style="width: 270rpx;" v-model="data.agvStaNo" placeholder="请选择出库站">
                        <uni-icons :type="data.isOpen ? 'top' : 'bottom'" color="#c1c1c1" style="margin-left: 10rpx;"></uni-icons>
                        <scroll-view scroll-y="ture" class="dropdown-content" v-if="data.isOpen">
                            <view class="dropdown-item" v-for="option in data.agvStaNos" @click="selected(option,data)">{{option}}</view>
                        </scroll-view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
@@ -8,15 +28,47 @@
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                data: {},
                option: ''
            }
        },
        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) {
                for (let item of data.mats) {
                    _this.ids.push(item.id)
                }
                _this.getPakoutList(_this.ids)
            })
        },
        methods: {
            // 订单明细
            getPakoutList(ids) {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/out/pakout/preview/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: ids,
                    method: 'POST',
                    success(res) {
                        res = res.data
                        console.log(res);
                        if (res.code === 200) {
                        }
                    }
                })
            },
        }
    }
</script>
<style>
    @import url('../../../static/css/common/order.css');
</style>
pages/phyz/orderOut/orderList.vue
@@ -110,8 +110,23 @@
                    }
                })
            },
            pakoutPrive() {
                this.$refs.pakoutPrive.open()
            pakoutPrive(item) {
                let _this = this
                uni.navigateTo({
                    url: "./orderCheck",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('item1', {
                            item: item,
                        })
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            // _this.matnr = data.data
                        },
                    },
                });
            },
            pakout(item) {
                let _this = this