update
This commit is contained in:
parent
455b79a6c1
commit
25cca8730b
@ -56,7 +56,13 @@
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return FinancialBorrowMoney::where($this->searchWhere)
|
||||
$params = $this->request->get();
|
||||
$where = [];
|
||||
if (!empty($params['create_time'])) {
|
||||
$date = explode(',', $params['create_time']);
|
||||
$where[] = ['create_time', 'between', [strtotime($date[0] . ' 00:00:00'), strtotime($date[1] . ' 23:59:59')]];
|
||||
}
|
||||
return FinancialBorrowMoney::where($this->searchWhere)->where($where)
|
||||
->field(['id', 'code', 'dept', 'cost_type', 'pay_type', 'amount', 'content', 'create_user', 'create_time'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
@ -78,7 +84,13 @@
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return FinancialBorrowMoney::where($this->searchWhere)->count();
|
||||
$params = $this->request->get();
|
||||
$where = [];
|
||||
if (!empty($params['create_time'])) {
|
||||
$date = explode(',', $params['create_time']);
|
||||
$where[] = ['create_time', 'between', [strtotime($date[0] . ' 00:00:00'), strtotime($date[1] . ' 23:59:59')]];
|
||||
}
|
||||
return FinancialBorrowMoney::where($this->searchWhere)->where($where)->count();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user