| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <%@ 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 btn_ok(){
- $("#btnsub").click();
- }
- function callback(data){
- if(data.success){
- layer.alert(data.msg,{ icon: 0 , closeBtn: 0 } , function(index){
- window.location.href="activitiSamelevelTransferController.do?list";
- layer.close(index);
- });
- }
- else{
- layer.alert(data.msg);
- }
- }
-
- $(function(){
- $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
- $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
- var tem = getCurrentMonthLast().Format("yyyy-MM-dd");
- // $("#outTime").val(tem);
- // $("#inTime").val(getNextDayss(tem));
- layer.alert("一线员工调动时,要选择调入的部门(工程部、保洁部等)。否则无法排班!");
- });
-
- //取得当月的最后一天
- function getCurrentMonthLast(){
- var date=new Date();
- var currentMonth=date.getMonth();
- var nextMonth=++currentMonth;
- var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
- var oneDay=1000*60*60*24;
- return new Date(nextMonthFirstDay-oneDay);
- }
- //取得后一天日期
- function getNextDayss(d){
- d = new Date(d);
- d = +d + 1000*60*60*24;
- d = new Date(d);
- //return d;
- //格式化
- var temp1 = d.getMonth()+1;
- var temp2 = d.getDate();
- if(temp1 < 10){
- temp1 = "0"+temp1;
- }
- if(temp2 < 10){
- temp2 = "0"+temp2;
- }
- return d.getFullYear()+"-"+temp1+"-"+temp2;
-
- }
-
- //日期格式化
- Date.prototype.Format = function (fmt) { //author: meizz
- var o = {
- "M+": this.getMonth() + 1, //月份
- "d+": this.getDate(), //日
- "h+": this.getHours(), //小时
- "m+": this.getMinutes(), //分
- "s+": this.getSeconds(), //秒
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
- "S": this.getMilliseconds() //毫秒
- };
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
- for (var k in o)
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
- return fmt;
- }
- </script>
- <script type="text/javascript">
- function updateoldDutiesid(){
- var userid = $("#userid").val();
- if(userid != ''){
- $.ajax({
- url:"activitiSamelevelTransferController.do?updateoldDutiesid",
- data:{id:userid},
- dataType:"json",
- type:"POST",
- success:function(result){
- $(".danwei").text(result.attributes.departName);
- $(".zhiwei").text(result.attributes.dutiesName);
- $(".gangwei").text(result.attributes.postName);
-
- $("#belongUnitid").val(result.attributes.departid);
- $("#oldDutiesid").val(result.attributes.dutiesid);
- $("#oldPostid").val(result.attributes.postid);
- }
- });
- }
- }
-
- function openDepartmentSelect() {
- var orgIds = $("#inUnitid").val();
- var projectUser = '${projectUser}';
- var params = '&ids=' + orgIds;
- if (projectUser == 'true') {
- $.dialog({
- content: 'url:dialogDealController.do?projectDepartTablePartChild' + params,
- zIndex: getzIndex(),
- title: '项目名称列表',
- lock: true,
- width: '600px',
- height: '400px',
- opacity: 0.4,
- button: [
- {
- name: '确定', 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") {
- $("#inUnitid").val(strData[0][key]);
- } else if (key == "strDepartName") {
- $("#duties").val(strData[0][key]);
- }
- }
- }
- }, focus: true
- },
- {
- name: '取消', callback: function () {
- $('#duties').val('');
- $('#inUnitid').val('');
- }
- }
- ]
- }).zindex();
- }else {
- $.dialog({
- content: 'url:dialogDealController.do?projectDepartTableAllWithChild'+ params,
- 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") {
- $("#inUnitid").val(strData[0][key]);
- } else if (key == "strDepartName") {
- $("#duties").val(strData[0][key]);
- }
- }
- }
- }, focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
- $('#duties').val('');
- $('#inUnitid').val('');
- }
- }
- ]
- }).zindex();
- }
- }
-
- function callbackDepartmentSelect() {
- // var iframe = this.iframe.contentWindow;
- // var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
- // // var nodes = treeObj.getSelectedNodes();
- // var nodes = treeObj.getCheckedNodes(true);
- // 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+',';
- // }
- // if(ids != ''){
- // $.ajax({
- // url:"modifyController.do?getorgid",
- // data:{orgid:ids},
- // dataType:"json",
- // type:"POST",
- // success:function(result){
- // $('#inUnitid').val(ids);
- // $('#duties').val(result.msg);
- // $('#duties').blur();
- // }
- // });
- // }
- // }
- }
-
- function callbackClean(){
- $('#duties').val('');
- $('#inUnitid').val('');
- }
- $(function(){
- $.Datatype.checkDutyType = function (val, obj, frm) {
- var msg = true;
- var userid = $('#userid').val();
- $.ajax({
- url: 'userActivitiController.do?dutyType'
- , data: {userid: userid}
- , dataType: 'json'
- , method: "POST"
- , async: false
- , success: function (d) {
- if(d!=1){
- msg='调动申请只允许一线员工';
- }
- }
- }
- )
- return msg;
- }
- })
- </script>
- <style type="text/css">
- .fixed-h{
- float:left;
- width:100%;
- min-height:630px;
- overflow:auto;
- background:#ffffff;
- }
- </style>
- </head>
- <body>
- <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="activitiSamelevelTransferController.do?doAdd" tiptype="1" callback="callback">
- <input id="id" name="id" type="hidden" value="${samelevelTransferPage.id }"/>
- <div class="fixed-h">
- <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right" style="width: 15%;">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 调动方式:
- </label>
- </td>
- <td class="value" colspan="5">
- <label class="Validform_label">人事调动(平调)</label>
- </td>
- </tr>
- <tr>
- <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
- <td class="value" colspan="5">
- <input id="userid" name="userid" type="hidden" value="" datatype="checkDutyType"/>
- <input name="realName" class="inputxt" value="" id="realName" readonly="readonly" datatype="*"/>
- <t:choose hiddenName="userid" hiddenid="id" left="50%" fun="updateoldDutiesid" width="670" height="450" url="correctionController.do?userWorkflow&type=samelevel_transfer" name="userList1" icon="icon-select" title="选择调动员工" textname="realName" isclear="true" isInit="true"></t:choose>
- <span class="Validform_checktip"></span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- 调出单位:
- </label>
- </td>
- <td class="value" style="width: 10%;">
- <label class="Validform_label danwei"></label>
- <input type="hidden" name="belongUnitid" id="belongUnitid"/>
- </td>
- <td align="right" style="width: 5%;">
- <label class="Validform_label">
- 原职级:
- </label>
- </td>
- <td class="value" style="width: 10%;">
- <label class="Validform_label zhiwei"></label>
- <input type="hidden" name="oldDutiesid" id="oldDutiesid"/>
- </td>
- <td align="right" style="width: 5%;">
- <label class="Validform_label">
- 原岗位:
- </label>
- </td>
- <td class="value" style="width: 55%;">
- <label class="Validform_label gangwei"></label>
- <input type="hidden" name="oldPostid" id="oldPostid"/>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 调入单位:
- </label>
- </td>
- <td class="value" colspan="5">
- <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
- <input id="duties" name="duties" type="text" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
- <input id="inUnitid" name="inUnitid" type="hidden" />
- <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>
- </td>
- </tr>
- <tr style="height:30px;">
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 调入日期:
- </label>
- </td>
- <td class="value">
- <input id="inTime" name="inTime" type="text" readonly="readonly" datatype="*"
- class="Wdate" onClick="WdatePicker({onpicking:clickIntime})" nullmsg="调入日期不可为空!" />
- <label class="Validform_label" style="display: none;">调入日期</label>
- </td>
- <td align="right">
- <label class="Validform_label">
- 调出日期:
- </label>
- </td>
- <td class="value">
- <%--outTime--%>
- <input type="hidden" id="outTime" name="outTime"/>
- <span id="outTimeText"></span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>
- 新职务:
- </label>
- </td>
- <td class="value" colspan="5">
- <input id="duty" name="newDutiesid" type="hidden" datatype="*" value="${obj.newDutiesid}">
- <input id="dutyName" name="newDutyName" type="text" style="width: 300px" ignore="ignore" readonly="readonly" value='${obj.newDutyName}' placeholder="请输入所属职务"/>
- <c:if test="${empty param.load}">
- <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>
- </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" colspan="5" >
- <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="transferReason" maxlength="200" name="transferReason" datatype="*" nullmsg="调动原因不可为空!" placeholder="请输入调动原因(最多输入文字数200)"></textarea>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">调动原因</label>
- </td>
- </tr>
- <tr>
- <td height="100px" align="center" colspan="2">
- </td>
- </tr>
- <tr>
- <td height="50px" align="center" colspan="6">
- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
- <a style="margin-left:0px" href="activitiSamelevelTransferController.do?list&transferType=1" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return">返回</a>
- </td>
- </tr>
- </table>
- </div>
- </t:formvalid>
- </body>
- <script src = "webpage/cn/com/lzt/sameleveltransfer/samelevelTransfer.js"></script>
- <script>
- // 职务选择
- function openDutiesSelect() {
- $.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#duty").val();
- $.dialog({content: 'url:dutiesController.do?departSelect${dutyCodeFilter}&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);
- $("#dutyName").val(names);
- $("#dutyName").blur();
- $("#duty").val(ids);
- }
- }
- function dutiesClean(){
- $("#duty").val('');
- $("#dutyName").val('');
- }
- function clickIntime(dq){
- var inTimeSelect = dq.cal.getNewDateStr();//获取当前控件的日期
- inTimeSelect = inTimeSelect.replace(/-/g,"/");
- var date = new Date(inTimeSelect);//将当前的日期转换成系统格式的日期
- var preDate = new Date(date.getTime() - 24*60*60*1000); //前一天
- var month = preDate.getMonth()+1;
- if(month<10){
- month='0'+month;
- }
- var day = preDate.getDate();
- if(day<10){
- day = '0'+day;
- }
- var yesterday = preDate.getFullYear()+"-"+month+"-"+ day;
- console.log(yesterday)
- $("#outTime").val(yesterday);
- $("#outTimeText").html(yesterday);
- }
- </script>
|