<%@ 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/selector.js"></script>
<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="emplRewardOperate" 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="reward.emplInfo.emplNo"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">姓名：</td>
        <td valign="top"><s:property value="reward.emplInfo.name"/></td>
      </tr>
      <tr class="form_tr">
        <td align="right">部门：</td>
        <td valign="top"><s:property value="reward.emplInfo.emplOrg.name"/></td>
      </tr>
        <tr class="form_tr">
          <td align="right"><span class="required">•</span>奖惩种类：</td>
          <td valign="top">
          	<select name="reward.rewardPunish.id" title="奖惩种类为必填项" id="rewardPunishId" style="width:225px;"></select>
			<s:set name="rewardID" value="@com.hrmex.web.constants.ConstantCode$EmplRewardPunish@REWARD"/>
			<s:set name="punishID" value="@com.hrmex.web.constants.ConstantCode$EmplRewardPunish@PUNISH"/>
          	<script type="text/javascript">
			var kind=new SelectObject("rewardPunishId");
			kind.addOption("<s:property value='#rewardID'/>","奖励");
			kind.addOption("<s:property value='#punishID'/>","惩罚");
			kind.initValue="<s:property value='reward.rewardPunish.id'/>";
            </script>
          </td>
        </tr>
        <tr class="form_tr">
          <td align="right"><span class="required">•</span>奖惩形式：</td>
          <td valign="top">
          	<select name="reward.exeType.id" title="奖惩形式为必填项" id="exeTypeId" style="width:225px;"></select>
          	<script type="text/javascript">
		  	var type=new SelectObject("exeTypeId");
			type.initValue="<s:property value='reward.exeType.id'/>";
			<s:iterator value='#request.SysCodeFinder.find("EMPL_REWARD_TYPE")'>
			type.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#rewardID'/>");
			</s:iterator>
			<s:iterator value='#request.SysCodeFinder.find("EMPL_PUNISH_TYPE")'>
			type.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#punishID'/>");
			</s:iterator>
			kind.addSubSelectObject(type);
			kind.renderer();
          </script>
          </td>
        </tr>
      <tr class="form_tr">
        <td align="right"><span class="required">•</span>
        奖惩日期：</td>
        <td valign="top">
        <s:textfield name="reward.exeDate" onClick="showDate(this)" readonly="true" cssClass="date_input" 
            	cssStyle="width:225px;" title="奖惩日期为必填项">
            <s:param name="value">
              <s:date name="reward.exeDate" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield></td>
      </tr>
      <tr class="form_tr">
        <td align="right">奖惩备注：</td>
        <td valign="top"><s:textarea  name="reward.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'">
            <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="reward.id" />
          <s:hidden name="reward.emplInfo.id" />
          <s:hidden name="oper" />
        </td>
      </tr>
    </table>
  </s:form>
</div>
</body>
</html>