|
|
|
@ -397,51 +397,52 @@
|
|
|
|
|
var id = $(this).data('id');
|
|
|
|
|
var st = $(this).data('st');
|
|
|
|
|
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
|
|
|
|
|
var options = {
|
|
|
|
|
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
|
|
|
|
type:'post',
|
|
|
|
|
beforeSend:function(xhr){
|
|
|
|
|
},
|
|
|
|
|
success:function(data)
|
|
|
|
|
{
|
|
|
|
|
return_data = data;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
complete:function(data){
|
|
|
|
|
if(return_data.status==1){
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('splitRewardOrFailData')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {id: id, st: st, pool_id: pool_ids},
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}, 1500);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
var options = {
|
|
|
|
|
url:"{:U('editCompanyStatementPoolPc')}", //同action
|
|
|
|
|
type:'post',
|
|
|
|
|
beforeSend:function(xhr){
|
|
|
|
|
},
|
|
|
|
|
success:function(data)
|
|
|
|
|
{
|
|
|
|
|
return_data = data;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
complete:function(data){
|
|
|
|
|
if(return_data.status==1){
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('splitRewardOrFailData')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
data: {id: id, st: st, pool_id: pool_ids},
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}, 1500);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error: function(xhr,status,msg){
|
|
|
|
|
//alert("状态码"+status+"; "+msg)
|
|
|
|
|
layer.msg('玩命加载中..');
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error: function(xhr,status,msg){
|
|
|
|
|
//alert("状态码"+status+"; "+msg)
|
|
|
|
|
layer.msg('玩命加载中..');
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$("#form").ajaxSubmit(options);
|
|
|
|
|
});
|
|
|
|
|
$("#form").ajaxSubmit(options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|