| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <!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="./css/init.css" />
- <style>
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
-
- .kpi-top {
- background: #f3f3f4;
- height: 60px;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
- .kpi-content h2 {
- font-size: 18px;
- margin-bottom: 20px;
- }
-
- .topCon input {
- width: 128px;
- padding: 2px 2PX 2PX 10PX;
- height: 28px;
- border: 1px solid #ebebeb;
- color: #1ab394;
- outline: none;
- vertical-align: middle;
- }
-
- .kpi-content {
- width: 90%;
- margin: 0 auto;
- }
-
- .kpi-table table {
- font-size: 12px;
- }
-
- .kpi-table table thead tr td {
- background: #1ab394;
- color: #fff;
- font-size: 14px;
- }
- </style>
- </head>
- <body class="gray-bg" style="background: #fefefe;">
- <div class="hwkpi">
- <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="kpi-top clearfix">
- <div class="topCon">
- 查询时间:
- <input type="text" class="laydate-icon" id="startTime" /> 至
- <input type="text" class="laydate-icon" id="endTime" />
- <button class="btns sear">搜索</button>
- <a class="btns export ">导出</a>
- </div>
- </div>
- <div class="kpi-content">
- <div class="kpi-table">
- <h2 style="text-align: center;">坐席日通话时长报表</h2>
- <table class="table table-bordered text-center table-hover thTable" style="width: 100%;">
- <thead>
- <tr>
- </tr>
- </thead>
- <tbody class="tbody">
- </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>
- $(function() {
- var token = $.cookie("token");
- laydate.skin('molv');
- laydate({
- elem: '#startTime',
- event: 'focus',
- format: 'YYYY-MM-DD' // 分隔符可以任意定义,该例子表示只显示年月
-
- });
- laydate({
- elem: '#endTime',
- event: 'focus',
- format: 'YYYY-MM-DD' // 分隔符可以任意定义,该例子表示只显示年月
- });
- $('#startTime').val(getDate());
- $('#endTime').val(getDate());
- Ajax();//表格数据
- getThead();//表头数据
- //搜索事件
- $(".sear").click(function() {
- Ajax();
- });
- //导出
- $('.export').click(function() {
- dcexcel(this);
- })
- })
-
- function getThead(){
- $.ajax({
- type: 'get',
- url: huayi.config.callcenter_url + "ZuoXiTongHua/GetColumnList",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token")
- },
- success: function(res) {
- var con = res.data;
- if(res.state.toLowerCase()=='success'){
- $('.thTable thead tr').html('');
- for(var j = 0; j < con.length; j++) {
- $('<td>' + con[j] + '</td>').appendTo('.thTable thead tr');
- }
- }
-
- }
- })
- }
- function Ajax() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "ZuoXiTongHua/GetDataList",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- stime: $('#startTime').val(),
- endtime: $('#endTime').val()
- },
- success: function(data) {
- var result = data.data;
- if(data.state.toLowerCase() == 'success') {
- $('.thTable tbody').html('');
- for(var i = 0; i < result.length; i++) {
- $('<tr><td>' + result[i].坐席人员 + '</td><td>' + result[i].通话总时长 + '</td><td>' + result[i].呼出通话总时长 + '</td><td>' + result[i].呼出通话占比 + '</td><td>' + result[i].呼入通话总时长 + '</td><td>' + result[i].呼入通话占比 + '</td><td>' + result[i].平均日呼入通话时长 + '</td><td>' + result[i].平均日呼出通话时长 + '</td></tr>').appendTo('.thTable tbody')
- }
- }
- }
- });
- }
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "ZuoXiTongHua/ExptList?token=" + $.cookie("token");
- url += "&stime=" + $("#startTime").val() + "&endtime=" + $("#endTime").val();
- obj.href = url;
- }
-
- function getDate(){
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- return year + "-" + month + "-" + day;
- }
- </script>
- </body>
- </html>
|