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