Showing
4 changed files
with
57 additions
and
2 deletions
@@ -44,7 +44,10 @@ module.exports = { | @@ -44,7 +44,10 @@ module.exports = { | ||
44 | couponAmount: {type: Number}, | 44 | couponAmount: {type: Number}, |
45 | brandLimit: {type: String}, | 45 | brandLimit: {type: String}, |
46 | sortLimit: {type: String}, | 46 | sortLimit: {type: String}, |
47 | - customType: {type: String} | 47 | + customType: {type: String}, |
48 | + multipleNum: {type: Number}, | ||
49 | + shopPriceLimits: {type: String}, | ||
50 | + sknExclude: {type: String} | ||
48 | } | 51 | } |
49 | }, | 52 | }, |
50 | reject: { | 53 | reject: { |
@@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
313 | <input type="checkbox" value="4" name="customType" class="custom-4"> 白金会员 | 313 | <input type="checkbox" value="4" name="customType" class="custom-4"> 白金会员 |
314 | </label> | 314 | </label> |
315 | <label class="checkbox-inline"> | 315 | <label class="checkbox-inline"> |
316 | - <input type="checkbox" value="9" name="customType" class="custom-4"> 学生 | 316 | + <input type="checkbox" value="9" name="customType" class="custom-9"> 学生 |
317 | </label> | 317 | </label> |
318 | </div> | 318 | </div> |
319 | 319 | ||
@@ -322,6 +322,28 @@ | @@ -322,6 +322,28 @@ | ||
322 | </div> | 322 | </div> |
323 | </div> | 323 | </div> |
324 | </div> | 324 | </div> |
325 | + <div class="panel-heading"> | ||
326 | + <h4 class="panel-title">互斥配置</h4> | ||
327 | + </div> | ||
328 | + <div class="panel-body"> | ||
329 | + <div class="row"> | ||
330 | + <div class="form-group"> | ||
331 | + | ||
332 | + <div class="col-sm-10"> | ||
333 | + <label class="checkbox-inline"> | ||
334 | + <input type="checkbox" value="1" name="shopPriceLimits" class="pricelimit-1"> 成交价低于吊牌价三折 | ||
335 | + </label> | ||
336 | + <label class="checkbox-inline"> | ||
337 | + <input type="checkbox" value="2" name="shopPriceLimits" class="pricelimit-2"> 限量商品 | ||
338 | + </label> | ||
339 | + </div> | ||
340 | + | ||
341 | + <input type="hidden" value="[[shopPriceLimits]]" id="shopPriceLimits" for="checkbox" | ||
342 | + placeholder="券限制条件"> | ||
343 | + </div> | ||
344 | + </div> | ||
345 | + </div> | ||
346 | + | ||
325 | <div class="panel-footer"> | 347 | <div class="panel-footer"> |
326 | <div class="row"> | 348 | <div class="row"> |
327 | <div class="col-sm-4 col-sm-offset-4"> | 349 | <div class="col-sm-4 col-sm-offset-4"> |
@@ -12,6 +12,7 @@ var type = $("#basicForm").attr("role"),//类型 新增或修改 | @@ -12,6 +12,7 @@ var type = $("#basicForm").attr("role"),//类型 新增或修改 | ||
12 | var startTimeObj; | 12 | var startTimeObj; |
13 | var endTimeObj; | 13 | var endTimeObj; |
14 | var customType = []; | 14 | var customType = []; |
15 | +var shopPriceLimits=[]; | ||
15 | 16 | ||
16 | /** | 17 | /** |
17 | * 监听输入值的变化 | 18 | * 监听输入值的变化 |
@@ -93,6 +94,16 @@ var Bll = { | @@ -93,6 +94,16 @@ var Bll = { | ||
93 | } | 94 | } |
94 | } | 95 | } |
95 | } | 96 | } |
97 | + if (type == 'update') { | ||
98 | + if (couponBean.shopPriceLimits) { | ||
99 | + shopPriceLimits = couponBean.shopPriceLimits.split(','); | ||
100 | + for (var i = 0; i < shopPriceLimits.length; i++) { | ||
101 | + var custom = "pricelimit-" + shopPriceLimits[i]; | ||
102 | + $("input ." + custom).attr("checked", "checked"); | ||
103 | + } | ||
104 | + } | ||
105 | + } | ||
106 | + | ||
96 | }, | 107 | }, |
97 | //modified by jie.pang@yoho.cn:20160812 去掉隐藏的功能 | 108 | //modified by jie.pang@yoho.cn:20160812 去掉隐藏的功能 |
98 | checkSortNum: function () { | 109 | checkSortNum: function () { |
@@ -205,6 +216,22 @@ $(document).on("click", "input[name='customType']", function () { | @@ -205,6 +216,22 @@ $(document).on("click", "input[name='customType']", function () { | ||
205 | couponBean.customType = customType.join(","); | 216 | couponBean.customType = customType.join(","); |
206 | }); | 217 | }); |
207 | 218 | ||
219 | +/** | ||
220 | + * 用券限制 | ||
221 | + */ | ||
222 | +$(document).on("click", "input[name='shopPriceLimits']", function () { | ||
223 | + if ($(this).is(':checked')) { | ||
224 | + shopPriceLimits.push($(this).val()); | ||
225 | + } else { | ||
226 | + for (var i = 0; i < shopPriceLimits.length; i++) { | ||
227 | + if ($(this).val() == shopPriceLimits[i]) { | ||
228 | + shopPriceLimits.splice(i, 1) | ||
229 | + } | ||
230 | + } | ||
231 | + } | ||
232 | + couponBean.shopPriceLimits = shopPriceLimits.join(","); | ||
233 | +}); | ||
234 | + | ||
208 | //输入限制 | 235 | //输入限制 |
209 | $(document).on("keyup", ".number", function () { | 236 | $(document).on("keyup", ".number", function () { |
210 | $(this).val($(this).val().replace(/\D/g, '')); | 237 | $(this).val($(this).val().replace(/\D/g, '')); |
-
mentioned in commit 177941f9
-
Please register or login to post a comment