<?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 | Orçamento</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.235.10.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.235.10.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.235.10.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.235.10.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.235.10.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.235.10.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.235.10.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.235.10.1">

  <style>
    .form-check {
      margin-left: 8px;
      margin-bottom: 10px;
    }

    .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 0.5em 0 0.5rem !important;
      margin: 0 0 1.0em 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      border-radius: 3px !important;
    }

    .icheck-primary {
      margin-top: 0px !important;
    }
  </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">Orçamento</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> -->
            </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">Acesso Orçamento</li>
              </ol>
            </div>
          </div>
        </div>
        <div class="container-fluid">
          <div class="row card">
            <div class="col-sm-12 mt-3">
              <button class="btn btn-success btn-sisp" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
              <button class="btn btn-danger btn-sisp" id="btnIncluir"><span class="fas fa-plus"></span> Incluir</button>
            </div>
            <div class="col-sm-12 table-responsive card-body">
              <h5>Lista de Cadastros</h5>
              <table id="tabelaCadastros" class="table table-sm table-select table-hover" width="100%">
                <thead>
                  <tr>
                    <th class="th-sm">ID
                    </th>
                    <th class="th-sm">TELA
                    </th>
                    <th class="th-sm" style="width: 85%">MENSAGEM
                    </th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="modal-filtros" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-xl" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title">Filtros</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">
          <div>
            <!-- <div class="card-body pt-0"> -->

            <div class="form-row" id="divRelAnalise">
              <div class="form-group col-lg-2 col-2 col-sm-6 mb-0">
                <div class="">
                  <label for="">Data Emissão:</label>
                  <div class="relative">
                    <input type="date" max="2500-12-31" value="1200-01-01" max="2500-12-31" class="input-default focus form-control validate" id="txtDataEmissaoI" name="DataDe">
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-2 col-2 col-sm-6 mb-0">
                <div class="">
                  <label for="dtEmifim">Até:</label>
                  <div class="relative">
                    <input type="date" max="2500-12-31" value="2500-12-01" max="2500-12-31" class="input-default focus form-control validate" id="txtDataEmissaoF" name="DataAte">
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-6 col-6 col-sm-12 mt-3 mb-0">
                <fieldset class="form border-Field p-0">
                  <legend class="textoBorda pb-0 mb-0">Status Venda</legend>
                  <div class="form-row">
                    <div class="form-check mb-0 pb-0 icheck-primary">
                      <input class="form-check-input mb-0" type="checkbox" id="cbEmitido" checked> <label for="cbEmitido">Emitido</label>
                    </div>
                    <div class="form-check mb-0 pb-0 icheck-primary">
                      <input class="form-check-input mb-0" type="checkbox" id="cbPendente" checked> <label for="cbPendente">Pendente</label>
                    </div>
                    <div class="form-check mb-0 pb-0 icheck-primary">
                      <input class="form-check-input mb-0" type="checkbox" id="cbAgrupado" checked> <label for="cbAgrupado">Agrupado</label>
                    </div>
                    <div class="form-check mb-0 pb-0 icheck-primary">
                      <input class="form-check-input mb-0" type="checkbox" id="cbDevolvido" checked> <label for="cbDevolvido">Devolvido</label>
                    </div>
                    <div class="form-check mb-0 pb-0 icheck-primary">
                      <input class="form-check-input mb-0" type="checkbox" id="cbCancelado" checked> <label for="cbCancelado">Cancelado</label>
                    </div>
                  </div>
                </fieldset>
              </div>
              <div class="form-group col-lg-2 col-2 col-sm-6 mt-3 pt-1 mb-0">
                <div class="pl-0 pt-0 mt-2">
                  <button id="btn-selecionar-empresas" type='button' class="btn btn-danger ml-0 mr-0">Selecionar empresas</button>
                </div>
              </div>

              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" for="txtVendedor">Vendedor: </label>
                <!-- <div class="relative"> -->
                <div class="input-group">
                  <!-- <input type="text" class="input-default focus form-control" id="txtVendedor" name="txtVendedor" class="form-control" placeholder="Vendedor"> -->
                  <select class="js-example-programmatic js-states form-control" id="txtVendedor" name="txtVendedor" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnVendedor" name="btnVendedor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaVendedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
                <!-- </div> -->
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" for="txtGuia">Guia: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtGuia" name="txtGuia" class="form-control" placeholder="Guia"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtGuia" name="txtGuia" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnGuia" name="btnGuia" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaGuia" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtCliente" name="txtCliente" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnCliente" name="btnCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>


              <div class="form-group col-lg-4 col-12 col-sm-12 classFornecedor">
                <label data-error="wrong" data-success="right" id="labelFornecedor" for="txtFornecedor">Fornecedor: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtFornecedor" name="txtFornecedor" class="form-control" placeholder="Fornecedor"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtFornecedor" name="txtFornecedor" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnFornecedor" name="btnFornecedor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaFornecedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" id="labelTipoVenda" for="txtTipoVenda">Tipo Venda: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtTipoVenda" name="txtTipoVenda" class="form-control" placeholder="Tipo Venda"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtTipoVenda" name="txtTipoVenda" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnTipoVenda" name="btnTipoVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaTipoVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" id="labelUsuario" for="txtUsuario">Usuário: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtUsuario" name="txtUsuario" class="form-control" placeholder="Usuário"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtUsuario" name="txtUsuario" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnUsuario" name="btnUsuario" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaUsuario" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" id="labelProduto" for="txtProduto">Produto: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtProduto" name="txtProduto" class="form-control" placeholder="Produto"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtProduto" name="txtProduto" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnProduto" name="btnProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12 classColecao">
                <label data-error="wrong" data-success="right" id="labelColecao" for="txtColecao">Coleção: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtColecao" name="txtColecao" class="form-control" placeholder="Coleção"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtColecao" name="txtColecao" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnColecao" name="btnColecao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaColecao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12 classModelo">
                <label data-error="wrong" data-success="right" id="labelModelo" for="txtModelo">Modelo: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtColecao" name="txtColecao" class="form-control" placeholder="Coleção"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtModelo" name="txtModelo" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnModelo" name="btnModelo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaModelo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="form-group col-lg-4 col-12 col-sm-12 classGrupo">
                <label data-error="wrong" data-success="right" for="txtGrupoPA">Grupo: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtGrupoPA" name="txtGrupoPA" class="form-control" placeholder="Grupo"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtGrupoPA" name="txtGrupoPA" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnGrupoPA" name="btnGrupoPA" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaGrupoPA" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12 classEtiqueta">
                <label data-error="wrong" data-success="right" for="txtEtiqueta">Etiqueta: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtEtiqueta" name="txtEtiqueta" class="form-control" placeholder="Etiqueta"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtEtiqueta" name="txtEtiqueta" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnEtiqueta" name="btnEtiqueta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaEtiqueta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12">
                <label data-error="wrong" data-success="right" for="txtLinha">Linha: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtLinha" name="txtLinha" class="form-control" placeholder="Linha"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtLinha" name="txtLinha" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnLinha" name="btnLinha" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaLinha" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="form-group col-lg-4 col-12 col-sm-12 classMarca">
                <label data-error="wrong" data-success="right" id="labelMarca" for="txtMarca">Marca: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtMarca" name="txtMarca" class="form-control" placeholder="Marca"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtMarca" name="txtMarca" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnMarca" name="btnMarca" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaMarca" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12 classDeposito">
                <label data-error="wrong" data-success="right" id="labelDeposito" for="txtDeposito">Depósito: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtDeposito" name="txtDeposito" class="form-control" placeholder="Depósito"> -->
                    <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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group col-lg-4 col-12 col-sm-12 classTabela">
                <label data-error="wrong" data-success="right" id="labelTabPreco" for="txtTabPreco">Tabela: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtTabPreco" name="txtTabPreco" class="form-control" placeholder="TabPreco"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtTabPreco" name="txtTabPreco" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnTabPreco" name="btnTabPreco" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaTabPreco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <!-- </div> -->
          </div>
        </div>
        <div class="modal-footer border-top d-flex justify-content-end align-items-end">
          <div class="mx-auto mx-md-0">
            <button class="btn btn-primary btn-sisp mr-2" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222">
              <span class="fas fa-trash"></span> Limpar Filtros
            </button>
            <button id="btnConsultar" class="btn btn-primary btn-sisp" type="button">
              <span class="fas fa-search"></span> Consultar
            </button>
          </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.235.10.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.235.10.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.235.10.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.235.10.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.235.10.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.235.10.1"></script>
  <script src="dist/js/sisplan.js?versao=3.235.10.1"></script>
  <script src="utils/funcoes.js?versao=3.235.10.1"></script>
  <script src="utils/cookies.js?versao=3.235.10.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.235.10.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.235.10.1"></script>
  <script src="dist/js/driver.min.js?versao=3.235.10.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.235.10.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.235.10.1"></script>
  <script type="text/javascript" src="config.js?versao=3.235.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('MSG_WHATSAPP');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/orcamento/acesso_orcamento/acesso_orcamento.js?versao=3.235.10.1`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>
</body>

</html>