Kirin 3 years ago
parent
commit
1769c7cc59
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/admin/controller/store/StoreCategory.php

+ 5 - 1
app/admin/controller/store/StoreCategory.php

@@ -94,6 +94,7 @@ class StoreCategory extends AuthController
             Form::input('cate_name', '分类名称'),
             Form::frameImageOne('pic', '分类图标(180*180)', Url::buildUrl('admin/widget.images/index', array('fodder' => 'pic')))->icon('image')->width('100%')->height('500px'),
             Form::number('sort', '排序'),
+            Form::radio('only_store_user', '采购类', 0)->options([['label' => '开启', 'value' => 1], ['label' => '关闭', 'value' => 0]]),
             Form::radio('is_show', '状态', 1)->options([['label' => '显示', 'value' => 1], ['label' => '隐藏', 'value' => 0]])
         ];
         $form = Form::make_post_form('添加分类', $field, Url::buildUrl('save'), 2);
@@ -114,7 +115,8 @@ class StoreCategory extends AuthController
             'cate_name',
             ['pic', []],
             'sort',
-            ['is_show', 0]
+            ['is_show', 0],
+            ['only_store_user', 0]
         ], $request);
         if ($data['pid'] == '') return Json::fail('请选择父类');
         if (!$data['cate_name']) return Json::fail('请输入分类名称');
@@ -149,6 +151,7 @@ class StoreCategory extends AuthController
             Form::input('cate_name', '分类名称', $c->getData('cate_name')),
             Form::frameImageOne('pic', '分类图标', Url::buildUrl('admin/widget.images/index', array('fodder' => 'pic')), $c->getData('pic'))->icon('image')->width('100%')->height('500px'),
             Form::number('sort', '排序', $c->getData('sort')),
+            Form::radio('only_store_user', '采购类', $c->getData('only_store_user'))->options([['label' => '开启', 'value' => 1], ['label' => '关闭', 'value' => 0]]),
             Form::radio('is_show', '状态', $c->getData('is_show'))->options([['label' => '显示', 'value' => 1], ['label' => '隐藏', 'value' => 0]])
         ];
         $form = Form::make_post_form('编辑分类', $field, Url::buildUrl('update', array('id' => $id)), 2);
@@ -171,6 +174,7 @@ class StoreCategory extends AuthController
             'cate_name',
             ['pic', []],
             'sort',
+            ['only_store_user', 0],
             ['is_show', 0]
         ], $request);
         if ($data['pid'] == '') return Json::fail('请选择父类');