quanwei
13 hours ago 408c463c5b66bba2aa1c81d8dca23e04c1608e24
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<template>
    <view class="bargain-container" :data-theme='theme()' :class="theme() || ''">
        
        <view class="top-tabbar">
            <view :class="state_active == 0 ? 'tab-item active' : 'tab-item'" @click="stateFunc(0)">全部</view>
            <view :class="state_active == 10 ? 'tab-item active' : 'tab-item'" @click="stateFunc(10)">确认订单</view>
            <view :class="state_active == 20 ? 'tab-item active' : 'tab-item'" @click="stateFunc(20)">进行中</view>
            <view :class="state_active == 30 ? 'tab-item active' : 'tab-item'" @click="stateFunc(30)">已完成</view>
            <view :class="state_active == 40 ? 'tab-item active' : 'tab-item'" @click="stateFunc(40)">已取消</view>
        </view> 
        
        <!--内容-->
        <view class="bargain-list" v-if="!loading">
            <scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'" lower-threshold="50">
                
                <!-- 搜索框 -->
                <!-- <view class="d-b-c" id="searchBox">
                    <view class="index-search t-c flex-1" style="height: 70rpx; line-height: 70rpx; margin: 10rpx;">
                        <span class="icon iconfont icon-sousuo"></span>
                        <input type="text" v-model="keyword" class="flex-1 ml10 f30 gray3" value="" placeholder-class="f24 gray6"
                         placeholder="单号" confirm-type="search" @confirm="gotoSearch()"/>
                    </view>
                </view> -->
                
                <!--列表-->
                <view class="list d-s-c f-w">
                    <view class="item d-stretch" v-for="(item, index) in listData" :key="index" >
                         <!-- <view class="product-cover pr" @click="gotoDetail(item)">
                            <image :src="item.image[0].file_path" mode="aspectFit"></image>
                        </view> -->
                        <view class="product-info d-b-c d-c" @click="gotoDetail(item)">
                            <view class="product-title f26 gray3">
                               <view>{{item.project_name}}</view>
                            </view>
                            <view class="people-num price d-b-c">
                                <text class="gray9 f26">{{ item.create_time }}</text>
                                <text class="red f26">{{item.state_text}}</text>
                            </view>    
                        </view>
                        
                        <view class="d-s-s">
                            <view class="pl30">
                                <view class="p-20-0">
                                    <text>订单号:</text>
                                    <text>{{ item.order_no }}</text>
                                    <text class="ml30">支付金额:</text>
                                    <text>¥{{ item.pay_price }}</text>
                                </view>
                            </view>
                        </view>
                        <view style="float: right;" v-if="item.pay_status == 10">
                                    <block>
                                        <button @click="onCancel(item)" class="theme-borderbtn" style="border: 0rpx; padding: 0rpx;">取消</button>
                                    </block>
                        </view>
                    </view>
                </view>
                
                <!-- 没有记录 -->
                <view class="none-data-box" v-if="listData.length==0 && !loading">
                    <image src="/static/none.png" mode="widthFix"></image>
                    <text>暂无数据</text>
                </view>
                
            </scroll-view>
 
        </view>
        
        <shopTabBar></shopTabBar>
    </view>
</template>
 
<script>
    export default {
        components: {
    
        },
        data() {
            return {
                /*手机高度*/
                phoneHeight: 0,
                /*可滚动视图区域高度*/
                scrollviewHigh: 0,
                /*列表*/
                listData: [],
                status: 0,
                /*是否正在加载*/
                loading: true,
                order_data:[],
                /*状态选中*/
                state_active: 0,
                keyword:''
            };
        },
        computed: {},
        onLoad(e) {},
        onShow() {
            /*获取列表*/
            this.getlist();
        },
        mounted() {
            this.init();
 
        },
        onReachBottom() {},
        methods: {
            /*初始化*/
            init() {
                let _this = this;
                uni.getSystemInfo({
                    success(res) {
                        _this.scrollviewHigh  = res.windowHeight;
                    }
                });
            },
            
            /*状态切换*/
            stateFunc(e) {
                let self = this;
                if (self.state_active != e) {
                //    self.page = 1;
                    self.loading = true;
                    self.state_active = e;
                    self.listData = [];
                    self.getlist();
                }
            },
            
            /*搜索*/
            gotoSearch() {
                let self=this;
                //self.page = 1;
                self.listData = [];
                self.getlist();    
            },
 
            /*获取列表*/
            getlist() {
                let self = this;
                uni.showLoading({
                    title: '加载中'
                });
                let status = self.status;
                self.loading = true;
                self._get(
                    'plus.release.order/lists', {
                        state_active:self.state_active,
                        keyword:self.keyword,
                        product_type:1,
                    },
                    function(res) {
                        self.listData = res.data.list.data;
                        uni.hideLoading();
                        self.loading = false;
                    }
                );
            },
            
            /*跳转详情*/
            gotoDetail(e) {
                //let url = 'pages3/release/order/detail?id=' + e.id
                //this.gotoPage(url);
            },
            /*修改*/
            onEva: function(e) {
                let self = this;
                self.order_data = e;
                self.isEva = true;
            },
            /*关闭修改*/
            closeEva: function(e) {
                let self = this;
                self.page = 1;
                self.listData = [];
                self.getlist();
                self.isEva = false;
            },
            //删除
            onCancel(e) {
                let self = this;
                // 请求的参数
                let id = e.id;
                wx.showModal({
                    title: "提示",
                    content: "您确定进行此操作吗?",
                    success: function(o) {
                        if(o.confirm){
                            self._post('plus.release.order/cancel', {
                                id:id,
                             }, (res) => {
                                    uni.showToast({
                                        title: res.msg,
                                        duration: 2000,
                                        icon: 'success',
                                    });
                                    self.page = 1;
                                    self.listData = [];
                                    self.getlist();
                            }); 
                        }
                    }
                });    
            },
 
        }
    };
