| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <!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 rel="stylesheet" href="../js/select2/css/select2.min.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <style>
- .zxt-top {
- background: #f3f3f4;
- padding: 10px 20px;
- }
-
- .topCon {
- float: right;
- margin-right: 45px;
- }
-
- .topCon select {
- color: #1ab394;
- }
-
- .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">
- <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 form-inline">
- <div class="topCon">
- 部门:
- <select class="form-control" id="bumen">
- <option value="">请选择</option>
- </select>
- 选择日期:
- <input type="text" class="form-control" id="startTime" /> 月工作天数:
- <input type="text" id="dayss" style="width:50px;" class="form-control" />
- <button class="btns sear">搜索</button>
- <a class="btns export">导出</a>
- </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/laydate/laydate.js"></script>
- <script src="../js/select2/js/select2.min.js"></script>
- <script>
- var token = $.cookie("token"),
- endtime = helper.DateFormat.getNowDate(), //结束时间
- stime = helper.DateFormat.getPreMonth(endtime), //开始时间
- dayss = $('#dayss').val(), //月工作天数
- dpt = $('#bumen').val(); //部门
- $(function() {
- laydate.render({
- elem: '#startTime',
- range: '~',
- value: stime + ' ~ ' + endtime,
- theme: '#1ab394',
- calendar: 'true'
- });
- //部门下拉数据
- getDeptList();
- getColumnList();
- Ajax();
- //搜索事件
- $(".sear").click(function() {
- if($('#startTime').val() == "") {
- layer.confirm('请选择日期!', {
- btn: ['确定']
- });
- return;
- }
- $('.thTable tbody').html('');
- stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0]; //开始时间
- endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1]; //结束时间
- dayss = $('#dayss').val(); //月工作天数
- dpt = $('#bumen').val(); //部门
- Ajax();
- });
- //导出
- $('.export').click(function() {
- if($('#startTime').val() == "") {
- layer.confirm('请选择日期!', {
- btn: ['确定']
- });
- return;
- }
- stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0]; //开始时间
- endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1]; //结束时间
- dayss = $('#dayss').val(); //月工作天数
- dpt = $('#bumen').val(); //部门
- dcexcel(this);
- })
- }); //表头
- function getColumnList() {
- $.ajax({
- type: 'get',
- url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetColumnList",
- async: true,
- dataType: 'json',
- data: {
- token: token
- },
- success: function(res) {
- var con = res.data;
- for(var i = 0; i < con.length; i++) {
- $('<td>' + con[i] + '</td>').appendTo('.thTable thead tr')
- }
- }
- })
- }
- //表内数据
- function Ajax() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetDataList",
- async: true,
- dataType: 'json',
- data: {
- stime: stime,
- endtime: endtime,
- dpt: dpt,
- dayss: dayss,
- token: token
- },
- success: function(res) {
- $('.thTable tbody').empty();
- var result = res.data;
- for(var i = 0; i < result.length; i++) {
- // <td>' + result[i].质检平均成绩 + '</td>
- $('<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><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><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><td>' + result[i].置忙平均休息分钟数 + '</td></tr>').appendTo('.thTable tbody')
- }
- }
- });
- }
- //导出
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "ZuoXiWorkTotal/ExptList?token=" + token;
- url += "&stime=" + stime + "&endtime=" + endtime + "&dpt=" + dpt + "&dayss=" + dayss;
- obj.href = url;
- }
- //部门下拉
- function getDeptList() {
- $("#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>
|