14f90cf2ac913cc7d47057e8a56833f6c8b597d0.svn-base 5.94 KB
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>
权利人人像比对管理
</title>
<meta name="decorator" content="default" />
<script src="${ctxStatic}/jquery/jquery.webcam.min.js" type="text/javascript"></script>
<link href="${ctxStatic}/gis/lib/layer.css" type="text/css" rel="stylesheet" />
	<script src="${ctxStatic}/gis/lib/layer.js" type="text/javascript"></script>
<script type="text/javascript">
   $(document).ready(
       function(){
		window.opener.parent.document.picname.location.reload();
	})
  function takephoto(ywh,sxh){
	var iWidth=400; 
   	var iHeight=350;
   	var iTop = (window.screen.height - 30 - iHeight) / 2;
   	var iLeft = (window.screen.width - 10 - iWidth) / 2;
	window.open("${ctx}/reg/bus/uploadExamPic/rxbdscan?ywh="+ywh+"&sxh="+sxh,"newwindow",
			"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
}

   function reloadpicname(){
	  window.opener.parent.document.picname.location.reload();
   }
   
   
   //单条核验
   function verity(o){
	   
	   var obj = new Object();
	   var tr = $(o).parent().parent();
	   $(tr).find("td").each(function(j,m){  // 遍历 tr 的各个 td
          var v = $(m).html();
		  var k = $(m).attr("name");
		 if(k){
			  obj[k] = v; 
			  
		  }
     });
	 if(obj.jfifzp==null || obj.jfifzp==''){
		 alert("请拍照后进行核验");
		 return;
	 }else{
	  loading('正在核验,请稍等...');
	 ajaxdata(tr,obj,'1');
	 }
	  
   }
   
   //批量核验
   function verityData(tr,flag) {
	   var obj = new Object();
	   if($(tr).find("td").length==0){
		     alert("核验完成!!!");
		     return;
	   }
	   $(tr).find("td").each(function(j,m){  // 遍历 tr 的各个 td
          var v = $(m).html();
		  var k = $(m).attr("name");
		  if(k){
			  obj[k] = v; 
		  } 
     });
	 if(obj.jfifzp==null || obj.jfifzp==''){
		 var nexttr = $(tr).next();
		verityData(nexttr,flag);
	 }else{
	 loading('正在核验'+obj.name+'信息,请稍等...');
	 ajaxdata(tr,obj,flag);
	 }
   }
   
   function ajaxdata(tr,obj,flag){
	   
	   var interHis = new Object();
	   interHis.rymc = obj.name;
	   interHis.zjhm = obj.sfzh;
	   interHis.jkmc = "人像比对";
	   interHis.rylx = "1";
	   interHis.chyw = "权利人人像比对";
	   interHis.pcode = obj.pcode;
	   var si_code = 'out/rxbd';
				$.ajax({
					type : "POST",
					url : "${ctx}/reg/bus/regBusQlr/interSi/" + si_code,
					cache : false,
					data : {"data":JSON.stringify(obj),"interdata":JSON.stringify(interHis),"ywh":obj.ywh,"sxh":obj.sxh},
					async : false,
					success : function(modelmap) {
						if (modelmap.success == 0) {
							var rxbdzt =  modelmap.rxbdzt; 
							console.log(rxbdzt);
							if(rxbdzt == '1'){
								$(tr).find("td").eq(7).html('通过');
								$(tr).find("td").eq(7).css({color:"green"});
							}else if(rxbdzt == '2'){
								$(tr).find("td").eq(7).html('未通过');
								$(tr).find("td").eq(7).css({color:"red"});
							}
							
						} else {
							alert(modelmap.error_msg);
							return;
						}
						if(flag=='11'){
							var nexttr = $(tr).next();
							verityData(nexttr,flag);
						}else{
							alert("核验完成!!!");
						}
						
					}
				});
			closeTip();
   }

   function allverityData() {
	   var si_code = 'out/rxbd';
	   var list =new Array();
       var tr = $('#dataTable tbody tr').eq(0);
      verityData(tr,'11');
   }
	
	function openfj(pic){
		var index = layer.open({
            type: 2,
            content: ["/file/"+pic+"?ma=${math}",'no'],
           area: ['600px', '450px'],
				closeBtn: 1
          // maxmin: true
    });
     //window.parent.parent.parent.layer.full(index);
	}
	
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="javascript:void(0);">
		权利人信息列表
		</a></li>
		
	</ul>
	
	
	<sys:message content="${message}" />
	<table id="dataTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th style="display:none">业务号</th>
			    <th style="display:none">人员编码</th>
				<th style="display:none">图片编码</th>
				<th>权利人姓名</th>
				<th>权利人身份证号</th>
				<th>照片信息</th>
				<th>核验状态</th>
				 <th>
				 	操作
				 </th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list}" var="regBusQlr">
				<tr>
					<td name="sxh">${regBusQlr.sxh}</td> 
					<td style="display:none" name="ywh">${regBusQlr.ywh}</td>
					<td style="display:none" name="pcode">${regBusQlr.pcode}</td>
					<td style="display:none" name="jfifzp">${regBusQlr.tpbm}</td>
					<td name="name">${regBusQlr.qlrmc}</td>
					<td name="sfzh">${regBusQlr.zjh}</td>
				 
					<td>
					
					 
				   <div class="control-group">
		
		<a href="#" onclick = "openfj('${regBusQlr.pic}')">${regBusQlr.pic}
		</a>
		<c:if test="${not empty regBusQlr.pic}">
		<a href="${ctx}/reg/bus/uploadExamPic/delpho?picname=${regBusQlr.pic}&ywh=${regBusQlr.ywh}&sxh=${regBusQlr.sxh}">x
		</a>
		</c:if>
       <input type="button" id="button" value="拍照" onclick="takephoto('${regBusQlr.ywh}','${regBusQlr.sxh}')">
     
 </div> 
				    </td>
					<td name="hyzt">
					   <c:choose>
					   <c:when test="${regBusQlr.piczt eq '1'}">
					     <font color='green'>  通过 </font>
					   </c:when>
					   <c:when test="${regBusQlr.piczt eq '2'}">
					       <font color='red'>  未通过 </font>
					   </c:when>
					   <c:otherwise>
					      未核验
					   </c:otherwise>
					   </c:choose>
					 </td> 
					 <td>
					<a href="javascript:void(0);" onclick="verity(this);">核验</a> 
					</td>
				</tr>
				
				
			</c:forEach>
		</tbody>
	</table>
	<div class="form-actions">
			
		
				<input id="btnSubmit" class="btn btn-primary" type="button" onclick="allverityData();" value="核 验"/>
				
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="window.close()"/>
		</div>
</body>
</html>