main
yanzai 10 months ago
parent 903a9d74b8
commit 479f848de6

@ -88,6 +88,7 @@ class ApiMapController extends Controller
'CheckEnableNmrTime' => $base_url . '/api/H5/CheckEnableNmrTime', // 查询是否有可用核磁号源 'CheckEnableNmrTime' => $base_url . '/api/H5/CheckEnableNmrTime', // 查询是否有可用核磁号源
'BaseInfo' => $base_url . '/api/H5/BaseInfo', // 基础信息 'BaseInfo' => $base_url . '/api/H5/BaseInfo', // 基础信息
'CreateNewOrder' => $base_url . '/api/H5/CreateNewOrder', // 创建订单(新) 'CreateNewOrder' => $base_url . '/api/H5/CreateNewOrder', // 创建订单(新)
'StartYuYue' => $base_url . '/api/H5/StartYuYue', // 创建订单(新)
]; ];
} }

@ -385,6 +385,36 @@ class OrderNewController extends Controller
} }
} }
//预约,用于用户先支付,后期再预约
public function StartYuYue(){
$plan_id = request('plan_id');
$orderid = request('orderid');
$doctor = request('doctor');
$order = DB::table('orders')->where(['id' => $orderid])->first();
if(!$order) return \Yz::echoError1("订单不存在");
if($order->status!== 2) return \Yz::echoError1("订单不是已支付状态不能预约");
if (!isset($plan_id)) return \Yz::echoError1('号源id不能为空');
//检查号源是否可用
$plan = new PlanController();
$plan_check = $plan->CheckPlan($plan_id, $order->hospital_id, $order->type, $order->sex, $order->price, $order->checkup_type_id);
if ($plan_check['status'] === false) return \Yz::echoError1($plan_check['msg']);
$plan = $plan_check['plan'];
$data=[
'appointment_date' => $plan->date,
'appointment_time' => $plan->time,
'plan_id' => $plan->id,
'plan_number' => $plan->plan_number,
'doctor' => $doctor,
'updated_at' => date('Y-m-d H:i:s')
];
$u = DB::table('orders')->where(['id' => $orderid])->update($data);
if(!$u) return \Yz::echoError1("预约失败");
$Finish = new OrderController();//预约体检
$yuyue= $Finish->Finish($order->order_number);
return \Yz::Return($yuyue['status'], $yuyue['msg'], ['id' => $order->id]);
}
public function item_check($hospital, $data) public function item_check($hospital, $data)
{ {
$peis = new PEISApiController(); $peis = new PEISApiController();

@ -79,6 +79,7 @@ Route::group(['middleware' => ['log'],'prefix' => 'api/H5'], function () {
Route::post('/CheckEnableNmrTime', 'App\Http\Controllers\API\H5\NMRController@CheckEnableNmrTime');//查询是否有可用核磁号源 Route::post('/CheckEnableNmrTime', 'App\Http\Controllers\API\H5\NMRController@CheckEnableNmrTime');//查询是否有可用核磁号源
Route::post('/BaseInfo', 'App\Http\Controllers\API\H5\HomeController@BaseInfo');//基础信息 Route::post('/BaseInfo', 'App\Http\Controllers\API\H5\HomeController@BaseInfo');//基础信息
Route::post('/CreateNewOrder', 'App\Http\Controllers\API\H5\OrderNewController@CreateNewOrder');//创建新订单 Route::post('/CreateNewOrder', 'App\Http\Controllers\API\H5\OrderNewController@CreateNewOrder');//创建新订单
Route::post('/StartYuYue', 'App\Http\Controllers\API\H5\OrderNewController@StartYuYue');//预约

@ -82,7 +82,7 @@
} }
const toPlan=()=>{ const toPlan=()=>{
uni.reLaunch({ uni.reLaunch({
url: '/pages/main/yytjsj/yytjsj_new' url: '/pages/main/yytjsj/yytjsj_new?id='+$props.id
}) })
} }

@ -39,12 +39,14 @@ const configRef = (e) => {
}; };
const choosePersonClick = async (info) => { const choosePersonClick = async (info) => {
uni.showLoading();
// ID // ID
const response = await $api("GetGroupUnit", { const response = await $api("GetGroupUnit", {
hospital_id: $store.save.hospital, hospital_id: $store.save.hospital,
id_number: info.id_number, id_number: info.id_number,
phone: info.phone, phone: info.phone,
}); });
uni.hideLoading();
$response(response, () => { $response(response, () => {
unitList.value = response.data.unit; unitList.value = response.data.unit;
if (response.data.unit.length > 1) { if (response.data.unit.length > 1) {

@ -313,7 +313,7 @@
}}</text> }}</text>
</view> </view>
</view> </view>
<view v-if="status != 2" class="text-24rpx mt-40rpx"> <view v-if="status != 2" class="text-24rpx mt-40rpx groupInfo">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 --> <!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx"> <view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text> <text class="text-#8B8B8B">单位名称</text>
@ -335,7 +335,7 @@
</view> </view>
</view> </view>
<view class="pb-150rpx"> <view class="pb-150rpx">
<view class="flex items-center justify-around px-30rpx pl-150rpx pt-30rpx"> <view class="flex items-center justify-around px-30rpx pt-30rpx">
<view> <view>
<text class="text-30rpx text-#2E2E2E">套餐项目</text> <text class="text-30rpx text-#2E2E2E">套餐项目</text>
<span v-if="status==1 && JSON.stringify(comboInfo) !== '{}'" class="combo_tag_wrapper" >{{ comboInfo?.tags[0]?.text }}</span> <span v-if="status==1 && JSON.stringify(comboInfo) !== '{}'" class="combo_tag_wrapper" >{{ comboInfo?.tags[0]?.text }}</span>
@ -564,4 +564,9 @@
border-radius: 40rpx; border-radius: 40rpx;
margin: 20rpx auto 10rpx auto; margin: 20rpx auto 10rpx auto;
} }
.groupInfo{
border: 1px solid #ccc;
padding: 20rpx;
border-radius: 20rpx;
}
</style> </style>

@ -265,7 +265,11 @@ const getnmrList = async () => {
uni.hideLoading(); uni.hideLoading();
}); });
}; };
const toPlan=async ()=>{
uni.navigateTo({
url: '/pages/main/yytjsj/yytjsj_new'
});
}
const comfrimyy = async () => { const comfrimyy = async () => {
let plan_id = ""; let plan_id = "";
let plan_nmr_id = ""; let plan_nmr_id = "";
@ -684,7 +688,12 @@ const toRouter = (url, status, index) => {
> >
确认支付 确认支付
</button> </button>
<button v-if="buyInfo.group_id"
@click="toPlan()"
class="w-210rpx h-42rpx center text-#fff text-30rpx rounded-full bg-#239EA3 !m-0 button"
>
选择号源
</button>
</view> </view>
</view> </view>
</template> </template>

@ -1,21 +1,22 @@
<template> <template>
<view class="ctime_main"> <view class="ctime_main">
<view v-if="orderInfo" style="display: flex;justify-content: space-between;padding: 40rpx;"> <view v-if="combo_name" style="display: flex;justify-content: space-between;padding: 40rpx;">
<view> <view>
<view style="font-size: 33rpx;">{{orderInfo.name}}</view> <view style="font-size: 33rpx;">{{person_name}}</view>
<view style="font-size: 23rpx;color:#008F96;margin-top: 10rpx;">{{orderInfo.title}}</view> <view style="font-size: 23rpx;color:#008F96;margin-top: 10rpx;">{{combo_name}}</view>
</view> </view>
<view> <view>
<view style="font-size: 33rpx;">{{doctor_name?doctor_name:"体检医生"}}</view> <view style="font-size: 33rpx;">{{doctor_name?doctor_name:"体检医生"}}</view>
<view class="doctor_button" @click="selectDoctor()"> <view class="doctor_button" @click="selectDoctor()">
<uni-icons type="search" color="#D8EEF3" size="16"></uni-icons> <uni-icons type="search" color="#D8EEF3" size="16"></uni-icons>
<view>请选择</view> <view>请选择</view>
</view> </view>
</view> </view>
</view> </view>
<view class="zhouli"> <view class="zhouli">
<WeeklyCalendar v-if="weekList" :dataInfo="weekList" :selectedTime="selectedTime" :YuYueInfo="YuYueInfo" :TjDTime="tj_date+' '+tj_time" :ItemSelected="itemSelected" <WeeklyCalendar v-if="weekList" :dataInfo="weekList" :selectedTime="selectedTime" :YuYueInfo="YuYueInfo"
@selectDate="selectDateFunc" @selectTime="selectTimeFunc" @openMonth="openMonthFunc" /> :TjDTime="tj_date+' '+tj_time" :ItemSelected="itemSelected" @selectDate="selectDateFunc"
@selectTime="selectTimeFunc" @openMonth="openMonthFunc" />
</view> </view>
<view class="dateitem" v-if="orderInfo"> <view class="dateitem" v-if="orderInfo">
<view <view
@ -24,16 +25,19 @@
<view <view
style="background-color: #f1f1f1;padding: 20rpx 10rpx; margin-top: 10rpx;border-radius: 14rpx;font-size: 28rpx;color: #666;"> 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 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" <view @click="itemClick('nmr',item_nmr,index_nmr)"
style="padding: 20rpx;" :class="(itemSelected.type=='nmr' && itemSelected.index==index_nmr)?'itemSelected':''"> 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> {{item_nmr.name}} <span v-if="item_nmr.date && item_nmr.time">{{item_nmr.date}}
{{item_nmr.time}}</span>
</view> </view>
</view> </view>
<view @click="itemClick('tj','',0)" style="margin-top: 10rpx;padding: 20rpx;color: #666;" <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}} :class="itemSelected.type=='tj'?'itemSelected':''">体检日期 <span
v-if="tj_date && tj_time">{{tj_date}}
{{tj_time}}</span></view> {{tj_time}}</span></view>
</view> </view>
@ -47,10 +51,10 @@
</view> --> </view> -->
<view @click="StartYuYue()" class="check_done_wrapper">立即预约</view> <view @click="StartYuYue()" class="check_done_wrapper">立即预约</view>
</view> </view>
<view id="ylrl"> <view id="ylrl">
<uni-calendar :insert="false" :showMonth="false" ref="DoctorMonthCalendar" @confirm="DoctMonthConfirm" /> <uni-calendar :insert="false" :showMonth="false" ref="DoctorMonthCalendar" @confirm="DoctMonthConfirm" />
<uni-calendar :selected="MonthList" @monthSwitch="monthSwitch" :insert="false" <uni-calendar :selected="MonthList" @monthSwitch="monthSwitch" :insert="false" :showMonth="false"
:showMonth="false" ref="MonthCalendar" @confirm="MonthConfirm" /> ref="MonthCalendar" @confirm="MonthConfirm" />
</view> </view>
</view> </view>
</template> </template>
@ -70,12 +74,15 @@
} from "@/store"; } from "@/store";
const $store = useStore(); const $store = useStore();
import { import {
onShow,onLoad onShow,
onLoad
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import WeeklyCalendar from '@/common/WeeklyCalendar.vue'; import WeeklyCalendar from '@/common/WeeklyCalendar.vue';
let nmr_date = ref(null); let nmr_date = ref(null);
let nmr_time = ref(null); let nmr_time = ref(null);
let nmr_plan_id = ref(null); //id let nmr_plan_id = ref(null); //id
let buyInfo = ref({}); //
let yytjInfo = ref({}); //
let tj_date = ref(null); let tj_date = ref(null);
let tj_time = ref(null); let tj_time = ref(null);
@ -84,16 +91,24 @@
let weekList = ref(null); let weekList = ref(null);
let doctor_name = ref(null); let doctor_name = ref(null);
let hospital_id = ref(0);
let person_id = ref(0)
let use_type = ref(0)
let checkup_type_id = ref(0)
let amount = ref(0)
let person_name=ref('')
let combo_name=ref('')
// //
const GetDayPlanListFunc = async () => { const GetDayPlanListFunc = async () => {
uni.showLoading(); uni.showLoading();
let data = { let data = {
hospital: orderInfo.value.hospital_id, hospital: hospital_id.value,
person_id: orderInfo.value.person_id, person_id: person_id.value,
date: selectedDate.value, date: selectedDate.value,
use_type: orderInfo.value.type, use_type:use_type.value,
checkup_type_id: orderInfo.value.checkup_type_id, checkup_type_id: checkup_type_id.value,
amount: orderInfo.value.true_price, amount: amount.value,
} }
const response = await $api("GetDayPlanList", data); const response = await $api("GetDayPlanList", data);
uni.hideLoading(); uni.hideLoading();
@ -118,9 +133,9 @@
}; };
let selectedTime = ref(null); let selectedTime = ref(null);
let orderInfo = ref(null) let orderInfo = ref(null)
let YuYueInfo=ref({ let YuYueInfo = ref({
TjInfo:{}, TjInfo: {},
NmrInfo:{} NmrInfo: {}
}) })
const GetOrderInfo = async () => { const GetOrderInfo = async () => {
uni.showLoading(); uni.showLoading();
@ -132,38 +147,46 @@
orderInfo.value = response.data.info orderInfo.value = response.data.info
doctor_name.value = orderInfo.value.doctor doctor_name.value = orderInfo.value.doctor
itemSelected.value.type = 'tj' itemSelected.value.type = 'tj'
selectedTime.value = orderInfo.value.appointment_time selectedTime.value = orderInfo.value.appointment_time
selectedDate.value = orderInfo.value.appointment_date selectedDate.value = orderInfo.value.appointment_date
GetDayPlanListFunc() GetDayPlanListFunc()
tj_date.value = response.data.today tj_date.value = response.data.today
tj_time.value = orderInfo.value.appointment_time tj_time.value = orderInfo.value.appointment_time
tj_plan_id.value=orderInfo.value.plan_id tj_plan_id.value = orderInfo.value.plan_id
hospital_id.value=orderInfo.value.hospital_id
person_id.value=orderInfo.value.person_id
use_type.value=orderInfo.value.type
checkup_type_id.value=orderInfo.value.checkup_type_id
amount.value=orderInfo.value.true_price
person_name.value=orderInfo.value.name
combo_name.value=orderInfo.value.title
}); });
} }
//weekly //weekly
let selectedDate = ref(null); let selectedDate = ref(null);
const selectDateFunc = (date) => { const selectDateFunc = (date) => {
if(doctor_name.value){ if (doctor_name.value) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '已选择医生,切换日期将重新选择医生,是否继续', content: '已选择医生,切换日期将重新选择医生,是否继续',
cancelText:'取消', cancelText: '取消',
confirmText:'确定', confirmText: '确定',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
DateChange(date) DateChange(date)
} else if (res.cancel) { } else if (res.cancel) {
} }
} }
}); });
}else{ } else {
DateChange(date) DateChange(date)
} }
} }
//weekly //weekly
@ -181,16 +204,16 @@
} }
} }
let itemSelected = ref({ let itemSelected = ref({
type:null, type: null,
item:{}, item: {},
index:0 index: 0
}); });
const itemClick = (type,item,index) => { const itemClick = (type, item, index) => {
//weekList.value=null //weekList.value=null
if (type == 'nmr') { if (type == 'nmr') {
//selectedTime.value = nmr_time.value //selectedTime.value = nmr_time.value
//selectedDate.value = nmr_date.value //selectedDate.value = nmr_date.value
selectedTime.value = YuYueInfo.value.NmrInfo[index].time selectedTime.value = YuYueInfo.value.NmrInfo[index].time
selectedDate.value = YuYueInfo.value.NmrInfo[index].date selectedDate.value = YuYueInfo.value.NmrInfo[index].date
NMRGetDayPlanListFunc() NMRGetDayPlanListFunc()
@ -201,8 +224,8 @@
GetDayPlanListFunc() GetDayPlanListFunc()
} }
itemSelected.value.type = type itemSelected.value.type = type
itemSelected.value.item=item itemSelected.value.item = item
itemSelected.value.index=index itemSelected.value.index = index
} }
let DoctorMonthCalendar = ref(null) let DoctorMonthCalendar = ref(null)
@ -228,7 +251,7 @@
let MonthList = ref([]); // let MonthList = ref([]); //
let currentDate = ref(null); // let currentDate = ref(null); //
const monthSwitch = (e) => { // const monthSwitch = (e) => { //
let ym=e.year+""+"-"+e.month+"" let ym = e.year + "" + "-" + e.month + ""
if (itemSelected.value.type == 'nmr') { if (itemSelected.value.type == 'nmr') {
NMRGetMonthPlanListFunc(ym) NMRGetMonthPlanListFunc(ym)
} }
@ -237,38 +260,38 @@
} }
} }
const MonthConfirm = (e) => { // const MonthConfirm = (e) => { //
console.log(e.fulldate) console.log(e.fulldate)
if(doctor_name.value){ if (doctor_name.value) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '已选择医生,切换日期将重新选择医生,是否继续', content: '已选择医生,切换日期将重新选择医生,是否继续',
cancelText:'取消', cancelText: '取消',
confirmText:'确定', confirmText: '确定',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
DateChange(e.fulldate) DateChange(e.fulldate)
} else if (res.cancel) { } else if (res.cancel) {
} }
} }
}); });
}else{ } else {
DateChange(e.fulldate) DateChange(e.fulldate)
} }
} }
// //
const GetMonthPlanListFunc = async (ym='') => { const GetMonthPlanListFunc = async (ym = '') => {
uni.showLoading(); uni.showLoading();
let data = { let data = {
hospital: orderInfo.value.hospital_id, hospital: hospital_id.value,
person_id: orderInfo.value.person_id, person_id: person_id.value,
month: ym?ym:tj_date.value.substring(0, 7), month: ym ? ym : tj_date.value.substring(0, 7),
use_type: orderInfo.value.type, use_type:use_type.value,
checkup_type_id: orderInfo.value.checkup_type_id, checkup_type_id: checkup_type_id.value,
amount: orderInfo.value.true_price, amount: amount.value,
} }
const response = await $api("GetMonthPlanCount", data); const response = await $api("GetMonthPlanCount", data);
uni.hideLoading(); uni.hideLoading();
@ -282,15 +305,15 @@
rlArr.push(o); rlArr.push(o);
}); });
MonthList.value = rlArr; MonthList.value = rlArr;
//MonthCalendar.value.open() //MonthCalendar.value.open()
}); });
}; };
// //
const NMRGetMonthPlanListFunc = async (ym='') => { const NMRGetMonthPlanListFunc = async (ym = '') => {
uni.showLoading(); uni.showLoading();
let data = { let data = {
hospital: orderInfo.value.hospital_id, hospital: orderInfo.value.hospital_id,
month: ym?ym:YuYueInfo.value.NmrInfo[itemSelected.value.index].date.substring(0, 7), month: ym ? ym : YuYueInfo.value.NmrInfo[itemSelected.value.index].date.substring(0, 7),
} }
const response = await $api("NMRGetMonthPlanCount", data); const response = await $api("NMRGetMonthPlanCount", data);
uni.hideLoading(); uni.hideLoading();
@ -308,9 +331,10 @@
}); });
}; };
// //
const openMonthFunc = async() => { const openMonthFunc = async () => {
if (itemSelected.value.type == 'nmr') { if (itemSelected.value.type == 'nmr') {
await NMRGetMonthPlanListFunc() await NMRGetMonthPlanListFunc()
} }
if (itemSelected.value.type == 'tj') { if (itemSelected.value.type == 'tj') {
await GetMonthPlanListFunc() await GetMonthPlanListFunc()
@ -318,8 +342,76 @@
MonthCalendar.value.open() MonthCalendar.value.open()
} }
// //
const StartYuYue = async() => { const StartYuYue = () => {
if(tj_time.value==null){ if(buyInfo.value.group_id){
//
comfrimyy()
}else{
//
OnlyYuYue()
}
}
//
const comfrimyy = async () => {
yytjInfo.value = $store.getYytjInfo();
let plan_id = "";
let plan_nmr_id = "";
uni.showLoading();
console.log(yytjInfo.value?.nmr_list);
for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) {
if (!yytjInfo.value?.nmr_list[i].id) {
uni.$lu.toast("请完善预约时间");
uni.hideLoading();
return;
}
}
if (yytjInfo.value?.nmr_list?.length > 1) {
plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id;
}
if (yytjInfo.value?.nmr_list?.length > 0) {
plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id;
}
let obj = {
person_id: buyInfo.value.person_id,
type: buyInfo.value.group_id ? 2 : 1,
hospital: buyInfo.value.hospital,
group_id: buyInfo.value.group_id,
combo_id:buyInfo.value.group_id?"":buyInfo.value?.combo_id,
item_ids: buyInfo.value.item_ids,
plan_id: plan_id,
plan_nmr_info:yytjInfo.value?.nmr_list || null,
doctor: yytjInfo.value?.doctor_name || "",
duo_xuan_yi: $store.getDuoXuanYi(),
jifen: Math.ceil(yytjInfo.value.pointsPrice?yytjInfo.value.pointsPrice:0),
yucunkuan: yytjInfo.value.prepaidPrice?yytjInfo.value.prepaidPrice:0,
coupon_id:yytjInfo.value?.couponId || null,
wj: buyInfo.value.wj,
erxian_info:erxianInfo.value,
peiou_info:$store.getPeiOuUser()//
};
console.log(obj);
const response = await $api("OrderCreate", obj);
$response(response, () => {
if (response.status) {
if (response.data.action == "pay") {
StartPay(response.data.orderid);
} else {
uni.navigateTo({
url: "/pages/buy/done/done?id=" + response.data.orderid,
});
}
}
uni.hideLoading();
});
};
//
const OnlyYuYue=async()=>{
if (tj_time.value == null) {
uni.$lu.toast("请选择体检日期"); uni.$lu.toast("请选择体检日期");
return false return false
} }
@ -327,60 +419,75 @@
uni.showLoading(); uni.showLoading();
let data = { let data = {
orderid: orderInfo.value.id, orderid: orderInfo.value.id,
planid: tj_plan_id.value, plan_id: tj_plan_id.value,
nmr_info:YuYueInfo.value.NmrInfo, nmr_info: YuYueInfo.value.NmrInfo,
doctor: doctor_name.value doctor: doctor_name.value
} }
console.log(data); console.log(data);
const response = await $api("ChangeAppointment", data); const response = await $api("StartYuYue", data);
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
if(response.status){ if (response.status) {
uni.showToast({ uni.showToast({
title: '改约完成' title: '预约完成'
}); });
setTimeout(()=>{ setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url:'/pages/main/order/order' url: '/pages/main/order/order'
}) })
},1000) }, 1000)
} }
}); });
} }
// //
const DateChange=(date)=>{ const DateChange = (date) => {
selectedDate.value=date selectedDate.value = date
selectedTime.value = null selectedTime.value = null
if (itemSelected.value.type == 'nmr') { if (itemSelected.value.type == 'nmr') {
YuYueInfo.value.NmrInfo[itemSelected.value.index].time = null YuYueInfo.value.NmrInfo[itemSelected.value.index].time = null
YuYueInfo.value.NmrInfo[itemSelected.value.index].date = date YuYueInfo.value.NmrInfo[itemSelected.value.index].date = date
tj_time.value = null // tj_time.value = null //
tj_date.value = null tj_date.value = null
doctor_name.value = null // doctor_name.value = null //
NMRGetDayPlanListFunc() NMRGetDayPlanListFunc()
} }
if (itemSelected.value.type == 'tj') { if (itemSelected.value.type == 'tj') {
tj_time.value = null tj_time.value = null
tj_date.value = date tj_date.value = date
doctor_name.value = null // doctor_name.value = null //
GetDayPlanListFunc() GetDayPlanListFunc()
}
} }
}
let temp = null let temp = null
onMounted(() => { onMounted(() => {
itemSelected.value.type='tj'
buyInfo.value = $store.getBuyInfo();
// //
temp = $store.getYytjInfo() temp = $store.getYytjInfo()
temp.doctor_name = "" temp.doctor_name = ""
$store.setYytjInfo(temp) $store.setYytjInfo(temp)
selectedDate.value = GetToday()
tj_date.value=GetToday()
if (OrderId.value) {
GetOrderInfo()
} else {
checkup_type_id.value= buyInfo.value.group_id ?
$store.getGroupInfo()?.checkup_type_id : $store.getCheckupTypeId()?.id,
hospital_id.value= buyInfo.value.hospital,
person_id.value= buyInfo.value.person_id,
use_type.value= buyInfo.value.group_id ? 2 : 1,
person_name.value=buyInfo.value.group_id ?$store.getGroupInfo()?.name : '',
combo_name.value=buyInfo.value.group_id ?$store.getGroupInfo()?.group_name : '',
GetDayPlanListFunc()
}
GetOrderInfo()
}); });
let OrderId=ref(0) let OrderId = ref(0)
onLoad((e)=>{ onLoad((e) => {
OrderId.value=e.id OrderId.value = e.id
}) })
onShow(() => { onShow(() => {
@ -390,12 +497,19 @@ const DateChange=(date)=>{
} }
}) })
const GetToday = () => {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctime_main { .ctime_main {
background-color: #D8EEF3; background-color: #D8EEF3;
height: calc(100vh - 80rpx) ; height: calc(100vh - 80rpx);
} }
.top { .top {
@ -426,55 +540,66 @@ const DateChange=(date)=>{
} }
::v-deep #ylrl { ::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 { .uni-calendar__header,
// padding: 10rpx; .uni-calendar__weeks-day {
box-sizing: border-box; border: none;
} }
.uni-calendar-item__weeks-box-circle { .uni-calendar-item--checked {
background-color: rgba(0, 0, 0, 0); background-color: transparent;
}
.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 { .uni-calendar-item__weeks-box-item {
width: 100%; background-color: #239ea3 !important;
} border-radius: 12rpx;
.uni-calendar__backtoday {
display: none; .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{
.doctor_button {
display: flex; display: flex;
background-color: #fff; background-color: #fff;
padding-left: 10rpx; padding-left: 10rpx;
@ -488,6 +613,7 @@ const DateChange=(date)=>{
text-align: center; text-align: center;
width: 120rpx; width: 120rpx;
} }
.check_done_wrapper { .check_done_wrapper {
width: 660rpx; width: 660rpx;
height: 70rpx; height: 70rpx;

Loading…
Cancel
Save