<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="renderer" content="webkit">
    <!-- 移动设备 viewport -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <jsp:include page="../../common.jsp"/>
    <style>
        .layui-input, .layui-textarea {
            border-color: #606060;
        }
    </style>
</head>
<body>
<form class="layui-form"  action="" style="width: 80%; margin-top: 20px;margin-left: 150px">
    <div class="w1000 fc" style="background: white">
        <div class=" pd10 textl pl50 pb20 fw800 f16 pb20 bdbe mb20">超级管理商基本信息：</div>
        <input type="hidden" id="userId" name="userId" value="${userApp.userId}"/>
        <div class="clearfix mb20">
            <div class="fl textc wp50">
                <div class="w100 textr  dlblock">超级管理商名称</div>
                <div class="dlblock ml10">
                    <input type="text" placeholder="超级管理商名称"
                           class="bdc w320 pd7 radius5" value="${userApp.userName}"
                           id="userName" name="userName"/>
                </div>
            </div>
        </div>
        <div class=" pd10 textl pl50 pb20 fw800 f16 pb20 bdbe mb20 pt20">
            超级管理商结算信息：<span class="red f12 ml20">注：请保持银行卡信息(证件号码、开户名、卡号、预留手机号)的匹配性</span>
        </div>
        <input type="hidden" id="bankId" name="merchantBankCard.id" value="${mercBankCard.id}"/>
        <div class="clearfix mb20">
            <div class="fl wp50 textc">
                <div class="w100 textr dlblock">银行名称</div>
                <div class="dlblock ml10">
                    <input type="text" placeholder="银行名称"
                           class="bdc w320 pd7 radius5"
                           name="merchantBankCard.bankName" value="${mercBankCard.bankName}"/>
                    <!-- 保存原始用户名 -->
                </div>
            </div>
            <div class="fl wp50 textc" style="background: white">
                <div class="w100 textr dlblock">开户支行名称</div>
                <div class="dlblock ml10 fyellowbg positionr">
                    <input type="text" id="branchName" name="merchantBankCard.branchName"
                           placeholder="开户支行名称 "
                           class="fyellowbg lgray w320 pd7 bdc radius5" autocomplete="off"
                           value="${mercBankCard.branchName}"/>
                </div>
            </div>
        </div>
        <div class="clearfix mb20">
            <div class="fl wp50 textc">
                <div class="w100 textr dlblock">开户名</div>
                <div class="dlblock ml10">
                    <input type="text" placeholder="开户名"
                           class="bdc w320 pd7 radius5" id="updateBankCertName"
                           name="merchantBankCard.bankCertName" value="${mercBankCard.bankCertName}"/>
                </div>
            </div>
            <div class="fl wp50 textc">
                <div class="w100 textr dlblock">证件号码</div>
                <div class="dlblock ml10">
                    <input type="text" placeholder="法人身份证号"
                           class="bdc w320 pd7 radius5" id="updateCertNo"
                           name="merchantBankCard.certNo" value="${mercBankCard.certNo}"/>
                </div>
            </div>
        </div>
        <div class="clearfix mb20">
            <div class="fl wp50 textc">
                <div class="w100 textr dlblock">开户账号</div>
                <div class="dlblock ml10 lgray">
                    <input type="text" placeholder="开户账号"
                           class="bdc w320 pd7 radius5" id="updateBankCardNo"
                           name="merchantBankCard.bankCardNo" value="${mercBankCard.bankCardNo}"/>
                </div>
            </div>
            <div class="fl wp50 textc">
                <div class="w100 textr dlblock">银行预留手机号</div>
                <div class="dlblock ml10 ">
                    <input type="text" placeholder="银行预留手机号码"
                           class="bdc w320 pd7 radius5" id="updatePhone" name="merchantBankCard.phone"
                           value="${mercBankCard.phone}"/>
                </div>
            </div>
        </div>
        <div class="pd10 textl pl50 pb20 fw800 f16 pb20 bdbe mb20 pt20">
            超级管理商证照信息：<span class="red f12 ml20"></span>
        </div>
        <div class="clearfix textc bdbe " id="picContent">
            <ul>
                <li class="fl pt10 pb10 wp33" data-v="01">
                    <div>身份证正面</div>
                    <div class="dlblock upload w200 h200 mt10">
                        <img src="${merchantImage1}"
                             onerror="this.src='${resourcePath }/images/error.jpg'"
                             width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update02' data-v="02">
                    <div>身份证反面</div>
                    <div class="dlblock upload w200 h200 mt10">
                        <img src="${merchantImage2}"
                             onerror="this.src='${resourcePath }/images/error.jpg'"
                             width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update03' data-v="02">
                    <div>营业执照照片</div>
                    <div class="dlblock upload w200 h200 mt10">
                        <img src="${merchantImage3}"
                             onerror="this.src='${resourcePath }/images/error.jpg'"
                             width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update06' data-v="02">
                    <div>门头照</div>
                    <div class="dlblock upload w200 h200 mt10">
                        <img src="${merchantImage6}"
                             onerror="this.src='${resourcePath }/images/error.jpg'"
                             width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update08' data-v="02">
                    <div>收银台照</div>
                    <div class="dlblock upload w200 h200 mt10">
                        <img src="${merchantImage8}"
                             onerror="this.src='${resourcePath }/images/error.jpg'"
                             width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update09' data-v="02">
                    <div>门店内场景照</div>
                    <div class="dlblock upload w200 h200 mt10">
                            <img src="${merchantImage8}"
                                 onerror="this.src='${resourcePath }/images/error.jpg'"
                                 width="200" height="200">
                    </div>
                </li>
                <li class="fl pt10 pb10 wp33" id='update01' data-v="98">
                    <div>银行卡照片</div>
                    <div class="dlblock upload w200 h200 mt10">
                            <img src="${merchantImage98 }"
                                 onerror="this.src='${resourcePath }/images/error.jpg'"
                                 width="200" height="200">
                    </div>
                </li>
            </ul>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="button" id="close" class="layui-btn layui-btn-primary">关闭</button>
            </div>
        </div>
    </div>
</form>

<script type="text/javascript">
    //form表单样式
    layui.use(['form', 'layer'], function () {
        var form = layui.form;
        var layer = layui.layer;

        $('#close').click(function () {
            parent.layer.closeAll();
        });

        form.on('submit(formDemo)', function (data) {
            var index = layer.load(1, {shade: [0.1, '#000']});
            $.ajax({
                url: '${ctx}/agentInfo/saveAgentInfo',
                method: 'post',
                data: data.field,
                dataType: 'JSON',
                success: function (res) {
                    layer.close(index);
                    if (res.code == 200) {
                        layer.alert(res.data, function () {
                            parent.location.reload();
                        })
                    } else {
                        layer.msg(res.message, {
                            icon: 5
                        });
                    }
                }
            })
            return false;
        });
    });
</script>
</body>
</html>



