...
|
...
|
@@ -13,6 +13,7 @@ var endTimeObj; |
|
|
var customType = [];
|
|
|
var shopPriceLimits=[];
|
|
|
var isNew ;
|
|
|
var publicCouponType;
|
|
|
/**
|
|
|
* 监听输入值的变化
|
|
|
*/
|
...
|
...
|
@@ -172,7 +173,14 @@ var Bll = { |
|
|
if(couponBean.isNew){
|
|
|
isNew = couponBean.isNew;
|
|
|
}
|
|
|
|
|
|
if(couponBean.couponType=='3'){
|
|
|
$("input[name='publicCouponType']").attr("disabled",true);
|
|
|
if(couponBean.publicCouponType=='1'){
|
|
|
$("input[name='cusPublicCouponName']").attr("disabled",true);
|
|
|
$("input[name='couponNum']").attr("disabled",true);
|
|
|
$("#filter-couponType").attr("disabled",true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
...
|
...
|
@@ -326,6 +334,21 @@ $(document).on("click", "input[name='customType']", function () { |
|
|
}
|
|
|
couponBean.customType = customType.join(",");
|
|
|
});
|
|
|
|
|
|
$(document).on("click", "input[name='publicCouponType']", function () {
|
|
|
publicCouponType = $(this).val();
|
|
|
console.log("publicCouponType",publicCouponType);
|
|
|
if(publicCouponType=='1'){
|
|
|
couponBean.couponNum = 1;
|
|
|
$("input[name='couponNum']").attr("disabled",true);
|
|
|
}
|
|
|
|
|
|
couponBean.publicCouponType = publicCouponType
|
|
|
Bll.__render(couponBean, type);;
|
|
|
if(publicCouponType=='1'){
|
|
|
$("input[name='couponNum']").attr("disabled",true);
|
|
|
}
|
|
|
});
|
|
|
/**
|
|
|
* 免邮券开关
|
|
|
*/
|
...
|
...
|
@@ -377,6 +400,27 @@ $(document).on("click", "#save_brand", function () { |
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
if(couponBean.couponType=='3'){
|
|
|
if(couponBean.publicCouponType=='0'){
|
|
|
couponBean.cusPublicCouponName = '';
|
|
|
}
|
|
|
if(couponBean.publicCouponType=='1'){
|
|
|
var cusPublicCouponName = couponBean.cusPublicCouponName;
|
|
|
if(cusPublicCouponName==''){
|
|
|
common.util.__tip('码值不能为空!', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
//名称不能包含特殊字符
|
|
|
if(!cusPublicCouponName.startsWith("#")||/[~^$@%&!*]/gi.test(cusPublicCouponName)){
|
|
|
common.util.__tip('码值格式输入错误', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
if(cusPublicCouponName.length>20){
|
|
|
common.util.__tip('码值不可超出20个汉字', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var productLimit = $("textarea[name=\"productLimit\"]").val();
|
|
|
if(productLimit){
|
|
|
couponBean.productLimit = productLimit;
|
...
|
...
|
|