Нет описания

DuoPaiDan.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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 href="../css/WorkOrder/Search.css" rel="stylesheet">
  10. <link href="../css/init.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  12. <script src="../js/zTree/jquery.ztree.core.js"></script>
  13. <style>
  14. table td {
  15. word-break: break-all;
  16. word-wrap: break-word;
  17. }
  18. .Shows {
  19. display: block !important;
  20. }
  21. .complain {
  22. display: none;
  23. }
  24. .toolLeft input {
  25. width: 235px;
  26. }
  27. th {
  28. padding: 5px;
  29. text-align: center;
  30. }
  31. td {
  32. padding: 5px;
  33. }
  34. .Borders {
  35. border: 1px solid #d7d7d7;
  36. }
  37. .daoHang {
  38. margin-bottom: 15px;
  39. }
  40. .inpBox {
  41. border: 1px solid #e5e6e7;
  42. height: 32px;
  43. width: 200px;
  44. display: inline-block;
  45. position: relative;
  46. vertical-align: middle;
  47. }
  48. .inpBox .inps1 {
  49. width: 100%;
  50. height: 30px;
  51. outline: none;
  52. border: 0;
  53. border-image-width: 0;
  54. padding: 0;
  55. padding-left: 3px;
  56. }
  57. .xl {
  58. display: inline-block;
  59. background: url(../img/dropDown.png) no-repeat;
  60. height: 100%;
  61. background-position: center center;
  62. width: 20px;
  63. position: absolute;
  64. right: 0;
  65. top: 0px;
  66. background-color: #f7bc8b;
  67. cursor: pointer;
  68. }
  69. .xl:hover {
  70. background-color: #e6d523;
  71. }
  72. .addTree {
  73. background: #fff;
  74. position: absolute;
  75. width: 100%;
  76. border: 1px solid darkgrey;
  77. right: 0;
  78. top: 30px;
  79. display: none;
  80. height: 350px;
  81. overflow-y: auto;
  82. z-index: 10;
  83. text-align: center;
  84. }
  85. .addTree .list li:hover {
  86. background: #ebebeb;
  87. color: #717171;
  88. }
  89. .remark {
  90. max-width: 350px;
  91. }
  92. .Cleans {
  93. display: inline-block;
  94. width: 20px;
  95. position: absolute;
  96. right: 21px;
  97. top: 8px;
  98. display: none;
  99. }
  100. </style>
  101. </head>
  102. <body class="gray-bg">
  103. <div class="wrapper wrapper-content animated fadeInRight">
  104. <div class="daoHang clearfix">
  105. <div class="dhLeft">
  106. <sapn>
  107. <i class="syIcon"></i>位置:
  108. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  109. <a href="javaScript:;">业务统计</a>&gt;
  110. <a href="" class="nowPosition">多派单统计</a>
  111. </sapn>
  112. </div>
  113. <div class="dhRight">
  114. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  115. </div>
  116. </div>
  117. <div class="Content_box">
  118. <div class="complain Shows">
  119. <div class="toolBar clearfix">
  120. <div class="toolLeft">
  121. 交办时间范围:
  122. <input type="text" autocomplete="off" class="laydate-icon" id="startTime" />-
  123. <input type="text" autocomplete="off" class="laydate-icon" id="endTime" /> 部门:
  124. <div class="inpBox">
  125. <input class="inps inps1">
  126. <input type="hidden" id="deptid" />
  127. <i class="Cleans fa fa-close"></i>
  128. <i class="xl xl_two"></i>
  129. <div class="addTree xlAdd_two">
  130. <ul id="deptTree" class="ztree"></ul>
  131. </div>
  132. </div>
  133. 工单号:
  134. <input class="photo x-color inputs" type="text" id="workid" />
  135. <button class="btns search_1">查询</button>
  136. <a class="btns" id="exportPublicSentiments">导出</a>
  137. </div>
  138. </div>
  139. <!--data-formatter="comprehensiveScores"-->
  140. <!--table1-->
  141. <div style="width: 100%;padding: 10px;">
  142. <table id="publicSATable" class="tables" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  143. <thead>
  144. <tr>
  145. <th data-field="F_WorkOrderId" data-formatter="orderDetail" data-align="center">工单号</th>
  146. <th data-field="DeptName" data-align="center">部门</th>
  147. <th data-field="total" data-align="center">交办量</th>
  148. </tr>
  149. </thead>
  150. <tbody class="list"></tbody>
  151. </table>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <!--<script src="../js/laydate/laydate.js"></script>-->
  157. <script src="../css/laydate/laydate.js"></script>
  158. <script>
  159. var exportParams;
  160. $(document).ready(function() {
  161. //开始时间
  162. laydate({
  163. elem: '#startTime',
  164. event: 'focus',
  165. istoday: true,
  166. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  167. });
  168. //结束时间
  169. laydate({
  170. elem: '#endTime',
  171. event: 'focus',
  172. istoday: true,
  173. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  174. });
  175. getTimes('#squeryTime')
  176. initTable();
  177. bindtree();
  178. });
  179. //表格
  180. function initTable() {
  181. //先销毁表格
  182. $('#publicSATable').bootstrapTable('destroy');
  183. //初始化表格,动态从服务器加载数据
  184. // $.ajax({
  185. // url: huayi.config.callcenter_url + 'WorkOrderReport/GetAssignInfotReport',
  186. // type: 'get',
  187. // data: {
  188. // start: $('#startTime').val(),
  189. // end: $('#endTime').val(),
  190. // deptid: $("#deptid").val(),
  191. // workorderid: $("#workid").val(),
  192. // token: $.cookie("token")
  193. // },
  194. // dataType: "json",
  195. // async: true,
  196. // success: function(returnValue) {
  197. // //异步获取数据
  198. // var resultData = returnValue.rows;
  199. // $('#publicSATable').bootstrapTable('load', resultData);
  200. // }
  201. // });
  202. // $('#publicSATable').bootstrapTable('destroy').bootstrapTable({
  203. // pagination: true, //启动分页
  204. // pageSize: 10, //每页显示的记录数
  205. // pageNumber: 1, //当前第几页
  206. // pageList: [10, 20, 50, 100], //记录数可选列表
  207. // });
  208. $("#publicSATable").bootstrapTable({
  209. method: "get", //使用get请求到服务器获取数据
  210. url: huayi.config.callcenter_url + "WorkOrderReport/GetAssignInfotReport", //获取数据的Servlet地址
  211. contentType: "application/x-www-form-urlencoded",
  212. striped: true, //表格显示条纹
  213. pagination: true, //启动分页
  214. pageSize: 10, //每页显示的记录数
  215. pageNumber: 1, //当前第几页
  216. pageList: [10, 20, 50, 100], //记录数可选列表
  217. search: false, //是否启用查询
  218. showColumns: false, //显示下拉框勾选要显示的列
  219. showRefresh: false, //显示刷新按钮
  220. sidePagination: "server", //表示服务端请求
  221. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  222. //设置为limit可以获取limit, offset, search, sort, order
  223. queryParamsType: "undefined",
  224. queryParams: function queryParams(params) { //设置查询参数
  225. var param = {
  226. pageIndex: params.pageNumber,
  227. pageSize: params.pageSize,
  228. start: $('#startTime').val(),
  229. end: $('#endTime').val(),
  230. deptid: $("#deptid").val(),
  231. workorderid: $("#workid").val(),
  232. token: $.cookie("token")
  233. };
  234. exportParams = param
  235. return param;
  236. },
  237. onLoadSuccess: function(data) { //加载成功时执行
  238. // layer.msg("加载成功");
  239. //console.log(data);
  240. },
  241. onLoadError: function() { //加载失败时执行
  242. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  243. }
  244. });
  245. }
  246. //搜索
  247. $(".search_1").click(function() {
  248. initTable();
  249. });
  250. $(".inps").focus(function() {
  251. $(this).siblings(".addTree").css("display", "block");
  252. });
  253. $(".xl").click(function() {
  254. var xl = $(this).siblings(".addTree");
  255. if(xl.css("display") == "block") {
  256. xl.css("display", "none");
  257. } else {
  258. xl.css("display", "block");
  259. }
  260. });
  261. function getTimes(dom) {
  262. function p(s) {
  263. return s < 10 ? '0' + s : s;
  264. }
  265. var currentYear = new Date().getFullYear();
  266. var currentMonth = new Date().getMonth() + 1;
  267. var currentDate = new Date().getDate();
  268. var prevCurrentYear = 0;
  269. var prevCurrentMonth = 0;
  270. if(currentMonth == 1) {
  271. prevCurrentYear = currentYear - 1;
  272. prevCurrentMonth = 12;
  273. } else {
  274. prevCurrentYear = currentYear;
  275. prevCurrentMonth = currentMonth - 1;
  276. }
  277. let hh = new Date().getHours()
  278. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  279. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  280. var data = currentYear + "-" + p(currentMonth) + "-" + '01';
  281. var current = currentYear + "-" + p(currentMonth);
  282. $(dom).val(current)
  283. }
  284. function bindtree() {
  285. $.getJSON(
  286. huayi.config.callcenter_url + "Department/GetDeptList", {
  287. token: $.cookie("token")
  288. },
  289. function(result) {
  290. if(result.state.toLowerCase() == "success") {
  291. $.fn.zTree.init($("#deptTree"), setting, result.data);
  292. }
  293. }
  294. );
  295. }
  296. //获取所属部门
  297. var setting = {
  298. data: {
  299. key: {
  300. name: "F_DeptName",
  301. },
  302. simpleData: {
  303. enable: true,
  304. idKey: "F_DeptId",
  305. pIdKey: "F_PartentId",
  306. rootPId: 0,
  307. },
  308. },
  309. callback: {
  310. onClick: zTreeOnClick,
  311. },
  312. };
  313. function zTreeOnClick(event, treeId, treeNode) {
  314. $(".inps1").val(treeNode.F_DeptName);
  315. $("#deptid").val(treeNode.F_DeptId);
  316. $(".Cleans").show();
  317. $('.addTree').css('display', 'none');
  318. }
  319. $(".Cleans").click(function() {
  320. $(".inps1").val("");
  321. $("#deptid").val("");
  322. })
  323. //导出
  324. $('#exportPublicSentiments').click(function() {
  325. dcexcelDispath(this);
  326. });
  327. function dcexcelDispath(obj) {
  328. var url = huayi.config.callcenter_url + "WorkOrderReport/GetAssignInfotReport?token=" + $.cookie("token");
  329. url += "&start=" + $("#startTime").val() + "&end=" + $("#endTime").val() + "&workorderid=" + $("#workid").val() + "&deptid=" + $('#deptid').val() + "&isExport=true";
  330. obj.href = url;
  331. }
  332. function InformationScores(val, row) {
  333. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid + '\',\'' + 0 + '\',\'' + 0 + '\')">' + val + '</a>'
  334. }
  335. //工单实时签收率
  336. function recoveryrateList(val, row) {
  337. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 1 + '\')">' + val + '</a>'
  338. }
  339. //实时退单率
  340. function overtimerateList(val, row) {
  341. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 2 + '\')">' + val + '</a>'
  342. }
  343. //重复退单率
  344. function refundrateList(val, row) {
  345. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 3 + '\')">' + val + '</a>'
  346. }
  347. //按时办结率
  348. function finishontimerateList(val, row) {
  349. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 4 + '\')">' + val + '</a>'
  350. }
  351. //扫描件上传速率
  352. function scanningList(val, row) {
  353. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 5 + '\')">' + val + '</a>'
  354. }
  355. //办件数量
  356. function handlingList(val, row) {
  357. return '<a onclick="btn_orderView(\'' + row.deptid + '\',\'' + 6 + '\')">' + val + '</a>'
  358. }
  359. function ExcellentScores(val, row) {
  360. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid + '\',\'' + 0 + '\',\'' + 1 + '\')">' + val + '</a>'
  361. }
  362. function ImmediateScores(val, row) {
  363. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid + '\',\'' + 0 + '\',\'' + 2 + '\')">' + val + '</a>'
  364. }
  365. function superviseScores(val, row) {
  366. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid + '\',\'' + 1 + '\')">' + val + '</a>'
  367. }
  368. function btn_orderView(deptid, tmptype) {
  369. var time = $("#squeryTime").val()
  370. layer.open({
  371. type: 2,
  372. content: "./workListReport.html?deptid=" + deptid + '&tmptype=' + tmptype + '&dateT=' + time, //iframe的url,no代表不显示滚动条
  373. title: '工单列表',
  374. area: ['100%', '100%'], //宽高
  375. });
  376. }
  377. function btn_comprehensiveScores(id, state, type) {
  378. var time = $("#squeryTime").val()
  379. layer.open({
  380. type: 2,
  381. content: "../YeWu/changeComprehensiveScoresGongYi.html?id=" + id + '&state=' + state + '&dateT=' + time + '&type=' + type, //iframe的url,no代表不显示滚动条
  382. title: '综合考评分数',
  383. area: ['80%', '50%'], //宽高
  384. });
  385. }
  386. function orderDetail(val, row) {
  387. if(row.F_WorkOrderId) {
  388. return '<a onclick="ckxq(\'' + row.F_WorkOrderId + '\')">' + row.F_WorkOrderId + '</a>'
  389. }
  390. }
  391. function ckxq(str) {
  392. layer.open({
  393. type: 2,
  394. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  395. title: '工单详情',
  396. area: ['87%', '80%'], //宽高
  397. });
  398. }
  399. </script>
  400. </body>
  401. </html>