<%@ 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>
<script language="javascript">
function otherCheck(){
	if(gn("transfer.oldOrg.id").value==gn("transfer.newOrg.id").value
		&& gn("transfer.oldJob.id").value==gn("transfer.newJob.id").value){
		msgAlert("不正确的调动信息：原部门、原职位、新部门、新职位相同。");
		return false;
	}
	return true;
}
</script>
</head>

<body style="background-color:#FFF;">
<div class="body_form">
  <s:include value="../common/body.jsp" />
  <s:form action="emplTransferOperate" namespace="/employe" onsubmit="return checkForm(this,otherCheck)">
    <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="transfer.emplInfo.emplNo"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">姓名：</td>
        <td valign="top"><s:property value="transfer.emplInfo.name"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">原部门：</td>
        <td valign="top"><s:property value="transfer.oldOrg.name"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">原职务：</td>
        <td valign="top"><s:property value="transfer.oldJob.codeName"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">原岗位：</td>
        <td valign="top"><s:property value="transfer.oldStation.codeName"/></td>
      </tr>	  
      <tr class="form_tr">
        <td align="right"><span class="required">•</span>新部门：</td>
        <td valign="top"><s:textfield name="transfer.newOrg.name" title="新部门为必填项" readonly="true" 
            	onClick="codeTree('emplOrgTree',gi('eimpOrgId'),this)" cssStyle="width:225px;" cssClass="find_input"/>
          <s:hidden name="transfer.newOrg.id" id="eimpOrgId"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">新职务：</td>
        <td valign="top">
          <s:select cssStyle="width:225px;" name="transfer.newJob.id"  list='#request.SysCodeFinder.find("EMPL_JOB")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">新岗位：</td>
        <td valign="top">
          <s:select cssStyle="width:225px;" name="transfer.newStation.id"  list='#request.SysCodeFinder.find("EMPL_STATION")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
      </tr>	  
      <tr class="form_tr">
        <td align="right"><span class="required">•</span>调动类型：</td>
        <td valign="top">
          <s:select cssStyle="width:225px;" title="调动类型为必填项" name="transfer.transType.id"  list='#request.SysCodeFinder.find("EMPL_TRANSFER_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="transfer.transDate" onClick="showDate(this)" readonly="true" cssClass="date_input" 
            	cssStyle="width:225px;" title="调动日期为必填项">
            <s:param name="value">
              <s:date name="transfer.transDate" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
      </tr>
      <tr class="form_tr">
        <td align="right"> 调动原因：</td>
        <td valign="top"><s:textarea name="transfer.transReason" cssStyle="width:225px;height:50px;"/></td>
      </tr>
      <tr class="form_tr">
        <td width="33%" align="right">&nbsp;</td>
        <td width="67%" valign="top"><s:if test="oper=='edit'">
            <input type="submit" name="button" id="button" value="修 改" />
          </s:if>
          <s:if test="oper=='add'">
            <input type="submit" name="button" id="button" value="添 加" />
          </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="transfer.id" />
          <s:hidden name="transfer.emplInfo.id" />
          <s:hidden name="oper" /></td>
      </tr>
    </table>
  </s:form>
</div>
</body>
</html>