| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>质检数据报表</title>
- <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: 12px;
- }
-
- .zxt-top {
- background: #f3f3f4;
- height: 60px;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
- .topCon select {
- padding: 2px;
- height: 28px;
- border: 1px solid #ebebeb;
- /* color: #00479D; */
- outline: none;
- vertical-align: middle;
- }
-
- .topCon input {
- width: 128px;
- padding: 2px 2PX 2PX 10PX;
- height: 28px;
- border: 1px solid #ebebeb;
- color: #00479D;
- 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: #00479D;
- color: #fff;
- }
- .zxt-table .pageList{
- width: 100%;
- overflow: hidden;
- }
- .zxt-table .pageList .pageCon{
- display: flex;
- float: right;
- }
- .zxt-table .pageList .pageCon div{
- height: 30px;
- line-height: 30px;
- margin: 8px;
- }
- .zxt-table .pageList .pageCon div input{
- width: 40px;
- padding: 0 8px;
- text-align: center;
- }
- .zxt-table .pageList .pageCon div button{
- background: #00479D;
- border: none;
- color: #FFFFFF;
- border-radius: 5px;
- font-size: 14px;
- }
- </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="" style="color: #000;">质检数据报表</a></sapn>
- </div>
- </div>
- <div class="zxt-top clearfix">
- <div class="topCon">
- 营业部:
- <select name="" id="bumen">
- <option value="">请选择</option>
- </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="btns daochu">导出Excel</button>
- </div>
- </div>
- <div class="zxt-content">
- <div class="zxt-table">
- <table class="table table-bordered text-center table-hover zjTable" style="width: 100%;">
- <thead style="width: 100%;">
- <tr class="one"></tr>
- <tr class="two"></tr>
- <tr class="three"></tr>
- <tr class="four"></tr>
- </thead>
- <tbody class="tbody"></tbody>
- </table>
- <div class="pageList">
- <div class="pageCon">
- <div>共<span id="pageTotal">2</span>条</div>
- <div>共<span id="pageSize">2</span>页</div>
- <div><button id="prePage">上一页</button></div>
- <div><input id="pageindex" value="" /></div>
- <div><button id="turnPage">跳转</button></div>
- <div><button id="nextPage">下一页</button></div>
- </div>
- </div>
- </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>
- var stime, endtime, bumen,expor;//开始时间
- var token = $.cookie("token");
- var content = [];
- var pageindex = 1;
- $(function() {
-
- laydate.skin('molv');
- //开始时间
- laydate({
- elem: '#startTime',
- event: 'focus',
- istoday: true,
- format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
- });
- //结束时间
- laydate({
- elem: '#endTime',
- event: 'focus',
- istoday: true,
- format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
- });
- getDepartList($("#bumen"))
- tbodyAjax();
-
- //表头
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url+"ExportQCResult/GetColumnList",
- async: false,
- data: {
- token:token,
- },
- success: function(data) {
- data.data.forEach(function(v,n){
- if(v.Qcname !== '总分1'){
- content.push(v)
- }
- })
-
- 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;
- for(var j = 0; j < twoCon.length; j++) {
- $('<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;
- 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')
- }
- }
- }
- }
- }
- }
- });
-
-
- })
- //点击搜索事件
- $('.sear').click(function() {
- pageindex =1
- tbodyAjax();
- })
-
- $("#prePage").click(function(){
- if(pageindex>1){
- pageindex --
- tbodyAjax();
- }
- })
- $("#turnPage").click(function(){
- pageindex = $("#pageindex").val()
- tbodyAjax();
- })
-
- $("#nextPage").click(function(){
-
- if(pageindex !=$("#pageSize").text()){
- pageindex ++
- tbodyAjax();
- }
-
- })
-
- //导出
- $('.daochu').click(function() {
- var url = huayi.config.callcenter_url + "ExportQCResult/ExportToExcelHeBing?token=" + $.cookie("token");
- url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val() + "&dpt=" + $('#bumen').val()
- window.location.href = url;
- })
-
- //表格数据
- function tbodyAjax() {
-
- $.ajax({
- type: "get",
- dataType: "json",
- url: huayi.config.callcenter_url+"ExportQCResult/GetDataList",
- async: true,
- data: {
- token:token,
- stime: $('#startTime').val(),
- pageindex:pageindex,
- pagesize:10,
- endtime: $('#endTime').val(),
- dpt:$('#bumen').val(),
- },
- success: function(result) {
- var tbodyCon = result.rows;
-
- $("#pageSize").text(Math.ceil(result.total/10))
- $("#pageindex").val(pageindex)
- $("#pageTotal").text(result.total)
- $('.zjTable tbody').html('');
- var html =""
- for(var i = 0; i < tbodyCon.length; i++) {
- html +="<tr>"
- for(var key in tbodyCon[i]){
- delete tbodyCon[i].AllScore
- html += '<td>' + tbodyCon[i][key] + '</td>'
- }
- html += "</tr>"
- }
- $(html).appendTo('.zjTable tbody')
-
- }
- });
- }
- //部门下拉框
- function getDepartList(obj) {
- obj.empty();
- let str = '<option value="">请选择</option>'
- $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
- "token": $.cookie("token")
- }, function(result) {
- if(result.state.toLowerCase() == "success") {
- result.data.forEach(function(v, n) {
- str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
- })
- obj.html(str)
- }
- })
- }
- </script>
- </body>
- </html>
|