From 029d552abc06a81a62eae7fd5bae705c1b30606e Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Sat, 14 Jan 2023 11:42:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=90=8E=E5=8F=B0=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86):=20=E9=83=A8=E5=88=86=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/manager/Pay.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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.'月'; }); }