#
whycq
2024-04-11 1919058aab930e928de36ac9a6745b729d8dd01e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<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>
 
<script>
    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>