<%@ page import="com.lightinit.hsdataportal.dictionary.DicUserAuthState" %>
<%@ page language="java" pageEncoding="UTF-8"
         contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String basePath = request.getContextPath();
    String resourcePath = basePath + "/resource";
%>

<!doctype html>
<html>
<head>
    <title>企业基本信息</title>
    <meta charset="utf-8">
    <jsp:include page="../common/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../common/body_header.jsp"></jsp:include>
<jsp:include page="../common/user_center_header.jsp"></jsp:include>

    <div class="user-mid2">
    <div class="xinxi0">
        <div class="user-mid0">
            <div class="if">
                <span onclick="fnBaseInfoId()" id="baseInfoId" class="xx" ><a>基本信息</a></span>
                <span onclick="fnVerifyId()" id="verifyId" class="xx"><a>实名认证</a></span>
                <span onclick="fnPasswordId()" id="passwordId" class="xx"><a>修改密码</a></span>
            </div>
            <div class="clearfix"></div>
            <div class="xx-main" id="fnBaseInfoIdView">
                <table>
                    <tr>
                        <td>账户名：</td>
                        <td>${outputModel.username}</td>
                    </tr>
                    <tr>
                        <td>实名认证：</td>
                        <td>${outputModel.authState}</td>
                    </tr>
                    <tr>
                        <td>APIkey：</td>
                        <td>${outputModel.authKey}</td>
                    </tr>
                    <tr>
                        <td>scretKey：</td>
                        <td style="width:800px;word-wrap : break-word ;word-break: break-all">${outputModel.authSecret}</td>
                    </tr>
                    <tr>
                        <td>手机号码：</td>
                        <td>${outputModel.authPhone}</td>
                    </tr>
                </table>
            </div>
            <div class="xx-main" id="fnVerifyIdView">
                <div class="rz1">
                    <div class="rzfont1">
                        <span class="dian"></span> &nbsp;
                        <a>企业</a>
                    </div>
                </div>
                <div class="rz-neirong0">
                    <div class="rz-neirong11">
                        <div class="rz-font1">企业信息</div>
                        <div class="rz-font2">公司名称：${outputModel.companyName}</div>
                        <div class="rz-font2">公司地址：${outputModel.address}</div>
                        <div class="rz-font2">营业执照编号：${outputModel.commercialInstrument}</div>
                        <div class="rz-font2">税务登记证号：${outputModel.taxRegistrationCertificate}</div>
                        <div class="rz-font2">组织机构编号：${outputModel.orgCode}</div>
                        <div class="rz-font2">分类：${outputModel.serviceCategory}</div>
                        <div class="rz-font2">营业执照副本:
                            <div><img src="${imageContextPath}${outputModel.commercialInstrumentCopy}" alt="营业执照副本" class="yingyezhizhao"></div>
                        </div>
                            <%--<div class="rz-font2">服务商标签</div>--%>
                    </div>
                    <div class="rz-neirong2">
                        <div class="rz-font1">联系人信息</div>
                        <div class="rz-font2">联系人姓名：${outputModel.contact}</div>
                        <div class="rz-font2">联系人身份证号：${outputModel.idCard}</div>
                        <div class="rz-font2">手机号码：${outputModel.authPhone}</div>
                        <div class="rz-font2">公司邮箱：${outputModel.email}</div>
                        <div class="rz-font2">服务商标签：${outputModel.serviceTag}</div>
                    </div>
                </div>
                <div  class="tishi2">${outputModel.authState ==DicUserAuthState.WAITING?'正在认证中。。。。':'认证已通过'}</div>
            </div>
            <div class="xx-main" id="fnPasswordIdView">
                <div class="window1">
                    <div class="top01">
                        <span class="p00">&nbsp;</span>
                    </div>
                    <div class="form11">
                        <form id="changePasswordId" method="post">
                            <div class="form0">
                                <span class="font">
                                    <span class="xinghao" >*</span>旧密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4" name="oldpassword" placeholder="请输入旧密码">
                                    <div class="tishi4"></div>
                                </div>
                            </div>
                            <div class="form0">
                                <span class="font">
                                    <span class="xinghao" >*</span>新密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4" name="newpassword" placeholder="请输入新密码">
                                    <div class="tishi4"></div>
                                </div>
                            </div>
                            <div class="form0">
                                <span class="font01">
                                    <span class="xinghao" >*</span>确认新密码
                                </span>
                                <div class="form1">
                                    <input type="password" class="input4"  name="renewpassword" placeholder="请再次填写新密码">
                                    <div class="tishi4"></div>
                                </div>
                            </div>
                            <div class="form010">
                                注意：密码只能包含数字字母下划线中划线，8到20位
                            </div>
                            <input type="button" class="queren1" value="确认" onclick="fnSubimt()">
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<jsp:include page="../common/body_footer.jsp"></jsp:include>
</body>
<script type="text/javascript">

    //tab页切换
    /*if ($("#type").val() ==1){
        fnApplyData();
    }else{
        fnFollowData();
    }*/
    if(true){
        fnBaseInfoId();
    }
    function fnBaseInfoId(){
        $('#fnBaseInfoIdView').show();
        $('#fnVerifyIdView').hide();
        $('#fnPasswordIdView').hide();
        $("#baseInfoId").addClass("xx01");
        $("#verifyId").removeClass("xx01");
        $("#passwordId").removeClass("xx01");
    }
    function fnVerifyId(){
        $('#fnBaseInfoIdView').hide();
        $('#fnVerifyIdView').show();
        $('#fnPasswordIdView').hide();
        $("#baseInfoId").removeClass("xx01");
        $("#verifyId").addClass("xx01");
        $("#passwordId").removeClass("xx01");
    }

    function fnPasswordId(){
        $('#fnBaseInfoIdView').hide();
        $('#fnVerifyIdView').hide();
        $('#fnPasswordIdView').show();
        $("#baseInfoId").removeClass("xx01");
        $("#verifyId").removeClass("xx01");
        $("#passwordId").addClass("xx01");
    }

    //修改密码
    function fnSubimt(){
        //前台验证

        //后台验证
        $('.tishi4').text('');//清空验证
        $.get("<%=basePath%>/open/userverify/changePassword.action",$('#changePasswordId').serialize(),function(result){
            if(result.stateCode==200){
                alert(result.msg);
                $("#changePasswordId input[type='password']").val("");
            }else{
                if(result.data ==null){
                    alert(result.msg);//弹出修改失败提示
                }else{
                    for(var item in result.data){
                        $("[name='"+item+"']").next().text("! "+result.data[item]);
                        $("[name='"+item+"']").next().show();
                    }
                }
            }

        })
    }
    //显示反馈页面
    /*function showDiv(tr){
        $('#area11').text($(tr).parent().children('input:eq(0)').val());
        var option=$(tr).parent().children('input:eq(1)').val()
        $('#area22').text(option==''?'无':option);
        $('#area33').text($(tr).parent().children('input:eq(2)').val());
        $('#feekbackId').show();
    }
    //关闭
    function closeDivApply(){
        $('#feekbackId').hide();
    }*/
</script>
</html>
