...
|
...
|
@@ -124,6 +124,7 @@ var Bll = { |
|
|
$("#select2-filter-department-container").html(departmentName);
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
if (type == 'update') {
|
|
|
if (couponBean.customType) {
|
|
|
customType = couponBean.customType.split(',');
|
...
|
...
|
@@ -132,8 +133,7 @@ var Bll = { |
|
|
$("input ." + custom).attr("checked", "checked");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (type == 'update') {
|
|
|
|
|
|
if (couponBean.shopPriceLimits) {
|
|
|
shopPriceLimits = couponBean.shopPriceLimits.split(',');
|
|
|
for (var i = 0; i < shopPriceLimits.length; i++) {
|
...
|
...
|
@@ -141,6 +141,31 @@ var Bll = { |
|
|
$("input ." + custom).attr("checked", "checked");
|
|
|
}
|
|
|
}
|
|
|
//delete product limit
|
|
|
if(couponBean.productLimit){
|
|
|
$("#cleanPrdLimit").on("click",function(){
|
|
|
var _cleanPrdLimit = $(this);
|
|
|
common.dialog.confirm("清除商品", "确认清除商品?",function(){
|
|
|
common.util.__ajax({
|
|
|
url: "/coupon/cleanPrdLimit",//获取所有部门
|
|
|
data: {param: couponBean.id}
|
|
|
}, function (res) {
|
|
|
if(res.code == 200){
|
|
|
couponBean.productLimit = null;
|
|
|
$("textarea[name=\"productLimit\"]").val('');
|
|
|
_cleanPrdLimit.attr("disabled",true);
|
|
|
common.util.__tip(res.message, 'success');
|
|
|
}else{
|
|
|
common.util.__tip(res.message, 'warning');
|
|
|
}
|
|
|
},true);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
...
|
...
|
|