作者 jinglong

增加后台品类分类,品牌分类,商品列表

正在显示 58 个修改的文件 包含 2413 行增加77 行删除
1 <?php 1 <?php
2 2
3 -return [  
4 - [  
5 - //配置唯一标识  
6 - 'name' => 'theme',  
7 - //显示的标题  
8 - 'title' => '编辑器主题',  
9 - //类型  
10 - 'type' => 'select',  
11 - //数据字典  
12 - 'content' => [  
13 - 'default' => '经典主题',  
14 - 'black' => '雅黑主题',  
15 - 'blue' => '淡蓝主题',  
16 - 'grey' => '深灰主题',  
17 - 'primary' => '深绿主题',  
18 - ],  
19 - //值  
20 - 'value' => 'black',  
21 - //验证规则  
22 - 'rule' => 'required',  
23 - //错误消息  
24 - 'msg' => '',  
25 - //提示消息  
26 - 'tip' => '',  
27 - //成功消息  
28 - 'ok' => '',  
29 - //扩展信息  
30 - 'extend' => ''  
31 - ],  
32 - [  
33 - 'name' => 'wordimageserver',  
34 - 'title' => '启用word图片替换服务器',  
35 - 'type' => 'radio',  
36 - 'content' => [  
37 - '1' => '是',  
38 - '0' => '否',  
39 - ],  
40 - 'value' => '0',  
41 - 'rule' => 'required',  
42 - 'msg' => '',  
43 - 'tip' => '如果启用,请务必先运行word.exe',  
44 - 'ok' => '',  
45 - 'extend' => ''  
46 - ],  
47 - [  
48 - 'name' => 'attachmentmode_admin',  
49 - 'title' => '管理员附件选择模式',  
50 - 'type' => 'select',  
51 - 'content' => [  
52 - 'all' => '任何管理员均可以查看全部上传的文件',  
53 - 'auth' => '仅可以查看自己及所有子管理员上传的文件',  
54 - 'personal' => '仅可以查看选择自己上传的文件',  
55 - ],  
56 - 'value' => 'all',  
57 - 'rule' => 'required',  
58 - 'msg' => '',  
59 - 'tip' => '',  
60 - 'ok' => '',  
61 - 'extend' => ''  
62 - ],  
63 - [  
64 - 'name' => 'attachmentmode_index',  
65 - 'title' => '后台附件选择模式',  
66 - 'type' => 'select',  
67 - 'content' => [  
68 - 'all' => '任何会员均可以查看全部上传的文件',  
69 - 'personal' => '仅可以查看选择自己上传的文件',  
70 - ],  
71 - 'value' => 'all',  
72 - 'rule' => 'required',  
73 - 'msg' => '',  
74 - 'tip' => '',  
75 - 'ok' => '',  
76 - 'extend' => ''  
77 - ],  
78 -]; 3 +return array (
  4 + 0 =>
  5 + array (
  6 + 'name' => 'theme',
  7 + 'title' => '编辑器主题',
  8 + 'type' => 'select',
  9 + 'content' =>
  10 + array (
  11 + 'default' => '经典主题',
  12 + 'black' => '雅黑主题',
  13 + 'blue' => '淡蓝主题',
  14 + 'grey' => '深灰主题',
  15 + 'primary' => '深绿主题',
  16 + ),
  17 + 'value' => 'black',
  18 + 'rule' => 'required',
  19 + 'msg' => '',
  20 + 'tip' => '',
  21 + 'ok' => '',
  22 + 'extend' => '',
  23 + ),
  24 + 1 =>
  25 + array (
  26 + 'name' => 'wordimageserver',
  27 + 'title' => '启用word图片替换服务器',
  28 + 'type' => 'radio',
  29 + 'content' =>
  30 + array (
  31 + 1 => '是',
  32 + 0 => '否',
  33 + ),
  34 + 'value' => '0',
  35 + 'rule' => 'required',
  36 + 'msg' => '',
  37 + 'tip' => '如果启用,请务必先运行word.exe',
  38 + 'ok' => '',
  39 + 'extend' => '',
  40 + ),
  41 + 2 =>
  42 + array (
  43 + 'name' => 'attachmentmode_admin',
  44 + 'title' => '管理员附件选择模式',
  45 + 'type' => 'select',
  46 + 'content' =>
  47 + array (
  48 + 'all' => '任何管理员均可以查看全部上传的文件',
  49 + 'auth' => '仅可以查看自己及所有子管理员上传的文件',
  50 + 'personal' => '仅可以查看选择自己上传的文件',
  51 + ),
  52 + 'value' => 'all',
  53 + 'rule' => 'required',
  54 + 'msg' => '',
  55 + 'tip' => '',
  56 + 'ok' => '',
  57 + 'extend' => '',
  58 + ),
  59 + 3 =>
  60 + array (
  61 + 'name' => 'attachmentmode_index',
  62 + 'title' => '后台附件选择模式',
  63 + 'type' => 'select',
  64 + 'content' =>
  65 + array (
  66 + 'all' => '任何会员均可以查看全部上传的文件',
  67 + 'personal' => '仅可以查看选择自己上传的文件',
  68 + ),
  69 + 'value' => 'all',
  70 + 'rule' => 'required',
  71 + 'msg' => '',
  72 + 'tip' => '',
  73 + 'ok' => '',
  74 + 'extend' => '',
  75 + ),
  76 +);
