Authored by chenjian

Merge branch 'dev_available_channel' into test6.8.4

... ... @@ -345,10 +345,16 @@
</div>
<div class="panel-body">
<div class="row">
<div style="margin-left: 30px">
<label class="checkbox-inline">
<!-- 全选 -->
<input type="checkbox" id="couponAvailableChannelsSelectAll"> 全选
</label>
</div>
[[each couponAvailableChannels as Available_Channels i]]
<div class="form-group">
<div class="form-group" id="couponAvailableChannelsSelectAll_anchor">
<div class="col-sm-8">
<label class="col-sm-2 control-label">可用渠道 [[i]]</label>
<!--<label class="col-sm-2 control-label">可用渠道 [[i]]</label>-->
<!-- 渠道 -->
<div class="col-sm-2">
<label class="checkbox-inline">
... ...
... ... @@ -444,6 +444,24 @@ $(document).on("click", '.couponAvailableChannelStoreList', function () {
}
});
/**
* 全选控制
*/
$(document).on("click", "#couponAvailableChannelsSelectAll", function () {
const data = $(document).find('.couponAvailableChannelStoreList,.couponAvailableChannels')
if ($(this).is(':checked')) {
for (var i = 0; i < data.length; i++) {
$(data[i]).prop("checked", true)
}
} else {
for (var i = 0; i < data.length; i++) {
$(data[i]).prop("checked", false)
}
}
});
/**
* 保存
*/
... ... @@ -473,7 +491,10 @@ $(document).on("click", "#save_brand", function () {
}
}
});
// console.log(JSON.stringify(jsonDataChannel))
if (jsonDataChannel.length === 0) {
common.util.__tip('渠道限制不能为空!', 'warning');
return false;
}
couponBean.channel = JSON.stringify(jsonDataChannel)
... ...