<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>

<script>
$(function(){
	var part = $('#hidden_part').val()
	$('#part').val(part);
	$('#fpart').val(part);
	
	//업무 변경시 자동으로 같이 변경.
	$('#part').change(function(){
		$('#fpart').val($(this).val());
	});
	
});


</script>
<script src="IDC/js/setToken.js"></script>
<!-- 여기가 본 페이지이다 -->
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h5><i class="fa fa-desktop fa-fw">				
				</i>업무 인수 사항</h5>
			</div>
			<div class="panel-body">
				<div class="row">
					<div class="col-lg-12">
						<p class="text-center">
							<select id="part">
								<option value="0">주간</option>
								<option value="1">중간</option>
								<option value="2">야간</option>
							</select>	
							<input type="hidden" id="hidden_part" value="${ihd.part}"/>
							업무 인수 사항
						</p>
						<p>${ihd.curdate}</p>
					</div>
				</div>
				<!-- row -->
	   			<div class="table-responsive">
					<table id="daily_log" class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>업무 인수 사항</td>								
							</tr>
						</thead>						
					</table>
				</div>
				<!-- table-responsive -->
				<div class="table-responsive">
					<form name="form1" action="handoverUpdate.bus" method="post">					
						<input type="hidden" id="token" name="token">
						<table class="table table-bordered table-hover table-striped">
							<thead>
								<tr>
									<td>인계자</td>
									<td>
										<input type="text" name="name" value="${ihd.name}" readonly="readonly"/>
									</td>
									<td>
										<input type="text" name="name1" value="${ihd.name1}"/>
									</td>
									<td>
										<input type="text" name="name2" value="${ihd.name2}"/>
									</td>
									<td>
										<input type="text" name="name3" value="${ihd.name3}"/>
									</td>															
								</tr>
								<tr>
									<td>인수자</td>
									<td>
										<input type="text" name="name4" value="${ihd.name4}"/>
									</td>
									<td>
										<input type="text" name="name5" value="${ihd.name5}"/> 
									</td>
									<td>
										<input type="text" name="name6" value="${ihd.name6}"/>
									</td>
									<td>
										<input type="text" name="name7" value="${ihd.name7}"/>
										<input type="hidden" name="name8" value="${ihd.name8}"/>
										<input type="hidden" name="part" id="fpart" value="${ihd.part}"/>
									</td>	
									<td>
										<input type="submit" value="전송"/>
									</td>																						
								</tr>																				
						</table>												
					</form>						
				</div>	
								
				<!-- row -->
				<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td colspan="7">고객 요청 사항</td>
							</tr>
							<tr>
								<td>구분</td>
								<td>고객명</td>
								<td style="min-width: 400px">완료 업무 내용</td>
								<td>확인날짜</td>
								<td>완료예정일</td>
								<td>상태</td>
								<td>담당자</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${endWork_list}" var="dto">
								<tr>
									<td>${dto.temp1}</td>
									<td>${dto.client_name}</td>
									<td>${dto.work_content}</td>
									<td>${dto.work_check_date}</td>
									<td>${dto.work_end_date}</td>
									<td>${dto.temp2}</td>
									<td>${dto.work_manager}</td>
								</tr>			
							</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->
				<div class="row">
					<div class="col-lg-12">
						<p class="text-left">
							<h4>진행 중 업무 내용</h4>
						</p>
					</div>
					<!-- col-lg-12 -->
				</div>
				<!-- row -->
				<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>구분</td>
								<td>고객명</td>
								<td style="min-width: 400px">전달사항</td>
								<td>확인날짜</td>
								<td>마감일</td>
								<td>상태</td>
								<td>담당자</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${ongoingWork_list}" var="dto">
								<tr>
									<td>${dto.temp1}</td>
									<td>${dto.client_name}</td>
									<td>${dto.work_content}</td>
									<td>${dto.work_check_date}</td>
									<td>${dto.work_end_date}</td>
									<td>${dto.temp2}</td>
									<td>${dto.work_manager}</td>
								</tr>			
							</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->
				<div class="row">
					<div class="col-lg-12">
						<p class="text-left">
							<h4>신규 상담</h4>
						</p>
					</div>
					<!-- col-lg-12 -->
				</div>
				<!-- row -->
				<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td colspan="4">신규 상담</td>								
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${consult_list}" var="dto">
								<tr>
									<td style="width: 80px">업체명</td>
									<td>${dto.consult_name}</td>
									<td>연락처</td>
									<td>${dto.consult_contact}</td>
								</tr>
								<tr>
									<td>문의내용</td>
									<td colspan="3">${dto.consult_question}</td>
								</tr>
								<tr>
									<td>답변내용</td>
									<td  colspan="3">${dto.consult_answer}</td>
								</tr>
								<tr>
									<td>추가사항</td>
									<td colspan="3">${dto.consult_add}</td>
								</tr>							
							</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				
				<div class="row">
					<div class="col-lg-12">
						<p class="text-left">
							<h4>개인 업무 진행 사항</h4>
						</p>
					</div>
					<!-- col-lg-12 -->
				</div>
				<!-- row -->
				<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>구분</td>
								<td>고객명</td>
								<td style="min-width: 400px">개인 업무 진행 사항</td>
								<td>확인날짜</td>
								<td>마감일</td>
								<td>상태</td>
								<td>담당자</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${each_list}" var="dto">
								<tr>
									<td>${dto.temp1}</td>
									<td>${dto.client_name}</td>
									<td>${dto.work_content}</td>
									<td>${dto.work_check_date}</td>
									<td>${dto.work_end_date}</td>
									<td>${dto.temp2}</td>
									<td>${dto.work_manager}</td>
								</tr>			
							</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->
				
				<div class="row">
					<div class="col-lg-12">
						<p class="text-left">
							<h4>전달사항</h4>
						</p>
					</div>
					<!-- col-lg-12 -->
				</div>
				<!-- row -->
				<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>구분</td>
								<td>고객명</td>
								<td style="min-width: 400px">전달사항</td>
								<td>확인날짜</td>
								<td>마감일</td>
								<td>상태</td>
								<td>담당자</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${delivery_list}" var="dto">
								<tr>
									<td>${dto.delivery_temp}</td>
									<td>${dto.client_name}</td>
									<td>${dto.delivery_content}</td>
									<td>${dto.delivery_check_date}</td>
									<td>${dto.delivery_end_date}</td>
									<td>${dto.delivery_temp1}</td>
									<td>${dto.delivery_manager}</td>
								</tr>			
							</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->							

			</div>
			<!-- panel-body -->
		</div>
		<!-- panel panel-default -->
	</div>
	<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->
