|
|
|
|
@ -86,7 +86,7 @@ class OrderController extends Controller
|
|
|
|
|
|
|
|
|
|
$wj_flag= request('wj'); //问卷标记
|
|
|
|
|
if(isset($wj_flag) and $wj_flag==1){
|
|
|
|
|
$wj_zhekou=1;//问卷过来的折扣率
|
|
|
|
|
$wj_zhekou=config('app.globals.Wj_ZheKou');//问卷过来的折扣率
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空');
|
|
|
|
|
@ -363,6 +363,7 @@ class OrderController extends Controller
|
|
|
|
|
'sex' => $person->sex,
|
|
|
|
|
'birthday' => $person->birthday,
|
|
|
|
|
'married' => $person->married,
|
|
|
|
|
'wj_flag'=>$wj_flag,
|
|
|
|
|
'created_at' =>$now_datetime,
|
|
|
|
|
];
|
|
|
|
|
DB::beginTransaction();
|
|
|
|
|
@ -522,10 +523,29 @@ class OrderController extends Controller
|
|
|
|
|
"预约时间" => $order_info->appointment_date . ' ' . $order_info->appointment_time,
|
|
|
|
|
"介绍人" => $order_info->referral,
|
|
|
|
|
'套餐Id' => $order_info->combo_id == 0 ? null : $order_info->combo_id,
|
|
|
|
|
"可选项目信息" => $item_arr,
|
|
|
|
|
|
|
|
|
|
"已收费" => true,
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
$cad2=[
|
|
|
|
|
"可选项目信息" => $item_arr,
|
|
|
|
|
"总计金额" => $order_info->price,
|
|
|
|
|
];
|
|
|
|
|
if($order_info->wj_flag == 1){
|
|
|
|
|
$temp=[];
|
|
|
|
|
foreach ($item_arr as $k => $item) {
|
|
|
|
|
$temp[]=[
|
|
|
|
|
"Id"=> $item['Id'],
|
|
|
|
|
"已收费"=>$item['已收费'],
|
|
|
|
|
"优惠方式"=>"打折",
|
|
|
|
|
"优惠值"=> config('app.globals.Wj_ZheKou')
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$cad2=[
|
|
|
|
|
"可选项目信息" => $temp,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$cad=array_merge($cad,$cad2);
|
|
|
|
|
} else {
|
|
|
|
|
$cad = [
|
|
|
|
|
'type' => 2,
|
|
|
|
|
|