<?php include_once('../../config.php') ?>

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Liberação de Expedição</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.2310.23.2">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.2310.23.2">
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.2310.23.2">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.2310.23.2">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.2310.23.2" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.2310.23.2">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.2310.23.2" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.2310.23.2">
  <style>
    .radioStyle {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: 7.25px;
      height: 136px;
    }

    .campoSel {
      display: inline-block;
      position: absolute;
      width: 22px;
      height: 22px;
      border: 1px solid #D3CFC8;
      border-radius: 0;
    }
  </style>
</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <div class="wrapper">
    <?php
    include_once('../../menu.php');
    ?>
    <div class="content-wrapper">
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 flex">
              <h1 class="m-0 text-dark">Liberação de Expedição</h1>
              <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;" id="tutorial">
                <i class="fas fa-question-circle"></i>
              </button>
              <label style="margin-left: 30px; margin-top: 10px;" class="form-check-label" for="checkImpresso"><input class="form-check-input" type="checkbox" id="checkImpresso"> Impresso</label>
            </div>
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item"><a href="../index">Início</a></li>
                <li class="breadcrumb-item active">Liberação de Expedição</li>
              </ol>
            </div>
          </div>
        </div>
        <div class="card col-12 mt-5 container-fluid">
          <div class="row card-body d-flex justify-content-end" id="abaGeral">

            <div class="col-lg-3 form-group">
              <label data-error="wrong" data-success="right" for="txtPedido">Pedido:</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" disabled id="txtPedido" name="txtPedido" placeholder="Pedido">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btn-Pedido" name="btn-Pedido" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                  <button class="btn bg-danger" id="btn-limpa-Pedido" name="btn-limpa-Pedido" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                </div>
              </div>
            </div>

            <div class="col-lg-3 form-group">
              <label data-error="wrong" data-success="right" for="txtStatus">Status:</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtStatus" name="txtStatus" placeholder="Status">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btn-Status" name="btn-Status" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                  <button class="btn bg-danger" id="btn-limpa-Status" name="btn-limpa-Status" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                </div>
              </div>
            </div>

            <div class="col-lg-3 form-group">
              <label data-error="wrong" data-success="right" for="txtFuncionario">Funcionário:</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtFuncionario" name="txtFuncionario" placeholder="Funcionário">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btn-Funcionario" name="btn-Funcionario" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                  <button class="btn bg-danger" id="btn-limpa-Funcionario" name="btn-limpa-Funcionario" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                </div>
              </div>
            </div>

            <div class="col-lg-3 form-group">
              <label data-error="wrong" data-success="right" for="txtTransportadora">Transportadora:</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtTransportadora" name="txtTransportadora" placeholder="Transportadora">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btn-Transportadora" name="btn-Transportadora" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                  <button class="btn bg-danger" id="btn-limpa-Transportadora" name="btn-limpa-Transportadora" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                </div>
              </div>
            </div>

            <div class="col-lg-1 form-group">
              <label data-error="wrong" data-success="right" for="selectQuantidade">Qtde:</label>
              <select id="selectQuantidade" class="input-default focus custom-select">
                <option value="1" selected>1</option>
                <option value="5">5</option>
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
                <option value="40">40</option>
                <option value="50">50</option>
                <option value="75">75</option>
                <option value="100">100</option>
              </select>
            </div>

            <div class="col-lg-2 form-group" style="margin-top: 28px;">
              <div class="input-group">
                <button class=" btn btn-primary btn-sisp" id="btnConsultar"><span class="fas fa-search"></span> Consultar</button>
              </div>
            </div>

            <div class="col-sm-12 table-responsive card-body">
              <h5>Pedidos</h5>
              <table id="tabelaPedidos" class="table table-sm table-select table-hover" width="100%">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>

            <div class="col-sm-12 d-flex justify-content-end">
              <button id="btnImprimir" class="btn btn-danger btn-sisp">Imprimir</button>
            </div>

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

    </div>
  </div>
  <?php
  include_once('../../footer.php');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="plugins/jquery/jquery.min.js?versao=3.2310.23.2"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.2310.23.2"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.2310.23.2"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.2310.23.2"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2310.23.2"></script>
  <script src="dist/js/adminlte.min.js?versao=3.2310.23.2"></script>
  <script src="dist/js/sisplan.js?versao=3.2310.23.2"></script>
  <script src="utils/funcoes.js?versao=3.2310.23.2"></script>
  <script src="utils/cookies.js?versao=3.2310.23.2"></script>
  <script src="dist/js/requisicoes.js?versao=3.2310.23.2"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.2310.23.2"></script>
  <script src="dist/js/driver.min.js?versao=3.2310.23.2"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.2310.23.2"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.2310.23.2"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.2310.23.2"></script>
  <script type="text/javascript" src="config.js?versao=3.2310.23.2"></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;

      const temAcesso = await temAcessoTela('LIBERACAO_EXPEDICAO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/liberacao_expedicao/liberacao_expedicao.js?versao=3.2310.23.2`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>
</body>

</html>