Nav apraksta

zhiJian.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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: 14px;
  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: 34px;
  40. border: 1px solid #ebebeb;
  41. outline: none;
  42. vertical-align: middle;
  43. }
  44. .topCon input {
  45. width: 200px;
  46. padding: 2px 2PX 2PX 10PX;
  47. height: 34px;
  48. border: 1px solid #ebebeb;
  49. outline: none;
  50. vertical-align: middle;
  51. }
  52. .zxt-content {
  53. width: 95%;
  54. margin: 0 auto;
  55. }
  56. .zxt-table {
  57. overflow-x: auto;
  58. }
  59. .zxt-table table {
  60. font-size: 12px;
  61. margin-top: 20px;
  62. width: 100%;
  63. max-width: 100%;
  64. }
  65. .zxt-table table thead tr td {
  66. background: #1ab394;
  67. color: #fff;
  68. }
  69. </style>
  70. </head>
  71. <body class="gray-bg" style="background: #fefefe;">
  72. <div class="zxtable">
  73. <div class="daoHang clearfix">
  74. <div class="dhLeft">
  75. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a
  76. href="javaScript:;">报表分析</a>&gt;<a href="javaScript:;">员工考核分析</a>&gt;<a href=""
  77. class="nowPosition">质检数据报表</a></sapn>
  78. </div>
  79. </div>
  80. <div class="zxt-top clearfix">
  81. <div class="topCon">
  82. <!-- 部门:
  83. <select name="" id="bumen">
  84. </select> -->
  85. 开始时间:
  86. <input type="text" class="laydate-icon" id="startTime" autocomplete="off" /> 结束时间:
  87. <input type="text" class="laydate-icon" id="endTime" autocomplete="off" />
  88. <button class="btns sear">搜索</button>
  89. <!--<button class="btn daochu ">导出Excel</button>-->
  90. </div>
  91. </div>
  92. <div class="zxt-content">
  93. <div class="zxt-table">
  94. <table class="table table-bordered text-center table-hover zjTable">
  95. <thead>
  96. <tr class="one"></tr>
  97. <tr class="two"></tr>
  98. <tr class="three"></tr>
  99. <tr class="four"></tr>
  100. </thead>
  101. <tbody class="tbody">
  102. </table>
  103. </div>
  104. </div>
  105. </div>
  106. <script src="../js/jquery.min.js?v=2.1.4"></script>
  107. <script src="../js/bootstrap.min.js?v=3.3.6"></script>
  108. <script src="../js/jquery.cookie.js"></script>
  109. <script src="../css/laydate/laydate.js"></script>
  110. <script src="../js/select2/js/select2.min.js"></script>
  111. <script>
  112. $(function () {
  113. var token = $.cookie("token");
  114. laydate.skin('blue');
  115. //开始时间
  116. laydate({
  117. elem: '#startTime',
  118. event: 'focus',
  119. istoday: true,
  120. istime: true,
  121. format: 'YYYY-MM-DD hh:mm:ss'
  122. });
  123. //结束时间
  124. laydate({
  125. elem: '#endTime',
  126. event: 'focus',
  127. istoday: true,
  128. istime: true,
  129. format: 'YYYY-MM-DD hh:mm:ss'
  130. });
  131. var stime, //开始时间
  132. endtime, //结束时间
  133. bumen,
  134. expor;
  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",
  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]
  168. .Colspan + '">' + content[i].Qcname + '</td>').appendTo(
  169. '.zjTable thead tr.one')
  170. if (content[i].Qcscore !== null) {
  171. $('<td>' + content[i].Qcscore + '</td>').appendTo(
  172. '.zjTable thead tr.four')
  173. }
  174. if (content[i].Qclist !== null) {
  175. var twoCon = content[i].Qclist;
  176. //console.log(twoCon)
  177. for (var j = 0; j < twoCon.length; j++) {
  178. //console.log(twoCon[j].Qcname)
  179. $('<td rowspan="' + twoCon[j].Rowspan + '" colspan="' + twoCon[j]
  180. .Colspan + '">' + twoCon[j].Qcname + '</td>').appendTo(
  181. '.zjTable thead tr.two')
  182. if (twoCon[j].Qclist !== null) {
  183. var threeCon = twoCon[j].Qclist;
  184. //console.log(threeCon);
  185. for (var g = 0; g < threeCon.length; g++) {
  186. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' +
  187. threeCon[g].Colspan + '">' + threeCon[g].Qcname +
  188. '</td>').appendTo('.zjTable thead tr.three')
  189. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' +
  190. threeCon[g].Colspan + '">' + threeCon[g].Qcscore +
  191. '</td>').appendTo('.zjTable thead tr.four')
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. });
  199. tbodyAjax();
  200. //表格数据
  201. function tbodyAjax(stime, endtime, bumen) {
  202. $.ajax({
  203. type: "get",
  204. dataType: "json",
  205. url: huayi.config.callcenter_url + "QCResult/GetDataList",
  206. async: true,
  207. data: {
  208. token: token,
  209. stime: stime,
  210. endtime: endtime,
  211. dpt: bumen,
  212. // isext: expor
  213. },
  214. success: function (result) {
  215. var tbodyCon = result.data;
  216. console.log(tbodyCon);
  217. for (var i = 0; i < tbodyCon.length; i++) {
  218. $('<tr><td>' + tbodyCon[i].QCName + '</td><td>' +
  219. tbodyCon[i].UserName + '</td><td>' +
  220. tbodyCon[i].UserCode + '</td><td class="orderList" dataAttr="' + tbodyCon[i].UserCode + '"><a>' +
  221. tbodyCon[i].ZJCount + '</a></td><td>' +
  222. (tbodyCon[i].Q17 == undefined ? "" : tbodyCon[i].Q17) +
  223. '</td><td>' +
  224. (tbodyCon[i].Q18 == undefined ? "" : tbodyCon[i].Q18) +
  225. '</td><td>' +
  226. (tbodyCon[i].Q19 == undefined ? "" : tbodyCon[i].Q19) +
  227. '</td><td>' +
  228. (tbodyCon[i].Q20 == undefined ? "" : tbodyCon[i].Q20) +
  229. '</td><td>' +
  230. (tbodyCon[i].df0 == undefined ? "" : tbodyCon[i].df0) + '</td><td>' +
  231. (tbodyCon[i].Q21 == undefined ? "" : tbodyCon[i].Q21) +
  232. '</td><td>' +
  233. (tbodyCon[i].Q22 == undefined ? "" : tbodyCon[i].Q22) +
  234. '</td><td>' +
  235. (tbodyCon[i].df1 == undefined ? "" : tbodyCon[i].df1) + '</td><td>' +
  236. (tbodyCon[i].Q23 == undefined ? "" : tbodyCon[i].Q23) +
  237. '</td><td>' +
  238. (tbodyCon[i].Q24 == undefined ? "" : tbodyCon[i].Q24) +
  239. '</td><td>' +
  240. (tbodyCon[i].Q25 == undefined ? "" : tbodyCon[i].Q25) +
  241. '</td><td>' +
  242. (tbodyCon[i].df2 == undefined ? "" : tbodyCon[i].df2) + '</td><td>' +
  243. (tbodyCon[i].Q26 == undefined ? "" : tbodyCon[i].Q26) +
  244. '</td><td>' +
  245. (tbodyCon[i].Q27 == undefined ? "" : tbodyCon[i].Q27) +
  246. '</td><td>' +
  247. (tbodyCon[i].Q28 == undefined ? "" : tbodyCon[i].Q28) +
  248. '</td><td>' +
  249. (tbodyCon[i].Q29 == undefined ? "" : tbodyCon[i].Q29) +
  250. '</td><td>' +
  251. (tbodyCon[i].Q30 == undefined ? "" : tbodyCon[i].Q30) +
  252. '</td><td>' +
  253. (tbodyCon[i].Q31 == undefined ? "" : tbodyCon[i].Q31) +
  254. '</td><td>' +
  255. (tbodyCon[i].Q32 == undefined ? "" : tbodyCon[i].Q32) +
  256. '</td><td>' +
  257. (tbodyCon[i].df3 == undefined ? "" : tbodyCon[i].df3) + '</td><td>' +
  258. (tbodyCon[i].Q33 == undefined ? "" : tbodyCon[i].Q33) +
  259. '</td><td>' +
  260. (tbodyCon[i].Q34 == undefined ? "" : tbodyCon[i].Q34) +
  261. '</td><td>' +
  262. (tbodyCon[i].df4 == undefined ? "" : tbodyCon[i].df4) + '</td><td>' +
  263. (tbodyCon[i].Q35 == undefined ? "" : tbodyCon[i].Q35) +
  264. '</td><td>' +
  265. (tbodyCon[i].Q36 == undefined ? "" : tbodyCon[i].Q36) +
  266. '</td><td>' +
  267. (tbodyCon[i].Q37 == undefined ? "" : tbodyCon[i].Q37) +
  268. '</td><td>' +
  269. (tbodyCon[i].df5 == undefined ? "" : tbodyCon[i].df5) + '</td><td>' +
  270. (tbodyCon[i].Q38 == undefined ? "" : tbodyCon[i].Q38) +
  271. '</td><td>' +
  272. (tbodyCon[i].Q39 == undefined ? "" : tbodyCon[i].Q39) +
  273. '</td><td>' +
  274. (tbodyCon[i].df6 == undefined ? "" : tbodyCon[i].df6) + '</td><td>' +
  275. (tbodyCon[i].Q40 == undefined ? "" : tbodyCon[i].Q40) +
  276. '</td><td>' +
  277. (tbodyCon[i].Q41 == undefined ? "" : tbodyCon[i].Q41) +
  278. '</td><td>' +
  279. (tbodyCon[i].Q42 == undefined ? "" : tbodyCon[i].Q42) +
  280. '</td><td>' +
  281. (tbodyCon[i].Q43 == undefined ? "" : tbodyCon[i].Q43) +
  282. '</td><td>' +
  283. (tbodyCon[i].Q44 == undefined ? "" : tbodyCon[i].Q44) +
  284. '</td><td>' +
  285. (tbodyCon[i].Q45 == undefined ? "" : tbodyCon[i].Q45) +
  286. '</td><td>' +
  287. (tbodyCon[i].df7 == undefined ? "" : tbodyCon[i].df7) + '</td><td>' +
  288. (tbodyCon[i].Q46 == undefined ? "" : tbodyCon[i].Q46) +
  289. '</td><td>' +
  290. (tbodyCon[i].Q47 == undefined ? "" : tbodyCon[i].Q47) +
  291. '</td><td>' +
  292. (tbodyCon[i].df8 == undefined ? "" : tbodyCon[i].df8) + '</td><td>' +
  293. tbodyCon[i].AllScore + '</td></tr>').appendTo('.zjTable tbody')
  294. }
  295. }
  296. });
  297. }
  298. $(".zjTable tbody").on("click",".orderList",function(){
  299. // var userCode = $(this).attr("dataAttr")
  300. layer.open({
  301. type: 2,
  302. content: "zhijian/orderList.html?userCode=" + $(this).attr("dataAttr")+"&stime="+$('#startTime').val()+"&endtime="+$('#endTime').val(), //iframe的url,no代表不显示滚动条
  303. title: '公告详情',
  304. area: ['60%', '80%'], //宽高
  305. });
  306. });
  307. function getOrderList(userCode){
  308. alert(userCode)
  309. }
  310. //部门下拉框
  311. $("#bumen").select2({
  312. width: 'resolve',
  313. minimumResultsForSearch: -1,
  314. ajax: {
  315. type: "get",
  316. url: huayi.config.callcenter_url + "Department/GetDeptListtree",
  317. async: true,
  318. dataType: "json",
  319. data: function (params) {
  320. return {
  321. token: token,
  322. pid: params.id
  323. }
  324. },
  325. processResults: function (data) {
  326. return {
  327. results: data.data
  328. }
  329. },
  330. cache: true
  331. },
  332. placeholder: "请选择",
  333. });
  334. })
  335. </script>
  336. </body>
  337. </html>