<?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 | Produto</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.259.1.1">

  <!-- Theme style -->
  <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../dist/css/custom.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../dist/css/PesquisaVariosSelect2.css?versao=3.259.1.1">
  <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.259.1.1">
  <!-- Toastr -->
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.259.1.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.259.1.1" />
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.259.1.1">
  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.259.1.1">
  <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
  <link rel="stylesheet" href="../dist/css/quill.snow.css?versao=3.259.1.1">

  <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.259.1.1">

  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <style>
    .form-control:disabled,
    .form-control[readonly] {
      background-color: #f7f7f7;
      opacity: 1;
    }

    #msform {
      text-align: start;
      position: relative;
    }

    .card {
      box-shadow: none !important;
      border-radius: 0 !important;
      margin-bottom: 0 !important;
    }

    .card-header {
      box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
    }

    .card-body {
      padding-left: 1.25rem !important;
      padding-top: 0px;
      padding-bottom: 0px;
      padding-right: 1.25rem !important;
    }

    .fa-angle-right,
    .fa-angle-down {
      color: #343a40;
    }

    .header-content-page .title-page,
    .title-content-page .title,
    .title-page {
      font-size: 20px;
      line-height: normal;
      font-weight: 500;
      color: var(--font-color);
      margin: 0;
      font-family: Roboto, Arial, sans-serif;
    }

    #bordaImagem,
    #bordaImagem2 {
      width: 100%;
      height: 350px;
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
    }

    #infoprodimagem,
    #imgobsmontagem,
    #infoAnexoImagem {
      max-width: 100%;
      max-height: 345px;
      width: auto;
      height: auto;
    }


    #divImgObsMontagem {
      margin-left: 3%;
    }

    #tabelaObsMontagem tbody td,
    th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .card-obsmontagem {
      display: inline-block;
      max-height: 350px;
      overflow-y: auto;
      border: 1px solid #ccc;
    }

    #fotoAnexoCor span {
      color: #FFF !important;
      cursor: pointer !important;
    }

    .divBtn-Opcoes {
      border: 1px solid transparent;
      background-color: transparent !important;
      display: flex;
    }

    #divImg {
      border: none !important;
    }

    /* #divImagemProduto, #divImagemAnexoCor{
      border: 1px solid var(--font-color);
      border-radius: 0 0 4px 4px !important;
    } */

    #tabImagemAnexoCor,
    #tabImagemProd {
      color: var(--font-color);
    }

    #tabelaFaixaCor_wrapper {
      min-height: 190px !important;
    }

    .dataTables_scrollBody {
      min-height: 165px !important;
    }

    #tabelaEcomCor_length {
      visibility: hidden;
      margin: 0px;
      padding: 0px;
      height: 0px;
    }
  </style>


