<?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 | Ordem de Serviç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.255.15.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.255.15.1">
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <link rel="stylesheet" href="dist/css/custom.css?versao=3.255.15.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.255.15.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.255.15.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.255.15.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.255.15.1" />
  <style>
    .table.dataTable tbody td,
    .table.dataTable thead {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaOs td div button {
      padding: .0rem .5rem;
      margin-top: .1rem;
      margin-bottom: .2rem;
    }

    #tabelaOs td {
      padding: 0 !important;
      padding-left: 10px !important;
    }

    /* #tabelaOs_wrapper .table.dataTable tbody td {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    } */


    .btnSuccess {
      background-color: #25d366 !important;
      border-color: #25d366 !important;
      color: #fff;
    }

    .btnSuccess:hover {
      background-color: #20ae59 !important;
      border-color: #20ae59 !important;
      color: #fff;
    }

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

    .quadrado {
      width: 25px;
      margin-right: 5px;
      height: 25px;
    }
  </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">Ordem de Serviço</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">
          <div class="row card">
            <div class="col-sm-12 mt-3">
              <div class="row">
                <div class="col-sm-6 col-md-6 col-6">
                  <div class="row col-12">
                    <div class="col-md-12">
                      <button class="btn btn-success btn-sisp" id="btnFiltros"><span class="fas fa-search"></span> Filtros</button>
                      <button class="btn btn-danger btn-sisp" id="btnNovaOrdemProducao"><span class="fas fa-plus"></span> Incluir</button>
                      <button class="btn btn-secondary btn-sisp" id="btnImprimir"><span class="fas fa-print pr-1" style="color: white!important"></span> Imprimir</button>
                    </div>
                  </div>
                </div>
                <div class="col-sm-6 col-md-6 col-6 row d-flex justify-content-end">
                  <div class="row col-12">
                    <div class="col-md-12 row d-flex justify-content-end" style="grid-gap: 4px;">
                      <div>
                        <div class="d-flex align-items-center gap-2">
                          <div class="quadrado" style="background: rgba(245, 81, 81, 1);">
                          </div>
                          <span> Em aberto(Pendente) </span>
                        </div>
                      </div>
                      <div>
                        <div class="d-flex align-items-center gap-2">
                          <div class="quadrado" style="background: rgba(67, 57, 205, 1);">
                          </div>
                          <span> Romaneio </span>
                        </div>
                      </div>
                      <div>
                        <div class="d-flex align-items-center gap-2">
                          <div class="quadrado" style="background: rgba(114, 103, 103, 1);">
                          </div>
                          <span> Faturado </span>
                        </div>
                      </div>
                      <div>
                        <div class="d-flex align-items-center gap-2">
                          <div class="quadrado" style="background: rgba(43, 156, 43, 1);">
                          </div>
                          <span> Encerrado(Baixado) </span>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <div class="row">
              <div class="col-sm-6 d-flex justify-content-center align-items-center" style="height: 100%;">
                <div id="graficosOs" class="mt-5" style="width: 100%;"></div>
              </div>
              <div class="col-sm-6 d-flex justify-content-center align-items-center" style="height: 100%;">
                <div id="graficosOs1" class="mt-5" style="width: 100%;"></div>
              </div>
            </div>

            <div class="col-sm-12 table-responsive card-body">
              <h5>Ordens de Serviço</h5>
              <table id="tabelaOs" class="table table-sm table-select table-hover" width="100%">
                <thead>
                  <tr>
                    <th class="th-sm">Número</th>
                    <th class="th-sm">Cliente</th>
                    <th class="th-sm">Nome</th>
                    <th class="th-sm">Serviço</th>
                    <th class="th-sm">Descrição Serviço</th>
                    <th class="th-sm">Duplicata</th>
                    <th class="th-sm">Valor</th>
                    <th class="th-sm">Situação</th>
                    <th class="th-sm">Data Entrega</th>
                    <th class="th-sm">Para</th>
                    <th class="th-sm">Obs Entrega</th>
                    <th class="th-sm">Outros Gastos</th>
                    <th class="th-sm">Func Cad</th>
                    <th class="th-sm">Defeito</th>
                    <th class="th-sm">Descrição Defeito</th>
                    <th class="th-sm">Nome funcionário</th>
                    <th class="th-sm">Data Inicio</th>
                    <th class="th-sm">Data Prev</th>
                    <th class="th-sm">Status</th>
                    <th class="th-sm">Descrição Status</th>
                    <th class="th-sm">Observação</th>
                    <th class="th-sm">Custo Total</th>
                    <th class="th-sm">Data Baixa</th>
                    <th class="th-sm">Empresa</th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>

          <div class="d-flex gap-2 row">
            <div class="table-responsive card card-body col-12">
              <h5>Itens</h5>
              <table id="tabelaOsVisualizacao" class="table table-sm table-select table-hover" width="100%">
                <thead></thead>
                <tbody></tbody>
              </table>
            </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-6" id="OrdemProducaoInfoTour">
                  <label data-error="wrong" data-success="right" for="txtOs">Ordem de serviço: </label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtOs" name="txtOs" class="form-control" placeholder="Ordem de serviço">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Os" name="btn-Os" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Os" name="btn-limpa-Os" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>

                <div class="col-6" id="ClienteInfoTour">
                  <label data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente">
                    <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-sm-3  col-3 form-group">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="dtEmissaoDe">Emissão de/até</label>
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control validate" value="1200-01-01" id="dtEmissaoDe" name="dtEmissaoDe">
                    <input type="date" max="2500-12-31" class="input-default focus form-control validate" value="2500-12-31" id="dtEmissaoAte" name="dtEmissaoAte">
                  </div>
                </div>

                <div class="col-sm-3  col-3 form-group">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="dtEntregaDe">Entrega de/até</label>
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control validate" value="" id="dtEntregaDe" name="dtEntregaDe">
                    <input type="date" max="2500-12-31" class="input-default focus form-control validate" value="" id="dtEntregaAte" name="dtEntregaAte">
                  </div>
                </div>

                <div class="col-lg-12 col-sm-12 col-12 mt-3">
                  <div class="form" id="area">
                    <fieldset class="form border-Field">
                      <legend class="textoBorda mb-0 pb-0">Situação</legend>
                      <div class="form-row ml-auto justify-content-center">
                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdTodos" checked name="rdSituacao" class='rdSituacao' value="">
                          <label class="labelCheck" for="rdTodos">Todos</label>
                        </div>
                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdPendente" name="rdSituacao" class='rdSituacao' value="P">
                          <label class="labelCheck" for="rdPendente">Pendente</label>
                        </div>
                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdBaixado" name="rdSituacao" class='rdSituacao' value="B">
                          <label class="labelCheck" for="rdBaixado">Baixado</label>
                        </div>

                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdRomaneio" name="rdSituacao" class='rdSituacao' value="R">
                          <label class="labelCheck" for="rdRomaneio">Romaneio</label>
                        </div>
                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdFaturado" name="rdSituacao" class='rdSituacao' value="F">
                          <label class="labelCheck" for="rdFaturado">Faturado</label>
                        </div>

                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdRomaneioFaturado" name="rdSituacao" class='rdSituacao' value="RF">
                          <label class="labelCheck" for="rdRomaneioFaturado">Romaneio/Faturado</label>
                        </div>
                        <div class="icheck-primary form-group form-check pl-2">
                          <input type="radio" id="rdBaixadoPendente" name="rdSituacao" class='rdSituacao' value="BP">
                          <label class="labelCheck" for="rdBaixadoPendente">Baixado/Pendente</label>
                        </div>
                      </div>
                    </fieldset>
                  </div>
                </div>

              </div>
            </div>
            <div class="modal-footer">
              <div class="row">
                <button class="btn btn-primary btn-sisp" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>     
                <button class="btn btn-primary btn-sisp" id="btnConsultar"><span class="fas fa-search"></span> Consultar</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="modal-gerarReceber" class="modal" tabindex="-1" data-backdrop="static" role="dialog">
      <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content" id="modalBody">
          <div class="modal-header">
            <h4 class="modal-title">Incluir Contas a Receber</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="card card-body">
              <div class="row">
                <div class="col-lg-12 col-md-auto col-12 d-flex mb-lg-0 p-0">
                  <div class="col-3">
                    <label for="txtNumero">Numero:</label>
                    <div class="relative">
                      <input type="text" disabled class="input-default focus form-control validate" id="txtNumero" name="Numero">
                    </div>
                  </div>
                  <div class="col-3">
                    <label for="txtOrdemServico">Ordem Serviço:</label>
                    <div class="relative">
                      <input type="text" disabled class="input-default focus form-control validate" id="txtOrdemServico" name="OrdemServico">
                    </div>
                  </div>
                  <div class="col-2">
                    <label for="txtStatusOS">Status OS:</label>
                    <div class="relative">
                      <input type="text" disabled class="input-default focus form-control validate" id="txtStatusOS" name="StatusOS" value="R">
                    </div>
                  </div>
                  <div class="col-2">
                    <label for="txtVencimento">Vencimento:</label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate" id="txtVencimento" name="Vencimento">
                    </div>
                  </div>
                  <div class="col-2">
                    <label for="txtEmissao">Emissão:</label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate" id="txtEmissao" name="Emissao">
                    </div>
                  </div>
                </div>
              </div>
              <div class="row mt-2">
                <div class="col-3 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtClasse">Classe Gerencial: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtClasse" name="txtClasse" class="form-control" placeholder="Classe Gerencial">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnClasse" name="btnClasse" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaClasse" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-3 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtHistorico">Historico: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtHistorico" name="txtHistorico" class="form-control" placeholder="Historico">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnHistorico" name="btnHistorico" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaHistorico" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-3 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtBanco">Banco: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtBanco" name="txtBanco" class="form-control" placeholder="Banco">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnBanco" name="btnBanco" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaBanco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-3 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtSituacao">Stiuação: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtSituacao" name="txtSituacao" class="form-control" placeholder="Stiuação">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnSituacao" name="btnSituacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaSituacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="row mt-2">
                <div class="col-3 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtMoeda">Moeda: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtMoeda" name="txtMoeda" class="form-control" placeholder="Moeda">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnMoeda" name="btnMoeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaMoeda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-1 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtValor">Valor: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate campoValor" id="txtValor" name="txtValor" class="form-control" placeholder="Valor">
                  </div>
                </div>
                <div class="col-1 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtValorParc">Valor Parc.: </label>
                  <div class="input-group">
                    <input type="text" data-selecionado="false" class="input-default focus form-control validate campoValor" id="txtValorParc" name="txtValorParc" class="form-control" placeholder="Valor Parc.">
                  </div>
                </div>
                <div class="col-1 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtParcelas">Parcelas: </label>
                  <div class="input-group">
                    <input type="number" data-selecionado="false" class="input-default focus form-control validate" id="txtParcelas" name="txtParcelas" class="form-control" placeholder="Parcelas">
                  </div>
                </div>
                <div class="col-1 text-left" style="padding-right: 8px !important;">
                  <label data-error="wrong" data-success="right" for="txtIntDias">Int. Dias: </label>
                  <div class="input-group">
                    <input type="number" data-selecionado="false" class="input-default focus form-control validate" id="txtIntDias" name="txtIntDias" class="form-control" placeholder="Int. Dias">
                  </div>
                </div>
                <div class="col-2">
                  <label for="txtPrimeiroVencto">1° Vencimento:</label>
                  <div class="relative">
                    <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate" id="txtPrimeiroVencto" name="PrimeiroVencto">
                  </div>
                </div>
                <div class="col-3">
                  <div class="col-12 col-md-12 d-flex justify-content-end p-0 mt-3">
                    <div class="icheck-primary mr-2 pt-3"><input type="checkbox" class="chkOpcoes" value="S" id="cbBaixarReceber"><label class="labelCheck" for="cbBaixarReceber"> Baixar Receber</label></div>
                    <button class="btn btn-primary btn-sisp mt-2" id="btnGerarReceber" style="height: 37px !important;">Gerar Parcelas</button>
                  </div>
                </div>
              </div>
              <div class="row mt-1 justify-content-start">
                <div class="row col-12 col-md-12 p-0">
                  <div class="col-9 col-md-9 d-flex justify-content-start pl-2">
                    <div class="col-4 text-left d-none" id="divConta" style="padding-right: 0px !important;">
                      <label data-error="wrong" data-success="right" for="txtConta">Conta: </label>
                      <div class="input-group">
                        <input type="text" data-selecionado="false" class="input-default focus form-control validate" id="txtConta" name="txtConta" class="form-control" placeholder="Conta">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnConta" name="btnConta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaConta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="row mt-1">
                <div class="pt-2 form-row col-12">
                  <div class="col-lg-12 table-responsive table-selecttable-lg">
                    <table id="tabelaReceber" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                      <thead>
                        <tr>
                          <th class="th-sm">Num Rec</th>
                          <th class="th-sm">Duplicata/Número</th>
                          <th class="th-sm">Valor</th>
                          <th class="th-sm">Vencimento</th>
                          <th class="th-sm">Emissão</th>
                          <th class="th-sm">Competencia</th>
                          <th class="th-sm">Dia da semana</th>
                        </tr>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <div class="row col-12 col-md-12 p-0">
              <div class="col-12 col-md-12 d-flex justify-content-end">
                <button class="btn btn-primary btnSuccess btn-sisp mr-2" id="btnConfirmarReceber">Confirmar</button>
                <button type="button" class="btn btn-danger btn-sisp" id="btnDesistirReceber">Desistir</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="modal fade" id="modalEntregaOs" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-lg modal-dialog-centered" style="width: 450px;">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title">Importar Consumos</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <label data-error="wrong" class="labelGeral" data-success="right" for="txtDataEntrega">Informe a data de entrega (Formato: dd/mm/aaaa):</label>
            <div class="input-group">
              <input type="text" data-selecionado="false" size="1" class="input-default focus form-control" id="txtDataEntrega" name="txtDataEntrega" placeholder="dd/mm/aaaa">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btn-limpa-dataEntrega" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
            <label data-error="wrong" class="labelGeral" data-success="right" for="txtHorarioEntrega">Informe o horário de entrega (Formato: 00:00:00):</label>
            <div class="input-group">
              <input type="text" data-selecionado="false" size="1" class="input-default focus form-control" id="txtHorarioEntrega" name="txtHorarioEntrega" placeholder="00:00:00">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btn-limpa-HorarioEntrega" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
            <label data-error="wrong" class="labelGeral" data-success="right" for="txtClienteEntrega">Informe o cliente:</label>
            <div class="input-group">
              <input type="text" data-selecionado="false" size="1" class="input-default focus form-control" id="txtClienteEntrega" name="txtClienteEntrega" placeholder="Cliente">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btn-limpa-ClienteEntrega" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
            <input type="text" data-selecionado="false" size="1" class="input-default focus form-control d-none" id="txtOrdemServicoEntrega" name="txtOrdemServicoEntrega" placeholder="Cliente">
          </div>
          <div class="modal-footer justify-content-start">
            <button class="btn btn-primary btn-sisp" id="btnConfirmaEntrega">Confirmar</button>
            <button class="btn bg-gradient-danger btn-sisp" id="btnCancelarEntregaOs" data-dismiss="modal">Cancelar</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  <?php
  include_once('../../../modais.php');
  include_once('../../../modals/modal_anexos.html');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="plugins/jquery/jquery.min.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.255.15.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.255.15.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/sisplan.js?versao=3.255.15.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.255.15.1"></script>
  <script src="utils/funcoes.js?versao=3.255.15.1"></script>
  <script src="utils/cookies.js?versao=3.255.15.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.255.15.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.255.15.1"></script>
  <script src="dist/js/driver.min.js?versao=3.255.15.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.255.15.1"></script>
  <script src="plugins/moment/moment.min.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="config.js?versao=3.255.15.1"></script>
  <script type="text/javascript" src="modals/modal_anexos.js?versao=3.255.15.1"></script>
  <script src="graficos/graficos.js?versao=3.255.15.1"></script>
  <script src="plugins/high-charts/highcharts.js"></script>
  <script src="plugins/high-charts/highcharts-3d.js"></script>
  <script src="plugins/high-charts/cylinder.js"></script>
  <script src="plugins/high-charts/exporting.js"></script>
  <script src="plugins/high-charts/export-data.js"></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('ORDEM_SERVICO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/ordemservico/acesso_os/acesso_os.js?versao=3.255.15.1`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>

</body>

</html>