<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('账户信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-account-edit">
            <input id="perId" name="perId" th:value="${perWalletAccount.perId}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label is-required">钱包账户名：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.name}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label is-required">钱包账户号：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.walletAccountNo}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label is-required">账户状态：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.accountStatus}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">账户总额：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.totalAmount}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">可用金额：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.availableAmount}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">冻结金额：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.frozenAmount}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结算卡银行名称：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.bankName}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结算卡银行卡号：</label>
                <div class="col-sm-8">
                    <input th:value="${perWalletAccount.bankCardNo}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">绑定手机号：</label>
                <div class="col-sm-8">
                    <input id="mobilePhone" name="mobilePhone" th:value="${perWalletAccount.mobilePhone}" class="form-control" type="text" required>
                </div>
            </div>
    	</form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
	    var prefix = ctx + "manage/per-wallet";
	    
	    $("#form-account-edit").validate({
	    	onkeyup: false,
	        rules: {
                mobilePhone: {
                    required: true,
                    isPhone: true
                },
	        },
	        messages: {
                mobilePhone: {
                    required: icon + "手机号码不能为空",
                    isPhone: icon + "请输入正确的手机号码"
                }
	        },
            focusCleanup: true
	    });
	    
	    function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/bind-bank-card", $('#form-account-edit').serialize());
	        }
	    }
    </script>
</body>
</html>
