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

<!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" />
    <link href="../../images/style.css" rel="stylesheet" type="text/css" />
    <script src="../../scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <script src="../../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../ThirdParty/js/highcharts.js" type="text/javascript"></script>
    <script src="../../ThirdParty/js/modules/exporting.js" type="text/javascript"></script>

     <script type="text/javascript" src="../../scripts/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="../../scripts/jquery/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../../scripts/jquery/messages_cn.js"></script>
    <script type="text/javascript" src="../../scripts/ui/js/ligerBuild.min.js"></script>
    <script type="text/javascript" src="../../scripts/function.js"></script>
    

    <%--wbx 5-7 打印--%>
     <script type="text/javascript">
         $(function () {
             SearchData();
             
         });


         //报表列表
         function SearchData() {
             var sql = GetSql();
             $.ajax({
                 url: 'controls/ZuoXiWorkTotalNew.ashx?action=getlist' + sql,
                 type: 'post',
                 datatype: 'json',
                 success: function (data) {
                     if (data != "") {
                         try {
                             $("#divfromlist").html(data);
                             $("#htHtmlReport").val(data);
                         } catch (e) {

                         }

                     }
                 }
             });
         }

         function GetSql() {
             var sql = "";
             if (document.getElementById("txtStartTime").value != "") {
                 sql += "&txtStartTime=" + document.getElementById("txtStartTime").value;
             }
             if (document.getElementById("txtEndTime").value != "") {
                 sql += "&txtEndTime=" + document.getElementById("txtEndTime").value;
             }
             if (document.getElementById("dtDpt").value != "" && document.getElementById("dtDpt").value != "请选择") {
                 sql += "&dpt=" + document.getElementById("dtDpt").value;
             }

             return sql;
         }
         //导出
         function DaoChu() {
             SearchData();
             return true;
         }
         function preview() {
             bdhtml = window.document.body.innerHTML;
             sprnstr = "<!--startprint-->";
             eprnstr = "<!--endprint-->";
             prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
             prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
             window.document.body.innerHTML = prnhtml;
             window.print();
             window.document.body.innerHTML = bdhtml;
         }
    </script>
</head>
<body>
    <form id="form1" runat="server">
   <asp:HiddenField ID="htHtmlReport" runat="server" />
    <div class="tools_box">
        <div class="tools_bar">
            <div class="search_box">
             部门： <asp:DropDownList ID="dtDpt" runat="server" CssClass="select"></asp:DropDownList>&nbsp;&nbsp;<asp:TextBox ID="txtStartTime" 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;
                <input id="Button2" type="button" value="搜 索" class="btnSearch" onclick="SearchData();" />&nbsp;&nbsp;
                <asp:LinkButton ID="exportExcel" Height="24px" runat="server" class="btnSearch" OnClientClick="return DaoChu()" OnClick="exportExcel_Click">导出Excel</asp:LinkButton>&nbsp;&nbsp;
                <%--<input id="Button1" type="button" value="打 印" class="btnSearch" onclick="preview();" />--%>
            </div>
        </div>
    </div>
    <!--startprint-->
    <div id="divfromlist">
    </div>
    <!--endprint-->
    </form>
</body>
</html>
