AddOrUpdate.html
24.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
<%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">平台券</option>
<option value="3">券码</option>
<option value="4">生日券</option>
<option value="5">免邮券</option>
<option value="6">店铺券</option>
<option value="7">分享券</option>
</select>
[[if couponType=='5']]
<label class="checkbox-inline">
<input type="checkbox" value="2" name="isNew" class="custom-1" [[if status==1]] disabled [[/if]] > 前台展示(用于金卡/白金卡用户免邮券前台展示标识)
<input type="hidden" value="[[isNew]]" id="isNew" for="checkbox"
placeholder="前台展示">
[[/if]]
</div>
</div>
</div>
[[if couponType==3]]
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-8" >
<input type="checkbox" value="1" name="isUseLimitRule" class="custom-1" [[if isUseLimitRule=='N']]checked[[/if]]> 市场通用
</div>
</div>
</div>
</div>
[[/if]]
<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">
[[if couponType==6]]
<label class="col-sm-2 control-label">适用范围<i class="red">*</i></label>
[[else]]
<label class="col-sm-2 control-label">适用范围</label>
[[/if]]
<div class="col-sm-4">
<div class="col-sm-10">
<select id="useRange" class="form-control input-form" value="[[useRange]]">
<option value="">请选择</option>
[[if couponType!=6]]
<option value="0">分类</option>
[[/if]]
<option value="2">店铺</option>
[[if couponType > 0]]
<option value="3">商品</option>
[[/if]]
</select>  
[[if useRange==1]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="addBrands">添加品牌</a>
[[/if]]
[[if useRange==3]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="importPrds" [[if status==1]] disabled [[/if]]>导入商品</a>
[[/if]]
[[if useRange==2]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="addShop">添加店铺</a>
[[/if]]
[[if useRange==0&&couponType!=6]]
<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]]
[[if shopList]]
<div class="form-group">
<label class="col-sm-2 control-label">店铺限制</label>
<div class="col-sm-8">
<p class="form-control" style="border: 0px">[[shopList]]</p>
</div>
</div>
[[/if ]]
[[if couponType !=1 && couponType!=3 && useRange!=3 ]]
<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>
[[/if]]
[[if useRange==3]]
<div class="form-group">
<label class="col-sm-2 control-label">指定商品</label>
<div class="col-sm-4">
<textarea name="productLimit" class="form-control observe" prompt="指定商品" data-field="productLimit"
placeholder="skn用英文逗号分隔" style="resize: none" [[if status==1]] disabled [[/if]]>[[productLimit]]</textarea>
[[if status==2]]
<a class="btn btn-primary btn-xs" style="margin:10px 0px 0px 200px;" href="javascript:;" id="cleanPrdLimit" [[if !productLimit]] disabled [[/if]]>清除所有</a>
[[/if]]
</div>
</div>
[[/if]]
</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="radio-inline">
[[if status==1&&feeSharingType==0]]
<input type="radio" name="feeSharingType" value="1" disabled>我司承担</label>
[[else]]
<input type="radio" name="feeSharingType" value="1" [[if couponType==1||couponType==3||couponType==4||couponType==5||couponType==7]]checked [[else if couponType==6]]disabled[[/if]] [[if status==1]]disabled[[/if]]>我司承担</label>
[[/if]]
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="2" [[if couponType==4||couponType==5||couponType==7||status==1]]disabled[[else if couponType==6]]checked[[/if]]>供应商承担</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="3" [[if couponType==4||couponType==5||couponType==6||couponType==7||status==1]] disabled [[/if]]>分摊(合同结算)</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="4" [[if couponType==4||couponType==5||couponType==6||couponType==7||status==1]] disabled [[/if]]>分摊-我司承担比例 </label>
<input type="hidden" value="[[feeSharingType]]" id="feeSharingType" for="radio"
placeholder="费用分摊">
<select id="feeSharingRatio" name="feeSharingRatio" value="[[feeSharingRatio]]" data-field="feeSharingRatio" class="select-inline" [[if couponType==4||couponType==5||couponType==6||couponType==7||status==1]] disabled [[/if]]>
<option value="0.1" selected="selected">0.1</option>
<option value="0.2">0.2</option>
<option value="0.3">0.3</option>
<option value="0.4">0.4</option>
<option value="0.5">0.5</option>
<option value="0.6">0.6</option>
<option value="0.7">0.7</option>
<option value="0.8">0.8</option>
<option value="0.9">0.9</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">会员身份</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="editShop">
<div class="panel">
<div class="panel-body nopadding">
<form 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 shop-wrap">
<div class="row">
<div class="col-sm-10">
<select name="shop" class="shop" style="width: 280px;" tabindex="-1" title="" class="form-control">
<option value="-1">选择店铺</option>
</select>
</div>
<div class="col-sm-2 height40">
<a class="btn btn-danger btn-xs del-shop-btn" href="javascript:;">-</a>
<a class="btn btn-info btn-xs add-shop-btn" href="javascript:;">+</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</script>
<script type="text/template" id="shopWrap">
<div class="row">
<div class="col-sm-10">
<select name="shop" class="shop" value="[[shopId]]" style="width: 280px;" tabindex="-1" title="" class="form-control">
<option value="[[shopId||-1]]">[[shopName||"选择店铺"]]</option>
</select>
</div>
<div class="col-sm-2 height40">
<a class="btn btn-danger btn-xs del-shop-btn" href="javascript:;">-</a>
<a class="btn btn-info btn-xs add-shop-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>
<script type="text/template" id="template_import_prds">
<div class="form-group">
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">商品</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="[[impoprtKey]]" name="file" data-type="" type="file" style="border:1px solid red; cursor: pointer; height: 37px; top: 8px;">
</td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">SKN</span><br>
3、<a href="[[dlFile]]">下载样例</a>
</td>
</tr>
</table>
</div>
<div class="panel-body red" id="message">
</div>
</div>
</div>
</div>
</script>
<%include '../../common/__ui/footer'%>