</script>
 
<style lang="scss">
    page {
        background: #f2f2f2;
    }
 
    .bargain-container .inner-tab {
        background: #ffffff;
    }
 
    .bargain-container .inner-tab .tab-list {
        height: 100rpx;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        background: #FFFFFF;
    }
 
    .bargain-container .inner-tab .item {
        height: 100rpx;
        line-height: 100rpx;
        white-space: nowrap;
        padding: 0 30rpx;
        font-size: 30rpx;
        color: #333333;
    }
 
    .bargain-container .inner-tab .item.active,
    .bargain-container .inner-tab .item .arrow.active .iconfont {
        background: #FFFFFF;
        font-size: 32rpx;
        color: #F6220C;
        position: relative;
    }
 
    .bargain-container .inner-tab .item.active::after {
        content: '';
        width: 60%;
        height: 4rpx;
        background: #F6220C;
        border-radius: 2rpx;
        position: absolute;
        bottom: 17rpx;
        left: 0;
        right: 0;
        margin: auto;
    }
 
    .bargain-container .inner-tab .box {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
    }
 
    .bargain-container .inner-tab .arrows {
        margin-left: 10rpx;
        line-height: 0;
    }
 
    .bargain-container .inner-tab .iconfont {
        line-height: 24rpx;
        font-size: 24rpx;
    }
 
    .bargain-container .inner-tab .arrow,
    .bargain-container .inner-tab .svg-icon {
        width: 20rpx;
        height: 20rpx;
    }
 
    .bargain-container .banner-image {
        width: 100%;
        box-sizing: border-box;
    }
 
    .bargain-container .banner-image image {
        width: 750rpx;
        height: 365rpx;
    }
 
    .bargain-container .ad-datetime::v-deep text {
        color: #333333;
        font-size: 28rpx;
    }
 
    .bargain-container .ad-datetime::v-deep .box {
        padding: 4rpx;
        border-radius: 4rpx;
        background: #F6220C;
        color: #ffffff;
    }
 
    .bargain-list .list {
        padding: 20rpx;
    }
 
    .bargain-list .list .item {
        width: 100%;
        padding: 30rpx;
        margin-bottom: 20rpx;
        box-sizing: border-box;
        border-radius: 16rpx;
        background: #ffffff;
    }
 
    .bargain-list .product-cover {
        padding: 4rpx;
    }
 
    .bargain-list .product-cover image {
        width: 120rpx;
        height: 120rpx;
        border-radius: 12rpx;
    }
 
    .bargain-list .product-info {
        flex: 1;
        //padding-left: 20rpx;
        overflow: hidden;
    }
 
    .bargain-list .product-cover .people-num {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 50rpx;
        padding: 0 20rpx;
        line-height: 50rpx;
        font-size: 24rpx;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.6);
    }
 
    .bargain-list .ad-datetime .box {
        padding: 4rpx;
        border-radius: 4rpx;
        background: #000000;
        color: #ffffff;
    }
 
    .bargain-list .product-title {
        width: 100%;
        min-height: 40rpx;
        line-height: 40rpx;
        font-size: 32rpx;
        color: #333333;
    }
 
    .bargain-list .people-num {
        width: 100%;
    }
 
    .bargain-list .already-sale {
        padding: 4rpx 0;
        color: #999;
        font-size: 24rpx;
    }
 
    .bargain-list .price {
        width: 100%;
        color: $dominant-color;
        font-size: 24rpx;
    }
 
    .bargain-list .price .num {
        padding: 0 4rpx;
    }
 
    .bargain-list .slider-box .slider {
        margin-top: 10rpx;
        height: 10rpx;
        background: #cccccc;
        border-radius: 5rpx;
    }
 
    .bargain-list .slider-box .slider-inner {
        height: 10rpx;
        background: #e2231a;
        border-radius: 5rpx;
    }
 
    .bargain-list .right-btn button {
        height: 60rpx;
        line-height: 60rpx;
        border-radius: 30rpx;
        background: #8D60FF;
        color: #ffffff;
        font-size: 32rpx;
    }
    .add_add {
        position: fixed;
        bottom: 20rpx;
        left: 5%;
        width: 90%;
        height: 80rpx;
        line-height: 80rpx;
        border-radius: 80rpx;
        /* background: #ff5704; */
        @include background_color('background_color');
        color: #fff;
        font-size: 30rpx;
        display: flex;
        justify-content: center;
        margin: 0 auto;
    }
</style>