ajax函数加入遮罩层

This commit is contained in:
wangxin
2018-07-10 09:49:30 +08:00
parent 74246e1f1f
commit c7fa2d3a94

View File

@@ -33,9 +33,9 @@
$("a[data-toggle='tab']").on("click",function(){ $("a[data-toggle='tab']").on("click",function(){
$("#reportBusinessType").val($(this).data("bussiness")); $("#reportBusinessType").val($(this).data("bussiness"));
if(!$(this).parent("li").hasClass("active")){ if(!$(this).parent("li").hasClass("active")){
var action=$('select[name="action"]').val(); //var action=$('select[name="action"]').val();
var reportBusinessType=$("#reportBusinessType").val(); //var reportBusinessType=$("#reportBusinessType").val();
var reportType=$('input[name="reportType"]:checked').val(); //var reportType=$('input[name="reportType"]:checked').val();
if($(this).data("bussiness")=="label_report"){ if($(this).data("bussiness")=="label_report"){
ajaxGetLabelReport(); ajaxGetLabelReport();
}else if($(this).data("bussiness")=="lwhh_report"){ }else if($(this).data("bussiness")=="lwhh_report"){
@@ -45,6 +45,7 @@
}); });
}); });
var ajaxGetLabelReport=function(){ var ajaxGetLabelReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({ $.ajax({
type:'post', type:'post',
async:false, async:false,
@@ -56,10 +57,12 @@ var ajaxGetLabelReport=function(){
dataType:"html", dataType:"html",
success:function(data){ success:function(data){
$("#label").html(data); $("#label").html(data);
closeTip();
} }
}); });
} }
var ajaxGetLwhhReport=function(){ var ajaxGetLwhhReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({ $.ajax({
type:'post', type:'post',
async:false, async:false,
@@ -71,6 +74,7 @@ var ajaxGetLwhhReport=function(){
dataType:"html", dataType:"html",
success:function(data){ success:function(data){
$("#lwhh").html(data); $("#lwhh").html(data);
closeTip();
} }
}); });
} }