<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="UserAccountList.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Account.UserAccountList" %>

<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>
                            <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>
                            </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>
                </table>
            </form>
            <form action="" method="post" id="js-formEdit">
                <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="导出EXCEL">
                            <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 edit iconfont" id="js-eidt" data-function="会员账户管理" data-operate="批量资金操作" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="x 批量资金操作" />
                        </ruson:PermissionSpace>
                        <ruson:PermissionSpace runat="server" Module="资金管理" Function="会员账户管理" Operate="导出EXCEL">
                            <input type="button" class="oper-clear btn-smaller c-obvious excel iconfont" data-function="会员账户管理" data-operate="导出EXCEL" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="&#xe61f; 导出EXCEL" />
                        </ruson:PermissionSpace>
                    </div>
                    <table class="m-list" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <th width="3%">选取</th>
                            <th width="4%">编号</th>
                            <th width="7%">会员类型</th>
                            <th width="7%">会员组</th>
                            <th width="16%" class="g-fleft">会员账号</th>
                            <th width="7%" class="g-fleft">线上账户</th>
                            <th width="7%" class="g-fleft">线下账户</th>
                            <th width="7%" class="g-fleft">回款账户</th>
                            <th width="7%" class="g-fleft">借款账户</th>
                            <th width="7%" class="g-fleft">奖励账户</th>
                            <th width="7%" class="g-fleft">可用总额</th>
                            <th width="7%" class="g-fleft">冻结总额</th>
                            <th width="7%" class="g-fleft">锁定总额</th>
                            <th width="3%">状态</th>
                            <th width="4%">操作</th>
                        </tr>
                    </table>
                </div>
            </form>
        </dd>
    </dl>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script type="text/javascript">
        $(function () {
            $('#js-eidt').click(function () {
                var tip = $(this).attr('data-freemes') || '本功能仅供正式版使用。';
                var func = $(this).attr('data-function');
                var operate = $(this).attr('data-operate');

                freeLimit(tip, func, operate);
            });
        });
    </script>
</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 %>" /><input type="hidden" name="hid_<%# Item.Id %>" value="<%# Item.Id %>" /></td>
                <td><%# Item.Id %></td>
                <td><%# UserType.LoadOrNew(Item.UserTypeId).Name %></td>
                <td><%# (Item.GetGroup() ?? new WAP2P.Sys.UserGroup()).Name %></td>
                <td class="g-fbold g-fleft"><%# GetUserDisplay(Item.Id, Item.Name) %></td>
                <td class="g-fleft"><span class="js-edit" id="<%# "online"+Item.Id %>"><%# account.OnlineAccount.ToMoneyString() %></span> 元</td>
                <td class="g-fleft"><span class="js-edit" id="<%# "offline"+Item.Id %>"><%# account.OfflineAccount.ToMoneyString() %></span> 元</td>
                <td class="g-fleft"><span class="js-edit" id="<%# "receive"+Item.Id %>"><%# account.ReceiveAccount.ToMoneyString() %></span> 元</td>
                <td class="g-fleft"><span class="js-edit" id="<%# "loan"+Item.Id %>"><%# account.LoanAccount.ToMoneyString() %></span> 元</td>
                <td class="g-fleft"><span class="js-edit" id="<%# "reward"+Item.Id %>"><%# account.RewardAccount.ToMoneyString() %></span> 元</td>
                <td class="g-fleft g-fbold <%# account.AvaliableSum > 0 ?"fcred-3": account.AvaliableSum < 0 ? "fcgreen-3" : "" %> "><%# account.AvaliableSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><%# account.HoldSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><%# account.LockSum.ToMoneyString() %> 元</td>
                <td><%# account.LockSum > 0 ? "<i class='iconfont fs22 fcred-3'>&#xe601;</i>" : "<i class='iconfont fs22 fcjade-1'>&#xe618;</i>" %></td>
                <td>
                    <ruson:PermissionSpace runat="server" Module="资金管理" Function="会员账户管理">
                        <a class="iconfont oper edit" href="javascript:void(0);" onclick="$.jPopupEdit('会员账户详情', 'UserAccountDetail.aspx?ID=<%# Item.Id %>');">&#xe642; 详情</a>
                    </ruson:PermissionSpace>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="15" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
        <FooterTemplate>
            <tr class="js-sum">
                <td colspan="5">账户总计</td>
                <td class="g-fleft"><% =onlineSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =offlineSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =receiveSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =loanSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =rewardSum.ToMoneyString() %> 元</td>
                <td class="g-fleft fcred-2"><% =avliabeSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =hodSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =lockSum.ToMoneyString() %> 元</td>
                <td colspan="2"></td>
            </tr>
        </FooterTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="15">
            <ruson:Pager runat="server" ID="pages" CssClass="pages" />
            <a href="<% =Request.RawUrl %>" class="g-hide"></a></td>
    </tr>
    <script type="text/html" class="js-run">          
        $('#js-eidt').val('x 批量资金操作');
    </script>
</asp:Content>
