路泰科技体检小程序UI设计新版本
wwl
2025-07-30 4e671437d52dd87946c0e38d334fce7a7c17d8e2
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
<template>
    <view class="container">
        <view class="">
            <view class="" v-if="!orderId">
                <view class="center center-second">
                    <view class="title">就诊人信息</view>
                    <u-cell-group>
                        <u-cell title="就诊人" :value="dataList.name" :border="false" />
                        <!-- <u-cell title="就诊人证件" :value="listData.xh" :border="false" /> -->
                    </u-cell-group>
                </view>
 
                <view class="center">
                    <view class="title">预约信息</view>
                    <u-cell-group>
                        <u-cell title="预约套餐" :value="dataList.tjPackage.pacName" :border="false" />
                        <u-cell title="预约时间" :value="dataList.reservationTime" :border="false" />
                        <u-cell title="套餐金额" :value="dataList.tjPackage.price" :border="false" />
                    </u-cell-group>
                </view>
                <scroll-view class="content" scroll-y>
                    <!-- 套餐项目 -->
                    <view class="card1">
                        <view class="card1_header">体检项目</view>
 
                        <view class="Package" :is-shadow="false" v-for="(item,index) in orderList" :key="index">
                            <view class="Package1">
                                <view class="small">
 
                                </view>
                                <view class="card1_Package">
                                    {{item.proName}}
                                </view>
                                <view class="card1_char">
                                    {{item.proPrice}}元
                                </view>
                            </view>
 
 
                        </view>
                    </view>
                </scroll-view>
                <view class="footer">
                    <view class="button" @tap="reservation">取消预约</view>
                    <view class="button1" @tap="payTime">修改时间</view>
                </view>
            </view>
 
 
            <view class="" v-if="orderId">
                <view class="center">
                    <view class="title">订单信息</view>
                    <u-cell-group>
                        <u-cell title="订单编号" :value="orderInfo.orderSn" :border="false" />
                        <u-cell title="下单时间" :value="orderInfo.createTime" :border="false" />
                        <u-cell title="预约时间" :value="orderInfo.reservationTime" :border="false" />
                        <u-cell title="实付金额" :value="orderInfo.actualPrice" :border="false" />
                    </u-cell-group>
                </view>
                <scroll-view class="content" scroll-y>
                    <!-- 套餐项目 -->
                    <view class="card1">
                        <view class="card1_header">体检项目</view>
 
                        <view class="Package" :is-shadow="false" v-for="(item,index) in orderList" :key="index">
                            <view class="Package1">
                                <view class="small">
 
                                </view>
                                <view class="card1_Package">
                                    {{item.goodsName}}
                                </view>
                                <view class="card1_char">
                                    {{item.price}}元
                                </view>
                            </view>
 
 
                        </view>
                    </view>
                </scroll-view>
                <view class="footer">
                    <view class="button" @tap="cancelOrder" v-if="orderInfo.orderStatus == 101">取消订单</view>
                    <view class="button1" @tap="payOrder" v-if="orderInfo.orderStatus == 101">去付款</view>
                    <view class="button2" @tap="confirmOrder" v-if="orderInfo.orderStatus == 202">取消申请售后</view>
                    <view class="button2" @tap="deleteOrder" v-if="orderInfo.orderStatus == 203">删除订单</view>
                    <view class="button2" @tap="deleteOrder" v-if="orderInfo.orderStatus == 102 ">删除订单</view>
                    <view class="button" @tap="refundOrder" v-if="orderInfo.orderStatus == 201">申请退款</view>
                    <view class="button1" @tap="payTime" v-if="orderInfo.orderStatus == 201">修改时间</view>
                    <view class="button" @tap="payTime" v-if="orderInfo.orderStatus == 101">修改时间</view>
                </view>
            </view>
 
        </view>
 
    </view>
</template>
 
