...
|
...
|
@@ -16,6 +16,7 @@ webpackJsonp([75],{ |
|
|
var endTimeObj;
|
|
|
|
|
|
var customType = [];
|
|
|
var showScope = [];
|
|
|
var shopPriceLimits = [];
|
|
|
var isNew;
|
|
|
var publicCouponType;
|
...
|
...
|
@@ -135,6 +136,7 @@ webpackJsonp([75],{ |
|
|
|
|
|
|
|
|
if (type == 'update') {
|
|
|
|
|
|
if (couponBean.customType) {
|
|
|
customType = couponBean.customType.split(',');
|
|
|
for (var i = 0; i < customType.length; i++) {
|
...
|
...
|
@@ -142,7 +144,17 @@ webpackJsonp([75],{ |
|
|
$("input ." + custom).attr("checked", "checked");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
console.log("showScope detail:" + couponBean.showScope);
|
|
|
/*$("input.showScope-1").prop("checked",false);
|
|
|
$("input.showScope-2").prop("checked",false);
|
|
|
$("input.showScope-3").prop("checked",false);*/
|
|
|
if (couponBean.showScope) {
|
|
|
showScope = couponBean.showScope.split(',');
|
|
|
for(var i = 0; i <showScope.length; i++) {
|
|
|
var checkBoxName = "showScope-" + showScope[i];
|
|
|
$("input ." + checkBoxName).attr("checked", "checked");
|
|
|
}
|
|
|
}
|
|
|
if (couponBean.shopPriceLimits) {
|
|
|
shopPriceLimits = couponBean.shopPriceLimits.split(',');
|
|
|
for (var i = 0; i < shopPriceLimits.length; i++) {
|
...
|
...
|
@@ -337,6 +349,15 @@ webpackJsonp([75],{ |
|
|
} else if (couponTypeVal == 6) {
|
|
|
couponBean.feeSharingType = 2;
|
|
|
}
|
|
|
|
|
|
if (couponTypeVal == 1){
|
|
|
couponBean.showScope = "1,2";
|
|
|
} else if (couponTypeVal == 6) {
|
|
|
couponBean.showScope = "1,2,3";
|
|
|
} else {
|
|
|
couponBean.showScope = "2";
|
|
|
}
|
|
|
|
|
|
$.extend(window.ViewModel, couponBean);
|
|
|
Bll.__render(couponBean, type);
|
|
|
});
|
...
|
...
|
@@ -356,6 +377,7 @@ webpackJsonp([75],{ |
|
|
couponBean.customType = customType.join(",");
|
|
|
});
|
|
|
|
|
|
|
|
|
$(document).on("click", "input[name='publicCouponType']", function () {
|
|
|
publicCouponType = $(this).val();
|
|
|
console.log("publicCouponType", publicCouponType);
|
...
|
...
|
@@ -535,6 +557,15 @@ webpackJsonp([75],{ |
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
showScope = [];
|
|
|
$('input:checkbox[name="showScope"]:checked').each(function () {
|
|
|
showScope.push($(this).val());
|
|
|
});
|
|
|
couponBean.showScope = showScope.join(",");
|
|
|
console.log("showScope: " + couponBean.showScope);
|
|
|
|
|
|
|
|
|
if (jsonDataChannel.length === 0) {
|
|
|
common.util.__tip('渠道限制不能为空!', 'warning');
|
|
|
return false;
|
...
|
...
|
@@ -543,7 +574,7 @@ webpackJsonp([75],{ |
|
|
* 该属性值给校验未通过回显用 校验通过重新赋值
|
|
|
* @type {Array}
|
|
|
*/
|
|
|
couponBean.channel = jsonDataChannel
|
|
|
couponBean.channel = jsonDataChannel;
|
|
|
|
|
|
|
|
|
//新增时如果,如果没有选定,赋予1(我司承担)
|
...
|
...
|
@@ -1124,7 +1155,8 @@ webpackJsonp([75],{ |
|
|
cusPublicCouponName: "",
|
|
|
publicCouponType: "",
|
|
|
couponAvailableChannels: "", // 可用渠道
|
|
|
channel: "" // 可用渠道勾选状态
|
|
|
channel: "", // 可用渠道勾选状态
|
|
|
showScope: ""//展示范围
|
|
|
};
|
|
|
|
|
|
module.exports = couponBean;
|
...
|
...
|
|