<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_StockManage_DepotListManage, WebApp_deploy" title="报损单管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="pageTitle" style="line-height: 30px; vertical-align: middle;">
        &nbsp;&nbsp;&nbsp;&nbsp;<asp:Literal ID="ltrTitle" runat="server"></asp:Literal></div>
    <div id="MainMenu">
        <div class="TabText">
            <div style="line-height: 2px;">
                &nbsp;</div>
            <%--列表 begin--%>
            <asp:Panel ID="pnlManage" runat="server">
                <table class="SearchTableStyle">
                    <tr>
                        <th colspan="3" style="float: left; text-align: left">
                            &nbsp;<b>高级查询：</b>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;时间： &nbsp;<asp:TextBox ID="txtSearchBeginDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate" Width="90px"></asp:TextBox>
                            &nbsp;&nbsp;至：&nbsp;&nbsp;<asp:TextBox ID="txtSearchEndDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate" Width="90px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;单据编号：<asp:TextBox ID="txtSearchInfoNumber" CausesValidation="false" runat="server"
                                Width="200px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;<asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
                <div style="line-height: 2px;">
                    &nbsp;</div>
                <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand">
                    <HeaderTemplate>
                        <table class="rptrow" cellspacing="0" cellpadding="0">
                            <tr>
                                <th>
                                    单据编号
                                </th>
                                <th>
                                    时间
                                </th>
                                <th>
                                    总金额
                                </th>
                                <th>
                                    状态
                                </th>
                                <th>
                                    记录人
                                </th>
                                <th>
                                    备注
                                </th>
                                <th>
                                    操作
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#E7EDFE'"
                            onmouseout="this.style.backgroundColor=c;">
                            <td>
                                <asp:HyperLink ID="hlInfoNumber" runat="server" Text='<%# Eval("InfoNumber") %>'
                                    NavigateUrl='<%# "~/Member/StockManage/DepotListManage.aspx?stockType="+Eval("StockOrderType")+"&Action=checkinfo&infoOrderID="+ Eval("InfoOrderID")%>'></asp:HyperLink>
                            </td>
                            <td>
                                <%# Eval("StockDate")%>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblMoney" runat="server" Text='<%#Eval("TotalMoney") %>'></asp:Label>&nbsp;&nbsp;
                            </td>
                            <td>
                                <%# HoWave.Data.Bll.BLLInstance.BllStockInfoOrder.GetStockStatusStrMark(Eval("StockStatus"))%>
                            </td>
                            <td>
                                <%#Eval("Inputer")%>
                            </td>
                            <td>
                                <%# Eval("Remark").ToString() == "" ? "&nbsp;" : Eval("Remark")%>
                            </td>
                            <td align="left" style="width: 160px">
                                &nbsp;<asp:HiddenField ID="hfStockStatus" runat="server" Value='<%#Eval("StockStatus") %>' />
                                <asp:LinkButton ID="lbtnDelete" CommandName="DelInfo" CommandArgument='<%# Eval("InfoOrderID") %>'
                                    runat="server" OnClientClick="return confirm('确定要删除该信息吗？');">删除</asp:LinkButton>
                                &nbsp;<a href='DepotListManage.aspx?stockType=<%#Eval("StockOrderType") %>&Action=checkinfo&infoOrderID=<%# Eval("InfoOrderID") %>'>
                                    详细</a>&nbsp;<asp:HyperLink ID="hlEdit" runat="server" Text="修改" NavigateUrl='<%# "~/Member/StockManage/DepotList.aspx?stockType="+Eval("StockOrderType")+"&Action=editinfo&infoOrderID="+ Eval("InfoOrderID") %>'></asp:HyperLink>
                                &nbsp;<asp:LinkButton ID="lbtnConfirm" CommandName="ConfirmInfo" CommandArgument='<%# string.Format("{0},{1}",Eval("StockOrderType"),Eval("InfoOrderID"))%>'
                                    runat="server" OnClientClick="return confirm('检查信息是否有误，确认并修改信息！');">确认</asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <tr>
                            <td>
                                合计
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td align="right">
                                <asp:Label ID="lblFootMoney" runat="server"></asp:Label>&nbsp;&nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <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="ShopOrderStyle">
                    <caption style="line-height: 30px">
                        详细信息</caption>
                    <tr>
                        <td class="OrderTitle">
                            单据编号 ：
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblStockNumber" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            <asp:Label ID="lblStockTypeC" runat="server">出库类型 ：</asp:Label>
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblStockTypeStatue" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            记录时间 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputTime" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            记录人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputer" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblMoneyTotalC" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            状态 ：
                        </td>
                        <td>
                            <asp:Label ID="lblStatus" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                    
                        <td class="OrderTitle">
                            说明 ：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="lblRemarks" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="gvItem" CssClass="tableHead" runat="server" RowStyle-HorizontalAlign="Center"
                    AutoGenerateColumns="false">
                    <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" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="商品名称" DataField="ProductName"></asp:BoundField>
                        <asp:BoundField HeaderText="数量" DataField="StockCount">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="价格" DataField="Price">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="单位" DataField="Unit">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="金额"></asp:BoundField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="tableHeader" 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 style='text-align: center;'>
                                    单位
                                </th>
                                <th style='text-align: center;'>
                                    金额
                                </th>
                            </tr>
                            <tr>
                                <td colspan="6" align="center">
                                    没有数据！
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                </asp:GridView>
                <table class="ShopOrderStyle">
                    <caption style="line-height: 2px;">
                        &nbsp;</caption>
                    <tr>
                        <td align="center" colspan="4" style="padding-left: 200px;">
                            &nbsp;&nbsp; &nbsp;&nbsp;<input id="btnBack" type="button" onclick="history.back()"
                                value="返回" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <%--详细信息 end--%>
            <div style="line-height: 6px;">
                &nbsp;</div>
        </div>
    </div>
</asp:Content>
