<?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 | Transf. Qualidade</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.264.14.1">
  <!-- Theme style -->
  <!-- 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" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.264.14.1" />

  <link href='dist/css/bootstrap.min.css?versao=3.264.14.1'>
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.264.14.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.264.14.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.264.14.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.264.14.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.264.14.1" />
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.264.14.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.264.14.1">
  <!-- AutoComplete -->
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.264.14.1">
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.newColorsButtons.css?versao=3.264.14.1" />

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

    .table.dataTable tr td,
    .table.dataTable th {
      padding: 4px 12px;
    }
  </style>

</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <div id="driver-page-overlay" class="d-none"></div>
  <div class="wrapper">
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="flex">
              <h1 class="m-0 text-dark">Transferência de Qualidade</h1>
              <button type="button" class="btn btn-info btn-sm ml-2" style="color: white;" id="tutorial">
                <i class="fas fa-question-circle"></i>
              </button>
              <button id="show-content" class="show-content" style="margin-left:8px;">
                <i class="fa fa-comment-dots" class="icone" style="font-size: 16px;"></i>
                <span class="texto">Informativo</span>
              </button>
            </div>
          </div>

          <div class="card pb-2" id="cardPrincipal">
            <div class="row mx-2 mt-3" id="tourbotoes">
              <div class="col-sm-12 mt-12">
                <div class="flex flex-wrap w-100" id="camposTutorial">
                  <div class="flex flex-wrap w-100">
                    <div class="col-xl-2 col-lg-4 col-md-6 col-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtDocumento">Documento:</label>
                      <input type="text" class="input-default focus form-control" id="txtDocumento" name="txtDocumento" class="form-control" placeholder="Documento" disabled>
                    </div>
                  </div>
                  <div class="flex flex-wrap w-100">
                    <div class="col-xl-3 col-lg-4 col-md-6 col-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtTipoMov">Tipo de Movimento:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtTipoMov" name="txtTipoMov" class="form-control" placeholder="Tipo de Movimento">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTipoMov" name="btnTipoMov" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTipoMov" name="btnLimpaTipoMov" 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-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtDepositoOrigem">Depósito de Origem:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtDepositoOrigem" name="txtDepositoOrigem" class="form-control" placeholder="Depósito de Origem">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnDepositoOrigem" name="btnDepositoOrigem" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaDepositoOrigem" name="btnLimpaDepositoOrigem" 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-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtDepositoDestino">Depósito de Destino:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtDepositoDestino" name="txtDepositoDestino" class="form-control" placeholder="Depósito de Destino">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnDepositoDestino" name="btnDepositoDestino" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaDepositoDestino" name="btnLimpaDepositoDestino" 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-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtDefeito">Defeito:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtDefeito" name="txtDefeito" class="form-control" placeholder="Defeito">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnDefeito" name="btnDefeito" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaDefeito" name="btnLimpaDefeito" 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-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtQualidadeDestino">Qualidade de Destino:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtQualidadeDestino" name="txtQualidadeDestino" class="form-control" placeholder="Qualidade de Destino">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnQualidadeDestino" name="btnQualidadeDestino" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaQualidadeDestino" name="btnLimpaQualidadeDestino" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="flex flex-wrap w-100">
                    <div class="col-xl-3 col-lg-4 col-md-6 col-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtBarra">Barra:</label>
                      <div class="input-group">
                        <div class="input-group-append">
                          <button class="btn bg-danger d-none" id="btnMenos" data-button="absolute" type="button" data-estorno="false">
                            <i class="m-0 p-0 fas fa-minus"></i>
                          </button>
                          <button class="btn bg-danger" id="btnMais" data-button="absolute" type="button" data-estorno="false">
                            <i class="m-0 p-0 fas fa-plus"></i>
                          </button>
                        </div>
                        <input type="text" class="input-default focus form-control" id="txtBarra" name="txtBarra" class="form-control" placeholder="Barra">
                      </div>
                    </div>
                  </div>
                </div>
                <div class="flex flex-wrap w-100" id="tabelaTutorial">
                  <div class="col-12">
                    <h4 class="text-md">Itens</h4>
                    <div class="table-responsive">
                      <table id="tabelaItens" class="table table-select table-hover" width="100%">
                        <thead>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
                <div class="col-12 flex justify-content-end" style="gap: 8px">
                  <button id="btnLimpar" class="btn btn-danger btn-sisp" type="button"></span>Limpar </button>
                  <button id="btnGravar" class="btn btnVerde btn-sisp" type="button"></span>Gravar </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
  </div>
  <!-- ./wrapper -->

  <!-- jQuery -->
  <script src="plugins/jquery/jquery.min.js?versao=3.264.14.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.264.14.1"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.264.14.1"></script>
  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    if ($('[type="date"]').prop('type') != 'date') {
      $('[type="date"]').datepicker();
    }
    $.widget.bridge('uibutton', $.ui.button)
  </script>

  <!-- Bootstrap 4 -->
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.264.14.1"></script>
  <script src="dist/js/sisplan.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="utils/funcoes.js?versao=3.264.14.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="dist/js/loadingoverlay.min.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.264.14.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.264.14.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.264.14.1"></script>
  <script src="utils/cookies.js?versao=3.264.14.1"></script>
  <!-- SweetAlert2 -->
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.264.14.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.264.14.1"></script>
  <script src="dist/js/driver.min.js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.264.14.1"></script>
  <script type="text/javascript" src="config.js?versao=3.264.14.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.264.14.1"></script>

  <?php
  include_once('../../modais.php');
  include_once('../../informativo.html');
  ?>
  <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('TRANSF_QUALIDADE');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

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

</body>

</html>