2.最重要也是最核心的是要自己改下bootstrap-paginator.js源文件,如下:
[javascript] view plain copy
- function oneferReportrePaintLine(param,type,page){
var time = param.name;
var fareType =type;
var beginDate = "$!startDate";
var typeF=fareAdapter(fareType);
jQuery.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
var key = options.url;
if (!pendingRequests[key]) {
pendingRequests[key] = jqXHR;
}else{
//jqXHR.abort(); //放弃后触发的提交
pendingRequests[key].abort(); // 放弃先触发的提交
}
});
jQuery.ajax({
type:‘post‘,
url:"common/action.do?action=OneferOperationReportAction&eventSubmitDoLineQuery=true",
dataType:‘json‘,
data:{"beginDate": beginDate, "time" : time,"data":data,"fareType":typeF,"currentPage":page},
cache:false,
success:function(data){
var htmlCount="<span class=‘label label-info‘>"+"</span>条结果";
if (data.statu){
var datalist = data.results;
for(var i=0;i<datalist.length;i++){
var html="";
- var d = datalist[i];
html="";
- }
OnChanged(data.currentPage,data.totalPage);
$("#countDiv").html(htmlCount);
$("#detailDiv").html(html);
}else {
var html="<div style=‘text-align:center;line-height: 60px;‘>"
+"<b style=‘color: red;font-size:14px;‘>"
+data.erroMessage
+"</b></div>";
bootS(data.currentPage,data.totalPage);
$("#countDiv").html(htmlCount);
$("#detailDiv").html(html);
}
},
error:function(){
alert("请稍侯再尝试,请勿重复提交!!!")
}
});
}
$("#countDiv").html(htmlCount);和$("#detailDiv").html(html);绑定的Id参考下图