屏蔽改约、接口限制不能选同一份报告,订单列表状态

wenjuan
yanzai 1 year ago
parent 77b20f6e18
commit 4d11609683

@ -11,6 +11,7 @@ class FenzhenController extends Controller
public function abandon() public function abandon()
{ {
// 这里放 弃检逻辑 // 这里放 弃检逻辑
return \Yz::Return(true, "弃检成功"); return \Yz::Return(true, "弃检成功");
} }

@ -28,6 +28,9 @@ class OrderController extends Controller
$datetime = new DateTime($list->created_at); $datetime = new DateTime($list->created_at);
$timestamp = $datetime->getTimestamp(); $timestamp = $datetime->getTimestamp();
$list->end_time = $timestamp + (60 * $WaitingPaymentTime); $list->end_time = $timestamp + (60 * $WaitingPaymentTime);
if(time() > $list->end_time){
$list->status=3;
}
} }
} }

@ -41,6 +41,7 @@ class ReportController extends Controller
foreach ($report_list as $key => $report) { foreach ($report_list as $key => $report) {
$report_list[$key]['is_read']=0; $report_list[$key]['is_read']=0;
$report_list[$key]['登记时间']= explode('T', $report_list[$key]['登记时间'])[0];
if($report['体检状态']=='报告已出' || $report['体检状态']=='总检完成'){ if($report['体检状态']=='报告已出' || $report['体检状态']=='总检完成'){
$cha=DB::table('report_l1_records')->where(['体检号' => $report['体检号']])->first(); $cha=DB::table('report_l1_records')->where(['体检号' => $report['体检号']])->first();
if(!!$cha and $cha->is_read==1){ if(!!$cha and $cha->is_read==1){
@ -261,6 +262,7 @@ class ReportController extends Controller
{ {
$ids = $request->post('tj_numbers'); $ids = $request->post('tj_numbers');
if(count($ids)<>2) return \Yz::echoError1("请选择两份报告"); if(count($ids)<>2) return \Yz::echoError1("请选择两份报告");
if($ids[0]==$ids[1]) return \Yz::echoError1('不能选择相同的报告');
sort($ids); sort($ids);
$report1=DB::table('report_l1_records as a')->leftJoin('report_l2_items as b' ,'a.id','=','b.reprort_l1_id')->where('a.体检号',$ids[0])->whereIn('体检状态',['报告已出','总检完成'])->get(); $report1=DB::table('report_l1_records as a')->leftJoin('report_l2_items as b' ,'a.id','=','b.reprort_l1_id')->where('a.体检号',$ids[0])->whereIn('体检状态',['报告已出','总检完成'])->get();
$report2=DB::table('report_l1_records as a')->leftJoin('report_l2_items as b' ,'a.id','=','b.reprort_l1_id')->where('a.体检号',$ids[1])->whereIn('体检状态',['报告已出','总检完成'])->get(); $report2=DB::table('report_l1_records as a')->leftJoin('report_l2_items as b' ,'a.id','=','b.reprort_l1_id')->where('a.体检号',$ids[1])->whereIn('体检状态',['报告已出','总检完成'])->get();

@ -162,8 +162,8 @@
<view class="order_pay_button_wrapper"> <view class="order_pay_button_wrapper">
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)" <view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)"
class="button_item_wrapper pay_button_wrapper">继续付款</view> class="button_item_wrapper pay_button_wrapper">继续付款</view>
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper"> <!-- <view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper">
改约</view> 改约</view> -->
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)" <view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
class="button_item_wrapper refund_button_wrapper">退款</view> class="button_item_wrapper refund_button_wrapper">退款</view>
<view v-if="[4].includes(order_info.status) && order_info.report" <view v-if="[4].includes(order_info.status) && order_info.report"

Loading…
Cancel
Save