<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="cm" uri="/commons-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>员工离职、复职</title>
<link href="../resources/style/base.css" rel="stylesheet" type="text/css"/>

<s:include value="../common/head.jsp" />
<script language="javascript" src="../code/vm/ExtCodeJs.htm"></script>
<script language="javascript" src="../resources/js/calendar/calendar.js"></script>
</head>

<body style="background-color:#FFF;">
<div class="body_form">
  <s:include value="../common/body.jsp" />
  <s:form action="emplLeaveOperate" namespace="/employe" onsubmit="return checkForm(this)">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="form_tr">
        <td align="right">工号：</td>
        <td valign="top"><s:property value="leave.emplInfo.emplNo"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">姓名：</td>
        <td valign="top"><s:property value="leave.emplInfo.name"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">部门：</td>
        <td valign="top"><s:property value="leave.emplInfo.emplOrg.name"/></td>
      </tr>
      <s:if test="leaveForm">
        <tr class="form_tr">
          <td align="right"><span class="required">•</span>离职类型：</td>
          <td valign="top">
            <s:select cssStyle="width:225px;" name="leave.leaveType.id" 
            	list='#request.SysCodeFinder.find("EMPL_LEAVE_TYPE")'  headerKey="" headerValue="" 
         		listKey="id" listValue="codeName"/>
         </td>
        </tr>
        <tr class="form_tr">
            <td align="right"><span class="required">•</span>最后工作日：</td>
            <td valign="top"><s:textfield name="leave.leaveRecoverDate" onClick="showDate(this)" readonly="true" cssClass="date_input" 
                    cssStyle="width:225px;" title="离职日期为必填项">
                <s:param name="value">
                  <s:date name="leave.leaveRecoverDate" format="yyyy-MM-dd"/>
                </s:param>
              </s:textfield></td>
        </tr>        
      </s:if>
      <s:else>
      <tr class="form_tr">
        <td align="right"><span class="required">•</span><s:property value="#typeStr"/>复职日期：</td>
        <td valign="top">
        	<s:textfield name="leave.leaveRecoverDate" onClick="showDate(this)" readonly="true" cssClass="date_input" 
            	cssStyle="width:225px;" title="复职日期为必填项">
            <s:param name="value">
              <s:date name="leave.leaveRecoverDate" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
      </tr>
      <tr class="form_tr">
        <td align="right"><span class="required">•</span><s:property value="#typeStr"/>转正日期：</td>
        <td valign="top">
        	<s:textfield name="leave.regularDate" onClick="showDate(this)" readonly="true" cssClass="date_input" 
            	cssStyle="width:225px;" title="转正日期为必填项">
            <s:param name="value"><s:date name="leave.regularDate" format="yyyy-MM-dd"/></s:param>
          </s:textfield>
          </td>
      </tr>      
      </s:else>
      <tr class="form_tr">
        <td align="right"><span class="required">•</span><s:property value="#typeStr"/>审批人：</td>
        <td valign="top"><s:textfield name="leave.approver.name" title="%{#typeStr}审批人为必填项" readonly="true" onClick="codeTable('emplInfoTable',gi('addMid'),this,'yes',customParam)" cssClass="find_input" id="addMname" cssStyle="width:225px;"/>
          <s:hidden name="leave.approver.id" id="addMid"/>
          <script type="text/javascript">var customParam="myid=<s:property value='leave.emplInfo.id'/>";</script>  
        </td>
      </tr>
      <tr class="form_tr">
        <td align="right"><s:property value='#typeStr'/>备注：</td>
        <td valign="top"><s:textarea  name="leave.descr" cssStyle="width:225px;height:50px;"/></td>
      </tr>
      <tr class="form_tr">
        <td width="35%" align="right">&nbsp;</td>
        <td width="65%" valign="top">
          <s:if test="oper=='edit'">
            <input type="submit" name="button" id="button" value="修 改" />
          </s:if>
          <s:if test="oper=='add'">
		  	<s:if test="leaveForm">
            	<input type="submit" name="button" id="button" value="离 职" />
			</s:if>
			<s:else>
				<input type="submit" name="button" id="button" value="复 职" />
			</s:else>
          </s:if>
          &nbsp;
          <!-- back begin -->
          <input name="winID" type="hidden" value="${param.winID}" />
          <input type="button" onclick="iframeWindowClose('${param.winID}')" name="button" id="button" value="返 回" />
          <!-- back end -->
          <s:hidden name="leave.id" />
          <s:hidden name="leave.emplInfo.id" />
          <s:hidden name="leave.leaveRecover.id" />
          <s:hidden name="oper" />
        </td>
      </tr>
    </table>
  </s:form>
</div>
</body>
</html>