<%@ 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="../resources/js/calendar/calendar.js"></script>
</head>

<body>
<div class="body_form">
<s:include value="../common/body.jsp" />
<s:form action="emplContractOperate" enctype="multipart/form-data" 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="contract.emplInfo.emplNo"/></td>
    </tr>
    <tr class="form_tr">
      <td align="right">姓名：</td>
      <td valign="top">
      	<s:property value="contract.emplInfo.name"/>
        <s:hidden name="contract.emplInfo.id" />
      </td>
    </tr>
    <tr class="form_tr">
      <td align="right">部门：</td>
      <td valign="top"><s:property value="contract.emplInfo.emplOrg.name"/></td>
    </tr>
    <tr class="form_tr">
      <td width="33%" align="right">合同编号：</td>
      <td width="67%" valign="top"><s:textfield maxlength="50" name="contract.contractNo" cssStyle="width:225px;"/>
        </td>
    </tr>
     <tr class="form_tr">
       <td align="right" valign="top"><span class="required">•</span>起止日期：</td>
       <td valign="top"><s:textfield name="contract.beginDate" onClick="showDate(this)" readonly="true" cssClass="date_input" cssStyle="width:100px;" title="开始日期为必填项">
                <s:param name="value"><s:date name="contract.beginDate" format="yyyy-MM-dd"/></s:param>
          </s:textfield>
          至
          <s:textfield name="contract.endDate" onClick="showDate(this)" readonly="true" cssClass="date_input" cssStyle="width:100px;">
                <s:param name="value"><s:date name="contract.endDate" format="yyyy-MM-dd"/></s:param>
          </s:textfield>  
          <div class="info" style="margin:5px 0;">提示：结束日期为空，表示无限期合同。</div>
       </td>
     </tr>
     <tr class="form_tr">
       <td align="right" valign="top">合同类型：</td>
       <td valign="top">
      <s:select cssStyle="width:225px;" name="contract.contractType.id" list='#request.SysCodeFinder.find("EMPL_CONTRACT_TYPE")' headerKey="" headerValue="" listKey="id" listValue="codeName"/></td>
     </tr>
     <tr class="form_tr">
       <td align="right" valign="top"><span class="required">•</span>合同状态：</td>
       <td valign="top">
      <s:select cssStyle="width:225px;" title="合同状态为必填项" name="contract.status.id" list='#request.SysCodeFinder.find("EMPL_CONTRACT_STATUS")' headerKey="" headerValue="" listKey="id" listValue="codeName"/>
       </td>
     </tr>
     <tr class="form_tr">
       <td align="right" valign="top">备注：</td>
       <td valign="top"><s:textarea  name="contract.descr" cssStyle="width:225px;height:50px;"/></td>
     </tr>
     <tr class="form_tr">
       <td width="33%" align="right" valign="top">附件：</td>
       <td width="67%" valign="top">
            <s:file name="attach" cssStyle="width:225px;"/>
            <s:if test="contract.attach!=null&&contract.attach.id!=null&&contract.attach.id!=''">
                 <div class="info" style="margin:5px 0;">
                 	说明：重新并上传附件将替换已有的附件。
                 </div>
             	 <div class="attach">
                 <a href="<s:url namespace='/system' action='sysFileItemGet'/>?id=<s:property value='contract.attach.id'/>" 
                    target="_blank"><s:property value='contract.attach.name'/></a>
                 </div>                 
            </s:if>
        </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>
         <s:hidden name="contract.id" />
         <s:hidden name="oper" />
        &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 -->
        </td>
    </tr>
  </table>

</s:form>
</div>
</body>
</html>