关联审批记录

This commit is contained in:
2026-02-25 17:10:02 +08:00
parent f2524dec22
commit ae9dd498af
@@ -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'){ //拒绝,未通过