selectMgmUserTj.jsp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. //btmAssign
  22. $('#btmAssign').click(function () {
  23. var data = getSelectedRow("tab_user");
  24. if(null == data){
  25. layer.alert('请选择推荐人员', {icon: 6});
  26. return;
  27. }
  28. $.ajax({
  29. type: 'POST',
  30. url: 'assignActionTj.cs',
  31. data: {"userId" : data.id,"orderId":"${orderId}"},
  32. success: function(data) {
  33. layer.confirm(data.msg, {
  34. btn: ['确定'] //可以无限个按钮
  35. }, function(index, layero){
  36. var index = parent.layer.getFrameIndex(window.name);
  37. parent.location.reload();
  38. parent.layer.close(index);
  39. });
  40. },
  41. dataType:"json"
  42. });
  43. });
  44. });
  45. function queryParams(params){
  46. var page = params.offset / params.limit + 1;
  47. var dataObj = new Object();
  48. //alert($("#search").val());
  49. dataObj.name=$("#name").val();
  50. return { page:page,
  51. pageSize:params.limit,
  52. search:JSON.stringify(dataObj),
  53. sort:params.sort,
  54. order:params.order,
  55. };
  56. }
  57. </script>
  58. </head>
  59. <body class="gray-bg">
  60. <div class="wrapper wrapper-content animated fadeInUp">
  61. <div class="row row-lg">
  62. <div class="col-sm-12">
  63. <form class="form-inline" id="myform">
  64. <div class="form-group col-sm-3"></div>
  65. <button type="button" id="btmAssign" class="btn btn-w-m btn-danger">指定推荐人</button>
  66. </form>&nbsp;&nbsp;
  67. <table id="tab_user"
  68. data-toggle="table"
  69. data-url="mgmUserListTj.cs?customerId=${customerId}"
  70. data-method="get"
  71. data-click-to-select="true"
  72. data-pagination="true"
  73. data-data-type="json"
  74. data-show-refresh="false"
  75. data-show-columns="false"
  76. data-show-toggle="false"
  77. data-search-on-enter-key="true"
  78. data-toolbar="#def_toolbar"
  79. data-side-pagination="server"
  80. data-query-params="queryParams"
  81. data-mobile-responsive="true"
  82. >
  83. <thead>
  84. <tr>
  85. <th data-radio="true" data-click-to-select="true"></th>
  86. <th data-field="id" data-visible="false">id</th>
  87. <th data-field="name">姓名</th>
  88. <th data-field="dept_name">部门</th>
  89. <th data-field="phone">电话</th>
  90. <th data-field="post">职务</th>
  91. </tr>
  92. </thead>
  93. </table>
  94. </div>
  95. </div>
  96. </div>
  97. </body>
  98. </html>