<?php include_once('../../config.php') ?>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Liberação Força de Vendas</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.258.7.1">
    <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.258.7.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.258.7.1">
    <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.258.7.1">
    <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.258.7.1" />
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.258.7.1">
    <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.258.7.1" />
    <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.258.7.1">
    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.258.7.1">
    <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.258.7.1">
    <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.258.7.1">
    <style>
        .radioStyle {
            border: solid #e0e4e6;
            border-radius: 4px;
            border-width: 2px;
            padding: 6px;
        }

        .campoSel {
            display: inline-block;
            position: absolute;
            width: 22px;
            height: 22px;
            border: 1px solid #D3CFC8;
            border-radius: 0;
        }

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

        #tabelaProdutos_filter {
            visibility: hidden;
            margin: 0px;
            padding: 0px;
            height: 0px;
        }

        #tabelaCor_filter {
            visibility: hidden;
            margin: 0px;
            padding: 0px;
            height: 0px;
        }

        #tabelaTam_filter {
            visibility: hidden;
            margin: 0px;
            padding: 0px;
            height: 0px;
        }
    </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">Liberação Força de Vendas</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>
                    </div>
                </div>
                <div class="container-fluid card">
                    <div class="row card-body" id="abaGeral">

                        <div class="row col-12">
                            <div class="col-lg-3 form-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" id="txtProduto" name="txtProduto" placeholder="Produto">
                                    <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-lg-3 form-group">
                                <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-lg-3 form-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" id="txtLinha" name="txtLinha" placeholder="Linha">
                                    <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-lg-3 form-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" id="txtMarca" name="txtMarca" placeholder="Marca">
                                    <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>

                        <div class="row col-12">
                            <div class="col-lg-3 form-group">
                                <label data-error="wrong" data-success="right" for="txtStatus">Status: </label>
                                <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtStatus" name="txtStatus" placeholder="Status">
                                    <div class="input-group-append">
                                        <button class="btn bg-danger" id="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-lg-3 form-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" id="txtEtiqueta" name="txtEtiqueta" placeholder="Etiqueta">
                                    <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-lg-3 form-group">
                                <label data-error="wrong" data-success="right" for="txtTabPreco">Tabela de Preço: </label>
                                <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtTabPreco" name="txtTabPreco" placeholder="Tabela de Preço">
                                    <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" name="btnLimpaTabPreco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                </div>
                            </div>

                            <div class="col-lg-3 form-group d-none" id="pnlDeposito">
                                <label data-error="wrong" data-success="right" for="txtDeposito">Depósito: </label>
                                <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtDeposito" name="txtDeposito" placeholder="Depósito">
                                    <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>

                        <div class="row col-12">
                            <div class="col-lg-3 form-group">
                                <fieldset class="form border-Field mb-0 pb-0">
                                    <legend class="textoBorda mb-0 pb-0">Opções</legend>
                                    <div class="form-row">
                                        <div class="form-group form-check icheck-primary">
                                            <input type="checkbox" class="form-check-input" id="cbEstoquePositivo">
                                            <label class="form-check-label pr-2" for="cbEstoquePositivo">Estoque Positivo</label>
                                        </div>
                                        <div class="form-group form-check icheck-primary">
                                            <input type="checkbox" class="form-check-input" id="cbAtualizaColecao" checked>
                                            <label class="form-check-label pr-2" for="cbAtualizaColecao">Atualiza Coleção</label>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                            <div class="col-lg-9 form-group d-flex justify-content-end align-items-center">
                                <button class=" btn btn-primary btn-sisp" id="btnConsultar"><span class="fas fa-search"></span> Consultar</button>
                            </div>
                        </div>

                        <div class="row col-12">
                            <div class="col-sm-12 icheck-primary ml-2 d-none visibleAposConsulta">
                                <input class="form-check-input" type="checkbox" id="checkSelecionarTodos">
                                <label class="form-check-label" for="checkSelecionarTodos">Selecionar Todos</label>
                            </div>
                            <div class="col-lg-8 col-sm-12">
                                <table id="tabelaProdutos" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%">
                                    <thead>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                            <div class="col-4">
                                <div class="col-lg-12 col-sm-12 mt-2 pt-2">
                                    <h5 class="d-none visibleAposConsulta">Cores</h5>
                                    <table id="tabelaCor" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="col-lg-12 col-sm-12">
                                    <h5 class="d-none visibleAposConsulta">Tamanhos</h5>
                                    <table id="tabelaTam" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>


                        <div class="row col-12">
                            <div class="col-sm-12 d-flex justify-content-end">
                                <button id="btnConfirmar" class="btn btn-danger btn-sisp">Confirmar</button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <!-- modal  -->
        </div>
    </div>
    <?php
    include_once('../../modais.php');
    ?>
    <aside class="control-sidebar control-sidebar-dark">
    </aside>
    </div>
    <script src="plugins/jquery/jquery.min.js?versao=3.258.7.1"></script>
    <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.258.7.1"></script>
    <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.258.7.1"></script>
    <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.258.7.1"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.258.7.1"></script>
    <script src="dist/js/adminlte.min.js?versao=3.258.7.1"></script>
    <script src="dist/js/sisplan.js?versao=3.258.7.1"></script>
    <script src="utils/funcoes.js?versao=3.258.7.1"></script>
    <script src="utils/cookies.js?versao=3.258.7.1"></script>
    <script src="dist/js/requisicoes.js?versao=3.258.7.1"></script>
    <script src="dist/js/loadingoverlay.min.js?versao=3.258.7.1"></script>
    <script src="dist/js/driver.min.js?versao=3.258.7.1"></script>
    <script src="dist/js/jquery.maskMoney.min.js?versao=3.258.7.1"></script>
    <script src="plugins/toastr/toastr.min.js?versao=3.258.7.1"></script>
    <script src="plugins/select2/js/select2.full.min.js?versao=3.258.7.1"></script>
    <script type="text/javascript" src="dist/js/sum().js?versao=3.258.7.1"></script>
    <script type="text/javascript" src="config.js?versao=3.258.7.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('LIBERACAOFORCAVENDA');
            if (!temAcesso.resultado) {
                toastrAcesso(temAcesso, BASE_URI);
                return;
            }

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

        });
    </script>
</body>

</html>