This commit is contained in:
mkm 2023-08-26 10:14:29 +08:00
parent e3eefa1700
commit 1c43699dcf

View File

@ -110,13 +110,18 @@ class CompanyLists extends BaseAdminDataLists implements ListsSearchInterface
public function list_two(): array
{
$list= Company::where('company_type','in',[30,16])
$params=$this->request->param();
$where=['company_type'=>30];
if(isset($params['company_type'])){
$where=['company_type'=>$params['company_type']];
};
$list= Company::where($where)
->field(['is_authentication','id', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'other_contacts', 'area_manager', 'is_contract', 'deposit', 'deposit_time', 'qualification', 'status'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
return ['list'=>$list,'page'=>$this->limitOffset,'limit'=>$this->limitLength];
return ['list'=>$list,'page_no'=>$this->limitOffset+1,'page_size'=>$this->limitLength];
}
/**
* @notes 获取数量