Sin descripción

DWM.html 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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 href="" 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. 来源:
  102. <select class="select_" id="source"></select>
  103. <button class="btns search_1">查询</button>
  104. <a class="btns export_1">导出</a>
  105. </div>
  106. </div>
  107. <div style="width: 100%;padding: 10px;">
  108. <!--<div style="text-align:center;"><h2 class="sjxs"></h2></div>-->
  109. <table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams"
  110. data-pagination="true">
  111. <thead>
  112. <tr>
  113. <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
  114. <th data-field="name" data-align="center">名称</th>
  115. <th data-field="count" data-align="center">受理数量</th>
  116. <th data-field="lastrate" data-align="center">数量同比</th>
  117. <th data-field="endcount" data-align="center" data-formatter="finishedList">办结数量
  118. </th>
  119. <th data-field="endrate" data-align="center"> 办结率</th>
  120. </tr>
  121. </thead>
  122. </table>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <script>
  130. var tabindex = 1;
  131. $(document).ready(function () {
  132. laydate.skin('blue');
  133. laydate({
  134. elem: '#date',
  135. event: 'focus'
  136. });
  137. $('.ul_tab li').click(function () {
  138. $(this).parent().find("li").removeClass("active");
  139. $(this).addClass("active");
  140. tabindex = $(this).index() + 1;
  141. initTable();
  142. })
  143. //获取来源
  144. LY($("#source"));
  145. initTable();
  146. })
  147. function initTable() {
  148. $.ajax({
  149. url: huayi.config.callcenter_url + 'WorkOrderReport/GetDayWeekMonthReport',
  150. type: 'get',
  151. data: {
  152. date: $("#date").val(),
  153. type: tabindex,
  154. datetype: $("#datetype").val(),
  155. source: $("#source").val(),
  156. token: $.cookie("token")
  157. },
  158. dataType: "json",
  159. async: true,
  160. success: function (returnValue) {
  161. //异步获取数据
  162. var resultData1 = returnValue.data.DayWeekMonthReport;
  163. $('#workorderlist').bootstrapTable('load', resultData1);
  164. //var resultData2 = returnValue.data.DayWeekMonthReport1;
  165. //if (resultData2.length > 0) {
  166. // if ($("#datetype").val() == '1') {
  167. // $(".sjxs").text(resultData2[0].startdate)
  168. // }
  169. // else {
  170. // $(".sjxs").text(resultData2[0].startdate + "~" + resultData2[0].enddate);
  171. // }
  172. //}
  173. }
  174. });
  175. $('#workorderlist').bootstrapTable('destroy').bootstrapTable({
  176. striped: true
  177. });
  178. }
  179. //来源
  180. function LY(obj) {
  181. obj.empty();
  182. obj.append(
  183. '<option selected="selected" value="">请选择</option>'
  184. );
  185. $.getJSON(
  186. huayi.config.callcenter_url +
  187. "Dictionary/GetDicValueListById", {
  188. token: $.cookie("token"),
  189. id: 1,
  190. },
  191. function (data) {
  192. if (data.state.toLowerCase() == "success") {
  193. var content = data.data;
  194. $(content).each(function (i, n) {
  195. $(
  196. "<option value='" +
  197. n.F_ValueId +
  198. "'>" +
  199. n.F_Value +
  200. "</option>"
  201. ).appendTo(obj);
  202. });
  203. }
  204. }
  205. );
  206. }
  207. //序号
  208. function serialNumber(val, row, index) {
  209. return index + 1;
  210. }
  211. // 已办结
  212. function finishedList(val, row) {
  213. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.id + '\', \'9\')" >' + val +
  214. '</a></div>';
  215. }
  216. // 查看列表
  217. function viewList(id, state) {
  218. var id = id;
  219. var datetype = $("#datetype").val();
  220. var source = $("#source").val();
  221. var starttime = $("#date").val();
  222. var endtime = ""
  223. // endtime = $("#equeryTime").val();
  224. // if (endtime.length > 0 && endtime.length <= 10) {
  225. // endtime = encodeURIComponent(endtime + " 23:59:59");
  226. // } else {
  227. // endtime = encodeURIComponent(endtime);
  228. // }
  229. layer.open({
  230. type: 2,
  231. content: "./DWMList.html?id=" + id + "&state=" + state +
  232. "&starttime=" + starttime + "&endtime=" + endtime + "&tabindex=" + tabindex + "&datetype=" +
  233. datetype + "&source=" + source, //iframe的url,no代表不显示滚动条
  234. title: '回访管理',
  235. area: ['90%', '90%'], //宽高
  236. });
  237. }
  238. //代办搜索
  239. $(".search_1").click(function () {
  240. initTable();
  241. })
  242. //导出
  243. $('.export_1').click(function () {
  244. dcexcel_1(this);
  245. })
  246. function dcexcel_1(obj) {
  247. var source = $("#source").val();
  248. var url = huayi.config.callcenter_url + "WorkOrderReport/GetDayWeekMonthReport?token=" + $.cookie(
  249. "token");
  250. url += "&date=" + $("#date").val() + "&datetype=" + $("#datetype").val() + "&type=" + tabindex +
  251. "&source=" + source + "&isExport=true";
  252. obj.href = url;
  253. }
  254. </script>
  255. </body>
  256. </html>