更新用户打款
This commit is contained in:
parent
0cd326553b
commit
8f8be7f559
|
@ -535,11 +535,21 @@ class FinanceExpense extends ApiController
|
|||
if($auth == 0){
|
||||
$this->apiError('你没有打款权限,请联系管理员或者HR');
|
||||
}
|
||||
$expense = (new ExpenseList())->detail($param['id'] ?? 0);
|
||||
if (empty($expense)) {
|
||||
$this->apiError('报销流程不存在');
|
||||
}
|
||||
if ($expense['check_status'] == 5) {
|
||||
$this->apiError('该报销已打款');
|
||||
}
|
||||
if ($expense['check_status'] != 2) {
|
||||
$this->apiError('该报销流程审核未通过');
|
||||
}
|
||||
$param['check_status'] = 5;
|
||||
$param['pay_admin_id'] = $this->uid;
|
||||
$param['pay_time'] = time();
|
||||
$res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param);
|
||||
if ($res !== false) {
|
||||
if ($res) {
|
||||
add_log('topay', $param['id'],$param,'报销');
|
||||
$detail = ExpenseList::where(['id' => $param['id']])->find();
|
||||
$msg = [
|
||||
|
|
Loading…
Reference in New Issue