<%@ page language="C#" masterpagefile="~/Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_Stock_EditPriceRecord, WebApp_deploy" title="改价单记录管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="MainMenu">
        <div class="TabText">
            <%--列表 begin--%>
            <asp:Panel ID="pnlManage" runat="server">
                <table class="nick" id="table_item" runat="server">
                    <tr>
                        <td class="tit left1">
                            &nbsp;&nbsp;<asp:Literal ID="ltrTitle" runat="server">改价单记录管理</asp:Literal>
                        </td>
                    </tr>
                </table>
                <table class="nick">
                    <tr>
                        <td colspan="4" class="tit">
                            &nbsp;<b>高级查询：</b>
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">
                            时间：
                        </td>
                        <td class="rtd">
                            &nbsp;<asp:TextBox ID="txtSearchBeginDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                            &nbsp;&nbsp;至&nbsp;&nbsp;<asp:TextBox ID="txtSearchEndDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                        </td>
                        <td class="ltd">
                            单据编号：
                        </td>
                        <td class="rtd">
                            &nbsp;<asp:TextBox ID="txtSearchInfoNumber" CausesValidation="false" runat="server"></asp:TextBox>
                            &nbsp;<asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="gvManage" CssClass="adminlist" runat="server" AllowPaging="True"
                    OnPageIndexChanging="gridView_PageIndexChanging" OnRowDataBound="gridView_RowDataBound"
                    AutoGenerateColumns="false" PageSize="10" RowStyle-HorizontalAlign="Center">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="InfoOrderID" DataTextField="InfoNumber"
                            DataNavigateUrlFormatString="Admin_Stock_EditPriceRecord.aspx?MenuID=5&MenuName=库存管理&FileName=改价单记录管理&action=checkinfo&infoOrderID={0}"
                            HeaderText="单据编号">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="StockDate" HeaderText="时间">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="总金额">
                            <ItemTemplate>
                                <%#Eval("TotalMoney") %>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <%#Eval("Remark") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href='Admin_Stock_EditPriceRecord.aspx?MenuID=5&MenuName=库存管理&FileName=改价单记录管理&action=checkinfo&infoOrderID=<%# Eval("InfoOrderID") %>'>
                                    详细</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="adminlist" style="width: 100%">
                            <tr>
                                <th>
                                    单据编号
                                </th>
                                <th>
                                    时间
                                </th>
                                <th>
                                    总金额
                                </th>
                                <th>
                                    备注
                                </th>
                                <tr>
                                    <td colspan="4">
                                        没有符合查询条件的记录！
                                    </td>
                                </tr>
                        </table>
                    </EmptyDataTemplate>
                    <PagerStyle CssClass="productPageStyle" />
                </asp:GridView>
                <div style="text-align: center;">
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                </div>
            </asp:Panel>
            <%--列表 end--%>
            <%--详细信息 begin--%>
            <asp:Panel ID="pnlDetail" runat="server">
                <table class="nick">
                    <tr>
                        <td colspan="4" class="tit">
                            详细信息
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">
                            单据编号 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblStockNumber" runat="server"></asp:Label>
                        </td>
                        <td class="ltd">
                            记录时间 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblInputTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">
                            记录人 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblInputer" runat="server"></asp:Label>
                        </td>
                        <td class="ltd">
                            发票差额 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblInvoice_TotalPrice" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">
                            商品差额 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblMoneyGoods" runat="server"></asp:Label>
                        </td>
                        <td class="ltd">
                            总差额 ：
                        </td>
                        <td class="rtd">
                            <asp:Label ID="lblMoney" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="ltd">
                            备注 ：
                        </td>
                        <td class="rtd" colspan="3">
                            <asp:Label ID="lblRemarks" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:GridView ID="gvItem" CssClass="adminlist" runat="server" RowStyle-HorizontalAlign="Center"
                                AutoGenerateColumns="false" Width="100%">
                                <Columns>
                                    <asp:TemplateField HeaderText="商品图片">
                                        <ItemTemplate>
                                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# (Convert.ToString(Eval("ProductSmallImageUrl"))==""?"~/Images/show_nopic.gif":"~/"+Eval("ProductSmallImageUrl").ToString()) %>'
                                                Height="80px" Width="80px" />
                                            <asp:HiddenField ID="hfProductID" runat="server" Value='<%#Eval("ProductID") %>' />
                                            <asp:HiddenField ID="hfOrderID" runat="server" Value='<%#Eval("OrderID") %>' />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="商品名称" DataField="ProductName"></asp:BoundField>
                                    <asp:BoundField HeaderText="单位" DataField="Unit">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="数量" DataField="StockCount">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="原价" DataField="OldPrice">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="价格" DataField="Price">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="商品差额"></asp:BoundField>
                                </Columns>
                                <EmptyDataTemplate>
                                    <table class="adminlist" width="100%">
                                        <tr>
                                            <th style='text-align: center;'>
                                                商品图片
                                            </th>
                                            <th style='text-align: center;'>
                                                商品名称
                                            </th>
                                            <th style='text-align: center;'>
                                                单位
                                            </th>
                                            <th style='text-align: center;'>
                                                数量
                                            </th>
                                            <th>
                                                原价
                                            </th>
                                            <th style='text-align: center;'>
                                                价格
                                            </th>
                                            <th style='text-align: center;'>
                                                商品差额
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="7" align="center">
                                                没有数据！
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align: center;">
                            &nbsp;&nbsp;<input id="btnBack" type="button" onclick="history.back()" value="返回" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <%--详细信息 end--%>
        </div>
    </div>
</asp:Content>
