12345市长热线标准版-前端

dispatchingWorkStatistics.html 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. #list thead th {
  54. background: #01a1cb;
  55. color: #fff;
  56. }
  57. #list tbody tr td {
  58. text-align: center;
  59. }
  60. #list tfoot tr td {
  61. text-align: center;
  62. }
  63. </style>
  64. </head>
  65. <body class="gray-bg">
  66. <div class="wrapper wrapper-content animated fadeInRight">
  67. <div class="daoHang clearfix">
  68. <div class="dhLeft">
  69. <sapn>
  70. <i class="syIcon"></i>位置:
  71. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  72. <a href="javaScript:;">业务统计</a>&gt;
  73. <a class="nowPosition">调度工作统计</a>
  74. </sapn>
  75. </div>
  76. <div class="dhRight">
  77. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  78. </div>
  79. </div>
  80. <div class="Content_box">
  81. <!--待处理/-->
  82. <div class="complain Shows">
  83. <div class="th-box">
  84. <div class="th-bar">
  85. <div class="seach-box">
  86. <ul>
  87. <li>
  88. 部门:
  89. <select name="" id="depar" class="select_"></select>
  90. <!--<select name="" id="" class="select_"></select>-->
  91. </li>
  92. <li>
  93. 交办时间:
  94. <input class="photo x-color inputs laydate-icon" type="text" id="startTimes" />-
  95. <input class="photo x-color inputs laydate-icon" type="text" id="endTimes" />
  96. </li>
  97. <li>
  98. <a class="sc_btn btns db">搜索</a>
  99. <a class="sc_btn btns export" id="exportDispathingWorks">导出</a>
  100. </li>
  101. </ul>
  102. </div>
  103. </div>
  104. </div>
  105. <div style="width: 100%;padding: 10px;">
  106. <table id="list" class="table table-hover table-striped table-bordered table-condensed">
  107. <thead>
  108. <tr>
  109. <th>单位名称</th>
  110. <th>坐席</th>
  111. <th>转派次数</th>
  112. <th>退回坐席次数</th>
  113. <th>工作量</th>
  114. </tr>
  115. </thead>
  116. <tbody></tbody>
  117. <tfoot>
  118. </tfoot>
  119. </table>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <script>
  125. var keys;
  126. var start;
  127. var end;
  128. var deptId;
  129. $(document).ready(function () {
  130. //返回首页
  131. $('#ReIndex').click(function () {
  132. top.home_index();
  133. })
  134. laydate.skin('blue');
  135. laydate({
  136. elem: '#startTimes',
  137. event: 'focus'
  138. });
  139. laydate({
  140. elem: '#endTimes',
  141. event: 'focus'
  142. });
  143. });
  144. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", { token: $.cookie("token") }, function (result) {
  145. if (result.state.toLowerCase() == "success") {
  146. seatlist = result.data;
  147. bindseat($("#depar"));
  148. }
  149. });
  150. function bindseat(obj) {
  151. obj.empty();
  152. obj.append('<option value="">全部</option>');
  153. $(seatlist).each(function (i, n) {
  154. obj.append('<option value="' + n.F_DeptId + '">' + n.F_DeptName + '</option>');
  155. })
  156. }
  157. getDispatchingWorks();
  158. //导出
  159. $('#exportDispathingWorks').click(function () {
  160. dcexcelDispathing(this);
  161. })
  162. function dcexcelDispathing(obj) {
  163. var url = huayi.config.callcenter_url + "WorkOrderReport/GetWorkLoad?token=" + $.cookie("token");
  164. url += "&start=" + $("#startTimes").val() + "&end=" + $("#endTimes").val() + "&deptId=" + $("#depar").val() + "&isExport=true";
  165. debugger;
  166. obj.href = url;
  167. }
  168. //搜索
  169. $(".db").click(function () {
  170. start = $('#startTimes').val();
  171. end = $('#endTimes').val();
  172. deptId = $('#depar').val();
  173. getDispatchingWorks(start, end, deptId);
  174. })
  175. function getDispatchingWorks(start, end, deptId) {
  176. $('#list tbody').html('');
  177. $('#list tfoot').html('');
  178. $.ajax({
  179. type: "get",
  180. url: huayi.config.callcenter_url + "WorkOrderReport/GetWorkLoad",
  181. async: true,
  182. dataType: 'json',
  183. data: {
  184. start: start,
  185. end: end,
  186. deptId: deptId,
  187. token: $.cookie("token"),
  188. },
  189. success: function (result) {
  190. if (result) {
  191. var tbodyItems = result.rows;
  192. var tfootItems = result.total;
  193. $(tbodyItems).each(function (i, n) {
  194. $('<tr>' +
  195. '<td>' + n.detpname + '</td>' +
  196. '<td>' + n.useraccount + '</td>' +
  197. '<td>' + n.fordeliverycount + '</td>' +
  198. '<td>' + n.returnedcount + '</td>' +
  199. '<td>' + n.workcount + '</td>' +
  200. '</tr>').appendTo('#list tbody')
  201. });
  202. $(tfootItems).each(function (i, n) {
  203. $('<tr>' +
  204. '<td colspan="2">总计</td>' +
  205. '<td>' + n.fordeliverycount + '</td>' +
  206. '<td>' + n.returnedcount + '</td>' +
  207. '<td>' + n.workcount + '</td>' +
  208. '</tr>').appendTo('#list tfoot')
  209. })
  210. }
  211. }
  212. });
  213. }
  214. </script>
  215. </body>
  216. </html>