Authored by chenchao

add reject

... ... @@ -291,6 +291,12 @@ $(document).on("change", "#useLimitType", function () {
*/
$(document).on("change", "#useRange", function () {
couponBean.useRange = $(this).val();
var _useRange = couponBean.useRange;
if(_useRange){
if(_useRange== 2|| _useRange == 3){
PrdPoolService.dropPrdPool();
}
}
Bll.__render(couponBean, type);
});
... ... @@ -571,6 +577,7 @@ var initShop = function () {//初始化店铺弹框
});
couponBean.shopLimit = Bll.selectShopIds.join(',');
couponBean.shopList = Bll.selectShops.join(";");
PrdPoolService.dropPrdPool();
Bll.__render(couponBean, type);
}else{
couponBean.shopList = "";
... ... @@ -667,16 +674,29 @@ var PrdPoolService = {
Bll.selectPrdPool = {};
if ($(".prdPoolLimit").length > 0) {
var _pass = true;
$(".prdPoolLimit").each(function(index){
Bll.selectPrdPool.id = $(this).val();
var _id = $(this).val();
if(_id <= 0){
_pass = false;
return false;
}else{
Bll.selectPrdPool.name = $(this).text().replace("选择商品池","").trim()
Bll.selectPrdPool.id = _id;
}
});
if (!_pass) {
common.util.__tip("请选择商品池", 'warning');
return false;
}
couponBean.prdPoolLimit = Bll.selectPrdPool.id;
couponBean.prdPoolLimitName = Bll.selectPrdPool.name;
dropShop();
Bll.__render(couponBean, type);
}else{
couponBean.prdPoolLimit = "";
Bll.__render(couponBean, type);
}
},
... ... @@ -714,6 +734,10 @@ var PrdPoolService = {
ajax: 'productPool',
params : {diffType : 3}
});
},
dropPrdPool : function(){
couponBean.prdPoolLimit = "";
Bll.selectPrdPool = {};
}
}
... ... @@ -723,4 +747,9 @@ $(document).on('click', "#addPrdPool", function () {
PrdPoolService.clickHandle();
});
var dropShop = function(){
Bll.selectShopIds = [];
Bll.selectShops = [];
couponBean.shopLimit = "";
couponBean.shopList = "";
}
... ...