<%@ 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>
<script type="text/javascript">
</script>
</head>

<body>
<div class="body_list">
  <s:include value="../common/body.jsp" />
  <s:form action="attYearHolidayMine" id="queryForm" namespace="/att">
    <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>假期类型：
          <s:select cssStyle="width:100px;" name="yearHoliday.leaveType.id"  list='leaveTypeList' headerKey="" headerValue="" listKey="id" listValue="name"/></td>
        <td>有效日期：
          <s:textfield name="dateBegin" readonly="true" onClick="showDate(this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="dateBegin" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
          至
			<s:textfield name="dateEnd" readonly="true" onClick="showDate(this)" cssClass="date_input" cssStyle="width:85px;">
            <s:param name="value">
              <s:date name="dateEnd" format="yyyy-MM-dd"/>
            </s:param>
          </s:textfield>
        </td>
        <td></td>
      </tr>
      <tr class="form_item1">
        <td width="47%">年份：
          <s:textfield name="yearBegin" readonly="true" onClick="showCalendar('yyyy',this)" cssClass="date_input" cssStyle="width:50px;"/>
          至
          <s:textfield name="yearEnd" readonly="true" onClick="showCalendar('yyyy',this)" cssClass="date_input" cssStyle="width:50px;"/>
        </td>
        <td width="41%">额度剩余：
          <s:textfield name="yearHoliday.usedNum" cssStyle="width:30px;"/>
          至
        <s:textfield name="yearHoliday.freezeNum" cssStyle="width:30px;"/> 小时</td>
        <td width="12%" style="text-align:right; padding-right:15px;"><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:15px 0 5px 0;" >
      <tr class="list_title">
        <td width="10%">年份</td>
        <td width="16%">假期类型</td>
        <td width="19%">额度总数</td>
        <td width="14%">额度已用</td>
        <td width="14%">额度待审</td>
        <td width="13%">有效日期</td>
      </tr>
      <s:iterator value="yearHolidayList" 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 class="center"><s:property value="attYear"/></td>
          <td class="center"><s:property value="leaveType.name"/></td>
          <td class="center"><s:property value="totalNum"/> 小时 （<s:property value="totalDays"/>天）</td>
          <td class="center"><s:property value="usedNum"/> 小时 </td>
          <td class="center"><s:property value="freezeNum"/> 小时 </td>
          <td class="center"><s:date name="endDate" format="yyyy-MM-dd"/></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>