This commit is contained in:
chenbo 2024-02-29 17:50:01 +08:00
parent 553026c7cb
commit fac7df684e
2 changed files with 7 additions and 1 deletions

View File

@ -69,7 +69,11 @@ class CostConsultationReportController extends BaseAdminController
}
});
$count = $query->count();
$lists = $query->page($page_no, $page_size)->select();
$lists = $query->page($page_no, $page_size)->select()->each(function($item){
$item['start_date'] = date('Y-m-d', $item['start_date']);
$item['end_date'] = date('Y-m-d', $item['end_date']);
return $item;
});
return $this->success('成功', compact('count', 'lists', 'page_no', 'page_size'));
}

View File

@ -61,6 +61,7 @@ class CostProjectLogic extends BaseLogic
'cost' => $params['cost'],
'approval' => $params['approval'],
'aunit' => $params['aunit'],
'js_unit' => $params['js_unit'],
'Acontact' => $params['Acontact'],
'acontactnum' => $params['acontactnum'],
'date' => $params['date'],
@ -112,6 +113,7 @@ class CostProjectLogic extends BaseLogic
'cost' => $params['cost'],
'approval' => $params['approval'],
'aunit' => $params['aunit'],
'js_unit' => $params['js_unit'],
'Acontact' => $params['Acontact'],
'acontactnum' => $params['acontactnum'],
'date' => $params['date'],