function queryAccountCheckList(){
	var startDate = $("#startDate").val();
	var endDate = $("#endDate").val();
	
	if((startDate == '' || startDate == null) || (endDate == '' || endDate == null)){
		alert('对账时间不能为空!');
		return false;
	}
	
	if(endDate < startDate){
		alert('结束时间不能小于开始时间');
		return false;
	}

	$("#isQuery").val("");
	$("#isQuery").val("1");
	
	var url = getRootPath() + "/accountchecklist/queryAccountCheckList.do";
	document.forms["form1"].action = url;
	document.forms["form1"].submit();
}

function exportAccountCheckList(){
	var size = $("#size").val();
	if(size == 0){
		alert('未查询出数据，无法导出');
		return false;
	}
	
	var url = getRootPath() + "/accountchecklist/exportAccountCheckList.do";
	document.forms["form1"].action = url;
	document.forms["form1"].submit();
}

//翻页
function cur_skip(s,e){
	
	var pn = $(e).find("span").html();
	var startDate = $("#startDate").val();
	var endDate = $("#endDate").val();
	var outsourcerNo = $("#outsourcerNo").val();
	var channelType = $("#channelType").val();
	var isAllOk = $("#isAllOk").val();
	
	if(s=="1"){
		SkipByPost("queryAccountCheckList.do", {
			pageNo : pn,
			startDate : startDate,
			endDate : endDate,
			outsourcerNo : outsourcerNo,
			channelType : channelType,
			isAllOk : isAllOk
			
		});
	}
	else if(s=="2"){
		SkipByPost("queryAccountCheckList.do",{pageNo:pn});
	}
	$(".turn_cur").removeAttr("class");
	$(e).find("span").attr("class","turn_cur");
}

//前一页
function pre(s,e){
	var cur = $("#nav").find(".turn_cur").html();
	var startDate = $("#startDate").val();
	var endDate = $("#endDate").val();
	var outsourcerNo = $("#outsourcerNo").val();
	var channelType = $("#channelType").val();
	var isAllOk = $("#isAllOk").val();
	
	if(cur==1){
		return;
	}		
	if(cur>1){
	var pre = Number(cur)-Number(1);
	if(s=="1"){
		SkipByPost("queryAccountCheckList.do", {
			
			pageNo : pre,
			startDate : startDate,
			endDate : endDate,
			outsourcerNo : outsourcerNo,
			channelType : channelType,
			isAllOk : isAllOk
			
		});
	}
		else if(s=="2"){
		SkipByPost("queryAccountCheckList.do",{pageNo:pre});
		}
	}
}
//下一页

function next(s,e){
	var cur = $("#nav").find(".turn_cur").html();
	var next = Number(cur)+Number(1);
	var maxPage = $("#max").val();
	var startDate = $("#startDate").val();
	var endDate = $("#endDate").val();
	var outsourcerNo = $("#outsourcerNo").val();
	var channelType = $("#channelType").val();
	var isAllOk = $("#isAllOk").val();
	
	
	if(parseInt(cur)==parseInt(maxPage)){			
		return;
	}
	
	if(parseInt(cur)<parseInt(maxPage)){
		if(s=="1"){
			SkipByPost("queryAccountCheckList.do",{
				pageNo:next,
				startDate : startDate,
				endDate : endDate,
				outsourcerNo : outsourcerNo,
				channelType : channelType,
				isAllOk : isAllOk

				});
			}
			else if(s=="2"){
			SkipByPost("queryAccountCheckList.do",{pageNo:next});
			}
	}
}

//跳转至
function custom(s){		
	
	var maxPage = $("#max").val();
	var pn = $.trim($("#turn_inp").val());
	var startDate = $("#startDate").val();
	var endDate = $("#endDate").val();
	var outsourcerNo = $("#outsourcerNo").val();
	var channelType = $("#channelType").val();
	var isAllOk = $("#isAllOk").val();
	
	if(isNaN(pn)){
		return ;
	}
	if(pn == "") {
		return;
	}
	if(Number(pn)==0){
		return;
	}	
	if(Number(pn) > Number(maxPage)){
		return;
	}	
	if(s=="1"){
		SkipByPost("queryAccountCheckList.do",{
			pageNo:Number(pn),
			startDate : startDate,
			endDate : endDate,
			outsourcerNo : outsourcerNo,
			channelType : channelType,
			isAllOk : isAllOk
			});
		}
		else if(s=="2"){
		SkipByPost("queryAccountCheckList.do",{pageNo:Number(pn)});
		}
}