<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="CashApplyList.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Account.CashApplyList" %>
<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"><%= statusType =="apply" ? "提现申请列表" : "提现放款列表" %></a></dt>        
        <dd>
             <form action="?action=search&statusType=<%= Request.QueryString["statusType"] %>" method="get" class="m-search">
                <table class="m-criteria" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th>充值记录筛选：</th>
                        <td>
                            <% if (statusType == "processing") { %> 
                                <select name="status">
                                    <option value="">全部状态</option>
                                    <option value="<% =(int)WAP2P.Account.CashApply.CashApplyStatusType.WaitPay %>"><% =WAP2P.Account.CashApply.CashApplyStatusType.WaitPay.GetDescription() %></option>
                                    <option value="<% =(int)WAP2P.Account.CashApply.CashApplyStatusType.WaitBank %>"><% =WAP2P.Account.CashApply.CashApplyStatusType.WaitBank.GetDescription() %></option>
                                    <option value="<% =(int)WAP2P.Account.CashApply.CashApplyStatusType.Success %>"><% =WAP2P.Account.CashApply.CashApplyStatusType.Success.GetDescription() %></option>
                                    <option value="<% =(int)WAP2P.Account.CashApply.CashApplyStatusType.PayFailure %>"><% =WAP2P.Account.CashApply.CashApplyStatusType.PayFailure.GetDescription() %></option>
                                </select>
                            <% } %>
                            <input type="hidden" name="from" value="<% =Request.QueryString["from"].HtmlEncode() %>" />
                            <ruson:Select runat="server" ID="type" FillRequestValue="true">
                                <option value="会员账号">会员账号</option>
                                <option value="提现银行">提现银行</option>
                            </ruson:Select>
                            <input type="text" size="35" placeholder="输入搜索条件" 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><input type="text" name="startAt" id="startAt" value="<% =Request.QueryString["startAt"].UrlEncode() %>" class="ui-date w150" data-maxdate="#endAt" /> 至 <input type="text" name="endAt" id="endAt" value="<% =Request.QueryString["endAt"].UrlEncode() %>" class="ui-date w150" data-mindate="#startAt" /></td>
                    </tr>
                    <tr class="g-hide">
                        <th>提现金额筛选：</th>
                        <td><input type="text" name="startMoney" id="startMoney" value="<% =Request.QueryString["startMoney"].UrlEncode() %>" class="w150" /> 至 <input type="text" name="endMoney" id="endMoney" value="<% =Request.QueryString["endMoney"].UrlEncode() %>" class="w150" /></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">
                    <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; 反选" />
                    <% if(statusType == "apply") { %>
                    <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现申请处理" Operate="审核">
                        <input type="button" class="oper-clear btn-smaller c-obvious iconfont" data-action="valid" data-function="提现申请处理" data-operate="批量审核" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="&#xe642; 批量审核" />
                    </ruson:PermissionSpace><% } %>
                    <% if (statusType == "processing") { %>
                    <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现放款处理" Operate="放款">
                        <input type="button" class="oper-clear btn-smaller c-obvious iconfont" data-action="loan" data-function="提现放款处理" data-operate="批量放款" data-freemes="<% =FreeLimit.ActionLimitMes %>" value="&#xe642; 批量放款" />
                    </ruson:PermissionSpace><% } %>
                    <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>
                            <% if(statusType == "apply") { %><ruson:PermissionSpace runat="server" Module="资金管理" Function="提现申请处理" Operate="审核"><span class="ui-checkbox g-hide mr10"><label><input type="checkbox" data-autoload-char="xe642; 审核" data-autoload-alert="有待审核项" /> 有待审核项时弹通知</label></span></ruson:PermissionSpace><% } %>
                            <% if (statusType == "processing")
                               { %><ruson:PermissionSpace runat="server" Module="资金管理" Function="提现申请处理" Operate="放款"><span class="ui-checkbox g-hide mr10"><label><input type="checkbox" data-autoload-char="xe642; 放款" data-autoload-alert="有待放款项" /> 有待放款项时弹通知</label></span></ruson:PermissionSpace><% } %>
                        </span>                        
                    </ruson:PermissionSpace>
                </div>
                <table class="m-list" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th width="5%">选取</th>
                        <th width="12%">会员账号</th>
                        <th width="13%">提现银行</th>
                        <th width="20%">提现账号</th>                        
                        <th width="10%">提现金额</th>
                        <th width="5%">提现手续费</th>
                        <th width="10%">申请时间</th>
                        <th width="5%">到账周期</th>
                        <th width="10%">状态</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.Account.CashApply">
        <ItemTemplate>
            <tr id="tr<%# Item.Id %>">
                <td><%# Item.Status == WAP2P.Account.CashApply.CashApplyStatusType.WaitPay || Item.Status == WAP2P.Account.CashApply.CashApplyStatusType.Waiting ? string.Format(" <input type=\"checkbox\" class=\"del\" data-id=\"{0}\">", Item.Id) : string.Empty %></td>
                <td class="g-fbold"><%# GetUserDisplay(Item.UserId, Item.UserName) %></td>
                <td><%# Item.BankName %></td>
                <td><%# Item.CardNo %></td>
                <td><%# Item.Amount.ToMoneyString() %> 元</td>
                <td><%# Item.Fee.ToMoneyString() %> 元</td>
                <td><%# Item.CreateAt.ToDateTimeString() %></td>
                <td><%# Item.ExtractionCashTime.GetDescription() %></td>
                <td><%# Item.Status.GetDescription() %></td>
                <td>
                    <%if (statusType == "apply"){ %>
                        <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现申请处理" Operate="审核"><%# Item.Status == WAP2P.Account.CashApply.CashApplyStatusType.Waiting ? string.Format("<a class=\"iconfont oper fcjade-2\" href=\"javascript:void(0);\" onclick=\"$.jPopupEdit('{0}', 'CashApplyDeatil.aspx?ID={1}&statusType={2}&op=valid');\">&#xe642; 审核</a>", "提现审核", Item.Id, Request.QueryString["statusType"]) : string.Empty %></ruson:PermissionSpace>
                        <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现申请处理" Operate="查看详情"><%# Item.Status != WAP2P.Account.CashApply.CashApplyStatusType.Waiting ? string.Format("<a class=\"iconfont oper\" href=\"javascript:void(0);\" onclick=\"$.jPopupEdit('{0}', 'CashApplyDeatil.aspx?ID={1}&statusType={2}&op=view');\">&#xe642; 查看详情</a>", "提现申请详情", Item.Id, Request.QueryString["statusType"]) : string.Empty %></ruson:PermissionSpace>
                    <%}else{%>
                        <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现放款处理" Operate="放款"><%# Item.Status == WAP2P.Account.CashApply.CashApplyStatusType.WaitPay ? string.Format("<a class=\"iconfont oper\" href=\"javascript:void(0);\" onclick=\"$.jPopupEdit('{0}', 'CashApplyDeatil.aspx?ID={1}&statusType={2}&op=valid');\">&#xe642; 放款</a>","提现放款",Item.Id,Request.QueryString["statusType"]) : string.Empty %></ruson:PermissionSpace>
                        <ruson:PermissionSpace runat="server" Module="资金管理" Function="提现放款处理" Operate="查看详情"><%# Item.Status != WAP2P.Account.CashApply.CashApplyStatusType.WaitPay ? string.Format("<a class=\"iconfont oper\" href=\"javascript:void(0);\" onclick=\"$.jPopupEdit('{0}', 'CashApplyDeatil.aspx?ID={1}&statusType={2}&op=view');\">&#xe642; 查看详情</a>","提现放款详情",Item.Id,Request.QueryString["statusType"]) : string.Empty %></ruson:PermissionSpace>
                    <%} %>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="10" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
        <FooterTemplate>
            <tr class="js-sum">
                <td colspan="4" class="g-fright">总计</td>
                <td class="g-fleft"><% =amountSum.ToMoneyString() %> 元</td>
                <td class="g-fleft"><% =feeSum.ToMoneyString() %> 元</td>
                <td colspan="4"></td>                
            </tr>
        </FooterTemplate>
    </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>
