路泰科技体检小程序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
<template>
    <view class="container">
        <view class="">
            <view class="header">
                <!-- <text class="title">团队预约</text> -->
                <text class="subtitle">请认真填写体检人信息</text>
            </view>
 
            <view class="form">
                <!-- 表单项 -->
                <view class="form-item">
                    <text class="label">单位名称</text>
                    <input class="input" placeholder="请输入单位名称" v-model="inspect.cnName" />
                </view>
 
                <view class="form-item">
                    <text class="label">联系人</text>
                    <input class="input" placeholder="请输入联系人" v-model="inspect.contactPerson" />
                </view>
 
                <view class="form-item">
                    <text class="label">联系电话</text>
                    <input class="input" placeholder="15866211200" v-model="inspect.contactPhone" />
                    <!-- <picker @change="bindNationChange" mode="selector" :range="nations">
                        <input class="input" :value="inspect.contactPhone" placeholder="请选择民族" disabled />
                    </picker> -->
                </view>
 
                <view class="form-item">
                    <text class="label">邮箱</text>
                    <input class="input" placeholder="请输入邮箱" v-model="inspect.email" />
                </view>
 
                <view class="form-item">
                    <text class="label">税号</text>
                    <input class="input" placeholder="请输入税号" v-model="inspect.taxNumber" />
                </view>
 
                <view class="form-item">
                    <text class="label">通讯地址</text>
                    <input class="input" placeholder="请输入通讯地址" v-model="inspect.mailingAddress" />
                </view>
 
                <view class="form-item">
                    <text class="label">体检时间</text>
                    <picker mode="date" @change="bindDateChange">
                        <input class="input" :value="inspect.tjTime" placeholder="请选择体检时间" disabled />
                    </picker>
                    <!-- <uni-datetime-picker type="date" :clear-icon="false" v-model="inspect.tjTime"  :start="new Date().getTime()" /> -->
                </view>
 
                <view class="form-item">
                    <text class="label">体检类型</text>
                    <picker @change="bindTypeChange" mode="selector" :range="checkupTypes"
                        :value="checkupTypes.dictValue" range-key="dictLabel">
                        <!-- <input class="input" :value="inspect.tjPacType" placeholder="请选择体检类型" disabled /> -->
                        <view class="input">{{checkupTypes[index].dictLabel}}</view>
                    </picker>
                </view>
 
                <view class="form-item">
                    <text class="label">预约人数</text>
                    <input class="input" placeholder="请输入预约人数" type="number" v-model="inspect.count" />
                </view>
 
                <button class="submit-btn" @tap="saveInspect">立即预约</button>
            </view>
        </view>
        <view class="">
            <uni-popup ref="popup" type="center" >
                <view class="popup">
                    <div>
                        <img class="text_img" src="../img/bbbb.png" alt="">
                    </div>
                    <view class="box2">
                        <view class="box_name">预约成功!</view>
                        <view class="box_name1">体检顾问将在2个工作日内与您联系</view>
                        <button class="buton" @tap="saveyes">确定</button>
                    
                    </view>
                </view>
                
 
 
            </uni-popup>
        </view>
 
 
    </view>
</template>
 
<script>
    import {
        getDicts
    } from "@/api/system/dict/data";
    import {
        addTeam
    } from "@/api/system/timeappointment";
    export default {
        data() {
            return {
                inspect: {
                    cusName: '',
                    cusPhone: '',
                    cusIdcard: '',
                    cusNational: '',
                    cusMarryStatus: '',
                    idType: "",
                    tjTime: "",
                    pacName: '',
                    pacId: '',
                },
                index: 0,
                pac: {},
                nations: ['汉族', '壮族', '回族', '其他'],
                checkupTypes: []
            }
        },
        onLoad(option) {
            this.pac = JSON.parse(decodeURIComponent(option.pac));
            this.inspect.pacName = this.pac.pacName;
            this.inspect.pacId = this.pac.pacId;
            // this.pacName = option.pacId
            // this.getList(option.pacId);
            this.getList();
        },
        methods: {
            getList() {
                getDicts("dict_tjtype").then(response => {
                    this.checkupTypes = response.data;
                });
            },
            bindDateChange(e) {
                this.inspect.tjTime = e.detail.value
            },
            bindTypeChange(e) {
                this.index = e.detail.value;
                // this.inspect.tjPacType = this.checkupTypes[e.detail.value].dictLabel
            },
            saveInspect() {
                let inspect = this.inspect;
                if (inspect.cnName == undefined) {
                    this.$modal.msgError("请输入单位名称")
                    return false;
                }
                if (inspect.contactPerson == undefined) {
                    this.$modal.msgError("请输入联系人");
                    return false;
                }
                if (inspect.contactPhone == undefined) {
                    this.$modal.msgError("请输入联系电话");
                    return false;
                }
                if (inspect.email == undefined) {
                    this.$modal.msgError("请输入邮箱");
                    return false;
                }
                if (inspect.taxNumber == undefined) {
                    this.$modal.msgError("请输入税号");
                    return false;
                }
                if (inspect.mailingAddress == undefined) {
                    this.$modal.msgError("请输入通讯地址");
                    return false;
                }
                if (inspect.count == undefined) {
                    this.$modal.msgError("请输入预约人数");
                    return false;
                }
                this.inspect.tjPacType = this.checkupTypes[this.index].dictValue;
                let tjTeamAppLog = {
                    cnName: inspect.cnName,
                    contactPerson: inspect.contactPerson,
                    contactPhone: inspect.contactPhone,
                    email: inspect.email,
                    taxNumber: inspect.taxNumber,
                    mailingAddress: inspect.mailingAddress,
                    count: inspect.count,
                    fromBy: "1",
                    tjTime: inspect.tjTime,
                    tjPacType: inspect.tjPacType,
                    pacId: inspect.pacId,
                    pacName: inspect.pacName
                }
 
                addTeam(tjTeamAppLog).then(res => {
                    if (res.code == 200)
                    this.$refs.popup.open()
                    this.inspect={
                        cusName: '',
                        cusPhone: '',
                        cusIdcard: '',
                        cusNational: '',
                        cusMarryStatus: '',
                        idType: "",
                        tjTime: "",
                        pacName: '',
                        pacId: '',
                    }
                    // this.$modal.showToast('预约成功');
                    // uni.showModal({
                    //     content: '提交成功!体检顾问将在2个工作日内与您联系',
                    //     showCancel: false,
                    //     buttonText: '确定',
                    //     success: (res) => {
                    //         if (res.confirm) {
                    //             console.log('用户点击确定');
                    //             uni.navigateBack();
                    //         } else if (res.cancel) {
                    //             console.log('用户点击取消');
                    //         }
                    //     }
                    // })
                    // uni.navigateBack();
                })
                // this.$tab.navigateTo('/pagesB/mine/myReservation/myReservation')
            },
            saveyes(){
                this.$refs.popup.close()
                
            },
        }
    }
