<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Disponibilidade de Tecidos Crús</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.2511.13.1">
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../dist/css/PesquisaVariosSelect2.css?versao=3.2511.13.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/dataTables.bootstrap4.min.css?versao=3.2511.13.1" />
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.2511.13.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.2511.13.1">
  <style>
    .card {
      box-shadow: none !important;
      border-radius: 0 !important;
      margin-bottom: 0 !important;
    }

    .card-header {
      box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
    }


    .fa-angle-right,
    .fa-angle-down {
      color: #343a40;
    }

    .card-body {
      margin-left: 0px !important;
      padding-left: 1.25rem !important;
      padding-top: 0px;
      padding-bottom: 0px;
      padding-right: 1.25rem !important;
    }

    .header-content-page .title-page,
    .title-content-page .title,
    .title-page {
      font-size: 20px;
      line-height: normal;
      font-weight: 500;
      color: #343a40;
      margin: 0;
      font-family: Roboto, Arial, sans-serif;
    }

    #DadosGerais>.card,
    #obs>.card {
      background: #f7f7f7;
    }

    #lotesDesdobrados {
      margin-bottom: 100px;
    }

    .radiosStyle {
      padding-top: 0.5rem;
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      margin-left: 0%;
    }

    .radiosStyle2 {
      padding-top: 0.5rem;
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
    }

    .borda {
      padding: 10px;
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__rendered {
      float: left;
    }

    .border-Field .textoBorda {
      font-size: 1.1em !important;
      text-align: left !important;
      width: auto;
      padding: 0 10px;
      border-bottom: none;
    }

    .border-Field {
      border: 1px solid var(--white-dark) !important;
      /* padding: 0 1.0em 1.0em 1.0em !important; */
      margin: 0 0 1.0em 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
    }

    .modalFooterFixo {
      position: absolute;
      bottom: 0;
      left: 10px;
      right: 10px;
      background-color: #171f21;
      z-index: 1;
      padding: 4px;
    }


    .sidebar-collapse .sidebar-margin {
      margin-left: 5%
    }

    /* .sidebar-margin {
            margin-left: 250px
        } */

    /* #rodape {
            margin-bottom: 80px;
        } */


    body {
      font-size: 12px;
    }

    .input-group button,
    .input-group input {
      /* height: 32px !important; */
    }

    button {
      /* height: 32px !important; */
      /* padding: 0 !important; */
    }

    .table tbody td {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .table td,
    .table th {
      border: 1px solid var(--table-border) !important;
    }

    .btn-success {
      color: #fff;
      background-color: #28a745;
      border-color: #28a745;
      box-shadow: none;
    }

    .clicavel {
      color: #3582d5;
      cursor: pointer;
    }
  </style>
</head>

<body class="hold-transition sidebar-mini layout-top-nav">
  <div class="wrapper">

    <div class="content-wrapper">
      <div class="content-header">
        <div class="container-fluid">
          <div class="row">
            <div class="col-12">
              <div class="card" style="height:auto;">
                <div class="card-header bg-dark">
                  <div class="row flex">
                    <h6 class="text-white m-0" id="title">Ordens a Emitir</h6>
                  </div>
                </div>
                <div id="dados" class="p-2 row">
                  <div class="col-sm-8 col-12">
                    <div class="conteudo table-responsive">
                      <table id="tabela-ordens-emitidas" class="table table-sm table-hover table-select" style="width: 100%" width="100%">
                        <thead>
                          <tr>
                            <th>Ordem</th>
                            <th>Roteiro</th>
                            <th>Codigo</th>
                            <th>Cor</th>
                            <th>Previsão</th>
                            <th>Rolos Prog.</th>
                            <th>Rolos</th>
                            <th>Agrupamento</th>
                            <th>Agrupamento Casado</th>
                            <th>RGB</th>
                          </tr>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>
                  </div>
                  <div class="col-sm-4 col-12">
                    <div class="conteudo table-responsive">
                      <table id="tabela-ordens-agrupamento" class="table table-sm table-hover" style="width: 100%" width="100%">
                        <thead>
                          <tr>
                            <th>Código</th>
                            <th>Roteiro</th>
                            <th>Origem Casado</th>
                            <th>Agrupamento</th>
                          </tr>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>
                  </div>
                  <div class="col-sm-12 col-12">
                    <div class="conteudo table-responsive">
                      <table id="tabela-ordens-data" class="table table-sm table-hover" style="width: 100%" width="100%">
                        <thead>
                          <tr>
                            <th>Data</th>
                            <th>Qtde. Rolos</th>
                          </tr>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>



    <div id="modal-roteiro-operacoes" class="modal" tabindex="-1" role="dialog" style="z-index: 1052;">
      <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content" id="modalBody">
          <div class="modal-header">
            <h4 class="modal-title">Roteiro de Operações</h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">

            <div class="row">
              <div class="col-12 mb-2">
                <div class="d-flex align-items-center justify-center " style="font-size:16px">
                  <span class="primary-color-dark semi-bold">Roteiro: </span>
                  <span class="primary-color-dark semi-bold pl-2" id="modal-roteiro-roteiro"></span>
                </div>
              </div>
              <div class="col-12">
                <div class="conteudo table-responsive">
                  <table id="tabela-roteiro" class="table table-sm table-hover" style="width: 100%" width="100%">
                    <thead>
                      <tr>
                        <th>Código</th>
                        <th>Descrição</th>
                      </tr>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="modal-ordens-emitidas" class="modal" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-xl" style="width: 100vw!important; height: 100%!important;max-width: 200%!important; margin: 0px!important" role="document">
        <div class="modal-content pr-4 pl-4" style="height: 100%!important; max-height: 100vh!important" id="modalBody">
          <div class="modal-header">
            <h4 class="modal-title">Ordens Emitidas</h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <div class="row">
              <div class="col-sm-8 col-12">
                <div class="conteudo table-responsive">
                  <table id="tabela-ordens-emitidas" class="table table-sm table-hover table-select" style="width: 100%" width="100%">
                    <thead>
                      <tr>
                        <th>Ordem</th>
                        <th>Roteiro</th>
                        <th>Codigo</th>
                        <th>Cor</th>
                        <th>Previsão</th>
                        <th>Rolos Prog.</th>
                        <th>Rolos</th>
                        <th>Agrupamento</th>
                        <th>Agrupamento Casado</th>
                        <th>RGB</th>
                      </tr>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
              <div class="col-sm-4 col-12">
                <div class="conteudo table-responsive">
                  <table id="tabela-ordens-agrupamento" class="table table-sm table-hover" style="width: 100%" width="100%">
                    <thead>
                      <tr>
                        <th>Código</th>
                        <th>Roteiro</th>
                        <th>Origem Casado</th>
                        <th>Agrupamento</th>
                      </tr>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
              <div class="col-sm-12 col-12">
                <div class="conteudo table-responsive">
                  <table id="tabela-ordens-data" class="table table-sm table-hover" style="width: 100%" width="100%">
                    <thead>
                      <tr>
                        <th>Data</th>
                        <th>Qtde. Rolos</th>
                      </tr>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="modal-detalhes-ordem" class="modal" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-xl" style="width: 100vw!important; height: 100%!important;max-width: 200%!important; margin: 0px!important" role="document">
        <div class="modal-content pr-4 pl-4" style="height: 100%!important; max-height: 100vh!important" id="modalBody">
          <div class="modal-header">
            <h4 class="primary-color-dark semi-bold">Detalhamento da Ordem de Produção</h4>
            <h4 class="primary-color-dark semi-bold pl-2" id="modal-detalhes-numero"></h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <div class="row pl-4 pr-4">
              <div class="col-sm-4 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalhePeriodo">Período </label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalhePeriodo" name="txtDetalhePeriodo" class="form-control" placeholder="Período">
                </div>
              </div>
              <div class="col-sm-4 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalheAgrupamento">Agrupamento </label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalheAgrupamento" name="txtDetalheAgrupamento" class="form-control" placeholder="Agrupamento">
                </div>
              </div>
              <div class="col-sm-4 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalheMaquina">Máquina </label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalheMaquina" name="txtDetalheMaquina" class="form-control" placeholder="Máquina">
                </div>
              </div>
              <div class="col-sm-12 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalheObs">Observação </label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalheObs" name="txtDetalheObs" class="form-control" placeholder="Observação">
                  <div class="input-group-append d-none">
                    <button class="btn bg-danger" title="Alterar Observação" id="btn-detalhe-obs" name="btn-detalhe-obs"><i class="m-0 p-0 fas fa-check"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-sm-12 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalheObs2">Observação 2</label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalheObs2" name="txtDetalheObs2" class="form-control" placeholder="Observação 2">
                  <div class="input-group-append d-none">
                    <button class="btn bg-danger" title="Alterar Observação 2" id="btn-detalhe-obs2" name="btn-detalhe-obs2"><i class="m-0 p-0 fas fa-check"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-sm-12 col-12 form-group text-left">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDetalheEstagioAtual">Estágio Atual</label>

                <div class="input-group">
                  <input type="text" class="input-default focus form-control " readonly aria-describedby="cepError" id="txtDetalheEstagioAtual" name="txtDetalheEstagioAtual" class="form-control" placeholder="Estágio Atual">
                </div>
              </div>
              <div class="col-sm-12 col-12">
                <label class="labelGeral">Principal</label>
                <div class="table-responsive">
                  <table class="table table-sm table-hover" style="width: 100%" width="100%" id="tabela-detalhamento-principal">
                    <thead>
                      <tr>
                        <th>Código</th>
                        <th>Cor</th>
                        <th>Origem</th>
                        <th>Cor Origem</th>
                        <th>Depósito</th>
                        <th>Tipo</th>
                        <th>Pedido</th>
                        <th>Cliente</th>
                        <th>Critério</th>
                        <th>Rolos</th>
                        <th>Kg</th>
                        <th>Quinzena</th>
                      </tr>
                    </thead>
                    <tbody></tbody>
                  </table>
                </div>
              </div>
              <div class="col-sm-12 col-12">
                <label class="labelGeral">Ordens Agrupamento</label>
                <div class="table-responsive">
                  <table class="table table-sm table-hover" style="width: 100%" width="100%" id="tabela-detalhamento-agrupamento">
                    <thead>
                      <tr>
                        <th>Ordem Beneficiamento</th>
                        <th>Referência</th>
                        <th>Cor Referência</th>
                        <th>Origem</th>
                        <th>Cor Origem</th>
                        <th>Rolos</th>
                        <th>Kg</th>
                      </tr>
                    </thead>
                    <tbody></tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>


  <?php
  include_once('../../modais.php');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="../plugins/jquery/jquery.min.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.2511.13.1"></script>
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.2511.13.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/adminlte.min.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.2511.13.1"></script>
  <script src="../utils/funcoes.js?versao=3.2511.13.1"></script>
  <script src="../utils/cookies.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/requisicoes.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.2511.13.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.2511.13.1"></script>
  <script src="../plugins/select2/js/select2.full.min.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="../dist/js/sum().js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.2511.13.1"></script>
  <script src="../plugins/moment/moment.min.js?versao=3.2511.13.1"></script>
  <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/jquery.mask.min.js?versao=3.2511.13.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.2511.13.1"></script>
  <script>
    $(document).ready(async function() {
      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      sArquivo = `${BASE_URI}/pages/disponibilidade_tecidos/tela_ops.js?versao=3.2511.13.1`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>
</body>

</html>