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

<div class="modal-header">
  <h5 class="modal-title" id="menuEditModalLabel">외사분실 현황등록</h5>
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
  <form id="partInfoSave" method="post">
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
   		<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
          <div class="mb-2 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>        
            <div class="col-sm-3">
               <select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('OG')}">
		            <th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
		              <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq userOrgan}"></option>
		            </th:block>
		          </th:block>
               </select>
            </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="landPolice" name="landPolice" placeholder="직접입력">
            </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">
               <select class="form-select form-select-sm" id="piUserSeq" name="piUserSeq" disabled>
                  <option value="">선택</option>
               </select>
            </div>
          </div>
          <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="terminalNm" name="terminalNm" placeholder="직접입력">
            </div>
          </div>
          <br><br>
          <h6 class="text-center">해경</h6>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">근무방법</label>
            <div class="col-sm-2">
               <select class="form-select form-select-sm" id="mpWorkType" name="mpWorkType">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('PIS')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
                  </th:block>
               </select>
            </div>
            <label for="ofcCd" class="col-sm-2 col-form-label text-center">인원수</label>
            <div class="col-sm-2">
              <input type="number" class="form-control" id="mpPeopleCnt" name="mpPeopleCnt">
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">비고</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" id="mpDescription" name="mpDescription">
            </div> 
          </div>
          <br>
          <h6 class="text-center">육경</h6>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">근무방법</label>
            <div class="col-sm-2">
               <select class="form-select form-select-sm" id="plWorkType" name="plWorkType">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('PIS')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
                  </th:block>
               </select>
            </div>
            <label for="ofcCd" class="col-sm-2 col-form-label text-center">인원수</label>
            <div class="col-sm-2">
              <input type="number" class="form-control" id="plPeopleCnt" name="plPeopleCnt">
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">비고</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" id="plDescription" name="plDescription">
            </div> 
          </div>
          <br><br>          
          <div class="mb-3 row">
          <label for="ofcCd" class="col-sm-2 col-form-label text-center">임차료</label>
            <div class="col-sm-2">
              <select class="form-select form-select-sm" id="rentType" name="rentType">
                  <option value="">선택</option>
                  <option value="N">무상</option>
                  <option value="Y">유상</option>
               </select>       
            </div>
            <div class="col-sm-3">
            	<input type="number" class="form-control" id="rentPrice" name="rentPrice" placeholder="단위: 만">
            </div>
          </div>
          <div class="mb-3 row">
          <label for="ofcCd" class="col-sm-2 col-form-label text-center">공공요금</label>
            <div class="col-sm-2">
              <select class="form-select form-select-sm" id="utilityType" name="utilityType">
                  <option value="">선택</option>
                  <option value="N">무상</option>
                  <option value="Y">유상</option>
               </select>       
            </div>
            <div class="col-sm-3">
            	<input type="number" class="form-control" id="utilityPrice" name="utilityPrice" placeholder="단위: 만">
            </div>
          </div>
          <div class="row mb-3">
	      <label for="fileInputer" class="col-sm-2 col-form-label text-center">업로드 자료</label>
	      <div class="col-sm-10" style="min-height: 70px;">
	        <div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
	            <br>파일을 업로드 해주세요.
	        </div>
	      </div>
	      <input type="file" class="d-none" id="fileInputer" multiple>
	    </div>

      </form>
</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 class="col-auto">
    <button type="button" class="btn btn-primary" id="savePartInfo">저장</button>
  </div>
</div>
</html>