移动系统liao
2025-02-17 557c2711a3e103ebc3d0492344eca9730d5e92b2
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
<template>
    <view>
        <u-toast ref="uToast" /><u-no-network></u-no-network>
        <u-navbar title="订单详情" safeAreaInsetTop fixed placeholder>
            <view class="coreshop-navbar-left-slot" slot="left">
                <u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
                <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
                <u-icon name="home" size="22" @click="goHome"></u-icon>
            </view>
            <view slot="right">
            </view>
        </u-navbar>
        <!--步骤条区域-->
        <view class="coreshop-bg-white coreshop-padding-10" v-if="basics < 9">
            <!--步骤条-->
            <u-steps :current="basics" v-if="basics < 5">
                <u-steps-item title="下单"></u-steps-item>
                <u-steps-item title="付款"></u-steps-item>
                <u-steps-item title="发货"></u-steps-item>
                <u-steps-item title="收货"></u-steps-item>
                <u-steps-item title="评价"></u-steps-item>
            </u-steps>
 
            <!--提示-->
            <view class="coreshop-font-sm coreshop-text-center coreshop-margin-top-15" v-if="basics == 0">
                <view class="coreshop-text-black">拍下成功,待买家支付。</view>
                <view class="coreshop-text-black">
                    <text class="coreshop-text-red">拍下{{orderCancelTime}}分后</text>
                    <text>未支付,自动取消订单。</text>
                </view>
            </view>
            <view class="coreshop-font-sm coreshop-text-center coreshop-margin-top-15" v-if="basics == 1">
                <view class="coreshop-text-black">支付成功,待卖家发货.</view>
            </view>
            <view class="coreshop-font-sm coreshop-text-center coreshop-margin-top-15" v-if="basics == 2">
                <view class="coreshop-text-black">已发货,快递正在路上,务必在收到商品后再确认收货。</view>
                <view class="coreshop-text-black">
                    <text class="coreshop-text-red">发货20天</text>
                    <text>后将自动确认收货</text>
                </view>
            </view>
            <view class="coreshop-font-sm coreshop-text-center coreshop-margin-top-15" v-if="basics == 3">
                <view class="coreshop-text-black">已收货,请您对此次购物体检进行评价。</view>
                <view class="coreshop-text-black">
                    <text class="coreshop-text-red">收货30天</text>
                    <text>后将自动评价</text>
                </view>
            </view>
            <!--状态图标-->
            <view class="coreshop-bg-white coreshop-padding-10 coreshop-text-center coreshop-status-img-view coreshop-margin-top-10" v-if="basics == 4">
                <view class="are-img-view">
                    <image class="are-img" src="/static/images/common/are.png" mode="widthFix" />
                </view>
                <view class="coreshop-font-sm coreshop-text-black">交易成功,感谢您的评价</view>
            </view>
            <!--状态图标-->
            <view class="coreshop-bg-white coreshop-padding-10 coreshop-text-center coreshop-status-img-view coreshop-margin-top-10" v-if="basics == 6">
                <view class="are-img-view">
                    <image class="are-img" src="/static/images/common/are.png" mode="widthFix" />
                </view>
                <view class="coreshop-font-sm coreshop-text-black">交易成功.期待下次服务。</view>
            </view>
            <!--状态图标-->
            <view class="coreshop-bg-white coreshop-padding-10 coreshop-text-center coreshop-status-img-view coreshop-margin-top-10" v-if="basics == 7">
                <view class="are-img-view">
                    <image class="are-img" src="/static/images/common/arg.png" mode="widthFix" />
                </view>
                <view class="coreshop-font-sm coreshop-text-black">订单已取消</view>
            </view>
        </view>
 
        <!-- 团购分享拼单 -->
        <view class="coreshop-bg-white coreshop-card-box" v-if="orderInfo.orderType==2 && orderInfo.status != 3 && orderInfo.payStatus!=1">
            <view class="coreshop-card-view coreshop-address-view">
                <view v-if="teamInfo.status==1" class="coreshop-font-lg coreshop-text-bold coreshop-text-black">待拼团,还差{{ teamInfo.teamNums || ''}}人</view>
                <view v-else-if="teamInfo.status==2" class="coreshop-font-lg coreshop-text-bold coreshop-text-black">拼团成功,待发货</view>
                <view v-else-if="teamInfo.status==3" class="coreshop-font-lg coreshop-text-bold coreshop-text-black">拼团失败</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="coreshop-cell-group coreshop-margin-top-10 coreshop-margin-bottom-10">
                    <view class="group-swiper">
                        <view class='coreshop-cell-item' v-if="teamInfo.currentCount">
                            <view class='coreshop-cell-item-hd'>
                                <view class="user-head-img-c" v-for="(item, index) in teamInfo.list" :key="index">
                                    <view class="user-head-img-tip" v-if="item.recordId == teamInfo.teamId">拼主</view>
                                    <image class="user-head-img coreshop-head-icon" :src='item.userAvatar' mode=""></image>
                                </view>
                                <view v-if="teamInfo.teamNums > 3">
                                    <view class="uhihn" v-for="n in 3" :key="n">?</view>
                                    <view class="uhihn">···</view>
                                </view>
                                <view v-else>
                                    <view class="uhihn" v-for="n in teamInfo.teamNums" :key="n">?</view>
                                </view>
                            </view>
                        </view>
                    </view>
                    <view class="coreshop-margin-bottom-10 coreshop-percent-100 coreshop-flex coreshop-flex-direction coreshop-align-center coreshop-justify-center">
                        <view class="coreshop-width-fit-content">
                            <u-button type="success" size="small" @click="goInvition">
                                <u-icon name="share-fill" color="#fff" label="立即邀请好友拼单" labelColor="#fff"></u-icon>
                            </u-button>
                        </view>
                    </view>
                    <!--<view class="coreshop-cell-item-ft" v-if="teamInfo.status==1">
                        <u-button type="success" size="mini" @click="goInvition()">邀请拼单</u-button>
                    </view>-->
                </view>
            </view>
        </view>
 
        <!--物流信息-->
        <view class="coreshop-bg-white coreshop-card-box" v-if="basics != 0 && !orderInfo.store">
            <view class="coreshop-card-view coreshop-address-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black flex justify-between">
                    物流信息
                    <text class="coreshop-font-sm" v-if="basics == 2">已发货,请注意查收</text>
                </view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="wrap">
                    <u-row gutter="16">
                        <u-col span="1">
                            <u-icon name="map-fill" size="19"></u-icon>
                        </u-col>
                        <u-col span="11">
                            <view class="coreshop-text-black  coreshop-flex coreshop-justify-start">
                                <text>收货人:</text>
                                <text>{{ orderInfo.shipName || ''}}</text>
                                <text class="coreshop-margin-left-10 coreshop-margin-right-10">{{  orderInfo.shipMobile || '' }}</text>
                                <view class="coreshop-width-fit-content">
                                    <u-tag text="复制" type="success" mode="dark" size="mini" @click="doCopyData(orderInfo.shipName + ' - ' + orderInfo.shipMobile + ' - ' + orderInfo.shipAreaName + orderInfo.shipAddress)" />
                                </view>
                            </view>
                            <view class="coreshop-text-gray coreshop-font-sm flex">
                                <view class="u-line-2">{{ orderInfo.shipAreaName|| ''}} {{orderInfo.shipAddress || ''}}</view>
                            </view>
                        </u-col>
                    </u-row>
                </view>
 
                <view class="coreshop-cell-group" v-if="isDelivery">
                    <!--<view class="coreshop-cell-item">
                    <view class="coreshop-cell-bd-view black-text">
                        <text class="coreshop-cell-bd-text">已发货,请注意查收</text>
                    </view>
                </view>-->
                    <view class='coreshop-cell-item coreshop-padding-top-10 coreshop-padding-bottom-10' v-for="(v, k) in orderInfo.delivery" :key="k" @click="logistics(k)">
                        <view class='coreshop-cell-item-bd'>
                            <view class="coreshop-cell-bd-view">
                                <text class="coreshop-cell-bd-text">{{v.logiName|| ''}} : {{v.logiNo|| ''}}</text>
                            </view>
                        </view>
                        <view class="coreshop-cell-item-ft">
                            <u-icon name="map-fill" size="19" :label="v.createTime || ''" labelSize="12" labelPos="left"></u-icon>
                        </view>
                    </view>
                </view>
 
            </view>
        </view>
 
        <!--提货信息-->
        <view class="coreshop-bg-white coreshop-card-box" v-if="orderInfo.store">
            <view class="coreshop-card-view coreshop-order-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black">提货信息</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="coreshop-text-black coreshop-text-bold title-left-view coreshop-margin-bottom-10">
                    <text>{{orderInfo.store.storeName|| ''}}</text>
                </view>
 
                <view class="coreshop-text-black title-view">
                    <view class="title">门店电话</view>
                    <view class="coreshop-text-right">
                        <text>{{orderInfo.store.mobile|| '无'}}</text>
                    </view>
                </view> <view class="coreshop-text-black title-view">
                    <view class="title">门店地址</view>
                    <view class="coreshop-text-right">
                        <text> {{orderInfo.store.address|| '无'}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view">
                    <view class="title">提货人信息</view>
                    <view class="coreshop-text-right">
                        <text>{{orderInfo.shipName|| ''}} - {{orderInfo.shipMobile|| ''}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="lading.status">
                    <view class="title">提货码:</view>
                    <view class="coreshop-text-right"  @click="showQrcodeBox(lading.code)">
                        <text class="coreshop-text-red">{{lading.code|| ''}}</text>
                    </view>
                </view>
            </view>
        </view>
 
        <!--商品信息-->
        <view class="coreshop-bg-white coreshop-card-box">
            <view class="coreshop-card-view coreshop-shop-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black">商品信息</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="goods-list-view coreshop-margin-bottom-10" v-for="item in orderInfo.items" :key="item.id">
                    <image class="coreshop-avatar radius" :src="item.imageUrl" mode="aspectFill"></image>
                    <view class="goods-info-view">
                        <view class="coreshop-text-black u-line-2" @click="goGoodsDetail(item.goodsId)" v-if="orderInfo.orderType == 1">{{ item.name }}</view>
                        <view class="coreshop-text-black u-line-2" @click="goPinTuanDetail(item.goodsId,orderInfo.objectId)" v-else-if="orderInfo.orderType == 2">{{ item.name }}</view>
                        <view class="coreshop-text-gray coreshop-font-sm u-line-1 introduce" v-if="item.addon">{{ item.addon}}</view>
                        <view class="coreshop-width-fit-content  coreshop-margin-top-10">
                            <u-tag :text="v.name" type="success" size="mini" shape="circle" v-for="(v, k) in item.promotionList" :key="k" />
                        </view>
                        <view class="coreshop-flex coreshop-justify-between coreshop-order-priceBox">
                            <view class="coreshop-text-red coreshop-text-price coreshop-font-lg">{{ item.price }}</view>
                            <view class="coreshop-text-black coreshop-font-sm coreshop-order-nums">数量:{{ item.nums }}</view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
 
        <!--发票信息-->
        <view class="coreshop-bg-white coreshop-card-box" v-if="orderInfo.invoice && orderInfo.invoice.type != 1">
            <view class="coreshop-card-view coreshop-order-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black">发票信息</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
 
                <view class="coreshop-text-black title-view">
                    <view class="title">发票抬头</view>
                    <view class="coreshop-text-right">
                        <text> {{orderInfo.invoice.title|| '无'}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view">
                    <view class="title">发票税号</view>
                    <view class="coreshop-text-right">
                        <text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.invoice.fileUrl">
                    <view class="title">下载发票</view>
                    <view class="coreshop-text-right coreshop-flex coreshop-justify-end">
                        <view class="coreshop-width-fit-content">
                            <u-tag text="保存到本地" type="success" size="mini" mode="dark" @click="saveInvoice()" />
                        </view>
                    </view>
                </view>
            </view>
        </view>
 
 
        <!--费用信息-->
        <view class="coreshop-bg-white coreshop-card-box">
            <view class="coreshop-card-view coreshop-price-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black">费用信息</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="coreshop-text-black title-view" v-if="orderInfo.promotionObj && orderInfo.promotionObj.length > 0">
                    <view class="title">订单优惠</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-text-price" v-for="(item, key) in orderInfo.promotionObj" :key="key" v-show="item.type == 2">{{ item.name}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view">
                    <view class="title">商品总额</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-text-price">{{ orderInfo.goodsAmount}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view">
                    <view class="title">运费</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-margin-right-10">+</text>
                        <text class="coreshop-text-price">{{ orderInfo.costFreight}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.goodsDiscountAmount > 0">
                    <view class="title">商品优惠</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-margin-right-10">-</text>
                        <text class="coreshop-text-price">{{ orderInfo.goodsDiscountAmount }}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.pointMoney > 0">
                    <view class="title">{{pointShowName}}优惠</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-margin-right-10">-</text>
                        <text class="coreshop-text-price">{{ orderInfo.pointMoney }}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.orderDiscountAmount > 0">
                    <view class="title">订单优惠</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-margin-right-10">-</text>
                        <text class="coreshop-text-price">{{ orderInfo.orderDiscountAmount }}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.couponDiscountAmount > 0">
                    <view class="title">优惠券优惠</view>
                    <view class="coreshop-text-right">
                        <text class="coreshop-margin-right-10">-</text>
                        <text class="coreshop-text-price">{{ orderInfo.couponDiscountAmount }}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.payStatus > 1">
                    <view class="title">支付方式</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.paymentName }}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.payStatus > 1">
                    <view class="title">支付时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.paymentTime}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black coreshop-text-bold title-right-view">
                    <text class="coreshop-margin-right-10">应付款:</text>
                    <text class="coreshop-text-price">{{ orderInfo.orderAmount}}</text>
                </view>
 
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
 
                <view class="coreshop-text-black coreshop-text-center">
                    <view class="coreshop-width-fit-content contact-btn">
                        <u-button type="primary" size="small" open-type="contact" bindcontact="showChat">联系客服</u-button>
                    </view>
 
                </view>
 
            </view>
        </view>
 
        <!--订单信息-->
        <view class="coreshop-bg-white coreshop-card-box">
            <view class="coreshop-card-view coreshop-order-view">
                <view class="coreshop-font-lg coreshop-text-bold coreshop-text-black">订单信息({{ orderInfo.globalStatusText || ''}})</view>
                <u-line color="#eee" border-style="dashed" margin="10px 0" />
                <view class="coreshop-text-black title-view">
                    <view class="title">订单编号</view>
                    <view class="coreshop-text-right coreshop-flex coreshop-justify-end">
                        <text class="coreshop-margin-right-10">{{ orderInfo.orderId || ''}}</text>
                        <view class="coreshop-width-fit-content">
                            <u-tag text="复制" type="success" size="mini" mode="dark" @click="doCopyData(orderInfo.orderId)" />
                        </view>
                    </view>
                </view>
                <view class="coreshop-text-black title-view">
                    <view class="title">订单类型</view>
                    <view class="coreshop-text-right">
                        <text>
                            {{ orderInfo.typeText || ''}}
                        </text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.paymentName && orderInfo.payStatus > 1">
                    <view class="title">支付方式</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.paymentName || ''}} </text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="orderInfo.createTime">
                    <view class="title">下单时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.createTime || ''}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="basics > 0 && orderInfo.paymentTime">
                    <view class="title">支付时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.paymentTime || ''}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="basics > 1 && delivery && delivery.createTime">
                    <view class="title">发货时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ delivery.createTime || ''}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="basics > 2 && orderInfo.confirmTime">
                    <view class="title">确认时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.confirmTime || ''}}</text>
                    </view>
                </view>
                <view class="coreshop-text-black title-view" v-if="basics > 3 && orderInfo.updateTime">
                    <view class="title" v-if="basics >= 7">取消时间</view>
                    <view class="title" v-else>完成时间</view>
                    <view class="coreshop-text-right">
                        <text>{{ orderInfo.updateTime || ''}}</text>
                    </view>
                </view>
            </view>
        </view>
 
        <view class="coreshop-bg-white coreshop-card-hight-box" />
 
        <!--为您推荐-->
        <view class="coreshop-recommended-title-view">
            <view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row">
                <view class="coreshop-flex-4 coreshop-text-right">
                    <image class="img-anc" src="/static/images/common/anc.png" mode="widthFix" />
                </view>
                <view class="coreshop-flex-4 coreshop-text-center">
                    <text class="coreshop-text-black coreshop-font-lg">为您推荐</text>
                </view>
                <view class="coreshop-flex-4 coreshop-text-left">
                    <image class="img-anc" src="/static/images/common/anc.png" mode="widthFix" />
                </view>
            </view>
        </view>
 
        <!--推荐列表-->
        <view class="coreshop-goods-group" v-if="otherData.length>0">
            <custom-waterfalls-flow :value="otherData" @wapperClick="wapperClick" @imageClick="imageClick">
                <!-- #ifdef MP-WEIXIN -->
                <view class="goods" v-for="(item,index) in otherData" :key="index" slot="slot{{index}}">
                    <view class="coreshop-padding-top-6 coreshop-padding-bottom-10 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
                        <view class="coreshop-title-294 coreshop-multiple-line-clamp">
                            <text class="coreshop-font-14">{{item.name}}</text>
                        </view>
                        <view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
                            <view class="coreshop-text-red coreshop-font-weight-bold">
                                <text class="coreshop-font-12">¥</text>
                                <text class="coreshop-font-16">{{item.price}}</text>
                                <span class="coreshop-font-xs  coreshop-text-through coreshop-margin-left-6 coreshop-text-gray">{{item.mktprice}}元</span>
                            </view>
                            <view>
                                <text class="coreshop-font-10 coreshop-text-gray">已售{{item.buyCount+item.initialSales}}{{item.unit}}</text>
                            </view>
                        </view>
                    </view>
                </view>
                <!-- #endif -->
                <!-- #ifndef MP-WEIXIN -->
                <template v-slot:default="item">
                    <view class="goods">
                        <view class="coreshop-padding-top-6 coreshop-padding-bottom-10 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
                            <view class="coreshop-title-294 coreshop-multiple-line-clamp">
                                <text class="coreshop-font-14">{{item.name}}</text>
                            </view>
                            <view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
                                <view class="coreshop-text-red coreshop-font-weight-bold">
                                    <text class="coreshop-font-12">¥</text>
                                    <text class="coreshop-font-16">{{item.price}}</text>
                                    <span class="coreshop-font-xs  coreshop-text-through coreshop-margin-left-6 coreshop-text-gray">{{item.mktprice}}元</span>
                                </view>
                                <view>
                                    <text class="coreshop-font-10 coreshop-text-gray">已售{{item.buyCount+item.initialSales}}{{item.unit}}</text>
                                </view>
                            </view>
                        </view>
                    </view>
                </template>
                <!-- #endif -->
            </custom-waterfalls-flow>
        </view>
 
        <!--底部-->
        <view class="coreshop-foot-hight-view" />
 
        <view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom" v-if="orderInfo.status == 1 || orderInfo.status == 2">
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus == 1 && orderInfo.shipStatus == 1">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning" size="small" @click="cancelOrder(orderInfo.orderId)">取消订单</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus == 1" @click="goToPay(orderInfo.orderId)">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="primary" size="small">立即支付</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus >= 2 && orderInfo.shipStatus >= 3 && orderInfo.confirmStatus == 1">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="small" @click="tackDeliery(orderInfo.orderId)">确认收货</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status === 1 && orderInfo.payStatus >= 2 && orderInfo.shipStatus >= 3 && orderInfo.confirmStatus >= 2 && orderInfo.isComment == false">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="small" @click="toEvaluate(orderInfo.orderId)">立即评价</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.addAftersalesStatus">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning " size="small" @click="customerService(orderInfo.orderId)">申请售后</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.billAftersalesId && orderInfo.billAftersalesId != false">
                <u-button class='coreshop-bg-red coreshop-margin-left-10 coreshop-margin-right-10' size="small" @click="showCustomerService(orderInfo)">查看售后</u-button>
            </view>
            <view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status === 1 && orderInfo.payStatus > 1 && orderInfo.invoice && orderInfo.invoice.type == 1  && InvoiceSwitch == 1">
                <u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="primary " size="small" @click="goApplyForInvoice(orderInfo.orderId)">申请发票</u-button>
            </view>
        </view>
 
        <u-popup :show="show" mode="center" width="180px" height="180px" @close="close">
            <canvas canvas-id="qrcode" style="width: 180px; height: 180px; " />
        </u-popup>
 
    </view>
 
