/***********表格条件查询 action*********/
//提交查询
function form_submit(page){
$('.submit_btn').html("正在查询");
var report_user=$("#report_user").val();
var start_time=$("#start_time").val();
var end_time=$("#end_time").val();
var options=$("#channel_id option:selected");
var channel_id=options.val();
var data=new Object();
data.report_user=report_user;
data.start_time=start_time;
data.end_time=end_time;
data.page=page;
data.channel_id=channel_id;
var tablehtml="<thead><tr><th>事件号</th><th>上报人姓名</th><th>事件类型</th><th>上报时间</th><th>处理人</th></tr></thead><tbody id='afterhtml'>"
$.ajax({
url: requesturl+"/portal/report",
type: "POST",
data: JSON.stringify(data),
datatype:'json',
contentType : "application/json",
success:function(result){
console.log(result);
if(result['return_dict']){
for(i=0;i<result['return_dict']['row'].length;i++){
tablehtml+="<tr><td><a target='_blank' href='"+requesturl+"/MailLinkDeal.aspx?Url=&Event_Code="+result['return_dict']['row'][i]['ita_event_code']+"&Type=1'>"+result['return_dict']['row'][i]['ita_event_code']+"</a></td><td>"
+result['return_dict']['row'][i]['ita_report_name']+"</td><td>"
+result['return_dict']['row'][i]['ita_channel_name']+"</td><td>"
+result['return_dict']['row'][i]['ita_submit_time']+"</td><td>"
+result['return_dict']['row'][i]['ita_solve_user']+"</td>"
+"</tr>"
};
tablehtml+="</tbody>";
$("#tablehtml").html(tablehtml);
var total_page=result['return_dict']['total_page'];
var page=result['return_dict']['page'];
// var page=
console.log(total_page);
$.jqPaginator('#pagination', {
totalPages: total_page,
visiblePages: 5,
currentPage: page,
onPageChange: function (num, type) {
$('#p1').text('总页数'+total_page +':共' + num+"条");
data.page=num;
afterhtml="";
$.ajax({
url: requesturl+"/portal/report",
type: "POST",
data: JSON.stringify(data),
datatype:'json',
contentType : "application/json",
success:function(result){
if(result['return_dict']['row']){
for(i=0;i<result['return_dict']['row'].length;i++){
afterhtml+="<tr><td><a target='_blank' href='"+requesturl+"/MailLinkDeal.aspx?Url=&Event_Code="+result['return_dict']['row'][i]['ita_event_code']+"&Type=1'>"+result['return_dict']['row'][i]['ita_event_code']+"</a></td><td>"
+result['return_dict']['row'][i]['ita_report_name']+"</td><td>"
+result['return_dict']['row'][i]['ita_channel_name']+"</td><td>"
+result['return_dict']['row'][i]['ita_submit_time']+"</td><td>"
+result['return_dict']['row'][i]['ita_solve_user']+"</td>"
+"</tr>"
$('.submit_btn').html("提 交");
};
}else{
$('.submit_btn').html("提 交");
alert('没有相关数据');
}
document.getElementById("afterhtml").innerHTML=afterhtml;
}
})
}
});
}else{
$('.submit_btn').html("提 交");
alert('没有相关数据');
}
}
});
}
/***********表格条件查询 end*********/
/***********无条件查询 action*********/
$.ajax({
type:'GET',
url:requesturl+'/portal/1',
dataType:'json',
success:function(data){
$("#year_num").html("年处理:"+data['context']['year_data']);
$("#month_num").html("月处理:"+data['context']['month_data']);
$("#day_num").html("日处理:"+data['context']['today_data']);
},
error:function() {
alert("请求出错!");
}
});
/***********无条件查询 end*********/