商丘12345 前端

DWM.html 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>工单日周月报</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  10. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  11. <link href="../css/init.css" rel="stylesheet" />
  12. <script src="../css/laydate/laydate.js"></script>
  13. <script src="../My97DatePicker/WdatePicker.js"></script>
  14. <style>
  15. table td {
  16. word-break: break-all;
  17. word-wrap: break-word;
  18. }
  19. .ld-service li {
  20. float: left;
  21. font-size: 14px;
  22. color: #000;
  23. padding: 5px 15px;
  24. cursor: pointer;
  25. border-bottom: 1px solid #ccc;
  26. }
  27. .cr-click {
  28. border: 1px solid #ccc;
  29. background-color: #fff;
  30. border-bottom: none !important;
  31. border-bottom-left-radius: 5px;
  32. border-bottom-right-radius: 5px;
  33. }
  34. .Shows {
  35. display: block !important;
  36. }
  37. .complain {
  38. display: none;
  39. }
  40. th {
  41. padding: 5px;
  42. text-align: center;
  43. }
  44. td {
  45. padding: 5px;
  46. }
  47. .Borders {
  48. border: 1px solid #d7d7d7;
  49. }
  50. .cx {
  51. display: block;
  52. }
  53. .daoHang {
  54. margin-bottom: 15px;
  55. }
  56. </style>
  57. </head>
  58. <body class="gray-bg">
  59. <div class="wrapper wrapper-content animated fadeInRight">
  60. <div class="daoHang clearfix">
  61. <div class="dhLeft">
  62. <sapn>
  63. <i class="syIcon"></i>位置:
  64. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  65. <a href="javaScript:;">业务统计</a>&gt;
  66. <a class="nowPosition">工单日周月报</a>
  67. </sapn>
  68. </div>
  69. <div class="dhRight">
  70. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  71. </div>
  72. </div>
  73. <div class="Content_box">
  74. <div class="complain Shows">
  75. <ul class="nav nav-tabs ul_tab" role="tablist">
  76. <li class="active">
  77. <a >按区域</a>
  78. </li>
  79. <li>
  80. <a >按工单类型</a>
  81. </li>
  82. <li>
  83. <a >按工单来源</a>
  84. </li>
  85. <!--<li>
  86. <a >按部门</a>
  87. </li>-->
  88. </ul>
  89. <div class="tab-content">
  90. <div class="tab-pane fade active in" >
  91. <div class="toolBar clearfix" >
  92. <div class="toolLeft">
  93. 时间:
  94. <input class="photo x-color inputs laydate-icon" type="text" id="date" />
  95. 时间类型:
  96. <select name="" id="datetype" class="select_">
  97. <option value="1" selected="selected">日</option>
  98. <option value="2">周</option>
  99. <option value="3">月</option>
  100. </select>
  101. <button class="btns search_1">查询</button>
  102. <a class="btns export_1">导出</a>
  103. </div>
  104. </div>
  105. <div style="width: 100%;padding: 10px;">
  106. <!--<div style="text-align:center;"><h2 class="sjxs"></h2></div>-->
  107. <table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  108. <thead>
  109. <tr>
  110. <th data-field="name" data-align="center">名称</th>
  111. <th data-field="count" data-align="center">受理数量</th>
  112. <th data-field="lastrate" data-align="center">数量同比</th>
  113. <th data-field="endcount" data-align="center">办结数量</th>
  114. <th data-field="endrate" data-align="center"> 办结率</th>
  115. </tr>
  116. </thead>
  117. </table>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <script>
  125. var tabindex = 1;
  126. $(document).ready(function () {
  127. laydate.skin('blue');
  128. laydate({
  129. elem: '#date',
  130. event: 'focus'
  131. });
  132. $('.ul_tab li').click(function () {
  133. $(this).parent().find("li").removeClass("active");
  134. $(this).addClass("active");
  135. tabindex = $(this).index() + 1;
  136. initTable();
  137. })
  138. initTable();
  139. })
  140. function initTable() {
  141. $.ajax({
  142. url: huayi.config.callcenter_url + 'WorkOrderReport/GetDayWeekMonthReport',
  143. type: 'get',
  144. data: {
  145. date: $("#date").val(),
  146. type: tabindex,
  147. datetype: $("#datetype").val(),
  148. token: $.cookie("token")
  149. },
  150. dataType: "json",
  151. async: true,
  152. success: function (returnValue) {
  153. //异步获取数据
  154. var resultData1 = returnValue.data.DayWeekMonthReport;
  155. $('#workorderlist').bootstrapTable('load', resultData1);
  156. //var resultData2 = returnValue.data.DayWeekMonthReport1;
  157. //if (resultData2.length > 0) {
  158. // if ($("#datetype").val() == '1') {
  159. // $(".sjxs").text(resultData2[0].startdate)
  160. // }
  161. // else {
  162. // $(".sjxs").text(resultData2[0].startdate + "~" + resultData2[0].enddate);
  163. // }
  164. //}
  165. }
  166. });
  167. $('#workorderlist').bootstrapTable('destroy').bootstrapTable({ striped: true });
  168. }
  169. //代办搜索
  170. $(".search_1").click(function () {
  171. initTable();
  172. })
  173. //导出
  174. $('.export_1').click(function () {
  175. dcexcel_1(this);
  176. })
  177. function dcexcel_1(obj) {
  178. var url = huayi.config.callcenter_url + "WorkOrderReport/GetDayWeekMonthReport?token=" + $.cookie("token");
  179. url += "&date=" + $("#date").val() + "&datetype=" + $("#datetype").val() + "&type="+tabindex + "&isExport=true" ;
  180. obj.href = url;
  181. }
  182. </script>
  183. </body>
  184. </html>