diff --git a/Laravel/app/Http/Controllers/API/H5/FenzhenController.php b/Laravel/app/Http/Controllers/API/H5/FenzhenController.php index 6f55485..34a9788 100644 --- a/Laravel/app/Http/Controllers/API/H5/FenzhenController.php +++ b/Laravel/app/Http/Controllers/API/H5/FenzhenController.php @@ -20,13 +20,13 @@ class FenzhenController extends Controller // 这里放 弃检逻辑 $id = request('id'); $xmid = request('xmid'); - $orderInfo=DB::table('orders')->where('id',$id)->first(); - if(!$orderInfo) return \Yz::echoError1("订单不存在"); + $orderInfo = DB::table('orders')->where('id', $id)->first(); + if (!$orderInfo) return \Yz::echoError1("订单不存在"); $service = new ComboItemGroupService(); - $q=$service->QiJian($orderInfo->tj_number,$orderInfo->name,[$xmid]); - if($q['status']===true){ - return \Yz::Return(true, "弃检成功",[]); - }else{ + $q = $service->QiJian($orderInfo->tj_number, $orderInfo->name, [$xmid]); + if ($q['status'] === true) { + return \Yz::Return(true, "弃检成功", []); + } else { return \Yz::echoError1($q['msg']); } @@ -130,12 +130,14 @@ class FenzhenController extends Controller } } $end_status = 0; + $tip_check_show = false; foreach ($time_line as $time_line_item) { if ($time_line_item['status'] == 4) { $end_status += 1; } } if (count($time_line) <= $end_status + 1) { + $tip_check_show = true; $time_line[count($time_line) - 1]['status'] = 4; } // -1 报告未出 不能预约 报告解读 不显示 @@ -251,12 +253,15 @@ class FenzhenController extends Controller } } } - $res['data']['end_time'] = date('H:i', $last_time); + if (!$tip_check_show) { + $res['data']['end_time'] = date('H:i', $last_time); + } $check_tip = false; if ($error_day == -1) { - $et = $info->appointment_date . strtotime($res['data']['end_time']); -// $et = '2024-10-10 00:00:00'; - $check_tip = (time() - strtotime($et)) > (60 * 20); + if (!!$tip_check_show) { + $et = $info->appointment_date . ' ' . $res['data']['end_time'] . ':00'; + $check_tip = (time() - strtotime($et)) > (60 * 20); + } } return \Yz::Return(true, "获取成功", [ 'info' => [ @@ -266,7 +271,7 @@ class FenzhenController extends Controller 'check_date' => $info->appointment_date, 'plan_number' => $info->plan_number, 'start_time' => $res['data']['start_time'] . ':00', - 'end_time' => $res['data']['end_time'], + 'end_time' => $res['data']['end_time'], 'yuji_end_time' => $res['data']['yuji_end_time'], 'yuji_use_time' => $res['data']['yuji_use_time'], 'use_time' => $res['data']['use_time'], @@ -361,13 +366,13 @@ class FenzhenController extends Controller $beizhu = !!$item->beizhu ? $item->beizhu : ''; $tishi = !!$item->tishi ? $item->tishi : ''; $ret = []; - if(!!$canqian){ + if (!!$canqian) { $ret[] = $canqian; } - if(!!$beizhu){ + if (!!$beizhu) { $ret[] = $beizhu; } - if(!!$tishi){ + if (!!$tishi) { $ret[] = $tishi; } return count($ret) == 0 ? '' : '(' . implode(',', $ret) . ')'; diff --git a/h5/pages/user/fenzhen/fenzhen.vue b/h5/pages/user/fenzhen/fenzhen.vue index 99d8c67..f025f06 100644 --- a/h5/pages/user/fenzhen/fenzhen.vue +++ b/h5/pages/user/fenzhen/fenzhen.vue @@ -29,17 +29,19 @@ const fenzhen_list = ref(false); const check_tip_show = ref(false); - const checkTipShow = () => { - check_tip_show.value = true - uni.showModal({ - title: '提示', - content: '所有项目已完成,请进行检后签到', - showCancel: false, - confirmText: '确定', - success: function(res) { + const checkTipShow = (show) => { + if (!!show) { + check_tip_show.value = true + uni.showModal({ + title: '提示', + content: '所有项目已完成,请进行检后签到', + showCancel: false, + confirmText: '确定', + success: function(res) { - } - }); + } + }); + } } const getFenzhenList = async (loading = true) => { if (!!loading) { @@ -52,7 +54,7 @@ $response(response, () => { fenzhen_list.value = response.data; if (!check_tip_show.value) { - checkTipShow() + checkTipShow(response.data.check_tip) } setTimeout(() => { if (!!window.location.href.includes('/pages/user/fenzhen/fenzhen') && @@ -270,7 +272,8 @@