<script>
    import {
        getList,
        prepay,
        refund,
        deleteordel,
        cancel,
        agreeToRefund,
        agreesubmit,
        agreecancel,
        deletereservation,
        detailByOrderId,
        updateReservationTime,
        getReservationByIdCard
    } from "@/api/system/cart";
    export default {
        data() {
            return {
                orderId: 0,
                orderInfo: {
 
                },
                orderGoods: [],
                expressInfo: {
                    Traces: []
                },
                idcard: 0,
                id: "",
                flag: false,
                orderList: [{
                        goodsName: "身高",
                        price: 24
                    },
                    {
                        goodsName: "身高",
                        price: 24
                    },
                    {
                        goodsName: "身高",
                        price: 24
                    },
                    {
                        goodsName: "身高",
                        price: 24
                    },
                ],
                dataList: {},
                handleOption: {
                    cancel: '',
                    pay: '',
                    confirm: '',
                    delete: '',
                    refund: '',
                    aftersale: '',
                    comment: '',
                    rebuy: ''
                },
                reservationList: [],
                iitem: {
                    AcceptStation: '',
                    AcceptTime: ''
                }
            };
        },
        onLoad: function(options) {
            // console.log(options)
            // 页面初始化 options为页面跳转所带来的参数
            // if (options.id) {
            //     this.orderId = options.id
            //     this.getList(this.orderId)
            //     this.getOrderDetail();
            // } else if (options.idcard) {
            //     this.idcard = options.idcard
            //     console.log(this.idcard)
            //     this.search()
            // }
 
 
        },
        onReady: function() {
            // 页面渲染完成
        },
        onShow: function() {
            // 页面显示
        },
        onHide: function() {
            // 页面隐藏
        },
        onUnload: function() {
            // 页面关闭
        },
        methods: {
            search() {
                getReservationByIdCard(this.idcard).then((response) => {
                    // this.reservationList = response.data;
                    // this.reservationList.forEach(item => {
                    //     this.dataList = item
                    // })
 
                    this.dataList = response.data;
                    if (this.dataList) {
                        this.orderList = this.dataList.tjPackage.tjProjectList
                    }
 
                });
            },
 
            getList() {
                detailByOrderId(this.orderId).then(res => {
                    this.orderList = res.data
                })
            },
            expandDetail: function() {
                let that = this;
                this.setData({
                    flag: !that.flag
                });
            },
 
            getOrderDetail: function() {
                let that = this
                getList().then((res) => {
                    if (res.code == 200) {
                        that.orderGoods = res.data
                        that.orderGoods.forEach(item => {
                            // if (item.orderStatus == 101) {
                            //     item.orderStatus = "待付款"
                            // } else if (item.orderStatus == 201) {
                            //     item.orderStatus = "待核销"
                            // } else if (item.orderStatus == 301) {
                            //     item.orderStatus = "已支付"
                            // }
                            if (item.id == that.orderId) {
                                that.orderInfo = item
                            }
                        })
                        if (that.orderInfo) {
                            getReservationByIdCard(that.orderInfo.idCard).then((response) => {
                                this.reservationList = response.data;
                                this.id = this.reservationList.id
                            });
                        }
                    }
                })
            },
 
            payTime() {
                if (this.dataList.pacId) {
                    let data = this.dataList;
                    uni.navigateTo({
                        url: `/pagesA/date/date?pacId=${data.tjPackage.pacId}&id=${data.id}`
                    })
                } else {
                    let data = this.orderInfo;
                    let id = this.id
                    uni.navigateTo({
                        url: `/pagesA/date/date?pacId=${data.pacId}&id=${id}`
                    })
                }
 
            },
 
            reservation() {
                let data = {
                    idCard: this.dataList.idCard,
                    pacId: this.dataList.tjPackage.pacId,
                    name: this.dataList.name,
                    reservationTime: this.dataList.reservationTime
                }
                deletereservation(data).then(res => {
                    if (res.code == 200) {
                        this.$modal.showToast("已取消预约");
                        uni.switchTab({
                            url: '/pages/mine/index'
                        });
                    }
 
                })
            },
            // “去付款”按钮点击效果
            payOrder: function() {
                let that = this;
                let data = {
                    orderId: that.orderId
                }
                prepay(data).then((res) => {
                    if (res.code === 200) {
                        const payParam = res.data;
                        console.log('支付过程开始');
                        uni.requestPayment({
                            timeStamp: payParam.timeStamp,
                            nonceStr: payParam.nonceStr,
                            package: payParam.packageValue,
                            signType: payParam.signType,
                            paySign: payParam.paySign,
                            success: function(res) {
                                console.log('支付过程成功');
                                uni.redirectTo({
                                    // url: '/pages/payResult/payResult?status=1&orderId=' +
                                    //     orderId
                                    url: '/pagesB/mine/myReservation/myReservation'
                                });
                            },
                            fail: function(res) {
                                console.log('支付过程失败');
                                that.$modal.showToast('支付失败');
                            },
                            complete: function(res) {
                                console.log('支付过程结束');
                            }
                        });
                    } else {
                        util.showErrorToast(res.msg);
                    }
                });
            },
 
            // “取消订单”点击效果
            cancelOrder: function() {
                let that = this;
                let orderInfo = that.orderInfo;
                uni.showModal({
                    title: '',
                    content: '确定要取消此订单?',
                    success: function(res) {
                        if (res.confirm) {
                            let data = {
                                orderId: orderInfo.id
                            }
                            cancel(data).then(function(res) {
                                if (res.code == 200) {
                                    let data = {
                                        idCard: orderInfo.idCard,
                                        pacId: orderInfo.mallOrderGoodsList[0].goodsId,
                                        name: orderInfo.consignee,
                                        reservationTime: orderInfo.reservationTime,
                                        id: that.id
                                    }
                                    deletereservation(data).then(res => {
                                        uni.showToast({
                                            title: '取消订单成功'
                                        });
                                        uni.redirectTo({
                                            url: '../myReservation/myReservation?status=0'
                                        });
                                    })
 
                                } else {
                                    that.$modal.showToast(res.errmsg);
                                }
                            });
                        }
                    }
                });
            },
 
            // “取消订单并退款”点击效果
            refundOrder: function() {
                let that = this;
                let orderInfo = that.orderInfo;
                uni.showModal({
                    title: '',
                    content: '确定要申请此订单?',
                    success: function(res) {
                        if (res.confirm) {
                            let data = {
                                orderId: orderInfo.id,
                                userId: orderInfo.userId,
                                amount: orderInfo.actualPrice,
                                status: 0
                            }
                            // refund
                            agreesubmit(data).then(function(res) {
                                if (res.code === 200) {
 
                                    uni.showToast({
                                        title: '申请订单已提交'
                                    });
                                    uni.redirectTo({
                                        url: '../myReservation/myReservation?status=0'
                                    });
                                } else {
                                    that.$modal.showToast(res.errmsg);
                                }
                            });
                        }
                    },
                })
            },
 
            // “删除”点击效果
            deleteOrder: function() {
                let that = this;
                let orderInfo = that.orderInfo;
                uni.showModal({
                    title: '',
                    content: '确定要删除此订单?',
                    success: function(res) {
                        if (res.confirm) {
                            let data = {
                                orderId: orderInfo.id
                            }
                            deleteordel(data).then(function(res) {
                                if (res.code === 200) {
                                    uni.showToast({
                                        title: '删除订单成功'
                                    });
                                    uni.redirectTo({
                                        url: '../myReservation/myReservation?status=0'
                                    });
                                } else {
                                    that.$modal.showToast(res.errmsg);
                                }
                            });
                        }
                    }
                });
            },
 
            // “确认收货”点击效果
            confirmOrder: function() {
                let that = this;
                let orderInfo = that.orderInfo;
                uni.showModal({
                    title: '',
                    content: '确认取消售后?',
                    success: function(res) {
                        if (res.confirm) {
                            let id = orderInfo.id
                            agreecancel(id).then(function(res) {
                                if (res.code === 200) {
                                    uni.showToast({
                                        title: '取消售后成功!'
                                    });
                                    uni.redirectTo({
                                        url: '../myReservation/myReservation?status=0'
                                    });
                                } else {
                                    util.showErrorToast(res.errmsg);
                                }
                            });
                        }
                    }
                });
            },
 
            // “申请售后”点击效果
            aftersaleOrder: function() {
                // if (this.orderInfo.aftersaleStatus === 0) {
                //     util.redirect('/pages/ucenter/aftersale/aftersale?id=' + this.orderId);
                // } else {
                //     util.redirect('/pages/ucenter/aftersaleDetail/aftersaleDetail?id=' + this.orderId);
                // }
                // let data = {
                //     actualPrice:0.01,
                //     id:this.orderInfo.id,
                //     orderPrice:0.01,
                //     refundAmount:0.01,
                //     refundType:1,
                // }
                // agreeToRefund(data).then(res={
 
                // })
            }
        }
    };
