|
|
|
@ -28,7 +28,7 @@ class OrderNewController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
$configs_youxiaoqi=DB::table('configs')->where(['label'=>"订单有效期"])->first();
|
|
|
|
$configs_youxiaoqi=DB::table('configs')->where(['label'=>"订单有效期"])->first();
|
|
|
|
$date = new DateTime();
|
|
|
|
$date = new DateTime();
|
|
|
|
$date->modify('+'.$configs_youxiaoqi['value'].' days');
|
|
|
|
$date->modify('+'.$configs_youxiaoqi->value.' days');
|
|
|
|
$youxiaoqi_end=$date->format('Y-m-d');
|
|
|
|
$youxiaoqi_end=$date->format('Y-m-d');
|
|
|
|
|
|
|
|
|
|
|
|
if (count($item_ids) != 0 and $item_ids[0] == "") {
|
|
|
|
if (count($item_ids) != 0 and $item_ids[0] == "") {
|
|
|
|
@ -94,6 +94,7 @@ class OrderNewController extends Controller
|
|
|
|
$Nx1_arrInfo = [];
|
|
|
|
$Nx1_arrInfo = [];
|
|
|
|
$TJ_Leixing_id = 1;//存储用体检类型
|
|
|
|
$TJ_Leixing_id = 1;//存储用体检类型
|
|
|
|
$checkup_type_id = false; //体检类型id
|
|
|
|
$checkup_type_id = false; //体检类型id
|
|
|
|
|
|
|
|
$cha_sanfang_code=false;
|
|
|
|
if (isset($combo_id) and $combo_id <> 0) {
|
|
|
|
if (isset($combo_id) and $combo_id <> 0) {
|
|
|
|
$combo_info = DB::table('combos')->where(['combo_id' => $combo_id, 'status' => 1])->first();
|
|
|
|
$combo_info = DB::table('combos')->where(['combo_id' => $combo_id, 'status' => 1])->first();
|
|
|
|
if (!$combo_info) return \Yz::echoError1("套餐不存在");
|
|
|
|
if (!$combo_info) return \Yz::echoError1("套餐不存在");
|
|
|
|
@ -132,7 +133,6 @@ class OrderNewController extends Controller
|
|
|
|
$TJ_Leixing_id = $checkup_type_id;
|
|
|
|
$TJ_Leixing_id = $checkup_type_id;
|
|
|
|
$price += $combo_info->price;
|
|
|
|
$price += $combo_info->price;
|
|
|
|
//如果使用了第三方券
|
|
|
|
//如果使用了第三方券
|
|
|
|
$cha_sanfang_code=false;
|
|
|
|
|
|
|
|
if(isset($sanfang_code) and isset($sanfang_code['code_num'])){
|
|
|
|
if(isset($sanfang_code) and isset($sanfang_code['code_num'])){
|
|
|
|
if($sanfang_code['combo_id']<>$combo_id) return \Yz::echoError1("转赠码与套餐不匹配");
|
|
|
|
if($sanfang_code['combo_id']<>$combo_id) return \Yz::echoError1("转赠码与套餐不匹配");
|
|
|
|
//校验有效性,临时抵消套餐价格
|
|
|
|
//校验有效性,临时抵消套餐价格
|
|
|
|
@ -188,7 +188,7 @@ class OrderNewController extends Controller
|
|
|
|
// if (isset($wj_flag) and $wj_flag == 1) {
|
|
|
|
// if (isset($wj_flag) and $wj_flag == 1) {
|
|
|
|
// $item_price = $item_price * $wj_zhekou;
|
|
|
|
// $item_price = $item_price * $wj_zhekou;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
$item_price = $item_price *0.8; //所有自选项目打8折
|
|
|
|
$item_price = $item_price * config('app.globals.ZiXuan_ZheKou'); //所有自选项目打8折
|
|
|
|
|
|
|
|
|
|
|
|
$price += $item_price;
|
|
|
|
$price += $item_price;
|
|
|
|
$missingIds = array_diff($item_ids, $existingIds);
|
|
|
|
$missingIds = array_diff($item_ids, $existingIds);
|
|
|
|
|