update
This commit is contained in:
parent
5f667d342e
commit
6100c6fd44
@ -69,7 +69,7 @@
|
|||||||
$where[] = ['contract_type', '=', $params['contract_type']];
|
$where[] = ['contract_type', '=', $params['contract_type']];
|
||||||
}
|
}
|
||||||
$lists = CostApprovedProject::field('id,contract_num,contract_name,contract_type,business_nature,part_a,money,dept,create_date')
|
$lists = CostApprovedProject::field('id,contract_num,contract_name,contract_type,business_nature,part_a,money,dept,create_date')
|
||||||
->where($where)
|
->where($where)->where('status', 2)
|
||||||
->page($page_no, $page_size)
|
->page($page_no, $page_size)
|
||||||
->order('id desc')
|
->order('id desc')
|
||||||
->select()
|
->select()
|
||||||
|
@ -58,8 +58,9 @@
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
|
$status = $this->request->get('status', 1);
|
||||||
return CostApprovedProject::where($this->searchWhere)
|
return CostApprovedProject::where($this->searchWhere)
|
||||||
->where('status', 1)
|
->where('status', $status)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
@ -85,7 +86,8 @@
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return CostApprovedProject::where($this->searchWhere)->count();
|
$status = $this->request->get('status', 1);
|
||||||
|
return CostApprovedProject::where($this->searchWhere)->where('status', $status)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setFileName(): string
|
public function setFileName(): string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user