Index.html
10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<%include '../../common/__ui/header'%>
<%include '../../common/__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>