<?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 | Consignado</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.263.26.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.263.26.1">
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="../dist/css/dataTables.bootstrap4.min.css?versao=3.263.26.1" />
  <link href='dist/css/bootstrap.min.css?versao=3.263.26.1'>
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.263.26.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.263.26.1">
  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.263.26.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/responsive.bootstrap.min.css?versao=3.263.26.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.263.26.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.263.26.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.263.26.1">
  <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.263.26.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <style>
    #progressbar li {
      list-style-type: none;
      font-size: 12px;
      width: 50%;
      float: left;
      position: relative
    }

    .card-totais {
      margin-top: 2%;
    }

    #txtDados {
      padding-top: .7%;
      padding-left: .85%;
    }

    .input-group-append>a>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .grupo_botao>button>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .bg-light {
      background-color: #f8f9fa08 !important;
    }

    .focus:read-only:focus {
      border-color: #aa1212 !important;
    }

    .labelCheck {
      font-size: 110%;
      padding: 0.2%;
      margin-left: 1%;
    }

    .configCheck {
      -ms-transform: scale(1.5);
      -moz-transform: scale(1.5);
      -webkit-transform: scale(1.5);
      -o-transform: scale(1.5);
      transform: scale(1.5);
      padding: 10px;
    }

    .radiosStyle {
      font-size: 120%;
      margin-top: 1%;
      margin-bottom: 1%;
    }

    .checkboxMoeda {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: .8%;
    }

    .bordaTab {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      margin-top: 9.6%;
    }

    .configTabPreco {
      -ms-transform: scale(1.5);
      -moz-transform: scale(1.5);
      -webkit-transform: scale(1.5);
      -o-transform: scale(1.5);
      transform: scale(1.5);
    }

    .bordaRadio {
      border: 2px solid #e0e4e6;
      border-radius: 4px;
      height: 38px;
      padding-right: 50px;
    }

    #checkPrecoManual {
      margin-left: 10px;
    }

    .custom-tooltip {
      color: black;
      display: none;
      font-weight: bold;
      font-size: 110%;
      position: absolute;
      background-color: #f9f9f9;
      padding: 10px;
      border: 0.5px solid #ccc;
      border-radius: 5px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      /* max-width: 50%;
      overflow: hidden;
      white-space: nowrap; */
    }

    .custom-tooltip:before {
      color: black;
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      margin-left: -10px;
      border-width: 10px;
      border-style: solid;
      border-color: #f9f9f9 transparent transparent transparent;
    }

    .dynamic-lote .group-default.form-group {
      display: flex;
      align-items: center;
    }

    .dynamic-lote .input-group-append {
      margin-left: 10px;
      cursor: pointer;
    }

    .border-Field {
      border: 1px solid var(--font-color) !important;
      padding: 0 1.0em 1.0em 1.0em !important;
      margin: 0 0 1.0em 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      border-radius: 8px !important;
    }

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

    #tabelaItensConsignado {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  </style>

</head>

