Bez popisu

addtogether.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
  8. <script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
  9. <script src="../Script/Common/regexs.js"></script>
  10. <script src="../js/autosize/autosize.min.js"></script>
  11. <link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
  12. <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
  13. <link rel="stylesheet" href="../css/init.css" />
  14. <link href="../css/Table/table1.css" rel="stylesheet" />
  15. <link rel="stylesheet" href="../css/webuploader.css" />
  16. <title>设备二维码管理 </title>
  17. <style>
  18. .tool_downs li .aBtn {
  19. width: initial;
  20. }
  21. #equipment_table .tool_down {
  22. left: -39px;
  23. }
  24. .codeBox {
  25. position: absolute;
  26. right: -2000px;
  27. margin: 0 auto;
  28. width: 360px;
  29. height: 180px;
  30. /* border: 1px solid #a5a2a2;*/
  31. }
  32. .left_code {
  33. position: absolute;
  34. top: 15px;
  35. left: 28px;
  36. }
  37. .right_code {
  38. position: absolute;
  39. top: 5px;
  40. right: 46px;
  41. }
  42. .logo_img {
  43. width: 112px;
  44. height: 94px;
  45. margin: 0;
  46. padding: 0;
  47. }
  48. .code_tip1 {
  49. font-size: 14px;
  50. margin-top: 22px;
  51. margin-bottom: 0;
  52. color: #000;
  53. font-family: 微软雅黑;
  54. text-align: center;
  55. }
  56. .code_tip2 {
  57. font-size: 14px;
  58. margin-top: 5px;
  59. margin-bottom: 0;
  60. color: #000;
  61. font-family: 微软雅黑;
  62. text-align: center;
  63. }
  64. .eq_code_con {
  65. font-size: 14px;
  66. color: #000;
  67. text-align: left;
  68. margin-bottom: 5px;
  69. }
  70. .codeHtml {
  71. z-index: 9999999;
  72. position: relative;
  73. }
  74. </style>
  75. </head>
  76. <body class="gray-bg">
  77. <div class="form-group tool_bars pull-right">
  78. <input type="button" class="btn_gray" onclick="btn_add()" value="添加" />
  79. </div>
  80. <div class="tableCon">
  81. <div class="tabs_details showtabs">
  82. <table id="equipment_table" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  83. <thead>
  84. <tr>
  85. <th data-field="state" data-checkbox="true"></th>
  86. <th data-field="username" data-align="center">协同人</th>
  87. <th data-field="usercode" data-align="center">协同人编号</th>
  88. </tr>
  89. </thead>
  90. </table>
  91. </div>
  92. </div>
  93. </div>
  94. <script src="../js/webuploader.min.js"></script>
  95. <script src="js/qrcode.min.js"></script>
  96. <script src="../js/html2canvas/html2canvas.js"></script>
  97. <script src="../js/canvas2image/canvas2image.js"></script>
  98. <script src="../js/jszip/jszip.min.js"></script>
  99. <script src="../js/jszip/FileSaver.js"></script>
  100. <script src="js/equipmentCommon.js"></script>
  101. <script>
  102. var code = helper.request.queryString("code");
  103. $(function() {
  104. getSuggestionList()
  105. })
  106. //获取列表
  107. function getSuggestionList() {
  108. //销毁表格
  109. $('#equipment_table').bootstrapTable('destroy');
  110. //初始化表格,动态从服务器加载数据
  111. $("#equipment_table").bootstrapTable({
  112. method: "get", //使用get请求到服务器获取数据
  113. url: huayi.config.callcenter_url + "equipmentapi/api/WoRepairBase/getrepairuser", //获取数据的Servlet地址
  114. contentType: "application/x-www-form-urlencoded",
  115. striped: true, //表格显示条纹
  116. pagination: false, //启动分页
  117. pageSize: 10, //每页显示的记录数
  118. pageNumber: 1, //当前第几页
  119. pageList: [10, 20, 50, 100], //记录数可选列表
  120. // fixedColumns: true,
  121. // fixedNumber: 3,
  122. search: false, //是否启用查询
  123. showColumns: false, //显示下拉框勾选要显示的列
  124. showRefresh: false, //显示刷新按钮
  125. sidePagination: "server", //表示服务端请求
  126. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  127. //设置为limit可以获取limit, offset, search, sort, order
  128. queryParamsType: "undefined",
  129. queryParams: function queryParams(params) { //设置查询参数
  130. var param = {
  131. // pageindex: params.pageNumber,
  132. // pagesize: params.pageSize,
  133. wocode: code
  134. };
  135. return param;
  136. },
  137. responseHandler: function(res) {
  138. return {
  139. // "total": res.data && res.data.total, //总页数
  140. "rows": res.data && res.data //数据
  141. };
  142. },
  143. onLoadSuccess: function(data) { //加载成功时执行
  144. //layer.msg("加载成功");
  145. $('.tool_down').authorizeOperateButton();
  146. },
  147. onLoadError: function() { //加载失败时执行
  148. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  149. }
  150. });
  151. }
  152. function btn_add() {
  153. var name = $.map($('#equipment_table').bootstrapTable('getSelections'),
  154. function(row) {
  155. return row.username;
  156. });
  157. var codes = $.map($('#equipment_table').bootstrapTable('getSelections'),
  158. function(row) {
  159. return row.usercode;
  160. });
  161. parent.togetherVal(name)
  162. parent.togetherCodes(codes)
  163. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  164. parent.layer.close(index); //再执行关闭
  165. }
  166. </script>
  167. </body>
  168. </html>