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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
<template>
    <view  :data-theme='theme()'  :class="'order-datail pb100 ' + theme()" v-if="!loadding">
        <!--详情状态-->
        <view class="order-state d-s-c">
            <view class="icon-box">
                <span v-if="detail.state_text == '已付款,待发货'" class="icon iconfont icon-icon"></span>
                <span v-if="detail.state_text == '待付款'" class="icon iconfont icon-icon"></span>
                <span v-if="detail.state_text == '已发货,待收货'" class="icon iconfont icon-daishouhuo"></span>
                <span v-if="detail.state_text == '已完成'" class="icon iconfont icon-xuanze"></span>
                <span v-if="detail.state_text == '已取消'" class="icon iconfont icon-gantanhao"></span>
            </view>
            <view class="state-cont flex-1">
                <view class="state-txt d-b-c">
                    <text class="desc f34">{{ detail.state_text }}</text>
                </view>
                <view class="status-price pt10" v-if="detail.pay_status.value == 10">应付金额:¥ {{ detail.pay_price }}
                </view>
                <view class="countdown-datetime" v-if="detail.pay_end_time">
                    <text>剩{{detail.pay_end_time}}自动关闭</text>
                </view>
            </view>
            <view class="dot-bg"></view>
        </view>
 
        <!--物流地址-->
        <view class="order-express p30 d-s-c" v-if="detail.delivery_type.value == 10 || detail.delivery_type.value == 40">
            <view class="icon-box">
                <image style="width: 42rpx;height: 42rpx;" src="../../static/icon/address_icon.png" mode=""></image>
            </view>
            <view class="cont-text flex-1 o-h ml20 f30 pr20">
                <view class="express-text f26"><text class="pr20">{{ detail.address.name }}</text><text class="gray9">
                        {{ detail.address.phone }}</text></view>
                <view class="gray3 f26 pt10">
                    {{ detail.address.region.province }}{{ detail.address.region.city }}{{ detail.address.region.region }}{{ detail.address.detail }}
                </view>
            </view>
            <view class="d-b-c d-c address-icon" v-if="source=='supplier'||source=='clerk'">
                <view class="icon iconfont icon-002dianhua theme-btn" @click="callPhone(detail.address.phone)"></view>
                <view class="icon iconfont icon-diliweizhi theme-btn" @click="openmap(detail.address.latitude,detail.address.longitude)"></view>
            </view>
        </view>
        <!-- 上门自提:自提门店 -->
        <view class="order-express p30 d-s-s" v-if="detail.delivery_type.value == 20">
            <view class="flow-delivery__title m-top20"><span class="icon iconfont icon-dizhi1">自提门店</span></view>
            <view class="cont-text flex-1 o-h ml20 f30">
                <view class="express-text">
                    {{ extractStore.store_name }} {{ extractStore.phone }}
                    <view class="f24 gray9 pt10">
                        {{ extractStore.region.province }} {{ extractStore.region.city }}
                        {{ extractStore.region.region }} {{ extractStore.address }}
                    </view>
                </view>
            </view>
        </view>
 
        <!-- 物流信息 -->
        <view class="group bg-white" v-if="detail.delivery_type.value == 10 && detail.delivery_status.value == 20"
            @click="gotoExpress(detail.order_id)">
            <view class="d-b-c">
                <view class="f28">
                    <view class="p-20-0">
                        <text class="gray9">物流公司:</text>
                        <text>{{ detail.express.express_name }}</text>
                    </view>
                    <view class="p-20-0">
                        <text class="gray9">物流单号:</text>
                        <text>{{ detail.express_no }}</text>
                    </view>
                </view>
                <view><text class="icon iconfont icon-jiantou"></text></view>
            </view>
        </view>
 
        <!--购物列表-->
        <view class="shops group bg-white">
            <view class="group-hd border-b-e"
                @tap="gotoShopPage(detail.supplier.shop_supplier_id)">
                <view class="left ">
                    <i class="icon iconfont icon-dianpu1"></i>
                    <text class="min-name">{{detail.supplier.name}}</text>
                    <text class="icon iconfont icon-jiantou"></text>
                </view>
            </view>
            <view class="list">
                <view class="one-product p-20-0" v-for="(item, index) in detail.product" :key="index">
                    <view class="d-f">
                        <view class="cover">
                            <image :src="item.image.file_path" mode="aspectFit"></image>
                        </view>
                        <view class="info flex-1 p-0-20">
                            <view class="d-b-s">
                                <view class="flex-1">
                                    <view class="title f28 gray3">{{ item.product_name }}</view>
                                    <view class="describe mt10 f24" v-if="item.spec_type==20">{{ item.product_attr }}
                                    </view>
                                </view>
                                <view>
                                    <view class=" count_choose">
                                        <view class="price">
                                            ¥
                                            <text class="num">{{ item.product_price }}</text>
                                        </view>
                                        <view class="num-wrap">
                                            <view class="f22 tr">×{{ item.total_num }}</view>
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
                    </view>
                    <view class="table-record f28" v-if="item.table_record_id">
                        <view @click="tableRecordView(index)" class="mt10 tr f28 record-click" :class="{'record-icon' : item.showTableRecord}">
                            <text>查看更多数据</text>
                            <view class="iconfont icon-icon1"></view>
                        </view>
                        <view class="table-record-info mt10 p20" :class="{'record-show' : item.showTableRecord}">
                            <TableView :table_record_id="item.table_record_id"></TableView>
                        </view>
                    </view>
                    <view class="mt10 tr f28" v-if="item.is_user_grade==true">
                        <text class="theme-price f26">会员折扣价:</text>
                        <text class="theme-price f32">{{item.grade_product_price}}</text>
                    </view>
                    <view class="pt10 d-e-c" v-if="source=='user'">
                        <!-- 申请售后 -->
                        <view class="m-top20 dis-flex flex-x-end">
                            <text v-if="item.refund">已申请售后</text>
                            <view v-else-if="detail.isAllowRefund" @click="onApplyRefund(item.order_product_id)"><button
                                    type="default">申请售后</button></view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
 
        <!--订单信息-->
        <view class="group bg-white f26">
            <view class="p-20-0">
                <text class="">订单编号:</text>
                <text>{{ detail.order_no }}</text>
            </view>
            <view class="p-20-0">
                <text class="">下单时间:</text>
                <text>{{ detail.create_time }}</text>
            </view>
            <view class="p-20-0">
                <text class="">支付方式:</text>
                <text>{{ detail.pay_type.text }}</text>
            </view>
            <view class="p-20-0 d-s-c">
                <text class="">配送方式:</text>
                <text class="flex-1">{{ detail.delivery_type.text }}</text>
                <block v-if="detail.extract_clerk_id>0 && source !='clerk' && detail.pay_status.value == 20 && detail.delivery_type.value == 40">
                    <button style="float:right;line-height: 50rpx;" class="btn-red-border f24"  @click="openExtractClerk(detail.order_no,detail.extractClerk)">查看配送员</button>
                </block>
            </view>
            <view class="p-20-0"
                v-if="detail.delivery_type.value==30 && detail.order_status.value==30 && detail.virtual_content !=''">
                <text class="">发货信息:</text>
                <text>{{ detail.virtual_content }}</text>
            </view>
            <view class="p-20-0">
                <text class="">备注:</text>
                <text>{{ detail.buyer_remark }}</text>
            </view>
            <view class="p-20-0" v-if="detail.order_status.value==20 && detail.cancel_remark !=''">
                <text class="">商家备注:</text>
                <text>{{ detail.cancel_remark }}</text>
            </view>
            <view v-if="service_open&&detail.supplier.user_id!=user_id" class="p-20-0 kefu" @click="tochat">
                <text class="icon iconfont icon-kefu2"></text>
                <text class="">联系卖家</text>
            </view>
        </view>
 
        <view class="group bg-white f26">
            <view class="p-20-0 d-b-c" v-if="detail.order_source!=70">
                <text class="">商品总价</text>
                <text>¥ {{ detail.total_price }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.order_source==70">
                <text class="">定金:</text>
                <text>¥{{ detail.advance.pay_price }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.pay_price&&detail.order_source==70">
                <text class="">尾款:</text>
                <text>¥{{ detail.total_price }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.advance&&detail.advance.reduce_money > 0">
                <text class="">尾款立减</text>
                <text>-¥ {{ detail.advance.reduce_money }}</text>
            </view>
            <view class="p-20-0 d-b-c">
                <text class="">运费</text>
                <text>¥ {{ detail.express_price }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.product_reduce_money > 0">
                <text class="">商品立减</text>
                <text>-¥ {{ detail.product_reduce_money }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.points_money>0">
                <text class="">{{points_name()}}抵扣金额:</text>
                <text class="theme-price">- ¥{{ detail.points_money }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if=" detail.coupon_money>0">
                <text class="">店铺优惠券</text>
                <text class="theme-price">- ¥ {{ detail.coupon_money }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if=" detail.coupon_money_sys>0">
                <text class="">平台优惠券</text>
                <text class="theme-price">- ¥ {{ detail.coupon_money_sys }}</text>
            </view>
            <view class="p-20-0 d-b-c" v-if="detail.fullreduce_money>0">
                <text class="">店铺满减</text>
                <text class="theme-price">- ¥ {{ detail.fullreduce_money }}</text>
            </view>
            <view class="p-20-0 d-e-c fb f34">
                实付金额:
                <text class="red" v-if="detail.order_source==70">¥{{ (detail.pay_price*1+detail.advance.pay_price*1).toFixed(2) }}</text>
                <text class="red" v-else>¥ {{ detail.pay_price }}</text>
            </view>
        </view>
        <view class="group bg-white" v-if="detail.pay_status.value == 20 && detail.delivery_type.value == 10 && detail.order_status.value==10&&detail.delivery_status.value == 10&&source=='supplier'">
        <!-- <view> -->
            <view class="f32 fb p-0-20">去发货</view>
            <!-- 下拉框 -->
            <view class="table-item">
                <view class="d-s-c make-top">
                    <view class="fb color-28 f26 mr20">物流公司</view>
                </view>
                <view class="">
                    <picker class="" value="" @change="changeSelect($event)" :range="expressList" range-key='express_name'>
                        <view class="selectpicker">
                            <view class="make-item input-box flex-1">{{express_name|| '请选择'}}</view>
                            <view class="icon iconfont icon-jiantou"></view>
                        </view>
                    </picker>
                </view>
            </view>
            <view class="table-item">
                <view class="d-s-c make-top">
                    <view class="fb color-28 f26 mr20">物流单号</view>
                </view>
                <view class="pr">
                    <input class="make-item selectpicker input-box" v-model="express_no" type="text"
                        placeholder="请输入" />
                </view>
            </view>
            <view></view>
            <view><button type="default" class="btn-blue send_btn" @click="sendPro">确认发货</button></view>
        </view>
        <view  v-if="detail.pay_status.value == 20 && detail.order_status.value == 21 &&source=='supplier'">
            <view class="f32 fb p-0-20 mb20 mt20">用户取消订单</view>
            <view class="red p-0-20 mb20">当前买家已付款申请取消订单,请审核是否同意,如同意则自动退回付款金额(微信支付原路退款)并关闭订单</view>
            <view class="p-0-20">
                <view class="d-s-c mb20">
                    <view class="make-top w120 mr10">
                        <view class="fb color-28 f26">审核状态</view>
                    </view>
                    <radio-group class="d-a-c" @change="changeRadio($event)">
                        <label class="d-s-c make-item ">
                            <view>
                                <radio style="transform:scale(0.7)" color="#ff6633" :checked="status == 1" :value="1" />
                            </view>
                            <view class="f26 color-57">同意</view>
                        </label>
                        <label class="d-s-c make-item ">
                            <view>
                                <radio style="transform:scale(0.7)" color="#ff6633" :checked="status == 0" :value="0" />
                            </view>
                            <view class="f26 color-57">拒绝</view>
                        </label>
                    </radio-group>
                </view>
                <view v-if="status == 0" class="d-s-c mb20">
                    <view class="w120 mr10">拒绝原因</view>
                    <input type="text" class="make-item selectpicker input-box" v-model="cancel_refuse" />
                </view>
            </view>
            <view><button  class="theme-btn send_btn" @click="Cancel">确认</button></view>
        </view>
                <template  v-if="detail.order_source!=70">
        <!-- 操作栏 -->
        <view v-if="detail.order_status.value != 20&&detail.order_status.value != 30 && source=='user'"
            class="foot-btns">
            <!-- 取消订单 -->
            <button class="theme-borderbtn" v-if="detail.pay_status.value == 10"
                @click="cancelOrder(detail.order_id)">取消订单</button>
 
            <block v-if="detail.order_status.value != 21">
                <block v-if="detail.pay_status.value == 20 && detail.delivery_status.value == 10">
                    <button @click="cancelOrder(detail.order_id)" class="theme-borderbtn">申请取消</button>
                </block>
            </block>
            <text v-else class="count f28 gray9">取消申请中</text>
            <block v-if="detail.pay_status.value == 10">
                <!-- 订单付款 -->
                <button @click="onPayOrder(detail.order_id)"  v-if="detail.pay_status.value == 10"
                    class="ml10 theme-btn">去支付</button>
            </block>
            <!-- 确认收货 -->
            <block v-if="detail.delivery_status.value == 20 && detail.receipt_status.value == 10">
                <button class="theme-btn" @click="orderReceipt(detail.order_id)">确认收货</button>
            </block>
        </view>
        </template>
        <!-- 配送员操作栏 by lyzflash -->
        <view v-if="detail.order_status.value == 10 && detail.delivery_type.value == 40 && source=='clerk' && detail.delivery_status.value == 10"
            class="foot-btns">
            <!-- 确认配送 -->
            <block v-if="detail.delivery_status.value == 10">
                <button class="theme-btn" @click="confirmDelivery(detail.order_id)">开始配送</button>
            </block>
        </view>
 
        <!--支付选择-->
        <!-- <Popup :show="isPayPopup" msg="支付方式" @hidePopup="hidePopupFunc">
            <view class="buy-checkout ww100">
                <view :class="pay_type == 20 ? 'item active border-b-e' : 'item border-b-e'" @click="payTypeFunc(20)">
                    <view class="d-s-c">
                        <view class="icon-box d-c-c mr10"><span class="icon iconfont icon-weixin"></span></view>
                        <text class="key">微信支付</text>
                    </view>
                    <view class="icon-box d-c-c"></view>
                </view>
                <view v-if="showAlipay" :class="pay_type == 30 ? 'item active border-b-e' : 'item border-b-e'"
                    @click="payTypeFunc(30)">
                    <view class="d-s-c">
                        <view class="icon-box d-c-c mr10"><span class="icon iconfont icon-zhifubao"></span></view>
                        <text class="key">支付宝支付</text>
                    </view>
                    <view class="icon-box d-c-c"></view>
                </view>
                <view :class="pay_type == 10 ? 'item active' : 'item'" @click="payTypeFunc(10)">
                    <view class="d-s-c">
                        <view class="icon-box d-c-c mr10"><span class="icon iconfont icon-yue"></span></view>
                        <text class="key">余额支付</text>
                    </view>
                    <view class="icon-box d-c-c"></view>
                </view>
            </view>
            <view class="bts"></view>
        </Popup>-->
        <Popup :show="isExtractClerk" type="middle" @hidePopup="hideExtractClerk">
            <view class="ww100 p20 box-s-b">
                <view class="f32 fb mb20">查看配送员</view>
                <view class="d-s-c mb20">
                    <view class="w120 f26">订单号:</view>
                    <view>{{order_no}}</view>
                </view>
                <view class="d-s-s mb20">
                    <view class="w120 f26">配送员:</view>
                    
                    <view>
                        <view v-if="extract_clerk.clerk_id">
                            姓名:{{extract_clerk.real_name}};
                            手机号:{{extract_clerk.mobile}}
                        </view>
                    </view>
                </view>
                <view class="d-c-c">
                    <button class="send_btn btn-gray-border mr30" @click="hideExtractClerk">取消</button>
                    <button class="send_btn btn-red" @click="callPhone(extract_clerk.mobile)">拨打电话</button>
                </view>
            </view>
        </Popup>
        <Mpservice v-if="isMpservice" :isMpservice="isMpservice" :shopSupplierId="detail.supplier.shop_supplier_id"
            @close="closeMpservice"></Mpservice>
    </view>
</template>
 
<script>
    import Popup from '@/components/uni-popup.vue';
    import {
        pay
    } from '@/common/pay.js';
    import Mpservice from '@/components/mpservice/Mpservice.vue';
    import TableView from '@/components/table/table-view.vue';
    export default {
        data() {
            return {
                /*是否加载完成*/
                loadding: true,
                indicatorDots: true,
                autoplay: true,
                interval: 2000,
                duration: 500,
                /*是否显示支付类别弹窗*/
                isPayPopup: false,
                /*订单id*/
                order_id: 0,
                /*订单详情*/
                detail: {
                    order_status: [],
                    address: {
                        region: []
                    },
                    product: [],
                    pay_type: [],
                    delivery_type: [],
                    pay_status: [],
                },
                extractStore: {},
                source: 'user',
                service_open: 0,
                service_type: 10,
                isMpservice: false,
                /*是否显示支付宝支付,只有在h5,非微信内打开才显示*/
                showAlipay: false,
                user_id: 0,
                expressList: [],
                express_id: '',
                express_name:'',
                express_no: '',
                status: 1,
                cancel_refuse: '',
                pay_type:10,
                order_no:'',
                isExtractClerk:false,
                extract_clerk:{}
            };
        },
        components: {
            Popup,
            Mpservice,
            TableView
        },
        onLoad(e) {
            this.order_id = e.order_id;
            this.user_id = uni.getStorageSync('user_id');
            if (e.source) {
                this.source = e.source;
            }
        },
        mounted() {
            uni.showLoading({
                title: '加载中'
            });
            /*获取订单详情*/
            this.getData();
        },
        methods: {
            /*关闭查看配送员 */
            hideExtractClerk(e) {
                this.isExtractClerk = false;
            },
            /* 打开查看配送员 */
            openExtractClerk(e,clerk) {
                this.isExtractClerk = true;
                this.order_no=e;
                this.extract_clerk=clerk
            },
            callPhone(phone){
                uni.makePhoneCall({
                    phoneNumber: phone //仅为示例
                });
            },
            /*获取数据*/
            getData() {
                let self = this;
                let order_id = self.order_id;
                let url = 'user.order/detail';
                if (this.source == 'supplier' || this.source == 'clerk') {
                    url = 'supplier.order/detail';
                }
                self.loadding = true;
                self._get(url, {
                        order_id: order_id,
                        pay_source: self.getPlatform()
                    },
                    function(res) {
                        self.expressList=res.data.expressList;
                        self.detail = res.data.order;
                        self.extractStore = res.data.order.extractStore;
                        self.service_open = res.data.setting.service_open;
                        if (res.data.setting.mp_service == null) {
                            self.service_type = 10;
                        } else {
                            self.service_type = res.data.setting.mp_service.service_type;
                        }
                        if (res.data.show_alipay) {
                            self.showAlipay = true;
                        }
                        self.loadding = false;
                        uni.hideLoading();
                    }
                );
            },
            /*显示支付方式*/
            hidePopupFunc() {
                this.isPayPopup = false;
            },
 
            /*取消订单*/
            cancelOrder(e) {
                let self = this;
                let order_id = e;
                wx.showModal({
                    title: '提示',
                    content: '您确定要取消当前订单吗?',
                    success: function(o) {
                        if (o.confirm) {
                            uni.showLoading({
                                title: '正在处理'
                            });
                            self._get(
                                'user.order/cancel', {
                                    order_id: order_id
                                },
                                function(res) {
                                    uni.hideLoading();
                                    uni.showToast({
                                        title: '操作成功',
                                        duration: 2000,
                                        icon: 'success'
                                    });
                                    self.getData();
                                }
                            );
                        }
                    }
                });
            },
 
            /*确认收货*/
            orderReceipt(order_id) {
                let self = this;
                wx.showModal({
                    title: '提示',
                    content: '您确定要收货吗?',
                    success: function(o) {
                        if (o.confirm) {
                            uni.showLoading({
                                title: '正在处理'
                            });
                            self._post(
                                'user.order/receipt', {
                                    order_id: order_id
                                },
                                function(res) {
                                    uni.hideLoading();
                                    uni.showToast({
                                        title: res.msg,
                                        duration: 2000,
                                        icon: 'success'
                                    });
                                    self.getData();
                                }
                            );
                        }
                    }
                });
            },
            gotoShopPage(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', self.shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id)
            },
            /*查看物流*/
            gotoExpress(order_id) {
                this.gotoPage('/pages/order/express/express?order_id=' + order_id);
            },
            /*申请售后*/
            onApplyRefund(e) {
                this.gotoPage('/pages/order/refund/apply/apply?order_product_id=' + e);
            },
 
            /*去支付*/
            payTypeFunc(payType) {
                let self = this;
                let order_id = self.order_id;
                self.isPayPopup = false;
                uni.showLoading({
                    title: '加载中'
                });
                self._post(
                    'user.order/pay', {
                        payType: payType,
                        order_id: order_id,
                        pay_source: self.getPlatform()
                    },
                    function(res) {
                        uni.hideLoading();
                        pay(res, self);
                    }
                );
            },
 
            /*支付方式选择*/
            onPayOrder(orderId) {
                let self = this;
                self.gotoPage('/pages/order/cashier?order_type=1&order_id='+orderId)
            },
            gotoProduct(item) {
                this.gotoPage('/pages/product/detail/detail?product_id=' + item.product_id);
            },
            tochat() {
                if (this.service_type == 10) {
                    this.isMpservice = true;
                }
                if (this.service_type == 20) {
                    this.gotoPage('/pages/plus/chat/chat?user_id=' + this.detail.supplier.supplier_user_id +
                        '&shop_supplier_id=' + this.detail.supplier
                        .shop_supplier_id + "&nickName=" + this.detail.supplier.name + '&order_id=' + this
                        .order_id);
                }
            },
            changeRadio(e) {
                this.status = e.detail.value;
            },
            Cancel(){
                let self = this;
                wx.showModal({
                    title: '提示',
                    content: '您确定审核吗?',
                    success: function(o) {
                        if (o.confirm) {
                            uni.showLoading({
                                title: '正在处理'
                            });
                            self._post(
                                'supplier.order/confirmCancel', {
                                    order_id:self.detail.order_id,
                                    is_cancel: self.status,
                                    cancel_refuse:self.cancel_refuse
                                },
                                function(res) {
                                    uni.hideLoading();
                                    self.showSuccess(res.msg);
                                    self.getData();
                                }
                            );
                        }
                    }
                });
            },
            changeSelect(e){
                console.log(e);
                this.express_name =this.expressList[e.detail.value].express_name;
                this.express_id = this.expressList[e.detail.value].express_id;
            },
            sendPro(){
                let self = this;
                wx.showModal({
                    title: '提示',
                    content: '您确定要发货吗?',
                    success: function(o) {
                        if (o.confirm) {
                            uni.showLoading({
                                title: '正在处理'
                            });
                            self._post(
                                'supplier.order/delivery', {
                                    order_id:self.detail.order_id,
                                    express_id: self.express_id,
                                    express_no:self.express_no
                                },
                                function(res) {
                                    uni.hideLoading();
                                    self.showSuccess(res.msg);
                                    self.getData();
                                }
                            );
                        }
                    }
                });
            },
            tableRecordView(e) {
                this.$set(this.detail.product[e], 'showTableRecord', !this.detail.product[e].showTableRecord);
            },
            /* 打开地图 by lzyflash */
            openmap() {
                let self = this;
                uni.openLocation({
                    latitude: Number(self.detail.address.latitude),
                    longitude: Number(self.detail.address.longitude),
                    name: self.detail.address.house_number,
                    address: self.detail.address.detail
                });
            },
            /* 确认配送 by lzyflash */
            confirmDelivery(e) {
                let self = this;
                wx.showModal({
                    title: '提示',
                    content: '您确定要开始配送吗?',
                    success: function(o) {
                        if (o.confirm) {
                            uni.showLoading({
                                title: '正在处理'
                            });
                            self._get(
                                'store.deliveryclerk/orderDelivery', {
                                    order_id: e
                                },
                                function(res) {
                                    uni.hideLoading();
                                    uni.showToast({
                                        title: '操作成功',
                                        duration: 2000,
                                        icon: 'success'
                                    });
                                    self.getData();
                                }
                            );
                        }
                    }
                });
            }
        }
    };
</script>
 
<style scoped>
    page {}
 
    .order-express {
        background: #ffffff;
        margin: 0 20rpx;
        border-radius: 12rpx;
        margin-top: 20rpx;
    }
 
    .order-express .icon-box .iconfont {
        font-size: 50rpx;
    }
 
    .order-datail {
        padding-bottom: 90 rpx;
        background-color: #F2F2F2;
    }
 
    .order-datail .fight-users {
        margin: 0 auto;
    }
 
    .order-datail .fight-users .user-box {
        width: 80rpx;
        height: 80rpx;
        margin: 10rpx;
        border-radius: 50%;
        border: 1px dashed #cccccc;
    }
 
    .order-datail .fight-users {
        padding: 30rpx;
    }
 
    .order-datail .fight-users .user-box image {
        width: 80rpx;
        height: 80rpx;
        border-radius: 50%;
    }
 
    .order-datail .fight-users .user-box .leader {
        position: absolute;
        top: -20rpx;
        left: 50%;
        margin-left: -30rpx;
        width: 60rpx;
        height: 30rpx;
        line-height: 30rpx;
        text-align: center;
        color: #ffffff;
        border-radius: 30rpx;
        border: 1px solid #ffffff;
        background: red;
    }
 
    .order-datail .fight-users .user-box.user-who {
        font-size: 50rpx;
        color: #999999;
    }
 
    .state-cont .countdown-datetime {
        margin-top: 16rpx;
    }
 
    .state-cont .countdown-datetime text {
        padding: 4rpx 8rpx;
        border-radius: 4rpx;
        background: rgba(0, 0, 0, .4);
    }
 
    .icon-dianpu1 {
        margin-right: 15rpx;
    }
 
    .kefu {
        border-top: 1rpx solid #cacaca;
        display: flex;
        justify-content: center;
        align-items: center;
    }
 
    .kefu .icon-kefu2 {
        color: #1296db;
        margin-right: 8rpx;
    }
 
    .group {
        margin: 0 20rpx;
        margin-top: 20rpx;
        border-radius: 12rpx;
    }
 
    .foot-btns button {
        color: #FFFFFF;
        height: 60rpx;
        line-height: 60rpx;
        border-radius: 30rpx;
    }
    .table-item {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #FFFFFF;
        border-radius: 8rpx;
        padding: 26rpx;
        box-sizing: border-box;
    }
    .selectpicker {
        width: 400rpx;
        height: 65rpx;
        line-height: 65rpx;
        padding: 0 23rpx;
        box-sizing: border-box;
        border: 2rpx solid #BFBFBF;
        border-radius: 5rpx;
        font-size: 26rpx;
        font-weight: 500;
        color: #575757;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .selectpicker .jiantou {
        color: #575757;
        font-size: 22rpx;
    }
    
    .send_btn {
        width: 200rpx;
        margin: 0 auto;
    }
    .w120{
        width: 120rpx;
    }
    .pr0 {
        padding-right: 0;
    }
    .table-record-info.record-show {
        display: block;
    }
    .table-record-info {
        background-color: #f7f7f7;
        border-radius: 12rpx;
        display: none;
    }
    .record-click .iconfont {
        display: inline-block;
        margin-left: 6rpx;
    }
    .record-icon .iconfont {
        transform: rotateX(180deg);
    }
    
    .address-icon .icon {
        width: 36rpx;
        height: 36rpx;
        line-height: 36rpx;
        text-align: center;
        font-size: 32rpx;
        border-radius: 60rpx;
        padding: 6rpx;
        margin: 4rpx 0;
    }
</style>