Nav apraksta

zhiJian.html 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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. <script src="Script/Common/huayi.load.js"></script>
  8. <script src="Script/Common/huayi.config.js"></script>
  9. <link href="./css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  10. <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  11. <link href="./css/animate.min.css" rel="stylesheet">
  12. <link href="./css/style.min862f.css?v=4.1.0" rel="stylesheet">
  13. <link rel="stylesheet" href="./css/laydate/need/laydate.css" />
  14. <link rel="stylesheet" href="js/select2/css/select2.min.css" />
  15. <link rel="stylesheet" href="./css/init.css" />
  16. <style>
  17. .clearfix:after {
  18. content: "";
  19. display: block;
  20. clear: both;
  21. }
  22. .zxtable {
  23. font-size: 12px;
  24. }
  25. .zxt-top {
  26. background: #f3f3f4;
  27. height: 60px;
  28. padding: 10px 20px;
  29. }
  30. .topCon {
  31. float: right;
  32. margin-right: 45px;
  33. }
  34. .topCon select {
  35. padding: 2px;
  36. height: 28px;
  37. border: 1px solid #ebebeb;
  38. /* color: #00479D; */
  39. outline: none;
  40. vertical-align: middle;
  41. }
  42. .topCon input {
  43. width: 128px;
  44. padding: 2px 2PX 2PX 10PX;
  45. height: 28px;
  46. border: 1px solid #ebebeb;
  47. color: #00479D;
  48. outline: none;
  49. vertical-align: middle;
  50. }
  51. .zxt-content {
  52. width: 95%;
  53. margin: 0 auto;
  54. }
  55. .zxt-table {
  56. overflow-x: auto;
  57. }
  58. .zxt-table table {
  59. font-size: 12px;
  60. margin-top: 20px;
  61. width: 100%;
  62. max-width: 100%;
  63. }
  64. .zxt-table table thead tr td {
  65. background: #00479D;
  66. color: #fff;
  67. }
  68. .zxt-table .pageList{
  69. width: 100%;
  70. overflow: hidden;
  71. }
  72. .zxt-table .pageList .pageCon{
  73. display: flex;
  74. float: right;
  75. }
  76. .zxt-table .pageList .pageCon div{
  77. height: 30px;
  78. line-height: 30px;
  79. margin: 8px;
  80. }
  81. .zxt-table .pageList .pageCon div input{
  82. width: 40px;
  83. padding: 0 8px;
  84. text-align: center;
  85. }
  86. .zxt-table .pageList .pageCon div button{
  87. background: #00479D;
  88. border: none;
  89. color: #FFFFFF;
  90. border-radius: 5px;
  91. font-size: 14px;
  92. }
  93. </style>
  94. </head>
  95. <body class="gray-bg" style="background: #fefefe;">
  96. <div class="zxtable">
  97. <div class="daoHang clearfix">
  98. <div class="dhLeft">
  99. <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>
  100. </div>
  101. </div>
  102. <div class="zxt-top clearfix">
  103. <div class="topCon">
  104. 营业部:
  105. <select name="" id="bumen">
  106. <option value="">请选择</option>
  107. </select>
  108. 开始时间:
  109. <input type="text" class="laydate-icon" id="startTime" autocomplete="off"/> 结束时间:
  110. <input type="text" class="laydate-icon" id="endTime" autocomplete="off"/>
  111. <button class="btns sear">搜索</button>
  112. <button class="btns daochu">导出Excel</button>
  113. </div>
  114. </div>
  115. <div class="zxt-content">
  116. <div class="zxt-table">
  117. <table class="table table-bordered text-center table-hover zjTable" style="width: 100%;">
  118. <thead style="width: 100%;">
  119. <tr class="one"></tr>
  120. <tr class="two"></tr>
  121. <tr class="three"></tr>
  122. <tr class="four"></tr>
  123. </thead>
  124. <tbody class="tbody"></tbody>
  125. </table>
  126. <div class="pageList">
  127. <div class="pageCon">
  128. <div>共<span id="pageTotal">2</span>条</div>
  129. <div>共<span id="pageSize">2</span>页</div>
  130. <div><button id="prePage">上一页</button></div>
  131. <div><input id="pageindex" value="" /></div>
  132. <div><button id="turnPage">跳转</button></div>
  133. <div><button id="nextPage">下一页</button></div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <script src="./js/jquery.min.js?v=2.1.4"></script>
  140. <script src="./js/bootstrap.min.js?v=3.3.6"></script>
  141. <script src="./js/jquery.cookie.js"></script>
  142. <script src="./css/laydate/laydate.js"></script>
  143. <script src="./js/select2/js/select2.min.js"></script>
  144. <script>
  145. var stime, endtime, bumen,expor;//开始时间
  146. var token = $.cookie("token");
  147. var content = [];
  148. var pageindex = 1;
  149. $(function() {
  150. laydate.skin('molv');
  151. //开始时间
  152. laydate({
  153. elem: '#startTime',
  154. event: 'focus',
  155. istoday: true,
  156. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  157. });
  158. //结束时间
  159. laydate({
  160. elem: '#endTime',
  161. event: 'focus',
  162. istoday: true,
  163. format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
  164. });
  165. getDepartList($("#bumen"))
  166. tbodyAjax();
  167. //表头
  168. $.ajax({
  169. type: "get",
  170. dataType: "json",
  171. url: huayi.config.callcenter_url+"ExportQCResult/GetColumnList",
  172. async: false,
  173. data: {
  174. token:token,
  175. },
  176. success: function(data) {
  177. data.data.forEach(function(v,n){
  178. if(v.Qcname !== '总分1'){
  179. content.push(v)
  180. }
  181. })
  182. for(var i = 0; i < content.length; i++) {
  183. $('<td rowspan="' + content[i].Rowspan + '" colspan="' + content[i].Colspan + '">' + content[i].Qcname + '</td>').appendTo('.zjTable thead tr.one')
  184. if(content[i].Qcscore !== null) {
  185. $('<td>' + content[i].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
  186. }
  187. if(content[i].Qclist !== null) {
  188. var twoCon = content[i].Qclist;
  189. for(var j = 0; j < twoCon.length; j++) {
  190. $('<td rowspan="' + twoCon[j].Rowspan + '" colspan="' + twoCon[j].Colspan + '">' + twoCon[j].Qcname + '</td>').appendTo('.zjTable thead tr.two')
  191. if(twoCon[j].Qclist !== null) {
  192. var threeCon = twoCon[j].Qclist;
  193. for(var g = 0; g < threeCon.length; g++) {
  194. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcname + '</td>').appendTo('.zjTable thead tr.three')
  195. $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. });
  203. })
  204. //点击搜索事件
  205. $('.sear').click(function() {
  206. pageindex =1
  207. tbodyAjax();
  208. })
  209. $("#prePage").click(function(){
  210. if(pageindex>1){
  211. pageindex --
  212. tbodyAjax();
  213. }
  214. })
  215. $("#turnPage").click(function(){
  216. pageindex = $("#pageindex").val()
  217. tbodyAjax();
  218. })
  219. $("#nextPage").click(function(){
  220. if(pageindex !=$("#pageSize").text()){
  221. pageindex ++
  222. tbodyAjax();
  223. }
  224. })
  225. //导出
  226. $('.daochu').click(function() {
  227. var url = huayi.config.callcenter_url + "ExportQCResult/ExportToExcelHeBing?token=" + $.cookie("token");
  228. url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val() + "&dpt=" + $('#bumen').val()
  229. window.location.href = url;
  230. })
  231. //表格数据
  232. function tbodyAjax() {
  233. $.ajax({
  234. type: "get",
  235. dataType: "json",
  236. url: huayi.config.callcenter_url+"ExportQCResult/GetDataList",
  237. async: true,
  238. data: {
  239. token:token,
  240. stime: $('#startTime').val(),
  241. pageindex:pageindex,
  242. pagesize:10,
  243. endtime: $('#endTime').val(),
  244. dpt:$('#bumen').val(),
  245. },
  246. success: function(result) {
  247. var tbodyCon = result.rows;
  248. $("#pageSize").text(Math.ceil(result.total/10))
  249. $("#pageindex").val(pageindex)
  250. $("#pageTotal").text(result.total)
  251. $('.zjTable tbody').html('');
  252. var html =""
  253. for(var i = 0; i < tbodyCon.length; i++) {
  254. html +="<tr>"
  255. for(var key in tbodyCon[i]){
  256. delete tbodyCon[i].AllScore
  257. html += '<td>' + tbodyCon[i][key] + '</td>'
  258. }
  259. html += "</tr>"
  260. }
  261. $(html).appendTo('.zjTable tbody')
  262. }
  263. });
  264. }
  265. //部门下拉框
  266. function getDepartList(obj) {
  267. obj.empty();
  268. let str = '<option value="">请选择</option>'
  269. $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
  270. "token": $.cookie("token")
  271. }, function(result) {
  272. if(result.state.toLowerCase() == "success") {
  273. result.data.forEach(function(v, n) {
  274. str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
  275. })
  276. obj.html(str)
  277. }
  278. })
  279. }
  280. </script>
  281. </body>
  282. </html>