<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="BorrowInfoList.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Member.BorrowInfoList" %>
<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>
        <dd>
            <form action="?action=search" method="get" class="m-search">
                <table class="m-criteria" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th>资料筛选:</th>
                        <td>                            
                            <ruson:Select runat="server" ID="borrowInfoType" FillRequestValue="true" TipsText="全部资料类型">
                            </ruson:Select>
                            <ruson:Select runat="server" ID="type" FillRequestValue="true">
                                <option value="资料名称">资料名称</option>
                                <option value="会员账号">会员账号</option>                                
                            </ruson:Select>
                            <input type="text" size="35" name="key" value="<% =Request.QueryString["key"].HtmlEncode() %>" />
                            <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>
                    <tr class="g-hide">
                        <th>状态筛选:</th>
                        <td>
                            <div class="ui-radio" id="js-status">
                                <label><input type="radio" name="status" value="" checked="checked" />全部</label><label><input type="radio" name="status" value="99" />待授额</label><ruson:EnumInput runat="server" ID="status" Type="Radio" TypeName="WAP2P.Member.BorrowInfo+ValidStatus, WAP2P.Member"></ruson:EnumInput>
                            </div>
                        </td>
                    </tr>
                    <tr class="g-hide">
                        <th></th>
                        <td>
                            <input type="submit" class="btn-base c-priority iconfont" value="&#xe60f; 搜索" /><input type="reset" class="btn-base c-normal iconfont" value="&#xe670; 清空条件" />
                        </td>
                    </tr>
                </table>
                <a href="javascript:void(0);" id="btnSwithMoreFilter" class="iconfont"><span>&#xe661; 显示更多筛选条件</span></a>
            </form>
            <div class="m-content">
                <div class="m-oper">
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="新建">
                        <input type="button" class="oper-clear btn-larger c-priority iconfont" value="&#xe67a; 新建借款资料" onclick="$.jPopupEdit('新建借款资料', 'BorrowInfoDetail.aspx');" /></ruson:PermissionSpace>
                    <span class="iconfont"><i class="fs22 fcyellow-1">&#xe61c;</i>待审核/待授额<i class="fs22 fcred-3">&#xe680;</i>审核失败<i class="fs22 fcjade-1">&#xe614;</i>审核成功</span>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="审核|授额">
                        <span class="js-autoload">
	                        <span class="ui-checkbox"><label><input type="checkbox" class="js-refresh" data-function="会员借款资料管理" data-operate="自动刷新" data-freemes="<% =FreeLimit.ActionLimitMes %>" /> 自动刷新</label></span>
                            <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="审核"><span class="ui-checkbox g-hide mr10"><label><input type="checkbox" data-autoload-char="xe60e; 审核" data-autoload-alert="有待审核项" /> 有待审核项时弹通知</label></span></ruson:PermissionSpace>
                            <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="授额"><span class="ui-checkbox g-hide mr10"><label><input type="checkbox" data-autoload-char="xe60e; 授额" data-autoload-alert="有待授额项" /> 有待授额项时弹通知</label></span></ruson:PermissionSpace>
                        </span>
                    </ruson:PermissionSpace>
                </div>
                <table class="m-list" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th width="15%" class="g-fleft">会员账号</th>
                        <th width="15%">资料所属分类</th>
                        <th width="35%" class="g-fleft">资料名称</th>
                        <th width="10%">有效期</th>
                        <th width="10%">状态</th>
                        <th width="15%">操作</th>
                    </tr>
                </table>
            </div>
        </dd>
    </dl>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script>$('#js-status [value="<% =Request.QueryString["status"] %>"]').trigger('click');</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
    <ruson:Repater runat="server" ID="rptList" ItemType="WAP2P.Member.BorrowInfo">
        <ItemTemplate>
            <tr id="tr<%# Item.Id %>">
                <td class="g-fbold g-fleft"><%# GetUserDisplay(Item.UserId, Item.UserName) %></td>
                <td><%# BorrowInfoType.LoadOrNew(Item.BorrowInfoTypeId).Name %></td>
                <td class="g-fleft"><%# Item.Name %></td>
                <td><%# Item.Expires.ToDateTimeString("长期") %></td>
                <td class="iconfont"><%# GetStatus(Item.Status) %></td>
                <td>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="修改"><%# Item.Status == WAP2P.Member.BorrowInfo.ValidStatus.ValidSuccess ? string.Empty : string.Format(@"<a class=""iconfont oper"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('会员借款资料编辑', 'BorrowInfoDetail.aspx?ID={0}');"">&#xe627; 编辑</a>", Item.Id) %></ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="查看资料"><%# string.Format(@"<a class=""iconfont oper"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('会员借款资料查看', 'BorrowInfoDetail.aspx?ID={0}&action=view');"">&#xe655; 查看资料</a>", Item.Id) %></ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="导出PDF"><%# Item.Status == WAP2P.Member.BorrowInfo.ValidStatus.ValidSuccess ? string.Format(@"<a class=""iconfont oper"" href=""BorrowInfoDetail.aspx?ID={0}&action=pdf"">&#xe620; 导出PDF</a>", Item.Id) : string.Empty %></ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="审核"><%# Item.Status == WAP2P.Member.BorrowInfo.ValidStatus.Submit ? string.Format(@"<a class=""iconfont oper fcjade-2"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('会员借款资料审核', 'BorrowInfoDetail.aspx?ID={0}&action=valid');"">&#xe60e; 审核</a>", Item.Id) : string.Empty %></ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员借款资料管理" Operate="授额"><%# Item.Status == WAP2P.Member.BorrowInfo.ValidStatus.Quota ? string.Format(@"<a class=""iconfont oper fcjade-2"" href=""javascript:void(0);"" onclick=""$.jPopupEdit('会员借款资料授额', 'BorrowInfoDetail.aspx?ID={0}&action=quota');"">&#xe60e; 授额</a>", Item.Id) : string.Empty %></ruson:PermissionSpace>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="6" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="6">
            <ruson:Pager runat="server" ID="pages" CssClass="pages" />
            <a href="<% =Request.RawUrl %>" class="g-hide"></a>
        </td>
    </tr>
</asp:Content>
