<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>员工信息管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
    <style>
        label.error{
            left:0;
            top:40px;
        }
    </style>
    <script type="text/javascript">
        // var officeId;
        var validateForm;
        var existStaff = false;
        //  true 存在手机号重复,,false，手机号不重复
        var existMobile = false;

        function doSubmit(index1){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                if(existStaff){
                    layer.msg("该员工在职，不能提交入职信息，请确认身份证信息",{icon:2});
                    return false;
                }
                if(!existMobile){
                    var  flag = $("#updateFlag").val();
                    if(flag === '1'){
                        // $("#notifyFlag").val("1");
                        $("#inputForm").submit();
                        parent.layer.closeAll();
                    }else {
                        parent.layer.alert('该成员将收到信息完善待办。',
                            function (index) {
                                $("#notifyFlag").val("1");
                                $("#inputForm").submit();
                                parent.layer.closeAll();
                            });
                    }
                }
                return false;
            }

            return false;
        }
        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });


            var layDateArr = $(".layer-date");
            for(var i=0;i<layDateArr.length;i++){
                var id = '#'+$(layDateArr[i]).attr("id");
                if('#workDate'== id||'#industryDate'==id){
                    laydate.render({
                        elem: id, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                        event: 'focus', //响应事件。如果没有传入event，则按照默认的click
                        type:'month'
                    });
                }
                laydate.render({
                    elem: id, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                    event: 'focus' //响应事件。如果没有传入event，则按照默认的click
                });
            }

            $('#bankName').editableSelect({
                effects: 'slide'
            });
            $('#bankName').val("${workStaffBasicInfo.bankName}");
            cacuAge('${workStaffBasicInfo.idCard}','1');

            changeTryEndTime('${workStaffBasicInfo.status}');

            var off = $("#officeId").val();
            if(off != ''){
                $.ajax({
                    type: 'POST',
                    url: '${ctx}/sys/role/getByOfficeId',
                    data: {'id':off},
                    success: function(result){
                        var role__id =  '${workStaffBasicInfo.roleId}';
                        var data1 = result.data;
                        var html = "";
                        for (var e in data1) {
                            if(data1[e].id == role__id){
                                html += '<option value=' + data1[e].id+ ' selected>' + data1[e].name + '</option>'
                            }else{
                                html += '<option value=' + data1[e].id+ '>' + data1[e].name + '</option>'
                            }
                        }
                        $("#roleId").append(html);
                    }
                });
            }


            $('#officeId').on("change", function () {
                // $("#roleId").find("option:selected").remove();
                // var maxIndex=$("#roleId option:last").attr("index")
                // console.log(maxIndex)
                $("#roleId").empty();
                var officeId = $(this).val();
                $.ajax({
                    type: 'POST',
                    url: '${ctx}/sys/role/getByOfficeId',
                    data: {'id': officeId},
                    success: function (result) {
                        var data1 = result.data
                        var html = "";
                        for (var e in data1) {
                            html += '<option value=' + data1[e].id + '>' + data1[e].name + '</option>'
                        }
                        $("#roleId").append(html);
                    }
                });
            });

            //第一次，验证手机号
           checkMobile();

            $("#mobile").on('keyup',function(){
                $("#ph").html("");
                var mob = $(this).val();
                if (mob.length !== 11) {
                    return ;
                }
                checkMobile();

            });

        });
    </script>
    <script type="text/javascript">
        function checkMobile(){
            $.ajax({
                url:"${ctx}/workstaff/workStaffBasicInfo/checkMobile",
                data:{"id":$("#id").val(),"mobile":$("#mobile").val()},
                success:function(data){
                    if(data==="false"){
                        //没通过
                        $("#ph").html("手机号已存在");
                        existMobile = true;
                        return ;
                    }else{
                        $("#ph").html("");
                        existMobile = false;
                        return ;
                    }
                }
            });
        }

        //上传用户头像
        function this_upload_image_button(index){
            $("#this_upload_file_"+index).click();
        }
        function this_upload_show_image(index){
            var obj =$("#this_upload_file_"+index)[0].files[0];
            var fileType = obj.type;
            if(obj.size>100*1024){
                layer.msg("请上传100KB内图片格式文件!",{icon:2});
                return false ;
            }
            var url ;
            if((fileType.indexOf("png")>=0||fileType.indexOf("bmp")>=0||fileType.indexOf("jpg")>=0||fileType.indexOf("jpeg")>=0)){
                url = window.URL.createObjectURL(obj);
            }else {
                /*$("#this_upload_msg").css({"color":"red"});*/
                this_close_img(index);
                layer.msg("请上传图片格式文件!",{icon:2});
                return false ;
            }
            /*$("#this_upload_msg" + "index").removeAttr("style");*/
            $("#this_upload_image_"+index).attr("src",url);

            var span = '<span id="this_upload_close_'+index+'" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img('+index+');"></span>';
            $("#this_upload_image_" + index).before(span);
        }

        function this_close_img(index) {
            $("#this_upload_div_"+index).remove();
            this_add_div(index);
        }

        function this_add_div(index) {
            var this_upload_div_1 =
                '<div id="this_upload_div_'+ index + '" style="position:relative;">'+
                '<img  id="this_upload_image_' + index + '" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button('+index+')"/>'+
                '<input id="this_upload_file_'+ index + '" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image('+index+ ')" /><br>'+
                '</div>';
            $("#this_upload_image_div_"+ index).html("").append(this_upload_div_1);
        }

        function cacuAge(idCard,type){
            if(type=='1'){
                var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                if(!pattern.test(idCard)){
                    return;
                }
            }
            var age = 0;
            var year='';
            var months='';
            var days='';
            if(idCard.length==15){
                year = "19"+idCard.substring(6,8);
                months=idCard.substring(8,10);//截取身份证上的月
                days=idCard.substring(10,12);//截取身份证上的日
            }else {
                year=idCard.substring(6,10);//截取身份证上的年
                months=idCard.substring(10,12);//截取身份证上的月
                days=idCard.substring(12,14);//截取身份证上的日
            }

            var myDate = new Date();
            var month = myDate.getMonth() + 1;
            var day = myDate.getDate();
            age = myDate.getFullYear() - year - 1;
            if (months< month || months == month && days <= day) {
                age++;
            }
            if(age<0)age=0;
            $("#age").val(age);
        }

        function caculateAge(idCard) {
            var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
            if(!pattern.test(idCard)){
                return;
            }
            var birthday='';
            var year='';
            var months='';
            var days='';
            if(idCard.length==15){
                year = "19"+idCard.substring(6,8);
                months=idCard.substring(8,10);//截取身份证上的月
                days=idCard.substring(10,12);//截取身份证上的日
            }else {
                year=idCard.substring(6,10);//截取身份证上的年
                months=idCard.substring(10,12);//截取身份证上的月
                days=idCard.substring(12,14);//截取身份证上的日
            }
            birthday=year+"-"+months+"-"+days;//转为2000-01-01的格式
            $("#birthday").val(birthday);
            cacuAge(idCard,'0');
            var staffId = '${workStaffBasicInfo.achiveId}';
            $.ajax({
                url:'${ctx}/workstaff/workStaffBasicInfo/idCard',
                data:{
                    'idCard':idCard
                },
                success:function(result){
                    console.log(result);
                    if(result.success){
                        if(!result.body.exist){
                            existStaff = false;
                            return;
                        }
                        var id = result.body.id;
                        if(staffId==''){
                            if(result.body.onJob){
                                existStaff = true;
                                layer.msg("该员工在职，不能提交入职信息，请确认身份证信息",{icon:2});
                                return;
                            }
                            window.location= "${ctx}/workstaff/workStaffBasicInfo/reform?achiveId="+id;
                        }else {
                            if(staffId != id){
                                layer.msg("重复的身份证信息，请重新输入",{icon:2});
                                $("idCard").val("");
                            }
                        }
                    }
                }
            });
        }

        function this_upload_file_button(id){
            $("#"+id).click();
        }
        function changeFileName(obj,index) {
            var file = obj.files[0];
            var url = null;
            if (window.createObjectURL != undefined) { // basic
                url = window.createObjectURL(file);
            } else if (window.URL != undefined) { // mozilla(firefox)
                url = window.URL.createObjectURL(file);
            } else if (window.webkitURL != undefined) { // webkit or chrome
                url = window.webkitURL.createObjectURL(file);
            }
            console.log(url);
            var fileType = file.type;
            if(file.size > 100*1024 || !(fileType.indexOf("png")>=0||fileType.indexOf("bmp")>=0||fileType.indexOf("jpg")>=0||fileType.indexOf("jpeg")>=0)){
                layer.msg("请上传100KB内扫描件!",{icon:2});
                return;
            }
            var spanId = $(obj).attr("id") + 'Name' + index;
            var imgStr = '<img src="'+url+'" width="24" height="24" onclick="openDialogView(\'预览\',\'${ctx}/sys/picturepreview/picturePreview?url='+url+'\',\'90%\',\'90%\')" alt="'+file.name+'">';
            $('#'+spanId).html(imgStr);
        }

        function setParentInfo(ids,names,nos,salarys){
            var val=salarys[0];
            if(val==null||val==''|| isNaN(val))return;
            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
            var l = money.split(".")[0].split("").reverse(),
                r = money.split(".")[1];
            t = "";
            for(i = 0; i < l.length; i ++ )
            {
                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
            }
            $("#salary").val(t.split("").reverse().join("") + "." + r);
        }

        function changeTryEndTime(val) {
            if('试用'==val){
                $("#tryEndTime").addClass("required");
                $("#tryEndTime").removeAttr("disabled","disabled");
                $("#tryEndTimeSpan").html('*');
            }else {
                $("#tryEndTime").attr("disabled","disabled");
                $("#tryEndTimeSpan").html('');
            }
        }

    </script>
