<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_JXC_CheckAccountAoucher, 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>
    <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;时间范围：<asp:TextBox ID="txtSearchBeginDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                            &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"
                                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:GridView ID="gvManage" CssClass="gvlist" runat="server" AllowPaging="True" OnPageIndexChanging="gridView_PageIndexChanging"
                    OnRowDataBound="gridView_RowDataBound" AutoGenerateColumns="false" 
                    PageSize="10">
                    <Columns>
                        <asp:BoundField HeaderText="行号" ItemStyle-HorizontalAlign="Center" DataField="RowCount" />
                        <asp:TemplateField HeaderText="凭证号码">
                            <ItemTemplate>
                                <asp:HiddenField ID="hfAccountAoucherID" runat="server" Value='<%# Eval("AccountAoucherID") %>' />
                                <asp:HyperLink ID="hlAccountANumber" runat="server" NavigateUrl='<%# "AccountAoucherInfo.aspx?Action=editinfo&InfoID="+Eval("AccountAoucherID") %>'
                                    Text='<%# Eval("AccountANumber") %>'></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="日期">
                            <ItemTemplate>
                                <%# Eval("InputDate") == DBNull.Value ? "" : Eval("InputDate")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="审核">
                            <ItemTemplate>
                                <asp:HiddenField ID="hfIsCaudit" runat="server" Value='<%# Eval("IsCaudit") == DBNull.Value ? "" : Eval("IsCaudit")%>' />
                                <asp:LinkButton ID="lkbtnOK" runat="server" CommandName="OKInfo" CommandArgument='<%# Eval("AccountAoucherID") %>'
                                    OnCommand="Button_Command" OnClientClick="return confirm('确定要审核凭证信息吗？');"></asp:LinkButton>
                                <asp:LinkButton ID="lkbtnCancle" runat="server" CommandName="CancleInfo" CommandArgument='<%# Eval("AccountAoucherID") %>'
                                    OnCommand="Button_Command" OnClientClick="return confirm('确定要取消已审核的凭证信息吗？');"></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="凭证摘要">
                            <ItemTemplate>
                                <%# Eval("AAItemSummary") == DBNull.Value ? "" : Eval("AAItemSummary")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="科目编号">
                            <ItemTemplate>
                                &nbsp;&nbsp;
                                <%# Eval("AccountSNumber") == DBNull.Value ? "" : Eval("AccountSNumber")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="科目名称">
                            <ItemTemplate>
                                &nbsp;&nbsp;<%# Eval("AccountSName") == DBNull.Value ? "" : Eval("AccountSName")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="借方金额">
                            <ItemTemplate>
                                <%# Eval("BorrowPrice") == DBNull.Value ? "" : Eval("BorrowPrice")%>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="贷方金额">
                            <ItemTemplate>
                                <%# Eval("LoanPrice") == DBNull.Value ? "" : Eval("LoanPrice")%>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlDetails" runat="server" NavigateUrl='<%# "CheckAccountAoucher.aspx?Action=checkinfo&InfoID="+Eval("AccountAoucherID") %>'
                                    Text="详细"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="gvlist">
                            <tr>
                                <th>
                                    行号
                                </th>
                                <th>
                                    凭证号码
                                </th>
                                <th>
                                    日期
                                </th>
                                <th>
                                    审核
                                </th>
                                <th>
                                    凭证摘要
                                </th>
                                <th>
                                    科目编号
                                </th>
                                <th>
                                    科目名称
                                </th>
                                <th>
                                    借方金额
                                </th>
                                <th>
                                    贷方金额
                                </th>
                            </tr>
                            <tr>
                                <td colspan="9">
                                    没有符合查询条件的记录！
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <PagerStyle CssClass="productPageStyle" />
                </asp:GridView>
                <div style="text-align: center;">
                    <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                </div>
                <div class="explain_Blue">
                    &nbsp;&nbsp;说明：点击“凭证号码”，修改凭证信息。<br />
                    &nbsp;&nbsp;点击“审核”列的“√”可以取消审核信息；“×”可以审核凭证信息。</div>
            </asp:Panel>
            <%--列表信息 end--%>
            <%--详细信息 begin--%>
            <asp:Panel ID="pnlDetail" runat="server">
                <table class="ShopOrderStyle">
                    <caption style="text-align: left;">
                        &nbsp;&nbsp;详细信息</caption>
                    <tr>
                        <td class="OrderTitle">
                            编号 ：
                        </td>
                        <td>
                            <asp:Label ID="lblAccountANumber" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            凭证张数 ：
                        </td>
                        <td>
                            <asp:Label ID="lblAccountACount" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            记录人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputer" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            制单时间 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            凭证说明 ：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="lblAccountAExplain" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr id="tr_IsCaudit" runat="server" visible="false">
                        <td class="OrderTitle">
                            审核人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblCauditName" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            审核时间 ：
                        </td>
                        <td>
                            <asp:Label ID="lblCauditDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr id="tr_IsAccount" runat="server" visible="false">
                        <td class="OrderTitle">
                            记账人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblAccountName" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            记账时间 ：
                        </td>
                        <td>
                            <asp:Label ID="lblAccountDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="gvItem" runat="server" AutoGenerateColumns="false" CssClass="gvlist">
                    <Columns>
                        <asp:TemplateField HeaderText="科目名称">
                            <ItemTemplate>
                                &nbsp;&nbsp;<%# GetSubjcetName(Eval("AAItemAccountSID") == DBNull.Value ? "" : Eval("AAItemAccountSID"))%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="AAItemSummary" HeaderText="摘要" />
                        <asp:TemplateField HeaderText="借方金额">
                            <ItemTemplate>
                                <%# GetSubjcetMoney(Eval("BorrowPrice") == DBNull.Value ? "" :Eval("BorrowPrice"))%>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="贷方金额">
                            <ItemTemplate>
                                <%# GetSubjcetMoney(Eval("LoanPrice") == DBNull.Value ? "" :Eval("LoanPrice"))%>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="gvlist">
                            <tr>
                                <td>
                                    科目名称
                                </td>
                                <td>
                                    摘要
                                </td>
                                <td>
                                    借方金额
                                </td>
                                <td>
                                    贷方金额
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" style="text-align: center">
                                    没有数据！
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                </asp:GridView>
                <div style="text-align: center;">
                    <asp:Button ID="btnCancle" runat="server" Text="返回" OnClick="btnCancle_Click"></asp:Button>
                </div>
            </asp:Panel>
            <%--详细信息 end--%>
            <div style="line-height: 2px;">
                &nbsp;</div>
        </div>
    </div>
</asp:Content>
