<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_JXC_StockOrderSaleSearch, WebApp_deploy" title="销售出库单管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../../Js/My97DatePicker/config.js" type="text/javascript"></script>
    <script src="../../Js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        //收款期限
        function pickedFunE() {
            $dp.$('<%=txtReceiptEndDate.ClientID %>').value = $dp.cal.getNewDateStr('yyyy-MM-dd HH:mm:ss');
        }
    </script>
    <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"></asp:TextBox>
                            &nbsp;&nbsp;至&nbsp;&nbsp;<asp:TextBox ID="txtSearchEndDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;单据编号：<asp:TextBox ID="txtSearchInfoNumber" CausesValidation="false" runat="server"></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">
                    <HeaderTemplate>
                        <table class="rptrow" cellspacing="0" cellpadding="0">
                            <tr>
                                <th>
                                    单据编号
                                </th>
                                <th>
                                    客户名称
                                </th>
                                <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>
                                <%#Eval("InfoNumber")%>
                            </td>
                            <td>
                                <%#Eval("BuyerName")%>
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblTotalFee" runat="server" Text='<%#Eval("Fee")==DBNull.Value?"0":Eval("Fee")%>'></asp:Label>
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblTotalReceiptMoney" runat="server" Text='<%#Eval("ReceiptMoney") == DBNull.Value ? "0" : Eval("ReceiptMoney")%>'></asp:Label>
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblTotalAlreadyReceiptMoney" runat="server" Text='<%#Eval("AlreadyReceiptMoney") == DBNull.Value ? "0" : Eval("AlreadyReceiptMoney")%>'></asp:Label>
                            </td>
                            <td>
                                <%#Eval("ReceiptEndDate") == DBNull.Value ? "&nbsp;" : Eval("ReceiptEndDate")%>
                            </td>
                            <td>
                                <%#Eval("ReceiptDate")==DBNull.Value?"&nbsp;":Eval("ReceiptDate")%>
                            </td>
                            <td>
                                <%#Eval("Inputer")%>
                            </td>
                            <td>
                                <a href='<%#"StockOrderSaleSearch.aspx?Action=checkinfo&infoOrderID="+Eval("InfoOrderID") %>'>
                                    查看</a> <a href='<%#"StockOrderSaleSearch.aspx?Action=editinfo&infoOrderID="+Eval("InfoOrderID") %>'>
                                        修改</a>
                                <asp:LinkButton ID="lkbtn" runat="server" CausesValidation="False" CommandName="DelInfo"
                                    Text="删除" CommandArgument='<%# Eval("InfoOrderID") %>' OnClientClick="return confirm('确定删除这栏信息吗？');"
                                    OnCommand="Button_Command"></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <tr class="rptrowTrBg">
                            <td>
                                合计
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblFootTotalFee" runat="server"></asp:Label>
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblFootTotalReceiptMoney" runat="server"></asp:Label>
                            </td>
                            <td align="right" style="padding-right: 6px">
                                <asp:Label ID="lblFootTotalAlreadyReceiptMoney" runat="server"></asp:Label>
                            </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>
                <div>
                    &nbsp;&nbsp;说明：<br />
                    &nbsp;&nbsp;(1)&nbsp;“运费总额”指物流总费用。 &nbsp;“发票税额”指需要发票且商品价格未含税时需要买家支付的商品总税额。<br />
                    &nbsp;&nbsp;(2)&nbsp;“订单金额”指订单中“商品总额”+“运费总额”+“发票税额”<br />
                    &nbsp;&nbsp;(3)&nbsp;“应收金额”指订单中“订单金额”+“手续费”。 &nbsp;“欠收金额”指订单中未收的“订单总额”，不包括手续费。
                </div>
            </asp:Panel>
            <%--列表 end--%>
            <%--详细信息 begin--%>
            <asp:Panel ID="pnlDetail" runat="server">
                <table class="ShopOrderStyle">
                    <caption>
                        <asp:Literal ID="Literal1" runat="server" Text="详细信息"></asp:Literal></caption>
                    <tr>
                        <td class="OrderTitle">
                            单据编号 ：
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblStockNumber" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            记录时间 ：
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblInputTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            记录人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputer" runat="server"></asp:Label>
                            <asp:TextBox ID="txtInputer" runat="server"></asp:TextBox>
                        </td>
                        <td class="OrderTitle">
                            收款期限 ：
                        </td>
                        <td>
                            <asp:Label ID="lblReceiptEndDate" runat="server"></asp:Label>
                            <asp:TextBox ID="txtReceiptEndDate" runat="server" onfocus="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:pickedFunE})"
                                CssClass="Wdate" Width="165px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            客户名称 ：
                        </td>
                        <td>
                            <asp:Label ID="lblBuyerName" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            收款日期 ：
                        </td>
                        <td>
                            <asp:Label ID="lblPayTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            运费金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblDeliver_TotalPrice" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            发票金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInvoice_TotalPrice" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            商品金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblMoneyGoods" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            应收金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblReceiptMoney" runat="server" Width="165px"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            已收金额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblAreadyReceiptMoney" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            费用 ：
                        </td>
                        <td>
                            <asp:Label ID="lblFee" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            备注 ：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="lblRemarks" runat="server"></asp:Label>
                            <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine" Width="260px" Height="60px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <asp:Repeater ID="rptItemInfo" runat="server">
                    <HeaderTemplate>
                        <table class="rptrow" cellspacing="0" cellpadding="0" width="100%">
                            <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:Image ID="Image1" runat="server" ImageUrl='<%# (Convert.ToString(Eval("ProductSmallImageUrl"))==""?"~/Images/show_nopic.gif":"~/"+Eval("ProductSmallImageUrl").ToString()) %>'
                                    Height="80px" Width="80px" />
                            </td>
                            <td>
                                <%#Eval("Goods_serial") %>
                            </td>
                            <td>
                                <%#Eval("ProductName") %>
                            </td>
                            <td>
                                <%# Eval("Unit") %>
                            </td>
                            <td align="right" style="padding: 0px 6px 0px 2px">
                                <%# Eval("StockCount") %>
                            </td>
                            <td align="right" style="padding: 0px 6px 0px 2px">
                                <%# Eval("Price") %>
                            </td>
                            <td align="right" style="padding: 0px 6px 0px 2px">
                                <asp:HiddenField ID="hfItemPrice" runat="server" Value='<%#Eval("Price") %>' />
                                <asp:HiddenField ID="hfItemStockCount" runat="server" Value='<%#Eval("StockCount") %>' />
                                <asp:Label ID="lblItemMoney" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <%--<tr class="rptrowTrBg">
                            <td>
                                合计
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td align="right" style="padding: 0px 6px 0px 2px">
                                <asp:Label ID="lblItemFootStockCount" runat="server"></asp:Label>
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td align="right" style="padding: 0px 6px 0px 2px">
                                <asp:Label ID="lblItemFootMoney" runat="server"></asp:Label>
                            </td>
                        </tr>--%>
                        <asp:Label ID="lblFootExplain" runat="server"></asp:Label>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <div style="text-align: center">
                    <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>&nbsp;&nbsp;
                    &nbsp;&nbsp; &nbsp;&nbsp;<input id="btnBack" type="button" onclick="history.back()"
                        value="返回" />
                </div>
            </asp:Panel>
            <%--详细信息 end--%>
            <div style="line-height: 6px;">
                &nbsp;</div>
        </div>
    </div>
</asp:Content>
