<%--
MosP - Mind Open Source Project         http://www.mosp.jp/
Copyright (C) 1987-2008 MIND Co., Ltd.  http://www.e-mind.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--%>
<%@ page
language     = "java"
pageEncoding = "Windows-31J"
buffer       = "128kb"
autoFlush    = "false"
errorPage    = "/jsp/common/error.jsp"
%><%@ page
import = "jp.mosp.common.common.MospConst"
import = "jp.mosp.common.common.HtmlUtility"
import = "jp.mosp.common.CommonConst"
import = "jp.mosp.kintai.vo.ApprovalCardVo"
import = "jp.mosp.common.vo.MosPVo"
%><%
ApprovalCardVo vo = (ApprovalCardVo) request.getAttribute(MospConst.ATT_VO);
String[][] aryAllowance = vo.getAryAllowance();
%>
<%= HtmlUtility.getHeader(vo) %>
<%= vo.getSubTitle(vo.SUB_TITLE, vo.getCmdMenuButton(), vo.getCmdListButton(), vo.getNamListButton()) %>
<div class="Body" id="approvalCard">
	<%=HtmlUtility.getMessages(vo)%>
	<div class="Select">
		<table>
			<tr>
				<td id="tdKCode">
					<%= CommonConst.NAM_K_CODE %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblKCode() %>
				</td>
				<td id="tdKName">
					<%= CommonConst.NAM_K_NAME %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblKName() %>
				</td>
				<td id="tdStation">
					<%= CommonConst.NAM_STATION %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblSectionName() %>
				</td>
				<td id="tdDate">
					<%= CommonConst.NAM_DATE %><%= CommonConst.STR_TITLE_SEPARATOR %>
					<%= vo.getEscLblYear() %><%= CommonConst.NAM_YEAR %>&nbsp;
					<%= vo.getEscLblMonth() %><%= CommonConst.NAM_MONTH %>&nbsp;
					<%= vo.getEscLblDay() %><%= CommonConst.NAM_DAY %>
					<input type="hidden" id="<%= ApprovalCardVo.PRM_PLT_YEAR %>" name="<%= ApprovalCardVo.PRM_PLT_YEAR %>" value="<%= vo.getPltYear() %>">
					<input type="hidden" id="<%= ApprovalCardVo.PRM_PLT_MONTH %>" name="<%= ApprovalCardVo.PRM_PLT_MONTH %>" value="<%= vo.getPltMonth() %>">
				</td>
				<td class="ButtonTd">
					<button type="button" onclick="doSubmitKey(document.form, '<%= vo.getCmdListButton() %>')"><%= vo.getNamListButton() %></button>
				</td>
			</tr>
		</table>
	</div>
	<div id="divTitle"><%= vo.getEscLblApprovalLayer() %></div>
	<div class="Card">
		<table id="tblAttend">
			<thead>
				<tr>
					<th id="thLate" colspan="5">
						<%= CommonConst.NAM_WORKING_TABLE_INFO %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_WORKING_TYPE%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd" colspan="4">
						<%= vo.getEscLblWorkType() %>
					</td>
				</tr>
				<tr>
					<td class="TitleSTd">
						<%=ApprovalCardVo.NAM_START_TIME%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputSTd">
						<%= vo.getEscLblStartHour() %>
						<%=CommonConst.STR_TIME_SEPARATOR%>
						<%=vo.getEscLblStartMin() %>
					</td>
					<td rowspan="2">
						<span id="Arrow"><%= CommonConst.STR_ARROW %></span>
					</td>
					<td class="TitleQTd">
						<%= ApprovalCardVo.NAM_QUIT_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputQTd">
						<%= vo.getEscLblQuitHour() %>
						<%=CommonConst.STR_TIME_SEPARATOR%>
						<%=vo.getEscLblQuitMin() %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_START_HALF_HOLIDAY%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblStartHalfHoliday() %>
					</td>

					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_QUIT_HALF_HOLIDAY%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblQuitHalfHoliday()  %>
					</td>
				</tr>

			</tbody>
		</table>
		<table id="tblTime">
			<thead>
				<tr>
					<th id="thTime" colspan="8">
						<%= CommonConst.NAM_COMMON_TIME %><%= CommonConst.NAM_COMMON_ITEM %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_WORKING_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblWorkHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblWorkMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_OVER_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblOverHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblOverMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_LATE_NIGHT %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLbllateNightHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLbllateNightMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
					<td class="TitleTd"></td>
					<td class="InputTd"></td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_INTERVAL_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblBreakHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblBreakMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
					<td colspan="4">
						&nbsp;
					</td>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_ACTUAL_WORK_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblActualHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%= vo.getEscLblActualMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
				</tr>
				
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_WORK_ON_HOLIDAY%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblWorkOnHoliday() %>
					</td>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_WORK_ON_HOLIDAY_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblWorkOnHolidayHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblWorkOnHolidayMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
				</tr>
			</tbody>
		</table>
		<table id="tblLate">
			<thead>
				<tr>
					<th id="thLate" colspan="2">
						<%= CommonConst.NAM_ARRIVE_LATE %><%= CommonConst.NAM_COMMON_ITEM %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_LATE_REASON%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLateReason() %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_LATE_TIME%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLateHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblLateMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_LATE_CERTIFICATE%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLateCertificate() %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%=ApprovalCardVo.NAM_LATE_COMMENT%><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLateComment() %>
					</td>
				</tr>			
			</tbody>
		</table>
		<table id="tblLeave">
			<thead>
				<tr>
					<th id="thLeave" colspan="2">
						<%= CommonConst.NAM_LEAVE_EARLY %><%= CommonConst.NAM_COMMON_ITEM %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_LEAVE_EARLY_REASON %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLeaveEarlyReason() %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_LEAVE_EARLY_TIME %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLeaveEarlyHour() %>
						<%=CommonConst.NAM_COMMON_TIME %>
						<%=vo.getEscLblLeaveEarlyMin() %>
						<%=CommonConst.NAM_MINUTES %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_LEAVE_EARLY_CERTIFICATE %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLeaveEarlyCertificate() %>
					</td>
				</tr>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_LEAVE_EARLY_COMMENT %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<%= vo.getEscLblLeaveEarlyComment() %>
					</td>
				</tr>			
			</tbody>
		</table>
		<table id="tblAllowance">
			<thead>
				<tr>
					<th id="thAllowance" colspan="2">
						<%= CommonConst.NAM_ALLOWANCE %><%= CommonConst.NAM_COMMON_ITEM %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_ALLOWANCE %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="checkTd">
						<div id="Allowance1">
							<ul>
								<li>
									<%= aryAllowance[8][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblSyokuji() %>					
								</li>
								<li>
									<%= aryAllowance[9][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblCyoku1() %>					
								</li>
								<li>
									<%= aryAllowance[10][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblCyoku2() %>					
								</li>
								<li>
									<%= aryAllowance[11][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblCyoku3() %>							
								</li>
							</ul>
						</div>
						<div id="Allowance2">
							<ul>
								<li>
									<%= aryAllowance[12][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblHoka1() %>
								</li>
								<li>
									<%= aryAllowance[13][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblHoka2() %>
								</li>
								<li>
									<%= aryAllowance[14][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblHoka3() %>
								</li>
								<li>
									<%= aryAllowance[15][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblHoka4() %>
								</li>
								<li>
									<%= aryAllowance[16][1] %><%=CommonConst.STR_TITLE_SEPARATOR%>
									<%= vo.getEscLblHoka5() %>
								</li>
							</ul>
						</div>
					</td>
				</tr>			
			</tbody>
		</table>
		<table id="tblApproval">
			<thead>
				<tr>
					<th id="thApproval" colspan="2">
						<%= CommonConst.NAM_APPROVED %><%= CommonConst.NAM_COMMON_ITEM %>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="TitleTd">
						<%= ApprovalCardVo.NAM_APPROVAL_COMMENT %><%=CommonConst.STR_TITLE_SEPARATOR%>
					</td>
					<td class="InputTd">
						<input type="text" id="<%= ApprovalCardVo.PRM_TXT_APPROVAL_COMMENT %>" name="<%= ApprovalCardVo.PRM_TXT_APPROVAL_COMMENT %>" value="<%= vo.getEscTxtApprovalComment() %>">
					</td>
				</tr>			
			</tbody>
		</table>
	</div>
	<input type="hidden" id="<%= ApprovalCardVo.PRM_HID_K_CODE %>" 			name="<%= ApprovalCardVo.PRM_HID_K_CODE %>" 		value="<%= vo.getHidKCode() %>">
	<input type="hidden" id="<%= ApprovalCardVo.PRM_HID_DATE %>" 			name="<%= ApprovalCardVo.PRM_HID_DATE %>" 			value="<%= vo.getHidDate() %>">
	<input type="hidden" id="<%= ApprovalCardVo.PRM_HID_APPROVAL_LAYER %>" 	name="<%= ApprovalCardVo.PRM_HID_APPROVAL_LAYER %>" value="<%= vo.getHidApprovalLayer() %>">
	<div class="Footer">
		<button type="button" class="ExecuteButton" id="btnApproved" onclick="submitForm(document.form, 'K2117')"><%=CommonConst.NAM_APPROVED%></button>
		<button type="button" class="ExecuteButton" id="btnReturned" onclick="submitForm(document.form, 'K2119')"><%=CommonConst.NAM_APPROVAL_DENY%></button>
	</div>
</div>
<%=HtmlUtility.getFooter(vo)%>