</head>

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


    <div id="myModal" class="modal" tabindex="-1" role="dialog">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 id="myModalLabel" class="modal-title">Modal title</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <p id="myModalText">Modal body text goes here.</p>
          </div>
          <div class="modal-footer">
            <button id="btnYes" type="button" class="btn btn-primary btn-sisp">Sim</button>
            <button id="btnNo" type="button" class="btn btn-secondary btn-sisp" data-dismiss="modal">Não</button>
          </div>
        </div>
      </div>
    </div>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 col-12">
            </div><!-- /.col -->
            <div class="col-sm-6 col-12">
              <!-- <ol class="breadcrumb float-sm-right">
                
                <li class="breadcrumb-item"><a href="../produto">Produto</a></li>
                <li class="breadcrumb-item active">Cadastro Produto</li>
              </ol> -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </div><!-- /.container-fluid -->
      </div>

      <section class="content">
        <div class="container-fluid">
          <div class="row">
            <div class="col-12">
              <div class="card" style="height:auto;min-height:715px">
                <div class="card-header bg-dark flex">
                  <h2 class="m-0 text-white">Cadastro de Produtos</h2>

                  <button title="Tutorial" class="mt-2 btn btn-info btn-sm ml-2" id="tutorial">
                    <i class="fas fa-question-circle"></i>
                  </button>
                </div>
                <fieldset>
                  <div class="card-body">
                    <form style="text-align:left!important;" id="msform" name="msform">
                      <div class="card card-header" 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 class="fas fa-angle-down"></i>
                            </div>
                            <div class="col-11">
                              <h4 class="title-page">
                                Geral
                              </h4>
                            </div>
                          </div>
                        </a>
                      </div>
                      <div class="collapse  show" id="multiCollapseExample1">
                        <div class="card card-body">
                          <div class=" tab-pane fade show active" role="tabpanel" aria-labelledby="geral-tab">
                            <div class="form-row pt-2 pl-1">
                              <div class="form-group form-check icheck-primary" style="margin-left: 1%;">
                                <input type="checkbox" class="form-check-input" id="checkAtivo">
                                <label class="form-check-label pr-4" for="checkAtivo">Ativo</label>
                              </div>

                              <div class="form-group form-check d-none">
                                <input type="checkbox" class="form-check-input" id="checkLiberado">
                                <label class="form-check-label pr-4" for="checkLiberado">Liberado</label>
                              </div>
                            </div>
                            <div class="form-row">
                              <div class="row col-lg-8  col-12">
                                <div class="col-lg-4  col-12 form-group" id="tourcodigo">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCodigo">Código do Produto </label>
                                  <input type="text" class="input-default focus form-control" id="txtCodigo" aria-describedby="codError" name="txtCodigo" class="form-control" placeholder="Código">
                                </div>
                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCodigo2">Código 2</label>
                                  <input type="text" class="input-default focus form-control" id="txtCodigo2" aria-describedby="cod2Error" name="txtCodigo2" class="form-control" maxlength="60" placeholder="Código 2">
                                </div>
                                <div class="col-lg-3  col-12 form-group d-none">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPrototipo">Protótipo</label>
                                  <input type="text" class="input-default focus form-control" id="txtPrototipo" name="txtPrototipo" class="form-control" placeholder="Protótipo">
                                </div>
                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtEstMin">Estoque min</label>
                                  <input type="text" class="input-default focus form-control" id="txtEstMin" name="txtEstMin" class="form-control" placeholder="Estoque mínimo">
                                </div>
                                <div class="col-lg-6  col-12 form-group" id="tourdesc" title="A descrição do produto não pode conter os seguintes caracteres: ? ! &quot; * &lt; &gt; |">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtDescricaoProduto">Descrição do Produto *</label>
                                  <input type="text" maxlength="100" class="input-default focus form-control validate" id="txtDescricaoProduto" required aria-describedby="descError" name="txtDescricaoProduto" class="form-control" placeholder="Descrição do Produto">
                                </div>
                                <div class="col-lg-2  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPesoLiq">Peso Líqdo.</label>
                                  <input type="text" class="input-default focus form-control" id="txtPesoLiq" name="txtPesoLiq" class="form-control" placeholder="Peso Líquido">
                                </div>
                                <div class="col-lg-2  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPesoMed">Peso Médio</label>
                                  <input type="text" class="input-default focus form-control" id="txtPesoMed" name="txtPesoMed" class="form-control" placeholder="Peso Médio">
                                </div>
                                <div class="col-lg-2  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCusto">Preço
                                    Custo</label>
                                  <input type="text" class="input-default focus form-control" id="txtCusto" name="txtCusto" class="form-control" placeholder="Custo">
                                </div>
                                <div class="col-lg-6  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtComplemento">Complemento</label>
                                  <div class="input-group">
                                    <input type="text" maxlength="300" class="input-default focus form-control" id="txtComplemento" name="txtComplemento" class="form-control" placeholder="Complemento">
                                  </div>
                                </div>
                                <div class="col-lg-2  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPrecoCompra">Preço Compra</label>
                                  <input type="text" class="input-default focus form-control" id="txtPrecoCompra" name="txtPrecoCompra" class="form-control" placeholder="Preço Compra">
                                </div>
                                <div class="col-lg-2  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPrecoVenda">Preço Venda</label>
                                  <input type="text" class="input-default focus form-control" id="txtPrecoVenda" name="txtPrecoVenda" class="form-control" placeholder="Preço Venda">
                                </div>
                                <div class="col-lg-2  col-12">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPrecoRepos">Preço Repos</label>
                                  <input type="text" class="input-default focus form-control" id="txtPrecoRepos" name="txtPrecoRepos" class="form-control" placeholder="Preço Reposição">
                                </div>
                                <div class="col-lg-4  col-12">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtReferencia">Referência</label>
                                  <input type="text" class="input-default focus form-control" id="txtReferencia" name="txtReferencia" class="form-control" placeholder="Referência">
                                </div>
                                <div class=" col-12 col-lg-4 form-group" id="tourfaixa">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtFaixaTam">Faixa de Tamanho *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtFaixaTam" required aria-describedby="faixaError" name="txtFaixaTam" class="form-control" placeholder="Faixa de Tamanho">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnFaixaTam" name="btnCodFornerc" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAFaixaTam" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-12 form-group" id="tourund">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtModelo">Modelo</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtModelo" aria-describedby="uError" name="txtModelo" class="form-control" placeholder="Modelo">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnModelo" name="btnModelo" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAModelo" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-12 form-group" id="tourund">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtUnidade">Unidade *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtUnidade" required aria-describedby="uError" name="txtUnidade" class="form-control" placeholder="Unidade">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnUnidade" name="btnUnidade" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAUnidade" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-12 form-group" id="tourundvenda">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtUnidadeVenda">Und Venda *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtUnidadeVenda" required aria-describedby="uvError" name="txtUnidadeVenda" class="form-control" placeholder="Unidade Venda">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnUnidadeVenda" name="btnUnidadeVenda" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAUnidadeVenda" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-12 form-group" id="tourundexp">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtUnidadeExp">Und Expor</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtUnidadeExp" aria-describedby="uvError" name="txtUnidadeExp" class="form-control" placeholder="Unidade Exportação">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnUnidadeExp" name="btnUnidadeExp" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAUnidadeExp" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4  col-12 form-group" id="tourcolecao">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtColecao">Coleção *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtColecao" required aria-describedby="colecaoError" name="txtColecao" class="form-control" placeholder="Coleção">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnColecao" name="btnColecao" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAColecao" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtMarca">Marca</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtMarca" name="txtMarca" class="form-control" placeholder="Marca">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnMarca" name="btnMarca" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAMarca" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group" id="tourstatus">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtStatus">Status *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtStatus" required aria-describedby="statusError" name="txtStatus" class="form-control" placeholder="Status">
                                    <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="btnAStatus" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group" id="tourgrupo">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtGrupo">Grupo
                                    *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtGrupo" required aria-describedby="grupoError" name="txtGrupo" class="form-control" placeholder="Grupo">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnGrupo" name="btnGrupo" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAGrupo" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtLinha">Linha</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtLinha" name="txtLinha" class="form-control" placeholder="Linha">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnLinha" name="btnLinha" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnALinha" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtEtiqueta">Etiqueta</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtEtiqueta" name="txtEtiqueta" class="form-control" placeholder="Etiqueta">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnEtiqueta" name="btnEtiqueta" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAEtiqueta" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtEstilista">Estilista</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtEstilista" name="txtEstilista" class="form-control" placeholder="Estilista">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnEstilista" name="btnEstilista" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAEstilista" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtModelista">Modelista</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtModelista" name="txtModelista" class="form-control" placeholder="Modelista">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnModelista" name="btnModelista" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnAModelista" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtSimbologia">Simbologia</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtSimbologia" name="txtSimbologia" class="form-control" placeholder="Simbologia">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnSimbologia" name="btnSimbologia" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnASimbologia" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCodCliente">Código Cliente</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtCodCliente" name="txtCodCliente" class="form-control" placeholder="Código Cliente">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnCodCliente" name="btnCodCliente" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnACodCliente" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCodFornec">Código Fornecedor</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtCodFornec" name="txtCodFornec" class="form-control" placeholder="Código Fornecedor">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnCodFornerc" name="btnCodFornerc" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnACodFornerc" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCuidado">Cuidado</label>
                                  <div class="input-group">
                                    <select class="js-example-programmatic js-states form-control" id="txtCuidado" multiple="multiple"></select>
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnCuidado" name="btnCuidado" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnLimpaCuidado" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtCategoria">Categoria</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtCategoria" name="txtCategoria" class="form-control" placeholder="Categoria">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnCategoria" name="btnCategoria" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnLimpaCategoria" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-4  col-12 form-group">
                                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtTipoProduto">Tipo Produto</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtTipoProduto" name="txtTipoProduto" class="form-control" placeholder="Tipo Produto">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnTipoProduto" name="btnTipoProduto" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btnLimpaTipoProduto" type="button">
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                              </div>


                              <div class="col-lg-4">

                                <div class="row card-body d-flex justify-content-end" id="abaGeral" style="padding: 1.2rem 0;">

                                  <nav class="col-12">
                                    <div class="nav nav-tabs" id="nav-tab" role="tablist" style="text-decoration: none; ">
                                      <a class="menu_secao nav-item nav-link active" id="tabImagemProd" data-toggle="tab" href="#divImagemProduto" role="tab" aria-controls="divImagemProduto" aria-selected="true">Imagem do Produto</a>
                                      <!-- <a class="menu_secao nav-item nav-link" id="tabImagemAnexoCor" data-toggle="tab" href="#divImagemAnexoCor" role="tab" aria-controls="divImagemAnexoCor" aria-selected="false">Anexo Cor</a> -->
                                    </div>
                                  </nav>

                                  <div class="col-12" id="nav-tabContent">

                                    <!--Aba Imagem Produto-->
                                    <div class="tab-pane divOculta fade show active" id="divImagemProduto" role="tabpanel" aria-labelledby="tabImagemProd">

                                      <div id="divImg">
                                        <div class="d-flex justify-content-center" id="">
                                          <label id="btnEscolherFoto" class="btnEnviarFoto" for="fileimagem" data-button="absolute" type="button">
                                            <img class="pop img img-fluid imagem" id="infoprodimagem" src="../dist/img/prod-1.png">
                                          </label>
                                        </div>
                                        <div class="input-group-append" class="upload-imagem" style="margin-left: 35%; margin-top: .5%">
                                          <input type="file" value="" accept=".jpg, .png, .jpeg" class="upload" style="display: none;" name="fileimagem" id="fileimagem" />
                                        </div>
                                      </div>

                                    </div>

                                    <!--Aba Imagem Anexo Cor-->
                                    <!-- <div class="tab-pane divOculta fade d-none" id="divImagemAnexoCor" role="tabpanel" aria-labelledby="tabImagemAnexoCor">
                                      
                                      <div id="divImgAnexoCor">
                                          <div class="d-flex justify-content-center">
                                          </div>
                                      </div>

                                    </div> -->

                                  </div>

                                </div>

                                <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="venda-tab" style="margin-left: 3%;">
                                  <label class="labelGeral" data-success="right" for="tourtabelacores">Cores</label>
                                  <div class="form-row" id="tourtabelacores">
                                    <div class="col-lg-12 form-card" id="datatables">
                                      <div id="tabelacorestour">
                                        <table id="tabelaFaixaCor" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%">
                                          <thead>
                                            <tr>
                                              <th class="th-sm">Cor</th>
                                              <th class="th-sm">Código 2</th>
                                              <th class="th-sm">Descrição</th>
                                              <th class="th-sm">Ativo</th>
                                              <th class="th-sm">Status</th>
                                              <th class="th-sm">Desc. Status</th>
                                              <th class="th-sm">Foto</th>
                                            </tr>
                                          </thead>
                                          <tbody>
                                          </tbody>
                                        </table>
                                      </div>
                                    </div>
                                    <div class="col-lg-2 mt-3">
                                      <button id="btnAbrirCondicao" style="font-size: 14px" type="button" class="btn btn-lg btn-secondary">
                                        Adicionar
                                      </button>
                                    </div>
                                  </div>
                                </div>

                              </div>










                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="card card-header" role="tab">
                        <a style="width:100%;" id="documentoaba" data-toggle="collapse" data-parent="#multiCollapseExample2" href="#multiCollapseExample2" aria-expanded="true" aria-controls="collapseOne1">
                          <div class="row">
                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                              <i class="fas fa-angle-right"></i>
                            </div>
                            <div class="col-11">
                              <h4 class="title-page">
                                Tributações
                              </h4>
                            </div>
                          </div>
                        </a>
                      </div>

                      <div class="collapse" id="multiCollapseExample2">
                        <div class="card card-body">
                          <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="documento-tab">
                            <div class="form-row pt-2">
                              <div class="col-lg-4  col-12 form-group" id="tourncm">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtNcm">Código
                                  NCM *</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtNcm" required aria-describedby="ncmError" name="txtNcm" class="form-control" placeholder="Código NCM">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnNcm" name="btnNcm" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnANcm" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtExtIpi">Código
                                  EXTIPI</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtExtIpi" name="txtExtIpi" class="form-control" placeholder="Código EXTIPI">
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group" id="touricms">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtCstIcms">CST
                                  ICMS *</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtCstIcms" name="txtCstIcms" required aria-describedby="icmsError" class="form-control" placeholder="CST ICMS">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnCstIcms" name="btnCstIcms" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnACstIcms" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group" id="toureipi">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtCstIpiEntrada">CST IPI Entrada *</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtCstIpiEntrada" name="txtCstIpiEntrada" required aria-describedby="ipiError" class="form-control" placeholder="CST IPI Entrada">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnCstIpiEntrada" name="btnCstIpiEntrada" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnACstIpiEntrada" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group" id="toursipi">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtCstIpiSaida">CST IPI Saída *</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtCstIpiSaida" name="txtCstIpiSaida" required aria-describedby="ipiSError" class="form-control" placeholder="CST IPI Saída">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnCstIpiSaida" name="btnCstIpiSaida" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnACstIpiSaida" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtNatureza">Natureza</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtNatureza" name="txtNatureza" class="form-control" placeholder="Natureza">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnNatureza" name="btnNatureza" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnANatureza" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4  col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtEnqIpi">Enquadramento IPI</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtEnqIpi" name="txtEnqIpi" class="form-control" placeholder="Enquadramento IPI">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnEnqIpi" name="btnEnqIpi" data-button="absolute" type="button">
                                      <i class="m-0 p-0 fas fa-search"></i>
                                    </button>
                                    <button class="btn bg-danger" id="btnAEnqIpi" type="button">
                                      <i class="m-0 p-0 fas fa-trash"></i>
                                    </button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-2 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="selectTribEcf">Tributação ECF</label>
                                <div class="input-group">
                                  <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="selectTribEcf" class="custom-select focus">
                                    <option value="5">Não informado</option>
                                    <option value="0">Isento</option>
                                    <option value="1">Não Tributado</option>
                                    <option value="2">Substituição Tributária</option>
                                    <option value="3">Tributado pelo ICMS</option>
                                    <option value="4">Tributado pelo ISSQN</option>

                                  </select>
                                </div>
                              </div>
                              <div class="col-lg-2 col-12 form-group" id="tourposse">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="selectPosse">Posse *</label>
                                <div class="input-group">
                                  <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="selectPosse" required aria-describedby="tipoError" class="custom-select focus">
                                    <option value="">Não informado</option>
                                    <option value="0">0 - Mercadoria de propriedade do informante e em seu poder</option>
                                    <option value="1">1 - Mercadoria de propriedade do informante em poder de terceiros
                                    </option>
                                    <option value="2">2 - Mercadoria de propriedade de terceiros em poder do informante
                                    </option>
                                  </select>
                                </div>
                              </div>
                              <div class="col-lg-2 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="selectImp">Importado</label>
                                <div class="input-group">
                                  <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="selectImp" class="custom-select focus">
                                    <option value="">Não informado</option>
                                    <option value="0">Não</option>
                                    <option value="1">Diretamente</option>
                                    <option value="2">Indiretamente</option>
                                  </select>
                                </div>
                              </div>
                              <div class="col-lg-1  col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtIpi">%
                                  IPI</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtIpi" name="txtIpi" class="form-control" placeholder="% IPI">
                                </div>
                              </div>
                              <div class="col-lg-1  col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtIcms">%
                                  ICMS</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" id="txtIcms" name="txtIcms" class="form-control" placeholder="% ICMS">
                                </div>
                              </div>


                              <div class="form-row">
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <!-- <div class="card card-header" role="tab">
                                                        <a style="width:100%;" id="venda" data-toggle="collapse" data-parent="#multiCollapseExample3" href="#multiCollapseExample3" aria-expanded="true" aria-controls="collapseOne1">
                                                            <div class="row">
                                                                <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                                                                    <i class="fas fa-angle-right"></i>
                                                                </div>
                                                                <div class="col-11">
                                                                    <h4 class="title-page">
                                                                        Cores
                                                                    </h4>
                                                                </div>
                                                            </div>
                                                        </a>
                                                    </div>
                                                    <div class="collapse" id="multiCollapseExample3">
                                                        <div class="card card-body">
                                                            <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="venda-tab">
                                                                <div class="pt-2 form-row" id="tourtabelacores">
                                                                    <div class="col-lg-11 form-card" id="datatables">
                                                                        <div id="tabelacorestour">
                                                                            <table id="tabelaFaixaCor" class="table table-select table-hover">
                                                                                <thead>
                                                                                    <tr>
                                                                                        <th class="th-sm">Cód Cor</th>
                                                                                        <th class="th-sm">Descrição</th>
                                                                                        <th class="th-sm">Ações</th>
                                                                                    </tr>
                                                                                </thead>
                                                                                <tbody>
                                                                                </tbody>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-lg-1">
                                                                        <button id="btnAbrirCondicao" style="font-size: 15px;" type="button" class="btn btn-lg btn-secondary float-right focus">
                                                                            Adicionar
                                                                        </button>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div> -->
                      <div class="card card-header" role="tab">
                        <a style="width:100%;" id="compra" data-toggle="collapse" data-parent="#multiCollapseExample4" href="#multiCollapseExample4" aria-expanded="true" aria-controls="collapseOne1">
                          <div class="row">
                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                              <i class="fas fa-angle-right"></i>
                            </div>
                            <div class="col-11">
                              <h4 class="title-page">
                                Tipo de Venda/Regra
                              </h4>
                            </div>
                          </div>
                        </a>
                      </div>
                      <div class="collapse" id="multiCollapseExample4">
                        <div class="card card-body">
                          <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="venda-tab">
                            <div class="pt-2 form-row" id="tourtabelavenda">
                              <div class="col-lg-11 form-card" id="datatables">
                                <div id="tabelatipotour">
                                  <table id="tabelaVendaRegra" class="table table-select table-hover">
                                    <thead>
                                      <tr>
                                        <th class="th-sm">Tipo de venda</th>
                                        <th class="th-sm">Empresa</th>
                                        <th class="th-sm">Regra</th>
                                        <th class="th-sm">Descrição Regra</th>
                                        <th class="th-sm">Tributação</th>
                                        <th class="th-sm">Cód. Sped</th>
                                        <th class="th-sm">Ações</th>
                                      </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                              <div class="col-lg-1">
                                <button id="btnAbrirVendaRegra" style="font-size: 15px;" type="button" class="btn btn-lg btn-secondary float-right focus">
                                  Adicionar
                                </button>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="card card-header" role="tab">
                        <a style="width:100%;" id="compra" data-toggle="collapse" data-parent="#multiCollapseExample5" href="#multiCollapseExample5" aria-expanded="true" aria-controls="collapseOne1">
                          <div class="row">
                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                              <i class="fas fa-angle-right"></i>
                            </div>
                            <div class="col-11">
                              <h4 class="title-page">
                                Observações de Montagem
                              </h4>
                            </div>
                          </div>
                        </a>
                      </div>
                      <div class="collapse" id="multiCollapseExample5">
                        <div class="card card-body">
                          <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="obsmont-tab">
                            <div class="pt-2 form-row" id="tourtabelaobsmontagem" style="max-height: 500px; min-height: 450px;">
                              <div class="col-lg-6 col-12 form-card" id="divObsMontagem" style="height: 400px">
                                <div id="editor">
                                </div>
                              </div>
                              <div class="col-lg-6 col-12">
                                <div id="divImgObsMontagem">
                                  <div class="d-flex justify-content-center" id="bordaImagem2" style="height: 440px;">
                                    <label id="btnEscolherFotoObsMontagem" class="btnEnviarFoto" for="fileimagem2" data-button="absolute" type="button">
                                      <img class="pop img img-fluid imagem2" id="imgobsmontagem" src="./dist/img/prod-1.png">
                                    </label>
                                  </div>
                                  <div class="input-group-append" class="upload-imagem" style="margin-left: 35%; margin-top: .5%">
                                    <input type="file" value="" class="upload2" style="display: none;" name="fileimagem2" id="fileimagem2" />
                                  </div>
                                </div>
                                <button type="button" class="btn bg-gradient-danger btn-sisp mt-2 ml-4" disabled id="btnExcluirFotoMontagem">Excluir Foto</button>
                              </div>
                            </div>
                            <div class="pt-2 form-row">
                              <div class="col-lg-12 col-12 form-card card-obsmontagem">
                                <table id="tabelaObsMontagem" class="table table-select table-hover" style="width: 100%">
                                  <thead>
                                  </thead>
                                  <tbody>
                                  </tbody>
                                </table>
                              </div>
                            </div>
                            <div class="modal-footer justify-content-start pl-0" style="border: none!important">
                              <button type="button" class="btn btn-primary btn-sisp mt-2 ml-0" disabled id="btnAlterarObsMontagem">Incluir/Alterar Obs</button>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="card card-header" role="tab">
                        <a style="width:100%;" id="compra" data-toggle="collapse" data-parent="#multiCollapseExample6" href="#multiCollapseExample6" aria-expanded="true" aria-controls="collapseOne1">
                          <div class="row">
                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                              <i class="fas fa-angle-right"></i>
                            </div>
                            <div class="col-11">
                              <h4 class="title-page">
                                E-Commerce
                              </h4>
                            </div>
                          </div>
                        </a>
                      </div>
                      <div class="collapse" id="multiCollapseExample6">
                        <div class="card card-body">
                          <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="ecommerce-tab">
                            <div class="form-row pt-2 pb-2">
                              <div class="form-group form-check icheck-primary mb-2" style="margin-left: 1%;">
                                <input type="checkbox" class="form-check-input" id="checkTelevendas">
                                <label class="form-check-label pr-4" for="checkTelevendas">Televendas/E-commerce</label>
                              </div>
                            </div>
                            <div class="col-lg-12 form-card" id="datatables">
                              <div id="tabelatipotour">
                                <table id="tabelaEcomCor" class="table table-select table-hover">
                                  <thead>
                                    <tr>
                                      <th class="th-sm">Ativo</th>
                                      <th class="th-sm">Cor</th>
                                      <th class="th-sm">Desc. Cor</th>
                                    </tr>
                                  </thead>
                                  <tbody>
                                  </tbody>
                                </table>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <input id="gravar" type="button" style="font-size:15px;" class="btn btn-danger btn-sisp btn-lg action-button float-right" value="Gravar">
                      <button type="button" id="btnVoltar" style="font-size:15px;" class="btn btn-success btn-sisp action-button-previous" data-dismiss="modal">Voltar</button>
                    </form>
                </fieldset>
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
    <div class="modal fade" id="modalCondicao" tabindex="-1" role="dialog" aria-labelledby="modalCondicao" aria-hidden="true">
      <div class="modal-dialog modal-lg">
        <div class="modal-content">
          <div class="modal-header">
            <h4 id="modalCondicao-titulo" class="modal-title">Adicionar Cor</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-sm-12">
                <div class="row">
                  <div class="col-sm-6">
                    <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="CondPagto">Selecionar cor:</label>
                    <div class="input-group">

                      <input type="text" class="input-default focus form-control" id="txtCondPagto" name="txtCondPagto" class="form-control" placeholder="Selecionar cor">

                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btn-CondPagto" name="btn-moeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btn-limpa-CondPagto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-5">
                    <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtStatusCor">Status: </label>
                    <div class="input-group">

                      <input type="text" class="input-default focus form-control" id="txtStatusCor" name="txtStatusCor" class="form-control" placeholder="Status">

                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btn-StatusCor" name="btn-moeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btn-limpa-StatusCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-1 mt-4 pl-0 pt-1">
                    <div class="col-sm-12 icheck-primary d-inline">
                      <input class="form-check-input" type="checkbox" id="cbCorAtiva" checked>
                      <label class="form-check-label" for="cbCorAtiva">Ativo</label>
                    </div>
                  </div>
                  <input type="text" class="input-default focus form-control d-none" id="txtCodigo2Cor" name="txtCodigo2Cor" class="form-control">
                  <div class="row col-12">
                    <div class="col-sm-12" style="margin-top:5px">
                      <button id="btnAdicionar" type="button" class="btn btn-primary btn-block mt-4">
                        Adicionar
                      </button>
                    </div>
                  </div>

                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="modal fade" id="modalAdicionarVendaRegra" tabindex="-1" role="dialog" aria-labelledby="modalContas" aria-hidden="true">
      <div class="modal-dialog modal-lg">
        <div class="modal-content">
          <div class="modal-header">
            <h4 id="modalContas-titulo" class="modal-title">Adicionar tipo de venda/regra</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-sm-12">
                <div class="row">
                  <div class="col-sm-4">
                    <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtTipoVenda">Tipo de venda *</label>
                    <div class="input-group">
                      <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="txtTipoVenda" required aria-describedby="tipoError" class="custom-select focus">
                        <option disabled selected value=""></option>
                        <option value="0">0 - Produção</option>
                        <option value="1">1 - Revenda</option>
                      </select>
                      <!-- <input type="text" maxlength="1" class="input-default focus form-control" id="txtTipoVenda" name="txtTipoVenda" class="form-control" placeholder="Tipo de venda"> -->
                    </div>
                  </div>
                  <div class="col-sm-4">
                    <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtEmpresaRegra">Empresa *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtEmpresaRegra" name="txtEmpresaRegra" class="form-control" placeholder="Empresa">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnEmpresaRegra" name="btn-moeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAEmpresaRegra" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-4">
                    <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtRegra">Regra</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtRegra" name="txtRegra" class="form-control" placeholder="Regra">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnRegra" name="btn-moeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnARegra" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-12 col-12 form-group">
                    <label data-error="wrong" class="labelGeral" data-success="right" for="selectTrib">Tributação *</label>
                    <div class="input-group">
                      <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="selectTrib" class="custom-select focus">
                        <option value="">Não informado</option>
                        <option value="N">Normal</option>
                        <option value="D">Diferenciada</option>
                        <option value="1">01-Produto Importado</option>
                        <option value="2">02-Produto Importado Mercado Interno</option>
                        <option value="3">03-Conteúdo de importação maior 40% e inferior ou igual 70%
                        </option>
                        <option value="4">04-Conformidade Processos básicos</option>
                        <option value="5">05-Conteúdo de importação menor ou igual 40%</option>
                        <option value="6">06-Prod. Importdado sem similar nacional</option>
                        <option value="7">07-Adquirido merc. interno sem similar nacional</option>
                        <option value="8">08-Conteúdo de importação superior 70%</option>
                      </select>
                    </div>
                  </div>
                  <div class="col-lg-12  col-12 form-group">
                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtSped">Código
                      SPED *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtSped" name="txtSped" required aria-describedby="spedError" class="form-control" placeholder="Código SPED">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnSped" name="btnSped" data-button="absolute" type="button">
                          <i class="m-0 p-0 fas fa-search"></i>
                        </button>
                        <button class="btn bg-danger" id="btnASped" type="button">
                          <i class="m-0 p-0 fas fa-trash"></i>
                        </button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-12" style="margin-top:5px">
                    <button id="btnAdicionarTipoRegra" type="button" class="btn btn-primary btn-block mt-4">
                      Adicionar
                    </button>
                  </div>
                </div>
              </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 class="pop img img-fluid imagem" id="infoAnexoImagem" style="width: 100%;">
          </div>
        </div>
      </div>
    </div>

    <?php
    include_once('../../../modais.php');
    include_once('../../../modals/modal_obsmontagem.html');
    include_once('../../../modals/modal_anexos.html');
    ?>

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
      <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->
  </div>
  <!-- ./wrapper -->
  <script>
    function formatar(mascara, documento) {
      var i = documento.value.length;
      var saida = mascara.substring(0, 1);
      var texto = mascara.substring(i);

      if (texto.substring(0, 1) != saida) {
        documento.value += texto.substring(0, 1);
      }

    }
  </script>

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

  <!-- SweetAlert2 -->
  <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.259.1.1"></script>
  <script src="../plugins/toastr/toastr.min.js?versao=3.259.1.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.259.1.1"></script>

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

  <script src="../dist/js/requisicoes.js?versao=3.259.1.1"></script>
  <script src="../dist/js/sisplan.js?versao=3.259.1.1"></script>
  <script src="../dist/js/cliente/entidade.js?versao=3.259.1.1"></script>
  <script src="../dist/js/loadingoverlay.min.js?versao=3.259.1.1"></script>
  <script src="../dist/js/valida_cpf_cnpj.js?versao=3.259.1.1"></script>
  <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.259.1.1"></script>
  <script src="../dist/js/dataTables.keyTable.js?versao=3.259.1.1"></script>
  <script src="../utils/funcoes.js?versao=3.259.1.1"></script>
  <script src="../utils/cookies.js?versao=3.259.1.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.259.1.1"></script>
  <script src="../dist/js/jquery.mask.min.js?versao=3.259.1.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.259.1.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.259.1.1"></script>
  <script src="../plugins/select2/js/select2.full.min.js?versao=3.259.1.1"></script>
  <script type="text/javascript" src="../modals/modal_obsmontagem.js?versao=3.259.1.1"></script>
  <script type="text/javascript" src="../modals/modal_anexos.js?versao=3.259.1.1"></script>
  <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
  <script src="//cdn.quilljs.com/1.3.6/quill.js"></script>
  <script src="//cdn.quilljs.com/1.3.6/quill.min.js"></script>
  <script>
    $(document).ready(async function() {
      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      criaRichText('#editor', {
        readOnly: true,
        theme: 'snow',
        modules: {
          toolbar: []
        }
      });

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      const temAcesso = await temAcessoTela('PRODUTO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const permissaoUsuarioLogado = await permissaoAcessos("PRODUTO");

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

      const queryString = window.location.href;
      const parametros = queryString.split("/");
      const produto = parametros[parametros.length - 1];

      $(window).on("beforeunload", function(e) {
        // e.preventDefault();
        e.stopPropagation();
        deletaRegistro("PRODUTO", getCookie("usuario"), descriptografaUrl(produto));
        return undefined;
      });

      sArquivo = `${BASE_URI}/pages/produto/cadastro_produto/produto.js?versao=3.259.1.1`;
      insereJavaScriptPagina(sArquivo);

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

</html>