<?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.255.7.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.255.7.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.255.7.1" />
  <link href='dist/css/bootstrap.min.css?versao=3.255.7.1'>
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.255.7.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/responsive.bootstrap.min.css?versao=3.255.7.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.255.7.1" />
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.255.7.1">
  <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.255.7.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 form-group" 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 form-group 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" 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" 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" value="[10188] - VINICIUS MAGELA DE OLIVEIRA MOTA" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnCliente" name="btnCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                        <button class="btn bg-danger" id="btnLimpaCliente" name="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-4" 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" value="[01194] - CAROLINE DE SOUZA FERREIRA(007 STICK)" id="txtVendedor" name="txtVendedor" class="form-control" placeholder="Vendedor" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" 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" id="btnLimpaVendedor" name="btnLimpaVendedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                      </div>
                                    </div>
                                  </div>

                                  <div class="col-4" 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" value="[09] - status" id="txtStatus" name="txtStatus" class="form-control" placeholder="Status" required>
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" 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" 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 form-group" id="tourcodigo">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtDias">Dias:</label>
                                    <input type="number" class="input-default focus form-control" id="txtDias" name="txtDias" class="form-control" placeholder="Dias" value="0">
                                  </div>
                                  <div class="form-group col-md-4 col-12">
                                    <label>Data de Acerto:</label>
                                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtAcerto">
                                  </div>
                                  <div class="col-md-4 col-12 form-group" id="tourcodigo">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorMinimo">Valor Mínimo (%):</label>
                                    <input type="text" class="input-default focus form-control" id="txtValorMinimo" name="txtValorMinimo" class="form-control" value="0" placeholder="Valor Mínimo (%)">
                                  </div>
                                  <div class="col-12">
                                    <div class="form-group" id="ObservacaoInfoTour">
                                      <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" rows="5"></textarea>
                                      </div>
                                    </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" />

                            </fieldset>
                            <fieldset>
                              <div class="form-card">
                                <div class="form-row mb-2">
                                  <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 justify-content-between">
                                  <div class="form-group 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 data-error="wrong" data-success="right" for="txtTabelaPreco">Tabela de Preço: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoTabelaPreco" id="txtTabelaPreco" name="txtTabelaPreco" class="form-control" placeholder="Tabela de Preço">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger campoTabelaPreco" id="btnTabelaPreco" name="btnTabelaPreco" data-button="absolute" 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 data-error="wrong" data-success="right" for="txtDeposito">Depósito: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control campoDeposito" id="txtDeposito" name="txtDeposito" class="form-control" placeholder="Depósito" required>
                                      <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="form-group 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" 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="form-group 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" 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="form-group 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" 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="form-group col-md-3 col-12">
                                    <label data-error="wrong" data-success="right" for="txtQtde">Qtde: *</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control maskDecimais campoQuantidade" id="txtQtde" name="txtQtde" class="form-control" placeholder="Qtde">
                                    </div>
                                  </div>
                                  <div class="form-group col-md-3 col-12">
                                    <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" id="txtPreco" name="txtPreco" class="form-control" placeholder="Preço" disabled>
                                    </div>
                                  </div>
                                  <div class="form-group col-md-3 col-12">
                                    <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" id="txtDesconto" name="txtDesconto" class="form-control" 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-3 col-12">
                                    <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" id="txtTotal" name="txtTotal" class="form-control" placeholder="Total Item" disabled>
                                    </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-lg-4 col-6" 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" id="txtBarra" name="txtBarra" placeholder="Barra" title="Bipe uma barra para adicionar um item ao consignado.">
                                    </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">Ações</th>
                                          <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="form-row col-xl-12 col-12 pt-4" id="valoresTotais">
                                  <div class="col-xl-2 col-4">
                                    <label data-error="wrong" data-success="right" for="txtValorTotalItem">Valor Item:</label>
                                    <div class="input-group">
                                      <input type="text" disabled class="input-default focus form-control col-9 text-right" id="txtValorTotalItem" name="txtValorTotalItem" class="form-control" placeholder="0">
                                    </div>
                                  </div>
                                  <div class="col-xl-2 col-4">
                                    <label data-error="wrong" data-success="right" for="txtValorTotal">Valor Líq. Total:</label>
                                    <div class="input-group">
                                      <input type="text" disabled class="input-default focus form-control col-9 text-right" id="txtValorTotal" name="txtValorTotal" class="form-control" placeholder="0">
                                    </div>
                                  </div>
                                  <div class="col-xl-2 col-4">
                                    <label data-error="wrong" data-success="right" for="txtValorTotal">Quantidade Total:</label>
                                    <div class="input-group">
                                      <input type="text" disabled class="input-default focus form-control col-9 text-right" id="txtQtdeTotal" name="txtQtdeTotal" class="form-control" placeholder="0">
                                    </div>
                                  </div>
                                </div>

                              </div>
                              <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" />
                            </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>

  <?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.255.7.1"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.255.7.1"></script>
  <!-- SweetAlert2 -->
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.255.7.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.255.7.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.255.7.1"></script>

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

  <script src="../dist/js/requisicoes.js?versao=3.255.7.1"></script>
  <script src="../dist/js/cliente/entidade.js?versao=3.255.7.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.255.7.1"></script>
  <script src="../dist/js/valida_cpf_cnpj.js?versao=3.255.7.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.255.7.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.255.7.1"></script>
  <script src="../dist/js/popper.min.js?versao=3.255.7.1"></script>
  <script src="../dist/js/tippy-bundle.umd.js?versao=3.255.7.1"></script>
  <script src="../utils/funcoes.js?versao=3.255.7.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.255.7.1"></script>
  <script src="../utils/cookies.js?versao=3.255.7.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.255.7.1"></script>
  <script src="../dist/js/dataTables.keyTable2.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.255.7.1"></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.255.7.1`;
      insereJavaScriptPagina(sArquivo);

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

    });
  </script>
</body>

</html>