</script>
 
<style lang="scss">
    .content {
        flex: 1;
        overflow: auto;
        padding-bottom: 68rpx;
    }
 
    // 套餐内项目
    .card1 {
        // margin: 10px 0;
        padding: 15px;
        background-color: #fff;
 
 
    }
 
    .card1_header {
        width: 702rpx;
        height: 66rpx;
        line-height: 66rpx;
        padding-left: 30rpx;
        background: linear-gradient(90deg, #FFF5F5 0%, #FFE4F1 100%);
        border-radius: 8rpx 8rpx 8rpx 8rpx;
        color: #A20048;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 30rpx;
    }
 
    .Package {
        margin-top: 26rpx;
    }
 
    .Package1 {
        width: 642rpx;
        height: 80rpx;
        display: flex;
        background: #F4F5F8;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        margin-left: 28rpx;
    }
 
    .card1_Package {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 30rpx;
        color: #373E58;
        line-height: 80rpx;
        font-style: normal;
        text-transform: none;
        padding-left: 30rpx;
        width: 512rpx;
    }
 
    .small {
        width: 6rpx;
        height: 32rpx;
        background: #FD6397;
        border-radius: 0rpx 8rpx 8rpx 0rpx;
        margin-top: 25rpx;
    }
 
    .card1_char {
        // width: 612rpx;
        line-height: 80rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 28rpx;
        color: #65686A;
        text-align: right;
        font-style: normal;
        text-transform: none;
        // margin: 24rpx 0;
        // margin-left: 58rpx;
    }
 
    .container {
        width: 750rpx;
        height: 1624rpx;
        background: #FBFDFF;
        margin: 0;
        padding: 0;
 
        .top {
            width: 738rpx;
            height: 160rpx;
            margin: 0 auto;
 
            .top_one,
            .text {
                margin-left: 72rpx;
                line-height: 50rpx;
            }
 
            .top_one {
                padding-top: 30rpx;
                font-weight: bold;
                font-size: 36rpx;
                color: #FFFFFF;
            }
 
            .text {
                font-weight: 400;
                font-size: 26rpx;
                color: #E9F7FE;
            }
 
        }
 
        .top_info {
            width: 702rpx;
            height: 148rpx;
            background: linear-gradient(90deg, #FFFFFF 0%, #FCFFFE 100%);
            box-shadow: 0rpx 0rpx 12rpx 1rpx rgba(127, 153, 177, 0.14);
            border-radius: 12rpx;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-around;
            margin: 20rpx;
 
 
            .images {
                width: 90rpx;
                height: 90rpx;
            }
 
            .jianjie {
                line-height: 50rpx;
 
                .name {
                    font-weight: bold;
                    font-size: 32rpx;
                    color: #464F72;
                }
 
                .text {
                    font-weight: 400;
                    font-size: 26rpx;
                    color: #9496A2;
                }
            }
 
            .last_text {
                display: flex;
                align-items: center;
 
                .last {
                    font-weight: 400;
                    font-size: 28rpx;
                    color: #419FFD;
                }
            }
        }
 
 
        .center {
            width: 702rpx;
            height: 280rpx;
            background: linear-gradient(90deg, #FFFFFF 0%, #FCFFFE 100%);
            box-shadow: 0rpx 0rpx 12rpx 1rpx rgba(127, 153, 177, 0.14);
            border-radius: 12rpx;
            margin: 16rpx auto;
 
            .title {
                // width: 112rpx;
                // height: 28rpx;
                width: 100%;
                margin-bottom: 20rpx;
                font-weight: bold;
                font-size: 28rpx;
                color: #E60165;
                margin-left: 31rpx;
                padding-top: 29rpx;
            }
 
            .u-line {
                width: 95% !important;
                margin-left: 24rpx !important;
            }
 
 
            .u-cell-group {
                border-radius: 16rpx;
                border: none;
            }
        }
 
        .center-second {
            height: 160rpx;
        }
 
        .center-third {
            height: 288rpx;
 
            .u-cell-group .u-cell:last-child .u-cell__value {
                color: #F5981F;
            }
        }
 
 
 
    }
 
    .footer {
        // position: fixed;
        // width: 750rpx;
        // height: 98rpx;
        // background: #FFFFFF;
        // box-shadow: 0rpx 0rpx 12rpx 1rpx rgba(127, 153, 177, 0.14);
        // border-radius: 0rpx;
        // display: flex;
        // align-items: center;
        // justify-content: flex-end;
        // z-index: 1000;
        position: fixed;
        /* 固定定位 */
        bottom: 0;
        /* 贴紧底部 */
        left: 0;
        /* 横向铺满 */
        right: 0;
        display: flex;
        /* 启用Flex布局 */
        justify-content: space-around;
        /* 按钮等间距分布 */
        align-items: center;
        padding: 20rpx;
        background: #fff;
        /* 背景色 */
        box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
        /* 顶部阴影分隔线 */
        z-index: 999;
        /* 确保按钮在顶层 */
    }
 
    .button {
        width: 216rpx;
        height: 76rpx;
        background: #FE368E;
        font-weight: 400;
        font-size: 31rpx;
        color: #FFFFFF;
        text-align: center;
        line-height: 2.5;
        border-radius: 12rpx;
    }
    
    .button2{
        text-align: center;
        line-height: 2.5;
        flex: 1;
        /* 等宽按钮 */
        margin: 0 30rpx;
        /* 按钮间距 */
        background: #FE368E;
        color: white;
        border-radius: 50rpx;
        border-radius: 12rpx;
    }
 
    .button1 {
        width: 216rpx;
        height: 76rpx;
        background: #E30165;
        font-weight: 400;
        font-size: 31rpx;
        color: #FFFFFF;
        text-align: center;
        line-height: 2.5;
        border-radius: 12rpx;
    }
 
 
 
    .u-cell__title {
        font-size: 26rpx;
        color: #9496A2;
        line-height: 64rpx;
    }
 
    .u-cell__body {
        padding: 10rpx 30rpx !important;
    }
 
    .u-cell__value {
        font-size: 26rpx;
        color: #464F72;
    }
</style>