diff --git a/Laravel/app/Http/Controllers/API/H5/ComboController.php b/Laravel/app/Http/Controllers/API/H5/ComboController.php index 1a3b141..c6d38b8 100644 --- a/Laravel/app/Http/Controllers/API/H5/ComboController.php +++ b/Laravel/app/Http/Controllers/API/H5/ComboController.php @@ -483,7 +483,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4) } } - if($quanInfo['是否在有效内']===true and $quanInfo['TimeNuZTTextm']=="有效" and $quanInfo['ZT']==1){ + if(!!$quanInfo and $quanInfo['是否在有效内']===true and $quanInfo['TimeNuZTTextm']=="有效" and $quanInfo['ZT']==1){ }else{ return \Yz::echoError1("此代金券不可用"); @@ -502,8 +502,14 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4) if($quanType===false or $quanInfo===false) return \Yz::echoError1("此代金券不可用"); if($quanType['TJXCXHX']!=1 ) return \Yz::echoError1("此代金券不可用"); if($quanType['MKJE']==0 or $quanType['MKJE']>=$true_price){ - //抵扣代金券金额,折扣暂未实现 - $true_price=($true_price-$quanInfo['JE'])>0 ? $true_price-$quanInfo['JE']:0; + //抵扣代金券金额 + if($quanType['YHLX']==1){//抵扣券 + $true_price=($true_price-$quanInfo['JE'])>0 ? $true_price-$quanInfo['JE']:0; + } + if($quanType['YHLX']==2){//抵扣券 + $true_price=number_format($true_price*$quanType['DZBL'],2, '.', ''); + } + } } diff --git a/Laravel/app/Http/Controllers/API/H5/OrderController.php b/Laravel/app/Http/Controllers/API/H5/OrderController.php index 74a5c78..e09371c 100644 --- a/Laravel/app/Http/Controllers/API/H5/OrderController.php +++ b/Laravel/app/Http/Controllers/API/H5/OrderController.php @@ -54,6 +54,7 @@ class OrderController extends Controller $order_info = DB::table('orders')->where(['id' => $id])->first(); if (!!$order_info) { $order_info->buy_info = json_decode($order_info->buy_info, true); + $order_info->erxian_appointment_info = json_decode($order_info->erxian_appointment_info, true); } else { return \Yz::echoError1('未找到有效订单'); } @@ -376,8 +377,13 @@ class OrderController extends Controller if ($quanType === false or $quanInfo === false) return \Yz::echoError1("此代金券不可用"); if ($quanType['TJXCXHX'] != 1) return \Yz::echoError1("此代金券不可用"); if ($quanType['MKJE'] == 0 or $quanType['MKJE'] >= $true_price) { - //抵扣代金券金额,折扣暂未实现 - $true_price = ($true_price - $quanInfo['JE']) > 0 ? $true_price - $quanInfo['JE'] : 0; + //抵扣代金券金额 + if($quanType['YHLX']==1){//抵扣券 + $true_price=($true_price-$quanInfo['JE'])>0 ? $true_price-$quanInfo['JE']:0; + } + if($quanType['YHLX']==2){//抵扣券 + $true_price=number_format($true_price*$quanType['DZBL'],2, '.', ''); + } } diff --git a/h5/common/WeeklyCalendar.vue b/h5/common/WeeklyCalendar.vue index 7899e9b..75c6c47 100644 --- a/h5/common/WeeklyCalendar.vue +++ b/h5/common/WeeklyCalendar.vue @@ -60,11 +60,15 @@ return false; } if(props.TjType=="tj"){ + const a = new Date(props.NmrDTime.substring(0,10)); + if (!isNaN(a.getTime())){ + if(!validateDates(props.TjDTime,props.NmrDTime)){ + return false; + } + } //console.log(props.NmrDTime) //console.log(props.TjDTime) - if(!validateDates(props.TjDTime,props.NmrDTime)){ - return false; - } + } emit('selectTime', timeInfo); diff --git a/h5/pages/main/ctime/ctime.vue b/h5/pages/main/ctime/ctime.vue index 2216eb2..878856d 100644 --- a/h5/pages/main/ctime/ctime.vue +++ b/h5/pages/main/ctime/ctime.vue @@ -120,8 +120,13 @@ //如果有核磁项目 if (orderInfo.value.buy_info.nmr_list && orderInfo.value.buy_info.nmr_list.length > 0) { itemSelected.value = 'nmr' - selectedTime.value = '10:45' //应该是核磁时间 - selectedDate.value = '2024-10-09' //应该是核磁日期 + if(orderInfo.value.erxian_appointment_info.length>0){ + selectedTime.value = orderInfo.value.erxian_appointment_info[0].time //应该是核磁时间 + selectedDate.value = orderInfo.value.erxian_appointment_info[0].date //应该是核磁日期 + nmr_date.value = orderInfo.value.erxian_appointment_info[0].date + nmr_time.value = orderInfo.value.erxian_appointment_info[0].time + } + NMRGetDayPlanListFunc() } else { @@ -131,8 +136,7 @@ GetDayPlanListFunc() } - nmr_date.value = '2024-10-09' - nmr_time.value = '10:45' + tj_date.value = orderInfo.value.appointment_date tj_time.value = orderInfo.value.appointment_time }); diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 7614fd7..4dc60b1 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -281,7 +281,7 @@ - 10302015 + 10302313