<?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.257.10.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.257.10.1">
  <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.257.10.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.257.10.1">
  <link rel="stylesheet" href="dist/css/sisplan.newColorsButtons.css?versao=3.257.10.1">
  <link rel="stylesheet" href="dist/css/sisplan.adjustDataTableButtons.css?versao=3.257.10.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.257.10.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.257.10.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.257.10.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.257.10.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.257.10.1" />
  <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;
    }

    .card-2 {
      border: 1px solid rgb(155, 155, 155, 0.5);
      border-radius: 5px;
    }
  </style>
</head>

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

    <div class="content-wrapper">
      <div class="content-header">
        <div class="col-12 text-left p-0 mt-3 mb-2">
          <div class="card px-0 pt-4 pb-0 mt-3 mb-3">
            <div class="flex" style="margin-left:20px;">
              <h2 class="col-3">
                <strong class="ml-12">Liberação de Expedição</strong>
                <button type="button" class="btnTutorial" style="margin-top: -10px!important;" id="tutorial">
                  <i class="fas fa-question-circle"></i>
                </button>
              </h2>
              <div class="flex col-2" style="margin-top: -10px !important">
                <div class="pt-1 icheck-primary" style="margin-top:15px!important">
                  <input class="form-check-input" type="checkbox" id="checkImpresso">
                  <label class="form-check-label" for="checkImpresso">Impresso</label>
                </div>
              </div>
            </div>
            <div class="col-12 container-fluid">
              <h2 class="fs-title" style="margin-left:20px; margin-bottom: 0px !important">Dados Gerais</h2>
              <div class="row card-body d-flex justify-content-end" id="abaGeral">

                <div class="col-lg-3 mb-md-2 mb-1">
                  <label data-error="wrong" data-success="right" for="txtPedido">Pedido:</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" 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 mb-md-2 mb-1">
                  <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 mb-md-2 mb-1">
                  <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 mb-md-2 mb-1">
                  <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-3 mb-md-2 mb-1">
                  <label data-error="wrong" data-success="right" for="txtTpVenda">Tipo de Venda:</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtTpVenda" name="txtTpVenda" placeholder="Tipo de Venda">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-TpVenda" name="btn-TpVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-TpVenda" name="btn-limpa-TpVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>

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

                <div class="form-group col-3">
                  <label for="dtEmissaoDe">Data Emissão de/até </label>
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoDe" name="dtEmissaoDe">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoAte" name="dtEmissaoAte">
                  </div>
                </div>

                <div class="col"></div>

                <div class="col-lg col-12 mb-md-2 mb-1">
                  <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="row col-12 px-0 d-flex justify-content-between align-items-end">
                  <div class="col-lg-3 col-md-4 col-12 mb-3 mb-md-0 pl-0">
                    <label for="txtOrdem">Opção de Relatório:</label>
                    <div class="relative d-flex align-items-center">
                      <select id="txtOrdem" class="input-default focus custom-select">
                      </select>
                      <button class="btn btn-sm btn-success ml-2 btnEdicaoRelatorio" title="Edição de ordenações">
                        <i class="fas fa-check"></i>
                      </button>
                    </div>
                  </div>

                  <div class="col d-flex justify-content-end" style="margin-right: 7.5px">
                    <button class="btn btn-sisp btn-primary" id="btnConsultar"><span class="fas fa-search"></span> Consultar</button>
                    <button id="btnImprimir" class="btn btn-secondary btn-sisp marginBtnH" disabled><i class="fas fa-print"></i> Imprimir</button>
                  </div>
                </div>

                <div class="col-sm-12 card-body mt-3 card-2 d-none" style="width: 100% !important; margin: 0 auto; padding: 15px;" id="divTabelaPedidos">
                  <div class="d-flex justify-content-between align-items-center mb-3">
                    <h5 class="m-0 title-datatable">Lista de Pedidos</h5>
                  </div>
                  <div class="table-responsive">
                    <table id="tabelaPedidos" class="table table-sm-sisp table-hover" width="100%">
                      <thead class="thead-dark">
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </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.257.10.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.257.10.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.257.10.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.257.10.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.257.10.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.257.10.1"></script>
  <script src="dist/js/sisplan.js?versao=3.257.10.1"></script>
  <script src="utils/funcoes.js?versao=3.257.10.1"></script>
  <script src="utils/cookies.js?versao=3.257.10.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.257.10.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.257.10.1"></script>
  <script src="dist/js/driver.min.js?versao=3.257.10.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.257.10.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.257.10.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.257.10.1"></script>
  <script type="text/javascript" src="config.js?versao=3.257.10.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;

      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.257.10.1`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>
</body>

</html>