<?php
include_once "{$_SERVER['DOCUMENT_ROOT']}/common.inc.php";
?>


<div id="popup_facility_editor">
  <div class="awn-popup-confirm awn-form custom-popup">
    <div class="awn-popup-search popup-form mb-block btn-ksmain-inject-block">
      <!-- 폼 시작 -->
      <form id="form" class="flex-4 gap10" method="post" name="frmFacility">
        <div class="title-container flexrow">
          <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 설비관리 등록</div>
          
        </div>

        <!-- form 내용 -->
        <div class="form-contents flexcol">


          <!-- 인풋 및 셀렉트 -->
          <div class="form-box flexrow gap10">

            <div class="flexcol gap10 flex-4">

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <div class="flex-1 input-box flexrow flex-1">
                  <label for="FACLT_CD">설비 코드</label>
                  <input type="text" id="FACLT_CD" name="FACLT_CD">
                </div>
                <div class="flex-1 input-box flexrow flex-1">
                  <label for="FACLT_NM">설비명</label>
                  <input type="text" id="FACLT_NM" name="FACLT_NM">
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow">
                <div class="input-box flexrow">
                  <label for="FACLT_MNG_NO">관리번호</label>
                  <input type="text" id="FACLT_MNG_NO" name="FACLT_MNG_NO" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <div class="flex-1 input-box flexrow flex-1">
                  <label for="MAJR_EMP_NO">담당자 정)</label>
                  <input type="text" id="MAJR_EMP_NO" name="MAJR_EMP_NO">
                  <!-- 팝업 -->
                </div>
                <div class="flex-1 input-box flexrow flex-1">
                  <label for="MINR_EMP_NO">부)</label>
                  <input type="text" id="MINR_EMP_NO" name="MINR_EMP_NO">
                  <!-- 팝업 -->
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <div class="flex-1 input-box flexrow">
                  <label for="PUR_DT">구입일</label>
                  <input type="date" id="PUR_DT"  value="<?php echo $today; ?>" max="9999-12-31" name="PUR_DT" />
                </div>
                <div class="flex-1 input-box flexrow">
                  <label for="PUR_BP_NM">구입처</label>
                  <input type="text" id="PUR_BP_NM" name="PUR_BP_NM" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <div class="flex-2 input-box flexrow">
                  <label for="PUR_REPRE_NM">대표</label>
                  <input type="text" id="PUR_REPRE_NM" name="PUR_REPRE_NM" />
                </div>
                <div class="flex-2 input-box flexrow">
                  <label for="PUR_PRSN_NM">담당</label>
                  <input type="text" id="PUR_PRSN_NM" name="PUR_PRSN_NM" />
                </div>
                <div class="flex-3 input-box flexrow">
                  <label for="PUR_TEL_NO">전화번호</label>
                  <input type="text" id="PUR_TEL_NO" name="PUR_TEL_NO" oninput="localAutoHyphen(this)" maxlength="13" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow">
                <div class="input-box flexrow">
                  <label for="MAKER_NM">제조처</label>
                  <input type="text" id="MAKER_NM" name="MAKER_NM" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <div class="flex-1 input-box flexrow">
                  <label for="INTNL_USE_DEPT_CD">사용부서</label>
                  <input type="text" id="INTNL_USE_DEPT_CD" name="INTNL_USE_DEPT_CD" />
                  <!-- 팝업 -->
                </div>
                <div class="flex-1 input-box flexrow">
                  <label for="ITEM_GRP">설비그룹</label>
                  <select id="ITEM_GRP" name="ITEM_GRP">
                    <?= getSelectOptions($GLOBALS['_FACLT_GRP'], $emptv = "- " . cUtil\Mlang::getText("선택") . " -") ?>
                  </select>
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow">
                <div class="input-box flexrow">
                  <label for="FACLT_SPEC">형식규격</label>
                  <input type="text" id="FACLT_SPEC" name="FACLT_SPEC" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow">
                <div class="input-box flexrow">
                  <label for="PURPOS_USAGE">용도</label>
                  <input type="text" id="PURPOS_USAGE" name="PURPOS_USAGE" />
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->

              <!-- 인풋 박스 시작 -->
              <div class="input-container flexrow gap06">
                <!-- <div class="flex-1 input-box flexrow">
                    <label for="WRK_TEAM">작업팀</label>
                    <select name="WRK_TEAM" id="WRK_TEAM">
                      <php? //getSelectOptions($GLOBALS['_WRK_TEAM'], $emptv = "- " . cUtil\Mlang::getText("선택") . " -") ?>
                    </select>
                </div> -->
                <div class="flex-1 input-box flexrow">
                  <p class="input-title">메뉴얼</p>
                  <label class="form_toggle">
                    <input type="checkbox" id="MANUL_FLG" name="MANUL_FLG" value="Y" checked>
                  </label>
                </div>
              </div>
              <!-- 인풋 박스 종료 // -->
            </div>

            <!-- 이미지 입력 폼 시작 -->
            <div class="img-container flexcol flex-2">
              <div class="img-box">
                <!-- <div class="p-4"><img id="img_preview"></div>
                <div class="img-cover">
                  <input type="button" value="삭제" class="btn-danger"   onClick="removeFile(event)">
                </div> -->
              </div>
              <label for="file_input" class="basic-btn">
                설비 이미지 등록 / 수정
                <input type="file" accept="image/*" id="file_input" name="file_input" onchange="previewImage(event)">
                <input type="hidden" name="tmp_file" id="tmp_file">
              </label>
                <div id="add_btn" name="add_btn" class="basic-btn add-btn">저장</div>
            </div>
            <input type="hidden" name="FACLT_CD_PK" id="FACLT_CD_PK" value="">
            <input type="hidden" name="FILE_ID" id="FILE_ID">
            <input type="hidden" name="SID" id="SID">

          </div>
          <!-- 글자 입력 폼 종료 // -->
        </div>


      </form>
    </div>
  </div>


