|
@ -14,10 +14,9 @@ |
|
|
|
|
|
|
|
|
<view class="fixedBot btPadding"> |
|
|
<view class="fixedBot btPadding"> |
|
|
<view class="submit"> |
|
|
<view class="submit"> |
|
|
<view :class="'btn cancel'+(showCancelBook || showReBook?' btn1':' btn3')" hover-class="hover" @click="reback">返回</view> |
|
|
<view :class="'btn cancel'+(showCancelBook?' btn1':' btn3')" hover-class="hover" @click="reback">返回</view> |
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showCancelBook && !showReBook" @click="cancelBook">取消预约</view> |
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showCancelBook" @click="cancelBook">取消预约</view> |
|
|
<view class="btn primary btn1" hover-class="hover" v-if="showReBook && !showCancelBook" @click="rebook">重新预约</view> |
|
|
<!-- <view class="btn primary btn1" hover-class="hover" v-if="showReBook && !showCancelBook" @click="rebook">重新预约</view> --> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -29,8 +28,8 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
statusList:['status_wait', 'status_ing', 'status_out_num', 'status_expire', 'status_down'], |
|
|
statusList:['status_wait', 'status_ing', 'status_out_num', 'status_expire', 'status_down', 'status_expire'], |
|
|
statusDescList:['候诊', '就诊中', '过号', '已过期', '已完成'], |
|
|
statusDescList:['候诊', '就诊中', '过号', '已过期', '已完成', '已取消'], |
|
|
status:'', |
|
|
status:'', |
|
|
queueNum:88, |
|
|
queueNum:88, |
|
|
bookDate:"2024.01.09 周二 09:30-12:00", |
|
|
bookDate:"2024.01.09 周二 09:30-12:00", |
|
@ -48,7 +47,8 @@ |
|
|
redirect:'/pages/prebook_list/prebook_list', |
|
|
redirect:'/pages/prebook_list/prebook_list', |
|
|
bookId:false, |
|
|
bookId:false, |
|
|
bookInfo:false, |
|
|
bookInfo:false, |
|
|
showReBook:false |
|
|
showReBook:false, |
|
|
|
|
|
cssUrl:this.cssUrl |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -74,9 +74,18 @@ |
|
|
content:'确认取消预约?', |
|
|
content:'确认取消预约?', |
|
|
success(res) { |
|
|
success(res) { |
|
|
if(!res.confirm) return |
|
|
if(!res.confirm) return |
|
|
that.$http.req('client/user/visit_user/'+this.bookId, {}, 'POST').then(data=>{ |
|
|
that.$http.req('cancel_appoint', {appoint_id:that.bookId}, 'GET').then(data=>{ |
|
|
if(data == -1) return |
|
|
if(data == -1) return |
|
|
that.getVisitors() |
|
|
that.getBookDetail() |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title:"取消预约成功", |
|
|
|
|
|
mask:true, |
|
|
|
|
|
image:that.cssUrl+'gou.svg', |
|
|
|
|
|
times:false, |
|
|
|
|
|
success() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -88,13 +97,13 @@ |
|
|
this.$func.toPage('/pages/index/index') |
|
|
this.$func.toPage('/pages/index/index') |
|
|
}, |
|
|
}, |
|
|
getBookDetail(){ |
|
|
getBookDetail(){ |
|
|
this.$http.req('client/user/appoint/'+this.bookId, {}, 'GET').then(data=>{ |
|
|
this.$http.req('get_appoint_detail', {appoint_id:this.bookId}, 'GET').then(data=>{ |
|
|
if(data == -1) { |
|
|
if(data == -1) { |
|
|
this.bookInfo = false |
|
|
this.bookInfo = false |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var bookInfo = data.data |
|
|
var bookInfo = data |
|
|
if(bookInfo && bookInfo.length <= 0){ |
|
|
if(bookInfo && bookInfo.length <= 0){ |
|
|
this.$pop.modelShow('预约信息为空') |
|
|
this.$pop.modelShow('预约信息为空') |
|
|
return |
|
|
return |
|
@ -103,17 +112,16 @@ |
|
|
bookInfo = data |
|
|
bookInfo = data |
|
|
this.bookInfo = bookInfo |
|
|
this.bookInfo = bookInfo |
|
|
this.status = this.statusList[bookInfo.status] |
|
|
this.status = this.statusList[bookInfo.status] |
|
|
if(bookInfo.status==3) this.showReBook = true |
|
|
if(bookInfo.status==0 || bookInfo.status==2) this.showCancelBook = true |
|
|
if(bookInfo.status==2) this.showCancelBook = true |
|
|
|
|
|
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+this.statusDescList[bookInfo.status]+"</view></view>" |
|
|
this.list[0].custom = "<view class='"+this.status+" status'><view class='over status_text'>"+this.statusDescList[bookInfo.status]+"</view></view>" |
|
|
this.list[1].rightTitle = bookInfo.username; |
|
|
this.list[1].rightTitle = bookInfo.visitor_name |
|
|
this.list[2].rightTitle = bookInfo.visit_hospital.hospital_name |
|
|
this.list[2].rightTitle = bookInfo.hospital_name |
|
|
this.list[3].rightTitle = bookInfo.visit_hospital.hospital_dept_name |
|
|
this.list[3].rightTitle = bookInfo.depart_name |
|
|
this.list[4].rightTitle = bookInfo.visit_hospital.doctor_name ? bookInfo.visit_hospital.doctor_name : '无' |
|
|
this.list[4].rightTitle = bookInfo.doctor_name ? bookInfo.doctor_name : '无' |
|
|
this.list[5].custom = "<view class='queue-text'>前方<text class='queue-num-txt PfScSemibold'>"+bookInfo.wait_count+"</text>人</view>" |
|
|
this.list[5].custom = "<view class='queue-text'>前方<text class='queue-num-txt PfScSemibold'>"+bookInfo.wait_visit_count+"</text>人</view>" |
|
|
if(bookInfo.wait_count<=0) this.list[5].show = false |
|
|
if(bookInfo.wait_visit_count<=0 || bookInfo.status!=0) this.list[5].show = false |
|
|
this.list[6].custom = "<view class='book-date"+(bookInfo.status==0?' wait':' expire')+"'>"+bookInfo.create_datetime+"</view>" |
|
|
this.list[6].custom = "<view class='book-date"+(bookInfo.status==0?' wait':' expire')+"'>"+bookInfo.visit_date+' '+bookInfo.week+' '+bookInfo.visit_time+"</view>" |
|
|
this.notice = bookInfo.visit_hospital.remind_text |
|
|
this.notice = bookInfo.notice |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|