<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserMaster.master" CodeBehind="QuotaApply.aspx.cs" Inherits="WAP2P.Web.PC.User.Borrow.QuotaApply" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="m-userbox">
        <dl class="ui-tab">
            <dt><a href="<%= string.IsNullOrEmpty(type) ? "javascript:void(0);" : "QuotaApply" + PageExt %>" <%= string.IsNullOrEmpty(type) ? " class=\"on\"" : string.Empty %>>额度申请</a></dt>
            <dt><a href=" <%= !string.IsNullOrEmpty(type) ? "javascript:void(0);" : "?type=history" %>" <%= !string.IsNullOrEmpty(type) ? " class=\"on\"" : string.Empty %>>申请历史记录</a></dt>
            <ruson:Space runat="server" ID="quotaApply" Visible="false">
                <dd>
                    <div class="form-big g-ohide">
                        <form class="js-auto js-vtip" method="post" data-onsuccess="common.pageTip('<% =PageBase.TipType.Success %>', '额度申请提交成功，请耐心等待审核。', '/User/Borrow/QuotaApply'+ gconfig.pageExt +'?type=history', '额度申请记录');">
                            <dl class="m-quotalist mt20">
                                <dt>当前额度情况</dt>
                                <ruson:Repater runat="server" ID="amountDetail" ItemType="WAP2P.Sys.BorrowType">
                                    <ItemTemplate>
                                        <dd>
                                            <table class="quotalist-box <%# canUseQuota == 0 ? "quotalist-warning" : canUseQuota > 0 ? "quotalist-success" : "quotalist-error"%> ">
                                                <tr>
                                                    <th rowspan="2"><%# Item.Name %>：</th>
                                                    <td>总额度 <span class="g-fbold fs14"><%# maxQuota.ToMoneyString() %></span> 元</td>
                                                </tr>
                                                <tr>
                                                    <td>可使用 <span class="fs14"><%# canUseQuota.ToMoneyString() %></span> 元</td>
                                                </tr>
                                            </table>
                                        </dd>
                                    </ItemTemplate>
                                </ruson:Repater>
                            </dl>
                            <div class="input-big mt20 ml150">
                                <label class="leftfont">借款类型</label>
                                <ruson:Select runat="server" ID="borrowTypeId"></ruson:Select>
                            </div>
                            <div class="input-big ml150">
                                <label class="leftfont">申请额度</label>
                                <input type="text" class="text input-moneyicon" placeholder="请输入您要调整的额度" name="applyAmount" data-vtype="number" data-vmsg="额度必须为数字" />
                            </div>
                            <div class="input-big ml150 g-ohide">
                                <label class="leftfont g-left">申请备注</label>
                                <textarea rows="5" class="w230 g-left ml5" placeholder="请输入您调额的相关说明" name="applyRemark" data-vtype="must" data-vmsg="请填写申请备注"></textarea>
                            </div>                            
                            <div class="btn-submits mt20 ml249">
                                <input type="submit" value="提 交" class="btn-bbord fs16 c-normal w252" data-success-text="提交成功" />
                                <div class="w252"><em class="m-sumtip js-vsum"></em></div>
                            </div>
                        </form>
                    </div>
                </dd>
            </ruson:Space>
            <ruson:Space runat="server" ID="applyHistory" Visible="false">
                <dd>
                    <form action="?action=search" method="get" class="search">
                        <table class="table-normal mt20  js-ajaxlist">
                            <tr>
                                <th style="width: 20%;">借款类型</th>
                                <th style="width: 15%;">申请额度</th>
                                <th style="width: 15%;">获得额度</th>
                                <th style="width: 25%;">申请备注</th>
                                <th style="width: 10%;">状态</th>
                                <th style="width: 15%;">申请时间</th>
                            </tr>
                        </table>
                    </form>
                </dd>
            </ruson:Space>
        </dl>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
    <ruson:Repater runat="server" ID="rptHistoryList" ItemType="WAP2P.Member.QuotaLog">
        <ItemTemplate>
            <tr>
                <td><%# Item.BorrowTypeName %></td>
                <td class="fcred-3"><%# Item.ApplyAmount.ToMoneyString() %> 元</td>
                <td><%# Item.PassAmount.ToMoneyString("0") %> 元</td>
                <td class="g-fleft" title="<%# Item.ApplyRemark.HtmlEncode() %>"><%# Item.ApplyRemark.BrEncode().LeftX(12) %></td>
                <td><%# Item.Status.GetDescription() %></td>
                <td><%# Item.CreateAt.ToDateTimeString() %></td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="6" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="6">
            <div class="ui-pages g-fright">
                <ruson:Pager runat="server" ID="pages" CssClass="pages" />
                <a href="<% =Request.RawUrl %>" class="g-hide"></a>
            </div>
        </td>
    </tr>
</asp:Content>
