备注bug修改

master
zhengyongxing 4 years ago
parent 9bec07c7d4
commit af5aad352a

@ -375,27 +375,60 @@
});
</if>
$(".no_statement").on("click",function(){
var id = $(this).data('id');
$.ajax({
type: "POST",
url: "{:U('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
saveForm(id);
});
var return_data = "";
function saveForm(id) {
var options = {
url:"{:U('editCompanyStatementPool')}", //同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('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
});
});
var return_data = "";
};
$("#form").ajaxSubmit(options);
}
$("#submit").click(function(){
var options = {
url:"{:U('editCompanyStatementPool')}", //同action

Loading…
Cancel
Save