Нет описания

reportStatistics.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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"> 时间:<input class="photo x-color inputs laydate-icon" type="text" id="squeryTime" /> 部门:
  121. <div class="inpBox">
  122. <input class="inps inps1">
  123. <input type="hidden" id="deptid" />
  124. <i class="Cleans fa fa-close"></i>
  125. <i class="xl xl_two"></i>
  126. <div class="addTree xlAdd_two">
  127. <ul id="deptTree" class="ztree"></ul>
  128. </div>
  129. </div>
  130. <button class="btns search_1">查询</button>
  131. <a class="btns" id="exportPublicSentiments">导出</a>
  132. </div>
  133. </div>
  134. <!--data-formatter="comprehensiveScores"-->
  135. <!--table1-->
  136. <div style="width: 100%;padding: 10px;">
  137. <table id="publicSATable" class="tables" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  138. <thead>
  139. <tr>
  140. <th data-field="totalsort" data-align="center">排名</th>
  141. <th data-field="deptname" data-align="center">单位名称</th>
  142. <th data-field="Handling" data-formatter="handlingList" data-align="center">办件数量</th>
  143. <th data-field="Recoveryrate" data-formatter="recoveryrateList" data-align="center">工单实时签收率</th>
  144. <th data-field="Overtimerate" data-formatter="overtimerateList" data-align="center">实时退单率</th>
  145. <th data-field="Refundrate" data-formatter="refundrateList" data-align="center">重复退单率</th>
  146. <th data-field="Finishontimerate" data-formatter="finishontimerateList" data-align="center">按时办结率</th>
  147. <th data-field="increasespeed" data-align="center">办结提速率</th>
  148. <th data-field="scanning" data-formatter="scanningList" data-align="center" class="remark">扫描件上传速率</th>
  149. <th data-field="satisfied" data-align="center">结果满意率</th>
  150. <th data-field="Information" data-formatter="InformationScores" data-align="center">信息宣传</th>
  151. <th data-field="InformationRemarks" data-align="center">信息宣传备注</th>
  152. <th data-field="Excellent" data-formatter="ExcellentScores" data-align="center">优秀案件</th>
  153. <th data-field="ExcellentRemarks" data-align="center">优秀案件备注</th>
  154. <th data-field="Immediate" data-formatter="ImmediateScores" data-align="center">即办事项</th>
  155. <th data-field="ImmediateRemarks" data-align="center">即办事项备注</th>
  156. <th data-field="Additional" data-align="center">工作附加分</th>
  157. <th data-field="Supervision" data-formatter="superviseScores" data-align="center">监督检查</th>
  158. <th data-field="SupervisionRemarks" data-align="center">监督检查备注</th>
  159. <th data-field="total" data-align="center">总分</th>
  160. </tr>
  161. </thead>
  162. </table>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <script src="../js/laydate/laydate.js"></script>
  168. <script>
  169. $(document).ready(function() {
  170. laydate.render({
  171. elem: '#squeryTime', //指定元素
  172. type: 'month'
  173. });
  174. getTimes('#squeryTime')
  175. initTable();
  176. bindtree();
  177. });
  178. //表格
  179. function initTable() {
  180. //先销毁表格
  181. $('#publicSATable').bootstrapTable('destroy');
  182. //初始化表格,动态从服务器加载数据
  183. $.ajax({
  184. url: huayi.config.callcenter_url + 'WorkOrderReport/GetPerformanceAssessment',
  185. type: 'get',
  186. data: {
  187. start: $("#squeryTime").val(),
  188. deptid: $("#deptid").val(),
  189. token: $.cookie("token")
  190. },
  191. dataType: "json",
  192. async: true,
  193. success: function(returnValue) {
  194. //异步获取数据
  195. var resultData = returnValue.rows;
  196. $('#publicSATable').bootstrapTable('load', resultData);
  197. }
  198. });
  199. $('#publicSATable').bootstrapTable('destroy').bootstrapTable({
  200. striped: true,
  201. pagination: true,
  202. });
  203. }
  204. //搜索
  205. $(".search_1").click(function() {
  206. initTable();
  207. });
  208. $(".inps").focus(function() {
  209. $(this).siblings(".addTree").css("display", "block");
  210. });
  211. $(".xl").click(function() {
  212. var xl = $(this).siblings(".addTree");
  213. if(xl.css("display") == "block") {
  214. xl.css("display", "none");
  215. } else {
  216. xl.css("display", "block");
  217. }
  218. });
  219. function getTimes(dom) {
  220. function p(s) {
  221. return s < 10 ? '0' + s : s;
  222. }
  223. var currentYear = new Date().getFullYear();
  224. var currentMonth = new Date().getMonth() + 1;
  225. var currentDate = new Date().getDate();
  226. var prevCurrentYear = 0;
  227. var prevCurrentMonth = 0;
  228. if(currentMonth == 1) {
  229. prevCurrentYear = currentYear - 1;
  230. prevCurrentMonth = 12;
  231. } else {
  232. prevCurrentYear = currentYear;
  233. prevCurrentMonth = currentMonth - 1;
  234. }
  235. let hh = new Date().getHours()
  236. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  237. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  238. var data = currentYear + "-" + p(currentMonth) + "-" + '01';
  239. var current = currentYear + "-" + p(currentMonth);
  240. $(dom).val(current)
  241. }
  242. function bindtree() {
  243. $.getJSON(
  244. huayi.config.callcenter_url + "Department/GetDeptList", {
  245. token: $.cookie("token")
  246. },
  247. function(result) {
  248. if(result.state.toLowerCase() == "success") {
  249. $.fn.zTree.init($("#deptTree"), setting, result.data);
  250. }
  251. }
  252. );
  253. }
  254. //获取所属部门
  255. var setting = {
  256. data: {
  257. key: {
  258. name: "F_DeptName",
  259. },
  260. simpleData: {
  261. enable: true,
  262. idKey: "F_DeptId",
  263. pIdKey: "F_PartentId",
  264. rootPId: 0,
  265. },
  266. },
  267. callback: {
  268. onClick: zTreeOnClick,
  269. },
  270. };
  271. function zTreeOnClick(event, treeId, treeNode) {
  272. $(".inps1").val(treeNode.F_DeptName);
  273. $("#deptid").val(treeNode.F_DeptId);
  274. $(".Cleans").show();
  275. $('.addTree').css('display', 'none');
  276. }
  277. $(".Cleans").click(function() {
  278. $(".inps1").val("");
  279. $("#deptid").val("");
  280. })
  281. //导出
  282. $('#exportPublicSentiments').click(function() {
  283. dcexcelDispath(this);
  284. });
  285. function dcexcelDispath(obj) {
  286. var url = huayi.config.callcenter_url + "WorkOrderReport/GetPerformanceAssessment?token=" + $.cookie("token");
  287. url += "&start=" + $("#squeryTime").val() +"&deptid=" + $('#deptid').val() + "&isExport=true";
  288. obj.href = url;
  289. }
  290. function InformationScores(val,row){
  291. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid+'\',\''+0+'\',\'' +0+'\')">' + val + '</a>'
  292. }
  293. //工单实时签收率
  294. function recoveryrateList(val,row){
  295. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+1+'\')">' + val + '</a>'
  296. }
  297. //实时退单率
  298. function overtimerateList(val,row){
  299. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+2+'\')">' + val + '</a>'
  300. }
  301. //重复退单率
  302. function refundrateList(val,row){
  303. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+3+'\')">' + val + '</a>'
  304. }
  305. //按时办结率
  306. function finishontimerateList(val,row){
  307. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+4+'\')">' + val + '</a>'
  308. }
  309. //扫描件上传速率
  310. function scanningList(val,row){
  311. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+5+'\')">' + val + '</a>'
  312. }
  313. //办件数量
  314. function handlingList(val,row){
  315. return '<a onclick="btn_orderView(\'' + row.deptid+'\',\''+6+'\')">' + val + '</a>'
  316. }
  317. function ExcellentScores(val,row){
  318. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid+'\',\''+0+'\',\'' +1+'\')">' + val + '</a>'
  319. }
  320. function ImmediateScores(val,row){
  321. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid+'\',\''+0+'\',\'' +2+'\')">' + val + '</a>'
  322. }
  323. function superviseScores(val, row) {
  324. return '<a onclick="btn_comprehensiveScores(\'' + row.deptid+'\',\''+1+ '\')">' + val + '</a>'
  325. }
  326. function btn_orderView(deptid,tmptype) {
  327. var time=$("#squeryTime").val()
  328. layer.open({
  329. type: 2,
  330. content: "./workListReport.html?deptid=" + deptid+'&tmptype='+tmptype+'&dateT='+time, //iframe的url,no代表不显示滚动条
  331. title: '工单列表',
  332. area: ['100%', '100%'], //宽高
  333. });
  334. }
  335. function btn_comprehensiveScores(id,state,type) {
  336. var time=$("#squeryTime").val()
  337. layer.open({
  338. type: 2,
  339. content: "../YeWu/changeComprehensiveScoresGongYi.html?id=" + id+'&state='+state+'&dateT='+time+'&type='+type, //iframe的url,no代表不显示滚动条
  340. title: '综合考评分数',
  341. area: ['80%', '50%'], //宽高
  342. });
  343. }
  344. </script>
  345. </body>
  346. </html>