继续重构模块列表前端样式

This commit is contained in:
2021-03-17 03:15:10 +08:00
parent 181fa17fdd
commit cd3a44340e
192 changed files with 3321 additions and 4596 deletions
@@ -25,13 +25,25 @@ class CategoryController extends DefaultController
$cols = $header['cols'];
$cols['sequence_sn']['hide'] = true;
$cols['name']['hide'] = true;
$cols['actions']['options'] = [[
'name' => '编辑',
'action' => 'edit',
'display' => $this->access['edit'],
]];
unset($cols['checkbox']);
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['cols'] = $cols;
$header['tabs'] = ProductCategory::$tabs;
$search = $header['search_form'];
$query = $search['query'];
@@ -51,20 +63,9 @@ class CategoryController extends DefaultController
$model->select($header['select']);
$rows = $model->get()->toNested();
$items = Grid::dataFilters($rows, $header);
return $this->json($items, true);
return Grid::dataFilters($rows, $header);
}
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['cols'] = $cols;
$header['tabs'] = ProductCategory::$tabs;
$header['bys'] = ProductCategory::$bys;
$header['js'] = Grid::js($header);
return $this->display([
'header' => $header,
]);
@@ -44,6 +44,18 @@ class ProductController extends DefaultController
'display' => $this->access['edit'],
]];
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['right_buttons'] = [
['name' => '导入', 'color' => 'default', 'icon' => 'fa-mail-reply', 'action' => 'import', 'display' => $this->access['import']],
];
$header['cols'] = $cols;
$header['tabs'] = Product::$tabs;
$header['bys'] = Product::$bys;
$search = $header['search_form'];
$query = $search['query'];
@@ -72,19 +84,6 @@ class ProductController extends DefaultController
return Grid::dataFilters($rows, $header);
}
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['right_buttons'] = [
['name' => '导入', 'color' => 'default', 'icon' => 'fa-mail-reply', 'action' => 'import', 'display' => $this->access['import']],
];
$header['cols'] = $cols;
$header['tabs'] = Product::$tabs;
$header['bys'] = Product::$bys;
$header['js'] = Grid::js($header);
return $this->display([
'header' => $header,
]);
@@ -30,6 +30,13 @@ class UnitController extends DefaultController
'display' => $this->access['edit'],
]];
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['cols'] = $cols;
$header['tabs'] = ProductUnit::$tabs;
$search = $header['search_form'];
$query = $search['query'];
@@ -51,15 +58,6 @@ class UnitController extends DefaultController
return Grid::dataFilters($rows, $header);
}
$header['buttons'] = [
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
];
$header['cols'] = $cols;
$header['tabs'] = ProductUnit::$tabs;
$header['bys'] = ProductUnit::$bys;
$header['js'] = Grid::js($header);
return $this->display([
'header' => $header,
]);