Commit a66f8665 authored by 季圣华's avatar 季圣华
Browse files

优化账户界面

parent 2d237fcd
...@@ -425,27 +425,32 @@ ...@@ -425,27 +425,32 @@
if (checkAccountName()) { if (checkAccountName()) {
return; return;
} }
$.ajax({ if(!$('#accountFM').form('validate')){
url: url, return;
type: "post", }
dataType: "json", else {
data: ({ $.ajax({
info: JSON.stringify($("#accountFM").serializeObject()) url: url,
}), type: "post",
success: function(res) { dataType: "json",
if(res && res.code === 200) { data: ({
$('#accountDlg').dialog('close'); info: JSON.stringify($("#accountFM").serializeObject())
//加载完以后重新初始化 }),
var opts = $("#tableData").datagrid('options'); success: function (res) {
showAccountDetails(opts.pageNumber, opts.pageSize); if (res && res.code === 200) {
$('#accountDlg').dialog('close');
//加载完以后重新初始化
var opts = $("#tableData").datagrid('options');
showAccountDetails(opts.pageNumber, opts.pageSize);
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存结算账户异常,请稍后再试!', 'error');
return;
} }
}, });
//此处添加错误处理 }
error: function () {
$.messager.alert('提示', '保存结算账户异常,请稍后再试!', 'error');
return;
}
});
}); });
//编辑结算账户 //编辑结算账户
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment