| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>质检数据报表</title>
- <!--[if lt IE 9]>
- <meta http-equiv="refresh" content="0;ie.html" />
- <![endif]-->
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="js/select2/css/select2.min.css" />
- <link rel="stylesheet" href="./css/init.css" />
- <style>
-
- .zxtable {
- font-size: 12px;
- }
-
- .zxt-top {
- background: #f3f3f4;
- height: 60px;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
-
-
- .zxt-content {
- width: 95%;
- margin: 0 auto;
- }
-
- .zxt-table {
- overflow-x: auto;
- }
-
- .zxt-table table {
- font-size: 12px;
- margin-top: 20px;
- width: 100%;
- max-width: 100%;
- }
-
- .zxt-table table thead tr td {
- background: #1ab394;
- color: #fff;
- }
- </style>
- </head>
- <body class="gray-bg" style="background: #fefefe;">
- <div class="zxtable">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>><a href="javaScript:;">报表分析</a>><a href="javaScript:;">员工考核分析</a>><a href="" class="nowPosition">质检数据报表</a></sapn>
- </div>
- <div class="dhRight">
- <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="zxt-top clearfix">
- <div class="topCon">
- <!--部门:
- <select name="" id="bumen">
-
- </select>
- 开始时间:
- <input type="text" class="laydate-icon" id="startTime" /> 结束时间:
- <input type="text" class="laydate-icon" id="endTime" />
- <button class="btns sear">搜索</button>-->
- <!--<button class="btn daochu ">导出Excel</button>-->
- <div class="form-inline th-bar clearfix">
- <div class="time-box form-group" >
- <i class="tub fa fa-calendar"></i>
- <input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
- </div>
- <div class="time-box form-group" >
- <select name="" id="bumen" class="form-control">
-
- </select>
- </div>
- <div class="form-group tool_bars pull-right">
- <button class="btns sear">搜索</button>
- <!--<a class="btns export">导出</a>-->
- </div>
-
- </div>
-
- </div>
- </div>
- <div class="zxt-content">
- <div class="zxt-table">
- <table class="table table-bordered text-center table-hover zjTable">
- <thead>
- <tr class="one"></tr>
- <tr class="two"></tr>
- <tr class="three"></tr>
- <tr class="four"></tr>
- </thead>
- <tbody class="tbody">
- </table>
- </div>
- </div>
- </div>
- <script src="./js/jquery.min.js?v=2.1.4"></script>
- <script src="./js/bootstrap.min.js?v=3.3.6"></script>
- <script src="./js/jquery.cookie.js"></script>
- <script src="./js/laydate/laydate.js"></script>
- <script src="./js/select2/js/select2.min.js"></script>
-
- <script>
- $(function() {
- var token = $.cookie("token");
- //日期
- laydate.render({
- elem: '#startTime',
- range: '~',
- theme: '#1ab394',
- });
- var expor;
- tbodyAjax();
- //点击搜索事件
- $('.sear').click(function() {
- tbodyAjax();
- })
- //表头
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url+"QCResult/GetColumnList?expor",
- async: true,
- data: {
- token:token,
- isext:expor
- },
- success: function(data) {
- var content = data.data;
- for(var i = 0; i < content.length; i++) {
- $('<td rowspan="' + content[i].Rowspan + '" colspan="' + content[i].Colspan + '">' + content[i].Qcname + '</td>').appendTo('.zjTable thead tr.one')
- if(content[i].Qcscore !== null) {
- $('<td>' + content[i].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
- }
- if(content[i].Qclist !== null) {
- var twoCon = content[i].Qclist;
- //console.log(twoCon)
- for(var j = 0; j < twoCon.length; j++) {
- //console.log(twoCon[j].Qcname)
- $('<td rowspan="' + twoCon[j].Rowspan + '" colspan="' + twoCon[j].Colspan + '">' + twoCon[j].Qcname + '</td>').appendTo('.zjTable thead tr.two')
- if(twoCon[j].Qclist !== null) {
- var threeCon = twoCon[j].Qclist;
- //console.log(threeCon);
- for(var g = 0; g < threeCon.length; g++) {
- $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcname + '</td>').appendTo('.zjTable thead tr.three')
- $('<td rowspan="' + threeCon[g].Rowspan + '" colspan="' + threeCon[g].Colspan + '">' + threeCon[g].Qcscore + '</td>').appendTo('.zjTable thead tr.four')
- }
- }
- }
- }
- }
- }
- });
- //表格数据
- function tbodyAjax() {
- var loadindex;
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url+"QCResult/GetDataList?expor",
- beforeSend:function(){
- loadindex = layer.load()
- },
- async: true,
- data: {
- token:token,
- stime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[0],
- endtime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[1],
- dpt:$('#bumen').val(),
- isext: expor
- },
- success: function(result) {
- var tbodyCon = result.data;
- $('.zjTable tbody').html('');
- for(var i = 0; i < tbodyCon.length; i++) {
- $('<tr><td>' + tbodyCon[i].QCName + '</td><td>' + tbodyCon[i].UserName + '</td><td>' + tbodyCon[i].UserCode + '</td><td>' + tbodyCon[i].ZJCount + '</td><td>' + tbodyCon[i].Q2 + '</td><td>' + tbodyCon[i].Q4 + '</td><td>' + tbodyCon[i].Q5 + '</td><td>' + tbodyCon[i].Q6 + '</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 style="color:#e43926;font-weight: bold;">' + tbodyCon[i].AllScore + '</td></tr>').appendTo('.zjTable tbody')
- }
- }
- }).then(function(){layer.close(loadindex);});
- }
- //部门下拉框
- $("#bumen").select2({
- width: 'resolve' ,
- minimumResultsForSearch: -1,
- ajax:{
- type:"get",
- url:huayi.config.callcenter_url+"Department/GetDeptList",
- async:true,
- dataType: "json",
- data:function(params){
- return{
- token:token,
- pid:params.id
- }
- },
- processResults:function(data){
-
- return{
- results:data.data
- }
- },
- cache: true
- },
- placeholder: "请选择部门",
- });
- })
- </script>
- </body>
- </html>
|