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

<!-- 미리보기 팝업(pdf 및 사진 등)-->
<div id="pop_file_preview">

  <style>
    #awn-popup-wrapper .awn-popup-body {
      max-width: initial;
      width: 97vw;
      height: 97vh;
    }

    #awn-popup-wrapper .awn-popup-confirm.awn-preview {
      width: 100%;
      height: 100%;
      align-items: center;
      display: flex;
      flex-direction: column;
    }

    #awn-popup-wrapper .awn-preview .awn-popup-content {
      width: 100%;
      height: 100%;
    }

    #awn-popup-wrapper .awn-preview .awn-popup-content #preview_frame {
      width: 100%;
      height: 100%;
      overflow: auto;
    }
  </style>
  <div class="awn-popup-confirm awn-preview">
    <div class="awn-popup-content"><iframe id="preview_frame"><!-- Grid Api 또는 테이블 --></iframe></div>
  </div>

</div>


<!-- 거래처 선택 팝업 -->
<div id="popup_client_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 거래처 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <!-- <label for="sgrp">영업분류: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->

        <label for="stxt">거래처명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="pop_partner_list"></div>
    </div>
  </div>
</div>


<!-- item popup <품목코드 선택> -->

<!-- 품목코드 선택 팝업 -->
<div id="popup_item_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i>품목코드 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="sgrp">품목그룹: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select>

        <label for="stxt">품목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="popItemList"></div>
    </div>
  </div>
</div>

<!-- ITEM ROUNTING POPUP -->
<div id="popup_routing_container">
  <div class="awn-popup-confirm awn-routing custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i>품목 라우팅</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_fld form-inline d-block">
        <label for="stxt">품목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table hide-sub-column" id="popRountingList"></div>
    </div>
  </div>
</div>


<!-- bizarea popup <사업장 선택> -->
<!-- 사업장 선택 팝업 -->
<div id="popup_bizarea_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 사업장 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">사업장명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger"><i class="fa-regular fa-window-restore"></i>
          초기화</button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table"></div>
    </div>
  </div>
</div>

<!-- faciltiy popup <설비 선택> -->
<!-- 설비 선택 팝업 -->
<div id="popup_facility_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 설비 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">설비명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">

        <!-- <label for="sgrp">사용부서: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->
        |
        <button type="button" id="ptReset" class="btn btn-danger"><i class="fa-regular fa-window-restore"></i>
          초기화</button>
      </div>
    </div>
    <div class="awn-popup-content tb-height-full">
      <div class="hy-table" id="pop_facility_list"></div>
    </div>
  </div>
</div>

<!-- dept popup <부서 선택> -->

<!-- 부서 선택 팝업 -->
<div id="popup_dept_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 부서 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">부서명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <!-- 부서 선택 가능 리스트 -->
      <div class="hy-table"></div>
    </div>
  </div>
</div>

<!-- oper popup <공정 선택> -->

<!-- 공정 선택 팝업 -->
<div id="popup_oper_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 공정 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">공정명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table"></div>
    </div>
  </div>
</div>

<!-- insp popup <검사항목 선택> -->

<!-- 검사항목 선택 팝업 -->
<div id="popup_insp_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 검사항목 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">검사항목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">

        <label for="sgrp">검사방법: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select>
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table"></div>
    </div>
  </div>
</div>
<!-- insp popup <검사항목 선택> -->

<!-- 검사항목 선택 팝업 -->
<div id="popup_insp_item">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 검사항목 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">검사항목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">

        <label for="sgrp">검사방법: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select>
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="insp_item"></div>
    </div>
  </div>
</div>

<!-- order popup <검사항목 선택> -->

<!-- 검사항목 선택 팝업 -->
<div id="popup_order_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 생산오더 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <label for="stxt">품목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table"></div>
    </div>
  </div>
</div>

<!-- worker popup <사원 선택> -->

<!-- 사원 선택 팝업 -->
<div id="popup_worker_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i> 사원 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <!-- <label for="sgrp">부서: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->
        <!-- <label for="scheck">현장직: </label>
        <input type="checkbox" name="scheck" id="scheck" class=""> -->

        <label for="stxt">성명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <!-- 사원 선택 가능 리스트 -->
      <div class="hy-table"></div>
    </div>
  </div>
</div>


<!-- 불량 선택 팝업 -->
<div id="popup_def_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i>불량코드 선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <!-- <label for="sgrp">품목코드: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->

        <label for="stxt">불량코드 </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="popDefList"></div>
    </div>
  </div>
</div>


<!-- order item popup <생산실적 품목코드 선택> -->

<!-- 품목코드 선택 팝업 -->
<div id="popup_reg_order_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i>생산실적 품목선택</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <!-- <label for="sgrp">품목코드: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->

        <label for="stxt">품목명: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button>
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="popOrderItemList"></div>
    </div>
  </div>
</div>



<!-- OperCheck popup <생산오더등록 공정별 검사항목 팝업> -->

<!-- 품목코드 선택 팝업 -->
<div id="popup_oper_check_container">
  <div class="awn-popup-confirm awn-partner custom-popup">
    <div class="awn-popup-title"><i class="bi bi-card-heading"></i>공정별 검사항목</div>
    <div class="awn-popup-search mb-block btn-ksmain-inject-block">
      <div class="s_exp">※ 더블클릭으로 선택/반영 합니다.</div>
      <div class="s_fld form-inline d-block">
        <!-- <label for="sgrp">품목코드: </label>
        <select id="sgrp" name="sgrp" class="form-control form-select w100">
        </select> -->

        <label for="stxt">검사항목: </label>
        <input type="text" name="stxt" id="stxt" class="form-control d-inline w120 align-bottom">
        <!-- |
        <button type="button" id="ptReset" class="btn btn-danger">
          <i class="fa-regular fa-window-restore"></i>
          초기화
        </button> -->
      </div>
    </div>
    <div class="awn-popup-content">
      <div class="hy-table" id="popOperCheck"></div>
    </div>
  </div>
</div>