时间处理
This commit is contained in:
parent
0a0fba85df
commit
5de9a7f264
@ -26,7 +26,8 @@ class FinancialTransfersLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['store_id', 'admin_id', 'uid', 'status', 'initiation_time', 'confirmation_time', 'mark', 'money', 'remark_time'],
|
'=' => ['store_id', 'admin_id', 'uid', 'status', 'initiation_time', 'confirmation_time', 'mark', 'money', 'remark_time','create_time'],
|
||||||
|
'between_time' => 'create_time',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,12 +43,23 @@ class FinancialTransfersLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return FinancialTransfers::with(['store','staff','admin'])->where($this->searchWhere)
|
$data = FinancialTransfers::with(['store','staff','admin'])->where($this->searchWhere)
|
||||||
// ->field(['id', 'store_id', 'admin_id', 'status', 'initiation_time', 'confirmation_time', 'mark', 'money', 'remark_time'])
|
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
foreach ($data as &$value){
|
||||||
|
if($value['initiation_time']){
|
||||||
|
$value['initiation_time'] = date('Y-m-d H:i:s',$value['initiation_time']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($value['confirmation_time']){
|
||||||
|
$value['confirmation_time'] = date('Y-m-d H:i:s',$value['confirmation_time']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user