main
yanzai 10 months ago
parent 8276fe00d1
commit 903a9d74b8

@ -88,7 +88,8 @@ class OrderController extends Controller
return \Yz::echoError1('未找到有效订单'); return \Yz::echoError1('未找到有效订单');
} }
return \Yz::Return(true, '获取成功', [ return \Yz::Return(true, '获取成功', [
'info' => $order_info 'info' => $order_info,
'today' => date('Y-m-d')
]); ]);
} }

@ -163,6 +163,7 @@
border-radius: 10rpx; border-radius: 10rpx;
padding: 2rpx 8rpx; padding: 2rpx 8rpx;
font-size: 22rpx; font-size: 22rpx;
color: #239EA3;
} }
.xian_k { .xian_k {
@ -189,7 +190,7 @@
.hengxian { .hengxian {
width: 100%; width: 100%;
border-top: 1px solid #C0C6C7; border-top: 1px solid #239EA3;
margin-top: 18rpx; margin-top: 18rpx;
} }
@ -217,7 +218,7 @@
/* 假设一行有4个项目减去想要的间隔 */ /* 假设一行有4个项目减去想要的间隔 */
margin-right: 40rpx; margin-right: 40rpx;
/* 设置右侧边距 */ /* 设置右侧边距 */
color: #111111; color: #008F96;
} }
@ -225,6 +226,6 @@
margin-right: 0; margin-right: 0;
} }
.used{ .used{
color:red; color:#B5B5B6;
} }
</style> </style>

