diff --git a/Laravel/app/Http/Controllers/API/H5/PlanController.php b/Laravel/app/Http/Controllers/API/H5/PlanController.php index 6625f74..59476c2 100644 --- a/Laravel/app/Http/Controllers/API/H5/PlanController.php +++ b/Laravel/app/Http/Controllers/API/H5/PlanController.php @@ -88,6 +88,7 @@ class PlanController extends Controller $hospital_id =request('hospital'); $openid =request('openid'); $person_id=request('person_id'); + $combo_id=request('combo_id'); $date=request('date'); $use_type=request('use_type');//使用类型 1个检 2团检 $checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id @@ -106,6 +107,12 @@ class PlanController extends Controller ->where('is_vip','<>',1) ->whereIn('use_type',[0,$use_type]); + if(!!$combo_id){ + $comboInfo=DB::table('combos')->where(['combo_id'=>$combo_id])->first(); + if(!empty($comboInfo->keyue_start_time) and !empty($comboInfo->keyue_end_time)){ + $list=$list->whereBetween('time',[$comboInfo->keyue_start_time,$comboInfo->keyue_end_time]); + } + } if(!!$personInfo){ $list=$list->whereIn('sex',[0,$personInfo->sex]); } @@ -139,6 +146,12 @@ class PlanController extends Controller ->where(['hospital_id'=>$hospital_id,'type'=>1,'is_del'=>0]) ->where('is_vip','<>',1) ->whereIn('use_type',[0,$use_type]); + if(!!$combo_id){ + $comboInfo=DB::table('combos')->where(['combo_id'=>$combo_id])->first(); + if(!empty($comboInfo->keyue_start_time) and !empty($comboInfo->keyue_end_time)){ + $weeklist=$weeklist->whereBetween('time',[$comboInfo->keyue_start_time,$comboInfo->keyue_end_time]); + } + } if(!!$personInfo){ $weeklist=$weeklist->whereIn('sex',[0,$personInfo->sex]); } diff --git a/h5/pages/main/yytjsj/yytjsj.vue b/h5/pages/main/yytjsj/yytjsj.vue index 8756f0d..8a2a1a7 100755 --- a/h5/pages/main/yytjsj/yytjsj.vue +++ b/h5/pages/main/yytjsj/yytjsj.vue @@ -200,6 +200,7 @@ obj = { hospital: buyInfo.value.hospital, person_id: buyInfo.value.person_id, + combo_id: buyInfo.value.combo_id, date: currentDate.value, //currentDate.value use_type: buyInfo.value.group_id ? 2 : 1, checkup_type_id: buyInfo.value.group_id ?