物品领用

This commit is contained in:
2026-02-09 10:40:50 +08:00
parent 3d33a502d9
commit 25b79d6f63
7 changed files with 183 additions and 17 deletions
+13 -1
View File
@@ -48,8 +48,20 @@ class InvRequisitionService
if(isset($p['status']) && $p['status']){
$config['where']['status'] = $p['status'];
}
if(isset($p['applicant_id']) && $p['applicant_id']){
if (isset($p['applicant_id']) && $p['applicant_id'] == 'self') { //自己的领用申请
$config['where']['applicant_id'] = $request->user->uid;
} elseif (isset($p['applicant_id']) && $p['applicant_id']) { //指定人员的申请
$config['where']['applicant_id'] = $p['applicant_id'];
} else { //审批人对应的记录
$config['where']['approval.approver_id'] = $request->user->uid;
$config['where']['approval.action'] = 0;
}
if(isset($p['phase']) && $p['phase'] == 'approve'){//借用审批中
$config['where']['status'] = ['in',[10,11,13]];
}elseif(isset($p['phase']) && $p['phase'] == 'repaid'){//已全部归还
$config['where']['status'] = 17;
}elseif(isset($p['phase']) && $p['phase'] == 'unreturned'){ //未归还
$config['where']['status'] = ['in',[12,14,15,16,18]];
}
$config['order']['id'] = 'desc';
break;