JS代码
exportExcel = function (type) {
var obj=JSON.stringify($("#searchForm").serializeJSON());
$.ajax({
//这里是公共方法的衔接
url: "exportExcelController/submitExcelData.action",
type: "post",
dataType: "json",
data:"obj="+obj,
success: function (data) {
if (data&&data.code=="1") {
//这里是每一个JavaBean对应的掌握层方法
window.location.href = "dogController/export.action";
//我们这里缺乏导出胜利的提醒,有须要的自行想方法添加
} else {
$.messager.show({
title:"提醒",
msg:"导出失败~",
timeout:3000,
showType:"slide"
});
}
},
error: function (err) {
$.messager.show({
title:"提醒",
msg:"导出失败~",
timeout:3000,
showType:"slide"
});
}
});
};exportExcel = function (type) {
var ob