<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">

<div class="modal-header">
	<h5 class="modal-title">외사분실운영 현황</h5>
	<button type="button" class="btn-close" data-bs-dismiss="modal"
		aria-label="Close"></button>
</div>
<div class="modal-body">
	<ul class="nav nav-tabs" id="userTab" role="tablist">
		<li class="nav-item" role="presentation">
			<button class="nav-link" id="accessTab"
				th:onclick="|showModal(${partInfoList[0].piSeq})|"
				data-bs-toggle="tab" data-bs-target="#accessTabPanel" type="button"
				role="tab" aria-controls="accessTabPanel" aria-selected="true">현황상세</button>
		</li>
		<li class="nav-item" role="presentation">
			<button class="nav-link active" id="approvalTab"
				th:onclick="|showHistory(${partInfoList[0].piSeq})|"
				data-bs-toggle="tab" data-bs-target="#approvalTabPanel"
				type="button" role="tab" aria-controls="approvalTabPanel"
				aria-selected="false">수정이력</button>
		</li>
	</ul>
	<div class="row justify-content-start">
		<div class="col-4">
			<div class="card">
				<div class="card-body">
					<div class="row">
						<table class="table table-striped" id="categoryTable">
							<thead>
								<tr>
									<th></th>
									<th>작성자</th>
									<th>등록일</th>
								</tr>
							</thead>
							<tbody class="overflow-scroll">
								<tr class="historyInfoTr" th:each="partInfo:${partInfoList}">
									<td><input type="checkbox" class="hisChk"> <input
										type="hidden" class="piSeq" th:value="${partInfo.piSeq}">
										<input type="hidden" class="verNo"
										th:value="${partInfo.versionNo}"></td>
									<td th:text="${partInfo.wrtNm}"></td>
									<td
										th:text="${#temporals.format(partInfo.wrtDt, 'yyyy-MM-dd')}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<div class="col-8" id="valueDiv">
			<div class="mb-2 row">
				<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hMgtOrgan" readonly>
				</div>
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">육경서</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hLandPolice" readonly>
				</div>
			</div>
			<div class="mb-2 row">
				<label for="ogCd" class="col-sm-2 col-form-label text-center">담당자</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hPiUserSeq" readonly>
				</div>
			</div>
			<div class="mb-3 row">
				<label for="ogCd" class="col-sm-2 col-form-label text-center">터미널명</label>
				<div class="col-sm-4">
					<input type="text" class="form-control" id="hTerminalNm" readonly>
				</div>
			</div>
			<br>
			<h6>해경</h6>
			<div class="mb-3 row">
				<label for="ogCd" class="col-sm-2 col-form-label text-center">근무방법</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hMpWorkType" readonly>
				</div>
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">인원수</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hMpPeopleCnt" readonly>
				</div>
			</div>
			<div class="mb-3 row">
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">비고</label>
				<div class="col-sm-4">
					<input type="text" class="form-control" id="hMpDescription"
						readonly>
				</div>
			</div>
			<h6>육경</h6>
			<div class="mb-3 row">
				<label for="ogCd" class="col-sm-2 col-form-label text-center">근무방법</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hPlWorkType" readonly>
				</div>
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">인원수</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hPlPeopleCnt" readonly>
				</div>
			</div>
			<div class="mb-3 row">
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">비고</label>
				<div class="col-sm-4">
					<input type="text" class="form-control" id="hPlDescription"
						readonly>
				</div>
			</div>
			<br>
			<div class="mb-3 row">
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">임차료</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hRentType" readonly>
				</div>
				<div class="col-sm-3">
					<input type="number" class="form-control" id="hRentPrice" readonly>
				</div>
			</div>
			<div class="mb-3 row">
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">공공요금</label>
				<div class="col-sm-3">
					<input type="text" class="form-control" id="hUtilityType" readonly>
				</div>
				<div class="col-sm-3">
					<input type="number" class="form-control" id="hUtilityPrice"
						readonly>
				</div>
			</div>
			<div class="mb-3 row">
				<label for="ofcCd" class="col-sm-2 col-form-label text-center">업로드파일</label>
				<div class="col-sm-8" id="historyFile"></div>
			</div>
		</div>
	</div>
</div>
<div class="modal-footer justify-content-between">
	<div class="col-auto">
		<button type="button" id="btn-close" class="btn btn-secondary"
			data-bs-dismiss="modal">닫기</button>
	</div>
</div>
</html>