<?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 | Programação MRP</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.255.15.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.255.15.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.255.15.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.255.15.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.255.15.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.255.15.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.255.15.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.255.15.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.255.15.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.255.15.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.255.15.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.255.15.1">
  <style>
    #tabelaServTingimento td div button {
      padding: .0rem .5rem;
      margin-top: .1rem;
      margin-bottom: .2rem;
    }

    #tabelaServTingimento td {
      padding: 0 !important;
      padding-left: 10px !important;
    }

    .btnSuccess {
      background-color: #25d366 !important;
      border-color: #25d366 !important;
      border: 1px solid;
      color: #fff;
    }

    .btnSuccess:hover {
      background-color: #20ae59 !important;
      border-color: #20ae59 !important;
      color: #fff;
    }

    .border-Field {
      border: 1px solid var(--font-color) !important;
      padding: 0 1.0em 0 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;
      border-radius: 3px;
    }

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

    .quadrado {
      width: 25px;
      margin-right: 5px;
      height: 25px;
    }

    .btn-azul {
      background-color: #3ca2d3 !important;
      color:white;
    }

    .btn-azul:hover {
      background-color: rgb(67, 186, 241) !important;
      color:white;
    }

    .btn-verde {
      background-color: #75BE25 !important;
      border: none;
      color: #fff;
      padding: 7px;
    }

    .btn-verde:hover {
        background-color:rgb(155, 216, 89) !important;
        color: #fff;
    }

    #tabelaAcesso td {
      padding-top: 5.5px;
      padding-bottom: 5.5px;
    }
  </style>
