<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="charge_item_editlist.aspx.cs" Inherits="VA.Modules.JDingMember.consume.charge_item_editlist" %>

<%@ Import Namespace="System.Data"%>

<!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>
<title>收银项目明细记录</title>    
    <!--#include virtual="/include/css/editlist.aspx"-->
    <!--#include virtual="/include/js/editlist.aspx"--> 
    <script type="text/javascript">   
        
        //显示汇总金额；
        function afterDataListLoaded() {
            $("#statBar").html($("#divStatInfo").html());
        }

        $(function () {
            initListPage();            
        });
    </script>

</head>
<body>
<!--说明：该页面是以 employee_editlist_nofresh_5.aspx 为原型封装的结果-->
<form id="Form1" method="post" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<div id="pageWrapper" class="pageWrapper">   
    
    <div id="toolBar">    
        <a href="javascript:refresh()" class="jtongui-toolbarbutton" icon="icon-reload">刷新</a>
        <asp:LinkButton ID="lbnExportToExcel" runat="server" CssClass="jtongui-toolbarbutton" icon="icon-export" OnClick="lbnExportToExcel_Click">导出</asp:LinkButton>
    </div><!--toolBar.END-->   
                     
    <div id="searchBar">
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

        <asp:DropDownList ID="ddlChargeBizType" runat="server" 
             AutoPostBack="true"
             OnSelectedIndexChanged="ddlChargeBizType_SelectedIndexChanged">           
        </asp:DropDownList>   

        <asp:DropDownList ID="ddlCustomerType" runat="server" 
             AutoPostBack="true"
             OnSelectedIndexChanged="ddlCustomerType_SelectedIndexChanged">        
        </asp:DropDownList>          

        <asp:DropDownList ID="ddlSearchField" runat="server">
        <asp:ListItem Value="">检索字段</asp:ListItem>
        <asp:ListItem Value="1">项目代码</asp:ListItem>
        <asp:ListItem Value="2">项目名称</asp:ListItem>
        <asp:ListItem Value="3">会员姓名</asp:ListItem>
        <asp:ListItem Value="4">会员卡号</asp:ListItem>
        <asp:ListItem Value="5">操作员姓名</asp:ListItem>
        <asp:ListItem Value="6">消费单号</asp:ListItem>
        <asp:ListItem Value="7">服务员编号</asp:ListItem>
        <asp:ListItem Value="8">服务员姓名</asp:ListItem>
        </asp:DropDownList>               
                 
       <%-- <asp:DropDownList ID="ddlSearchType" runat="server">
        <asp:ListItem Value="1">模糊匹配</asp:ListItem>
        <asp:ListItem Value="2">精确匹配</asp:ListItem>
        </asp:DropDownList>     --%>          

        <asp:TextBox ID="txtKeyWords" runat="server"
            CssClass="input keywords"
            Width="100px" />

        <asp:DropDownList ID="ddlDateRule" runat="server" EnableViewState="false">
        <asp:ListItem Value="" Selected="True">收银日期</asp:ListItem>
        <asp:ListItem Value="1">今天</asp:ListItem>
            <asp:ListItem Value="2">昨天</asp:ListItem>
            <asp:ListItem Value="3">前天</asp:ListItem>
            <asp:ListItem Value="4">近两天</asp:ListItem>
            <asp:ListItem Value="5">近三天</asp:ListItem>
            <asp:ListItem Value="6">近一周</asp:ListItem>
            <asp:ListItem Value="7">近一月</asp:ListItem>
            <asp:ListItem Value="8">上月</asp:ListItem>
            <asp:ListItem Value="9">本月</asp:ListItem>
            <asp:ListItem Value="10">自定义</asp:ListItem>
        </asp:DropDownList>  

        <VACTL:TextBox ID="txtBeginDate" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="80px"            
            onfocus="laydate()"
            MaxLength="20" />  
        -      
        <VACTL:TextBox ID="txtEndDate" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="80px"            
            onfocus="laydate()"
            MaxLength="20" />        
        
        <asp:DropDownList ID="ddlDayAccountFlag" runat="server" EnableViewState="false">
        <asp:ListItem Value="" Selected="True">是否结账</asp:ListItem>
        <asp:ListItem Value="1">未结账</asp:ListItem>
        <asp:ListItem Value="2">已结账</asp:ListItem>
        </asp:DropDownList>          
        
        <VACTL:TextBox ID="txtDayAccountID" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="80px"            
            MaxLength="20" />        

        <asp:DropDownList ID="ddlOrderBy" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlOrderBy_SelectedIndexChanged">
        <asp:ListItem Value="">排序规则</asp:ListItem>            
        <asp:ListItem Value="RID|ASC">按收银顺序-正序</asp:ListItem>        
        <asp:ListItem Value="RID|DESC">按收银顺序-倒序</asp:ListItem>
        </asp:DropDownList>   
        
        <asp:Button ID="btnSearch" runat="server" 
             CssClass="simpleBtn"
             Text="查询" 
             Onclick="btnSearch_Click" />
        
        </ContentTemplate>
        </asp:UpdatePanel>

    </div><!--searchBar.END-->    

    <div id="dataBar">

    <!--MainList.Start-->    
    <div class="jtongui-smartlisttable" id="jtongui-smartlisttable">

    <table cellpadding="3" cellspacing="0" class="tableheader" id="tb1_header" >
    <thead>
    <tr>
        <%--<td style="width:30px;text-align:center;"><input type="checkbox" id="ckb_selectAll"/></td>--%>
        <td style="width:30px;text-align:center;">No.</td>            
        <td style="width:80px;text-align:center;">收银单号</td> 
        <td style="width:90px;text-align:center;">收银方式</td> 
        <td style="width:60px;text-align:center;">项目类型</td>
        <td style="width:60px;text-align:center;">项目代码</td>
        <td style="width:200px;text-align:center;">项目名称</td>
        <td style="width:50px;text-align:center;">单位</td>
        <td style="width:50px;text-align:center;">单价</td>
        <td style="width:50px;text-align:center;">数量</td>
        <td style="width:60px;text-align:center;">金额</td>	         
	    <td style="width:60px;text-align:center;">优惠金额</td>	         
        <td style="width:70px;text-align:center;">优惠后金额</td>	         
        <td style="width:80px;text-align:center;">服务员</td>	
        <td style="width:70px;text-align:center;">顾客类型</td>
        <td style="width:70px;text-align:center;">顾客姓名</td>                        
        <td style="width:70px;text-align:center;">会员卡号</td>  
        <td style="width:100px;text-align:center;">收银时间</td>	         
        <td style="width:190px;text-align:center;">备注</td>          
        <td style="width:70px;text-align:center;">操作员</td>      
        <td style="width:100px;text-align:center;">门店</td>
        <td style="width:60px;text-align:center;">结账ID</td>	                         	    
        <td></td>
    </tr>    
    </thead>
    </table>

    <div id="dataBody">
    <asp:Repeater ID="myRepeater" Runat="server" EnableViewState="False"  >
    <HeaderTemplate>    
    <div class="bodyContainer">
    <% = base.ShowNoRecordInfo() %>
    <table cellpadding="3" cellspacing="0" class="tablebody" tbHeader="tb1_header">
    </HeaderTemplate>
    <ItemTemplate>
    <tr>
        <%-- <td style="text-align:center;"><input type="checkbox" name="ckb_dataItem" value="<%# Eval("RID")%>" /></td>--%>
        <td align="center"><%# (base.currPage - 1)*base.PageSize + Container.ItemIndex + 1%></td>        
        <td align="center"<%# ShowBillStyle(Eval("Bill_Status").ToString(), Eval("Bill_Type").ToString())%>><%# Eval("BizNo")%></td>         
        <td align="center"><%# VA.Modules.JDingMember.Core.Enums.ConsumeChargeConverter.ChargeBizTypeConverter.Convert_Value_ToText(Eval("Charge_Biz_Type").ToString(), true)%></td>
        <td align="center"><%# VA.Modules.JDingMember.Core.Enums.ChargeItemTypeConverter.Convert_Value_ToText(Eval("Item_Type").ToString(), true)%></td>        
        <td align="center"><%# Eval("Item_Code")%></td>
        <td align="left"><%# Eval("Item_Name")%></td>
        <td align="center"><%# Eval("Unit")%></td>
        <td align="right"><%# Eval("Price")%></td>
        <td align="right"><%# Eval("Quantity")%></td>
        <td align="right"><%# Eval("ItemCosts")%></td>
        <td align="right"><%# Eval("ItemDiscounts")%></td>
        <td align="right"><%# Eval("ItemCharges")%></td>
        <td align="left"><%# Eval("Waiter_Name")%>/<%# Eval("Waiter_Code")%></td>
        <td align="center"><%# VA.Modules.JDingMember.Core.Enums.ConsumeChargeConverter.CustomerTypeConverter.Convert_Value_ToText(Eval("Customer_Type").ToString())%></td>
        <td align="center"><%# Eval("Name")%></td>        
        <td align="center"><%# Eval("CardNo")%></td>                
        <td align="center"><%# String.Format("{0:yyyy-MM-dd HH:mm}", Eval("Operate_Date"))%></td>        
        <td align="left"><%# Eval("Remark")%></td>         
        <td align="center"><%# Eval("Operator_Name")%></td> 
        <td align="center"><%# Eval("Shop_Name")%></td> 
        <td align="center"><%# Eval("Settle_Account_ID")%></td>             
        <td></td>
    </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </div><!--bodyContainer.END-->        

    <div id="divPagerInfo" style="display:none">
        <%=base.pageInfo%>
    </div>

    <div id="divStatInfo" style="display:none">
        共 <span style="font-weight:bold;"><%=base.RdCnt%></span> 条项目明细记录，优惠后金额合计：<span style="font-weight:bold;"><%= base.TotalCharges.ToString("F2")%></span>，优惠金额合计：<span style="font-weight:bold;"><%= base.TotalDiscountAmount.ToString("F2")%></span>&nbsp;&nbsp;
    </div>

    <input type="hidden" id="hidden_pageCnt" value="<% = base.PageCnt%>" />
    <input type="hidden" id="hidden_rdCnt" value="<% = base.RdCnt%>" />
    <input type="hidden" name="chkNum" value="<%=chkNum%>" />

    </FooterTemplate>
    </asp:Repeater>    
    </div><!--dataBody.END-->

    </div><!--jtongui-smartlisttable.END-->        
    <!--MainList.End-->  

    </div><!--dataBar.END-->

    <div id="statBar">
       
    </div><!--statBar.END-->

    <div id="pagerBar">
       ……
    </div><!--pageNavBar.END-->
    
    <asp:HiddenField runat="server" ID="hfCurrPage" EnableViewState="true" />
    
</div>

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