Authored by shuaiguo

feat(优惠券): 免邮券增加与无金额门槛券互斥配置

@@ -67,6 +67,7 @@ module.exports = { @@ -67,6 +67,7 @@ module.exports = {
67 channel: {type: String}, 67 channel: {type: String},
68 showScope : {type: String}, 68 showScope : {type: String},
69 checkRequired: {type: Number}, 69 checkRequired: {type: Number},
  70 + mutexLimit: {type: String}
70 } 71 }
71 }, 72 },
72 reject: { 73 reject: {
@@ -58,9 +58,11 @@ @@ -58,9 +58,11 @@
58 </select> 58 </select>
59 [[if couponType=='5']] 59 [[if couponType=='5']]
60 <label class="checkbox-inline"> 60 <label class="checkbox-inline">
61 - <input type="checkbox" value="2" name="isNew" class="custom-1" [[if status==1]] disabled [[/if]] > 前台展示(用于金卡/白金卡用户免邮券前台展示标识)  
62 - <input type="hidden" value="[[isNew]]" id="isNew" for="checkbox"  
63 - placeholder="前台展示"> 61 + <input type="checkbox" value="2" name="isNew" class="custom-1" [[if status==1]] disabled [[/if]] /> 前台展示(用于金卡/白金卡用户免邮券前台展示标识)
  62 + <input type="hidden" value="[[isNew]]" id="isNew" for="checkbox" placeholder="前台展示"/></label>
  63 + <label>
  64 + <input type="checkbox" value="Cash" name="mutexLimit" class="custom-1" [[if status==1]] disabled [[/if]] /> 与无金额门槛券互斥(用户只能选择一种)
  65 + <input type="hidden" value="[[mutexLimit]]" id="mutexLimit" for="checkbox" placeholder="前台展示"/></label>
64 [[/if]] 66 [[/if]]
65 [[if couponType=='3']] 67 [[if couponType=='3']]
66 &nbsp;&nbsp;&nbsp;&nbsp;<label class="checkbox-inline"><input type="checkbox" value="1" name="isUseLimitRule" class="custom-1" [[if isUseLimitRule=='N']]checked[[/if]]> 市场通用</label> 68 &nbsp;&nbsp;&nbsp;&nbsp;<label class="checkbox-inline"><input type="checkbox" value="1" name="isUseLimitRule" class="custom-1" [[if isUseLimitRule=='N']]checked[[/if]]> 市场通用</label>
@@ -15,6 +15,7 @@ var showScope = []; @@ -15,6 +15,7 @@ var showScope = [];
15 var shopPriceLimits = []; 15 var shopPriceLimits = [];
16 var isNew; 16 var isNew;
17 var publicCouponType; 17 var publicCouponType;
  18 +var mutexLimit = null;
18 /** 19 /**
19 * 监听输入值的变化 20 * 监听输入值的变化
20 */ 21 */
@@ -188,6 +189,10 @@ var Bll = { @@ -188,6 +189,10 @@ var Bll = {
188 if (couponBean.isNew) { 189 if (couponBean.isNew) {
189 isNew = couponBean.isNew; 190 isNew = couponBean.isNew;
190 } 191 }
  192 + // 是否与无金额门槛券互斥
  193 + if (couponBean.mutexLimit) {
  194 + mutexLimit = couponBean.mutexLimit;
  195 + }
191 if (couponBean.couponType == '3') { 196 if (couponBean.couponType == '3') {
192 $("input[name='publicCouponType']").attr("disabled", true); 197 $("input[name='publicCouponType']").attr("disabled", true);
193 if (couponBean.publicCouponType == '1') { 198 if (couponBean.publicCouponType == '1') {
@@ -421,6 +426,18 @@ $(document).on("click", "input[name='isNew']", function () { @@ -421,6 +426,18 @@ $(document).on("click", "input[name='isNew']", function () {
421 } 426 }
422 couponBean.isNew = isNew; 427 couponBean.isNew = isNew;
423 }); 428 });
  429 +/**
  430 + * 免邮券
  431 + * 是否与无金额门槛券互斥开关
  432 + */
  433 +$(document).on("click", "input[name='mutexLimit']", function () {
  434 + if ($(this).is(':checked')) {
  435 + mutexLimit = $(this).val();
  436 + } else {
  437 + mutexLimit = null;
  438 + }
  439 + couponBean.mutexLimit = mutexLimit;
  440 +});
424 441
425 /** 442 /**
426 * 用券限制 443 * 用券限制
@@ -34,7 +34,8 @@ var couponBean = { @@ -34,7 +34,8 @@ var couponBean = {
34 publicCouponType: "", 34 publicCouponType: "",
35 couponAvailableChannels: "", // 可用渠道 35 couponAvailableChannels: "", // 可用渠道
36 channel: "", // 可用渠道勾选状态 36 channel: "", // 可用渠道勾选状态
37 - showScope: ""//展示范围 37 + showScope: "",//展示范围
  38 + mutexLimit: null // 互斥类型: Cash 是否与无金额门槛券互斥
38 }; 39 };
39 40
40 module.exports = couponBean; 41 module.exports = couponBean;