<%@ 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" src="../resources/js/selector.js"></script>
<script type="text/javascript">
</script>
</head>

<body>
<div class="body_list">
  <s:include value="../common/body.jsp" />
  <s:form action="emplRewardList" id="queryForm" onsubmit="return checkForm(this)">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
      <tr class="form_title">
        <td colspan="4">查询条件</td>
      </tr>
      <tr class="form_item">
        <td width="21%">工号：
          <s:textfield name="reward.emplInfo.emplNo" title="工号必须为数字。"  cssStyle="width:100px;"/></td>
        <td width="23%"> 部门：
          <s:textfield name="reward.emplInfo.emplOrg.name" readonly="true" onClick="codeTree('emplOrgTree',gi('eimpOrgId'),this)" cssStyle="width:100px;" cssClass="find_input"/>
          <s:hidden name="reward.emplInfo.emplOrg.id" id="eimpOrgId"/></td>
        <td width="40%">
           奖惩日期：
          <s:textfield name="date1" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="date1" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
          <s:textfield name="date2" readonly="true" onClick="showCalendar('yyyy-MM-dd',this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="date2" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
        </td>
        <td width="16%">&nbsp; 
         </td>
      </tr>
      <tr class="form_item1">
        <td>姓名：
          <s:textfield name="reward.emplInfo.name" cssStyle="width:100px;"/></td>
        <td>
        备注：
       <s:textfield name="reward.descr" cssStyle="width:100px;"/>
       </td>
        <td> 奖惩类型：
        	<select id="rewardPunishID" style="width:100px;" name="reward.rewardPunish.id"></select>
            <select id="exeTypeID" style="width:100px;" name="reward.exeType.id"></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 language="javascript">
				var s1=new SelectObject("rewardPunishID");
				s1.initValue="<s:property value='reward.rewardPunish.id'/>";
				<s:iterator value="#request.SysCodeFinder.find('EMPL_REWARD_PUNISH')">
					s1.addOption("<s:property value='id'/>","<s:property value='codeName'/>");
				</s:iterator>
				
				var s2=new SelectObject("exeTypeID");
				s2.emptyHide=true;
				s2.initValue="<s:property value='reward.exeType.id'/>";
				<s:iterator value="#request.SysCodeFinder.find('EMPL_REWARD_TYPE')">
					s2.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#rewardID'/>");
				</s:iterator>
				<s:iterator value="#request.SysCodeFinder.find('EMPL_PUNISH_TYPE')">
					s2.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#punishID'/>");
				</s:iterator>				
				
				s1.addSubSelectObject(s2);
				s1.renderer();
			</script>
         </td>
        <td align="center"><input name="q" value=" 查 询 " onclick="query()" type="button" /></td>
      </tr>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line" style="margin-top:15px;">
      <tr class="list_title">
        <td width="3%" align="center"><input type="radio" name="array" onclick="checkedAll(this)" value="checkbox" /></td>
        <td width="8%">工号</td>
        <td width="6%">姓名</td>
        <td width="17%">部门</td>
        <td width="6%">类型</td>
        <td width="10%">奖惩日期</td>
        <td width="13%">奖惩类型</td>
        <td width="37%">备注</td>
      </tr>
      <s:iterator value="rewardList" status="st">
        <s:set name="row_cls" value=""/>
        <s:if test="#st.Even">
          <s:set name="row_cls" value="%{'row_a'}"/>
        </s:if>
        <tr class="list_data <s:property value='#row_cls'/>">
          <td align="center"><input type="radio" name="array" value="<s:property value='id'/>" lang="sid"/></td>
          <td class="center"><s:property value="emplInfo.emplNo"/></td>
          <td class="center"><s:property value="emplInfo.name"/></td>
          <td><s:property value="emplInfo.emplOrg.fullName"/></td>
          <td class="center"><s:property value="rewardPunish.codeName"/></td>
          <td class="center"><s:date name="exeDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:property value="exeType.codeName"/></td>
          <td class="center"><s:property value="descr"/></td>
        </tr>
      </s:iterator>
    </table>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
      <tr>
        <td><cm:pager/></td>
      </tr>
    </table>
  </s:form>
</div>
</body>
</html>