| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814 |
- <%@ 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>
- <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
- <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
- <script src="plug-in/layer/layer.js"></script>
- </head>
- <%-- scroll="no"--%>
- <body style="overflow-x: hidden;">
- <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tipSweep="true"
- action="personnelBaseArchivesManageController.do?saveUser">
- <input id="id" name="id" type="hidden" value="${userInfo.id }">
- <table style="width: 600px; " cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right" width="25%" nowrap>
- <label class="Validform_label"><font color="#FF0000"></font>员工工号: </label>
- </td>
- <%-- datatype s2-10--%>
- <td class="value" width="85%">
- <c:if test="${userInfo.id!=null }"> ${userInfo.userNum } </c:if>
- <c:if test="${userInfo.id==null }">
- <input id="userNum" class="inputxt" name="userNum" value="${userInfo.userNum }" />
- <span class="Validform_checktip"> 员工工号范围在2~10位字符</span>
- </c:if>
- </td>
- </tr>
- <tr>
- <td align="right" width="10%" nowrap>
- <label class="Validform_label"><span color="red" class="requiredIcon">*</span>员工姓名: </label>
- </td>
- <td class="value" width="10%">
- <input id="realName" class="inputxt" name="realName" value="${userInfo.realName }" datatype="*">
- <span class="Validform_checktip"><t:mutiLang langKey="fill.realname"/></span>
- </td>
- <script>
- $(function () {
- $("input[id^='realName']").keypress(function (event) {
- const eobj = event || e;
- const keyCode = eobj.keyCode || eobj.charCode || e.which;
- if ((keyCode >= 48 && keyCode <= 57)) {
- layer.msg("员工姓名不能输入数字")
- eobj.preventDefault();
- } else {
- eobj.returnValue = true;
- }
- });
- });
- </script>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- 附件照片:
- </label>
- </td>
- <td class="value">
- <input id="imgUrl" name="image" type="hidden">
- <t:webUploader name="okpath" auto="true" callback="uploadSucc" showImgDiv="" type="image"
- buttonStyle="btn-green" fileNumLimit="1"
- url="cgUploadController.do?ajaxSaveFile"></t:webUploader>
- </td>
- <td colspan="2" id="instructionfile" class="value">
- <div id="fileShow"></div>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label"><span color="red" class="requiredIcon">*</span>性别: </label>
- </td>
- <td class="value">
- <t:dictSelect field="gender" id="gender" type="list" typeGroupCode="sex" defaultVal="${userInfo.gender}"
- 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"><font color="#FF0000"></font>民族: </label>
- </td>
- <td class="value">
- <t:dictSelect field="nation" id="nation" type="list" typeGroupCode="nation" defaultVal="hanzu"
- hasLabel="false" title="民族"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">民族</label>
- </td>
- </tr>
- <tr>
- <td align="right" nowrap>
- <label class="Validform_label"><span color="red" class="requiredIcon">*</span>手机号码: </label>
- </td>
- <td class="value">
- <input class="inputxt" name="mobilePhone" value="${userInfo.mobilePhone}" datatype="m"
- errormsg="手机号码不正确" userInfoValidType="t_s_user,mobilePhone,id">
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> 座机号码: </label></td>
- <td class="value">
- <input class="inputxt" name="officePhone" value="${userInfo.officePhone}"
- errormsg="座机号码不正确" ignore="ignore">
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> 紧急联系人: </label></td>
- <td class="value">
- <input class="inputxt" name="contacts" value="${userInfo.contacts}" ignore="ignore">
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"> 紧急联系人电话: </label></td>
- <td class="value">
- <input class="inputxt" name="contactsPhone" value="${userInfo.contactsPhone}"
- errormsg="手机号码不正确" ignore="ignore">
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label"><font color="#FF0000">*</font>身份证号码:</label>
- </td>
- <%-- s15-18--%>
- <td class="value">
- <input id="idcard" name="idcard" type="text" onfocusout="getBirthdayFromIdCard(this)"
- style="width: 149px" userInfoValidType="t_s_user,idcard,id" value='${userInfo.idcard}' datatype="*"
- placeholder="" errormsg="请填写正确的身份证号码!"/>
- <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">
- <%-- class="Wdate" datatype="date" value='<fmt:formatDate value='${userInfo.birthday}' type="date" pattern="yyyy-MM-dd"/>' readonly="readonly"--%>
- <input id="birthday" name="birthday" type="hidden" value='${userInfo.birthday}'/>
- <input id="birthday2" name="birthday2" type="text" datatype="*" style="width: 149px" disabled/>
- <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">
- <input id="age" name="age" type="hidden" value='${userInfo.age}'/>
- <input id="age2" name="age2" type="text" style="width: 149px" datatype="*" disabled/>
- <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="hkaddress" name="hkaddress" type="text" style="width: 200px" value='${userInfo.hkaddress}'
- placeholder="" ignore="ignore" errormsg="户口户籍最多填写100文字!"/>
- <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">
- <t:dictSelect field="hktype" id="hktype" type="list" typeGroupCode="hktype"
- defaultVal="${userInfo.hktype}" 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">居住地址: </label>
- </td>
- <td class="value">
- <input id="address" name="address" type="text" style="width: 200px" value='${userInfo.address}'
- placeholder="" ignore="ignore" errormsg="居住地址最多填写100文字!"/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">居住地址</label>
- </td>
- </tr>
- <!-- 所属部门 start -->
- <tr>
- <td align="right">
- <label class="Validform_label"><span color="red" class="requiredIcon">*</span>所属部门: </label>
- </td>
- <td class="value">
- <input id="departname" name="departname" type="text" readonly="readonly" class="inputxt"
- onclick="openDepartmentSelect()"
- placeholder="请选择" datatype="*" value="${departname}">
- <input id="orgIds" name="orgIds" type="hidden" value="${orgIds}">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch"
- onclick="openDepartmentSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo"
- onclick="callbackClean()">清空</a>
- <%-- <span class="Validform_checktip">一线员工必须选择保安部、保洁部等部门;项目经理和内勤必须选择项目</span>--%>
- </td>
- </tr>
- <!-- 所属部门 end -->
- <tr>
- <td align="right">
- <label class="Validform_label">设备编号: </label>
- </td>
- <td class="value">
- <input id="deviceId" name="deviceId" type="text" style="width: 200px" value='${userInfo.deviceId}'
- placeholder="" ignore="ignore"/>
- <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="areaRegion" type="list" typeGroupCode="areaRegion" hasLabel="false" datatype="*" defaultVal="${userInfo.areaRegion}"
- 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 id="dutiesId" name="dutiesId" type="hidden" datatype="*" value="${userInfo.dutiesId}">
- <input id="dutiesName" name="dutiesName" type="text" style="width: 150px" 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">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>岗位:
- </label>
- </td>
- <td class="value">
- <input id="postId" name="postId" type="hidden" datatype="*" value='${userInfo.postId}'/>
- <input id="postName" name="postName" type="text" style="width: 150px" 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"><font color="#FF0000"></font>政治面貌</label>
- </td>
- <td class="value">
- <t:dictSelect field="outlook" id="outlook" type="list" typeGroupCode="outLook" 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">学历</label>
- </td>
- <td class="value">
- <t:dictSelect field="education" id="education" type="list" typeGroupCode="education" 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">
- <t:dictSelect field="nature" id="nature" type="list" typeGroupCode="nature" 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">邮箱: </label></td>
- <td class="value">
- <input class="inputxt" name="email" value="${userInfo.email}" errormsg="邮箱格式不正确!"
- ignore="ignore">
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label"><font color="#FF0000"></font>入职日期:</label>
- </td>
- <td class="value">
- <input id="employmentDate" name="employmentDate" type="text" style="width: 149px" class="Wdate"
- errormsg="请填写正确的入职日期!"
- value='<fmt:formatDate value='${userInfo.employmentDate}' type="date" pattern="yyyy-MM-dd"/>'
- readonly="readonly"/>
- <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="userType"
- defaultVal="${userInfo.userType}" hasLabel="false" datatype=""
- title="员工登录类型"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">是否登录系统</label>
- </td>
- </tr>
- <tr style="display: none">
- <td align="right"><label class="Validform_label"> <t:mutiLang langKey="common.common.dev"/>: </label></td>
- <td class="value">
- <c:if test="${userInfo.devFlag == null || userInfo.devFlag == ''}">
- <t:dictSelect id="devFlag" field="devFlag" typeGroupCode="dev_flag" hasLabel="false" datatype="*"
- defaultVal="0" type="radio"></t:dictSelect>
- </c:if>
- <c:if test="${userInfo.devFlag != null && userInfo.devFlag != ''}">
- <t:dictSelect id="devFlag" field="devFlag" typeGroupCode="dev_flag" hasLabel="false" datatype="*"
- defaultVal="${userInfo.devFlag}" type="radio"></t:dictSelect>
- </c:if>
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr style="display: none">
- <td align="right">
- <label class="Validform_label">
- 工作流引擎:
- </label>
- </td>
- <td class="value">
- <c:if test="${userInfo.activitiSync == null || userInfo.activitiSync == ''}">
- <input name="activitiSync" type="radio" datatype="min" min="1" value="1" checked="checked">
- 同步
- <input name="activitiSync" type="radio" value="0">
- 不同步
- <span class="Validform_checktip">是否同步工作流引擎</span>
- </c:if>
- <c:if test="${userInfo.activitiSync != null && userInfo.activitiSync != ''}">
- <input name="activitiSync" type="radio" datatype="min" min="1"
- <c:if test="${userInfo.activitiSync eq 1}">checked="true"</c:if> value="1">
- 同步
- <input name="activitiSync" type="radio"
- <c:if test="${userInfo.activitiSync eq 0}">checked="true"</c:if> value="0">
- 不同步
- <span class="Validform_checktip">是否同步工作流引擎</span>
- </c:if>
- </td>
- </tr>
- </table>
- </t:formvalid>
- </body>
- <script>
- function uploadSucc(response) {
- if (response.success) {
- $('#imgUrl').val(response.attributes.url);
- console.log(response.attributes.url);
- }
- }
- $(function () {
- $("input[name='birthday']").attr("class", "Wdate").click(function () {
- WdatePicker({dateFmt: 'yyyy-MM-dd'});
- });
- // $(":input[name='birthday']").css("width","150px");
- $("input[name='employmentDate']").attr("class", "Wdate").click(function () {
- WdatePicker({dateFmt: 'yyyy-MM-dd'});
- });
- })
- function openDepartmentSelect() {
- //--author:zhaohualong-----start----date: 2018年1月11日--------for:新代码------
- //*****************************
- //update-by yulong.zhao 17-12-14 按照choose标签生成代码进行修改原来js
- var windowapi;
- try {
- windowapi = frameElement.api, W = windowapi.opener;
- } catch (e) {
- }
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#orgIds").val();
- if (typeof (windowapi) == 'undefined') {
- $.dialog({
- content: 'url:departController.do?departSelect&orgIds=' + orgIds,
- zIndex: getzIndex(),
- title: '所属部门列表',
- lock: true,
- width: '400px',
- height: '350px',
- opacity: 0.4,
- button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
- //update-by yulong.zhao 改为function中调用close方法否则多层弹出框,遮罩效果会关闭一个窗口后消失
- //{name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- {
- name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
- close();
- }
- }
- ]
- })
- } else {
- $.dialog({
- content: 'url:departController.do?departSelect&orgIds=' + orgIds,
- zIndex: getzIndex(),
- title: '所属部门列表',
- lock: true,
- parent: windowapi,
- width: '400px',
- height: '350px',
- opacity: 0.4,
- button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
- //update-by yulong.zhao 改为function中调用close方法否则多层弹出框,遮罩效果会关闭一个窗口后消失
- //{name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- {
- name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
- close();
- }
- }
- ]
- }).zindex();
- }
- //*****************************
- //--author:zhaohualong-----end----date: 2018年1月11日--------for:新代码------
- //--author:zhaohualong-----start----date: 2018年1月11日--------for:原代码------
- //================================
- /* $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#orgIds").val();
- $.dialog({content: 'url:departController.do?departSelect&orgIds='+orgIds, zIndex: 3101, title: '所属部门列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- {name: '
- <t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
- {name: '
- <t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- ]}).zindex(); */
- //================================
- //--author:zhaohualong-----end----date: 2018年1月11日--------for:原代码------
- <%-- var orgIds = $("#orgIds").val();--%>
- <%-- $.dialog({--%>
- <%-- content: 'url:dialogDealController.do?projectDepartTableAllWithChild&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '400px', opacity: 0.4, button: [--%>
- <%-- {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){--%>
- <%-- var iframe = this.iframe.contentWindow;--%>
- <%-- if(iframe.getReason().length>0){--%>
- <%-- var strData=eval(iframe.getReason());--%>
- <%-- for(var key in strData[0]){--%>
- <%-- if(key=="strPId"){--%>
- <%-- $("#orgIds").val(strData[0][key]);--%>
- <%-- }else if(key=="strDepartName"){--%>
- <%-- $("#departname").val(strData[0][key]);--%>
- <%-- }--%>
- <%-- }--%>
- <%-- }--%>
- <%-- }, focus: true},--%>
- <%-- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){--%>
- <%-- $('#departname').val('');--%>
- <%-- $('#orgIds').val('');--%>
- <%-- }}--%>
- <%-- ]}).zindex();--%>
- }
- function callbackDepartmentSelect() {
- var iframe = this.iframe.contentWindow;
- var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
- var nodes = treeObj.getCheckedNodes(true);
- if (nodes.length > 0) {
- var ids = '', names = '';
- for (i = 0; i < nodes.length; i++) {
- var node = nodes[i];
- ids += node.id + ',';
- names += node.name + ',';
- }
- // 把最后的逗号去掉
- names = names.substring(0, names.length - 1);
- //判断兼容机构里有没有所属机构
- // if(ids.length>0 && $('#jzorgIds').val().length>0){
- // if($('#jzorgIds').val().indexOf(ids)>=0){
- // //console.info("ids:"+ids);
- // //console.info("orgIds:"+$('#orgIds').val());
- // $.messager.alert("错误","所属部门和兼容机构不能有重叠!!");
- // }else{
- // $('#departname').val(names);
- // $('#departname').blur();
- // $('#orgIds').val(ids);
- // }
- // }else{
- $('#departname').val(names);
- $('#departname').blur();
- $('#orgIds').val(ids);
- // }
- }
- }
- function callbackClean() {
- $('#departname').val('');
- $('#orgIds').val('');
- }
- $(function () {
- $("#departname").prev().hide();
- $("#jzdepartname").prev().hide();
- });
- //兼职机构 start
- function openDepartmentSelectjz() {
- /**
- $.dialog.setting.zIndex = getzIndex();
- var jzorgIds = $("#jzorgIds").val();
- $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: 3100, title: '兼职机构列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
- ]}).zindex();
- */
- // var windowapi;
- // try {
- // windowapi = frameElement.api, W = windowapi.opener;
- // } catch (e) {
- // }
- // var jzorgIds = $("#jzorgIds").val();
- // if(typeof(windowapi) == 'undefined'){
- // $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: getzIndex(), title: '兼职机构列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
- // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
- // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){close();}}
- // ]})
- // }else{
- // $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: getzIndex(), title: '兼职机构列表', lock: true, parent : windowapi, width: '400px', height: '350px', opacity: 0.4,button: [
- // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
- // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){close();}}
- // ]})
- // }
- var orgIds = $("#jzorgIds").val();
- $.dialog({
- content: 'url:dialogDealController.do?projectDepartTableAllCheckbox&ids=' + orgIds,
- zIndex: getzIndex(),
- title: '兼职项目列表',
- lock: true,
- width: '600px',
- height: '400px',
- opacity: 0.4,
- button: [
- {
- name: '<t:mutiLang langKey="common.confirm"/>', callback: function () {
- var iframe = this.iframe.contentWindow;
- if (iframe.getReason().length > 0) {
- var strData = eval(iframe.getReason());
- for (var key in strData[0]) {
- if (key == "strPId") {
- $("#jzorgIds").val(strData[0][key]);
- } else if (key == "strDepartName") {
- $("#jzdepartname").val(strData[0][key]);
- }
- }
- }
- }, focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
- // $('#jzdepartname').val('');
- // $('#jzorgIds').val('');
- }
- }
- ]
- }).zindex();
- }
- function callbackDepartmentSelectjz() {
- // var iframe = this.iframe.contentWindow;
- // var treeObj = iframe.$.fn.zTree.getZTreeObj("jzdepartSelect");
- // var nodes = treeObj.getCheckedNodes(true);
- // if(nodes.length>0){
- // var ids='',names='';
- // for(i=0;i<nodes.length;i++){
- // var node = nodes[i];
- // ids += node.id+',';
- // names += node.name+',';
- // }
- // // 把最后的逗号去掉
- // names = names.substring(0,names.length - 1);
- // //判断兼容机构里有没有所属机构
- // if(ids.length>0 && $('#orgIds').val().length>0){
- // if(ids.indexOf( $('#orgIds').val() )>=0){
- // //console.info("ids:"+ids);
- // //console.info("orgIds:"+$('#orgIds').val());
- // $.messager.alert("错误","所属部门和兼容机构不能有重叠!");
- // }else{
- // $('#jzdepartname').val(names);
- // $('#jzdepartname').blur();
- // $('#jzorgIds').val(ids);
- // }
- // }else{
- // $('#jzdepartname').val(names);
- // $('#jzdepartname').blur();
- // $('#jzorgIds').val(ids);
- // }
- // }
- }
- function callbackCleanjz() {
- $('#jzdepartname').val('');
- $('#jzorgIds').val('');
- }
- //兼职机构 end
- function contains(arr, obj) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === obj) {
- return true;
- }
- }
- return false;
- }
- function beforeSubmitCheck() {
- // var jzorgIds = $('#jzorgIds').val();
- // var orgids = $('#orgIds').val();
- // if(jzorgIds.indexOf(orgids) != -1){
- // layer.alert("兼职机构不能包含主所属部门");
- // return false;
- // }
- return true;
- }
- // 职务选择
- function openDutiesSelect() {
- $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#orgIds").val();
- $.dialog({
- content: 'url:dutiesController.do?departSelect&orgIds=' + orgIds,
- zIndex: getzIndex(),
- 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();
- $("#dutiesId").val(ids);
- }
- }
- function dutiesClean() {
- $("#dutiesId").val('');
- $("#dutiesName").val('');
- }
- //岗位选择
- function openPostSelect() {
- $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#orgIds").val();
- $.dialog({
- content: 'url:projectPostDetailController.do?postSelectNoCheckBox&orgIds=' + orgIds,
- zIndex: getzIndex(), 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();
- $("#postId").val(ids);
- }
- }
- function postClean() {
- $("#postName").val('');
- $("#postId").val('');
- }
- function getBirthdayFromIdCard(t) {
- var idCard = $(t).val();
- var birthday = "";
- if (idCard != null && idCard != "") {
- if (idCard.length == 15) {
- birthday = "19" + idCard.substr(6, 6);
- } else if (idCard.length == 18) {
- birthday = idCard.substr(6, 8);
- }
- birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
- var age = idCard.substring(6,10);
- //获取当前年份
- var year = new Date().getFullYear();
- //获取月份
- var month = idCard.substring(10,12);
- //获取出生日
- var day = idCard.substring(12,14);
- // $("#age").val(year - age);
- // $("#age").val(year - age);
- document.getElementById("age").value = year - age;
- document.getElementById("age2").value = year - age;
- }
- $("#birthday").val(birthday);
- $("#birthday2").val(birthday);
- return birthday;
- }
- </script>
- </html>
|