<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="UserQuotaLogList.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Member.UserQuotaLogList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="header" runat="server"></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <dl class="ui-tabs">
        <dt><a href="javascript:" class="on">借款额度申请列表</a></dt>
        <dt><a href="UserQuotaList.aspx">会员额度列表</a></dt>
        <dd>
            <form action="?action=search" method="get" class="m-search">
                <table class="m-criteria" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th>申请筛选:</th>
                        <td>
                            <input type="hidden" name="from" value="<% =Request.QueryString["from"].HtmlEncode() %>" />
                            <ruson:EnumSelect runat="server" ID="status" TypeName="WAP2P.Member.QuotaLog+ApplyStatus,WAP2P.Member" TipsText="审核状态筛选"></ruson:EnumSelect>
                            <ruson:Select runat="server" ID="type" FillRequestValue="true">
                                <option value="会员账号">会员账号</option>
                                <option value="借款类型">借款类型</option>
                            </ruson:Select>
                            <input type="text" name="key" placeholder="输入搜索条件" value="<% =Request.QueryString["key"].UrlEncode() %>" class="w250" />
                            <span class="ml20 js-inlinesubmit">
                                <input type="submit" class="btn-base c-priority iconfont" value="&#xe60f; 搜索" /><input type="reset" class="btn-base c-normal iconfont" value="&#xe670; 清空条件" /></span>
                        </td>
                    </tr>
                </table>
            </form>
            <div class="m-content">
                <div class="m-oper">
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员额度管理" Operate="删除调额申请">
                        <input type="button" class="oper-clear btn-smaller c-normal selall iconfont" value="&#xe612; 全选" />
                        <input type="button" class="oper-clear btn-smaller c-normal selreverse iconfont" value="&#xe644; 反选" />
                        <input type="button" class="oper-clear btn-smaller c-important delsel iconfont" value="&#xe611; 删除选中" />
                    </ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员额度管理" Operate="处理调额申请">
                        <span class="js-autoload">
	                        <span class="ui-checkbox"><label><input type="checkbox" class="js-refresh" /> 自动刷新</label></span>
                            <span class="ui-checkbox g-hide mr10"><label><input type="checkbox" data-autoload-char="xe642; 处理" data-autoload-alert="有待处理项" /> 有待处理项时弹通知</label></span>
                        </span> 
                    </ruson:PermissionSpace>
                </div>
                <table class="m-list" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th width="3%">选取</th>
                        <th width="10%" class="g-fleft">会员账号</th>
                        <th width="10%">借款类型</th>
                        <th width="10%">现有额度</th>
                        <th width="10%">申请变更额度</th>
                        <th width="10%">变更后额度</th>
                        <th width="20%" class="g-fleft">申请备注</th>
                        <th width="10%">到期时间</th>
                        <th width="6%">状态</th>
                        <th width="11%">操作</th>
                    </tr>
                </table>
            </div>
        </dd>
    </dl>
</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="rptList" ItemType="WAP2P.Member.QuotaLog">
        <ItemTemplate>
            <tr id="tr<%# Item.Id %>">
                <td><%# Item.Status == WAP2P.Member.QuotaLog.ApplyStatus.Success || Item.Status == WAP2P.Member.QuotaLog.ApplyStatus.PartSuccess ? string.Empty : string.Format("<input type=\"checkbox\" class=\"del\" data-id=\"{0}\" />", Item.Id) %></td>
                <td class="g-fbold g-fleft"><%# GetUserDisplay(Item.UserId, Item.UserName) %></td>
                <td><%# Item.BorrowTypeName %></td>
                <td><%# Item.QuotaOld.ToMoneyString() %> 元</td>
                <td><%# Item.ApplyAmount.ToMoneyString() %> 元</td>
                <td><%# Item.PassAmount.HasValue ? Item.PassAmount.ToMoneyString() + " 元" : "等待审核中" %> </td>
                <td class="g-fleft"><%# Item.ApplyRemark.BrEncode().LeftX(40) %></td>
                <td class="<%# Item.Expires == null || Item.Expires.Value > DateTime.Now ? "fcred-3" : "fcgery-3" %>"><%# Item.Expires.ToDateString("长期") %></td>
                <td class=<%# GetStatusStyle(Item.Status) %>><%# Item.Status.GetDescription() %></td>
                <td>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员额度管理" Operate="处理调额申请">
                        <%# Item.Status == WAP2P.Member.QuotaLog.ApplyStatus.Wait ? string.Format(@"<a class=""iconfont oper edit"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('额度调整申请处理', 'UserQuotaLogDetail.aspx?ID={0}');"">&#xe642; 处理</a>",Item.Id) : ""%>
                    </ruson:PermissionSpace>                    
                    <%# Item.Status != WAP2P.Member.QuotaLog.ApplyStatus.Wait ? string.Format(@"<a class=""iconfont oper"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('会员额度记录查看', 'UserQuotaLogDetail.aspx?ID={0}&op=view');"">&#xe655; 查看记录</a>", Item.Id) : string.Empty %>                    
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员额度管理" Operate="删除调额申请">
                        <%# Item.Status == WAP2P.Member.QuotaLog.ApplyStatus.Success || Item.Status == WAP2P.Member.QuotaLog.ApplyStatus.PartSuccess ? string.Empty : string.Format("<a class=\"iconfont del\" href=\"UserQuotaLogDetail.aspx?ID={0}&action=del\">&#xe642; 删除</a>", Item.Id) %>                        
                    </ruson:PermissionSpace>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="10" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="10">
            <ruson:Pager runat="server" ID="pages" CssClass="pages" />
            <a href="<% =Request.RawUrl %>" class="g-hide"></a>
        </td>
    </tr>
</asp:Content>
