Geen omschrijving

DWM.html 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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: 200px;
  58. height: 34px;
  59. }
  60. </style>
  61. </head>
  62. <body class="gray-bg">
  63. <div class="wrapper wrapper-content animated fadeInRight">
  64. <div class="daoHang clearfix">
  65. <div class="dhLeft">
  66. <sapn>
  67. <i class="syIcon"></i>位置:
  68. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  69. <a href="javaScript:;">业务统计</a>&gt;
  70. <a href="" class="nowPosition">工单日周月报</a>
  71. </sapn>
  72. </div>
  73. <div class="dhRight">
  74. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  75. </div>
  76. </div>
  77. <div class="Content_box">
  78. <div class="complain Shows">
  79. <ul class="nav nav-tabs ul_tab" role="tablist">
  80. <li class="active">
  81. <a>按区域</a>
  82. </li>
  83. <li>
  84. <a>按工单类型</a>
  85. </li>
  86. <li>
  87. <a>按工单来源</a>
  88. </li>
  89. <!--<li>
  90. <a >按部门</a>
  91. </li>-->
  92. </ul>
  93. <div class="tab-content">
  94. <div class="tab-pane fade active in">
  95. <div class="toolBar clearfix">
  96. <div class="toolLeft">
  97. 时间:
  98. <input class="photo x-color inputs laydate-icon" type="text" id="date" autocomplete="off" />
  99. 时间类型:
  100. <select name="" id="datetype" class="select_">
  101. <option value="1" selected="selected">日</option>
  102. <option value="2">周</option>
  103. <option value="3">月</option>
  104. </select>
  105. 来源:
  106. <select class="select_" id="source"></select>
  107. <button class="btns search_1">查询</button>
  108. <a class="btns export_1">导出</a>
  109. </div>
  110. </div>
  111. <div style="width: 100%;padding: 10px;">
  112. <!--<div style="text-align:center;"><h2 class="sjxs"></h2></div>-->
  113. <table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams"
  114. data-pagination="true">
  115. <thead>
  116. <tr>
  117. <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
  118. <th data-field="name" data-align="center">名称</th>
  119. <th data-field="count" data-align="center">受理数量</th>
  120. <th data-field="lastrate" data-align="center">数量同比</th>
  121. <th data-field="endcount" data-align="center" data-formatter="finishedList">办结数量
  122. </th>
  123. <th data-field="endrate" data-align="center"> 办结率</th>
  124. </tr>
  125. </thead>
  126. </table>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <script>
  134. var tabindex = 1;
  135. $(document).ready(function () {
  136. laydate.skin('blue');
  137. laydate({
  138. elem: '#date',
  139. event: 'focus',
  140. istime: true,
  141. format: 'YYYY-MM-DD hh:mm:ss'
  142. });
  143. $('.ul_tab li').click(function () {
  144. $(this).parent().find("li").removeClass("active");
  145. $(this).addClass("active");
  146. tabindex = $(this).index() + 1;
  147. initTable();
  148. })
  149. //获取来源
  150. LY($("#source"));
  151. initTable();
  152. })
  153. function initTable() {
  154. $.ajax({
  155. url: huayi.config.callcenter_url + 'WorkOrderReport/GetDayWeekMonthReport',
  156. type: 'get',
  157. data: {
  158. date: $("#date").val(),
  159. type: tabindex,
  160. datetype: $("#datetype").val(),
  161. source: $("#source").val(),
  162. token: $.cookie("token")
  163. },
  164. dataType: "json",
  165. async: true,
  166. success: function (returnValue) {
  167. //异步获取数据
  168. var resultData1 = returnValue.data.DayWeekMonthReport;
  169. $('#workorderlist').bootstrapTable('load', resultData1);
  170. //var resultData2 = returnValue.data.DayWeekMonthReport1;
  171. //if (resultData2.length > 0) {
  172. // if ($("#datetype").val() == '1') {
  173. // $(".sjxs").text(resultData2[0].startdate)
  174. // }
  175. // else {
  176. // $(".sjxs").text(resultData2[0].startdate + "~" + resultData2[0].enddate);
  177. // }
  178. //}
  179. }
  180. });
  181. $('#workorderlist').bootstrapTable('destroy').bootstrapTable({
  182. striped: true
  183. });
  184. }
  185. //来源
  186. function LY(obj) {
  187. obj.empty();
  188. obj.append(
  189. '<option selected="selected" value="">请选择</option>'
  190. );
  191. $.getJSON(
  192. huayi.config.callcenter_url +
  193. "Dictionary/GetDicValueListById", {
  194. token: $.cookie("token"),
  195. id: 1,
  196. },
  197. function (data) {
  198. if (data.state.toLowerCase() == "success") {
  199. var content = data.data;
  200. $(content).each(function (i, n) {
  201. $(
  202. "<option value='" +
  203. n.F_ValueId +
  204. "'>" +
  205. n.F_Value +
  206. "</option>"
  207. ).appendTo(obj);
  208. });
  209. }
  210. }
  211. );
  212. }
  213. //序号
  214. function serialNumber(val, row, index) {
  215. return index + 1;
  216. }
  217. // 已办结
  218. function finishedList(val, row) {
  219. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.id + '\', \'9\')" >' + val +
  220. '</a></div>';
  221. }
  222. // 查看列表
  223. function viewList(id, state) {
  224. var id = id;
  225. var datetype = $("#datetype").val();
  226. var source = $("#source").val();
  227. var starttime = $("#date").val();
  228. var endtime = ""
  229. // endtime = $("#equeryTime").val();
  230. // if (endtime.length > 0 && endtime.length <= 10) {
  231. // endtime = encodeURIComponent(endtime + " 23:59:59");
  232. // } else {
  233. // endtime = encodeURIComponent(endtime);
  234. // }
  235. layer.open({
  236. type: 2,
  237. content: "./DWMList.html?id=" + id + "&state=" + state +
  238. "&starttime=" + starttime + "&endtime=" + endtime + "&tabindex=" + tabindex + "&datetype=" +
  239. datetype + "&source=" + source, //iframe的url,no代表不显示滚动条
  240. title: '回访管理',
  241. area: ['90%', '90%'], //宽高
  242. });
  243. }
  244. //代办搜索
  245. $(".search_1").click(function () {
  246. initTable();
  247. })
  248. //导出
  249. $('.export_1').click(function () {
  250. dcexcel_1(this);
  251. })
  252. function dcexcel_1(obj) {
  253. var source = $("#source").val();
  254. var url = huayi.config.callcenter_url + "WorkOrderReport/GetDayWeekMonthReport?token=" + $.cookie(
  255. "token");
  256. url += "&date=" + $("#date").val() + "&datetype=" + $("#datetype").val() + "&type=" + tabindex +
  257. "&source=" + source + "&isExport=true";
  258. obj.href = url;
  259. }
  260. </script>
  261. </body>
  262. </html>