</script>
 
<style scoped>
    .container {
        padding: 20rpx;
        height: 1624rpx;
        background: #FBFDFF;
    }
 
    .header {
        margin-bottom: 20rpx;
    }
 
 
    .subtitle {
        width: 280rpx;
        height: 28rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 28rpx;
        color: #9496A2;
        line-height: 36rpx;
        text-align: right;
        font-style: normal;
        text-transform: none;
    }
 
    .form {
        width: 702rpx;
        height: 1051rpx;
        background: linear-gradient(90deg, #FFFFFF 0%, #FCFFFE 100%);
        box-shadow: 0rpx 0rpx 12rpx 1rpx rgba(127, 153, 177, 0.14);
        border-radius: 12rpx 12rpx 12rpx 12rpx;
        padding: 37rpx 29rpx;
    }
 
    .form-item {
        display: flex;
        margin-bottom: 30rpx;
        background-color: #fff;
        padding: 20rpx;
        border-radius: 12rpx;
    }
 
    .label {
        /* display: block;
        font-size: 30rpx;
        color: #333;
        margin-bottom: 15rpx; */
        width: 120rpx;
        /* height: 246rpx; */
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 30rpx;
        color: #373E58;
        /* line-height: 20rpx; */
        text-align: left;
        font-style: normal;
        text-transform: none;
    }
 
    .input {
        /*     height: 80rpx;
        font-size: 28rpx;
        color: #333;
        
        background-color: #f9f9f9;
        border-radius: 8rpx; */
        width: 280rpx;
        padding: 0 30rpx;
        height: 30rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 30rpx;
        color: #9496A2;
        line-height: 36rpx;
        text-align: left;
        font-style: normal;
        text-transform: none;
 
    }
 
 
    .popup {
        width: 620rpx;
        height: 440rpx;
        background: linear-gradient( 180deg, #E9F7FE 0%, #FFFFFF 44%, #FFFFFF 100%);
        border-radius: 24rpx 24rpx 24rpx 24rpx;
    
        position: relative;
        /* 父级需设为相对定位 */
 
        padding: 20px;
    }
 
    .submit-btn {
        margin-top: 70rpx;
        color: white;
        font-size: 32rpx;
        width: 600rpx;
        height: 88rpx;
        background: #419FFD;
        border-radius: 8rpx 8rpx 8rpx 8rpx;
    }
 
    .box_name {
        width: 160rpx;
        height: 32rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 500;
        font-size: 32rpx;
        color: #373E58;
        line-height: 42rpx;
        text-align: right;
        font-style: normal;
        text-transform: none;
        margin-left: 200rpx;
        margin-top: 100rpx;
    }
 
    .box_name1 {
        /* width: 436rpx; */
        height: 28rpx;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 28rpx;
        color: #565860;
        line-height: 42rpx;
        text-align: center;
        font-style: normal;
        text-transform: none;
        /* margin-left: 50rpx; */
        margin-top: 40rpx;
    }
 
    .text_img {
        width: 239rpx;
        height: 239rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        position: absolute;
        top: -50px;
        /* 图片高度的一半(假设图片高度100px) */
        left: 50%;
        /* 水平居中起点 */
        transform: translateX(-50%);
        /* 向左偏移50%宽度 */
 
        z-index: 999;
        /* 确保图片在弹框上方 */
    }
 
    .buton {
        width: 340rpx;
        height: 96rpx;
        background: #D8EDFF;
        border-radius: 48rpx 48rpx 48rpx 48rpx;
        margin-top: 40rpx;
    }
</style>