<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="cn.exlive.mygpsonline.bean.loginUser"%>
<%@ taglib prefix ="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

String isSee = request.getParameter("isSee");
String so = request.getParameter("so");
loginUser loginUser=(loginUser)session.getAttribute("user");

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<script type="text/javascript" src="<%=path%>/gpsonline/js/calendar/My97DatePicker/WdatePicker.js"></script>
  	<style>
  		
		  		#driverForm input,select{width:100px;}
		  		#driverForm textarea{width: 300px;height: 50px;}
		  		#driverForm td span,label{padding-left: 10px;height: 25px;}
		  		#driverForm tr{line-height: 30px;}

  				.driverboder{border-width: 0px; background-color: white;}

  	</style>
  	<script type="text/javascript">
  		//var isShow = window.parent.so;
  		var isShow = "<%=so %>";
  		if(!isShow){
			$("#sjcl").hide();
			$("#sscd").hide();
			$("#jszh").hide();
			$("#yxrq").hide();
			$("#zjzh").hide();
			$("#zgzs").hide();
			//$("#bz").hide();
  	  	}
  	</script>
  </head>
  <body>
			<div class="top" id="driverTop"></div>
			<div class="center"  style="width:450px;">
		  		<h3 id="dragDriverPanel">
		        	<a href="javascript:;" title="关闭" class="message_close" id="closeDriverWin"></a>
		        	<span>驾驶员信息</span>
		        </h3>
		        <div class="popWinContainerPanel">
		        	<ul><li style="text-align:center;"><span id="drivertMsg" style="color:red;">&nbsp;</span></li></ul>
		        	<form id="driverForm" action="<%=path %>/manager/vechileAction_driverInfoUpdate.action" method="POST"  enctype="multipart/form-data">
			        	<table width="100%" border="0" style="line-height:35px;">
			        		<tr>
			        			<td>
			        				<span>姓名：</span>
			        			</td>
			        			<td>
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>
			        					<input name="driver.name" value="${data.name}" <%if(isSee != null){ %>readonly="readonly" class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input value="***" readonly="readonly" class="driverboder"></input>
			        				<%} %>
			        			</td>
			        			<td rowspan="5" colspan="2">
			        				<div style="width: 100%;display: inline-block;text-align: center;">
			        					<%if(loginUser != null && loginUser.getId() != -1000) {%>
				        					<s:if test="#request.data.image != null && #request.data.image != ''">
				        						<img src="http://vip4.exlive.cn/Jhfz/imageUpload/${data.image}?<%=new Date().getTime() %>" style="width: 120px;height: 140px;"></img>
				        					</s:if>
				        					<s:else>
				        						<img src="http://vip4.exlive.cn/synthReports/pic/car.jpg?<%=new Date().getTime() %>" style="width: 120px;height: 140px;"></img>
				        					</s:else>
				        				<%}else{ %>
			        						<img src="http://vip4.exlive.cn/synthReports/pic/car.jpg?<%=new Date().getTime() %>" style="width: 120px;height: 140px;"></img>
			        					<%} %>
			        					
			        				</div>
			        			</td>	        				        			
			        		</tr>
			        		<tr>
			        			<td>
			        				<span>性别：</span>
			        			</td>
			        			<td>
			        				<%if(isSee == null){ %>	
				        				<select name="driver.sex">
				        					    <option value="1" ${ (!empty data.sex && data.sex - 1  == 0) ? "selected='selected'" : ""}>男</option>
	    										<option value="0" ${ (!empty data.sex && data.sex == 0) ? "selected='selected'" : ""}>女</option>
				        				</select>	
			        				<%}else{ %>
			        					<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        						${ (!empty data.sex && data.sex - 1  == 0) ? "男" : "女"}
		        						<%}else{ %>
		        							**
		        						<%} %>
			        				<%} %>			        			        				
			        			</td>		
			        					        						        			
			        		</tr>
			        		<tr>
			        			<td>
			        				<span>出生日期：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>
			        					<input type="text" value="${data.birthday}" name="driver.birthday" <%if(isSee == null){ %>onkeydown="return false" onkeyup="return false" oncontextmenu="return false"
																	class="Wdate" onclick="WdatePicker({skin:'simple',dateFmt:'yyyy-MM-dd'})"<%} %>   <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>/>				        			        				
			        				<%}else{ %>
			        					<input type="text" type="text" value="****-**-**" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>			        			
			        		</tr>
			        		<tr>			        			
			        			<td>
			        				<span>联系方式：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>
			        					<input name="driver.telhpone" value="${data.telhpone}"  <%if(isSee != null){ %>readonly="readonly" class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" name="driver.telhpone" value="***********" readonly="readonly" class="driverboder"></input>				        			        				
			        				<%} %>
			        			</td>
			        					        			
			        		</tr>		
			        		<tr>
			        			<td>
			        				<span>身份证号：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>
			        					<input name="driver.idCard" value="${data.idCard}"  <%if(isSee != null){ %>readonly="readonly" class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" name="driver.idCard" value="*****************"  readonly="readonly" class="driverboder"></input>			        			        				
			        				<%} %>
			        			</td>
			        						        		   			
			        		</tr>
			        		<tr id="sjcl">			        			
			        			<td>
			        				<span>所驾车辆：</span>
			        			</td>
			        			<td>
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.veh" value="${vehicleName}" disabled="disabled"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" value="***" disabled="disabled"  readonly="readonly"  class="driverboder"></input>
			        				<%} %>
			        			</td>
			        			<% if(isSee == null){ %>
				        			<td>
				        				<span>驾驶员图标：</span>
				        			</td>	
				        			<td>
				        				<input name="fileForm.uploadFile" type="file" accept="image/*" title="选择驾驶员头像" style="border: 1px solid #C6C6C6;"  <%if(isSee != null){ %>readonly="readonly"<%} %>/>
				        			</td>	
			        			<%} %>		        					        			
			        		</tr>
			        		<tr id="sscd">
			        			<td>
			        				<span>所属车队：</span>
			        			</td>
			        			<td>
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>		
			        					<input name="driver.group" value="${data.group}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" value="***" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>	
			        			<td>
			        				<span>驾驶员代码：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.driverCode" value="${data.driverCode}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" value="***" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>			        					        			
			        		</tr>
			        		
			        		<tr id="jszh">
			        			<td>
			        				<span>驾驶证号：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.driverNum" value="${data.driverNum}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input type="text" value="***" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>	
			        			<td>			        				
			        				<span>领证日期：</span>
			        			</td>
			        			<td colspan="3">
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input type="text" name="driver.certifDate" value="${data.certifDate}" <%if(isSee == null){ %>onkeydown="return false" onkeyup="return false" oncontextmenu="return false"
																	class="Wdate" onclick="WdatePicker({skin:'simple',dateFmt:'yyyy-MM-dd'})"<%} %>  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>/>				        			        				
			        				<%}else{ %>
			        					<input type="text" value="****-**-**" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>		        			
			        		</tr>	
			        		<tr id="yxrq">
			        			<td>
			        				<span>有效日期：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input type="text" id="certifValid" value="${data.certifValid}" name="driver.certifValid" <%if(isSee == null){ %> onkeydown="return false" onkeyup="return false" oncontextmenu="return false"
																	class="Wdate" onclick="WdatePicker({skin:'simple',dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'certifValidEnd\')}'})" <%} %>  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>/>			        			        				
			        				<%}else{ %>
			        					<input type="text" value="****-**-**" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>
			        			<td style="text-align: center;">	
			        				<span>至</span>			        			        				
			        			</td>
			        			<td >	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input type="text" id="certifValidEnd" value="${data.certifValidEnd}" name="driver.certifValidEnd" <%if(isSee == null){ %>onkeydown="return false" onkeyup="return false" oncontextmenu="return false"
																	class="Wdate" onclick="WdatePicker({skin:'simple',dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'certifValid\')}'})"<%} %>  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>/>					        			        				
			        				<%}else{ %>
			        					<input type="text" value="****-**-**" readonly="readonly"  class="driverboder"/>
			        				<%} %>
			        			</td>			        			
			        		</tr>	
			        		<tr id="zjzh">
			        			<td>
			        				<span>准驾证号：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.YDriverNum" value="${data.YDriverNum}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input value="***" readonly="readonly"  class="driverboder"></input>
			        				<%} %>
			        			</td>
			        			<td>
			        				<span>准驾车型：</span>
			        			</td>
			        			<td>
			        				<%if(isSee == null){ %>	
				        				<select name="driver.YDriveType">
				        					 <option value="A" ${ (!empty data.YDriveType && data.YDriveType == 'A') ? "selected='selected'" : ""}>大型客车</option>
											 <option value="B" ${ (!empty data.YDriveType && data.YDriveType == 'B') ? "selected='selected'" : ""}>大型货车</option>
											 <option value="C" ${ (!empty data.YDriveType && data.YDriveType == 'C') ? "selected='selected'" : ""}>小型汽车</option>
				        				</select>		
			        				<%}else{ %>
			        					<%if(loginUser != null && loginUser.getId() != -1000) {%>	
				        					${ (!empty data.YDriveType && data.YDriveType == 'A') ? "大型客车" : ""}
				        					${ (!empty data.YDriveType && data.YDriveType == 'B') ? "大型货车" : ""}
				        					${ (!empty data.YDriveType && data.YDriveType == 'C') ? "小型汽车" : ""}
			        					<%}else{ %>
			        						***
			        					<%} %>
			        				<%} %>		        			        				
			        			</td>
			        						        			
			        		</tr>
			        		<tr id="zgzs">
			        			<td>
			        				<span>资格证书：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.titleLetter" value="${data.titleLetter}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input value="***"  readonly="readonly"  class="driverboder"></input>				        			        							        				
			        				<%} %>
			        			</td>
			        			<td>
			        				<span>从业资格：</span>
			        			</td>
			        			<td>	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<input name="driver.qualif" value="${data.qualif}"  <%if(isSee != null){ %>readonly="readonly"  class="driverboder"<%} %>></input>				        			        				
			        				<%}else{ %>
			        					<input value="***" readonly="readonly"  class="driverboder"></input>				        			        							        				
			        				<%} %>
			        			</td>			        			
			        		</tr>		
			        				        		
			        		<tr>
			        			<td>
			        				<span>备注：</span>
			        			</td>
			        			<td colspan="3">	
			        				<%if(loginUser != null && loginUser.getId() != -1000) {%>	
			        					<textarea name="driver.remark" <%if(isSee != null){ %> disabled="disabled"  class="driverboder" <% } %> > 
			        						${data.remark} 
			        					</textarea>
			        				<%}else{%>
			        					<textarea disabled="disabled"  class="driverboder">***</textarea>
			        				<%}%>
			        			</td>
			        		</tr>
			        		<%if(isSee == null){%>
				        		<tr>
				        			<td colspan="4" style="text-align: center;">
				        				<input type="hidden" name="driver.id" value="${vehicleId}"/>
				        				<input id="updateDriver" type="button" value="提交" onclick="managerIframe.VechileMananger.updateDriver();" style="width:80px; height:30px;  margin-top:20px;" />					
				        			</td>		        					        			
				        		</tr>	
			        		<%} %>					        		
			        	</table>			        							
        			</form>
		        </div>
			 </div>
			<div class="bot" id="diverBot"></div>
  </body>
</html>
