<?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 | Movimentação de Terceiros</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.2512.9.1">

  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.2512.9.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.2512.9.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.2512.9.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="../plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.2512.9.1">
  <style>
    #progressbar li {
      list-style-type: none;
      font-size: 12px;
      width: 50%;
      float: left;
      position: relative;
    }

    #progressbar {
      margin-left: 0% !important;
    }

    .card {
      padding: 1.5rem;
      border-top: 2px outset #ddd;
      box-shadow: none !important;
      margin-top: 20px;
      padding-top: 20px;
    }

    #tabelaConsumosOF_wrapper .table.dataTable tbody td {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      /* max-width: 200px; */
      /* white-space: normal; */
      /* word-break: break-all; */
    }

    #avancar1:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    #msform fieldset .form-card {
      padding: 0px;
    }

    .content-wrapper {
      margin-left: 0px !important;
    }

    .main-header,
    .main-sidebar {
      display: none;
    }

    .checkbox-error {
      outline: 2px solid red;
      box-shadow: 0 0 5px red;
    }

    #tabelaEnfesto {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .destaque-em-vermelho {
      color: var(--font-color);
      animation: destaqueEmVermelho 0.6s infinite alternate;
    }

    @keyframes destaqueEmVermelho {
      0% {
        color: var(--font-color);
      }

      50% {
        color: red;
      }

      100% {
        color: var(--font-color);
      }
    }

    .destaque-em-verde {
      color: var(--font-color);
      animation: destaqueEmVerde 0.6s infinite alternate;
    }

    @keyframes destaqueEmVerde {
      0% {
        color: var(--font-color);
      }

      50% {
        color: green;
      }

      100% {
        color: var(--font-color);
      }
    }

    .fa-angle-right,
    .fa-angle-down {
      color: #343a40;
    }
  </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"></h1>
            </div>
            <div class="col-sm-6">
              <!-- <ol class="breadcrumb float-sm-right">

                <li class="breadcrumb-item active"><a href="../movimentacaofaccao">Acesso Movimentação de Facção</a></li>
                <li class="breadcrumb-item active">Movimentação de Facção</li>
              </ol> -->
            </div>
          </div>
        </div>
        <!-- <div class="row justify-content-center mt-0"> -->
        <div class="col-12 text-left p-0 mt-3 mb-2">
          <div class=" card px-0 pt-4 pb-0 mt-3 mb-3" style="border:none">
            <h2>
              <strong class="ml-4">Movimentação de Terceiros</strong>
              <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>
            </h2>
            <div class="row">
              <div class="col-md-12 mx-0">
                <form id="msform">
                  <ul id="progressbar">
                    <li class="active" id="account"><strong>Dados da OF</strong></li>
                    <li id="payment"><strong>Finalizar Movimentação</strong></li>
                    <!-- <li id="payment"><strong>Dados da Movimentação</strong></li>
                    <li id="confirm" style="cursor: pointer;"><strong>Finalizar Movimentação</strong></li> -->
                  </ul>
                  <fieldset>
                    <div class="form-card" id="formcard1">
                      <div class="row">
                        <div class="col-sm-12">
                          <div class="card dadosGerais mb-0 pb-0">
                            <h2 class="fs-title">Dados Gerais</h2>
                            <div class="row">
                              <div class="col-sm-8 row">
                                <div class="col-3" id="ColunaOrdem">
                                  <label data-error="wrong" data-success="right" for="txtNumeroOrdem">Número </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control validate" aria-describedby="ordemError" id="txtNumeroOrdem" name="txtNumeroOrdem" class="form-control" placeholder="Numero Ordem de Produção" disabled>
                                    <div class="input-group-append">
                                      <!-- <button class="btn bg-danger" id="btn-Ordem" name="btn-Ordem" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button> -->
                                      <!-- <button class="btn bg-danger" id="btn-limpa-Ordem" name="btn-limpa-Ordem" type="button"><i class="m-0 p-0 fas fa-trash"></i></button> -->
                                    </div>
                                  </div>
                                </div>
                                <div class="col-3" id="lblPedido">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPedido">Pedido</label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtPedido" name="txtPedido" class="form-control" placeholder="Pedido" disabled>
                                  </div>
                                </div>
                                <div class="col-3" id="lblProgramacao">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtProgramacao">Programação</label>
                                  <div class="input-group">
                                    <input type="number" autocomplete="off" class="input-default focus form-control" id="txtProgramacao" name="txtProgramacao" class="form-control" placeholder="Número Programacao" disabled>
                                  </div>
                                </div>
                                <div class="col-3">
                                  <div class="group-default form-group">
                                    <label for="txtDtCadastro">Data Cadastro </label>
                                    <div class="relative">
                                      <input type="date" max="2500-12-31" value="2500-12-31" class="input-default focus form-control validate" id="txtDtCadastro" name="txtDtCadastro" disabled>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-6">
                                  <label data-error="wrong" data-success="right" for="txtProduto">Produto</label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtProduto" name="txtProduto" class="form-control" placeholder="Código do Produto" disabled>
                                    <div class="input-group-append">
                                      <!-- <button class="btn bg-danger" id="btn-Produto" name="btn-Produto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btn-limpa-Produto" name="btn-limpa-Produto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button> -->
                                    </div>
                                  </div>
                                </div>
                                <div class="col-3">
                                  <div class="group-default form-group">
                                    <label for="txtDtInicio">Data Inicio </label>
                                    <div class="relative">
                                      <input type="date" max="2500-12-31" value="2500-12-31" class="input-default focus form-control validate" id="txtDtInicio" name="txtDtInicio" disabled>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-3">
                                  <div class="group-default form-group">
                                    <label for="txtDtFim">Data Fim </label>
                                    <div class="relative">
                                      <input type="date" max="2500-12-31" value="2500-12-31" class="input-default focus form-control validate" id="txtDtFim" name="txtDtFim" disabled>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <div class="col-sm-4">
                                <label for="txtObs" class="form-label">Observação </label>
                                <textarea style="resize: none" class="input-default form-control" id="txtObs" cols="50" rows="7" disabled></textarea>
                              </div>
                            </div>
                          </div>
                        </div>
                        <!-- <div class="col-sm-4" style="display: flex">
                          <div class="table-responsive card dadosCores">
                            <h2 class="fs-title">Cores</h2>
                            <table id="tabelaCores" class="table table-responsive-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div> -->
                      </div>
                      <div class="col-sm-12 table-responsive card divResumo pt-2 mt-0" style="max-height: 633px">
                        <div class="row d-flex">
                          <div class="col-9">
                            <h2 class="fs-title">Setores</h2>
                          </div>
                          <div class="col-2 float-right d-flex align-items-center ml-auto" style="padding: 0px; margin-bottom: 7px; grid-gap: 4px;">
                            <label for="cbPartes">Parte</label>
                            <select id="cbPartes" class="form-control input-default"></select>
                          </div>
                        </div>
                        <table id="tabelaResumo" class="table table-responsive-sm table-select table-hover" width="100%">
                          <thead>
                          </thead>
                          <tbody>
                          </tbody>
                        </table>
                      </div>
                      <input type="button" name="avancar1" class="btn-sisp next action-button" id="avancar1" value="Avançar" />
                      <button type="button" id="btnVoltar" style="font-size:15px;" class="btn-sisp action-button-previous" data-dismiss="modal">Voltar</button>
                    </div>
                  </fieldset>
                  <fieldset>
                    <div class="form-card" id="formcard2">
                      <div class="card card-header my-0 py-2" role="tab" id="geral">
                        <a style="width:100%;" data-toggle="collapse" data-parent="#multiCollapseExample1" href="#multiCollapseExample1" aria-expanded="true" aria-controls="collapseOne1">
                          <div class="row">
                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                              <i id="iconeDropdown" class="fas fa-angle-down"></i>
                            </div>
                            <div class="col-11">
                              <h2 class="fs-title mb-0" id="dadosMovimentacao">Dados da Movimentação</h2>
                            </div>
                          </div>
                        </a>
                      </div>
                      <div class="collapse show" id="multiCollapseExample1">
                        <div class="card card-body my-0 py-0">
                          <div class=" tab-pane fade show active" role="tabpanel" aria-labelledby="geral-tab">
                            <div class="card divDadosMov my-0 py-2" style="border-top: 0px">
                              <div class="row">
                                <!-- <div class="col-3" id="ColunaOrdem">
                            <label data-error="wrong" data-success="right" for="txtNumeroOrdemMov">Número </label>
                            <div class="input-group">
                              <input type="text" autocomplete="off" class="input-default focus form-control validate" aria-describedby="ordemError" id="txtNumeroOrdemMov" name="txtNumeroOrdemMov" class="form-control" placeholder="Numero Ordem de Produção" disabled>
                              <div class="input-group-append">
                              </div>
                            </div> -->
                                <!-- </div> -->
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtParte">Parte * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtParte" name="txtParte" class="form-control" placeholder="Código da Parte" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Parte" name="btn-Parte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Parte" name="btn-limpa-Parte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtSetor">Setor * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtSetor" name="txtSetor" class="form-control" placeholder="Código do Setor" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Setor" name="btn-Setor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Setor" name="btn-limpa-Setor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtProximoSetor">Próximo Setor </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtProximoSetor" name="txtProximoSetor" class="form-control" placeholder="Código do ProximoSetor">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-ProximoSetor" name="btn-ProximoSetor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-ProximoSetor" name="btn-limpa-ProximoSetor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label for="cbMovimento">Movimento</label>
                                  <div style="padding: 0px">
                                    <select id="cbMovimento" class="form-control input-default"></select>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <div class="group-default">
                                    <label for="txtDtProducao">Produção </label>
                                    <div class="relative">
                                      <input type="date" max="2500-12-31" value="2500-12-31" class="input-default focus form-control validate" id="txtDtProducao" name="txtDtProducao">
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <div class="group-default">
                                    <label for="txtDtRetorno">Retorno </label>
                                    <div class="relative">
                                      <input type="date" max="2500-12-31" value="2500-12-31" class="input-default focus form-control validate" id="txtDtRetorno" name="txtDtRetorno">
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtEmpresa">Empresa </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtEmpresa" name="txtEmpresa" class="form-control" placeholder="Empresa" disabled>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Empresa" name="btn-Empresa" data-button="absolute" type="button" disabled><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Empresa" name="btn-limpa-Empresa" type="button" disabled><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtEmpresaDestino">Empresa Destino * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtEmpresaDestino" name="txtEmpresaDestino" class="form-control" placeholder="EmpresaDestino" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-EmpresaDestino" name="btn-EmpresaDestino" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-EmpresaDestino" name="btn-limpa-EmpresaDestino" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12">
                                  <label data-error="wrong" data-success="right" for="txtCelulaDestino">Célula Destino </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtCelulaDestino" name="txtCelulaDestino" class="form-control" placeholder="Célula Destino">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-CelulaDestino" name="btn-CelulaDestino" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-CelulaDestino" name="btn-limpa-CelulaDestino" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 habilitaFunc d-none">
                                  <label data-error="wrong" data-success="right" for="txtFuncionario">Funcionário </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtFuncionario" name="txtFuncionario" class="form-control" placeholder="Funcionario" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Funcionario" name="btn-Funcionario" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Funcionario" name="btn-limpa-Funcionario" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 habilitaFunc d-none">
                                  <label data-error="wrong" data-success="right" for="txtCaixa">Caixa </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtCaixa" name="txtCaixa" class="form-control" placeholder="Caixa" required>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 habilitaFunc d-none">
                                  <label data-error="wrong" data-success="right" for="txtMaquina">Máquina </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtMaquina" name="txtMaquina" class="form-control" placeholder="Maquina" required>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 ultimoSetor d-none">
                                  <label data-error="wrong" data-success="right" for="txtTipoBaixa">Tipo Baixa * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtTipoBaixa" name="txtTipoBaixa" class="form-control" placeholder="TipoBaixa" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-TipoBaixa" name="btn-TipoBaixa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-TipoBaixa" name="btn-limpa-TipoBaixa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 ultimoSetor d-none">
                                  <label data-error="wrong" data-success="right" for="txtDeposito">Depósito * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtDeposito" name="txtDeposito" class="form-control" placeholder="Deposito" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Deposito" name="btn-Deposito" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Deposito" name="btn-limpa-Deposito" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 ultimoSetor d-none">
                                  <label data-error="wrong" data-success="right" for="txtQualidade">Qualidade * </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtQualidade" name="txtQualidade" class="form-control" placeholder="Qualidade" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Qualidade" name="btn-Qualidade" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Qualidade" name="btn-limpa-Qualidade" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 divMotivo d-none" sytle="padding: 0px; padding-bottom: 10px">
                                  <label data-error="wrong" data-success="right" for="txtMotivo">Motivo </label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtMotivo" name="txtMotivo" class="form-control" placeholder="Motivo" required>
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtLancamento" name="txtLancamento" value="0" class="form-control" placeholder="Lancamento" hidden>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Motivo" name="btn-Motivo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-Motivo" name="btn-limpa-Motivo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="form-group col-lg-3 col-12 divQualidade2 d-none">
                                  <label data-error="wrong" data-success="right" for="txtQualidade2">Qualidade 2ª:</label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtQualidade2" name="txtQualidade2" class="form-control" placeholder="Qualidade 2ª" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnQualidade2" name="btnQualidade2" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btnLimpaQualidade2" name="btnLimpaQualidade2" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>

                                <div class="form-group col-lg-3 col-12 divDeposito2 d-none">
                                  <label data-error="wrong" data-success="right" for="txtDeposito2">Depósito 2ª:</label>
                                  <div class="input-group">
                                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtDeposito2" name="txtDeposito2" class="form-control" placeholder="Deposito 2ª" required>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnDeposito2" name="btnDeposito2" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btnLimpaDeposito2" name="btnLimpaDeposito2" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>

                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="card divGrade pt-1 mt-0">
                        <div class="flex flex-wrap">
                          <h2 class="fs-title flex align-items-end" id="Itens" style="margin-bottom: 0.5rem"><i class="fas fa-cogs"></i></h2>
                          <div class="d-none flex ml-2" style="min-width: 25%" id="divBarra">
                            <div class="col-12 pl-0" id="barraBipar">
                              <label for="txtBarra">Barra</label>
                              <div class="input-group">
                                <div class="input-group-append">
                                  <button class="btn bg-danger classBarra" id="btnMais" type="button">
                                    <i class="m-0 p-0 fas fa-plus"></i>
                                  </button>
                                </div>
                                <input type="text" class="input-default focus form-control classBarra" id="txtBarra" name="txtBarra" placeholder="Barra">
                              </div>
                            </div>
                            <div class="col-12 d-none pl-0" id="barraEstorno">
                              <label for="txtBarraEstorno">Barra Estorno</label>
                              <div class="input-group">
                                <div class="input-group-append">
                                  <button class="btn bg-danger classBarra" id="btnMenos" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-minus"></i>
                                  </button>
                                </div>
                                <input type="text" class="input-default focus form-control classBarra" aria-describedby="ufError" id="txtBarraEstorno" name="txtBarraEstorno" class="form-control" placeholder="Barra Estorno">
                              </div>
                            </div>
                            <div class="icheck-primary form-group form-check mb-1" style="display: flex;align-items: end;" title="Com esta opção habilitada, é permitido bipar as peças de segunda qualidade direto pela barra.">
                              <input type="checkbox" class="form-check-input" id="cbSegundaQualidade">
                              <label class="form-check-label pr-2 mb-2" for="cbSegundaQualidade">Qual.2ª: </label>
                            </div>
                            <div class="col-1 inputEpc d-none row mt-4 pt-1">
                              <label for="btn-iniciar-epc" style="margin-left: 10px"></label>
                              <div class="divRFID d-none">
                                <button type="button" class="btn btn-icon-normal btn-danger d-flex align-items-center justify-content-center" disabled style="border-radius: 4px!important; text-align: center;" id="btn-iniciar-epc" name="btn-iniciar-epc" data-button="absolute" title="Iniciar RFID, Atalho (Alt + 1)">
                                  <i class="fas fa-play"></i>
                                </button>
                              </div>
                              <label for="btn-parar-epc" style="margin-left: 5px"></label>
                              <div class="divRFID d-none">
                                <button type="button" class="btn btn-icon-normal btn-danger d-flex align-items-center justify-content-center" disabled style="border-radius: 4px!important;" id="btn-parar-epc" name="btn-parar-epc" data-button="absolute" title="Parar RFID, Atalho (Alt + 2)">
                                  <i class="fas fa-pause"></i>
                                </button>
                              </div>
                            </div>
                            <input type="text" class="input-default focus form-control" id="txtCodigoEPC" name="txtCodigoEPC" hidden>
                          </div>
                          <div class="flex flex-column ml-auto justify-content-center">
                            <div class="icheck-primary form-group form-check" style="display: flex;align-items: center;">
                              <input type="checkbox" class="form-check-input" id="cbBaixaPorBarra">
                              <label class="form-check-label pr-2" for="cbBaixaPorBarra">Baixa por código de barras</label>
                            </div>
                            <div class="icheck-primary form-group form-check" style="display: flex;align-items: center;">
                              <input type="checkbox" class="form-check-input" disabled id="cbHabilitaQtdeOf">
                              <label class="form-check-label pr-2" for="cbHabilitaQtdeOf">Habilita alterar quantidade da OF</label>
                            </div>
                          </div>
                          <div class="flex flex-wrap" style="max-width: 45%">
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalQuantOrig">Total Qt Orig:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalQuantOrig" name="txtTotalQuantOrig" placeholder="0">
                            </div>
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalSaldo">Total Saldo:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalSaldo" name="txtTotalSaldo" placeholder="0">
                            </div>
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalQuant">Total Quant:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalQuant" name="txtTotalQuant" placeholder="0">
                            </div>
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalSegunda">Total Segunda:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalSegunda" name="txtTotaSegunda" placeholder="0">
                            </div>
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalIncompleta">Total Incompl.:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalIncompleta" name="txtTotalIncompleta" placeholder="0">
                            </div>
                            <div class="col-2" style="margin-bottom: 0.5rem">
                              <label data-error="wrong" class="labelGeral" data-success="right" for="txtTotalPerdida">Total Perdidas:</label>
                              <input type="text" class="input-default focus form-control text-right inputTotal" disabled id="txtTotalPerdida" name="txtTotalPerdida" placeholder="0">
                            </div>
                          </div>
                        </div>
                        <table id="tabelaItens" class="table table-sm table-select table-hover" width="100%">
                          <thead>
                          </thead>
                          <tbody>
                          </tbody>
                        </table>
                      </div>
                      <input type="button" name="btnGravar" class="btn-sisp action-button" value="Gravar" id="btnGravar" />
                      <input type="button" name="voltar2" class="previous btn-sisp action-button-previous" value="Voltar" id="voltar2" />
                    </div>
                  </fieldset>
                  <!-- <fieldset>
                    <div class="form-card" id="formcard3">
                      <div class="card divGrade">
                        <div class="col-3 divMotivo d-none" sytle="padding: 0px; padding-bottom: 10px">
                          <label data-error="wrong" data-success="right" for="txtMotivo">Motivo </label>
                          <div class="input-group">
                            <input type="text" autocomplete="off" class="input-default focus form-control" id="txtMotivo" name="txtMotivo" class="form-control" placeholder="Motivo" required>
                            <input type="text" autocomplete="off" class="input-default focus form-control" id="txtLancamento" name="txtLancamento" value="0" class="form-control" placeholder="Lancamento" hidden>
                            <div class="input-group-append">
                              <button class="btn bg-danger" id="btn-Motivo" name="btn-Motivo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                              <button class="btn bg-danger" id="btn-limpa-Motivo" name="btn-limpa-Motivo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                            </div>
                          </div>
                        </div>
                        <h2 class="fs-title" id="Itens">Grade</h2>
                        <table id="tabelaItens" class="table table-sm table-select table-hover" width="100%">
                          <thead>
                          </thead>
                          <tbody>
                          </tbody>
                        </table>
                      </div>
                    </div>
                    <input type="button" name="btnGravar" class="action-button" value="Gravar" id="btnGravar" />
                    <input type="button" name="voltar3" class="previous action-button-previous" value="Voltar" id="voltar3" />
                  </fieldset> -->
                </form>
              </div>
            </div>
          </div>
        </div>
        <!-- </div> -->
      </div>
      <div id="modal-baixa-consumo-subproduto" 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">Baixa Consumos Subprodutos</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-lg-3 col-sm-12 col-12">
                  <label data-error="wrong" data-success="right" for="txtDepositoConsumoSubProduto">Depósito </label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtDepositoConsumoSubProduto" name="txtDepositoConsumoSubProduto" class="form-control" placeholder="Deposito">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-DepositoConsumoSubProduto" name="btn-DepositoConsumoSubProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-DepositoConsumoSubProduto" name="btn-limpa-DepositoConsumoSubProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-lg-3 col-sm-12 col-12">
                  <label data-error="wrong" data-success="right" for="txtTipoBaixaConsumoSubProduto">Tipo Baixa </label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtTipoBaixaConsumoSubProduto" name="txtTipoBaixaConsumoSubProduto" class="form-control" placeholder="TipoBaixa">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-TipoBaixaConsumoSubProduto" name="btn-TipoBaixaConsumoSubProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-TipoBaixaConsumoSubProduto" name="btn-limpa-TipoBaixaConsumoSubProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-lg-12 col-sm-12 col-12">
                  <h2 class="fs-title" id="Consumos">Consumos</h2>
                  <table id="tabelaConsumosProduto" class="table table-sm table-select table-hover" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <div class="row">
                <button class="btn btn-primary btn-sisp" id="btnConfirmarConsumosProduto"> Confirmar</button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div id="modal-baixa-consumo-of" 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">Baixa Consumos</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-lg-3 col-sm-12 col-12">
                  <label data-error="wrong" data-success="right" for="txtDepositoConsumoOF">Depósito </label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtDepositoConsumoOF" name="txtDepositoConsumoOF" class="form-control" placeholder="Deposito">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-DepositoConsumoOF" name="btn-DepositoConsumoOF" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-DepositoConsumoOF" name="btn-limpa-DepositoConsumoOF" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-lg-12 col-sm-12 col-12">
                  <h2 class="fs-title" id="ConsumosOF">Consumos</h2>
                  <table id="tabelaConsumosOF" class="table table-sm table-select table-hover" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <div class="row">
                <button class="btn btn-primary btn-sisp" id="btnConfirmarConsumosOF"> Confirmar</button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div id="modal-alterar-qtde-of" class="modal" tabindex="-1" role="dialog" data-backdrop="static">
        <div class="modal-dialog modal-xl" role="document">
          <div class="modal-content" id="modalBody">
            <div class="modal-header">
              <div class="p-0">
                <h4 class="modal-title">Alterar Quantidade da OF</h4>
                <p class="mb-0" style="font-size: 12px;">Setor configurado para permitir alterar a quantidade da OF.</p>
              </div>
              <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body pt-0">
              <table id="tabelaNovaQtdeOF" class="table table-sm table-select table-hover" width="100%">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
              <div class="row">
                <button class="btn btn-danger btn-sisp" id="btnDesistirQtdeOF"> Desistir</button>
                <button class="btn btn-primary btn-sisp ml-2" id="btnConfirmarQtdeOF"> Confirmar</button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div id="modal-enfesto" 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">Enfesto</h4>
            </div>
            <div class="modal-body py-0">
              <div class="row">
                <div class="col-lg-12 col-sm-12 col-12">
                  <table id="tabelaEnfesto" class="table table-select table-hover" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
            <div class="modal-footer justify-content-start">
              <div class="row">
                <button class="btn bg-gradient-success btn-sisp" id="btnGravarEnfesto"> Gravar </button>
                <!-- <button class="btn bg-gradient-secondary btn-sisp ml-2" id="btnDesistirEnfesto"> Desistir </button> -->
                <button class="btn bg-gradient-primary btn-sisp ml-2" id="btnIncluirEnfesto"> Incluir Enfesto </button>
                <button class="btn bg-gradient-danger btn-sisp ml-2" data-dismiss="modal" id="btnFecharEnfesto"> Fechar </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div id="modal-defeito" 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">Informar Defeitos das Quantidade de Segunda/Perdidas/Incompletas</h4>
            </div>
            <div class="modal-body">
              <div class="col-12">
                <div class="card-body row">
                  <div class="col-lg-12 col-sm-12 col-12 mb-4">
                    <label data-error="wrong" data-success="right" for="tabelaDefeitoItens">Itens </label>
                    <table id="tabelaDefeitoItens" class="table table-select table-hover" width="100%">
                      <thead>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>

                  <div class="flex" id="divBarraDefeito">
                    <div class="col-12" id="barraBiparDefeito">
                      <label for="txtBarraDefeito">Barra</label>
                      <div class="input-group">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMaisDefeito" type="button">
                            <i class="m-0 p-0 fas fa-plus"></i>
                          </button>
                        </div>
                        <input type="text" class="input-default focus form-control" id="txtBarraDefeito" name="txtBarraDefeito" placeholder="Barra">
                      </div>
                    </div>

                    <div class="col-12 d-none" id="barraEstornoDefeito">
                      <label for="txtBarraDefeitoEstorno">Barra Estorno</label>
                      <div class="input-group">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMenosDefeito" data-button="absolute" type="button">
                            <i class="m-0 p-0 fas fa-minus"></i>
                          </button>
                        </div>

                        <input type="text" class="input-default focus form-control" aria-describedby="ufError" id="txtBarraDefeitoEstorno" name="txtBarraDefeitoEstorno" class="form-control" placeholder="Barra Estorno">
                      </div>
                    </div>
                  </div>

                  <div class="col-lg-6 col-sm-12 col-12">
                    <label data-error="wrong" data-success="right" for="txtDefeito">Defeito: *</label>
                    <div class="input-group">
                      <input type="text" autocomplete="off" 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="ml-auto pr-2" style="align-self: self-end;">
                    <button class="btn bg-gradient-primary btn-sisp" id="btnProcessarDefeito"> Processar </button>
                  </div>

                </div>
              </div>
              <div class="card col-12">
                <div class="card-body">
                  <div class="col-lg-12 col-sm-12 col-12">
                    <label data-error="wrong" data-success="right" for="tabelaDefeitoProcessados">Processados </label>
                    <table id="tabelaDefeitoProcessados" class="table table-select table-hover" width="100%">
                      <thead>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
            <div class="modal-footer justify-content-start">
              <div class="row">
                <button class="btn bg-gradient-success btn-sisp" id="btnConfirmarDefeito"> Gravar </button>
                <button class="btn bg-gradient-danger btn-sisp ml-2" data-dismiss="modal" id="btnDesistirDefeito"> Desistir </button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <?php
  include_once('../../../modais.php');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="../plugins/jquery/jquery.min.js?versao=3.2512.9.1"></script>
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.2512.9.1"></script>
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.2512.9.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.2512.9.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/adminlte.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/requisicoes.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/cliente/entidade.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/valida_cpf_cnpj.js?versao=3.2512.9.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/dataTables.keyTable.js?versao=3.2512.9.1"></script>
  <script src="../utils/funcoes.js?versao=3.2512.9.1"></script>
  <script src="../utils/cookies.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.2512.9.1"></script>
  <script src="../plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/jquery.mask.min.js?versao=3.2512.9.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.2512.9.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('MOVIMENTACAOFACCAO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const permissaoUsuarioLogado = await permissaoAcessos("MOVIMENTACAOFACCAO");

      if (permissaoUsuarioLogado.INCLUI == 'N') {
        await criaMensagemErro("Sem permissão para incluir!", () => {
          window.location.href = `${BASE_URI}/movimentacaofaccao`
        });
        return;
      }

      sArquivo = `${BASE_URI}/pages/movimentacaofaccao/cadastro_movimentacaofaccao/movimentacaofaccao.js?versao=3.2512.9.1`;
      insereJavaScriptPagina(sArquivo);
    });
  </script>
</body>

</html>