...
|
...
|
@@ -400,6 +400,30 @@ $(document).on("keyup", ".number", function () { |
|
|
});
|
|
|
|
|
|
|
|
|
function channelChangeListen() {
|
|
|
/**
|
|
|
* 输入值的变化时,获得渠道限制的勾选信息并寄存下来,从而在重新渲染页面时能回显用户已勾选的选项
|
|
|
* @type {any}
|
|
|
*/
|
|
|
var jsonDataChannel = []
|
|
|
$('input:checkbox[class="couponAvailableChannels"]:checked').each(function () {
|
|
|
for (var i = 0; i < couponBean.couponAvailableChannels.length; i++) {
|
|
|
if (couponBean.couponAvailableChannels[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)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
couponBean.channel = jsonDataChannel
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 渠道限制事件
|
|
|
*/
|
...
|
...
|
@@ -412,6 +436,9 @@ $(document).on("click", 'input:checkbox[class="couponAvailableChannels"]', funct |
|
|
// console.log($(this).val())
|
|
|
$(this).prop("checked", mark)
|
|
|
})
|
|
|
|
|
|
// 临时保存一下勾选值
|
|
|
channelChangeListen()
|
|
|
});
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -442,6 +469,9 @@ $(document).on("click", '.couponAvailableChannelStoreList', function () { |
|
|
$(localN).find('.couponAvailableChannels').prop("checked", false)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 临时保存一下勾选值
|
|
|
channelChangeListen()
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -459,6 +489,9 @@ $(document).on("click", "#couponAvailableChannelsSelectAll", function () { |
|
|
$(data[i]).prop("checked", false)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 临时保存一下勾选值
|
|
|
channelChangeListen()
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|