ajax调用tag单独提出为一个函数
This commit is contained in:
@@ -18,19 +18,9 @@
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
if(!"${bean.reportBusinessType}"){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/report/ajaxNtcTagReport',
|
||||
data:{
|
||||
"action":$('select[name="action"]').val(),
|
||||
"reportType":$('input[name="reportType"]:checked').val()
|
||||
},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
$("#label").html(data);
|
||||
}
|
||||
});
|
||||
ajaxGetLabelReport();
|
||||
}else if("${bean.reportBusinessType}"=="label_report"){
|
||||
ajaxGetLabelReport();
|
||||
}
|
||||
$("input[name='reportType']").each(function(){
|
||||
var type='${bean.reportType}';
|
||||
@@ -45,24 +35,26 @@
|
||||
var reportBusinessType=$("#reportBusinessType").val();
|
||||
var reportType=$('input[name="reportType"]:checked').val();
|
||||
if($(this).data("bussiness")=="label_report"){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/report/ajaxNtcTagReport',
|
||||
data:{
|
||||
"action":action,
|
||||
"reportType":reportType
|
||||
},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
$("#label").html(data);
|
||||
}
|
||||
});
|
||||
ajaxGetLabelReport();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var ajaxGetLabelReport=function(){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/report/ajaxNtcTagReport',
|
||||
data:{
|
||||
"action":$('select[name="action"]').val(),
|
||||
"reportType":$('input[name="reportType"]:checked').val()
|
||||
},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
$("#label").html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user