| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>话务受理日周月报表</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../css/init.css" rel="stylesheet" />
- <!--<link href="../css/Table/table1.css" rel="stylesheet" />-->
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../My97DatePicker/WdatePicker.js"></script>
- <script src="../js/laydate/laydate.js"></script>
- <style>
- body {
- font-family: "微软雅黑";
- font-size: 14px;
- }
- ul li {
- list-style: none;
- float: left;
- }
- .fr {
- float: right;
- }
- #list thead tr th{
- background: #01a1cb;
- color: #fff;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</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="wrapper wrapper-content">
-
- <div class="th-top clearfix">
- <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="起始时间">
- </div>
- <div class="time-box form-group" >
- <select class="select_ dataType form-control">
- <option value="">请选择时间类型</option>
- <option value="0" selected="selected">日</option>
- <option value="1">周</option>
- <option value="2">月</option>
- </select>
- </div>
- <div class="form-group tool_bars pull-right">
- <button class="btns search">搜索</button>
- <a class="btns export">导出</a>
- </div>
-
-
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="list" class="table table-hover table-striped table-bordered table-condensed">
- <thead>
- <tr>
-
- </tr>
- </thead>
- <tbody>
-
- </tbody>
- </table>
- <!--高级搜索框-->
- </div>
- </div>
-
- <script>
- $(document).ready(function () {
- var usercode;//工号
- laydate.render({
- elem: '#startTime',
- range: '~',
- theme: '#00a1cb',
- });
- tableHead();//表头数据
- tableAjax();//表格数据
-
- $('.search').click(function(){
- tableAjax()
- })
- $('.export').click(function(){
- dcexcel(this);
- })
-
-
- })
- //表头数据
- function tableHead(){
- //表头
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url +"TelWOReport/GetColumnList",
- async:true,
- dataType:'json',
- data:{
- token:$.cookie("token")
- },
- success:function(data){
- var con=data.data;
- if(data.state.toLowerCase()=='success'){
- $(con).each(function(i,n){
- $('<th>'+n +'</th>').appendTo('#list thead tr')
- })
- }
- }
- });
- }
-
- //表内数据
- function tableAjax(){
- $('#list tbody').html('');
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url +"TelWOReport/GetTrafficReport",
- async:true,
- dataType:'json',
- data:{
- token:$.cookie("token"),
- btime:$('#startTime').val() && $('#startTime').val().split('~')[0],
- etime:$('#startTime').val() && $('#startTime').val().split('~')[1],
- type:$('.dataType').val()
- // usercode:usercode
- },
- success:function(data){
- var con=data.data;
- if(data.state.toLowerCase()=='success'){
- $(con).each(function(i,n){
- $('<tr><td>' + n.日期 + '</td><td>' + n.接听来电 + '</td><td>' + n.有效来电 + '</td><td>' + n.受理 + '</td><td>' + n.在线办结 + '</td><td>' + n.转派工单 + '</td><td>' + n.办结 + '</td></tr>').appendTo('#list tbody')
- })
- }
- }
- });
- }
-
- //导出
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "TelWOReport/ExptList?token=" + $.cookie("token");
- url += "&btime=" + $('#startTime').val() && $('#startTime').val().split('~')[0], + "&etime=" + $('#startTime').val() && $('#startTime').val().split('~')[1],+ "&type=" + $(".dataType").val();
- obj.href = url;
- }
-
- </script>
- </body>
- </html>
|