| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <!-- 人事信息 -->
- <html>
- <head>
- <title>员工人事信息表</title>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script src="plug-in/layer/layer.js"></script>
- <script>
- $(function(){
- // 合同是否到期提醒
- var ifremindVal = $("#ifremind").val();
- // 是否续签合同
- var ifrenewedVal = $("#ifrenewed").val();
- // 是否自动转正
- var autoCorrectionVal = $("#autoCorrection").val();
- // 是否缴金人员
- var ifpaymentVal = $("#ifpayment").val();
-
- if(1 == ifremindVal) {
- $("#ifremindYes").attr("checked", true);
- }
-
- if(1 == ifrenewedVal) {
- $("#ifrenewedYes").attr("checked", true);
- }
-
- if(1 == autoCorrectionVal) {
- $("#autoCorrectionYes").attr("checked", true);
- } else {
- $("#autoCorrectionNo").attr("checked", true);
- }
-
- if(1 == ifpaymentVal) {
- $("#ifpaymentYes").attr("checked", true);
- } else {
- $("#ifpaymentNo").attr("checked", true);
- }
-
- $("#dutieslevel").val("${personnelInfo.dutieslevel}")
-
- })
-
- function autoCorrectionNoOnClick() {
- if($("#autoCorrectionYes").attr("checked")) {
- $("#autoCorrectionYes").attr("checked", false);
- $("#autoCorrectionNo").attr("checked", true);
- } else {
- $("#autoCorrectionYes").attr("checked", true);
- $("#autoCorrectionNo").attr("checked", false);
- }
- }
-
- function autoCorrectionYesOnClick() {
- if($("#autoCorrectionNo").attr("checked")) {
- $("#autoCorrectionYes").attr("checked", true);
- $("#autoCorrectionNo").attr("checked", false);
-
- } else {
- $("#autoCorrectionYes").attr("checked", false);
- $("#autoCorrectionNo").attr("checked", true);
- }
- }
-
- function ifpaymentNoOnClick() {
- if($("#ifpaymentYes").attr("checked")) {
- $("#ifpaymentYes").attr("checked", false);
- $("#ifpaymentNo").attr("checked", true);
- } else {
- $("#ifpaymentYes").attr("checked", true);
- $("#ifpaymentNo").attr("checked", false);
- }
- }
-
- function ifpaymentYesOnClick() {
- if($("#ifpaymentNo").attr("checked")) {
- $("#ifpaymentYes").attr("checked", true);
- $("#ifpaymentNo").attr("checked", false);
- } else {
- $("#ifpaymentYes").attr("checked", false);
- $("#ifpaymentNo").attr("checked", true);
- }
- }
- // 职务选择
- function openDutiesSelect() {
- $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#belongDutiesid").val();
- $.dialog({content: 'url:dutiesController.do?departSelect&orgIds='+orgIds, zIndex: 2100, title: '职务列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDutiesSelect, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- ]}).zindex();
- }
- // 职务回调
- function callbackDutiesSelect() {
- var iframe = this.iframe.contentWindow;
- var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
- var nodes = treeObj.getCheckedNodes();
- // var nodes = treeObj.getSelectedNodes();
- // console.log(nodes);
- if(nodes.length>0){
- var ids='',names='';
- for(var i=0;i<nodes.length;i++){
- var node = nodes[i];
- ids += node.id+',';
- names += node.name+',';
- }
- ids = ids.substring(0,ids.length - 1);
- names = names.substring(0,names.length - 1);
- $("#dutiesName").val(names);
- $("#dutiesName").blur();
- $("#belongDutiesid").val(ids);
- }
- }
-
- function dutiesClean(){
- $("#belongDutiesid").val('');
- $("#dutiesName").val('');
- }
-
- // 岗位选择
- function openPostSelect() {
- $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#inPostid").val();
- $.dialog({content: 'url:projectPostDetailController.do?postSelectNoCheckBox&orgIds='+orgIds,
- zIndex:2100, title: '岗位列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackPostSelect, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- ]}).zindex();
- }
-
- // 岗位回调
- function callbackPostSelect() {
- var iframe = this.iframe.contentWindow;
- var treeObj = iframe.$.fn.zTree.getZTreeObj("postSelect");
- console.log(treeObj);
- var nodes = treeObj.getCheckedNodes(true);
- // var nodes = treeObj.getSelectedNodes(true);
- // console.log(nodes);
- if(nodes.length>0){
- var ids='',names='';
- for(i=0;i<nodes.length;i++){
- var node = nodes[i];
- ids += node.id+',';
- names += node.name+',';
- }
-
- ids = ids.substring(0,ids.length - 1);
- names = names.substring(0,names.length - 1);
- $("#postName").val(names);
- $("#postName").blur();
- $("#inPostid").val(ids);
- }
- }
-
- function postClean(){
- $("#postName").val('');
- $("#inPostid").val('');
- }
-
- // 根据合同期间设置试用期
- function probationCount() {
- var start = new Date($("#contractStime").val());
- var end = new Date($("#contractEtime").val());
- var year = (end-start)/(24*60*60*1000*365);
-
- if(year < 3) {
- $("#trialPeriod").val("1");
- }
- if(year >= 3) {
- $("#trialPeriod").val("3");
- }
- }
- //重新入职
- function reruzhi(){
- var start =$("#contractStime").val();
- var end = $("#contractEtime").val();
- if('${personnelInfo.positionStatus}' != '3'){
- alert("此员工已经是在职状态");
- return;
- }
- if('${personnelInfo.contractStime}' == start+' 00:00:00.0'){
- alert('请修改重新入职的日期${personnelInfo.contractStime}');
- return;
- }
-
- if('${personnelInfo.contractEtime}' == end+' 00:00:00.0'){
- alert("请修改重新入职的合同终止日期${personnelInfo.contractEtime}");
- return;
- }
-
- $.ajax({
- url:"personnelBaseArchivesManageController.do?reruzhi",
- type:"post",
- data: {
- ids : '${personnelInfo.id}',
- start : start,
- end : end
- },
- cache : false,
- success:function(aj){
- data=JSON.parse(aj);
- if (data.success) {
- layer.alert("重新入职成功");
- window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
- } else {
- layer.alert(data.msg);
- }
- }
- });
- }
-
- //重新入职
- function doLeave(){
- var leavedate =$("#leavedate").val();
-
- if(leavedate == null || leavedate == ''){
- alert("请填写离职日期");
- return;
- }
-
-
- $.ajax({
- url:"personnelBaseArchivesManageController.do?doLeave",
- async:true,
- type:"post",
- data: {
- ids : '${personnelInfo.id}',
- leavedate : leavedate
- },
- cache : false,
- success:function(aj){
- data=JSON.parse(aj);
- if (data.success) {
- layer.alert(data.msg);
- window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
- } else {
- layer.alert(data.msg);
- }
- }
- });
- }
-
-
- function btn_ok(){
-
- if($("#ifremindYes").attr("checked")) {
- $("#ifremind").val("1");
- } else {
- $("#ifremind").val("0");
- }
-
- if($("#ifrenewedYes").attr("checked")) {
- $("#ifrenewed").val("1");
- } else {
- $("#ifrenewed").val("0");
- }
-
- if($("#autoCorrectionYes").attr("checked")) {
- $("#autoCorrection").val("1");
- } else {
- $("#autoCorrection").val("0");
- }
-
- if($("#ifpaymentYes").attr("checked")) {
- $("#ifpayment").val("1");
- } else {
- $("#ifpayment").val("0");
- }
-
-
- if($("#trialPeriod").val() == 0) {
- if($("#positionStatus").val() == 1) {
- layer.alert("试用期限为【无】时,在职状态不能为【已入职】,请确认。");
- return ;
- }
- }
-
-
- $("#btnsub").click();
- }
-
- function callback(data){
- top.tip(data.msg)
- if(data.success) {
- window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
- }
- }
- function dataReload() {
- $.messager.confirm("确认", "确定要重置当前内容?所有内容将会恢复到编辑之前。", function (r) {
- if (r) {
- window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
- }
- });
- }
- </script>
- </head>
- <body>
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tipSweep="true" action="personnelBaseArchivesManageController.do?savePersonnelData" tiptype="1" callback="callback">
- <input id="id" name="id" type="hidden" value="${personnelInfo.id}"/>
- <input id="userid" name="userid" type="hidden" value="${personnelInfo.userid}"/>
- <input id="ifremind" name="ifremind" type="hidden" value="${personnelInfo.ifremind}"/>
- <input id="ifrenewed" name="ifrenewed" type="hidden" value="${personnelInfo.ifrenewed}"/>
- <input id="autoCorrection" name="autoCorrection" type="hidden" value="${personnelInfo.autoCorrection}"/>
- <input id="ifpayment" name="ifpayment" type="hidden" value="${personnelInfo.ifpayment}"/>
- <table cellpadding="0" cellspacing="1" class="formtable">
- <!--
- <tr>
- <td align="right" style="width:110px">
- <label class="Validform_label">
- 所属单位:
- </label>
- </td>
- <td class="value">
- <label>
- ${mainOrg}
- </label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- 兼职机构:
- </label>
- </td>
- <td class="value">
- <label>
- ${parttimeOrg}
- </label>
- </td>
- </tr>
- -->
- <tr>
- <td align="right" style="width:110px">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>所属职务:
- </label>
- </td>
- <td class="value">
- <input id="belongDutiesid" name="belongDutiesid" type="hidden" datatype="*" value="${personnelInfo.belongDutiesid}">
- <input id="dutiesName" name="dutiesName" type="text" style="width: 300px" ignore="ignore" onclick="openDutiesSelect()" value='${dutiesName}' placeholder="请输入所属职务"/>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDutiesSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="dutiesRedo" onclick="dutiesClean()">清空</a>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">所属职务</label>
- </td>
- </tr>
- <tr>
- <td align="right" style="width:110px">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>职务等级:
- </label>
- </td>
- <td class="value">
- <select id="dutieslevel" name="dutieslevel" style="width: 150px">
- <option value="3">三级(默认)</option>
- <option value="2">二级</option>
- <option value="1">一级</option>
- </select>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">职务等级</label>
- </td>
- </tr>
- <%--
- <tr>
- <td align="right">
- <label class="Validform_label">
- 所属岗位:
- </label>
- </td>
- <td class="value">
- <input id="inPostid" name="inPostid" type="hidden" value='${personnelInfo.inPostid}'/>
- <input id="postName" name="postName" type="text" style="width: 300px" ignore="ignore" onclick="openPostSelect()" value='${postName}' placeholder="请输入所属岗位"/>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="postSearch" onclick="openPostSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="postRedo" onclick="postClean()">清空</a>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">所属岗位</label>
- </td>
- </tr> --%>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>入职日期:
- </label>
- </td>
- <td class="value">
- <div style="display:inline">
- <input id="contractStime" name="contractStime" type="text" style="width: 120px" class="Wdate"
- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contractEtime\',{d:-1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractStime}' type="date" pattern="yyyy-MM-dd"/>'/>
- 入职时填写<b>(注意:请谨慎修改,此项影响工资核算)</b>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">入职日期</label>
- </div>
-
- <%--<input type="checkbox" id='ifremindYes' name='ifremindYes'><span>是否到期提醒</span>
- <input type="checkbox" id='ifrenewedYes' name='ifrenewedYes' ><span>是否续签合同</span> --%>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>合同期至:
- </label>
- </td>
- <td class="value">
- <div style="display:inline">
- <input id="contractEtime" name="contractEtime" type="text" style="width: 120px" class="Wdate"
- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contractStime\', {d:1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractEtime}' type="date" pattern="yyyy-MM-dd"/>'/>
- 续签合同时,修改此项
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">合同结束时间</label>
- </div>
- </td>
- </tr>
- <tr>
- <!-- <td align="right"> -->
- <!-- <label class="Validform_label"> -->
- <!-- <span color="red" class="requiredIcon">*</span>合同有效期间: -->
- <!-- </label> -->
- <!-- </td> -->
- <!-- <td class="value"> -->
- <!-- <div style="display:inline"> -->
- <!-- <input id="contractStime" name="contractStime" type="text" style="width: 120px" class="Wdate" -->
- <%-- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contractEtime\',{d:-1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractStime}' type="date" pattern="yyyy-MM-dd"/>'/> --%>
- <!-- ~ -->
- <!-- <span class="Validform_checktip"></span> -->
- <!-- <label class="Validform_label" style="display: none;">合同开始时间</label> -->
- <!-- </div> -->
- <!-- <div style="display:inline"> -->
- <!-- <input id="contractEtime" name="contractEtime" type="text" style="width: 120px" class="Wdate" -->
- <%-- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contractStime\', {d:1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractEtime}' type="date" pattern="yyyy-MM-dd"/>'/> --%>
- <!-- <span class="Validform_checktip"></span> -->
- <!-- <label class="Validform_label" style="display: none;">合同结束时间</label> -->
- <!-- </div> -->
- <input type="checkbox" id='ifremindYes' name='ifremindYes'><span>是否到期提醒</span>
- <input type="checkbox" id='ifrenewedYes' name='ifrenewedYes' ><span>是否续签合同</span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <font color="#FF0000"></font>在职状态:
- </label>
- </td>
- <td class="value">
- <c:if test="${personnelInfo.positionStatus !=null && personnelInfo.positionStatus !=''}">
- <t:dictSelect readonly="readonly" field="positionStatus" id="positionStatus" type="list" typeGroupCode="jobStatus" defaultVal="${personnelInfo.positionStatus}" hasLabel="false" datatype="*" title="在职状态"></t:dictSelect>
- </c:if>
- <c:if test="${personnelInfo.positionStatus ==null || personnelInfo.positionStatus ==''}">
- <t:dictSelect field="positionStatus" id="positionStatus" type="list" typeGroupCode="jobStatus" hasLabel="false" datatype="*" title="在职状态"></t:dictSelect>
- </c:if>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">在职状态</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>员工类型:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="userType" id="userType" type="list" typeGroupCode="staffType" defaultVal="${personnelInfo.userType}" hasLabel="false" datatype="*" title="员工类型"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">员工类型</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>是否自动转正:
- </label>
- </td>
- <td class="value">
- <input type="checkbox" id='autoCorrectionYes' name='autoCorrectionYes' onClick="autoCorrectionYesOnClick()"><span>是</span>
- <input type="checkbox" id='autoCorrectionNo' name='autoCorrectionNo' onClick="autoCorrectionNoOnClick()"><span>否</span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>试用期限:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="trialPeriod" id="trialPeriod" type="list" typeGroupCode="shiyongqi" datatype="*" defaultVal="${personnelInfo.trialPeriod}" hasLabel="false" title="试用期限"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">试用期限</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>是否为缴金人员:
- </label>
- </td>
- <td class="value">
- <input type="checkbox" id='ifpaymentYes' name='ifpaymentYes' onClick="ifpaymentYesOnClick()"><span>是</span>
- <input type="checkbox" id='ifpaymentNo' name='ifpaymentNo' onClick="ifpaymentNoOnClick()"><span>否</span>
- </td>
- </tr>
- <%--
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>管理类型:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="managerType" id="managerType" type="list" typeGroupCode="manageType" datatype="*" defaultVal="${personnelInfo.managerType}" hasLabel="false" title="管理类型"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">管理类型</label>
- </td>
- </tr>
- --%>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <font color="#FF0000"></font>离职日期:
- </label>
- </td>
- <td class="value">
- <div style="display:inline">
- <input id="leavedate" name="leavedate" type="text" style="width: 120px" class="Wdate"
- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'leavedate\',{d:-1})}'})" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.leaveDate}' type="date" pattern="yyyy-MM-dd"/>'/>
- 离职登记时填写
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">离职日期</label>
- </div>
-
- <%--<input type="checkbox" id='ifremindYes' name='ifremindYes'><span>是否到期提醒</span>
- <input type="checkbox" id='ifrenewedYes' name='ifrenewedYes' ><span>是否续签合同</span> --%>
- </td>
- </tr>
- <tr>
- <td height="50px" align="center" colspan="4" >
- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">提交人事信息</a>
- <a style="margin-left:6px;" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-reload" onclick="reruzhi()">重新入职</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="doLeave" onclick="doLeave()">离职登记</a>
-
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
- </td>
-
- </tr>
- </table>
- </t:formvalid>
- </div>
- </div>
- </body>
- <script src = "webpage/cn/com/lzt/personnelbasearchivesmanage/personnelBaseArchivesManage.js"></script>
- </html>
|