| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <!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;
- }
- .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;
- outline: none;
- vertical-align: middle;
- }
- .topCon input {
- width: 128px;
- padding: 2px 2PX 2PX 10PX;
- height: 28px;
- border: 1px solid #ebebeb;
- outline: none;
- vertical-align: middle;
- }
- .zxt-content {
- width: 95%;
- margin: 0 auto;
- }
- .zxt-table table {
- font-size: 12px;
- }
- .zxt-table table thead tr td {
- background: #00a1cb;
- color: #fff;
- }
- #thead thead th {
- background: #00a0cd;
- color: #fff;
- }
- table thead, tbody tr {
- display: table;
- width: 100%;
- table-layout: fixed;
- }
- .table {
- margin-bottom: 0;
- }
- </style>
- </head>
- <body class="gray-bg" style="background: #fefefe;">
- <div class="zxtable wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a id="ReIndex" 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="toolBar clearfix">
- <div class="toolRight">
- 部门:<select name="" id="bumen"></select>
- 开始时间:
- <input type="text" class="laydate-icon" id="startTime" />
- 结束时间:
- <input type="text" class="laydate-icon" id="endTime" />
- 月工作天数:
- <input type="text" id="dayss" style="width:150px;" />
- <button class="btns sear">搜索</button>
- <a class="btns export">导出</a>
- </div>
- </div>
- <!--<div class="zxt-top clearfix">
- <div class="topCon">
- </div>
- </div>-->
- <div class="zxt-content">
- <div class="zxt-table">
- <div style="width: 100%;padding: 10px;">
- <div class="table-head">
- <table id="thead" class="table table-hover table-striped table-bordered table-condensed">
- <colgroup>
- <col style="width: 150px;" />
- <col />
- </colgroup>
- <thead>
- <tr></tr>
- </thead>
- </table>
- </div>
- <div class="table-body">
- <table class="thTable table table-hover table-striped table-bordered table-condensed">
- <colgroup>
- <col style="width: 150px;" />
- <col />
- </colgroup>
- <tbody></tbody>
- </table>
- </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>
- $(function () {
- var token = $.cookie("token");
- laydate.skin('blue');
- laydate({
- elem: '#startTime',
- event: 'focus',
- format: 'YYYY-MM-DD' // 分隔符可以任意定义,该例子表示只显示年月
- });
- laydate({
- elem: '#endTime',
- event: 'focus',
- format: 'YYYY-MM-DD',// 分隔符可以任意定义,该例子表示只显示年月
- });
- var stime,//开始时间
- endtime,//结束时间
- dpt;//部门
- //部门下拉数据
- $("#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: "请选择",
- });
- Ajax();
- //搜索事件
- $(".sear").click(function () {
- $('.thTable tbody').html('');
- stime = $('#startTime').val();//开始时间
- endtime = $('#endTime').val();//结束时间
- dpt = $('#bumen').val(); //部门
- if (stime != '' && endtime != '') {
- Ajax(stime, endtime, dpt);
- } else {
- Ajax();
- if (stime == '') {
- layer.confirm('请选择开始时间!', {
- btn: ['确定']
- });
- return;
- } else if (endtime == '') {
- layer.confirm('请选择结束时间!', {
- btn: ['确定']
- });
- return;
- }
- }
- });
- //导出
- $('.export').click(function () {
- stime = $('#startTime').val();//开始时间
- endtime = $('#endTime').val();//结束时间
- if (stime != '' && endtime != '') {
- dcexcel(this);
- } else {
- if (stime == '') {
- layer.confirm('请选择开始时间!', {
- btn: ['确定']
- });
- //return;
- } else if (endtime == '') {
- layer.confirm('请选择结束时间!', {
- btn: ['确定']
- });
- //return;
- }
- }
- })
- function dcexcel(obj) {
- var dpt = "";
- if ($("#bumen").val())
- dpt = $("#bumen").val();
- var url = huayi.config.callcenter_url + "ZuoXiWorkTotal/ExptList?token=" + $.cookie("token");
- url += "&stime=" + $("#startTime").val() + "&endtime=" + $("#endTime").val() + "&dpt=" + dpt + "&dayss=" + $("#dayss").val();
- obj.href = url;
- }
- //表头
- $.ajax({
- type: 'get',
- url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetColumnList",
- async: true,
- dataType: 'json',
- data: {
- token: token
- },
- success: function (res) {
- $('#thead thead tr').html('');
- var con = res.data;
- // console.log(con);
- for (var i = 0; i < con.length; i++) {
- $('<th>' + con[i] + '</th>').appendTo('#thead thead tr')
- }
- }
- })
- //表内数据
- function Ajax(stime, endtime, dpt, dayss) {
- $.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) {
- var result = res.data;
- $('.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><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')
- $('<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></tr>').appendTo('.thTable tbody')
- }
- }
- });
- }
- })
- </script>
- </body>
- </html>
|