list.jsp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@taglib prefix="p" uri="http://www.test.com/jsp/permission" %>
  3. <!doctype html>
  4. <html>
  5. <head>
  6. <%@ include file="../../common/head.jsp"%>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  9. <link href="../res/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  10. <script src="../res/js/plugins/bootstrap-table/bootstrap-table.js"></script>
  11. <script src="../res/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
  12. <script src="../res/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
  13. <script>
  14. $(function(){
  15. $('#btnSearch').click(function () {
  16. $('#tab_user').bootstrapTable('refresh');
  17. });
  18. $('#clearHref').click(function () {
  19. $('#myform')[0].reset();
  20. });
  21. });
  22. function init_pwd(){
  23. var data = getSelectedRow("tab_user");
  24. if(null == data){
  25. return;
  26. }
  27. }
  28. function user_type(value,row,index){
  29. if(value == 0){
  30. return '集团员工';
  31. }else if(value==1){
  32. return '外部注册用户';
  33. }
  34. }
  35. function queryParams(params){
  36. var page = params.offset / params.limit + 1;
  37. var dataObj = new Object();
  38. dataObj.personnelcode=$("#personnelcode").val();
  39. dataObj.name=$("#name").val();
  40. dataObj.phone=$("#phone").val();
  41. dataObj.type=$("#type").val();
  42. return { page:page,
  43. pageSize:params.limit,
  44. search:JSON.stringify(dataObj),
  45. sort:params.sort,
  46. order:params.order
  47. }
  48. };
  49. function format_action(value,row,index){
  50. var returnhtml = '<a href="javascript:show('+row.ID+');">查看详情 </a>';
  51. return returnhtml;
  52. }
  53. function show(id){
  54. $.openDlg({
  55. url:'transfer.cs?action=view&id=' + id,
  56. title:'查看详情',
  57. width:'95%',
  58. height:'95%',
  59. });
  60. }
  61. </script>
  62. </head>
  63. <body class="gray-bg">
  64. <div class="wrapper wrapper-content animated fadeInUp">
  65. <!-- <div class="ibox " style=""> -->
  66. <!-- <div class="ibox-content"> -->
  67. <div class="row row-lg">
  68. <div class="col-sm-12">
  69. <div class="ibox-content m-b-sm border-bottom">
  70. <div class="ibox-title">
  71. <h5>查询条件</h5>
  72. </div>
  73. <form class="form-inline" id="myform">
  74. <div class="form-group"><label>&nbsp;员工号:</label><input id="personnelcode" name="personnelcode" class="form-control" type="text" value=""></div>
  75. <div class="form-group"><label>&nbsp;姓名:</label><input id="name" name="name" class="form-control" type="text" value=""></div>
  76. <div class="form-group"><label>&nbsp;电话:</label><input id="phone" name="phone" class="form-control" type="text" value=""></div>
  77. <div class="form-group">
  78. <label>&nbsp;用户类型:</label>
  79. <select class="form-control" id="type">
  80. <option value="">--全部--</option>
  81. <option value="0">集团用户</option>
  82. <option value="1">外部注册用户</option>
  83. </select>
  84. </div>
  85. &nbsp;&nbsp;
  86. <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>&nbsp;&nbsp;
  87. <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
  88. </form>
  89. </div>
  90. <table id="tab_user"
  91. data-toggle="table"
  92. data-url="list2.cs"
  93. data-method="get"
  94. data-click-to-select="true"
  95. data-pagination="true"
  96. data-data-type="json"
  97. data-show-refresh="true"
  98. data-show-columns="true"
  99. data-show-toggle="true"
  100. data-search-on-enter-key="true"
  101. data-toolbar="#def_toolbar"
  102. data-side-pagination="server"
  103. data-query-params="queryParams"
  104. data-mobile-responsive="true"
  105. >
  106. <thead>
  107. <tr>
  108. <th data-checkbox="true" data-click-to-select="true"></th>
  109. <th data-field="ID" data-visible="false">id</th>
  110. <th data-field="PERSONNELCODE">员工号</th>
  111. <th data-field="NAME">姓名</th>
  112. <th data-field="PHONE">手机号</th>
  113. <th data-field="TYPE" data-formatter="user_type">用户类型</th>
  114. <th data-field="QQ">QQ</th>
  115. <th data-field="WEIXIN">微信</th>
  116. <th data-formatter="format_action">操作</th>
  117. </tr>
  118. </thead>
  119. </table>
  120. </div>
  121. </div>
  122. <!-- </div> -->
  123. <!-- </div> -->
  124. </div>
  125. </body>
  126. </html>