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

<body>
<div class="body_list">
<s:include value="../common/body.jsp" />
<s:form action="attTotalDayMine" id="queryForm" namespace="/att">

 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_line">
    <tr class="form_title">
      <td colspan="3">查询条件</td>
    </tr>
    <tr class="form_item">
      <td width="41%">日期：
      <s:textfield name="beginDate" readonly="true" onClick="showDate(this)" cssClass="date_input" cssStyle="width:85px;">
       		<s:param name="value"><s:date name="beginDate" format="yyyy-MM-dd"/></s:param>
      </s:textfield>
      至
      <s:textfield name="endDate" readonly="true" onClick="showDate(this)" cssClass="date_input" cssStyle="width:85px;">
       		<s:param name="value"><s:date name="endDate" format="yyyy-MM-dd"/></s:param>
      </s:textfield>
      </td>
      <td width="46%">状态：
      	<select name="dataKind" id="dkind" style="width:75px;"></select>
        <select name="dataType" id="dtype" style="width:75px;"></select>
		<s:set name="kindNormal" value="@com.hrmex.web.constants.ConstantCode$AttDayTotalAttType@NORMAL"/>
		<s:set name="kindExcept" value="@com.hrmex.web.constants.ConstantCode$AttDayTotalAttType@EXCEPT"/>
        <script language="javascript">
			var dkind=new SelectObject("dkind");
			dkind.initValue="<s:property value='dataKind'/>";
			<s:iterator value="#request.SysCodeFinder.find('ATT_DAY_TOTAL_ATT_TYPE')">
				dkind.addOption("<s:property value='id'/>","<s:property value='codeName'/>");
			</s:iterator>
			
			var dtype=new SelectObject("dtype");
			dtype.initValue="<s:property value='dataType'/>";
			<s:iterator value="#request.SysCodeFinder.find('ATT_DAY_TOTAL_ATT_NORMAL_TYPE')">
				dtype.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#kindNormal'/>");
			</s:iterator>
			<s:iterator value="#request.SysCodeFinder.find('ATT_DAY_TOTAL_ATT_EXCEPT_TYPE')">
				dtype.addOption("<s:property value='id'/>","<s:property value='codeName'/>","<s:property value='#kindExcept'/>");
			</s:iterator>			
			
			dkind.addSubSelectObject(dtype);
			dkind.renderer();
		</script>
      </td>
      <td width="13%" 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="8%">考勤日期</td>
      <td width="6%">班次</td>
	  <td width="5%">出差</td>
      <td width="8%">上班</td>
      <td width="7%">下班</td>
      <td width="7%">应出勤</td>
      <td width="7%">迟到</td>
      <td width="7%">早退</td>
      <td width="7%">缺勤</td>
      <td width="7%">请假</td>
      <td width="6%">加班</td>
      <td width="25%">异常描述</td>
      </tr>
    <s:iterator value="totalDayList" status="st">
        <s:set name="row_cls" value=""/><s:if test="#st.Even"><s:set name="row_cls" value="%{'row_a'}"/></s:if>
        <s:set name="error_row" value=""/><s:if test="exception!=null"><s:set name="error_row" value="%{'error_row'}"/></s:if>
        <tr class="list_data <s:property value='#row_cls'/> <s:property value='#error_row'/>">
          <td class="center"><s:date name="attDate" format="yyyy-MM-dd"/></td>
          <td class="center"><s:property value="worktimeConf.name"/></td>
		  <td class="center">
          	<s:if test="travelTimes!=null">
            	<a href="javascript:msgInfo('出差时间：<s:date name='travelTimes.begin' format='yyyy-MM-dd HH:mm'/> 至 <s:date name='travelTimes.end' format='yyyy-MM-dd HH:mm'/>')" title="出差时间：<s:date name='travelTimes.begin' format='yyyy-MM-dd HH:mm'/> 至 <s:date name='travelTimes.end' format='yyyy-MM-dd HH:mm'/>">出差</a>
            </s:if>
          </td>
          <td class="center"><s:date name="realBrushBeginTime" format="MM-dd HH:mm"/></td>
          <td class="center"><s:date name="realBrushEndTime" format="MM-dd HH:mm"/></td>
          <td class="center"><s:property value="attWorkTimes"/>小时</td>
          <td class="center">
          	<s:if test="lateTimesFlag">
            	<s:property value="lateTimes"/>
            </s:if>
            <s:else>0</s:else>
            分钟
          </td>
          <td class="center">
            <s:if test="earlyTimesFlag">
            	<s:property value="earlyTimes"/>
            </s:if>
            <s:else>0</s:else>
            分钟
          </td>
          <td class="center"><s:property value="absentTimes"/>小时</td>
          <td class="center"><s:property value="leaveTimesHour"/>小时</td>
          <td class="center"><s:property value="overTimesHour"/>小时</td>
          <td class="center"><s:property value="exception"/></td>
        </tr>
    </s:iterator>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
    <tr>
      <td width="75%" style="text-align:left;">
	  <div class="info">
	  <strong>只统计</strong>审批通过、已备案、已销假的请假单；审批通过、已备案、已核准的非调休加班单；审批通过、已备案、已核销的出差单。	  </div>
	  </td>
	  <td width="25%" valign="top"><cm:pager/></td>
    </tr>
  </table>

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