<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <%@include file="../../../../../frame/assets/header-all.jsp"%> 
    <link rel="stylesheet" type="text/css" href="../../../../resource/css/map.frame.css">
</head>
<body>
<body class="easyui-layout" >
    <div data-options="region:'center',split:false" class="easyui-layout"  style="border: none">
        <table id="chetravel-tab-grid"></table>
    </div>   
<script type="text/javascript">
var maingrid = null;

function getGrid (){
	return maingrid;
}

$(function(){
    $.fn.pagination.defaults.beforePageText = '';
    $.fn.pagination.defaults.afterPageText = '';
    $.fn.pagination.defaults.showPageList= false;
    $.fn.pagination.defaults.showRefresh= false;
    initGrid();
})
//表格
function initGrid(){    
	maingrid = $('#chetravel-tab-grid').datagrid({
        queryParams:'',
        rownumbers:true,
        columns : [[
            {field:'zzxh',title:'详情',hidden:true,width:50  },
            {field:'hphm',title:'号牌号码',align:'center',width:100 },
            {field:'zpsj',title:'过车时间',align:'center',width:140}
        ]]
    });
}
//加入所选，插入行数据
function addtGridData(record,clear){
	var grid = getGrid();
	var rows = grid.datagrid('getData').rows;
	if(grid){
		if(clear){
			grid.datagrid('loadData',{ total: 0, rows: [] });
		}
		if(rows.length != 0){
			for(var i = 0;i<rows.length;i++){
				if(rows[i].zzxh == record.zzxh){
					$.showMsg("已加入所选！");
					return;
				}
			}
		}
		grid.datagrid('appendRow',record);
	}
	return;
}

function loadData(data){
	maingrid.datagrid('loadData',data);
}

</script>
</body>
</html> 
