//公共效果
$(function(){
	insureSelectChange ('2');
});

function queryPartnerType(){
	var partnerType=$("#partnerType").val();
	var stateDate = $("#stateDate").val();
	var endDate = $("#endDate").val();
//	if(partnerType != '' || (stateDate !='' && endDate !='')){
//		SkipByPost("queryDirectPayReceResult.do",{partnerType:partnerType,stateDate:stateDate,endDate:endDate});
//	}
	$("#list").html("");
	$.ajax({  
        type: "POST",  
        async: false, 
        url: "queryDirectPayReceResult.do", 
        data: {"partnerType":partnerType,"stateDate":stateDate,"endDate":endDate},  
        success: function(data){
        	for(var i = 0;i<data.length;i++){
        		var n = data[i];       		
        		$("#list").append("<tr><td  onclick=\"detailPage()\" style=\"cursor: pointer;\"  >"+n.partnerType+"</td><td>"+n.amtTotal+"</td></tr>");
        	}
        }  
    });	
}
function insureSelectChange (value){
	$("#partnerType").attr("value",value);
}
function detailPage(partnerType){
	var partnerType=$("#partnerType").val();
	var stateDate = $("#stateDate").val();
	var endDate = $("#endDate").val();
	SkipByPost("queryDirectPayReceDetailResult.do",{partnerType:partnerType,stateDate:stateDate,endDate:endDate});
}