⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 salelistctrl.ascx

📁 CRM管理系统 CRM管理系统
💻 ASCX
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SaleListCtrl.ascx.cs" Inherits="Contact_Ctrls_SaleListCtrl" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="WFNetCtrl" Namespace="WFNetCtrl" TagPrefix="cc1" %>
<script language="javascript" type="text/javascript">
function SetDepName()
{
    var returnValue = window.showModalDialog('CustSelect.aspx',window,'dialogWidth=600px;dialogHeight=400px;help:no;resizable:no;scroll=yes; status:no;');
    if(returnValue != null && returnValue.length > 0 && returnValue != "undefined")
    {
        document.getElementById("SaleListCtrl1_ddlCustomer").value = returnValue;
    }
}
function SetItemName()
{
    var returnValue = window.showModalDialog('ItemSelect.aspx',window,'dialogWidth=600px;dialogHeight=400px;help:no;resizable:no;scroll=yes; status:no;');
    if(returnValue != null && returnValue.length > 0 && returnValue != "undefined")
    {
        document.getElementById("SaleListCtrl1_ddlProject").value = returnValue;
    }
}
</script>
<table border="0" cellpadding="2" cellspacing="0" style="width: 100%">
    <tr>
        <td align="left"><asp:DropDownList ID="ddlCustomer" runat="server" Width="135px">
                <asp:ListItem>--客户名称--</asp:ListItem>
            </asp:DropDownList>
            <img alt="" src="../images/test_search.gif" onclick="SetDepName();" style=" cursor:hand;" />
            <img alt="" src="../images/clear.gif" style="display: none" />
            <asp:DropDownList ID="ddlWin" runat="server" Width="120px">
                <asp:ListItem>--赢面--</asp:ListItem>
            </asp:DropDownList><asp:DropDownList ID="ddlUser" runat="server" Width="100px">
                <asp:ListItem>--销售人员--</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="ddlDatetime" runat="server" Width="90px">
                <asp:ListItem>--预测日期--</asp:ListItem>
                <asp:ListItem Value="7">最近一周</asp:ListItem>
                <asp:ListItem Value="30">最近一个月</asp:ListItem>
                <asp:ListItem Value="90">最近三个月</asp:ListItem>
                <asp:ListItem Value="180">半年内</asp:ListItem>
                <asp:ListItem Value="365">一年内</asp:ListItem>
                <asp:ListItem Value="780">两年内</asp:ListItem>
            </asp:DropDownList>开始:<cc1:Calendar ID="txtBegin" runat="server" Width="80px"></cc1:Calendar>结束:<cc1:Calendar
                ID="txtEnd" runat="server" Width="80px"></cc1:Calendar></td>
    </tr>
    <tr>
        <td align="left">
            <asp:DropDownList ID="ddlProject" runat="server" Width="300px">
                <asp:ListItem>--项目名称--</asp:ListItem>
            </asp:DropDownList>
            <img alt="" src="../images/test_search.gif" onclick="SetItemName();return false;" style=" cursor:hand;" />
            <img alt="" src="../images/clear.gif" style="display: none" />
            销售金额(元):<asp:DropDownList ID="ddlOperator" runat="server">
                <asp:ListItem>&gt;</asp:ListItem>
                <asp:ListItem>&lt;</asp:ListItem>
                <asp:ListItem>=</asp:ListItem>
            </asp:DropDownList><asp:TextBox ID="txtMoney" runat="server" Width="60px" Height="16px"></asp:TextBox><asp:Button ID="btnSearch" runat="server" Text="查 询" OnClick="btnSearch_Click" />
            <asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="条件清空" /></td>
    </tr>

    <tr>
        <td align="center">
            <asp:GridView ID="gvConList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                BackColor="White" BorderColor="#E7E7FF" BorderWidth="1px" CellPadding="4" PageSize="12"
                Width="100%" OnPageIndexChanging="gvConList_PageIndexChanging" OnRowCommand="gvConList_RowCommand" OnRowDataBound="gvConList_RowDataBound" ShowFooter="True">
                <FooterStyle BackColor="#F7F7F7" ForeColor="#4A3C8C" />
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <SelectedRowStyle BackColor="#E0E0E0" Font-Bold="True" ForeColor="Black" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" Height="18px"
                    HorizontalAlign="Center" />
                <AlternatingRowStyle BackColor="#F7F7F7" />
                <Columns>
                    <asp:TemplateField HeaderText="项目名称/预测次数">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnTitle" runat="server" ToolTip='<%# Bind("projectName") %>' Text='<%# Query1(Eval("projectName"),13) %>'></asp:LinkButton><asp:Label
                                ID="lblSaleCount" runat="server" ForeColor="Blue"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" />
                        <HeaderStyle HorizontalAlign="Left" />
                        <FooterTemplate>
                            销售总金额合计:<asp:Label ID="lblMoney1" runat="server" Font-Bold="True" Text="0" ForeColor="Blue"></asp:Label>(元)
                            加权销售总金额合计:<asp:Label ID="lblMoney2" runat="server" Font-Bold="True" Text="0" ForeColor="Blue"></asp:Label>(元)
                        </FooterTemplate>
                        <FooterStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="客户名称">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" ToolTip='<%# Bind("customerName") %>' Text='<%# Query1(Eval("customerName"),10) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="销售人员">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" ToolTip='<%# Bind("UserName") %>' Text='<%# Query1(Eval("UserName"),5) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="赢面">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("winName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="销售总金额">
                        <ItemTemplate>
                            <asp:Label ID="Label5" runat="server" Text='<%# Bind("total_sale_money") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="加权总金额">
                        <ItemTemplate>
                            <asp:Label ID="Label8" runat="server" Text='<%# Bind("other_sale_money") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="预测时间">
                        <ItemTemplate>
                            <asp:Label ID="Label6" runat="server" Text='<%# Bind("date_time", "{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnOldData" runat="server" CommandName="lbtnOldData">历史数据</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle HorizontalAlign="Right" BackColor="#E7E7FF" ForeColor="#4A3C8C" Height="20px" />
                <PagerTemplate>
                    当前页:<asp:Label  ID="LabelCurrentPage" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>"></asp:Label> 
                    总页数:<asp:Label ID="LabelPageCount" runat="server" Text="<%# ((GridView)Container.NamingContainer).PageCount %>"></asp:Label>
                    总条数:<asp:Label ID="lbCount" runat="server"></asp:Label>
                    <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">首页</asp:LinkButton> 
                    <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">上一页</asp:LinkButton> 
                    <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">下一页</asp:LinkButton> 
                    <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"  Visible="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">尾页</asp:LinkButton> 
                    跳转到:<asp:TextBox ID="txtPages" runat="server" Height="16px" Font-Size="10px" Width="30px"></asp:TextBox>
                    <asp:Button  ID="btnClick" runat="server" Text="跳转"  CommandName="Click"></asp:Button>
               </PagerTemplate>

            </asp:GridView>
            &nbsp;
        </td>
    </tr>
    <tr>
        <td style="height: 19px">
        </td>
    </tr>
</table>
<script language="javascript" type="text/javascript">
function SetSearchTime()
{
    if(document.getElementById("SaleListCtrl1_ddlDatetime").value != "--预测日期--")
    {
        var now = new Date();  
        document.getElementById("SaleListCtrl1_txtEnd").value = now.getFullYear() + '-' + (now.getMonth()+1) + '-' + now.getDate();
        
        var day = now.getDate();
        var days = document.getElementById("SaleListCtrl1_ddlDatetime").value;
        var begin = new Date(now.setDate(day-days));
        document.getElementById("SaleListCtrl1_txtBegin").value = begin.getFullYear() + '-' + (begin.getMonth()+1) + '-' + begin.getDate();
    }
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -