...
|
...
|
@@ -11,8 +11,8 @@ var startTimeObj; |
|
|
var endTimeObj;
|
|
|
|
|
|
var customType = [];
|
|
|
var shopPriceLimits=[];
|
|
|
var isNew ;
|
|
|
var shopPriceLimits = [];
|
|
|
var isNew;
|
|
|
var publicCouponType;
|
|
|
/**
|
|
|
* 监听输入值的变化
|
...
|
...
|
@@ -30,10 +30,10 @@ $(document).on("change", ".observe", function () { |
|
|
var Bll = {
|
|
|
Brands: [],//品牌数据
|
|
|
selectSorts: [],//分类数据
|
|
|
selectShops:[],//店铺数据
|
|
|
selectShopIds:[],
|
|
|
selectShops: [],//店铺数据
|
|
|
selectShopIds: [],
|
|
|
selectBrandsName: [],
|
|
|
selectPrdPool:{},
|
|
|
selectPrdPool: {},
|
|
|
getBrands: function () {//获取品牌数据
|
|
|
var Brand = {};
|
|
|
$.get("/ajax/yohosearch", function (res) {
|
...
|
...
|
@@ -80,7 +80,7 @@ var Bll = { |
|
|
e.init();
|
|
|
$("#limitStartTime").datetimepicker({
|
|
|
timeFormat: 'HH:mm:ss',
|
|
|
showSecond: true
|
|
|
showSecond: true
|
|
|
}).data("datepicker");
|
|
|
// startTimeObj = $("#startTime").datetimepicker({
|
|
|
// timeFormat: 'HH:mm:ss',
|
...
|
...
|
@@ -90,9 +90,10 @@ var Bll = { |
|
|
// timeFormat: 'HH:mm:ss',
|
|
|
// showSecond: true
|
|
|
// }).data("datepicker");
|
|
|
$.timepicker.datetimeRange($("#startTime"), $("#endTime"),{
|
|
|
$.timepicker.datetimeRange($("#startTime"), $("#endTime"), {
|
|
|
start: {timeFormat: 'HH:mm:ss'},
|
|
|
end: {timeFormat: 'HH:mm:ss'} } );
|
|
|
end: {timeFormat: 'HH:mm:ss'}
|
|
|
});
|
|
|
|
|
|
new common.dropDown({el: '#filter-couponType'});
|
|
|
|
...
|
...
|
@@ -145,40 +146,40 @@ var Bll = { |
|
|
}
|
|
|
}
|
|
|
//delete product limit
|
|
|
if(couponBean.productLimit){
|
|
|
$("#cleanPrdLimit").on("click",function(){
|
|
|
if (couponBean.productLimit) {
|
|
|
$("#cleanPrdLimit").on("click", function () {
|
|
|
var _cleanPrdLimit = $(this);
|
|
|
common.dialog.confirm("清除商品", "确认清除商品?",function(){
|
|
|
common.dialog.confirm("清除商品", "确认清除商品?", function () {
|
|
|
common.util.__ajax({
|
|
|
url: "/coupon/cleanPrdLimit",//获取所有部门
|
|
|
data: {param: couponBean.id}
|
|
|
}, function (res) {
|
|
|
if(res.code == 200){
|
|
|
if (res.code == 200) {
|
|
|
couponBean.productLimit = null;
|
|
|
$("textarea[name=\"productLimit\"]").val('');
|
|
|
_cleanPrdLimit.attr("disabled",true);
|
|
|
_cleanPrdLimit.attr("disabled", true);
|
|
|
common.util.__tip(res.message, 'success');
|
|
|
}else{
|
|
|
} else {
|
|
|
common.util.__tip(res.message, 'warning');
|
|
|
}
|
|
|
},true);
|
|
|
}, true);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//isNew
|
|
|
if(couponBean.isNew){
|
|
|
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);
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -227,12 +228,19 @@ var Bll = { |
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据type判断界面
|
|
|
*/
|
|
|
console.log("type====="+type);
|
|
|
console.log("type=====" + type);
|
|
|
if (type == 'add') {
|
|
|
//TODO: 2018.12.17 新增时,去动态获得渠道限制信息
|
|
|
common.util.__ajax({
|
|
|
async: false,
|
|
|
url: "/coupon/queryChannelGroups"
|
|
|
}, function (res) {
|
|
|
// console.log(res.data)
|
|
|
couponBean.couponAvailableChannels = res.data
|
|
|
}, true)
|
|
|
Bll.__render(couponBean, type);
|
|
|
} else {
|
|
|
var id = location.href.substring(location.href.lastIndexOf("/") + 1);
|
...
|
...
|
@@ -241,8 +249,16 @@ if (type == 'add') { |
|
|
data: {couponsId: id}
|
|
|
}, function (res) {
|
|
|
couponBean = res.data;
|
|
|
$.extend(window.ViewModel,res.data);
|
|
|
couponBean.limitStartTime=Bll.getTime(couponBean.limitStartTime);
|
|
|
//TODO: 2018.12.17 编辑时,去动态获得渠道限制信息以及勾选状态
|
|
|
common.util.__ajax({
|
|
|
async: false,
|
|
|
url: "/coupon/queryChannelGroups"
|
|
|
}, function (res) {
|
|
|
couponBean.couponAvailableChannels = res.data
|
|
|
}, true)
|
|
|
|
|
|
$.extend(window.ViewModel, res.data);
|
|
|
couponBean.limitStartTime = Bll.getTime(couponBean.limitStartTime);
|
|
|
couponBean.startTime = Bll.getTime(couponBean.startTime);
|
|
|
couponBean.endTime = Bll.getTime(couponBean.endTime);
|
|
|
Bll.selectSorts = couponBean.sortList || [];
|
...
|
...
|
@@ -268,8 +284,8 @@ if (type == 'add') { |
|
|
couponBean.brandList = Bll.selectBrandsName.join(";");
|
|
|
couponBean.useRange = 1;
|
|
|
}
|
|
|
if(couponBean.shopsIdName&&couponBean.shopsIdName.length>0){
|
|
|
for(var i=0;i<couponBean.shopsIdName.length;i++){
|
|
|
if (couponBean.shopsIdName && couponBean.shopsIdName.length > 0) {
|
|
|
for (var i = 0; i < couponBean.shopsIdName.length; i++) {
|
|
|
Bll.selectShops.push(couponBean.shopsIdName[i].text);
|
|
|
Bll.selectShopIds.push(couponBean.shopsIdName[i].id);
|
|
|
}
|
...
|
...
|
@@ -277,12 +293,12 @@ if (type == 'add') { |
|
|
couponBean.useRange = 2;
|
|
|
}
|
|
|
//指定商品
|
|
|
if(couponBean.productLimit){
|
|
|
if (couponBean.productLimit) {
|
|
|
couponBean.useRange = 3;
|
|
|
}
|
|
|
if(couponBean.prdPoolLimit){
|
|
|
if (couponBean.prdPoolLimit) {
|
|
|
couponBean.useRange = 4;
|
|
|
Bll.selectPrdPool = {id : couponBean.prdPoolLimit, name : couponBean.prdPoolLimitName}
|
|
|
Bll.selectPrdPool = {id: couponBean.prdPoolLimit, name: couponBean.prdPoolLimitName}
|
|
|
}
|
|
|
Bll.__render(couponBean, type)
|
|
|
}, true);
|
...
|
...
|
@@ -300,23 +316,23 @@ $(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){
|
|
|
if (_useRange) {
|
|
|
if (_useRange == 2 || _useRange == 3) {
|
|
|
PrdPoolService.dropPrdPool();
|
|
|
}
|
|
|
}
|
|
|
Bll.__render(couponBean, type);
|
|
|
});
|
|
|
|
|
|
$(document).on("change","#filter-couponType",function(){
|
|
|
$(document).on("change", "#filter-couponType", function () {
|
|
|
var couponTypeVal = $(this).val();
|
|
|
couponBean.couponType = $(this).val();
|
|
|
if(couponTypeVal==4||couponTypeVal==5||couponTypeVal==7||couponTypeVal==8){
|
|
|
if (couponTypeVal == 4 || couponTypeVal == 5 || couponTypeVal == 7 || couponTypeVal == 8) {
|
|
|
couponBean.feeSharingType = 1;
|
|
|
}else if(couponTypeVal==6){
|
|
|
} else if (couponTypeVal == 6) {
|
|
|
couponBean.feeSharingType = 2;
|
|
|
}
|
|
|
$.extend(window.ViewModel,couponBean);
|
|
|
$.extend(window.ViewModel, couponBean);
|
|
|
Bll.__render(couponBean, type);
|
|
|
});
|
|
|
/**
|
...
|
...
|
@@ -337,16 +353,17 @@ $(document).on("click", "input[name='customType']", function () { |
|
|
|
|
|
$(document).on("click", "input[name='publicCouponType']", function () {
|
|
|
publicCouponType = $(this).val();
|
|
|
console.log("publicCouponType",publicCouponType);
|
|
|
if(publicCouponType=='1'){
|
|
|
console.log("publicCouponType", publicCouponType);
|
|
|
if (publicCouponType == '1') {
|
|
|
couponBean.couponNum = 1;
|
|
|
$("input[name='couponNum']").attr("disabled",true);
|
|
|
$("input[name='couponNum']").attr("disabled", true);
|
|
|
}
|
|
|
|
|
|
couponBean.publicCouponType = publicCouponType
|
|
|
Bll.__render(couponBean, type);;
|
|
|
if(publicCouponType=='1'){
|
|
|
$("input[name='couponNum']").attr("disabled",true);
|
|
|
Bll.__render(couponBean, type);
|
|
|
;
|
|
|
if (publicCouponType == '1') {
|
|
|
$("input[name='couponNum']").attr("disabled", true);
|
|
|
}
|
|
|
});
|
|
|
/**
|
...
|
...
|
@@ -384,42 +401,115 @@ $(document).on("keyup", ".number", function () { |
|
|
|
|
|
|
|
|
/**
|
|
|
* 渠道限制事件
|
|
|
*/
|
|
|
$(document).on("click", 'input:checkbox[class="couponAvailableChannels"]', function () {
|
|
|
// console.log($(this).is(':checked'),$(this).val())
|
|
|
var mark = $(this).is(':checked')
|
|
|
var className = "couponAvailableChannelStoreList_" + $(this).val()
|
|
|
// console.log(className)
|
|
|
$("." + className).each(function () {
|
|
|
// console.log($(this).val())
|
|
|
$(this).prop("checked", mark)
|
|
|
})
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 多选框联动
|
|
|
*/
|
|
|
$(document).on("click", '.couponAvailableChannelStoreList', function () {
|
|
|
if ($(this).is(':checked')) {
|
|
|
// console.log($(this).is(':checked'))
|
|
|
var localNode = $(this).parents("div")[1]
|
|
|
// 门店勾选 对应的渠道也勾选
|
|
|
$(localNode).find('.couponAvailableChannels').prop("checked", true)
|
|
|
}
|
|
|
// 如果门店都没勾选 去除渠道的勾选
|
|
|
if (!$(this).is(':checked')) {
|
|
|
var locNode = $(this).parents("div")[0]
|
|
|
// 门店勾选 对应的渠道也勾选
|
|
|
var mark = true
|
|
|
const len = $(locNode).find('.couponAvailableChannelStoreList').length
|
|
|
const data = $(locNode).find('.couponAvailableChannelStoreList')
|
|
|
for (var i = 0; i < len; i++) {
|
|
|
if ($(data[i]).is(':checked')) {
|
|
|
mark = false
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
if (mark) {
|
|
|
var localN = $(this).parents("div")[1]
|
|
|
$(localN).find('.couponAvailableChannels').prop("checked", false)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 保存
|
|
|
*/
|
|
|
$(document).on("click", "#save_brand", function () {
|
|
|
|
|
|
//TODO: 2018.12.17 保存时,获得渠道限制信息,重新组装
|
|
|
var localSimilarDataJson
|
|
|
var jsonDataChannel = []
|
|
|
common.util.__ajax({
|
|
|
async: false,
|
|
|
url: "/coupon/queryChannelGroups"
|
|
|
}, function (res) {
|
|
|
localSimilarDataJson = res.data
|
|
|
}, true)
|
|
|
$('input:checkbox[class="couponAvailableChannels"]:checked').each(function () {
|
|
|
for (var i = 0; i < localSimilarDataJson.length; i++) {
|
|
|
if (localSimilarDataJson[i].groupId == $(this).val()) {
|
|
|
var channelObject = {}
|
|
|
channelObject.storeList = []
|
|
|
channelObject.groupId = $(this).val()
|
|
|
var className = "couponAvailableChannelStoreList_" + $(this).val()
|
|
|
$("." + className).each(function () {
|
|
|
if ($(this).is(':checked'))
|
|
|
channelObject.storeList.push($(this).val())
|
|
|
})
|
|
|
jsonDataChannel.push(channelObject)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
// console.log(JSON.stringify(jsonDataChannel))
|
|
|
couponBean.channel = JSON.stringify(jsonDataChannel)
|
|
|
|
|
|
|
|
|
//新增时如果,如果没有选定,赋予1(我司承担)
|
|
|
if(type=='add'&&$("#feeSharingType").val()=='0'){
|
|
|
if (type == 'add' && $("#feeSharingType").val() == '0') {
|
|
|
couponBean.feeSharingType = 1;
|
|
|
}else{
|
|
|
} else {
|
|
|
couponBean.feeSharingType = $("#feeSharingType").val();
|
|
|
}
|
|
|
couponBean.feeSharingRatio = $("#feeSharingRatio").val();
|
|
|
if(couponBean.couponType=='6'){
|
|
|
if(couponBean.shopList==''){
|
|
|
if (couponBean.couponType == '6') {
|
|
|
if (couponBean.shopList == '') {
|
|
|
common.util.__tip('店铺券需要设置店铺限制!', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
if(couponBean.shopLimit && couponBean.shopLimit.indexOf(",")>0){
|
|
|
if (couponBean.shopLimit && couponBean.shopLimit.indexOf(",") > 0) {
|
|
|
common.util.__tip('店铺券最多设置一个店铺限制!', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
if(couponBean.couponType=='3'){
|
|
|
if(couponBean.publicCouponType=='0'){
|
|
|
if (couponBean.couponType == '3') {
|
|
|
if (couponBean.publicCouponType == '0') {
|
|
|
couponBean.cusPublicCouponName = '';
|
|
|
}
|
|
|
if(couponBean.publicCouponType=='1'){
|
|
|
var cusPublicCouponName = couponBean.cusPublicCouponName;
|
|
|
if(cusPublicCouponName==''){
|
|
|
if (couponBean.publicCouponType == '1') {
|
|
|
var cusPublicCouponName = couponBean.cusPublicCouponName;
|
|
|
if (cusPublicCouponName == '') {
|
|
|
common.util.__tip('码值不能为空!', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
//名称不能包含特殊字符
|
|
|
if(!cusPublicCouponName.startsWith("#")||/[~^$@%&!*]/gi.test(cusPublicCouponName)){
|
|
|
if (!cusPublicCouponName.startsWith("#") || /[~^$@%&!*]/gi.test(cusPublicCouponName)) {
|
|
|
common.util.__tip('码值格式输入错误', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
if(cusPublicCouponName.length>20){
|
|
|
if (cusPublicCouponName.length > 20) {
|
|
|
common.util.__tip('码值不可超出20个汉字', 'warning');
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -428,14 +518,14 @@ $(document).on("click", "#save_brand", function () { |
|
|
var productLimit = $("textarea[name=\"productLimit\"]").val();
|
|
|
|
|
|
var explains = couponBean.explains;
|
|
|
if(explains==''){
|
|
|
if (explains == '') {
|
|
|
common.util.__tip('优惠券说明不能为空!', 'warning');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if(productLimit){
|
|
|
if (productLimit) {
|
|
|
couponBean.productLimit = productLimit;
|
|
|
if(productLimit.indexOf(",")>-1){
|
|
|
if (productLimit.indexOf(",") > -1) {
|
|
|
common.util.__tip('指定商品请使用英文逗号', 'warning');
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -468,12 +558,12 @@ var initSort = function () {//初始化分类弹框 |
|
|
if (tabTreeArr.length > 0) {
|
|
|
for (var i = 0; i < tabTreeArr.length; i++) {
|
|
|
Bll.selectSorts.push(tabTreeArr[i].selected);
|
|
|
ids.push(tabTreeArr[i].selected[tabTreeArr[i].selected.length-1].id);
|
|
|
|
|
|
ids.push(tabTreeArr[i].selected[tabTreeArr[i].selected.length - 1].id);
|
|
|
|
|
|
}
|
|
|
couponBean.sortLimit = ids.join(',');
|
|
|
}else{
|
|
|
couponBean.sortLimit="";
|
|
|
} else {
|
|
|
couponBean.sortLimit = "";
|
|
|
}
|
|
|
if (Bll.selectSorts.length > 0) {
|
|
|
var sorts = [], sortList = [];
|
...
|
...
|
@@ -489,7 +579,7 @@ var initSort = function () {//初始化分类弹框 |
|
|
|
|
|
couponBean.sortsList = sortList.join(";");
|
|
|
Bll.__render(couponBean, type);
|
|
|
}else{
|
|
|
} else {
|
|
|
couponBean.sortsList = "";
|
|
|
Bll.__render(couponBean, type);
|
|
|
}
|
...
|
...
|
@@ -630,15 +720,15 @@ var initShop = function () {//初始化店铺弹框 |
|
|
Bll.selectShops = [];
|
|
|
|
|
|
if ($(".shop").length > 0) {
|
|
|
$(".shop").each(function(index){
|
|
|
Bll.selectShops.push($(this).text().replace("选择店铺","").trim());
|
|
|
Bll.selectShopIds.push($(this).val());
|
|
|
});
|
|
|
$(".shop").each(function (index) {
|
|
|
Bll.selectShops.push($(this).text().replace("选择店铺", "").trim());
|
|
|
Bll.selectShopIds.push($(this).val());
|
|
|
});
|
|
|
couponBean.shopLimit = Bll.selectShopIds.join(',');
|
|
|
couponBean.shopList = Bll.selectShops.join(";");
|
|
|
PrdPoolService.dropPrdPool();
|
|
|
Bll.__render(couponBean, type);
|
|
|
}else{
|
|
|
} else {
|
|
|
couponBean.shopList = "";
|
|
|
couponBean.shopLimit = "";
|
|
|
Bll.__render(couponBean, type);
|
...
|
...
|
@@ -662,8 +752,10 @@ $(document).on('click', "#addShop", function () { |
|
|
$.each(Bll.selectShops, function (i, item) {
|
|
|
var shopName = Bll.selectShops[i];
|
|
|
var shopId = Bll.selectShopIds[i];
|
|
|
var Template = {shopId:shopId,
|
|
|
shopName:shopName};
|
|
|
var Template = {
|
|
|
shopId: shopId,
|
|
|
shopName: shopName
|
|
|
};
|
|
|
var $shopGroup = $(common.util.__template2($("#shopWrap").html(), Template));
|
|
|
$shopGroup.appendTo($('.shop-wrap'));
|
|
|
shopDropDown();
|
...
|
...
|
@@ -679,8 +771,10 @@ $(document).on('click', "#addShop", function () { |
|
|
|
|
|
//添加一个店铺
|
|
|
$(document).on('click', '.add-shop-btn', function () {
|
|
|
var Template = {shopId:"",
|
|
|
shopName:""};
|
|
|
var Template = {
|
|
|
shopId: "",
|
|
|
shopName: ""
|
|
|
};
|
|
|
var $shopGroup = $(common.util.__template2($("#shopWrap").html(), Template));
|
|
|
$shopGroup.appendTo($('.shop-wrap'));
|
|
|
shopDropDown();
|
...
|
...
|
@@ -692,20 +786,22 @@ $(document).on('click', '.del-shop-btn', function () { |
|
|
Bll.selectShops.splice(shopIndex, 1);
|
|
|
//Bll.checkSortNum();
|
|
|
});
|
|
|
|
|
|
//店铺券使用couponShops下拉,其他的使用queryShop下拉
|
|
|
function shopDropDown(){
|
|
|
if(couponBean.couponType==6){
|
|
|
function shopDropDown() {
|
|
|
if (couponBean.couponType == 6) {
|
|
|
new common.dropDown({
|
|
|
el: '.shop',
|
|
|
ajax: 'couponShops'
|
|
|
});
|
|
|
}else{
|
|
|
} else {
|
|
|
new common.dropDown({
|
|
|
el: '.shop',
|
|
|
ajax: 'queryShopPass'
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//********************* 店铺end****************************************
|
|
|
|
|
|
$(document).on("change", "input[name='isUseLimitRule']", function () {
|
...
|
...
|
@@ -730,21 +826,21 @@ var PrdPoolService = { |
|
|
callback: function () {
|
|
|
//myself
|
|
|
//myselfEnd
|
|
|
Bll.selectPrdPool = {};
|
|
|
Bll.selectPrdPool = {};
|
|
|
|
|
|
if ($(".prdPoolLimit").length > 0) {
|
|
|
var _pass = true;
|
|
|
$(".prdPoolLimit").each(function(index){
|
|
|
$(".prdPoolLimit").each(function (index) {
|
|
|
var _id = $(this).val();
|
|
|
if(_id <= 0){
|
|
|
|
|
|
if (_id <= 0) {
|
|
|
|
|
|
_pass = false;
|
|
|
return false;
|
|
|
}else{
|
|
|
Bll.selectPrdPool.name = $(this).text().replace("选择商品池","").trim()
|
|
|
} else {
|
|
|
Bll.selectPrdPool.name = $(this).text().replace("选择商品池", "").trim()
|
|
|
Bll.selectPrdPool.id = _id;
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
if (!_pass) {
|
|
|
common.util.__tip("请选择商品池", 'warning');
|
...
|
...
|
@@ -754,8 +850,8 @@ var PrdPoolService = { |
|
|
couponBean.prdPoolLimitName = Bll.selectPrdPool.name;
|
|
|
dropShop();
|
|
|
Bll.__render(couponBean, type);
|
|
|
}else{
|
|
|
couponBean.prdPoolLimit = "";
|
|
|
} else {
|
|
|
couponBean.prdPoolLimit = "";
|
|
|
Bll.__render(couponBean, type);
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -767,7 +863,7 @@ var PrdPoolService = { |
|
|
__self.buildPrdPoolDropDown();
|
|
|
},
|
|
|
//选择商品池
|
|
|
clickHandle : function(){
|
|
|
clickHandle: function () {
|
|
|
var __self = this;
|
|
|
if (Bll.selectShops && Bll.selectShops.length > 0) {
|
|
|
//渲染店铺
|
...
|
...
|
@@ -787,26 +883,25 @@ var PrdPoolService = { |
|
|
}
|
|
|
__self.buildPrdPoolDropDown();
|
|
|
},
|
|
|
buildPrdPoolDropDown : function(){
|
|
|
buildPrdPoolDropDown: function () {
|
|
|
return new common.dropDown({
|
|
|
el: '.prdPoolLimit',
|
|
|
ajax: 'productPool',
|
|
|
params : {diffType : 3}
|
|
|
params: {diffType: 3}
|
|
|
});
|
|
|
},
|
|
|
dropPrdPool : function(){
|
|
|
dropPrdPool: function () {
|
|
|
couponBean.prdPoolLimit = "";
|
|
|
Bll.selectPrdPool = {};
|
|
|
Bll.selectPrdPool = {};
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', "#addPrdPool", function () {
|
|
|
PrdPoolService.clickHandle();
|
|
|
});
|
|
|
|
|
|
var dropShop = function(){
|
|
|
var dropShop = function () {
|
|
|
Bll.selectShopIds = [];
|
|
|
Bll.selectShops = [];
|
|
|
couponBean.shopLimit = "";
|
...
|
...
|
|