<%@ Page Language="c#" CodeBehind="StuBill.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Mobile.Register.StuBill"
    Title="消费单-客服" %>

<%@ Register Src="../../UserCol/Progress.ascx" TagName="Progress" TagPrefix="uc2" %>
<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc1" %>
<%@ Register Src="../User_Col/col_StuControlPanel.ascx" TagName="col_StuControlPanel" TagPrefix="uc3" %>
<%@ Register src="../../UserCol/ReportServer.ascx" tagname="ReportServer" tagprefix="uc4" %>
<!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 id="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />



    <script src="../Jscript/createSubMenu.js" type="text/javascript"></script>
    <script type="text/javascript">

    </script>
</head>
<body>

    <form id="Form1" runat="server">
        <uc1:col_Header ID="col_Header1" runat="server" />
        <div id="web_page_contents">

            <div class="biao_zhun_suo_jin">

                <uc4:ReportServer ID="ReportServer1" runat="server" />

                <uc3:col_StuControlPanel ID="col_StuControlPanel1" runat="server" />
                <div class="tool_Search">
                    <label class="lab_button_kuan">
                        <input id="btnAdd" causesvalidation="false" type="button" onclick="window.location='PostSellBill.aspx?StudentID=<%=Request.QueryString["StudentID"] %>    '"
                            value="增加消费单" />
                    </label>

                </div>

                <div class="divpanel">
                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand"
                        OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>
                            <asp:Panel ID="plItem" runat="server" CssClass="kuai">

                                <h1 class="auto_length_title">
                                    <asp:ImageButton ID="ibnSelect" CommandName="Select" CommandArgument='<%# Eval("BillID") %>' ImageUrl='<%# accTheme("node_close.gif") %>'
                                        runat="server" />
                                    <asp:LinkButton ID="lbnSelect" runat="server" Text='<%# Eval("BillID") %>' CommandName="Select" CommandArgument='<%# Eval("BillID") %>' /></h1>

                                <table class="table" cellspacing="0" border="0" style="table-layout: fixed; word-break: break-all; word-wrap: break-word">
                                    <tr>
                                        <td style="width: auto">日期：</td>
                                        <td style="width: auto"><%#Eval("DateAndTime")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">类型：</td>
                                        <td style="width: auto"><%#(int)Eval("BillTypeID") == 1 ? "购买" : "退货"%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">应交金额：</td>
                                        <td style="width: auto"><%# Eval("Pay","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">优惠：</td>
                                        <td style="width: auto"><%# Eval("Favourable","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">实交金额：</td>
                                        <td style="width: auto"><%# Eval("Payed","{0:c2}") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">备注：</td>
                                        <td style="width: auto">
                                            <asp:Literal runat="server" ID="litRemark" Text='<%# Eval("Remark") %>' Mode="Encode"></asp:Literal></td>
                                    </tr>
                                    <tr>
                                        <td>办理点：</td>
                                        <td><%#Eval("PostSchoolName") %></td>
                                    </tr>
                                    <tr>
                                        <td>录入员：</td>
                                        <td><%#Eval("TrueName")%></td>
                                    </tr>
                                    <tr>
                                        <td style="height: 25px">打印：</td>
                                        <td>
                                            <asp:HyperLink ID="hlkPrint" runat="server" NavigateUrl='<%#string.Format("javascript:Print({0});void(0);OpenPrint()",Eval("BillID")) %>'
                                                ImageUrl='<%# accTheme("print.gif")%>' CssClass="inline_block"></asp:HyperLink>
                                            <span class="inline_block">次数：<%# (int)Eval("PrintCount")%></span></td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button" id="divDelete" runat="server">
                                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%#Eval("BillID")%>'
                                                    OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button" id="divEdit" runat="server">
                                                <asp:HyperLink ID="hlkEdit" runat="server" Text="编辑" NavigateUrl='<%# string.Format("{3}.aspx?StudentID={0}&BillID={1}&GetUrl={2}",Eval("StudentID"),Eval("BillID"),swq.Web.PathAndQuery(),(int)Eval("BillTypeID") == 1 ? "PostSellBill" : "PostOutBill") %>' />

                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton ID="lbnDetails" runat="server" Text="明细" CommandName="Select" CommandArgument='<%#Eval("BillID")%>'></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>

                                <div class="details"></div>

                            </asp:Panel>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div class="backpanel">
                    <label class="lab_button_kuan" id="__mt_labBack" runat="server">
                        <input id="Button1" causesvalidation="false" runat="server" type="button" onclick="back(this)" value="返回" />
                    </label>
                </div>
                <div id="divItems" style="visibility: hidden; display: none">
                    <asp:GridView ID="gvItems" runat="server" AutoGenerateColumns="false" ShowHeader="false" CssClass="table_simple_kuan">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="striking">
                                        项目:<%# Eval("ProductName") %><br />单价:<%# Eval("UnitPrice","{0:c2}") %><br />数量:<%# Eval("Amount") %><%# Eval("UnitName") %><br />优惠:<%# Eval("Favorable","{0:c2}") %><br />小计:<%# Eval("TotalPrice","{0:c2}") %><br />仓库:<%# Eval("StoreroomName") %></div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>


                <div class="divremark">
                    <b>注意事项：：</b><br />
                    1、如果您发现消费单无法编辑或删除，请到财务模块：学员控制面板-消费单-编辑或删除，因为消费信息的管理工作由财务负责。<br />
                </div>
            </div>
        </div>
    </form>

</body>
</html>
