<%@ page language="C#" autoeventwireup="true" inherits="SB_admin_N47_UserTaskCompleteStatistics, App_Web_wkioulim" %>

<!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 id="Head1">
    <title>每月项目金额统计表</title>

    <script language="javascript" src="<%=ResolveUrl("~/SB/control/print/LodopFuncs.js?v=1.1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.min.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.easyui.min.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/locale/easyui-lang-zh_CN.js?v=1")%>"></script>

    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/SB/control/easy_ui/themes/bootstrap/easyui.css?v=1")%>" />

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/js/My97DatePicker/WdatePicker.js")%>"></script>
    

    <script language="javascript" type="text/javascript">
        function userFormat(row){
                var s = '<span >' + row.u_name + '('+row.u_pys+')</span><br/>' +  
                        '<span style="color:#888">(' +row.u_isLogin+')'+ row.u_note + '</span>';  
                return s;  
        }

    </script>
    
    
    <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
        height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="<%=ResolveUrl("~/SB/control/print/install_lodop.exe")%>"></embed>
    </object>
    <style>
        
    a {
    color: #015BA7;
    }
    a:hover {
	    color: red;
    }

    </style>
</head>
<body>
    <form runat="server" id="form1">
        <div style="border-bottom: solid 1px #c3c3c3; font-size: 14px; margin-bottom: 5px; padding-bottom:5px">
            <span style="font-size: 14px">选择月份</span> <span style="font-size: 14px; color: Red">
                注：统计制定人员制定月份完成的工作</span>
            <br />
            月份：<asp:TextBox ID="txtDate" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM'})"
                Width="150px"></asp:TextBox>
            人员：
           
            <asp:TextBox id="txtUser" type="text" class="easyui-combobox" style="width: 150px" runat="server" data-options="  
                        panelWidth: 150,  
                        valueField: 'id',  
                        textField: 'u_name',  
                        url: 'N47_User/N47_User_ComboData.aspx',
                        formatter: userFormat 
                 " />
                 
                 
                 
            &nbsp;
            <asp:Button ID="btnSumbit" runat="server" Text="重新生成" OnClick="btnSumbit_Click" />
            <input id="printBtn" type="button" value="打印" onclick="printTest1()" style="width: 119px" />
            <input id="printPrint" type="button" value="导出EXCEL" onclick="OutToFileOneSheet()" style="width: 119px" />
        </div>
        <div id="print" style="width: 1200px;">
            <asp:Repeater ID="rptProject" runat="server">
                <HeaderTemplate>
                    <table width="100%" border="1" cellpadding="2" bordercolor="#00000" style="border: none;
                        font-size: 13px; border-collapse: collapse;">
                        <thead id="head">
                            <tr>
                                <td colspan="5" style="border-right: none;" align="left">
                                    AAA———员工每月业绩统计表</td>
                                <td colspan="1" style="border-left: none;" align="left">
                                    <asp:Literal ID="litDate" runat="server"></asp:Literal>
                                </td>
                            </tr>
                        </thead>
                        <tbody id="body">
                            <tr align="center">
                                <td style="white-space: nowrap;">
                                    项目编号</td>
                                <td style="white-space: nowrap;">
                                    项目名称</td>
                                <td style="white-space: nowrap;">
                                    工作类型</td>
                                <td style="white-space: nowrap;">
                                    员工姓名</td>
                                <td style="white-space: nowrap;">
                                    项目创建日期</td>
                                <td style="white-space: nowrap;">
                                    完成工作日期</td>
                            </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            &nbsp;<%#Eval("p_index")%></td>
                        <td>
                            &nbsp;<%#Eval("p_name")%></td>
                        <td>
                            &nbsp;<%#Eval("type")%></td>
                        <td>
                            &nbsp;<%#Eval("u_name")%></td>
                        <td>
                            &nbsp;<%#Eval("p_cdate")%></td>
                        <td>
                            &nbsp;<%#Eval("cdate")%></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tfoot id="footer">
                        <tr>
                            <th colspan="4" align="left">
                                打印日期：<%=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %>
                                </td>
                                <th align="left" tdata="pageNO">
                                    第######页</td>
                                    <th align="left" tdata="pageCount">
                            总共#####页</td>
                        </tr>
                    </tfoot>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>

        <script language="javascript">
     var LODOP = null;
     function printTest1()
     {	
        LODOP=getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM'));  	
        
        LODOP.PRINT_INIT("每月业务金额统计报表");
        LODOP.ADD_PRINT_TABLE("5mm","5mm","200mm","287mm",$("#print").html());
        LODOP.SET_PRINT_PAGESIZE(1, "210mm","297mm","")
        LODOP.PREVIEW();
	 }
	 
	function OutToFileOneSheet(){

	    LODOP=getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM'));  
		LODOP.PRINT_INIT("");
		LODOP.ADD_PRINT_TABLE("5mm","5mm","287mm","150mm","<table width=\"700px\" border=\"1\" cellpadding=\"2\" bordercolor=\"#00000\" style=\"border: none; font-size:13px;  border-collapse: collapse;\"><thead>"+$("#head").html()+"</thead><tbody>"+$("#body").html()+"</tbody></table>");
//		LODOP.SET_SAVE_MODE("QUICK_SAVE",true);//快速生成（无表格样式,数据量较大时或许用到）
		LODOP.SAVE_TO_FILE($("#txtDate").val()+"业务金额统计.xls");
	}

        </script>

    </form>
</body>
</html>
