fix(负责人接口): 工资列表接口 字段添加

master
yin5th 2023-01-16 10:19:37 +08:00
parent 63b01e65b8
commit 0b1fa1b1d1
1 changed files with 5 additions and 1 deletions

View File

@ -629,7 +629,7 @@ class Manager extends Base
$res['total'] = $total; $res['total'] = $total;
if ($total > 0) { if ($total > 0) {
$res['list'] = $query->field('pml.id,pml.status,pml.amount,pml.base_amount,pml.overtime_amount,pml.paid_amount,a.real_name as name')->page($page, $size)->order('pml.id', 'desc')->select(); $res['list'] = $query->field('pml.id,pml.status,pml.amount,pml.base_amount,pml.overtime_amount,pml.paid_amount,a.real_name as name,pml.year,pml.month')->page($page, $size)->order('pml.id', 'desc')->select();
$res['list']->each(function ($item) { $res['list']->each(function ($item) {
$item->status = 0; $item->status = 0;
$item->status_text = '待发放'; $item->status_text = '待发放';
@ -643,6 +643,10 @@ class Manager extends Base
$item->status_text = '部分发放'; $item->status_text = '部分发放';
$item->status = 2; $item->status = 2;
} }
$item->date = $item->year.'年'.$item->month.'月';
unset($item->year);
unset($item->month);
}); });
} }