Authored by shuaiguo

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

... ... @@ -67,6 +67,7 @@ module.exports = {
channel: {type: String},
showScope : {type: String},
checkRequired: {type: Number},
mutexLimit: {type: String}
}
},
reject: {
... ...
... ... @@ -58,9 +58,11 @@
</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="前台展示">
<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="前台展示"/></label>
<label>
<input type="checkbox" value="Cash" name="mutexLimit" class="custom-1" [[if status==1]] disabled [[/if]] /> 与无金额门槛券互斥(用户只能选择一种)
<input type="hidden" value="[[mutexLimit]]" id="mutexLimit" for="checkbox" placeholder="前台展示"/></label>
[[/if]]
[[if couponType=='3']]
&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 = [];
var shopPriceLimits = [];
var isNew;
var publicCouponType;
var mutexLimit = null;
/**
* 监听输入值的变化
*/
... ... @@ -188,6 +189,10 @@ var Bll = {
if (couponBean.isNew) {
isNew = couponBean.isNew;
}
// 是否与无金额门槛券互斥
if (couponBean.mutexLimit) {
mutexLimit = couponBean.mutexLimit;
}
if (couponBean.couponType == '3') {
$("input[name='publicCouponType']").attr("disabled", true);
if (couponBean.publicCouponType == '1') {
... ... @@ -421,6 +426,18 @@ $(document).on("click", "input[name='isNew']", function () {
}
couponBean.isNew = isNew;
});
/**
* 免邮券
* 是否与无金额门槛券互斥开关
*/
$(document).on("click", "input[name='mutexLimit']", function () {
if ($(this).is(':checked')) {
mutexLimit = $(this).val();
} else {
mutexLimit = null;
}
couponBean.mutexLimit = mutexLimit;
});
/**
* 用券限制
... ...
... ... @@ -34,7 +34,8 @@ var couponBean = {
publicCouponType: "",
couponAvailableChannels: "", // 可用渠道
channel: "", // 可用渠道勾选状态
showScope: ""//展示范围
showScope: "",//展示范围
mutexLimit: null // 互斥类型: Cash 是否与无金额门槛券互斥
};
module.exports = couponBean;
\ No newline at end of file
... ...