|
|
@ -1,7 +1,6 @@ |
|
|
<?php |
|
|
<?php |
|
|
|
|
|
|
|
|
namespace App\AdminAgent\Renderable; |
|
|
namespace App\AdminAgent\Renderable; |
|
|
use App\AdminAgent\Repositories\User; |
|
|
|
|
|
use App\Common\UserStatus; |
|
|
use App\Common\UserStatus; |
|
|
use App\Models\Guide; |
|
|
use App\Models\Guide; |
|
|
use Dcat\Admin\Admin; |
|
|
use Dcat\Admin\Admin; |
|
|
@ -25,7 +24,11 @@ class SelectGuide extends LazyRenderable |
|
|
$grid->disableBatchDelete(); |
|
|
$grid->disableBatchDelete(); |
|
|
$grid->disableBatchActions(); |
|
|
$grid->disableBatchActions(); |
|
|
|
|
|
|
|
|
$grid->model()->where(['status' => UserStatus::NORMAL]); |
|
|
|
|
|
|
|
|
$grid->model()->where(['status' => UserStatus::NORMAL]) |
|
|
|
|
|
->whereExists(function ($query) { |
|
|
|
|
|
$role_table = 'admin_guide_role_users'; |
|
|
|
|
|
return $query->from($role_table)->whereRaw("guides.id=$role_table.user_id")->where('role_id', 2); |
|
|
|
|
|
}); |
|
|
$grid->quickSearch(['contact_phone', 'name'])->placeholder('搜索手机号、地接名称'); |
|
|
$grid->quickSearch(['contact_phone', 'name'])->placeholder('搜索手机号、地接名称'); |
|
|
|
|
|
|
|
|
$grid->column('id'); |
|
|
$grid->column('id'); |
|
|
|