From 165498951e8684ce42148e4edc7f4bca0c3ade45 Mon Sep 17 00:00:00 2001 From: yanzai Date: Wed, 30 Oct 2024 23:18:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=8A=B5=E6=89=A3=E5=92=8C=E6=89=93=E6=8A=98=EF=BC=8C=E5=A4=84?= =?UTF-8?q?=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/Http/Controllers/API/H5/ComboController.php | 12 +++++++++--- .../app/Http/Controllers/API/H5/OrderController.php | 10 ++++++++-- h5/common/WeeklyCalendar.vue | 10 +++++++--- h5/pages/main/ctime/ctime.vue | 12 ++++++++---- h5/pages/main/index/index.vue | 2 +- 5 files changed, 33 insertions(+), 13 deletions(-) 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