bug
jiangping
2023-12-06 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5
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
<template>
    <u-popup :show="show" :round="10" closeable @close="show=false">
        <view class="loaction-content  bbox p30">
            <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing"
                @refresherrefresh="onRefresh">
                <div class="content_list">
                    <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
                        <div class="wl">
                            <div class="content_list_item_name">入库货位:{{item.unionName}}&nbsp;|&nbsp;{{item.code}}</div>
                        </div>
                    </div>
                </div>
            </scroll-view>
        </view>
    </u-popup>
</template>
 
<script>
    import {
        getListByWarehouseId
    } from '@/util/api/WorkOrderAPI'
    export default {
        name: "SelectLoaction",
        data() {
            return {
                show: false,
                refreshing: false,
                wareHouseId: '',
                list: []
            };
        },
        methods: {
            open(target) {
                this.show = true
                this.refreshing = false
                this.wareHouseId = target.wareHouseId
                this.onRefresh()
            },
 
            onRefresh() {
                if (this.refreshing) return
                this.refreshing = true;
                getListByWarehouseId({
                    wareHouseId: this.wareHouseId
                }).then(res => {
                    this.list = res.data
                }).catch((err) => {
                    this.list = []
                }).finally(() => {
                    this.refreshing = false;
                })
            },
            jump(item) {
                this.$emit('selected', item)
                this.show = false
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .loaction-content {
        height: 1200rpx;
    }
 
    .content_list {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
 
        .content_list_item {
            padding: 30rpx;
            display: flex;
            flex-direction: column;
            border-bottom: 1rpx solid #ececec;
 
            .wl {
                display: flex;
                align-items: center;
 
                .content_list_item_status {
                    font-size: 28rpx;
                    margin-right: 10rpx;
                }
 
                .content_list_item_name {
                    font-size: 30rpx;
                    font-weight: 500;
                    color: #111111;
                }
            }
 
            .sx {
                margin-top: 15rpx;
 
                span {
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #444444;
                }
            }
 
            .zl {
                margin-top: 15rpx;
 
                span {
                    font-size: 24rpx;
                    font-weight: 400;
                    color: #666666;
                }
            }
        }
    }
</style>