diff --git a/app/admin/controller/mall/Goods.php b/app/admin/controller/mall/Goods.php index 3ba19f6..14beecd 100644 --- a/app/admin/controller/mall/Goods.php +++ b/app/admin/controller/mall/Goods.php @@ -2,6 +2,7 @@ namespace app\admin\controller\mall; +use app\admin\model\MallCate; use app\admin\model\MallGoods; use app\common\controller\AdminController; use app\admin\service\annotation\ControllerAnnotation; @@ -25,6 +26,7 @@ class Goods extends AdminController { parent::__construct($app); $this->model = new MallGoods(); + $this->assign('cate', (new MallCate())->column('title', 'id')); } /** diff --git a/app/admin/view/mall/goods/add.html b/app/admin/view/mall/goods/add.html index 44b169a..f150645 100644 --- a/app/admin/view/mall/goods/add.html +++ b/app/admin/view/mall/goods/add.html @@ -1,5 +1,7 @@
+ +
@@ -8,6 +10,19 @@
+ + + + + + + + + + + + +
diff --git a/app/admin/view/mall/goods/edit.html b/app/admin/view/mall/goods/edit.html index d24a3b1..af6f9cd 100644 --- a/app/admin/view/mall/goods/edit.html +++ b/app/admin/view/mall/goods/edit.html @@ -1,6 +1,7 @@
+
@@ -9,6 +10,19 @@
+ + + + + + + + + + + + +
diff --git a/app/admin/view/mall/goods/index.html b/app/admin/view/mall/goods/index.html index a6198e7..5016922 100644 --- a/app/admin/view/mall/goods/index.html +++ b/app/admin/view/mall/goods/index.html @@ -8,4 +8,7 @@ lay-filter="currentTable">
-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/app/admin/view/system/uploadfile/index.html b/app/admin/view/system/uploadfile/index.html index ddeeddc..7e4d221 100644 --- a/app/admin/view/system/uploadfile/index.html +++ b/app/admin/view/system/uploadfile/index.html @@ -9,6 +9,5 @@
\ No newline at end of file diff --git a/public/static/admin/js/mall/goods.js b/public/static/admin/js/mall/goods.js index 17dce39..faed6b2 100644 --- a/public/static/admin/js/mall/goods.js +++ b/public/static/admin/js/mall/goods.js @@ -31,7 +31,7 @@ define(["jquery", "easy-admin"], function ($, ea) { {type: "checkbox"}, {field: 'id', width: 80, title: 'ID', searchOp: '='}, {field: 'sort', width: 80, title: '排序', edit: 'text'}, - {field: 'cate.title', minWidth: 80, title: '商品分类'}, + {field: 'cate_id', minWidth: 80, title: '商品分类', search: 'select', selectList: cateSelects}, {field: 'title', minWidth: 80, title: '商品名称'}, {field: 'logo', minWidth: 80, title: '分类图片', search: false, templet: ea.table.image}, {field: 'market_price', width: 100, title: '市场价', templet: ea.table.price},