Parcourir la source

fix:调整基本信息

yangyang il y a 2 ans
Parent
commit
2e0501ca6f

+ 719 - 0
ruoyi-system/src/main/resources/templates/ahrs/personnel/editPart copy.html

@@ -0,0 +1,719 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+	<head>
+		<th:block th:include="include :: header('修改人员非关键信息')" />
+		<th:block th:include="include :: datetimepicker-css" />
+		<style>
+			.mar {
+				width: 80%;
+				margin: auto !important;
+			}
+
+			.div-ul {
+				position: fixed;
+				z-index: 1;
+				width: 100%;
+				padding: 0px;
+			}
+
+			.div-mar {
+				margin-top: 4.5%;
+			}
+
+			/*.nav li:hover{*/
+			/*    cursor: pointer;*/
+			/*    !*border-bottom: 2px solid #109dff;*!*/
+			/*    background-color: #109dff;*/
+			/*}*/
+			.ac {
+				background-color: #eeeeee;
+			}
+
+			.bs-bars {
+				margin-left: 17%;
+			}
+
+			.nav-pills li a {
+				width: 129px;
+				text-align: center;
+
+			}
+
+			/* //定义滚动条宽高,滚动条背景 */
+			::-webkit-scrollbar {
+				width: 10px;
+				height: 10px;
+			}
+
+			/* //滚动条的轨道颜色,轨道阴影,轨道圆角 */
+			::-webkit-scrollbar-track {
+				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+				background-color: #f4f7fe;
+				border-radius: 4px;
+			}
+
+			/* //滑块颜色,滑块阴影,滑块圆角 */
+			::-webkit-scrollbar-thumb {
+				border-radius: 4px;
+				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+				background-color: #efefef;
+			}
+
+			.add-block {
+				background: white;
+				border-radius: 4px;
+        padding: 0 24px;
+        margin-bottom: 24px;
+			}
+
+      .is-row-title{
+        margin-bottom: 26px;
+      }
+
+      .row{
+        margin-bottom: 24px;
+      }
+
+      .form-control[disabled], .form-control[readonly]{
+        background: #F3F3F3;
+        border: 1px solid #D1D1D1;
+        border-radius: 4px;
+        height: 40px;
+        line-height: 40px;
+      }
+
+      .input-group-addon{
+        background: #F3F3F3;
+        border: 1px solid #D1D1D1;
+        border-radius: 4px;
+      }
+
+      label{
+        margin-bottom: 10px;
+      }
+		</style>
+	</head>
+	<body class="">
+		<!--<div class="col-sm-12 div-ul">-->
+		<!--    <div class="ibox">-->
+		<!--        <ul class="nav nav-pills"  >-->
+		<!--&lt;!&ndash;            <li class="ac"><a href="#post1" style="color: #1a1a1a">基本信息</a></li>&ndash;&gt;-->
+		<!--&lt;!&ndash;            <li><a href="#post2" style="color: #1a1a1a">岗位变更信息</a></li>&ndash;&gt;-->
+		<!--&lt;!&ndash;            <li><a href="#post3" style="color: #1a1a1a">其他信息</a></li>&ndash;&gt;-->
+		<!--            <div class="layui-layer-btn layui-layer-btn-" style="text-align: right;background: #ffffff;border-top: 0px">-->
+		<!--                <a class="layui-layer-btn0" shiro:hasPermission="ahrs:personnel:edit" href="javascript:void(0)" onclick="submitHandler()">保存</a>-->
+		<!--                <a class="layui-layer-btn1" shiro:hasPermission="ahrs:personnel:edit" href="javascript:void(0)" onclick="$.form.reset()">重置</a>-->
+		<!--            </div>-->
+		<!--        </ul>-->
+		<!--    </div>-->
+		<!--</div>-->
+		<div class="bg-9ac">
+			<form class="form-horizontal" id="form-personnel-edit" th:object="${personnel}">
+				<input name="personnelId" th:field="*{personnelId}" type="hidden">
+				<input name="version" th:field="*{version}" type="hidden">
+
+				<input name="photo" th:field="*{photo}" type="hidden">
+				<input name="deptId" th:field="*{deptId}" type="hidden" id="treeId">
+				<input name="attachment" id="attachment" type="hidden" th:field="*{attachment}">
+				<input name="createBy" th:field="*{createBy}" type="hidden">
+				<input name="createTime" type="hidden" th:value="${#dates.format(personnel.createTime, 'yyyy-MM-dd HH:mm:ss')}">
+        <input name="updateBy" th:field="*{updateBy}" type="hidden">
+        <input name="updateTime"  type="hidden" th:value="${#dates.format(personnel.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
+
+        <input name="currentPostGrades" type="hidden" id="currentPostGrades" th:field="*{currentPostGrades}">
+        <input name="additionalPostGrades" type="hidden" id="additionalPostGrades" th:field="*{additionalPostGrades}">
+        <!-- 基本信息 -->
+        <div class="add-block">
+          <div id="post1" style="height: 24px"></div>
+          <div class="is-row-title flex align-center">
+              <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
+              <span class="ft-20 font-weight color-333">基本信息</span>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>单位</label>
+                      <input class="form-control" type="text" name="deptName" id="treeName"  th:field="*{deptName}" required readonly disabled>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""  >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>姓名</label>
+                      <input name="name" placeholder="请输入人员姓名"  th:field="*{name}" class="form-control" type="text" maxlength="30" required readonly>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>身份证号</label>
+                      <input name="idcard" placeholder="请输入身份证号" class="form-control" th:field="*{idcard}"  type="text" maxlength="30" required onblur="getBirthdayAndSexByIdNO(this.value)" readonly >
+                  </div>
+              </div>
+              <div class="col-sm-3" style="text-align: right;">
+                  <div class="flex flex-direction align-center" style="height: 80px" >
+                      <p><img  style="width:100px;height:140px;"  id="photo1" th:src="(${#strings.isEmpty(personnel.photo)}) ? @{/img/add_photo_img.png} : @{*{photo}}"></p>
+                      <p class="btn-border-blue" style="margin-top: 10px;padding: 0 10px;"><a href="javascript:photo()"  style="text-align: center;color: #4377FE;">新增头像</a></p>
+                  </div>
+              </div>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>性别</label>
+                      <select name="sex" id="sex" class="form-control" th:with="type=${@dict.getType('sys_user_sex')}" required readonly disabled>
+                          <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"  th:field="*{sex}"></option>
+                      </select>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>年龄</label>
+                      <input name="age" id="age" placeholder="请输入年龄" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="form-control" type="text" th:field="*{age}" maxlength="30"  readonly>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>身份证出生年月</label>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="birthTime" id="birthTime" class="form-control" placeholder="请选择身份证出生年月" type="text" th:value="${#dates.format(personnel.birthTime, 'yyyy-MM-dd')}"  required readonly disabled>
+                      </div>
+                  </div>
+              </div>
+
+          </div>
+          <div class="row">
+              <div class="col-sm-3"  id="sub" th:if="${deptCategory} eq '3' and ${pack} eq'Y'">
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">子单位</span></label>
+                      <select name="sonDept" id="sonDept" class="form-control"
+                              th:with="type=${@dict.getTypeByDictParentValue('dept_pack',deptId)}"  readonly>
+                          <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                  th:value="${dict.dictValue}"  th:field="*{sonDept}"></option>
+                      </select>
+                  </div>
+              </div>
+          </div>
+        </div>
+
+        <!-- 岗位信息 -->
+        <div class="add-block" style="padding-bottom: 24px;">
+          <div id="post2" style="height: 24px"></div>
+          <div class="is-row-title flex align-center">
+              <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
+              <span class="ft-20 font-weight color-333">岗位信息</span>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>现任岗位</label>
+                      <input id="currentPostTypeId" name="currentPostType" type="hidden"  th:field="*{currentPostType}">
+                      <input class="form-control" type="text"   placeholder="请选择现任岗位"  th:value="${@dict.getLabel('per_post_type','__*{currentPostType}__')}" onclick="selectDataTree('per_post_type','currentPostTypeId','currentPostTypeName')" id="currentPostTypeName" style="background-color: #eee" readonly disabled>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>现任岗位认定备案时间</label><br>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="currentPostTime" class="form-control" placeholder="请选择现任岗位认定备案时间" type="text" th:value="${#dates.format(personnel.currentPostTime, 'yyyy-MM-dd')}"  readonly disabled>
+                      </div>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span name="leadershipPosStyle"></span><span name="leadershipPosStyle2">领导职务</span></label>
+                      <input name="leadershipPos" placeholder="请输入领导职务" class="form-control" type="text" maxlength="30" th:field="*{leadershipPos}"  readonly >
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>领导职务时间</label><br>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="leadershipPosTime" class="form-control" placeholder="请选择领导职务时间" type="text" th:value="${#dates.format(personnel.leadershipPosTime, 'yyyy-MM-dd')}"  readonly disabled>
+                      </div>
+                  </div>
+              </div>
+          </div>
+
+          <div class="row" style="margin-bottom: 0;">
+              <div class="col-sm-3"   th:if="${deptLevel} == '2'" >
+                  <div class="" >
+                      <label>职员等级</label>
+                      <select name="staffGrades" class="form-control" th:with="type=${@dict.getType('staff_grades')}" required readonly disabled>
+                          <option value="">无</option>
+                          <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"  th:field="*{staffGrades}" ></option>
+                      </select>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>兼任岗位</label>
+                      <input id="additionalPostTypeId" name="additionalPostType" type="hidden" th:field="*{additionalPostType}">
+                      <input class="form-control" type="text"  placeholder="请选择兼任岗位"  th:value="${@dict.getLabel('per_post_type','__*{additionalPostType}__')}" onclick="selectDataTree('per_post_type_add','additionalPostTypeId','additionalPostTypeName')" id="additionalPostTypeName" style="background-color: #eee" readonly disabled>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>兼任岗位认定备案时间</label>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="additionalPostTime" class="form-control" placeholder="请选择兼任岗位认定备案时间" type="text" th:value="${#dates.format(personnel.additionalPostTime, 'yyyy-MM-dd')}" readonly disabled>
+                      </div>
+                  </div>
+              </div>
+          </div>
+        </div>
+        <!-- 其他信息 -->
+        <div class="add-block" style="padding: 24px;">
+          <div class="is-row-title flex align-center">
+              <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
+              <span class="ft-20 font-weight color-333">其他信息</span>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>民族</label>
+                      <select name="national" class="form-control" th:with="type=${@dict.getType('per_national')}">
+                          <option value="">无</option>
+                          <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"  th:field="*{national}"></option>
+                      </select>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>政治面貌</label><br>
+                      <select name="politicalLandscape" class="form-control" th:with="type=${@dict.getType('per_political_landscape')}">
+                          <option value="">无</option>
+                          <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{politicalLandscape}"></option>
+                      </select>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>籍贯</label><br>
+                      <input id="nativePlaceId" name="nativePlace" type="hidden" th:field="*{nativePlace}">
+                      <input class="form-control" type="text"  placeholder="请选择籍贯"  th:value="${@dict.getLabel('dept_administrative_zones','__*{nativePlace}__')}"  onclick="selectDataTree('dept_administrative_zones','nativePlaceId','nativePlaceName')" id="nativePlaceName" style="background-color: white" readonly>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>健康状况</label><br>
+                      <input id="healthId" name="health" type="hidden"  th:field="*{health}">
+                      <input class="form-control" type="text"  placeholder="请选择健康状况"  th:value="${@dict.getLabel('per_health','__*{health}__')}"  onclick="selectDataTree('per_health','healthId','healthName')" id="healthName" style="background-color: white" readonly>
+                  </div>
+              </div>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>婚姻状况</label><br>
+                      <input id="maritalStatusId" name="maritalStatus" type="hidden" th:field="*{maritalStatus}" required>
+                      <input class="form-control" type="text"  placeholder="请选择婚姻状况"  th:value="${@dict.getLabel('per_marital_status','__*{maritalStatus}__')}" onclick="selectDataTree('per_marital_status','maritalStatusId','maritalStatusName')" id="maritalStatusName" style="background-color: white" readonly >
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>进入本单位方式</label><br>
+                      <input id="enterWayId" name="enterWay" type="hidden"  th:field="*{enterWay}">
+                      <input class="form-control" type="text"  placeholder="请选择进入本单位方式"  th:value="${@dict.getLabel('per_enter_way','__*{enterWay}__')}" onclick="selectDataTree('per_enter_way','enterWayId','enterWayName')" id="enterWayName" style="background-color: #eee" readonly disabled>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>进入本单位备案时间</label>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="enterTime" class="form-control" placeholder="请选择进入本单位备案时间" type="text" th:value="${#dates.format(personnel.enterTime, 'yyyy-MM-dd')}" readonly disabled>
+                      </div>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>脱离本单位方式</label><br>
+                      <input id="outWayId" name="outWay" type="hidden"  th:field="*{outWay}">
+                      <input class="form-control" type="text"  placeholder="请选择脱离本单位方式"  th:value="${@dict.getLabel('per_out_way','__*{outWay}__')}" onclick="selectDataTree('per_out_way','outWayId','outWayName')" id="outWayName" style="background-color: #eee" readonly disabled>
+                  </div>
+              </div>
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>脱离本单位备案时间</label>
+                      <div class="input-group date">
+                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                          <input name="outTime" class="form-control" placeholder="请选择脱离本单位备案时间" type="text" th:value="${#dates.format(personnel.outTime, 'yyyy-MM-dd')}" readonly disabled>
+                      </div>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>职称</label>
+                      <input name="title" placeholder="请输入职称" class="form-control" type="text" maxlength="30" th:field="*{title}"  readonly >
+                  </div>
+              </div>
+              <!--            <div class="col-sm-3" >-->
+              <!--                <div class=""   >-->
+              <!--                    <label>专业技术人员专业类别</label>-->
+              <!--                    <input id="professionalCategoryId" name="professionalCategory" type="hidden"  th:field="*{professionalCategory}">-->
+              <!--                    <input class="form-control" type="text"  th:value="${@dict.getLabel('per_professional_category','__*{professionalCategory}__')}"id="professionalCategoryName" style="background-color: #eee" readonly disabled>-->
+              <!--                </div>-->
+              <!--            </div>-->
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label ><span style="color: red;margin-right: 5px; ">*</span>人员类别</label>
+                      <input id="personnelCategoryId" name="personnelCategory" type="hidden" th:field="*{personnelCategory}" required>
+                      <input class="form-control" type="text"  placeholder="请选择人员类别"  th:value="${@dict.getLabel('per_category','__*{personnelCategory}__')}" onclick="selectDataTree('per_category','personnelCategoryId','personnelCategoryName')" id="personnelCategoryName" style="background-color: #eee" readonly disabled>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>人员状态</label>
+                      <input id="personnelStatusId" name="personnelStatus" type="hidden" th:field="*{personnelStatus}" required>
+                      <input class="form-control" type="text"  placeholder="请选择人员状态"  th:value="${@dict.getLabel('per_status','__*{personnelStatus}__')}" onclick="selectDataTree('per_status','personnelStatusId','personnelStatusName')" id="personnelStatusName" style="background-color: #eee" readonly required disabled>
+                  </div>
+              </div>
+
+          </div>
+          <div class="row">
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label>是否港澳台及外籍人士</label><br>
+                      <div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
+                          <input type="radio" th:id="${'foreigner_' + dict.dictCode}" name="foreigner" th:value="${dict.dictValue}"  th:field="*{foreigner}">
+                          <label th:for="${'foreigner_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
+                      </div>
+                  </div>
+              </div>
+              <div class="col-sm-3" >
+                  <div class=""   >
+                      <label >特殊人才</label><br>
+                      <div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
+                          <input type="radio" th:id="${'specialTalent_' + dict.dictCode}" name="specialTalent" th:value="${dict.dictValue}"   th:field="*{specialTalent}">
+                          <label th:for="${'specialTalent_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
+                      </div>
+                  </div>
+              </div>
+          </div>
+          <div class="row">
+              <div class="col-sm-6">
+                  <div class="" style="width: 100%;">
+                      <label>备注</label><br>
+                      <div>
+                          <textarea name="remark" maxlength="500"  placeholder="请输入备注"  class="form-control" rows="1"  th:field="*{remark}"></textarea>
+                      </div>
+                  </div>
+              </div>
+              <div class="col-sm-6">
+                  <div class="form-group" style="width: 100%;">
+                      <label>附件</label>
+                      <div class="input-group col-sm-8" style="width: 100% ">
+                          <input type="text" class="form-control" οnkeydοwn="return false;" οnpaste="return false;"
+                                style="font-size: 0px">
+                          <label class="input-group-btn" style="display: none" id="trasch">
+                              <button type="button" class="btn btn-none-color absolute-fixed-right" style="position: absolute;" onclick="removeFile()">
+                                <span class="glyphicon glyphicon-remove"></span>
+                              </button>
+                          </label>
+                          <input type="file" style="display: none;" id="fileUpload" class="file" multiple
+                                accept=".pdf,.png,.jpg"
+                                onchange="uploadPDFOrImgFiles('fileUpload','attachment','annex1','trasch')">
+                          <label class="input-group-btn">
+                          <span class="btn btn-primary bg-color-blue border-color-blue flex align-center" style="margin-left: 17px;" onclick="uploadFileCheck('fileUpload','annex1')">
+                              <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-folder2-open" viewBox="0 0 16 16" style="margin-right: 6px;">
+                                <path d="M1 3.5A1.5 1.5 0 0 1 2.5 2h2.764c.958 0 1.76.56 2.311 1.184C7.985 3.648 8.48 4 9 4h4.5A1.5 1.5 0 0 1 15 5.5v.64c.57.265.94.876.856 1.546l-.64 5.124A2.5 2.5 0 0 1 12.733 15H3.266a2.5 2.5 0 0 1-2.481-2.19l-.64-5.124A1.5 1.5 0 0 1 1 6.14V3.5zM2 6h12v-.5a.5.5 0 0 0-.5-.5H9c-.964 0-1.71-.629-2.174-1.154C6.374 3.334 5.82 3 5.264 3H2.5a.5.5 0 0 0-.5.5V6zm-.367 1a.5.5 0 0 0-.496.562l.64 5.124A1.5 1.5 0 0 0 3.266 14h9.468a1.5 1.5 0 0 0 1.489-1.314l.64-5.124A.5.5 0 0 0 14.367 7H1.633z"/>
+                              </svg>
+                              选择
+                          </span>
+                          </label>
+                          <a id="annex1" style=" font-size: 14px;position: absolute;top: 10px;left:20px; z-index: 10;width: 65%;overflow: hidden;
+                          text-overflow:ellipsis;white-space: nowrap" onclick="openFile()"></a>
+                      </div>
+                  </div>
+              </div>
+          </div>
+        </div>
+        <!-- 岗位变更信息 -->
+        <div class="add-block">
+          <div id="post3" style="height: 24px"></div>
+          <div class="is-row-title flex align-center">
+              <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
+              <span class="ft-20 font-weight color-333">岗位变更信息</span>
+          </div>
+          <div class="ibox-content" style="border-bottom-left-radius: 12px;border-bottom-right-radius: 12px">
+            <iframe id="iframe1" frameborder="0"   name="iframe1" style="width: 100%;height: 700px" src=""></iframe>
+          </div>
+        </div>
+        <!-- 历史修改信息 -->
+        <div class="add-block">
+          <div id="post4" style="height: 24px"></div>
+          <div class="is-row-title flex align-center">
+              <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
+              <span class="ft-20 font-weight color-333">历史修改信息</span>
+          </div>
+          <div class="">
+              <div class="ibox-content" style="border-bottom-left-radius: 12px;border-bottom-right-radius: 12px">
+                  <iframe id="iframe2" frameborder="0" name="iframe2" style="width: 100%;height: 700px" src=""></iframe>
+              </div>
+          </div>
+        </div>
+        <div id="post5" style="height: 0px">
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: datetimepicker-js" />
+<script th:src="@{/js/activiti.js}"></script>
+<script th:inline="javascript">
+    var prefix = ctx + "ahrs/personnel";
+    var personnelId=$("#personnelId").val();
+    var deptpack = [[${pack}]];
+    var idcard = $("#idcard").val();
+    var jianyuan = [[${jianyuan}]];
+
+
+    var c1_top = $("#post1").offset().top;
+    var c2_top = $("#post2").offset().top - 120;
+    var c3_top = $("#post3").offset().top - 100;
+    var c4_top = $("#post4").offset().top + 200;
+    var c5_top = $("#post5").offset().top + 100;
+    function ScollPostion() {
+        var t, l, w, h;
+        if (document.documentElement && document.documentElement.scrollTop) {
+            t = document.documentElement.scrollTop;
+            l = document.documentElement.scrollLeft;
+            w = document.documentElement.scrollWidth;
+            h = document.documentElement.scrollHeight;
+        } else if (document.body) {
+            t = document.body.scrollTop;
+            l = document.body.scrollLeft;
+            w = document.body.scrollWidth;
+            h = document.body.scrollHeight;
+        }
+        return {
+            top: t,
+            left: l,
+            width: w,
+            height: h
+        };
+    }
+
+    $(window).scroll(function () {
+        var scroll_top = ScollPostion();
+        scroll_top = scroll_top.top;
+
+        // console.log(scroll_top);
+        // console.log("111==="+c1_top);
+        // console.log("222==="+c2_top);
+        // console.log("333==="+c3_top);
+        // console.log("444==="+c4_top);
+        // console.log("boolean==="+c3_top <= scroll_top  && scroll_top < c4_top);
+        if (c1_top <= scroll_top && scroll_top < c2_top) {
+            parent.jbxx();
+        }
+        else if (c2_top <= scroll_top && scroll_top < c3_top) {
+            parent.gwxx();
+        }
+        else if (c3_top<= scroll_top  && scroll_top < c4_top){
+            parent.gwbg();
+        }
+        else if (c4_top <= scroll_top && scroll_top < c5_top) {
+            parent.lxxg();
+        }
+
+    });
+
+    $(function setIframe() {
+        $("#iframe1").attr("src",prefix + "/personnelPostChangeHistory/" + idcard);
+    });
+
+    $(function setIframe2() {
+        $("#iframe2").attr("src", prefix + "/personnelChangeHistory?idcard=" + idcard+"&jianyuan="+jianyuan);
+    });
+
+    function  f1() {
+        // document.querySelector("#post1").scrollIntoView(true);
+        $('#post1')[0].scrollIntoView(true);
+    }
+    function  f2() {
+        // document.querySelector("#post2").scrollIntoView(true);
+        $('#post2')[0].scrollIntoView(true);
+    }
+    function  f3() {
+        // document.querySelector("#post3").scrollIntoView(true);
+        $('#post3')[0].scrollIntoView(true);
+    }
+
+    function f4() {
+        // document.querySelector("#post3").scrollIntoView(true);
+        $('#iframe2')[0].scrollIntoView(true);
+    }
+
+
+    $("#form-personnel-edit").validate({
+        focusCleanup: true
+    });
+
+
+    function abc(ph) {
+        $("#photo1").attr("src",ph);
+        $("#photo").val(ph);
+    }
+    function photo() {
+        var url = ctx + 'ahrs/personnel/addphoto';
+        $.modal.open("修改照片", url);
+    }
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            $.operate.save(prefix + "/edit", getFormData());
+        }
+    }
+
+    function getFormData() {
+        $(".form-control").removeAttr("disabled");
+        $(".radio-box input").removeAttr("disabled");
+        var data = $('#form-personnel-edit').serialize();
+        return data;
+    }
+
+    $("input[name='birthTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='enterTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='additionalPostTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='currentPostTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='leadershipPosTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='workingTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='firstEducationGraduationTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='highestEducationGraduationTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='qualificationTime']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    /*字典数据-字典树状数据*/
+    function selectDataTree(dictType, dictId, dictText) {
+        if (dictId == "additionalPostTypeId") {
+            //获取现任岗位  如果现任岗位不是管理岗位就不能选择兼任岗位
+            var xrgw = $("#currentPostTypeId").val();
+            if (xrgw == "") {
+                $.modal.msgWarning("请选择现任岗位!");
+                return;
+            } else {
+                if (xrgw.substring(0, 2) != "01") {
+                    $.modal.msgWarning("只有现任岗位为管理岗位才能选择兼任岗位!");
+                    return;
+                }
+            }
+        }
+        layer.open({
+            type: 2,
+            maxmin: true,
+            shade: 0.3,
+            title: '字典数据选择',
+            fix: false,
+            area: ['380px', '500px'],
+            content: ctx + "system/data/selectDataTree/" + dictType,
+            shadeClose: true,
+            success: function (layero, index) {
+                var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法
+                iframeWin.dictInputId = dictId;
+                iframeWin.dictInputText = dictText;
+                iframeWin.index = index;
+            }
+        });
+    }
+
+
+    $(function () {
+        let lis = document.querySelectorAll('li');
+        for (var i = 0; i < lis.length; i++) {
+            lis[i].onclick = function (e) {
+                let li = document.getElementsByClassName('ac')[0];
+                li.classList.remove('ac')
+                e.target.classList.add('ac')
+            }
+        }
+    });
+
+    function removeFile(){
+        $('#annex1').text(null);
+        $('#trasch').css('display','none');
+        $('#fileUpload').val('fileUrl',null);
+        $('#attachment').val(null);
+
+    }
+    $(function () {
+        var attachment = $("#attachment").val();
+        if (attachment != '') {
+            $("#annex1").text(getFileName(attachment));
+            var url = encodeURI(attachment, "utf-8");
+            $("#annex1").attr("onclick", 'openPDF(\'' + url + '\')');
+            if (getFileName(attachment).length != 0) {
+                $("#trasch").css("display", "block")
+                $("#annex1").css("width", "65%")
+            }
+        }
+
+        //页面加载时判断领导职务是否必填
+        var xrgw = $("#currentPostTypeId").val();
+        //现任岗位不为空并且长度等于9并且是0102开头并且管理岗位等级大于等于6级(注:5>6)并且不是必填
+        if (xrgw != "" && xrgw.length == 9 && xrgw.substring(0, 4) == '0102' && (xrgw.substring(xrgw.length - 2, xrgw.length)) <= 6
+            && !$("input[name='leadershipPos']").hasClass('required')) {
+            //修改样式
+            $("span[name='leadershipPosStyle']").css("color", "red");
+            $("span[name='leadershipPosStyle']").text("*");
+            $("span[name='leadershipPosStyle2']").text("领导职务:");
+            $("input[name='leadershipPos']").addClass('required');
+        }
+
+    })
+
+
+    function openFile() {
+        var attachment = $("#attachment").val();
+        window.open('/pdfjs/web/viewer.html?file=' + encodeURIComponent("/pdfStreamHandeler?url=" + attachment));
+    }
+</script>
+</body>
+</html>

+ 31 - 30
ruoyi-system/src/main/resources/templates/ahrs/personnel/editPart.html

@@ -130,33 +130,33 @@
               <span class="ft-20 font-weight color-333">基本信息</span>
           </div>
           <div class="row">
-              <div class="col-sm-3" >
+              <div class="col-sm-5" >
                   <div class=""   >
                       <label><span style="color: red;margin-right: 5px; ">*</span>单位</label>
                       <input class="form-control" type="text" name="deptName" id="treeName"  th:field="*{deptName}" required readonly disabled>
                   </div>
               </div>
-              <div class="col-sm-3" >
+              <div class="col-sm-5" >
                   <div class=""  >
                       <label><span style="color: red;margin-right: 5px; ">*</span>姓名</label>
                       <input name="name" placeholder="请输入人员姓名"  th:field="*{name}" class="form-control" type="text" maxlength="30" required readonly>
                   </div>
               </div>
-              <div class="col-sm-3" >
-                  <div class=""   >
-                      <label><span style="color: red;margin-right: 5px; ">*</span>身份证号</label>
-                      <input name="idcard" placeholder="请输入身份证号" class="form-control" th:field="*{idcard}"  type="text" maxlength="30" required onblur="getBirthdayAndSexByIdNO(this.value)" readonly >
-                  </div>
-              </div>
-              <div class="col-sm-3" style="text-align: right;">
+              <div class="col-sm-2" style="text-align: right;">
                   <div class="flex flex-direction align-center" style="height: 80px" >
-                      <p><img  style="width:100px;height:140px;"  id="photo1" th:src="(${#strings.isEmpty(personnel.photo)}) ? @{/img/add_photo_img.png} : @{*{photo}}"></p>
+                      <p><img  style="width:160px;height:225px;"  id="photo1" th:src="(${#strings.isEmpty(personnel.photo)}) ? @{/img/add_photo_img.png} : @{*{photo}}"></p>
                       <p class="btn-border-blue" style="margin-top: 10px;padding: 0 10px;"><a href="javascript:photo()"  style="text-align: center;color: #4377FE;">新增头像</a></p>
                   </div>
               </div>
           </div>
           <div class="row">
-              <div class="col-sm-3" >
+              <div class="col-sm-5" >
+                  <div class=""   >
+                      <label><span style="color: red;margin-right: 5px; ">*</span>身份证号</label>
+                      <input name="idcard" placeholder="请输入身份证号" class="form-control" th:field="*{idcard}"  type="text" maxlength="30" required onblur="getBirthdayAndSexByIdNO(this.value)" readonly >
+                  </div>
+              </div>
+              <div class="col-sm-5" >
                   <div class=""   >
                       <label><span style="color: red;margin-right: 5px; ">*</span>性别</label>
                       <select name="sex" id="sex" class="form-control" th:with="type=${@dict.getType('sys_user_sex')}" required readonly disabled>
@@ -164,25 +164,26 @@
                       </select>
                   </div>
               </div>
-              <div class="col-sm-3" >
-                  <div class=""   >
-                      <label>年龄</label>
-                      <input name="age" id="age" placeholder="请输入年龄" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="form-control" type="text" th:field="*{age}" maxlength="30"  readonly>
-                  </div>
-              </div>
-              <div class="col-sm-3" >
-                  <div class=""   >
-                      <label><span style="color: red;margin-right: 5px; ">*</span>身份证出生年月</label>
-                      <div class="input-group date">
-                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                          <input name="birthTime" id="birthTime" class="form-control" placeholder="请选择身份证出生年月" type="text" th:value="${#dates.format(personnel.birthTime, 'yyyy-MM-dd')}"  required readonly disabled>
-                      </div>
-                  </div>
-              </div>
-
           </div>
           <div class="row">
-              <div class="col-sm-3"  id="sub" th:if="${deptCategory} eq '3' and ${pack} eq'Y'">
+            <div class="col-sm-5" >
+              <div class=""   >
+                    <label>年龄</label>
+                    <input name="age" id="age" placeholder="请输入年龄" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="form-control" type="text" th:field="*{age}" maxlength="30"  readonly>
+                </div>
+            </div>
+            <div class="col-sm-5" >
+                <div class=""   >
+                    <label><span style="color: red;margin-right: 5px; ">*</span>身份证出生年月</label>
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="birthTime" id="birthTime" class="form-control" placeholder="请选择身份证出生年月" type="text" th:value="${#dates.format(personnel.birthTime, 'yyyy-MM-dd')}"  required readonly disabled>
+                    </div>
+                </div>
+            </div>
+          </div>
+          <div class="row">
+              <div class="col-sm-5"  id="sub" th:if="${deptCategory} eq '3' and ${pack} eq'Y'">
                   <div class=""   >
                       <label><span style="color: red;margin-right: 5px; ">子单位</span></label>
                       <select name="sonDept" id="sonDept" class="form-control"
@@ -451,13 +452,13 @@
               <div style=" width:4px;height:18px; margin-right: 12px;background: #4377FE;"></div>
               <span class="ft-20 font-weight color-333">历史修改信息</span>
           </div>
-          <div class="col-sm-12">
+          <div class="">
               <div class="ibox-content" style="border-bottom-left-radius: 12px;border-bottom-right-radius: 12px">
                   <iframe id="iframe2" frameborder="0" name="iframe2" style="width: 100%;height: 700px" src=""></iframe>
               </div>
           </div>
         </div>
-        <div id="post5" style="height: 100px">
+        <div id="post5" style="height: 0px">
         </div>
     </form>
 </div>