Ei kuvausta

DWM.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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. .toolBar input{
  57. width: 180px;
  58. }
  59. </style>
  60. </head>
  61. <body class="gray-bg">
  62. <div class="wrapper wrapper-content animated fadeInRight">
  63. <div class="daoHang clearfix">
  64. <div class="dhLeft">
  65. <sapn>
  66. <i class="syIcon"></i>位置:
  67. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  68. <a href="javaScript:;">业务统计</a>&gt;
  69. <a href="" class="nowPosition">工单日周月报</a>
  70. </sapn>
  71. </div>
  72. <div class="dhRight">
  73. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  74. </div>
  75. </div>
  76. <div class="Content_box">
  77. <div class="complain Shows">
  78. <ul class="nav nav-tabs ul_tab" role="tablist">
  79. <li class="active" data-index="1">
  80. <a>合计</a>
  81. </li>
  82. <!--<li>
  83. <a>承办案件统计</a>
  84. </li>-->
  85. <li data-index="3">
  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. 时间:<input class="photo x-color inputs laydate-icon" autocomplete="off" type="text" id="startTime" />-
  94. <input class="photo x-color inputs laydate-icon" autocomplete="off" type="text" id="endTime" />
  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. 来源:<select class="select_" id="source"></select>
  102. <button class="btns search_1">查询</button>
  103. <a class="btns export_1">导出</a>
  104. </div>
  105. </div>
  106. <div style="width: 100%">
  107. <!--<div style="text-align:center;"><h2 class="sjxs"></h2></div>-->
  108. <table id="workorderlist1" data-row-style="rowStyle" data-query-params="queryParams"
  109. data-pagination="true">
  110. <thead>
  111. <tr>
  112. <!--<th data-field="Acceptance" data-align="center">转派件</th>-->
  113. <!--<th data-field="Handled" data-align="center">回传件</th>-->
  114. <th data-field="Acceptance" data-align="center">郑州转派件</th>
  115. <th data-field="Handled" data-align="center">本地回传件</th>
  116. </tr>
  117. </thead>
  118. </table>
  119. <table id="workorderlist2" data-row-style="rowStyle" data-query-params="queryParams"
  120. data-pagination="true" style="display: none;">
  121. <thead>
  122. <tr>
  123. <th data-field="name" data-align="center">单位</th>
  124. <th data-field="count" data-align="center">受理数量</th>
  125. <th data-field="lastrate" data-align="center">数量占比</th>
  126. <th data-field="endcount" data-align="center">办结数量</th>
  127. <th data-field="endrate" data-align="center"> 办结率</th>
  128. </tr>
  129. </thead>
  130. </table>
  131. <table id="workorderlist3" data-row-style="rowStyle" data-query-params="queryParams"
  132. data-pagination="true" style="display: none;">
  133. <thead>
  134. <tr>
  135. <th data-field="name" data-align="center">类型</th>
  136. <th data-field="count" data-align="center">受理数量</th>
  137. <th data-field="lastrate" data-align="center">数量同比</th>
  138. <th data-field="endcount" data-align="center">办结数量</th>
  139. <th data-field="endrate" data-align="center"> 办结率</th>
  140. </tr>
  141. </thead>
  142. </table>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <script>
  150. var tabindex = 1;
  151. $(document).ready(function () {
  152. LY($("#source"));
  153. laydate.skin('molv');
  154. laydate({
  155. elem: '#startTime',
  156. format: 'YYYY-MM-DD hh:mm:ss', // 分隔符可以任意定义,该例子表示只显示年月
  157. istime: true, //是否开启时间选择
  158. event: 'focus'
  159. });
  160. laydate({
  161. elem: '#endTime',
  162. format: 'YYYY-MM-DD hh:mm:ss', // 分隔符可以任意定义,该例子表示只显示年月
  163. istime: true, //是否开启时间选择
  164. event: 'focus'
  165. });
  166. $('.ul_tab li').click(function () {
  167. $(this).parent().find("li").removeClass("active");
  168. $(this).addClass("active");
  169. tabindex = $(this).attr("data-index");
  170. initTable();
  171. })
  172. initTable();
  173. })
  174. //来源
  175. function LY(obj) {
  176. obj.empty();
  177. obj.append('<option selected="selected" value="">请选择</option>');
  178. $.ajax({
  179. type: "get",
  180. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  181. dataType: "json",
  182. async: true,
  183. data: {
  184. "token": $.cookie("token"),
  185. id: 1
  186. },
  187. success: function (data) {
  188. if (data.state.toLowerCase() == "success") {
  189. var content = data.data;
  190. $(content).each(function (i, n) {
  191. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
  192. .appendTo(obj);
  193. })
  194. }
  195. }
  196. });
  197. }
  198. function initTable() {
  199. $.ajax({
  200. url: huayi.config.callcenter_url + 'WorkOrderReport/GetDayweekmonth',
  201. type: 'get',
  202. data: {
  203. stime:$("#startTime").val(),
  204. //etime:$("#date").val()&&$("#date").val().split('~')[1],
  205. etime:$("#endTime").val(),
  206. type: Number(tabindex),
  207. token: $.cookie("token"),
  208. source: $("#source").val() //=来源
  209. },
  210. dataType: "json",
  211. async: true,
  212. success: function (returnValue) {
  213. //异步获取数据
  214. var resultData = returnValue;
  215. if (Number(tabindex) === 1) {
  216. var resultArr = []
  217. var resultObject = {
  218. Acceptance: resultData.Acceptance,
  219. Handled: resultData.Handled,
  220. }
  221. resultArr.push(resultObject)
  222. $('#workorderlist1').bootstrapTable('destroy').bootstrapTable({
  223. striped: true,
  224. pagination: false,
  225. });
  226. $('#workorderlist1').bootstrapTable('load', resultArr);
  227. $('#workorderlist1').show();
  228. $('#workorderlist2').hide();
  229. $('#workorderlist3').hide();
  230. } else if (Number(tabindex) === 2) {
  231. $('#workorderlist2').bootstrapTable('destroy').bootstrapTable({
  232. striped: true, pagination: false,
  233. });
  234. $('#workorderlist2').bootstrapTable('load', resultData.data.DayWeekMonthReport);
  235. $('#workorderlist1').hide();
  236. $('#workorderlist2').show();
  237. $('#workorderlist3').hide();
  238. } else if (Number(tabindex) === 3) {
  239. $('#workorderlist3').bootstrapTable('destroy').bootstrapTable({
  240. striped: true,
  241. pagination: false,
  242. });
  243. $('#workorderlist3').bootstrapTable('load', resultData.data.DayWeekMonthReport);
  244. $('#workorderlist1').hide();
  245. $('#workorderlist2').hide();
  246. $('#workorderlist3').show();
  247. }
  248. }
  249. });
  250. }
  251. //代办搜索
  252. $(".search_1").click(function () {
  253. initTable();
  254. })
  255. //导出
  256. $('.export_1').click(function () {
  257. dcexcel_1(this);
  258. })
  259. function dcexcel_1(obj) {
  260. var url = huayi.config.callcenter_url + "WorkOrderReport/GetDayWeekMonthReport?token=" + $.cookie("token");
  261. url += "&date=" + $("#date").val() + "&datetype=" + $("#datetype").val() + "&type=" + tabindex +
  262. "&isExport=true";
  263. obj.href = url;
  264. }
  265. </script>
  266. </body>
  267. </html>