diff --git a/app/controller/manager/Pay.php b/app/controller/manager/Pay.php index db99c0a..6035534 100644 --- a/app/controller/manager/Pay.php +++ b/app/controller/manager/Pay.php @@ -276,11 +276,19 @@ class Pay extends Base if ($total > 0) { $res['list'] = $query->field('pml.id,sum(pml.amount) as amount,sum(pml.base_amount) as base_amount,pml.status,pml.year,pml.month, - sum(pml.overtime_amount) as overtime_amount,pml.account_id,pml.time,a.nickname,a.real_name,a.mobile,w.name as worksite_name, + sum(pml.overtime_amount) as overtime_amount,sum(pml.paid_amount) as paid_amount,pml.account_id,pml.time,a.nickname,a.real_name,a.mobile,w.name as worksite_name, p.name as position_text,pml.paid_amount') ->page($page, $size)->order('pml.time', 'desc')->order('pml.id', 'desc')->select(); $res['list']->each(function ($item) { - $item->status_text = PayMonthLog::statusText()[$item->status] ?? ''; + $item->status_text = '待发放'; + if ($item['amount'] == $item['paid_amount'] && $item['amount'] > 0) { + $item->status_text = '完全发放'; + } + + if ($item['amount'] > $item['paid_amount'] && $item['paid_amount'] > 0) { + $item->status_text = '部分发放'; + } + $item->time_text = $item->year.'年'.$item->month.'月'; }); }