condition.html
12.9 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
<div class="row">
<div class="form-group" id="condition_combine">
<form id="form_condition_combine">
<label class="col-sm-1"> 如果下面</label>
<div class="col-sm-14">
<input type="hidden" name="type" value="condition_combine">
<div class="col-sm-2">
<select name="aggregator" id="aggregator" title="" class="form-control" value="">
<option selected="selected" value="all">全部</option>
<option value="any">任意</option>
</select>
</div>
<label class="col-sm-1 ">条件为</label>
<input type="hidden" name="operator" value="=="/>
<div class="col-sm-2">
<select class="form-control" name="value" value="">
<option value='true'>是</option>
<!--
<option value='false'>否</option>
-->
</select>
</div>
</div>
</form>
</div>
<div class="form-group" id="rule_condition_0_1">
<label class="col-sm-1 control-label"><u>第1级操作</u></label>
<div class="col-sm-14">
<button class="btn btn-primary" onclick="PromotionEditor.loadTypeSel('condition_combine', 0, 1);">新增</button>
</div>
</div>
</div>
<input type="hidden" id="id" value="[[id]]">
<div class="panel-footer">
<button class="btn btn-primary" id="save_condition">保存</button>
</div>
<script type="text/template" id="fm_condition_operator_add">
<label class="col-sm-1 control-label">第1级操作</label>
<div class="col-sm-14">
<button class="btn btn-primary" id="createLevel1">新增</button>
</div>
</script>
<script type="text/template" id="fm_condition_type">
<div class="col-sm-4 col-sm-offset-3">
<select class="form-control" onchange="PromotionEditor.loadOneCondition(this, [[pnodeindex]], [[curnodeIndex]]);" id="condition_type_[[pnodeindex]]_[[curnodeIndex]]">
<option value="">请选择一种条件</option>
[[each typeList as item __index]]
<option value="[[item.name]]">[[item.caption]]</option>
[[/each]]
</select>
</div>
</script>
<script type="text/template" id="fm_condition_payment">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[curnodeIndex]]</u></label>
<div class="col-sm-14">
<input type="hidden" name="type" value="condition_payment"/>
<label class="col-sm-1 ">支付方式</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="">
<option value="==">等于</option>
<option value="!=">不等于</option>
</select>
</div>
<div class="col-sm-1">
<select class="form-control" name="value" value="">
<option value="cash_online">在线支付</option>
<option value="cash_ondelivery ">货到付款</option>
</select>
</div>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[ nodeIndex ]],[[curnodeIndex]]);">
删除</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_product">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[curnodeIndex]]</u></label>
<div class="col-sm-14">
<input type="hidden" name="type" value="condition_product">
<label class="col-sm-2 ">如果购物车中符合下面</label>
<div class="col-sm-1">
<select class="form-control" name="aggregator" value="[[aggregator]]">
<option value="all">全部</option>
<option value="any">任意</option>
</select>
</div>
<label class="col-sm-1 ">条件的商品的</label>
<div class="col-sm-1">
<select class="form-control" name="operatobj" value="[[operatobj]]">
<option value="num">个数</option>
<option value="amount">金额</option>
</select>
</div>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value=">" >大于</option>
<option value=">=">大于等于</option>
<!--
<option value="<">小于</option>
-->
<option value="<=">小于等于</option>
</select>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" name="value" value='[[ value ]]'/>
</div>
<span class="col-sm-2">
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0);" onclick="PromotionEditor.delCondition([[ nodeIndex ]],[[curnodeIndex]]);">
删除
</a>
</span>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_product_sort">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[nodeIndex]].[[curnodeIndex]]</u></label>
<div class="col-sm-14 col-sm-offset-2">
<input type="hidden" name="type" value="condition_product_sort">
<label class="col-sm-1 ">产品分类</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value="==">等于</option>
<option value="!=">不等于</option>
</select>
</div>
<div id="sortTree_[[nodeIndex]]_[[curnodeIndex]]" class="col-sm-4 height40" style="border: 0px; padding: 0px;float:left"></div>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[nodeIndex]],[[ curnodeIndex ]]);">
删除</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_product_brand">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[nodeIndex]].[[curnodeIndex]]</u></label>
<div class="col-sm-14 col-sm-offset-2">
<input type="hidden" name="type" value="condition_product_brand">
<label class="col-sm-1 ">品牌</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value="==">等于</option><option value="!=">不等于</option>
</select>
</div>
<select class="col-sm-4" name="value" id="brands_[[nodeIndex]]_[[curnodeIndex]]" value="[[value]]">
[[if brandList]]
[[each brandList as brand __index]]
<option value="[[ brand.id]]">[[ brand.text]]</option>
[[/each]]
[[/if]]
</select>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[nodeIndex]],[[ curnodeIndex ]]);">
删除
</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_product_shop">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[nodeIndex]].[[curnodeIndex]]</u></label>
<div class="col-sm-14 col-sm-offset-2">
<input type="hidden" name="type" value="condition_product_shop">
<label class="col-sm-1 ">店铺</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value="==">等于</option><option value="!=">不等于</option>
</select>
</div>
<select class="col-sm-4" name="value" id="shops_[[nodeIndex]]_[[curnodeIndex]]" value="[[value]]">
[[if shopList]]
[[each shopList as shop __index]]
<option value="[[ shop.id]]">[[ shop.text]]</option>
[[/each]]
[[/if]]
</select>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[nodeIndex]],[[ curnodeIndex ]]);">
删除
</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_promotion_flag">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[nodeIndex]].[[curnodeIndex]]</u></label>
<div class="col-sm-14 col-sm-offset-2">
<input type="hidden" name="type" value="condition_promotion_flag">
<label class="col-sm-1 ">促销标记</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value="==">等于</option><option value="!=">不等于</option>
</select>
</div>
<div class="col-sm-4">
<select class="form-control" name="value" value="[[value]]" id="promotions_[[nodeIndex]]_[[curnodeIndex]]">
[[if promotionFlagList]]
[[each promotionFlagList as flag __index]]
<option value="[[ flag.flagValue]]">[[flag.title]]</option>
[[/each]]
[[/if]]
</select>
</div>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[nodeIndex]],[[ curnodeIndex ]]);">
删除
</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_condition_special_product">
<div class="form-group" id="rule_condition_[[nodeIndex]]_[[curnodeIndex]]" pnodeIndex="[[nodeIndex]]" nodeIndex="[[curnodeIndex]]">
<form id="form_[[nodeIndex]]_[[curnodeIndex]]">
<label class="col-sm-1 control-label"><u>NO.[[nodeIndex]].[[curnodeIndex]]</u></label>
<div class="col-sm-14 col-sm-offset-2">
<input type="hidden" name="type" value="condition_special_product">
<label class="col-sm-1 ">特定商品</label>
<div class="col-sm-1">
<select class="form-control" name="operator" value="[[operator]]">
<option value="!()">不属于</option><option value="()">属于</option><option value="==">等于</option>
<option value="!=">不等于</option>
</select>
</div>
<textarea rows="" cols="" style="width: 320px; height: 70px;" name="value"></textarea>
<a title="Remove" class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="PromotionEditor.delCondition([[nodeIndex]],[[ curnodeIndex ]]);">
删除
</a>
</div>
</form>
</div>
</script>
<script type="text/template" id="fm_add_level_1">
<div class="form-group" id="rule_condition_0_[[nextIndex]]">
<label class="col-sm-1 control-label"><u>第1级操作</u></label>
<div class="col-sm-14 col-sm-offset-4">
<button class="btn btn-primary" onclick="PromotionEditor.loadTypeSel('condition_combine', 0, [[nextIndex]]);">新增第一级</button>
</div>
</div>
</script>