修改bug、放开日期选择

main
yanzai 1 year ago
parent 99f0aa17b3
commit 4319f6dd58

@ -290,8 +290,8 @@ class AppointmentController extends Controller
$month = $request->post('month');
$hospital = $request->post('hospital');
$appointments = Appointment::where('hospital', $hospital)
// ->where('date', 'like', $month . '%')
->where('date', date('Y-m-d'))
->where('date', 'like', $month . '%')
// ->where('date', date('Y-m-d'))
->where('status', 1)
->where('del', 2)
->orderBy('date')

@ -33,6 +33,7 @@ class ComboItemController extends Controller
'end_time' => $group_info['预约结束日期'],
'group_name' => $group_info['单位名称'] . ($group_info['部门名称']),
'danwei_id' => $group_info['单位Id'],
'fenzu_id' => $group_info['分组Id'],
'items' => $items,
'appointment_number' => $group_info['预约Id']
];

@ -227,12 +227,20 @@ class UserOrderController extends Controller
//如果是团检并且选择了自选
$fenzu=false;
$self_fenzu=false;
if(!!$group and count($items) != 0){
$data=[
"单位Id"=>$group_info['danwei_id']
];
$peis = new PEISApiController();
$fenzu = $peis::Post('获取单位分组', $hospital, $data)['data'][0];
if($fenzu !==false and isset($fenzu['分组'])){
foreach ($fenzu['分组'] as $key=>$fenzu_item){
if($fenzu_item['Id']==$group_info['fenzu_id']){
$self_fenzu=$fenzu_item;
}
}
}
}
@ -250,7 +258,7 @@ class UserOrderController extends Controller
foreach ($items_list as $item) {
if($fenzu !==false and isset($fenzu['分组'])){
$item['price']=$item['price']*$fenzu['分组'][0]['增项折扣'];
$item['price']=$item['price']*$self_fenzu['增项折扣'];
}
@ -307,9 +315,15 @@ class UserOrderController extends Controller
}
$true_price = $price;
//如果是团检判断分组内的统收限额,超过限额的部分收费
if(!!$fenzu and !!$fenzu['分组'][0]['统收限额'] and $fenzu['分组'][0]['统收限额']<$true_price){
$true_price=$true_price-$fenzu['分组'][0]['统收限额'];
if(!!$self_fenzu and !!$self_fenzu['统收限额'] ){
if($self_fenzu['统收限额']<$true_price){
$true_price=$true_price-$self_fenzu['统收限额'];
}else{
$true_price=0;
}
}
if (Login::$info->pay > 0 && $true_price > 0) {
$true_price = Login::$info->pay;
}

@ -18,7 +18,7 @@ class UserPersonController extends Controller
$id_number = $request->post('id_number');
$cic = new ComboItemController();
$info = $cic->group_info($hospital, [
"电话号码" => $phone,
// "电话号码" => $phone,
"证件号码" => $id_number,
"预约Id" => null
]);

@ -143,18 +143,18 @@
icon:'none'
})
}
getUserInfo()
// getUserInfo()
})
}
onShow(() => {
uni.$lu.hospital((info) => {
hospital.value = info
autoSelectTime()
// autoSelectTime()
})
GetGreySet()
getUserInfo()
console.log(JSON.stringify($store.buy_info))
})
@ -199,10 +199,10 @@
<input type="text" v-model="referral" placeholder="请输入">
</view>
</view>
<view class="time_wrapper">
<view class="time_wrapper" @click="chooseTimeClick()" >
<view class="time_title_wrapper">体检时间</view>
<view class="time_content_wrapper">
{{ buy_info.time.id !== 0 ? buy_info.time.show : '今日已无可用名额'}}
{{ buy_info.time.id !== 0 ? buy_info.time.show : ' '}}
</view>
</view>
<view class="tip_wrapper" :class="SysGreyType==1? 'grey' :''">

@ -44,6 +44,11 @@
let date = calendar_ref.value.calendar.fullDate
for (let i in appointment_list.value) {
if (appointment_list.value[i].date === date) {
if(appointment_list.value[i].data.list.length==1){
let info=appointment_list.value[i].data.list
if (info.max_count - info.used_count <= 0) return
$store.buy_info.time = info[0]
}
return appointment_list.value[i].data.list
}
}

Loading…
Cancel
Save