<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >

<head  >
    <th:block th:include="include :: header('财务负责人')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<style>
    .form-control {
        border-top-right-radius: 10px;
        border-top-left-radius: 10px;
        border-bottom-right-radius: 10px;
        border-bottom-left-radius: 10px;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-finance-edit" >
        <input readOnly="true" type="hidden" id="id" name="id" th:value="${person}==null?'':${person.id}">
        <input readOnly="true" type="hidden" id="bsid" name="bsid" th:value="${person}==null?'':${person.bsid}">
        <h4 class="form-header h4">财务负责人</h4>
        <div class="form-group">
            <label class="col-sm-2 control-label">姓名：</label>
            <div class="col-sm-4 ">
                <input name="renname" class="form-control" type="text" th:value="${person}==null?'':${person.renname}" >
            </div>
            <label class="col-sm-2 control-label">移动电话：</label>
            <div class="col-sm-4">
               <input name="renphone" class="form-control" type="text"th:value="${person}==null?'':${person.renmoblie}"  >
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">证件类型：</label>
            <div class="col-sm-4 ">
                <input name="tableName" class="form-control" type="text"  th:value="身份证" readOnly="true" >
            </div>
            <label class="col-sm-2 control-label">证件号：</label>
            <div class="col-sm-4">
                <input name="rencardno" class="form-control" type="text"  th:value="${person}==null?'':${person.rencardno}" >
            </div>
        </div>

        <br><br>
    </form>
       <!-- <button id="btn-pass" class="btn btn-danger" th:onclick="'enable()'" style="width: 33%">  <i class="fa fa-edit"></i>保存</button>
-->
    <div style="text-align:center">
         <button th:if="${person}!=null" type="button" th:onclick="'enable()'" class="btn btn-w-m btn-success">保存</button>
    </div>
</div>
<div th:include="include :: footer"></div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />

<script type="text/javascript">
    var prefix = ctx + "company/tenant";
    $("#form-finance-edit").validate({
        focusCleanup: true
    });

   /* function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit",$('#form-finance-edit').serialize());
        }
    }*/
    //编辑保存
    function enable(id) {
        sendback(id);
    }
    function sendback(id) {
        $.operate.save(prefix + "/financeedit",$('#form-finance-edit').serialize());
    }


    function setPass(id) {
        auditpass(id);
	}
	function auditpass(id){
        var url= prefix + "/auditpass/"+id;
        $.modal.opentongguo("通过", url, '550', '500');
    }

    String.prototype.endWith=function(endStr){
        var d=this.length-endStr.length;
        return (d>=0&&this.lastIndexOf(endStr)==d)
    }




</script>

</body>
</html>
