function querypaymentBills() {
	$("#content").html("");
	var beginDate=$("#beginDate").val();
	var endDate=$("#endDate").val();
	var paymentPesron = $("#paymentPesron").val();
	var claimNo = $("#claimNo").val();
	var assessor=$("#assessor").val();
	//var claimBatchNo=$("#claimBatchNo").val();
	var isBpo = $("#isBpo").find(".sel_text").attr("code");
	var caseSource = $("#claimSource").find(".sel_text").attr("code");
	var claimAttr = $("#claimAttr").find(".sel_text").attr("code");
	if(isBpo!=""||caseSource!=""||claimAttr!=""){
		if(beginDate==""&&endDate==""){
			alert("请输入结案日期");
			return false;
		}
	}
	if(beginDate==""&&endDate!=""){
		alert("请录入起期");
		return false;
	}
	if(beginDate!=""&&endDate==""){
		alert("请录入止期");
		return false;
	}
	
	if(paymentPesron!=""){
		if(beginDate==""&&endDate==""){
			alert("请输入结案日期");
			return false;
		}
	}
	if(assessor!=""){
		if(beginDate==""&&endDate==""){
			alert("请输入结案日期");
			return false;
		}
	}
	if(beginDate>endDate){
		alert("结案起期不能大于结案止期");
		return false;
	}
	if(beginDate==""&&endDate==""&&claimNo==""){
		alert("结案日期与赔案号两者必录其一");
		return false;
	}

	$.ajax({
		type:"POST",
		url:"/claimserver/payment/querypaymentBills.do",
		data:{"beginDate":beginDate ,"endDate":endDate,"paymentPesron":paymentPesron,"assessor":assessor,"claimNo":claimNo,"isBpo":isBpo,"caseSource":caseSource,"claimAttr":claimAttr/*,"claimBatchNo":claimBatchNo*/},
		error :function(){
			alert("服务器异常请稍后重试");
			return false;
		},
		success :function(data){
			if(data==""){
				$("#content").html("<tr ><td ></td><td></td><td></td><td></td><td></td><td></td><td id='yujykuy'>查询不到相关内容，请检查查询条件</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>");
			}
			for ( var i = 0; i < data.length; i++) {
				$("#content").append("<tr><td class='claimno'>"+noNull(data[i].claimno)+"</td><td>"+
						noNull(data[i].auditor)+"</td><td>"+noNull(data[i].pname)+"</td><td>"+noNull(data[i].pid)+"</td><td>"+noNull(data[i].policyNo)+"</td><td>"+
						noNull(data[i].claimPayAmtTotal)+"</td><td>"+noNull(data[i].endDate)+"</td><td>"+
						noNull(data[i].claimPayeeName)+"</td><td>"+noNull(data[i].bankName)+"</td><td>"+noNull(data[i].bankAccountNo)+"</td><td>"
						+noNull(data[i].bankType)+"</td><td>"+noNull(data[i].isBpo)+"</td><td>"+noNull(data[i].claimSource)+"</td><td>"+noNull(data[i].branchName)+"</td><td>"+noNull(data[i].claimAttr)+"</td></tr>");
			}
		}
		
	});
	
	
}

function noNull(a){
	return a == null || a == "" ? "" : a;
}

function excelExport(){
	var content=$("#content").html().trim();
	if(content==""){
		alert("无导出数据");
		return false;
	}
	if($("#yujykuy")!=""&&$("#yujykuy").html()!=null){
		alert("无导出数据");
		return false;
	}
	
	var beginDate=$("#beginDate").val();
	var endDate=$("#endDate").val();
	var paymentPesron = $("#paymentPesron").val();
	var claimNo = $("#claimNo").val();
	var assessor=$("#assessor").val();
	var isBpo = $("#isBpo").find(".sel_text").attr("code");
	var caseSource = $("#claimSource").find(".sel_text").attr("code");
	var claimAttr = $("#claimAttr").find(".sel_text").attr("code");
	
	
//	var beginDate=$("#beginDate").val();
//	var endDate=$("#endDate").val();
//	var paymentPesron = $("#paymentPesron").val();
//	var claimNo = $("#claimNo").val();
//	var assessor=$("#assessor").val();
	if(confirm("是否导出？")==true){
		SkipByPost("/claimserver/payment/excelExport.do",{caseSource:caseSource,claimAttr:claimAttr,isBpo:isBpo,beginDate:beginDate ,endDate:endDate,paymentPesron:paymentPesron,assessor:assessor,claimNo:claimNo});
	}
	
}