$(function () {
|
getVipGrowthRules();
|
});
|
|
function getVipGrowthRules() {
|
var ajax = new $ax(Feng.ctxPath + "/vipGrowthRules/queryVipGrowthRulesList", function (res) {
|
if(res.code == 0){
|
const data = res.data;
|
let str = '';
|
for(var i in data){
|
str += '<tr id="' + data[i].id + '"><td>' + (parseInt(i) + 1) + '</td><td><select class="userTypeOne" onchange="getUserType(this)">';
|
for(var j in data[0].userTypeOne){
|
str += '<option value="' + data[0].userTypeOne[j].id + '" ' + (data[i].userTypeOneId == data[0].userTypeOne[j].id ? 'selected' : '') + '>' + data[0].userTypeOne[j].name + '</option>'
|
}
|
str += '</select></td><td><select class="userTypeTwo" onchange="chooseUserTypeTwo(this)">';
|
let tips = '';
|
for(var j in data[i].userTypeTwo){
|
str += '<option value="' + data[i].userTypeTwo[j].id + '" ' + (data[i].userTypeTwoId == data[i].userTypeTwo[j].id ? 'selected' : '') + ' t="' + data[i].userTypeTwo[j].tips + '">' + data[i].userTypeTwo[j].name + '</option>';
|
if(data[i].userTypeTwoId == data[i].userTypeTwo[j].id){
|
tips = data[i].userTypeTwo[j].tips;
|
}
|
}
|
|
str += '</select></td><td><select class="type" onchange="chooseType(this)">';
|
if(tips == 'the_number_of_days_to_visit_the_applet' || tips == 'the_number_of_days_to_visit_the_applet_activity' || tips == 'number_of_visits_to_the_applet'
|
|| tips == 'number_of_visits_to_the_applet_activity' || tips == 'check-in_days' || tips == 'consecutive_check-in_days' || tips == 'refueling_number' || tips == 'whether_to_refuel'
|
|| tips == 'amount_of_non-oil_commodities'){
|
str += '<option value="3" ' + (data[i].type == 3 ? 'selected' : '') + '>数字</option>';
|
}else if(tips == 'have_you_completed_the_XX_task'){
|
str += '<option value="2" ' + (data[i].type == 2 ? 'selected' : '') + '>包含</option>';
|
}else{
|
str += '<option value="1" ' + (data[i].type == 1 ? 'selected' : '') + '>是</option>';
|
}
|
str += '</select></td>' +
|
'<td><div class="content" v=\'' + data[i].content + '\'>' + (data[i].type != 1 ? '<a href="#" onclick="openSitePage(this)">去设置</a>' : '<input type="number" min="0" class="score" value="' + data[i].score + '" onblur="saveVipGrowthRules(this)"/>') + '</div></td>' +
|
'<td><a href="#" onclick="delVipGrowthRules(\'' + data[i].id + '\')">删除</a></td></tr>';
|
}
|
$('tbody').html(str);
|
}else{
|
Feng.error(res.msg);
|
}
|
}, function (data) {
|
Feng.error("获取失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set();
|
ajax.start();
|
}
|
|
|
function getUserType(obj) {
|
var ajax = new $ax(Feng.ctxPath + "/vipGrowthRules/getUserType", function (res) {
|
if(res.code == 200){
|
const data = res.data;
|
let str = '';
|
for(const i in data){
|
str += '<option value="' + data[i].id + '" t="' + data[i].tips + '">' + data[i].name + '</option>'
|
}
|
$(obj).parents('tr').find('.userTypeTwo').html(str);
|
$(obj).parents('tr').find('.userTypeTwo').change();
|
}else{
|
Feng.error(res.msg);
|
}
|
}, function (data) {
|
Feng.error("获取失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set({
|
pid: $(obj).val()
|
});
|
ajax.start();
|
}
|
|
|
|
function chooseUserTypeTwo(e) {
|
var tips = $(e).find('option:checked').attr('t');
|
if(tips == 'the_number_of_days_to_visit_the_applet' || tips == 'the_number_of_days_to_visit_the_applet_activity' || tips == 'number_of_visits_to_the_applet'
|
|| tips == 'number_of_visits_to_the_applet_activity' || tips == 'check-in_days' || tips == 'consecutive_check-in_days' || tips == 'refueling_number' || tips == 'whether_to_refuel'
|
|| tips == 'amount_of_non-oil_commodities'){
|
$(e).parents('tr').find('.type').html('<option value="3">数字</option>')
|
$(e).parents('tr').find('.type').val(3);
|
}else if(tips == 'have_you_completed_the_XX_task'){
|
$(e).parents('tr').find('.type').html('<option value="2">包含</option>')
|
$(e).parents('tr').find('.type').val(2);
|
}else{
|
$(e).parents('tr').find('.type').html('<option value="1">是</option>')
|
$(e).parents('tr').find('.type').val(1);
|
}
|
$(e).parents('tr').find('.type').change();
|
}
|
|
function chooseType(obj) {
|
if($(obj).val() == 1){
|
$(obj).parents('tr').find('.content').html('<input type="number" min="0" class="score" value="0" onblur="saveVipGrowthRules(this)"/>');
|
}else{
|
$(obj).parents('tr').find('.content').html('<a href="#" onclick="openSitePage(this)">去设置</a>');
|
}
|
}
|
|
function saveVipGrowthRules(e) {
|
$(e).parents('tr').find('.content').attr('v', JSON.stringify([{v:['0'],s:$(e).val()}]))
|
editVipGrowthRules(e);
|
}
|
|
|
function editVipGrowthRules(e) {
|
var ajax = new $ax(Feng.ctxPath + "/vipGrowthRules/editVipGrowthRules", function (data) {
|
if(data.code == 200){
|
Feng.success("保存成功!");
|
getVipGrowthRules();
|
}else{
|
Feng.error(data.msg);
|
}
|
}, function (data) {
|
Feng.error("编辑失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set({
|
id: $(e).parents('tr').attr("id"),
|
userTypeOneId: $(e).parents('tr').find('.userTypeOne').val(),
|
userTypeTwoId: $(e).parents('tr').find('.userTypeTwo').val(),
|
type: $(e).parents('tr').find('.type').val(),
|
score: $(e).parents('tr').find('.content').attr('s'),
|
content: $(e).parents('tr').find('.content').attr('v')
|
});
|
ajax.start();
|
}
|
|
|
function openSitePage(e) {
|
var tips = $(e).parents('tr').find('.userTypeTwo').find('option:checked').attr('t');
|
var type = $(e).parents('tr').find('.type').val();
|
var v = $(e).parents('tr').find('.content').attr('v');
|
let height = "";
|
let widht = "";
|
if('' != v){
|
v = JSON.parse(v);
|
}else{
|
v = [];
|
}
|
let str = '';
|
if(tips == 'the_number_of_days_to_visit_the_applet' || tips == 'the_number_of_days_to_visit_the_applet_activity' || tips == 'number_of_visits_to_the_applet'
|
|| tips == 'number_of_visits_to_the_applet_activity' || tips == 'check-in_days' || tips == 'consecutive_check-in_days' || tips == 'refueling_number' || tips == 'whether_to_refuel'
|
|| tips == 'amount_of_non-oil_commodities'){
|
if(type != 3){
|
Feng.error("请选择【数字】条件类型");
|
return
|
}
|
let arr = [{'id': -10, 'name': '-10#柴油'}, {'id': 0, 'name': '0#柴油'}, {'id': 92, 'name': '92#汽油'}, {'id': 95, 'name': '95#汽油'}, {'id': 98, 'name': '98#汽油'}];
|
let unit = [{'id': 1, 'name': '次'}, {'id': 2, 'name': '天'}, {'id': 3, 'name': '元'}, {'id': 4, 'name': 'L'}]
|
str = '' +
|
'<div class="row">' +
|
' <div class="form-group" style="height: 50px;line-height: 50px;" ';
|
str += tips != 'refueling_number' ? 'hidden' : '';
|
str += '>\n' +
|
' <label class="col-sm-3 control-label" style="line-height: 50px;text-align: right;">油号</label>\n' +
|
' <div class="col-sm-8">' +
|
' <select id="oil" class="selectpicker show-tick form-control" multiple data-style="btn-primary" data-none-selected-text="请选择"> ';
|
for(let i in arr){
|
let b = '';
|
if(v.length > 0){
|
for(let j in v[0].o){
|
if(arr[i].id == v[0].o[j]){
|
b = 'selected';
|
break
|
}
|
}
|
}
|
str += '<option value="' + arr[i].id + '" ' + b + '>' + arr[i].name + '</option>'
|
}
|
str +=
|
' </select>' +
|
' </div>\n' +
|
' </div>' +
|
' <div class="form-group" style="height: 50px;line-height: 50px;">\n' +
|
' <label class="col-sm-3 control-label" style="line-height: 40px;text-align: right;">每</label>\n' +
|
' <div class="col-sm-4">\n' +
|
' <input type="number" min="0" class="form-control" id="condition" value="' + (v.length == 0 ? '' : v[0].v[0]) + '">\n' +
|
' </div>\n' +
|
' <div class="col-sm-4">\n' +
|
' <select class="form-control" id="unit">';
|
for(let i in unit){
|
str += '<option value="' + unit[i].id + '" ' + (v.length > 0 && v[0].u == unit[i].id ? 'selected' : '') + '>' + unit[i].name + '</option>';
|
}
|
str +=
|
' </select>' +
|
' </div>\n' +
|
' </div>' +
|
' <div class="form-group" style="height: 50px;line-height: 50px;">\n' +
|
' <label class="col-sm-3 control-label" style="line-height: 30px;text-align: right;">所得成长值</label>\n' +
|
' <div class="col-sm-8">\n' +
|
' <input type="number" min="0" class="form-control" id="score" value="' + (v.length > 0 ? v[0].s : '') + '">\n' +
|
' </div>\n' +
|
' </div>' +
|
'</div>';
|
height = "300px", widht = "500px";
|
}else if(tips == 'have_you_completed_the_XX_task'){
|
height = '450px', widht = '700px'
|
if(type != 2){
|
Feng.error("请选择【包含】条件类型");
|
return
|
}
|
str = '<div class="row">\n' +
|
' <div style="padding-bottom: 10px;">' +
|
' <span>默认成长值设置:</span>' +
|
' <input type="number" id="defaultBranch" min="0" value="' + (v.length == 0 ? '' : v[v.length - 1].s) + '" style="height: 35px;line-height: 35px;text-indent: 10px;border: 1px solid #eee;" placeholder="成长值">' +
|
' </div>' +
|
' <div id="content" style="padding-bottom: 10px;">' +
|
' <div style="height: 40px;width: 100%;">' +
|
'<div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;">分段</div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;">设置成长值</div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;">操作</div></div>';
|
v = v.splice(0, v.length - 1);
|
for(var i in v){
|
if(tips == 'have_you_completed_the_XX_task'){//任务
|
var ajax = new $ax(Feng.ctxPath + "/task/getTaskList", function (res) {
|
if(res.code == 200){
|
str += '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" style="height: 100%;" class="selectpicker form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">';
|
var data = res.data;
|
var vs = v[i].v;
|
for(var j in data){
|
var b = '';
|
for(var h in vs){
|
if(vs[h] == data[j].id){
|
b = 'selected';
|
break
|
}
|
}
|
str += '<option value="' + data[j].id + '" ' + b + '>' + data[j].name + '</option>';
|
}
|
str += '</select></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" value="' + v[i].s + '" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
}else{
|
Feng.error(res.msg);
|
}
|
}, function (data) {
|
Feng.error("获取失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set();
|
ajax.start();
|
}
|
// if(tips == 'gas_station'){//加油站
|
// var ajax = new $ax(Feng.ctxPath + "/gasStation/queryList", function (res) {
|
// if(res.code == 200){
|
// str += '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" style="height: 100%;" class="selectpicker show-tick form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">';
|
// var data = res.data;
|
// var vs = v[i].v;
|
// for(var j in data){
|
// var b = '';
|
// for(var h in vs){
|
// if(vs[h] == data[j].id){
|
// b = 'selected';
|
// break
|
// }
|
// }
|
// str += '<option value="' + data[j].id + '" ' + b + '>' + data[j].name + '</option>';
|
// }
|
// str += '</select></div>' +
|
// '<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" value="' + v[i].s + '" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
// '<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
// }else{
|
// Feng.error(res.msg);
|
// }
|
// }, function (data) {
|
// Feng.error("获取失败!" + data.responseJSON.message + "!");
|
// });
|
// ajax.set();
|
// ajax.start();
|
// }
|
// if(tips == 'refueling_number'){//油号
|
// var arr = [{'id': -10, 'name': '-10#柴油'}, {'id': 0, 'name': '0#柴油'}, {'id': 92, 'name': '92#汽油'}, {'id': 95, 'name': '95#汽油'}, {'id': 98, 'name': '98#汽油'}];
|
// str += '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" class="selectpicker show-tick form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">';
|
// var vs = v[i].v;
|
// for(var j in arr){
|
// var b = '';
|
// for(var h in vs){
|
// if(vs[h] == arr[j].id){
|
// b = 'selected';
|
// break
|
// }
|
// }
|
// str += '<option value="' + arr[j].id + '" ' + b + '>' + arr[j].name + '</option>';
|
// }
|
// str += '</select></div>' +
|
// '<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" value="' + v[i].s + '" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
// '<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
// }
|
}
|
|
str += ' </div>' +
|
' <button onclick="addContent(\'' + tips + '\')">添加</button>\n' +
|
' </div>'
|
}else{
|
if(type != 1){
|
Feng.error("请选择【是】条件类型");
|
return
|
}
|
}
|
layer.open({
|
type: 1
|
, title: ''
|
, area: [widht, height]
|
, offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
|
, id: 'layerDemo' //防止重复弹出
|
, content: '<div style="padding: 20px">' + str + '</div>'
|
, btn: ['保存', '取消']
|
, btnAlign: 'c' //按钮居中
|
, shade: 0.5 //不显示遮罩
|
, yes: function () {
|
if(tips == 'the_number_of_days_to_visit_the_applet' || tips == 'the_number_of_days_to_visit_the_applet_activity' || tips == 'number_of_visits_to_the_applet'
|
|| tips == 'number_of_visits_to_the_applet_activity' || tips == 'check-in_days' || tips == 'consecutive_check-in_days' || tips == 'refueling_number' || tips == 'whether_to_refuel'
|
|| tips == 'amount_of_non-oil_commodities'){
|
let oil = $('#oil').val();
|
let condition = $('#condition').val();
|
let score = $('#score').val();
|
let unit = $('#unit').val();
|
if(tips != 'refueling_number' && ('' == condition || '' == score)){
|
Feng.error("请配置规则内容");
|
return
|
}
|
if(tips == 'refueling_number' && (null == oil || '' == condition || '' == score)){
|
Feng.error("请配置规则内容");
|
return
|
}
|
let arr = [];
|
arr.push({
|
o: oil == null ? '' : oil,
|
u: unit,
|
v: [condition],
|
s: score
|
})
|
$(e).parents('tr').find('.content').attr('v', JSON.stringify(arr))
|
editVipGrowthRules(e);
|
}
|
if(tips == 'have_you_completed_the_XX_task'){
|
var defaultBranch = $('#defaultBranch').val();
|
if('' == defaultBranch){
|
Feng.error("默认成长值不能为空");
|
return
|
}
|
var roww = $('#content .roww');
|
if(roww.length == 0){
|
Feng.error("请配置规则内容");
|
return
|
}
|
var arr = [];
|
let b = false;
|
roww.each(function (i, e) {
|
var v = $(e).find('select').val();
|
var s = $(e).find('input').val();
|
if(null == v || v == '' || s == ''){
|
b = true;
|
return false
|
}
|
if(null != v || v != '' && '' != s){
|
arr.push({
|
v: v,
|
s: s
|
})
|
}
|
})
|
if(b){
|
Feng.error("请填写完整的配置");
|
return
|
}
|
arr.push({
|
v: ['0'],
|
s: defaultBranch
|
})
|
$(e).parents('tr').find('.content').attr('v', JSON.stringify(arr))
|
editVipGrowthRules(e);
|
}
|
layer.closeAll();
|
},
|
});
|
$('.selectpicker').selectpicker();
|
}
|
|
|
function addContent(tips) {
|
var str = '';
|
if(tips == 'have_you_completed_the_XX_task'){//任务
|
var ajax = new $ax(Feng.ctxPath + "/task/getTaskList", function (res) {
|
if(res.code == 200){
|
str = '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" style="height: 100%;" class="selectpicker form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">';
|
var data = res.data;
|
for(var i in data){
|
str += '<option value="' + data[i].id + '">' + data[i].name + '</option>';
|
}
|
str += '</select></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
}else{
|
Feng.error(res.msg);
|
}
|
}, function (data) {
|
Feng.error("获取失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set();
|
ajax.start();
|
}
|
if(tips == 'gas_station'){//加油站
|
var ajax = new $ax(Feng.ctxPath + "/gasStation/queryList", function (res) {
|
if(res.code == 200){
|
str = '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" style="height: 100%;" class="selectpicker show-tick form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">';
|
var data = res.data;
|
for(var i in data){
|
str += '<option value="' + data[i].id + '">' + data[i].name + '</option>';
|
}
|
str += '</select></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
}else{
|
Feng.error(res.msg);
|
}
|
}, function (data) {
|
Feng.error("获取失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set();
|
ajax.start();
|
}
|
if(tips == 'refueling_number'){//油号
|
str = '<div style="height: 40px;width: 100%;" class="roww"><div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><select name="selectpicker" class="selectpicker show-tick form-control" multiple data-style="btn-primary" data-none-selected-text="请选择">' +
|
'<option value="-10">-10#柴油</option>' +
|
'<option value="0">0#柴油</option>' +
|
'<option value="92">92#汽油</option>' +
|
'<option value="95">95#汽油</option>' +
|
'<option value="98">98#汽油</option>' +
|
'</select></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow(this)">删除</a></div></div>';
|
}
|
$('#content').append(str);
|
$('.selectpicker').selectpicker();
|
}
|
|
function removeRow(e) {
|
$(e).parents('.roww').remove();
|
}
|
|
|
function addContent1() {
|
var roww = $('#content .roww');
|
var v = $($(roww[roww.length - 1]).find('input')[1]).val();
|
if('' == v){
|
Feng.error("请填写完整的配置");
|
return
|
}
|
if(typeof v == "undefined"){
|
v = 0;
|
}
|
var str = '<div style="height: 40px;width: 100%;" class="roww">' +
|
'<div style="float: left;width: 50%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;" value="' + v + '" readonly> - <input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;" onblur="editMinNumber(this)"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><input type="number" min="0" style="height: 90%;border: 1px solid #eee;text-indent: 10px;"></div>' +
|
'<div style="float: left;width: 25%;height: 100%;line-height: 40px;text-align: center;border: 1px solid #eee;"><a style="color: red;" onclick="removeRow1(this)">删除</a></div></div>';
|
$('#content').append(str);
|
}
|
|
|
|
|
function removeRow1(e) {
|
var v = $($(e).parents('.roww').find('input')[0]).val();
|
$($($(e).parents('.roww')).next().find('input')[0]).val(v)
|
$(e).parents('.roww').remove();
|
}
|
|
|
|
function editMinNumber(e) {
|
var v1 = $(e).siblings('input').val();
|
var v2 = $(e).val();
|
if(parseFloat(v1) > parseFloat(v2)){
|
Feng.error("请填写正确的数值范围");
|
$(e).val('');
|
return
|
}
|
}
|
|
function delVipGrowthRules(id) {
|
var operation = function () {
|
var ajax = new $ax(Feng.ctxPath + "/vipGrowthRules/delVipGrowthRules", function (data) {
|
if(data.code == 200 ){
|
Feng.success("删除成功!");
|
getVipGrowthRules();
|
}else{
|
Feng.error(data.msg);
|
}
|
}, function (data) {
|
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set("id", id);
|
ajax.start();
|
};
|
|
Feng.confirm("是否刪除该配置?", operation);
|
}
|
|
|
/**
|
* 添加数据
|
*/
|
function addVipGrowthRules() {
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/vipGrowthRules/addVipGrowthRules", function (data) {
|
if(data.code == 200){
|
Feng.success("添加成功!");
|
getVipGrowthRules();
|
}else{
|
Feng.error(data.msg);
|
}
|
}, function (data) {
|
Feng.error("添加失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set({});
|
ajax.start();
|
}
|