#
Junjie
2024-10-11 1ae4309fe4fbc19dcdcaa28b1193a2737299b900
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<template>
    <view>
        <view class="status_bar">
            <!-- 这里是状态栏 -->
        </view>
        <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="多次并板" @clickLeft="back"  :fixed="true"
            :border="false" rightWidth="160rpx" leftWidth="160rpx"
            >
            <block slot="right">
                <view class="city">
                    <view>
                        <text class="uni-nav-bar-text">{{store}}</text>
                    </view>
                </view>
            </block>
         </uni-nav-bar>
        <!-- 搜索框 -->
        <view class="search-bar">
            <uni-search-bar v-model="wrkNo" placeholder=" 输入托盘码" bgColor="#EEEEEE" @input="search" />
        </view>
        <view class="card" v-for="item in menuList" @click="chose(item.barcode)">
            <view class="item">工作号:{{item.wrkNo}}</view>
            <view class="item">托盘码:{{item.barcode}}</view>
            <view class="item">库位号:{{item.sourceLocNo}}</view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                baseUrl: '',
                token: '',
                storeId: 0,
                store: '',
                wrkNo: '',
                menuList: []
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.storeId = uni.getStorageSync('store')
            if (this.storeId == 1) {
                this.store = '宁波仓'
            }
            if (this.storeId == 2) {
                this.store = '新昌仓'
            }
            this.getOrderNoList()
        },
        methods: {
            back() {
                uni.navigateBack({})
            },
            getOrderNoList() {
                let that = this
                uni.request({
                    url: this.baseUrl + '/mobile/barcode/list/all',
                    data: "",
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    method: 'POST',
                    success(res) {
                        res = res.data
                        that.menuList = res.data
                    }
                })
            },
            search() {
                let that = this
                uni.request({
                    url: this.baseUrl + '/mobile/barcode/list/all',
                    data: that.wrkNo,
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                    method: 'POST',
                    success(res) {
                        res = res.data
                        that.menuList = res.data
                    }
                })
            },
            chose(item) {
                let that = this
                uni.navigateTo({
                    url: "../pakin/WarehouseOutMergeBoardMany",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('data', {
                            barcode: item
                        })
                    },
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            // that.matnr = data.data
                            that.input(that.matnr)
                        },
                    },
                });
            }
        }
    }
</script>
 
<style>
    @import url('../../static/css/wms.css/wms.css');
    .card {
        margin: 20rpx;
        padding: 30rpx;
        background-color: #157ec1;
        border-radius: 20rpx;
        color: #FFF;
    }
</style>