<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Relatório de Espelho de Pedido</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.263.17.1">

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

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

    .border-Field {
        border: 1px solid var(--white-dark) !important;
        margin: 1.0em 0 0 0 !important;
        -webkit-box-shadow: 0px 0px 0px 0px #000;
        box-shadow: 0px 0px 0px 0px #000;
    }

    #tabelaPedidos_filter {
        display: none;
    }

    #tabelaItens_filter {
        display: none;
    }

    .table.dataTable tbody td {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
</style>

<body class="hold-transition sidebar-mini layout-fixed">
    <main 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">Relatório de Espelho de Pedido</h1>
                            <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;" id="tutorial">
                                <i class="fas fa-question-circle"></i></button>
                        </div>
                        <div class="col-sm-6">
                            <!-- <ol class="breadcrumb float-sm-right">
                                
                                <li class="breadcrumb-item active">Relatório de Embarque</li>
                            </ol> -->
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <fieldset>
                                <div class="row">
                                    <div class="col-12">
                                        <div class="buttons">
                                            <button class="btn btn-success btn-sisp" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
                                            <button id="btnImprimir" class="btn-sisp btn btn-danger"><i class="fas fa-print"></i> Imprimir</button>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div class="card">
                                        <div class="col-sm-12 table-responsive card-body pb-0">
                                            <table id="tabelaPedidos" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%"></table>
                                            <thead>
                                            </thead>
                                            <tbody>
                                            </tbody>
                                        </div>
                                        <h5 class="ml-3 d-none mb-0 mt-2" id="itensTitle">Itens</h5>
                                        <div class="col-sm-12 table-responsive card-body pt-0">
                                            <table id="tabelaItens" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%"></table>
                                            <thead>
                                            </thead>
                                            <tbody>
                                            </tbody>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </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="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label data-error="wrong" data-success="right" for="dtEmissaoDe">Emissão De/Até: </label>
                                <div class="relative">
                                    <div class="input-group px-0 col-12">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtEmissaoDe" name="dtEmissaoDe" class="form-control">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtEmissaoAte" name="dtEmissaoAte" class="form-control">
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label data-error="wrong" data-success="right" for="dtEntregaDe">Entrega De/Até: </label>
                                <div class="relative">
                                    <div class="input-group px-0 col-12">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtEntregaDe" name="dtEntregaDe" class="form-control">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtEntregaAte" name="dtEntregaAte" class="form-control">
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label data-error="wrong" data-success="right" for="dtDigitacaoDe">Digitação De/Até: </label>
                                <div class="relative">
                                    <div class="input-group px-0 col-12">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtDigitacaoDe" name="dtDigitacaoDe" class="form-control">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtDigitacaoAte" name="dtDigitacaoAte" class="form-control">
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label data-error="wrong" data-success="right" for="dtPrevisaoFaturamentoDe">Prev. de Faturamento De/Até: </label>
                                <div class="relative">
                                    <div class="input-group px-0 col-12">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtPrevisaoFaturamentoDe" name="dtPrevisaoFaturamentoDe" class="form-control">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtPrevisaoFaturamentoAte" name="dtPrevisaoFaturamentoAte" class="form-control">
                                    </div>
                                </div>
                            </div>



                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label data-error="wrong" data-success="right" for="dtSaidaDe">Saida De/Até: </label>
                                <div class="relative">
                                    <div class="input-group px-0 col-12">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="1200-01-01" id="dtSaidaDe" name="dtSaidaDe" class="form-control">
                                        <input type="date" max="2500-12-31" class="input-default focus form-control" value="2500-12-31" id="dtSaidaAte" name="dtSaidaAte" class="form-control">
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" 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-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" data-error="wrong" data-success="right" for="txtRepresentante">Representante: </label>
                                <div class="input-group">
                                    <select class="js-example-programmatic js-states form-control" id="txtRepresentante" name="txtRepresentante" multiple="multiple"></select>
                                    <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnRepresentante" name="btnRepresentante" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger" id="btnLimpaRepresentante" name="btnLimpaRepresentante" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" data-error="wrong" data-success="right" for="txtNota">Nota: </label>
                                <div class="input-group">
                                    <select class="js-example-programmatic js-states form-control" id="txtNota" name="txtNota" multiple="multiple"></select>
                                    <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnNota" name="btnNota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger" id="btnLimpaNota" name="btnLimpaNota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                </div>
                            </div>



                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" 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-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" data-error="wrong" data-success="right" for="txtGrupoCli">Grupo Cliente: </label>
                                <div class="input-group">
                                    <select class="js-example-programmatic js-states form-control" id="txtGrupoCli" name="txtGrupoCli" multiple="multiple"></select>
                                    <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnGrupoCli" name="btnGrupoCli" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger" id="btnLimpaGrupoCli" name="btnLimpaGrupoCli" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                                <div class="input-group">
                                    <select class="js-example-programmatic js-states form-control" id="txtCliente" name="txtCliente" multiple="multiple"></select>
                                    <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnCliente" name="btnCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger" id="btnLimpaCliente" name="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 form-group" style="padding-left: 7.5px; padding-right: 7.5px;">
                                <label style="padding-left: 0 !important;" 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>

                        <div class="row">
                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6 col-12 mt-4 px-2 py-1 mb-3 mb-md-0">
                                <button class="btn btn-danger btn-sisp w-100" type='button' id="btnSelecionarEmpresas">Selecionar Empresas</button>
                            </div>
                            <div class="col-lg-3 col-sm-12 col-12">
                                <fieldset class="form border-Field">
                                    <legend class="textoBorda mb-0 pb-0">Itens</legend>
                                    <div class="form-row ml-auto">
                                        <div class="icheck-primary form-group form-check mr-2 ml-2">
                                            <input type="radio" id="rdItensTodos" name="rdItens" value="0">
                                            <label class="labelCheck" for="rdItensTodos">Todos</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdItensProduto" checked name="rdItens" value="1">
                                            <label class="labelCheck" for="rdItensProduto">Produto</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check">
                                            <input type="radio" id="rdItensMaterial" name="rdItens" value="2">
                                            <label class="labelCheck" for="rdItensMaterial">Material</label>
                                        </div>
                                </fieldset>
                            </div>

                            <div class="col-lg-6 col-sm-12 col-12">
                                <fieldset class="form border-Field">
                                    <legend class="textoBorda mb-0 pb-0">Qtde Pedido</legend>
                                    <div class="form-row ml-auto">
                                        <div class="icheck-primary form-group form-check mr-2 ml-2">
                                            <input type="radio" id="rdQtdePendente" checked name="rdQtde" value="0">
                                            <label class="labelCheck" for="rdQtdePendente">Pendente</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdQtdeCancelado" name="rdQtde" value="1">
                                            <label class="labelCheck" for="rdQtdeCancelado">Cancelado</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdQtdeFatPed" name="rdQtde" value="2">
                                            <label class="labelCheck" for="rdQtdeFatPed">Fat./Ped</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdQtdeFatFat" name="rdQtde" value="3">
                                            <label class="labelCheck" for="rdQtdeFatFat">Fat./Fat</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdQtdeReservado" name="rdQtde" value="4">
                                            <label class="labelCheck" for="rdQtdeReservado">Reservado</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdQtdeTotal" name="rdQtde" value="5">
                                            <label class="labelCheck" for="rdQtdeTotal">Total</label>
                                        </div>
                                </fieldset>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-9 col-sm-12 col-12">
                                <fieldset class="form border-Field">
                                    <legend class="textoBorda mb-0 pb-0">Filtro</legend>
                                    <div class="form-row ml-auto">
                                        <div class="icheck-primary form-group form-check mr-2 ml-2">
                                            <input type="radio" id="rgFiltroTodos" checked name="rgFiltro" value="0">
                                            <label class="labelCheck" for="rgFiltroTodos">Todos</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rgFiltroLiberadoFin" name="rgFiltro" value="1">
                                            <label class="labelCheck" for="rgFiltroLiberadoFin">Liberado Financeiro</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rgFiltroLiberadoCom" name="rgFiltro" value="2">
                                            <label class="labelCheck" for="rgFiltroLiberadoCom">Liberado Comercial</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rgFiltroBloqueadoFin" name="rgFiltro" value="3">
                                            <label class="labelCheck" for="rgFiltroBloqueadoFin">Bloqueado Financeiro</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check">
                                            <input type="radio" id="rgFiltroBloqueadoCom" name="rgFiltro" value="4">
                                            <label class="labelCheck" for="rgFiltroBloqueadoCom">Bloqueado Comercial</label>
                                        </div>
                                </fieldset>
                            </div>
                            <div class="col-lg-3 col-sm-12 col-12">
                                <fieldset class="form border-Field">
                                    <legend class="textoBorda mb-0 pb-0">Tipo Pedido</legend>
                                    <div class="form-row ml-auto">
                                        <div class="icheck-primary form-group form-check mr-2 ml-2">
                                            <input type="radio" id="rdTipoPedidoTodos" name="rdTipoPedido" value="0">
                                            <label class="labelCheck" for="rdTipoPedidoTodos">Todos</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check mr-2">
                                            <input type="radio" id="rdTipoPedidoPai" checked name="rdTipoPedido" value="1">
                                            <label class="labelCheck" for="rdTipoPedidoPai">Ped. Pai</label>
                                        </div>
                                        <div class="icheck-primary form-group form-check">
                                            <input type="radio" id="rdTipoPedidoFilho" name="rdTipoPedido" value="2">
                                            <label class="labelCheck" for="rdTipoPedidoFilho">Ped. Filho</label>
                                        </div>
                                </fieldset>
                            </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>

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


    <script src="plugins/jquery/jquery.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/jquery.maskMoney.min.js?versao=3.263.17.1"></script>
    <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.263.17.1"></script>
    <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.263.17.1"></script>
    <script src="plugins/toastr/toastr.min.js?versao=3.263.17.1"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/adminlte.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/requisicoes.js?versao=3.263.17.1"></script>
    <script src="dist/js/loadingoverlay.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/valida_cpf_cnpj.js?versao=3.263.17.1"></script>
    <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/dataTables.keyTable.js?versao=3.263.17.1"></script>
    <script src="dist/js/sisplan.js?versao=3.263.17.1"></script>
    <script src="utils/funcoes.js?versao=3.263.17.1"></script>
    <script src="utils/cookies.js?versao=3.263.17.1"></script>
    <script src="dist/js/driver.min.js?versao=3.263.17.1"></script>
    <script src="config.js?versao=3.263.17.1"></script>
    <script src="dist/js/popper.min.js?versao=3.263.17.1"></script>
    <script src="dist/js/tippy-bundle.umd.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="plugins/jszip/jszip.min.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="plugins/pdfmake/pdfmake.min.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="plugins/pdfmake/vfs_fonts.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="plugins/datatables-buttons/js/dataTables.buttons.min.js?versao=3.263.17.1"></script>
    <script type="text/javascript" src="plugins/datatables-buttons/js/buttons.html5.min.js?versao=3.263.17.1"></script>
    <script src="plugins/select2/js/select2.full.min.js?versao=3.263.17.1"></script>
    <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.263.17.1"></script>

    <script src="dist/js/bootstrap-tagsinput.min.js?versao=3.263.17.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('RELESPELHOPEDIDO');
            if (!temAcesso.resultado) {
                toastrAcesso(temAcesso, BASE_URI);
                return;
            }

            sArquivo = `${BASE_URI}/pages/relespelhopedido/relespelhopedido.js?versao=3.263.17.1`;
            const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');

            await insereJavaScriptPagina(sArquivo);

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

</body>

</html>