<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
  <h5 class="modal-title" id="crackdownStatusEditModalLabel" th:text="${crackdownStatus.cdsKey eq null ? '불법조업 외국어선 단속등록' : '불법조업 외국어선 단속수정'}">></h5>
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<!-- 탭 메뉴 -->
<ul class="nav nav-tabs" role="tablist">
  <li class="nav-item" role="presentation">
    <button class="nav-link crackdownStatusTab active" id="crackdownStatus-tab" data-bs-toggle="tab"
            data-bs-target="#crackdownStatus" type="button" role="tab" aria-controls="crackdownStatus" data-crackdownStatus-type="crackdownStatus"
            aria-selected="true">상세</button>
  </li>
  <li class="nav-item" role="presentation">
    <button class="nav-link crackdownStatusTab" id="history-tab" data-bs-toggle="tab"
            data-bs-target="#history" type="button" role="tab" data-history-type="history"
            aria-controls="history">수정이력</button>
  </li>
</ul>

<!-- 내용 -->
<div class="tab-content" style="overflow-y: auto;">
  <div class="tab-pane fade show active" id="crackdownStatus" role="tabpanel" aria-labelledby="crackdownStatus-tab">
    <div class="modal-body" id="cdsEditBody">
      <form action="#" method="post" id="cdsEditForm">
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
        <input type="hidden" name="cdsKey" th:value="${crackdownStatus.cdsKey}">
        <th:block th:if="${crackdownStatus.fishingBoat ne null}">
          <input type="hidden" name="fbKey" th:value="${crackdownStatus.fishingBoat.fbKey}">
        </th:block>
        <th:block th:if="${crackdownStatus.processResult ne null}">
          <input type="hidden" name="prKey" th:value="${crackdownStatus.processResult.prKey}">
        </th:block>
        <input type="hidden" name="wrtOrgan" th:value="${crackdownStatus.wrtOrgan}">
        <input type="hidden" name="wrtUserNm" th:value="${crackdownStatus.wrtUserNm}">
        <input type="hidden" name="wrtDt" th:value="${#temporals.format(crackdownStatus.wrtDt, 'yyyy-MM-dd HH:mm')}">
        <input type="hidden" id="saveYn" name="saveYn">
        <div class="mb-3 row">
          나포정보
        </div>
        <div class="mb-3 row">
          <div class="col-sm-1">
            <label class="col-auto col-form-label col-form-label-sm text-center">나포일시</label>
            <label class="col-sm-12 col-form-label col-form-label-sm text-center">NLL</label>
          </div>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="napoDt" id="napoDt" th:value="${#temporals.format(crackdownStatus.napoDt, 'yyyy-MM-dd HH:mm')}" readonly>
            <select class="form-select form-select-sm" name="nll" disabled>
              <option value="Y" th:selected="${crackdownStatus.nll == 'Y'}">O</option>
              <option value="N" th:selected="${crackdownStatus.nll == 'N'}">X</option>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">위반장소</label>
          <div class="col-6">
            <input class=" form-control form-control-sm" placeholder="위도" name="napoSeaPointLat" th:value="${crackdownStatus.napoSeaPointLat}" readonly>
            <input class=" form-control form-control-sm" placeholder="경도" name="napoSeaPointLon" th:value="${crackdownStatus.napoSeaPointLon}" readonly>
            <input class=" form-control form-control-sm" placeholder="상세내용" name="napoSeaPointDetail" th:value="${crackdownStatus.napoSeaPointDetail}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          <div class="col-sm-1">
            <label class="col-form-label col-form-label-sm text-center">위반내용</label>
          </div>
          <div class="col-auto" id="violationDiv">
            <th:block th:if="${#lists.isEmpty(crackdownStatus.violationList)}">
              <div class="row">
                <select class="form-select form-select-sm violation" name="violation" disabled>
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('VT')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
                  </th:block>
                  <option value="etc">직접입력</option>
                </select>
              </div>
            </th:block>
            <th:block th:if="${!#lists.isEmpty(crackdownStatus.violationList)}">
              <th:block th:each="violation : ${crackdownStatus.violationList}">
                <div class="row">
                  <input type="hidden" name="violationKey" th:value="${violation.violationKey}">
                  <select class="form-select form-select-sm violation" name="violation" disabled>
                    <option value="">선택</option>
                    <th:block th:each="commonCode:${session.commonCode.get('VT')}">
                      <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                              th:selected="${crackdownStatus.violationList != null and commonCode.itemCd eq violation.violation}"></option>
                    </th:block>
                    <option th:selected="${violation.violation ne null && !#strings.contains(violation.violation, 'VT')}" value="etc">직접입력</option>
                  </select>
                  <th:block th:if="${violation.violation ne null and !#strings.contains(violation.violation, 'VT')}">
                    <div class="col-auto">
                      <input type="text" class=" form-control form-control-sm" name="violationEtc" th:value="${violation.violation}" readonly>
                    </div>
                  </th:block>
                </div>
              </th:block>
            </th:block>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">침범유형</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="invasionType" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('IST')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${commonCode.itemCd eq crackdownStatus.invasionType}"></option>
              </th:block>
            </select>
          </div>
        </div>
        <div class="mb-3 row">
          특수공무집행방해
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">발생건수</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="obstrExspdCnt" th:value="${crackdownStatus.obstrExspdCnt}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">피해인원</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="personDamageCnt" th:value="${crackdownStatus.personDamageCnt}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">피해액</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="personDamageAmount" th:value="${crackdownStatus.personDamageAmount}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">상세내용</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="personDamageDetail" th:value="${crackdownStatus.personDamageDetail}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">발생건수</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="materialDamageCnt" th:value="${crackdownStatus.materialDamageCnt}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">피해액</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="materialDamageAmount" th:value="${crackdownStatus.materialDamageAmount}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">상세내용</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="materialDamageDetail" th:value="${crackdownStatus.materialDamageDetail}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          검거기관
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당 기관</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="caseAgency" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('ATA')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${commonCode.itemCd eq crackdownStatus.caseAgency}"></option>
              </th:block>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">단속<br>경찰서</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="crackdownPolice" id="crackdownPolice" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('CPO')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${commonCode.itemCd eq crackdownStatus.crackdownPolice}"></option>
              </th:block>
              <option value="etc">직접입력</option>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">단속함정</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="crackdownBoat" id="crackdownBoat" disabled>
              <option value="">선택</option>
              <th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('CPO')))}">
                <th:block th:if="${'CPO'+num == crackdownStatus.crackdownPolice}" th:each="commonCode:${session.commonCode.get('CPO'+num)}">
                  <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${crackdownStatus.crackdownBoat eq commonCode.itemCd}"></option>
                </th:block>
              </th:block>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">MMSI.NO</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="mmsi" th:value="${crackdownStatus.mmsi}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          선박제원
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선명</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="boatNameKr" th:value="${crackdownStatus.fishingBoat.boatNameKr}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">톤수</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="tonCnt" th:value="${crackdownStatus.fishingBoat.tonCnt}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선질</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="boatMaterial" id="boatMaterial" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('BM')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${crackdownStatus.fishingBoat ne null && commonCode.itemCd eq crackdownStatus.fishingBoat.boatMaterial}"></option>
              </th:block>
              <option value="etc">직접입력</option>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선적 성</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="boatNnySung" th:value="${crackdownStatus.fishingBoat.boatNnySung}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선적 시</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="boatNnySi" th:value="${crackdownStatus.fishingBoat.boatNnySi}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선장명</label>
          <div class="col-sm-2">
            <th:block th:each="sailor:${crackdownStatus.sailorList}" th:if="${#strings.contains(sailor.position, 'POS001')}">
              <input th:if="${sailor.position eq 'POS001'}" class=" form-control form-control-sm" name="sailorNameKr" th:value="${sailor.sailorNameKr}" readonly>
            </th:block>
            <th:block th:if="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS001'].![1]) == null}">
              <input class=" form-control form-control-sm" name="sailorNameKr" readonly>
            </th:block>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">출생년도</label>
          <div class="col-sm-2">
            <th:block th:each="sailor:${crackdownStatus.sailorList}" th:if="${#strings.contains(sailor.position, 'POS001')}">
                <input th:if="${sailor.position eq 'POS001'}" class=" form-control form-control-sm" name="birthdate" id="birthdate" th:value="${#temporals.format(sailor.birthdate, 'yyyy-MM-dd')}" readonly>
            </th:block>
            <th:block th:if="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS001'].![1]) == null}">
              <input class=" form-control form-control-sm" name="birthdate" id="birthdate" readonly>
            </th:block>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선종</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="fisheryType" id="fisheryType" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('FT')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${crackdownStatus.fishingBoat ne null && commonCode.itemCd eq crackdownStatus.fishingBoat.fisheryType}"></option>
              </th:block>
              <option th:selected="${crackdownStatus.fishingBoat.fisheryType ne null && !#strings.contains(crackdownStatus.fishingBoat.fisheryType, 'FT')}" value="etc">기타</option>
            </select>
            <th:block th:if="${crackdownStatus.fishingBoat.fisheryType ne null && !#strings.contains(crackdownStatus.fishingBoat.fisheryType, 'FT')}">
              <div class="col-auto">
                <input type="text" class=" form-control form-control-sm" name="fisheryTypeEtc" th:value="${crackdownStatus.fishingBoat.fisheryType}" readonly>
              </div>
            </th:block>
          </div>
        </div>
        <div class="mb-3 row">
          어획물 축소기재
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">어종</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="catchFishSpecies" th:value="${crackdownStatus.fishingBoat.catchFishSpecies}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">수량</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="catchCnt" th:value="${crackdownStatus.fishingBoat.catchCnt}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          범칙물
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">어종</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="offenseFishSpecies" th:value="${crackdownStatus.fishingBoat.offenseFishSpecies}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">어획량</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="offenseCatchCnt" th:value="${crackdownStatus.fishingBoat.offenseCatchCnt}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">폐기량</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="offenseIllegalWasteQuantity" th:value="${crackdownStatus.fishingBoat.offenseIllegalWasteQuantity}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">위판량</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="offenseQuantity" th:value="${crackdownStatus.fishingBoat.offenseQuantity}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">위판금액</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="offenseAmount" th:value="${crackdownStatus.fishingBoat.offenseAmount}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          처리결과
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">처리현황</label>
          <div class="col-auto">
            <select class="form-select form-select-sm" name="processStatus" id="processStatus" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('PR')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${crackdownStatus.processResult ne null && commonCode.itemCd eq crackdownStatus.processResult.processStatus}"></option>
              </th:block>
              <option th:selected="${crackdownStatus.processResult.processStatus ne null && !#strings.contains(crackdownStatus.processResult.processStatus, 'PR')}" value="etc">직접입력</option>
            </select>
            <th:block th:if="${crackdownStatus.processResult.processStatus ne null && !#strings.contains(crackdownStatus.processResult.processStatus, 'PR')}">
              <div class="col-auto">
                <input type="text" class=" form-control form-control-sm" name="processStatusEtc" th:value="${crackdownStatus.processResult.processStatus}" readonly>
              </div>
            </th:block>
          </div>
        </div>
        <div class="mb-3 row">
          담보금 납부
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">납부액</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="damboPayment" th:value="${crackdownStatus.fishingBoat.damboPayment}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">납부일시</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="paymentPaymentDt" id="paymentPaymentDt" th:value="${#temporals.format(crackdownStatus.fishingBoat.paymentPaymentDt, 'yyyy-MM-dd HH:mm')}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          담보금 미납
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">미납액</label>
          <div class="col-sm-2">
            <input type="number" min="0" class=" form-control form-control-sm" name="damboUnpaidAmount" th:value="${crackdownStatus.fishingBoat.damboUnpaidAmount}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          선박처리
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">위탁시작일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="consignmentStartDt" id="consignmentStartDt" th:value="${#temporals.format(crackdownStatus.processResult.consignmentStartDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">위탁종료일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="consignmentEndDt" id="consignmentEndDt" th:value="${#temporals.format(crackdownStatus.processResult.consignmentEndDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">퇴거일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="evictionDt" id="evictionDt" th:value="${#temporals.format(crackdownStatus.processResult.evictionDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">환부일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="returnDt" id="returnDt" th:value="${#temporals.format(crackdownStatus.processResult.returnDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">몰수확정일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="confiscationDt" id="confiscationDt" th:value="${#temporals.format(crackdownStatus.processResult.confiscationDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">폐선일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="boatDisposalDt" id="boatDisposalDt" th:value="${#temporals.format(crackdownStatus.processResult.boatDisposalDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">폐선종류</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="boatDisposalType" th:value="${crackdownStatus.processResult.boatDisposalType}" disabled>
              <option value="">선택</option>
              <th:block th:each="commonCode:${session.commonCode.get('BDT')}">
                <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
                        th:selected="${crackdownStatus.processResult ne null && commonCode.itemCd eq crackdownStatus.processResult.boatDisposalType}"></option>
              </th:block>
            </select>
          </div>
        </div>
        <div class="mb-3 row">
          직접인계
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">직접인계일</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="directHandoverDt" id="directHandoverDt" th:value="${#temporals.format(crackdownStatus.processResult.directHandoverDt, 'yyyy-MM-dd')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">해점</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" placeholder="위도" name="handoverSeaPointLat" th:value="${crackdownStatus.processResult.handoverSeaPointLat}" readonly>
            <input class=" form-control form-control-sm" placeholder="경도" name="handoverSeaPointLon" th:value="${crackdownStatus.processResult.handoverSeaPointLon}" readonly>
            <input class=" form-control form-control-sm" placeholder="상세내용" name="handoverSeaPointDetail" th:value="${crackdownStatus.processResult.handoverSeaPointDetail}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">인계함정</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="handoverBoat" th:value="${crackdownStatus.processResult.handoverBoat}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">중측</br>인수함정</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="middleTakeoverBoat" th:value="${crackdownStatus.processResult.middleTakeoverBoat}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          구속/ 불구속
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">선장</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="captin" disabled>
              <option value="">선택</option>
              <option value="Y" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS001' && isRestriction == 'Y'].![1]) != null}">구속</option>
              <option value="N" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS001' && isRestriction == 'N'].![1]) != null}">불구속</option>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">항해장</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="mate" disabled>
              <option value="">선택</option>
              <option value="Y" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS002' && isRestriction == 'Y'].![1]) != null}">구속</option>
              <option value="N" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS002' && isRestriction == 'N'].![1]) != null}">불구속</option>
            </select>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">기관장</label>
          <div class="col-sm-2">
            <select class="form-select form-select-sm" name="warden" disabled>
              <option value="">선택</option>
              <option value="Y" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS003' && isRestriction == 'Y'].![1]) != null}">구속</option>
              <option value="N" th:selected="${#aggregates.sum(crackdownStatus.sailorList.?[position == 'POS003' && isRestriction == 'N'].![1]) != null}">불구속</option>
            </select>
          </div>
        </div>
        <div class="mb-3 row" id="sailorDiv">
          <th:block th:each="sailor:${crackdownStatus.sailorList}" th:if="${#strings.contains(sailor.position, 'POS005') || #strings.contains(sailor.position, 'POS006')}">
            <div class="row">
              <input type="hidden" name="sailorKey" th:value="${sailor.sailorKey}">
              <label class="col-sm-1 col-form-label col-form-label-sm text-center">선원 이름</label>
              <div class="col-sm-2">
                <input class=" form-control form-control-sm" name="sailorNameKr" th:value="${sailor.sailorNameKr}" readonly>
              </div>
              <div class="col-sm-2">
                <select class="form-select form-select-sm sailor-list" name="sailor" disabled>
                  <option value="">선택</option>
                  <option value="Y" th:selected="${sailor.isRestriction == 'Y'}">구속</option>
                  <option value="N" th:selected="${sailor.isRestriction == 'N'}">불구속</option>
                </select>
              </div>
            </div>
          </th:block>
        </div>
        <div class="mb-3 row">
          현장조사
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">나포일시</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="fieldIvsgtNapoDt" id="fieldIvsgtNapoDt" th:value="${#temporals.format(crackdownStatus.fieldIvsgtNapoDt, 'yyyy-MM-dd HH:mm')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">석방일시</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="fieldIvsgtReleaseDt" id="fieldIvsgtReleaseDt" th:value="${#temporals.format(crackdownStatus.fieldIvsgtReleaseDt, 'yyyy-MM-dd HH:mm')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">소요시간</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="fieldIvsgtTimeTaken" th:value="${crackdownStatus.fieldIvsgtTimeTaken}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          압송
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">압송시작</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="pressurizedStartDt" id="pressurizedStartDt" th:value="${#temporals.format(crackdownStatus.pressurizedStartDt, 'yyyy-MM-dd HH:mm')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">압송종료</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="pressurizedEndDt" id="pressurizedEndDt" th:value="${#temporals.format(crackdownStatus.pressurizedEndDt, 'yyyy-MM-dd HH:mm')}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">영장청구<br>소요시간</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="warrantReqTakeTime" th:value="${crackdownStatus.processResult.warrantReqTakeTime}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">거리</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="distance" th:value="${crackdownStatus.distance}" readonly>
          </div>
        </div>
        <div class="mb-3 row">
          압수어구
        </div>
        <div class="mb-3 row">
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">틀</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="confiscationFrame" th:value="${crackdownStatus.fishingBoat.confiscationFrame}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">폭</label>
          <div class="col-sm-2">
            <input class=" form-control form-control-sm" name="confiscationWidth" th:value="${crackdownStatus.fishingBoat.confiscationWidth}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">조</label>
          <div class="col-sm-2">
            <input class="form-control form-control-sm" name="confiscationJo" th:value="${crackdownStatus.fishingBoat.confiscationJo}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">개</label>
          <div class="col-sm-2">
            <input class="form-control form-control-sm" name="confiscationGae" th:value="${crackdownStatus.fishingBoat.confiscationGae}" readonly>
          </div>
          <label class="col-sm-1 col-form-label col-form-label-sm text-center">기타</label>
          <div class="col-sm-2">
            <input class="form-control form-control-sm" name="confiscationEtc" th:value="${crackdownStatus.fishingBoat.confiscationEtc}" readonly>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal-footer">
  <th:block th:if="${userSeq eq crackdownStatus.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
    <button type="button" class="btn btn-warning" id="cdsEditBtn">수정</button>
  </th:block>
  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</html>