</head>

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

    <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">Programação MRP</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">

            </div><!-- /.col -->
          </div><!-- /.row -->
        </div>
        <div class="container-fluid">

          <nav style="margin-top: 15px;">
            <div class="nav nav-tabs" id="nav-tab" role="tablist" style="text-decoration: none">
              <a class="nav-link abaLink active" id="tabAcesso" data-toggle="tab" href="#divAcesso" role="tab" aria-controls="divAcesso" aria-selected="true">Acesso</a>
              <a class="nav-link abaLink" id="tabProgramacao" data-toggle="tab" href="#divProgramacao" role="tab" aria-controls="divProgramacao" aria-selected="false">Programação</a>
            </div>
          </nav>

          <div class="tab-content" id="nav-tabContent">

            <div class="tab-pane fade show active" id="divAcesso" role="tabpanel" aria-labelledby="tabAcesso">
              <div class="row card form-group">
                <div class="col-12 d-flex justify-content-between" style="margin-top: 8px; padding-left: 20px; padding-right: 20px;">
                  <div class="d-flex align-items-center">
                    <button class="btn btn-sisp btn-success" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
                    <button class="btn btn-sisp btn-danger ml-1" id="btnImprimir" ><i class="fas fa-print"></i> Imprimir</button>
                    <button class="btn btn-sisp btn-azul ml-1" disabled id="btnProcessar"><span class="fas fa-cogs"></span> Processar</button>
                    <div class="d-flex align-items-center ml-1">
                      <div class="quadrado" style="background: var(--vermelho-grid);">
                      </div>
                      <span> OFs Sem Consumos </span>
                    </div>
                  </div>
                </div>
                <div class="col-sm-12 table-responsive card-body" style="height: 71.5vh">
                  <table id="tabelaAcesso" class="table table-sm-sisp table-select table-hover" width="100%" style="white-space: nowrap; width:100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divProgramacao" role="tabpanel" aria-labelledby="tabProgramacao">
              <div class="row card form-group">

                <div class="col-sm-12 pb-12" style="margin-top: 8px; padding-left: 20px">
                  <h3>Consumos</h3>
                </div>
                <div class="col-sm-12 pb-2 flex align-items-center" style="padding-left: 20px">
                  <button class="btn btn-sisp btn-primary btn-verde" id="btnSolCompra"><i class="fas fa-shopping-cart"></i> Gerar sol. de compra</button>
                  <button class="btn btn-sisp btn-primary btn-verde d-none ml-1" id="btnSolCompraOF"><i class="fas fa-shopping-cart"></i> Gerar sol. de compra OF</button>
                  <button class="btn btn-sisp btn-primary btn-azul ml-1" id="btnConsumosOF"><i class="fas fa-scroll"></i> Reservar consumos OF</button>
                  <button class="btn btn-sisp btn-danger ml-1" id="btnSaldoNeg"><i class="fas fa-calculator"></i> Mostrar saldo negativo</button>
                  <div class="d-flex align-items-center ml-1">
                    <div class="quadrado" style="background: var(--vermelho-grid);">
                    </div>
                    <span> Saldo negativo</span>
                  </div>
                </div>
                <div class="col-sm-12 card-body py-1" style="height: 350px">
                  <table id="tabelaConsumos" class="table table-sm-sisp table-select table-hover" cellspacing="0" style="white-space: nowrap;" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>

                <div class="col-12">
                  <div class="row">

                    <div class="col-sm-6 card-body pt-0" style="height: 350px">
                      <h3>Ordens de produção</h3>
                      <table id="tabelaOps" class="table table-sm-sisp table-select table-hover" cellspacing="0" style="white-space: nowrap;" width="100%">
                        <thead>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>

                    <div class="col-sm-6 card-body pt-0" style="height: 350px">
                      <h3>Estoque</h3>
                      <table id="tabelaEstoque" class="table table-sm-sisp table-select table-hover" cellspacing="0" style="white-space: nowrap;" width="100%">
                        <thead>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>

                  </div>
                </div>

                <div class="col-12 d-flex justify-content-end" style="margin-top: 5em;">
                  <button class="btn btn-danger btn-sisp" id="btnGravar" style="margin-right: 20px">Gravar</button>
                </div>

                <div class="col-12" style="margin-top: 15px;">
                </div>

              </div>

              <!-- <div class="row card form-group">
                
              </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">
            <div class="row">

              <div class="form-group col-3">
                <label for="dtFinalOpIni">Final OP de/até </label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtFinalOpIni" value="1200-01-01" name="dtFinalOpIni">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtFinalOpFim" value="2500-12-31" name="dtFinalOpFim">
                </div>
              </div>

              <div class="form-group col-3">
                <label for="dtEmissaoOpIni">Emissão OP de/até </label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoOpIni" value="1200-01-01" name="dtEmissaoOpIni">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoOpFim" value="2500-12-31" name="dtEmissaoOpFim">
                </div>
              </div>

              <div class="form-group col-3">
                <label for="txtPrazoEntregaIni">Prazo de entrega de/até </label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtPrazoEntregaIni" placeholder="000000" name="txtPrazoEntregaIni">
                  <input type="text" class="input-default focus form-control" id="txtPrazoEntregaFim" placeholder="999999" name="txtPrazoEntregaFim">
                </div>
              </div>

              <div class="form-group col-3">
                <label for="txtOpsIni">OP's de/até </label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtOpsIni" placeholder="000000" name="txtOpsIni">
                  <input type="text" class="input-default focus form-control" id="txtOpsFim" placeholder="999999" name="txtOpsFim">
                </div>
              </div>

              <div class="col-4" id="OrdemProducaoInfoTour">
                <label data-error="wrong" data-success="right" for="txtOrdemProducao">Ordem de Produção </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtOrdemProducao" name="txtOrdemProducao" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnOrdemProducao" name="btnOrdemProducao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaOrdemProducao" name="btnLimpaOrdemProducao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="ProjecaoInfoTour">
                <label data-error="wrong" data-success="right" for="txtProjecao">Projeção </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtProjecao" name="txtProjecao" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnProjecao" name="btnProjecao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaProjecao" name="btnLimpaProjecao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-4 mt-2 pt-2">
                <fieldset class="form border-Field mb-0 pb-0">
                  <legend class="textoBorda mb-0 pb-0">Consumo</legend>
                  <div class="form-row">
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" checked name="Consumo" id="rgTodos">
                      <label class="form-check-label pr-1" for="rgTodos">Todos</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Consumo" id="rgComConsumo">
                      <label class="form-check-label pr-1" for="rgComConsumo">C/ Consumo</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Consumo" id="rgSemConsumo">
                      <label class="form-check-label pr-1" for="rgSemConsumo">S/ Consumo</label>
                    </div>
                  </div>
                </fieldset>
              </div>

              <div class="col-12" style="margin-top: 7px;">
                <hr>
              </div>

              <div class="col-4" id="CorFtInfoTour">
                <label data-error="wrong" data-success="right" for="txtCorFt">Cor FT </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtCorFt" name="txtCorFt" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnCorFt" name="btnCorFt" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaCorFt" name="btnLimpaCorFt" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="SetorFtInfoTour">
                <label data-error="wrong" data-success="right" for="txtSetorFt">Setor FT </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtSetorFt" name="txtSetorFt" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnSetorFt" name="btnSetorFt" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaSetorFt" name="btnLimpaSetorFt" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="AplicacaoFtInfoTour">
                <label data-error="wrong" data-success="right" for="txtAplicacaoFt">Aplicação FT </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtAplicacaoFt" name="txtAplicacaoFt" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnAplicacaoFt" name="btnAplicacaoFt" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaAplicacaoFt" name="btnLimpaAplicacaoFt" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-12" style="margin-top: 7px;">
                <hr>
              </div>

              <div class="col-4" id="DepositoInfoTour">
                <label data-error="wrong" data-success="right" for="txtDeposito">Depósito </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="col-4" id="PedidoInfoTour">
                <label data-error="wrong" data-success="right" for="txtPedido">Pedido </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtPedido" name="txtPedido" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnPedido" name="btnPedido" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaPedido" name="btnLimpaPedido" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="StatusInfoTour">
                <label data-error="wrong" data-success="right" for="txtStatus">Status </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtStatus" name="txtStatus" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnStatus" name="btnStatus" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaStatus" name="btnLimpaStatus" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="SetorPendInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtSetorPend">Setor Pendente </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtSetorPend" name="txtSetorPend" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnSetorPend" name="btnSetorPend" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaSetorPend" name="btnLimpaSetorPend" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="TipoOpInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtTipoOp">Tipo OP </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtTipoOp" name="txtTipoOp" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnTipoOp" name="btnTipoOp" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaTipoOp" name="btnLimpaTipoOp" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="ParteInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtParte">Parte </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtParte" name="txtParte" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnParte" name="btnParte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaParte" name="btnLimpaParte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-12" style="margin-top: 7px;">
                <hr>
              </div>

              <div class="col-4" id="ProdutoInfoTour">
                <label data-error="wrong" data-success="right" for="txtProduto">Produto</label>
                <div class="input-group">
                  <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" name="btnLimpaProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="ModeloInfoTour">
                <label data-error="wrong" data-success="right" for="txtModelo">Modelo</label>
                <div class="input-group">
                  <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" name="btnLimpaModelo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="ColecaoInfoTour">
                <label data-error="wrong" data-success="right" for="txtColecao">Coleção</label>
                <div class="input-group">
                  <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" name="btnLimpaColecao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="GrupoPAInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtGrupoPA">Grupo</label>
                <div class="input-group">
                  <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" name="btnLimpaGrupoPA" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="MarcaInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtMarca">Marca</label>
                <div class="input-group">
                  <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" name="btnLimpaMarca" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="EtiquetaInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtEtiqueta">Etiqueta</label>
                <div class="input-group">
                  <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" name="btnLimpaEtiqueta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="CategoriaInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtCategoria">Categoria</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtCategoria" name="txtCategoria" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnCategoria" name="btnCategoria" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaCategoria" name="btnLimpaCategoria" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="LinhaInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtLinha">Linha</label>
                <div class="input-group">
                  <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" name="btnLimpaLinha" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="CorInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtCor">Cor</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtCor" name="txtCor" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnCor" name="btnCor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaCor" name="btnLimpaCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-12" style="margin-top: 7px;">
                <hr>
              </div>

              <div class="col-4" id="MaterialInfoTour">
                <label data-error="wrong" data-success="right" for="txtMaterial">Material</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="col-4" id="GrupoMAInfoTour">
                <label data-error="wrong" data-success="right" for="txtGrupoMA">Grupo</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtGrupoMA" name="txtGrupoMA" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnGrupoMA" name="btnGrupoMA" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaGrupoMA" name="btnLimpaGrupoMA" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="SubGrupoInfoTour">
                <label data-error="wrong" data-success="right" for="txtSubGrupo">Sub grupo</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtSubGrupo" name="txtSubGrupo" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnSubGrupo" name="btnSubGrupo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaSubGrupo" name="btnLimpaSubGrupo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="QualidadeInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtQualidade">Qualidade</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtQualidade" name="txtQualidade" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnQualidade" name="btnQualidade" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaQualidade" name="btnLimpaQualidade" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="GrupoCorInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtGrupoCor">Grupo cor</label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtGrupoCor" name="txtGrupoCor" multiple="multiple">
                  </select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnGrupoCor" name="btnGrupoCor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaGrupoCor" name="btnLimpaGrupoCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-4" id="FornecedorInfoTour" style="margin-top: 15px;">
                <label data-error="wrong" data-success="right" for="txtFornecedor">Fornecedor</label>
                <div class="input-group">
                  <select class="js-example-programic 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" name="btnLimpaFornecedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

            </div>
          </div>
          <div class="modal-footer justify-content-start pl-0">
            <div class="row col-12">
              <div class="col-md-4 col-sm-12 col-4">
                <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-6 col-lg-8 d-flex justify-content-end align-items-end pr-0">
                <div class="d-flex">
                  <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>
      </div>
    </div>
    <?php
    include_once('../../modais.php');
    ?>
    <aside class="control-sidebar control-sidebar-dark">
    </aside>
  </div>
  <script type="text/javascript" src="config.js?versao=3.255.15.1"></script>
  <script src="plugins/jquery/jquery.min.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.255.15.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.255.15.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/sisplan.js?versao=3.255.15.1"></script>
  <script src="utils/funcoes.js?versao=3.255.15.1"></script>
  <script src="utils/cookies.js?versao=3.255.15.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.255.15.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/driver.min.js?versao=3.255.15.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.255.15.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.255.15.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('PROGPPCP');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/progppcp/progppcp.js?versao=3.255.15.1`;
      insereJavaScriptPagina(sArquivo);
    });
  </script>
</body>

</html>