审核列表筛选
This commit is contained in:
@@ -61,14 +61,29 @@ class InvRequisitionService
|
|||||||
$config['where']['applicant_id'] = $p['applicant_id'];
|
$config['where']['applicant_id'] = $p['applicant_id'];
|
||||||
} else { //审批人对应的记录
|
} else { //审批人对应的记录
|
||||||
$config['where']['approval.approver_id'] = $request->user->uid;
|
$config['where']['approval.approver_id'] = $request->user->uid;
|
||||||
$config['where']['approval.action'] = 0;
|
//$config['where']['approval.action'] = 0;
|
||||||
}
|
}
|
||||||
if(isset($p['phase']) && $p['phase'] == 'approve'){//借用审批中
|
if(isset($p['phase']) && $p['phase'] == 'approve'){//借用审批中
|
||||||
$config['where']['status'] = ['in',[10,11,13]];
|
$config['where']['status'] = ['in',[10,11]];
|
||||||
|
if(isset($p['scene']) && $p['scene'] == 'approval'){
|
||||||
|
$config['where']['approval.action'] = 0;
|
||||||
|
}
|
||||||
}elseif(isset($p['phase']) && $p['phase'] == 'repaid'){//已全部归还
|
}elseif(isset($p['phase']) && $p['phase'] == 'repaid'){//已全部归还
|
||||||
$config['where']['status'] = 17;
|
$config['where']['status'] = 17;
|
||||||
}elseif(isset($p['phase']) && $p['phase'] == 'unreturned'){ //未归还
|
}elseif(isset($p['phase']) && $p['phase'] == 'unreturned'){ //未归还
|
||||||
$config['where']['status'] = ['in',[12,14,15,16,18]];
|
$config['where']['status'] = ['in',[11,12,13,14,15,16,18,19]];
|
||||||
|
}
|
||||||
|
//审核列表
|
||||||
|
elseif(isset($p['phase']) && $p['phase'] == 'pending'){ //待审核
|
||||||
|
$config['where']['status'] = ['in',[10,11]];
|
||||||
|
$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['where']['approval.approver_id'] = $request->user->uid;
|
||||||
|
$config['where']['approval.action'] = [">",0];
|
||||||
|
}elseif(isset($p['phase']) && $p['phase'] == 'refuse'){ //拒绝,未通过
|
||||||
|
$config['where']['status'] = ['in',[13]];
|
||||||
}
|
}
|
||||||
$config['order']['id'] = 'desc';
|
$config['order']['id'] = 'desc';
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user