| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- <!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 href="../css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
- <link href="../css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
- <link href="../css/animate.min.css" rel="stylesheet">
- <link href="../css/style.min862f.css?v=4.1.0" rel="stylesheet">
- <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
- <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <style>
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
- .zxtable {
- font-size: 14px;
- }
- .zxt-top {
- background: #f3f3f4;
- height: 60px;
- padding: 10px 20px;
- }
- .topCon {
- float: right;
- margin-right: 45px;
- }
- .topCon select {
- padding: 2px;
- height: 34px;
- border: 1px solid #ebebeb;
- outline: none;
- vertical-align: middle;
- }
- .topCon input {
- width: 200px;
- padding: 2px 2PX 2PX 10PX;
- height: 34px;
- border: 1px solid #ebebeb;
- outline: none;
- vertical-align: middle;
- }
- .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>
- <div class="zxt-top clearfix">
- <div class="topCon">
- <!-- 部门:
- <select name="" id="bumen">
- </select> -->
- 开始时间:
- <input type="text" class="laydate-icon" id="startTime" autocomplete="off" /> 结束时间:
- <input type="text" class="laydate-icon" id="endTime" autocomplete="off" />
- <button class="btns sear">搜索</button>
- <!--<button class="btn daochu ">导出Excel</button>-->
- </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="../css/laydate/laydate.js"></script>
- <script src="../js/select2/js/select2.min.js"></script>
- <script>
- $(function () {
- var token = $.cookie("token");
- laydate.skin('blue');
- //开始时间
- laydate({
- elem: '#startTime',
- event: 'focus',
- istoday: true,
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- //结束时间
- laydate({
- elem: '#endTime',
- event: 'focus',
- istoday: true,
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- var stime, //开始时间
- endtime, //结束时间
- bumen,
- expor;
- //点击搜索事件
- $('.sear').click(function () {
- $('.zjTable tbody').html('');
- stime = $('#startTime').val(); //开始时间
- endtime = $('#endTime').val(); //结束时间
- bumen = $('#bumen').val(); //部门
- if (stime != '' && endtime != '') {
- tbodyAjax(stime, endtime, bumen);
- } else {
- tbodyAjax();
- if (stime == '') {
- alert('请选择开始时间!');
- } else if (endtime == '') {
- alert('请选择结束时间!');
- }
- }
- })
- //表头
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url + "QCResult/GetColumnList",
- async: true,
- data: {
- token: token,
- // stime: stime,
- // endtime: endtime,
- // 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')
- }
- }
- }
- }
- }
- }
- });
- tbodyAjax();
- //表格数据
- function tbodyAjax(stime, endtime, bumen) {
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url + "QCResult/GetDataList",
- async: true,
- data: {
- token: token,
- stime: stime,
- endtime: endtime,
- dpt: bumen,
- // isext: expor
- },
- success: function (result) {
- var tbodyCon = result.data;
- console.log(tbodyCon);
- 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 class="orderList" dataAttr="' + tbodyCon[i].UserCode + '"><a>' +
- tbodyCon[i].ZJCount + '</a></td><td>' +
- (tbodyCon[i].Q17 == undefined ? "" : tbodyCon[i].Q17) +
- '</td><td>' +
- (tbodyCon[i].Q18 == undefined ? "" : tbodyCon[i].Q18) +
- '</td><td>' +
- (tbodyCon[i].Q19 == undefined ? "" : tbodyCon[i].Q19) +
- '</td><td>' +
- (tbodyCon[i].Q20 == undefined ? "" : tbodyCon[i].Q20) +
- '</td><td>' +
- (tbodyCon[i].df0 == undefined ? "" : tbodyCon[i].df0) + '</td><td>' +
- (tbodyCon[i].Q21 == undefined ? "" : tbodyCon[i].Q21) +
- '</td><td>' +
- (tbodyCon[i].Q22 == undefined ? "" : tbodyCon[i].Q22) +
- '</td><td>' +
- (tbodyCon[i].df1 == undefined ? "" : tbodyCon[i].df1) + '</td><td>' +
- (tbodyCon[i].Q23 == undefined ? "" : tbodyCon[i].Q23) +
- '</td><td>' +
- (tbodyCon[i].Q24 == undefined ? "" : tbodyCon[i].Q24) +
- '</td><td>' +
- (tbodyCon[i].Q25 == undefined ? "" : tbodyCon[i].Q25) +
- '</td><td>' +
- (tbodyCon[i].df2 == undefined ? "" : tbodyCon[i].df2) + '</td><td>' +
- (tbodyCon[i].Q26 == undefined ? "" : tbodyCon[i].Q26) +
- '</td><td>' +
- (tbodyCon[i].Q27 == undefined ? "" : tbodyCon[i].Q27) +
- '</td><td>' +
- (tbodyCon[i].Q28 == undefined ? "" : tbodyCon[i].Q28) +
- '</td><td>' +
- (tbodyCon[i].Q29 == undefined ? "" : tbodyCon[i].Q29) +
- '</td><td>' +
- (tbodyCon[i].Q30 == undefined ? "" : tbodyCon[i].Q30) +
- '</td><td>' +
- (tbodyCon[i].Q31 == undefined ? "" : tbodyCon[i].Q31) +
- '</td><td>' +
- (tbodyCon[i].Q32 == undefined ? "" : tbodyCon[i].Q32) +
- '</td><td>' +
- (tbodyCon[i].df3 == undefined ? "" : tbodyCon[i].df3) + '</td><td>' +
- (tbodyCon[i].Q33 == undefined ? "" : tbodyCon[i].Q33) +
- '</td><td>' +
- (tbodyCon[i].Q34 == undefined ? "" : tbodyCon[i].Q34) +
- '</td><td>' +
- (tbodyCon[i].df4 == undefined ? "" : tbodyCon[i].df4) + '</td><td>' +
- (tbodyCon[i].Q35 == undefined ? "" : tbodyCon[i].Q35) +
- '</td><td>' +
- (tbodyCon[i].Q36 == undefined ? "" : tbodyCon[i].Q36) +
- '</td><td>' +
- (tbodyCon[i].Q37 == undefined ? "" : tbodyCon[i].Q37) +
- '</td><td>' +
- (tbodyCon[i].df5 == undefined ? "" : tbodyCon[i].df5) + '</td><td>' +
- (tbodyCon[i].Q38 == undefined ? "" : tbodyCon[i].Q38) +
- '</td><td>' +
- (tbodyCon[i].Q39 == undefined ? "" : tbodyCon[i].Q39) +
- '</td><td>' +
- (tbodyCon[i].df6 == undefined ? "" : tbodyCon[i].df6) + '</td><td>' +
- (tbodyCon[i].Q40 == undefined ? "" : tbodyCon[i].Q40) +
- '</td><td>' +
- (tbodyCon[i].Q41 == undefined ? "" : tbodyCon[i].Q41) +
- '</td><td>' +
- (tbodyCon[i].Q42 == undefined ? "" : tbodyCon[i].Q42) +
- '</td><td>' +
- (tbodyCon[i].Q43 == undefined ? "" : tbodyCon[i].Q43) +
- '</td><td>' +
- (tbodyCon[i].Q44 == undefined ? "" : tbodyCon[i].Q44) +
- '</td><td>' +
- (tbodyCon[i].Q45 == undefined ? "" : tbodyCon[i].Q45) +
- '</td><td>' +
- (tbodyCon[i].df7 == undefined ? "" : tbodyCon[i].df7) + '</td><td>' +
- (tbodyCon[i].Q46 == undefined ? "" : tbodyCon[i].Q46) +
- '</td><td>' +
- (tbodyCon[i].Q47 == undefined ? "" : tbodyCon[i].Q47) +
- '</td><td>' +
- (tbodyCon[i].df8 == undefined ? "" : tbodyCon[i].df8) + '</td><td>' +
- tbodyCon[i].AllScore + '</td></tr>').appendTo('.zjTable tbody')
- }
- }
- });
- }
- $(".zjTable tbody").on("click",".orderList",function(){
- // var userCode = $(this).attr("dataAttr")
- layer.open({
- type: 2,
- content: "zhijian/orderList.html?userCode=" + $(this).attr("dataAttr")+"&stime="+$('#startTime').val()+"&endtime="+$('#endTime').val(), //iframe的url,no代表不显示滚动条
- title: '公告详情',
- area: ['60%', '80%'], //宽高
- });
- });
- function getOrderList(userCode){
- alert(userCode)
- }
- //部门下拉框
- $("#bumen").select2({
- width: 'resolve',
- minimumResultsForSearch: -1,
- ajax: {
- type: "get",
- url: huayi.config.callcenter_url + "Department/GetDeptListtree",
- 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>
|