<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Disponibilidade de Tecidos Crús</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.243.11.1">
    <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.243.11.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.243.11.1">
    <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.243.11.1">
    <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.243.11.1">
    <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.243.11.1" />
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.243.11.1">
    <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.243.11.1" />
    <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.243.11.1">
    <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css?versao=3.243.11.1">
    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.243.11.1">
    <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.243.11.1">
    <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;
        }

        #lotesDesdobrados {
            margin-bottom: 100px;
        }

        .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;
        }

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

        .select2-container--default .select2-selection--multiple .select2-selection__rendered {
            float: left;
        }

        .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;
            /* 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;
        }

        .modalFooterFixo {
            position: absolute;
            bottom: 0;
            left: 10px;
            right: 10px;
            background-color: #171f21;
            z-index: 1;
            padding: 4px;
        }


        .sidebar-collapse .sidebar-margin {
            margin-left: 5%
        }

        /* .sidebar-margin {
            margin-left: 250px
        } */

        /* #rodape {
            margin-bottom: 80px;
        } */


        body {
            font-size: 12px;
        }

        .input-group button,
        .input-group input {
            /* height: 32px !important; */
        }

        button {
            /* height: 32px !important; */
            /* padding: 0 !important; */
        }

        .table tbody td {
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        .table td,
        .table th {
            border: 1px solid var(--table-border) !important;
        }
    </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">
                        <div class="col-12">
                            <div class="card" style="height:auto;">
                                <div class="card-header bg-dark">
                                    <div class="row flex">
                                        <h6 class="text-white m-0">Disponibilidade de Tecidos Cru</h6>
                                    </div>
                                </div>
                                <fieldset id="filtros">
                                    <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" style="padding-top: 10px;">
                                                    <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="dados-tab">
                                                        <div class="col-lg-12 col-12 animate__animated animate__fadeIn">
                                                            <div class="card"">
                                                                <div class=" card-header bg-info">
                                                                <h3 class="card-title">Filtros</h3>

                                                                <div class="card-tools">
                                                                    <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i>
                                                                    </button>
                                                                </div>
                                                            </div>
                                                            <div class="card-body" style="padding: 0 4px!important;">
                                                                    <div class="form-row borda" id="lotes">
                                                                        <div class="col-12">
                                                                            <div class="form-row">
                                                                                <div class="col-xl-3 col-12">
                                                                                    <label data-error="wrong" data-success="right" id="labelProduto" for="txtMaterial">Material: </label>
                                                                                    <div class="relative">
                                                                                        <div class="input-group">
                                                                                            <!-- <input type="text" class="input-default focus form-control" id="txtMaterial" name="txtMaterial" class="form-control" placeholder="Material"> -->
                                                                                            <select class="js-example-programmatic js-states form-control" id="txtMaterial" name="txtMaterial" multiple="multiple">
                                                                                            </select>
                                                                                            <div class="input-group-append">
                                                                                                <button class="btn bg-danger" id="btnMaterial" name="btnMaterial" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                                <button class="btn bg-danger" id="btnLimpaMaterial" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-3 col-12 mudaTamanho form-group">
                                                                                    <label data-error="wrong" data-success="right" for="txtCor">Cor: </label>
                                                                                    <div class="relative">
                                                                                        <div class="input-group">
                                                                                            <!-- <input type="text" class="input-default focus form-control" id="txtCor" name="txtCor" class="form-control" placeholder="Cor"> -->
                                                                                            <select class="js-example-programmatic js-states form-control" id="txtCor" name="txtCor" multiple="multiple">
                                                                                            </select>
                                                                                            <div class="input-group-append">
                                                                                                <button class="btn bg-danger" id="btnCor" name="btnCor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                                <button class="btn bg-danger" id="btnLimpaCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-3 col-12">
                                                                                    <label data-error="wrong" data-success="right">Períodos</label>
                                                                                    <div class="relative">
                                                                                        <div class="input-group">
                                                                                            <input type="text" class="input-default focus form-control" id="txtPeriodo1" class="form-control" placeholder="Período 1">
                                                                                            <input type="text" class="input-default focus form-control" id="txtPeriodo2" class="form-control" placeholder="Período 2">
                                                                                            <input type="text" class="input-default focus form-control" id="txtPeriodo3" class="form-control" placeholder="Período 3">
                                                                                            <input type="text" class="input-default focus form-control" id="txtPeriodo4" class="form-control" placeholder="Período 4">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-3 col-12 d-flex align-items-center mt-2">
                                                                                    <div class="form-check">
                                                                                        <input class="form-check-input" type="checkbox" id="cbResumido" /> <label for="cbResumido">Resumido</label>
                                                                                    </div>
                                                                                    <div class="form-check ml-2">
                                                                                        <input class="form-check-input" type="checkbox" id="cbSomenteProducaoPendente" /> <label for="cbSomenteProducaoPendente">Somente com Produção Pendente</label>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-3 col-12 form-group">
                                                                                    <label data-error="wrong" data-success="right" for="txtDepositoCru">Depósito Cru: </label>
                                                                                    <div class="relative">
                                                                                        <div class="input-group">
                                                                                            <!-- <input type="text" class="input-default focus form-control" id="txtDepositoUsuario" name="txtDepositoUsuario" class="form-control" placeholder="DepositoUsuario"> -->
                                                                                            <select class="js-example-programmatic js-states form-control" id="txtDepositoCru" name="txtDepositoCru" multiple="multiple">
                                                                                            </select>
                                                                                            <div class="input-group-append">
                                                                                                <button class="btn bg-danger" id="btnDepositoCru" name="btnDepositoCru" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                                <button class="btn bg-danger" id="btnLimpaDepositoCru" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-3 col-12 form-group">
                                                                                    <label data-error="wrong" data-success="right" for="txtDepositoFio">Depósito Fio: </label>
                                                                                    <div class="relative">
                                                                                        <div class="input-group">
                                                                                            <!-- <input type="text" class="input-default focus form-control" id="txtDepositoUsuario" name="txtDepositoUsuario" class="form-control" placeholder="DepositoUsuario"> -->
                                                                                            <select class="js-example-programmatic js-states form-control" id="txtDepositoFio" name="txtDepositoFio" multiple="multiple">
                                                                                            </select>
                                                                                            <div class="input-group-append">
                                                                                                <button class="btn bg-danger" id="btnDepositoFio" name="btnDepositoFio" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                                <button class="btn bg-danger" id="btnLimpaDepositoFio" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-xl-4 d-flex align-items-center">
                                                                                    <div class="text-left" id="botaoConsultaLimpa">
                                                                                        <button type="button" class="btn btn-primary btn-sisp mr-2" id="btnConsultar" style="margin-top: 10px;">Consultar</button>
                                                                                        <button type="button" class="btn bg-gradient-danger btn-sisp" id="btnLimparTela" style="margin-top: 10px;">Limpar</button>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                    </div>
                                    </form>
                            </div>
                            </fieldset>
                            <div id="dados" class="p-2">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

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

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

        });
    </script>
</body>

</html>