@ -82,11 +82,6 @@
} }
}, },
{ {
"path": "pages/buy/done/done_new",
"style": {
"navigationBarTitleText": "支付完成"
}
},{
"path": "pages/buy/done/yuyue_done", "path": "pages/buy/done/yuyue_done",
"style": { "style": {
"navigationBarTitleText": "预约完成" "navigationBarTitleText": "预约完成"
@ -182,6 +177,11 @@
"style": { "style": {
"navigationBarTitleText": "预约时间" "navigationBarTitleText": "预约时间"
} }
},{
"path": "pages/main/yytjsj/yytjsj_new",
"style": {
"navigationBarTitleText": "预约时间"
}
}, },
{ {
"path": "pages/main/tjyy/tjyy", "path": "pages/main/tjyy/tjyy",

@ -1,5 +1,5 @@
<script setup> <script setup>
import DraggableButton from "@/pages/components/goHome.vue"; import DraggableButton from "@/pages/components/goHome.vue";
/** /**
* name * name
* usersa0ChunLuyu * usersa0ChunLuyu
@ -70,7 +70,7 @@
uni.hideLoading() uni.hideLoading()
$response(response, () => { $response(response, () => {
if (response.status) { if (response.status) {
order_info.value = response.data.info order_info.value=response.data.info
} }
}) })
} }
@ -89,7 +89,7 @@
</script> </script>
<template> <template>
<DraggableButton /> <DraggableButton />
<view class="done_new_main"> <view>
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
@ -97,13 +97,12 @@
<view v-if="order_info.status === 2" class="order_done_wrapper"> <view v-if="order_info.status === 2" class="order_done_wrapper">
<view class="order_icon_wrapper"> <view class="order_icon_wrapper">
<view class="order_icon_image_wrapper"> <view class="order_icon_image_wrapper">
<image src="@/static/assets/buy/buydone.png"></image> <image src="@/static/assets/buy/buy_done@2x.png"></image>
</view> </view>
<view class="order_icon_tip_wrapper">支付成功</view> <view class="order_icon_tip_wrapper">恭喜您支付成功</view>
<!-- <view v-if="order_info.checkup_type_id==4" <view v-if="order_info.checkup_type_id==4" style="font-size: 24rpx;padding:20rpx 40rpx; 0rpx 40rpx;color:#FF0000;">
style="font-size: 24rpx;padding:20rpx 40rpx; 0rpx 40rpx;color:#FF0000;">
请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回 请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回
</view> --> </view>
</view> </view>
<view class="order_info_wrapper"> <view class="order_info_wrapper">
<view class="order_info_title_wrapper">{{ order_info.title }}</view> <view class="order_info_title_wrapper">{{ order_info.title }}</view>
@ -111,36 +110,35 @@
<view class="order_info_label_wrapper">体检人</view> <view class="order_info_label_wrapper">体检人</view>
<view class="order_info_value_wrapper">{{ order_info.name }}</view> <view class="order_info_value_wrapper">{{ order_info.name }}</view>
</view> </view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">证件号码</view>
<view class="order_info_value_wrapper">{{ order_info.id_number }}</view>
</view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">预约单号</view> <view class="order_info_label_wrapper">预约单号</view>
<view class="order_info_value_wrapper">{{ order_info.order_number }}</view> <view class="order_info_value_wrapper">{{ order_info.order_number }}</view>
</view> </view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">类型</view> <view class="order_info_label_wrapper">预约时间</view>
<view class="order_info_value_wrapper"><span v-if="order_info.type==1"></span><span <view class="order_info_value_wrapper">{{ order_info.appointment_date }} {{ order_info.appointment_time }}</view>
v-if="order_info.type==2">团检</span></view>
</view> </view>
<view class="tishi"> <view class="order_info_line_wrapper" v-if="order_info.erxian_appointment_info &&order_info.erxian_appointment_info.length>0">
<view> <view class="order_info_label_wrapper">核磁项目:</view>
<uni-icons type="info-filled" size="18" color="#009DA6"></uni-icons> <view class="order_info_value_wrapper" style="margin-left: 20rpx;" v-for="(item,index) in order_info.erxian_appointment_info" :key="index">
<view>{{item.name}}</view>
<view style="margin-top: -10rpx;">预约时间{{order_info.erxian_appointment_info[0].date}} {{order_info.erxian_appointment_info[0].time}}</view>
</view> </view>
<view style="line-height: 38rpx;margin-left: 6rpx;">
请提前10分钟凭身份证原件到现代妇儿秀英院区健康管理中心(2楼女宾区)签到建议体检前3天清淡饮食禁烟酒体检当天需空腹禁水禁食咨询电话6659555565781993
</view> </view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">类型</view>
<view class="order_info_value_wrapper"><span v-if="order_info.type==1"></span><span v-if="order_info.type==2"></span></view>
</view> </view>
<view class="order_info_price_wrapper"> <view class="order_info_price_wrapper">
<view class="order_info_price_label_wrapper">订单金额</view> <view class="order_info_label_wrapper">订单金额</view>
<view class="order_info_value_wrapper">¥{{ order_info.true_price }}</view> <view class="order_info_value_wrapper">¥{{ order_info.true_price }}</view>
</view> </view>
</view> </view>
<view @click="toOrderList()" class="check_done_wrapper">立即预约体检</view> <view @click="toOrderList()" class="check_done_wrapper">确认并关闭</view>
<view @click="toOrderList()" class="next_done_wrapper">
<view style="margin-right: 6rpx;">下次预约</view>
<view style="letter-spacing: -10rpx; vertical-align:super;color: #b3b3b3;">
&gt;&gt;&gt;
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -151,32 +149,16 @@
} }
</style> </style>
<style scoped> <style scoped>
.next_done_wrapper{
display: flex;
width: 100%;
justify-content: center;
margin-top: 10rpx;
color:#9E9E9F;
font-size: 24rpx;
font-weight: 700;
}
.done_new_main {
background-color: #D8EEF3;
height: calc(100vh - 130rpx);
padding-top: 40rpx;
}
.check_done_wrapper { .check_done_wrapper {
width: 263rpx; width: 580rpx;
height: 53rpx; height: 90rpx;
margin: 80rpx auto 0; margin: 120rpx auto 0;
border-radius: 999rpx; border-radius: 999rpx;
background: #35ACB2; background: #35ACB2;
font-weight: 700; font-weight: 500;
font-size: 29rpx; font-size: 31rpx;
color: #F6FDFD; color: #F6FDFD;
line-height: 53rpx; line-height: 90rpx;
text-align: center; text-align: center;
} }
@ -186,51 +168,49 @@
font-weight: normal; font-weight: normal;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
line-height: 50rpx; line-height: 48rpx;
} }
.order_info_value_wrapper { .order_info_value_wrapper {
color: #9E9E9F; color: #000000;
} }
.order_info_price_wrapper { .order_info_price_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end;
font-weight: normal; font-weight: normal;
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #000000;
line-height: 48rpx; line-height: 48rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.order_info_price_wrapper .order_info_value_wrapper { .order_info_price_wrapper .order_info_value_wrapper {
color: #E95513; color: #FF0000;
font-size: 28rpx;
font-weight: bolder;
} }
.order_info_title_wrapper { .order_info_title_wrapper {
font-weight: 700; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
color: #009FA8; color: #0BBACF;
line-height: 45rpx; line-height: 45rpx;
border-bottom: solid 1rpx #DBDCDC; border-bottom: solid 1rpx #0BBACF;
padding-bottom: 30rpx; padding-bottom: 15rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.order_info_wrapper { .order_info_wrapper {
background: #fff; width: calc(660rpx - 110rpx);
border-radius: 20rpx; background: #E6F8FA;
margin: 25rpx 40rpx; border-radius: 15rpx;
padding: 30rpx 48rpx; margin: 91rpx auto 0;
padding: 30rpx 55rpx;
} }
.order_icon_tip_wrapper { .order_icon_tip_wrapper {
font-weight: bold; font-weight: 500;
font-size: 36rpx; font-size: 36rpx;
color: #3E3A39; color: #181818;
line-height: 1; line-height: 1;
margin-top: 31rpx; margin-top: 31rpx;
text-align: center; text-align: center;
@ -238,42 +218,23 @@
.order_done_wrapper { .order_done_wrapper {
width: 750rpx; width: 750rpx;
margin: 0 auto;
} }
.order_icon_wrapper { .order_icon_wrapper {
background-color: #fff; margin-top: 71rpx;
margin-left: 40rpx;
margin-right: 40rpx;
border-radius: 20rpx;
padding-top: 98rpx;
height: 335rpx;
} }
.order_icon_image_wrapper { .order_icon_image_wrapper {
width: 145rpx; width: 165rpx;
height: 137rpx; height: 165rpx;
margin: 0 auto; margin: 0 auto;
} }
.order_icon_image_wrapper image { .order_icon_image_wrapper image {
width: 145rpx; width: 165rpx;
height: 137rpx; height: 165rpx;
} display: inline-block;
object-fit: contain;
.tishi {
display: flex;
color: #009FA8;
font-size: 20rpx;
margin-top: 30rpx;
}
.order_info_label_wrapper {
color: #9E9E9F;
}
.order_info_price_label_wrapper {
color: #333;
font-weight: 700;
} }
</style> </style>

@ -1,5 +1,5 @@
<script setup> <script setup>
import DraggableButton from "@/pages/components/goHome.vue"; import DraggableButton from "@/pages/components/goHome.vue";
/** /**
* name * name
* usersa0ChunLuyu * usersa0ChunLuyu
@ -70,7 +70,7 @@ import DraggableButton from "@/pages/components/goHome.vue";
uni.hideLoading() uni.hideLoading()
$response(response, () => { $response(response, () => {
if (response.status) { if (response.status) {
order_info.value=response.data.info order_info.value = response.data.info
} }
}) })
} }
@ -80,6 +80,11 @@ import DraggableButton from "@/pages/components/goHome.vue";
url: '/pages/main/order/order' url: '/pages/main/order/order'
}) })
} }
const toPlan=()=>{
uni.reLaunch({
url: '/pages/main/yytjsj/yytjsj_new'
})
}
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
@ -89,7 +94,7 @@ import DraggableButton from "@/pages/components/goHome.vue";
</script> </script>
<template> <template>
<DraggableButton /> <DraggableButton />
<view> <view class="done_new_main">
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
@ -97,12 +102,13 @@ import DraggableButton from "@/pages/components/goHome.vue";
<view v-if="order_info.status === 2" class="order_done_wrapper"> <view v-if="order_info.status === 2" class="order_done_wrapper">
<view class="order_icon_wrapper"> <view class="order_icon_wrapper">
<view class="order_icon_image_wrapper"> <view class="order_icon_image_wrapper">
<image src="@/static/assets/buy/buy_done@2x.png"></image> <image src="@/static/assets/buy/buydone.png"></image>
</view> </view>
<view class="order_icon_tip_wrapper">恭喜您支付成功</view> <view class="order_icon_tip_wrapper">支付成功</view>
<view v-if="order_info.checkup_type_id==4" style="font-size: 24rpx;padding:20rpx 40rpx; 0rpx 40rpx;color:#FF0000;"> <!-- <view v-if="order_info.checkup_type_id==4"
style="font-size: 24rpx;padding:20rpx 40rpx; 0rpx 40rpx;color:#FF0000;">
请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回 请您的配偶在15分钟内完成预约否则本次预约将会失效如有支付金额会原路退回
</view> </view> -->
</view> </view>
<view class="order_info_wrapper"> <view class="order_info_wrapper">
<view class="order_info_title_wrapper">{{ order_info.title }}</view> <view class="order_info_title_wrapper">{{ order_info.title }}</view>
@ -110,35 +116,36 @@ import DraggableButton from "@/pages/components/goHome.vue";
<view class="order_info_label_wrapper">体检人</view> <view class="order_info_label_wrapper">体检人</view>
<view class="order_info_value_wrapper">{{ order_info.name }}</view> <view class="order_info_value_wrapper">{{ order_info.name }}</view>
</view> </view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">证件号码</view>
<view class="order_info_value_wrapper">{{ order_info.id_number }}</view>
</view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">预约单号</view> <view class="order_info_label_wrapper">预约单号</view>
<view class="order_info_value_wrapper">{{ order_info.order_number }}</view> <view class="order_info_value_wrapper">{{ order_info.order_number }}</view>
</view> </view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">预约时间</view> <view class="order_info_label_wrapper">类型</view>
<view class="order_info_value_wrapper">{{ order_info.appointment_date }} {{ order_info.appointment_time }}</view> <view class="order_info_value_wrapper"><span v-if="order_info.type==1"></span><span
v-if="order_info.type==2">团检</span></view>
</view> </view>
<view class="order_info_line_wrapper" v-if="order_info.erxian_appointment_info &&order_info.erxian_appointment_info.length>0"> <view class="tishi">
<view class="order_info_label_wrapper">核磁项目:</view> <view>
<view class="order_info_value_wrapper" style="margin-left: 20rpx;" v-for="(item,index) in order_info.erxian_appointment_info" :key="index"> <uni-icons type="info-filled" size="18" color="#009DA6"></uni-icons>
<view>{{item.name}}</view>
<view style="margin-top: -10rpx;">预约时间{{order_info.erxian_appointment_info[0].date}} {{order_info.erxian_appointment_info[0].time}}</view>
</view> </view>
<view style="line-height: 38rpx;margin-left: 6rpx;">
请提前10分钟凭身份证原件到现代妇儿秀英院区健康管理中心(2楼女宾区)签到建议体检前3天清淡饮食禁烟酒体检当天需空腹禁水禁食咨询电话6659555565781993
</view> </view>
<view class="order_info_line_wrapper">
<view class="order_info_label_wrapper">类型</view>
<view class="order_info_value_wrapper"><span v-if="order_info.type==1"></span><span v-if="order_info.type==2"></span></view>
</view> </view>
<view class="order_info_price_wrapper"> <view class="order_info_price_wrapper">
<view class="order_info_label_wrapper">订单金额</view> <view class="order_info_price_label_wrapper">订单金额</view>
<view class="order_info_value_wrapper">¥{{ order_info.true_price }}</view> <view class="order_info_value_wrapper">¥{{ order_info.true_price }}</view>
</view> </view>
</view> </view>
<view @click="toOrderList()" class="check_done_wrapper">确认并关闭</view> <view @click="toPlan()" class="check_done_wrapper">立即预约体检</view>
<view @click="toOrderList()" class="next_done_wrapper">
<view style="margin-right: 6rpx;">下次预约</view>
<view style="letter-spacing: -10rpx; vertical-align:super;color: #b3b3b3;">
&gt;&gt;&gt;
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -149,16 +156,32 @@ import DraggableButton from "@/pages/components/goHome.vue";
} }
</style> </style>
<style scoped> <style scoped>
.next_done_wrapper{
display: flex;
width: 100%;
justify-content: center;
margin-top: 10rpx;
color:#9E9E9F;
font-size: 24rpx;
font-weight: 700;
}
.done_new_main {
background-color: #D8EEF3;
height: calc(100vh - 130rpx);
padding-top: 40rpx;
}
.check_done_wrapper { .check_done_wrapper {
width: 580rpx; width: 263rpx;
height: 90rpx; height: 53rpx;
margin: 120rpx auto 0; margin: 80rpx auto 0;
border-radius: 999rpx; border-radius: 999rpx;
background: #35ACB2; background: #35ACB2;
font-weight: 500; font-weight: 700;
font-size: 31rpx; font-size: 29rpx;
color: #F6FDFD; color: #F6FDFD;
line-height: 90rpx; line-height: 53rpx;
text-align: center; text-align: center;
} }
@ -168,49 +191,51 @@ import DraggableButton from "@/pages/components/goHome.vue";
font-weight: normal; font-weight: normal;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
line-height: 48rpx; line-height: 50rpx;
} }
.order_info_value_wrapper { .order_info_value_wrapper {
color: #000000; color: #9E9E9F;
} }
.order_info_price_wrapper { .order_info_price_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end;
font-weight: normal; font-weight: normal;
font-size: 24rpx; font-size: 24rpx;
color: #000000; color: #333;
line-height: 48rpx; line-height: 48rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.order_info_price_wrapper .order_info_value_wrapper { .order_info_price_wrapper .order_info_value_wrapper {
color: #FF0000; color: #E95513;
font-size: 28rpx;
font-weight: bolder;
} }
.order_info_title_wrapper { .order_info_title_wrapper {
font-weight: 500; font-weight: 700;
font-size: 30rpx; font-size: 30rpx;
color: #0BBACF; color: #009FA8;
line-height: 45rpx; line-height: 45rpx;
border-bottom: solid 1rpx #0BBACF; border-bottom: solid 1rpx #DBDCDC;
padding-bottom: 15rpx; padding-bottom: 30rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.order_info_wrapper { .order_info_wrapper {
width: calc(660rpx - 110rpx); background: #fff;
background: #E6F8FA; border-radius: 20rpx;
border-radius: 15rpx; margin: 25rpx 40rpx;
margin: 91rpx auto 0; padding: 30rpx 48rpx;
padding: 30rpx 55rpx;
} }
.order_icon_tip_wrapper { .order_icon_tip_wrapper {
font-weight: 500; font-weight: bold;
font-size: 36rpx; font-size: 36rpx;
color: #181818; color: #3E3A39;
line-height: 1; line-height: 1;
margin-top: 31rpx; margin-top: 31rpx;
text-align: center; text-align: center;
@ -218,23 +243,42 @@ import DraggableButton from "@/pages/components/goHome.vue";
.order_done_wrapper { .order_done_wrapper {
width: 750rpx; width: 750rpx;
margin: 0 auto;
} }
.order_icon_wrapper { .order_icon_wrapper {
margin-top: 71rpx; background-color: #fff;
margin-left: 40rpx;
margin-right: 40rpx;
border-radius: 20rpx;
padding-top: 98rpx;
height: 335rpx;
} }
.order_icon_image_wrapper { .order_icon_image_wrapper {
width: 165rpx; width: 145rpx;
height: 165rpx; height: 137rpx;
margin: 0 auto; margin: 0 auto;
} }
.order_icon_image_wrapper image { .order_icon_image_wrapper image {
width: 165rpx; width: 145rpx;
height: 165rpx; height: 137rpx;
display: inline-block; }
object-fit: contain;
.tishi {
display: flex;
color: #009FA8;
font-size: 20rpx;
margin-top: 30rpx;
}
.order_info_label_wrapper {
color: #9E9E9F;
}
.order_info_price_label_wrapper {
color: #333;
font-weight: 700;
} }
</style> </style>

@ -178,7 +178,7 @@
line-height: 70rpx; line-height: 70rpx;
margin: 80rpx auto 0; margin: 80rpx auto 0;
border-radius: 20rpx 20rpx 0rpx 0rpx; border-radius: 20rpx 20rpx 0rpx 0rpx;
background: #35ACB2; background: #00939B;
font-weight: 700; font-weight: 700;
font-size: 29rpx; font-size: 29rpx;
color: #F6FDFD; color: #F6FDFD;

@ -430,6 +430,11 @@
} }
const tabsClickFunc=(value)=>{ const tabsClickFunc=(value)=>{
tabs_active_id.value=value tabs_active_id.value=value
if(value==2){
uni.navigateTo({
url: "/pages/main/tj/tjzx?" + "comboId=" + "&itemIds="
});
}
if(value==1){ if(value==1){
comboIndex.value=zhuangjianType.value // comboIndex.value=zhuangjianType.value //
screenObj.value.combo_type=comboIndex.value screenObj.value.combo_type=comboIndex.value
@ -481,7 +486,7 @@
<view class="top_button_row"> <view class="top_button_row">
<view @click="tabsClickFunc(0)" :class="['top_button',{'top_button_active':tabs_active_id==false}]">选择套餐</view> <view @click="tabsClickFunc(0)" :class="['top_button',{'top_button_active':tabs_active_id==false}]">选择套餐</view>
<view @click="tabsClickFunc(1)" :class="['top_button',{'top_button_active':tabs_active_id==true}]">专家定制</view> <view @click="tabsClickFunc(1)" :class="['top_button',{'top_button_active':tabs_active_id==true}]">专家定制</view>
<view class="top_button">项目自选</view> <view @click="tabsClickFunc(2)" class="top_button">项目自选</view>
</view> </view>
<view class="select_wrapper flex" v-if="selectKey"> <view class="select_wrapper flex" v-if="selectKey">
<template v-for="(value, key, index) in combo_select" :key="index"> <template v-for="(value, key, index) in combo_select" :key="index">

@ -0,0 +1,507 @@
<template>
<view class="ctime_main">
<view v-if="orderInfo" style="display: flex;justify-content: space-between;padding: 40rpx;">
<view>
<view style="font-size: 33rpx;">{{orderInfo.name}}</view>
<view style="font-size: 23rpx;color:#008F96;margin-top: 10rpx;">{{orderInfo.title}}</view>
</view>
<view>
<view style="font-size: 33rpx;">{{doctor_name?doctor_name:"体检医生"}}</view>
<view class="doctor_button" @click="selectDoctor()">
<uni-icons type="search" color="#D8EEF3" size="16"></uni-icons>
<view>请选择</view>
</view>
</view>
</view>
<view class="zhouli">
<WeeklyCalendar v-if="weekList" :dataInfo="weekList" :selectedTime="selectedTime" :YuYueInfo="YuYueInfo" :TjDTime="tj_date+' '+tj_time" :ItemSelected="itemSelected"
@selectDate="selectDateFunc" @selectTime="selectTimeFunc" @openMonth="openMonthFunc" />
</view>
<view class="dateitem" v-if="orderInfo">
<view
style="background-color: #f7f7f7; padding: 20rpx; font-size: 30rpx; border-radius: 20rpx;color: #333;">
<view>{{orderInfo.name}}</view>
<view
style="background-color: #f1f1f1;padding: 20rpx 10rpx; margin-top: 10rpx;border-radius: 14rpx;font-size: 28rpx;color: #666;">
<view v-if="YuYueInfo.NmrInfo.length>0">
<view @click="itemClick('nmr',item_nmr,index_nmr)" v-for="(item_nmr,index_nmr) in YuYueInfo.NmrInfo" :key="index_nmr"
style="padding: 20rpx;" :class="(itemSelected.type=='nmr' && itemSelected.index==index_nmr)?'itemSelected':''">
{{item_nmr.name}} <span v-if="item_nmr.date && item_nmr.time">{{item_nmr.date}} {{item_nmr.time}}</span>
</view>
</view>
<view @click="itemClick('tj','',0)" style="margin-top: 10rpx;padding: 20rpx;color: #666;"
:class="itemSelected.type=='tj'?'itemSelected':''">体检日期 <span v-if="tj_date && tj_time">{{tj_date}}
{{tj_time}}</span></view>
</view>
</view>
</view>
<view class="pb-100rpx">
<!-- <view @click="StartYuYue()"
class="text-#fff text-32rpx rounded-45rpx bg-#239EA3 mt-40rpx ma w-520rpx h-90rpx flex flex-items-center flex-justify-center">
确定
</view> -->
<view @click="StartYuYue()" class="check_done_wrapper">立即预约</view>
</view>
<view id="ylrl">
<uni-calendar :insert="false" :showMonth="false" ref="DoctorMonthCalendar" @confirm="DoctMonthConfirm" />
<uni-calendar :selected="MonthList" @monthSwitch="monthSwitch" :insert="false"
:showMonth="false" ref="MonthCalendar" @confirm="MonthConfirm" />
</view>
</view>
</template>
<script setup>
import {
onMounted,
ref
} from 'vue';
import {
$image,
$api,
$response
} from "@/api";
import {
useStore
} from "@/store";
const $store = useStore();
import {
onShow,onLoad
} from "@dcloudio/uni-app";
import WeeklyCalendar from '@/common/WeeklyCalendar.vue';
let nmr_date = ref(null);
let nmr_time = ref(null);
let nmr_plan_id = ref(null); //id
let tj_date = ref(null);
let tj_time = ref(null);
let tj_plan_id = ref(null); //id
let weekList = ref(null);
let doctor_name = ref(null);
//
const GetDayPlanListFunc = async () => {
uni.showLoading();
let data = {
hospital: orderInfo.value.hospital_id,
person_id: orderInfo.value.person_id,
date: selectedDate.value,
use_type: orderInfo.value.type,
checkup_type_id: orderInfo.value.checkup_type_id,
amount: orderInfo.value.true_price,
}
const response = await $api("GetDayPlanList", data);
uni.hideLoading();
$response(response, () => {
weekList.value = response.data
});
};
//
const NMRGetDayPlanListFunc = async () => {
uni.showLoading();
let data = {
hospital: orderInfo.value.hospital_id,
date: selectedDate.value,
}
const response = await $api("NMRGetDayPlanList", data);
uni.hideLoading();
$response(response, () => {
weekList.value = response.data
});
};
let selectedTime = ref(null);
let orderInfo = ref(null)
let YuYueInfo=ref({
TjInfo:{},
NmrInfo:{}
})
const GetOrderInfo = async () => {
uni.showLoading();
const response = await $api("GetOrderDetail", {
id: OrderId.value
});
uni.hideLoading();
$response(response, () => {
orderInfo.value = response.data.info
doctor_name.value = orderInfo.value.doctor
itemSelected.value.type = 'tj'
selectedTime.value = orderInfo.value.appointment_time
selectedDate.value = orderInfo.value.appointment_date
GetDayPlanListFunc()
tj_date.value = response.data.today
tj_time.value = orderInfo.value.appointment_time
tj_plan_id.value=orderInfo.value.plan_id
});
}
//weekly
let selectedDate = ref(null);
const selectDateFunc = (date) => {
if(doctor_name.value){
uni.showModal({
title: '提示',
content: '已选择医生,切换日期将重新选择医生,是否继续',
cancelText:'取消',
confirmText:'确定',
success: function (res) {
if (res.confirm) {
DateChange(date)
} else if (res.cancel) {
}
}
});
}else{
DateChange(date)
}
}
//weekly
let SelectedPlanId = ref(null)
const selectTimeFunc = (timeinfo) => {
selectedTime.value = timeinfo.time
SelectedPlanId.value = timeinfo.id
if (itemSelected.value.type == 'nmr') {
YuYueInfo.value.NmrInfo[itemSelected.value.index].time = timeinfo.time
nmr_plan_id.value = timeinfo.id
}
if (itemSelected.value.type == 'tj') {
tj_time.value = timeinfo.time
tj_plan_id.value = timeinfo.id
}
}
let itemSelected = ref({
type:null,
item:{},
index:0
});
const itemClick = (type,item,index) => {
//weekList.value=null
if (type == 'nmr') {
//selectedTime.value = nmr_time.value
//selectedDate.value = nmr_date.value
selectedTime.value = YuYueInfo.value.NmrInfo[index].time
selectedDate.value = YuYueInfo.value.NmrInfo[index].date
NMRGetDayPlanListFunc()
}
if (type == 'tj') {
selectedTime.value = tj_time.value
selectedDate.value = tj_date.value
GetDayPlanListFunc()
}
itemSelected.value.type = type
itemSelected.value.item=item
itemSelected.value.index=index
}
let DoctorMonthCalendar = ref(null)
const selectDoctor = () => {
if (tj_date.value == null) { //
DoctorMonthCalendar.value.open();
} else {
uni.navigateTo({
url: `/pages/main/selectDoctor/selectDoctor?date=${tj_date.value}`,
});
}
}
//
const DoctMonthConfirm = (e) => {
tj_date.value = e.year + "-" + e.month + "-" + e.date
uni.navigateTo({
url: `/pages/main/selectDoctor/selectDoctor?date=${tj_date.value}`,
});
}
let MonthCalendar = ref(null)
let MonthList = ref([]); //
let currentDate = ref(null); //
const monthSwitch = (e) => { //
let ym=e.year+""+"-"+e.month+""
if (itemSelected.value.type == 'nmr') {
NMRGetMonthPlanListFunc(ym)
}
if (itemSelected.value.type == 'tj') {
GetMonthPlanListFunc(ym)
}
}
const MonthConfirm = (e) => { //
console.log(e.fulldate)
if(doctor_name.value){
uni.showModal({
title: '提示',
content: '已选择医生,切换日期将重新选择医生,是否继续',
cancelText:'取消',
confirmText:'确定',
success: function (res) {
if (res.confirm) {
DateChange(e.fulldate)
} else if (res.cancel) {
}
}
});
}else{
DateChange(e.fulldate)
}
}
//
const GetMonthPlanListFunc = async (ym='') => {
uni.showLoading();
let data = {
hospital: orderInfo.value.hospital_id,
person_id: orderInfo.value.person_id,
month: ym?ym:tj_date.value.substring(0, 7),
use_type: orderInfo.value.type,
checkup_type_id: orderInfo.value.checkup_type_id,
amount: orderInfo.value.true_price,
}
const response = await $api("GetMonthPlanCount", data);
uni.hideLoading();
$response(response, () => {
let rlArr = [];
response.data.list.forEach((item) => {
let o = {
date: item.date,
info: "余号" + item.count,
};
rlArr.push(o);
});
MonthList.value = rlArr;
//MonthCalendar.value.open()
});
};
//
const NMRGetMonthPlanListFunc = async (ym='') => {
uni.showLoading();
let data = {
hospital: orderInfo.value.hospital_id,
month: ym?ym:YuYueInfo.value.NmrInfo[itemSelected.value.index].date.substring(0, 7),
}
const response = await $api("NMRGetMonthPlanCount", data);
uni.hideLoading();
$response(response, () => {
let rlArr = [];
response.data.list.forEach((item) => {
let o = {
date: item.date,
info: "余号" + item.count,
};
rlArr.push(o);
});
MonthList.value = rlArr;
//MonthCalendar.value.open()
});
};
//
const openMonthFunc = async() => {
if (itemSelected.value.type == 'nmr') {
await NMRGetMonthPlanListFunc()
}
if (itemSelected.value.type == 'tj') {
await GetMonthPlanListFunc()
}
MonthCalendar.value.open()
}
//
const StartYuYue = async() => {
if(tj_time.value==null){
uni.$lu.toast("请选择体检日期");
return false
}
console.log(tj_plan_id.value);
uni.showLoading();
let data = {
orderid: orderInfo.value.id,
planid: tj_plan_id.value,
nmr_info:YuYueInfo.value.NmrInfo,
doctor: doctor_name.value
}
console.log(data);
const response = await $api("ChangeAppointment", data);
uni.hideLoading();
$response(response, () => {
if(response.status){
uni.showToast({
title: '改约完成'
});
setTimeout(()=>{
uni.redirectTo({
url:'/pages/main/order/order'
})
},1000)
}
});
}
//
const DateChange=(date)=>{
selectedDate.value=date
selectedTime.value = null
if (itemSelected.value.type == 'nmr') {
YuYueInfo.value.NmrInfo[itemSelected.value.index].time = null
YuYueInfo.value.NmrInfo[itemSelected.value.index].date = date
tj_time.value = null //
tj_date.value = null
doctor_name.value = null //
NMRGetDayPlanListFunc()
}
if (itemSelected.value.type == 'tj') {
tj_time.value = null
tj_date.value = date
doctor_name.value = null //
GetDayPlanListFunc()
}
}
let temp = null
onMounted(() => {
//
temp = $store.getYytjInfo()
temp.doctor_name = ""
$store.setYytjInfo(temp)
GetOrderInfo()
});
let OrderId=ref(0)
onLoad((e)=>{
OrderId.value=e.id
})
onShow(() => {
temp = $store.getYytjInfo()
if (temp.doctor_name != null && temp.doctor_name != '') {
doctor_name.value = temp.doctor_name
}
})
</script>
<style scoped lang="scss">
.ctime_main {
background-color: #D8EEF3;
height: calc(100vh - 80rpx) ;
}
.top {
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 20rpx;
padding: 20rpx;
}
.zhouli {
padding: 40rpx;
background-color: #fff;
}
.itemSelected {
background-color: #e0fafa;
border-radius: 10rpx;
}
.dateitem {
display: none;
padding: 20rpx;
background-color: #fff;
border-radius: 20rpx;
margin-top: 20rpx;
}
::v-deep #ylrl {
.uni-calendar__header,
.uni-calendar__weeks-day {
border: none;
}
.uni-calendar-item--checked {
background-color: transparent;
.uni-calendar-item__weeks-box-item {
background-color: #239ea3 !important;
border-radius: 12rpx;
.uni-calendar-item--extra {
color: #fff !important;
}
}
}
.uni-calendar-item--isDay {
background-color: #239ea3 !important;
border-radius: 12rpx;
color: #fff !important;
}
.uni-calendar-item--extra {
color: #239ea3;
}
.uni-calendar-item__weeks-box {
// padding: 10rpx;
box-sizing: border-box;
}
.uni-calendar-item__weeks-box-circle {
background-color: rgba(0, 0, 0, 0);
}
.uni-calendar-item--isDay-text {
color: #333;
}
.uni-calendar-item__weeks-box-text {
font-size: 26rpx;
}
.uni-calendar-item__weeks-lunar-text {
font-size: 16rpx;
}
.uni-calendar-item__weeks-box-item {
width: 100%;
}
.uni-calendar__backtoday {
display: none;
}
}
.doctor_button{
display: flex;
background-color: #fff;
padding-left: 10rpx;
padding-top: 2rpx;
height: 40rpx;
line-height: 40rpx;
border-radius: 24rpx;
margin-top: 10rpx;
color: #9E9E9F;
font-size: 20rpx;
text-align: center;
width: 120rpx;
}
.check_done_wrapper {
width: 660rpx;
height: 70rpx;
line-height: 70rpx;
margin: 80rpx auto 0;
border-radius: 20rpx 20rpx 0rpx 0rpx;
background: #00939B;
font-weight: 700;
font-size: 29rpx;
color: #F6FDFD;
text-align: center;
position: absolute;
bottom: 40rpx;
left: 45rpx;
}
</style>
Loading…
Cancel
Save