@@ -181,7 +181,7 @@ return array ( @@ -181,7 +181,7 @@ return array (
181 'content' => 181 'content' =>
182 array ( 182 array (
183 ), 183 ),
184 - 'value' => 'jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx', 184 + 'value' => 'jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx,mp4,avi,wmv,rm,rmvb,mkv,mov',
185 'rule' => 'required', 185 'rule' => 'required',
186 'msg' => '', 186 'msg' => '',
187 'tip' => '', 187 'tip' => '',
  1 +<?php
  2 +
  3 +namespace app\admin\controller;
  4 +
  5 +use app\common\controller\Backend;
  6 +/**
  7 + * 广告位管理
  8 + *
  9 + * @icon fa fa-circle-o
  10 + */
  11 +class Advert extends Backend
  12 +{
  13 +
  14 + /**
  15 + * Advert模型对象
  16 + * @var \app\admin\model\Advert
  17 + */
  18 + protected $model = null;
  19 +
  20 + public function _initialize()
  21 + {
  22 + parent::_initialize();
  23 + $this->model = new \app\admin\model\Advert;
  24 + $type = ['首页广告位','弹窗广告位'];
  25 + $this->assign('type',$type);
  26 + }
  27 +
  28 + /**
  29 + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  30 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  31 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  32 + */
  33 +
  34 +
  35 +}
  1 +<?php
  2 +
  3 +namespace app\admin\controller;
  4 +
  5 +use app\common\controller\Backend;
  6 +
  7 +/**
  8 + * 品牌分类管理
  9 + *
  10 + * @icon fa fa-circle-o
  11 + */
  12 +class Btype extends Backend
  13 +{
  14 +
  15 + /**
  16 + * Btype模型对象
  17 + * @var \app\admin\model\Btype
  18 + */
  19 + protected $model = null;
  20 +
  21 + public function _initialize()
  22 + {
  23 + parent::_initialize();
  24 + $this->model = new \app\admin\model\Btype;
  25 +
  26 + }
  27 +
  28 + /**
  29 + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  30 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  31 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  32 + */
  33 +
  34 +
  35 +}
  1 +<?php
  2 +
  3 +namespace app\admin\controller;
  4 +
  5 +use app\common\controller\Backend;
  6 +use think\Db;
  7 +use think\exception\ValidateException;
  8 +use think\exception\PDOException;
  9 +use think\Exception;
  10 +/**
  11 + * 品类商品详情管理
  12 + *
  13 + * @icon fa fa-circle-o
  14 + */
  15 +class Ggoods extends Backend
  16 +{
  17 +
  18 + /**
  19 + * Goods模型对象
  20 + * @var \app\admin\model\Goods
  21 + */
  22 + protected $model = null;
  23 +
  24 + public function _initialize()
  25 + {
  26 + parent::_initialize();
  27 + $this->model = new \app\admin\model\Goods;
  28 + //品类分类名称
  29 + $res = Db::name('gtype')->field('id,name')->select();
  30 + $arr = [];
  31 + foreach($res as $value){
  32 + $arr[$value['id']] = $value['name'];
  33 + }
  34 + $this->assign('gtype',$arr);
  35 +
  36 + //设计师
  37 + $this->assign('is_design',['否','是']);
  38 + }
  39 +
  40 + /**
  41 + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  42 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  43 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  44 + */
  45 +
  46 +
  47 + /**
  48 + * 查看
  49 + */
  50 + public function index()
  51 + {
  52 + //当前是否为关联查询
  53 + $this->relationSearch = true;
  54 + //设置过滤方法
  55 + $this->request->filter(['strip_tags', 'trim']);
  56 + if ($this->request->isAjax())
  57 + {
  58 + //如果发送的来源是Selectpage,则转发到Selectpage
  59 + if ($this->request->request('keyField'))
  60 + {
  61 + return $this->selectpage();
  62 + }
  63 + list($where, $sort, $order, $offset, $limit) = $this->buildparams();
  64 + $total = $this->model
  65 + ->with(['gtype'])
  66 + ->where($where)
  67 + ->where('type',0)
  68 + ->order($sort, $order)
  69 + ->count();
  70 +
  71 + $list = $this->model
  72 + ->with(['gtype'])
  73 + ->where($where)
  74 + ->where('type',0)
  75 + ->order($sort, $order)
  76 + ->limit($offset, $limit)
  77 + ->select();
  78 +
  79 + foreach ($list as $row) {
  80 +
  81 + $row->getRelation('gtype')->visible(['id','name']);
  82 + }
  83 + $list = collection($list)->toArray();
  84 + $result = array("total" => $total, "rows" => $list);
  85 +
  86 + return json($result);
  87 + }
  88 + return $this->view->fetch();
  89 + }
  90 +
  91 + /**
  92 + * 添加
  93 + */
  94 + public function add()
  95 + {
  96 + if ($this->request->isPost()) {
  97 + $params = $this->request->post("row/a");
  98 + if ($params) {
  99 + $params = $this->preExcludeFields($params);
  100 +
  101 + if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
  102 + $params[$this->dataLimitField] = $this->auth->id;
  103 + }
  104 + $result = false;
  105 + Db::startTrans();
  106 + try {
  107 + //是否采用模型验证
  108 + if ($this->modelValidate) {
  109 + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
  110 + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
  111 + $this->model->validateFailException(true)->validate($validate);
  112 + }
  113 + $params['type'] = 0;
  114 + $res = Db::name('gtype')->where('id',$params['t_id'])->field('id,name')->find();
  115 + $params['type_name'] = $res['name'];
  116 + $result = $this->model->allowField(true)->save($params);
  117 + Db::commit();
  118 + } catch (ValidateException $e) {
  119 + Db::rollback();
  120 + $this->error($e->getMessage());
  121 + } catch (PDOException $e) {
  122 + Db::rollback();
  123 + $this->error($e->getMessage());
  124 + } catch (Exception $e) {
  125 + Db::rollback();
  126 + $this->error($e->getMessage());
  127 + }
  128 + if ($result !== false) {
  129 + $this->success();
  130 + } else {
  131 + $this->error(__('No rows were inserted'));
  132 + }
  133 + }
  134 + $this->error(__('Parameter %s can not be empty', ''));
  135 + }
  136 + return $this->view->fetch();
  137 + }
  138 +
  139 + /**
  140 + * 编辑
  141 + */
  142 + public function edit($ids = null)
  143 + {
  144 + $row = $this->model->get($ids);
  145 + if (!$row) {
  146 + $this->error(__('No Results were found'));
  147 + }
  148 + $adminIds = $this->getDataLimitAdminIds();
  149 + if (is_array($adminIds)) {
  150 + if (!in_array($row[$this->dataLimitField], $adminIds)) {
  151 + $this->error(__('You have no permission'));
  152 + }
  153 + }
  154 + if ($this->request->isPost()) {
  155 + $params = $this->request->post("row/a");
  156 + if ($params) {
  157 + $params = $this->preExcludeFields($params);
  158 + $result = false;
  159 + Db::startTrans();
  160 + try {
  161 + //是否采用模型验证
  162 + if ($this->modelValidate) {
  163 + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
  164 + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
  165 + $row->validateFailException(true)->validate($validate);
  166 + }
  167 + $res = Db::name('gtype')->where('id',$params['t_id'])->field('id,name')->find();
  168 + $params['type_name'] = $res['name'];
  169 + $result = $row->allowField(true)->save($params);
  170 + Db::commit();
  171 + } catch (ValidateException $e) {
  172 + Db::rollback();
  173 + $this->error($e->getMessage());
  174 + } catch (PDOException $e) {
  175 + Db::rollback();
  176 + $this->error($e->getMessage());
  177 + } catch (Exception $e) {
  178 + Db::rollback();
  179 + $this->error($e->getMessage());
  180 + }
  181 + if ($result !== false) {
  182 + $this->success();
  183 + } else {
  184 + $this->error(__('No rows were updated'));
  185 + }
  186 + }
  187 + $this->error(__('Parameter %s can not be empty', ''));
  188 + }
  189 + $this->view->assign("row", $row);
  190 + return $this->view->fetch();
  191 + }
  192 +
  193 + /**
  194 + * 回收站
  195 + */
  196 + public function recyclebin()
  197 + {
  198 + //设置过滤方法
  199 + $this->request->filter(['strip_tags']);
  200 + if ($this->request->isAjax()) {
  201 + list($where, $sort, $order, $offset, $limit) = $this->buildparams();
  202 + $total = $this->model
  203 + ->onlyTrashed()
  204 + ->where($where)
  205 + ->where('type',0)
  206 + ->order($sort, $order)
  207 + ->count();
  208 +
  209 + $list = $this->model
  210 + ->onlyTrashed()
  211 + ->where($where)
  212 + ->where('type',0)
  213 + ->order($sort, $order)
  214 + ->limit($offset, $limit)
  215 + ->select();
  216 +
  217 + $result = array("total" => $total, "rows" => $list);
  218 +
  219 + return json($result);
  220 + }
  221 + return $this->view->fetch();
  222 + }
  223 +}
  1 +<?php
  2 +
  3 +namespace app\admin\controller;
  4 +
  5 +use app\common\controller\Backend;
  6 +use think\Db;
  7 +use think\exception\ValidateException;
  8 +use think\exception\PDOException;
  9 +use think\Exception;
  10 +/**
  11 + * 品牌商品详情管理
  12 + *
  13 + * @icon fa fa-circle-o
  14 + */
  15 +class Goods extends Backend
  16 +{
  17 +
  18 + /**
  19 + * Goods模型对象
  20 + * @var \app\admin\model\Goods
  21 + */
  22 + protected $model = null;
  23 +
  24 + public function _initialize()
  25 + {
  26 + parent::_initialize();
  27 + $this->model = new \app\admin\model\Goods;
  28 + //品牌分类名称
  29 + $res = Db::name('btype')->field('id,name,address')->select();
  30 + $arr = [];
  31 + foreach($res as $value){
  32 + $arr[$value['id']] = $value['name'].'&nbsp;&nbsp;'.$value['address'];
  33 + }
  34 + $this->assign('btype',$arr);
  35 +
  36 + //设计师
  37 + $this->assign('is_design',['否','是']);
  38 + }
  39 +
  40 + /**
  41 + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  42 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  43 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  44 + */
  45 +
  46 +
  47 + /**
  48 + * 查看
  49 + */
  50 + public function index()
  51 + {
  52 + //当前是否为关联查询
  53 + $this->relationSearch = true;
  54 + //设置过滤方法
  55 + $this->request->filter(['strip_tags', 'trim']);
  56 + if ($this->request->isAjax())
  57 + {
  58 + //如果发送的来源是Selectpage,则转发到Selectpage
  59 + if ($this->request->request('keyField'))
  60 + {
  61 + return $this->selectpage();
  62 + }
  63 + list($where, $sort, $order, $offset, $limit) = $this->buildparams();
  64 + $total = $this->model
  65 + ->with(['btype'])
  66 + ->where($where)
  67 + ->where('type',1)
  68 + ->order($sort, $order)
  69 + ->count();
  70 +
  71 + $list = $this->model
  72 + ->with(['btype'])
  73 + ->where($where)
  74 + ->where('type',1)
  75 + ->order($sort, $order)
  76 + ->limit($offset, $limit)
  77 + ->select();
  78 +
  79 + foreach ($list as $row) {
  80 +
  81 + $row->getRelation('btype')->visible(['id','name','address']);
  82 + }
  83 + $list = collection($list)->toArray();
  84 + $result = array("total" => $total, "rows" => $list);
  85 +
  86 + return json($result);
  87 + }
  88 + return $this->view->fetch();
  89 + }
  90 +
  91 + /**
  92 + * 添加
  93 + */
  94 + public function add()
  95 + {
  96 + if ($this->request->isPost()) {
  97 + $params = $this->request->post("row/a");
  98 + if ($params) {
  99 + $params = $this->preExcludeFields($params);
  100 +
  101 + if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
  102 + $params[$this->dataLimitField] = $this->auth->id;
  103 + }
  104 + $result = false;
  105 + Db::startTrans();
  106 + try {
  107 + //是否采用模型验证
  108 + if ($this->modelValidate) {
  109 + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
  110 + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
  111 + $this->model->validateFailException(true)->validate($validate);
  112 + }
  113 + $params['type'] = 1;
  114 + $res = Db::name('btype')->where('id',$params['t_id'])->field('id,name')->find();
  115 + $params['type_name'] = $res['name'];
  116 + $result = $this->model->allowField(true)->save($params);
  117 + Db::commit();
  118 + } catch (ValidateException $e) {
  119 + Db::rollback();
  120 + $this->error($e->getMessage());
  121 + } catch (PDOException $e) {
  122 + Db::rollback();
  123 + $this->error($e->getMessage());
  124 + } catch (Exception $e) {
  125 + Db::rollback();
  126 + $this->error($e->getMessage());
  127 + }
  128 + if ($result !== false) {
  129 + $this->success();
  130 + } else {
  131 + $this->error(__('No rows were inserted'));
  132 + }
  133 + }
  134 + $this->error(__('Parameter %s can not be empty', ''));
  135 + }
  136 + return $this->view->fetch();
  137 + }
  138 +
  139 + /**
  140 + * 编辑
  141 + */
  142 + public function edit($ids = null)
  143 + {
  144 + $row = $this->model->get($ids);
  145 + if (!$row) {
  146 + $this->error(__('No Results were found'));
  147 + }
  148 + $adminIds = $this->getDataLimitAdminIds();
  149 + if (is_array($adminIds)) {
  150 + if (!in_array($row[$this->dataLimitField], $adminIds)) {
  151 + $this->error(__('You have no permission'));
  152 + }
  153 + }
  154 + if ($this->request->isPost()) {
  155 + $params = $this->request->post("row/a");
  156 + if ($params) {
  157 + $params = $this->preExcludeFields($params);
  158 + $result = false;
  159 + Db::startTrans();
  160 + try {
  161 + //是否采用模型验证
  162 + if ($this->modelValidate) {
  163 + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
  164 + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
  165 + $row->validateFailException(true)->validate($validate);
  166 + }
  167 + $res = Db::name('btype')->where('id',$params['t_id'])->field('id,name')->find();
  168 + $params['type_name'] = $res['name'];
  169 + $result = $row->allowField(true)->save($params);
  170 + Db::commit();
  171 + } catch (ValidateException $e) {
  172 + Db::rollback();
  173 + $this->error($e->getMessage());
  174 + } catch (PDOException $e) {
  175 + Db::rollback();
  176 + $this->error($e->getMessage());
  177 + } catch (Exception $e) {
  178 + Db::rollback();
  179 + $this->error($e->getMessage());
  180 + }
  181 + if ($result !== false) {
  182 + $this->success();
  183 + } else {
  184 + $this->error(__('No rows were updated'));
  185 + }
  186 + }
  187 + $this->error(__('Parameter %s can not be empty', ''));
  188 + }
  189 + $this->view->assign("row", $row);
  190 + return $this->view->fetch();
  191 + }
  192 +
  193 + /**
  194 + * 回收站
  195 + */
  196 + public function recyclebin()
  197 + {
  198 + //设置过滤方法
  199 + $this->request->filter(['strip_tags']);
  200 + if ($this->request->isAjax()) {
  201 + list($where, $sort, $order, $offset, $limit) = $this->buildparams();
  202 + $total = $this->model
  203 + ->onlyTrashed()
  204 + ->where($where)
  205 + ->where('type',1)
  206 + ->order($sort, $order)
  207 + ->count();
  208 +
  209 + $list = $this->model
  210 + ->onlyTrashed()
  211 + ->where($where)
  212 + ->where('type',1)
  213 + ->order($sort, $order)
  214 + ->limit($offset, $limit)
  215 + ->select();
  216 +
  217 + $result = array("total" => $total, "rows" => $list);
  218 +
  219 + return json($result);
  220 + }
  221 + return $this->view->fetch();
  222 + }
  223 +}
  1 +<?php
  2 +
  3 +namespace app\admin\controller;
  4 +
  5 +use app\common\controller\Backend;
  6 +
  7 +/**
  8 + * 品类分类管理
  9 + *
  10 + * @icon fa fa-circle-o
  11 + */
  12 +class Gtype extends Backend
  13 +{
  14 +
  15 + /**
  16 + * Gtype模型对象
  17 + * @var \app\admin\model\Gtype
  18 + */
  19 + protected $model = null;
  20 +
  21 + public function _initialize()
  22 + {
  23 + parent::_initialize();
  24 + $this->model = new \app\admin\model\Gtype;
  25 +
  26 + }
  27 +
  28 + /**
  29 + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  30 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  31 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  32 + */
  33 +
  34 +
  35 +}
  1 +<?php
  2 +
  3 +return [
  4 + 'Id' => 'ID',
  5 + 'Type' => '广告类型',
  6 + 'Image' => '广告图',
  7 + 'Createtime' => '创建时间',
  8 + 'Updatetime' => '更新时间'
  9 +];
  1 +<?php
  2 +
  3 +return [
  4 + 'Id' => 'ID',
  5 + 'Image' => '品牌logo',
  6 + 'Name' => '品牌名称',
  7 + 'Address' => '品牌产地',
  8 + 'Introduce' => '品牌简介',
  9 + 'Brand_explain' => '品牌说明',
  10 + 'File' => '视频文件',
  11 + 'Image_long' => '长图',
  12 + 'Createtime' => '创建时间',
  13 + 'Updatetime' => '更新时间',
  14 + 'Deletetime' => '删除时间'
  15 +];
  1 +<?php
  2 +
  3 +return [
  4 + 'Id' => 'ID',
  5 + 'Is_design' => '设计师作品',
  6 + 'T_id' => '品类分类',
  7 + 'File' => '商品视频',
  8 + 'Name' => '商品名称',
  9 + 'Name_en' => '商品名称(英文)',
  10 + 'New_price' => '新人价格',
  11 + 'Sale_price' => '销售价格',
  12 + 'Market_price' => '市场价格',
  13 + 'Expense_price' => '运费',
  14 + 'Style' => '商品规格',
  15 + 'Tag' => '商品标签',
  16 + 'Stock' => '商品库存',
  17 + 'Introduce' => '商品简介',
  18 + 'Detail' => '商品详情',
  19 + 'Createtime' => '创建时间',
  20 + 'Updatetime' => '更新时间',
  21 + 'Deletetime' => '删除时间',
  22 + 'Gtype.id' => 'ID',
  23 + 'Gtype.name' => '品类名称',
  24 +];
  1 +<?php
  2 +
  3 +return [
  4 + 'Id' => 'ID',
  5 + 'Is_design' => '设计师作品',
  6 + 'T_id' => '品牌分类',
  7 + 'File' => '商品视频',
  8 + 'Name' => '商品名称',
  9 + 'Name_en' => '商品名称(英文)',
  10 + 'New_price' => '新人价格',
  11 + 'Sale_price' => '销售价格',
  12 + 'Market_price' => '市场价格',
  13 + 'Expense_price' => '运费',
  14 + 'Style' => '商品规格',
  15 + 'Tag' => '商品标签',
  16 + 'Stock' => '商品库存',
  17 + 'Introduce' => '商品简介',
  18 + 'Detail' => '商品详情',
  19 + 'Createtime' => '创建时间',
  20 + 'Updatetime' => '更新时间',
  21 + 'Deletetime' => '删除时间',
  22 + 'Btype.id' => 'ID',
  23 + 'Btype.name' => '品牌名称',
  24 + 'Btype.address' => '品牌产地'
  25 +];
  1 +<?php
  2 +
  3 +return [
  4 + 'Id' => 'ID',
  5 + 'Image' => '分类图',
  6 + 'Images' => '分类轮播图',
  7 + 'Name' => '分类名称',
  8 + 'Createtime' => '创建时间',
  9 + 'Updatetime' => '更新时间'
  10 +];
  1 +<?php
  2 +
  3 +namespace app\admin\model;
  4 +
  5 +use think\Model;
  6 +
  7 +
  8 +class Advert extends Model
  9 +{
  10 +
  11 +
  12 +
  13 +
  14 +
  15 + // 表名
  16 + protected $name = 'advert';
  17 +
  18 + // 自动写入时间戳字段
  19 + protected $autoWriteTimestamp = 'int';
  20 +
  21 + // 定义时间戳字段名
  22 + protected $createTime = 'createtime';
  23 + protected $updateTime = 'updatetime';
  24 + protected $deleteTime = false;
  25 +
  26 + // 追加属性
  27 + protected $append = [
  28 +
  29 + ];
  30 +
  31 +
  32 +
  33 +
  34 +
  35 +
  36 +
  37 +
  38 +
  39 +
  40 +}
  1 +<?php
  2 +
  3 +namespace app\admin\model;
  4 +
  5 +use think\Model;
  6 +use traits\model\SoftDelete;
  7 +
  8 +class Btype extends Model
  9 +{
  10 +
  11 + use SoftDelete;
  12 +
  13 +
  14 +
  15 + // 表名
  16 + protected $name = 'btype';
  17 +
  18 + // 自动写入时间戳字段
  19 + protected $autoWriteTimestamp = 'int';
  20 +
  21 + // 定义时间戳字段名
  22 + protected $createTime = 'createtime';
  23 + protected $updateTime = 'updatetime';
  24 + protected $deleteTime = 'deletetime';
  25 +
  26 + // 追加属性
  27 + protected $append = [
  28 +
  29 + ];
  30 +
  31 +
  32 +
  33 +
  34 +
  35 +
  36 +
  37 +
  38 +
  39 +
  40 +}
  1 +<?php
  2 +
  3 +namespace app\admin\model;
  4 +
  5 +use think\Model;
  6 +use traits\model\SoftDelete;
  7 +
  8 +class Goods extends Model
  9 +{
  10 +
  11 + use SoftDelete;
  12 +
  13 +
  14 +
  15 + // 表名
  16 + protected $name = 'goods';
  17 +
  18 + // 自动写入时间戳字段
  19 + protected $autoWriteTimestamp = 'int';
  20 +
  21 + // 定义时间戳字段名
  22 + protected $createTime = 'createtime';
  23 + protected $updateTime = 'updatetime';
  24 + protected $deleteTime = 'deletetime';
  25 +
  26 + // 追加属性
  27 + protected $append = [
  28 +
  29 + ];
  30 +
  31 +
  32 +
  33 +
  34 +
  35 +
  36 +
  37 +
  38 +
  39 +
  40 + public function btype()
  41 + {
  42 + return $this->belongsTo('Btype', 't_id', 'id', [], 'LEFT')->setEagerlyType(0);
  43 + }
  44 +
  45 + public function gtype()
  46 + {
  47 + return $this->belongsTo('Gtype', 't_id', 'id', [], 'LEFT')->setEagerlyType(0);
  48 + }
  49 +}
  1 +<?php
  2 +
  3 +namespace app\admin\model;
  4 +
  5 +use think\Model;
  6 +
  7 +
  8 +class Gtype extends Model
  9 +{
  10 +
  11 +
  12 +
  13 +
  14 +
  15 + // 表名
  16 + protected $name = 'gtype';
  17 +
  18 + // 自动写入时间戳字段
  19 + protected $autoWriteTimestamp = 'int';
  20 +
  21 + // 定义时间戳字段名
  22 + protected $createTime = 'createtime';
  23 + protected $updateTime = 'updatetime';
  24 + protected $deleteTime = false;
  25 +
  26 + // 追加属性
  27 + protected $append = [
  28 +
  29 + ];
  30 +
  31 +
  32 +
  33 +
  34 +
  35 +
  36 +
  37 +
  38 +
  39 +
  40 +}
  1 +<?php
  2 +
  3 +namespace app\admin\validate;
  4 +
  5 +use think\Validate;
  6 +
  7 +class Advert extends Validate
  8 +{
  9 + /**
  10 + * 验证规则
  11 + */
  12 + protected $rule = [
  13 + ];
  14 + /**
  15 + * 提示消息
  16 + */
  17 + protected $message = [
  18 + ];
  19 + /**
  20 + * 验证场景
  21 + */
  22 + protected $scene = [
  23 + 'add' => [],
  24 + 'edit' => [],
  25 + ];
  26 +
  27 +}
  1 +<?php
  2 +
  3 +namespace app\admin\validate;
  4 +
  5 +use think\Validate;
  6 +
  7 +class Btype extends Validate
  8 +{
  9 + /**
  10 + * 验证规则
  11 + */
  12 + protected $rule = [
  13 + ];
  14 + /**
  15 + * 提示消息
  16 + */
  17 + protected $message = [
  18 + ];
  19 + /**
  20 + * 验证场景
  21 + */
  22 + protected $scene = [
  23 + 'add' => [],
  24 + 'edit' => [],
  25 + ];
  26 +
  27 +}
  1 +<?php
  2 +
  3 +namespace app\admin\validate;
  4 +
  5 +use think\Validate;
  6 +
  7 +class Goods extends Validate
  8 +{
  9 + /**
  10 + * 验证规则
  11 + */
  12 + protected $rule = [
  13 + ];
  14 + /**
  15 + * 提示消息
  16 + */
  17 + protected $message = [
  18 + ];
  19 + /**
  20 + * 验证场景
  21 + */
  22 + protected $scene = [
  23 + 'add' => [],
  24 + 'edit' => [],
  25 + ];
  26 +
  27 +}
  1 +<?php
  2 +
  3 +namespace app\admin\validate;
  4 +
  5 +use think\Validate;
  6 +
  7 +class Gtype extends Validate
  8 +{
  9 + /**
  10 + * 验证规则
  11 + */
  12 + protected $rule = [
  13 + ];
  14 + /**
  15 + * 提示消息
  16 + */
  17 + protected $message = [
  18 + ];
  19 + /**
  20 + * 验证场景
  21 + */
  22 + protected $scene = [
  23 + 'add' => [],
  24 + 'edit' => [],
  25 + ];
  26 +
  27 +}
  1 +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[type]', $type, null, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + <div class="input-group">
  13 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
  14 + <div class="input-group-addon no-border no-padding">
  15 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  16 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  17 + </div>
  18 + <span class="msg-box n-right" for="c-image"></span>
  19 + </div>
  20 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  21 + </div>
  22 + </div>
  23 + <div class="form-group layer-footer">
  24 + <label class="control-label col-xs-12 col-sm-2"></label>
  25 + <div class="col-xs-12 col-sm-8">
  26 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  27 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  28 + </div>
  29 + </div>
  30 +</form>
  1 +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[type]', $type, $row.type, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + <div class="input-group">
  13 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
  14 + <div class="input-group-addon no-border no-padding">
  15 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  16 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  17 + </div>
  18 + <span class="msg-box n-right" for="c-image"></span>
  19 + </div>
  20 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  21 + </div>
  22 + </div>
  23 + <div class="form-group layer-footer">
  24 + <label class="control-label col-xs-12 col-sm-2"></label>
  25 + <div class="col-xs-12 col-sm-8">
  26 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  27 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  28 + </div>
  29 + </div>
  30 +</form>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  10 + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('advert/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  11 + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('advert/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  12 + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('advert/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  13 + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('advert/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
  14 +
  15 + <!--<div class="dropdown btn-group {:$auth->check('advert/multi')?'':'hide'}">-->
  16 + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
  17 + <!--<ul class="dropdown-menu text-left" role="menu">-->
  18 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
  19 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
  20 + <!--</ul>-->
  21 + <!--</div>-->
  22 +
  23 +
  24 + </div>
  25 + <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  26 + data-operate-edit="{:$auth->check('advert/edit')}"
  27 + data-operate-del="{:$auth->check('advert/del')}"
  28 + width="100%">
  29 + </table>
  30 + </div>
  31 + </div>
  32 +
  33 + </div>
  34 + </div>
  35 +</div>
  1 +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + <div class="input-group">
  7 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
  8 + <div class="input-group-addon no-border no-padding">
  9 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  10 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  11 + </div>
  12 + <span class="msg-box n-right" for="c-image"></span>
  13 + </div>
  14 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  19 + <div class="col-xs-12 col-sm-8">
  20 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
  21 + </div>
  22 + </div>
  23 + <div class="form-group">
  24 + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
  25 + <div class="col-xs-12 col-sm-8">
  26 + <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text">
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Brand_explain')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <textarea id="c-brand_explain" data-rule="required" class="form-control editor" rows="5" name="row[brand_explain]" cols="50"></textarea>
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <div class="input-group">
  45 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text">
  46 + <div class="input-group-addon no-border no-padding">
  47 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  48 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  49 + </div>
  50 + <span class="msg-box n-right" for="c-file"></span>
  51 + </div>
  52 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  53 + </div>
  54 + </div>
  55 + <div class="form-group">
  56 + <label class="control-label col-xs-12 col-sm-2">{:__('Image_long')}:</label>
  57 + <div class="col-xs-12 col-sm-8">
  58 + <div class="input-group">
  59 + <input id="c-image_long" data-rule="required" class="form-control" size="50" name="row[image_long]" type="text">
  60 + <div class="input-group-addon no-border no-padding">
  61 + <span><button type="button" id="plupload-image_long" class="btn btn-danger plupload" data-input-id="c-image_long" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image_long"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  62 + <span><button type="button" id="fachoose-image_long" class="btn btn-primary fachoose" data-input-id="c-image_long" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  63 + </div>
  64 + <span class="msg-box n-right" for="c-image_long"></span>
  65 + </div>
  66 + <ul class="row list-inline plupload-preview" id="p-image_long"></ul>
  67 + </div>
  68 + </div>
  69 + <div class="form-group layer-footer">
  70 + <label class="control-label col-xs-12 col-sm-2"></label>
  71 + <div class="col-xs-12 col-sm-8">
  72 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  73 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  74 + </div>
  75 + </div>
  76 +</form>
  1 +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + <div class="input-group">
  7 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
  8 + <div class="input-group-addon no-border no-padding">
  9 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  10 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  11 + </div>
  12 + <span class="msg-box n-right" for="c-image"></span>
  13 + </div>
  14 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  19 + <div class="col-xs-12 col-sm-8">
  20 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
  21 + </div>
  22 + </div>
  23 + <div class="form-group">
  24 + <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
  25 + <div class="col-xs-12 col-sm-8">
  26 + <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text" value="{$row.introduce|htmlentities}">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Brand_explain')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <textarea id="c-brand_explain" data-rule="required" class="form-control " rows="5" name="row[brand_explain]" cols="50">{$row.brand_explain|htmlentities}</textarea>
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <div class="input-group">
  45 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" value="{$row.file|htmlentities}">
  46 + <div class="input-group-addon no-border no-padding">
  47 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  48 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  49 + </div>
  50 + <span class="msg-box n-right" for="c-file"></span>
  51 + </div>
  52 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  53 + </div>
  54 + </div>
  55 + <div class="form-group">
  56 + <label class="control-label col-xs-12 col-sm-2">{:__('Image_long')}:</label>
  57 + <div class="col-xs-12 col-sm-8">
  58 +
  59 + </div>
  60 + <div class="col-xs-12 col-sm-8">
  61 + <div class="input-group">
  62 + <input id="c-image_long" data-rule="required" class="form-control" name="row[image_long]" type="text" value="{$row.image_long|htmlentities}">
  63 + <div class="input-group-addon no-border no-padding">
  64 + <span><button type="button" id="plupload-image_long" class="btn btn-danger plupload" data-input-id="c-image_long" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image_long"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  65 + <span><button type="button" id="fachoose-image_long" class="btn btn-primary fachoose" data-input-id="c-image_long" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  66 + </div>
  67 + <span class="msg-box n-right" for="c-image_long"></span>
  68 + </div>
  69 + <ul class="row list-inline plupload-preview" id="p-image_long"></ul>
  70 + </div>
  71 + </div>
  72 + <div class="form-group layer-footer">
  73 + <label class="control-label col-xs-12 col-sm-2"></label>
  74 + <div class="col-xs-12 col-sm-8">
  75 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  76 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  77 + </div>
  78 + </div>
  79 +</form>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  10 + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('btype/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  11 + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('btype/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  12 + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('btype/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  13 + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('btype/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
  14 +
  15 + <!--<div class="dropdown btn-group {:$auth->check('btype/multi')?'':'hide'}">-->
  16 + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
  17 + <!--<ul class="dropdown-menu text-left" role="menu">-->
  18 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
  19 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
  20 + <!--</ul>-->
  21 + <!--</div>-->
  22 +
  23 + <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('btype/recyclebin')?'':'hide'}" href="btype/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
  24 + </div>
  25 + <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  26 + data-operate-edit="{:$auth->check('btype/edit')}"
  27 + data-operate-del="{:$auth->check('btype/del')}"
  28 + width="100%">
  29 + </table>
  30 + </div>
  31 + </div>
  32 +
  33 + </div>
  34 + </div>
  35 +</div>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + {:build_toolbar('refresh')}
  10 + <a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('btype/restore')?'':'hide'}" href="javascript:;" data-url="btype/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
  11 + <a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('btype/destroy')?'':'hide'}" href="javascript:;" data-url="btype/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
  12 + <a class="btn btn-success btn-restoreall {:$auth->check('btype/restore')?'':'hide'}" href="javascript:;" data-url="btype/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
  13 + <a class="btn btn-danger btn-destroyall {:$auth->check('btype/destroy')?'':'hide'}" href="javascript:;" data-url="btype/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
  14 + </div>
  15 + <table id="table" class="table table-striped table-bordered table-hover"
  16 + data-operate-restore="{:$auth->check('btype/restore')}"
  17 + data-operate-destroy="{:$auth->check('btype/destroy')}"
  18 + width="100%">
  19 + </table>
  20 + </div>
  21 + </div>
  22 +
  23 + </div>
  24 + </div>
  25 +</div>
  1 +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('T_id')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[t_id]', $gtype, null, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Is_design')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + {:build_select('row[is_design]', $is_design, null, ['class'=>'form-control', 'required'=>''])}
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  17 + <div class="col-xs-12 col-sm-8">
  18 + <div class="input-group">
  19 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" placeholder="请上传视频">
  20 + <div class="input-group-addon no-border no-padding">
  21 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  22 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  23 + </div>
  24 + <span class="msg-box n-right" for="c-file"></span>
  25 + </div>
  26 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" placeholder="请输入商品名称">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Name_en')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <input id="c-name_en" data-rule="required" class="form-control" name="row[name_en]" type="text" placeholder="请输入商品名称(英文)">
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('New_price')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <input id="c-new_price" class="form-control" step="0.01" name="row[new_price]" type="number" value="0.00">
  45 + </div>
  46 + </div>
  47 + <div class="form-group">
  48 + <label class="control-label col-xs-12 col-sm-2">{:__('Sale_price')}:</label>
  49 + <div class="col-xs-12 col-sm-8">
  50 + <input id="c-sale_price" class="form-control" step="0.01" name="row[sale_price]" type="number" value="0.00">
  51 + </div>
  52 + </div>
  53 + <div class="form-group">
  54 + <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
  55 + <div class="col-xs-12 col-sm-8">
  56 + <input id="c-market_price" class="form-control" step="0.01" name="row[market_price]" type="number" value="0.00">
  57 + </div>
  58 + </div>
  59 + <div class="form-group">
  60 + <label class="control-label col-xs-12 col-sm-2">{:__('Expense_price')}:</label>
  61 + <div class="col-xs-12 col-sm-8">
  62 + <input id="c-expense_price" class="form-control" step="0.01" name="row[expense_price]" type="number" value="0.00">
  63 + </div>
  64 + </div>
  65 + <div class="form-group">
  66 + <label class="control-label col-xs-12 col-sm-2">{:__('Style')}:</label>
  67 + <div class="col-xs-12 col-sm-8">
  68 + <input id="c-style" data-rule="required" class="form-control" name="row[style]" type="text" placeholder="请输入商品规格(多个以'|'隔开)">
  69 + </div>
  70 + </div>
  71 + <div class="form-group">
  72 + <label class="control-label col-xs-12 col-sm-2">{:__('Tag')}:</label>
  73 + <div class="col-xs-12 col-sm-8">
  74 + <input id="c-tag" data-rule="required" class="form-control" name="row[tag]" type="text" placeholder="请输入商品标签(多个以'|'隔开)">
  75 + </div>
  76 + </div>
  77 + <div class="form-group">
  78 + <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
  79 + <div class="col-xs-12 col-sm-8">
  80 + <input id="c-stock" data-rule="required range(0~)" class="form-control" name="row[stock]" type="number" value="0">
  81 + </div>
  82 + </div>
  83 + <div class="form-group">
  84 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  85 + <div class="col-xs-12 col-sm-8">
  86 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text" placeholder="请输入商品简介">
  87 + </div>
  88 + </div>
  89 + <div class="form-group">
  90 + <label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
  91 + <div class="col-xs-12 col-sm-8">
  92 + <textarea id="c-detail" data-rule="required" class="form-control editor" rows="5" name="row[detail]" cols="50"></textarea>
  93 + </div>
  94 + </div>
  95 + <div class="form-group layer-footer">
  96 + <label class="control-label col-xs-12 col-sm-2"></label>
  97 + <div class="col-xs-12 col-sm-8">
  98 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  99 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  100 + </div>
  101 + </div>
  102 +</form>
  1 +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('T_id')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[t_id]', $gtype, $row.t_id, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Is_design')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + {:build_select('row[is_design]', $is_design, $row.is_design, ['class'=>'form-control', 'required'=>''])}
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  17 + <div class="col-xs-12 col-sm-8">
  18 + <div class="input-group">
  19 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" value="{$row.file|htmlentities}" placeholder="请上传视频">
  20 + <div class="input-group-addon no-border no-padding">
  21 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  22 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  23 + </div>
  24 + <span class="msg-box n-right" for="c-file"></span>
  25 + </div>
  26 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" placeholder="请输入商品名称">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Name_en')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <input id="c-name_en" data-rule="required" class="form-control" name="row[name_en]" type="text" value="{$row.name_en|htmlentities}" placeholder="请输入商品名称(英文)">
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('New_price')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <input id="c-new_price" class="form-control" step="0.01" name="row[new_price]" type="number" value="{$row.new_price|htmlentities}">
  45 + </div>
  46 + </div>
  47 + <div class="form-group">
  48 + <label class="control-label col-xs-12 col-sm-2">{:__('Sale_price')}:</label>
  49 + <div class="col-xs-12 col-sm-8">
  50 + <input id="c-sale_price" class="form-control" step="0.01" name="row[sale_price]" type="number" value="{$row.sale_price|htmlentities}">
  51 + </div>
  52 + </div>
  53 + <div class="form-group">
  54 + <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
  55 + <div class="col-xs-12 col-sm-8">
  56 + <input id="c-market_price" class="form-control" step="0.01" name="row[market_price]" type="number" value="{$row.market_price|htmlentities}">
  57 + </div>
  58 + </div>
  59 + <div class="form-group">
  60 + <label class="control-label col-xs-12 col-sm-2">{:__('Expense_price')}:</label>
  61 + <div class="col-xs-12 col-sm-8">
  62 + <input id="c-expense_price" class="form-control" step="0.01" name="row[expense_price]" type="number" value="{$row.expense_price|htmlentities}">
  63 + </div>
  64 + </div>
  65 + <div class="form-group">
  66 + <label class="control-label col-xs-12 col-sm-2">{:__('Style')}:</label>
  67 + <div class="col-xs-12 col-sm-8">
  68 + <input id="c-style" data-rule="required" class="form-control" name="row[style]" type="text" value="{$row.style|htmlentities}" placeholder="请输入商品规格(多个以'|'隔开)">
  69 + </div>
  70 + </div>
  71 + <div class="form-group">
  72 + <label class="control-label col-xs-12 col-sm-2">{:__('Tag')}:</label>
  73 + <div class="col-xs-12 col-sm-8">
  74 + <input id="c-tag" data-rule="required" class="form-control" name="row[tag]" type="text" value="{$row.tag|htmlentities}" placeholder="请输入商品标签(多个以'|'隔开)">
  75 + </div>
  76 + </div>
  77 + <div class="form-group">
  78 + <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
  79 + <div class="col-xs-12 col-sm-8">
  80 + <input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
  81 + </div>
  82 + </div>
  83 + <div class="form-group">
  84 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  85 + <div class="col-xs-12 col-sm-8">
  86 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text" value="{$row.introduce|htmlentities}" placeholder="请输入商品简介">
  87 + </div>
  88 + </div>
  89 + <div class="form-group">
  90 + <label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
  91 + <div class="col-xs-12 col-sm-8">
  92 + <textarea id="c-detail" data-rule="required" class="form-control editor" rows="5" name="row[detail]" cols="50">{$row.detail|htmlentities}</textarea>
  93 + </div>
  94 + </div>
  95 + <div class="form-group layer-footer">
  96 + <label class="control-label col-xs-12 col-sm-2"></label>
  97 + <div class="col-xs-12 col-sm-8">
  98 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  99 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  100 + </div>
  101 + </div>
  102 +</form>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  10 + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('ggoods/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  11 + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('ggoods/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  12 + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('ggoods/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  13 + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('ggoods/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
  14 +
  15 + <!--<div class="dropdown btn-group {:$auth->check('ggoods/multi')?'':'hide'}">-->
  16 + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
  17 + <!--<ul class="dropdown-menu text-left" role="menu">-->
  18 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
  19 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
  20 + <!--</ul>-->
  21 + <!--</div>-->
  22 +
  23 + <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('ggoods/recyclebin')?'':'hide'}" href="ggoods/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
  24 + </div>
  25 + <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  26 + data-operate-edit="{:$auth->check('ggoods/edit')}"
  27 + data-operate-del="{:$auth->check('ggoods/del')}"
  28 + width="100%">
  29 + </table>
  30 + </div>
  31 + </div>
  32 +
  33 + </div>
  34 + </div>
  35 +</div>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + {:build_toolbar('refresh')}
  10 + <a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('goods/restore')?'':'hide'}" href="javascript:;" data-url="goods/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
  11 + <a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('goods/destroy')?'':'hide'}" href="javascript:;" data-url="goods/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
  12 + <a class="btn btn-success btn-restoreall {:$auth->check('goods/restore')?'':'hide'}" href="javascript:;" data-url="goods/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
  13 + <a class="btn btn-danger btn-destroyall {:$auth->check('goods/destroy')?'':'hide'}" href="javascript:;" data-url="goods/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
  14 + </div>
  15 + <table id="table" class="table table-striped table-bordered table-hover"
  16 + data-operate-restore="{:$auth->check('goods/restore')}"
  17 + data-operate-destroy="{:$auth->check('goods/destroy')}"
  18 + width="100%">
  19 + </table>
  20 + </div>
  21 + </div>
  22 +
  23 + </div>
  24 + </div>
  25 +</div>
  1 +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('T_id')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[t_id]', $btype, null, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Is_design')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + {:build_select('row[is_design]', $is_design, null, ['class'=>'form-control', 'required'=>''])}
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  17 + <div class="col-xs-12 col-sm-8">
  18 + <div class="input-group">
  19 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" placeholder="请上传视频">
  20 + <div class="input-group-addon no-border no-padding">
  21 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  22 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  23 + </div>
  24 + <span class="msg-box n-right" for="c-file"></span>
  25 + </div>
  26 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" placeholder="请输入商品名称">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Name_en')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <input id="c-name_en" data-rule="required" class="form-control" name="row[name_en]" type="text" placeholder="请输入商品名称(英文)">
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('New_price')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <input id="c-new_price" class="form-control" step="0.01" name="row[new_price]" type="number" value="0.00">
  45 + </div>
  46 + </div>
  47 + <div class="form-group">
  48 + <label class="control-label col-xs-12 col-sm-2">{:__('Sale_price')}:</label>
  49 + <div class="col-xs-12 col-sm-8">
  50 + <input id="c-sale_price" class="form-control" step="0.01" name="row[sale_price]" type="number" value="0.00">
  51 + </div>
  52 + </div>
  53 + <div class="form-group">
  54 + <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
  55 + <div class="col-xs-12 col-sm-8">
  56 + <input id="c-market_price" class="form-control" step="0.01" name="row[market_price]" type="number" value="0.00">
  57 + </div>
  58 + </div>
  59 + <div class="form-group">
  60 + <label class="control-label col-xs-12 col-sm-2">{:__('Expense_price')}:</label>
  61 + <div class="col-xs-12 col-sm-8">
  62 + <input id="c-expense_price" class="form-control" step="0.01" name="row[expense_price]" type="number" value="0.00">
  63 + </div>
  64 + </div>
  65 + <div class="form-group">
  66 + <label class="control-label col-xs-12 col-sm-2">{:__('Style')}:</label>
  67 + <div class="col-xs-12 col-sm-8">
  68 + <input id="c-style" data-rule="required" class="form-control" name="row[style]" type="text" placeholder="请输入商品规格(多个以'|'隔开)">
  69 + </div>
  70 + </div>
  71 + <div class="form-group">
  72 + <label class="control-label col-xs-12 col-sm-2">{:__('Tag')}:</label>
  73 + <div class="col-xs-12 col-sm-8">
  74 + <input id="c-tag" data-rule="required" class="form-control" name="row[tag]" type="text" placeholder="请输入商品标签(多个以'|'隔开)">
  75 + </div>
  76 + </div>
  77 + <div class="form-group">
  78 + <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
  79 + <div class="col-xs-12 col-sm-8">
  80 + <input id="c-stock" data-rule="required range(0~)" class="form-control" name="row[stock]" type="number" value="0">
  81 + </div>
  82 + </div>
  83 + <div class="form-group">
  84 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  85 + <div class="col-xs-12 col-sm-8">
  86 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text" placeholder="请输入商品简介">
  87 + </div>
  88 + </div>
  89 + <div class="form-group">
  90 + <label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
  91 + <div class="col-xs-12 col-sm-8">
  92 + <textarea id="c-detail" data-rule="required" class="form-control editor" rows="5" name="row[detail]" cols="50"></textarea>
  93 + </div>
  94 + </div>
  95 + <div class="form-group layer-footer">
  96 + <label class="control-label col-xs-12 col-sm-2"></label>
  97 + <div class="col-xs-12 col-sm-8">
  98 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  99 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  100 + </div>
  101 + </div>
  102 +</form>
  1 +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('T_id')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + {:build_select('row[t_id]', $btype, $row.t_id, ['class'=>'form-control', 'required'=>''])}
  7 + </div>
  8 + </div>
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Is_design')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + {:build_select('row[is_design]', $is_design, $row.is_design, ['class'=>'form-control', 'required'=>''])}
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
  17 + <div class="col-xs-12 col-sm-8">
  18 + <div class="input-group">
  19 + <input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" value="{$row.file|htmlentities}" placeholder="请上传视频">
  20 + <div class="input-group-addon no-border no-padding">
  21 + <span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  22 + <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  23 + </div>
  24 + <span class="msg-box n-right" for="c-file"></span>
  25 + </div>
  26 + <ul class="row list-inline plupload-preview" id="p-file"></ul>
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  31 + <div class="col-xs-12 col-sm-8">
  32 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" placeholder="请输入商品名称">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="control-label col-xs-12 col-sm-2">{:__('Name_en')}:</label>
  37 + <div class="col-xs-12 col-sm-8">
  38 + <input id="c-name_en" data-rule="required" class="form-control" name="row[name_en]" type="text" value="{$row.name_en|htmlentities}" placeholder="请输入商品名称(英文)">
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="control-label col-xs-12 col-sm-2">{:__('New_price')}:</label>
  43 + <div class="col-xs-12 col-sm-8">
  44 + <input id="c-new_price" class="form-control" step="0.01" name="row[new_price]" type="number" value="{$row.new_price|htmlentities}">
  45 + </div>
  46 + </div>
  47 + <div class="form-group">
  48 + <label class="control-label col-xs-12 col-sm-2">{:__('Sale_price')}:</label>
  49 + <div class="col-xs-12 col-sm-8">
  50 + <input id="c-sale_price" class="form-control" step="0.01" name="row[sale_price]" type="number" value="{$row.sale_price|htmlentities}">
  51 + </div>
  52 + </div>
  53 + <div class="form-group">
  54 + <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
  55 + <div class="col-xs-12 col-sm-8">
  56 + <input id="c-market_price" class="form-control" step="0.01" name="row[market_price]" type="number" value="{$row.market_price|htmlentities}">
  57 + </div>
  58 + </div>
  59 + <div class="form-group">
  60 + <label class="control-label col-xs-12 col-sm-2">{:__('Expense_price')}:</label>
  61 + <div class="col-xs-12 col-sm-8">
  62 + <input id="c-expense_price" class="form-control" step="0.01" name="row[expense_price]" type="number" value="{$row.expense_price|htmlentities}">
  63 + </div>
  64 + </div>
  65 + <div class="form-group">
  66 + <label class="control-label col-xs-12 col-sm-2">{:__('Style')}:</label>
  67 + <div class="col-xs-12 col-sm-8">
  68 + <input id="c-style" data-rule="required" class="form-control" name="row[style]" type="text" value="{$row.style|htmlentities}" placeholder="请输入商品规格(多个以'|'隔开)">
  69 + </div>
  70 + </div>
  71 + <div class="form-group">
  72 + <label class="control-label col-xs-12 col-sm-2">{:__('Tag')}:</label>
  73 + <div class="col-xs-12 col-sm-8">
  74 + <input id="c-tag" data-rule="required" class="form-control" name="row[tag]" type="text" value="{$row.tag|htmlentities}" placeholder="请输入商品标签(多个以'|'隔开)">
  75 + </div>
  76 + </div>
  77 + <div class="form-group">
  78 + <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
  79 + <div class="col-xs-12 col-sm-8">
  80 + <input id="c-stock" data-rule="required" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
  81 + </div>
  82 + </div>
  83 + <div class="form-group">
  84 + <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
  85 + <div class="col-xs-12 col-sm-8">
  86 + <input id="c-introduce" data-rule="required" class="form-control" name="row[introduce]" type="text" value="{$row.introduce|htmlentities}" placeholder="请输入商品简介">
  87 + </div>
  88 + </div>
  89 + <div class="form-group">
  90 + <label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
  91 + <div class="col-xs-12 col-sm-8">
  92 + <textarea id="c-detail" data-rule="required" class="form-control editor" rows="5" name="row[detail]" cols="50">{$row.detail|htmlentities}</textarea>
  93 + </div>
  94 + </div>
  95 + <div class="form-group layer-footer">
  96 + <label class="control-label col-xs-12 col-sm-2"></label>
  97 + <div class="col-xs-12 col-sm-8">
  98 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  99 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  100 + </div>
  101 + </div>
  102 +</form>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  10 + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('goods/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  11 + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('goods/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  12 + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('goods/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  13 + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('goods/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
  14 +
  15 + <!--<div class="dropdown btn-group {:$auth->check('goods/multi')?'':'hide'}">-->
  16 + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
  17 + <!--<ul class="dropdown-menu text-left" role="menu">-->
  18 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
  19 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
  20 + <!--</ul>-->
  21 + <!--</div>-->
  22 +
  23 + <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('goods/recyclebin')?'':'hide'}" href="goods/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
  24 + </div>
  25 + <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  26 + data-operate-edit="{:$auth->check('goods/edit')}"
  27 + data-operate-del="{:$auth->check('goods/del')}"
  28 + width="100%">
  29 + </table>
  30 + </div>
  31 + </div>
  32 +
  33 + </div>
  34 + </div>
  35 +</div>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + {:build_toolbar('refresh')}
  10 + <a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('goods/restore')?'':'hide'}" href="javascript:;" data-url="goods/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
  11 + <a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('goods/destroy')?'':'hide'}" href="javascript:;" data-url="goods/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
  12 + <a class="btn btn-success btn-restoreall {:$auth->check('goods/restore')?'':'hide'}" href="javascript:;" data-url="goods/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
  13 + <a class="btn btn-danger btn-destroyall {:$auth->check('goods/destroy')?'':'hide'}" href="javascript:;" data-url="goods/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
  14 + </div>
  15 + <table id="table" class="table table-striped table-bordered table-hover"
  16 + data-operate-restore="{:$auth->check('goods/restore')}"
  17 + data-operate-destroy="{:$auth->check('goods/destroy')}"
  18 + width="100%">
  19 + </table>
  20 + </div>
  21 + </div>
  22 +
  23 + </div>
  24 + </div>
  25 +</div>
  1 +<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 +
  3 + <div class="form-group">
  4 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  5 + <div class="col-xs-12 col-sm-8">
  6 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
  7 + </div>
  8 + </div>
  9 +
  10 + <div class="form-group">
  11 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  12 + <div class="col-xs-12 col-sm-8">
  13 + <div class="input-group">
  14 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
  15 + <div class="input-group-addon no-border no-padding">
  16 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  17 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  18 + </div>
  19 + <span class="msg-box n-right" for="c-image"></span>
  20 + </div>
  21 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  22 + </div>
  23 + </div>
  24 + <div class="form-group">
  25 + <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
  26 + <div class="col-xs-12 col-sm-8">
  27 + <div class="input-group">
  28 + <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="">
  29 + <div class="input-group-addon no-border no-padding">
  30 + <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  31 + <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  32 + </div>
  33 + <span class="msg-box n-right" for="c-images"></span>
  34 + </div>
  35 + <ul class="row list-inline plupload-preview" id="p-images"></ul>
  36 + </div>
  37 + </div>
  38 + <div class="form-group layer-footer">
  39 + <label class="control-label col-xs-12 col-sm-2"></label>
  40 + <div class="col-xs-12 col-sm-8">
  41 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  42 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  43 + </div>
  44 + </div>
  45 +</form>
  1 +<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2 + <div class="form-group">
  3 + <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  4 + <div class="col-xs-12 col-sm-8">
  5 + <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
  6 + </div>
  7 + </div>
  8 +
  9 + <div class="form-group">
  10 + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  11 + <div class="col-xs-12 col-sm-8">
  12 + <div class="input-group">
  13 + <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
  14 + <div class="input-group-addon no-border no-padding">
  15 + <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  16 + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  17 + </div>
  18 + <span class="msg-box n-right" for="c-image"></span>
  19 + </div>
  20 + <ul class="row list-inline plupload-preview" id="p-image"></ul>
  21 + </div>
  22 + </div>
  23 + <div class="form-group">
  24 + <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
  25 + <div class="col-xs-12 col-sm-8">
  26 + <div class="input-group">
  27 + <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
  28 + <div class="input-group-addon no-border no-padding">
  29 + <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  30 + <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  31 + </div>
  32 + <span class="msg-box n-right" for="c-images"></span>
  33 + </div>
  34 + <ul class="row list-inline plupload-preview" id="p-images"></ul>
  35 + </div>
  36 + </div>
  37 + <div class="form-group layer-footer">
  38 + <label class="control-label col-xs-12 col-sm-2"></label>
  39 + <div class="col-xs-12 col-sm-8">
  40 + <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  41 + <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  42 + </div>
  43 + </div>
  44 +</form>
  1 +<div class="panel panel-default panel-intro">
  2 + {:build_heading()}
  3 +
  4 + <div class="panel-body">
  5 + <div id="myTabContent" class="tab-content">
  6 + <div class="tab-pane fade active in" id="one">
  7 + <div class="widget-body no-padding">
  8 + <div id="toolbar" class="toolbar">
  9 + <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  10 + <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('gtype/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  11 + <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('gtype/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  12 + <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('gtype/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  13 + <!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('gtype/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
  14 +
  15 + <!--<div class="dropdown btn-group {:$auth->check('gtype/multi')?'':'hide'}">-->
  16 + <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
  17 + <!--<ul class="dropdown-menu text-left" role="menu">-->
  18 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
  19 + <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
  20 + <!--</ul>-->
  21 + <!--</div>-->
  22 +
  23 +
  24 + </div>
  25 + <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  26 + data-operate-edit="{:$auth->check('gtype/edit')}"
  27 + data-operate-del="{:$auth->check('gtype/del')}"
  28 + width="100%">
  29 + </table>
  30 + </div>
  31 + </div>
  32 +
  33 + </div>
  34 + </div>
  35 +</div>
  1 +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2 +
  3 + var Controller = {
  4 + index: function () {
  5 + // 初始化表格参数配置
  6 + Table.api.init({
  7 + extend: {
  8 + index_url: 'advert/index' + location.search,
  9 + add_url: 'advert/add',
  10 + edit_url: 'advert/edit',
  11 + del_url: 'advert/del',
  12 + multi_url: 'advert/multi',
  13 + table: 'advert',
  14 + }
  15 + });
  16 +
  17 + var table = $("#table");
  18 +
  19 + // 初始化表格
  20 + table.bootstrapTable({
  21 + url: $.fn.bootstrapTable.defaults.extend.index_url,
  22 + pk: 'id',
  23 + sortName: 'id',
  24 + columns: [
  25 + [
  26 + {checkbox: true},
  27 + {field: 'id', title: __('Id')},
  28 + {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image},
  29 + {field: 'type', title: __('Type'),formatter: Table.api.formatter.label, searchList: {0: __('首页广告位'), 1: __('弹窗广告位')}},
  30 + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  31 + // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  32 + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  33 + ]
  34 + ]
  35 + });
  36 +
  37 + // 为表格绑定事件
  38 + Table.api.bindevent(table);
  39 + },
  40 + add: function () {
  41 + Controller.api.bindevent();
  42 + },
  43 + edit: function () {
  44 + Controller.api.bindevent();
  45 + },
  46 + api: {
  47 + bindevent: function () {
  48 + Form.api.bindevent($("form[role=form]"));
  49 + }
  50 + }
  51 + };
  52 + return Controller;
  53 +});
  1 +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2 +
  3 + var Controller = {
  4 + index: function () {
  5 + // 初始化表格参数配置
  6 + Table.api.init({
  7 + extend: {
  8 + index_url: 'btype/index' + location.search,
  9 + add_url: 'btype/add',
  10 + edit_url: 'btype/edit',
  11 + del_url: 'btype/del',
  12 + multi_url: 'btype/multi',
  13 + table: 'btype',
  14 + }
  15 + });
  16 +
  17 + var table = $("#table");
  18 +
  19 + // 初始化表格
  20 + table.bootstrapTable({
  21 + url: $.fn.bootstrapTable.defaults.extend.index_url,
  22 + pk: 'id',
  23 + sortName: 'id',
  24 + columns: [
  25 + [
  26 + {checkbox: true},
  27 + {field: 'id', title: __('Id')},
  28 + {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image},
  29 + {field: 'name', title: __('Name')},
  30 + {field: 'address', title: __('Address')},
  31 + {field: 'introduce', title: __('Introduce')},
  32 + // {field: 'file', title: __('File')},
  33 + // {field: 'image_long', title: __('Image_long')},
  34 + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  35 + // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  36 + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  37 + ]
  38 + ]
  39 + });
  40 +
  41 + // 为表格绑定事件
  42 + Table.api.bindevent(table);
  43 + },
  44 + recyclebin: function () {
  45 + // 初始化表格参数配置
  46 + Table.api.init({
  47 + extend: {
  48 + 'dragsort_url': ''
  49 + }
  50 + });
  51 +
  52 + var table = $("#table");
  53 +
  54 + // 初始化表格
  55 + table.bootstrapTable({
  56 + url: 'btype/recyclebin' + location.search,
  57 + pk: 'id',
  58 + sortName: 'id',
  59 + columns: [
  60 + [
  61 + {checkbox: true},
  62 + {field: 'id', title: __('Id')},
  63 + {field: 'name', title: __('Name'), align: 'left'},
  64 + {
  65 + field: 'deletetime',
  66 + title: __('Deletetime'),
  67 + operate: 'RANGE',
  68 + addclass: 'datetimerange',
  69 + formatter: Table.api.formatter.datetime
  70 + },
  71 + {
  72 + field: 'operate',
  73 + width: '130px',
  74 + title: __('Operate'),
  75 + table: table,
  76 + events: Table.api.events.operate,
  77 + buttons: [
  78 + {
  79 + name: 'Restore',
  80 + text: __('Restore'),
  81 + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
  82 + icon: 'fa fa-rotate-left',
  83 + url: 'btype/restore',
  84 + refresh: true
  85 + },
  86 + {
  87 + name: 'Destroy',
  88 + text: __('Destroy'),
  89 + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
  90 + icon: 'fa fa-times',
  91 + url: 'btype/destroy',
  92 + refresh: true
  93 + }
  94 + ],
  95 + formatter: Table.api.formatter.operate
  96 + }
  97 + ]
  98 + ]
  99 + });
  100 +
  101 + // 为表格绑定事件
  102 + Table.api.bindevent(table);
  103 + },
  104 + add: function () {
  105 + Controller.api.bindevent();
  106 + },
  107 + edit: function () {
  108 + Controller.api.bindevent();
  109 + },
  110 + api: {
  111 + bindevent: function () {
  112 + Form.api.bindevent($("form[role=form]"));
  113 + }
  114 + }
  115 + };
  116 + return Controller;
  117 +});
  1 +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2 +
  3 + var Controller = {
  4 + index: function () {
  5 + // 初始化表格参数配置
  6 + Table.api.init({
  7 + extend: {
  8 + index_url: 'ggoods/index' + location.search,
  9 + add_url: 'ggoods/add',
  10 + edit_url: 'ggoods/edit',
  11 + del_url: 'ggoods/del',
  12 + multi_url: 'ggoods/multi',
  13 + table: 'ggoods',
  14 + }
  15 + });
  16 +
  17 + var table = $("#table");
  18 +
  19 + // 初始化表格
  20 + table.bootstrapTable({
  21 + url: $.fn.bootstrapTable.defaults.extend.index_url,
  22 + pk: 'id',
  23 + sortName: 'id',
  24 + columns: [
  25 + [
  26 + {checkbox: true},
  27 + {field: 'id', title: __('Id')},
  28 +
  29 + {field: 'gtype.name', title: __('Gtype.name')},//品类名称
  30 +
  31 + {field: 'name', title: __('Name')},//商品名称
  32 + {field: 'name_en', title: __('Name_en')},//商品名称(英文)
  33 + {field: 'is_design', title: __('Is_design'),formatter: Table.api.formatter.label, searchList: {0: __('否'), 1: __('是')}},//是否设计师作品
  34 + {field: 'new_price', title: __('New_price'), operate:'BETWEEN'},//新人价格
  35 + {field: 'sale_price', title: __('Sale_price'), operate:'BETWEEN'},//销售价格
  36 + {field: 'market_price', title: __('Market_price'), operate:'BETWEEN'},//市场价格
  37 + {field: 'expense_price', title: __('Expense_price'), operate:'BETWEEN'},//运费
  38 + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  39 + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  40 + ]
  41 + ]
  42 + });
  43 +
  44 + // 为表格绑定事件
  45 + Table.api.bindevent(table);
  46 + },
  47 + recyclebin: function () {
  48 + // 初始化表格参数配置
  49 + Table.api.init({
  50 + extend: {
  51 + 'dragsort_url': ''
  52 + }
  53 + });
  54 +
  55 + var table = $("#table");
  56 +
  57 + // 初始化表格
  58 + table.bootstrapTable({
  59 + url: 'ggoods/recyclebin' + location.search,
  60 + pk: 'id',
  61 + sortName: 'id',
  62 + columns: [
  63 + [
  64 + {checkbox: true},
  65 + {field: 'id', title: __('Id')},
  66 + {field: 'name', title: __('Name'), align: 'left'},
  67 + {
  68 + field: 'deletetime',
  69 + title: __('Deletetime'),
  70 + operate: 'RANGE',
  71 + addclass: 'datetimerange',
  72 + formatter: Table.api.formatter.datetime
  73 + },
  74 + {
  75 + field: 'operate',
  76 + width: '130px',
  77 + title: __('Operate'),
  78 + table: table,
  79 + events: Table.api.events.operate,
  80 + buttons: [
  81 + {
  82 + name: 'Restore',
  83 + text: __('Restore'),
  84 + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
  85 + icon: 'fa fa-rotate-left',
  86 + url: 'ggoods/restore',
  87 + refresh: true
  88 + },
  89 + {
  90 + name: 'Destroy',
  91 + text: __('Destroy'),
  92 + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
  93 + icon: 'fa fa-times',
  94 + url: 'ggoods/destroy',
  95 + refresh: true
  96 + }
  97 + ],
  98 + formatter: Table.api.formatter.operate
  99 + }
  100 + ]
  101 + ]
  102 + });
  103 +
  104 + // 为表格绑定事件
  105 + Table.api.bindevent(table);
  106 + },
  107 + add: function () {
  108 + Controller.api.bindevent();
  109 + },
  110 + edit: function () {
  111 + Controller.api.bindevent();
  112 + },
  113 + api: {
  114 + bindevent: function () {
  115 + Form.api.bindevent($("form[role=form]"));
  116 + }
  117 + }
  118 + };
  119 + return Controller;
  120 +});
  1 +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2 +
  3 + var Controller = {
  4 + index: function () {
  5 + // 初始化表格参数配置
  6 + Table.api.init({
  7 + extend: {
  8 + index_url: 'goods/index' + location.search,
  9 + add_url: 'goods/add',
  10 + edit_url: 'goods/edit',
  11 + del_url: 'goods/del',
  12 + multi_url: 'goods/multi',
  13 + table: 'goods',
  14 + }
  15 + });
  16 +
  17 + var table = $("#table");
  18 +
  19 + // 初始化表格
  20 + table.bootstrapTable({
  21 + url: $.fn.bootstrapTable.defaults.extend.index_url,
  22 + pk: 'id',
  23 + sortName: 'id',
  24 + columns: [
  25 + [
  26 + {checkbox: true},
  27 + {field: 'id', title: __('Id')},
  28 +
  29 + {field: 'btype.name', title: __('Btype.name')},//品牌名称
  30 + {field: 'btype.address', title: __('Btype.address')},//品牌产地
  31 +
  32 + {field: 'name', title: __('Name')},//商品名称
  33 + {field: 'name_en', title: __('Name_en')},//商品名称(英文)
  34 + {field: 'is_design', title: __('Is_design'),formatter: Table.api.formatter.label, searchList: {0: __('否'), 1: __('是')}},//是否设计师作品
  35 + {field: 'new_price', title: __('New_price'), operate:'BETWEEN'},//新人价格
  36 + {field: 'sale_price', title: __('Sale_price'), operate:'BETWEEN'},//销售价格
  37 + {field: 'market_price', title: __('Market_price'), operate:'BETWEEN'},//市场价格
  38 + {field: 'expense_price', title: __('Expense_price'), operate:'BETWEEN'},//运费
  39 + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  40 + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  41 + ]
  42 + ]
  43 + });
  44 +
  45 + // 为表格绑定事件
  46 + Table.api.bindevent(table);
  47 + },
  48 + recyclebin: function () {
  49 + // 初始化表格参数配置
  50 + Table.api.init({
  51 + extend: {
  52 + 'dragsort_url': ''
  53 + }
  54 + });
  55 +
  56 + var table = $("#table");
  57 +
  58 + // 初始化表格
  59 + table.bootstrapTable({
  60 + url: 'goods/recyclebin' + location.search,
  61 + pk: 'id',
  62 + sortName: 'id',
  63 + columns: [
  64 + [
  65 + {checkbox: true},
  66 + {field: 'id', title: __('Id')},
  67 + {field: 'name', title: __('Name'), align: 'left'},
  68 + {
  69 + field: 'deletetime',
  70 + title: __('Deletetime'),
  71 + operate: 'RANGE',
  72 + addclass: 'datetimerange',
  73 + formatter: Table.api.formatter.datetime
  74 + },
  75 + {
  76 + field: 'operate',
  77 + width: '130px',
  78 + title: __('Operate'),
  79 + table: table,
  80 + events: Table.api.events.operate,
  81 + buttons: [
  82 + {
  83 + name: 'Restore',
  84 + text: __('Restore'),
  85 + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
  86 + icon: 'fa fa-rotate-left',
  87 + url: 'goods/restore',
  88 + refresh: true
  89 + },
  90 + {
  91 + name: 'Destroy',
  92 + text: __('Destroy'),
  93 + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
  94 + icon: 'fa fa-times',
  95 + url: 'goods/destroy',
  96 + refresh: true
  97 + }
  98 + ],
  99 + formatter: Table.api.formatter.operate
  100 + }
  101 + ]
  102 + ]
  103 + });
  104 +
  105 + // 为表格绑定事件
  106 + Table.api.bindevent(table);
  107 + },
  108 + add: function () {
  109 + Controller.api.bindevent();
  110 + },
  111 + edit: function () {
  112 + Controller.api.bindevent();
  113 + },
  114 + api: {
  115 + bindevent: function () {
  116 + Form.api.bindevent($("form[role=form]"));
  117 + }
  118 + }
  119 + };
  120 + return Controller;
  121 +});
  1 +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2 +
  3 + var Controller = {
  4 + index: function () {
  5 + // 初始化表格参数配置
  6 + Table.api.init({
  7 + extend: {
  8 + index_url: 'gtype/index' + location.search,
  9 + add_url: 'gtype/add',
  10 + edit_url: 'gtype/edit',
  11 + del_url: 'gtype/del',
  12 + multi_url: 'gtype/multi',
  13 + table: 'gtype',
  14 + }
  15 + });
  16 +
  17 + var table = $("#table");
  18 +
  19 + // 初始化表格
  20 + table.bootstrapTable({
  21 + url: $.fn.bootstrapTable.defaults.extend.index_url,
  22 + pk: 'id',
  23 + sortName: 'id',
  24 + columns: [
  25 + [
  26 + {checkbox: true},
  27 + {field: 'id', title: __('Id')},
  28 + {field: 'name', title: __('Name')},
  29 + {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image},
  30 + // {field: 'images', title: __('Images'), events: Table.api.events.image, formatter: Table.api.formatter.images},
  31 + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  32 + // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
  33 + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  34 + ]
  35 + ]
  36 + });
  37 +
  38 + // 为表格绑定事件
  39 + Table.api.bindevent(table);
  40 + },
  41 + add: function () {
  42 + Controller.api.bindevent();
  43 + },
  44 + edit: function () {
  45 + Controller.api.bindevent();
  46 + },
  47 + api: {
  48 + bindevent: function () {
  49 + Form.api.bindevent($("form[role=form]"));
  50 + }
  51 + }
  52 + };
  53 + return Controller;
  54 +});