From d5dd1b2e56bb6ebc41d6ed2804d7e635fa8b9db8 Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Tue, 16 Apr 2024 19:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E7=81=B8=E6=8C=82=E5=8F=B7=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=82=A3=E8=80=85=E9=A2=84=E7=BA=A6=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bookBox.vue | 1 + pages/index/index.vue | 1 + pages/prebook/prebook.vue | 44 +++++++++++++++++++++++++++++++++++++------- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/components/bookBox.vue b/components/bookBox.vue index 47990b7..8c8ef5a 100644 --- a/components/bookBox.vue +++ b/components/bookBox.vue @@ -92,6 +92,7 @@ export default { }, confirmSubmit(times){ if(times.bed_count <= 0) return + times.date = this.RegistrationTimeList[this.selectDay].date this.$emit('confirmSubmitEvent', times) } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 20937f5..3ca43db 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -185,6 +185,7 @@ toVisitors(hospital){ uni.setStorageSync('hospital_id', hospital.id) uni.setStorageSync('hospital', JSON.stringify(hospital)) + uni.setStorageSync('doctor_info', JSON.stringify(this.doctorInfo)) uni.navigateTo({ url:"/pages/visitors/visitors?type=1" }) diff --git a/pages/prebook/prebook.vue b/pages/prebook/prebook.vue index be75194..3ba2692 100644 --- a/pages/prebook/prebook.vue +++ b/pages/prebook/prebook.vue @@ -34,15 +34,19 @@ 就诊人: - ①王鹏 ②张富贵 ③张杨明 + + + {{nums[key]}}n.{{item.real_name}} + + - + 医生姓名: - 李静 + {{doctorInfo.name}} 就诊医院: - 广安门中医医院西单门诊部 中医科 + {{hospital.hospital_name}} {{hospital.hospital_dept_name}} 看诊时间: @@ -74,7 +78,8 @@ RegistrationTimeList:[], hospitalId:false, hospital:false, - activeVisitors:[] + activeVisitors:[], + nums:['①','②','③','④','⑤','⑥','⑦','⑧','⑨','⑩'] } }, components:{ @@ -90,6 +95,14 @@ this.activeVisitors = JSON.parse(activeVisitors) this.hospitalId = uni.getStorageSync('hospital_id') this.hospital = uni.getStorageSync('hospital') + + var doctorInfo = uni.getStorageSync('doctor_info') + if(!doctorInfo){ + this.$pop.modelShow('请先选择要预约的医生', '/pages/index/index') + return + } + this.doctorInfo = JSON.parse(doctorInfo) + if(!this.hospitalId && this.hospital) { this.$pop.modelShow('请先选择要预约的医院', '/pages/index/index') return @@ -180,9 +193,20 @@ closeConfirm() { this.$refs.sliderbox.closeConfirm() }, + appointCheck(times){ + 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 + this.$http.req('client/user/appoint/check', param).then(data=>{ + if(data == -1) return + this.$refs.sliderbox.showConfirm() + }); + }, showConfirm(times) { - console.log(times) - this.$refs.sliderbox.showConfirm() + this.appointCheck(times) }, submitConfim(){ uni.navigateTo({ @@ -226,6 +250,12 @@ } .member-style{ margin-top: 82rpx; + text{ + margin-right: 10rpx; + text{ + margin-right: 5rpx; + } + } } .item{ display: flex;