This commit is contained in:
chenbo 2023-09-19 10:45:08 +08:00
parent 28b3ae8015
commit 1deeb0f961

View File

@ -17,16 +17,26 @@ class ApproveLists extends BaseApiDataLists implements ListsSearchInterface
*/
public function setSearch(): array
{
return [
'=' =>['type', 'check_status']
];
$param = $this->request->param();
if ($param['status'] == 0) {
return [
'=' =>['type']
];
} else {
return [
'=' =>['type', 'check_status']
];
}
}
public function queryWhere()
{
$where = [];
$param = $this->request->param();
// if (isset($param['type']) && $param['type'] == 2) {
$adminId = User::where(['id' => $this->userId])->with('company')->value('admin_id');
$where[] = ['check_admin_ids', '=', $adminId]; // 只有片区经理才能查看