<?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 | Follow Up de Compras</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.264.8.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.264.8.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.264.8.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.264.8.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.264.8.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.264.8.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.264.8.1">
  <link rel="stylesheet" href="dist/css/select.bootstrap.min.css?versao=3.264.8.1" />
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.264.8.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.264.8.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.264.8.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.264.8.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.264.8.1">
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.newColorsButtons.css?versao=3.264.8.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;
    }

    .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(--font-color) !important;
      padding: 0 1.0em 0 1.0em !important;
      margin: 0 0 0 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      border-radius: 3px !important;
    }

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

    .table.dataTable tr td,
    .table.dataTable tr td,
    .table.dataTable th {
      padding: 4px 12px;
    }

    .card {
      padding: 1.5rem;
      border-top: 2px outset #ddd;
      box-shadow: none !important;
      margin-top: 20px;
      padding-top: 20px;
    }

    #legendas {
      flex-direction: row;
      flex-wrap: wrap;
    }

    .quadrado {
      width: 20px;
      margin-right: 5px;
      height: 20px;
    }
  </style>
</head>

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

    <div class="content-wrapper">
      <section class="content">
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6 flex">
              </div>
              <div class="col-sm-6">
                <!-- <ol class="breadcrumb float-sm-right">
                  
                  <li class="breadcrumb-item active">Liberação O.C</li>
                </ol> -->
              </div><!-- /.col -->
              <div class="container-fluid" id="grad1">
                <div class="row justify-content-center mt-0">
                  <div class="col-12">
                    <div class="card mb-0 px-0">
                      <div class="card-header" style="border: none!important;box-shadow:none!important;">
                        <h2 class="m-0 pl-2">Follow Up de Compras</h2>
                      </div>
                      <div class="container-fluid">
                        <div class="row card-body" id="abaGeral">
                          <form id="form" class="col-12">
                            <div id="tutorialFiltros" class="row card-body p-0">
                              
                              <div class="form-group col-xl-4 col-12">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtMaterial">Materiais:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtMaterial" name="txtMaterial" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnMaterial" name="btnMaterial" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnLimpaMaterial" name="btnLimpaMaterial" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>

                              <div class="form-group col-xl-4 col-12">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDeposito">Depósitos:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtDeposito" name="txtDeposito" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnDeposito" name="btnDeposito" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnLimpaDeposito" name="btnLimpaDeposito" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>

                              <div class="form-group col-xl-4 col-12">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtEmpresa">Empresas:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtEmpresa" name="txtEmpresa" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnEmpresa" name="btnEmpresa" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnLimpaEmpresa" name="btnLimpaEmpresa" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                             
                              <div class="col-auto form-group flex align-items-end ml-auto">
                                <button type="button" class="btn btn-primary btn-sisp" id="btnConsultar"><i class="fas fa-search"></i> Consultar</button>
                              </div>

                              <div class="form-row col-12 pr-1">
                                <div class="flex flex-column col-12 pr-0">
                                  <div class="table-responsive">
                                    <table id="tabelaItens" class="table table-select table-hover" width="100%">
                                      <thead>
                                      </thead>
                                      <tbody>
                                      </tbody>
                                    </table>
                                  </div>
                                </div>
                              </div>

                              <div class="form-row col-12 pr-1 align-items-end my-1">
                                <div class="button-group ml-auto">
                                  <button type="button" class="btn btnVerde btn-sisp d-none" id="btnBaixar"><i class="fas fa-check"></i> Gravar</button>
                                </div>
                              </div>

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

  <div
    class="modal fade"
    data-backdrop="static"
    id="modalManutencao"
    tabindex="-1"
    role="dialog"
    aria-labelledby="modalManutencao"
    aria-hidden="true">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Alterar</h4>
          <button
            type="button"
            class="close"
            data-dismiss="modal"
            aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body pb-0">
          <form id="formManutencao">
            <div class="form-row">
              <div class="col-6 form-group">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtQuantidadeBaixarModal">Baixar:</label>
                <input autocomplete="off" type="text" class="input-default focus form-control campoValor text-right" id="txtQuantidadeBaixarModal" placeholder="0,00" />
              </div>
              <div class="col-6 form-group">
                <label data-error="wrong" class="labelGeral" data-success="right" for="txtQuantidadeEstornarModal">Estornar:</label>
                <input autocomplete="off" type="text" class="input-default focus form-control campoValor text-right" id="txtQuantidadeEstornarModal" placeholder="0,00" />
              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <button
            type="button"
            class="btn btnVerde btn-sisp"
            id="btnConfirmarModal">
            <i class="fas fa-check"></i>
            Confirmar
          </button>
          <button
            class="btn btn-danger btn-sisp"
            class="close"
            data-dismiss="modal"
            aria-label="Close"
            id="btnCancelarModal">
            Cancelar
          </button>
        </div>
      </div>
    </div>
  </div>
  <?php
  include_once('../../modais.php');
  include_once('./modal_manutencao.php');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  <script src="plugins/jquery/jquery.min.js?versao=3.264.8.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.264.8.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.264.8.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.264.8.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.264.8.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.264.8.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.264.8.1"></script>
  <script src="dist/js/sisplan.js?versao=3.264.8.1"></script>
  <script src="utils/funcoes.js?versao=3.264.8.1"></script>
  <script src="utils/cookies.js?versao=3.264.8.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.264.8.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.264.8.1"></script>
  <script src="dist/js/driver.min.js?versao=3.264.8.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.264.8.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.264.8.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.264.8.1"></script>
  <script type="text/javascript" src="config.js?versao=3.264.8.1"></script>
  <script src="https://cdn.datatables.net/select/1.6.0/js/dataTables.select.min.js"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.264.8.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.264.8.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('FOLLOWUP_COMPRAS');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

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

    });
  </script>
</body>

</html>