|
|
@ -4,16 +4,16 @@ |
|
|
|
{{hospital_depart_name}} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="header block flex line40" @click="addVisitor" v-if="type != 3"> |
|
|
|
<view class="header block flex line40" @click="addVisitor" v-if="(type != 3 && type != 0) || is_preview"> |
|
|
|
<img :src="cssUrl+'add.svg'">增加就诊人 |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="list-wrapper" v-if="(type == 1 || (type == 3 && hasBaoDaoData))"> |
|
|
|
<view class="list-wrapper" v-if="(type == 1 || type == 0 || is_preview) && visitUsers && visitUsers.length > 0"> |
|
|
|
<view :class="'item block'+(item.select?' active':'')" v-for="(item,key) in visitUsers" @click="chooseVisitor(item, key)"> |
|
|
|
<view class="top flex"> |
|
|
|
<view class="name PfScSemibold over2">{{item.name}}</view> |
|
|
|
<!-- <view class="aam_times" v-if="item.remain_num > 0">剩余{{item.remain_num}}次</view> --> |
|
|
|
<view class="book-date" v-if="type == 3">已预约今日 {{ item.visit_time.split('-')[0] }} 就诊</view> |
|
|
|
<view class="book-date" v-if="type == 0 && item.visit_time && !is_preview">已预约今日 {{ item.visit_time.split('-')[0] }} 就诊</view> |
|
|
|
<!-- <view class="book-date" v-if="type == 3">已预约今日 12:30 就诊</view> --> |
|
|
|
</view> |
|
|
|
<view class="bot line36"> |
|
|
@ -23,25 +23,24 @@ |
|
|
|
<img class="bg" :src="cssUrl+'visitor_list__bg.svg'"> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="baodao-empty" v-if="type == 3 && !hasBaoDaoData"> |
|
|
|
<view class="baodao-empty" v-if="type == 0 && (!visitUsers || visitUsers.length<=0)"> |
|
|
|
<img :src="cssUrl+'empty.png'"> |
|
|
|
<text>今日没有预约哦,请先预约时间</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="submit flex baodao-submit" v-if="type == 3 && !hasBaoDaoData"> |
|
|
|
<view class="submit flex baodao-submit" v-if="type == 0 && !is_preview"> |
|
|
|
<view :class="'btn cancel btn1 PfScMedium'" hover-class="hover" @click="reback">返回</view> |
|
|
|
<view class="btn primary btn1 PfScMedium" hover-class="hover" @click="appointTime">预约时间</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="submit" v-if="type == 0" @click="toPrebook"> |
|
|
|
<view class="submit" v-if="is_preview" @click="toPrebook"> |
|
|
|
<view class="bot primary btn btn2 submitbtn" hover-class="hover"> |
|
|
|
确认预约(已选{{selectCount}}位) |
|
|
|
</view> |
|
|
|
<view class="tip height40">请确保预约就诊前在门诊先挂号</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="submit" v-if="type == 1" @click="toPrebook"> |
|
|
|
<view class="submit" v-if="(type == 1 || type == 0) && !is_preview && visitUsers && visitUsers.length > 0" @click="toPrebook"> |
|
|
|
<view class="bot primary btn btn2 submitbtn" hover-class="hover"> |
|
|
|
确认以上患者已到(已选{{selectCount}}位) |
|
|
|
</view> |
|
|
@ -117,6 +116,9 @@ |
|
|
|
hasBaoDaoData:false, |
|
|
|
type:-1, |
|
|
|
pageshow:false, |
|
|
|
is_preview:false, |
|
|
|
doctorInfo:false, |
|
|
|
hospitals:false, |
|
|
|
} |
|
|
|
}, |
|
|
|
components:{ |
|
|
@ -138,7 +140,6 @@ |
|
|
|
|
|
|
|
uni.setStorageSync('visitor_type', this.type) |
|
|
|
|
|
|
|
this.getVisitors() |
|
|
|
this.depart_id = uni.getStorageSync('depart_id') |
|
|
|
if(!this.depart_id && this.type == 1) { |
|
|
|
this.$pop.modelShow('请先选择要预约的医院科室', '/pages/index/index') |
|
|
@ -150,10 +151,11 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if(this.type == 3) this.depart_id = option.depart_id |
|
|
|
|
|
|
|
if(option.depart_id) this.depart_id = option.depart_id |
|
|
|
if(option.is_preview) this.is_preview = true |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
async onShow() { |
|
|
|
await this.getDoctorInfo(); |
|
|
|
if(this.type == 2){ |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title:'就诊人' |
|
|
@ -162,7 +164,6 @@ |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title:'确认报到' |
|
|
|
}) |
|
|
|
this.getDepartInfo(); |
|
|
|
}else{ |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title:'请选择就诊人' |
|
|
@ -172,12 +173,49 @@ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
reback(){ |
|
|
|
uni.navigateBack(-1) |
|
|
|
uni.navigateTo({ |
|
|
|
url:'/' |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 预约时间 -跳转就诊人页面-预约时间 |
|
|
|
|
|
|
|
async getDoctorInfo() { |
|
|
|
await this.$http.req('user/index_info', {}, 'GET').then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
|
|
|
|
this.doctorInfo = data; |
|
|
|
|
|
|
|
|
|
|
|
if(this.doctorInfo.hospital_departs && this.doctorInfo.hospital_departs.length>0) this.hospitals = this.doctorInfo.hospital_departs; |
|
|
|
|
|
|
|
var hospital = {} |
|
|
|
this.hospitals.forEach(item=>{ |
|
|
|
if(item.depart_id == this.depart_id) hospital = item |
|
|
|
}) |
|
|
|
|
|
|
|
if(!hospital || Object.keys(hospital).length === 0) { |
|
|
|
this.$pop.modelShow('请先选择要预约的医院科室', '/pages/index/index') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.hospital_depart_name = hospital.hospital_name + ' ' + hospital.depart_name |
|
|
|
|
|
|
|
this.type = hospital.type |
|
|
|
if(this.type == 2){ |
|
|
|
this.$pop.modelShow('该科室不允许签到', '/pages/index/index') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
uni.setStorageSync('depart', JSON.stringify(hospital)) |
|
|
|
uni.setStorageSync('doctor_info', JSON.stringify(this.doctorInfo)) |
|
|
|
uni.setStorageSync('depart_id', this.depart_id) |
|
|
|
|
|
|
|
this.getVisitors() |
|
|
|
}); |
|
|
|
}, |
|
|
|
appointTime(){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'/pages/visitors/visitors?type=1' |
|
|
|
url:"/pages/visitors/visitors?type=1&is_preview=1" |
|
|
|
}) |
|
|
|
}, |
|
|
|
modifyVistor(visitor){ |
|
|
@ -224,10 +262,17 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
getVisitors() { |
|
|
|
this.$http.req('user/get_visitors', {}, 'POST').then(data=>{ |
|
|
|
var obj = new Object(); |
|
|
|
if(!this.is_preview && this.type == 0) { |
|
|
|
obj.get_preview = 1 |
|
|
|
obj.depart_id = this.depart_id |
|
|
|
} |
|
|
|
|
|
|
|
this.$http.req('user/get_visitors', obj, 'POST').then(data=>{ |
|
|
|
this.visitUsers = data; |
|
|
|
this.visitUsers = [...this.visitUsers] |
|
|
|
this.popMsgs = [] |
|
|
|
|
|
|
|
var popmsgIndex = 0 |
|
|
|
for (var i = 0; i < this.visitUsers.length; i++) { |
|
|
|
this.visitUsers[i].select = false |
|
|
@ -241,15 +286,7 @@ |
|
|
|
this.popShowCancel = popinfo.popShowCancel |
|
|
|
this.showPopCom() |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getDepartInfo() { |
|
|
|
this.$http.req('user/get_depart_info', {depart_id:this.depart_id}, 'POST').then(data=>{ |
|
|
|
this.type = data.type |
|
|
|
if(this.type == 2){ |
|
|
|
this.$pop.modelShow('签到二维码已过期', '/pages/index/index') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.pageshow = true |
|
|
|
}); |
|
|
|
}, |
|
|
@ -299,7 +336,7 @@ |
|
|
|
|
|
|
|
uni.setStorageSync('active_visitors', JSON.stringify(this.activeVisitors)) |
|
|
|
// 确认报道 => 跳转候诊方式 |
|
|
|
if(this.type == 3 && this.hasBaoDaoData){ |
|
|
|
if((this.type == 0 || this.type == 1) && !this.is_preview){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'/pages/waiting_method/waiting_method' |
|
|
|
}) |
|
|
|