<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="UserList.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Member.UserList" %>
<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>
                            <input type="hidden" name="from" value="<% =Request.QueryString["from"].HtmlEncode() %>" />
                            <select id="groupId" name="groupId">
                                <option value="">全部会员类型</option>
                                <asp:Repeater runat="server" ID="rptGroupSelect">
                                    <ItemTemplate>
                                        <option value="<%# Eval("Item1") %>"<%# Request.QueryString["groupId"] == (string)Eval("Item1") ? " selected=\"selected\"" : string.Empty %>><%# Eval("Item2") %></option>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </select>
                            <ruson:Select runat="server" ID="type" FillRequestValue="true">
                                <option value="会员账号">会员账号</option>
                                <option value="会员昵称">会员昵称</option>
                                <option value="注册手机">注册手机</option>
                                <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>
                            <ruson:Select runat="server" ID="gradeLevel" TipsText="全部风险等级"></ruson:Select>
                            <ruson:Select runat="server" ID="belongType" FillRequestValue="true">
                                <option value="业务员">所属业务员</option>
                                <option value="客服">所属客服</option>
                                <option value="推荐人">所属推荐人</option>                                
                            </ruson:Select>
                            <input type="text" size="35" name="belongKey" value="<% =Request.QueryString["belongKey"].HtmlEncode() %>" />
                        </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">
                    <span  class="iconfont"><i class="fs22 fcred-3">&#xe601;</i>账户锁定<i class="fs22 fcjade-1">&#xe618;</i>账户开启</span>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员账号管理" Operate="新建">
                        <input type="button" class="oper-clear btn-larger c-priority iconfont" value="&#xe67a; 新建会员" onclick="$.jPopupEdit('新建会员', 'UserDetail.aspx');" />
                    </ruson:PermissionSpace>
                    <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; 反选" />
                    </ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员账号管理" Operate="删除">
                        <input type="button" class="oper-clear btn-smaller c-important delsel iconfont" data-function="会员账号管理" data-operate="批量删除" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="&#xe611; 删除选中" />
                    </ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员账号管理" Operate="修改">
                        <input type="button" class="oper-clear btn-smaller c-obvious iconfont" data-action="change" data-function="会员账号管理" data-operate="批量修改" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="&#xe683; 批量开通/关闭" />
                    </ruson:PermissionSpace>
                   
                </div>
                <table class="m-list" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th width="3%">选取</th>
                        <th width="4%">编号</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%">注册邮箱</th>
                        <th width="10%">昵称</th>
                        <th width="3%">状态</th>
                        <th width="10%">操作</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.User">
        <ItemTemplate>
            <tr id="tr<%# Item.Id %>">
                <td><input type="checkbox" class="del" data-id="<%# Item.Id %>"/></td>
                <td><%# Item.Id %></td>
                <td class="g-fbold g-fleft"><%# GetUserDisplay(Item.Id, Item.Name) %></td>    
                <td><%# UserType.LoadOrNew(Item.UserTypeId).Name %></td>
                <td><%# Item.GradeLevel.GetDescription() %></td>
                <td><%# (Item.GetGroup() ?? new WAP2P.Sys.UserGroup()).Name %></td>    
                <td><%# CurrentAdmin.HavePermission("会员管理", "查看联系方式", "手机") ? Item.Phone : Item.Phone.HidePart() %></td>
                <td class="g-fleft"><%# CurrentAdmin.HavePermission("会员管理", "查看联系方式", "邮箱") ? Item.Email : Item.Email.HidePart() %></td>
                <td class="g-fleft"><%# Item.Nickname %></td>
                <td><%# Item.IsLock ? "<i class='iconfont fs22 fcred-3'>&#xe601;</i>" : "<i class='iconfont fs22 fcjade-1'>&#xe618;</i>" %></td>
                <td>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员账号管理" Operate="修改"><a class="iconfont oper edit" href="javascript:void(0);" onclick="$.jPopupEdit('编辑会员账号', 'UserDetail.aspx?ID=<%# Item.Id %>');">&#xe642; 编辑</a></ruson:PermissionSpace>
                    <ruson:PermissionSpace runat="server" Module="会员管理" Function="会员账号管理" Operate="删除"><a class="iconfont del" href="UserDetail.aspx?ID=<%# Item.Id %>&action=del">&#xe611; 删除</a></ruson:PermissionSpace>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="11" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="11"><ruson:Pager runat="server" ID="pages" CssClass="pages" /><a href="<% =Request.RawUrl %>" class="g-hide"></a></td>
    </tr>
</asp:Content>