<body class="sidebar-mini layout-fixed">
  <div class="wrapper">


    <div class="content-wrapper">
      <section class="content">
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6 flex">
              </div>
              <div class="col-sm-6">
              </div><!-- /.col -->
              <div class="container-fluid" id="grad1">
                <div class="row justify-content-center mt-0">
                  <div class="col-10 text-center">
                    <div class="card mb-0">
                      <div class="card-header text-center flex" style="border: none!important;box-shadow:none!important;">
                        <h2 class="m-0">Consignado
                          <button title="Tutorial" type="button" class="btn btn-info btn-sm ml-2" style="color: white;" id="tutorial">
                            <i class="fas fa-question-circle"></i>
                          </button>
                        </h2>
                      </div>
                      <div class="row">
                        <div class="col-md-12 mx-0">
                          <form id="msform">
                            <ul id="progressbar">
                              <li class="active" id="account"><strong>Geral</strong></li>
                              <li id="payment"><strong>Itens</strong></li>
                            </ul>
                            <p>Preencha os dados e clique em avançar até a conclusão do consignado</p>
                            <fieldset>
                              <div class="form-card" id="tourGeral">
                                <h2 class="fs-title">Dados Gerais</h2>
                                <div class="form-row">
                                  <div class="col-md-3 col-12" id="tourcodigo">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtDocumento">Nº Documento:</label>
                                    <input type="text" class="input-default focus form-control" id="txtDocumento" aria-describedby="codError" name="txtDocumento" class="form-control" placeholder="Gerado automaticamente" readonly>
                                  </div>
                                  <div class="group-default col-3 ml-auto">
                                    <label for="dtIni">Data: </label>
                                    <div class="input-group">
                                      <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate campoData" disabled id="dtIni" name="diIni">
                                      <!-- <input type="time" class="input-default focus form-control pl-2" id="txtHora" name="txtHora" class="form-control" placeholder="Hora"> -->
                                    </div>
                                  </div>
                                </div>

                                <div class="form-row">
                                  <div class="col-4 mt-2" id="divCliente">
                                    <label data-error="wrong" data-success="right" for="txtCliente">Cliente: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoCliente" value="" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoCliente" 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 campoCliente" id="btnLimpaCliente" name="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-4 mt-2" id="divVendedor">
                                    <label data-error="wrong" data-success="right" for="txtVendedor">Vendedor: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoVendedor" value="" id="txtVendedor" name="txtVendedor" class="form-control" placeholder="Vendedor" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoVendedor" id="btnVendedor" name="btnVendedor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoVendedor" id="btnLimpaVendedor" name="btnLimpaVendedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-4 mt-2" id="divStatus">
                                    <label data-error="wrong" data-success="right" for="txtStatus">Status: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoStatus" value="" id="txtStatus" name="txtStatus" class="form-control" placeholder="Status" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoStatus" id="btnStatus" name="btnStatus" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoStatus" id="btnLimpaStatus" name="btnLimpaStatus" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-md-4 col-12 mt-2" id="divDias">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtDias">Dias:</label>
                                    <input type="number" class="input-default focus form-control campoDias" id="txtDias" name="txtDias" class="form-control" placeholder="Dias" value="0">
                                  </div>
                                  <div class="col-md-4 col-12 mt-2" id="divDtAcerto">
                                    <label>Data de Acerto:</label>
                                    <input type="date" max="2500-12-31" class="input-default focus form-control campoDtAcerto" id="dtAcerto">
                                  </div>
                                  <div class="col-md-4 col-12 mt-2" id="divValorMinimo">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorMinimo">Valor Mínimo (%):</label>
                                    <input type="number" class="input-default focus form-control text-right campoValorMinimo" id="txtValorMinimo" name="txtValorMinimo" class="form-control" value="0" placeholder="Valor Mínimo (%)">
                                  </div>
                                  <div class="col-12 mt-2">
                                    <div id="divObservacao">
                                      <label data-error="wrong" data-success="right" for="txtObservacao">Observação</label>
                                      <div class="input-group">
                                        <textarea style="resize: none" id="txtObservacao" maxlength="787" placeholder="Observação" class="input-default focus form-control campoObservacao" rows="5"></textarea>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                                <input type="button" id="avancar1" name="next" class="next action-button" value="Avançar" />
                                <input type="button" id="voltarAcesso" class="action-button-previous" value="Voltar" />
                                <input type="button" id="cancelarConsignado" class="action-button-previous" value="Cancelar" />
                              </div>
                            </fieldset>
                            <fieldset>
                              <div class="form-card">
                                <div class="form-row">
                                  <h2 class="fs-title">Itens</h2>
                                  <div class="icheck-primary form-group form-check ml-3 pt-1">
                                    <input type="checkbox" class="form-check-input" id="cbTabPreco">
                                    <label class="form-check-label pr-2" for="cbTabPreco">Busca Preço da TABPRECO</label>
                                  </div>
                                  <h3 class="fs-title ml-3" id="spanStatus" style=" font-size: small; --font-color: red; margin-top: 6px;">[] - Status</h3>
                                </div>
                                <div class="form-row col-lg-12 col-12">
                                  <div class="col-lg-2 col-12">
                                    <label for="txtTipoConsignado">Tipo: *</label>
                                    <select name="txtTipoConsignado" class="input-default focus form-control modalChavePix" id="txtTipoConsignado">
                                      <option value="0" selected="" disabled="">Selecione uma opção</option>
                                      <option value="S">Saída</option>
                                      <option value="D">Devolução</option>
                                    </select>
                                  </div>
                                  <div class="col-5" id="divTabPreco">
                                    <label for="txtTabelaPreco">Tabela de Preço: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoTabelaPreco camposFiltros" id="txtTabelaPreco" name="txtTabelaPreco" placeholder="Tabela de Preço">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoTabelaPreco" id="btnTabelaPreco" name="btnTabelaPreco" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoTabelaPreco" id="btnLimpaTabelaPreco" name="btnLimpaTabelaPreco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-5" id="divDeposito">
                                    <label for="txtDeposito">Depósito: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoDeposito" id="txtDeposito" name="txtDeposito" placeholder="Depósito">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoDeposito" id="btnDeposito" name="btnDeposito" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoDeposito" id="btnLimpaDeposito" name="btnLimpaDeposito" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="mt-2 col-md-4 col-12">
                                    <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 validate campoProduto ui-autocomplete-input" id="txtProduto" name="txtProduto" placeholder="Produto">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoProduto" id="btnProduto" name="btnProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoProduto" id="btnLimpaProduto" name="btnLimpaProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="mt-2 col-md-4 col-12">
                                    <label data-error="wrong" data-success="right" for="txtCor">Cor: *
                                    </label>
                                    <div class="input-group">
                                      <input type="text" autocomplete="off" class="input-default focus form-control validate campoCor ui-autocomplete-input camposFiltros" id="txtCor" name="txtCor" placeholder="Cor">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoCor" id="btnCor" name="btnCor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoCor" id="btnLimpaCor" name="btnLimpaCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="mt-2 col-md-4 col-12">
                                    <label data-error="wrong" data-success="right" for="txtTamanho">Tamanho: *
                                    </label>
                                    <div class="input-group">
                                      <input type="text" autocomplete="off" class="input-default focus form-control validate campoTamanho ui-autocomplete-input camposFiltros" id="txtTamanho" name="txtTamanho" placeholder="Tamanho">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoTamanho" id="btnTamanho" name="btnTamanho" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger campoTamanho" id="btnLimpaTamanho" name="btnLimpaTamanho" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>
                                  <div class="mt-2 justify-content-start">
                                    <div class="form-group col-md-2 col-12 pl-1 mb-0">
                                      <label data-error="wrong" data-success="right" for="txtQtde">Qtde: *</label>
                                      <div class="input-group">
                                        <input type="number" value="1" class="input-default focus form-control campoQuantidade text-right" id="txtQtde" name="txtQtde" placeholder="Qtde">
                                      </div>
                                    </div>
                                    <div class="form-group col-md-2 col-12 pl-0 mb-0">
                                      <label data-error="wrong" data-success="right" for="txtPreco">Preço: *</label>
                                      <div class="input-group">
                                        <input type="text" class="input-default focus form-control maskDecimais campoPreco text-right" id="txtPreco" name="txtPreco" placeholder="Preço" disabled="">
                                      </div>
                                    </div>
                                    <div class="form-group col-md-3 col-12 pl-0 mb-0">
                                      <label data-error="wrong" data-success="right" for="txtDesconto">Desconto:</label>
                                      <div class="input-group">
                                        <input type="text" class="input-default focus form-control maskDecimais campoDesconto text-right" id="txtDesconto" name="txtDesconto" placeholder="Desconto %">
                                        <select name="tpDesconto" class="input-default focus form-control campoTipoDesconto" id="tpDesconto">
                                          <option selected="" value="P">Perc. %</option>
                                          <option value="V">Valor Fixo</option>
                                        </select>
                                      </div>
                                    </div>
                                    <div class="form-group col-md-2 col-12 pl-0 mb-0">
                                      <label data-error="wrong" data-success="right" for="txtTotal">Preço Total:</label>
                                      <div class="input-group">
                                        <input type="text" class="input-default focus form-control maskDecimais text-right" id="txtTotal" name="txtTotal" placeholder="Total Item" disabled="">
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-12 d-flex">
                                    <input type="hidden" id="txtIndexProd">
                                    <input type="button" id="btnCancelar" name="Cancelar" class="action-button mr-auto d-none" value="Cancelar">
                                    <div class="ml-auto">
                                      <input type="button" id="btnAdicionarProduto" name="Adicionar" class="action-button" value="Adicionar">
                                      <input type="button" id="btnGradeProduto" name="Grade" class="action-button" value="Grade">
                                    </div>
                                  </div>
                                  <div class="col-4" id="divBarra">
                                    <label data-error="wrong" data-success="right" for="txtBarra">Barra:</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control validate campoBarra" id="txtBarra" name="txtBarra" placeholder="Barra" title="Bipe uma barra para adicionar um item ao consignado.">
                                    </div>
                                  </div>
                                  <div class="row col-8" id="valoresTotais">
                                    <div class="mx-1" style="width: 98px">
                                      <label data-error="wrong" data-success="right" for="txtValorTotal">Qtde Total:</label>
                                      <div class="input-group">
                                        <input type="text" disabled="" class="input-default focus form-control text-right" id="txtQtdeTotal" name="txtQtdeTotal" placeholder="0">
                                      </div>
                                    </div>
                                    <div class="mx-1" style="width: 98px">
                                      <label data-error="wrong" data-success="right" for="txtValorTotalItem">Valor Total:</label>
                                      <div class="input-group">
                                        <input type="text" disabled="" class="input-default focus form-control text-right" id="txtValorTotalItem" name="txtValorTotalItem" placeholder="0">
                                      </div>
                                    </div>
                                  </div>
                                  <div class="form-row col-2 mt-1" id="valoresTotais">
                                    <div class="col-6">
                                      <label data-error="wrong" data-success="right" for="txtValorTotal">Qtde Total:</label>
                                      <div class="input-group">
                                        <input type="text" disabled="" class="input-default focus form-control text-right" id="txtQtdeTotal" name="txtQtdeTotal" placeholder="0">
                                      </div>
                                    </div>
                                    <div class="col-6">
                                      <label data-error="wrong" data-success="right" for="txtValorTotalItem">Valor Total:</label>
                                      <div class="input-group">
                                        <input type="text" disabled="" class="input-default focus form-control text-right" id="txtValorTotalItem" name="txtValorTotalItem" placeholder="0">
                                      </div>
                                    </div>
                                  </div>
                                  <div class="col-12" style="margin-top: 10px;">
                                    <table id="tabelaItensConsignado" class="table table-responsive-sm table-select table-hover" width="100%">
                                      <thead>
                                        <tr>
                                          <th class="th-sm">Código</th>
                                          <th class="th-sm">Descrição</th>
                                          <th class="th-sm">Tipo</th>
                                          <th class="th-sm">Cor</th>
                                          <th class="th-sm">Tam</th>
                                          <th class="th-sm">Qtde</th>
                                          <th class="th-sm">Tabela de Preço</th>
                                          <th class="th-sm">Preço</th>
                                          <th class="th-sm">Desconto</th>
                                          <th class="th-sm">Preço Total</th>
                                          <th class="th-sm">Barra</th>
                                          <th class="th-sm">Barra28</th>
                                          <th class="th-sm">Tipo de Desconto</th>
                                        </tr>
                                      </thead>
                                      <tbody>
                                      </tbody>
                                    </table>
                                  </div>
                                </div>
                                <div class="mr-2">
                                  <input type="submit" id="gravar" name="make_payment" class="action-button" value="Gravar" />
                                  <input type="button" name="previous" id="ultimoVoltar" class="previous action-button-previous" value="Voltar" />
                                </div>
                              </div>
                            </fieldset>
                          </form>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
  </div>
  <div class="modal fade" id="modalItem" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 id="modalItem-titulo" class="modal-title">Adicionar Item
          </h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body" id="dadosItem">

          <div id="dadosProduto">
            <div class="row d-flex justify-content-start">
              <div class="col-lg-12 col-12 form-group">
                <label data-error="wrong" data-success="right" for="txtProdutoGrade">Produto:</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtProdutoGrade" name="txtProdutoGrade" class="form-control" placeholder="Produto">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnProdutoGrade" name="btnProdutoGrade" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaProdutoGrade" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-sm-12 table-responsive card-body p-0">
                <table id="tabelaGradeProduto" class="table table-responsive-sm table-select table-hover" width="100%">
                  <thead>
                    <tr id="colunas">
                    </tr>
                  </thead>
                  <tbody>
                  </tbody>
                </table>
              </div>
            </div>
          </div>

          <div class="d-none" id="dadosMaterial">
            <div class="row d-flex justify-content-center">
              <div class="col-lg-2  col-6 form-group">
                <label data-error="wrong" data-success="right" for="txtQtde">Quantidade:</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control maskDecimais" id="txtQtde" value="1" name="txtQtde" class="form-control" placeholder="Quantidade">
                </div>
              </div>
              <div class="col-lg-3  col-3 form-group">
                <label data-error="wrong" data-success="right" for="txtMaterial">Material:</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtMaterial" name="txtMaterial" class="form-control" placeholder="Material">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btn-Material" name="btn-Material" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btn-limpa-Material" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-lg-3  col-3 form-group">
                <label data-error="wrong" data-success="right" for="txtCor">Cor:</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtCor" name="txtCor" class="form-control" placeholder="Cor">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btn-Cor" name="btn-Cor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btn-limpa-Cor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-lg-2  col-2 form-group">
                <label data-error="wrong" data-success="right" for="txtQuantidadeEstoqueMat">Qtde Est:</label>
                <div class="input-group">
                  <input type="text" disabled class="input-default focus form-control text-right" id="txtQuantidadeEstoqueMat" name="txtQuantidadeEstoqueMat" class="form-control" placeholder="0.00">
                </div>
              </div>
              <div class="col-lg-2  col-6 form-group">
                <label data-error="wrong" data-success="right" for="txtValorMat">Preço Item:</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control maskDecimaisParametro text-right" id="txtValorMat" name="txtValorMat" class="form-control" placeholder="0.00">
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="form-row col-xl-12 col-12 mr-0 pr-0 justify-content-end">
            <div class="col-xl-auto px-0 d-flex justify-content-end">
              <button id="btnConfirmarItem" class="btn btn-danger">Confirmar</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-body">
          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
          <img src="" class="imagepreview" style="width: 100%;">
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="modal-alterar-qtde" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-md">
      <div class="modal-content">
        <div class="modal-header">
          <h4 id="modalItem-titulo" class="modal-title">Alterar Dados do Item
          </h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body" id="dadosItem">
          <div class="form-row">
            <div class="form-group col-md-6">
              <label class="labelGeral" for="txtAlterarQtde">Quantidade:</label>
              <input type="number" class="input-default focus form-control" step="1" id="txtAlterarQtde" aria-describedby="codError" name="txtAlterarQtde" class="form-control" placeholder="0">
              <input type="number" class="input-default focus form-control" step="1" id="txtQtdeOrig" aria-describedby="codError" name="txtQtdeOrig" class="form-control" hidden>
            </div>
            <div class="form-group col-md-6">
              <label class="labelGeral" for="txtAlterarPreco">Preço:</label>
              <input type="number" class="input-default focus form-control" id="txtAlterarPreco" aria-describedby="codError" name="txtAlterarPreco" class="form-control" placeholder="0" disabled>
            </div>
            <div class="form-group col-md-6">
              <label class="labelGeral" for="txtPrecoOriginal">Preço Original:</label>
              <input type="number" class="input-default focus form-control" id="txtPrecoOriginal" aria-describedby="codError" name="txtPrecoOriginal" class="form-control" disabled>
            </div>
            <div class="form-group col-md-6">
              <label class="labelGeral" for="txtAlterarValor">Valor:</label>
              <input type="text" class="input-default focus form-control" id="txtAlterarValor" aria-describedby="codError" name="txtAlterarValor" class="form-control" placeholder="0" disabled>
              <input type="text" class="input-default focus form-control" id="txtContemExpedicao" aria-describedby="codError" name="txtContemExpedicao" class="form-control" hidden>
            </div>
          </div>
          <input type="text" class="input-default focus form-control col-4 d-none" id="txtIdAlterarQtde" aria-describedby="codError" name="txtIdQtde" class="form-control" placeholder="0">
        </div>
        <div class="modal-footer justify-content-end">
          <button class="btn btn-primary btn-sisp" id="btnConfirmarQtde">Confirmar</button>
          <button class="btn bg-gradient-danger btn-sisp" id="btnCancelarQtde">Cancelar</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="modalConsignadoAberto">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Consignados em Aberto</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body" style="max-height: 500px; overflow-y: auto;">
          <div class="row">
            <div class="col-sm-12 table-responsive" style="overflow: visible">
              <table id="tabelaConsignadosAberto" class="table display nowrap" style="width:100%">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="modal-seleciona-ordenacao" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-md" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title" id="tituloAlteraStatus" style="text-overflow: ellipsis; overflow: hidden; max-width: 80%; white-space: nowrap;">Ordem do Relatório</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="col-12" id="StatusAltera">
            <div class="col-md-12 col-sm-12 col-12">
              <label for="txtOrdem">Opção de Relatório:</label>
              <div class="relative d-flex align-items-center">
                <select id="txtOrdem" class="input-default focus custom-select">
                </select>
                <button class="btn btn-sm btn-success ml-2 btnEdicaoRelatorio" title="Edição de ordenações">
                  <i class="fas fa-check"></i>
                </button>
              </div>
            </div>
          </div>
        </div>

        <div class="modal-footer">
          <div class="row">
            <button class="btn btn-danger btn-sisp" id="btnImprimeIndividual"></span> Imprimir</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  <?php
  include_once('../../../modais.php');
  ?>

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

  <!-- jQuery -->
  <script src="../plugins/jquery/jquery.min.js?versao=3.263.26.1"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.263.26.1"></script>
  <!-- SweetAlert2 -->
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.263.26.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.263.26.1"></script>

  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>

  <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.263.26.1"></script>

  <script src="../dist/js/adminlte.min.js?versao=3.263.26.1"></script>

  <script src="../dist/js/requisicoes.js?versao=3.263.26.1"></script>
  <script src="../dist/js/cliente/entidade.js?versao=3.263.26.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.263.26.1"></script>
  <script src="../dist/js/valida_cpf_cnpj.js?versao=3.263.26.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.263.26.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.263.26.1"></script>
  <script src="../dist/js/popper.min.js?versao=3.263.26.1"></script>
  <script src="../dist/js/tippy-bundle.umd.js?versao=3.263.26.1"></script>
  <script src="../utils/funcoes.js?versao=3.263.26.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.263.26.1"></script>
  <script src="../utils/cookies.js?versao=3.263.26.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.263.26.1"></script>
  <script src="../dist/js/dataTables.keyTable2.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.263.26.1"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.3/jquery.scrollTo.min.js"></script>
  <!-- Production -->
  <script type="text/javascript">
    $(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('CONSIGNADO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const permissaoUsuarioLogado = await permissaoAcessos("CONSIGNADO");

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

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

      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');
      habilitaCamposObrigatoriosTela(nomeTela);

    });
  </script>
</body>

</html>