<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Regra de Promoção
  </title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.261.14.1">

  <!-- Theme style -->
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../dist/css/PesquisaVariosSelect2.css?versao=3.261.14.1">
  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.261.14.1">
  <!-- Toastr -->
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.261.14.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.261.14.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.261.14.1">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.261.14.1">
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.261.14.1">


</head>
<style>
  #msform {
    text-align: start;
    position: relative;
  }

  .card {
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
  }

  .card-header {
    box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
  }


  .fa-angle-right,
  .fa-angle-down {
    color: #343a40;
  }

  .card-body {
    margin-left: 0px !important;
    padding-left: 1.25rem !important;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-right: 1.25rem !important;
  }

  .header-content-page .title-page,
  .title-content-page .title,
  .title-page {
    font-size: 20px;
    line-height: normal;
    font-weight: 500;
    color: #343a40;
    margin: 0;
    font-family: Roboto, Arial, sans-serif;
  }

  #DadosGerais>.card,
  #obs>.card {
    background: #f7f7f7;
  }

  .radiosStyle {
    padding-top: 0.5rem;
    border: solid #e0e4e6;
    border-radius: 4px;
    border-width: 2px;
    margin-left: 0%;
  }

  .radiosStyle2 {
    padding-top: 0.5rem;
    border: solid #e0e4e6;
    border-radius: 4px;
    border-width: 2px;
  }

  .bordaProduto {
    padding: 10px;
    border: solid #e0e4e6;
    border-radius: 4px;
    border-width: 2px;
  }

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

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

  #tabelaProdutoMassa_wrapper .pagination {
    display: flex;
    justify-content: end;
  }

  #btnIncluir,
  #btnCarregar,
  #btnIncluirPromo {
    border: 1px solid transparent;
    background: var(--primary);
  }

  #btnRemover {
    border: 1px solid transparent;
    background: #bd2130;
  }

  #btnIncluir:hover,
  #btnCarregar:hover,
  #btnIncluirPromo:hover {
    background: #439af7;
    cursor: pointer;
  }

  #btnRemover:hover {
    background: #e92639;
    cursor: pointer;
  }

  .form-row>.col,
  .form-row>[class*=col-] {
    padding-right: 8px !important;
    /* padding-left: 10px !important; */
  }

  .divBtnOpcoes {
    background-color: rgb(189 33 48) !important;
    border: 1px solid transparent !important;
  }

  span.fa-trash-alt {
    color: #ffffff !important;
  }

  .content- wrapper {
    margin-left: 0px !important;
  }

  .main-header,
  .main-sidebar,
  footer {
    display: none;
  }


  /* .col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9 {
    padding-left: 0 !important;
    /* padding-right: 0 !important; */
  /* }


  /* .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    float: left;
  } */
