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
<template>
<div class="flow">
<div class="content">
<div class="left" v-if="customerInfo !== ''">
<div class="title"><span class="point"></span>客户信息</div>
<div class="info">
<div class="item">
<span class="label">姓名:</span>
<a-input :value="customerInfo.name" disabled></a-input>
</div>
<div class="item">
<span class="label">性别:</span>
<a-input :value="customerInfo.sex == 'M' ? '女' : '男'" disabled />
</div>
<div class="item">
<span class="label">婚姻状况</span>
<a-radio-group v-model="customerInfo.maritalStatus" disabled>
<a-radio value="01">未婚 </a-radio>
<a-radio value="02">已婚</a-radio>
</a-radio-group>
</div>
<div class="item">
<span class="label">身份证:</span>
<a-input :value="customerInfo.idNo" disabled />
</div>
<div class="item">
<span class="label">手机号码:</span>
<a-input :value="customerInfo.phone" disabled />
</div>
<div class="item">
<span class="label">出生日期:</span>
<a-input :value="customerInfo.birthDate" disabled />
</div>
</div>
</div>
<div class="right">
<!-- 预约详情 -->
<div class="detail">
<div class="title"><span class="point"></span>预约详情</div>
<ul class="items" v-for="item in appointmentList" :key="item.id">
<li>
<div class="label">已选套餐:</div>
<div class="detail_content">
{{item.servicepackageName}}
</div>
</li>
<li>
<div class="label">已选体检中心:</div>
<div class="detail_content">{{item.checkUnitName}}</div>
</li>
<li>
<div class="label">已选体检中心地址:</div>
<div class="detail_content">{{item.shopAddress}}</div>
</li>
<li>
<div class="label">预约日期:</div>
<div class="detail_content">{{item.serviceAppDate}}</div>
</li>
</ul>
<div class="tips">
<img :src="tips" alt="" />
<span class="desc"
>请耐心等待体检确认,预约成功后将发送短信给您,如需改约请致电客服</span
>
</div>
<div class="btns">
<a-button type="primary" disabled> 预约中 </a-button>
<a-button type="primary" @click="goIndexPage"> 回首页 </a-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
// import AppointmentDetail from './components/appointmentDetail'
import api from '@/api/customer'
import { log } from 'util'
export default {
name: 'Detail',
components: {
// AppointmentDetail,
},
data() {
return {
id: '', //客户id
customerInfo: {
name: '',
sex: '',
idNo: '',
phone: '',
birthDate: '',
maritalStatus: '',
}, //客户信息
tips: require('../../assets/imgs/detail/tips.png'),
appointmentList: [], //已预约列表
}
},
created() {
const { id } = this.$route.query
this.id = id
this.getCustomerDetail()//获取客户信息
this.getAppointmentList()//获取客户的预约详情
},
methods: {
// 获取客户信息
getCustomerDetail() {
api.getCustomerDetail({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
this.customerInfo = res.content
console.table('客户信息customerInfo=', this.customerInfo)
} else {
this.$message.error(res.returnMsg)
}
})
},
// 回首页
goIndexPage() {
this.$router.push({
name: 'Index',
query: {
id: this.id, //客户id
},
})
},
// 获取预约详情
getAppointmentList() {
api.getAppointmentList({ id: parseInt(this.id) }).then((res) => {
if (res.returnCode == '0000') {
console.log('111111111111获取已预约列表==', res.content)
this.appointmentList = res.content
}
})
},
},
}
</script>
<style lang="less" scoped>
.flow {
background: #fafafa;
min-height: calc(100vh - 300px);
.btn {
text-align: center;
position: relative;
left: 360px;
top: -72px;
}
.content {
padding-top: 20px;
.point {
display: inline-block;
border-radius: 5px;
width: 6px;
height: 6px;
background-color: #3f7ffb;
margin-right: 6px;
position: relative;
top: -1px;
}
display: flex;
justify-content: center;
.left {
max-height: 480px;
.reset {
text-align: center;
margin-top: 25px;
}
.info {
margin-top: 24px;
::v-deep .ant-input {
border: none;
background-color: #fafafa;
height: 42px;
}
.item {
display: flex;
margin-top: 14px;
.label {
display: inline-block;
width: 120px;
line-height: 42px;
font-size: 14px;
color: #aaaaaa;
padding-left: 12px;
}
}
}
}
.left,
.right {
background: white;
box-shadow: 0px 7px 14px 1px rgba(223, 223, 219, 0.18);
border-radius: 8px;
padding: 19px 24px 30px 14px;
margin-left: 24px;
}
.right {
padding-left: 24px;
}
.right {
margin-left: 30px;
}
}
}
.detail {
.point {
display: inline-block;
border-radius: 5px;
width: 6px;
height: 6px;
background-color: #3f7ffb;
margin-right: 6px;
position: relative;
top: -1px;
}
.btns {
text-align: right;
padding-right: 10px;
margin-top: 15px;
.ant-btn {
&:nth-child(1) {
margin-right: 30px;
font-size: 14px;
color: white;
border: none;
}
}
}
.tips {
padding-left: 8px;
img {
position: relative;
top: -1px;
}
.desc {
color: #cccccc;
font-size: 14px;
margin-left: 4px;
}
}
.items {
margin-top: 21px;
padding-left: 10px;
li {
margin-top: 15px;
}
.label {
font-size: 14px;
color: #aaaaaa;
}
.detail_content {
width: 700px;
color: #333333;
font-size: 14px;
line-height: 58px;
background: #fafafa;
margin-top: 8px;
border-radius: 2px;
position: relative;
left: -10px;
padding-left: 10px;
}
}
}
</style>