Keine Beschreibung

zhiJian.html 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>质检数据报表</title>
  7. <!--[if lt IE 9]>
  8. <meta http-equiv="refresh" content="0;ie.html" />
  9. <![endif]-->
  10. <script src="Script/Common/huayi.load.js"></script>
  11. <script src="Script/Common/huayi.config.js"></script>
  12. <link href="./css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  13. <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  14. <link href="./css/animate.min.css" rel="stylesheet">
  15. <link href="./css/style.min862f.css?v=4.1.0" rel="stylesheet">
  16. <link rel="stylesheet" href="./css/laydate/need/laydate.css" />
  17. <link rel="stylesheet" href="js/select2/css/select2.min.css" />
  18. <link rel="stylesheet" href="./css/init.css" />
  19. <style>
  20. .clearfix:after {
  21. content: "";
  22. display: block;
  23. clear: both;
  24. }
  25. .zxtable {
  26. font-size: 12px;
  27. }
  28. .zxt-top {
  29. background: #f3f3f4;
  30. height: 60px;
  31. padding: 10px 20px;
  32. }
  33. .topCon {
  34. float: right;
  35. margin-right: 45px;
  36. }
  37. .topCon select {
  38. padding: 2px;
  39. height: 28px;
  40. border: 1px solid #ebebeb;
  41. color: #1ab394;
  42. outline: none;
  43. vertical-align: middle;
  44. }
  45. .topCon input {
  46. width: 128px;
  47. padding: 2px 2PX 2PX 10PX;
  48. height: 28px;
  49. border: 1px solid #ebebeb;
  50. color: #1ab394;
  51. outline: none;
  52. vertical-align: middle;
  53. }
  54. .zxt-content {
  55. width: 95%;
  56. margin: 0 auto;
  57. }
  58. .zxt-table {
  59. overflow-x: auto;
  60. }
  61. .zxt-table table {
  62. font-size: 12px;
  63. margin-top: 20px;
  64. width: 100%;
  65. max-width: 100%;
  66. }
  67. .zxt-table table thead tr td {
  68. background: #1ab394;
  69. color: #fff;
  70. }
  71. </style>
  72. </head>
  73. <body class="gray-bg" style="background: #fefefe;">
  74. <div class="zxtable">
  75. <div class="daoHang clearfix">
  76. <div class="dhLeft">
  77. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">报表分析</a>&gt;<a href="javaScript:;">员工考核分析</a>&gt;<a href="" style="color: #000;">质检数据报表</a></sapn>
  78. </div>
  79. </div>
  80. <div class="zxt-top clearfix">
  81. <div class="topCon">
  82. 部门:
  83. <select name="" id="bumen">
  84. <option value="">请选择</option>
  85. </select>
  86. 开始时间:
  87. <input type="text" class="laydate-icon" id="startTime" /> 结束时间:
  88. <input type="text" class="laydate-icon" id="endTime" />
  89. <button class="btns sear">搜索</button>
  90. <!--<button class="btn daochu ">导出Excel</button>-->
  91. </div>
  92. </div>
  93. <div class="zxt-content">
  94. <div class="zxt-table">
  95. <table class="table table-bordered text-center table-hover zjTable">
  96. <thead>
  97. <tr class="one"></tr>
  98. <tr class="two"></tr>
  99. <tr class="three"></tr>
  100. <tr class="four"></tr>
  101. </thead>
  102. <tbody class="tbody">
  103. </table>
  104. </div>
  105. </div>
  106. </div>
  107. <script src="./js/jquery.min.js?v=2.1.4"></script>
  108. <script src="./js/bootstrap.min.js?v=3.3.6"></script>
  109. <script src="./js/jquery.cookie.js"></script>
  110. <script src="./css/laydate/laydate.js"></script>
  111. <script src="./js/select2/js/select2.min.js"></script>
  112. <script>
  113. $(function() {
  114. var token = $.cookie("token");
  115. laydate.skin('molv');
  116. //开始时间
  117. laydate({
  118. elem: '#startTime',
  119. event: 'focus',
  120. istoday: true,
  121. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  122. });
  123. //结束时间
  124. laydate({
  125. elem: '#endTime',
  126. event: 'focus',
  127. istoday: true,
  128. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  129. });
  130. var stime, //开始时间
  131. endtime, //结束时间
  132. bumen,
  133. expor;
  134. tbodyAjax();
  135. //点击搜索事件
  136. $('.sear').click(function() {
  137. $('.zjTable tbody').html('');
  138. stime = $('#startTime').val(); //开始时间
  139. endtime = $('#endTime').val(); //结束时间
  140. bumen = $('#bumen').val(); //部门
  141. if(stime != '' && endtime != '') {
  142. tbodyAjax(stime, endtime, bumen);
  143. }else{
  144. tbodyAjax();
  145. if(stime==''){
  146. alert('请选择开始时间!');
  147. }else if(endtime ==''){
  148. alert('请选择结束时间!');
  149. }
  150. }
  151. })
  152. //表头
  153. $.ajax({
  154. type: "get",
  155. dataType: "json",
  156. url: huayi.config.callcenter_url+"QCResult/GetColumnList?expor",
  157. async: true,
  158. data: {
  159. token:token,
  160. // stime: stime,
  161. // endtime: endtime,
  162. isext:expor
  163. },
  164. success: function(data) {
  165. var content = data.data;
  166. for(var i = 0; i < content.length; i++) {
  167. $('<td rowspan="' + content[i].Rowspan + '" colspan="' + content[i].Colspan + '">' + content[i].Qcname + '</td>').appendTo('.zjTable thead tr.one')
  168. if(content[i].Qcscore !== null) {
  169. $('<td>' + content[i].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
  170. }
  171. if(content[i].Qclist !== null) {
  172. var twoCon = content[i].Qclist;
  173. //console.log(twoCon)
  174. for(var j = 0; j < twoCon.length; j++) {
  175. //console.log(twoCon[j].Qcname)
  176. $('<td rowspan="' + twoCon[j].Rowspan + '" colspan="' + twoCon[j].Colspan + '">' + twoCon[j].Qcname + '</td>').appendTo('.zjTable thead tr.two')
  177. if(twoCon[j].Qclist !== null) {
  178. var threeCon = twoCon[j].Qclist;
  179. //console.log(threeCon);
  180. for(var g = 0; g < threeCon.length; g++) {
  181. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcname + '</td>').appendTo('.zjTable thead tr.three')
  182. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. });
  190. //表格数据
  191. function tbodyAjax(stime, endtime,bumen) {
  192. $.ajax({
  193. type: "get",
  194. dataType: "json",
  195. url: huayi.config.callcenter_url+"QCResult/GetDataList?expor",
  196. async: true,
  197. data: {
  198. token:token,
  199. stime: stime,
  200. endtime: endtime,
  201. dpt:bumen,
  202. isext: expor
  203. },
  204. success: function(result) {
  205. var tbodyCon = result.data;
  206. console.log(tbodyCon);
  207. for(var i = 0; i < tbodyCon.length; i++) {
  208. $('<tr><td>' + tbodyCon[i].QCName + '</td><td>' + tbodyCon[i].UserName + '</td><td>' + tbodyCon[i].UserCode + '</td><td>' + tbodyCon[i].ZJCount + '</td><td>' + tbodyCon[i].Q1 + '</td><td>' + tbodyCon[i].Q2 + '</td><td>' + tbodyCon[i].Q4 + '</td><td>' + tbodyCon[i].Q5 + '</td><td>' + tbodyCon[i].Q6 + '</td><td>' + tbodyCon[i].Q7 + '</td><td>' + tbodyCon[i].Q8 + '</td><td>' + tbodyCon[i].Q9 + '</td><td>' + tbodyCon[i].Q10 + '</td><td>' + tbodyCon[i].df0 + '</td><td>' + tbodyCon[i].Q12 + '</td><td>' + tbodyCon[i].Q13 + '</td><td>' + tbodyCon[i].Q14 + '</td><td>' + tbodyCon[i].Q15 + '</td><td>' + tbodyCon[i].Q16 + '</td><td>' + tbodyCon[i].Q17 + '</td><td>' + tbodyCon[i].Q18 + '</td><td>' + tbodyCon[i].df1 + '</td><td>' + tbodyCon[i].Q19 + '</td><td>' + tbodyCon[i].Q20 + '</td><td>' + tbodyCon[i].Q21 + '</td><td>' + tbodyCon[i].Q22 + '</td><td>' + tbodyCon[i].Q23 + '</td><td>' + tbodyCon[i].Q24 + '</td><td>' + tbodyCon[i].Q25 + '</td><td>' + tbodyCon[i].Q26 + '</td><td>' + tbodyCon[i].df2 + '</td><td>' + tbodyCon[i].AllScore + '</td></tr>').appendTo('.zjTable tbody')
  209. }
  210. }
  211. });
  212. }
  213. //部门下拉框
  214. $("#bumen").select2({
  215. width: 'resolve' ,
  216. minimumResultsForSearch: -1,
  217. ajax:{
  218. type:"get",
  219. url:huayi.config.callcenter_url+"Department/GetDeptList",
  220. async:true,
  221. dataType: "json",
  222. data:function(params){
  223. return{
  224. token:token,
  225. pid:params.id
  226. }
  227. },
  228. processResults:function(data){
  229. return{
  230. results:data.data
  231. }
  232. },
  233. cache: true
  234. },
  235. placeholder: "请选择",
  236. });
  237. })
  238. </script>
  239. </body>
  240. </html>