</style>

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

  <script type="text/javascript" src="../config.js"></script>
  <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">
              <h3 class="col-mb=2"></h3>
            </div>
            <div class="col-sm-6">
              <!-- <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item"><a href="../regrapromocao">Regra de Promoção</a></li>
                <li class="breadcrumb-item active">Cadastro</li>
              </ol> -->
            </div>
          </div>
          <div class="row">
            <div class="col-12">
              <div class="card" style="height:auto;">
                <div class="card-header bg-dark">
                  <div class="row flex">
                    <h4 class="text-white">Cadastro de Regra de Promoção </h4>
                    <button title="Tutorial" class="btn btn-info btn-sm ml-2" id="tutorial">
                      <i class="fas fa-question-circle"></i>
                    </button>
                  </div>
                </div>
                <fieldset>
                  <div class="card-body" style="padding-left: 0rem!important; padding-right: 0rem!important;">
                    <form id="msform" name="msform">
                      <div class="collapse show" id="DadosGerais">
                        <div class="card card-body" style="padding-top: 10px;">
                          <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="dados-tab">
                            <fieldset class="form border-Field p-0">
                              <!-- <label >Dados Regra</label> -->
                              <legend class="textoBorda pb-0 mb-0" for="divGeral">Dados Regra</legend>
                              <div class="row" id="divGeral">
                                <div class="col-lg-8 col-12">
                                  <div class="row" style="margin-left: 0px;">
                                    <div class="col-12 col-sm-2 col-lg-3 col-xl-2 mb-2 mb-lg-0" style="margin-left: 5px;" id="codigoInfoTour">
                                      <label for="txtCodigo" class="col-12" style="margin-left: -18px;">Código: *</label>
                                      <div style="margin-left: -11px;">
                                        <input type="text" autocomplete="off" readonly placeholder="Preenchimento automático" class="input-default focus form-control validate" pattern="[0-9]+$" id="txtCodigo" name="txtCodigo">
                                      </div>
                                    </div>
                                    <div class="form-group col-sm col-12" id="descricaoInfoTour">
                                      <label for="txtDescricao" style="margin-left: -4px;">Descrição: *</label>
                                      <div class="relative" style="margin-left: -5px;">
                                        <input type="text" autocomplete="off" placeholder="Descrição" class="input-default focus form-control validate" required="required" pattern="[0-9]+$" id="txtDescricao" name="txtDescricao">
                                      </div>
                                    </div>
                                  </div>
                                  <div class="form-row">
                                    <div class="col-12">
                                      <label for="txtTabelaPreco">Tabela de Preço: *</label>
                                      <div class="input-group">
                                        <input type="text" class="input-default focus form-control" aria-describedby="ufError" id="txtTabelaPreco" name="txtTabelaPreco" class="form-control" placeholder="Tabela de preço">
                                        <div class="input-group-append">
                                          <button class="btn bg-danger" id="btnTabelaPreco" name="btnTabelaPreco" data-button="absolute" type="button">
                                            <i class="m-0 p-0 fas fa-search"></i>
                                          </button>
                                          <button class="btn bg-danger" id="btnATabelaPreco" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-lg-6 col-12 mt-3 mb-3" style="margin-left: -5px;">
                                    <label for="dtEmiIni">Data inicial de/até: *</label>
                                    <div class="input-group">
                                      <input type="date" max="2500-12-31" class="input-default focus form-control" id="dataIni" name="dataIni" class="form-control">  
                                      <input type="date" max="2500-12-31" class="input-default focus form-control" id="dataFim" name="dataFim" class="form-control">
                                    </div>
                                  </div>

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

                                  <div class="form-row d-none">
                                    <div class="col-lg-6  col-12 form-group">
                                      <div class="labelDep">
                                        <b>
                                          <p class="labelGeral">Preço:</p>
                                        </b>
                                        <div style="margin-top: -3.5%" class="radiosStyle">
                                          <label class="container">
                                            <input type="radio" id="checkTodos" checked name="preco">
                                            <label for="checkTodos">   Todos</label>
                                            <span class="checkmark"></span>
                                          </label>
                                          <br>
                                          <label class="container">
                                            <input type="radio" id="checkPreco" name="preco">
                                            <label for="checkPreco">   Com preço</label>
                                            <span class="checkmark"></span>
                                          </label>
                                          <br>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-12 table-responsive  mt-4">
                                  <table id="tabela-empAcesso" class="table table-sm table-hover table-select table-condensed">
                                    <thead>
                                      <tr>
                                        <th>Sel</th>
                                        <th>Empresa</th>
                                      </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                            </fieldset>

                            <fieldset class="form border-Field p-0">
                              <legend class="textoBorda pb-0 mb-0" for="divBusca">Buscar Produto</legend>
                              <div class="form-row" id="divBusca">
                                <div class="form-group col-xl-2 col-lg-3 col-12">
                                  <label for="selectConsiderar">Descrição do produto:</label>
                                  <div class="relative">
                                    <select id="selectConsiderar" class="input-default focus form-control validate" required="required" name="selectConsiderar">
                                      <option value="1" selected>Considerar</option>
                                      <option value="0">Desconsiderar</option>
                                    </select>
                                  </div>
                                </div>
                                <div class="form-group col-lg col-12" id="descricaoProdInfoTour">
                                  <label for="txtDescricaoProduto">Descrição:</label>
                                  <div class="relative">
                                    <input type="text" autocomplete="off" placeholder="Descrição produto" class="input-default focus form-control validate" pattern="[0-9]+$" id="txtDescricaoProduto" name="txtDescricaoProduto">
                                  </div>
                                </div>
                                <div class="form-group col-lg-2 col-xl-1 col-12" id="descricaoProdInfoTour">
                                  <label for="txtPrecoProduto">Preço:</label>
                                  <div class="relative">
                                    <input type="text" value="0.00" class="input-default focus form-control validate" placeholder="Preço" pattern="[0-9]+$" id="txtPrecoProduto" name="txtPrecoProduto">
                                  </div>
                                </div>
                                <div class="form-group col-lg-2 col-xl-2 col-12" id="descricaoProdInfoTour" style="padding-top: 29px">
                                  <button class="btn btn-block h-100" id="btnCarregar" name="btnCarregar" data-button="absolute" type="button">
                                    <label class="m-0 p-0">Carregar</label>
                                  </button>
                                </div>
                              </div>
                            </fieldset>

                            <fieldset class="form border-Field p-0">
                              <legend class="textoBorda pb-0 mb-0" for="divProduto">Incluir produto</legend>
                              <!-- <label for="divProduto" style="margin-top: 25px;">Incluir produto</label> -->
                              <div class="row justify-content-center" id="divProduto">
                                <div class="row mb-2" style="width: 100%;">
                                  <div class="col-12 col-lg-4">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtProduto">Produto:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" 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" style="align-self: baseline;">
                                          <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="btnPesquisaProdutoMassa" type="button">
                                            <i class="m-0 p-0 fas fa-search-plus"></i>
                                          </button>
                                          <button class="btn bg-danger" id="btnAProduto" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4">
                                    <div class="input-group">
                                      <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" id="txtColecao" name="txtColecao" class="form-control" placeholder="Coleção"> -->
                                      <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="btnAColecao" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtSubColecao">Sub-Coleção:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" id="txtSubColecao" name="txtSubColecao" class="form-control" placeholder="Sub-Coleção"> -->
                                        <select class="js-example-programmatic js-states form-control" id="txtSubColecao" name="txtSubColecao" multiple="multiple"></select>
                                        <div class="input-group-append">
                                          <button class="btn bg-danger" id="btnSubColecao" name="btnSubColecao" data-button="absolute" type="button">
                                            <i class="m-0 p-0 fas fa-search"></i>
                                          </button>
                                          <button class="btn bg-danger" id="btnASubColecao" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4 mt-0 mt-lg-2">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtMarca">Marca:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" 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="btnAMarca" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4 mt-0 mt-lg-2">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtEtiqueta">Etiqueta:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" 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="btnAEtiqueta" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4 mt-0 mt-lg-2">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtGrupo">Grupo:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" id="txtGrupo" name="txtGrupo" class="form-control" placeholder="Grupo"> -->
                                        <select class="js-example-programmatic js-states form-control" id="txtGrupo" name="txtGrupo" multiple="multiple"></select>
                                        <div class="input-group-append">
                                          <button class="btn bg-danger" id="btnGrupo" name="btnGrupo" data-button="absolute" type="button">
                                            <i class="m-0 p-0 fas fa-search"></i>
                                          </button>
                                          <button class="btn bg-danger" id="btnAGrupo" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12 col-lg-4 mt-0 mt-lg-2 mb-0 mb-lg-3">
                                    <div class="input-group">
                                      <label data-error="wrong" data-success="right" for="txtLinha">Linha:</label>
                                      <div class="input-group">
                                        <!-- <input type="text" class="input-default focus form-control" aria-describedby="ufError" 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="btnALinha" type="button">
                                            <i class="m-0 p-0 fas fa-trash"></i>
                                          </button>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="row mb-2 mt-2" style="width: 100%;">
                                    <div class="col-12 col-lg-4 col-xl-3 ml-2">
                                      <div class="justify-content-center d-flex pt-1 pb-1 border-Field h-100 align-center">
                                        <div class="icheck-primary mr-3" style="margin-bottom: 0px !important">
                                          <input type="radio" id="checkDescPromo" checked name="tipoPromo">
                                          <label for="checkDescPromo">% Desc</label>
                                        </div>
                                        <div class="icheck-primary" style="margin-bottom: 0px !important">
                                          <input type="radio" id="checkValorPromo" name="tipoPromo">
                                          <label for="checkValorPromo">Valor</label>
                                        </div>
                                      </div>
                                    </div>
                                    <div class="col-12 col-lg-2 col-xl-1 mt-4 mt-lg-0">
                                      <div class="relative">
                                        <input type="text" placeholder="% Desc/Valor" class="input-default focus form-control validate" id="txtValorAdd" name="txtDescricaoProduto">
                                      </div>
                                    </div>
                                    <div class="col-12 col-lg"></div>
                                    <div class="col-6 col-lg-2 col-xl-2 mt-4 mt-lg-0">
                                      <button class="btn btn-block h-100" id="btnRemover" name="btnRemover" data-button="absolute" type="button">
                                        <label class="m-0 p-0">Remover</label>
                                      </button>
                                    </div>
                                    <div class="col-6 col-lg-2 col-xl-2 mt-4 mt-lg-0">
                                      <button class="btn btn-block h-100" id="btnIncluir" name="btnIncluir" data-button="absolute" type="button">
                                        <label class="m-0 p-0">Incluir</label>
                                      </button>
                                    </div>
                                  </div>
                                  <div class="col-lg-12 col-12 table-responsive  mt-4 mt-lg-1">
                                    <table id="tabela-produtos" class="table table-sm table-hover table-select table-condensed">
                                      <thead>
                                        <!-- <tr>
                                      <th>Código</th>
                                      <th>Descrição</th>
                                      <th>Operação</th>
                                      <th>Preço</th>
                                      <th>Valor</th>
                                      <th>Excluir</th>
                                    </tr> -->
                                      </thead>
                                      <tbody>
                                      </tbody>
                                    </table>
                                  </div>
                                </div>
                            </fieldset>

                            <fieldset class="form border-Field p-0">
                              <legend class="textoBorda pb-0 mb-0" for="tipos">Adiciona Promoção</legend>
                              <div class="form-row" id="tipos">

                                <div class="col-12 col-lg-4 col-xl-3">
                                  <label for="divTipo"> </label>
                                  <div class="justify-content-center d-flex border-Field align-center" style="height: 58%;">
                                    <div class="icheck-primary mr-3" style="margin-bottom: 0px !important">
                                      <input type="radio" id="checkValorTabela" checked name="tipoValor">
                                      <label for="checkValorTabela" style="margin-bottom: 0">Valor</label>
                                    </div>
                                    <div class="icheck-primary" style="margin-bottom: 0px !important">
                                      <input type="radio" id="checkQuantidade" name="tipoValor">
                                      <label for="checkQuantidade">Quantidade</label>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-12 col-lg-2 col-xl-1 mt-3 mt-lg-0">
                                  <label for="txtValorPromo" id="htmlValor">Valor:</label>
                                  <input type="text" placeholder="Valor" value="0.00" class="input-default focus form-control validate" id="txtValorPromo" name="txtDescricaoProduto">
                                </div>
                                <div class="col-12 col-lg-2 col-xl-1 mt-3 mt-lg-0">
                                  <label for="txtDescontoPromo">% Desconto:</label>
                                  <input type="text" placeholder="% Desconto" value="0.00" maxlength="5" class="input-default focus form-control validate" id="txtDescontoPromo" name="txtDescricaoProduto">
                                </div>
                                <div class="col-12 col-lg-3 col-xl-2 mt-3 mt-lg-0" id="divOperacao">
                                  <label for="selectOperacao">Operação:</label>
                                  <div class="relative">
                                    <select id="selectOperacao" class="input-default focus form-control">
                                      <option value=">=" selected>Maior/Igual</option>
                                      <option value="=">Igual</option>
                                    </select>
                                  </div>
                                </div>

                                <div class="col-12 col-lg"></div>

                                <div class="col-12 col-lg-2" style="padding-top: 29px">
                                  <button class="btn btn-block h-100" id="btnIncluirPromo" name="btnIncluirPromo" data-button="absolute" type="button">
                                    <label class="m-0 p-0">Incluir</label>
                                  </button>
                                </div>
                                <div class="col-lg-12 col-12 table-responsive  mt-2" style="margin-top: 5px">
                                  <table id="tabela-promo" class="table table-sm table-hover table-select table-condensed">
                                    <thead>
                                      <tr>
                                        <th>Ordem</th>
                                        <th>Valor</th>
                                        <th>% Desconto</th>
                                        <th>Operação</th>
                                        <th>Excluir</th>
                                      </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                            </fieldset>

                          </div>
                        </div>
                        <button id="btnGravar" type="submit" style="font-size:15px;" class="btn btn-danger btn-sisp action-button mr-3" value="Gravar">Gravar</button>
                        <button type="button" id="btnVoltar" style="font-size:15px;" class="btn btn-success btn-sisp action-button-previous" data-dismiss="modal">Voltar</button>
                      </div>
                    </form>
                  </div>
                </fieldset>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- modais !-->

      <div class="modal fade" id="modalProduto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-xl" style="max-width: 100%; height: 100%; margin: 0; padding: 0;" role="document">
          <div class="modal-content" style="min-height: 100%; border-radius: 0;">
            <div class="modal-header">
              <h4 id="modalProduto-titulo" class="modal-title">Pesquisa Produtos em Massa </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="col-sm-12 form-row">
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtGrupoMassa">Grupo: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtGrupoMassa" name="txtGrupoMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnGrupoMassa" name="btnGrupoMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaGrupoMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtTipoProdutoMassa">Tipo Produto: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtTipoProdutoMassa" name="txtTipoProdutoMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTipoProdutoMassa" name="btnTipoProdutoMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTipoProdutoMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtModeloMassa">Modelo: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtModeloMassa" name="txtModeloMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnModeloMassa" name="btnModeloMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaModeloMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtColecaoMassa">Coleção: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtColecaoMassa" name="txtColecaoMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnColecaoMassa" name="btnColecaoMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaColecaoMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtMarcaMassa">Marca: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtMarcaMassa" name="txtMarcaMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMarcaMassa" name="btnMarcaMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaMarcaMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtLinhaMassa">Linha: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtLinhaMassa" name="txtLinhaMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnLinhaMassa" name="btnLinhaMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaLinhaMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-6 col-sm-12">
                    <label data-error="wrong" data-success="right" for="txtEtiquetaMassa">Etiqueta: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtEtiquetaMassa" name="txtEtiquetaMassa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnEtiquetaMassa" name="btnEtiquetaMassa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaEtiquetaMassa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-12 col-lg-3 col-6 form-group d-flex" style="align-items: flex-end">
                    <button type="button" class="btn btn-info focus" style="width: 250px" id="btnConsultarItensMassa" name="btnConsultarItensMassa">
                      <i class='fas fa-search'></i> Consultar
                    </button>
                  </div>
                </div>
                <div class="col-sm-12 icheck-primary d-inline pb-2 ml-2" style="margin-right: 15px; transform: translate(0px, 20px); z-index: 99999">
                  <input class="form-check-input" type="checkbox" id="checkSelecionarTodos"
                    value="option1">
                  <label class="form-check-label" for="checkSelecionarTodos">Selecionar Todos</label>
                </div>
                <div class="col-sm-12 table-responsive mt-2 px-0" style="overflow: hidden!important; transform: translatey(-20px)!important">
                  <table style="width:100%; white-space:nowrap " width="100%" id="tabelaProdutoMassa" class="table table-sm-sisp table-select table-hover animate__animated animate__fadeIn">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <div class="row">
                <div class="col-sm-12">
                  <button type="button" id="btnConfirmarProdutoMassa" class="btn btn-danger btn-sisp"> Confirmar </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
      <!-- Control sidebar content goes here -->
    </aside><!-- /.control-sidebar -->
    <?php
    include_once('../../../modais.php');
    ?>
    <?php include_once('../../../menu_fiscal.php'); ?>
  </div>

  <script src="../plugins/jquery/jquery.min.js?versao=3.261.14.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.261.14.1"></script>
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.261.14.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.261.14.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.261.14.1"></script>
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.261.14.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.261.14.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.261.14.1"></script>
  <script src="../dist/js/adminlte.min.js?versao=3.261.14.1"></script>
  <script src="../dist/js/requisicoes.js?versao=3.261.14.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.261.14.1"></script>
  <script src="../dist/js/valida_cpf_cnpj.js?versao=3.261.14.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.261.14.1"></script>
  <script src="../dist/js/dataTables.keyTable.js?versao=3.261.14.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.261.14.1"></script>
  <script src="../utils/funcoes.js?versao=3.261.14.1"></script>
  <script src="../utils/cookies.js?versao=3.261.14.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.261.14.1"></script>
  <script src="../plugins/select2/js/select2.full.min.js?versao=3.261.14.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;
      sArquivo = `${BASE_URI}/pages/regrapromocao/cadastro_regrapromocao/regrapromocao.js?versao=3.261.14.1`;
      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');

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

      const permissaoUsuarioLogado = await permissaoAcessos("REGRA_PROMOCAO");

      if (permissaoUsuarioLogado.INCLUI == 'N') {
        await criaMensagemErro("Sem permissão para incluir!", () => {
          window.location.href = `${BASE_URI}/regrapromocao`
        });
        return;
      }

      await insereJavaScriptPagina(sArquivo);

      habilitaCamposObrigatoriosTela(nomeTela);
    });
  </script>
</body>

</html>