...
|
...
|
@@ -12,6 +12,7 @@ var type = $("#basicForm").attr("role"),//类型 新增或修改 |
|
|
var startTimeObj;
|
|
|
var endTimeObj;
|
|
|
var customType = [];
|
|
|
var shopPriceLimits=[];
|
|
|
|
|
|
/**
|
|
|
* 监听输入值的变化
|
...
|
...
|
@@ -93,6 +94,16 @@ var Bll = { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (type == 'update') {
|
|
|
if (couponBean.shopPriceLimits) {
|
|
|
shopPriceLimits = couponBean.shopPriceLimits.split(',');
|
|
|
for (var i = 0; i < shopPriceLimits.length; i++) {
|
|
|
var custom = "pricelimit-" + shopPriceLimits[i];
|
|
|
$("input ." + custom).attr("checked", "checked");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//modified by jie.pang@yoho.cn:20160812 去掉隐藏的功能
|
|
|
checkSortNum: function () {
|
...
|
...
|
@@ -205,6 +216,22 @@ $(document).on("click", "input[name='customType']", function () { |
|
|
couponBean.customType = customType.join(",");
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 用券限制
|
|
|
*/
|
|
|
$(document).on("click", "input[name='shopPriceLimits']", function () {
|
|
|
if ($(this).is(':checked')) {
|
|
|
shopPriceLimits.push($(this).val());
|
|
|
} else {
|
|
|
for (var i = 0; i < shopPriceLimits.length; i++) {
|
|
|
if ($(this).val() == shopPriceLimits[i]) {
|
|
|
shopPriceLimits.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
couponBean.shopPriceLimits = shopPriceLimits.join(",");
|
|
|
});
|
|
|
|
|
|
//输入限制
|
|
|
$(document).on("keyup", ".number", function () {
|
|
|
$(this).val($(this).val().replace(/\D/g, ''));
|
...
|
...
|
|