<%--
MosP - Mind Open Source Project    http://www.mosp.jp/
Copyright (C) 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.common.common.BaseVo"
import = "jp.mosp.kintai.workflow.vo.ApprovalCardVo"
%><%
ApprovalCardVo vo = (ApprovalCardVo) request.getAttribute(MospConst.ATT_VO);
String[][] aryAllowance = vo.getAryAllowance();
String[] aryRequest = vo.getAryLblHolidayRequest();
%>
<%= HtmlUtility.getHeader(vo) %>
<%= HtmlUtility.getSubTitle(vo) %>
<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.getEscLblDate() %>
					<input type="hidden" id="<%= ApprovalCardVo.PRM_PLT_YEAR %>" name="<%= ApprovalCardVo.PRM_PLT_YEAR %>" value="<%= vo.getEscPltYear() %>">
					<input type="hidden" id="<%= ApprovalCardVo.PRM_PLT_MONTH %>" name="<%= ApprovalCardVo.PRM_PLT_MONTH %>" value="<%= vo.getEscPltMonth() %>">
				</td>
				<td class="ButtonTd">
					<button type="button" onclick="doSubmit(document.form, 'K2122')"><%=CommonConst.TTL_APPROVAL_LIST%></button>
				</td>
			</tr>
		</table>
	</div>
<!--	帪娫崁栚	-->
	<div class="Card">
		<table id="tblTime">
			<tr>
				<th >
					<%= CommonConst.NAM_APPLICATION %><%= CommonConst.NAM_COMMON_ITEM %>
				</th>
			</tr>
			<tr>
				<td>
					<div>
						<%= vo.NAM_WORKING_TYPE %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblWorkType() %>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div>
						<%= CommonConst.NAM_WORKING_TABLE_INFO %><%= CommonConst.STR_TITLE_SEPARATOR %>
						<%= vo.getEscLblStartQuitTime() %>
					</div>
					<div>
						<%= vo.NAM_HALF_HOLIDAY %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblHalfHoliday() %>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div>
						<%= vo.NAM_WORKING_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblWorkTime() %></span>
					</div>
					<div>
						<%= vo.NAM_LATE_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblLateTime() %></span>
					</div>
					<div>
						<%= vo.NAM_LEAVE_EARLY_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblLeaveEarlyTime() %></span>
					</div>
				</td>
			</tr>
			<tr>
				<td >
					<div id="divOverTime">
						<%= vo.NAM_OVER_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblOverTime() %></span>
					</div>
					<div>
						<%= vo.NAM_OVER_TIME_REQUEST %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblOverTimeRequest() %>
					</div>
				</td>
			</tr>
			<tr>
				<td >
					<div>
						<%= vo.NAM_INTERVAL_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblBreakTime() %></span>
					</div>
					<div>
						<%= vo.NAM_LATE_NIGHT %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblLateNightTime() %></span>
					</div>
				</td>
			</tr>
			<tr>
				<td >
					<div>
						<%= vo.NAM_WORK_ON_HOLIDAY_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblWorkOnHolidayTime() %></span>
					</div>
					<div>
						<%= vo.NAM_WORK_ON_HOLIDAY %><%= CommonConst.STR_TITLE_SEPARATOR %><%= vo.getEscLblWorkOnHoliday() %>
					</div>
					<div>
						<%= vo.NAM_ACTUAL_WORK_TIME %><%= CommonConst.STR_TITLE_SEPARATOR %><span><%= vo.getEscLblActualTime() %></span>
					</div>
				</td>
			</tr>
			<tr>
				<th>
					<%= vo.NAM_HOLIDAY_REQUEST %>
				</th>
			</tr>
			<tr>
				<td>
<%
for (int i = 0; i < aryRequest.length; i++) {
%>
					<div>
						<%= BaseVo.escapeHTML(aryRequest[i]) %>
					</div>
<% 
} 
%>
				</td>
			</tr>
		</table>
<!--	抶崗憗戅崁栚	-->
		<table id="tblLateLeave">
			<tr>
				<th colspan="6">
					<%= CommonConst.NAM_ARRIVE_LATE %><%= CommonConst.NAM_LEAVE_EARLY %><%= CommonConst.NAM_COMMON_ITEM %>
				</th>
			</tr>
			<tr>
				<td class="TitleTd">
					<%= vo.NAM_LATE_REASON %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLateReason() %>
				</td>
				<td class="TitleTd">
					<%= vo.NAM_LATE_CERTIFICATE %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLateCertificate() %>
				</td>
				<td class="TitleTd">
					<%= vo.NAM_LATE_COMMENT %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLateComment() %>
				</td>
			</tr>			
			<tr>
				<td class="TitleTd">
					<%= vo.NAM_LEAVE_EARLY_REASON %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLeaveEarlyReason() %>
				</td>
				<td class="TitleTd">
					<%= vo.NAM_LEAVE_EARLY_CERTIFICATE %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLeaveEarlyCertificate() %>
				</td>
				<td class="TitleTd">
					<%= vo.NAM_LEAVE_EARLY_COMMENT %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblLeaveEarlyComment() %>
				</td>
			</tr>
		</table>
		<table>
			<tr>
				<th colspan="2">
					<%= CommonConst.NAM_ALLOWANCE %><%= CommonConst.NAM_COMMON_ITEM %>
				</th>
			</tr>
			<tr>
				<td class="TitleTd">
					<%= vo.NAM_ALLOWANCE %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<div class="AllowanceDiv">
						<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 class="AllowanceDiv">
						<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>
		</table>
		<table id="tblApproval">
			<tr>
				<th colspan="2">
					<%= CommonConst.NAM_APPROVED %><%= CommonConst.NAM_COMMON_ITEM %>
				</th>
			</tr>
			<tr>
				<td class="TitleTd">
					<%= vo.NAM_STATUS %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<%= vo.getEscLblStatus() %>
				</td>
			</tr>
			<tr>
				<td class="TitleTd">
					<%= vo.NAM_COMMENT %><%= CommonConst.STR_TITLE_SEPARATOR %>
				</td>
				<td >
					<input type="text" id="<%= ApprovalCardVo.PRM_TXT_COMMENT %>" name="<%= ApprovalCardVo.PRM_TXT_COMMENT %>" value="<%= vo.getEscTxtComment() %>">
				</td>
			</tr>
		</table>
	</div>
	<div class="Footer">
		<button type="button" class="ExecuteButton" id="btnApprove" onclick="submitForm(document.form, 'K2127')"><%= CommonConst.NAM_APPROVED %></button>
		<button type="button" class="ExecuteButton" id="btnReturn" onclick="submitForm(document.form, 'K2129')"><%= CommonConst.NAM_APPROVAL_DENY %></button>
		<button type="button" class="ExecuteButton" onclick="doSubmit(document.form,'K2122')"><%= CommonConst.NAM_TO_LIST %></button>
	</div>
</div>
<%=HtmlUtility.getFooter(vo)%>
