<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>

<link rel="stylesheet" href="${contextPath}/static/assets/css/jquery.gritter.css" />
<link rel="stylesheet" href="${contextPath}/static/assets/css/bootstrap-datetimepicker.css" />

<!-- ajax layout which only needs content area -->
<div class="page-header">
	<h1>
			<div id="totalStatistics"></div>
		
	</h1>
</div><!-- /.page-header -->


<!-- PAGE CONTENT BEGINS -->
<div class="row">
	<div class="well">
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row11">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">律师分布（省）</span>
			</span>
		</a>	
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row12">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">律师分布（市）</span>
			</span>
		</a>
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row13">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">接单律师分布（省）</span>
			</span>
		</a>	
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row14">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">接单律师分布（市）</span>
			</span>
		</a>
	</div>
</div><!-- /.row -->
<div class="row">
	<div class="well">
		开始日期：<input id="startDate" type="text">
		<!-- 结束日期：<input id="endDate" type="text"> -->
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row21">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">接单申请统计</span>
			</span>
		</a>
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row22">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">认证成功统计</span>
			</span>
		</a>
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row23">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">律师注册统计</span>
			</span>
		</a>
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row24">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">认证成功详细</span>
			</span>
		</a>
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row25">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">认证失败详细</span>
			</span>
		</a>
	</div>
</div><!-- /.row -->
<div class="row">
	<div class="well">
		<div>
		律师手机：<input id="mobile" type="text">
		<a data-toggle="tab" href="javascript:void(0)" class="btn-new-mail" id="row31">
			<span class="btn btn-purple no-border">
				<span class="bigger-110">案例信息</span>
			</span>
		</a>
		</div>
		<div id="result31"></div>
	</div>
</div>
<div id="show" style="display:none;">数据统计中，请稍等...</div>	
<!-- PAGE CONTENT ENDS -->
	

<!-- page specific plugin scripts -->
<style type="text/css">
	#show{display: none;  position: absolute; left: 35%;  width: 400;  height: 60;  padding: 8px;  border: 8px solid #E8E9F7;  background-color: white;  z-index:1002;  overflow: auto;}
	</style>
<script type="text/javascript">
	var scripts = [null,"${contextPath}/static/assets/js/bootstrap-tag.js","${contextPath}/static/assets/js/jquery.hotkeys.js","${contextPath}/static/assets/js/date-time/bootstrap-datepicker.js","${contextPath}/static/assets/js/date-time/locales/bootstrap-datepicker.zh-CN.js",null]
	$(".page-content-area").ace_ajax("loadScripts", scripts, function() {
		jQuery(function($){
			$("#row11").click(row11);
			$("#row12").click(row12);
			$("#row13").click(row13);
			$("#row14").click(row14);
			$("#row21").click(row21);
			$("#row22").click(row22);
			$("#row23").click(row23);
			$("#row24").click(row24);
			$("#row25").click(row25);
			$("#row31").click(row31);
			$('#startDate').datepicker({
		        language: 'zh-CN',
		        pickTime: false,
		        todayBtn: true,
		        autoclose: true,
		        minView: '2',
		        forceParse: false,
		        format:"yyyy-mm-dd"
		    });
			/* $('#endDate').datepicker({
		        language: 'zh-CN',
		        pickTime: false,
		        todayBtn: true,
		        autoclose: true,
		        minView: '2',
		        forceParse: false,
		        format:"yyyy-mm-dd"
		    }); */
			$.post("${contextPath}/sys/lawyer/totalStatistics", {}, function(result){
				/* 2018/08/21 修改  申请总数改为 申请认证总数    接单律师总数 先隐藏
				   $("#totalStatistics").html("律师总数："+result.a+"，申请认证总数："+result.c+"，认证成功总数："+result.d+"，接单律师总数："+result.b);
				*/

                $("#totalStatistics").html("律师总数："+result.a+"，申请认证总数："+result.c+"，认证成功总数："+result.d);
			});
		});	
	});
	
	function showdiv() {            
        document.getElementById("show").style.display ="block";
        $(".btn").attr({"disabled":"disabled"});
    }
	function hidediv() {
        document.getElementById("show").style.display ='none';
        $(".btn").removeAttr("disabled");
    }
	
	function row11(){
		window.open('${contextPath}/sys/lawyer/getLawyerDistr?mark=provice');
	}
	
	function row12(){
		window.open('${contextPath}/sys/lawyer/getLawyerDistr?mark=city');
	}
	
	function row13(){
		window.open('${contextPath}/sys/lawyer/getLawyerDistr?mark=provice&orderFlag=1');
	}
	
	function row14(){
		window.open('${contextPath}/sys/lawyer/getLawyerDistr?mark=city&orderFlag=1');
	}
	
	function row21(){
		var startDate = $("#startDate").val();
		//var endDate = $("#endDate").val();
		if(startDate==''){
			alert('开始日期不能为空！');
			return;
		}
		window.open('${contextPath}/sys/lawyer/getLawyerStatices?type=apply&startDate='+startDate);
	}
	
	function row22(){
		var startDate = $("#startDate").val();
		//var endDate = $("#endDate").val();
		if(startDate==''){
			alert('开始日期不能为空！');
			return;
		}
		window.open('${contextPath}/sys/lawyer/getLawyerStatices?type=confirm&startDate='+startDate);
	}
	
	function row23(){
		var startDate = $("#startDate").val();
		//var endDate = $("#endDate").val();
		if(startDate==''){
			alert('开始日期不能为空！');
			return;
		}
		window.open('${contextPath}/sys/lawyer/getLawyerStatices?type=regist&startDate='+startDate);
	}
	
	function row24(){
		var startDate = $("#startDate").val();
		//var endDate = $("#endDate").val();
		if(startDate==''){
			alert('开始日期不能为空！');
			return;
		}
		window.open('${contextPath}/sys/lawyer/getLawyerStatices?type=confirmDetail&startDate='+startDate);
	}
	
	function row25(){
		var startDate = $("#startDate").val();
		//var endDate = $("#endDate").val();
		if(startDate==''){
			alert('开始日期不能为空！');
			return;
		}
		window.open('${contextPath}/sys/lawyer/getLawyerStatices?type=failDetail&startDate='+startDate);
	}
	function row31(){
		 var htmlobj=$.ajax({url:"${contextPath}/sys/lawyer/getCaseInfo?mobile="+$("#mobile").val(),async:false});
		 $("#result31").html(htmlobj.responseText);
	}
</script>
