AddOrUpdate.html
15.5 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<div id="basicForm" role="<%type%>" data-action="<%action%>" class="form-horizontal form-bordered">
</div>
</div>
</div>
</div>
<script type="text/template" id="template5">
<div class="row" id="brandForm">
<div class="form-group">
[[each Brands as brand index]]
<a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
[[/each]]
<input type="text" class="form-control" placeholder="搜索" id="brandsearch"/>
</div>
<div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
[[each Brands as brand index]]
<div class="form-group" name="[[brand.name]]">
[[each brand.items as item __index ]]
<a class="btn">
<input type="checkbox" value="[[item.id]]" data-name="[[item.brand_name]]" name="brandCheckBox">
<label>[[item.brand_name]]</label>
</a>
[[/each]]
</div>
[[/each]]
<div class="form-group" id="brandsearchwrap" name="brandsearch">
</div>
</div>
<input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
</div>
</script>
<script type="text/template" id="couponListAdd-template">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">类型 <span class="red">*</span></label>
<div class="col-sm-8" >
<select id="filter-couponType" tabindex="-1" class="select2-offscreen brandBtn-group observe"
value="[[couponType]]" data-field="couponType" required [[if status==1]] disabled [[/if]]>
<option value="-1">优惠券类型</option>
<option value="1">A券</option>
<option value="2">B券</option>
<option value="3">公开券</option>
<option value="4">生日券</option>
</select>
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">基本信息</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">名称 <span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" placeholder="名称建议30字以内" prompt="名称" class="form-control observe"
data-field="couponName" required maxlength="30" value="[[couponName]]">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">数量<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" placeholder="数量" prompt="数量" class="form-control observe number"
data-field="couponNum"
required value="[[couponNum]]" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">使用次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" placeholder="使用次数" class="form-control observe number" data-field="useNum"
required value="[[useNum]]">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申请部门<i class="red">*</i></label>
<div class="col-sm-8" id="departments">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">领取开始时间</label>
<div class="col-sm-6">
<div class="col-sm-4">
<input type="text" class="form-control observe" data-field="limitStartTime" id="limitStartTime"
placeholder="领取开始时间" value="[[limitStartTime]]" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>
<div class="col-sm-6">
<div class="col-sm-4">
<input type="text" class="form-control observe" data-field="startTime" id="startTime"
placeholder="开始时间" value="[[startTime]]" readonly required>
</div>
<div class="col-sm-1">
<label class="control-label">到</label>
</div>
<div class="col-sm-4">
<input type="text" class="form-control observe" data-field="endTime" id="endTime"
placeholder="结束时间" value="[[endTime]]" readonly required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">优惠券说明</label>
<div class="col-sm-8">
<textarea class="form-control observe" prompt="优惠券说明" data-field="explains" maxlength="100"
placeholder="优惠券使用条件简介" style="resize: none">[[explains]]</textarea>
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">优惠条件<i class="red">*</i></label> 
<select value="[[useLimitType]]" id="useLimitType" class="form-control input-form observe"
data-field="useLimitType">
<option value="0">无限制</option>
<option value="1">件数</option>
<option value="2">金额</option>
</select>  
[[if useLimitType=='2']]
<label class="control-label">金额满</label>
<input value="[[useLimit]]" id="useLimit" class="form-control input-form observe number"
data-field="useLimit">
[[/if]]
[[if useLimitType=='1']]
<label class="control-label">件数满</label>
<input value="[[useLimit]]" class="form-control input-form observe number" data-field="useLimit">
[[/if]]
</div>
<div class="form-group">
<label class="col-sm-2 control-label">优惠结果<i class="red">*</i></label>
<div class="col-sm-4">
<label class="col-sm-2 control-label">面额</label>
<div class="col-sm-4">
<input type="text" match="numbers" class="form-control observe " data-field="couponAmount"
value="[[couponAmount]]" required placeholder="面额" [[if status==1]] disabled [[/if]]>
</div>
<label class="col-sm-2 control-label">元 倍数</label>
<div class="col-sm-4">
<input type="text" match="numbers" class="form-control observe " data-field="multipleNum"
value="[[multipleNum]]" required placeholder="倍数" [[if status==1]] disabled [[/if]]>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">适用范围</label>
<div class="col-sm-4">
<div class="col-sm-10">
<select id="useRange" class="form-control input-form" value="[[useRange]]">
<option value="0">分类</option>
<option value="1">品牌</option>
</select>  
[[if useRange==1]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="addBrands">添加品牌</a>
[[else]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="addSorts">添加分类</a>
[[/if]]
</div>
</div>
</div>
[[if brandList]]
<div class="form-group">
<label class="col-sm-2 control-label">品牌限制</label>
<div class="col-sm-8">
<p class="form-control" style="border: 0px">[[brandList]]</p>
</div>
</div>
[[/if]]
[[if sortsList]]
<div class="form-group">
<label class="col-sm-2 control-label">分类限制</label>
<div class="col-sm-8">
<p class="form-control" style="border: 0px">[[sortsList]]</p>
</div>
</div>
[[/if]]
<div class="form-group">
<label class="col-sm-2 control-label">SKN除外</label>
<div class="col-sm-4">
<textarea class="form-control observe" prompt="SKN除外" data-field="sknExclude"
placeholder="skn用换行或英文逗号分隔" style="resize: none" [[if status==1]] disabled [[/if]]>[[sknExclude]]</textarea>
</div>
</div>
</div>
</div>
<div>
</div>
<div class="panel-heading">
<h4 class="panel-title">领券条件</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">会员身份</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="customType" class="custom-1"> 新客户 (注册未购买)
</label>
<label class="checkbox-inline">
<input type="checkbox" value="5" name="customType" class="custom-5"> 普通会员 (不包含新客户)
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="customType" class="custom-2"> 银卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="customType" class="custom-3"> 金卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="4" name="customType" class="custom-4"> 白金会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="9" name="customType" class="custom-9"> 学生
</label>
</div>
<input type="hidden" value="[[customType]]" id="customType" for="checkbox"
placeholder="会员身份">
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">互斥配置</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="shopPriceLimits" class="pricelimit-1"> 成交价低于吊牌价三折
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="shopPriceLimits" class="pricelimit-2"> 限量商品
</label>
</div>
<input type="hidden" value="[[shopPriceLimits]]" id="shopPriceLimits" for="checkbox"
placeholder="券限制条件">
</div>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-sm-4 col-sm-offset-4">
<button id="save_brand" type="button" class="btn btn-primary">提交</button>
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
</div>
</div>
</div>
</div>
</script>
<script type="text/template" id="editTemp">
<div class="panel">
<div class="panel-body nopadding">
<form id="basicForm1" role="form" class="form-horizontal form-bordered">
<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>
</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="department">
<select id="filter-department" required placeholder="申请部门" tabindex="-1" class="select2-offscreen brandBtn-group observe" value="[[department]]" data-field="department" >
[[each data as item index]]
<option value="[[item.department]]" [[if item.department==department]] selected [[/if]]>[[item.departmentName]]</option>
[[/each]]
</select>
</script>
<%include '../../common/__ui/footer'%>