| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <!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="js/select2/css/select2.min.css" />
- <link rel="stylesheet" href="css/init.css" />
- <style>
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
-
- .zxt-top {
- background: #f3f3f4;
- height: 60px;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
- .zxt-content {
- width: 95%;
- margin: 0 auto;
- }
-
- .zxt-table table {
- font-size: 12px;
- margin-top: 20px;
- }
-
- .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">
- <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="zuoxi" 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 thTable table-hover" 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="js/laydate/laydate.js"></script>
- <script src="js/select2/js/select2.min.js"></script>
- <script>
- $(function() {
- var token = $.cookie("token");
- var seatlist;
- //日期
- laydate.render({
- elem: '#startTime',
- range: '~',
- theme: '#00a1cb',
- });
- Ajax();
- //搜索事件
- $(".sear").click(function() {
-
- if($('#startTime').val()= '') {
- layer.confirm('请选择时间!', {
- btn: ['确定']
- });
- }
- Ajax();
- });
- //导出
- $('.export').click(function() {
- dcexcel(this);
- })
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "DaysTalkTime/ExptList?token=" + $.cookie("token");
- url += "&stime=" + $('#startTime').val() && $('#startTime').val().split('~')[0] + "&endtime=" + $('#startTime').val() && $('#startTime').val().split('~')[1] + "&usercode=" + $("#zuoxi option:selected").val();
- obj.href = url;
- }
- //获取坐席
- $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
- "token": token
- }, function(result) {
- if(result.state.toLowerCase() == "success") {
- seatlist = result.data;
- bindseat($("#zuoxi"));
- // bindseat($("#usercode"));
- }
- });
- //坐席列表
- function bindseat(obj) {
- obj.empty();
- obj.append('<option value="">请选择坐席</option>');
- $(seatlist).each(function(i, n) {
- obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
- })
- }
- //表头
- $.ajax({
- type: 'get',
- url: huayi.config.callcenter_url + "DaysTalkTime/GetColumnList",
- async: true,
- dataType: 'json',
- data: {
- token: token
- },
- success: function(res) {
- var con = res.data;
- $('.thTable thead tr').html('');
- if(res.state.toLowerCase() == "success") {
- for(var i = 0; i < con.length; i++) {
- $('<td>' + con[i] + '</td>').appendTo('.thTable thead tr')
- }
- }
- }
- })
- //表内数据
- function Ajax(stime, endtime, zuoxi) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "DaysTalkTime/GetDataList",
- async: true,
- dataType: 'json',
- data: {
- stime: $('#startTime').val() && $('#startTime').val().split('~')[0],
- endtime: $('#startTime').val() && $('#startTime').val().split('~')[1],
- usercode: $("#zuoxi option:selected").val(),
- token: $.cookie("token")
- },
- success: function(res) {
- var result = res.data;
- $('.thTable tbody').html('');
- if(res.state.toLowerCase() == "success") {
- 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 style="color:#e43926;font-weight: bold;">' + result[i].通话总时长 + '</td><td style="color:#e43926;font-weight: bold;">' + result[i].平均通话总时长 + '</td></tr>').appendTo('.thTable tbody')
- }
- }
- }
- });
- }
- })
- </script>
- </body>
- </html>
|