</template>
<script>
    import uQRCode from '@/common/utils/uqrcode.js'
    export default {
        data() {
            return {
                basics: 0,
                delivery: {},//发货信息
                orderId: 0,
                orderInfo: {}, // 订单详情
                teamInfo: [], //拼团团信息
                otherData: [], //其他信息
                lading: {
                    status: false,
                    code: ''
                }, //提货信息
                show: false,
            }
        },
        onLoad(options) {
            this.orderId = options.orderId
            if (this.orderId) {
                //改用show操作
                //this.orderDetail()
            } else {
                this.$refs.uToast.show({
                    message: '获取失败', type: 'error', complete: function () {
                        uni.navigateBack({
                            delta: 1
                        });
                    }
                });
            }
            this.getGoodsRecommendList();
        },
        onShow() {
            this.orderDetail();
        },
        computed: {
            // 判断是否发货
            isDelivery() {
                if (this.orderInfo && this.orderInfo.delivery && Object.keys(this.orderInfo.delivery).length) {
                    return true
                } else {
                    return false
                }
            },
            InvoiceSwitch() {
                return this.$store.state.config.invoiceSwitch || 2;
            },
            orderCancelTime() {
                return this.$store.state.config.orderCancelTime || 60;
            },
            pointShowName() { return this.$store.state.config.pointShowName },
        },
        methods: {
            wapperClick(item) {
                this.goGoodsDetail(item.id)
            },
            imageClick(item) {
                this.goGoodsDetail(item.id)
            },
            // 获取订单详情
            orderDetail() {
                let _this = this
                let data = {
                    id: _this.orderId
                }
                _this.$u.api.orderDetail(data).then(res => {
                    if (res.status) {
                        let data = res.data;
                        // 订单状态文字转化
                        _this.basics = data.status;
                        console.log(_this.basics);
                        switch (data.status) {
                            case 1:
                                if (data.payStatus === 1) {
                                    _this.$set(data, 'statusName', '待付款')
                                    _this.basics = 0;
                                } else if (data.payStatus >= 2 && data.shipStatus === 1) {
                                    _this.$set(data, 'statusName', '待发货')
                                    _this.basics = 1;
                                } else if (data.payStatus >= 2 && data.shipStatus === 2) {
                                    _this.$set(data, 'statusName', '部分发货')
                                    _this.basics = 2;
                                } else if (data.payStatus >= 2 && data.shipStatus >= 3 && data.confirmStatus === 1) {
                                    _this.$set(data, 'statusName', '已发货')
                                    _this.basics = 2;
                                } else if (data.payStatus >= 2 && data.shipStatus >= 3 && data.confirmStatus >= 2 && data.isComment === false) {
                                    _this.$set(data, 'statusName', '待评价')
                                    _this.basics = 3;
                                } else if (data.payStatus >= 2 && data.shipStatus >= 3 && data.confirmStatus >= 2 && data.isComment === true) {
                                    _this.$set(data, 'statusName', '已评价')
                                    _this.basics = 4;
                                }
                                break
                            case 2:
                                _this.$set(data, 'statusName', data.textStatus)
                                _this.basics = data.globalStatus;
                                break
                            case 3:
                                _this.$set(data, 'statusName', data.textStatus)
                                _this.basics = data.globalStatus;
                                break
                        }
                        // 转换优惠信息
                        for (let i in data.items) {
                            data.items[i].promotionList = JSON.parse(data.items[i].promotionList);
                        }
                        _this.orderInfo = data;
 
                        if (data.delivery.length > 0) {
                            _this.delivery = data.delivery[0];
                        }
 
                        //判断是否拼团
                        if (data.orderType == 2) {
                            _this.getTeam(data.orderId);
                        }
                        if (data.ladingItem[0]) {
                            _this.lading = {
                                status: true,
                                code: data.ladingItem[0].id
                            }
                        }
                    } else {
                        _this.$u.toast(res.msg)
                    }
                })
            },
            // 获取推荐商品信息
            getGoodsRecommendList() {
                let _this = this;
                let data = {
                    id: 10,
                    data: true
                }
                _this.$u.api.getGoodsRecommendList(data).then(res => {
                    if (res.status) {
                        _this.otherData = res.data;
                    } else {
                        _this.$u.toast(res.msg)
                    }
                })
            },
            // 取消订单
            cancelOrder(orderId) {
                let _this = this;
                _this.$common.modelShow('提示', '确认要取消订单吗?', () => {
                    let data = {
                        id: orderId
                    }
                    _this.$u.api.cancelOrder(data).then(res => {
                        if (res.status) {
                            _this.$refs.uToast.show({
                                message: res.msg, type: 'success', complete: function () {
                                    _this.orderDetail()
                                }
                            })
                        } else {
                            _this.$u.toast(res.msg)
                        }
                    })
                })
            },
            // 确认收货
            tackDeliery(orderId) {
                let _this = this;
                this.$common.modelShow('提示', '确认收货操作吗?', () => {
                    let data = {
                        id: orderId
                    }
                    _this.$u.api.confirmOrder(data).then(res => {
                        if (res.status) {
                            _this.$refs.uToast.show({
                                message: '确认收货成功', type: 'success', complete: function () {
                                    // 更改订单列表页的订单状态
                                    let pages = getCurrentPages(); // 当前页
                                    let beforePage = pages[pages.length - 2]; // 上个页面
                                    if (beforePage !== undefined && beforePage.route === 'pages/member/order/index/index') {
                                        // #ifdef MP-WEIXIN
                                        beforePage.$vm.isReload = true
                                        // #endif
                                        // #ifdef APP-PLUS || APP-PLUS-NVUE
                                        beforePage.isReload = true
                                        // #endif
                                        // #ifdef MP-ALIPAY || MP-TOUTIAO
                                        _this.$db.set('orderUserShip', true, true);
                                        // #endif
                                    }
                                    _this.orderDetail()
                                }
                            })
                        } else {
                            _this.$u.toast(res.msg)
                        }
                    })
                })
            },
            // 申请售后
            customerService(id) {
                this.$u.route('/pages/member/afterSales/submit/submit?orderId=' + id);
            },
            //快递信息
            logistics(key) {
                let address1 = this.orderInfo.shipAreaName ? this.orderInfo.shipAreaName : ''
                let address2 = this.orderInfo.shipAddress ? this.orderInfo.shipAddress : ''
                let address = address1 + address2
                this.goShowExpress(this.orderInfo.delivery[key].logiCode, this.orderInfo.delivery[key].logiNo, address, this.orderInfo.shipMobile)
            },
            //查看售后
            showCustomerService(info) {
                if (info.aftersalesItem.length == 1) {
                    this.$u.route('/pages/member/afterSales/detail/detail?aftersalesId=' + info.billAftersalesId);
                } else if (info.aftersalesItem.length > 1) {
                    this.$u.route('/pages/member/afterSales/list/list?orderId=' + info.orderId);
                }
            },
            //邀请拼单
            goInvition() {
                uni.navigateTo({
                    url: '/pages/member/order/invitationGroup/invitationGroup?orderId=' + this.orderInfo.orderId + '&closeTime=' + this.teamInfo.closeTime
                })
            },
            //邀请拼单
            goApplyForInvoice(orderId) {
                uni.navigateTo({
                    url: '/pages/member/order/invoice/invoice?orderId=' + this.orderInfo.orderId
                })
            },
            //拼团信息
            getTeam(id) {
                this.$u.api.getOrderPinTuanTeamInfo({
                    orderId: id
                }).then(res => {
                    if (res.status) {
                        this.teamInfo = {
                            list: res.data.teams,
                            userAvatar: res.data.userAvatar,
                            currentCount: res.data.teams.length,
                            peopleNumber: res.data.peopleNumber,
                            teamNums: res.data.teamNums, //剩余
                            closeTime: res.data.closeTime, //关闭时间
                            id: res.data.id, //拼团id
                            teamId: res.data.teamId, //拼团团队id
                            ruleId: res.data.ruleId,
                            status: res.data.status
                        };
                    } else {
                        this.$u.toast(res.msg)
                    }
                });
            },
            goTaxList() {
                if (this.orderInfo && this.orderInfo.invoice && this.orderInfo.invoice.id) {
                    uni.navigateTo({
                        url: '/pages/member/invoice/index?id=' + this.orderInfo.invoice.id
                    });
                }
            },
            // 保存发票到本地
            saveInvoice() {
                let _this = this;
                // #ifdef MP || MP-ALIPAY || APP-PLUS || APP-PLUS-NVUE
                _this.download(_this.orderInfo.invoice.fileUrl)
                // #endif
            },
            download(fileUrl) {
                let _this = this
                // #ifdef APP-PLUS || APP-PLUS-NVUE
                uni.downloadFile({
                    url: fileUrl,
                    success(res) {
                        uni.saveImageToPhotosAlbum({
                            filePath: res.tempFilePath,
                            success() {
                                _this.$refs.uToast.show({ message: '操作成功', type: 'success' })
                            },
                            fail() {
                                _this.$u.toast('发票保存失败')
                            }
                        });
                    },
                    fail() {
                        _this.$u.toast('下载失败')
                    }
                })
                // #endif
 
                // #ifdef MP
                uni.authorize({
                    scope: 'scope.writePhotosAlbum',
                    success() {
                        // 先下载到本地
                        uni.downloadFile({
                            url: fileUrl,
                            success(res) {
                                uni.saveImageToPhotosAlbum({
                                    filePath: res.tempFilePath,
                                    success() {
                                        _this.$refs.uToast.show({ message: '保存成功', type: 'success' })
                                    },
                                    fail() {
                                        _this.$u.toast('发票保存失败')
                                    }
                                });
                            },
                            fail() {
                                _this.$u.toast('下载失败')
                            }
                        })
                    },
                    fail() {
                        //console.log('授权失败')
                    }
                })
                // #endif
            },
            close() {
                this.show = false
            },
            showQrcodeBox(msg) {
                let _this = this;
                _this.make(msg);
                _this.show = true;
            },
            make(textStr) {
                console.log(textStr);
                console.log(uQRCode);
                uQRCode.make({
                    canvasId: 'qrcode',
                    componentInstance: this,
                    text: textStr,
                    size: 180,
                    margin: 30,
                    backgroundColor: '#ffffff',
                    foregroundColor: '#000000',
                    fileType: 'jpg',
                    correctLevel: uQRCode.errorCorrectLevel.H,
                    success: res => {
                        console.log(res)
                    }
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import "detail.scss";
</style>