This commit is contained in:
weiz 2024-04-01 10:21:40 +08:00
parent 5f667d342e
commit 6100c6fd44
2 changed files with 5 additions and 3 deletions

View File

@ -69,7 +69,7 @@
$where[] = ['contract_type', '=', $params['contract_type']];
}
$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)
->order('id desc')
->select()

View File

@ -58,8 +58,9 @@
*/
public function lists(): array
{
$status = $this->request->get('status', 1);
return CostApprovedProject::where($this->searchWhere)
->where('status', 1)
->where('status', $status)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function ($data) {
@ -85,7 +86,8 @@
*/
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