预约前 判断 是否有预约记录 给出提示 、团检隐藏金额

main
yanzai 9 months ago
parent 5530d134c1
commit eaf0bb2e97

@ -97,6 +97,7 @@ class ApiMapController extends Controller
'GetSanFangCode' => $base_url . '/api/H5/GetSanFangCode', // 获取三方机构code
'HeXiaoSanFangCode' => $base_url . '/api/H5/HeXiaoSanFangCode', // 核销三方机构code
'GetHomeNotice' => $base_url . '/api/H5/GetHomeNotice', // 首页消息通知
'GetPersonOrderList' => $base_url . '/api/H5/GetPersonOrderList', // 获取个人订单列表
];
}

@ -76,6 +76,25 @@ class OrderController extends Controller
'list' => $OrderList
]);
}
//查询某个人的预约记录
public function GetPersonOrderList(){
$person_id= request('person_id');
$appointment_date= request('appointment_date');
$status= request('status');
$list=DB::table('orders')->where(['person_id'=>$person_id]);
if(isset($appointment_date)){
$list=$list->where(['appointment_date'=>$appointment_date]);
}
if(isset($status) and !empty($status)){
$list=$list->whereIn('status',$status);
}
$list=$list->get();
$count=count($list);
return \Yz::Return(true, '获取成功', [
'list'=>$list,
'count'=>$count
]);
}
public function GetDetail()
{

@ -89,6 +89,7 @@ Route::group(['middleware' => ['log'],'prefix' => 'api/H5'], function () {
Route::post('/GetSanFangCode', 'App\Http\Controllers\API\H5\SanFangController@GetSanFangCode');//获取三方code
Route::post('/HeXiaoSanFangCode', 'App\Http\Controllers\API\H5\SanFangController@HeXiaoSanFangCode');//核销三方code
Route::post('/GetHomeNotice', 'App\Http\Controllers\API\H5\HomeController@GetHomeNotice');//首页消息通知
Route::post('/GetPersonOrderList', 'App\Http\Controllers\API\H5\OrderController@GetPersonOrderList');//获取个人订单列表

@ -151,7 +151,7 @@
});
return;
}
yytjInfo.value.doctor_date= selectedDate.value
yytjInfo.value.doctor_name = item.name;
yytjInfo.value.doctor_id = item.id;
yytjInfo.value.nmrIndex = -1;

@ -350,10 +350,10 @@
<text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name || comboInfo?.combo_name }}</text>
</view>
<view>
<!-- <view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view> -->
</view>
</view>
</view>
@ -591,7 +591,7 @@
}
.groupInfo{
border: 1px solid #ccc;
padding: 20rpx;
padding: 20rpx 20rpx 0rpx 20rpx;
border-radius: 20rpx;
}
</style>

@ -677,13 +677,21 @@ const toRouter = (url, status, index) => {
</text>
<view class="tags" v-if="comboInfo">{{comboInfo.tags[0]?.text}}</view>
</view>
<view>
<!-- <view>
<text class="text-#E95513 font-900">
¥{{ comboInfo?.price || groupInfo?.sixi_zong_ji_jin_e }}
</text>
<text class="text-#9E9E9F font-700 text-18rpx line-through ml-10rpx">
¥{{ comboInfo?.original_price || groupInfo?.sixi_zong_ji_jin_e }}
</text>
</view> -->
<view>
<text class="text-#E95513 font-900" v-if="comboInfo?.price ">
¥{{ comboInfo?.price }}
</text>
<text class="text-#9E9E9F font-700 text-18rpx line-through ml-10rpx" v-if="comboInfo?.original_price">
¥{{ comboInfo?.original_price }}
</text>
</view>
</view>
<view v-if="itemsInfo && itemsInfo?.items?.length && zixuan_item_show==false" style="display: flex; justify-content: space-between;">

@ -1,5 +1,19 @@
<template>
<view class="ctime_main">
<uni-popup ref="YuYuePopupRef" style="z-index: 999;">
<view class="tishi_main">
<view class="tishi_title">提示</view>
<view class="tishi_title2">
<view class="tishi_shuxian">|</view>
<view>当前日期已有预约记录是否继续预约</view>
</view>
<view style="display: flex;justify-content: space-between;">
<view class="tishi_button" style=" width: 200rpx; background-color: #e1ecee;color:#239ea3" @click="YuYuePopupRef.close()"></view>
<view class="tishi_button" style="width: 200rpx;" @click="StartYuYue()"></view>
</view>
</view>
</uni-popup>
<view v-if="combo_name" style="display: flex;justify-content: space-between;padding: 40rpx;">
<view>
<view style="font-size: 33rpx;">{{person_name}}</view>
@ -49,7 +63,7 @@
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 @click="ChaPersonAppointment()" class="check_done_wrapper">立即预约</view>
</view>
<view id="ylrl">
<uni-calendar :insert="false" :showMonth="false" ref="DoctorMonthCalendar" @confirm="DoctMonthConfirm" />
@ -101,7 +115,7 @@
let combo_name = ref('')
let combo_id=ref(null);
let item_ids=ref([]);
let YuYuePopupRef=ref(null);
const getBuyInfoFuc = async () => {
//
let obj = {
@ -383,8 +397,31 @@
}
MonthCalendar.value.open()
}
////
const ChaPersonAppointment=async()=>{
if (selectedDate.value == null || selectedDate.value =='' ) {
uni.$lu.toast("请选择体检日期");
return false
}
uni.showLoading();
let data = {
person_id: person_id.value,
appointment_date: selectedDate.value,
status: [2]
}
console.log(data);
const response = await $api("GetPersonOrderList", data);
uni.hideLoading();
$response(response, () => {
if(response.data.count>0){
YuYuePopupRef.value.open()
}else{
StartYuYue()
}
});
}
//
const StartYuYue = () => {
const StartYuYue = async () => {
if (buyInfo.value.group_id || buyInfo.value.sanfang_code?.code_num) {
// /
comfrimyy()
@ -732,7 +769,49 @@
font-size: 29rpx;
color: #F6FDFD;
text-align: center;
}
.tishi_main{
background-color: #fff;
padding: 40rpx 50rpx;
width:500rpx;
border-radius: 40rpx;
}
.tishi_button{
height: 60rpx;
line-height: 60rpx;
width: 365rpx;
background-color: #009da5;
color:#fff;
text-align: center;
border-radius: 40rpx;
margin: 40rpx auto 10rpx auto;
}
.tishi_title{
text-align: center;
font-size: 30rpx;
font-weight: 600;
color:#2b2827;
}
.tishi_title2{
display: flex;
font-size: 28rpx;
margin-top: 30rpx;
font-weight: 600;
color:#3a3635;
padding-left: 5rpx;
}
.tishi_content{
font-size: 28rpx;
margin-top: 30rpx;
color:#474241;
}
.tishi_shuxian{
color:#00939B;
font-weight: bolder;
margin-right: 4rpx;
// border-right: 3rpx solid #00939B;
// height: 28rpx;
}
</style>
Loading…
Cancel
Save