<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="callerdealreport.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.reportmanage.callerdealreport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>来电处理统计</title>
    <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../scripts/ui/json2.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <script src="../scripts/CustomersData.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script src="../../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../ThirdParty/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../ThirdParty/js/highcharts.js" type="text/javascript"></script>
       <script type="text/javascript">
           function tabs(tabId) {
               for (var i = 0; i <= 1; i++) {
                   if (tabId == i) {
                       document.getElementById("tabli" + i).className = "selected";
                       document.getElementById("tab_" + i).style.display = "block";
                   }
                   else {
                       document.getElementById("tabli" + i).className = "";
                       document.getElementById("tab_" + i).style.display = "none";
                   }
               }
           }
     $(function() {
            $('#container').highcharts({
                chart: {
                    type: 'column',
                    zoomType: 'x'
                },
                title: {
                    text: '服务热线-来电处理方式统计'
                },
                xAxis: {
                categories:  <%=GetStatisticalTime(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>,
                    labels: {
                        rotation: -45,
                        align: 'right',
                        style: {
                            fontSize: '13px',
                            fontFamily: 'Verdana, sans-serif'
                        }
                    }
                },
                yAxis: {
                    min: 0,
                    allowDecimals:false, //是否允许刻度有小数
                    title: {
                        text: '来电次数 (通)'
                    }
                },
                exporting: {
                    enabled: false
                },
                tooltip: {
                    headerFormat: '<span>{point.key}</span><table>',
                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                    '<td style="padding:0"><b>{point.y} 通</b></td></tr>',
                    footerFormat: '</table>',
                    shared: true,
                    useHTML: true
                },
                plotOptions: {
                    column: {
                        pointPadding: 0.2,
                        borderWidth: 0
                    }
                },
                series: [{
                    name: 'IVR处理',
                    data: <%=GetStatisticalIVRDeal(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

                }, {
                    name: '骚扰电话',
                    data: <%=GetStatisticalHarassment(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

                }, {
                    name: '自主服务',
                    data: <%=GetStatisticalSelfService(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

                }, {
                    name: '转值班',
                    data: <%=GetStatisticalTurnDutyPhone(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

},{
                    name: '留言',
                    data: <%=GetStatisticalLeaveVoice(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

},
{
                    name: '呼损',
                    data: <%=GetStatisticalCallLoss(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

},
{
                    name: '转人工',
                    data: <%=GetStatisticalManualDeal(txtBeginTime.Text.Trim(), txtEndTime.Text.Trim())%>

}]
                });
            });
     </script>
</head>
<body>
    <form id="form1" runat="server">
      <div class="tools_box">
        <div class="tools_bar">
            <div class="search_box">
                开始时间：<asp:TextBox ID="txtBeginTime" runat="server" CssClass="txtInput" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>&nbsp;&nbsp;
                结束时间：<asp:TextBox ID="txtEndTime" runat="server" CssClass="txtInput" onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>&nbsp;&nbsp;
                 <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="btnSearch"  />&nbsp;&nbsp;
                <input id="btnSearchFanHui" type="button" value="返回导航" class="btnSearch" onclick="javascript:window.location.href='./default.aspx'"/>
            </div>
        </div>
    </div>
    <ul class="tab_nav">
        <li id="tabli0" class="selected"><a onclick="tabs(0);" href="javascript:;">表格</a></li>
        <li id="tabli1"><a onclick="tabs(1);" href="javascript:;">图形</a></li>
    </ul>
    <div id="divfromlist">
        <div id="tab_0" style="display: block; width: 100%">
            <%=CreateTableTitleAndHead("服务热线-来电处理方式统计", txtBeginTime.Text.Trim(), txtEndTime.Text.Trim(), "日期", "IVR处理", "骚扰电话", "自主服务", "转值班电话", "留言", "呼损", "转人工")%>
        </div>
        <div id="tab_1" style="display: none; width: 100%">
            <div id="container">
            </div>
        </div>
    </div>
    </form>
</body>
</html>
