|
|
<%include '../../../common/views/__ui/header'%>
|
|
|
<%include '../../../common/views/__partail/ListHeader'%>
|
|
|
|
|
|
<div class="contentpanel">
|
|
|
|
|
|
<div class="panel panel-default" style="margin:10px 0; display: none">
|
|
|
<div class="panel-body nopadding">
|
|
|
<div class="state-select">
|
|
|
<strong>状态:</strong>
|
|
|
<label><input type="radio" name="state" value="">全部</label>
|
|
|
<label class="current"><input type="radio" name="state" value="1">开启</label>
|
|
|
<label><input type="radio" name="state" value="0">关闭</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<a href="javascript:;" id="add-root-category" class="btn btn-success" style="margin:10px 0;"><i class="fa fa-plus"></i> 添加根分类</a>
|
|
|
|
|
|
<div class="panel">
|
|
|
<div class="panel-body nopadding">
|
|
|
|
|
|
<div class="sale-category-table dataTables_wrapper no-footer" id="basicTable"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<input type="hidden" id="gridurl" value="<%gridurl%>">
|
|
|
|
|
|
<script type="text/template" id="editTemp">
|
|
|
<div class="panel">
|
|
|
<div class="panel-body nopadding">
|
|
|
<form id="basicForm" role="form" action="[[action]]" class="form-horizontal form-bordered">
|
|
|
<div class="form-group" style="padding-top: 0">
|
|
|
<label class="col-sm-2 control-label">父分类:</label>
|
|
|
<div class="col-sm-8 height40">[[parentName]]</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label class="col-sm-2 control-label">分类名称:</label>
|
|
|
<div class="col-sm-8">
|
|
|
<div class="form-inline">
|
|
|
<input type="text" id="categoryName" name="categoryName" class="form-control" placeholder="分类名称" value="[[categoryName]]" style="width: 450px">
|
|
|
<label style="color: #ff0000; line-height: 40px; margin-left: 15px"> * 必填</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label class="col-sm-2 control-label">分类图标:</label>
|
|
|
<div class="col-sm-8"><input type="file" id="icon" name="icon" value="[[icon]]" placeholder="分别图标"></div>
|
|
|
</div>
|
|
|
<div class="form-group" style="margin-bottom: 40px">
|
|
|
<label class="col-sm-2 control-label">物理类目关联:</label>
|
|
|
<div class="col-sm-8 sort-wrap">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-10">
|
|
|
<div class="sortTree"></div>
|
|
|
</div>
|
|
|
<div class="col-sm-2 height40">
|
|
|
<a class="btn btn-danger btn-xs del-sort-btn" href="javascript:;">-</a>
|
|
|
<a class="btn btn-info btn-xs add-sort-btn" href="javascript:;">+</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<input id="categoryId" type="hidden" value="[[categoryId]]">
|
|
|
<input id="parentId" type="hidden" value="[[parentId]]">
|
|
|
<input id="orderBy" type="hidden" value="[[orderBy]]">
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</script>
|
|
|
|
|
|
<script type="text/template" id="sortWrap">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-10">
|
|
|
<div class="sortTree"></div>
|
|
|
</div>
|
|
|
<div class="col-sm-2 height40">
|
|
|
<a class="btn btn-danger btn-xs del-sort-btn" href="javascript:;">-</a>
|
|
|
<a class="btn btn-info btn-xs add-sort-btn" href="javascript:;">+</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</script>
|
|
|
|
|
|
<script type="text/template" id="tableHdTemp">
|
|
|
<div class="level-hd clearfix">
|
|
|
<span class="folder"></span>
|
|
|
<span style="width: 5%">ID</span>
|
|
|
<span style="width: 20%">品类名称</span>
|
|
|
<span>所属分类</span>
|
|
|
<span>分类图标</span>
|
|
|
<span class="orderby">排序</span>
|
|
|
<span class="status">状态</span>
|
|
|
<span class="operate">操作</span>
|
|
|
</div>
|
|
|
</script>
|
|
|
<script type="text/template" id="tableTemp">
|
|
|
|
|
|
<div class="level-1-wrap">
|
|
|
<div class="level-wrap clearfix">
|
|
|
<span class="folder"></span>
|
|
|
<span>[[categoryId]]</span>
|
|
|
<span>[[categoryName]]</span>
|
|
|
<span>一级分类</span>
|
|
|
<span><img src="[[icon]]" alt=""></span>
|
|
|
<span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
|
|
|
<span class="status">
|
|
|
[[if state=="1"]]
|
|
|
开启
|
|
|
[[/if]]
|
|
|
[[if state=="0"]]
|
|
|
关闭
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
<span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]">
|
|
|
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
|
|
|
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>
|
|
|
<a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
|
|
|
[[if state=="1"]]
|
|
|
<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
|
|
|
[[/if]]
|
|
|
[[if state=="0"]]
|
|
|
<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
[[if items]]
|
|
|
<div class="level-2-wrap">
|
|
|
[[each items as a index]]
|
|
|
<div class="level-wrap clearfix">
|
|
|
<span class="folder"></span>
|
|
|
<span>[[a.categoryId]]</span>
|
|
|
<span>[[a.categoryName]]</span>
|
|
|
<span>二级分类</span>
|
|
|
<span><img src="[[a.icon]]" alt=""></span>
|
|
|
<span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[a.orderBy]]" categoryId="[[a.categoryId]]" /></span>
|
|
|
<span class="status">
|
|
|
[[if a.state=="1"]]
|
|
|
开启
|
|
|
[[/if]]
|
|
|
[[if a.state=="0"]]
|
|
|
关闭
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
<span class="operate" data-id="[[a.categoryId]]" data-name="[[a.categoryName]]">
|
|
|
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
|
|
|
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[a.categoryId]]">标签管理</a>
|
|
|
<a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
|
|
|
[[if a.state=="1"]]
|
|
|
<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
|
|
|
[[/if]]
|
|
|
[[if a.state=="0"]]
|
|
|
<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
[[if a.items]]
|
|
|
<div class="level-3-wrap">
|
|
|
[[each a.items as b index]]
|
|
|
<div class="level-wrap clearfix">
|
|
|
<span class="folder"></span>
|
|
|
<span>[[b.categoryId]]</span>
|
|
|
<span>[[b.categoryName]]</span>
|
|
|
<span>三级分类</span>
|
|
|
<span><img src="[[b.icon]]" alt=""></span>
|
|
|
<span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[b.orderBy]]" categoryId="[[b.categoryId]]" /></span>
|
|
|
<span class="status">
|
|
|
[[if b.state=="1"]]
|
|
|
开启
|
|
|
[[/if]]
|
|
|
[[if b.state=="0"]]
|
|
|
关闭
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
<span class="operate" data-id="[[b.categoryId]]" data-name="[[b.categoryName]]">
|
|
|
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
|
|
|
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[b.categoryId]]">标签管理</a>
|
|
|
<a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
|
|
|
[[if b.state=="1"]]
|
|
|
<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
|
|
|
[[/if]]
|
|
|
[[if b.state=="0"]]
|
|
|
<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>
|
|
|
[[/if]]
|
|
|
</span>
|
|
|
</div>
|
|
|
[[/each]]
|
|
|
</div>
|
|
|
[[/if]]
|
|
|
</div>
|
|
|
|
|
|
[[/each]]
|
|
|
</div>
|
|
|
[[/if]]
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</script>
|
|
|
|
|
|
<script type="text/template" id="tableTemp2">
|
|
|
<span class="folder"></span>
|
|
|
<span style="width: 5%">[[categoryId]]</span>
|
|
|
<span style="width: 20%">[[categoryName]]</span>
|
|
|
<span>[[levelNumber]]级分类</span>
|
|
|
<span><img src="[[icon]]" alt=""></span>
|
|
|
<span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
|
|
|
<span class="status">[[if state=="1"]]<b style="color: #449d44">开启</b>[[/if]][[if state=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
|
|
|
<span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]">
|
|
|
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
|
|
|
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>
|
|
|
<a class="btn btn-primary btn-xs add-sub-category" href="javascript:;">添加子分类</a>
|
|
|
<b class="openAndClose" data-id="[[categoryId]]" data-name="[[categoryName]]">
|
|
|
[[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]]
|
|
|
[[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]]
|
|
|
</b>
|
|
|
</span>
|
|
|
</script> |
...
|
...
|
|