diff --git a/app/common/service/InvRequisitionService.php b/app/common/service/InvRequisitionService.php index 70f232f..e509b2e 100644 --- a/app/common/service/InvRequisitionService.php +++ b/app/common/service/InvRequisitionService.php @@ -67,6 +67,7 @@ class InvRequisitionService if(isset($p['phase']) && $p['phase'] == 'approve'){//借用审批中 $config['where']['status'] = ['in',[10,11]]; if(isset($p['scene']) && $p['scene'] == 'approval'){ + $config['with'] = ['approval']; $config['where']['approval.action'] = 0; } }elseif(isset($p['phase']) && $p['phase'] == 'repaid'){//已全部归还 @@ -77,10 +78,12 @@ class InvRequisitionService //审核列表 elseif(isset($p['phase']) && $p['phase'] == 'pending'){ //待审核 $config['where']['status'] = ['in',[10,11]]; + $config['with'] = ['approval']; $config['where']['approval.approver_id'] = $request->user->uid; $config['where']['approval.action'] = 0; }elseif(isset($p['phase']) && $p['phase'] == 'approved'){ //已通过 $config['where']['status'] = ['in',[11,12,14,15,16,17,18,19]]; + $config['with'] = ['approval']; $config['where']['approval.approver_id'] = $request->user->uid; $config['where']['approval.action'] = [">",0]; }elseif(isset($p['phase']) && $p['phase'] == 'refuse'){ //拒绝,未通过