bbea28f57b672e929c580753e706a9cdd65631af.svn-base 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>基本表格模板</title>
  10. <!--框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/" scrollerY="false"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <!--数据表格start-->
  19. <script src="<%=path%>/libs/js/table/quiGrid.js" type="text/javascript"></script>
  20. <!--数据表格end-->
  21. </head>
  22. <body style="background-color:#ffffff;">
  23. <div class="box2" panelTitle="查询用户" id="searchPanel">
  24. <form action="<%=path%>/fullform/listUsers.do" id="queryForm" method="post">
  25. <table>
  26. <tr>
  27. <td>性别:</td>
  28. <td><select name="form.sex">
  29. <option value="">请选择</option>
  30. <option value="男">男</option>
  31. <option value="女">女</option>
  32. </select></td>
  33. <td>姓名:</td>
  34. <td><input type="text" name="form.name" /></td>
  35. <td><button id="search"><span class="icon_find">查询</span></button></td>
  36. <td><button id="resetButton"><span class="icon_reload">全部</span></button></td>
  37. </tr>
  38. </table>
  39. </form>
  40. </div>
  41. <div style="padding-right: 4px;">
  42. <div id="maingrid">
  43. </div>
  44. </div>
  45. <script type="text/javascript">
  46. var testData={"form.paginate.pageNo":1,"form.paginate.totalRows":13,"rows":[
  47. {"deptName":"部门1","sex":"女","remark":"好啊","hobby":["唱歌"],"beginworkDate":"2012-06-13 00:00:00.0","photo":null,"version":null,"id":125,"degree":"硕士结业","age":20,"name":"员工1","deptId":12,"ability":1},
  48. {"deptName":"部门1","sex":"男","remark":"备注啊","hobby":["唱歌"],"beginworkDate":"2012-06-13 00:00:00.0","photo":null,"version":null,"id":124,"degree":"本科毕业","age":20,"name":"员工2","deptId":11,"ability":2},
  49. {"deptName":"部门1","sex":"男","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":123,"degree":"本科毕业","age":20,"name":"员工3","deptId":9,"ability":2},
  50. {"deptName":"部门1","sex":"女","remark":"不错啊","hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":121,"degree":"硕士肄业","age":20,"name":"员工4","deptId":8,"ability":3},
  51. {"deptName":"部门1","sex":"男","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":120,"degree":"博士肄业","age":20,"name":"员工5","deptId":7,"ability":4},
  52. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工6","deptId":6,"ability":5},
  53. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":118,"degree":"博士肄业","age":20,"name":"员工7","deptId":6,"ability":6},
  54. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":117,"degree":"博士肄业","age":20,"name":"员工8","deptId":6,"ability":5},
  55. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":116,"degree":"博士肄业","age":20,"name":"员工9","deptId":6,"ability":3},
  56. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":115,"degree":"博士肄业","age":20,"name":"员工10","deptId":6,"ability":1},
  57. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":114,"degree":"博士肄业","age":20,"name":"员工11","deptId":6,"ability":5},
  58. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":113,"degree":"博士肄业","age":20,"name":"员工12","deptId":6,"ability":5}
  59. ]}
  60. var g;
  61. function initComplete(){
  62. g = $("#maingrid").quiGrid({
  63. columns:[
  64. { display: '姓名', name: 'name', align: 'center', width: "30%"},
  65. { display: '性别', name: 'sex', align: 'center' , width: "20%"},
  66. { display: '部门', name: 'deptName', align: 'center' , width: "30%"},
  67. { display: '学历', name: 'degree', align: 'center', width: "20%" }
  68. ],
  69. //pageSize默认为10,可以不配置
  70. data:testData, pageSize: 5, sortName: 'id',rownumbers:true,checkbox:true,
  71. height: '100%', width:"100%",
  72. toolbar:
  73. {
  74. items: [
  75. { text: '新增', click: addUser, iconClass: 'icon_add' },
  76. { line: true },
  77. { text: '修改', click: editUser, iconClass: 'icon_edit' },
  78. { line: true },
  79. { text: '删除', click: deleteUser, iconClass: 'icon_delete' },
  80. { line: true },
  81. { text: '导出', click: exportUser, iconClass: 'icon_xls' }
  82. ]
  83. }
  84. });
  85. $("#searchPanel").bind("stateChange",function(e,state){
  86. g.resetHeight();
  87. });
  88. }
  89. //新增
  90. function addUser(){
  91. }
  92. //修改
  93. function editUser(){
  94. }
  95. //删除
  96. function deleteUser(){
  97. }
  98. //导出
  99. function exportUser(){
  100. }
  101. //获取选中行的id 格式为 id=1&id=2
  102. function getSelectId(grid){
  103. }
  104. </script>
  105. </body>
  106. </html>