|
|
@ -8,26 +8,26 @@ |
|
|
|
<slider-box ref="sliderbox"> |
|
|
|
<view class="slider-title PfScMedium">预约信息确认</view> |
|
|
|
<view class="members-box" v-if="needSelectMembers"> |
|
|
|
<view class="desc">当前时段余号不足,只能预约2人</view> |
|
|
|
<view class="desc">当前时段余号不足,只能预约{{times.left_count}}人</view> |
|
|
|
<view class="members"> |
|
|
|
<view class="memmbers-item active"> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'"> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'"> |
|
|
|
上官子涵 |
|
|
|
</view> |
|
|
|
<view class="memmbers-item"> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'"> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'"> |
|
|
|
帅哥 |
|
|
|
</view> |
|
|
|
<view class="memmbers-item"> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'"> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'"> |
|
|
|
发财哥 |
|
|
|
</view> |
|
|
|
<view class="memmbers-item"> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'" alt=""> |
|
|
|
<img :src="cssUrl+'checkbox_false.svg'"> |
|
|
|
<img :src="cssUrl+'checkbox_true.svg'"> |
|
|
|
王富贵 |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -50,9 +50,9 @@ |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<view class="left">看诊时间:</view> |
|
|
|
<view class="right orange">2023.11.12 上午 9:30-10:30</view> |
|
|
|
<view class="right orange">{{times.date}} 上午 {{times.start_time}}-{{times.end_time}}</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="btns-box flex"> |
|
|
|
<view class="btn cancel btn1" hover-class="hover" @click="closeConfirm">我再想想</view> |
|
|
|
<view class="primary btn btn1" hover-class="hover" @click="submitConfim">确认预约</view> |
|
|
@ -62,8 +62,8 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import Book from '@/components/bookBox.vue'; |
|
|
|
import SliderBox from '@/components/sliderBox.vue'; |
|
|
|
import Book from '@/components/bookBox.vue' |
|
|
|
import SliderBox from '@/components/sliderBox.vue' |
|
|
|
export default { |
|
|
|
onLoad(op) { |
|
|
|
uni.setNavigationBarTitle({ |
|
|
@ -79,7 +79,8 @@ |
|
|
|
hospitalId:false, |
|
|
|
hospital:false, |
|
|
|
activeVisitors:[], |
|
|
|
nums:['①','②','③','④','⑤','⑥','⑦','⑧','⑨','⑩'] |
|
|
|
nums:['①','②','③','④','⑤','⑥','⑦','⑧','⑨','⑩'], |
|
|
|
times:false |
|
|
|
} |
|
|
|
}, |
|
|
|
components:{ |
|
|
@ -116,15 +117,16 @@ |
|
|
|
uni.showToast({ |
|
|
|
title:"成功预约8人", |
|
|
|
mask:true, |
|
|
|
image:this.cssUrl+'gou.svg' |
|
|
|
image:this.cssUrl+'gou.svg', |
|
|
|
times:false |
|
|
|
}) |
|
|
|
}, |
|
|
|
getAvailabletRegistrationTime() { |
|
|
|
getAvailabletRegistrationTime(refresh = true, chooseDay = '') { |
|
|
|
this.$http.req('client/doctor/visit_hospital/days/'+this.hospitalId).then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
data.days = [ |
|
|
|
{ |
|
|
|
date: "2024-04-16", type: 2, type_text: "上午出诊", weekday: "周一", |
|
|
|
date: "2024-04-17", type: 2, type_text: "上午出诊", weekday: "周一", |
|
|
|
am: [ |
|
|
|
{ |
|
|
|
"start": "12:00", |
|
|
@ -136,14 +138,14 @@ |
|
|
|
"end": "14:30", |
|
|
|
"bed_count": 2 |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
pm: [] |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: "2024-04-17", type: 5, type_text: "未开放预约", weekday: "周二", am: [], pm: [] |
|
|
|
date: "2024-04-18", type: 5, type_text: "未开放预约", weekday: "周二", am: [], pm: [] |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: "2024-04-18", type: 3, type_text: "全天出诊", weekday: "周三", am: [ |
|
|
|
date: "2024-04-19", type: 3, type_text: "全天出诊", weekday: "周三", am: [ |
|
|
|
{ |
|
|
|
"start": "12:00", |
|
|
|
"end": "12:30", |
|
|
@ -168,7 +170,7 @@ |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: "2024-04-19", type: 4, type_text: "下午出诊", weekday: "周四", am: [], pm: [ |
|
|
|
date: "2024-04-20", type: 4, type_text: "下午出诊", weekday: "周四", am: [], pm: [ |
|
|
|
{ |
|
|
|
"start": "12:00", |
|
|
|
"end": "12:30", |
|
|
@ -182,31 +184,73 @@ |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: "2024-04-20", type: 1, type_text: "全天休息", weekday: "周五", am: [], pm: [] |
|
|
|
date: "2024-04-21", type: 1, type_text: "全天休息", weekday: "周五", am: [], pm: [] |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
// if(!refresh){ |
|
|
|
// // data.days[3].pm[1].bed_count=0 |
|
|
|
// // data.days[3].type=1 |
|
|
|
// data.days = [ |
|
|
|
// { |
|
|
|
// date: "2024-04-17", type: 2, type_text: "上午出诊", weekday: "周一", |
|
|
|
// am: [ |
|
|
|
// { |
|
|
|
// "start": "12:00", |
|
|
|
// "end": "12:30", |
|
|
|
// "bed_count": 0 |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// "start": "13:00", |
|
|
|
// "end": "14:30", |
|
|
|
// "bed_count": 2 |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// pm: [] |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// date: "2024-04-18", type: 5, type_text: "未开放预约", weekday: "周二", am: [], pm: [] |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// } |
|
|
|
|
|
|
|
this.RegistrationTimeList = data.days |
|
|
|
if(this.RegistrationTimeList.length>0) this.$refs.book.dataInit(this.RegistrationTimeList[0]) |
|
|
|
if(this.RegistrationTimeList.length>0) { |
|
|
|
if(refresh || chooseDay>=this.RegistrationTimeList.length) { |
|
|
|
this.$refs.book.dataInit(this.RegistrationTimeList[0]) |
|
|
|
}else{ |
|
|
|
this.$refs.book.chooseDay(chooseDay, this.RegistrationTimeList[chooseDay]) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
closeConfirm() { |
|
|
|
this.$refs.sliderbox.closeConfirm() |
|
|
|
}, |
|
|
|
appointCheck(times){ |
|
|
|
appointCheck(times, chooseDay=''){ |
|
|
|
var param = new Object() |
|
|
|
param.start_time = times.start |
|
|
|
param.end_time = times.end |
|
|
|
param.date = times.date |
|
|
|
param.visit_hospital_id = this.hospitalId |
|
|
|
param.visit_user_count = this.activeVisitors.length |
|
|
|
param.visit_user_count = 1 |
|
|
|
this.times = param |
|
|
|
this.$http.req('client/user/appoint/check', param).then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
this.$refs.sliderbox.showConfirm() |
|
|
|
if(data == -1) { |
|
|
|
this.getAvailabletRegistrationTime(false, chooseDay) |
|
|
|
return |
|
|
|
} |
|
|
|
if(data.left_count < this.activeVisitors.length){ |
|
|
|
this.needSelectMembers = true |
|
|
|
this.$refs.sliderbox.showConfirm() |
|
|
|
this.times.left_count = data.left_count |
|
|
|
}else{ |
|
|
|
this.$refs.sliderbox.showConfirm() |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
showConfirm(times) { |
|
|
|
this.appointCheck(times) |
|
|
|
this.appointCheck(times, times.key) |
|
|
|
}, |
|
|
|
submitConfim(){ |
|
|
|
uni.navigateTo({ |
|
|
|