</head>
<body>
<div class="single-form">
    <div class="container">
        <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/save" enctype="multipart/form-data" method="post" class="form-horizontal">
            <form:hidden path="id"/>
            <form:hidden path="notifyFlag"/>
            <form:hidden path="userId"/>
            <input id="updateFlag" value="${updateFlag}" style="display:none;">
            <div class="form-group layui-row first">
                <div class="form-group-label"><h2>基本信息</h2></div>
                <div class="layui-item layui-col-sm6 lw7" style="padding-right: 0;">
                    <div class="layui-item layui-col-sm12">
                        <label class="layui-form-label"><span class="require-item">*</span>工    号：</label>
                        <div class="layui-input-block">
                            <form:input path="no" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm12">
                        <label class="layui-form-label"><span class="require-item">*</span>性    别：</label>
                        <div class="layui-input-block">
                            <form:select path="gender" class="form-control simple-select required">
                                <form:option value="" label=""/>
                                <form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                            </form:select>
                        </div>
                    </div>
                    <div class="layui-item layui-col-sm12">
                        <label class="layui-form-label"><span class="require-item">*</span>身份证号码：</label>
                        <div class="layui-input-block">
                            <form:input path="idCard" htmlEscape="false" onchange="caculateAge(this.value);" class="form-control idCard layui-input required"/>
                        </div>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <div style="margin-right: 120px;">
                        <div class="layui-item layui-col-sm12">
                            <label class="layui-form-label"><span class="require-item">*</span>姓    名：</label>
                            <div class="layui-input-block">
                                <form:input path="name" htmlEscape="false" class="form-control layui-input required"/>
                            </div>
                        </div>
                        <div class="layui-item layui-col-sm12">
                            <label class="layui-form-label"><span class="require-item">*</span>民    族：</label>
                            <div class="layui-input-block">
                                <form:select path="nation" class="form-control simple-select required">
                                    <form:options items="${fns:getDictList('nation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                </form:select>
                            </div>
                        </div>
                        <div class="layui-item layui-col-sm12">
                            <label class="layui-form-label"><span class="require-item">*</span>年    龄：</label>
                            <div class="layui-input-block">
                                <form:input path="age" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
                            </div>
                        </div>
                    </div>
                    <div class="profile_box_wrapper">
                        <div class="profile_box">
                            <div id="this_upload_image_div_1">
                                <div id="this_upload_div_1" style="position:relative;">
                                    <c:choose>
                                        <c:when test="${not empty workStaffBasicInfo.picture}">
                                            <span id="this_upload_close_1" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img(1)"></span>
                                            <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${workStaffBasicInfo.picture}"  onclick="this_upload_image_button(1)"/>
                                        </c:when>
                                        <c:otherwise>
                                            <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button(1)"/>
                                        </c:otherwise>
                                    </c:choose>
                                    <input id="this_upload_file_1" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image(1)"  class="form-control required"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>出生日期：</label>
                    <div class="layui-input-block">
                        <input id="birthday" name="birthday" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon required"
                               value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>公历/农历：</label>
                    <div class="layui-input-block">
                        <form:select path="calendar" class="form-control simple-select required">
                            <form:options items="${fns:getDictList('calendar_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">电子邮箱：</label>
                    <div class="layui-input-block">
                        <form:input path="email" htmlEscape="false" class="form-control layui-input email"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>移动电话：</label>
                    <div class="layui-input-block">
                        <form:input path="mobile" id="mobile" htmlEscape="false" class="form-control layui-input required isPhone"/>
                        <span id="ph" style="color: #CC5965"></span>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">座机：</label>
                    <div class="layui-input-block">
                        <form:input path="phone" htmlEscape="false"
                                    class="form-control isTel  layui-input"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>归属部门：</label>
                    <div class="layui-input-block with-icon">
                        <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
                                        title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>岗   位：</label>
                    <div class="layui-input-block ">
                        <select id="roleId" class="form-control simple-select required" name="roleId">
                        </select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">职    位：</label>
                    <div class="layui-input-block">
                        <form:select path="duty" class="form-control simple-select">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getMainDictList('staff_duty')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">职    级：</label>
                    <div class="layui-input-block with-icon">
                        <sys:treeselectJobGrade id="jobGrade" name="jobGrade.id" value="${workStaffBasicInfo.jobGrade.id}" labelName="jobGrade.name" labelValue="${workStaffBasicInfo.jobGrade.name}"
                                                title="职级类型" url="/workjobgrade/workJobGrade/treeData"  cssClass="form-control layui-input " allowClear="true" notAllowSelectParent="true"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">基本工资：</label>
                    <div class="layui-input-block with-icon">
                        <input id="salary" htmlEscape="false" readonly value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.salary}"/>" class="form-control layui-input"/>
                    </div>
                </div>
                <%--<div class="layui-item layui-col-sm6 lw7">--%>
                    <%--<label class="layui-form-label double-line"><span class="require-item">*</span>是否 TS人员：</label>--%>
                    <%--<div class="layui-input-block">--%>
                        <%--<form:select path="ts" class="form-control simple-select required">--%>
                            <%--<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
                        <%--</form:select>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>员工状态：</label>
                    <div class="layui-input-block">
                        <form:select path="status" onchange="changeTryEndTime(this.value);" class="form-control simple-select required">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('staff_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label"><span class="require-item">*</span>入职日期：</label>
                    <div class="layui-input-block">
                        <input id="entryDate" name="entryDate" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon required"
                               value="<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label double-line">参加工作日期：</label>
                    <div class="layui-input-block">
                        <input id="workDate" name="workDate" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon "
                               value="<fmt:formatDate value="${workStaffBasicInfo.workDate}" pattern="yyyy-MM"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">开户银行：</label>
                    <div class="layui-input-block">
                        <form:select path="bankName" class="form-control editable-select layui-input">
                            <form:option value=""/>
                            <form:options items="${fns:getMainDictList('bank_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">银行卡号：</label>
                    <div class="layui-input-block">
                        <form:input path="bankCard" htmlEscape="false" minlength="16" maxlength="19" class="form-control layui-input digits"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">婚姻状况：</label>
                    <div class="layui-input-block">
                        <form:select path="marriage" class="form-control simple-select">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('marriage_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">政治面貌：</label>
                    <div class="layui-input-block">
                        <form:select path="politics" class="form-control simple-select">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('politics_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label double-line">是否退伍军人：</label>
                    <div class="layui-input-block">
                        <form:select path="exSoldier" class="form-control simple-select">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">常住地址：</label>
                    <div class="layui-input-block">
                        <form:input path="address" htmlEscape="false" class="form-control layui-input"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">籍    贯：</label>
                    <div class="layui-input-block with-icon">
                        <sys:treeselect id="nativePlace" name="nativePlace.id" value="${workStaffBasicInfo.nativePlace.id}" labelName="" labelValue="${workStaffBasicInfo.nativePlace.name}"
                                        title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">户口所在地：</label>
                    <div class="layui-input-block">
                        <form:input path="household" htmlEscape="false" class="form-control layui-input"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label double-line">从事本行业日期：</label>
                    <div class="layui-input-block">
                        <input id="industryDate" name="industryDate" type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
                               value="<fmt:formatDate value="${workStaffBasicInfo.industryDate}" pattern="yyyy-MM"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label double-line"><span id="tryEndTimeSpan" class="require-item"></span>试用期结束日期：</label>
                    <div class="layui-input-block">
                        <input id="tryEndTime" name="tryEndTime"  type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
                               value="<fmt:formatDate value="${workStaffBasicInfo.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label">离职日期：</label>
                    <div class="layui-input-block">
                        <input id="dimissionDate"  type="text" maxlength="20" readonly class="form-control layui-input"
                               value="<fmt:formatDate value="${workStaffBasicInfo.dimissionDate}" pattern="yyyy-MM-dd"/>"/>
                    </div>
                </div>
                <div class="layui-item layui-col-sm6 lw7">
                    <label class="layui-form-label double-line">考勤截止日期：</label>
                    <div class="layui-input-block">
                        <input id="workEndDate"  type="text" maxlength="20" readonly class="form-control layui-input"
                               value="<fmt:formatDate value="${workStaffBasicInfo.workEndDate}" pattern="yyyy-MM-dd"/>"/>
                    </div>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>教育经历</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowEducation('#educationList',educationIdx,educationTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="educationTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="10%"><span class="require-item">*</span>毕业院校</th>
                            <th width="10%">所学专业</th>
                            <th width="12%"><span class="require-item">*</span>学    历</th>
                            <th width="8%">学    位</th>
                            <th width="8%"><span class="require-item">*</span>学历性质</th>
                            <th width="11%"><span class="require-item">*</span>入学日期</th>
                            <th width="11%">毕业日期</th>
                            <th width="10%">学历证书</th>
                            <th width="10%">学位证书</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="educationList">
                        <c:forEach items="${workStaffBasicInfo.educationList}" var="education" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="educationList${varStatus.index}_id" name="educationList[${varStatus.index}].id" value="${education.id}">
                                    <input id="educationList${varStatus.index}_delFlag" name="educationList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="educationList${varStatus.index}_degreePhoto" name="educationList[${varStatus.index}].degreePhoto" type="hidden" value="${education.degreePhoto}"/>
                                    <input id="educationList${varStatus.index}_eduPhoto" name="educationList[${varStatus.index}].eduPhoto" type="hidden" value="${education.eduPhoto}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="educationList${varStatus.index}_school" name="educationList[${varStatus.index}].school" htmlEscape="false" value="${education.school}" class="form-control required"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="educationList${varStatus.index}_major" name="educationList[${varStatus.index}].major" htmlEscape="false" value="${education.major}" class="form-control"/>
                                </td>
                                <td style="text-align:center;">
                                    <select name="educationList[${varStatus.index}].edu" id="educationList${varStatus.index}_edu" class="form-control required">
                                        <c:forEach items="${fns:getDictList('education_level')}" var="var">
                                            <option value="${var.value}" <c:if test="${education.edu eq var.value}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <select name="educationList[${varStatus.index}].degree" id="educationList${varStatus.index}_degree" class="form-control">
                                        <c:forEach items="${fns:getDictList('degree_level')}" var="var">
                                            <option value="${var.value}" <c:if test="${education.degree eq var.value}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <select name="educationList[${varStatus.index}].eduType" id="educationList${varStatus.index}_eduType" class="form-control">
                                        <c:forEach items="${fns:getDictList('edu_type')}" var="var">
                                            <option value="${var.value}" <c:if test="${education.eduType eq var.value}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <input id="educationList${varStatus.index}_startDate" name="educationList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                           value="<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="educationList${varStatus.index}_endDate" name="educationList[${varStatus.index}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${education.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('educationList${varStatus.index}_eduPhotoFile')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="educationList${varStatus.index}_eduPhotoFileName1"><c:if test="${not empty education.eduPhoto}"><img src="${education.eduPhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.eduPhoto}','90%','90%')" alt=""></c:if></span>
                                    <input id="educationList${varStatus.index}_eduPhotoFile" name="educationList[${varStatus.index}].eduPhotoFile" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('educationList${varStatus.index}_degreePhotoFile')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="educationList${varStatus.index}_degreePhotoFileName1"><c:if test="${not empty education.degreePhoto}"><img src="${education.degreePhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.degreePhoto}','90%','90%')" alt=""></c:if></span>
                                    <input id="educationList${varStatus.index}_degreePhotoFile" name="educationList[${varStatus.index}].degreePhotoFile" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#educationList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="educationTpl">//<!--
                <tr id="educationList{{idx}}">
                    <td class="hide">
                        <input type="hidden" id="educationList{{idx}}_id" name="educationList[{{idx}}].id" value="{{row.id}}">
                        <input id="educationList{{idx}}_delFlag" name="educationList[{{idx}}].delFlag" type="hidden" value="0"/>
                        <input id="educationList{{idx}}_degreePhoto" name="educationList[{{idx}}].degreePhoto" type="hidden" value="{{row.degreePhoto}}"/>
                        <input id="educationList{{idx}}_eduPhoto" name="educationList[{{idx}}].eduPhoto" type="hidden" value="{{row.eduPhoto}}"/>
                    </td>
                    <td style="text-align:center;">
                        <input id="educationList{{idx}}_school" name="educationList[{{idx}}].school" htmlEscape="false" value="{{row.school}}" class="form-control required"/>
                    </td>
                    <td style="text-align:center;">
                        <input id="educationList{{idx}}_major" name="educationList[{{idx}}].major" htmlEscape="false" value="{{row.major}}" class="form-control"/>
                    </td>
                    <td style="text-align:center;">
                        <select name="educationList[{{idx}}].edu" id="educationList{{idx}}_edu" class="form-control required">
                            <c:forEach items="${fns:getDictList('education_level')}" var="var">
                                <option value="${var.value}" <c:if test="${row.edu eq var.value}">selected</c:if>>${var.label}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <td style="text-align:center;">
                        <select name="educationList[{{idx}}].degree" id="educationList{{idx}}_degree" class="form-control">
                            <c:forEach items="${fns:getDictList('degree_level')}" var="var">
                                <option value="${var.value}" <c:if test="${row.degree eq var.value}">selected</c:if>>${var.label}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <td style="text-align:center;">
                        <select name="educationList[{{idx}}].eduType" id="educationList{{idx}}_eduType" class="form-control">
                            <c:forEach items="${fns:getDictList('edu_type')}" var="var">
                                <option value="${var.value}" <c:if test="${row.eduType eq var.value}">selected</c:if>>${var.label}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <td style="text-align:center;">
                        <input id="educationList{{idx}}_startDate" name="educationList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                               value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                    </td>
                    <td style="text-align:center;">
                        <input id="educationList{{idx}}_endDate" name="educationList[{{idx}}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                               value="<fmt:formatDate value="${row.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                    </td>
                    <td class="text-left op-td">
                        <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('educationList{{idx}}_eduPhotoFile')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="educationList{{idx}}_eduPhotoFileName1"></span>
                        <input id="educationList{{idx}}_eduPhotoFile" name="educationList[{{idx}}].eduPhotoFile" style="display:none" type="file" onchange="changeFileName(this,1);"/>
                    </td>
                    <td class="text-left op-td">
                        <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('educationList{{idx}}_degreePhotoFile')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="educationList{{idx}}_degreePhotoFileName1"></span>
                        <input id="educationList{{idx}}_degreePhotoFile" name="educationList[{{idx}}].degreePhotoFile" style="display:none" type="file" onchange="changeFileName(this,1);"/>
                    </td>
                    <td class="text-center op-td">
                        <a href=javascript:void(0); onclick="delRow(this, '#educationList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                    </td>
                </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var educationIdx = 0; var educationTpl = $("#educationTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowEducation(list, idx, tpl, row){
                            if(idx==0) {
                                educationIdx = $("#educationList tr").length;
                                idx = educationIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            educationIdx +=1;
                            var startDateId = list+idx+"_startDate";
                            var endDateId = list+idx+"_endDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                            laydate.render({
                                elem: endDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>劳动关系</h2></div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="labourTable" class="table table-bordered table-condensed details">
                        <thead>
                        <tr>
                            <th width="12%">合同类型</th>
                            <th width="12%">合同编号</th>
                            <th width="12%">合同期限</th>
                            <th width="11%">合同起始日期</th>
                            <th width="11%">合同终止日期</th>
                            <th width="11%">试用期结束日期</th>
                            <th width="11%">办理日期</th>
                            <th width="20%">文件</th>
                        </tr>
                        </thead>
                        <tbody id="labourList">
                        <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
                            <tr>
                                <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
                                <td>${buyDetails.contractNum}</td>
                                <td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
                                <td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
                                <td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
                                <td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>
                                <td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
                                    <%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>

                                <c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
                                    <c:choose>
                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
                                            <td><img src="${workClientAttachment.url}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
                                        </c:when>
                                        <c:otherwise>
                                            <c:choose>
                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
                                                </c:when>
                                                <c:otherwise>
                                                    <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
                                                </c:otherwise>
                                            </c:choose>
                                        </c:otherwise>
                                    </c:choose>
                                </c:forEach>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>外语语种</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowLanguage('#languageList',languageIdx,languageTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="languageTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="20%"><span class="require-item">*</span>语种</th>
                            <th width="15%"><span class="require-item">*</span>熟练程度</th>
                            <th width="20%">证书名称</th>
                            <th width="20%">获证日期</th>
                            <th width="15%">文件</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="languageList">
                        <c:forEach items="${workStaffBasicInfo.languageList}" var="language" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="languageList${varStatus.index}_id" name="languageList[${varStatus.index}].id" value="${language.id}">
                                    <input id="languageList${varStatus.index}_delFlag" name="languageList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="languageList${varStatus.index}_fileName" name="languageList[${varStatus.index}].fileName" type="hidden" value="${language.fileName}"/>
                                    <input id="languageList${varStatus.index}_filePath" name="languageList[${varStatus.index}].filePath" type="hidden" value="${language.filePath}"/>
                                </td>
                                <td style="text-align:center;">
                                    <select name="languageList[${varStatus.index}].language" id="languageList${varStatus.index}_language" class="form-control required">
                                        <c:forEach items="${fns:getMainDictList('language')}" var="var">
                                            <option value="${var.value}" <c:if test="${language.language eq var.value}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <select name="languageList[${varStatus.index}].proficiency" id="languageList${varStatus.index}_proficiency" class="form-control required">
                                        <c:forEach items="${fns:getDictList('proficiency')}" var="var">
                                            <option value="${var.value}" <c:if test="${language.proficiency eq var.value}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <input id="languageList${varStatus.index}_certificate" name="languageList[${varStatus.index}].certificate" class="form-control" value="${language.certificate}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="languageList${varStatus.index}_certifDate" name="languageList[${varStatus.index}].certifDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${language.certifDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('languageList${varStatus.index}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="languageList${varStatus.index}_fileName1"><c:if test="${not empty language.filePath}"><img src="${language.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${language.filePath}','90%','90%')" alt=""></c:if></span>
                                    <input id="languageList${varStatus.index}_file" name="languageList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#languageList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="languageTpl">//<!--
                <tr id="languageList{{idx}}">
                    <td class="hide">
                        <input id="languageList{{idx}}_id" name="languageList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                        <input id="languageList{{idx}}_delFlag" name="languageList[{{idx}}].delFlag" type="hidden" value="0"/>
                    </td>
                    <td style="text-align:center;">
                        <select name="languageList[{{idx}}].language" id="languageList{{idx}}_language" class="form-control required">
                            <c:forEach items="${fns:getMainDictList('language')}" var="var">
                                <option value="${var.value}">${var.label}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <td style="text-align:center;">
                        <select name="languageList[{{idx}}].proficiency" id="languageList{{idx}}_proficiency" class="form-control required">
                            <c:forEach items="${fns:getDictList('proficiency')}" var="var">
                                <option value="${var.value}">${var.label}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <td style="text-align:center;">
                        <input id="languageList{{idx}}_certificate" name="languageList[{{idx}}].certificate" class="form-control" value="{{row.certificate}}"/>
                    </td>
                    <td style="text-align:center;">
                        <input id="languageList{{idx}}_certifDate" name="languageList[{{idx}}].certifDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
							            value="<fmt:formatDate value="${row.certifDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                    </td>
                    <td class="text-left op-td">
                        <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('languageList{{idx}}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="languageList{{idx}}_fileName1"></span>
                        <input id="languageList{{idx}}_file" name="languageList[{{idx}}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                    </td>
                    <td class="text-center op-td">
                        <a href=javascript:void(0); onclick="delRow(this, '#languageList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                    </td>
                </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var languageIdx = 0; var languageTpl = $("#languageTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowLanguage(list, idx, tpl, row){
                            if(idx==0) {
                                languageIdx = $("#languageList tr").length;
                                idx = languageIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            languageIdx +=1;
                            var startDateId = list+idx+"_certifDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>工作经历</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowExperience('#experienceList', experienceIdx, experienceTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="experienceTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="15%"><span class="require-item">*</span>所在单位</th>
                            <th width="15%"><span class="require-item">*</span>工作部门</th>
                            <th width="14%"><span class="require-item">*</span>职务或岗位</th>
                            <th width="12%"><span class="require-item">*</span>起始日期</th>
                            <th width="12%"><span class="require-item">*</span>终止日期</th>
                            <th width="11%">证明人</th>
                            <th width="11%">证明人联系方式</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="experienceList">
                        <c:forEach items="${workStaffBasicInfo.experienceList}" varStatus="varStatus" var="experience">
                            <tr id="experienceList${varStatus.index}">
                                <td class="hide">
                                    <input id="experienceList${varStatus.index}_id" name="experienceList[${varStatus.index}].id" type="hidden" value="${experience.id}"/>
                                    <input id="experienceList${varStatus.index}_delFlag" name="experienceList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_company" name="experienceList[${varStatus.index}].company" class="form-control required" value="${experience.company}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_dept" name="experienceList[${varStatus.index}].dept" class="form-control required" value="${experience.dept}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_duty" name="experienceList[${varStatus.index}].duty" class="form-control required" value="${experience.duty}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_startDate" name="experienceList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                           value="<fmt:formatDate value="${experience.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_endDate" name="experienceList[${varStatus.index}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                           value="<fmt:formatDate value="${experience.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_certifier" name="experienceList[${varStatus.index}].certifier" class="form-control" value="${experience.certifier}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList${varStatus.index}_certifierTel" name="experienceList[${varStatus.index}].certifierTel" class="form-control" value="${experience.certifierTel}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#experienceList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="experienceTpl">//<!--
                            <tr id="experienceList{{idx}}">
                                <td class="hide">
                                    <input id="experienceList{{idx}}_id" name="experienceList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                    <input id="experienceList{{idx}}_delFlag" name="experienceList[{{idx}}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_company" name="experienceList[{{idx}}].company" class="form-control required" value="{{row.company}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_dept" name="experienceList[{{idx}}].dept" class="form-control required" value="{{row.dept}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_duty" name="experienceList[{{idx}}].duty" class="form-control required" value="{{row.duty}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_startDate" name="experienceList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
							            value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_endDate" name="experienceList[{{idx}}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
							            value="<fmt:formatDate value="${row.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_certifier" name="experienceList[{{idx}}].certifier" class="form-control" value="{{row.certifier}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="experienceList{{idx}}_certifierTel" name="experienceList[{{idx}}].certifierTel" class="form-control" value="{{row.certifierTel}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#experienceList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var experienceIdx = 0; var experienceTpl = $("#experienceTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowExperience(list, idx, tpl, row){
                            if(idx==0) {
                                experienceIdx = $("#experienceList tr").length;
                                idx = experienceIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            experienceIdx +=1;
                            var startDateId = list+idx+"_startDate";
                            var endDateId = list+idx+"_endDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                            laydate.render({
                                elem: endDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>执业资格证书</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowCertificate('#certificateList',certificateIdx,certificateTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="certificateTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="10%"><span class="require-item">*</span>证书名称</th>
                            <th width="10%"><span class="require-item">*</span>证书编号</th>
                            <th width="10%"><span class="require-item">*</span>发证机关</th>
                            <th width="11%"><span class="require-item">*</span>发证日期</th>
                            <th width="11%">注册日期</th>
                            <th width="9%">注册证书编号</th>
                            <th width="7%">专业</th>
                            <th width="6%">等级</th>
                            <th width="6%">取得方式</th>
                            <th width="10%">文件</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="certificateList">
                        <c:forEach items="${workStaffBasicInfo.certificateList}" var="certificate" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="certificateList${varStatus.index}_id" name="certificateList[${varStatus.index}].id" value="${certificate.id}">
                                    <input id="certificateList${varStatus.index}_delFlag" name="certificateList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="certificateList${varStatus.index}_fileName" name="certificateList[${varStatus.index}].fileName" type="hidden" value="${certificate.fileName}"/>
                                    <input id="certificateList${varStatus.index}_filePath" name="certificateList[${varStatus.index}].filePath" type="hidden" value="${certificate.filePath}"/>
                                </td>
                                <td>
                                    <select name="certificateList[${varStatus.index}].name" id="certificateList${varStatus.index}_name" class="form-control required">
                                        <c:forEach items="${fns:getMainDictList('certificate_type')}" var="var">
                                            <option value="${var.label}" <c:if test="${certificate.name eq var.label}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_num" name="certificateList[${varStatus.index}].num" class="form-control required" value="${certificate.num}"/>
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_issuingAuthority" name="certificateList[${varStatus.index}].issuingAuthority" class="form-control required" value="${certificate.issuingAuthority}"/>
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_issuingDate" name="certificateList[${varStatus.index}].issuingDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                           value="<fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_registDate" name="certificateList[${varStatus.index}].registDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_registNum" name="certificateList[${varStatus.index}].registNum" class="form-control" value="${certificate.registNum}"/>
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_major" name="certificateList[${varStatus.index}].major" class="form-control" value="${certificate.major}"/>
                                </td>
                                <td>
                                    <input id="certificateList${varStatus.index}_grade" name="certificateList[${varStatus.index}].grade" class="form-control" value="${certificate.grade}"/>
                                </td>
                                <td>
                                    <select name="certificateList[${varStatus.index}].issType" id="certificateList${varStatus.index}_issType" class="form-control">
                                        <option value="考试" <c:if test="${'考试' eq certificate.issType}">selected</c:if>>考试</option>
                                        <option value="考核" <c:if test="${'考核' eq certificate.issType}">selected</c:if>>考核</option>
                                    </select>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('certificateList${varStatus.index}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="certificateList${varStatus.index}_fileName1"><c:if test="${not empty certificate.filePath}"><img src="${certificate.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePath}','90%','90%')" alt=""></c:if></span>
                                    <input id="certificateList${varStatus.index}_file" name="certificateList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#certificateList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="certificateTpl">//<!--
                            <tr>
                            <td class="hide">
                                <input type="hidden" id="certificateList{{idx}}_id" name="certificateList[{{idx}}].id" value="{{row.id}}">
                                <input id="certificateList{{idx}}_delFlag" name="certificateList[{{idx}}].delFlag" type="hidden" value="0"/>
                                <input id="certificateList{{idx}}_fileName" name="certificateList[{{idx}}].fileName" type="hidden" value="{{row.fileName}}"/>
                                <input id="certificateList{{idx}}_filePath" name="certificateList[{{idx}}].filePath" type="hidden" value="{{row.filePath}}"/>
                                </td>
                                <td>
                                <select name="certificateList[{{idx}}].name" id="certificateList{{idx}}_name" class="form-control required">
                                <option value=""></option>
                                <c:forEach items="${fns:getMainDictList('certificate_type')}" var="var">
                                <option value="${var.label}">${var.label}</option>
                            </c:forEach>
                            </select>
                            </td>
                            <td>
                            <input id="certificateList{{idx}}_num" name="certificateList[{{idx}}].num" class="form-control required" value="{{row.num}}"/>
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_issuingAuthority" name="certificateList[{{idx}}].issuingAuthority" class="form-control required" value="{{row.issuingAuthority}}"/>
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_issuingDate" name="certificateList[{{idx}}].issuingDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                            value="<fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_registDate" name="certificateList[{{idx}}].registDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                            value="<fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_registNum" name="certificateList[{{idx}}].registNum" class="form-control" value="{{row.registNum}}"/>
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_major" name="certificateList[{{idx}}].major" class="form-control" value="{{row.major}}"/>
                                </td>
                                <td>
                                <input id="certificateList{{idx}}_grade" name="certificateList[{{idx}}].grade" class="form-control" value="{{row.grade}}"/>
                                </td>
                                <td>
                                <select name="certificateList[{{idx}}].issType" id="certificateList{{idx}}_issType" class="form-control">
                                <option value="考试" selected >考试</option>
                                <option value="考核">考核</option>
                            </select>
                            </td>
                            <td class="text-left op-td">
                                <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('certificateList{{idx}}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="certificateList{{idx}}_fileName1"></span>
                                <input id="certificateList{{idx}}_file" name="certificateList[{{idx}}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-center op-td">
                                <a href=javascript:void(0); onclick="delRow(this, '#certificateList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                            </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var certificateIdx = 0; var certificateTpl = $("#certificateTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowCertificate(list, idx, tpl, row){
                            if(idx==0) {
                                certificateIdx = $("#certificateList tr").length;
                                idx = certificateIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            certificateIdx +=1;
                            var startDateId = list+idx+"_issuingDate";
                            var registDateId = list+idx+"_registDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                            laydate.render({
                                elem: registDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>职称</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowTitle('#titleList',titleIdx,titleTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="titleTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="15%"><span class="require-item">*</span>职称名称</th>
                            <th width="15%"><span class="require-item">*</span>职称等级</th>
                            <th width="15%"><span class="require-item">*</span>取得日期</th>
                            <th width="15%"><span class="require-item">*</span>取得途径</th>
                            <th width="15%"><span class="require-item">*</span>审批单位</th>
                            <th width="15%">文件</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="titleList">
                        <c:forEach items="${workStaffBasicInfo.titleList}" var="title" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="titleList${varStatus.index}_id" name="titleList[${varStatus.index}].id" value="${title.id}">
                                    <input id="titleList${varStatus.index}_delFlag" name="titleList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="titleList${varStatus.index}_fileName" name="titleList[${varStatus.index}].fileName" type="hidden" value="${title.fileName}"/>
                                    <input id="titleList${varStatus.index}_filePath" name="titleList[${varStatus.index}].filePath" type="hidden" value="${title.filePath}"/>
                                </td>
                                <td>
                                    <input id="titleList${varStatus.index}_name" name="titleList[${varStatus.index}].name" class="form-control required" value="${title.name}"/>
                                </td>
                                <td>
                                    <input id="titleList${varStatus.index}_grade" name="titleList[${varStatus.index}].grade" class="form-control required" value="${title.grade}"/>
                                </td>
                                <td>
                                    <input id="titleList${varStatus.index}_startDate" name="titleList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                           value="<fmt:formatDate value="${title.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="titleList${varStatus.index}_pathway" name="titleList[${varStatus.index}].pathway" class="form-control required" value="${title.pathway}"/>
                                </td>
                                <td>
                                    <input id="titleList${varStatus.index}_approvalAuthority" name="titleList[${varStatus.index}].approvalAuthority" class="form-control required" value="${title.approvalAuthority}"/>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('titleList${varStatus.index}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="titleList${varStatus.index}_fileName1"><c:if test="${not empty title.filePath}"><img src="${title.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${title.filePath}','90%','90%')" alt="${title.fileName}"></c:if></span>
                                    <input id="titleList${varStatus.index}_file" name="titleList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#titleList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="titleTpl">//<!--
                            <tr>
                                    <td class="hide">
                                        <input type="hidden" id="titleList{{idx}}_id" name="titleList[{{idx}}].id" value="{{row.id}}">
                                        <input id="titleList{{idx}}_delFlag" name="titleList[{{idx}}].delFlag" type="hidden" value="0"/>
                                        <input id="titleList{{idx}}_fileName" name="titleList[{{idx}}].fileName" type="hidden" value="{{row.fileName}}"/>
                                        <input id="titleList{{idx}}_filePath" name="titleList[{{idx}}].filePath" type="hidden" value="{{row.filePath}}"/>
                                    </td>
                                    <td>
                                        <input id="titleList{{idx}}_name" name="titleList[{{idx}}].name" class="form-control required" value="{{row.name}}"/>
                                    </td>
                                    <td>
                                        <input id="titleList{{idx}}_grade" name="titleList[{{idx}}].grade" class="form-control required" value="{{row.grade}}"/>
                                    </td>
                                    <td>
                                        <input id="titleList{{idx}}_startDate" name="titleList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate required"
                                               value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                    </td>
                                    <td>
                                        <input id="titleList{{idx}}_pathway" name="titleList[{{idx}}].pathway" class="form-control required" value="{{row.pathway}}"/>
                                    </td>
                                    <td>
                                        <input id="titleList{{idx}}_approvalAuthority" name="titleList[{{idx}}].approvalAuthority" class="form-control required" value="{{row.approvalAuthority}}"/>
                                    </td>
                                    <td class="text-left op-td">
                                        <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('titleList{{idx}}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="titleList{{idx}}_fileName1"></span>
                                        <input id="titleList{{idx}}_file" name="titleList[{{idx}}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                    </td>
                                    <td class="text-center op-td">
                                        <a href=javascript:void(0); onclick="delRow(this, '#titleList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                    </td>
                                </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var titleIdx = 0; var titleTpl = $("#titleTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowTitle(list, idx, tpl, row){
                            if(idx==0) {
                                titleIdx = $("#titleList tr").length;
                                idx = titleIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            titleIdx +=1;
                            var startDateId = list+idx+"_startDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>家庭情况</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowFamily('#familyList', familyIdx, familyTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="familyTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="15%"><span class="require-item">*</span>与本人的关系</th>
                            <th width="20%"><span class="require-item">*</span>成员姓名</th>
                            <th width="25%"><span class="require-item">*</span>身份证号码</th>
                            <th width="10%"><span class="require-item">*</span>成员性别</th>
                            <th width="20%"><span class="require-item">*</span>成员联系方式</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="familyList">
                        <c:forEach items="${workStaffBasicInfo.familyList}" var="family" varStatus="varStatus">
                            <tr id="familyList${varStatus.index}">
                                <td class="hide">
                                    <input id="familyList${varStatus.index}_id" name="familyList[${varStatus.index}].id" type="hidden" value="${family.id}"/>
                                    <input id="familyList${varStatus.index}_delFlag" name="familyList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td>
                                    <input id="familyList${varStatus.index}_relation" name="familyList[${varStatus.index}].relation" class="form-control required" value="${family.relation}"/>
                                </td>
                                <td>
                                    <input id="familyList${varStatus.index}_name" name="familyList[${varStatus.index}].name" class="form-control required" value="${family.name}"/>
                                </td>
                                <td>
                                    <input id="familyList${varStatus.index}_idCard" name="familyList[${varStatus.index}].idCard" class="form-control required idCard" value="${family.idCard}"/>
                                </td>
                                <td>
                                    <select name="familyList[${varStatus.index}].gender" class="form-control ">
                                        <option value="男" <c:if test="${'男' eq family.gender}">selected</c:if>>男</option>
                                        <option value="女" <c:if test="${'女' eq family.gender}">selected</c:if>>女</option>
                                    </select>
                                </td>
                                <td>
                                    <input id="familyList${varStatus.index}_contact" name="familyList[${varStatus.index}].contact" class="form-control required" value="${family.contact}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#familyList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="familyTpl">//<!--
                            <tr id="familyList{{idx}}">
                                <td class="hide">
                                    <input id="familyList{{idx}}_id" name="familyList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                    <input id="familyList{{idx}}_delFlag" name="familyList[{{idx}}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="familyList{{idx}}_relation" name="familyList[{{idx}}].relation" class="form-control required" value="{{row.relation}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="familyList{{idx}}_name" name="familyList[{{idx}}].name" class="form-control required" value="{{row.name}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="familyList{{idx}}_idCard" name="familyList[{{idx}}].idCard" class="form-control required idCard" value="{{row.idCard}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <select name="familyList[{{idx}}].gender" class="form-control required">
                                        <option value="男">男</option>
                                        <option value="女">女</option>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <input id="familyList{{idx}}_contact" name="familyList[{{idx}}].contact" class="form-control required" value="{{row.contact}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#familyList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var familyIdx = 0; var familyTpl = $("#familyTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowFamily(list, idx, tpl, row){
                            if(idx==0) {
                                familyIdx = $("#familyList tr").length;
                                idx = familyIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            familyIdx +=1;
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>培训经历</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowTraining('#trainingList',trainingIdx,trainingTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="trainingTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="9%"><span class="require-item">*</span>培训名称</th>
                            <th width="9%">培训机构</th>
                            <th width="9%">培训地点</th>
                            <th width="11%">培训起始日期</th>
                            <th width="11%">培训终止日期</th>
                            <th width="9%"><span class="require-item">*</span>培训类型</th>
                            <th width="5%">学时</th>
                            <th width="10%"><span class="require-item">*</span>所获证书</th>
                            <th width="10%">文件</th>
                            <th width="7%">备注</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="trainingList">
                        <c:forEach items="${workStaffBasicInfo.trainingList}" var="training" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="trainingList${varStatus.index}_id" name="trainingList[${varStatus.index}].id" value="${training.id}">
                                    <input id="trainingList${varStatus.index}_delFlag" name="trainingList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="trainingList${varStatus.index}_fileName" name="trainingList[${varStatus.index}].fileName" type="hidden" value="${training.fileName}"/>
                                    <input id="trainingList${varStatus.index}_filePath" name="trainingList[${varStatus.index}].filePath" type="hidden" value="${training.filePath}"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_name" name="trainingList[${varStatus.index}].name" class="form-control required" value="${training.name}"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_agency" name="trainingList[${varStatus.index}].agency" class="form-control" value="${training.agency}"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_address" name="trainingList[${varStatus.index}].address" class="form-control" value="${training.address}"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_startDate" name="trainingList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${training.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_endDate" name="trainingList[${varStatus.index}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${training.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <select name="trainingList[${varStatus.index}].type" id="trainingList${varStatus.index}_type" class="form-control required">
                                        <option value=""></option>
                                        <c:forEach items="${fns:getMainDictList('training_type')}" var="var">
                                            <option value="${var.label}" <c:if test="${var.label eq training.type}">selected</c:if> >${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_hours" name="trainingList[${varStatus.index}].hours" class="form-control" value="${training.hours}"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_certificate" name="trainingList[${varStatus.index}].certificate" class="form-control required" value="${training.certificate}"/>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('trainingList${varStatus.index}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="trainingList${varStatus.index}_fileName1"><c:if test="${not empty training.filePath}"><img src="${training.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePath}','90%','90%')" alt=""></c:if></span>
                                    <input id="trainingList${varStatus.index}_file" name="trainingList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td>
                                    <input id="trainingList${varStatus.index}_remarks" name="trainingList[${varStatus.index}].remarks" class="form-control" value="${training.remarks}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#titleList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="trainingTpl">//<!--
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="trainingList{{idx}}_id" name="trainingList[{{idx}}].id" value="{{row.id}}">
                                    <input id="trainingList{{idx}}_delFlag" name="trainingList[{{idx}}].delFlag" type="hidden" value="0"/>
                                    <input id="trainingList{{idx}}_fileName" name="trainingList[{{idx}}].fileName" type="hidden" value="{{row.fileName}}"/>
                                    <input id="trainingList{{idx}}_filePath" name="trainingList[{{idx}}].filePath" type="hidden" value="{{row.filePath}}"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_name" name="trainingList[{{idx}}].name" class="form-control required" value="{{row.name}}"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_agency" name="trainingList[{{idx}}].agency" class="form-control" value="{{row.agency}}"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_address" name="trainingList[{{idx}}].address" class="form-control" value="{{row.address}}"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_startDate" name="trainingList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_endDate" name="trainingList[{{idx}}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${row.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <select name="trainingList[{{idx}}].type" id="trainingList{{idx}}_type" class="form-control required">
                                        <option value=""></option>
                                        <c:forEach items="${fns:getMainDictList('training_type')}" var="var">
                                            <option value="${var.label}">${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_hours" name="trainingList[{{idx}}].hours" class="form-control" value="{{row.hours}}"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_certificate" name="trainingList[{{idx}}].certificate" class="form-control required" value="{{row.certificate}}"/>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('trainingList{{idx}}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="trainingList{{idx}}_fileName1"></span>
                                    <input id="trainingList{{idx}}_file" name="trainingList[{{idx}}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td>
                                    <input id="trainingList{{idx}}_remarks" name="trainingList[{{idx}}].remarks" class="form-control" value="{{row.remarks}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#titleList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var trainingIdx = 0; var trainingTpl = $("#trainingTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowTraining(list, idx, tpl, row){
                            if(idx==0) {
                                trainingIdx = $("#trainingList tr").length;
                                idx = trainingIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            trainingIdx +=1;
                            var startDateId = list+idx+"_startDate";
                            var endDateId = list+idx+"_endDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                            laydate.render({
                                elem: endDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>社会及行业职务</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowSocialPosition('#socialPositionList',socialPositionIdx,socialPositionTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="socialPositionTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="27%"><span class="require-item">*</span>职务名称</th>
                            <th width="20%">任职开始日期</th>
                            <th width="20%">任职结束日期</th>
                            <th width="23%">任职机构</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="socialPositionList">
                        <c:forEach items="${workStaffBasicInfo.socialPositionList}" varStatus="varStatus" var="socialPosition">
                            <tr id="socialPositionList${varStatus.index}">
                                <td class="hide">
                                    <input id="socialPositionList${varStatus.index}_id" name="socialPositionList[${varStatus.index}].id" type="hidden" value="${socialPosition.id}"/>
                                    <input id="socialPositionList${varStatus.index}_delFlag" name="socialPositionList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td>
                                    <input id="socialPositionList${varStatus.index}_name" name="socialPositionList[${varStatus.index}].name" class="form-control required" value="${socialPosition.name}"/>
                                </td>
                                <td>
                                    <input id="socialPositionList${varStatus.index}_startDate" name="socialPositionList[${varStatus.index}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${socialPosition.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="socialPositionList${varStatus.index}_endDate" name="socialPositionList[${varStatus.index}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
                                           value="<fmt:formatDate value="${socialPosition.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td>
                                    <input id="socialPositionList${varStatus.index}_organization" name="socialPositionList[${varStatus.index}].organization" class="form-control" value="${socialPosition.organization}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#socialPositionList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="socialPositionTpl">//<!--
                            <tr id="socialPositionList{{idx}}">
                                <td class="hide">
                                    <input id="socialPositionList{{idx}}_id" name="socialPositionList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                    <input id="socialPositionList{{idx}}_delFlag" name="socialPositionList[{{idx}}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="socialPositionList{{idx}}_name" name="socialPositionList[{{idx}}].name" class="form-control required" value="{{row.name}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="socialPositionList{{idx}}_startDate" name="socialPositionList[{{idx}}].startDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
							            value="<fmt:formatDate value="${row.startDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="socialPositionList{{idx}}_endDate" name="socialPositionList[{{idx}}].endDate" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
							            value="<fmt:formatDate value="${row.endDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
                                </td>
                                <td style="text-align:center;">
                                    <input id="socialPositionList{{idx}}_organization" name="socialPositionList[{{idx}}].organization" class="form-control" value="{{row.organization}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#socialPositionList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var socialPositionIdx = 0; var socialPositionTpl = $("#socialPositionTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowSocialPosition(list, idx, tpl, row){
                            if(idx==0) {
                                socialPositionIdx = $("#socialPositionList tr").length;
                                idx = socialPositionIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            socialPositionIdx +=1;
                            var startDateId = list+idx+"_startDate";
                            var endDateId = list+idx+"_endDate";
                            laydate.render({
                                elem: startDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                            laydate.render({
                                elem: endDateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                                event: 'click' //响应事件。如果没有传入event，则按照默认的click
                            });
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>奖惩情况</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowRewards('#rewardsList',rewardsIdx,rewardsTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="rewardsTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="10%"><span class="require-item">*</span>奖惩类型</th>
                            <th width="15%"><span class="require-item">*</span>奖惩名称</th>
                            <th width="15%"><span class="require-item">*</span>时间</th>
                            <th width="13%">级别</th>
                            <th width="20%"><span class="require-item">*</span>原因</th>
                            <th width="17%"><span class="require-item">*</span>授予机构</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="rewardsList">
                        <c:forEach items="${workStaffBasicInfo.rewardsList}" varStatus="varStatus" var="rewards">
                            <tr id="rewardsList${varStatus.index}">
                                <td class="hide">
                                    <input id="rewardsList${varStatus.index}_id" name="rewardsList[${varStatus.index}].id" type="hidden" value="${rewards.id}"/>
                                    <input id="rewardsList${varStatus.index}_delFlag" name="rewardsList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td>
                                    <select name="rewardsList[${varStatus.index}].type" class="form-control required">
                                        <option value="奖励" <c:if test="${'奖励' eq rewards.type}">selected</c:if>>奖励</option>
                                        <option value="惩罚" <c:if test="${'惩罚' eq rewards.type}">selected</c:if>>惩罚</option>
                                    </select>
                                </td>
                                <td>
                                    <input id="rewardsList${varStatus.index}_name" name="rewardsList[${varStatus.index}].name" class="form-control required" value="${rewards.name}"/>
                                </td>
                                <td>
                                    <input id="rewardsList${varStatus.index}_atTime" name="rewardsList[${varStatus.index}].atTime" class="form-control required" value="${rewards.atTime}"/>
                                </td>
                                <td>
                                    <input id="rewardsList${varStatus.index}_grade" name="rewardsList[${varStatus.index}].grade" class="form-control" value="${rewards.grade}"/>
                                </td>
                                <td>
                                    <input id="rewardsList${varStatus.index}_reason" name="rewardsList[${varStatus.index}].reason" class="form-control required" value="${rewards.reason}"/>
                                </td>
                                <td>
                                    <input id="rewardsList${varStatus.index}_organization" name="rewardsList[${varStatus.index}].organization" class="form-control required" value="${rewards.organization}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#rewardsList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="rewardsTpl">//<!--
                            <tr id="rewardsList{{idx}}">
                                <td class="hide">
                                    <input id="rewardsList{{idx}}_id" name="rewardsList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                    <input id="rewardsList{{idx}}_delFlag" name="rewardsList[{{idx}}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <select name="rewardsList[{{idx}}].type" class="form-control required">
                                        <option value="奖励">奖励</option>
                                        <option value="惩罚">惩罚</option>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <input id="rewardsList{{idx}}_name" name="rewardsList[{{idx}}].name" class="form-control required" value="{{row.name}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="rewardsList{{idx}}_atTime" name="rewardsList[{{idx}}].atTime" class="form-control required" value="{{row.atTime}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="rewardsList{{idx}}_grade" name="rewardsList[{{idx}}].grade" class="form-control" value="{{row.grade}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="rewardsList{{idx}}_reason" name="rewardsList[{{idx}}].reason" class="form-control required" value="{{row.reason}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="rewardsList{{idx}}_organization" name="rewardsList[{{idx}}].organization" class="form-control required" value="{{row.organization}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#rewardsList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var rewardsIdx = 0; var rewardsTpl = $("#rewardsTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowRewards(list, idx, tpl, row){
                            if(idx==0) {
                                rewardsIdx = $("#rewardsList tr").length;
                                idx = rewardsIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            rewardsIdx +=1;
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>工作业绩</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowAchievement('#achievementList',achievementIdx,achievementTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="achievementTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="20%">项目名称</th>
                            <th width="15%">主委托方</th>
                            <th width="10%">工程分类</th>
                            <th width="15%">规模类型/单位/数量</th>
                            <th width="10%">担任职务</th>
                            <th width="20%">参与内容</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="achievementList">
                        <c:forEach items="${workStaffBasicInfo.achievementList}" var="achievement" varStatus="varStatus">
                            <tr id="achievementList${varStatus.index}">
                                <td class="hide">
                                    <input id="achievementList${varStatus.index}_id" name="achievementList[${varStatus.index}].id" type="hidden" value="${achievement.id}"/>
                                    <input id="achievementList${varStatus.index}_delFlag" name="achievementList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td>
                                    <input id="achievementList${varStatus.index}_projName" name="achievementList[${varStatus.index}].projName" class="form-control" value="${achievement.projName}"/>
                                </td>
                                <td>
                                    <input id="achievementList${varStatus.index}_projClient" name="achievementList[${varStatus.index}].projClient" class="form-control" value="${achievement.projClient}"/>
                                </td>
                                <td>
                                    <input id="achievementList${varStatus.index}_category" name="achievementList[${varStatus.index}].category" class="form-control" value="${achievement.category}"/>
                                </td>
                                <td>
                                    <input id="achievementList${varStatus.index}_unitNumber" name="achievementList[${varStatus.index}].unitNumber" class="form-control" value="${achievement.unitNumber}"/>
                                </td>
                                <td>
                                    <select name="achievementList[${varStatus.index}].duty" class="form-control">
                                        <option value=""></option>
                                        <option value="成员" <c:if test="${'成员' eq achievement.duty}">selected</c:if>>成员</option>
                                        <option value="项目负责人" <c:if test="${'项目负责人' eq achievement.duty}">selected</c:if>>项目负责人</option>
                                    </select>
                                </td>
                                <td>
                                    <input id="achievementList${varStatus.index}_content" name="achievementList[${varStatus.index}].content" class="form-control" value="${achievement.content}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#achievementList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="achievementTpl">//<!--
                            <tr id="achievementList{{idx}}">
                                <td class="hide">
                                    <input id="achievementList{{idx}}_id" name="achievementList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                    <input id="achievementList{{idx}}_delFlag" name="achievementList[{{idx}}].delFlag" type="hidden" value="0"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="achievementList{{idx}}_projName" name="achievementList[{{idx}}].projName" class="form-control" value="{{row.projName}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="achievementList{{idx}}_projClient" name="achievementList[{{idx}}].projClient" class="form-control" value="{{row.projClient}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="achievementList{{idx}}_category" name="achievementList[{{idx}}].category" class="form-control" value="{{row.category}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <input id="achievementList{{idx}}_unitNumber" name="achievementList[{{idx}}].unitNumber" class="form-control" value="{{row.unitNumber}}"/>
                                </td>
                                <td style="text-align:center;">
                                    <select name="achievementList[{{idx}}].duty" class="form-control">
                                        <option value=""></option>
                                        <option value="成员">成员</option>
                                        <option value="项目负责人">项目负责人</option>
                                    </select>
                                </td>
                                <td style="text-align:center;">
                                    <input id="achievementList{{idx}}_content" name="achievementList[{{idx}}].content" class="form-control" value="{{row.content}}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#achievementList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
                                </td>
                            </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var achievementIdx = 0; var achievementTpl = $("#achievementTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowAchievement(list, idx, tpl, row){
                            if(idx==0) {
                                achievementIdx = $("#achievementList tr").length;
                                idx = achievementIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            achievementIdx +=1;
                        }
                    </script>
                </div>
            </div>
            <div class="form-group layui-row">
                <div class="form-group-label"><h2>电子档案</h2></div>
                <div class="layui-item nav-btns">
                    <a href=javascript:void(0); onclick="addRowRecord('#recordList',recordIdx,recordTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
                </div>
                <div class="layui-item layui-col-xs12 form-table-container">
                    <table id="recordTable" class="table table-bordered table-condensed can-edit">
                        <thead>
                        <tr>
                            <th class="hide"></th>
                            <th width="25%"><span class="require-item">*</span>档案名称</th>
                            <th width="25%">编号</th>
                            <th width="20%">文件</th>
                            <th width="20%">验证</th>
                            <th width="10%">操作</th>
                        </tr>
                        </thead>
                        <tbody id="recordList">
                        <c:forEach items="${workStaffBasicInfo.recordList}" var="record" varStatus="varStatus">
                            <tr>
                                <td class="hide">
                                    <input type="hidden" id="recordList${varStatus.index}_id" name="recordList[${varStatus.index}].id" value="${record.id}">
                                    <input id="recordList${varStatus.index}_delFlag" name="recordList[${varStatus.index}].delFlag" type="hidden" value="0"/>
                                    <input id="recordList${varStatus.index}_fileName" name="recordList[${varStatus.index}].fileName" type="hidden" value="${record.fileName}"/>
                                    <input id="recordList${varStatus.index}_filePath" name="recordList[${varStatus.index}].filePath" type="hidden" value="${record.filePath}"/>
                                </td>
                                <td>
                                    <select id="recordList${varStatus.index}_name" name="recordList[${varStatus.index}].name" class="form-control required">
                                        <option value="" ></option>
                                        <c:forEach items="${fns:getMainDictList('record_type')}" var="var">
                                            <option value="${var.label}" <c:if test="${var.label eq record.name}">selected</c:if>>${var.label}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td>
                                    <input id="recordList${varStatus.index}_num" name="recordList[${varStatus.index}].num" class="form-control" value="${record.num}"/>
                                </td>
                                <td class="text-left op-td">
                                    <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('recordList${varStatus.index}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="recordList${varStatus.index}_fileName1"><c:if test="${not empty record.filePath}"><img src="${record.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${record.filePath}','90%','90%')" alt=""></c:if></span>
                                    <input id="recordList${varStatus.index}_file" name="recordList[${varStatus.index}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                                </td>
                                <td>
                                    <input id="recordList${varStatus.index}_status" name="recordList[${varStatus.index}].status" class="form-control" readonly value="${record.status}"/>
                                </td>
                                <td class="text-center op-td">
                                    <a href=javascript:void(0); onclick="delRow(this, '#recordList${varStatus.index}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <script type="text/template" id="recordTpl">//<!--
                        <tr>
                            <td class="hide">
                                <input type="hidden" id="recordList{{idx}}_id" name="recordList[{{idx}}].id" value="{{row.id}}">
                                <input id="recordList{{idx}}_delFlag" name="recordList[{{idx}}].delFlag" type="hidden" value="0"/>
                                <input id="recordList{{idx}}_fileName" name="recordList[{{idx}}].fileName" type="hidden" value="{{row.fileName}}"/>
                                <input id="recordList{{idx}}_filePath" name="recordList[{{idx}}].filePath" type="hidden" value="{{row.filePath}}"/>
                            </td>
                            <td>
                                <select id="recordList{{idx}}_name" name="recordList[{{idx}}].name" class="form-control required">
                                    <option value="" ></option>
                                    <c:forEach items="${fns:getMainDictList('record_type')}" var="var">
                                        <option value="${var.label}">${var.label}</option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td>
                                <input id="recordList{{idx}}_num" name="recordList[{{idx}}].num" class="form-control" value="{{row.num}}"/>
                            </td>
                            <td class="text-left op-td">
                                <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('recordList{{idx}}_file')"><i class="fa fa-plus"></i>&nbsp;上传</a><span id="recordList{{idx}}_fileName1"></span>
                                <input id="recordList{{idx}}_file" name="recordList[{{idx}}].file" style="display:none" type="file" onchange="changeFileName(this,1)"/>
                            </td>
                            <td>
                                <input id="recordList{{idx}}_status" name="recordList[{{idx}}].status" class="form-control" readonly value="不验证"/>
                            </td>
                            <td class="text-center op-td">
                                <a href=javascript:void(0); onclick="delRow(this, '#recordList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
                            </td>
                        </tr>//-->
                    </script>
                    <script type="text/javascript">
                        var recordIdx = 0; var recordTpl = $("#recordTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        function addRowRecord(list, idx, tpl, row){
                            if(idx==0) {
                                recordIdx = $("#recordList tr").length;
                                idx = recordIdx;
                            }
                            bornTemplete(list, idx, tpl, row, idx);
                            recordIdx +=1;
                        }
                    </script>
                </div>
            </div>
        </form:form>
    </div>
</div>
<script type="text/javascript">
    function bornTemplete(list, idx, tpl, row, idx1){
        $(list).append(Mustache.render(tpl, {
            idx: idx, delBtn: true, row: row,
            order:idx1 + 1, idx1:idx1
        }));
        $(list+idx).find("select").each(function(){
            $(this).val($(this).attr("data-value"));
        });
        $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
            var ss = $(this).attr("data-value").split(',');
            for (var i=0; i<ss.length; i++){
                if($(this).val() == ss[i]){
                    $(this).attr("checked","checked");
                }
            }
        });
    }
    function delRow(obj, prefix){
        var delFlag = $(prefix+"_delFlag");
        delFlag.val("1");
        $(obj).parent().parent().hide();
    }

</script>
</body>
</html>