<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserPageMaster.master" CodeBehind="BankDetail.aspx.cs" Inherits="WAP2P.Web.PC.User.Account.BankDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="m-container g-zindexmin g-ohide mt20 mb20 m-globalbox m-wholebox">
        <div class="m-title">
            <a href="BankList<% =PageBase.PageExt %>" class="g-right fs14 "><< 返回银行卡列表</a>
            <span><i class="iconfont fs30">&#xe629;</i>  添加银行卡</span>
        </div>
        <div class="form-big ml204">
            <form class="js-auto js-vtip" method="post" action="<% =Request.RawUrl.UrlEncodeParam() %>" data-onsuccess="location.href = 'BankList<% =PageBase.PageExt %>';">
                <div class="input-big mt50">
                    <label class="leftfont">开户人姓名</label>
                    <span class="fcblue-3 fs16"><%= CurrentUser.RealName %></span>
                </div>
                <div class="input-big">
                    <label class="leftfont">银行卡号</label>
                    <input type="text" id="cardNo" name="cardNo" maxlength="23" class="text w332 ui-int" placeholder="请输入您的银行卡号"  data-vtype="must" data-vmsg="请输入银行卡号" value="<%= bankCard.CardNo.HtmlEncode() %>" onkeypress="cardSplit();" />
                    <span class="prompt">该银行卡开户姓名必须与您的认证名称相同，否则会提现失败！</span>
                </div>
                <div class="input-big">
                    <label class="leftfont">选择银行</label>
                    <ruson:Select runat="server" ID="bankName" data-vtype="must" data-vmsg="请选择银行" TipsText="请选择" FillRequestValue="true"></ruson:Select>                    
                </div>
                <div class="input-big">
                    <label class="leftfont">开户所在地</label>
                    <span id="area" class="m-area"></span>
                    <input type="text" class="text w332 mt10 g-block ml99" name="branch" placeholder="请输入开户支行名称" data-vtype="must" data-vmsg="请输入开户支行" value="<%= bankCard.Branch.HtmlEncode() %>" />
                </div>
                <input type="hidden" name="phone" id="phone" value="<%= CurrentUser.Phone.HtmlEncode() %>" />
                <div class="input-big js-tip js-sendvcode" data-vcode-target="#phone">
                    <label class="leftfont">手机验证码</label>
                    <input type="text" name="validCode" class="text js-sendvcode-code" size="20" placeholder="请输入您收到的验证码" disabled="disabled" maxlength="6" data-vtype="length|fun" data-vfun="validPhoneCode" data-vmin="6" data-vmax="6" data-vmsg="请输入正确的验证码。|验证码不正确。" />
                    <input type="button" class="btn-nobordbig c-normal js-sendvcode-btn" value="发送验证码" />
                </div>                
                <div class="btn-submits mt20 ml99">
                    <input type="submit" value="确定提交" class="btn-bbord fs16 c-normal w366" data-success-text="提交成功" />
                    <div class="w366"><em class="m-sumtip js-vsum"></em></div>
                </div>
            </form>
        </div>    
    </div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script src="<% =this.ImportJsCss("../../res/core/scripts/areadata.js") %>"></script>
    <script>
        var msg = '<% =CurrentUser.IsBaseValided().Message %>';        
        if(msg){
            $.jError('请通过' + msg + '验证后再操作。', '错误', 300, function () { history.back(); });
        }
        var cardSplit = function() {
            if ($('#cardNo').val().length >= 4) {
                $('#cardNo').val($('#cardNo').val().replace(/(\d{4})(?=\d)/g, '$1 '));
            }
        };

        $('#area').cascade({ data: areadata, names: ['provinceId', 'cityId', 'areaId'], values: [<% =bankCard.ProvinceId %>, <% =bankCard.CityId %>, <% =bankCard.AreaId %>], emptyTip: '请选择', ismust: true });
        
        function validPhoneCode(val) {
            return common.sendValidCode.valid($('#phone').val(), val);
        };
        common.sendValidCode.initInput();
    </script>
</asp:Content>
