增加下级数
This commit is contained in:
@@ -32,6 +32,7 @@ class IndexController extends AdminController
|
||||
protected function grid()
|
||||
{
|
||||
$user = Auth::guard('admin')->user();
|
||||
|
||||
$grid = new Grid(new User);
|
||||
$grid->model()->with(['parent']);
|
||||
$grid->actions(function ($actions) use ($user) {
|
||||
@@ -55,6 +56,8 @@ class IndexController extends AdminController
|
||||
|
||||
$grid->model()->orderBy('id', 'desc');
|
||||
|
||||
$grid->fixColumns(4, -1);
|
||||
|
||||
$grid->quickSearch('username')->placeholder('登录账户');
|
||||
|
||||
$grid->filter(function ($filter) {
|
||||
@@ -95,9 +98,16 @@ class IndexController extends AdminController
|
||||
return $this->PaOutletId ?? '---';
|
||||
});
|
||||
|
||||
$grid->column('门店号')->display(function () {
|
||||
return $this->shop_id ?? '---';
|
||||
})->help('银联pos机配置的门店号');
|
||||
$grid->column('门店号')
|
||||
->display(function () {
|
||||
return $this->shop_id ?? '---';
|
||||
})
|
||||
->help('银联pos机配置的门店号');
|
||||
|
||||
$grid->column('下级网点数')
|
||||
->display(function () {
|
||||
return "<a href='/admin/users?server_id={$this->server_id}' style='font-size:16px'>{$this->children->count()}</a>";
|
||||
});
|
||||
|
||||
$grid->column('所属项目')->display(function () {
|
||||
return $this->type_text;
|
||||
|
||||
Reference in New Issue
Block a user