<%@ 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="../code/vm/ExtCodeJs.htm"></script>
<style>
.dayTD{
	text-align:center;
}
.sunday_css{
	background-color:#E8E8E8;
}
.cal_data td{
	padding:5px 0px;
	border-bottom:#CCCCCC 1px solid;
	border-right:#CCCCCC 1px solid;
	border-left:#F6F6F6 1px solid;
	border-top:#F6F6F6 1px solid;
	font-size:13px;
}
</style>
</head>

<body>
<div class="body_list">
<s:include value="../common/body.jsp" />
<s:form action="attEmplWorkdayConfMine" 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="29%">月份：<s:textfield name="conf.attMonth" readonly="true" title="月份为必填项" cssStyle="width:100px;" onclick="showCalendar('yyyyMM',this,false)" cssClass="date_input"/></td>
      <td>&nbsp;</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:15px 0 5px 0;" >
    <tr class="list_title">
      <s:iterator value="weekList">
       		<s:iterator value="top" status="sx">
      			<s:if test="top!=null">
                    <td width="20"><s:property /></td>
                </s:if>
            </s:iterator>
	   </s:iterator>
      </tr>
      <tr class="cal_data">
        <s:iterator value="weekList">
            <s:iterator value="top" status="sx">
                <s:if test="top!=null">
                    <s:set name="sunday_css" value=""/>
                    <s:if test="#sx.index==0 || #sx.index==6">
                    	<s:set name="sunday_css" value="%{'sunday_css'}"/>
                    </s:if>
                    <td width="20" day="<s:property />" empl="<s:property value='#empl.id'/>" 
                    	class="<s:property value='#sunday_css'/> dayTD">
                    	<s:if test="myWorkdayConf.getDay(top) != null">
                             <span style="background-color:<s:property value='myWorkdayConf.getDay(top).color' />;  border:1px #999 solid;"><s:property value='myWorkdayConf.getDay(top).code' /></span>                        
                        </s:if>
                        <s:else>&nbsp;</s:else>
                     </td>
                </s:if>
            </s:iterator>
        </s:iterator>
      </tr>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_page">
    <tr>
      <td style="text-align:left;">
      	<span class="info">提示：灰色背景的日期表示周六、周日； </span>
      	&nbsp;&nbsp;
        <a href="javascript:showHide('timeDetail')">[查看班次时间明细]</a>
      
      </td>
    </tr>
  </table>
  
  <s:set var="conf" value="myWorkdayConf.allWorktimeConf"/>
  <s:if test="#conf!=null && #conf.size()>0">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_line" style="display:none; margin-top:15px;" id="timeDetail"> 
    <tr>
      <td>
      	
        <s:iterator value="#conf">
        <table width="130" border="0" cellspacing="0" cellpadding="0" style="border:1px #CCC solid; margin:10px; float:left;">
          <tr class="sub_list_title">
            <td valign="top">
            	<span style="background-color:<s:property value='color'/>; border:1px #999 solid;"><s:property value='code'/></span>&nbsp;<s:property value='name'/>
            </td>
          </tr>
          <s:iterator value="periodSet">
          <tr class="list_data">
            <td><s:property value="beginTime"/>&nbsp;至&nbsp;<s:property value="dateType.codeName"/><s:property value="endTime"/>
            </td>
          </tr>
          </s:iterator> 
        </table>
        </s:iterator>
        
      </td>
    </tr>
  </table>
  </s:if>

</s:form>


</div>
</body>
</html>