路泰科技体检小程序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
<template>
    <view>
        <view class="box">
            <text style="font-size: 22px;">泾川县人民医院体检中心</text>
        </view>
        <view style="width:100%;height: 100px;background-color: #fff;display: flex;flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-around;">
            <text class="name">{{pacById.pacName}}</text>
            <text class="miaoshu">套餐描述:{{pacById.pacRemark}}</text>
        </view>
        <view style="width: 100%;min-height: 300px;background-color: #fff;margin-top: 15px;padding: 15px;">
            <view class="card1_header">预约情况</view>
            <view style="display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-evenly;">
                <view style="display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-evenly;"
                    v-for="(item, index) in list" :key="index">
                    <view @tap.native.stop.prevent="xuanze($event, { time: item.time,nowNum:item.nowNum})"
                        class="card1_char">
                        <text>{{item.time}}</text>
                        <text>余{{item.nowNum}}</text>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import {
        getprojectListByPacId
    } from "@/api/system/package";
    import {
        updateReservationTime,
 
    } from "@/api/system/cart";
    import {
        listByDay
    } from "@/api/system/inspect";
    export default {
        data() {
            return {
                pacById: {},
                list: [{
                        time: "2025-04-28",
                        nowNum: 20
                    },
                    {
                        time: "2025-04-29",
                        nowNum: 20
                    },
                    {
                        time: "2025-04-30",
                        nowNum: 20
                    }, {
                        time: "2025-05-01",
                        nowNum: 20
                    }
                ],
                id: ""
            }
        },
        onLoad(option) {
 
            this.getPacById(option.pacId);
            if (option.id) {
                this.id = option.id;
            }
        },
        created() {
            this.getList();
        },
        methods: {
            getList() {
                listByDay().then(res => {
                    // this.list = res.data;
                    // console.log(this.list);
                })
            },
            getPacById(pacId) {
                getprojectListByPacId(pacId).then((response) => {
                    this.pacById = response.data
                    this.proList = response.data.tjProjectList
                });
            },
 
            xuanze(event, _dataset) {
                if (!this.id) {
                    if (_dataset.nowNum == 0) {
                        this.$modal.showToast('该时间段不可选!');
                    } else {
                        let time = _dataset.time
                        uni.$emit('time', time);
                        uni.navigateBack({
                            delta: 1
                        })
                    }
                } else {
                    // console.log(this.dataList)
                    let data = {
                        id: this.id,
                        reservationTime: _dataset.time
                    }
                    updateReservationTime(data).then(res => {
                        this.$modal.msgSuccess("修改成功");
                        let pages = getCurrentPages()
                        let prePages = pages[pages.length - 2] //获取上一个页面的对象
 
                        uni.navigateBack({
                            // delta: 1
                            success() {
                                prePages.$vm.getOrderDetail() // 当返回成功的时候调用上一级页面的回调
                            }
                        });
                        // uni.navigateBack({
                        //     delta: 1
                        // })
                    })
 
                }
 
            },
        }
    }
</script>
 
<style>
    .box {
        width: 100%;
        height: 150px;
        background: linear-gradient(#F8D6DC 0%, #FFFFFF 100%);
        display: flex;
        justify-content: center;
        align-items: center;
    }
 
    .name {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: bold;
        font-size: 32rpx;
        color: #E30165;
        line-height: 42rpx;
        padding-top: 57rpx;
        margin-left: 33rpx;
    }
 
    .miaoshu {
        font-size: 28rpx;
        color: #565860;
        line-height: 44rpx;
        margin: 40rpx 0 40rpx 34rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
    }
 
    .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;
    }
 
 
    .card1_char {
        width: 150px;
        height: 50px;
        background-color: #F4F5F8;
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: space-around;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 28rpx;
        color: #65686A;
 
    }
</style>