<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
	String obj = new String(request.getParameter("obj").getBytes("iso8859-1"),"utf-8");
%>
<html>
	<head>
	</head>
	<body>
		<div class="top"></div>
		<div class="center" style="width: 400px; margin: 0 auto;">
			<h3 id="movePopuWin">
				<a href="javascript:;" title="关闭" class="message_close"
					id="closePopuWin"></a>
				<span>设备基本信息</span>
			</h3>
			<div class="popuWinMessage_main">
				<ul>
					<li style="text-align: center;">
						<span id="carOwnerMsg" style="color: red;">&nbsp;</span>
					</li>
				</ul>
				<table width="100%" border="0" style="line-height: 25px;">
					<tr>
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							车牌号码:
						</td>
						<td id="cName">
							&nbsp;加载中...
						</td>
					</tr>
					<tr>
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							所属客户:
						</td>
						<td id="carOwnerName">
							&nbsp;加载中...
						</td>
					</tr>
					<tr id="vhc_gprs">
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							设备ID:
						</td>
						<td id="TerminalID">
							&nbsp;加载中...
						</td>
					</tr>
					<tr id="vhc_sim">
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							SIM号码:
						</td>
						<td id="carSIMno">
							&nbsp;加载中...
						</td>
					</tr>
					<tr>
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							车辆颜色:
						</td>
						<td id="carColor">
							&nbsp;加载中...
						</td>
					</tr>
					<tr style="display:none;">
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							车机类型:
						</td>
						<td id="carTerminalType">
							&nbsp;加载中...
						</td>
					</tr>
					<tr>
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							车辆类型:
						</td>
						<td id="carType">
							&nbsp;加载中...
						</td>
					</tr>
					<tr>
						<td style="width: 100px; text-align: right; padding-right: 15px;">
							到期时间:
						</td>
						<td id="carOverTime">
							&nbsp;加载中...
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="bot"></div>
		<script>
				$(function(){
					
					var obj = JSON.parse('<%=obj %>'); 
					if(isTiYanUser()){
						return;
					}
					if(!window.parent.eqVisualPower.sim)$("#vhc_sim").hide();
					if(!window.parent.eqVisualPower.gprs)$("#vhc_gprs").hide();
				$.ajax({
		                    type: "POST",
		                    dataType: "json",
		                    url: "json/driverAction_vhcBaseinfo.action",
		                    data: {"vhcid":obj.id},
		                    success: function (json){
		                        if(json.flag){
		                        	$("#cName").html(obj.name);
		                        	$("#carOwnerName").html(json.data[0].clientName);
		            				$("#TerminalID").html(obj.gprsCode);
		            				$("#carSIMno").html(obj.simCode);
		            				$("#carColor").html(json.data[0].color);
		            				$("#carTerminalType").html(json.data[0].mobileType);
		            				$("#carType").html(json.data[0].carType);
		            				$("#carOverTime").html(obj.overduetime);
		                        }else{
		                        	$("#carOwnerMsg").html(json.msg);	
		                        }
		                    },
		                    error: function() {
		                     	$("#carOwnerMsg").html("获取数据异常");	
		                    }
               		 });
               		   
				     function isTiYanUser(){
				     	return $("#userId").val() == "-1000" ? true : false;
				     }
				});
			</script>
	</body>
</html>
