jiangping
2023-10-26 ea87c908fb6cdfc3e227a584a53e6730efb8262a
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<template>
<<<<<<< HEAD
    <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @open="open" @close="close">
        <view class="title">
            <text>选择仓库</text>
        </view>
        <view class="content">
            <view class="content_search">
                <u-search :showAction="false" placeholder="请输入仓库名称" v-model="form.name" @search="searchInput"></u-search>
            </view>
            <div class="content_total">共{{form.total}}条数据</div>
            <scroll-view
            class="content_list"
            @scrolltolower="getList"
            scroll-y>
                <!-- <u-list @scrolltolower="scrolltolower"> -->
                    <!-- <u-list-item > -->
                        <div class="content_list_item"v-for="(item, index) in list" :key="index" @click="getVal(item)">
                            <div class="content_list_item_name">
                                <span style="color: #03AF76;" v-if="item.tmodel.label == 'APPLIANCE_ONTEST'">[{{ item.tmodel.code }}]</span>
                                <span style="color: #305ED5;" v-if="item.tmodel.label == 'APPLIANCE_MIX'">[{{ item.tmodel.code }}]</span>
                                <span style="color: #F5A400;" v-if="item.tmodel.label == 'APPLIANCE_OFFTEST'">[{{ item.tmodel.code }}]</span>
                                <span style="color: red;" v-if="item.tmodel.label == 'APPLIANCE_USELESS'">[{{ item.tmodel.code }}]</span>
                                <span>{{item.name}}</span>
                            </div>
                        </div>
                <!--     </u-list-item>
                </u-list> -->
            </scroll-view>
        </view>
=======
    <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @close="close">
        <view class="title">
            <text>选择仓库</text>
        </view>
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
    </u-popup>
</template>
 
<script>
<<<<<<< HEAD
    import { warehouseList } from '@/util/api/WorkOrderAPI'
    
    export default {
        props: {
            show: Boolean,
            systemDicDataId: {
                type: String,
                default: ''
            }
        },
        data() {
            return {
                form: {
                    capacity: 50,
                    page: 0,
                    total: 0,
                    name: '',
                },
                list: [],
                loading: false,
                finished: false,
                refreshing: false
            };
        },
        methods: {
            searchInput() {
                this.form.page = 0
                this.finished = false
                this.list = []
                this.getList()
            },
            getVal(item) {
                this.$emit('value', item)
            },
            open() {
                this.form.page = 0
                this.finished = false
                this.list = []
                this.getList()
            },
            scrolltolower() {
                this.getList()
            },
            getList() {
                if (!this.finished) {
                    this.loading = true;
                    this.form.page = this.form.page += 1
                    warehouseList({
                        capacity: this.form.capacity,
                        page: this.form.page,
                        model: {
                            systemDicDataId: this.systemDicDataId,
                            name: this.form.name,
                            status: 1
                        }
                    }).then(res => {
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                        this.loading = false;
                        if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
                            this.form.total = res.data.total
                            this.list.push(...res.data.records)
                        } else {
                            this.finished = true;
                        }
                    }).catch(err => {
                        this.loading = false;
                        this.finished = true;
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                    })
                }
            },
=======
    export default {
        name:"Warehouse",
        props: {
            show: Boolean
        },
        data() {
            return {
                
            };
        },
        methods: {
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
            close() {
                this.$emit('close')
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .title {
        width: 100%;
        height: 85rpx;
        line-height: 85rpx;
        text-align: center;
        text {
            font-size: 30rpx;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #222222;
        }
    }
<<<<<<< HEAD
    .content {
        width: 100%;
        .content_search {
            width: 100%;
            padding: 0 30rpx 30rpx 30rpx;
            background: white;
            position: sticky;
            top: 85rpx;
            z-index: 9;
            box-sizing: border-box;
        }
        .content_total {
            padding: 24rpx 30rpx;
            background: #F7F7F7;
            font-size: 24rpx;
            font-weight: 400;
            color: #666666;
        }
        .content_list {
            width: 100%;
            height: 800rpx;
            display: flex;
            flex-direction: column;
            .content_list_item {
                padding: 30rpx;
                display: flex;
                border-bottom: 1rpx solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28rpx;
                    margin-right: 10rpx;
                }
                .content_list_item_name {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    span {
                        font-size: 30rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #222222;
                    }
                }
            }
        }
    }
=======
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
</style>