03bf373057cbc847a53205f1341673d6e29780dc.svn-base 6.1 KB

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