{"version":3,"sources":["assets/venda-liquida.png","assets/compra-liquida.png","assets/posicao-estoque.png","assets/receita-despesas.png","assets/i-gerente.png","assets/i-settings.png","assets/i-city.png","assets/logoBancos/caixa.png","assets/i-group.png","assets/i-password.png","assets/i-chat.png","assets/i-user.png","state/reducer.js","pages/login/index.js","pages/recuperarSenha/index.js","pages/recuperarSenhaGerencial/index.js","pages/ativarConta/index.js","pages/ativarNovoEmail/index.js","pages/etiquetaServidor/manutencao.js","pages/etiquetaServidor/drawer.js","pages/etiquetaServidor/index.js","pages/importarPessoa/index.js","pages/antecipacao/manutencao.js","pages/antecipacao/drawer.js","pages/antecipacao/index.js","pages/semAcesso/index.js","pages/aliquotaSimplesNacional/manutencao.js","pages/aliquotaSimplesNacional/drawer.js","pages/aliquotaSimplesNacional/index.js","pages/grupoProdutos/drawer.js","pages/subGrupo/drawer.js","pages/frete/tabFretetributario.js","pages/frete/manutencao.js","pages/frete/drawer.js","pages/frete/index.js","pages/home/index.js","pages/inicial/index.js","pages/dashboard/funcoes.js","pages/dashboard/vendaLiquida.js","pages/dashboard/compraLiquida.js","pages/dashboard/posicaoEstoque.js","pages/dashboard/receitasDespesas.js","pages/dashboard/index.js","pages/clientes/drawer.js","pages/clientes/index.js","pages/resumoCliente/tabEstatistica.js","pages/resumoCliente/tabUltimasCompras.js","pages/resumoCliente/tabVendaEntregaFutura.js","pages/resumoCliente/index.js","pages/fornecedor/manutencao.js","pages/fornecedor/drawer.js","pages/fornecedor/index.js","pages/transportadores/drawer.js","pages/transportadores/index.js","pages/funcionario/manutencao.js","pages/funcionario/drawer.js","pages/funcionario/index.js","pages/vendedor/drawer.js","pages/vendedor/index.js","pages/tributacaoIcms/index.js","pages/tributacaoPisCofins/index.js","pages/ncm/tabDadosOrigemDestino.js","pages/ncm/manutencao.js","pages/ncm/drawer.js","pages/ncm/index.js","pages/marca/drawer.js","pages/marca/index.js","pages/marcaVeiculo/manutencao.js","pages/marcaVeiculo/drawer.js","pages/marcaVeiculo/index.js","pages/veiculo/manutencao.js","pages/veiculo/drawer.js","pages/veiculo/index.js","pages/manifestoEletronico/tabPercurso.js","components/modals/modalEncerrarMdfe/index.js","pages/manifestoEletronico/tabDadosManifesto.js","components/filtroSeguroMDF/index.js","pages/manifestoEletronico/tabSegEProdPredominante.js","components/modals/modalDocsFiscais/index.js","pages/manifestoEletronico/manutencao.js","pages/manifestoEletronico/drawer.js","components/modals/modalReenviarMdfeSefaz/index.js","components/modals/modalCancelamentoMdfe/index.js","components/modals/modalAdicionarMotorista/index.js","components/detalheMdfe/tabDetalheDocs.js","components/detalheMdfe/tabDetalheMotorista.js","components/detalheMdfe/tabDetalheVeiculo.js","components/detalheMdfe/index.js","components/modals/modalDetalhesMdfe/index.js","pages/manifestoEletronico/index.js","pages/conhecimentoTransporte/tabRemetenteCTe.js","pages/componentesFrete/manutencao.js","pages/componentesFrete/drawer.js","pages/conhecimentoTransporte/tabDadosGerais.js","pages/conhecimentoTransporte/tabFaturamentoCTe.js","components/modals/modalDocsFiscaisCTe/index.js","pages/conhecimentoTransporte/manutencao.js","pages/conhecimentoTransporte/drawer.js","components/detalheCte/tabDetalheDocsCte.js","components/detalheCte/tabDetalheAutorCte.js","components/detalheCte/index.js","components/modals/modalDetalhesCte/index.js","pages/conhecimentoTransporte/index.js","pages/grupoProdutos/index.js","pages/subGrupo/index.js","pages/produto/tabProdutoTributacao.js","pages/produto/tabListaPreco.js","pages/produto/tabGrade.js","pages/produto/tabImagem.js","pages/produto/tabLote.js","pages/produto/manutencao.js","pages/produto/drawer.js","pages/produto/index.js","pages/gradeProduto/tabItens.js","pages/gradeProduto/manutencao.js","pages/gradeProduto/drawer.js","pages/gradeProduto/index.js","pages/preco/tabItens.js","pages/preco/tabCliente.js","pages/preco/tabVendedor.js","pages/preco/manutencao.js","pages/preco/drawer.js","pages/preco/atualizarPreco.js","pages/preco/drawerPreco.js","pages/preco/index.js","pages/etiqueta/manutencao.js","pages/etiqueta/drawer.js","pages/etiqueta/drawerServidorImpressao.js","pages/etiqueta/index.js","pages/resumoProduto/index.js","pages/servico/tabServicoTributacao.js","pages/servico/manutencao.js","pages/servico/drawer.js","pages/servico/index.js","pages/relatorioEtiqueta/manutencao.js","pages/relatorioEtiqueta/drawer.js","pages/relatorioEtiqueta/tabModeloFixo.js","pages/relatorioEtiqueta/tabModeloPersonalizado.js","pages/relatorioEtiqueta/index.js","pages/contaCorrente/tabAgenciaBancaria.js","pages/contaCorrente/tabEndereco.js","pages/contaCorrente/tabGerente.js","pages/contaCorrente/manutencao.js","pages/contaCorrente/drawer.js","pages/contaCorrente/index.js","pages/contaGerencial/tabConfigConta.js","pages/contaGerencial/manutencao.js","pages/contaGerencial/drawer.js","pages/contaGerencial/index.js","pages/operacaoFiscal/tabCfop.js","pages/operacaoFiscal/drawerContaGerencial.js","pages/operacaoFiscal/manutencao.js","pages/operacaoFiscal/drawer.js","pages/operacaoFiscal/importarOperacao.js","pages/operacaoFiscal/drawerImportar.js","components/importarOperacaoFiscal/index.js","pages/operacaoFiscal/index.js","pages/operacaoDebitoCredito/manutencao.js","pages/operacaoDebitoCredito/drawer.js","pages/operacaoDebitoCredito/index.js","pages/formaPagamento/tabCondicaoPagamento.js","pages/formaPagamento/tabBoleto.js","pages/formaPagamento/manutencao.js","pages/formaPagamento/drawer.js","ValueObjects/roundValue.js","pages/formaPagamento/index.js","pages/condicaoPagamento/tabFormaPagamento.js","pages/condicaoPagamento/tabParcelas.js","pages/condicaoPagamento/manutencao.js","pages/condicaoPagamento/drawer.js","pages/condicaoPagamento/index.js","pages/serieFiscal/manutencao.js","pages/serieFiscal/drawer.js","pages/serieFiscal/index.js","pages/historico/manutencao.js","pages/historico/drawer.js","pages/historico/index.js","pages/notaFiscal/drawer.js","pages/notaFiscalDevolucao/tabItens.js","pages/notaFiscalDevolucao/tabResumo.js","pages/notaFiscalDevolucao/tabNotasFiscais.js","pages/notaFiscalDevolucao/index.js","pages/notaFiscal/drawerDevolucao.js","pages/notaFiscal/debitoCredito.js","pages/notaFiscal/drawerDebitoCredito.js","pages/notaFiscal/modalDetalheNotaFiscal.js","pages/notaFiscalEntrada/fornecedorNFE.js","components/formasPagamentoNfEntrada/index.js","pages/notaFiscalEntrada/faturamentoNFE.js","pages/notaFiscalEntrada/resumoNFE.js","components/filtroProdutoNfEntrada/index.js","pages/notaFiscalEntrada/itensNFE.js","pages/notaFiscalEntrada/transportadorNFE.js","pages/notaFiscalEntrada/notasBlocoNFE.js","pages/notaFiscalEntrada/manutencao.js","pages/notaFiscal/drawerEntrada.js","pages/notaFiscalServico/tomadorNFSE.js","components/filtroServicoNfse/index.js","pages/notaFiscalServico/servicosNFSE.js","pages/notaFiscalServico/faturamentoNFSE.js","pages/notaFiscalServico/resumoNFSE.js","pages/notaFiscalServico/manutencao.js","pages/notaFiscal/drawerServico.js","pages/notaFiscal/index.js","services/webSql.js","pages/importacaoNotaFiscalEntrada/tabNotaFiscal.js","pages/importacaoNotaFiscalEntrada/drawerProduto.js","components/modals/modalSelecionarGrade/index.js","pages/importacaoNotaFiscalEntrada/tabItens.js","pages/importacaoNotaFiscalEntrada/tabTransporte.js","pages/importacaoNotaFiscalEntrada/tabFaturamento.js","pages/importacaoNotaFiscalEntrada/index.js","pages/importarNotaFiscalEntrada/index.js","pages/importarNotaFiscalSuporte/index.js","components/buttonXmlSuporte/index.js","pages/monitoramentoNfe/index.js","pages/notaFiscalTransferencia/tabNotaFiscalEmitida.js","pages/notaFiscalTransferencia/tabNotaFiscalRecebida.js","pages/notaFiscalTransferencia/tabItemTransferencia.js","pages/notaFiscalTransferencia/tabResumoTransferencia.js","pages/notaFiscalTransferencia/manutencao.js","pages/notaFiscalTransferencia/drawer.js","pages/notaFiscalTransferencia/index.js","pages/cartaCorrecaoNotaFiscal/index.js","pages/inutilizacaoNfe/index.js","components/filtroProdutoOrc/index.js","pages/ordemCompra/manutencao.js","pages/ordemCompra/drawer.js","pages/ordemCompra/tabFaturamento.js","pages/ordemCompra/tabItens.js","pages/ordemCompra/tabResumo.js","pages/ordemCompra/manutencaoRecebimento.js","pages/ordemCompra/drawerRecebimento.js","pages/ordemCompra/index.js","pages/orcamento/index.js","pages/statusPedido/manutencao.js","pages/statusPedido/drawer.js","pages/statusPedido/index.js","pages/pedidos/modalDetalhePedido.js","pages/pedidos/drawerNF.js","pages/pedidos/drawerTransferencia.js","pages/pedidos/modalSelecionarNF.js","pages/pedidos/drawerNFSE.js","pages/pedidos/index.js","pages/condicional/tabCondicionalEntrega.js","pages/condicional/tabCondicionalRetirada.js","pages/condicional/index.js","pages/valePresente/manutencao.js","pages/valePresente/drawer.js","pages/valePresente/index.js","pages/metas/manutencao.js","pages/metas/drawer.js","pages/metas/index.js","pages/comissao/manutencao.js","pages/comissao/drawer.js","pages/comissao/index.js","pages/consultaComissao/index.js","pages/contaReceber/manutencao.js","pages/contaReceber/drawer.js","pages/contaReceber/index.js","pages/recebimentoParcela/reparcelamentoParcelas.js","pages/recebimentoParcela/drawerReparcelamento.js","pages/recebimentoParcela/listaParcelasCliente.js","pages/recebimentoParcela/index.js","pages/contaPagar/manutencao.js","pages/contaPagar/drawer.js","pages/contaPagar/index.js","pages/pagamentoParcela/pagamento.js","pages/pagamentoParcela/drawerPagamento.js","pages/pagamentoParcela/index.js","pages/lancamentoCaixa/index.js","pages/fluxoCaixa/local/fluxoCaixaDiarioAnalitico.js","pages/fluxoCaixa/local/fluxoCaixaDiarioSintetico.js","pages/fluxoCaixa/local/fluxoCaixaMensalAnalitico.js","pages/fluxoCaixa/local/fluxoCaixaMensalSintetico.js","pages/fluxoCaixa/local/fluxoCaixaAnualAnalitico.js","pages/fluxoCaixa/local/fluxoCaixaAnualSintetico.js","pages/fluxoCaixa/contaGerencial/fluxoCaixaDiarioAnalitico.js","pages/fluxoCaixa/contaGerencial/fluxoCaixaDiarioSintetico.js","pages/fluxoCaixa/index.js","pages/conciliacaoCartoes/index.js","pages/cheque/manutencao.js","pages/cheque/drawer.js","pages/cheque/index.js","pages/boleto/index.js","pages/remessa/manutencao.js","pages/remessa/drawer.js","pages/remessa/modalDetalheRemessa.js","pages/remessa/index.js","pages/retornoBancarioLista/index.js","pages/retornoBancario/index.js","pages/armazemEstoque/manutencao.js","pages/armazemEstoque/drawer.js","pages/armazemEstoque/index.js","pages/estoque/outrasFiliais.js","pages/estoque/armazem.js","pages/estoque/index.js","pages/estoqueManutencao/custosInventario.js","pages/estoqueManutencao/manutencao.js","pages/estoqueManutencao/drawer.js","pages/estoqueManutencao/index.js","pages/inventario/log.js","pages/inventario/itens.js","pages/inventario/manutencao.js","pages/inventario/drawer.js","pages/inventario/index.js","pages/matrizFilial/tabFilial.js","pages/matrizFilial/tabEndereco.js","pages/matrizFilial/tabOutrasInformacoes.js","pages/matrizFilial/tabSenhaGerencial.js","pages/matrizFilial/manutencao.js","pages/matrizFilial/drawer.js","pages/matrizFilial/index.js","pages/configuracaoDFe/index.js","pages/parametrosLocal/index.js","pages/acaoUsuario/index.js","pages/gerenciarPdv/index.js","pages/limiteCreditoCliente/tabRespostas.js","pages/limiteCreditoCliente/manutencao.js","pages/limiteCreditoCliente/drawer.js","pages/limiteCreditoCliente/index.js","pages/contador/index.js","pages/plano/planos.js","pages/plano/index.js","pages/bandeiraCartaoEmpresa/manutencao.js","pages/bandeiraCartaoEmpresa/drawer.js","pages/bandeiraCartaoEmpresa/index.js","pages/centroDistribuicao/tabEndereco.js","pages/centroDistribuicao/tabResponsavel.js","pages/centroDistribuicao/manutencao.js","pages/centroDistribuicao/drawer.js","pages/centroDistribuicao/index.js","pages/relatorios/index.js","pages/analiseInadimplencia/index.js","pages/personalizacaoRelatorios/manutencao.js","pages/personalizacaoRelatorios/drawer.js","pages/personalizacaoRelatorios/index.js","pages/relatorios/filtrosRelatorio.js","pages/usuario/tabHorariosAcessoUsuario.js","pages/usuario/tabPermissoesUsuario.js","pages/usuario/tabFiliaisUsuario.js","pages/usuario/manutencao.js","pages/usuario/drawer.js","pages/usuario/index.js","pages/grupoUsuario/tabHorariosAcessoGrupo.js","pages/grupoUsuario/tabPermissoesGrupo.js","pages/grupoUsuario/tabUsuarioGrupo.js","pages/grupoUsuario/manutencao.js","pages/grupoUsuario/drawer.js","pages/grupoUsuario/index.js","pages/efdIcmsIpi/index.js","pages/efdPisCofins/index.js","pages/notificacao/index.js","pages/parametrosEmpresa/tabPdv.js","pages/parametrosEmpresa/index.js","pages/analiseInadimplencia/analiseInadimplenciaCli.js","pages/novaEmpresa/index.js","pages/novaEmpresa/ativarUsuarioPlano.js","pages/camposPersonalizados/manutencao.js","pages/camposPersonalizados/drawer.js","pages/camposPersonalizados/index.js","pages/renovarPlano/index.js","pages/relacionamentoFornecedorProduto/manutencao.js","pages/relacionamentoFornecedorProduto/drawer.js","pages/relacionamentoFornecedorProduto/index.js","pages/restaurante/tabEndereco.js","pages/restaurante/manutencao.js","pages/restaurante/drawer.js","pages/restaurante/index.js","pages/hotel/tabEndereco.js","pages/hotel/manutencao.js","pages/hotel/drawer.js","pages/hotel/index.js","pages/testes/index.js","pages/manutencaoProduto/index.js","pages/vigenciaFiscal/manutencao.js","pages/vigenciaFiscal/drawer.js","pages/vigenciaFiscal/index.js","pages/tabelaRetencao/manutencao.js","pages/tabelaRetencao/drawer.js","pages/tabelaRetencao/index.js","pages/retencaoPessoaProduto/index.js","services/apiErp.js","pages/loginCatalogo/selecaoEmpresaCat.js","pages/loginCatalogo/esqueciSenha.js","pages/loginCatalogo/index.js","pages/InicialCatalogo/index.js","pages/catAcessosExterno/index.js","pages/catPecasExterno/consultaPecas.js","pages/catPecasExterno/drawerConsulta.js","pages/catalogosExterno/listaGrupoSubgrupo.js","pages/catalogosExterno/index.js","pages/catPecasExterno/index.js","pages/usuarioCatalogo/tabPermissoes.js","pages/usuarioCatalogo/manutencao.js","pages/usuarioCatalogo/drawer.js","pages/usuarioCatalogo/index.js","pages/cotacaoCatalogo/infosPedido.js","pages/cotacaoCatalogo/drawer.js","pages/cotacaoCatalogo/index.js","pages/cadastroCatalogo/manutencao.js","pages/cadastroCatalogo/drawer.js","pages/cadastroCatalogo/index.js","pages/downloadXml/index.js","pages/kitComposicao/manutencao.js","pages/kitComposicao/drawer.js","pages/kitComposicao/index.js","pages/balanca/index.js","components/detalheRecibo/index.js","pages/consultaRecebimento/modalDetalheRecibo.js","pages/consultaRecebimento/index.js","pages/consultaCartoesConciliados/index.js","pages/parcelaCartao/index.js","pages/cidade/manutencao.js","pages/cidade/drawer.js","pages/cidade/index.js","pages/correlacaoCfop/manutencao.js","pages/correlacaoCfop/drawer.js","pages/correlacaoCfop/index.js","pages/componentesFrete/index.js","pages/ordemServico/tabItens.js","pages/ordemServico/tabTransporte.js","pages/ordemServico/tabFaturamento.js","pages/tipoEquipamento/manutencao.js","pages/tipoEquipamento/drawer.js","pages/modeloEquipamento/manutencao.js","pages/modeloEquipamento/drawer.js","pages/ordemServico/manutencaoEquipamentoCliente.js","pages/ordemServico/drawerEquipamento.js","pages/ordemServico/modalVisualizaSenha.js","pages/ordemServico/tabEquipamento.js","pages/tipoUrgencia/manutencao.js","pages/tipoUrgencia/drawer.js","pages/ordemServico/tabDadosOS.js","pages/tipoServico/manutencao.js","pages/tipoServico/drawer.js","pages/ordemServico/manutencao.js","pages/ordemServico/drawer.js","components/modals/modalTrocaStatus/index.js","components/detalheOrdemServico/tadDetalheItens.js","components/detalheOrdemServico/tabDetalheFormaPagamento.js","components/detalheOrdemServico/tabDetalheRelacaoNota.js","components/detalheOrdemServico/tabDetalheHistorico.js","components/detalheOrdemServico/tabDetalheEquipamento.js","components/detalheOrdemServico/tabDetalhesOS.js","components/detalheOrdemServico/index.js","pages/ordemServico/modalDetalheOS.js","pages/ordemServico/index.js","pages/tipoServico/index.js","pages/modeloEquipamento/index.js","pages/tipoEquipamento/index.js","pages/tipoUrgencia/index.js","pages/CarrinhoCatalogo/index.js","pages/homeCatalogo/index.js","App.js","serviceWorker.js","index.js","services/servidorImpressora.js","services/CarrinhoDB.js","components/drawerVendedores/index.js","state/index.js","assets/i-endereco.png","services/apiPayer.js","pages/tabNotaFiscal/tabItens.js","pages/tabNotaFiscal/tabTransporte.js","pages/tabNotaFiscal/tabVeiculo.js","pages/tabNotaFiscal/tabVolumes.js","pages/tabNotaFiscal/tabValores.js","services/funcoes.js","assets/i-financeiro.png","services/funcoesIE.js","assets/logoGestor.png","components/selects/selectProduto/index.js","services/auth.js","components/enuns/formaDePagamento.js","assets/i-produto.png","assets/i-grade.png","components/comboData/index.js","pages/pedidos/tabItens.js","pages/pedidos/tabTransporte.js","pages/pedidos/tabFaturamento.js","pages/pedidos/manutencao.js","pages/pedidos/drawer.js","pages/condicional/manutencao.js","pages/condicional/drawer.js","components/modals/modalAdicionarUsuario/index.js","components/modals/modalCalcularLimite/index.js","components/modals/modalCartaCorrecaoNotaFiscal/index.js","components/modals/modalCfop/index.js","components/modals/modalContaGerencial/index.js","components/modals/modalContatoCliente/index.js","components/modals/modalDefinirHorario/index.js","components/modals/modalEmail/index.js","components/modals/modalEmpresaFilial/index.js","components/modals/modalEmpresaFilialBusca/index.js","components/modals/modalEndereco/index.js","components/modals/modalGerarComissao/index.js","components/modals/modalExibirAcaoUsuario/index.js","components/modals/modalGerarRemessa/index.js","components/modals/modalInstrucaoRemessa/index.js","components/modals/modalInutilizacaoNfe/index.js","components/modals/modalListaPreco/index.js","components/modals/modalLoteProduto/index.js","components/modals/modalManifestoDestinatario/index.js","components/modals/modalNacionalidade/index.js","components/modals/modalNcm/index.js","pages/cheque/infoCheque.js","components/modals/modalOcorrenciaCheque/index.js","components/modals/modalOcupacao/index.js","components/modals/modalOrgaoSubjacente/index.js","components/modals/modalOutroContato/index.js","components/modals/modalPessoaAutorizada/index.js","components/modals/modalPlano/index.js","components/modals/modalProdutoCondicional/index.js","components/modals/modalTelefone/index.js","components/modals/modalTributacaoIcms/index.js","components/modals/modalVeiculo/index.js","components/modals/modalCancelamentoNfe/index.js","components/modals/modalReenviarSefaz/index.js","components/modals/modalDevolucao/index.js","components/modals/modalEnvioNFeEmail/index.js","components/modals/modalImagemQr/index.js","components/modals/modalEnvioNFeWhats/index.js","components/modals/modalAjudaRejeicaoNfe/index.js","services/funcoesEtiqueta.js","components/modals/modalImprimirEtiquetas/index.js","components/modals/modalGradeOrdemCompra/index.js","components/modals/modalDetalhePedido/index.js","components/modals/modalDevolucaoCondicional/index.js","components/modals/modalDetalheOrcamento/tabItens.js","components/modals/modalDetalheOrcamento/tabFormaPagamento.js","components/modals/modalDetalheOrcamento/index.js","components/modals/modalGradeProduto/index.js","components/modals/modalSenhaLiberacao/index.js","components/modals/modalListarParcelas/index.js","components/modals/modalEditarParcelaContaReceber/index.js","components/modals/modalImportarElementosFormulario/index.js","components/modals/modalImportarElementosCamposAdicionais/index.js","components/modals/modalPersonalizacaoFormulario/index.js","components/modals/modalPersonalizacaoFormularioFiltros/index.js","components/modals/modalEditarRecebimentoParcela/index.js","components/modals/modalBandeiraCartao/index.js","components/modals/modalEditarPDV/index.js","components/modals/modalManutencaoNota/index.js","components/modals/modalContaCorrente/index.js","components/modals/modalTaxasCartaoCredito/index.js","components/modals/modalAntecipacaoClienteFornecedor/index.js","components/modals/modalSelectLote/index.js","components/modals/modalDevolucaoSubstituicaoTributaria/index.js","components/modals/modalListaProduto/index.js","components/modals/modalDetalhesOrdemCompra/index.js","components/modals/modalEstornoNfe/index.js","components/modals/modalParcelasPendentes/index.js","components/modals/modalAliquotaSimplesNacional/index.js","components/modals/modalItemInventario/index.js","components/modals/modalGrade/modalGrade.js","components/modals/modalConfirmacaoTransferencia/index.js","components/modals/modalEditarItemDevolucao/index.js","components/modals/modalEditarNotaFiscalEntrada/index.js","components/modals/modalEditarCFOP/index.js","components/modals/modalAntecipacaoDevolucao/index.js","components/modals/modalContrato/index.js","components/modals/modalCheque/index.js","components/modals/modalRetornaContaGerencial/index.js","components/modals/modalInutilizarNota/index.js","components/modals/modalProdutoGrade/index.js","components/modals/modalMapa/index.js","components/modals/modalRetencao/index.js","components/modals/modalSelecionarClienteCatalogo/index.js","components/modals/modalExibeImagem/index.js","components/modals/modalManutencaoPecasCat/index.js","components/modals/modalGradeProdutoImportacao/index.js","components/modals/modalSelecionarOrcamento/tabItensSelecionar.js","components/modals/modalSelecionarOrcamento/tabFormaPagamentoSelec.js","components/modals/modalSelecionarOrcamento/index.js","components/modals/modalCarregando/index.js","components/modals/modalGradeEstoque/index.js","components/modals/modalConsultaProtocoloMdfe/index.js","components/modals/modalEnvioBolWhats/index.js","components/modals/modalEnvioOrcamentoWhats/index.js","components/modals/modalEnvioPedidoWhats/index.js","components/modals/modalEditarBoleto/index.js","components/modals/modalSelecionaRelatorio/index.js","services/emitter.js","assets/i-info.png","ValueObjects/maskFormat.js","components/modals/modalDadosPeca/index.js","pages/notaFiscal/tabFaturamento.js","pages/notaFiscal/tabResumo.js","pages/notaFiscal/manutencao.js","assets/i-car.png","assets/i-boleto.png","pages/grupoCatalogo/index.js","pages/condicional/drawerNFExtra.js","components/inputCpfCnpj/index.js","pages/condicional/devolucao.js","pages/condicional/drawerDevolucao.js","pages/login/selecaoEmpresa.js","pages/login/esqueciSenha.js","components/selectPaginado/index.js","components/tabelaDados/index.js","assets/i-saida.png","assets/i-bill.png","components/inputQuantidade/index.js","components/modals/modalProcessoLento/index.js","pages/lancamentoCaixa/lancamentoTransferencia.js","pages/lancamentoCaixa/manutencao.js","components/inputEmail/index.js","pages/marca/manutencao.js","pages/grupoProdutos/manutencao.js","pages/subGrupo/manutencao.js","pages/vendedor/manutencao.js","components/drawerTransportadores/index.js","pages/transportadores/manutencao.js","pages/clientes/manutencao.js","pages/orcamento/tabItens.js","pages/orcamento/tabFaturamento.js","pages/orcamento/manutencaoOrc.js","pages/orcamento/drawer.js","pages/tributacaoPisCofins/tabEntrada.js","pages/tributacaoPisCofins/tabSaida.js","pages/tributacaoPisCofins/manutencao.js","pages/tributacaoPisCofins/drawer.js","pages/tributacaoIcms/manutencao.js","pages/tributacaoIcms/drawer.js","pages/etiqueta/manutencaoEtiqueta.js","pages/etiqueta/servidorImpressao.js","assets/i-telefone.png","assets/i-tranferencia.png","assets/i-dados.png","assets/i-cartao.png","components/modals/modalManutencaoPecasCat/UploadFoto.js","assets/i-contato.png","components/editorFormulario/itemFormulario.js","components/editorFormulario/tiposElementosFormulario.js","services/api.js","services/permissoes.js","assets/logoGestorWhite.png","components/editorFormulario/index.js","assets/i-formas.png","assets/i-alfinete.png","assets/i-bandeira.png","assets/i-code.png","assets/i-storage.png","assets/i-banco.png","components/header/index.js","components/linkNav/index.js","components/menu/index.js","components/breadcrumbPage/index.js","components/modulos/index.js","components/perfil/index.js","components/filtroSearch/index.js","components/filtroAtivo/index.js","components/filtroOrdenacao/index.js","components/botaoNovo/index.js","components/pesquisaOrdenacao/index.js","components/breadIncluirDados/index.js","components/pesquisaOrdenacaoData/index.js","components/filtroData/index.js","components/modals/modalDetalhesLoteNfi/index.js","components/detalheNotaFiscal/tabDetalheItens.js","components/detalheNotaFiscal/tabDetalheIFormaPagamento.js","components/detalheNotaFiscal/tabDetalheTotalizadores.js","components/detalheNotaFiscal/tabNotaReferenciada.js","components/detalheNotaFiscal/tabNotaAntecipacaoDevolucao.js","components/detalheNotaFiscal/tabDetalheRelacaoPedido.js","components/detalheNotaFiscal/tabDetalheServico.js","components/detalheNotaFiscal/tabDetalheTransporte.js","components/detalheNotaFiscal/index.js","components/detalhePedido/tabDetalheItens.js","components/detalhePedido/tabDetalheIFormaPagamento.js","components/detalhePedido/tabDetalheRelacaoNota.js","components/detalhePedido/tabDetalheHistorico.js","components/detalhePedido/index.js","components/formulario/index.js","components/selects/selectAll/index.js","components/selectIncluir/index.js","components/editorFormularioRelatorio/itemFormulario.js","components/editorFormularioRelatorio/tiposElementosFormulario.js","components/editorFormularioRelatorio/index.js","components/editorCamposPersonalizados/itemFormulario.js","components/editorCamposPersonalizados/tiposElementosFormulario.js","components/editorCamposPersonalizados/index.js","components/formularioDinamico/index.js","components/filtroProdutoVnc/index.js","services/navigation.js","components/drawerNav/index.js","components/drawerLancamentoTransferencia/index.js","components/drawerManutencaoCaixa/index.js","components/drawerPaginasAbertas/index.js","components/tabela/index.js","components/formasPagamento/index.js","components/formasPagamentoRecebimento/index.js","components/infoNotaNFe/index.js","components/infoProdutoGrade/index.js","components/precoGrade/pageGrade.js","components/pesquisaGlobal/pessoas/TabTodas.js","components/pesquisaGlobal/pessoas/TabCliente.js","components/pesquisaGlobal/pessoas/TabVendedor.js","components/pesquisaGlobal/pessoas/TabFornecedor.js","components/pesquisaGlobal/pessoas/TabFuncionario.js","components/pesquisaGlobal/produto.js","components/pesquisaGlobal/notaFiscal.js","components/pesquisaGlobal/pedidos.js","components/pesquisaGlobal/orcamento.js","components/pesquisaGlobal/condicional.js","components/pesquisaGlobal/contaReceber.js","components/pesquisaGlobal/contaPagar.js","components/pesquisaGlobal/tributacao/icms.js","components/pesquisaGlobal/tributacao/piscofins.js","components/pesquisaGlobal/index.js","components/filtroProdutoNfi/index.js","components/filtroProdutoPdi/index.js","components/filtroProdutoNtf/index.js","components/filtroProdutoOrcamento/index.js","components/editarTabela/index.js","components/inputPhone/index.js","components/lancamentoCheque/index.js","components/slideLogin/index.js","components/aberturaChamado/index.js","components/editar/index.js","components/excluir/index.js","components/duplicar/index.js","components/adicionar/index.js","components/imprimir/index.js","components/exportar/index.js","components/inutilizar/index.js","components/importarXML/index.js","components/emitirConhecimento/index.js","components/emitirNotaFiscal/index.js","components/emitirManifesto/index.js","components/emitirNotaFiscalDebito/index.js","components/cancelarEstorno/index.js","components/emitirNotaFiscalTransferencia/index.js","components/lancamentoEntrada/index.js","components/lancamentoSaida/index.js","components/lancamentoTransferencia/index.js","components/download/index.js","components/gerarEfdIcmsIpi/index.js","components/gerarEfdPisCofins/index.js","components/planos/index.js","components/botaoAbrirChamado/index.js","components/dataHora/index.js","components/drawerCliente/index.js","components/pesquisaCamposPersonalizados/index.js","components/pesquisaAvancada/index.js","components/breadcrumbAbrirChamado/index.js","components/inputCep/index.js","components/inputPercentual/index.js","components/emitirNotaFiscalEntrada/index.js","components/sincronizarCatalogo/index.js","components/filtroProdutoKit/index.js","pages/fecharPedidoCatalogo/itensPedidoCat.js","pages/fecharPedidoCatalogo/index.js","services/funcoesGestor.js","components/drawerPedidoCat/index.js","components/drawerGrupoCat/index.js","components/emitirNotaFiscalServico/index.js","components/detalheRemessa/index.js","components/inputPreco/index.js","components/selects/selectPaginacao/index.js","components/data/index.js","pages/pessoas/endereco.js","pages/pessoas/orgaoSubjacente.js","pages/pessoas/email.js","pages/pessoas/telefone.js","pages/pessoas/ocupacao.js","pages/pessoas/nacionalidade.js","pages/pessoas/outrosContatos.js","pages/pessoas/pessoasAutorizadas.js","pages/pessoas/veiculos.js","actions/index.js","assets/Contrato_NewERP.pdf","assets/i-subjacentes.png","assets/i-email.png","assets/i-ocupacoes.png","assets/i-nacionalidade.png","assets/i-pessoas-autorizadas.png","assets/i-print.png","assets/i-servidor.png","assets/i-new-pdv.png","assets/iconesModulos/vendas.png","assets/iconesModulos/compra.png","assets/iconesModulos/pdv.png","assets/iconesModulos/financeiro.png","assets/iconesModulos/contabilidade.png","assets/iconesModulos/industria.png","assets/iconesModulos/catalogoEletronico.png","assets/iconesModulos/pedidosOs.png","assets/iconesModulos/aReceber.png","assets/iconesModulos/aPagar.png","assets/iconesModulos/contaCorrente.png","assets/iconesModulos/caixaBanco.png","assets/iconesModulos/contabil.png","assets/iconesModulos/fiscal.png","assets/iconesModulos/impostos.png","assets/iconesModulos/sped.png","assets/iconesModulos/indicadores.png","assets/iconesModulos/mdfe.png","assets/iconesModulos/utilitarios.png","ValueObjects/formatNumber.js","assets/i-exporta.png","ValueObjects/formatDate.js","ValueObjects/formatFone.js","ValueObjects/formatarQuantidade.js","ValueObjects/formatarCPF.js","services/apiWeb.js","services/calculaImposto.js","assets/img-home.jpg","assets/img-home-01.jpg","assets/img-home-02.jpg","assets/img-home-03.jpg","assets/i-suporte.png","assets/i-sem-acesso.png"],"names":["reducer","state","action","type","drawerActions","CHANGE","ui","data","manutencaoActions","manutencao","listagemActions","listagem","tributacaoActions","tributacao","parametrosEmpresaActions","parametrosEmpresa","selectPaginadoActions","listaSelectPaginacao","listaTabelaDadosActions","listaTabelaDados","FORMULARIO","Login","useState","formularioExibir","setFormularioExibir","carregando","setCarregando","Form","useForm","formulario","useEffect","localStorage","removeItem","className","Content","justify","align","gutter","span","src","require","default","width","alt","Text","form","layout","name","initialValues","remember","size","onFinish","values","senha","encodeBase64","api","post","then","res","status","token","dadosUsuario","parseToken","setNomeUsuario","parseInt","getIdUsuario","UsuarioID","removerTelaAnt","setDadosUsuario","setIdUsuario","setEmailUsuario","email","login","removerLocal","catch","err","response","notification","error","message","description","finally","onFinishFailed","errorInfo","console","log","Item","rules","required","placeholder","prefix","MailOutlined","Password","UnlockFilled","valuePropName","htmlType","loading","SendOutlined","to","SmileOutlined","onClick","onAcessar","DesktopOutlined","Link","href","target","underline","PhoneOutlined","EnvironmentOutlined","RecuperarSenha","usuarioEmail","setUsuarioEmail","validaHash","setValidaHash","voltarLogin","setTimeout","window","location","atob","split","get","warn","erro","getFieldValue","usu_senha","usu_confirmaSenha","dados","novaSenha","btoa","usu_email","put","success","label","dependencies","validator","_","value","Promise","reject","Error","resolve","RecuperarSenhaGerencial","AtivarConta","senhaValida","setSenhaValida","validarSenha","trim","setFieldsValue","length","letrasMinusculas","test","letrasMaiusculas","numeros","url","substr","lastIndexOf","usu_ativo","Modal","warning","title","content","onOk","carregarUsuario","Title","level","usu_nome","onChange","disabled","ativarUsuario","AtivarNovoEmail","history","useHistory","selecionarEntidade","setSelecionarEntidade","entidadeUsuario","subTitle","extra","push","height","placement","closable","onClose","visible","grid","xs","sm","md","lg","xl","xxl","dataSource","renderItem","item","hoverable","style","textAlign","cover","logo","iconEntidade","entidade","empresa_id","id","mensagem","Meta","nomefantasia","ManutencaoEtiquetaServidor","aoSalvar","useStateValue","record","operacao","met_id","hidden","step","min","initialValue","TextArea","rows","DrawerEtiquetaServidor","dispatch","fecharDrawer","resetFields","showDrawer","ordem","closeIcon","MinusOutlined","footer","confirm","icon","ExclamationCircleOutlined","okText","cancelText","centered","CloseOutlined","submit","SaveOutlined","EtiquetaServidor","modalExcluirModelo","registro","delete","removerModelo","opcoesOrdenacao","colunas","render","met_descricao","met_colunas","color","dataIndex","key","fixed","EditFilled","editarModelo","DeleteOutlined","ImportarPessoa","arquivoBase64","setArquivoBase64","arquivo","setArquivo","setEntidade","apiArquivo","indexOf","listaEntidades","props","multiple","showUploadList","maxCount","beforeUpload","file","getBase64","base64","excluir","getEntidadeImp","setEntidadeImp","orientation","plain","Dragger","CloudUploadOutlined","t","class","viewBox","version","xmlns","d","Value","validarImportacao","Message","download","ManutencaoAntecipacao","acf_entradasaida","conteudo","cf","Option","pes_id","pes_nome","DrawerAntecipacao","dataPesquisa","AntecipacaoClienteForncedor","open","setOpen","parametrosValePresente","Date","toLocaleDateString","dataAtual","aplicarFiltrosAvancados","filtros","tipoPessoa","DataInicial","moment","format","DataFinal","outrosFiltros","_tipoPessoa","getFieldsValue","modalExcluirVale","ValePresente","acf_valepresente","FormatNumber","acf_valor","acf_nomepresenteado","valePresente","acf_id","imprimir","linkApi","eventoAoAlterar","FormatDate","Group","accordion","ghost","destroyInactivePanel","Panel","showArrow","block","ArrowUpOutlined","ArrowDownOutlined","SearchOutlined","acf_datalancamento","valorUtilizado","saldoAntecipacao","PrinterOutlined","modalImprimir","SemAcesso","Planos","ManutencaoAliquotaSimples","getMonth","getFullYear","items","asn_mes","asn_ano","buscarDados","enderecoUrl","asn_id","JSON","stringify","max","enterButton","defaultValue","formatter","parser","replace","DrawerAliquotaSimples","AliquotaSimples","possuiAliquotaMes","setPossuiAliquotaMes","retornaMesExtenso","mes","itens","toUpperCase","asn_percaliquota","DrawerGrupoProduto","openDrawerGrupo","setOpenDrawerGrupo","cadGrupo","retornoSalvar","formGrupoProduto","gru_ativo","retorno","DrawerSubGrupo","editando","openDrawerSubGp","setOpenDrawerSubGp","cadSubGp","gruId","formSubGrupo","setEditando","sgb_ativo","openDrawer","TabFreteTributario","getRegimeTributario","regimeTrib","lista","icm_id","campo","pis_id","carregarDados","icms","icm_descricao","allowClear","pis","pis_descricao","ManutencaoFrete","salvandoDados","abaSelecionada","setAbaSelecionada","filtroGrupo","setFiltroGrupo","grupoSelect","setGrupoSelect","foundGroup","setFoundGroup","gru_id","sgp_id","listaValidacoes","nome","obrigatorio","carregarSubGrupos","CodigoGrupo","dadosFrete","lpi_valorvenda","validarForm","pro_id","editarManutencao","incluirDados","msgRetorno","forEach","validacao","join","found","find","element","salvarDados","maxLength","activeKey","tab","TabPane","selecionarRegUnico","nameLabel","nameValue","onChangeFunction","IdGrupo","onClearFunction","setListaDados","funcaoIncluir","filtroExtra","DrawerFrete","formFrete","limparAoEditar","Frete","formFiltros","_ativo","produtoAtivo","filtro","excluirRegistro","frete","modalInativar","pro_codigo","pro_descricao","modalExcluir","inativarFrete","onClickEditar","pro_datainclusao","data_sincro","orm_id","pro_ativo","EditOutlined","Home","retornaConfiguracaoCertificado","lcn_validadecertificado","clickNaoExibir","dataValidade","naoMostrarNovamente","diferencaDias","setValidadeCertificado","naoExibirMensagem","getValidadeCertificado","exibirModalAviso","diasParaVencimento","formattedDate","diaOuDias","onCancel","info","exibirModalAvisoDiferencaDias","exibirModalVencimentoHoje","isObjetoDiffVazio","dif","diferencaDatas","includes","getEmpresa","empRegimeTributario","emp_regimetributario","empEnquadramentoFiscal","emp_enquadramentofiscal","markupProduto","par_markupproduto","par_diastoleranciacobrancajuro","par_percjuromesparcelavencida","par_multaparcelavencida","par_tipocalculomulta","par_acaoparcelavencida","par_diastolparcelavencida","getItem","setNavegacao","geral","setPermissoes","setStatusPlano","buscarDadosCertificado","exact","path","component","Inicial","Dashboard","Clientes","ResumoCliente","Fornecedor","Transportador","Funcionario","Vendedor","TributacaoIcms","TributacaoPisCofins","NcmSubtituicaoTributaria","Marca","MarcaVeiculo","Veiculo","ManifestoEletronico","GrupoProduto","SubGrupo","Produto","GradeProduto","Preco","Etiqueta","ResumoProduto","Servico","ConhecimentoDeTransporte","ComponentesFrete","RelatorioEtiqueta","ContaCorrente","ContaGerencial","OperacaoFiscal","OperacaoDebitoCredito","FormaPagamento","CondicaoPagamento","SerieFiscal","Historico","CorrelacaoCfop","NotaFiscal","ImportarNotaFiscalEntrada","ImportarNotaFiscalSuporte","MonitoramentoNfe","NotaFiscalTransferencia","NotaFiscalDevolucao","ImportacaoNotaFiscalEntrada","CartaCorrecaoNotaFiscal","InutilizacaoNfe","OrdemCompra","Orcamento","Pedidos","StatusPedido","Condicional","Metas","Comissao","ConsultaComissao","ContaReceber","RecebimentoParcela","ContaPagar","PagamentoParcela","LancamentoCaixa","LancamentoCaixaManutencao","LancamentoCaixaTransferencia","FluxoCaixa","ConciliacaoCartoes","Cheque","Boleto","Remessa","RetornoBancario","RetornoBancarioLista","ArmazemEstoque","Estoque","EstoqueManutencao","Inventario","MatrizFilial","ConfiguracaoDFe","GerenciarPdv","LimiteCreditoCliente","Contador","Plano","BandeiraCartaoEmpresa","CentroDistribuicao","Relatorios","AnaliseInadimplencia","PersonalizacaoRelatorios","CamposPersonalizados","FiltrosRelatorio","Usuario","GrupoUsuario","EfdIcmsIpi","EfdPisCofins","Notificacao","ParametrosEmpresa","Cidade","RelacionamentoFornecedorProduto","Restaurante","Hotel","ManutencaoProduto","VigenciaFiscal","TabelaRetencao","RetencaoPessoaProduto","ParametrosLocal","AcaoUsuario","DownloadXml","KitComposicao","Balanca","ConsultaRecebimento","ConsultaCartoesConciliados","ParcelaCartao","OrdemServico","TipoServico","TipoEquipamento","TipoUrgencia","ModeloEquipamento","setDataAtual","dataCalendar","setInterval","UserOutlined","getHours","getNomeUsuario","getNomeEmpresa","getNomeLocal","fullscreen","colors","numberFormatter","casasDecimais","toLocaleString","currency","minimumFractionDigits","maximumFractionDigits","dateFormatter","dateFormatterMes","dateFormatterAnoMes","renderCustomizedLabelPie","cx","cy","midAngle","innerRadius","outerRadius","percent","RADIAN","Math","PI","radius","x","cos","y","sin","fill","textAnchor","dominantBaseline","toFixed","RenderChartPie","resultSet","dataKey","nameKey","ResponsiveContainer","PieChart","margin","top","bottom","Pie","isAnimationActive","labelLine","legendType","map","e","index","Cell","Legend","verticalAlign","Tooltip","parseFloat","TableRenderer","columns","locale","emptyText","CartesianChart","children","ChartComponent","left","right","XAxis","tickFormatter","YAxis","v","CartesianGrid","labelFormatter","CartesianChartBar","legend","cursor","ComponentSpin","VendaLiquida","graficoSelecionado","vendaLiquidaDiaria","setVendaLiquidaDiaria","totalizadores","setTotalizadores","pessoaFisicaJuridica","setPessoaFisicaJuridica","topVendedores","setTopVendedores","vendedores","setVendedores","vendaLiquidaCidades","setVendaLiquidaCidades","vendaLiquidaClientes","setVendaLiquidaClientes","listaLocaisUsuario","setListaLocaisUsuario","carregandoTotalizadores","setCarregandoTotalizadores","carregandoVendaDiaria","setCarregandoVendaDiaria","carregandoFisicaJuridica","setCarregandoFisicaJuridica","carregandoVendedor","setCarregandoVendedor","carregandoCliente","setCarregandoCliente","carregandoCidade","setCarregandoCidade","dataInicial","dataFinal","locais","local","mesAnterior","getDate","slice","ArrowLeftOutlined","setGraficoSelecionado","onBlur","getLocal","mode","showSearch","optionFilterProp","filter","ativa","loc_ativo","Local","loc_id","loc_descricao","vlr_vendaliquida","vlr_total_venda","vlr_total_devvenda","LineChart","Line","stroke","vendedor","qtde_total","valor_total","BarChart","Bar","LabelList","position","cliente","cidade","uf","CompraLiquida","compraLiquidaDiaria","setCompraLiquidaDiaria","topFornecedores","setTopFornecedores","compraLiquidaCidades","setCompraLiquidaCidades","compraLiquidaFornecedor","setCompraLiquidaFornecedor","carregandoCompraDiaria","setCarregandoCompraDiaria","carregandoFornecedor","setCarregandoFornecedor","vlr_compraliquida","vlr_total_compra","vlr_total_devcompra","fornecedor","PosicaoEstoque","posicaoEstoqueMarca","setPosicaoEstoqueMarca","posicaoEstoqueGrupo","setPosicaoEstoqueGrupo","topGrupo","setTopGrupo","topMarca","setTopMarca","topProduto","setTopProduto","carregandoGrupo","setCarregandoGrupo","carregandoMarca","setCarregandoMarca","carregandoProduto","setCarregandoProduto","marcas","mar_id","grupos","subgrupos","qtde_saldo_final","vlr_custo_ultima_compra","vlr_custo_informado","vlr_custo_medio","grupo","marca","ReceitasDespesas","receitaDespesaDiaria","setReceitaDespesaDiaria","resultadoPorTipoConta","setResultadoPorTipoConta","resultadoCategoria","setResultadoCategoria","resultadoContaGerencial","setResultadoContaGerencial","comparativo12Meses","setComparativo12Meses","carregandoRecDespDiaria","setCarregandoRecDespDiaria","carregandoTipoConta","setCarregandoTipoConta","carregandoCategoria","setCarregandoCategoria","carregandoContaGerencial","setCarregandoContaGerencial","carregandoRecDespAnual","setCarregandoRecDespAnual","tipoConta","mesAtual","ultimosDozeMeses","vlr_resultado","vlr_total_receita","vlr_total_despesa","barSize","categoria_conta_gerencial","conta_gerencial","backgroundImage","DrawerCliente","formCliente","nameForm","formPesquisaAvancada","campoPerSelecionado","tipoFiltroPersonalizado","clienteAtivo","produtorRural","filtroPersonalizado","filtroCampoAdicional","cap_nomeelemento","filtro_0","cap_id","cap_tipoelemento","condicao","modalExcluirRegistro","cli_codigo","cli_id","modalInativarRegistro","inativarRegistro","menuTable","parametros","valor","urlRel","PathRelatorio","Parametros","Tipo","NomeRelatorio","byteCharacters","byteNumbers","Array","i","charCodeAt","byteArray","Uint8Array","Blob","fileURL","URL","createObjectURL","dadosBase64","nomeArquivo","link","document","createElement","click","fileDownloadName","alert","imprimirCliente","EyeFilled","overlay","trigger","preventDefault","MoreOutlined","funcaoRetorno","ret","expressao","funcaoLimpar","telaFiltro","cli_ativo","pej_nomefantasia","pef_apelido","pef_cpf","pej_cnpj","MaskFormat","psc_numero","pes_fisicajuridica","FormatFone","log_logradouro","pee_numero","bai_nome","cep_cep","cid_descricao","est_sigla","pef_datanascimento","pej_datafundacao","cpfCnpj","editarCliente","expandir","pef_rg","pej_inscricaoestadual","pem_email","TabEstatistica","dadosCliente","openModalDetalhePedido","setOpenModalDetalhePedido","pedidoId","setPedidoId","openModalDetalheOrcamento","setOpenModalDetalheOrcamento","openModalProdutoCondicional","setOpenModalProdutoCondicional","totalParcAtraso","setTotalParcAtraso","resumoFinanceiro","setResumoFinanceiro","dadosCondicionais","setDadosCondicionais","dadosCrediario","setDadosCrediario","dadosPedido","setDadosPedido","dadosPedidosAbertos","setDadosPedidosAbertos","limiteCredito","setLimiteCredito","dadosOrcamento","dadosCheque","setDadosCheque","valorPercentual","setValorPercentual","openCondicional","setOpenCondicional","openPedidos","setOpenPedidos","openOrcamento","setOpenOrcamento","dadosListaOrcamento","dadosCondicionaisAbertas","setDadosCondicionaisAbertas","dadosItensCondicional","setDadosItensCondicional","orcamentoId","setOrcamentoId","viewCondicional","viewPedidos","viewOrcamento","perc","vlr_ParcelasAbertas","vlr_LimiteCredito","toISOString","vlr_ParcelasEmAtraso","mediaDiasAtraso","total_Parcelas","total_Parcelas_Atraso","total_Parcelas_Adiantadas","vlr_TotalVendas","vlr_TotalVendasAVista","vlr_TotalVendasAPrazo","vlr_ParcelasAReceber","percentual_Vendas_Condicionais","qtde_Condicionais","vlr_Total_Condicionais","qtde_Condicionais_Abertos","percentual_Vendas_Pedidos","qtde_Pedidos","vlr_Total_Pedidos","qtde_Pedidos_Abertos","vnc_numero","vnc_datalancamento","vnc_prazoretorno","vnc_totalitens","abrirModalItens","vnc_valortotal","stp_descricao","stp_corstatus","ped_numero","ped_datainclusao","ped_dataprevisaoentrega","ped_totalitens","ped_id","pdi_valortotal","percentual_Vendas_Orcamentos","qtde_Orcamentos","vlr_Total_Orcamentos","qtde_Orcamentos_Abertos","qtde_Cheques","statusCheques","orc_numero","orc_datainclusao","orc_datavalidade","oit_qtdtotalitens","orc_id","oit_vlrtotalitens","exibirModalProdutoCondicional","fecharModalProdutoCondicional","dadosItens","exibirModalDetalhesPedido","fecharModalDetalhesPedido","exibirModalDetalhesOrcamento","fecharModalDetalhesOrcamento","TabUltimasCompras","dadosNotasFiscais","setDadosNotasFiscais","dadosItensNotas","setItensNotas","dadosGrupo","setDadosGrupo","listarNotasFiscais","sequencia","ordemNota","ser_serie","ntf_numero","ntf_dataemissao","ntf_totalitens","ntf_totalnota","scroll","ump_id","nfi_qtde","ump_casasdecimais","FormatarQuantidade","nfi_valoroutros","nfi_valordesconto","nfi_valorfrete","nfi_valortotalitem","gru_nome","gru_qtdetotalgrupo","gru_valortotalgrupo","expandable","expandedRowRender","listaTotSubGrupo","pagination","showHeader","sgp_nome","sgp_qtdetotalsubgrupo","sgp_valortotalsubgrupo","expandIcon","expanded","onExpand","TabVendaEntregaFutura","openCliente","setOpenCliente","setDadosCliente","telefone","setTelefone","setEmail","endereco","setEndereco","setDataIncial","setDataFinal","clienteId","setClienteId","exibirOutrosClientes","carregarDatas","periodo","periodoData","setMonth","setDate","setItem","telefones","psc_principal","emails","pem_emailprincipal","enderecos","pee_enderecoprincipal","alterarCliente","cli","cli_datainclusao","cli_dataalteracao","formatarCpf","formatarCnpj","ManutencaoFornecedor","pessoaJuridica","setPessoaJuridica","dadosEstrangeiro","setDadosEstrangeiro","regimeTributario","setRegimeTributario","setCpfCnpj","elementosFormulario","setElementosFormulario","listaCidades","setListaCidades","filtroCdd","setFiltroCdd","desabilitarCfpCnpj","setDesabilitarCpfCnpj","setMask","setProdutorRural","setFocusCpfCnpj","getElementById","focus","for_id","valores","for_datainclusao","for_dataalteracao","pes_datainclusao","pes_dataalteracao","pef_dataalteracao","pef_rgdataexpedicao","id_rguf","est_id","for_regimetributariofiscal","pef_produtorrural","listaFornecedor","pef_rguf","carregarCidades","pef_codigocidadenascimento","_cpfCnpj","HasValue","validarCpf","validarCnpj","UfEstado","validarEmail","carregaDadosCamposAdicionais","camposPersonalizados","fornecedorcampopersonalizado","elemento","f","trataSetaDadosFormularioDinamico","fcp_valor","receitaWS","consultaCNPJ","situacao","dadosForm","efr","pes_orgaopublico","abertura","dia","substring","ano","fantasia","listaEnderecos","tipoEndereco","numero","pee_ativo","retornaSoNumeros","cep","pee_complemento","complemento","bairro","logradouro","municipio","enderecoCompleto","listaTelefones","validarTelefone","tpt","listaEmails","pem_enviarboleto","pem_enviarcartacobranca","pem_enviarnfe","pem_enviarpromocao","pem_enviarvencparcela","pem_ativo","listarFornecedorCpfCnpj","replaceAll","for_ativo","validarCpfCnpjExistente","pes_fornecedor","validarCnpjExiste","validarCpfExiste","pej_emailpessoacontato","dadosform","pessoatelefones","pessoaemails","pessoasocupacoes","ocupacoes","pessoaoutrocontatos","pessoanacionalidades","listaNacionalidade","idEstrangeiro","isEstrangeiro","pes_estrangeiro","end","pej_inscuf","validarIE","for_valorfretegratis","for_codigobancoagencia","for_observacao","fornecedorcampopersonalizados","camposAdicionais","trataRetornoFormularioDinamico","forDados","fcp_id","salvarCamposAdicionais","event","valorCampo","currentTarget","validarFisicoJuridico","suffix","QuestionCircleOutlined","options","onSelectFunction","est","est_descricao","cid","cid_id","reg","checked","parametrosFiltros","DrawerFornecedor","formFornecedor","fornecedorAtivo","for_codigo","editarFornecedor","DrawerTransportador","formTransportador","Transportadores","transportadorAtivo","trn_id","retornoPesquisaAvancada","trn_ativo","ManutencaoFuncionario","estadoCivil","setEstadoCivil","supervisor","setSupervisor","controleCnhCategoria","setControleCnhCategoria","cnhCategoria","setCnhCategoria","funcionariocampopersonalizados","fun_id","cnhCategoriaPreenchida","cnh_categoria","fun_dataadmissao","fun_datademissao","cnh_dataemissao","cnh_datavencimento","listaFuncionario","String","verificarCpfValido","dado","cpf","pes_funcionario","listarFuncionarioCpf","fun_ativo","nacionalidades","estadocivil","ecv","ecv_id","fun_supervisor","sup","pessoacnh","cnh_numero","cnh_id","fun_valorcustohora","fun_valorcustomes","evc","ecv_descricao","DrawerFuncionario","formFuncionario","funcionarioAtivo","funcionario","editarFuncionario","DrawerVendedor","formVendedor","pagina","setPagina","destroyOnClose","onCloseEdit","vendedorAtivo","ven_id","ven_ativo","FormatarCPF","modalInativarConta","CloseCircleOutlined","inativar","icm_ativo","CopyOutlined","duplicar","modalDuplicarDados","pis_ativo","nat_descricao","cpc_saidacstpis","cpc_id","cpc_saidacstcofins","cpc_entradacstpispj","cpc_entradacstpispf","cpc_entradacstcofinspj","cpc_entradacstcofinspf","strong","pis_saidapercredbcpis","pis_saidapercpis","pis_entradapercredbcpispf","pis_entradapercpispf","pis_entradapercredbcpispj","pis_entradapercpispj","pis_saidapercredbccofins","pis_saidaperccofins","pis_entradapercredbccofinspf","pis_entradaperccofinspf","pis_entradapercredbccofinspj","pis_entradaperccofinspj","TabDadosOrigemDestino","formModal","openModal","setOpenModal","listaNcm","setListaNcm","dadosNcm","setDadosNcm","listTemp","mvaorigemdestinos","splice","removerRegistro","shape","PlusOutlined","mva_uforigem","mva_ufdestino","mva_percaliquotaicmsreducao","mva_percaliquotaicms","mva_percmva","mva_ajustado","mva_simplesnacional","obj","indice","editarRegistro","exibirModal","fecharModal","setDados","formularioDados","ManutencaoNcmSubtituicaoTributaria","ncm_codigo","codigoNcm","toString","ncm_ativo","listaMvaOrigemDestino","ncm_id","editarNcm","incluirNcm","codigo","verificaNCM","editItem","cip_entrada","cip","cip_id","cip_descricao","cip_saida","DrawerNcmSubtituicaoTributaria","formNCM","atualizarSiscomex","filtrosTela","ncmAtivo","popularFiltrosTela","excluirNcm","ModalCarregando","titleModalLoading","confirmContent","apiCall","successMessage","errorMessage","successCallback","errorCallback","ncm_descricao","duplicarNcm","ncm_percentual","ncm_extipi","DrawerMarca","cadMarca","setOpenDrawer","formMarca","mar_ativa","mar_nome","duplicarDados","ManutencaoMarcaVeiculo","atualizarPagina","mav_id","DrawerMarcaVeiculo","cadMarcaVeiculo","formMarcaVeiculo","mav_ativa","mav_descricao","modalInativarMarca","excluirMarca","inativarMarca","ManutencaoVeiculo","controleTipoRodado","setControleTipoRodado","controleTipoCarroceria","setControleTipoCarroceria","controleTipoProprietario","setControleTipoProprietario","controleTipoTransporte","setControleTipoTransporte","vei_id","vei_uf","undefined","validatorInput","vei_inscricaoestadual_numeroInscricaoEstadual","vei_inscricaoestadual_ufestado","textTransform","placa","vei_placa","noStyle","shouldUpdate","prevValues","currentValues","vei_tipoproprietario","marginBottom","vei_cpfcnpj","validarCpfCnpj","DrawerVeiculo","cadVeiculo","formVeiculo","setPrimeiroRender","vei_descricao","modalInativarVeiculo","excluirVeiculo","vei_ativo","inativarVeiculo","vei_modelo","vei_dataaquisicao","vei_datavenda","listaTemp","vei_inscricaoestadual","ufEstado","numeroInscricaoEstadual","editarVeiculo","TabPercursoMDF","estadoInicio","estadoFinal","listaPercurso","setListaPercurso","setPercursoOk","percurso","setPercurso","caminho","setCaminho","ufInicial","ufFinal","vizinhosUF","AC","AL","AP","AM","BA","CE","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","RJ","RN","RS","RO","RR","SC","SP","SE","TO","DF","estadoId","iconeUf","gerarCaminhos","ultimaUF","caminhos","caminhoTemp","ufUltima","toLowerCase","ufFim","x1","offsetLeft","offsetWidth","y1","offsetTop","offsetHeight","x2","y2","xControle","yControle","strokeWidth","strokeDasharray","strokeLinecap","ufAtual","ufProximo","redefinirPercurso","display","alignItems","marginRight","estadoClick","marginLeft","fontWeight","marginTop","ReloadOutlined","percursoFinal","percursoValido","listaPercursoAtt","per_sequencia","CheckOutlined","ModalEncerrarMdfe","dadosMdfe","setLimparCampo","mdf_numero","mdf_id","retornoNF","cStat","xMotivo","confirmLoading","maskClosable","mdf_chavemdfe","mdf_dataemissao","mdf_modelo","mdf_ufinicio","mdf_uffim","TabDadosManifestos","formManifesto","listaDocs","tipoEmitente","setEstadoInicio","setEstadoFinal","listaMotorista","setListaMotorista","veiculoSelecionado","setVeiculoSelecionado","reboque1Selecionado","setReboque1Selecionado","reboque2Selecionado","setReboque2Selecionado","setListaEstados","listaVeiculos","setListaVeiculos","openModalEncerrar","setOpenModalEncerrar","limparCampo","dadosModalEncerrar","setDadosModalEncerrar","reboque1","vei_id_reboque2","vei_id_reboque3","reboque2","verificarVeiculo","avisoPercurso","retornaCep","retornoCep","mca_id","mde_id","fetchData","all","estadosRes","veiculosRes","dadosDoc","cepDestino","cepOrigem","dadosOrigem","pme_cepcarrega","dadosDestino","pme_cepdescarrega","doc_modelodoc","mdf_tipoemitente","verificaCepCarregamento","verificaCepDescarrega","rod_cpfcnpjciot","onSelect","onClear","pc","vei","vei_reboque","fun","motorista","sequencia_motorista","numeroTelefone","adicionarMotorista","findIndex","mot","dadosTemp","removeMotorista","FiltroSeguroMDF","formularioSeg","listaSeguro","setListaSeguro","responsavelSeguro","adicionarSeguro","seg_responsavel","seg_cpfcnpjresponsavel","seg_nomeseguradora","seg_cnpjseguradora","seg_numeroapolice","seg_numeroaverbacao","doc","seg_sequencia","TabSegEProdPredominante","tipoCarga","unidadePeso","modalRemove","seg","removeSeguro","dadosDocs","totalValor","reduce","vlr","doc_valortotal","totalPeso","doc_pesobruto","valorTotal","pesoBruto","totalNfe","totalCte","usaDados","carregarNcm","ncm","editarSeguro","autoSize","maxRows","ModalDocsFiscais","setListaDocs","listaDocsTab1","setListaDocsTab1","selectedRowKeys1","setSelectedRowKeys1","listaDocsTab2","setListaDocsTab2","selectedRowKeys2","setSelectedRowKeys2","serie","setSerie","definirCamposTab1","definirCamposTab2","rowSelection1","newSelectedRowKeys","rowSelection2","listaSerie","Filtro","doc_chaveacesso","origem","destino","params","retornoNull","adicionarDoc","validarCampos","doc_sequencia","chavesExistentes","docsSelecionados1","chave","docsAtualizados","modelo","peso","dataEmissao","destinatario","idCidadeCarregamento","idCidadeOrigem","cidadeOrigem","ufOrigem","idCidadeDestino","idCidadeDescaregamento","cidadeDestino","ufDestino","prevListaDocs","docsSelecionados2","ser","ser_id","buscarDoc","rowKey","rowSelection","getModeloFiscal","estado","ManutencaoManifestoEletronico","pages","proximaPag","permiteValidar","setPermiteValidar","percursoOk","estadoInicioSelect","setEstadoInicioSelect","estadoFinalSelect","setEstadoFinalSelect","setTipoEmitente","setTipoCarga","setUnidadePeso","setResponsavelSeguro","validarVeiculo","vei_tiporodado","vei_id_reboque1","paginaAtual","tagPages","setProximaPag","validaForm","setTagPages","validarTrocaPg","removerDoc","formManifes","dadosNewForm","pme_descricao","pme_tipocarga","mdf_unidadepeso","mdf_infadicionalfisco","mdf_infcomplentar","produtopredominantemdfe","pme_ncm","pme_ean","modalrodoviariomdfe","rod_ciot","motoristasmdfe","seguromdfe","percursomdfe","docreferenciadomdfe","mdf_status","novaAbaNavegador","mdf_cstat","mdf_xmotivo","current","Step","DrawerManifestoEletronico","onCloseDrawer","LeftOutlined","RightOutlined","ModalReenviarMdfeSefaz","exibirModalReenviarMdfeSefaz","fecharModalReenviarMdfeSefaz","titleModal","textoBotao","_link","column","mdf_serie","valortotalmdfe","ModalCancelamentoMdfe","justificativa","_cStat","motivo","quantidadedocs","pesobruto","minLength","ModalAdicionarMotorista","dadosMotorista","TabDetalheDocs","docs","TabDetalheMotorista","TabDetalheVeiculo","veiculo","DetalheMdfe","dadosModal","setTotalNfe","setTotalCte","setValorTotal","pesoTotal","setPesoTotal","mdf_ambiente","mdf_tipomodal","formatNumber","mdf_infocomplementar","cid_descricaocarrega","cid_descricaodescarrega","veiculos","motoristas","ModalDetalhesMdfe","formParam","listaStatus","setListaStatus","openModalReenviarMdfeSefaz","setModalReenviarMdfeSefaz","openModalCancelar","setOpenModalCancelar","dadosCancelamento","setDadosCancelamento","dadosConsultaSituacao","setDadosSituacaoMdfe","openModalMotorista","setOpenModalMotorista","openModalConsultaSituacao","setOpenModalConsultaSituacao","dadosDetalhesMdfe","setDadosDetalhesMdfe","openDetalhesMdfe","setOpenDetalhesMdfe","filtrosAvancados","sql","filtroPor","retornaDescricaoStatus","imprimirDamdfe","chaveMdfe","recarregarLista","IssuesCloseOutlined","encerrarMdfe","UserAddOutlined","autorizarMdfe","CloudSyncOutlined","consultaSefaz","cancelarMdfe","menuTableOutros","linkOculto","encodeURIComponent","body","appendChild","remove","EyeOutlined","visualizarMdfe","Search","onSearch","mdf_descricao","exibirModalConsultaSit","fecharModalConsultaSit","TabRemetenteCTe","formAutores","tomador","setIdTomador","remetenteFisico","setRemetenteFisico","destinatarioFisico","setDestinatarioFisico","expedidorFisico","setExpedidorFisico","recebedorFisico","setRecebedorFisico","outrosFisico","setOutrosFisico","tomadorOutros","setTomadorOutros","carregarPagina","setCarregarPagina","enderecoRemetente","setEnderecoRemetente","enderecoDestinatario","setEnderecoDestinatario","enderecoExpedidor","setEnderecoExpedidor","enderecoRecebedor","setEnderecoRecebedor","enderecoOutros","setEnderecoOutros","tipo_prefix","buscarDadosEndereco","pee_id","tipoAutor","pie_inscricaoestadual","limparPessoa","autor","tratarTomador","cte_tomador","pes_remetente","pes_expedidor","pes_recebedor","pes_destinatario","pes_outros","carregarDadosPessoa","pessoa","retornarDadosCPFCNPJ","emailPricipal","telefonePrincipal","enderecoPrincipal","setFisico","isCPF","nota","enderecosDest","dest","razao_destinatario","ie_destinatario","cpfCnpj_destinatario","cpf_destinatario","cnpj_destinatario","est_destinatario","fantasia_destinatario","logradouro_destinatario","enderecosRem","cpfCnpj_remetente","cpf_remetente","cnpj_remetente","est_remetente","razao_remetente","fantasia_remetente","logradouro_remetente","cid_id_munfinal","spinning","tip","bordered","headStyle","borderBottom","backgroundColor","padding","border","ManutencaoComponentesFrete","setFileList","cmf_descricao","cmf_id","cmf_percentual","controls","DrawerComponentesFrete","openDrawerCompFrete","setOpenDrawerCompFrete","cadComp","TabDadosGerais","formConhecimento","tipoCTe","modalCTe","tipoServico","dadosOperacao","dadosProdutos","unidadeCTe","componentesFrete","dadosContribuinte","dadosTomador","tipoDaMedida","setValorTotalComponentes","formProduto","editandoComponente","setEditandoComponente","listaSelectProd","setListaSelectProd","dadosCfop","setDadosCfop","listaComponentes","setListaComponentes","dadosDetalhes","setDadosDetalhes","dadosProdutoImpostos","setDadosProdutoImpostos","adicionarComponente","vlr_compprincipal","valorAtual","ccf_valor","dadosComp","cmf_sequencia","comp","setComponentesFrete","cancelarEdit","popularItem","cfop","cfo_cfop","impostos","prg_ean","pro_ean","nfi_cfop","nfi_unidademedida","nfi_valorunitario","cso_id","cst_id","incluirItem","listaItens","setDadosProdutos","p","icms_id","possuiIe","cpfCnpjDestinatario","fisicaJuridica","CalcularImpostoItem","iod_uforigem","iod_ufdestino","iod_percicms","iod_percdiferimentoicms","iod_percicmsreducaobc","mva_percaaliqutoaicmsreducao","numeroItem","produto","prod","destinoOperacao","cta_siglauf","ufDest","inscEstadual","ope_id","loc_tipocontribuinte","objProd","cte_tipocte","cte_modal","cte_tiposervico","cte_indglobalizado","cic_qntcarga","adicionarItem","compPrincipal","cmf_principal","acc","vlr_totalprestacao","precision","valueKey","detalhes","buscarProduto","exibirValor","novaLista","setarValorCompPrincipal","isFirstItem","editarComponente","removerComponente","TabFaturamentoCTe","listaFormaPagamento","idTomador","setListaFormaPagamento","valorTotalComponentes","vlrIcms","retornoICMS","ret_valorIcms","valorcte","qntdCarda","qntdDocs","totalComp","ModalDocsFiscaisCTe","carregandoButton","setCarregandoButton","atualizaBotao","setAtualizaBotao","apenasTab1","setApenasTab1","apenasTab2","setApenasTab2","apenasTab3","setApenasTab3","listaDocsTab3","setListaDocsTab3","definirCamposTab3","cid_chave","cid_modelo","cid_numero","cid_peso","cid_valornf","mensagemErro","infoCidade","removerNota","cid_dataemissao","headers","novaNota","notas","liberado","verificaNotas","FileDoneOutlined","accept","overflow","borderRadius","incluirInfosDaChave","retornaSoLetras","verificaChave","ManutencaoConhecimentoTransporte","newForm","setTomador","setTipoCTe","setModalCTe","setTipoServico","setUnidadeCTe","setTipoDaMedida","setDadosTomador","setDadosContribuinte","operacaoFiscal","setOperacaoFiscal","listaValidacoesAutores","listaValidacosDadosGerais","callback","validarOperacao","autores","preencherDadosAutores","aut","cta_tiporautor","endereco_expedidor","endereco_recebedor","endereco_outros","popularDados","ntf_dhsaient","incluirNota","ntf_docfiscal","cid_id_munenvio","cid_id_muninicial","cte_prodpredominante","cte_observacao","ctenotafiscalitem","popularDadosItens","notaFiscalFaturamento","preencherDadosFaturamento","cteautores","cteinfodocumentos","preencherDadosDocumentos","ctecomponentesfrete","preencherComponentesFrete","cteinfocarga","cic_cunit","cic_unit","cic_tipomedida","dadosForma","recebimentoCartao","forma","aux","fpg_id","cpg_id","fpg_tipopagamento","FormaDePagamento","fpCheque","ctc_id","dadosModalCheque","contaCorrente","cheques","nfp_valor","pfp_valor","bce_id","rcc_nsu","fpValePresente","antecipacoes","formaPagamento","antecipacos","tipo","prefixo","cta_cnpjcpf","cta_inscricaoestadual","cta_razaosocial","cta_nomefantasia","cta_telefone","cta_Logradouro","cta_numero","cta_complemento","cta_bairro","cta_email","cid_serie","cid_valorbcicms","cid_valoricms","cid_valorbcicmsst","cid_valoricmsst","cid_valorprodutos","cid_cfoppred","cid_pinsuframa","cid_datapreventrega","ntf_id","notafiscal","tiposAutores","cep_id","infodocumentos","popularDadosContribuinte","idOperacao","popularOperacaoFiscal","op","ope_descricao","DrawerConhecimentoTransporte","TabDetalheDocsCte","listaSerieFiscal","retornaSerieFiscal","ser_numero","TabDetalheAutorCte","listaAutor","listaAutores","setListarAutores","retornaDescricaoAutor","DetalheCte","listaTipoCte","listaTomador","listaModal","listaTipoServico","setListaTipoServico","setListaSerieFiscal","listaUnidade","setListaUnidade","retornaUnidade","unid","retornaComponente","retornaDescricaoTipoCte","servico","serv","retornaDescricaoTipoServico","modal","retornaDescricaoModal","toma","retornaDescricaoTomador","descricao_muninicio","sigla_ufinicio","descricao_munenvio","sigla_ufenvio","descricao_munfinal","sigla_uffinal","infocarga","componentesfrete","ModalDetalhesCte","openDetalhesCte","setOpenDetalhesCte","listaStatusNota","setListaStatusNota","setListaTipoCte","setListaTomador","setListaModal","dadosDetalhesCte","setDadosDetalhesCte","dadosCte","setDadosCte","openModalReenviarSefaz","setModalReenviarSefaz","ntf_status","statusNota","ntf_finalidade","ntf_nroinutilizadosefaz","ntf_tiponota","showDrawerExtra","ntf_datainclusao","editarCte","autorizarCte","visualizarCte","cte_id","tip_descricao","dadosNota","exibirModalReenviarSefaz","fecharModalReenviarSefaz","sgp_ativo","editar","TabProdutoTributacao","listaCest","setListaCest","listaCstOrigem","setListaCstOrigem","hiddenFci","setHiddenFci","showGas","setShowGas","listaAnp","setlistaAnp","listaTipoProdutosSped","setListaTipoProdutoSped","checkMarcadores","checkAnp","anp","anp_codigo","buscarCest","_lista","c","cen_id","number","tpi_id","tp","anp_id","cbf_id","tpi_descricao","ori","orm_descricao","hiddenCest","cest","cet_id","cet_descricao","l","anp_descricao","cbf_codigo","cbf_descricao","TabListaPreco","listaDePrecos","setListaDePrecos","listaPrecoExclusao","removeLista","ltp_id","newData","listaExclusao","setListaPrecoExclusao","idx","ltp_principal","ltp_nome","editable","editarLista","modalConfirmaExclusao","listaPreco","setListaPreco","TabGrade","gerarEANProduto","formGrade","listaDeGrades","setListaDeGrades","listaModalidadesGrades","setModalidadesGrades","listaModalidadeItens","setListaModalidadeItens","criarGrade","setCriarGrade","openModalImgGrade","setOpenModalImgGrade","dadosImgGrade","setDadosImgGrade","detalhesModalImg","setDetalhesModalImg","itensGradeSelecionados","setItensGradeSelecionados","modalidadesAdicionadas","setModalidadesAdicionadas","previewImage","setPreviewImage","previewVisible","setPreviewVisible","inputPesquisa","React","createRef","togglePesquisa","atualizarFormGrade","listaGrades","pre_custoultimacompra","arredonda","prg_markup","prg_codigoetiqueta","reader","FileReader","readAsDataURL","onload","result","onerror","handlePreview","preview","originFileObj","calcularValorVendaPorMarkup","custo","markup","valorVenda","verificaEanExiste","ean","existe","codEan","startsWith","pro_eaninvalido","validaEanGrade","modalExcluirGrade","grade","prg_id","atualizarGrade","modalInativarGrade","excluirGrade","codigoGrade","ativarInativarItemGrade","adicionaGradeProduto","modalidade","mgp_id","mgp_descricao","itensGrade","onKeyPress","keyCode","which","elementos","querySelectorAll","setAttribute","getAttribute","AppstoreOutlined","mod","filtrado","ref","selecionados","listaSel","adicionarItensSelecionados","pesquisaGrade","itemGrade","excluirModalidade","posicaoGradeProduto","listaGrade","modalidades","primeiraModalidade","shift","totalOcorrencias","pro_markup","pre_qtde","prg_ativa","modalidadesgrade","imagens","itemModalidade","totalItensGradeAnterior","totalOcorrenciasGrade","modalidadeDistribuicao","z","gerarGrade","detalhesModal","dadosImg","descricao","atributo","img","uid","conteudoImagem","principal","abrirModalImgGrade","FileImageOutlined","SyncOutlined","cifrao","markupCalculado","recalcularMarkupDoProduto","dadosGrade","imgTemp","thumbUrl","salvarDadosImgGrade","listType","newFileList","fileList","onPreview","DownloadOutlined","TabImagem","listaImagens","setListaImagens","uploadPeca","isJpgOrPng","isLt2M","TabLote","listaLote","setListaLote","casaDecimaisUnd","sequencial","setSequencial","novaListaLote","removerLote","prl_numerolote","prl_qtde","prl_dataentrada","prl_datafabricacao","prl_datavencimento","ManutencaoProdutos","validarAoIniciar","produtoCamposPersonalizados","setProdutoCamposPersonalizados","listaUnidadeMedida","setListaUnidadeMedida","possuiCusto","setPossuiCusto","openDrawerMarca","setOpenDrawerMarca","setCasaDecimaisUnd","exibeLote","setExibeLote","markupLoc","markupEmp","unidade","un","carregaCamposPersonalizados","checkCasaDecimalUnidadeMedida","emb_ump_id","und","gradeValida","validaValorVenda","prg_valorvenda","prc_percglp","prc_percglpnacional","prc_percglpimportado","pru_quantidade","salvarDadosCombustivel","dadosProd","dadosComb","prc_percgasnatural","prc_valorpartida","prc_qtdetemperatura","salvarProdutosUnidadeMedida","dadosUnidadeMedida","pru_id","pro_kitcomposicao","produtocampopersonalizados","pre_qtdeestoqueinicial","produtoGrade","popularGrade","ProdutoCombustivel","ProdutoUnidades","popularImagens","produtolotes","incluirManutencao","retornoDrawer","imagensGrade","imgs","imagem","base64img","imagemComprimida","popularImgGrade","modalidadeGrade","atrib","popularModalidades","listaImg","possuiPrincipal","maxSize","resizeImageToMB","pcp_valor","buscarEanExistente","carregarListas","carregarParametros","proDados","pcp_id","parse","pro_controlelote","custoProduto","listaDoLote","isNaN","IdProduto","eanAnterior","EAN","floor","random","calculaDigitoVerificadorEAN","validarEan","pro_usabalanca","onBlurProEan","BarcodeOutlined","pro_produto","pro_servico","pro_materiaprima","um","ump_descricao","pro_diasvalidade","rule","showIcon","gerarEANProdutoBalanca","pro_escalanaorelevante","verificaCnpj","DrawerProduto","incluirMaisUm","formPesquisaAdc","dadosProdutoGrade","setDadosProdutoGrade","openModalEstoque","setOpenModalEstoque","aplicarFiltros","modalExcluirProduto","modalInativarProduto","inativarProduto","precoMinimo","precoMaximo","limparFiltroPesquisa","pro_usagrade","listarGrades","precoVendaMinimo","precoVendaMaximo","duplicarProduto","pro_observacao","pro_fci","TabItensGrade","setItensGrade","atualizarDadosGrade","editandoRegistro","setEditandoRegistro","itemAdd","emp_id","descricaoItem","mgp_imprimenaetiqueta","mgp_modalidade","keyItem","salvarItemGrade","selecionarTodos","itemEditar","selecionarItemGrade","dadosItem","ManutencaoGradeProduto","dadosEnviar","DrawerGradeProduto","formGradeProduto","TabItens","listaItensExcluir","setListaItensExcluir","listaEditarItens","setListaEditarItens","setEditandoItens","formItens","formImportItens","formTableItens","setFiltros","itemProduto","setItemProduto","importarProduto","setImportarProduto","editiItemId","setEditiItenId","visibleModalGrade","setVisibleModalGrade","grades","setGrades","setSubgrupos","listaPrecoSelectd","setListaPrecoSelectd","list","setItens","searchInput","useRef","productName","setProductName","codigoEan","dadosRequisicao","itenSelected","array","lpi_naocalculacomissao","onChangeProdutoFiltro","chamada","lpi_perccomissao","handleSearch","selectedKeys","clearFilters","listaFiltros","prev","onDeleteItem","listaExcluir","deleteItem","saveRow","validateFields","lpi_id","listaEditarItensTemp","onCloseModal","cancelEdition","isEditing","mergedColumns","filterDropdown","setSelectedKeys","onPressEnter","filterIcon","filtered","onFilter","onFilterDropdownVisibleChange","text","descricaoGrade","editRow","col","onCell","inputType","editing","onPressEnterProCodigo","pro","_filtro","_filtros","filtroItens","components","cell","restProps","inputNode","decimalSeparator","thousandSeparator","onValuesChange","marId","grupoId","subgrupId","listPrecoDestino","innerHTML","onChangeListaPreco","lp","mar","onChangeGrupo","gp","sgp","filtroMarca","filtroSubGp","codigoLista","importItensForPriceList","setList","onSave","TabCliente","clientes","setClientes","deleteCliente","columnWidth","TabVendedor","dadosVendedor","deleteVendedor","ManutencaoPreco","setExibeButtons","setSomenteCabecalho","exibeItens","setExibeItens","dadosSalvos","setDadosSalvos","editandoItens","listaEmpresa","ltp_somenteestelocal","ltp_ativa","ltp_consideradescontopgto","listaItemsExcluir","listaprecoitens","listaprecoclientes","listaprecovendedores","ltp_datainicial","ltp_datafinal","compararDatas","CheckCircleOutlined","incluirLista","DrawerPreco","formPreco","exibeButtons","AtualizarPreco","setListaItens","quantidadeEncontrados","setQuantidadeImportar","buscarQuantidadeProdutos","tipoAtualizacaoPreco","reajustarValor","valuesEnviar","spg_id","codigoGrupo","popularDadosSubGrupo","subGrupo","RedoOutlined","expandIconColumnIndex","DrawerAtualizarPreco","formAtualizar","loadingEdit","setLoadingEdit","itemEdit","setItemEdit","loadDada","ltp_todaempresa","getList","openAtualizarPrecos","_d","ImprimirEtiqueta","dadosAdicionais","setDadosAdicionais","dadosEmpresa","setDadosEmpresa","multiplosReg","setMultiplosReg","listaSubGrupo","setListaSubGrupo","dadosProduto","setDadosProduto","filtroProd","setFiltroProd","atualizarListaProd","setAtualizarListaProd","consultaProduto","setConsultaProduto","recordEditando","setRecordEditando","possuiGrade","setPossuiGrade","abrirModalGrade","setAbrirModalGrade","codBarras","squemaEtiquetaProduto","listaValidacao","modalExcluirItem","removerItem","popularDadosProdutonew","isNotNullOrEmpty","listaPrecosProduto","listaPadraoProduto","lstPreco","qtd","listaPrecoProduto","quantidade","observacao","limparCampos","preco","descricaograde","prepararDadosEditar","idModelo","dadosRel","quantidadeColuna","qtdTot","campos","dadosCampos","listaDadosImpressora","dadosImpressora","squema","numeroColuna","dadosAux","valorParcelado","quantidadeParcela","qtdParcelas","numeroParcelas","possuiEntrada","emp_nomefantasia","pro_codigoetiqueta","pro_referencia","retornaEtiquetaEmBranco","retornaObjeto","schema","fields","jsreports","export","report_def","jsonRelatorio","datasets","outputHandler","montarEtiqueta","listaObj","objRetorno","attrname","codigoBarras","aoFecharModalGrade","adicionarItensGrade","filtroPesq","atualizaComponente","buscarProdutoCodBarra","TableOutlined","listaPre","rec","editarItem","danger","acrescimoDesconto","DrawerImprimirEtiqueta","formImprimirEtiqueta","DrawerServidorImpressao","servidor","fecharDrawerExtra","servidorOn","setServidorOn","ServidorImpressoraOnline","online","carregarConfiguracoes","conf","impressoraEtiqueta","modeloEtiqueta","verificarServidor","setListaProdutos","openProduto","setOpenProduto","dadosUltimaVenda","setDadosUltimaVenda","dadosUltimaCompra","setDadosUltimaCompra","dadosUltimosCustos","setDadosUltimosCustos","listaNotasVenda","setListaNotasVenda","listaNotasCompra","setListaNotasCompra","listaOrdemCompra","setListaOrdemCompra","listaPedidos","setListaPedidos","listaMovimentacoes","setListaMovimentacoes","dadosEstoque","setDadosEstoque","totalEstoque","setTotalEstoque","casasDecimaisUnidadeMedida","setCasasDecimaisUnidadeMedida","totalVef","setTotalVef","totalPedido","setTotalPedido","totalCondicional","setTotalCondicional","totalInicial","SetTotalInicial","totalPrevisoes","setTotalPrevisoes","movtotalQtdeEntrada","setMovtotalQtdeEntrada","movtotalQtdeSaida","setMovtotalQtdeSaida","movtotalvalorEntrada","setMovtotalvalorEntrada","movtotalvalorsaida","setMovtotalvalorsaida","qtdeTotalVenda","setQtdeTotalVenda","valorTotalVenda","setValorTotalVenda","qtdeTotalCompra","setQtdeTotalCompra","valorTotalCompra","setValorTotalCompra","listarDados","toDate","retornaDataInicial","qtdeTipo","valorTipo","movimento","codigoMovimento","qtdeEntrada","qtdeSaida","valorEntrada","valorSaida","montarFiltro","listar","cod","fontSize","pre_dataposicao","estoqueInicial","pre_qtdevef","pre_qtdePedido","pre_qtdeCondicional","totalItem","pre_valorcustomedio","pre_custocomicms","pre_custosemicms","pre_valorcustoinformado","numeroNota","pessoaNome","codigoCondicional","nomeCliente","dataCondicional","qtdeDevol","qtde","codigoOrdemCompra","nomeFornecedor","dataOrdemCompra","numeroPedido","dataPedido","valorUnitario","statusAtual","dataPosicao","vlrUnitario","vlrTotalItem","tipoRegistro","TabServicoTributacao","csv_id","csv_descricao","ManutencaoServico","dadosServico","DrawerServico","formServico","modalExcluirServico","modalInativarServico","inativarServico","duplicarServico","ManutencaoRelatorioEtiqueta","exibeModelo","nomeEmpresa","empresa","json","definirDadosPadrao","data_sources","atributosSquema","designer","Designer","outPutReport","getElementsByClassName","delay","on","reportdef","reportDef","data_source","showToolbar","abrirMontarRelatorio","DrawerRelatorioEtiqueta","formularioEtiquetas","TabModeloFixo","TabModeloPersonalizado","openModalEmpresaFilial","setOpenModalEmpresaFilial","relatorio","setRelatorio","rels","setRels","modalRemoverModelo","menuEmpresa","exibirModalEmpresaFilial","fecharModalEmpresaFilial","listaProdutosEtiquetas","codigoEmpresa","codigoProduto","codigoEtiqueta","codigoReferencia","listaEtiqueta","dadosEtiquetaColuna","TabAgenciaBancaria","TabEndereco","ctc_cidadeagencia","ctc_ufagencia","ctc_bairroagencia","ctc_enderecoagencia","ctc_cepagencia","verificaCep","TabGerente","ManutencaoContaCorrente","listaTipoContaCorrente","setListaTipoContaCorrente","listaUsuarios","setListaUsuarios","contaBancaria","setContaBancaria","listaUsuariosPermitidos","setListaUsuariosPermitidos","listaContaGerencial","setListaContaGerencial","listaContaGerencialAgrupador","setListaContaGerencialAgrupador","podeSelecionar","limitarSaldoUsuarios","ban_id","tcc_id","idRetorno","contacorrenteusuarios","ctc_saldoinicial","ctc_operacaoconta","contacorrentelocal","ctc_unidadeatendimento","ctc_fonegerente","tc","setAbaTipoContaCorrente","tcc_descricao","ban","ban_descricao","OptGroup","ctg_descricao","conta","ctg_id","usuario","usu_id","user","adicionarUsuario","DrawerContaCorrente","formContaCorrente","formPesquisa","statusAtivo","ctc_descricao","abrirLancamentoEntradaSaida","showDrawerManutencaoCaixa","abrirLancamentoCaixa","FileSearchOutlined","ArrowRightOutlined","RetweetOutlined","showDrawerTransferencia","abrirLancamentoTransferencia","ctc_ativo","ctc_numeroagencia","ctc_numeroconta","ctc_datasaldoinicial","saldo","TabConfigConta","formContaGerencial","listaConfigContaGerencial","setListaConfigContaGerencial","openModalContaGerencial","setOpenModalContaGerencial","cgc_descricaoTipo","cgc_descricaocontadestino","exibirModalContaGerencial","fecharModalContaGerencial","ManutencaoContaGerencial","listarContaDRE","setListarContaDRE","mostrarCodigoLabel","dre_id","dre_descricao","DrawerContaGerencial","filtrarConta","pesquisa","ctg_ativo","contasGerenciais","isActive","header","ManutencaoOperacaoFiscal","listaCfop","setListaCfop","listaDestinoOperacao","setListaDestinoOperacao","listaCategoriaOperacao","setListaCategoriaOperacao","dadosEditando","setDadosEditando","cfo_descricao","opc_destinooperacao","opc_categoria","opc_ativo","CheckableTag","selecionarOpcao","adicionarCfop","sort","a","b","openDrawerContaGerencial","setOpenDrawerContaGerencial","setCodigoContaGerencial","hiddenFlagsCompra","setHiddenFlagsCompra","listaIndicadorPresenca","setListaIndicadorPresenca","listaNaturezaOperacao","setListaNaturezaOperacao","listaTipoLancamentoOperacaoFiscal","setTipoLancamentoOperacaoFiscal","listaTipoPreco","setListaTipoPreco","listaTributacaoPisCofins","setListaTributacaoPisCofins","setListaTributacaoIcms","codigoContaGerencial","carregarContasGerenciais","tip_id","operacaocfops","ope_calculacomissao","ope_alteracontagerencial","dropdownRender","menu","minRows","DrawerOperacaoFiscal","formOperacaoFiscal","ImportarOperacao","setOperacao","paginacao","selecionarItem","ope_ativo","parametrosSelecionarItens","funcao","keys","linhas","linha","DrawerOperacaoFiscalImportar","showImportar","setShowImportar","ImportarOperacaoFiscal","desabilita","setDesabilita","validarPermissaoTela","refreshKey","setRefreshKey","ImportOutlined","prevKey","ManutencaoOperacaoDebitoCredito","listaTipoImposto","setlistaTipoImposto","odc_id","taj_id","odc_cfop","taj_codigoajuste","taj_descricao","DrawerOperacaoDebitoCredito","formOperacaoDebitoCredito","odc_descricao","TabCondicaoPagamento","listaCondPag","selectedRowKeys","setSelectedRowKeys","condicaoPagamento","setCondicaoPagamento","cond","configSelecionarItem","selectedRows","setListaCondPag","listIndex","condPgto","condPag","cpg_descricao","TabBoleto","dadosBoleto","listaJuroMora","setListaJuroMora","setListaRegistro","listaFormaEmissao","setListaFormaEmissao","listaEspecieDocumento","setListaEspecieDocumento","listaTipoAceite","setListaTipoAceite","listaCodigoProtesto","setListaCodigoProtesto","listaDistribuicao","setListaDistribuicao","listaCodigoMulta","setListaCodigoMulta","listaCodigoBaixa","setListaCodigoBaixa","listaConvenio","setListaConvenio","listaCarteira","setListaCarteira","listaPadraoArq","setListaPadraoArq","contemProtesto","setContemProtesto","ehBaixa","setEhBaixa","modeloImpressao","setModeloImpressao","_banco","bancos","jurosMora","BoletoRegistro","boletoFormaEmissao","boletoEspecieDocumento","boletoTipoAceite","boletoDistribuicao","boletoCodigoMulta","boletoCodigoProtesto","boletoCodigoBaixa","boletoConvenio","boletoCarteira","padraoArquivoRemessa","modeloImpresaoBoleto","popularDadosCarteira","crt_id","carteira","setDadosBoleto","dbl_tipojuromora","juroMora","dbl_formatonossonumero","cvn_id","dbl_formaemissao","formaEmissao","dbl_especiedocumento","EspecieDocumento","dbl_aceite","tipoAceite","dbl_distribuicao","distribuicao","dbl_codigoprotesto","codigoProtesto","dbl_codigomulta","codigoMulta","dbl_codigobaixa","codigoBaixa","dbl_padraoarquivoremessa","padraoArq","popularDadosBoleto","crt_descricao","crt_carteira","popularEspecieDocumento","popularJurosMora","popularFormatoNossoNum","convenio","cvn_descricao","popularFormaEmissao","popularIdentificacaoTitulo","popularFormaDistribuicao","popularProtestoTitulo","popularMultaTitulo","popularBaixaDevTitulo","popularPadraoArquivoRemessa","ManutencaoFormaPagamento","tipoPagamento","setTipoPagamento","tipoIntegracao","setTipoIntegracao","funcaoTef","setFuncaoTef","tpFuncao","setTpIntegracao","tipoTef","setTipoTef","showItegracao","setShowItegracao","isBoleto","setIsBoleto","definirDadosBoletos","setDefinirDadosBoletos","isCarne","setIsCarne","isValePresente","setIsValePresente","mostrarCondicao","setMostarCondicao","obrigaBanco","setObrigaBanco","par_tipotef","definirDadosBoleto","resetarConstantes","fpg_emiteboleto","fpg_tipointegracao","calcPercent","fpg_descricao","fpg_ativo","fpg_imprimecarne","fpg_padraosistema","fpg_codigofuncaotef","fpg_descontopadrao","formacondicaopagamentos","definicaoboleto","dbl_id","dbl_boletosfaltantes","dbl_percjuromora","dbl_diasaplicarmulta","dbl_modeloimpressao","dbl_diasbaixa","dbl_diasparaprotestar","dbl_valorminimoprotesto","dbl_valormulta","dbl_nomearquivoremessa","dbl_extensaoarquivoremessa","dbl_nossonumeroinicial","dbl_nossonumerofinal","dbl_numeroconvenio","dbl_numerocontrato","dbl_msglocalpagamento","dbl_mensagem1","dbl_mensagem2","dbl_mensagem3","dbl_mensagemmora","tpPagamento","alterarTpPagamento","cta","tpIntegracao","alterarTpIntegracao","DrawerFormaPagamento","formFormaPagamento","roundValue","num","places","arr","sig","round","modalExcluirCondicao","fpg_principal","TabFormaPagamento","formasPagamento","charAt","listaFormasPagamento","listaForma","setListaFormasPagamento","TabParcelas","listaParcelas","alterarParcela","parcelas","posicao","pcl_numerodias","valorInteiro","percValorInt","pcl_percparcela","sobra","setParcelas","parcela","pcl_numeroparcela","dias","nDiasParcelas","somaPercentual","resto","nUltimaParcela","percParcela","dadosParcelamento","criarParcelas","ManutencaoCondicaoPagamento","exibeParcelas","setExibeParcelas","listaDadosForma","setListaDadoForma","cpg_descontopadrao","cpg_percentualjuros","mostraParcela","defineParcelas","carregarDadosCondicao","salvarManutencao","validarCondicaoCrediario","cpg_ativo","parcelamentos","formaPgto","DrawerCentroDistribuicao","formCondicaoPagamento","ManutencaoSerieFiscal","listaModelo","setListaModelo","bloquearCampos","setBloquearCampos","ocultarNumeroLoteRps","setOcultarNumeroLoteRps","editarSerie","incluirSerie","maxlength","buttonStyle","optionType","Button","DrawerSerieFiscal","formSerieFiscal","ser_ativo","modelodocfiscal","ManutencaoHistorico","his_id","DrawerHistorico","formHistorico","his_ativo","his_descricao","DrawerNotaFiscal","drawerExtra","fecharDrawerNotaFiscal","formNotaFiscal","salvarRascunho","setSalvarRascunho","setShowDrawerExtra","listaNotaDevolucao","adicionarNotas","dadosNfe","openModalEditarItemDevolucao","setOpenModalEditarItemDevolucao","openModalEditarCFOP","setOpenModalEditarCFOP","setItemEditar","listaCFOP","setListaCFOP","qtdeOriginal","nfi_id","qtdeRestante","nfi_valorseguro","valorSeguroRateio","valorFreteRateio","valorOutrosRateio","valorDescontoRateio","bcIcms","nig_valorbc","valorIcms","nig_valoricms","bcIcmsSt","nig_valorbcst","valorIcmsSt","nig_valoricmsst","bcIpi","npi_valorbcipi","valorIpi","npi_valoripi","setListaNotaDevolucao","dadosNfeDevolucao","ntf_tipooperacao","ntf_ufdest","setAdicionarNotas","ntf_chavenfe","removeNotaFiscal","pesquisarItem","excluirMarcados","nfi_ean","nig_origemmercadoria","nig_cst","nis_origemmercadoria","nis_csosn","excluirItem","defaultExpandAllRows","aoSelecionar","selecionarCFOP","exibirModalEditarItemDevolucao","salvarItemNota","cancelar","TabResumo","resumoNota","zerarFrete","setZerarFrete","resumo","valorProduto","valorFrete","valorOutros","valorSeguro","valorBaseICMS","valorICMS","valorBaseST","valorICMSST","valorBaseIPI","valorIPI","valorDesconto","valorTotalNotaFiscal","validarNumeros","setResumoNota","TabNotasFiscais","ntf_finalidadeNfe","ambiente","setAmbiente","serieFiscal","setSerieFiscal","setGerarNfSt","openModalAntecipacao","setOpenModalAntecipacao","openDevolucaoSubstituicaoTributaria","setOpenDevolucaoSubstituicaoTributaria","listaNotasReferenciadas","setListaNotasReferenciadas","listaFinalidadeNota","setListaFinalidadeNota","setTipoFormaPagamento","dadosTransp","setDadosTransp","setListaPais","setListaTipoEndereco","possuiCliente","setPossuiCliente","tipoOperacao","setTipoOperacao","filtroAdd","setFiltroAdd","valorIcmsDev","valorBaseIcmsDev","valorIcmsStDev","valorBaseIcmsStDev","dadosNotaDevSt","setDadosNotaDevSt","carregaDadosNota","notasReferenciadas","salvar","dadosNotaDev","dadosNotaReferenciada","ntf_nomedest","valortotalfrete","valortotaldesconto","valortotalnota","itensNf","remover","nig_percreducaobc","nig_percicms","nig_percreducaobcst","nig_percmvast","npi_percaliquotaipi","dadosDestinatario","listarNotasReferenciadas","count","n","notasSelecionadas","entries","notaDevolucaoFinal","gerarAntecipacao","antecipacaoEstorno","pdv_id","ntf_modalidadefrete","valorAcrescimo","notaFiscalTransportadora","preencherDadosTransportadores","ntf_consumidorfinal","ntf_infcomplementar","notaFiscalDestinatario","tratarDadosDestinatario","documentosReferenciados","notafiscalitens","notaDevolucao","numeroNotaDevolver","popularItemsValoresTotais","dadosGerais","itensPreenchidos","totalDesconto","totalFrete","totalSeguro","ope_gerarespelho","openPdfNewTab","dadosFormulario","ntf_cnpjcpfdest","ntf_iedest","ntf_idestrangeirodest","ntf_logradourodest","ntf_numeroenderecodest","ntf_bairrodest","ntf_cepdest","ntf_telefonedest","ntf_emaildest","operacaocredito","retornoNFAjusteAdjudicacao","operacaodebito","retornoNFAjusteRessarcimento","itemReferenciado","nfi_id_origem","novoItem","nfi_numeroitem","nfi_numeropedidocompra","nfi_itempedidocompra","nfi_informacaoadicional","ocp_id","nfi_ncm","nfectereferenciadaitens","trv_id","trv_marca","trv_modelo","trv_placa","trv_rntc","trv_uf","trv_observacao","nvl_especievolume","nvl_marcavolume","nvl_numeracaovolume","nvl_pesobruto","nvl_pesoliquido","nvl_qtdevolumes","buscarCep","validacoes","okType","retornoAmbiente","ntf_municipiodest","ntf_codigoibgemundest","ntf_paisdest","cli_regimetributariofiscal","setDadosNfeDevolucao","popularListaNotaDevolucao","adicionarNotasSelecionadas","selecionarNota","tpt_id","em","tel","pse_id","pej_inscricaomunicipal","listarClienteCpfCnpj","tipoEnd","pse_nome","tpe_id","tpe_descricao","salvarNotaAjuste","salvarNotaDevolucao","DrawerDevolucao","formDevolucao","showDrawerDevolucao","NotaFiscalDebitoCredito","listaPessoas","setListaPessoas","exibeDestinatario","setExibeDestinatario","verificarOperacao","odc","verificarPessoaContribuinte","pes","baseCalculo","valorDebitoCredito","emitirNfe","DrawerDebitoCredito","formDebitoCredito","ModalDetalheNotaFiscal","FornecedorNFE","dadosEndereco","setDadosFornecedor","dadosFornecedor","setOpenDrawerFornecedor","listaEndereco","setListaEndereco","listaEmail","setListaEmail","dadosTelefone","setDadosTelefone","abreModalTelefone","setAbreModalTelefone","pessoaFisica","setPessoaFisica","formularioTelefone","validarProdutorRural","enderecoP","telefoneP","psc_id","emailP","pem_id","setarCpfCnpj","Object","ope_notaprodutorrural","pes_idestrangeiro","ntf_cpfcnpj","ntf_endereco","buscarDadosFornecedor","mask","dadosSelect","funcaoBotao","campoDescricao","campoValue","campokey","placeHolder","labelFormItem","nameFormItem","mail","pse","exibirModalTelefone","fecharModalTelefone","FormasPagamentoNfEntrada","setFormaPagamento","valorJaPago","setValorJaPago","pagamentoTotal","setPagamentoTotal","multiplasFormasPagamento","setMultiplasFormasPagamento","abrirDrawerVendedores","setAbrirDrawerVendedores","formVendedores","semCondicao","setSemCondicao","ehCheque","setEhCheque","ehValePresente","setEhValePresente","getTela","dadosTela","isNota","setIsNota","openModalCartao","setOpenModalCartao","dadosParcelas","setDadosParcelas","executarParcelas","setExecutarParcelas","formaPagamentoAntecipacao","setFormaPagamentoAntecipacao","listaContaCorrente","setListaContaCorrente","exibirModalCheque","setExibirModalCheque","abreModalContaCorrente","setAbreModalContaCorrente","setContaCorrente","tipoContaCorrente","setTipoContaCorrente","desabilitaBtn","setDesabilitaBtn","editandoParcelas","setEditandoParcelas","semPagamento","setSemPagamento","fpg","valorRestantePgto","dadosFpg","listarCondicao","faturamento","some","prc_numeroparcela","dataVencimento","prc_datavencimento","valorParcela","prc_valor","fpDepositoBancario","fpTransferenciaBancaria","fpPixDinamico","fpDinheiro","fpCreditoLoja","popularParcelas","fpBoletoBancario","fpBoleto","validarJaPossuiBoleto","fpCartaoCredito","fpCartaoDebito","credito","abrirModalCheque","indexPosicao","parc","popularParcelasDebito","abrirModalCartao","antecipacao","dadosFormaPagamento","adicionarFormaPagamento","formaPgtoAntecipacao","fpProgramaFidelidade","restante","valorPago","dadosIniciais","pagamentoCartao","codigoValePresente","formasPgto","fpg_quitacaoantecipacao","valorAntecipacao","descontoPadrao","formas","validarContaCorrente","numeroCheques","incluirNovaFormaPagamento","nfp_codigovalepresente","dadosCondicoesPagamento","ultimaForma","somaParcelas","dataPagamento","numeroUltimaParcela","totalParcela","creditoDebito","removerFormaPagamento","dadosFat","fpSemPagamento","cli_vendasomenteavista","validacaoFormasPagamento","fp","codVale","saldoVale","buscarValePresente","editarFormasPagamento","salvarFormaPagamento","cancelarAlteracoesFormaPagamento","numeroParc","qtdTotParcelas","dataVenc","ajustarDataParcelas","valorParcelas","valorJaUtilizado","valorRestanteTot","valorSobra","onChangeValorParc","rowExpandable","totalPagamento","exibirDrawerVendedores","fecharDrawerVendedores","fecharModalOK","retornoModal","dadosCartao","tipoParcelamento","numeroDias","bandeira","bce_nrodiasrecebimentocredito","bce_nrodiasrecebimentodebito","rcc_parcelarecebimento","rcc_valor","nsu","rcc_previsaorecebimento","exibirModalContaCorrente","fecharModalContaCorrenteOk","onCloseModalContaCorrente","fecharModalContaCorrente","cancelaContaCorrente","FaturamentoNFE","resume","valorNota","setValorNota","controlModal","setControlModal","calcularDesconto","percentualDesconto","tot","recalcularTotal","calcularAcrescimo","percentualAcrescimo","vendedorDescMaxFinal","totalValorDescontoItens","subTotalNotaFiscal","subTotal","total","valorOutrasDespesas","calcularFaturamento","ResumoNFE","itensNota","dadosNfp","Chave","Nfp","Serie","Data","FiltroProdutoNfEntrada","dadosTabela","btnEditando","itemEditando","exibirDetalhes","setExibirDetalhes","desabilitarProd_id","setDesabilitarProd_id","buscarProdutosCodBarra","setBuscarProdutosCodBarra","abrirModalManutencaoNota","setAbrirModalManutencaoNota","abreModalLiberacao","setAbreModalLiberacao","liberacaoSenha","setLiberacaoSenha","controleLote","setControleLote","abrirModalLote","setAbrirModalLote","dadosLote","setDadosLote","setDadosItem","nfSaida","setNfSaida","setNumeroPedido","buscarDadosProdImpostos","listapreco","codigoProd","indicadorPresenca","ntf_indicadorpresenca","listaPrecoPar","informacaoAdicional","carregarSelectPaginados","produtoImposto","popularFormProduto","valorTotalItem","valorItemDesconto","desconto","percacresc","percdesc","acrescimo","ncm_porcentagem","editandoItem","popularDadosContribuintes","tipooperacao","tip_entradasaida","vnc_id","incluirItemPedidoCondicional","onChangeValorTotal","vlrUnit","calculaDesconto","calculaAcrescimo","recalcularValorUnitario","onClickBtnCancelar","recalcularValorTotal","perDesconto","ven_maximodesconto","validarDescontoMaximoVendedor","calculaTotalItemDescAcr","valorTot","valorItens","valorDesc","carregarParametrosLocal","resParams","paramsEstoque","par_avisoestoqueinsuficiente","dadosIncluido","resEstoque","estoque","valorEstoque","calcularValorEstoque","estoqueInsuficiente","novosDadosIncluido","validarItem","popularItemNota","alterarItem","verificarItemLote","seq","lote","setDadosItens","itemNota","valorSt","retornoICMSST","ret_valorIcmsSt","retornoIPI","ret_valorIpi","nfi_valoricmsst","nfi_valoripi","cfo_id","prodNota","onChangeProID","interestadual","icm","aprovado","itemCLote","nfitemlotes","salvarLotes","ItensNFE","quantidadeItens","setQuantidadeItens","dadosRet","removerItemNota","TransportadorNFE","mostrarTransportador","setMostrarTransportador","listaTransportadores","setListaTransportadores","dadosVeiculos","setDadosVeiculos","buscarDadosTransp","popularDadosVeiculo","NotasBlocoNFE","setExibirModal","valueRadio","setValueRadio","editingNfp","setEditingNfp","nfp","Valor","filtroDados","newNFP","Model","nfpValue","setDadosNfp","pre","verif","valueNumber","model","edittingNfp","NFEntrada","setListaSerie","setDadosEndereco","listaValidacoesForn","validarFornecedor","validarFaturamento","fpg_tipoavistaaprazo","gerarBoleto","notasProdutorReferenciados","nfp_modelo","nfp_serie","nfp_numeronota","nfp_dataemissao","nfp_chave","SalvarNota","preencherDadosDestinatario","preencherDadosSerieFiscal","freteUn","seguroUn","qtdTotalItens","enderecoDest","telefoneDest","pt","telefoneDestinatario","emailDest","pem","ntf_emaildestinatario","ntf_complementodest","dadosTransportador","veiculoTransp","editarNota","dadosFormaPgto","pdi_valorfrete","calcularFrete","onBlurFunction","carregandoPagina","DrawerEntrada","formEntrada","setResume","setShowNFEntrada","showNFEntrada","TomadorNFSE","setInfoEndereco","formTomador","openDrawerCliente","setOpenDrawerCliente","openModalEndereco","setOpenModalEndereco","listaCidade","setListaCidade","cepInformado","setCepInformado","codigoCliente","setCodigoCliente","uf_incidencia","mun_incidencia","cep_incidencia","buscarDadosCliente","setarEnderecos","setarTelefones","setarEmails","limparCliente","ExclamationOutlined","listaCliente","blur","campoKey","verificaCepIncidencia","exibirModalEndereco","fecharModalEndereco","FiltroServicoNFSE","infoEndereco","listaSelectServ","setListaSelectServ","dadosProdutosImpostos","setDadosProdutosImpostos","servNota","onClickBtnAdicionar","servicoImposto","popularFormServico","setarCampoQtde","codigoServ","aliquotaIssqn","aliquota","select","onChangeServID","ServicosNFSE","retornoISSQN","ret_baseIssqn","ret_aliquotaIssqn","ret_valorIssqn","pdi_numeroitem","removerServicoNota","FaturamentoNFSE","valorTotalIssqn","setValorTotalIssqn","percentualDescontoConcedido","rateios","rateioDesconto","recalcularImpostos","_numeroItem","_totalDesconto","_valorDesconto","somaTotal","nfi_valordescontorateado","calculaValorProporcional","totalIssqn","ResumoNFSE","NFServico","setDadosVendedor","listaValidacoesTom","statusPagamentoIntegraPagto","modalInstance","listaVendedor","salvarNota","cid_idPrestacaoServico","pdi_id","itempedidonota","fpCreditoEmLoja","analisaFormaPagamento","pagamentoMaquininha","dadosIntegracaoPos","cnpjEmpresa","getCnpjEmpresa","listaIdsIntegracao","tipopgto","metodopgto","submetodopgto","imp_cnpjlocal","imp_valor","imp_tipopgto","imp_metodopgto","imp_submetodopgto","imp_qtdeparcelas","integrapgto","integrapgtook","criaRegistroIntegraPagto","imp_id","pagamentoPayer","setDadosIntegra","modalAguardandoPagamento","concluirVenda","_paymentType","_paymentMethodSubType","_installments","_paymentMethod","command","paymentMethod","paymentType","paymentMethodSubType","installments","apiPayer","destroy","verificarPagamentos","cancelarPagamentoMaquina","imp_statuspgto","imp_autorizacao","statusTransaction","authorizerId","verificaTodosPagamentos","finalizarVenda","controleloterps","clr_linknfse","notafiscalformapgtos","AlterarSituacaoCondicional","ok","dadosVen","ven","alterarVendedor","setShowNFServico","showNFServico","openModalCartaCorrecao","setOpenModalCartaCorrecao","openModalExcluir","setOpenModalExcluir","openModalDevolucao","setOpenModalDevolucao","openModalEnvioNFeEmail","setOpenModalEnvioNFeEmail","openModalEnvioNFeWhats","setOpenModalEnvioNFeWhats","openModalAjudaRejeicaoNfe","setOpenModalAjudaRejeicaoNfe","openModalCancelarEstornar","setOpenModalCancelarEstornar","openModalImprimirEtiquetas","setOpenModalImprimirEtiquetas","listaTipoNota","setListaTipoNota","setDadosNota","openModalEstorno","setOpenModalEstorno","openModalDetalhes","setOpenModalDetalhes","dadosDetalhesNota","setDadosDetalhesNota","dadosNfeEtiqueta","setDadosNfeEtiqueta","exibirModalInutilizar","setExibirModalInutilizar","parametrosLocal","setParametrosLocal","verificaTelefone","abrirCancelarNota","remessa","nomeRemessa","Set","rem_nomearquivoremessa","boletos","terminouPrazoCancelamento","horas","imprimirDanfe","ntf_modelo","imprimirComprovantePagamentoIntegrado","modalExcluirNotaCompra","excluirNotaCompra","clr_protocolo","ntf_xmotivo","consutarNfseByProtocolo","autorizarNota","ser_emitentedocumento","inutilizarNota","abrirExcluirNota","FileTextOutlined","abrirCartaCorrecao","UndoOutlined","dadosNotaFiscalDevolucao","abrirDrawerDevolucao","abrirEnvioEmail","TagOutlined","abrirImprimirEtiqueta","WhatsAppOutlined","par_numerowhatsapp","abrirEnvioWhats","nomeVendedor","totalItemSemDesconto","perc_desconto","valor_item_desconto","getLabel","exportarXML","getImprimirLabel","gerarRascunho","visualizarNota","imprimirRelatorioJasper","idNotaFiscal","finalidade","tipoNota","modeloNota","visualizarDanfe","notaFiscal","imprimirRelatorioNaoFiscal","verificarTelefone","DollarOutlined","StopOutlined","tpNota","pv","condPagamento","formatarCpfCnpj","ntf_serie","ntf_cstat","clr_numerolote","clr_numerorps","clr_datarecebimento","exibirModalImprimirEtiquetas","fecharModalImprimirEtiquetas","exibirModalAjudaRejeicaoNfe","fecharModalAjudaRejeicaoNfe","dadosNotaDevolucao","exibirModalDevolucao","fecharModalDevolucao","openDrawerDevolucao","exibirModalEnvioNFeEmail","fecharModalEnvioNFeEmail","exibirModalEnvioNFeWhats","fecharModalEnvioNFeWhats","exibirModalCancelarEstornar","fecharModalCancelarEstornar","criarBanco","nomeTabela","request","indexedDB","onupgradeneeded","objectStore","createObjectStore","keyPath","autoIncrement","createIndex","unique","unico","onsuccess","close","excluirBancoDados","deleteDatabase","incluirBanco","db","transaction","add","oncomplete","buscarDadosTabela","tabela","getRequest","getAll","TabNotaFiscal","dadosRemetente","ntf_dataentrada","oc","objeto","ModalSelecionarGrade","gradesSelecionadas","setGradesSelecionadas","gradesSelecionadasBkp","selecionarGrades","setListaProduto","listaProdutosSistema","setListaProdutosSistema","produtos","setProdutos","keyProdutoCadastrado","setKeyProdutoCadastrado","setAtualizarProduto","aguardandoPopular","setAguardandoPopular","exibirModalSelecGrade","setExibirModalSelecGrade","dadosModalGrade","setDadosModalGrade","ativarMarkup","setAtivarMarkup","setParametrosEmpresa","setDadosGrade","dadosProdutoXml","xEan","cProd","xProd","xOrigem","orm","xUnidadeMedida","ump","xValorUnitarioProduto","pro_modelo","tpi","nfs_valorissqn","abrirCadastroProduto","itensSistema","salvarGrades","prodGrade","nfi_custoinformado","prodVincular","fpr_codigo","fpr_descricao","par_calculaprecovenda","seqPai","ativarDisabled","keyGrade","keyLista","buscaItem","produtoXml","buscaGrade","xQuantidade","buscaMarkup","ParMarkup","incluirProdutoItem","IdGrade","cprod","xValorTotalProduto","itemXml","qtdItens","qtdTotal","validarValorTot","produtoSis","qtdeAnterior","vincularProdutoNota","proKey","fpr_id","excluirItemSistemaXml","custoInformadoAtual","qtdeInformadoAtual","calculaSobraAoRemoverItem","buscarSobra","listaProd","itensXml","valorRetorno","valorRestante","qdteRestante","produtogrades","qtdeItem","seqAuxiliar","listaItemSis","dadosItensSistema","itemSis","parametro","produtosSistema","linhasSeleq","limparItensSistemas","ultimorProd","buscarDadosGradeModal","onRow","rowIndex","onMouseLeave","stopPropagation","onMouseEnter","registroItem","valorUni","adicionarControleQtd","unidadeMedida","salvarUnidadeMedida","validarValorItem","popularQuantidade","popularCustoInformado","buscarGradeProduto","alterarQtde","alterarMarkup","valorVendas","produtoSelecionado","itensProduto","valorItemSelecionado","it","modalEditar","onCloseModalGrade","TabTransporte","dadosTransporte","TabFaturamento","dadosFaturamento","faturamentoDados","openModalEditarNotaFiscalEntrada","setOpenModalEditarNotaFiscalEntrada","objFaturamento","setObjFaturamento","semCondicaoPagamento","setSemCondicaoPagamento","listaCondicoesPagamento","setListaCondicoesPagamento","editandoParcela","setEditandoParcela","parcelasGeradas","setParcelasGeradas","buscarCondicaoPagamento","idFormaPgto","DeveAbrirModalContaCorrente","verificarParcelas","montarParcelas","qtdeParcelas","prc_numeroDuplicata","alteraForm","valorFormasPagamento","pagamento","setFaturamentoDados","objetoConsolidado","acumulador","tipopagamento","formaPag","nomeFormaPagamento","tipoavistaaprazo","numeroFatura","vDesconto","adicionarFormaDePagamento","ajustarDatasParcelas","qtdeTotParcelas","onChangevalorParcela","DeleteOutlineOutlined","excluirFormaPagaento","valorFechou","exibirModalEditarNotaFiscalEntrada","fecharModalEditarNotaFiscalEntrada","exibir","fechar","setDadosFaturamento","setDadosRemetente","setDadosTransporte","setCorrelacaoCFOP","setIndicadorPagamento","desabilitaBotao","setDesabilitaBotao","setKeys","ListaPrecoItem","idProduto","idProdutoGrade","precoLista","editarValorVenda","validarItens","valido","nItem","notaEntrada","itensOrd","subvetor","fat","validarDados","findXml","xml","vOutrasDespesas","vValorFrete","vValorSeguro","vValorTotalNfe","vValorTotalProdutos","vBaseCalculoIcms","vValorIcms","vValorIpi","vBaseCalculoIcmsSt","vValorIcmsSt","vValorCofins","vValorPis","valorFreteForaNota","freteForaNota","valorICMSSTForaNota","icmsstForaNota","valorOutrasDespesasForaNota","outrasDespesasForaNota","dadosRem","cnpjCpf","bai_bairro","popularDadosRemetente","prc_numeroduplicata","popularDadosFaturamento","popularDadosTransportador","incluirDadosNota","validarAba","formNotaEntrada","openNota","setOpenNota","dadosCamposItens","keyItens","keyFat","keyRem","keyTransp","criarBancoWeb","vetorSeparado","nomeBanco","carregarNota","chaveNfe","xmlDistribuicaoNfe","validarNotaFiscal","ButtonXMLSuporte","invisivel","setInvisivel","cnpj","setCnpj","tipoNfe","setTipoNfe","situacaoNfe","setSituacaoNfe","FileProtectOutlined","tipoNf","nfd_tipodocumento","tipoManifesto","nfd_manifestodestinatario","importarNotaFiscalEletronica","nfd_chavenfe","retEvento","infEvento","limparFiltros","dataMaxEmissao","nsuEspecifico","situacaoNf","lcn_ambienteemissao","nsuUltimo","lcn_monitoramentonsuproducao","loc_cnpj","listarNotas","verificarNotas","chaveAcesso","nfd_numeronf","nfd_situacaonfe","nfd_nomeemissor","nfd_cpfcnpjemissor","nfd_datahoraemissao","nfd_valortotal","nfd_serienf","nfd_modelodocumento","TabNotaFiscalEmitida","TabNotaFiscalRecebida","openModalConfirmacao","setOpenModalConfirmacao","rel_nomearquivo","rel_nome","fileContents","statusTransferencia","abrirModalConfirmacao","TabItemTransferencia","dadosNfeTransferencia","validarTransporte","setQuantidade","baseICMS","nig_valorIcms","BaseST","nig_percicmsst","TabResumoTransferencia","valorBaseICMSST","dadosItensTemp","ManutencaoNotaFiscalTransferencia","limparDados","abrirDrawer","tipoPreco","setTipoPreco","filiaisEmpresa","setFiliaisEmpresa","setDadosNfeTransferencia","listaValidacoesDest","listaValidacoesTransp","proxPagina","retornoSerie","retornoTipoPreco","retornoFiliais","retornoParametrosEmp","par_69","par_custopadraonftransferencia","retornoDadosContribuinte","listaItemNotaFiscal","buscarEnderecoLocal","lcd_id","filial","rateioFrete","totalSt","empresaSelecionada","aliquotaIcms","Number","percIpi","aliquotaICMSST","ret_baseIcms","ret_baseIcmsST","ValorST","BaseIPI","ret_baseIPI","ValorIPI","valorTotalSt","_totalFrete","_valorFrete","rateioAcrescimo","_valorAcrescimo","valoracresc","setLimparDados","transporte","alterarCusto","DrawerNotaFiscalTransferencia","formNotaFiscalTransferencia","statusNfe","setStatusNfe","aba","situacaoNotaTransferencia","abrirModal","setAbrirModal","filtrarLista","textoCorrecao","IdNotaFiscal","incluirNovo","correcoes","correcao","evt_sequencia","evt_texto","evt_dataEnvio","evt_protocolo","evt_dataprocessamento","PrinterFilled","evt_chavenfe","imprimirCartaoCorrecao","listaNfRejeitada","setListaNfRejeitada","listaNfEmDititacaMais30Dias","setListaNfEmDititacaMais30Dias","listaNfEmDititacaMenos30Dias","setListaNfEmDititacaMenos30Dias","qtdeNumerosInutilizar","setQtdeNumerosInutilizar","qtdeInutilizados","setQtdeInutilizados","retornoInutilizacao","setRetornoInutilizacao","etapas","etapaAtual","setEtapaAtual","data30Dias","dadosMais30","dadosMenos30","justificativaInutilizacao","listaInutilizacao","unshift","numeroInicial","numeroFinal","quantidadeInutilizados","expandIconPosition","infInut","nNFIni","nProt","dhRecbto","FiltroProdutoOrc","listaProdutos","refProd","alterarValorTotal","ocp_quantidade","ocp_valorun","popularLista","listaDados","setItensOrdemCompra","itensOrdemCompra","retornaSequencial","adicionarItemOrdemCompra","ocp_valortotal","ManutencaoOrdemCompra","transportador","openModalGradeOrdemCompra","setOpenModalGradeOrdemCompra","regPagina","setRegPagina","ordemcompraitens","orc_valorfrete","orc_status","orc_dataconclusao","orc_prazomaximo","orc_valortotal","forn","trn","pageSize","showSizeChanger","pg","onShowSizeChange","atual","porPagina","atualizarValorTotalOC","exibirModalGradeOrdemCompra","fecharModalGradeOrdemCompra","DrawerOrdemCompra","alteraData","formOrdemCompra","valorTotalDesconto","orc_valorseguro","totalizador","setTotalizador","itensSemQuantidade","vlrTotalRecebendo","vlrTotalDesconto","somaRateio","QtdeTotalRecebendo","totalSemDesc","qtdrecebendo","maximoItens","ocp_quantidaderecebida","ocp_qtdrecebendo","ocp_frete","ocp_desconto","totalItemRecebendo","ratearDescontoFrete","qtdeTotalRecebendo","switchReceber","r","alteraQuantidadeItemRecebido","ManutencaoRecebimentoOrdemCompra","setFormasPagamento","buscarItensOrdemCompra","listaDadosContribuinte","ocp_quantidaderecebidaanteriormente","bloquear","orc_valordesconto","orc_valoracrescimo","recebimento","Itens","verifica","DrawerRecebimento","formRecebimentoOrdemCompra","setListaFornecedor","listaTransportador","setListaTransportador","dadosOrdemCompra","setDadosOrdemCompra","UploadOutlined","IdOrdemCompra","abrirDetalhesOrdemCompra","dataIni","dataFim","orc_nropedido","orc_atendente","nomeTransportador","editarOrdemCompra","openModalSelecionarOrcamento","setOpenModalSelecionarOrcamento","setListaVendedor","setDadosOrcamento","openModalEnvioOrcamentoWhats","setOpenModalEnvioOrcamentoWhats","visualizar","IdOrcamento","gerarPedido","pes_telefone","qtditem","exibirModalEnvioOrcamentoWhats","fecharModalEnvioOrcamentoWhats","ManutencaoStatusPedido","setColor","initial","setInitial","setSituacao","possuiSituacao","setPossuiSituacao","recarregarDados","hex","stp_situacao","stp_id","somenteAtivar","stp_statusanterior","verificarStatus","DrawerStatusPedido","formStatusPedido","stp_ativo","duplicarStatus","editarStatus","stp_pedidocancelado","stp_pedidoconcluido","stp_permiteeditarpedido","stp_permiteemissaonf","ModalDetalhePedido","DrawerNF","dadosNFE","DrawerTransferencia","ModalSelecionarNF","drawerNFSE","drawerNF","FileOutlined","DrawerNFSE","dadosNFSE","dadosDetalhesPedido","setDadosDetalhesPedido","formPedidos","setStatus","showDrawerNF","setShowDrawerNF","showDrawerNFSE","setShowDrawerNFSE","openModalEscolha","setOpenModalEscolha","drawerTransferencia","setDrawerTransferencia","setDadosNFSE","dadosNF","setDadosNF","exibirDrawerPedidos","setExibirDrawerPedidos","openPedidoWhats","setOpenPedidoWhats","openModalSelecionaRelatorio","setOpenModalSelecionaRelatorio","dadosDetalhesRelatorio","setDadosDetalhesRelatorio","ativo","ativoPedido","carregarPrimeiraVez","carregarStatus","modalConfirm","cancelarPedido","itensPedido","ped_datavalidade","ped_modalidadefrete","pdi_valorunitario","pdi_quantidade","pdi_valordesconto","pdi_valoracrescimo","tratarDevolvidoFaturado","temServico","soServico","every","tratarFaturamentoNFSe","tratarFaturamentoNFe","pdi_qtdedevolvido","pdi_qtdeentregue","porcentagens","somaValorPagos","novoValor","novoValorUltimaForma","loc_id_transferencia","ped_precoutilizado","relatorioPadrao","par_relatoriopedido","idPedido","grj_id","parametrosImpresao","duplicarPedido","ped_ativo","emitirNf","editarPedido","emitirTransferencia","imprimirPedido","pedidoDuplicar","ped_id_duplicar","stp","retornarSempre","ped_observacao","pes_endereco","pes_nroestabelecimento","pes_bairro","pes_cep","pes_cidade","pes_uf","pdi_qtditem","ped_valortotal","visualizarPedido","exibirDrawer","fecharDrawerPedidos","novoValorTotal","nfseEscolhida","nfEscolhida","exibirPedidoWhats","fecharPedidoWhats","TabCondicionalEntrega","situacaoVenda","imprimirCondicional","exibirDrawerDevolucao","setExibirDrawerDevolucao","openModalContatoCliente","setOpenModalContatoCliente","setPessoaId","exibirDrawerNota","setExibirDrawerNota","vnc_situacao","modalExcluirCondicional","vnc_entregaagendada","condicional","cli_nome","retornaCorSituacao","cor","vnc_levarparacliente","vnc_telefonecliente","DollarCircleOutlined","editarCondicional","vnc_enderecoentrega","alterarCondicionalEntregue","exibirModalContatoCliente","fecharModalContatoCliente","TabCondicionalRetirada","pessoaId","PessoaId","setSituacaoVenda","setProdutoFiltro","formParametrosAvancados","idVendaCondicional","ManutencaoValePresente","formParametrosValePresente","listaCompradores","listaCondPagamento","setListaCondPagamento","dadosVale","setDadosVale","parcelasPessoasAtraso","setParcelasPessoasAtraso","abreModalParcPendentes","setAbreModalParcPendentes","limparFormaPagamento","dadosVal","buscarParametrosEmp","par_contagerencialvalepresente","par_contagervalepresenteprazo","cgc_contagerencialdestino","cgc_contagerencialdestino2","onChangeFormaPagamento","compradores","inserirDadosCrediario","incluirCheque","parcelasAtraso","limiteCreditoDisp","parcelasPessoa","verificarRestricoesCredito","validarVale","lancouCheque","cpr_numeroparcelas","valesQuitados","com","onChangeCondicao","popularValor","fecharModalOk","listaContas","dadosObj","par_id","avistaAPrazo","DrawerValePresente","formValePresente","setValesQuitados","DataPesquisa","acf_codigovalepresente","ManutencaoMetas","mtv_id","listaVendedoresMetas","mtv_datainicial","mtv_datafinal","listarMsgVendedorComMeta","DrawerMetas","formManutencao","parametrosMetasVendas","modalExcluirMeta","metaVenda","mtv_valor","pageNumber","excluirMeta","mtv_totalvendido","vendido","showDrawerEdit","ManutencaoComissao","vendedorSelec","setVendedorSelec","possuiComissao","ven_perccomissaoaprazo","ven_perccomissaoavista","ven_formacalculocomissao","ven_formulacomissao","colSpan","DrawerComissao","openManutencao","setOpenManutencao","registroManutencao","setRegistroManutencao","setEditar","dadosManutencao","formConsultaComissao","detalhesDados","setDetalhesDados","painelAtivo","setPainelAtivo","setDadosModal","retornaDescTipo","comissaoVendedores","comissao","abrirModalComissao","efetuarPesquisa","valorTotalComissao","buscarDadosDetalhados","com_basecalculo","com_percentual","com_valor","mcc_valor","valorTotalNota","valorComissao","ManutencaoContaReceber","Select","openIntevaloDias","setOpenIntevaloDias","dadosContasReceber","setDadosContasReceber","openModalEditarParcela","setOpenModalEditarParcela","dadosLinhaEditar","setDadosLinhaEditar","IdContaPagarReceber","cpr_id","gerarParcelas","qtdDias","somaDasParcelas","cpr_datavencimento","valortotal","quantidadeParcelas","cpr_periodicidade","primeiroPagamento","cpr_dataprimeiropagamento","divisao","intervaloDias","cpr_intervalodias","outraData","prc_periodicidade","mostrarIntervaloDias","option","cpr_datainclusao","cpr_numerodocumento","dadosLinha","dadosContasReceberPagar","DrawerContaReceber","formContaReceber","openPesquisaAvancada","setOpenPesquisaAvancada","parametrosContasReceber","listaStatusParcela","setListaStatusParcela","modalNovaConta","statusParcela","retornarStatus","prc_status","cpr_observacao","buscarParcelas","imprimirContaReceber","modalEstornar","cpr_descricao","ReparcelamentoParcelas","dadosReparcelamento","setDadosReparcelamento","listaParcelasReparcelar","setListaParcelasReparcelar","descontoItem","setDescontoItem","paginaParcAntigas","setPaginaParcAntigas","paginaParcGeradas","setPaginaParcGeradas","nroRegistrosParcAntigas","setNroRegistrosParcAntigas","nroRegistrosParcGeradas","setNroRegistrosParcGeradas","zerarJuros","listaTotalizadores","listaTotalizadoresReparcelar","valorAReceber","valorOriginal","valorQuitado","valorJuros","valorTotalJuros","setListaTotalizadoresReparcelar","novaData","dataInclusao","parcelarGeradas","cpr_pagarreceber","cpr_contaestornadarelacionada","pessoaAutorizadaId","contaGerencial","mcc_datapagamento","prc_codigobarras","prc_estornado","prc_id","bol_id","ajustaDatasParcelas","rateioJuros","sobraJuros","juros","totalJuros","vencida","page","parcelasQuitadas","FormOutlined","onBlurValorJuros","onBlurValorParc","percentual","calcularJuros","DrawerReparcelamento","buscarParcelasPessoa","formReparcelamento","showDrawerReparcelamento","ListaParcelasCliente","setListaParcelasCliente","receberSelecionados","listaParcelasReceber","setListaParcelas","selectedRow","somarParcelas","totais","multa","valorMulta","valorPagoRecebido","setTotalSelecionados","totalReceber","parcelasReceber","valorReceber","numeroDiasVencida","concat","zerouJuros","zerouMulta","listarParcelas","reparcelarSelecionados","diasAtrazo","totalSelecionados","pesquisaCodBarras","setPesquisaCodBarras","listaParcelasCliente","setListaParcelasReceber","listaCondicaoPagamento","setListaCondicaoPagamento","openModalCheque","setOpenModalCheque","openModalBandeiraCartao","setOpenModalBandeiraCartao","setListaTotalizadores","alterarValorPago","setAlterarValorPago","nroRegistros","setNroRegistros","valoresPagamento","setValoresPagamento","tipoFormaPagExistente","fpPixEstatico","tipoParcelamentoCartao","calcularSobra","restanteReceber","troco","calcularRecebimentoParcial","valorRecebido","_perc","valorTotalSemDesconto","valorTotalMulta","sobraDesconto","formaPagamentoSelecionada","efetuarRecebimento","calcularParcelasCartao","parcelascartao","verificaIntegracaoPagamento","definicaoParcelamento","valParcela","verificarPagamentoMaquina","dataPagamentoRecebimento","valorTotalParcelas","dataFormatada","valorTotalPagoRecebido","valorFormaPgto","valorDescontoFormaPgto","valorJurosFormaPgto","valorMultaFormaPgto","parcelasCartao","removerCarcaterEspecial","dadosReceber","limparListas","zerarMulta","retornoParcela","buscarCodBarras","labelInput","placeholderInput","validaIntervaloData","filterOption","input","setaPercDesc","setaValorDesc","salvarDadosModal","funcaoSalvar","ManutencaoContaPagar","dadosContasPagar","setDadosContasPagar","DrawerContaPagar","formContaPagar","parametrosContasPagar","cpr_estornado","ManutencaoPagamento","calcularPagamentoParcial","listaParcelasPagar","exibirCondicaoPag","setExibirCondicaoPag","inputRef","setListaParcelasPagar","innerHeight","valorAPagar","restantePagar","DrawerPagamento","listaParcelasFornecedor","setListaParcelasFornecedor","formParametros","parcelasPagar","pagarSelecionados","filtrarPeriodo","valorInformado","listaContaCorrenteSaldo","setListaContaCorrenteSaldo","entradaSaida","setEntradaSaida","tipoMovimentacaoFinanceira","setTipoMovimentacaoFinanceira","listaCaixa","setListaCaixa","infoContas","setInfoContas","openModalSenha","setOpenModalSenha","dadosLancamentoEstornar","setDadosLancamentoEstornar","consuMovimentacao","setConsuMovimentacao","setInputPesquisa","listarCaixa","marcarTodos","pesquisaAvancada","contas","idContas","contasSelecionadas","marcado","contaAtiva","reprocessarCaixa","exibirEstornados","tipoMovimentacao","lc_valor_final","lc_valor_inicial","listaCaixaContas","saldoAtual","valormcc","saldoAnterior","reverse","mov","mcc_movimentoestornado","mcc_entradasaida","mcc_id","lc_complemento","order","h","contaSelecionada","selecionarConta","entrada","saida","mcc_dataHora","mcc_estornado","mcc_transferencia","mcc_complemento","mcc_numerodocumento","mcc_valorjuros","mcc_valormulta","mcc_valordesconto","retornoExclusao","aoFechar","FluxoCaixaDiarioLocalAnalitico","valoresProvisionados","tabelaFluxoCaixa","saldos","saldoInicial","setSaldoInicial","saldoFinal","setSaldoFinal","listaFinal","setListaFinal","fluxoPeriodo","fluxoApresentacao","fluxoOrganizacao","dadosFinal","FinalSaldo","totalSaldoConta","totalSaldosConta","totalSaldo","totalSaldoInicial","createFinal","codigoLocal","CodigoLocal","nomeContaCorrente","saldosConta","tratarDados","fontFamily","nomeLocal","row","fluxoLocal","datapgtovencimento","entradarealizado","saidarealizado","realizadoEntrada","realizadoSaida","provisaoreceber","provisaopagar","prevReceber","prevPagar","FluxoCaixaDiarioSintetico","nomelocal","totalentradarealizadolocal","totalsaidarealizadolocal","totalentradarealizado","totalsaidarealizado","valor_SaldoInicial","totalprovisaoreceberlocal","totalprovisaopagarlocal","totalprovisaoreceber","totalprovisaopagar","FluxoCaixaMensalAnalitico","mesExtenso","realizadoEntradaMesAno","realizadoSaidaMesAno","prevReceberMesAno","prevPagarMesAno","FluxoCaixaMensalLocalSintetico","FluxoCaixaAnualAnalitico","realizadoEntradaAno","realizadoSaidaAno","prevReceberAno","prevPagarAno","FluxoCaixaAnualLocalSintetico","setListaInicial","dadosInicial","createInicial","saldoConta","FluxoCaixaDiarioGerencialAnalitico","receitaDespesa","setReceitaDespesa","categoria","setCategoria","setContaGerencial","setDataInicial","saldoPrevisto","setSaldoPrevisto","saldoRealizado","setSaldoRealizado","setLocal","ReceitaDespesa","mapaUnico","Map","receitaDespesaCategoria","has","set","from","FiltraCategoria","codigoCategoria","FiltraConta","dadosReceita","totalProvisaoReceber","totalProvisaoPagar","totalEntradaRealizado","totalSaidaRealizado","dadosCategoria","dadosConta","ListaReceitaDespesa","createData","ListaCategoria","createCategoria","descricaoCategoria","realizadoentradaCategoria","realizadosaidaCategoria","provisaopagarCategoria","provisaoreceberCategoria","ListaConta","createConta","descricaoContaGerencial","valor_RealizadoEntrada","valor_RealizadoSaida","valor_ProvisaoPagar","valor_ProvisaoReceber","InicialSaldo","justifyContent","paddingRight","Table","TableBody","categoriasFiltradas","Fragment","contasGerenciaisFiltradas","TableRow","TableCell","paddingLeft","FluxoCaixaDiarioGerencialSintetico","sum","formFluxoCaixa","tipoFluxoCaixa","setTipoFluxoCaixa","setValoresProvisionados","setPeriodo","organizacao","setOrganizacao","formaApresentacao","setFormaApresentacao","setTabelaFluxoCaixa","setSaldos","anoAtual","montaDataMes","montaDataMesFim","montaDataAno","montaDataAnoFim","flx_periodo","flx_organizacao","flx_apresentacao","flx_dataInicial","flx_dataFinal","mesInicial","flx_mesInicial","month","mesFinal","flx_mesFinal","anoInicial","flx_anoInicial","year","anoFinal","flx_anoFinal","dataInicio","organizacaoFiltrada","picker","verificarFluxo","listaMovimentacao","setListaMovimentacao","listaContaGerencialTaxas","setListaContaGerencialTaxas","listaContaGerencialAgrupadorTaxas","setListaContaGerencialAgrupadorTaxas","listarMovimentacao","dadosMovimentacao","lancamentos","conciliacaoCartaoDetalhamento","taxas","dadosTaxaCartaoCreditoParcela","totaltaxas","totalBruto","auxTotaltaxas","auxTotalBruto","rcc_id","prevVal","elem","taxa","tax","tcp_parcelaminima","tcp_parcelamaxima","tcp_taxa","bce_taxapadraodebito","bce_taxapadraocredito","openDetalhes","calcularTaxaCartao","bnd_id","marcarDesmarcarTodos","bce_nomecredenciadora","dadosTaxa","taxaAlterar","calculaValores","forceRender","toggleDetalhes","rcc_datalancamento","listaMov","ctg_id_taxas","listaComMovimentacao","movimentacao","hcc_totalbrutodebito","hcc_taxadebito","hcc_totalliquidodebito","hcc_totalbrutocredito","hcc_taxacredito","hcc_totalliquidocredito","listDados","listaConcatenada","HistoricoConciliacaoCartao","ManutencaoCheque","DrawerCheque","formCheque","openModalOcorrencia","setOpenModalOcorrencia","statusCheque","setStatusCheque","ocorrencia","setOcorrencia","cheque","chq_numero","chq_agencia","chq_contacorrente","banco","chq_status","chq_dataemissao","chq_bompara","chq_valor","BankOutlined","UserSwitchOutlined","TeamOutlined","openModalEnvioBolWhats","setOpenModalEnvioBolWhats","openModalEditarBoleto","setOpenModalEditarBoleto","parametrosWhats","setParametrosWhats","BancoId","ClienteId","bol_dataemissao","bol_valor","novoRecord","teste","dataFiltro","imprimirBoleto","editarBoleto","Key","bol_numerodocumento","bol_datavencimento","exibirModalEnvioBolWhats","fecharModalEnvioBolWhats","exibirModalEditarBoleto","fecharModalEditarBoleto","ManutencaoRemessa","openModalInstrucaoRemessa","setOpenModalInstrucaoRemessa","openModalGerarRemessa","setOpenModalGerarRemessa","setListaBancos","parcelaEditar","setParcelaEditar","dadosSelecionados","setDadosSelecionados","setConta","idBanco","setIdBanco","selecionado","setSelecionado","selecionaCheck","setSelecionaCheck","bol_dataInicio","bol_dataFim","bol_datainicio","VerificaBanco","firstId","isp_id","bancoId","rem_qtdeboletos","rem_valortotal","bol","padraoarquivoremessa","parcelaboleto","tratarParcelasBoletos","parcelaboletos","parcelasComKey","possuiSelecionado","buscarContaCorrente","cc","InfoCircleOutlined","rem_datageracao","isp_descricao","InfoOutlined","exibirModalInstrucaoRemessa","fecharModalInstrucaoRemessa","instrucao","isArray","isp_codigo","novasParcelas","exibirModalGerarRemessa","fecharModalGerarRemessa","retornoRemessa","parts","filename","contentType","blob","navigator","userAgent","match","msSaveBlob","linkElement","clickEvent","MouseEvent","dispatchEvent","ex","DrawerRemessa","listarRemessas","formRemessa","ModalDetalheRemessa","dadosDetalhesRemessa","setDadosDetalhesRemessa","visualizarRemessa","ExcluirRemessa","rem_id","downloadArquivo","useLocation","dadosRetorno","setMovimento","setBanco","expandedRowKey","setExpandedRowKey","motivoFiltro","todosSelecionados","setTodosSelecionados","isValid","atualizarListaParcelas","pathname","parcelasFiltradas","buscarBancos","filtrarParcelasPorBanco","soma","datavencimento","valorMultaJuros","codCliente","nfp_id","tratarParcelas","FiltraMotivo","codigoMovimentoRetorno","FiltroLiquidada","FiltroErro","FiltroEntrada","DownOutlined","verificaMotivo","VerificaMovimento","bol_numero","nossoNumero","cpfCnpjCliente","par_numeroParcela","expandedRowKeys","handleExpand","descricaoMotivoOcorrencia","setDadosRetorno","convertToBase64","onRemove","removerRetorno","validarRetorno","ManutencaoArmazemEstoque","listaSetor","setListaSetor","exibirAlterarSetor","setExibirAlterarSetor","setores","setor","cancelarAlteracaoSetor","ses_descricaoItem","aes_id","ses_id","setorestoques","incluir","ses_descricao","ses_ativo","incluirSetor","alterarSetor","DrawerArmazemEstoque","formArmazemEstoque","aes_descricao","aes_ativo","aes_endereco","aes_numero","aes_bairro","OutrasFiliais","dadosEstoqueGeral","setDadosEstoqueGeral","loc_codigo","Armazem","listaArmazens","setListaArmazens","openOutras","setOpenOutras","openArmazem","setOpenArmazem","consultaGeral","setConsultaGeral","setListaMarca","listaGrupo","setListaGrupo","setIdProduto","exibeFooter","setExibeFooter","tpLista","filtroDesc","filtroTpEstoque","tpEstoque","fil","consultar","val","showDrawerOutras","HomeOutlined","HddOutlined","footerTabela","offset","CustosInventario","exibirCustos","setExibirCustos","ehFracionado","setEhFracionado","custoMedio","custoComIcms","pre_valorcustocomicms","custoSemIcms","pre_valorcustosemicms","custoUltimaCompra","pre_valorcustoultimacompra","validarProduto","pre_justificativa","produtoId","validarEstoqueProduto","onChangeProCodigo","customedio","custocomicms","custosemicms","custoultimacompra","resetarCampos","atributos","atr","qtdEstoque","ManutencaoEstoqueInventario","listaProduto","dataHora","setDataHora","hora","hours","minuto","minutes","pre_hora","carregarData","listaInventario","dataHoraPosicao","minutos","validarValoresInformados","manutencaoInventario","DrawerEstoque","formEstoqueInventario","listaSelect","setListaSelect","pesquisarInventario","codProd","inv_mes","inv_ano","Log","listaDadosLog","iic_quantidade","iic_datahora","TipoCodigoProduto","onCloseModalItem","setDadosTipoCodigo","abrirModalItem","setAbrirModalItem","dadosRegistro","setDadosRegistro","listaItem","setListaItem","verificaSituacao","ivi_estoqueanterior","ivi_estoqueatual","inv_id","situacao_id","listaDadosItens","ivi_dataposicao","ivi_customedio","ivi_custoultimacompra","ivi_id","ManutencaoInventario","permiteSalvar","produtoPorEAN","setProdutoPorEAN","dadosTipoCodigo","setDadosProdutosSelect","setListaDadosLog","setListaDadosItens","inventario","setInventario","setFiltro","exibirSenha","setExibirSenha","zerarInventario","setZerarInventario","modalProcessoLento","setModalProcessoLento","casaDecimalUnidadeMedida","setCasaDecimalUnidadeMedida","somLeituraItem","somErroLeituraItem","config","modalSalvar","tratarFechamentoModalSenha","buscarDadosInventario","inv_numero","qtdeItemAdicionar","ivi_custosemicms","ivi_custocomicms","carregarEstoqueCustosProduto","filtroGrade","filtroDataPosicao","custo_medio","custo_ultima_compra","custo_com_icms","custo_sem_icms","produtoItem","localizarItem","CodigoProduto","beepOk","beepErro","inv_dataposicao","inv_conclusao","Audio","play","inv_descricao","defineFiltro","tipoCodigo","onChangeProduto","numeroItens","qtdeEstoque","qtdeEstoqueAnterior","qtdeFalta","qtdeSobra","ConsoleSqlOutlined","BarsOutlined","DrawerInventario","formInventario","setPermiteSalvar","desabilitarBtnNovo","setDesabilitarBtnNovo","openModalInventario","setOpenModalInventario","dadosInventario","setDadosInventario","modalExcluirInventario","excluirInventario","inventarioId","pesquisar","dataIncFinal","dataIncInicial","inventarioPesq","inv_datainclusao","inv_dataconclusao","DataBaseEstoque","alteraInventario","InventarioId","AtribuirEstoqueAtual","NomeInventario","carregarProdInventario","TabFilial","imageUrl","setImageUrl","setLoading","hover","setHover","borderColor","uploadButton","LoadingOutlined","rotate","modalTitle","modalOk","addEventListener","TabOutrasInformacoes","exigibilidadeIssqn","setExigibilidadeIssqn","TabSenhaGerencial","possuiSenha","setPossuiSenha","setUsuario","loc_senhagerencial","userId","usu_admin","emailUsuario","RecuperaSenhaGerencial","ManutencaoMatrizFilial","tipoContribuinte","setTipoContribuinte","tipoAtividade","setTipoAtividade","regimeTributarioFiscal","setRegimeTributarioFiscal","desabilitaCNPJ","setDesabilitaCNPJ","loc_cpf","loc_inscricaoestadual","loc_cpfCnpj","loc_cpfresponsavel","loc_email","logradouroCidade","log_id","bai_id","loc_logo","modalAlterarMatriz","salvarFilial","matriz","loc_inscricaoestadual_ufestado","alteraMatriz","loc_centrodistribuicao","novaSenhaGerencial","senhaGerencialAtual","pesquisaInformacoesCep","loc_cep","siglaEstado","possuiCep","fetch","pesquisaCepPostmon","retornoCnpjLocal","retornoCnpj","loc_telefone","loc_nomefantasia","loc_numeroestabelecimento","loc_complemento","verificarLocal","loc_matriz","retornoFilial","contribuinte","DrawerMatrizFilial","listarFiliais","formMatrizFilial","localInativo","setLocalInativo","locAtivo","tipoUsuario","Suporte","VerificaLocal","iscricaoEstadual","loc_inscricaomunicipal","AtivarLocal","setConfig","exibeMotivoContingencia","setExibeMotivoContingencia","exibeMotivoContingenciaNFCe","setExibeMotivoContingenciaNFCe","certificadoValido","setCertificadoValido","ambienteEmissao","setAmbienteEmissao","formaEmissaoNormal","setFormaEmissaoNormal","lcn_tipoemissao","lcn_tipoemissaonfce","authorization","lcn_id","autoComplete","tipoEmissao","iconRender","EyeTwoTone","EyeInvisibleOutlined","ContainerOutlined","validaCnpj","validarCertificado","controleAvisoEstoque","setControleAvisoEstoque","rel_id","showCount","listaTipoEntidade","setListaTipoEntidade","TipoEntidade","Id","u","aco_datahora","aco_tipoacao","aco_titulo","abreModalSerie","setAbreModalSerie","dadosPdv","setDadosPdv","ativarDesativarPDV","pdv_ativado","pdv_numerocaixa","pdv_nomecomputador","pdv_registro","pdv_dataregistro","pdv_versaoatualpdv","abrirModalSerie","pdv_ipredelocal","exibirModalPDV","fecharModalPDV","TabRespostas","respostas","formResposta","listaSomaSubtrai","setListaSomaSubtrai","respostasLimiteCredito","rlc_ordem","setRespostasLimiteCredito","alterarOrdem","ordemAtual","ordemNova","itemAtual","rlc_id","rlc_percentual","rlc_resposta","rlc_somasubtrai","itemTemp","ManutencaoLimiteCreditoCliente","listaTipoResposta","setListaTipoResposta","showRespostas","setShowRespostas","tipoResposta","qlc_tiporesposta","respostalimitecreditos","qlc_id","editarLimiteCredito","incluirLimiteCredito","formLimiteCreditoCliente","qlc_ordem","listasDados","questao","qlc_questao","formContador","novoContador","setNovoContador","setBuscaContador","con_cidade","con_ibge","cid_ibge","con_uf","con_bairro","con_logradouro","con_cep","Emitter","emit","con_id","con_cpf","con_cnpjescritorio","verificarCnpjValido","recursosPlano","setRecursosPlano","alterarPlano","setAlterarPlano","listaPlanos","setListaPlanos","planoAtual","setPlanoAtual","planoSelecionado","setPlanoSelecionado","formAlterarPlano","comparaPlano","setComparaPlano","listarPlanos","planoUsuario","pla_nome","plano","pla_valor","lcp_id","validade","lcp_validadeplano","listaPlano","pla_id","pla_nivel","diferenciais","pla_diferenciais","getEmailUsuario","senhaUsuario","ShoppingOutlined","ManutencaoBandeiraCartaoEmpresa","setValue","setDadosCartao","listaTaxasCartao","setListaTaxasCartao","formularioTaxas","taxasCartaoCreditoParcelados","bce_ativo","bnd_nome","ctc_digitoverificadoragencia","ctc_digitoverificadorconta","imagemCartao","buscarDadosCNPJ","excluirTaxa","DrawerBandeiraCartaoEmpresa","formBandeiraCartao","bandeirasCartao","setBandeirasCartao","openModalTaxas","setOpenModalTaxas","dadosTaxaCartao","setDadosTaxaCartao","cartao","bce_cnpjcredenciadora","imagemBanco","abrirModalTaxas","SettingOutlined","ativarBandeiraCartaoEmpresa","exibirModalTaxasCartaoCredito","fecharModalTaxasCartaoCredito","setCidade","TabResponsavel","ManutencaoCentroDistribuicao","filialInexistente","setFilialInexistente","centroCadastrado","setCentroCadastrado","centroExiste","dadosCentroDistribuicao","loc_pontoreferencia","loc_responsavelestabelecimento","buscarDadosFilial","formCentroDistribuicao","SaveFilled","centro","setEmpresa","setNomeLocal","editarCentro","acessarCentroDistribuicao","campoFiltro","setGrupos","grj_descricao","rel_descricao","nomeRelatorio","abrirNovaJanela","BlockOutlined","Formularios","aoUpload","setAoUpload","sistema","setSistema","relatorioParametro","sis","s","rel_sistema","elementosOrdem","rpj_ordem","RelatorioParametro","nomeRel","arquivoRel","uploadRelatorio","DrawerPersonalizacao","formFormulario","listaSistema","onConfirm","tituloRelatorio","setTituloRelatorio","tipoRelatorio","setTipoRelatorio","imprimirSomenteCorpo","setimprimirSomenteCorpo","form2","relStage","setRelStage","paginaVoltar","setPaginaVoltar","ordenaParametros","relStatetemp","rpj_nomeelemento","rpj_label","TabHorariosAcessoUsuario","idDay","setIdDay","day","listHorarios","setListHorarios","carregarListaHorariosAcesso","uac_dia","uac_bloqueado","uac_id","bloqueado","horaInicial","uac_horainicial","horaFinal","uac_horafinal","transformList","onChangeHorario","desbloquear","change","usuarioacessos","mudarAcesso","DeleteFilled","deleteHorario","setDataModal","TabPermissoesUsuario","load","setLoad","listPermissoes","setListPermissoes","_listaPermissoesPagina","_listarPersmissoesMongo","dataAcess","pru_nome","pru_permissoes","permissoes","acessoModulo","permissoesApi","metodos","indexMetodo","pm","metodo","acesso","acessoPermissoesMongo","loadPermissoes","handleChangeBloqueioPagina","listaPermissoesPaginas","handleChangeBloqueioAll","TabFiliaisUsuario","setLocais","pageRows","setPageRows","validaLocId","setValidaLocId","outrosLocId","setOutrosLocId","resListar","usuarioslocais","totalItens","totalItems","resLocais","locaisSelecionados","locaisselecionados","loadLocais","others","is","justOutCheck","sel_page","o","pop","ManutencaoUsuario","setUserId","setArray","emailAtual","setEmailAtual","carregarAvatar","getPermissoesDefault","setImageComponent","caminho_avatar","mimiType","padrao","permissaoDefault","onBlurVerificaEmail","emailNovo","idUsuario","usu_sac","usu_suporte","usuarios_locais","avatar","usu_avatar","wrapperStyle","onVisibleChange","afterOpenChange","hasFeedback","DrawerUsuario","formUsuario","usu_usuariopdv","listaFiliais","mostrarFiltroAtivo","nameInputFiltroAtivo","usu_datainclusao","usuEmail","loadData","TabHorariosAcessoGrupo","TabPermissoesGrupo","TabUsuarioGrupo","usuarios","incluirRemoverUsuario","incluido","setUsuarios","ManutencaoGrupoUsuario","telaDuplicar","setTelaDuplicar","carregarUsuarios","prg_nome","prg_permissoes","controller","gru_descricao","usuariosEmpresa","usuariosGrupo","listaDefinicaoHorario","usuariogrupousuarios","formGrupoUsuario","modalInativarGrupo","dadosLocais","setDadosLocais","listaApuracaoICMS","setListaApuracaoICMS","listaCodigoGuiaRecolhimento","setListaCodigoGuiaRecolhimento","listaCodigoReceitaDifal","setListaCodigoReceitaDifal","listaFinalidadeArquivo","setListaFinalidadeArquivo","listaPerfilContribuinte","setListaPerfilContribuinte","listaMotivoInventario","setListaMotivoInventario","listaCustoInventario","setListaCustoInventario","dataInventirioInformada","setDataInventirioInformada","setMonthDates","startOf","endOf","gerarEfdIcmsIpi","dataInventario","perfil","apurIcms","codigoRecDifal","codigoRecolhimento","codigoReceita","gerarBlocoK","gerarC170","gerar0150","gerarC176","dispensaNFCe","responseType","contentDisposition","filenameMatch","utfFilenameMatch","decodeURIComponent","responseData","changedValues","allValues","filterSort","optionA","optionB","localeCompare","optionLabelProp","maskFormat","gerarEfdPisCofins","modalExcluirNotificacao","excluirNotificacao","ordenar","not_datahora","not_descricao","whiteSpace","TabPdv","impressaoComprovantes","setCusto","tipoMarkup","setTipoMarkup","setImpressaoComprovantes","enquadramentoFiscal","setEnquadramentoFiscal","codigoBarrasBalanca","setCodigoBarrasBalanca","numeroDigitosBalanca","setNumeroDigitosBalanca","modeloBalanca","setModeloBalanca","tipoCalculo","setTipoCalculo","controleInadimplencia","setControleInadimplencia","back","retornoEmpresa","emp_razaosocial","emp_logo","dadosParametrosEmpresa","par_contagerencialsangriapdv","par_contagerencialsuprimentopdv","par_ctg_recebimentoparcela","par_viasimpressaonfce","par_impressaodavls","par_impressaonfce","par_impressaocondicional","par_impressaorecbtoparcela","par_impressaocarne","par_viasimpressaocarne","par_usanotapromissoria","AnaliseInadimplenciaCliente","listaIndice","setListaIndice","listaLocais","setListaLocais","logoEmpresa","setLogoEmpresa","listaDadosInadimplencia","setListaDadosInadimplencia","tiposPagamento","setTiposPagamento","indiceSelecionado","setIndiceSelecionado","setImprimir","mostrarScroll","setMostrarScroll","popularLabelTpPag","formTiposCobranca","tiposCobranca","tpCobranca","tipoCobrancaLabel","dataAnalise","dadosCheques","localAtual","reqCheques","reqCrediario","limparVariaveis","cnpjLocal","vlr_AVencer","vlr_Ate30dias","vlr_Ate60dias","vlr_Ate90dias","vlr_Ate120dias","vlr_Ate150dias","vlr_Ate180dias","vlr_Acima180dias","vlr_Vencidos","vlr_Total","vlr_Indicador_Acima30dias","vlr_Indicador_Acima60dias","vlr_Indicador_Acima90dias","vlr_Indicador_Acima120dias","vlr_Indicador_Acima150dias","vlr_Indicador_Acima180dias","calcularTotal","objTotalizador","indices","numeroIndice","carregarDadosIndice","listaTpCobranca","popularTipoCobranca","outerHeight","carregarLocaisPadroes","Header","tpPag","buscarDadosInadimplencia","print","overflowY","NovaEmpresa","periodoAssinatura","setPeriodoAssinatura","testeGratuito","setTesteGratuito","urlContrato","setUrlContrato","dadosNovaEmpresa","setDadosNovaEmpresa","informacoes","setInformacoes","openModalContrato","setOpenModalContrato","codigoSegurancaContrato","setCodigoSegurancaContrato","captcha","setCaptcha","reCaptchaRef","inputEmail","dadosLocalAtivacao","diaPagamento","emailEnvioCobranca","cartaoCredito","mesValidade","anoValidade","cvv","dadosTitular","planoId","dadosContrato","setDadosContrato","selecionarPlano","pesquisaCNPJ","cadastrarEmpresa","novaEmpresa","retornoNovaEmpresa","retornoEmail","textoAleatorio","assinarContrato","periodoTeste","localId","retornoAssinatura","retornoPlanos","loc_tipoContribuinte","pla_numeropdvs","testegratis","RocketOutlined","retornoPesquisaEmail","cpfresponsavel","razao","validarRazaoSocial","sitekey","exibirModalContrato","fecharModalContrato","codigoSeguranca","AtivarUsuarioPlano","ativarEmpresaLocal","tipoEntidade","cap_ordem","cap_tipoentidade","setCamposPersonalizados","camposPersonalizadosTemp","ListaCamposPersonalizados","cap_mensagemobrigatorio","editarCamposPersonalizados","RenovarPlano","ManutencaoFornecedorProduto","buscarProdutoFornecedor","forId","DrawerFornecedorProduto","formFornecedorProduto","edit","setEdit","ultimocusto","listaTipoEndereco","listaPais","openDropdown","setOpenDropdown","pais","onFocus","te","ManutencaoRestaurante","listaTipoRestaurante","setListaTipoRestaurante","valorPreferencia","setValorPreferencia","valuePreferenciaSlider","setValuePreferenciaSlider","listaTiposEndereco","setListaTiposEndereco","setTiposContatos","res_notaavaliacao","res_site","out_descricao","res_id","coordenadas","enderecoTemp","pee_localreferencia","pee_latitude","pee_longitude","telefoneTemp","psc_ramal","emailTemp","outroContato","toc_id","out_ativo","OutrosContatos","Emails","Enderecos","Telefones","pej_databaixasefaz","pej_baixadoreceita","tipFormatter","tr","tpt_descricao","DrawerRestaurante","formularioRestaurante","listaTiposRestaurante","setListaTiposRestaurantes","res_preco_buffetlivre","res_preco_kg","res_tipo","res_cafemanha","res_almoco","res_janta","editarRestaurante","listaPaises","lte","ManutencaoHotel","listaTipoHotel","setListaTipoHotel","hot_nota_avaliacao","hot_id","th","DrawerHotel","formularioHotel","openModalMapa","setOpenModalMapa","hot_tipo","hot_preco_standard","hot_preco_duplo","hot_preco_triplo","exibirModalMapa","fecharModalMapa","Testes","formTeste","setarFormulario","carregandoGerar","setCarregandoGerar","considerarVigencia","setConsiderarVigencia","setMarcado","listaCestAlterar","setListaCestAlterar","formAlterar","cestAlterar","buscarProdutos","filtroAnp","filtroNcm","filtroCest","SomenteNcmInativos","EANInvalidos","hideSelectAll","gerarManutencao","vig_id","defaultChecked","preserveSelectedRowKeys","confirmar","vig","vig_descricao","ManutencaoVigencia","DrawerVigencia","vig_datainicial","ManutencaoRetencao","dadosTipoRetencao","setDadosTipoRetencao","descontoTotal","setDescontoTotal","checked1","setChecked1","tar_descontamovimentacaofinanceira","tar_descontatotalnota","tar_id","tipoImpostoSelecionado","exibirModalRetencao","DrawerRetencao","tabRetencao","tar_descricao","tar_percentuaretencao","tar_tiporetencao","alterarPessoa","setAlterarPessoa","carregandoDados","setCarregandoDados","verificarDados","retencao","valorLista","filtrosArray","proxSequencia","limparLista","rcf_id","produtoSelecioando","removeProd","apiErp","axios","create","baseURL","linkApiGestor","interceptors","use","getToken","Authorization","codigoempresa","codigolocal","logout","SelecoesEmpresaCat","veioDaHome","setCodigoEmpresa","setCodigoLocal","formLogin","setNomeEmpresa","listaLocal","setStatusFilial","buscarTela","codEmpresa","carregarLocais","validaLocalUnico","carregarDadosEmpresa","buscarEmpresaUnica","EsqueciSenha","enviarEmailRecuperarSenha","LoginCatalogo","InicialCatalogo","getClienteCat","CatAcessosExterno","ConsultaPecas","grupoAtual","catalogoExterno","listaPecas","setListaPecas","pecaSelecionada","setPecaSelecionada","openImg","setOpenImg","image","setImage","imageGrupo","setImageGrupo","opeModalInfo","setOpenModalInfo","codcatalogo","buscarPecas","buscarImagemGrupo","sticky","small","codpeca","descpeca","numeropeca","ellipsis","showTitle","observacoes","codPeca","descPeca","buscarImagemMongo","PictureOutlined","rowClassName","produzido","controle","contentClass","base64Data","codigoPeca","dadosImagem","DrawerConsulta","setGrupoAtual","disabledAnt","setDisabledAnt","disabledPro","setDisabledPro","setExibir","buscarGrupo","codgrupo","proximo","anterior","validarGrupo","codGrupo","codCatalogo","desccatalogo","LeftCircleOutlined","RightCircleOutlined","DrawerGrupo","codLinha","nomeCatalogo","nomeLinha","valueGrupo","setValueGrupo","setValueSubGrupo","foto","setFoto","rowSelectionn","setRowSelectionn","rowSelectionnGrup","setRowSelectionnGrup","codSubGrupo","numSubGrupo","funcoesAoSelecionar","rowSelectionGrup","numGrupo","funcoesAoSelecionarGrup","responsive","descGrupo","catalogo","nomegrupo","nomecatalogo","CatalogosExterno","codCatalago","setCodCatalago","nomeCatalago","setNomeCatalago","setCodLinha","setNomeLinha","openGrupo","setOpenGrupo","listaLinha","setListaLista","linhaSelecionada","setLinhaSelecionada","filtroFixo","descLinha","alturaScroll","codlinha","desclinha","GroupOutlined","CatPecasExterno","exibeGrupos","setExibeGrupos","listaFotos","setListaFotos","selected","dadosSelec","cat004","cat003","ctc001","keySelecionaRadio","alignitems","TabPermissoes","apiWeb","ManutencaoUsuarioCat","DrawerUsuarioCatalogo","atualizarTabela","UsuarioCatalogo","buscarUsuarios","InfosCotacao","dadosPedidos","tipoCobranca","setTipoCobranca","codTipoCobranca","buscarCondicao","codCondicaoPag","cnpjCliente","enderecoCliente","cidadeCliente","cepCliente","ufCliente","Description","codProduto","DrawerCotacaoCat","CotacaoCatalogo","ManutencaoCatalogo","listaGrupos","openDrawerGrp","setOpenDrawerGrp","editandoGrp","setEditandoGrp","sequencialGrp","setSequencialGrp","Excluir","novaListaGrupos","Sequencia","setListaGrupos","sub","Codigo","Descricao","sequenciaGrp","formCatalogo","aoSalvarGrupos","DrawerCadastroCatalogo","catalogoTemp","Empresa","CaminhoImg","Grupos","CadastroCatalogo","ExcluirCat","modalExcluirCat","req","method","statusText","objectUrl","revokeObjectURL","msg","ManutencaoKitComposicao","listaItems","setListaItems","setControlButton","carregarItensProdutoKit","soAtivos","preco_total_kit","qtde_item","pkc_valorunitario","dadosPost","listaProdutosKit","inativarItem","pkc_id","myFunction","pkc_qtde_item","pkcValorUnitario","pkc_ativo","saveEdition","listar_inativos","valorProdutoKit","porc_desconto","listaItemsTemp","somaValor","diferenca","DrawerKitComposicao","setFechouCadastro","fechouCadastro","formKitComp","listaKits","setListaKits","attList","setAttList","carregarListaKit","inativarKit","par_modelobalanca","dataHoraAtz","dataatualizacao","horaatualizacao","msg2","DetalhesRecibo","setDetalheRecibo","parcelasProcessadas","setParcelasProcessadas","processedParcelas","processParcelas","groupedParcelas","rec_decricaofinanceiro","cde_chaveacesso","ModalDetalheRecibo","formRecebimento","openModalRecibo","setOpenModalRecibo","dadosDetalheRecibo","setDadosDetalheRecibo","visualizarDetalhes","rec_id","cde_id","reimprimirRecibo","rec_numero","rec_datahora","totalConciliado","setTotalConciliado","totalNaoConciliado","setTotalNaoConciliado","TipoDoc","conciliados","conciliadoTotal","nãoConciliadoTotal","conciliado","rcc_conciliado","naoconciliado","tipoDoc","hcc_datahoraconciliacao","valorTaxa","ManutencaoCidade","listaProvedor","setListaProvedor","listaVersao","setListaVersao","cnf_brasaocidade","cnf_id","DrawerCidade","formCidade","SelectPaginado","retornaDescricaoProvedor","cnf_provedornfse","provedor","retornaVersaoNfse","cnf_versaonfse","versao","editandoCidade","cadCidade","ManutencaoCorrelacaoCfop","listaTipo","setListaTipo","cfop_saida","cfop_entrada","crr_id","cfo","DrawerCorrelacaoCfop","formCorrelacaoCfop","setRegistro","retornaDescricaoTipoCorrelacao","crr_tiponota","locId","Input","toLocaleLowerCase","cfo_descricaosaida","cfo_descricaoentrada","editandoConfig","cadCfop","mostrarFaturado","setMostrarFaturado","mostrarDevolvido","setMostrarDevolvido","calcularTotais","seqKey","temDevolvido","itemEncontrado","desfazerDevolucao","pdi_percacresc","ret_aliquotaIcms","ret_baseIcmsSt","ret_aliquotaIcmsSt","valorTotalPedido","formTransp","mostrarModalTransp","setMostrarModalTransp","buscarVeiculos","pdi_valoroutrasdespesas","transp","trn_valorfretefixo","trn_percentualfrete","retornaValorFrete","exibirDrawerTransportadores","fecharDrawerTransportadores","emiteTransferencia","editarValores","setEditarValores","formaPagamentoAtual","setFormaPagamentoAtual","pedidoparcela","novaFormaPagamento","novaCondicoesPagamento","pagamentoTemp","ped_valorTotal","percValor","ped_valorTotalDesc","recalcularTotalPedido","ped_valorTotalAcre","percDesconto","percAcresc","valorCFreteEOutros","calcuPercDesc","calcuPercAcresc","orf_percentualdesconto","possuiBoletoComParcelas","possuiBoletoSemParcelas","valorTotalIPI","editarParcelas","salvarParcelas","ManutencaoTipoEquipamento","listaIdentificacao","setIdentificacao","teq_id","DrawerTipoEquipamento","cadTipo","formTipo","ManutencaoModeloEquipamento","openDrawerTipoEquipamento","setOpenDrawerTipoEquipamento","meq_id","fecharSomenteDrawer","cadTipoEquipamento","ManutencaoEquipamentoCliente","carregarEquipamentos","openDrawerModelo","setOpenDrawerModelo","tipoIdentificacao","setTipoIdentificacao","eqp_identificacao","eqp_senhapin","eqp_id","cadModelo","DrawerEquipamento","openDrawerEqui","setOpenDrawerEqui","formEqui","ModalVisualizaSenha","dadosSenha","dadosAtualizados","eqp_senhatouch","TabEquipamento","equipamentoSelecionado","setEquipamentoSelecionado","listaEquipamentos","setListaEquipamentos","setDadosSenha","idCliente","filtroPesquisa","selecionarEquipamento","eqp_descricao","descricao_tipo","editandoEquipamento","visualizaSenha","equipamento","ManutencaoTipoUrgencia","tpu_id","DrawerTipoUrgencia","formUrgencia","TabDadosOS","openDrawerTipoUrgencia","setOpenDrawerTipoUrgencia","ManutencaoTipoServico","tse_id","DrawerTipoServico","ManutencaoOrdemServico","mostraBtnSalvar","exibirDrawerOrdem","editandoOS","dadosEnderecoLocal","setDadosEnderecoLocal","listaTelefone","setListaTelefone","dadosEmail","setDadosEmail","abreModalEndereco","setAbreModalEndereco","abreModalEmail","setAbreModalEmail","formularioEmail","dadosEquipamento","setDadosEquipamento","dadosFormasPagamento","setDadosFormasPagamento","setEmiteTransferencia","openDrawerTipoServico","setOpenDrawerTipoServico","validaValorPago","pedidoitens","pedidoformapgtos","arrayDados","telefoneCliente","ped_valorfrete","ped_valorTotalitens","ped_valoroutrasdespesas","ped_responsavelpedido","ors_id","ors_descricaoservico","ors_descricaocessorio","ors_descricaoproblema","pgto","pfp_id","carregarDadosCliente","dadosEmailCliente","buscarDadosLocal","retornoEndereco","totalIPI","cso_i","ret_percReducaoIcms","ret_percMva","ret_percReducaoIcmsST","ped_indicadorpresenca","pdi_valoricmsst","pdi_valoripi","ope_indicadorpresenca","restoClientes","orf_id","orf_valortotal","orf_observacao","restoForma","oit_qtde","oit_desconto","oit_id","oit_observacao","oit_valortotal","oit_valorunitario","restoItem","carregarDadosInciais","carregarDadosItems","ope","Divider","rulesFormItem","exibirModalEmail","fecharModalEmail","DrawerOrdemServico","setEditandoOS","formOrdem","setMostraBtnSalvar","ModalStatus","fecharModalStatus","dadosStatus","statusSelecionado","setStatusSelecionado","peh_observacao","TabDetalheItens","itensNF","percentualDesc","setPercentualDesc","retornarPercentual","TabDetalheFormaPagamento","TabDetalheRelacaoNota","listaNotas","setListaNotas","TabDetalheHistorico","historico","peh_datahora","TabDetalheEquipamento","dadosEquipa","setDadosEquipa","teq_descricao","meq_descricao","TabDetalhesOS","ordemservico","labelStyle","DetalheOrdemServico","pedido","setPedido","abaRelacionamento","setAbaRelacionamento","buscarRelacionamento","ped_iedest","fun_nome","ModalDetalheOS","fecharModalDados","setExibirDrawerOrdem","openModalStatus","setOpenModalStatus","setDadosStatus","cancelarOrdem","dadosOs","editarOrdem","trocarStatus","tse_descricao","tse_validade","editandoTipoServico","descricao_marca","editandoModelo","retornaDescricaoIdentificacao","teq_exigeidentificacao","identificacao","tpu_descricao","editandoDados","CarrinhoCatalogo","carrinhoItens","setCarrinhoItens","atualizarCarrinho","setAtualizarCarrinho","setTotal","setPrecoItem","dateSincro","setDateSincro","openDrawerPedido","setOpenDrawerPedido","initDatabase","loadShoppingCartItems","updateTotal","getDateSincro","date","getTime","buscarPreco","useCallback","deleteCartItem","prevState","deleteAllItems","clearShoppingCart","clearDateSincro","editItemQuantity","more","editCartItemQuantity","enviarPedido","ConcatPedido","precoFinal","newTotal","Qtd","CodigoCliente","UpOutlined","ToolOutlined","concluirPedido","textDecoration","HomeCatalogo","incollapsed","PrivateRoute","Component","rest","isAuthenticated","App","FormSizeDemo","componentSize","primaryColor","ptBR","nextColor","mergedNextColor","ConfigProvider","theme","onColorChange","initialState","userConfig","Boolean","hostname","ReactDOM","StrictMode","serviceWorker","ready","registration","unregister","impressorasInstaladas","imprimirRawBase64","nomeImpressora","impressora","texto","urlImpressao","objectStoreSincro","errorCode","cursorRequest","openCursor","continue","clearRequest","clear","saveShoppingCart","descricaoPeca","valorPeca","newItem","addRequest","novaQuantidade","itemExistente","putRequest","deleteRequest","DrawerVendedores","StateContext","createContext","StateProvider","Provider","useReducer","useContext","valortotalseguro","minDate","TabVeiculo","TabVolumes","TabValores","numeroEan","digitoVerificador","multiplicador","somaEAN","Ean","formObj","Buffer","decodeBase64","jsonPayload","d1","d2","df","abs","setHours","isDate","RegExp","rev","tamanho","digitos","pos","resultado","_url","retornaValorPorExtenso","$","j","titulo","substituirCaracterEspecial","str","timer","ms","clearTimeout","aleatorio","letras","rnum","jsonp","encodeURI","timeout","func","script","removeChild","casasDec","possuiErro","idRelatorio","param","rpj_obrigatorio","pathRelatorio","valorRatear","eanCodigo","fator","numlen","base64String","maxSizeInMB","maxWidth","maxHeight","maxFileSize","Image","canvas","ctx","getContext","drawImage","compressedBase64","toDataURL","base64FileSize","scaleRatio","sqrt","scaledWidth","scaledHeight","exibirMensagemException","execao","detail","ValidarInscricaoEstadualRS","ValidarInscricaoEstadualSC","ValidarInscricaoEstadualPR","ValidarInscricaoEstadualSP","ValidarInscricaoEstadualMG","ValidarInscricaoEstadualRJ","ValidarInscricaoEstadualES","ValidarInscricaoEstadualBA","ValidarInscricaoEstadualSE","ValidarInscricaoEstadualAL","ValidarInscricaoEstadualPE","ValidarInscricaoEstadualPB","ValidarInscricaoEstadualRN","ValidarInscricaoEstadualPI","ValidarInscricaoEstadualMA","ValidarInscricaoEstadualCE","ValidarInscricaoEstadualGO","ValidarInscricaoEstadualTO","ValidarInscricaoEstadualMT","ValidarInscricaoEstadualMS","ValidarInscricaoEstadualDF","ValidarInscricaoEstadualAM","ValidarInscricaoEstadualAC","ValidarInscricaoEstadualPA","ValidarInscricaoEstadualRO","ValidarInscricaoEstadualRR","ValidarInscricaoEstadualAP","numeroInscricao","pesosMultiplicador","inscricaoEstadualSemDigitoVerificador","somaIE","pesosMultiplicadorPrimeiro","pesosMultiplicadorSegundo","primeiroDigitoVerificador","inscricaoEstadualComPrimeiroDigitoVerificador","nNumero","numeroInscricao_","segundoDigitoVerificador","padStart","listaDigitosValorMultiplicacao","valorMultiplicacao","valor1","valor2","primeiraDezenaExata","inscricaoEstadualComSegundoDigitoVerificador","digitoVerificadorPrimeiro","inscricaoEstadualComPrimeiroDigito","valorAcrescentadoNaSoma","digitoVerificadorPadrao","SelectProduto","registrosPorPagina","textOverflow","TOKEN_KEY","EMPRESA_KEY","LOCAL_KEY","NOMEEMPRESA_KEY","NOMELOCAL_KEY","REGIMETRIBUTARIO_KEY","NOMEUSUARIO_KEY","IDUSUARIO_KEY","EMAILUSUARIO_KEY","TELA_KEY","NAVEGACAO_KEY","PERMISSOES_KEY","BREADCRUMB_KEY","STATUSPLANO_KEY","TELAANTERIRO_KEY","ENTIDADE_KEY","STATUSFILIAL_KEY","DADOS_INTEGRA_KEY","CNPJ_EMPRESA_KEY","DADOSUSUARIO_KEY","VALIDADECERTIFICADO_KEY","CLIENTECAT_KEY","NOMECLIENTECAT_KEY","process","getNavegacao","getPermissao","getStatusPlano","getStatusFilial","getTelaAnterior","getDadosUsuario","getNomeClienteCat","nomeUsuario","setTela","tela","nav","perm","setTelaAnterior","setCnpjEmpresa","dadosUser","setClienteCatalogo","setNomeClienteCatalogo","fpValeAlimentacao","fpValeRefeicao","fpValeCombustivel","fpDuplicataMercantil","fpFalhaDeHardware","fpOutro","ComboData","opcoes","this","InputDemoDate","setState","ManutencaoPedidos","DrawerPedidos","ManutencaoCondicional","dadosEntrega","setDadosEntrega","setCliente","quantidadeTot","setQuantidadeTot","setValorTot","dataRetorno","devolver","vci_id","possuiEdicaoAberta","vci_devolvido","recalcularTotais","vci_quantidade","vci_valorun","modalParcelasAtraso","modalSenhaGerencial","IdPessoa","psc_ativo","totBaixado","dataEntrega","horaEntrega","minutoEntrega","horaagendada","vnc_imagemassinaturacliente","vendacondicionalitens","BuscarDadosCliente","endPrincipal","endEntrega","switchEntregar","vci_sequencia","manutencaoItem","salvarItem","cancelarEdicaoItem","DrawerCondicional","ModalAdicionarUsuario","filiais","ModalCalcularLimite","setOpenModalCalcular","setStep","mostraRendaConj","setmostraRendaConj","valorsimulado","setvalorsimulado","listaQuestoes","setListaQuestoes","dadosResposta","setDadosResposta","setValores","adicionarResposta","pergunta","dadoPergunta","respEditar","resp","calculoSimulado","pef_renda","pef_rendaconjuge","questionario","porcentagemBase","par_percentuallimitecredito","vlrbase","vlrsim","porcentagem","salvarLimite","resposta","q","cli_valorlimitecredito","CalculatorOutlined","HighlightOutlined","questoes","ModalCartaCorrecaoNotaFiscal","exibeCondicoes","setExibeCondicoes","retornoProcessamento","mensagemCancelamento","chNFe","nSeqEvento","ModalCfop","retornaDadosCFOP","ModalContaGerencial","nivel","cgc_tipo","ModalContatoCliente","toc_descricao","ModalDefinirHorario","ModalEmail","ModalEmpresaFilial","ModalEmpresaFilialBusca","relNovo","setRelNovo","rel","Nome","QuantidadeColuna","JsonRelatorio","ModalEndereco","exibirPais","setIsEstrangeiro","selectPaginado","verificacao","cid_nome","listarTpEndereco","listarPais","pseId","tpeId","setFocusCep","alterarStatusEstrangeiro","ModalGerarComissao","formGerarComissao","ModalExibirAcaoUsuario","ModalGerarRemessa","ModalInstrucaoRemessa","listaInstrucao","setListaInstrucao","formInstrucao","parSelec","cancelados","baixa","dadosFiltrados","ModalInutilizacaoNfe","solicitarInutilizacaoNumeracao","inutilizacao","nroInicial","nroFinal","nNFFin","qtdNumero","ModalListaPreco","nomeLista","verificaListaPrecoExistente","ModalLoteProduto","prl_infoadicional","listaLoteLength","isAfter","ModalManifestoDestinatario","retornaDescricaoManifestoDestinatario","ModalNacionalidade","dadosNacionalidade","exibirModalNacionalidade","fecharModalNacionalidade","nacionalidade","setListaNacionalidade","ModalNcm","InfoCheque","chq_serie","ModalOcorrencia","movimentacaoCheque","setMovimentacaoCheque","motivoDevolucao","setMotivoDevolucao","chq_id","och_id","och_data","och_status","cmc_id","och_observacao","cmc_descricao","ModalOcupacao","listaOcupacoes","exibirModalOcupacao","fecharModalOcupacao","cbo_id","cbo","dadosOcupacoes","cbo_descricao","poc_principal","setDadosOcupacoes","ocup","ModalOrgaoSubjacente","listaOrgaoSubjacente","exibirModalOrgaoSubjacente","fecharModalOrgaoSubjacente","pop_cep","pop_cidade","pop_email","pop_ativo","pop_observacao","pop_latitude","pop_longitude","pop_numero","pop_localreferencia","pop_complemento","pop_bairro","pop_endereco","pop_telefone","setListaOrgaoSubjacente","ModalOutroContato","listaOutrosContatos","exibirModalOutroContato","fecharModalOutroContato","dadosOutrosContatos","listarTpOutroContato","listaTpOutroContato","setDadosOutrosContatos","toc","ModalPessoaAutorizada","listaPessoasAutorizadas","exibirModalPessoaAutorizada","fecharModalPessoaAutorizada","listasGrauParentesco","setListasGrauParentesco","dadosPessoasAutorizadas","g","grp_id","grp_descricao","pesAuto","pea_id","pea_ativo","setDadosPessoasAutorizadas","pef_id","pessoafisicas","ModalPlano","inativo","setGratis","setMei","inicial","setInicial","avancado","setAvancado","completo","setCompleto","premium","setPremium","ModalProdutoCondicional","dadosCondicional","setDadosCondicional","ven_nome","vnc_observacao","ModalTelefone","numTelefone","setNumTelefone","listarTpTelefone","listaTpTelefone","psc","valorAnterior","valorNovo","ModalTributacaoIcms","listaOrigemDestino","listaCst","setListaCst","listaCsosn","setListaCsosn","listarUfDestino","setListarUfDestino","setRegimeTrib","estadoOrigem","setEstadoOrigem","mostrarCsoSn","setMostrarCsoSn","mostrarCstIcms","setMostrarCstIcms","mostrarDiferimentoIcms","setMostrarDiferimentoIcms","mostrarAlicotaIcms","setMostrarAlicotaIcms","mostrarReducaoBC","setMostrarReducaoBC","obrigatorioDadosICMS","setObrigatorioDadosICMS","validarCst","codigoCst","rt","codigoCso","validarCsosn","calculaAliquotaEquivalente","calculaPercentualReducao","_percicms","_aliquotaEquivalente","_calc","_percreducao","aliquotaEquivalente","percicms","percicmsreducaobc","percdiferimentoicms","iod_id","cst_descricao","cso_descricao","ModalVeiculo","exibirModalVeiculo","fecharModalVeiculo","ModalCancelamentoNfe","realizarCancelamento","verificarEstornoPagamentoEletronico","formaPagIntegrado","modalEstornarPagtos","pagamentos","descricoesConcatenadas","idPayer","imp_idintegracao","ModalReenviarSefaz","modeloDescricao","getDescricaoModelo","ModalDevolucao","abrirManutencao","ModalEnvioNFeEmail","modeloDoc","setModeloDoc","chaveNFe","enderecosDestinatarios","enderecoEmail","adicionarEmail","emailLista","excluirEmail","ModalImagemQr","isOpen","base64Image","tempo","ModalEnvioNFeWhats","listaWhats","setListaWhats","setBase64Image","conectado","setConectado","exibirQr","setExibirQR","temporizador","setTemporizador","enviaNota","setEnviaNota","enviaBoleto","setEnviaBoleto","enviaXml","setEnviaXml","retornaDadosCliente","conectar","onCloseModalQr","Whats","numeroDestinatarios","whats","ChaveAcesso","numerosReceptor","enviarDados","Alert","gerarQRCode","verificarConexao","now","clienteTelefone","telefoneWhats","psc_whatsapp","gap","numeroWhats","adicionarWhats","WhatsLista","excluirWhats","bodyStyle","ModalAjudaRejeicaoNfe","activeOpen","setActiveOpen","CustomerServiceOutlined","comandosEnviarImp","etiqueta","qtdComandos","comando","met_comando","indiceEtiqueta","met_quantidadecaracteresdescricaoproduto","imprimirImpressoraPadrao","montarEtiquetaImpressora","ModalImprimirEtiquetas","listaModeloPadrao","setListaModeloPadrao","listaModeloEtiqueta","setListaModeloEtiqueta","buscarListaPreco","listarItensNota","imprimirEtiqueta","tpEtiqueta","imprimirEtiquetaImp","descricaoModelo","onChangeTipo","ModalGradeOrdemCompra","pedidoItem","pedidoFormaPgto","carregarItensPedido","formataCpf","formataCnpj","pes_nomecliente","pes_nometransportador","pes_nomevendedor","totFrete","retornaFrete","retornaValorTotal","ModalDevolucaoCondicional","formDados","vci_quantidadeDevolvida","devolvidoTotal","valorFinal","setValorFinal","orf_percentualacrescimo","ModalDetalheOrcamento","orcamento","setOrcamento","orc_nomecliente","orc_valoroutros","ModalGradeProduto","dadosValidacao","ehPercentual","setEhPercentual","setDadosFiltrados","alterarQuantidade","calcularAcres","calcularDesc","filtrados","percDesc","valorAcresc","valorRet","ModalSenhaLiberacao","ModalListarParcelas","alterarEstado","parcelaAlt","prc","nft_id","salvarParcela","estornaParcela","ModalEditarVencimentoParcela","validarValor","ModalImportarElementosFormulario","exibirModalImportarElementos","fecharModalImportarElementos","listaElementosSelecionados","setListaElementosSelecionados","listaParametros","setListaParametros","filtrosRel","setFiltrosRel","codRel","setCodRel","listarParametros","listaParametrosAtz","par","rpj_tipoelemento","listaParametrosTemp","listaElementos","selecionaElementos","rpj_id","importarElementos","ModalImportarElementosCamposAdicionais","cap_label","ModalPersonalizacaoFormulario","exibirModalPersonalizacao","fecharModalPersonalizacao","meta","ModalPersonalizacaoFormularioFiltros","finish","ModalEditarValoresParcela","calcularValorReceber","verificarValorReceber","FormBuilder","defineWidget","Rate","Slider","TimePicker","Upload","ModalBandeiraCartao","listaBandeiras","setListaBandeiras","bandeiraSelecionada","setBandeiraSelecionada","modalCancelar","abrirTipoParcelamento","bnd_logo","ModalEditarPDV","dadosPdvTemp","ModalManutencaoNota","mostarCsoSn","notaTransferencia","exibePerc","setExibePerc","estadoOrig","setEstadoOrig","estadoDest","setEstadoDest","listaEst","estadoDestino","cst","csosn","tribPisCofins","ModalContaCorrente","linhaPintada","setLinhaPintada","searchTerm","setSearchTerm","searchResults","setSearchResults","results","selecionarContaCorrente","ModalTaxasCartaoCredito","ModalAntecipacaoClienteFornecedor","formAnterior","exibirModalAntecipacaoClienteFornecedor","fecharModalAntecipacaoClienteFornecedor","dadosAntecipacao","listaAntecipacao","setListaAntecipacao","setValorAtecipacao","totalAntecipacao","anm_valor","saldoAUtilizar","selecionarAntecipacoes","ModalSelectLote","quantidadeRestante","quantidadeParaAtribuir","prl_id","nfl_qtde","selecionarLotes","ModalDevolucaoSubstituicaoTributaria","validar","ModalListaProduto","exibirModalListaProduto","fecharModalListaProduto","ModalDetalhesOrdemCompra","ocp_faltareceber","atributoTemp","orc_observacao","orc_formapagamento","ModalEstornoNfe","textoEstorno","ModalParcelasPendentes","ModalAliquotaSimplesNacional","aposSalvar","ModalItemInventario","ModalGrade","ModalConfirmacaoTransferencia","conferiTodos","setConferiTodos","usarLeitor","setUsarLeitor","codBarrasInput","marcarItem","produtoConferido","itensNotaFiscal","idSerie","elipse","ModalEditarItemDevolucao","ModalEditarNotaFiscalEntrada","ModalEditarCFOP","ModalAntecipacaoDevolucao","setSelecionarContaCorrente","ModalContrato","confirmacaoLeitura","ModalCheque","vemDaNota","quantidadeCheque","valorTotalCheque","ModalRetornaContaGerencial","listaContaGerencialTodas","setListaContaGerencialTodas","contaLista","dadosContaGerencial","ModalInutilizarNota","ExceptionOutlined","ModalProdutoGrade","setListaGrade","listaGradeBkp","setListaGradeBkp","dadosDaGrade","ModalMapa","ModalRetencao","fecharModalRetencao","ModalSelecaoClientesCat","formClientes","dadosLista","setDadosLista","emailusuario","cancelButtonProps","ModalExibeImagem","ModalManutencaoPecasCat","formGrupo","exibirModalItens","dadosPecasSelect","setDadosPecasSelect","flagCodPeca","setFlagCodPeca","jaTemFoto","setJaTemFoto","NumeroItem","Quantidade","Observacoes","listaPecasLength","salvarFoto","FileName","Base64Data","SeqGrupo","pecaEditando","CodPeca","dadosPeca","peca","UploadFoto","ModalGradeProdutoImportacao","TabItensSelecionar","confirmarItens","modalFechada","botaoConfirmar","setBotaoConfirmar","itemEditado","setItemEditado","cancelEdit","novosItens","salvarEdicao","TabFormaPagamentoSelecionar","confirmarFpgs","listaFpg","setListaFpg","novasFpgs","ModalSelecionarOrcamento","itensConfirmados","setItensConfirmados","fpgsConfirmados","setFpgsConfirmados","setModalFechada","loadingModal","okButtonProps","ModalGradeEstoque","setItensProduto","precoVenda","qtdeInicial","qtdPedido","qtdCondicional","qtdPrevisao","ModalConsultaProtocoloMdfe","listaProcEvento","setListaProcEvento","procEventoMDFe","protMDFe","infProt","chMDFe","eventoMDFe","dhEvento","retEventoMDFe","tpEvento","xEvento","ModalEnvioBolWhats","bol_cpfcnpjsacado","ModalEnvioOrcamentoWhats","orc_numerotelefone","pej_cpf","ModalEnvioPedidoWhats","documento","ModalEditarBoleto","totalParcelas","setTotalParcelas","boleto","diff","ModalSelecionaRelatorio","listaRelatorio","setListaRelatorio","setParametrosImpresao","retornaRelatorios","par_relatorioPedido","DefinirComoPadrão","eventEmitter","EventEmitter","fn","once","off","payload","freeze","onlyNumbers","numbers","caracter","ModalDadosPecas","setDadosPeca","setDadosTabela","listaDadosTab","percDescCli","valorLiquido","valIpi","perMva","percIcms","valIcms","percRedBaseCalcST","baseCalcST","valST","codigoAlternativo","infAdicional","lineHeight","sx","infoCliente","clienteCidade","clienteCep","clienteUF","addShoppingCart","setvalorTotalSt","reteioDesconto","_valorTotalDescontoItem","ManutencaoNotaFiscal","isSubmitting","setIsSubmitting","abreModalSimplesNac","setAbreModalSimplesNac","formEndereco","openValidaIE","setOpenValidaIE","consumidorFinal","setconsumidorFinal","listaSubjacente","setListaSubjacente","popularDadosSimples","setarAdjacentes","adjacentes","modalVerificaIEdestinatario","pessoaorgaospublicos","ie","reteioFrete","modalAutorizarSefaz","realizarReenvioSefaz","imprimirDAVLS","preencherDadosExportacao","notafiscalexportacao","dadosExp","nte_ufsaidapais","nte_localexporta","nte_localdespacho","subjacente","pop_id","ntf_subjacente","pe","pop_nome","localidade","tratarDadosSubjacente","incluirEndereco","GrupoCatalogo","formCatalog","exibirModalPecas","setExibirModalPecas","subgrupoSelect","setSubgrupoSelect","listaTempGrp","codigoGrp","descricaoGrp","Pecas","removerPecas","novaListaPecas","DrawerNFExtra","InputCpfCnpj","NovoValor","onKeyUp","DevolucaoCondicional","formItemCondicional","riscarCampos","setRiscarCampos","checkedSwitch","setCheckedSwitch","dadosDevolucao","setDadosDevolucao","todosItensDevolvidos","setarFocoProduto","lenght","percdes","excluirItens","SelecoesEmpresa","hash","reload","retornaUnico","setarPrimeiroReg","setLista","alterouPag","setAlterouPag","setCampoDescricao","setValor","primeiroReg","setPrimeiroReg","parametrosUrl","search","onPopupScroll","scrollTop","scrollHeight","onPopUpScroll","TabelaDados","headerTabela","setRegistrosPorPagina","listaTbDados","setListaTbDados","configPaginacao","onSelectAll","changeRows","setCondicaoSelecionarItem","configSelecionarRadio","setSelecionaRadio","ordem2","newValue","InputQuantidade","precisao","aposVirgula","InputValor","valorTemp","zeros","repeat","valueTemp","somenteValorPositivo","myInputRef","NumericInputDemo","styleForm","ModalProcessoLento","LancamentoTransferencia","setListaFiliais","listaContaCorrenteDestino","setListaContaCorrenteDestino","listaContaGerencialOrigem","setListaContaGerencialOrigem","listaContaGerencialAgrupadorOrigem","setListaContaGerencialAgrupadorOrigem","listaContaGerencialDestino","setListaContaGerencialDestino","listaContaGerencialAgrupadorDestino","setListaContaGerencialAgrupadorDestino","listarContaDestino","mcc_datahora","ctc_id_origem","ctgorigem","ctg_id_origem","ctgdestino","ctg_id_destino","ctcorigem","ctcdestino","ctc_id_destino","localdestino","acompanharLancamentos","setAcompanharLancamentos","listaContaGerencialPesquisa","setListaContaGerencialPesquisa","listaContaGerencialAgrupadorPesquisa","setListaContaGerencialAgrupadorPesquisa","saldoAtualConta","setSaldoAtualConta","saldoAnteriorConta","setSaldoAnteriorConta","buscarDadosContaGerencial","buscarSaldoConta","ctg_id_consulta","valor_consulta","caixa","InputEmail","setIsValid","ManutencaoMarca","ManutencaoGrupoProduto","ManutencaoSubGrupo","gru","ManutencaoVendedor","opcoesCriarUsuario","setOpcoesCriarUsuario","listaEstadoCivil","setListaEstadoCivil","listaUsuariosLocal","setListaUsuariosLocal","exibirOpcoes","setExibirOpcoes","criarUsuario","validarAbas","vendedorcampopersonalizados","vcp_valor","vcp_id","listaValidacoesVen","valida","adicionaEmail","pes_vendedor","listarVendedorCpf","usu","usuarioVinculado","regioesVenda","regioes","adicionarFuncionarioVendedor","modalAdicionarFuncionarioVendedor","campoId","emailUsuarioExistente","emailUsuarioDisponivel","EstCivil","DrawerTransportadores","ManutencaoTransportador","fretePorConta","setFretePorConta","tipoTransporte","setTipoTransporte","setBaixadoRec","transportadorcampopersonalizados","tcp_id","tcp_valor","pes_transportador","listarTransportadorCpfCnpj","pessoaAutorizada","transportadorveiculos","ManutencaoClientes","orgaoPublico","setOrgaoPublico","openModalCalcular","dadosRegimeTrib","setDadosRegimeTrib","switchEstrangeiro","valorPesIdestrangeiro","cli_datainiciallimitecred","cli_datafinallimitecred","listaOrgaoPublico","clientecampopersonalizados","ccp_valor","pes_cliente","cli_clientecontribuinteicms","pej_orgaop","pessoaautorizada","ccp_id","valorCpfCnpj","dissable","TabFaturamentoNovo","valorOrcamento","setValorOrcamento","dadosItemEditando","setDadosItemEditando","valorPgmto","orcamentoFormaPagamento","valorPagamento","valoracrescimo","valordesconto","valoritens","setOrcamentoFormaPagamento","adicionarLista","ManutencaoOrcamento","clienteSemCadastro","setClienteSemCadastro","buscarDadosOrcamento","clienteSelecionado","preencherDadosOrcamento","orc_responsavelorcamento","orcamentoformapagamento","orcamentoitem","isBefore","Drawer","formOrcamento","TabEntrada","listaCstPisCofins","setListaCSTPisCofins","cstpispj","setcstpispj","cstcofinspj","setcstcofinspj","cstpispf","setcstpispf","cstcofinspf","setcstcofinspf","cpc_descricao","TabSaida","listaNaturezaEfd","setListaNaturezaEfd","naturezaReceita","setNaturezaReceita","cstcofins","setcofins","nat_id","nat_codigo","ManutencaoTributacaoPisCofins","DrawerTributacaoPisCofins","formTributacaoPisCofins","ManutencaoTributacaoIcms","setListaOrigemDestino","dadosOrigemDestino","setDadosOrigemDestino","iod_novo","iod","icmsorigemdestinos","DrawerTributacaoIcms","formTributacaoIcms","ImprimirImpEtiqueta","configCodBarra","persCodBarra","qtdParc","limparItens","popularDadosProduto","keyProd","buscarGrade","produtosIncluir","ServidorImpressao","menuConfig","carregandoServer","setCarregandoServer","listaImpressoras","setListaImpressoras","setAbrirManutencao","verificarConfiguracao","impressoraNaoFiscal","listarImpressoras","listarModeloEtiqueta","retImp","modeloEtiquetaImp","impressoraNFiscal","impEtiquetaUtilizar","downloadServidor","indicator","spin","imp","padraoDYMO","salvarConfiguracoes","MehOutlined","verificarServidorNovamente","ItemFormulario","fnEditar","fnExcluir","TiposElementosFormulario","el","RetornaDescricaoElementoFormulario","widget","tipoDeValidacao","botoesValidacao","valuesBotoes","validarPermissaoMenu","itemMenu","objPermissao","validarPermmissao","acao","retornaAcao","permissao","EditorFormulario","objElementoFormularioEdicao","formEditor","openModalPersonalizacao","setOpenModalPersonalizacao","elementoEdicao","setElementoEdicao","adicionarElemento","widgetProps","defaults","eval","tratarErro","errorFields","field","errors","editarElemento","indiceElemento","excluirElemento","onSortEnd","oldIndex","newIndex","arrayMove","SortableItem","SortableElement","sortIndex","SortContainer","SortableContainer","shouldCancelStart","tagName","tipoEl","normalize","HeaderPage","openPerfil","setOpenPerfil","openBuscaGlobal","setOpenBuscaGlobal","openPaginaAbertas","setOpenPaginaAbertas","openModalModulos","setOpenModalModulos","openModalPesquisaGlobal","setOpenModalPesquisaGlobal","paginasAbertas","setPaginasAbertas","formularioPerfil","listaNotificacoes","setListaNotificacoes","contador","setContador","openServidor","setOpenServidor","dadosBusca","setDadosBusca","formularioServImp","openModalCliente","setOpenModalCliente","setCatalogo","openDrawerSinc","setOpenDrawerSinc","clienteCatalogo","countItemCart","toggle","useFullScreen","showDrawerPerfil","onClosePerfil","onCloseServidor","useMemo","menuUsuario","SettingFilled","WechatFilled","LogoutOutlined","notificacoes","excluirNotificacoesDia","InfoCircleTwoTone","notif","listarNotificacoes","outrosConteudos","infoCliCatalogo","BotaoAbrirChamado","ExpandOutlined","arrow","BellFilled","UnorderedListOutlined","DrawerPaginasAbertas","exibirPagina","paginas","fecharPagina","zIndex","efetuarBuscaGlobal","PesquisaGlobal","openPesquisaGlobal","ModulosPage","Perfil","imagemAlterada","SincronizarCatalogo","LinkNav","patch","icone","MenuPage","listaMenu","setListaMenu","openKeys","setOpenKeys","rootKeys","CarregaMenu","pesquisarMenu","subMenu","Sider","breakpoint","collapsedWidth","defaultSelectedKeys","onOpenChange","latestOpenKey","elementRef","elementoPai","parentNode","firstChild","innerText","AtzBreadcrumb","SubMenu","onTitleClick","ordemMenu","itm_id","BreadcrumbPage","listaTitulo","breadcrumb","htmlBreadcrumb","setHtmlBreadcrumb","MontaBreadcrumb","arrBreadcrumb","defaultActiveKey","FiltroSearch","nameInput","FiltroAtivo","FiltroOrdenacao","BotaoIncluirDados","PesquisaOrdenacao","labelInputFiltroAtivo","BreadcrumbIncluirDados","PesquisaOrdenacaoData","setDataPesquisa","FiltroData","valueSlider","setValueSlider","ModalDetalheLoteNfi","itemLote","exibirModalLote","setExibirModalLote","tooltip","nis_valorbcst","nis_percicmsst","nis_valoricmsst","nis_percmvast","TabDetalheIFormaPagamento","Print","nfp_valortroco","renderFunction","TabDetalheTotalizadores","detalheNotaFiscal","setDetalheNotaFiscal","valortotalprodutos","valortotalbcicms","valortotalbcicmsst","valortotalbcipi","valortotalicms","valortotalicmsst","valortotalipi","valortotaloutros","valorbcpis","valorbccofins","valortotalbcissqn","valortotalpis","valortotalcofins","valortotalissqn","TabNotaReferenciada","docsreferenciados","datadoc","dfr_chave","totaldoc","TabNotaAntecipacaoDevolucao","antecipacaoDevolucao","tipoMovimento","TabDetalheRelacaoPedido","TabDetalheServico","nfs_valorbc","nfs_percissqn","TabDetalheTransporte","transporteNF","setTransporte","DetalheNotaFiscal","arrFinalidade","arrStatus","arrAmbiente","setverificadevolucao","setModelo","verificadevolucao","ntf_ambiente","DetalhePedido","FormGW","listaInputHidden","validarCampoValido","elements","formItemHidden","querySelector","inputHidden","itemHidden","popularListaInputHidden","prototype","call","activeElement","verificarJaPossuiFocus","getFieldInstance","gravaLocalStorage","SelectAll","idValue","returnObject","usouFiltro","setUsouFiltro","filtroAnt","setFiltroAnt","multiplosFiltros","_nameValue","lf","SelectIncluir","onDeselect","onDropdownVisibleChange","onInputKeyDown","retornarDadosArray","rpj_linha","rpj_coluna","openModalImportarElemento","setOpenModalImportarElemento","optionsSelect","rpj_options","editarElementoTela","rpj_mensagemobrigatorio","cap_linha","cap_coluna","cap_obrigatorio","EditorFormularioCampos","marks","cap_options","somaColunaLinha","verificaNome","duration","FormularioDinamico","retornarLinhas","elementosDinamicos","setElementosDinamicos","elementoConvert","retornaElementos","camposDinamicos","lin","linhasFiltro","componente","itemFiltro","inputNumber","inputPreco","dataPicker","selectPaginacao","selectAll","checkbox","rpj_mensagemObrigatorio","rpj_placeholder","FiltroProduto","popularProduto","produtosSelec","adicionarItemCondicional","gravarTela","constante","limparTela","todos","DrawerNav","afterVisibleChange","jsonGeral","dadosCaminho","nomeForm","DrawerLancamentoTransferencia","DrawerManutencaoCaixa","listaPag","onClosePaginaAbertas","dadosGeral","pag","pagSelec","pagAbertas","excluirPagina","Tabela","FormasPagamento","isCTe","setIsCTe","abreModalAntecipacao","setAbreModalAntecipacao","setDadosAntecipacao","setValorRestante","liberadoCredito","diasPermitidoVencimento","diasAtraso","ant","verificarAntecipacoes","FormasPagamentoRecebimento","InfoNotaNFe","InfoProdutoGrade","PageGrade","updateValue","property","TabTodas","TabFornecedor","TabFuncionario","PesquisaPedidos","PesquisaOrcamento","oit_qtditem","PesquisaCondicional","PesquisaContaReceber","PesquisaContaPagar","PesquisaTributacaoIcms","PesquisaTributacaoPisCofins","pesquisaTipo","conteudoExibir","setConteudoExibir","listaNota","setListaNota","listaPedido","setListaPedido","listaOrcamento","setListaOrcamento","listaCondicional","setListaCondicional","listaTributacaoIcms","listaContasPagar","setListaContasPagar","listaContasReceber","setListaContasReceber","totalRegistros","setTotalRegistros","montarTelas","telaPessoas","pessoas","telaNota","telaPedidos","pedidos","telaCondicional","vendacondicional","telaContasReceber","contasareceber","telaContasPagar","contasapagar","telaOrcamentos","orcamentos","telaProdutos","telaTributacaoIcms","tributacaoicms","telaTributacaoPisCofins","tributacaopiscofins","busca","efetuarBusca","speed","dots","slidesToShow","slidesToScroll","FiltroProdutoNfi","ocultaListaPreco","setOcultaListaPreco","retImposto","setRetImposto","listaPrecoTemp","listaPrecoCliente","valorCusto","ope_tipoprecoutilizar","onChangeValorUnitario","dadosPreco","buscaPrecoListaPrecoSelecionada","buscarDadosIcms","FiltroProdutoPdi","setAux","abrirModalListaProd","setAbrirModalListaProd","listaDadosProdModal","setListaDadosProdModal","liberadoParaIncluir","setLiberadoParaIncluir","produtoBuscaEan","setProdutoBuscaEan","buscarDadosProdutoPedido","prod_id","listaprecoItem","custoProd","lpc","dpr_precovenda","adicionarItemPedido","adicionarItemCodBarras","itemPedido","pdi_basecalculoicms","pdi_basecalculoicmsst","pdi_basecalculoipi","pdi_percentualicms","pdi_percentualicmsst","pdi_percentualipi","proId","prg","FiltroProdutoNtf","tributacaoIcms","setTributacaoIcms","classeProduto","buscarDadosProdutoNotaTransf","setarCfopCorrespondenteTributacaoICMS","adicionarItemNotaTransferencia","cfoCfop","vlr_valorunitario","ipi","diferimento","icmst","retornoDiferimento","baseIPI","baseICMSST","ICMSST","nig_valoricmsoperacao","ICMS","nig_percicmsdiferimento","nig_valoricmsdiferimento","valorICMSDiferido","adicionarItemLeitorCodBarras","dadostributacao","resGrade","incluirProdutoExterno","prodSelecionado","itemDaLista","abrirEditarItem","salvarDadosGradeModal","FiltroProdutoOrcamento","numeroitem","EditarTabela","InputPhone","lazy","maskOptions","appended","dynamicMasked","isCellPhone","unmaskedValue","compiledMasks","PhoneInput","LancamentoCheque","infoBanco","setInfoBanco","detalhesCheque","setDetalhesCheque","listaCheques","setListaCheques","emissor","setEmissor","valorPorExtenso","pessoa_nome","selecionarCliente","popularCheque","campoValor","campoExtenso","atualizaDetalhes","cpfcnpjemissor","rgieemissor","nomeemissor","emissorclientedesde","telefoneemissor","valorUn","validarDigito","valorCheques","chq_codigocompensacao","chq_c1","chq_c2","chq_c3","valorExtenso","chq_nomeemissor","chq_cpfcnpjemissor","chq_rgieemissor","chq_telefoneemissor","chq_emissorclientedesde","chq_observacao","chq_cmc7","radioemissocheque","buscaDadosEmissorCheque","AimOutlined","buscarBanco","SlideLogin","effect","autoplay","AberturaChamado","setFile","activeIndex","setActiveIndex","onchange","arquivos","before","dataTransfer","files","listaArq","arq","handleOnClickClose","browser","isOpera","isFirefox","isSafari","isIE","documentMode","isEdge","StyleMedia","isChrome","dadosTicket","screen","availWidth","availHeight","platform","windowsPlatforms","iosPlatforms","os","getOS","dados_console","anexos","tipoArquivo","popularAnexos","chamadoAberto","numeroProtocolo","html2canvas","Editar","Duplicar","Adicionar","Imprimir","Explorar","Inutilizar","ImportarXML","ConhecimentoDeTransporteButton","NotaFiscalButton","ManifestoEletronicoButton","EmitirNotaFiscal","CancelarEstorno","EmitirNotaFiscalTransferencia","LancamentoEntrada","LancamentoSaida","Download","GerarEfdIcmsIpi","GerarEfdPisCofins","enumStatus","listarPlanoLocal","voltarHome","renovarPlano","retornoMudancaPlano","DataHora","subtrairSomarDias","NovaDataHora","validarData","inputElement","closest","inputs","currentIndex","nextInput","DataHoraInput","PesquisaCamposPersonalizados","setCampoPerSelecionado","setTipoFiltroPersonalizado","setCondicao","camposPer","setCamposPer","campoPer","PesquisaAvancada","listaCondicao","setListaCondicao","listaCondicaoReq","setListaCondicaoReq","listaCampos","setListaCampos","setListaFiltros","ehBooleano","setEhBooleano","ehData","setEhData","listaCamposBooleano","listaCamposString","listaCamposData","adicionarFiltro","validarFiltrosPreenchidos","labelCampo","labelCondicao","validarFiltrar","booleano","camposKey","removerFiltroLista","BreadcrumbAbrirChamado","InputCep","InputPercentual","NotaFiscalEntradaButton","progresso","setProgresso","exibeProg","setExibeProg","clienteOk","setClienteOk","produtoOk","setProdutoOk","deuErro","setDeuErro","listaErros","setListaErros","resCli","resProd","Paper","TableHead","FiltroProdutoKit","listaItensTemp","produtoTemp","valor_unitario","produto_id","ItensPedidoCat","FecharPedidoCatalogo","setDadosPedidos","setItensCarrinho","cliCpfCnpj","nomeCidade","codUF","GerarChavePedido","DrawerPedidoCat","setPages","DrawerGrupoCat","NotaFiscalServicoButton","DetalheRemessa","bol_nossonumero","InputPreco","SelectPaginacao","totalReg","setTotalReg","totalRegIni","setTotalRegIni","listLista","trunc","NovaData","DataInput","Endereco","alterarPropriedadeEndereco","coluna","indexPrincipal","editEndereco","removerEndereco","OrgaoSubjacente","openModalOrgaoSubjacente","setOpenModalOrgaoSubjacente","alterarPropriedade","EditableCell","Email","openModalEmail","setOpenModalEmail","alterarPropriedadeEmail","removeEmail","pem_enviarcobranca","editEmail","Telefone","openModalTelefone","setOpenModalTelefone","tagPrincipal","tagsAtivo","editingKey","alterarPropriedadeTelefone","modalExcluirTelefone","removeTelefone","tag","psc_observacao","editaTelefone","Ocupacao","openModalOcupacao","setOpenModalOcupacao","modalExcluirOcupacao","poc_id","removeOcupacao","alterarPropriedadeOcupacao","editaOcupacao","Nacionalidade","tagsData","selectedTags","setSelectedTags","openModalNacionalidade","setOpenModalNacionalidade","pse_nacionalidade","excluirNacionalidade","pen_dataentradapais","pen_observacao","nextSelectedTags","editarNacionalidade","openModalOutroContato","setOpenModalOutroContato","modalExcluirOutroContato","removeOutroContato","alterarPropriedadeOutrosContatos","editaOutroContato","PessoasAutorizadas","openModalPessoaAutorizada","setOpenModalPessoaAutorizada","removePessoaAutorizada","alterarPropriedadePessoaAutorizada","editaPessoaAutorizada","Veiculos","openModalVeiculo","setOpenModalVeiculo","trv_ativo","alterarPropriedadeVeiculo","negativo","formatDate","formatFone","formatarQuantidade","origemProduto","quantidadeItem","percDiferimento","percReducaoIcms","aliquotaIcmsSt","percMva","percReducaoIcmsST","percMvaAjustado","aliquotaIpi","eConsumidorFinal","destinatarioTemIE","eProdutorRural","eOrgaoPublico","eServico","uf_origem","uf_destino","vlr_unitario","vlr_frete","vlr_outros","vlr_descontos","identificadorDestino"],"mappings":"+GAAA,OAAe,cAA0B,2C,kCCAzC,OAAe,cAA0B,4C,kCCAzC,OAAe,cAA0B,6C,kCCAzC,OAAe,cAA0B,8C,yDCAzC,OAAe,cAA0B,uC,kCCAzC,OAAe,cAA0B,wC,kCCAzC,OAAe,g9D,kCCAf,OAAe,cAA0B,mC,kCCAzC,OAAe,g+L,kCCAf,OAAe,cAA0B,wC,kCCAzC,OAAe,cAA0B,oC,kCCAzC,OAAe,ozE,mNCEFA,EAAU,SAACC,EAAOC,GAC3B,OAAQA,EAAOC,MACX,KAAKC,IAAcC,OACf,OAAO,2BACAJ,GADP,IAEIK,GAAIJ,EAAOK,OAGnB,KAAKC,IAAkBH,OACnB,OAAO,2BACAJ,GADP,IAEIQ,WAAYP,EAAOK,OAG3B,KAAKG,IAAgBL,OACjB,OAAO,2BACAJ,GADP,IAEIU,SAAS,2BAAMV,EAAMU,UAAaT,EAAOK,QAGjD,KAAKK,IAAkBP,OACnB,OAAO,2BACAJ,GADP,IAEIY,WAAW,2BAAMZ,EAAMY,YAAeX,EAAOK,QAErD,KAAKO,IAAyBT,OAC1B,OAAO,2BACAJ,GADP,IAEIc,kBAAkB,2BAAMd,EAAMc,mBAAsBb,EAAOK,QAGnE,KAAKS,IAAsBX,OACvB,OAAO,2BACAJ,GADP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AAQyvL,EACRxvL,OAAQuvL,EACRmuC,UAAWpvO,EACXqvO,WAAYjvO,EACZgiC,WAAYmsM,EACZe,aAAcltQ,WAAWypE,GACzB0jM,UAAWntQ,WAAWuqF,GACtB6iL,WAAYptQ,WAAWwqF,GACvB6iL,cAAertQ,WAAWgrF,GAC1BulC,aAAcA,EACd67I,gBAAiBA,EACjBC,gBAAiBA,EACjBC,eAAgBA,EAChBE,kBAAmBA,EACnBD,QAASA,EACTE,gBAAiBA,EACjBC,YAAaA,EACbt4Q,qBAAsBva,SAASkU,eAC/Bu9M,sBAAuBxnG,EACvBj7G,WAAYA,EACZ8jR,iBAAkBA,EAClBG,cAAeA,EACfD,eAAgBA,EAChBD,kBAAmBA,EACnBG,SAAUA,EACV39J,cAAeA,EACfk+J,qBAAkC,OAAZtvO,EAAkB,EAAIJ,GAAYI,EAAY,EAAI,GAG1E5kD,IAAIC,KAAJ,sCAAgDJ,GAAQK,MAAK,SAAAC,GACxC,MAAfA,EAAIC,QACNiF,EAAQlF,EAAInD,SAEb,SAAAoE,GACDE,IAAaC,MAAM,CAAEC,QAAS,wCAAmCC,YAAa8Q,KAAKC,UAAUpR,EAAIC,eAChGK,SACD,oB,uDClPN,OAAe,cAA0B,sC,iCCAzC,OAAe,cAA0B,yC,iCCAzC,OAAe,cAA0B,yC,iCCAzC,OAAe,cAA0B,yC,iCCAzC,OAAe,g2L,iCCAf,OAAe,cAA0B,2C","file":"static/js/main.f6baf9ef.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/venda-liquida.347ae568.png\";","export default __webpack_public_path__ + \"static/media/compra-liquida.fddcf344.png\";","export default __webpack_public_path__ + \"static/media/posicao-estoque.21be5beb.png\";","export default __webpack_public_path__ + \"static/media/receita-despesas.53d59ada.png\";","export default __webpack_public_path__ + \"static/media/i-gerente.ae0c7a3f.png\";","export default __webpack_public_path__ + \"static/media/i-settings.821462f7.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAA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aAoXhEpKlIeT0FJvqrmXCE0AE8rEdJXQ7bjhWWkmP10uRHroCIMWSS2vLu9ykBAUCzHiMxWXHhq0UJBIAxCOjZCwHrThMOmOlZWK0eDYzZpNOpZidmXJp0wDc8JPNdOIDYE3b+8wNjjK/6OAomGtrR6aSJBD0BIvRikNg6KQyi1HdrvD3WefkdsM0CRYUupYIYHw0wmcE2U0MMzpHw+GnSK6qIGml8UciALyBSUJdqpuCgMfboau8ouetIKcs22YhlXIBCEyPh2QswUVL0KIcfm1KhG3jH7mY1c04ilcTSRy1VCrNtsn3+Q7L8N7HTy/O+eMCEFK6NoD19Veheb28Wl7D9IoNBfBSMEx63dUY1RswqjdQu7Zy4OjuG7skwI9/tG5fsdfEMA2XZgJw+oP/YMVjzPSc5c8z8znmX2ds/tnfy0J3JwvdnWT6uiiS7IdlN9offrHv329+9t9bck93kEJSUhbmsUMv89o/3iG2thgJvDnUzcaFOArB/spNfJEXXCqpUmwrLmppOfDA/TkAgCd+fs+5tsGBWqWWAwRS06jauocL5weYPHcGgK1+P8fqajn+3Sy/uzB0ab1gy3U7hj449rfsibjitoC9d9091Nl9ttJxnJwZ3NX8LMfbOoivD2e1fxzu5ZXyqxg3vOQ5cLsS77/4wqN7lvtdAQC478lDu4b7+45NXuz3K+Vgejzs+GUzH536iKnBjqxOE2ArCJeszvx00/UP/uW1Qy0rvVwBl2P/M4cfvNDd9ZLH9PjXNe7SO7/8P+mqAgpLwlZhQcFszcTUSKUtnn7q4AMf/pDH9ydqE9NJJ/ALAAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/caixa.c2e705db.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAACdAAAAnQGPcuduAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsD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SPdr2QDmjcxlip64wsbn9cXz2mISbo882fHHmNMKOQ8p1ud4zRF4IQKzc1HT8579pmLPl6LiSLemQTXV/mkJIYQwg7oh6CaA1Wgh8iRSx1st4SlUoIRgcyfLVhxpYu3oZ5AvEk4O8/PwOPM+jIGVxkesGNjafSzffP59k0KGgwTP/6Q95Z5loJYkmU5R23kBLCUJcEbfOegdSt2pOkUilybl5xM166MlZ1sikoUE2trWipcDcVVKfEzEIalovEhjJYqQE2At0+HwOf2s6ydZ3D3D1Ri+bXttJLl9A3bzzFqDTyuKR+DUWdsfJKnVvESMEys1j5dybLm4iBfwASFcmNOlz3WTiSUKtCSq1jRE0Ai/dfu94HvO6uvHE5918vn6N+a/dyMBuKdUXHiqp+EXqk2uz32/u9tVZ4Z664pI3C0Y/AxQ+G7cQSG0Qd69E5h7E/2/8ewB4qBNMvOd67AAAAABJRU5ErkJggg==\"","export default __webpack_public_path__ + \"static/media/i-password.32016030.png\";","export default __webpack_public_path__ + \"static/media/i-chat.734a99c5.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vb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PZVhXKuyRCUco6RbruNohiuEChKw03ThVCKwiQRtwskaxQ3pU9OcJiBnw+aAQezmQLMm1m7HLYYE80/Z7btyMDz6emscg+BHLehmWRfObbynO4drwAqfHR6+bSrTHQBrhIIvlKuxxqjMOSG87UBFUBOeKMOpTEBxHLlnEo7VJtLykSWZVgZC4zyRyF7TR2SgvwcBpm21quRFRj9PAW5DpTEMlKg8WCIUSxKKJSZFD91bVhQGdFpAx3NdsgcUzKoFKkTY0hH9w+xDEzfBIsGIU+UotpU4rUs1gtXAKGedO6/73Qoo63b9TH6pUi8p0wqm4JhxrBhengqifzQREPtFvoAUMkgdFQ3iUR6jFzNFSy2N8XeNR95TDh9WHK50er24t3Q4GNqqgM5Q07unLnlJtkyYolk150Nvego2sAnkQehaV6CJyEfreI2qZnsCZbkbfbhaydmeAFXinwKpRP9T5JoOHtrMfvev+iHb3ddOEFV0/31VwTihwCDjzxkI+rz2nMRpSW5SODehpFL2EvVTEW6WZMbHrc3N7T8Tl13cup55Ft0qBpfF6lXetx9vKxVqroIAn8VE7xa7kyQWfQOe3ZaY3UZsPmRgKiugDx7OmJjePDE0VrBSJ+SMiRc6Ha6Zn2VY9PeopmJmdildaB9iAmPsZjjY9tijUbKzpuV/T/8dfK2si7eNMgBsUculuSeJ77QbZ0tN+6NLeZZ38JMADHSB3ZYeASkAAAAABJRU5ErkJggg==\"","import { drawerActions, manutencaoActions, listagemActions, tributacaoActions, listaTabelaDadosActions, parametrosEmpresaActions, selectPaginadoActions } from '../actions'\r\n\r\nexport const reducer = (state, action) => {\r\n switch (action.type) {\r\n case drawerActions.CHANGE:\r\n return {\r\n ...state,\r\n ui: action.data\r\n };\r\n\r\n case manutencaoActions.CHANGE:\r\n return {\r\n ...state,\r\n manutencao: action.data\r\n };\r\n\r\n case listagemActions.CHANGE:\r\n return {\r\n ...state,\r\n listagem: { ...state.listagem, ...action.data }\r\n };\r\n\r\n case tributacaoActions.CHANGE:\r\n return {\r\n ...state,\r\n tributacao: { ...state.tributacao, ...action.data }\r\n };\r\n case parametrosEmpresaActions.CHANGE:\r\n return {\r\n ...state,\r\n parametrosEmpresa: { ...state.parametrosEmpresa, ...action.data }\r\n };\r\n\r\n case selectPaginadoActions.CHANGE:\r\n return {\r\n ...state,\r\n listaSelectPaginacao: action.data\r\n };\r\n\r\n case listaTabelaDadosActions.CHANGE:\r\n return {\r\n ...state,\r\n listaTabelaDados: action.data\r\n }\r\n default:\r\n return state;\r\n }\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Layout, Row, Col, Typography, Form, Input, Checkbox, Button, notification } from 'antd';\r\nimport { UnlockFilled, MailOutlined, SmileOutlined, SendOutlined, DesktopOutlined, EnvironmentOutlined, PhoneOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport { EsqueciSenha, SelecoesEmpresa } from \"./pages\";\r\nimport { login, setNomeUsuario, setIdUsuario, setEmailUsuario, getIdUsuario, setTelaAnterior, removerTelaAnt, removerLocal, setDadosUsuario } from '../../services/auth';\r\n\r\nimport { ModulosPage, SlideLogin } from \"../../components\";\r\nimport { encodeBase64, parseToken } from '../../services/funcoes';\r\n\r\nconst FORMULARIO = {\r\n LOGIN: 1,\r\n SELECIONA_EMPRESA: 2,\r\n ESQUECI_SENHA: 3,\r\n}\r\n\r\nexport default function Login() {\r\n\r\n const [formularioExibir, setFormularioExibir] = useState(FORMULARIO.LOGIN);\r\n const [carregando, setCarregando] = useState(false);\r\n const [formulario] = Form.useForm();\r\n\r\n const onFinish = values => {\r\n setCarregando(true);\r\n values.senha = encodeBase64(values.senha);\r\n delete values.remember;\r\n api.post('Login/EfetuarLogin', values).then(res => {\r\n if (res.status === 200) {\r\n const token = res.data;\r\n let dadosUsuario = parseToken(res.data);\r\n setNomeUsuario(dadosUsuario.name);\r\n if (parseInt(getIdUsuario()) !== parseInt(dadosUsuario.UsuarioID)) {\r\n removerTelaAnt()\r\n }\r\n setDadosUsuario(dadosUsuario);\r\n setIdUsuario(dadosUsuario.UsuarioID);\r\n setEmailUsuario(dadosUsuario.email);\r\n login(token);\r\n removerLocal();\r\n setFormularioExibir(FORMULARIO.SELECIONA_EMPRESA);\r\n }\r\n }).catch( err => {\r\n if (!!err) {\r\n if (!!err.response && !!err.response.data) {\r\n notification.error({ message: err.response.data || 'Falha ao efetuar o login' });\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n }).finally(() => setCarregando(false));\r\n };\r\n\r\n const onFinishFailed = errorInfo => {\r\n console.log('Erro ao efetuar o login:', errorInfo);\r\n };\r\n\r\n useEffect(() => {\r\n localStorage.removeItem(\"@GestorWeb-Token\");\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n Identifique abaixo suas credenciais para realizar o acesso.

\r\n
\r\n \r\n
\r\n {formularioExibir === FORMULARIO.LOGIN &&\r\n
\r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n Salvar meus dados de login\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n }\r\n {formularioExibir === FORMULARIO.SELECIONA_EMPRESA && }\r\n {formularioExibir === FORMULARIO.ESQUECI_SENHA && setFormularioExibir(FORMULARIO.LOGIN)} />}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n www.gestorweb.com.br | (55) 3535-4922\r\n \r\n \r\n | Três de Maio - RS - 98910-000\r\n \r\n \r\n \r\n \r\n Todos os direitos reservados - Gestor Web ®\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Layout, Row, Col, Form, Input, Button, notification, Typography } from 'antd';\r\nimport { UnlockFilled, SendOutlined, DesktopOutlined, PhoneOutlined, EnvironmentOutlined } from '@ant-design/icons';\r\n\r\nimport { SlideLogin } from \"../../components\";\r\nimport api from '../../services/api';\r\n\r\nexport default function RecuperarSenha() {\r\n const [usuarioEmail, setUsuarioEmail] = useState('');\r\n const [validaHash, setValidaHash] = useState(false);\r\n const [form] = Form.useForm();\r\n\r\n useEffect(() => {\r\n let email = atob(window.location.href.split('usu=')[1]);\r\n setUsuarioEmail(email);\r\n verificarHashParaAlterarSenha();\r\n }, []);\r\n\r\n function verificarHashParaAlterarSenha() {\r\n api.get(`Usuario/VeriricarHashParaAlterarSenha/${atob(window.location.href.split('usu=')[1])}`).then(\r\n res => {\r\n if (res.data) {\r\n console.log(res.data)\r\n setValidaHash(true);\r\n } else {\r\n notification.warn({ description: 'Sua Senha Foi Alterada Recentemente, tente novamente mais tarde!', message: 'Aviso' });\r\n voltarLogin();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro.response);\r\n // if (erro.response.data.Message === \"Tempo para alterar a senha exgotado!\") {\r\n notification.warn({ description: \"Tempo limite de 30 minutos para alterar a senha exgotado! Tente novamente mais tarde!\", message: \"Aviso\" });\r\n voltarLogin();\r\n //}\r\n }\r\n );\r\n };\r\n\r\n function alterarSenha() {\r\n if (validaHash) {\r\n if (form.getFieldValue().usu_senha === form.getFieldValue().usu_confirmaSenha) {\r\n let dados = {\r\n novaSenha: btoa(form.getFieldValue().usu_senha),\r\n usu_email: usuarioEmail\r\n };\r\n api.put(`Usuario/AlterarSenha`, dados).then(\r\n res => {\r\n notification.success({ description: 'Sua Senha Foi Alterada Com Sucesso!', message: 'Aviso' });\r\n voltarLogin();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n notification.warn({ description: 'As senhas informadas não conferem, favor verificar!', message: 'Aviso' })\r\n }\r\n } else {\r\n notification.warn({ description: 'Não foi possivel validar hash, Tempo esgotado, favor enviar novo pedido de recuperação de senha!', message: 'Aviso' })\r\n }\r\n };\r\n\r\n function voltarLogin() {\r\n setTimeout(() => { window.location = '/#/' }, 2000);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value || getFieldValue('usu_senha') === value) {\r\n return Promise.resolve();\r\n }\r\n\r\n return Promise.reject(new Error('As senhas informadas não conferem!'));\r\n },\r\n }),]}>\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n www.gestorweb.com.br | (55) 3535-4922\r\n \r\n \r\n | Três de Maio - RS - 98910-000\r\n \r\n \r\n \r\n \r\n Copyright © Gestor Web 2022 - Todos os direitos reservados\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Layout, Row, Col, Form, Input, Button, notification, Typography } from 'antd';\r\nimport { UnlockFilled, SendOutlined, DesktopOutlined, PhoneOutlined, EnvironmentOutlined } from '@ant-design/icons';\r\n\r\nimport { SlideLogin } from \"../../components\";\r\nimport api from '../../services/api';\r\n\r\nexport default function RecuperarSenhaGerencial() {\r\n\r\n const [usuarioEmail, setUsuarioEmail] = useState('');\r\n const [validaHash, setValidaHash] = useState(false);\r\n const [form] = Form.useForm();\r\n\r\n useEffect(() => {\r\n let email = atob(window.location.href.split('usu=')[1]);\r\n setUsuarioEmail(email);\r\n verificarHashParaAlterarSenha();\r\n }, []);\r\n\r\n function verificarHashParaAlterarSenha() {\r\n api.get(`Usuario/VeriricarHashParaAlterarSenha/${atob(window.location.href.split('usu=')[1])}`).then(\r\n res => {\r\n if (res.data) {\r\n console.log(res.data)\r\n setValidaHash(true);\r\n } else {\r\n notification.warn({ description: 'Sua Senha Foi Alterada Recentemente, tente novamente mais tarde!', message: 'Aviso' });\r\n voltarLogin();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro.response);\r\n // if (erro.response.data.Message === \"Tempo para alterar a senha exgotado!\") {\r\n notification.warn({ description: \"Tempo limite de 30 minutos para alterar a senha exgotado! Tente novamente mais tarde!\", message: \"Aviso\" });\r\n voltarLogin();\r\n //}\r\n }\r\n );\r\n };\r\n\r\n function alterarSenha() {\r\n if (validaHash) {\r\n if (form.getFieldValue().usu_senha === form.getFieldValue().usu_confirmaSenha) {\r\n let dados = {\r\n novaSenha: btoa(form.getFieldValue().usu_senha),\r\n usu_email: usuarioEmail\r\n };\r\n api.put(`Usuario/AlterarSenhaGerencial`, dados).then(\r\n res => {\r\n notification.success({ description: 'Sua Senha Foi Alterada Com Sucesso!', message: 'Aviso' });\r\n voltarLogin();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n notification.warn({ description: 'As senhas informadas não conferem, favor verificar!', message: 'Aviso' })\r\n }\r\n } else {\r\n notification.warn({ description: 'Não foi possivel validar hash, Tempo esgotado, favor enviar novo pedido de recuperação de senha!', message: 'Aviso' })\r\n }\r\n };\r\n\r\n function voltarLogin() {\r\n setTimeout(() => { window.location = '/#/' }, 2000);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value || getFieldValue('usu_senha') === value) {\r\n return Promise.resolve();\r\n }\r\n\r\n return Promise.reject(new Error('As senhas informadas não conferem!'));\r\n },\r\n }),]}>\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n www.gestorweb.com.br | (55) 3535-4922\r\n \r\n \r\n | Três de Maio - RS - 98910-000\r\n \r\n \r\n \r\n \r\n Copyright © Gestor Web 2022 - Todos os direitos reservados\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Layout, Row, Col, Form, Input, Button, Typography, Modal } from 'antd';\r\nimport { UnlockFilled, SendOutlined } from '@ant-design/icons';\r\n\r\nimport api from \"../../services/api\";\r\nimport { SlideLogin } from \"../../components\";\r\n\r\nexport default function AtivarConta() {\r\n const [dadosUsuario, setDadosUsuario] = useState({});\r\n const [senhaValida, setSenhaValida] = useState(false);\r\n const [form] = Form.useForm();\r\n\r\n useEffect(() => {\r\n carregarUsuario();\r\n }, []);\r\n\r\n function carregarUsuario() {\r\n let url = window.location.href;\r\n let dadosUsuario = atob(url.substr(url.lastIndexOf('/') + 1)).split('|');\r\n api.get(`Usuario/RetornaUsuarioEmail?email=${dadosUsuario[0]}`).then(\r\n res => {\r\n if (!!res.data) {\r\n if (!!res.data.usu_ativo) {\r\n Modal.warning({\r\n title: 'Atenção!',\r\n content: 'Usuário já está ativo!',\r\n onOk() {\r\n voltarLogin();\r\n }\r\n });\r\n } else {\r\n setDadosUsuario(res.data)\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function ativarUsuario() {\r\n let dados = {};\r\n dados.usu_email = dadosUsuario.usu_email;\r\n dados.novaSenha = btoa(form.getFieldValue().usu_senha);\r\n api.put(`Usuario/AtivarUsuario`, dados).then(\r\n res => {\r\n Modal.success({\r\n title: 'Aviso!',\r\n content: 'Sua conta foi ativada com sucesso!',\r\n onOk() {\r\n voltarLogin();\r\n }\r\n });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarSenha() {\r\n let usu_senha = '';\r\n let usu_confirmaSenha = '';\r\n if (!!form.getFieldValue().usu_senha) {\r\n usu_senha = form.getFieldValue().usu_senha.trim();\r\n }\r\n if (!!form.getFieldValue().usu_confirmaSenha) {\r\n usu_confirmaSenha = form.getFieldValue().usu_confirmaSenha.trim();\r\n }\r\n\r\n form.setFieldsValue({ usu_senha: usu_senha, usu_confirmaSenha: usu_confirmaSenha });\r\n if (usu_senha.length >= 6 && usu_senha === usu_confirmaSenha) {\r\n let letrasMinusculas = /[a-z]+/.test(usu_senha);\r\n let letrasMaiusculas = /[A-Z]+/.test(usu_senha);\r\n let numeros = /[0-9]+/.test(usu_senha);\r\n if (letrasMinusculas && letrasMaiusculas && numeros) {\r\n setSenhaValida(true);\r\n } else {\r\n setSenhaValida(false);\r\n }\r\n } else {\r\n setSenhaValida(false);\r\n }\r\n };\r\n\r\n function voltarLogin() {\r\n setTimeout(() => {\r\n window.location = '/#/';\r\n }, 2000);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n Olá {dadosUsuario.usu_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Antes de ativar sua conta, precisamos definir sua senha de acesso.
\r\n A senha deve atender os seguintes requisitos:

\r\n
\r\n \r\n \r\n 1. Mínimo de 6 caracteres;\r\n \r\n \r\n 2. Deve conter números e letras (maiúsculas e minúsculas);\r\n \r\n
\r\n \r\n \r\n \r\n } onChange={() => { validarSenha() }}/>\r\n \r\n \r\n \r\n \r\n } onChange={() => { validarSenha() }}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n}","import React, { useState } from 'react';\r\nimport {Row, Button, Result,Form, Card, notification, Drawer, List} from 'antd';\r\nimport { useHistory } from \"react-router-dom\";\r\nimport api from '../../services/api';\r\nimport { login } from '../../services/auth';\r\n\r\nimport iconEntidade from '../../assets/i-contato.png';\r\nexport default function AtivarNovoEmail() {\r\n const history = useHistory();\r\n const [form] = Form.useForm();\r\n const [ carregando, setCarregando ] = useState(false);\r\n const [ selecionarEntidade, setSelecionarEntidade ] = useState(false);\r\n const [ entidadeUsuario, setEntidadesUsuario ] = useState([]);\r\n \r\n const onFinish = values => {\r\n setCarregando(true);\r\n api.post('/auth', values).then(res => {\r\n if (res.status === 200) {\r\n const token = res.data.token;\r\n login(token);\r\n console.log('entidade logado');\r\n //history.push('/home');\r\n }\r\n }, err => {\r\n notification.error({ message: err.response.data.mensagem, description: 'Verifique os dados informados e tente novamente.' });\r\n }).finally(() => setCarregando(false));\r\n };\r\n\r\n const onFinishFailed = errorInfo => {\r\n console.log('Failed:', errorInfo);\r\n };\r\n\r\n function acessarEntidade(entidade) {\r\n setCarregando(true);\r\n api.post('/auth/entidade', { empresa_id: entidade.id }).then(res => {\r\n login(res.data.token);\r\n \r\n //history.push('/home');\r\n }, err => {\r\n notification.error({ message: 'Erro ao carregar os dados', description: err.response.data.mensagem });\r\n }).finally(() => setCarregando(false));\r\n }\r\n\r\n return (\r\n \r\n
\r\n







\r\n \r\n \r\n
\r\n ]}\r\n />,\r\n setSelecionarEntidade(false)} visible={selecionarEntidade}>\r\n (\r\n \r\n } onClick={() => acessarEntidade(item)}>\r\n \r\n

{item.nomefantasia}

\r\n \r\n ]}/>\r\n
\r\n
\r\n )} />\r\n
\r\n \r\n );\r\n \r\n}","import React from \"react\";\r\nimport { Col, Form, Input, notification, Row } from \"antd\";\r\nimport InputNumber from \"rc-input-number\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function ManutencaoEtiquetaServidor({ formulario, carregando, aoSalvar }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = record => {\r\n let operacao = 'Incluir';\r\n if (!!record.met_id) {\r\n operacao = 'AlterarAsync';\r\n }\r\n carregando(true);\r\n api.post(`ModeloEtiqueta/${operacao}`, record).then(\r\n res => {\r\n notification.success({ description: `Modelo ${operacao === 'Incluir' ? 'incluído' : 'editado'} com sucesso!`, message: `Aviso` });\r\n aoSalvar();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};","import React, { useState } from 'react';\r\nimport { Button, Col, Form, Modal, Row } from 'antd';\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from '@ant-design/icons';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoEtiquetaServidor from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerEtiquetaServidor() {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formulario.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-met_descricao' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n }\r\n footer={\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n }>\r\n { fecharDrawer() }} />\r\n
\r\n
\r\n );\r\n};","import React, { useEffect } from \"react\";\r\nimport { Col, notification, Row, Tag, Modal } from \"antd\";\r\nimport { DeleteOutlined, EditFilled, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport DrawerEtiquetaServidor from \"./drawer\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, EditarTabela, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\n\r\n\r\nexport default function EtiquetaServidor() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-met_descricao' } })\r\n }, []);\r\n\r\n function editarModelo(registro) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n };\r\n\r\n function modalExcluirModelo(registro) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o modelo selecionado?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerModelo(registro);\r\n }\r\n });\r\n };\r\n\r\n function removerModelo(registro) {\r\n api.delete(`ModeloEtiqueta/ExcluirAsync?Id=${registro.met_id}`).then(\r\n res => {\r\n if (res.data) {\r\n notification.success({ description: 'Modelo removido com sucesso!' });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-met_descricao' } });\r\n } else {\r\n notification.warning({ description: 'Modelo não foi removido!' });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n \r\n {met_id}\r\n \r\n \r\n \r\n {met_descricao}\r\n \r\n \r\n Colunas {met_colunas}\r\n \r\n \r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (registro) => (\r\n \r\n {/* \r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Upload, Button, notification, Form, Typography, Divider, Modal } from \"antd\";\r\n\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { getBase64, validarImportacao } from \"../../services/funcoes\";\r\nimport { CloudUploadOutlined } from \"@ant-design/icons\";\r\nimport { BreadcrumbPage } from \"../../components\";\r\nimport api from \"../../services/api\";\r\nimport { getEntidadeImp, setEntidadeImp } from \"../../services/auth\";\r\n\r\nexport default function ImportarPessoa() {\r\n const [arquivoBase64, setArquivoBase64] = useState(\"\");\r\n const [arquivo, setArquivo] = useState(null);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [entidade, setEntidade] = useState();\r\n const [carregando, setCarregando] = useState(false);\r\n const apiArquivo = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('homologacao') > -1 ? 'http://homologacao.gestorweb.com.br/' : 'https://app.gestorweb.com.br/';\r\n\r\n const listaEntidades = {\r\n 0: 'Cliente',\r\n 1: 'Fornecedor',\r\n 2: 'Transportador',\r\n 3: 'Funcionario',\r\n 4: 'Vendedor',\r\n 5: 'Produto'\r\n };\r\n\r\n const listaDocumentosPadrao = {\r\n 0: 'ImportarCliente.xlsx',\r\n 1: 'ImportarFornecedores.xlsx',\r\n 2: 'ImportarTransportador.xlsx',\r\n 3: 'ImportarFuncionario.xlsx',\r\n 4: 'ImportarVendedores.xlsx',\r\n 5: 'ImportarProdutos.xlsx'\r\n };\r\n\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n showUploadList: false,\r\n maxCount: 1,\r\n disabled: !!arquivo,\r\n beforeUpload(file) {\r\n if (file.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {\r\n notification.warning({ description: 'Favor informar uma planilha no formato XLSX!', message: 'Aviso' });\r\n return false;\r\n }\r\n getBase64(file).then(base64 => {\r\n setArquivoBase64(base64);\r\n setArquivo(file);\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!!!entidade) {\r\n setEntidade(getEntidadeImp());\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && (!!manutencao.dados.entidade || manutencao.dados.entidade === 0)) {\r\n setEntidade(manutencao.dados.entidade);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!entidade || entidade === 0) {\r\n setEntidadeImp(entidade);\r\n }\r\n }, [entidade])\r\n\r\n function importar() {\r\n setCarregando(true);\r\n api.post(`ImportarDados/Importar`, { entidade: { Value: listaEntidades[entidade] }, dados: { Value: arquivoBase64 } }).then(\r\n (res) => {\r\n if (!!res.data) {\r\n validarImportacao(res.data, listaEntidades[entidade]);\r\n } else {\r\n Modal.error({ title: `Não foi possivel importar a planilha de ${listaEntidades[entidade]}` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n notification.warning({ description: erro.response.data.Message, message: 'Aviso' });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n excluir();\r\n }\r\n );\r\n };\r\n\r\n function excluir() {\r\n setArquivoBase64(\"\");\r\n setArquivo(null);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {`Importar Importar dados do cadastro de {entidade === 3 ? 'Funcionário' : listaEntidades[entidade]}\r\n \r\n \r\n Importe aqui os dados a partir de uma planilha padrão para o GestorWeb\r\n \r\n \r\n \r\n \r\n {!!!arquivo &&
\r\n \r\n \r\n

\r\n \r\n

\r\n \r\n \r\n

Arraste a planilha aqui! (o arquivo deve estar no formato .xlsx)

\r\n \r\n \r\n \r\n \r\n
\r\n
}\r\n {!!arquivo &&
\r\n \r\n \r\n \r\n \r\n \r\n {arquivo.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
}\r\n
\r\n \r\n Clique aqui para realizar o download da planilha modelo para importar os dados.\r\n \r\n
\r\n
\r\n );\r\n};","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, notification } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { FormGW, InputPreco } from \"../../components\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function ManutencaoAntecipacao({ formulario, carregando, aoSalvar }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = record => {\r\n record.acf_entradasaida = 2;\r\n carregando(true);\r\n api.post(`AntecipacaoClienteFornecedor/IncluirAntecipacao`, record).then(\r\n res => {\r\n notification.success({ description: \"Antecipação incluída com sucesso!\", message: \"Aviso\" })\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n ({cf.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoAntecipacao from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerAntecipacao({ dataPesquisa }) {\r\n\r\n const [form] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados) {\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bfpg_descricao' } });\r\n form.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport moment from 'moment';\r\nimport { Row, Col, Form, Button, Collapse, Modal, notification, Tag, Radio } from 'antd';\r\nimport { ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, PrinterOutlined, DeleteOutlined, ExclamationCircleOutlined, CloseOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber, FormatDate } from \"../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from '../../actions';\r\nimport { TabelaDados, Excluir, Imprimir, Data, BreadcrumbIncluirDados, FiltroSearch } from '../../components';\r\nimport { linkApi } from '../../services/auth';\r\nimport DrawerAntecipacao from './drawer';\r\nimport ComboData from '../../components/comboData';\r\n\r\nexport default function AntecipacaoClienteForncedor() {\r\n\r\n const [open, setOpen] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [parametrosValePresente] = Form.useForm();\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [dataAtual] = useState(new Date());\r\n\r\n useEffect(() => {\r\n let _tipoPessoa = !!!parametrosValePresente.getFieldsValue().tipoPessoa ? 2 : parametrosValePresente.getFieldsValue().tipoPessoa;\r\n parametrosValePresente.setFieldsValue({ DataFinal: moment(new Date()) });\r\n parametrosValePresente.setFieldsValue({ DataInicial: moment(parametrosValePresente.getFieldValue().dataPesquisa) });\r\n parametrosValePresente.setFieldsValue({ tipoPessoa: 2 });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bfpg_descricao' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${moment(parametrosValePresente.getFieldValue().DataFinal).format('YYYY-MM-DD')}&dataInicial=${moment(parametrosValePresente.getFieldValue().DataInicial).format('YYYY-MM-DD')}&EntradaSaida=${_tipoPessoa}&filtro=` } })\r\n }, []);\r\n\r\n function aplicarFiltrosAvancados() {\r\n let filtros = '';\r\n filtros += `&SomenteAtivos=true`;\r\n filtros += `&EntradaSaida=${parametrosValePresente.getFieldValue().tipoPessoa}`\r\n filtros += `&dataInicial=${(!!!parametrosValePresente.getFieldValue().DataInicial ? moment(dataAtual).format(\"YYYY-MM-DD\") : moment(parametrosValePresente.getFieldValue().DataInicial).format('YYYY-MM-DD'))}`;\r\n filtros += `&dataFinal=${(!!!parametrosValePresente.getFieldValue().DataFinal ? moment(dataAtual).format(\"YYYY-MM-DD\") : moment(parametrosValePresente.getFieldValue().DataFinal).format('YYYY-MM-DD'))}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros } });\r\n };\r\n\r\n const modalImprimir = (record) => {\r\n Modal.confirm({\r\n title: 'Imprimir',\r\n icon: ,\r\n content: `Confirmar impressao do vale ${record.acf_nomepresenteado} no valor de ${FormatNumber(record.acf_valor, true)}?`,\r\n okText: 'Imprimir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n imprimir(record);\r\n }\r\n });\r\n };\r\n\r\n function excluirVale(valePresente) {\r\n api.post(`AntecipacaoClienteFornecedor/ExcluirValePresente/${valePresente.acf_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: `Aviso!`, description: erro.response.data });\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bfpg_descricao' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&SomenteAtivos=true&dataFinal=${moment(parametrosValePresente.getFieldValue().DataFinal).format('YYYY-MM-DD')}&dataInicial=${moment(parametrosValePresente.getFieldValue().DataInicial).format('YYYY-MM-DD')}&filtro=` } })\r\n }\r\n );\r\n };\r\n\r\n const modalExcluirVale = (ValePresente) => {\r\n let mensagem = (ValePresente.acf_valepresente ? `Deseja realmente excluir o Vale de R$ ${FormatNumber(ValePresente.acf_valor, true)} presenteado à ${ValePresente.acf_nomepresenteado} ?` : `Deseja realmente excluir a antecipação do cliente ${ValePresente.pes_nome} no valor de R$ ${FormatNumber(ValePresente.acf_valor, true)}?`)\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: mensagem,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirVale(ValePresente);\r\n }\r\n });\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const imprimir = ValePresente => {\r\n window.open(linkApi + 'AntecipacaoClienteFornecedor/GerarComprovante?idValePresente=' + ValePresente.acf_id, \"_blank\");\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n let filtros = '';\r\n filtros += `&SomenteAtivos=true`;\r\n filtros += `&EntradaSaida=${parametrosValePresente.getFieldValue().tipoPessoa}`\r\n filtros += `&dataInicial=${moment(parametrosValePresente.getFieldValue().dataPesquisa).format('YYYY-MM-DD')}`;\r\n filtros += `&dataFinal=${FormatDate(new Date().toLocaleDateString())}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros } });\r\n parametrosValePresente.setFieldsValue({ DataFinal: moment(new Date()) });\r\n parametrosValePresente.setFieldsValue({ DataInicial: moment(parametrosValePresente.getFieldValue().dataPesquisa) });\r\n }} />\r\n \r\n \r\n \r\n aplicarFiltrosAvancados()}>\r\n Cliente\r\n Fornecedor\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n (\r\n
\r\n \r\n \r\n {pes_nome}\r\n \r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 100,\r\n render: ({ acf_datalancamento }) => (\r\n
\r\n {moment(acf_datalancamento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n render: ({ acf_valor }) => (\r\n
\r\n {FormatNumber(acf_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Utilizado (R$)',\r\n align: 'right',\r\n render: ({ valorUtilizado }) => (\r\n
\r\n {FormatNumber(valorUtilizado, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Saldo (R$)',\r\n align: 'right',\r\n render: ({ saldoAntecipacao }) => (\r\n
\r\n {FormatNumber(saldoAntecipacao, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record, dados) => (\r\n
\r\n \r\n \r\n } onClick={() => { modalImprimir(dados) }} />\r\n \r\n \r\n modalExcluirVale(dados)} icon={} />\r\n \r\n \r\n
\r\n ),\r\n }\r\n ]} />\r\n \r\n
\r\n
\r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Col, Row, Typography } from 'antd';\r\n\r\nimport { Planos } from \"../\";\r\nimport { BreadcrumbAbrirChamado } from \"../../components\";\r\n\r\nexport default function SemAcesso() {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seu plano atual não possui esta opção.\r\n \r\n \r\n \r\n \r\n Consulte nossos planos e faça um upgrade!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, notification, InputNumber } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport api from \"../../services/api\";\r\n\r\nexport default function ManutencaoAliquotaSimples({ form, carregando, aoSalvar }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = values => {\r\n let enderecoUrl = 'AliquotaSimplesNacional/';\r\n carregando(true);\r\n\r\n if (values.asn_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: 'Registro alterado com sucesso!', message: 'Aviso' });\r\n aoSalvar();\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: 'Registro alterado com sucesso!', message: 'Aviso' });\r\n aoSalvar();\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n };\r\n };\r\n\r\n useEffect(() => {\r\n if (!!ui.showDrawer) {\r\n buscarDados();\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n function buscarDados() {\r\n let data = new Date();\r\n api.get(`AliquotaSimplesNacional/Listar?mes=${data.getMonth() + 1}&ano=${data.getFullYear()}`).then(\r\n res => {\r\n let dados = res.data.items[0];\r\n if (!!!dados) {\r\n\r\n let dataAtual = new Date();\r\n dados = { asn_mes: dataAtual.getMonth() + 1, asn_ano: dataAtual.getFullYear() };\r\n }\r\n form.setFieldsValue(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n
\r\n
\r\n )\r\n};","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoAntecipacao from './manutencao';\r\nimport { drawerActions, listagemActions } from '../../actions';\r\n\r\nexport default function DrawerAliquotaSimples({ dataPesquisa }) {\r\n\r\n const [form] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-asn_id' } });\r\n form.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col } from 'antd';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\nimport { TabelaDados, BreadcrumbPage, BotaoIncluirDados } from '../../components';\r\nimport DrawerAliquotaSimples from './drawer';\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function AliquotaSimples() {\r\n const [{ ui, listaTabelaDados }, dispatch] = useStateValue();\r\n const [possuiAliquotaMes, setPossuiAliquotaMes] = useState(true);\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-asn_id' } });\r\n }, []);\r\n\r\n function retornaMesExtenso(mes) {\r\n switch (mes) {\r\n case 1:\r\n return 'Janeiro';\r\n case 2:\r\n return 'Fevereiro';\r\n case 3:\r\n return 'Março';\r\n case 4:\r\n return 'Abril';\r\n case 5:\r\n return 'Março';\r\n case 6:\r\n return 'Junho';\r\n case 7:\r\n return 'Julho';\r\n case 8:\r\n return 'Agosto';\r\n case 9:\r\n return 'Setembro';\r\n case 10:\r\n return 'Outubro';\r\n case 11:\r\n return 'Novembro';\r\n case 12:\r\n return 'Dezembro';\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!!listaTabelaDados.itens && listaTabelaDados.itens.length > 0) {\r\n if (listaTabelaDados.itens[0].asn_mes !== (new Date().getMonth() + 1)) {\r\n setPossuiAliquotaMes(false);\r\n } else {\r\n setPossuiAliquotaMes(true);\r\n }\r\n } else {\r\n setPossuiAliquotaMes(false);\r\n }\r\n }, [listaTabelaDados.itens])\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {possuiAliquotaMes ? 'ALTERAR' : 'INCLUIR'} {retornaMesExtenso(new Date().getMonth() + 1).toUpperCase()}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {retornaMesExtenso(asn_mes)}\r\n
\r\n )\r\n }, {\r\n title: 'Ano',\r\n render: ({ asn_ano }) => (\r\n
\r\n {asn_ano}\r\n
\r\n )\r\n }, {\r\n title: 'Alíquota (%)',\r\n align: 'right',\r\n render: ({ asn_percaliquota }) => (\r\n
\r\n {FormatNumber(asn_percaliquota, true, false, 2)}\r\n
\r\n )\r\n }\r\n ]}\r\n />\r\n
\r\n \r\n
\r\n )\r\n};","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, Drawer } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, RetweetOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoGrupoProduto from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerGrupoProduto({openDrawerGrupo, setOpenDrawerGrupo, cadGrupo, retornoSalvar}) {\r\n\r\n const [formGrupoProduto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) {\r\n formGrupoProduto.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formGrupoProduto.setFieldsValue({gru_ativo:true});\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n } \r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n formGrupoProduto.resetFields();\r\n\r\n if(!!openDrawerGrupo) {\r\n setOpenDrawerGrupo(false);\r\n }\r\n else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n \r\n return (\r\n\r\n }\r\n onClose={() => onClose()}\r\n footer={\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n }> \r\n \r\n
\r\n\r\n )\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, Drawer } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoSubGrupo from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerSubGrupo({editando, openDrawerSubGp, setOpenDrawerSubGp, cadSubGp, retornoSalvar, gruId}) {\r\n\r\n const [ formSubGrupo ] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null ) {\r\n formSubGrupo.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formSubGrupo.setFieldsValue({sgb_ativo:true})\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n }\r\n \r\n fecharDrawer();\r\n }\r\n function fecharDrawer() {\r\n formSubGrupo.resetFields();\r\n\r\n if(!!openDrawerSubGp){\r\n setOpenDrawerSubGp(false);\r\n }\r\n else {\r\n editando.setEditando(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+sgp_nome' } });\r\n }\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n onClose={() => onClose()}\r\n footer={\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n }> \r\n \r\n
\r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Divider, Form, Input, notification, Row, Select, Typography } from \"antd\";\r\nimport { SelectPaginacao, SelectPaginado } from \"../../components\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport { getRegimeTributario } from \"../../services/auth\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabFreteTributario({ formulario }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [regimeTrib, setRegimeTrib] = useState(parseInt(getRegimeTributario()));\r\n \r\n useEffect(() => carregarDados(), []);\r\n\r\n function carregarDados() {\r\n\r\n let lista = [];\r\n if (!!manutencao.dados?.icm_id)\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: manutencao.dados?.icm_id })\r\n\r\n if (!!manutencao.dados?.pis_id)\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: manutencao.dados?.pis_id });\r\n\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n };\r\n\r\n \r\n return (\r\n
\r\n \r\n \r\n \r\n \"Dados Dados Tributários\r\n \r\n \r\n Defina as Tributações do Frete.\r\n \r\n \r\n \r\n \r\n ({icms.icm_id} - {icms.icm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n ({pis.pis_id} - {pis.pis_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}","import { useEffect, useState } from \"react\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport DrawerGrupoProduto from \"../grupoProdutos/drawer\";\r\nimport DrawerSubGrupo from \"../subGrupo/drawer\";\r\nimport { Checkbox, Col, Form, Input, notification, Row, Select, Tabs } from \"antd\";\r\nimport { Data, FormGW, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport TabFreteTributario from \"./tabFretetributario\";\r\n\r\nexport default function ManutencaoFrete({ formulario, salvandoDados, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaUnidadeMedida, setListaUnidadeMedida] = useState([]);\r\n const [filtroGrupo, setFiltroGrupo] = useState(null);\r\n const [grupoSelect, setGrupoSelect] = useState([]);\r\n const [openDrawerGrupo, setOpenDrawerGrupo] = useState(false);\r\n const [openDrawerSubGp, setOpenDrawerSubGp] = useState(false);\r\n const [foundGroup, setFoundGroup] = useState([]);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [listaDados, setListaDados] = useState([]);\r\n\r\n const trocaAbas = (pag) => {\r\n setAbaSelecionada(pag);\r\n }\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados?.icm_id) {\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: manutencao.dados.icm_id });\r\n }\r\n if (!!manutencao.dados?.pis_id) {\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: manutencao.dados.pis_id });\r\n }\r\n if (!!manutencao.dados?.gru_id) {\r\n lista.push({ name: \"gru_id\", campo: \"CodigoGrupo\", value: manutencao.dados.gru_id });\r\n }\r\n if (!!manutencao.dados?.sgp_id) {\r\n lista.push({ name: \"sgp_id\", campo: \"Codigo\", value: manutencao.dados.sgp_id });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n const listaValidacoes = [\r\n { nome: 'pro_descricao', obrigatorio: true, label: 'Descrição' },\r\n ];\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!editando) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n } else if (manutencao.dados !== null && !editando) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados])\r\n\r\n \r\n\r\n useEffect(() => {\r\n const found = grupoSelect.find(element => element.gru_id === formulario.getFieldValue(['gru_id']));\r\n if (!!found) {\r\n setFoundGroup(found);\r\n carregarSubGrupos(found.gru_id);\r\n }\r\n }, [formulario.getFieldValue(['gru_id'])]);\r\n\r\n\r\n function carregarSubGrupos(CodigoGrupo) {\r\n if (!!CodigoGrupo) {\r\n setFiltroGrupo(`&CodigoGrupo=${CodigoGrupo}`);\r\n let lista = [];\r\n if (!!formulario.getFieldValue().gru_id) {\r\n lista.push({ name: 'sgp_id', campo: 'CodigoGrupo', value: formulario.getFieldValue().gru_id });\r\n }\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosGrupo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: 'gru_id', campo: 'CodigoGrupo', value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosSubGrupo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: 'gru_id', campo: 'CodigoGrupo', value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n async function salvarDados(values) {\r\n let dadosFrete = { ...values, ...formulario.getFieldValue() };\r\n\r\n if (dadosFrete.lpi_valorvenda === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Informe o valor do Frete' });\r\n return;\r\n }\r\n if (validarForm(dadosFrete, listaValidacoes)) {\r\n if (dadosFrete.pro_id) {\r\n editarManutencao(dadosFrete);\r\n } else {\r\n incluirDados(dadosFrete);\r\n }\r\n }\r\n }\r\n\r\n function validarForm(values, listaValidacoes) {\r\n let retorno = false;\r\n if (!!listaValidacoes) {\r\n let msgRetorno = [];\r\n listaValidacoes.forEach(\r\n (validacao) => {\r\n if (validacao.obrigatorio && (!!values[validacao.nome] === false && values[validacao.nome] !== 0)) {\r\n msgRetorno.push('O campo ' + validacao.label + ' é obrigatório!');\r\n }\r\n }\r\n );\r\n if (msgRetorno.length > 0) {\r\n notification.warning({ message: 'Aviso', description: msgRetorno.join('\\n') })\r\n } else {\r\n retorno = true;\r\n }\r\n\r\n }\r\n return retorno;\r\n }\r\n\r\n async function editarManutencao(dadosFrete) {\r\n api.put(`Produto/EditarFrete`, dadosFrete).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Frete foram salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n aoSalvar();\r\n salvandoDados(false);\r\n }\r\n );\r\n }\r\n\r\n async function incluirDados(dadosFrete) {\r\n api.post(`Produto/IncluirFrete`, dadosFrete).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: 'Os dados do Frete foram salvos com sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n aoSalvar();\r\n salvandoDados(false);\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n salvarDados(values)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!manutencao.dados?.pro_id && \r\n \r\n \r\n \r\n }\r\n \r\n trocaAbas(tab)} >\r\n \r\n \r\n \r\n \r\n \r\n carregarSubGrupos(IdGrupo)}\r\n onClearFunction={(IdGrupo) => carregarSubGrupos(IdGrupo)}\r\n setListaDados={setGrupoSelect}\r\n funcaoIncluir={() => setOpenDrawerGrupo(true)}\r\n />\r\n \r\n \r\n \r\n \r\n 0 && (() => setOpenDrawerSubGp(true))}\r\n allowClear={true}\r\n />\r\n \r\n \r\n {editando && \r\n \r\n }\r\n {editando && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Frete Ativo? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n )\r\n}","import { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useState } from \"react\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport ManutencaoFrete from \"./manutencao\";\r\n\r\nexport default function DrawerFrete({ editando }) {\r\n\r\n const [formFrete] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function onClose() {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n })\r\n }\r\n\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pro_descricao' } });\r\n editando.setEditando(false);\r\n setCarregando(false);\r\n formFrete.resetFields();\r\n }\r\n\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}","import { Col, Form, Modal, notification, Popover, Radio, Row, Tag } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useEffect, useState } from \"react\";\r\nimport api from \"../../services/api\";\r\nimport { BotaoIncluirDados, BreadcrumbPage, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport moment from \"moment\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport DrawerFrete from \"./drawer\";\r\n\r\nexport default function Frete() {\r\n\r\n const [{ manutencao, listagem }, dispatch] = useStateValue();\r\n const [formFiltros] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formFiltros.getFieldsValue().produtoAtivo ? 1 : formFiltros.getFieldsValue().produtoAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}&ProdutoFrete=true`, filtro: '', ordem: '+pro_descricao' } });\r\n formFiltros.setFieldsValue({ produtoAtivo: 1 });\r\n }, [])\r\n\r\n function showDrawer(frete) {\r\n let dados = {};\r\n if (!!frete.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${frete.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados = res.data;\r\n dados.pro_datainclusao = !!dados.pro_datainclusao ? moment(dados.pro_datainclusao) : null;\r\n dados.data_sincro = !!dados.data_sincro ? moment(dados.data_sincro) : null;\r\n dados.orm_id = parseInt(dados.orm_id);\r\n api.get(`tributacaoIcms/BuscarTributacaoPorCodigoProduto?IdProduto=${frete.pro_id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n dados.icm_id = res.data.icm_id;\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data && erro.response.data.Message) {\r\n notification.error({ description: erro.response.data.Message, message: 'Aviso' });\r\n } else {\r\n console.error(erro);\r\n }\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n );\r\n }\r\n }).catch((erro) => console.error(erro))\r\n .finally(\r\n () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n );\r\n }\r\n };\r\n\r\n const modalExcluir = (frete) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o frete ${frete.pro_codigo}-${frete.pro_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(frete);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(frete) {\r\n api.delete(`produto/excluir/${frete.pro_id}`).then((res) => {\r\n if (res.data == true) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n } else {\r\n modalInativar(frete);\r\n }\r\n }, (erro) => {\r\n console.error(erro);\r\n modalExcluir(frete);\r\n })\r\n };\r\n\r\n const modalInativar = (frete) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o frete!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o frete ${frete.pro_descricao} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarFrete(frete);\r\n }\r\n });\r\n };\r\n\r\n function inativarFrete(frete) {\r\n api.put(`produto/AtivarInativar?IdProduto=${frete.pro_id}&Ativo=false`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '&ProdutoFrete=true', filtro: '', ordem: '+pro_descricao' } });\r\n })\r\n };\r\n\r\n function onClickEditar(frete) {\r\n setEditando(true);\r\n showDrawer(frete);\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n (\r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição do Frete',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (frete) => (\r\n
\r\n \r\n \r\n onClickEditar(frete)} icon={} />\r\n \r\n \r\n } onClick={() => excluirRegistro(frete)} />\r\n \r\n \r\n
\r\n ),\r\n },\r\n ]} />\r\n
\r\n \r\n
\r\n )\r\n\r\n}\r\n\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Route, Switch, HashRouter } from \"react-router-dom\";\r\nimport { Layout, Modal } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { MenuPage, HeaderPage, Data } from \"../../components\";\r\nimport { getEmpresa, getValidadeCertificado, setNavegacao, setPermissoes, setStatusPlano, setValidadeCertificado, logout } from '../../services/auth'\r\nimport { tributacaoActions, parametrosEmpresaActions } from \"../../actions\";\r\nimport {\r\n Login, Inicial, Dashboard, Clientes, ResumoCliente, Fornecedor, Transportador, Funcionario, Vendedor, TributacaoIcms, TributacaoPisCofins, NcmSubtituicaoTributaria,\r\n Marca, GrupoProduto, SubGrupo, Produto, GradeProduto, Preco, Etiqueta, ResumoProduto, RelatorioEtiqueta, ContaCorrente, ContaGerencial, OperacaoFiscal, OperacaoDebitoCredito,\r\n FormaPagamento, CondicaoPagamento, SerieFiscal, Historico, NotaFiscal, ImportarNotaFiscalEntrada, MonitoramentoNfe, NotaFiscalTransferencia, CartaCorrecaoNotaFiscal, InutilizacaoNfe, OrdemCompra,\r\n NotaFiscalDevolucao, Orcamento, StatusPedido, Pedidos, Condicional, ValePresente, Metas, Comissao, ConsultaComissao, ContaReceber, RecebimentoParcela, ContaPagar,\r\n PagamentoParcela, LancamentoCaixa, LancamentoCaixaManutencao, LancamentoCaixaTransferencia, FluxoCaixa, ConciliacaoCartoes, Cheque, Boleto, Remessa, RetornoBancario,\r\n RetornoBancarioLista, ArmazemEstoque, Estoque, EstoqueManutencao, Inventario, MatrizFilial, ConfiguracaoDFe, GerenciarPdv, LimiteCreditoCliente, Contador, Plano,\r\n BandeiraCartaoEmpresa, CentroDistribuicao, Relatorios, AnaliseInadimplencia, PersonalizacaoRelatorios, FiltrosRelatorio, Usuario, GrupoUsuario, EfdIcmsIpi, Notificacao,\r\n ParametrosEmpresa, CamposPersonalizados, RelacionamentoFornecedorProduto, Restaurante, Hotel, ManutencaoProduto, VigenciaFiscal, TabelaRetencao, ParametrosLocal, ImportacaoNotaFiscalEntrada, AcaoUsuario, DownloadXml, KitComposicao,\r\n Balanca, MarcaVeiculo, Veiculo, ConsultaRecebimento, ManifestoEletronico, RetencaoPessoaProduto, ConsultaCartoesConciliados, ImportarNotaFiscalSuporte, ParcelaCartao, Servico, Cidade, ConhecimentoDeTransporte, CorrelacaoCfop,\r\n EfdPisCofins, ComponentesFrete, TipoServico, OrdemServico, TipoEquipamento, TipoUrgencia, ModeloEquipamento\r\n} from \"../\";\r\nimport EtiquetaServidor from '../etiquetaServidor';\r\nimport ImportarPessoa from '../importarPessoa';\r\nimport AntecipacaoClienteForncedor from '../antecipacao';\r\nimport SemAcesso from '../semAcesso';\r\nimport AliquotaSimples from '../aliquotaSimplesNacional';\r\nimport { diferencaDatas, isObjetoDiffVazio, retornaCep } from '../../services/funcoes';\r\nimport moment from 'moment';\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport { format } from 'date-fns';\r\nimport Frete from '../frete';\r\n\r\n\r\n\r\n\r\n\r\nexport default function Home() {\r\n\r\n const [, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n empresaUsuario();\r\n buscarParametros();\r\n resetarNav();\r\n buscarPermissoesUsuario();\r\n buscarStatusPlano();\r\n buscarDadosCertificado();\r\n }, []);\r\n\r\n function empresaUsuario() {\r\n api.get('/Empresa/Buscar/' + parseInt(getEmpresa())).then(\r\n res => {\r\n if (res.status === 200) {\r\n dispatch({\r\n type: tributacaoActions.CHANGE,\r\n data: { empRegimeTributario: res.data.emp_regimetributario, empEnquadramentoFiscal: res.data.emp_enquadramentofiscal }\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.error(erro);\r\n }\r\n );\r\n };\r\n async function retornaConfiguracaoCertificado() {\r\n try {\r\n const res = await api.get('/LocalConfigNfe/RetornaConfiguracaoNfe');\r\n if (res.status === 200 && res.data.lcn_validadecertificado) {\r\n console.log(\"Retorno certificado:\", res.data);\r\n var clickNaoExibir = {\r\n dataValidade: res.data.lcn_validadecertificado,\r\n naoMostrarNovamente: false,\r\n diferencaDias: [15, 10, 5, 1, 0],\r\n };\r\n setValidadeCertificado(clickNaoExibir);\r\n } else {\r\n console.error(\"Resposta inesperada da API:\", res);\r\n }\r\n } catch (erro) {\r\n console.error(\"Erro ao buscar configuração do certificado:\", erro);\r\n }\r\n }\r\n function naoExibirMensagem() { //quando chamada função joga \"naoMostrarNovamente\"=true e nao exibe a mensagem até o proximo logout\r\n let dados = getValidadeCertificado();\r\n dados.naoMostrarNovamente = true;\r\n setValidadeCertificado(dados);\r\n }\r\n function exibirModalAviso(diasParaVencimento, dataValidade) { // Aviso exibido sempre que o valor de dif estiver dentro de [15, 10, 5, 1,]\r\n let formattedDate = moment(dataValidade).format(\"DD/MM/YYYY\");\r\n const diaOuDias = diasParaVencimento === 1 ? \"dia\" : \"dias\"; //trata plural ou singular\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: (\r\n <>\r\n

O certificado expira em: {diasParaVencimento} {diaOuDias}!

\r\n

Vencimento em: {formattedDate}

\r\n \r\n ),\r\n cancelText: 'Não exibir novamente',\r\n okText: 'Ok',\r\n onCancel: () => {\r\n exibirModalAvisoDiferencaDias(diasParaVencimento); // clicando em \"nao exibir novamente\" chama função de aviso2\r\n },\r\n });\r\n }\r\n function exibirModalAvisoDiferencaDias(diferencaDias) { //aviso2, mostra em quantos dias a mensagem sera exibida de novo\r\n const diaOuDias = diferencaDias === 1 ? \"dia\" : \"dias\";\r\n Modal.info({\r\n title: 'Atenção!',\r\n content: (\r\n
\r\n

\r\n A mensagem será exibida novamente em {diferencaDias} {diaOuDias} ou no próximo acesso ao sistema.\r\n

\r\n
\r\n ),\r\n okText: 'Ok',\r\n onOk: () => {\r\n naoExibirMensagem(); //clicando em \"ok\" sistema não mostra a mensagem novamente até o proximo logout;\r\n }\r\n });\r\n }\r\n function exibirModalVencimentoHoje() { //aviso exibido no dia de vencimento (dif===0)\r\n Modal.confirm({\r\n title: 'Certificado Digital vence hoje!',\r\n content: (\r\n
\r\n

Após o vencimento, a emissão de notas será bloqueada. Contate seu contador!

\r\n
\r\n ),\r\n cancelText: 'Não exibir novamente',\r\n okText: 'Ok',\r\n onCancel: () => {\r\n naoExibirMensagem();\r\n }\r\n });\r\n }\r\n async function buscarDadosCertificado() {\r\n\r\n let dados = getValidadeCertificado();\r\n if (!isObjetoDiffVazio(dados)) {\r\n return\r\n }\r\n\r\n if (dados.naoMostrarNovamente === true) {\r\n return;\r\n }\r\n\r\n if (!dados.dataValidade || !dados.diferencaDias) {\r\n await retornaConfiguracaoCertificado();\r\n dados = getValidadeCertificado();\r\n\r\n if (!isObjetoDiffVazio(dados) || !dados.dataValidade) {\r\n console.error(\"Erro ao obter dados do certificado.\");\r\n return;\r\n }\r\n }\r\n const dif = diferencaDatas(dados.dataValidade);\r\n\r\n if (dif === 0) {\r\n exibirModalVencimentoHoje();\r\n } else if ([15, 10, 5, 1, 0].includes(dif)) {\r\n exibirModalAviso(dif, dados.dataValidade);\r\n }\r\n }\r\n\r\n function buscarParametros() {\r\n api.get('/ParametroEmpresa/BuscarParametros').then(\r\n res => {\r\n if (res.status === 200) {\r\n dispatch({ type: parametrosEmpresaActions.CHANGE, data: { markupProduto: res.data.par_markupproduto, par_diastoleranciacobrancajuro: res.data.par_diastoleranciacobrancajuro, par_percjuromesparcelavencida: res.data.par_percjuromesparcelavencida, par_multaparcelavencida: res.data.par_multaparcelavencida, par_tipocalculomulta: res.data.par_tipocalculomulta, par_acaoparcelavencida: res.data.par_acaoparcelavencida, par_diastolparcelavencida: res.data.par_diastolparcelavencida } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.error(erro);\r\n }\r\n );\r\n };\r\n\r\n function resetarNav() {\r\n if (!!!localStorage.getItem(\"@GestorWeb-Navegacao\")) {\r\n setNavegacao({ geral: {} });\r\n }\r\n };\r\n\r\n\r\n function buscarPermissoesUsuario() {\r\n api.get(`PermissaoUsuario/Listar`).then(\r\n (res) => {\r\n setPermissoes(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n if (erro.response.status === 426) {\r\n Modal.warn({\r\n title: erro.response.data,\r\n });\r\n window.location = '/Home#/semAcesso'\r\n } else {\r\n console.log(erro);\r\n }\r\n }\r\n );\r\n };\r\n\r\n function buscarStatusPlano() {\r\n api.get(`LocalPlano/VerificarStatusPlano`).then(\r\n () => {\r\n\r\n }\r\n ).catch(\r\n erro => {\r\n if (erro.response.status === 402) {\r\n setStatusPlano('VENCIDO');\r\n window.location = '/renovarPlano#'\r\n }\r\n }\r\n );\r\n };\r\n return (\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Alert, Calendar, Button } from \"antd\";\r\nimport { UserOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { getNomeEmpresa, getNomeLocal, getNomeUsuario } from '../../services/auth';\r\n\r\nexport default function Inicial() {\r\n\r\n const [dataAtual, setDataAtual] = useState(new Date());\r\n\r\n useEffect(() => {\r\n\r\n setInterval(dataCalendar, 1000);\r\n }, []);\r\n\r\n function dataCalendar() {\r\n setDataAtual(new Date());\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dataAtual.getHours() > 12 ? 'Boa tarde!' : dataAtual.getHours() > 18 ? 'Boa Noite!' : ' Bom dia!'}\r\n \r\n \r\n {getNomeUsuario()}, \r\n \r\n \r\n você está acessado a empresa:\r\n \r\n \r\n {`${getNomeEmpresa()} / ${getNomeLocal()}`}.\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('DD')} \r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('MMM')}\r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('HH:mm')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n}","import React from 'react';\r\nimport { Col, Row, Spin, Table, Divider } from 'antd';\r\nimport { CartesianGrid, PieChart, Pie, Cell, XAxis, YAxis, Tooltip, ResponsiveContainer, Legend } from 'recharts';\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nconst colors = [\r\n '#0088FE', '#00C49F', '#FF8042', '#eb2f96', '#003c80', '#faad14', '#fa1414', '#9c00fe', '#14d0d9', '#5c5c5c'\r\n];\r\nconst numberFormatter = (item, casasDecimais = 2) => item.toLocaleString({ style: 'currency', currency: 'BRL' }, { minimumFractionDigits: casasDecimais, maximumFractionDigits: casasDecimais });\r\nconst dateFormatter = (item) => moment(item).format(\"DD/MM/YYYY\");\r\nconst dateFormatterMes = (item) => moment(item).format(\"DD/MM\");\r\nconst dateFormatterAnoMes = (item) => moment(item).format(\"MM/YYYY\");\r\n\r\nconst renderCustomizedLabelPie = ({ cx, cy, midAngle, innerRadius, outerRadius, percent }) => {\r\n let RADIAN = Math.PI / 180;\r\n let radius = innerRadius + (outerRadius - innerRadius) * 0.4;\r\n let x = cx + radius * Math.cos(-midAngle * RADIAN);\r\n let y = cy + radius * Math.sin(-midAngle * RADIAN);\r\n\r\n return (\r\n cx ? \"start\" : \"end\"}\r\n dominantBaseline=\"central\"\r\n >\r\n {(percent * 100).toFixed(0) >= 6 ? `${(percent * 100).toFixed(0)}%` : ''}\r\n \r\n );\r\n};\r\n\r\nexport const RenderChartPie = ({ resultSet, dataKey, nameKey }) => {\r\n\r\n if (!resultSet) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {resultSet.map((e, index) => (\r\n \r\n ))}\r\n \r\n \r\n numberFormatter(parseFloat(t))} />\r\n \r\n \r\n );\r\n};\r\n\r\nexport const TableRenderer = ({ dataSource, columns, carregando }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n );\r\n};\r\n\r\nexport const CartesianChart = ({ resultSet, children, ChartComponent, dataKey }) => (\r\n \r\n \r\n \r\n numberFormatter(v)} />\r\n \r\n {/**/}\r\n {children}\r\n numberFormatter(parseFloat(t))} labelFormatter={dateFormatter} />\r\n \r\n \r\n);\r\n\r\nexport const CartesianChartBar = ({ resultSet, children, ChartComponent, dataKey, legend, tickFormatter }) => (\r\n \r\n \r\n \r\n {!!dataKey ? : }\r\n numberFormatter(v)} />\r\n {children}\r\n numberFormatter(parseFloat(t))} labelFormatter={dateFormatterAnoMes}/>\r\n {legend && }\r\n \r\n \r\n);\r\n\r\nexport const ComponentSpin = ({ children, carregando }) => {\r\n if (carregando) {\r\n return \r\n {children}\r\n ;\r\n } else {\r\n return
\r\n {children}\r\n
;\r\n }\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Card, Col, Row, Typography, Divider, Form, Select, Button } from 'antd';\r\nimport { ExclamationCircleOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\nimport { BarChart, Bar, LineChart, Line, LabelList } from 'recharts';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getLocal } from '../../services/auth';\r\nimport { Data, BreadcrumbPage } from \"../../components\";\r\nimport { CartesianChart, CartesianChartBar, ComponentSpin, RenderChartPie, TableRenderer } from \"./funcoes\";\r\n\r\nconst numberFormatter = (item, casasDecimais = 2) => item.toLocaleString({ style: 'currency', currency: 'BRL' }, { minimumFractionDigits: casasDecimais, maximumFractionDigits: casasDecimais });\r\n\r\nexport default function VendaLiquida({ graficoSelecionado }) {\r\n const [formFiltros] = Form.useForm();\r\n const [vendaLiquidaDiaria, setVendaLiquidaDiaria] = useState([]);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [pessoaFisicaJuridica, setPessoaFisicaJuridica] = useState([]);\r\n const [topVendedores, setTopVendedores] = useState([]);\r\n const [vendedores, setVendedores] = useState([]);\r\n const [vendaLiquidaCidades, setVendaLiquidaCidades] = useState([]);\r\n const [vendaLiquidaClientes, setVendaLiquidaClientes] = useState([]);\r\n const [listaLocaisUsuario, setListaLocaisUsuario] = useState([]);\r\n const [carregandoTotalizadores, setCarregandoTotalizadores] = useState(false);\r\n const [carregandoVendaDiaria, setCarregandoVendaDiaria] = useState(false);\r\n const [carregandoFisicaJuridica, setCarregandoFisicaJuridica] = useState(false);\r\n const [carregandoVendedor, setCarregandoVendedor] = useState(false);\r\n const [carregandoCliente, setCarregandoCliente] = useState(false);\r\n const [carregandoCidade, setCarregandoCidade] = useState(false);\r\n\r\n useEffect(() => {\r\n api.get(`/Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(res => {\r\n if (res.status === 200) {\r\n setListaLocaisUsuario(res.data.items);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n let dataInicial = !!formFiltros.getFieldValue().dataInicial ? moment(formFiltros.getFieldValue().dataInicial).format('YYYY-MM-DD') : null;\r\n let dataFinal = !!formFiltros.getFieldValue().dataFinal ? moment(formFiltros.getFieldValue().dataFinal).format('YYYY-MM-DD') : null;\r\n let locais = !!formFiltros.getFieldValue().local ? formFiltros.getFieldValue().local.join(',') : '';\r\n\r\n let mesAnterior = moment(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 30)).format(\"YYYY-MM-DD\");\r\n\r\n setCarregandoTotalizadores(true);\r\n setCarregandoVendaDiaria(true);\r\n setCarregandoFisicaJuridica(true);\r\n setCarregandoVendedor(true);\r\n setCarregandoCliente(true);\r\n setCarregandoCidade(true);\r\n api.get(`Dashboard/ListarVendaLiquidaDiaria?locais=${locais}&dataInicial=${mesAnterior}&dataFinal=${moment(new Date()).format(\"YYYY-MM-DD\")}`).then(\r\n (res) => {\r\n setVendaLiquidaDiaria(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoVendaDiaria(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarTotalizadoresVenda?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data && res.data.length > 0) {\r\n setTotalizadores(res.data[0]);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoTotalizadores(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarPessoaFisicaJuridica?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setPessoaFisicaJuridica(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoFisicaJuridica(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarVendedoresVendaLiquida?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setVendedores(res.data);\r\n setTopVendedores(res.data.slice(0, 10));\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoVendedor(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarVendaLiquidaCidades?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setVendaLiquidaCidades(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoCidade(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarVendaLiquidaClientes?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setVendaLiquidaClientes(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoCliente(false);\r\n });\r\n };\r\n\r\n const renderCustomizedLabelBar = (props) => {\r\n const { x, y, width, value } = props;\r\n\r\n return (\r\n \r\n 0 ? y - 10 : y + 10} fill={parseFloat(value) > 0 ? \"#0d49c3\" : \"red\"} textAnchor=\"middle\" dominantBaseline=\"middle\">\r\n {numberFormatter(parseFloat(value))}\r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Venda Venda Liquída \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Venda Líquida (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_vendaliquida ? totalizadores.vlr_vendaliquida : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Venda (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_venda ? totalizadores.vlr_total_venda : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Devolução de Venda (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_devvenda ? totalizadores.vlr_total_devvenda : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Venda Líquida por Dia - Últimos 30 dias\r\n \r\n <>\r\n {vendaLiquidaDiaria.length > 0 ? \r\n \r\n \r\n : \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Venda Líquida - Pessoa Física Jurídica\r\n \r\n
\r\n {pessoaFisicaJuridica.length > 0 ? : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Venda Líquida por Vendedor\r\n \r\n
\r\n (\r\n
\r\n {vendedor}\r\n
\r\n ),\r\n }, {\r\n title: 'Quant. Venda Líquida',\r\n align: 'right',\r\n render: ({ qtde_total }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_total), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Venda Líquida',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {numberFormatter(parseFloat(valor_total))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Top 10 Vendedores por Venda Líquida\r\n \r\n
\r\n {topVendedores.length > 0 ? \r\n \r\n \r\n \r\n \r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Venda Líquida por Cliente\r\n \r\n
\r\n (\r\n
\r\n {cliente}\r\n
\r\n ),\r\n }, {\r\n title: 'Quant. Venda Líquida',\r\n align: 'right',\r\n render: ({ qtde_total }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_total), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Venda Líquida',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {numberFormatter(parseFloat(valor_total))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Venda Líquida por Cidade UF\r\n \r\n
\r\n (\r\n
\r\n {cidade}\r\n
\r\n ),\r\n }, {\r\n title: 'UF',\r\n render: ({ uf }) => (\r\n
\r\n {uf}\r\n
\r\n ),\r\n }, {\r\n title: 'Quant. Venda Líquida',\r\n align: 'right',\r\n render: ({ qtde_total }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_total), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Venda Líquida',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {numberFormatter(parseFloat(valor_total))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Card, Col, Row, Typography, Form, Divider, Select, Button } from 'antd';\r\nimport { ExclamationCircleOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\nimport { LineChart, Line } from 'recharts';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getLocal } from '../../services/auth';\r\nimport { Data, BreadcrumbPage } from \"../../components\";\r\nimport { CartesianChart, ComponentSpin, RenderChartPie, TableRenderer } from './funcoes';\r\n\r\nconst numberFormatter = (item, casasDecimais = 2) => item.toLocaleString({ style: 'currency', currency: 'BRL' }, { minimumFractionDigits: casasDecimais, maximumFractionDigits: casasDecimais });\r\n\r\nexport default function CompraLiquida({ graficoSelecionado }) {\r\n const [formFiltros] = Form.useForm();\r\n const [compraLiquidaDiaria, setCompraLiquidaDiaria] = useState([]);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [topFornecedores, setTopFornecedores] = useState([]);\r\n const [compraLiquidaCidades, setCompraLiquidaCidades] = useState([]);\r\n const [compraLiquidaFornecedor, setCompraLiquidaFornecedor] = useState([]);\r\n const [listaLocaisUsuario, setListaLocaisUsuario] = useState([]);\r\n const [carregandoTotalizadores, setCarregandoTotalizadores] = useState(false);\r\n const [carregandoCompraDiaria, setCarregandoCompraDiaria] = useState(false);\r\n const [carregandoFornecedor, setCarregandoFornecedor] = useState(false);\r\n const [carregandoCidade, setCarregandoCidade] = useState(false);\r\n\r\n useEffect(() => {\r\n api.get(`/Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(res => {\r\n if (res.status === 200) {\r\n setListaLocaisUsuario(res.data.items);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n let dataInicial = !!formFiltros.getFieldValue().dataInicial ? moment(formFiltros.getFieldValue().dataInicial).format('YYYY-MM-DD') : null;\r\n let dataFinal = !!formFiltros.getFieldValue().dataFinal ? moment(formFiltros.getFieldValue().dataFinal).format('YYYY-MM-DD') : null;\r\n let locais = !!formFiltros.getFieldValue().local ? formFiltros.getFieldValue().local.join(',') : '';\r\n\r\n let mesAnterior = moment(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 30)).format(\"YYYY-MM-DD\");\r\n\r\n setCarregandoTotalizadores(true);\r\n setCarregandoCompraDiaria(true);\r\n setCarregandoFornecedor(true);\r\n setCarregandoCidade(true);\r\n api.get(`Dashboard/ListarCompraLiquidaDiaria?locais=${locais}&dataInicial=${mesAnterior}&dataFinal=${moment(new Date()).format(\"YYYY-MM-DD\")}`).then(\r\n (res) => {\r\n setCompraLiquidaDiaria(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoCompraDiaria(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarTotalizadoresCompra?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data && res.data.length > 0) {\r\n setTotalizadores(res.data[0]);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoTotalizadores(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarFornecedoresCompraLiquida?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setCompraLiquidaFornecedor(res.data)\r\n setTopFornecedores(res.data.slice(0, 10));\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoFornecedor(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarCompraLiquidaCidades?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setCompraLiquidaCidades(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoCidade(false);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Compra Compra Líquida\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Compra Líquida (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_compraliquida ? totalizadores.vlr_compraliquida : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Compra (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_compra ? totalizadores.vlr_total_compra : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Devolução de Compra (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_devcompra ? totalizadores.vlr_total_devcompra : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Compra Líquida por Dia - Últimos 30 dias\r\n \r\n
\r\n {compraLiquidaDiaria.length > 0 ? \r\n \r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Top 10 Fornecedores por Valor - Compra Líquida\r\n \r\n
\r\n {topFornecedores.length > 0 ?\r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Compra Líquida por Fornecedor\r\n \r\n
\r\n (\r\n
\r\n {fornecedor}\r\n
\r\n ),\r\n }, {\r\n title: 'Quantidade Compra Líquida (R$)',\r\n align: 'right',\r\n render: ({ qtde_total }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_total), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Compra Líquida (R$)',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {numberFormatter(parseFloat(valor_total))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Compra Líquida por Cidade UF\r\n \r\n
\r\n (\r\n
\r\n {cidade}\r\n
\r\n ),\r\n }, {\r\n title: 'UF',\r\n render: ({ uf }) => (\r\n
\r\n {uf}\r\n
\r\n ),\r\n }, {\r\n title: 'Quantidade Compra Líquida (R$)',\r\n align: 'right',\r\n render: ({ qtde_total }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_total), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Compra Líquida (R$)',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {numberFormatter(parseFloat(valor_total))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Card, Col, Row, Typography, Form, Divider, Select, Button } from 'antd';\r\nimport { ExclamationCircleOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getLocal } from '../../services/auth';\r\nimport { BreadcrumbPage, SelectPaginacao } from \"../../components\";\r\nimport { ComponentSpin, RenderChartPie, TableRenderer } from './funcoes';\r\n\r\nconst numberFormatter = (item, casasDecimais = 2) => item.toLocaleString({ style: 'currency', currency: 'BRL' }, { minimumFractionDigits: casasDecimais, maximumFractionDigits: casasDecimais });\r\n\r\nexport default function PosicaoEstoque({ graficoSelecionado }) {\r\n const [formFiltros] = Form.useForm();\r\n const [listaLocaisUsuario, setListaLocaisUsuario] = useState([]);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [posicaoEstoqueMarca, setPosicaoEstoqueMarca] = useState([]);\r\n const [posicaoEstoqueGrupo, setPosicaoEstoqueGrupo] = useState([]);\r\n const [topGrupo, setTopGrupo] = useState([]);\r\n const [topMarca, setTopMarca] = useState([]);\r\n const [topProduto, setTopProduto] = useState([]);\r\n const [carregandoTotalizadores, setCarregandoTotalizadores] = useState(false);\r\n const [carregandoGrupo, setCarregandoGrupo] = useState(false);\r\n const [carregandoMarca, setCarregandoMarca] = useState(false);\r\n const [carregandoProduto, setCarregandoProduto] = useState(false);\r\n\r\n useEffect(() => {\r\n\r\n api.get(`/Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(res => {\r\n if (res.status === 200) {\r\n setListaLocaisUsuario(res.data.items);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n let locais = !!formFiltros.getFieldValue().local ? formFiltros.getFieldValue().local.join(',') : '';\r\n let marcas = !!formFiltros.getFieldValue().mar_id ? formFiltros.getFieldValue().mar_id.join(',') : '';\r\n let grupos = !!formFiltros.getFieldValue().gru_id ? formFiltros.getFieldValue().gru_id.join(',') : '';\r\n let subgrupos = !!formFiltros.getFieldValue().sgp_id ? formFiltros.getFieldValue().sgp_id.join(',') : '';\r\n\r\n setCarregandoTotalizadores(true);\r\n setCarregandoGrupo(true);\r\n setCarregandoMarca(true);\r\n setCarregandoProduto(true);\r\n api.get(`Dashboard/ListarTotalizadoresEstoque?locais=${locais}&filtroMarca=${marcas}&filtroGrupo=${grupos}&filtroSubgrupo=${subgrupos}`).then(\r\n (res) => {\r\n if (!!res.data && res.data.length > 0) {\r\n setTotalizadores(res.data[0]);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoTotalizadores(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarEstoqueGrupo?locais=${locais}&filtroMarca=${marcas}&filtroGrupo=${grupos}&filtroSubgrupo=${subgrupos}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setTopGrupo(res.data.filter((x) => { return x.qtde_saldo_final >= 0 }).slice(0, 10));\r\n setPosicaoEstoqueGrupo(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoGrupo(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarEstoqueMarca?locais=${locais}&filtroMarca=${marcas}&filtroGrupo=${grupos}&filtroSubgrupo=${subgrupos}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setTopMarca(res.data.filter((x) => { return x.qtde_saldo_final >= 0 }).slice(0, 10));\r\n setPosicaoEstoqueMarca(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoMarca(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarEstoqueProduto?locais=${locais}&filtroMarca=${marcas}&filtroGrupo=${grupos}&filtroSubgrupo=${subgrupos}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setTopProduto(res.data.filter((x) => { return x.qtde_saldo_final >= 0 }).slice(0, 10));\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoProduto(false);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Posição Posição de Estoque\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Custo Última Compra (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_custo_ultima_compra ? totalizadores.vlr_custo_ultima_compra : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Custo Informado (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_custo_informado ? totalizadores.vlr_custo_informado : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Custo Médio (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_custo_medio ? totalizadores.vlr_custo_medio : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n % Top 10 por Grupo e Quantidade de Estoque\r\n \r\n
\r\n {topGrupo.length > 0 ?\r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n % Top 10 por Marca e Quantidade de Estoque\r\n \r\n
\r\n {topMarca.length > 0 ?\r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n % Top 10 por Produto e Quantidade de Estoque\r\n \r\n
\r\n {topProduto.length > 0 ?\r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Posição de Estoque por Grupo\r\n \r\n
\r\n (\r\n
\r\n {grupo}\r\n
\r\n ),\r\n }, {\r\n title: 'Quant. Saldo Final (R$)',\r\n align: 'right',\r\n render: ({ qtde_saldo_final }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_saldo_final), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Últ. Compra (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_ultima_compra }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_ultima_compra))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Informado (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_informado }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_informado))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Médio (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_medio }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_medio))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Posição de Estoque por Marca\r\n \r\n
\r\n (\r\n
\r\n {marca}\r\n
\r\n ),\r\n }, {\r\n title: 'Quant. Saldo Final (R$)',\r\n align: 'right',\r\n render: ({ qtde_saldo_final }) => (\r\n
\r\n {numberFormatter(parseFloat(qtde_saldo_final), 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Últ. Compra (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_ultima_compra }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_ultima_compra))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Informado (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_informado }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_informado))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Custo Médio (R$)',\r\n align: 'right',\r\n render: ({ vlr_custo_medio }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_custo_medio))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Card, Col, Row, Typography, Form, Divider, Select, Button } from 'antd';\r\nimport { ExclamationCircleOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\nimport { LineChart, Line, BarChart, Bar, LabelList } from 'recharts';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getLocal } from '../../services/auth';\r\nimport { Data, BreadcrumbPage } from '../../components';\r\nimport { CartesianChart, CartesianChartBar, RenderChartPie, TableRenderer, ComponentSpin } from './funcoes';\r\n\r\nconst numberFormatter = (item, casasDecimais = 2) => item.toLocaleString({ style: 'currency', currency: 'BRL' }, { minimumFractionDigits: casasDecimais, maximumFractionDigits: casasDecimais });\r\n\r\nexport default function ReceitasDespesas({ graficoSelecionado }) {\r\n const [formFiltros] = Form.useForm();\r\n const [listaLocaisUsuario, setListaLocaisUsuario] = useState([]);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [receitaDespesaDiaria, setReceitaDespesaDiaria] = useState([]);\r\n const [resultadoPorTipoConta, setResultadoPorTipoConta] = useState([]);\r\n const [resultadoCategoria, setResultadoCategoria] = useState([]);\r\n const [resultadoContaGerencial, setResultadoContaGerencial] = useState([]);\r\n const [comparativo12Meses, setComparativo12Meses] = useState([]);\r\n const [carregandoTotalizadores, setCarregandoTotalizadores] = useState(false);\r\n const [carregandoRecDespDiaria, setCarregandoRecDespDiaria] = useState(false);\r\n const [carregandoTipoConta, setCarregandoTipoConta] = useState(false);\r\n const [carregandoCategoria, setCarregandoCategoria] = useState(false);\r\n const [carregandoContaGerencial, setCarregandoContaGerencial] = useState(false);\r\n const [carregandoRecDespAnual, setCarregandoRecDespAnual] = useState(false);\r\n\r\n useEffect(() => {\r\n api.get(`/Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(res => {\r\n if (res.status === 200) {\r\n setListaLocaisUsuario(res.data.items);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n let dataInicial = !!formFiltros.getFieldValue().dataInicial ? moment(formFiltros.getFieldValue().dataInicial).format('YYYY-MM-DD') : null;\r\n let dataFinal = !!formFiltros.getFieldValue().dataFinal ? moment(formFiltros.getFieldValue().dataFinal).format('YYYY-MM-DD') : null;\r\n let tipoConta = !!formFiltros.getFieldValue().tipoConta ? formFiltros.getFieldValue().tipoConta.join(',') : '';\r\n\r\n let mesAtual = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0);\r\n let ultimosDozeMeses = new Date(mesAtual.getFullYear(), mesAtual.getMonth() - 11, 1);\r\n let locais = !!formFiltros.getFieldValue().local ? formFiltros.getFieldValue().local.join(',') : '';\r\n let mesAnterior = moment(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 30)).format(\"YYYY-MM-DD\");\r\n\r\n setCarregandoTotalizadores(true);\r\n setCarregandoRecDespDiaria(true);\r\n setCarregandoTipoConta(true);\r\n setCarregandoCategoria(true);\r\n setCarregandoContaGerencial(true);\r\n setCarregandoRecDespAnual(true);\r\n api.get(`Dashboard/ListarTotalizadoresRecDesp?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data && res.data.length > 0) {\r\n setTotalizadores(res.data[0]);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoTotalizadores(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarRecDespDiaria?locais=${locais}&dataInicial=${mesAnterior}&dataFinal=${dataFinal}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setReceitaDespesaDiaria(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoRecDespDiaria(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarResultadoTipoConta?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setResultadoPorTipoConta(res.data.filter((x) => { return x.vlr_resultado >= 0 }));\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoTipoConta(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarResultadoCategoria?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setResultadoCategoria(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoCategoria(false);\r\n });\r\n\r\n api.get(`Dashboard/ListarResultadoContaGerencial?locais=${locais}&dataInicial=${dataInicial}&dataFinal=${dataFinal}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setResultadoContaGerencial(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoContaGerencial(false);\r\n })\r\n\r\n api.get(`Dashboard/ListarRecDespAnual?locais=${locais}&dataInicial=${moment(ultimosDozeMeses).format(\"YYYY-MM-DD\")}&dataFinal=${moment(mesAtual).format(\"YYYY-MM-DD\")}&tipoConta=${tipoConta}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setComparativo12Meses(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregandoRecDespAnual(false);\r\n })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Receitas Receitas x Despesas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Receita (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_receita ? totalizadores.vlr_total_receita : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Despesa (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_total_despesa ? totalizadores.vlr_total_despesa : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Resultado (Receita-Despesa) (R$)\r\n \r\n \r\n {numberFormatter(!!totalizadores.vlr_resultado ? totalizadores.vlr_resultado : 0)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total Receita x Despesa por - Últimos 30 dias\r\n \r\n
\r\n {receitaDespesaDiaria.length > 0 ? \r\n \r\n \r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Resultado (Receita - Despesa) por Tipo de Conta\r\n \r\n
\r\n {resultadoPorTipoConta.length > 0 ?\r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Comparativo entre Receita e Despesa - Últimos 12 Meses\r\n \r\n
\r\n {comparativo12Meses.length > 0 ? moment(item).format(\"MM/YYYY\")} dataKey=\"periodo\" ChartComponent={BarChart}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n : \r\n
\r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Receita x Despesa por Categoria Conta Gerencial\r\n \r\n
\r\n (\r\n
\r\n {categoria_conta_gerencial}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Total Receita (R$)',\r\n align: 'right',\r\n render: ({ vlr_total_receita }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_total_receita))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Total Despesa (R$)',\r\n align: 'right',\r\n render: ({ vlr_total_despesa }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_total_despesa))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Resultado (R$)',\r\n align: 'right',\r\n render: ({ vlr_resultado }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_resultado))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Receita x Despesa por Conta Gerencial\r\n \r\n
\r\n (\r\n
\r\n {conta_gerencial}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Total Receita (R$)',\r\n align: 'right',\r\n render: ({ vlr_total_receita }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_total_receita))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Total Despesa (R$)',\r\n align: 'right',\r\n render: ({ vlr_total_despesa }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_total_despesa))}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Resultado (R$)',\r\n align: 'right',\r\n render: ({ vlr_resultado }) => (\r\n
\r\n {numberFormatter(parseFloat(vlr_resultado))}\r\n
\r\n ),\r\n }]} />\r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect, useState } from 'react';\r\nimport { Card, Col, Row, Typography } from 'antd';\r\n\r\nimport { BreadcrumbPage } from \"../../components\";\r\nimport { VendaLiquida, CompraLiquida, PosicaoEstoque, ReceitasDespesas } from \"./pages\";\r\n\r\nexport default function Dashboard() {\r\n const [graficoSelecionado, setGraficoSelecionado] = useState(null);\r\n\r\n useEffect(() => {\r\n setGraficoSelecionado(null);\r\n }, []);\r\n\r\n return (\r\n
\r\n {graficoSelecionado === null &&\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n { setGraficoSelecionado(0) }}>\r\n \r\n \r\n Venda Líquida \r\n \r\n \r\n \r\n \r\n \r\n { setGraficoSelecionado(1) }}>\r\n \r\n \r\n Compra Líquida \r\n \r\n \r\n \r\n \r\n \r\n { setGraficoSelecionado(2) }}>\r\n \r\n \r\n Posição de Estoque \r\n \r\n \r\n \r\n \r\n \r\n { setGraficoSelecionado(3) }}>\r\n \r\n \r\n Receitas x Despesas \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {graficoSelecionado === 0 && }\r\n {graficoSelecionado === 1 && }\r\n {graficoSelecionado === 2 && }\r\n {graficoSelecionado === 3 && }\r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoClientes from './manutencao';\r\nimport { drawerActions, manutencaoActions, listagemActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function DrawerCliente({ editando }) {\r\n const nameForm = \"manutencaoCliente\"\r\n const [formCliente] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && editando.editando && !isObjetoDiffVazio(formCliente.getFieldValue())) {\r\n formCliente.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formCliente.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n editando.setEditando(false);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={() => { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Form, Button, Dropdown, Menu, Tag, Popover, Modal, Collapse, notification, Radio, Divider, Checkbox } from \"antd\";\r\nimport { EditOutlined, MoreOutlined, DeleteOutlined, PrinterOutlined, EyeFilled, ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined, CloudUploadOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport DrawerCliente from './drawer';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport { getEmpresa, getIdUsuario, getLocal } from \"../../services/auth\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BreadcrumbPage, BotaoIncluirDados, PesquisaAvancada } from \"../../components\";\r\n\r\n\r\nexport default function Clientes() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formPesquisaAvancada] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [campoPerSelecionado, setCampoPerSelecionado] = useState({});\r\n const [tipoFiltroPersonalizado, setTipoFiltroPersonalizado] = useState(0);\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisaAvancada.getFieldsValue().clienteAtivo ? 1 : formPesquisaAvancada.getFieldsValue().clienteAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${_ativo}`, filtro: '', ordem: '+pes_nome' } })\r\n formPesquisaAvancada.setFieldsValue({ clienteAtivo: 1 });\r\n }, []);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function aplicarFiltrosAvancados() {\r\n let outrosFiltros = '';\r\n outrosFiltros += `&Ativo=${formPesquisaAvancada.getFieldsValue().clienteAtivo}`;\r\n\r\n if (formPesquisaAvancada.getFieldValue().produtorRural) {\r\n outrosFiltros += `&ProdutorRural=${formPesquisaAvancada.getFieldValue().produtorRural}`;\r\n }\r\n let filtroPersonalizado = \"\"\r\n if (tipoFiltroPersonalizado == 1) {\r\n filtroPersonalizado = formPesquisaAvancada.getFieldsValue().filtroCampoAdicional\r\n } else if (tipoFiltroPersonalizado == 2) {\r\n filtroPersonalizado = formPesquisaAvancada.getFieldsValue()[campoPerSelecionado[0].cap_nomeelemento]\r\n }\r\n if (!!filtroPersonalizado || typeof filtroPersonalizado == 'boolean') {\r\n let filtros = { filtro_0: { cap_id: campoPerSelecionado[0].cap_id, cap_tipoelemento: campoPerSelecionado[0].cap_tipoelemento, condicao: formPesquisaAvancada.getFieldsValue().condicao, outrosFiltros: filtroPersonalizado } }\r\n outrosFiltros += `&filtroAdicional=${JSON.stringify(filtros)}`;\r\n }\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: outrosFiltros } });\r\n\r\n }\r\n\r\n function editarCliente(record) {\r\n setEditando(true);\r\n record.pef_datanascimento = moment(record.pef_datanascimento);\r\n record.pej_datafundacao = !!record.pej_datafundacao ? moment(record.pej_datafundacao) : null;\r\n record.cpfCnpj = !!record.pef_cpf ? record.pef_cpf : (!!record.pej_cnpj ? record.pej_cnpj : '');\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function excluirRegistro(cliente) {\r\n api.delete(`Cliente/Excluir/${cliente.cli_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: 'Cliente excluído com sucesso!' });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n }).catch(\r\n (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(cliente);\r\n })\r\n };\r\n\r\n function inativarRegistro(cliente) {\r\n api.put(`cliente/InativarCliente/${cliente.cli_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (cliente) => {\r\n console.log('cliente', cliente);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o cliente ${cliente.cli_codigo}-${cliente.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (cliente) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o cliente!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o cliente ${cliente.cli_codigo}-${cliente.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n function menuTable(cliente) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: cliente } });\r\n }}>\r\n Informações Detalhadas\r\n \r\n \r\n \r\n )\r\n }\r\n function download(dadosBase64, nomeArquivo) {\r\n //var dadosBase64 = \"LCwsLCwsLCwsLCwsLCwsLCwyNi8wNy8yMDIxLCwsCiwsLCwsLERFTU9OU1RSQUNBTyBWQVJFSk8sLCwsLCwsLCwsLCwsLAosLCwsLCwsLCwsLCwsLCwsLDExOjU0OjQ2LCwsCiwsLCwsLExvY2FsOiBMT0pBIE1BVFJJWiwsLCwsLCwsLCwsLCwsCiwsLCwsLCwsLCwsLCwsLCwsUMOhZ2luYTogMSBkZSAyLCwsCkNOUEo6ICwsMDMuNjgzLjE5NS8wMDAxLTAwLCwsLCwsLCwsSW5zY3Jpw6fDo28gRXN0LjosLDE0NzAwMzY2NzAsLFRlbGVmb25lOiwsLCwsKDU1KSAzNTM1LTQ5MDAKRW5kZXJlw6dvOiwsLCJBVi4gU0VOLiBBTEJFUlRPIFBBU1FVQUxJTkksIDM0NywgMiBBTkRBUiwgQ0VOVFJPLCBUUsOKUyBERSBNQUlPLVJTLCA5ODkxMDAwMCIsLCwsLCwsLCwsLCwsLCwsLApGaWx0cmFuZG8gcG9yOiAsLCwsLCwsLCwsLCwsLCwsLCwsLApURVNURSwsLCwsLCwsLCwsLCwsLCwsLCwsCiwsLCwsLCwsLCwsLCwsQ3VzdG8sLCwsUHJlw6dvIHZlbmRhLCwKLEPDs2RpZ28sLCwsRGVzY3Jpw6fDo28gUHJvZHV0bywsLCxVTSwsLENsYXNzZSBJQ01TLCwsLCwsLCwKLCwsLCwsLE5DTTogLDAwMDAwMDAwLCwsLCwsLCwsLCwsCiwxLCwsLFBST0RVVE8gREVNT05TVFJBQ0FPLCwsLCxVTixUUklCVVRBRE8gQ1NPU04gMTAyLCwsIjAsMDAiLCwsLCwiMTgsOTkiLAosLCwsLCwsTkNNOiAsMDIwMTEwMDAsLCwsLCwsLCwsLCwKLDMxLCwsL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sQ2xhc3NlIElDTVMsLCwsCiwsLCxOQ006ICw4OTAzOTEwMCwsLCwsLCwsCiwxOSwsVkVMQSwsLCxVTixUUklCVVRBRE8gQ1NPU04gMTAyLCwiMCwwMCIsLCwiMTEsMDAiCiwyMCwsVkVMQSBOT1ZBLCwsLFVOLFRSSUJVVEFETyBDU09TTiAxMDIsLCIwLDAwIiwsLCIxMywyMCIKR2VyYWRvIFBvcjogLCxRdWFsaWRhZGUgTmV3RVJQLCwsLCwsLCwsUMOhZ2luYTogMiBkZSAyLCwK\"\r\n\r\n const link = document.createElement('a');\r\n link.href = \"data:application/octet-stream;base64,\" + dadosBase64;\r\n link.download = nomeArquivo;\r\n link.click();\r\n }\r\n function imprimirCliente(record) {\r\n let parametros = [{ nome: \"empresaLogado\", valor: getEmpresa() }, { nome: \"localLogado\", valor: getLocal() }, { nome: \"usuarioLogado\", valor: getIdUsuario() }, { nome: 'codigoCliente', valor: record.cli_id }];\r\n\r\n let urlRel = {\r\n PathRelatorio: \"Cliente/FichaIndividual_001/FichaIndividual\",\r\n Parametros: JSON.stringify(parametros),\r\n Tipo: \"PDF\",\r\n NomeRelatorio: \"Ficha Individual de Cliente\"\r\n }\r\n\r\n api.post(`RelatorioJasper/RetornaDadosRelatorios`, urlRel).then(\r\n res => {\r\n if (urlRel.Tipo === 'PDF') {\r\n var byteCharacters = atob(res.data);\r\n var byteNumbers = new Array(byteCharacters.length);\r\n for (var i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n var byteArray = new Uint8Array(byteNumbers);\r\n var file = new Blob([byteArray], { type: 'application/pdf;base64' });\r\n var fileURL = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n } else {\r\n download(res.data, res.data.fileDownloadName);\r\n }\r\n }).catch(\r\n erro => {\r\n console.error(erro);\r\n alert('Erro ao gerar Relatório: ' + erro);\r\n }\r\n );\r\n };\r\n\r\n function pesquisaAvancada(expressao) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${formPesquisaAvancada.getFieldValue().clienteAtivo}&ProdutorRural=${formPesquisaAvancada.getFieldValue().produtorRural}&filtroAdicional=${btoa(expressao)}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${formPesquisaAvancada.getFieldValue().clienteAtivo}`, ordem: '+pes_nome' } })\r\n\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n aplicarFiltrosAvancados()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n
\r\n \r\n aplicarFiltrosAvancados()}> Produtor Rural \r\n \r\n \r\n { pesquisaAvancada(ret) }} funcaoLimpar={() => { limparFiltroPesquisa() }} telaFiltro={1} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {cli_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nome Fantasia',\r\n render: ({ pej_nomefantasia, pef_apelido }) => (\r\n
\r\n {pej_nomefantasia ?? (pef_apelido ?? 'Não Informado')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 138,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero, pes_fisicajuridica }) => (\r\n
\r\n {(pes_fisicajuridica == 3 ? (psc_numero || 'Não Informado') : FormatFone(psc_numero) || 'Não Informado')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, pee_numero, bai_nome, cep_cep, cid_descricao, est_sigla }) => (\r\n
\r\n {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n editarCliente(record)} icon={} />\r\n \r\n \r\n { modalExcluirRegistro(record) }} icon={} />\r\n \r\n \r\n \r\n \r\n RG: {pef_rg}\r\n : null}\r\n {!!pej_inscricaoestadual ? \r\n IE: {pej_inscricaoestadual}\r\n : null}\r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Card, Divider, Progress, Button, Table, Tag } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { ModalDetalhePedido, ModalProdutoCondicional, ModalDetalheOrcamento } from \"../../components/modals/\";\r\n\r\nexport default function TabEstatistica({ dadosCliente, dataInicial, dataFinal }) {\r\n\r\n const [openModalDetalhePedido, setOpenModalDetalhePedido] = useState(false);\r\n const [pedidoId, setPedidoId] = useState(null);\r\n const [openModalDetalheOrcamento, setOpenModalDetalheOrcamento] = useState(false);\r\n const [openModalProdutoCondicional, setOpenModalProdutoCondicional] = useState(false);\r\n const [totalParcAtraso, setTotalParcAtraso] = useState({});\r\n const [resumoFinanceiro, setResumoFinanceiro] = useState({});\r\n const [dadosCondicionais, setDadosCondicionais] = useState({});\r\n const [dadosCrediario, setDadosCrediario] = useState({});\r\n const [dadosPedido, setDadosPedido] = useState({});\r\n const [dadosPedidosAbertos, setDadosPedidosAbertos] = useState([]);\r\n const [limiteCredito, setLimiteCredito] = useState({});\r\n const [dadosOrcamento, setDadosOrcamento] = useState({});\r\n const [dadosCheque, setDadosCheque] = useState([]);\r\n const [valorPercentual, setValorPercentual] = useState(0);\r\n const [openCondicional, setOpenCondicional] = useState(false);\r\n const [openPedidos, setOpenPedidos] = useState(false);\r\n const [openOrcamento, setOpenOrcamento] = useState(false);\r\n const [dadosListaOrcamento, setDadosListaOrcamento] = useState([]);\r\n const [dadosCondicionaisAbertas, setDadosCondicionaisAbertas] = useState([]);\r\n const [dadosItensCondicional, setDadosItensCondicional] = useState({});\r\n const [orcamentoId, setOrcamentoId] = useState(null);\r\n\r\n const viewCondicional = () => {\r\n setOpenCondicional(!openCondicional)\r\n };\r\n\r\n const viewPedidos = () => {\r\n setOpenPedidos(!openPedidos);\r\n };\r\n\r\n const viewOrcamento = () => {\r\n setOpenOrcamento(!openOrcamento);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosCliente && isObjetoDiffVazio(dadosCliente)) {\r\n carregarDados();\r\n }\r\n }, [dadosCliente]);\r\n\r\n useEffect(() => {\r\n if (!!dadosCliente && isObjetoDiffVazio(dadosCliente)) {\r\n carregarDados();\r\n }\r\n }, [dataInicial]);\r\n\r\n useEffect(() => {\r\n if (!!dadosCliente && isObjetoDiffVazio(dadosCliente)) {\r\n carregarDados();\r\n }\r\n }, [dataFinal]);\r\n\r\n function carregarDados() {\r\n listarLimiteCredito();\r\n listarTotalParcelasEmAtraso();\r\n listarResumoFinanceiro();\r\n listarDadosCondicionais();\r\n listarDadosCondicionaisAbertas();\r\n listarDadosPedido();\r\n listarDadosPedidoAberto();\r\n listarDadosOrcamento();\r\n listarDadosListaOrcamento();\r\n listarDadosCheque();\r\n listarParcelasAReceber();\r\n };\r\n\r\n function listarLimiteCredito() {\r\n api.get(`Cliente/LimiteCreditoCMR?IdPessoa=${dadosCliente.pes_id}`).then(\r\n res => {\r\n let dados = res.data;\r\n let perc = parseFloat(((dados.vlr_ParcelasAbertas * 100) / dados.vlr_LimiteCredito).toFixed(2));\r\n if (perc > 100) {\r\n setValorPercentual(100);\r\n } else {\r\n setValorPercentual(perc);\r\n }\r\n setLimiteCredito(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarParcelasAReceber() {\r\n api.get(`ContasPagarReceber/CRMParcelasAReceber?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosCrediario(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarTotalParcelasEmAtraso() {\r\n api.get(`Parcela/TotalParcelasEmAtraso?IdPessoa=${dadosCliente.pes_id}`).then(\r\n res => {\r\n setTotalParcAtraso(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarResumoFinanceiro() {\r\n api.get(`Pessoa/ResumoFinanceiroCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setResumoFinanceiro(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarDadosCondicionais() {\r\n api.get(`VendaCondicional/RetornaDadosCondicionaisCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosCondicionais(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarDadosCondicionaisAbertas() {\r\n api.get(`VendaCondicional/RetornaDadosCondicionaisAberto?IdCliente=${dadosCliente.cli_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosCondicionaisAbertas(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarDadosPedido() {\r\n api.get(`Pedido/RetornaDadosPedidoCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosPedido(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarDadosPedidoAberto() {\r\n api.get(`Pedido/RetornaDadosPedidosAberto?IdCliente=${dadosCliente.cli_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosPedidosAbertos(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n // não implementado ainda no novo back end\r\n function listarDadosOrcamento() {\r\n // api.get(`Orcamento/RetornaDadosOrcamentoCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n // res => {\r\n // setDadosOrcamento(res.data);\r\n // }\r\n // ).catch(\r\n // erro => {\r\n // console.log(erro);\r\n // }\r\n // );\r\n };\r\n\r\n function listarDadosListaOrcamento() {\r\n // api.get(`Orcamento/ListaOrcamentoCrmDTO?IdPessoa=${dadosCliente.cli_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n // res => {\r\n // setDadosListaOrcamento(res.data);\r\n // }\r\n // ).catch(\r\n // erro => {\r\n // console.log(erro);\r\n // }\r\n // );\r\n };\r\n\r\n function listarDadosCheque() {\r\n api.get(`Cheque/RetornaDadosChequeCRM?CodigoPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setDadosCheque(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function abrirModalItens(record) {\r\n setDadosItensCondicional(record)\r\n setOpenModalProdutoCondicional(true)\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n * Limite de Crédito Excedido. Valor Limite (R$):\r\n {isObjetoDiffVazio(limiteCredito) ? FormatNumber(limiteCredito.vlr_LimiteCredito, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!totalParcAtraso ? FormatNumber(totalParcAtraso.vlr_ParcelasEmAtraso, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Média de Atraso\r\n \r\n \r\n \r\n \r\n {isObjetoDiffVazio(dadosCrediario) ? dadosCrediario.mediaDiasAtraso : 0} dias\r\n \r\n \r\n \r\n \r\n Total de parcelas:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCrediario) ? dadosCrediario.total_Parcelas : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de parcelas em atraso:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCrediario) ? dadosCrediario.total_Parcelas_Atraso : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de parcelas adiantadas:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCrediario) ? dadosCrediario.total_Parcelas_Adiantadas : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Comprado\r\n \r\n \r\n \r\n \r\n {isObjetoDiffVazio(resumoFinanceiro) ? FormatNumber(resumoFinanceiro.vlr_TotalVendas, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n Valor compras a vista (R$):\r\n \r\n \r\n {isObjetoDiffVazio(resumoFinanceiro) ? FormatNumber(resumoFinanceiro.vlr_TotalVendasAVista, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor compras a prazo (R$):\r\n \r\n \r\n {isObjetoDiffVazio(resumoFinanceiro) ? FormatNumber(resumoFinanceiro.vlr_TotalVendasAPrazo, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor a receber (R$):\r\n \r\n \r\n {isObjetoDiffVazio(resumoFinanceiro) ? FormatNumber(resumoFinanceiro.vlr_ParcelasAReceber, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Percentual de Vendas das Condicionais:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCondicionais) ? dadosCondicionais.percentual_Vendas_Condicionais + '%' : '0%'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Condicionais:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCondicionais) ? dadosCondicionais.qtde_Condicionais : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total de Compras (R$):\r\n \r\n \r\n {isObjetoDiffVazio(dadosCondicionais) ? FormatNumber(dadosCondicionais.vlr_Total_Condicionais, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Condicionais em Aberto:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Percentual de Vendas dos Pedidos:\r\n \r\n \r\n {isObjetoDiffVazio(dadosPedido) ? dadosPedido.percentual_Vendas_Pedidos + '%' : '0%'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Pedidos:\r\n \r\n \r\n {isObjetoDiffVazio(dadosPedido) ? dadosPedido.qtde_Pedidos : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor total de compras (R$):\r\n \r\n \r\n {isObjetoDiffVazio(dadosPedido) ? FormatNumber(dadosPedido.vlr_Total_Pedidos, true) : FormatNumber(0, true)} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Pedidos em Aberto:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {openCondicional &&\r\n \r\n \r\n } onClick={() => viewCondicional(false)}> Fechar \r\n }>\r\n
(\r\n
\r\n Nº {vnc_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Lançamento',\r\n render: ({ vnc_datalancamento }) => (\r\n
\r\n {moment(vnc_datalancamento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Retorno',\r\n render: ({ vnc_prazoretorno }) => (\r\n
\r\n {moment(vnc_prazoretorno).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n render: ({ vnc_totalitens }, record) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ vnc_valortotal }) => (\r\n
\r\n {FormatNumber(vnc_valortotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n }\r\n {openPedidos &&\r\n \r\n \r\n } onClick={() => viewPedidos()}> Fechar \r\n }>\r\n
(\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Nº',\r\n align: 'left',\r\n render: ({ ped_numero }) => (\r\n
\r\n {ped_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Lançamento',\r\n align: 'center',\r\n render: ({ ped_datainclusao }) => (\r\n
\r\n {moment(ped_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Entrega',\r\n align: 'center',\r\n render: ({ ped_dataprevisaoentrega }) => (\r\n
\r\n {moment(ped_dataprevisaoentrega).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n render: ({ ped_totalitens, ped_id }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ pdi_valortotal }) => (\r\n
\r\n {FormatNumber(pdi_valortotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n Percentual de Vendas dos Orçamentos:\r\n \r\n \r\n {isObjetoDiffVazio(dadosOrcamento) ? dadosOrcamento.percentual_Vendas_Orcamentos + '%' : '0%'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Orçamentos:\r\n \r\n \r\n {isObjetoDiffVazio(dadosOrcamento) ? dadosOrcamento.qtde_Orcamentos : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total de Compras (R$):\r\n \r\n \r\n {isObjetoDiffVazio(dadosOrcamento) ? FormatNumber(dadosOrcamento.vlr_Total_Orcamentos, true) : FormatNumber(0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Orçamentos em Aberto:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Quantidade:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCheque) ? dadosCheque.qtde_Cheques : 0}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Status:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCheque) ? dadosCheque.statusCheques : 0}\r\n \r\n \r\n {false && \r\n \r\n Cheques de Terceiros:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCheque) ? dadosCheque.qtde_ChequesDepositados : 0}\r\n \r\n }\r\n {false && \r\n \r\n Voltaram:\r\n \r\n \r\n {isObjetoDiffVazio(dadosCheque) ? dadosCheque.qtde_ChequesDevolvidos : 0}\r\n \r\n }\r\n \r\n \r\n \r\n {openOrcamento &&\r\n \r\n \r\n } onClick={() => viewOrcamento(false)}> Fechar \r\n }>\r\n
(\r\n
\r\n {orc_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Lançamento',\r\n align: 'center',\r\n render: ({ orc_datainclusao }) => (\r\n
\r\n {moment(orc_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Validade',\r\n align: 'center',\r\n render: ({ orc_datavalidade }) => (\r\n
\r\n {moment(orc_datavalidade).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n render: ({ oit_qtdtotalitens, orc_id }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ oit_vlrtotalitens }) => (\r\n
\r\n {FormatNumber(oit_vlrtotalitens, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n }\r\n setOpenModalProdutoCondicional(false)} dadosItens={dadosItensCondicional} />\r\n setOpenModalDetalhePedido(false)} ped_id={pedidoId} />\r\n setOpenModalDetalheOrcamento(false)} orc_id={orcamentoId} />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Card, Table, Select, Form, Divider, Tag } from \"antd\";\r\nimport { ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatarQuantidade, FormatNumber } from \"../../ValueObjects\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function TabUltimasCompras({ form, dadosCliente, dataInicial, dataFinal }) {\r\n\r\n const [dadosNotasFiscais, setDadosNotasFiscais] = useState([]);\r\n const [dadosItensNotas, setItensNotas] = useState([]);\r\n const [dadosGrupo, setDadosGrupo] = useState([]);\r\n\r\n useEffect(() => {\r\n form.setFieldsValue({ ordemNota: \"+ntf_dataemissao\" });\r\n if (!!dadosCliente && isObjetoDiffVazio(dadosCliente)) {\r\n carregarDados();\r\n }\r\n }, [dadosCliente]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [dataInicial]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [dataFinal]);\r\n\r\n function carregarDados() {\r\n listarNotasFiscais();\r\n listarItensNotas();\r\n listarTotaisGrupo();\r\n };\r\n\r\n function listarNotasFiscais(ordem = \"\") {\r\n api.get(`NotaFiscal/ListaNotasFiscaisClienteCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}${!!ordem ? `&ordem=${ordem}` : ''}`).then(\r\n res => {\r\n setDadosNotasFiscais(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarItensNotas() {\r\n api.get(`NotaFiscal/ListaItensNotasClienteCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n setItensNotas(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarTotaisGrupo() {\r\n api.get(`NotaFiscal/RetornaTotaisGruposCRM?IdPessoa=${dadosCliente.pes_id}&dataFinal=${moment(dataFinal).toISOString()}&dataInicial=${moment(dataInicial).toISOString()}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let sequencia = 1;\r\n res.data.forEach((dados) => {\r\n dados.key = sequencia++;\r\n });\r\n setDadosGrupo(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function alterarOrdemDadosNota() {\r\n listarNotasFiscais(form.getFieldValue().ordemNota);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {ser_serie}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: 105,\r\n align: 'center',\r\n render: ({ ntf_numero }) => (\r\n
\r\n {ntf_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Emissão',\r\n width: 100,\r\n align: 'right',\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {!!ntf_dataemissao ? moment(ntf_dataemissao).format('DD/MM/YYYY') : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde. Itens',\r\n width: 120,\r\n align: 'right',\r\n render: ({ ntf_totalitens }) => (\r\n
\r\n {ntf_totalitens}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 120,\r\n render: ({ ntf_totalnota }) => (\r\n
\r\n {FormatNumber(ntf_totalnota, true)}\r\n
\r\n ),\r\n }\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Uni. Medida',\r\n width: 75,\r\n align: 'center',\r\n render: ({ ump_id }) => (\r\n
\r\n {ump_id}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qantidade',\r\n width: 75,\r\n align: 'center',\r\n render: ({ nfi_qtde, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(nfi_qtde, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acréscimos (R$)',\r\n width: 75,\r\n align: 'right',\r\n render: ({ nfi_valoroutros }) => (\r\n
\r\n {FormatNumber(nfi_valoroutros, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto (R$)',\r\n width: 75,\r\n align: 'right',\r\n render: ({ nfi_valordesconto }) => (\r\n
\r\n {FormatNumber(nfi_valordesconto, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Frete (R$)',\r\n width: 75,\r\n align: 'right',\r\n render: ({ nfi_valorfrete }) => (\r\n
\r\n {FormatNumber(nfi_valorfrete, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 75,\r\n fixed: 'right',\r\n render: ({ nfi_valortotalitem }) => (\r\n
\r\n {FormatNumber(nfi_valortotalitem, true)}\r\n
\r\n ),\r\n }\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {gru_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde Total Grupo',\r\n width: 275,\r\n align: 'right',\r\n render: ({ gru_qtdetotalgrupo }) => (\r\n
\r\n {gru_qtdetotalgrupo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Total Grupo (R$)',\r\n width: 275,\r\n\r\n align: 'right',\r\n render: ({ gru_valortotalgrupo }) => (\r\n
\r\n {FormatNumber(gru_valortotalgrupo, true)}\r\n
\r\n ),\r\n }\r\n ]} expandable={{\r\n expandedRowRender: ({ listaTotSubGrupo }) => {\r\n return (\r\n
(\r\n
\r\n {sgp_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde Total Subgrupo',\r\n width: 275,\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ sgp_qtdetotalsubgrupo }) => (\r\n
\r\n {sgp_qtdetotalsubgrupo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Total Subgrupo (R$)',\r\n width: 275,\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ sgp_valortotalsubgrupo }) => (\r\n
\r\n {FormatNumber(sgp_valortotalsubgrupo, true)}\r\n
\r\n ),\r\n }\r\n ]} />\r\n )\r\n }\r\n }} expandIcon={({ record, expanded, onExpand }) => {\r\n return expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n );\r\n }} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Card, Table, Select, Form, Divider, Tag } from \"antd\";\r\nimport { ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatarQuantidade, FormatNumber } from \"../../ValueObjects\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function TabVendaEntregaFutura() {\r\n\r\n \r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Card, Typography, Divider, Tabs, Select, Button, Radio } from \"antd\";\r\nimport { EditOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatFone } from \"../../ValueObjects\";\r\nimport { TabEstatistica, TabUltimasCompras, TabVendaEntregaFutura } from \"./tabPage\";\r\nimport { BreadcrumbAbrirChamado, Data, SelectPaginacao } from \"../../components\";\r\nimport { formatarCnpj, formatarCpf } from \"../../services/funcoes\";\r\n\r\nexport default function ResumoCliente() {\r\n\r\n const [openCliente, setOpenCliente] = useState(false);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [dadosCliente, setDadosCliente] = useState({});\r\n const [telefone, setTelefone] = useState({});\r\n const [email, setEmail] = useState({});\r\n const [endereco, setEndereco] = useState({});\r\n const [dataInicial, setDataIncial] = useState(new Date());\r\n const [dataFinal, setDataFinal] = useState(new Date());\r\n const [clienteId, setClienteId] = useState(null);\r\n\r\n const exibirOutrosClientes = () => {\r\n setOpenCliente(!openCliente);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n setClienteId(manutencao.dados.cli_id);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!!manutencao.dados && !!localStorage.getItem('@GestorWeb-clienteResumo')) {\r\n setClienteId(localStorage.getItem('@GestorWeb-clienteResumo'));\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n carregarDatas();\r\n if (!!clienteId) {\r\n localStorage.setItem('@GestorWeb-clienteResumo', clienteId);\r\n listarCliente();\r\n }\r\n }, [clienteId]);\r\n\r\n function carregarDatas() {\r\n let data = new Date();\r\n let periodo = form.getFieldValue().periodoData;\r\n\r\n form.setFieldsValue({ dataFinal: moment(data) });\r\n setDataFinal(moment(data));\r\n switch (periodo) {\r\n case 1:\r\n data.setMonth(data.getMonth() - 12);\r\n break;\r\n case 2:\r\n data.setMonth(data.getMonth() - 6);\r\n break;\r\n case 3:\r\n data.setDate(data.getDate() - 30);\r\n break;\r\n default:\r\n data.setDate(data.getDate() - 30);\r\n break;\r\n }\r\n form.setFieldsValue({ dataInicial: moment(data) });\r\n setDataIncial(moment(data));\r\n };\r\n\r\n function listarCliente() {\r\n api.get(`Cliente/BuscarCliente/${clienteId}`).then(\r\n res => {\r\n setDadosCliente(res.data);\r\n setTelefone(res.data.telefones.filter(telefone => telefone.psc_principal)[0]);\r\n setEmail(res.data.emails.filter(email => email.pem_emailprincipal)[0]);\r\n setEndereco(res.data.enderecos.length > 0 ? res.data.enderecos.filter(endereco => endereco.pee_enderecoprincipal)[0] : res.data.enderecos[0]);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function alterarCliente() {\r\n let cli_id = form.getFieldValue().cli_id;\r\n setClienteId(cli_id);\r\n exibirOutrosClientes();\r\n form.setFieldsValue({ cli_id: null });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n { carregarDatas() }}>\r\n 1 Ano\r\n 6 Meses\r\n Últimos 30 dias\r\n \r\n \r\n \r\n \r\n \r\n \r\n { setDataIncial(form.getFieldValue().dataInicial); }} />\r\n \r\n \r\n { setDataFinal(form.getFieldValue().dataFinal); }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n exibirOutrosClientes()} icon={openCliente ? : } />}>\r\n {!!openCliente &&\r\n \r\n \r\n \r\n alterarCliente()}\r\n conteudo={\r\n cli => (\r\n {cli.cli_codigo} - {cli.pes_nome})\r\n } />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {dadosCliente.pes_nome}\r\n \r\n \r\n \r\n \r\n \r\n Cliente desde: {!!dadosCliente.cli_datainclusao ? moment(dadosCliente.cli_datainclusao).format('DD/MM/YYYY') : 'Não informado'}\r\n \r\n \r\n Última atualização: {!!dadosCliente.cli_dataalteracao ? moment(dadosCliente.cli_dataalteracao).format('DD/MM/YYYY') : 'Não informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosCliente.pef_cpf &&\r\n \r\n CPF: {!!dadosCliente.pef_cpf ? formatarCpf(dadosCliente.pef_cpf) : 'Não informado'}\r\n \r\n }\r\n {!!dadosCliente.pej_cnpj &&\r\n \r\n CNPJ: {!!dadosCliente.pej_cnpj ? formatarCnpj(dadosCliente.pej_cnpj) : 'Não informado'}\r\n \r\n }\r\n \r\n Telefone: {!!telefone && FormatFone(telefone.psc_numero) ? FormatFone(telefone.psc_numero) : 'Não informado'}\r\n \r\n \r\n E-mail: {!!email && email.pem_email ? email.pem_email : 'Não informado'}\r\n \r\n \r\n Data de Nascimento: {!!dadosCliente.pef_datanascimento ? moment(dadosCliente.pef_datanascimento).format(\"DD/MM/YYYY\") : 'Não informado'}\r\n \r\n \r\n Endereço: {!!endereco ? `${endereco.log_logradouro}, ${endereco.pee_numero}, ${endereco.bai_nome}, ${endereco.cep_cep} - ${endereco.est_sigla}` : 'Não informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Tabs, Typography, Row, Col, Form, Divider, Input, Select, Radio, Checkbox, Switch, Tooltip, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { getEmpresa } from \"../../services/auth\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { Data, FormGW, FormularioDinamico, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { isObjetoDiffVazio, validarCnpj, validarCpf, consultaCNPJ, retornaSoNumeros, HasValue, validarTelefone } from \"../../services/funcoes\";\r\nimport { Endereco, Email, Telefone, Ocupacao, Nacionalidade, OutrosContatos } from '../pessoas/pages';\r\nimport { validarIE } from \"../../services/funcoesIE\";\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoFornecedor({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [pessoaJuridica, setPessoaJuridica] = useState(false);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [dadosEstrangeiro, setDadosEstrangeiro] = useState(false);\r\n const [regimeTributario, setRegimeTributario] = useState([]);\r\n const [cpfCnpj, setCpfCnpj] = useState(\"\");\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [listaCidades, setListaCidades] = useState(false);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [mask, setMask] = useState(\"\");\r\n const [produtorRural, setProdutorRural] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const switchEstrangeiro = () => {\r\n setDadosEstrangeiro(!dadosEstrangeiro)\r\n };\r\n\r\n const handleCheckboxChange = () => {\r\n debugger;\r\n setProdutorRural(!produtorRural); // Atualiza o estado a cada clique\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.for_id) {\r\n listaFornecedor(manutencao.dados.for_id);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.for_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: manutencao.dados.pef_rguf });\r\n carregarCidades(manutencao.dados.pef_rguf);\r\n }\r\n if (!!manutencao.dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: manutencao.dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let _cpfCnpj = formulario.getFieldValue().cpfCnpj ? formulario.getFieldValue().cpfCnpj : manutencao.dados.cpfCnpj;\r\n _cpfCnpj = _cpfCnpj?.replace(/[^\\d]+/g, '');\r\n if (HasValue(_cpfCnpj)) {\r\n if (_cpfCnpj.length === 11) {\r\n if (validarCpf(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n }\r\n else if (_cpfCnpj.length === 14) {\r\n if (validarCnpj(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n } else {\r\n setDesabilitarCpfCnpj(false);\r\n }\r\n }\r\n if (!!manutencao.dados.cpfCnpj) {\r\n if (manutencao.dados.cpfCnpj.length > 11) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function setFocusCpfCnpj() {\r\n setTimeout(\r\n () => {\r\n try {\r\n let element = document.getElementById(\"cpf\");\r\n if (element) {\r\n element.focus();\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 300);\r\n }\r\n const salvarCamposAdicionais = (values) => {\r\n\r\n var camposAdicionais = [];\r\n elementosFormulario?.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let fornecedorcampopersonalizados = { ...manutencao.dados };\r\n let forDados = fornecedorcampopersonalizados.fornecedorcampopersonalizado?.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if ((!!forDados ? forDados.fcp_valor : \"\") !== (!!values[elemento.cap_nomeelemento] ? values[elemento.cap_nomeelemento] : \"\")) {\r\n camposAdicionais.push({ fcp_id: !!forDados ? forDados.fcp_id : null, for_id: values.for_id, cap_id: elemento.cap_id, fcp_valor: values[elemento.cap_nomeelemento] });\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n\r\n function salvarManutencao(valores) {\r\n debugger;\r\n if (!!valores.pej_emailpessoacontato) {\r\n if (!validarEmail(valores.pej_emailpessoacontato)) {\r\n notification.warning({ message: 'Aviso', description: 'E-mail do contado inválido' });\r\n return false;\r\n }\r\n }\r\n let dadosform = formulario.getFieldValue();\r\n valores = { ...valores, ...dadosform };\r\n valores.pessoatelefones = !!manutencao.dados.telefones && manutencao.dados.telefones.length > 0 ? manutencao.dados.telefones : [];\r\n valores.enderecos = !!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0 ? manutencao.dados.enderecos : [];\r\n valores.pessoaemails = !!manutencao.dados.emails && manutencao.dados.emails.length > 0 ? manutencao.dados.emails : [];\r\n valores.pessoasocupacoes = !!manutencao.dados.ocupacoes && manutencao.dados.ocupacoes.length > 0 ? manutencao.dados.ocupacoes : [];\r\n valores.pessoaoutrocontatos = !!manutencao.dados.pessoaoutrocontatos && manutencao.dados.pessoaoutrocontatos.length > 0 ? manutencao.dados.pessoaoutrocontatos : [];\r\n valores.pessoanacionalidades = !!manutencao.dados.listaNacionalidade && manutencao.dados.listaNacionalidade.length > 0 ? manutencao.dados.listaNacionalidade : [];\r\n valores.pef_produtorrural = valores.pef_produtorrural;\r\n valores.pes_fisicajuridica = pessoaJuridica ? 2 : (dadosEstrangeiro ? 3 : 1);\r\n\r\n valores.cpfCnpj = valores.cpfCnpj.replaceAll('.', '').replaceAll('/', '').replaceAll('-', '');\r\n if (!!valores.idEstrangeiro && dadosEstrangeiro) {\r\n valores.isEstrangeiro = true;\r\n valores.pes_estrangeiro = true;\r\n } else {\r\n valores.isEstrangeiro = false;\r\n valores.pes_estrangeiro = false;\r\n\r\n if (valores.cpfCnpj.length === 11) {\r\n valores.pes_fisicajuridica = 1;\r\n valores.pef_cpf = valores.cpfCnpj;\r\n if (!validarCpf(valores.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n return false;\r\n }\r\n } else if (valores.cpfCnpj.length === 14) {\r\n valores.pes_fisicajuridica = 2;\r\n valores.pej_cnpj = valores.cpfCnpj;\r\n if (!validarCnpj(valores.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'CPF/CNPJ informado é inválido' });\r\n return false;\r\n }\r\n }\r\n\r\n if (!!valores.cpfCnpj) {\r\n if (valores.pes_fisicajuridica === 1) {\r\n valores.pef_cpf = valores.cpfCnpj.replace(/\\D/g, '');\r\n valores.pef_rguf = valores.enderecos?.filter((end) => (end.pee_enderecoprincipal === true))[0].est_sigla;\r\n } else {\r\n valores.pej_cnpj = valores.cpfCnpj.replace(/\\D/g, '');\r\n valores.pej_inscuf = valores.enderecos.length > 0 ? valores.enderecos.filter((end) => (end.pee_enderecoprincipal === true))[0].est_sigla : '';\r\n }\r\n }\r\n if (!!valores.pej_inscricaoestadual && !validarIE(valores.pej_inscricaoestadual, valores.pej_inscuf)) {\r\n notification.warning({ message: 'Aviso', description: 'Inscrição Estadual informada é inválida' });\r\n return false;\r\n } else if (!!!valores.pej_inscricaoestadual) {\r\n valores.pej_inscricaoestadual = \"\";\r\n }\r\n\r\n valores.for_valorfretegratis = parseFloat(valores.for_valorfretegratis);\r\n valores.for_codigobancoagencia = !!valores.for_codigobancoagencia ? valores.for_codigobancoagencia : '';\r\n valores.pef_apelido = !!valores.pef_apelido ? valores.pef_apelido : '';\r\n valores.for_regimetributariofiscal = !!valores.regimeTributario ? valores.regimeTributario : null;\r\n valores.for_observacao = !!valores.for_observacao ? valores.for_observacao : '';\r\n valores.fornecedorcampopersonalizados = salvarCamposAdicionais(valores);\r\n if (!!formulario.getFieldValue().regimeTributario) {\r\n valores.regimeTributario = {\r\n key: formulario.getFieldValue().regimeTributario,\r\n value: regimeTributario.filter(item => (item.key === formulario.getFieldValue().regimeTributario))[0].value\r\n }\r\n }\r\n\r\n carregando(true);\r\n\r\n if (!!valores.for_id) {\r\n api.put(`Fornecedor/Editar`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: `Fornecedor editado com sucesso!` });\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.error({ message: 'Erro ao salvar dados do Fornecedor.', description: JSON.stringify(erro.response) });\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n\r\n api.post(`Fornecedor/Incluir`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: `Fornecedor incluído com sucesso!` });\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.error({ message: 'Erro ao salvar dados do Fornecedor.', description: JSON.stringify(erro.response) });\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n };\r\n\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(` &UfEstado=${UfEstado}`);\r\n }\r\n else {\r\n setListaCidades(false);\r\n }\r\n }\r\n\r\n function validarEmail(email) {\r\n let reg = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n return reg.test(email);\r\n };\r\n\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?TipoEntidade=2&PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n let camposPersonalizados = { ...manutencao.dados };\r\n camposPersonalizados?.fornecedorcampopersonalizado?.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n if (!!elemento)\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.fcp_valor);\r\n })\r\n }\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length > 0) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n useEffect(() => {\r\n if (manutencao?.dados?.fornecedorcampopersonalizado?.length > 0)\r\n carregaDadosCamposAdicionais();\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n popularDados();\r\n }, []);\r\n\r\n function popularDados() {\r\n listarRegimeTrib();\r\n carregaCamposPersonalizados();\r\n };\r\n\r\n function listarRegimeTrib() {\r\n api.get('Enum/Listar?nome=RegimeTributarioFiscal').then(\r\n (res) => {\r\n setRegimeTributario(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarCpfExiste(cpfCnpj) {\r\n api.get(`PessoaFisica/VerificarCpfExistente?cpf=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_fornecedor) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CPF informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarFornecedorCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarFornecedorCpfCnpj(cpfCnpj);\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarCnpjExiste(cpfCnpj) {\r\n api.get(`PessoaJuridica/VerificarCnpjExistente?cnpj=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_fornecedor) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CNPJ informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarFornecedorCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarFornecedorCpfCnpj(cpfCnpj);\r\n }\r\n } else {\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function listaFornecedor(for_id) {\r\n if (!!!for_id) {\r\n return;\r\n }\r\n api.get(`Fornecedor/BuscarFornecedor/${for_id}`).then(\r\n (res) => {\r\n debugger;\r\n let valores = res.data;\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n valores.for_datainclusao = !!valores.for_datainclusao ? moment(valores.for_datainclusao) : null;\r\n valores.for_dataalteracao = !!valores.for_dataalteracao ? moment(valores.for_dataalteracao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.pej_datafundacao = !!valores.pej_datafundacao ? moment(valores.pej_datafundacao) : null;\r\n valores.id_rguf = valores.est_id;\r\n valores.regimeTributario = !!valores.for_regimetributariofiscal ? valores.for_regimetributariofiscal : null;\r\n valores.pef_produtorrural = !!valores.pef_produtorrural ? valores.pef_produtorrural : null;\r\n setProdutorRural(!!valores.pef_produtorrural);\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n const receitaWS = (cpfCnpj) => {\r\n if (!HasValue(formulario.getFieldsValue().pes_nome)) {\r\n consultaCNPJ(cpfCnpj).then((retorno) => {\r\n let dados = retorno;\r\n if (dados.status === \"OK\" && dados.situacao === \"ATIVA\") {\r\n let dadosForm = {};\r\n\r\n if (dados.efr !== \"\") {\r\n dadosForm.pes_orgaopublico = true;\r\n }\r\n dadosForm.pes_nome = dados.nome;\r\n if (!!dados.abertura) {\r\n let dia = dados.abertura.substring(0, 2);\r\n let mes = dados.abertura.substring(3, 5);\r\n let ano = dados.abertura.substring(6, 10);\r\n dadosForm.pej_datafundacao = moment(new Date(ano, mes, dia));\r\n }\r\n dadosForm.pej_nomefantasia = dados.fantasia;\r\n\r\n\r\n let listaEnderecos = [];\r\n let tipoEndereco = {};\r\n tipoEndereco.pais = \"BRASIL\";\r\n tipoEndereco.pse_id = 33;\r\n tipoEndereco.tpe_id = 4;\r\n tipoEndereco.tpe_descricao = \"COMERCIAL\";\r\n tipoEndereco.pee_numero = dados.numero;\r\n tipoEndereco.pee_ativo = true;\r\n tipoEndereco.pee_enderecoprincipal = true;\r\n tipoEndereco.cep_cep = retornaSoNumeros(dados.cep);\r\n tipoEndereco.pee_complemento = dados.complemento;\r\n tipoEndereco.bai_nome = dados.bairro;\r\n tipoEndereco.log_logradouro = dados.logradouro;\r\n tipoEndereco.cid_descricao = dados.municipio;\r\n tipoEndereco.est_sigla = dados.uf;\r\n tipoEndereco.enderecoCompleto = tipoEndereco.log_logradouro + ', ' + tipoEndereco.pee_numero + ' - ' + tipoEndereco.bai_nome + ' - ' + tipoEndereco.pee_complemento + ' - ' + tipoEndereco.cep_cep + ' - ' + tipoEndereco.cid_descricao + ' - ' + tipoEndereco.uf;\r\n listaEnderecos.push(tipoEndereco);\r\n\r\n let listaTelefones = [];\r\n if (dados.telefone !== \"\" && validarTelefone(retornaSoNumeros(dados.telefone).substring(0, 10))) {\r\n let tpt = {};\r\n tpt.tpt_id = 1;\r\n tpt.tpt_descricao = \"COMERCIAL\";\r\n tpt.psc_ativo = true;\r\n tpt.psc_numero = retornaSoNumeros(dados.telefone).substring(0, 10);\r\n tpt.psc_principal = true;\r\n listaTelefones.push(tpt);\r\n }\r\n\r\n let listaEmails = [];\r\n if (dados.email !== \"\" && validarEmail(dados.email)) {\r\n let email = {};\r\n email.pem_email = dados.email;\r\n email.pem_emailprincipal = true;\r\n email.pem_enviarboleto = false;\r\n email.pem_enviarcartacobranca = false;\r\n email.pem_enviarnfe = false;\r\n email.pem_enviarpromocao = false;\r\n email.pem_enviarvencparcela = false;\r\n email.pem_ativo = true;\r\n listaEmails.push(email);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ telefones: listaTelefones }, ...{ emails: listaEmails }, ...{ enderecos: listaEnderecos } } } });\r\n formulario.setFieldsValue(dadosForm);\r\n\r\n }\r\n if (dados.status === \"OK\" && dados.situacao === \"BAIXADA\") {\r\n notification.warning({ message: 'Aviso', description: 'Empresa/CNPJ ' + dados.situacao + ' na receita!' });\r\n }\r\n }, (erro) => {\r\n console.log('ERRO:', erro);\r\n });\r\n }\r\n }\r\n\r\n function listarFornecedorCpfCnpj(cpfCnpj) {\r\n cpfCnpj = cpfCnpj.replaceAll('-', '').replaceAll('/', '').replaceAll('.', '');\r\n if (cpfCnpj === null || cpfCnpj === \"\") {\r\n return false;\r\n }\r\n api.get(`Fornecedor/BuscarFornecedorCpfCnpj/${cpfCnpj}`).then(\r\n (res) => {\r\n let valores = res.data;\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n valores.for_ativo = true;\r\n valores.for_datainclusao = !!valores.for_datainclusao ? moment(valores.for_datainclusao) : null;\r\n valores.for_dataalteracao = !!valores.for_dataalteracao ? moment(valores.for_dataalteracao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.pej_datafundacao = !!valores.pej_datafundacao ? moment(valores.pej_datafundacao) : null;\r\n valores.id_rguf = valores.est_id;\r\n valores.regimeTributario = !!valores.for_regimetributariofiscal ? valores.for_regimetributariofiscal : 1;\r\n setProdutorRural(!!valores.pef_produtorrural);\r\n let lista = [];\r\n if (!!valores.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: valores.pef_rguf });\r\n }\r\n if (!!valores.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: valores.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n editando.setEditando(true);\r\n } else {\r\n if (cpfCnpj.length === 14) {\r\n setPessoaJuridica(true);\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n if (cpfCnpj.length === 14) {\r\n setPessoaJuridica(true);\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n );\r\n }\r\n\r\n function validarFisicoJuridico(event) {\r\n let valorCampo = event.currentTarget.value.replace(/\\D/g, '');\r\n if (valorCampo.length === 11) {\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n } else if (valorCampo.length === 14) {\r\n if (!validarCnpj(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n }\r\n setPessoaJuridica(valorCampo.length === 14);\r\n };\r\n\r\n function validarCpfCnpjExistente(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length === 14) {\r\n validarCnpjExiste(cpfCnpj);\r\n } else if (cpfCnpj.length === 11) {\r\n validarCpfExiste(cpfCnpj);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ não foi informado' });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Fornecedor Estrangeiro\r\n \r\n \r\n }\r\n \r\n \r\n {!!dadosEstrangeiro === false &&\r\n \r\n \r\n { validarFisicoJuridico(valor); validarCpfCnpjExistente(valor.currentTarget.value.replace(/\\D/g, '')) }}\r\n onChange={(event, type) => {\r\n setCpfCnpj(event.target.value);\r\n setMask(type === \"CPF\");\r\n }} />\r\n \r\n \r\n }\r\n {!!dadosEstrangeiro &&\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {!pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n }\r\n {!pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n }\r\n {pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Fornecedor Ativo? \r\n \r\n \r\n \r\n \r\n Produtor Rural? \r\n \r\n \r\n \r\n \r\n Calcula Retenção? \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"Informações Informações Financeiras\r\n \r\n \r\n Adicione as informações financeiras aqui.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pessoaJuridica &&\r\n \r\n \r\n Baixado da Receita? \r\n \r\n }\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!pessoaJuridica &&\r\n \r\n \r\n \r\n }\r\n {!!dadosEstrangeiro &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Campos Campos Adicionais\r\n \r\n \r\n Adicione abaixo as informações adicionais.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoFornecedor from './manutencao';\r\nimport { drawerActions, manutencaoActions, listagemActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function DrawerFornecedor({ editando }) {\r\n const nameForm = \"manutencaoFornecedor\"\r\n const [formFornecedor] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n\r\n if (!!manutencao.dados && editando.editando && !isObjetoDiffVazio(formFornecedor.getFieldValue())) {\r\n formFornecedor.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formFornecedor.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n editando.setEditando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={() => { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Button, Menu, Dropdown, Form, Collapse, Radio, Checkbox } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, MoreOutlined, CloudUploadOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport { Link } from \"react-router-dom\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerFornecedor from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BreadcrumbPage, BotaoIncluirDados, PesquisaAvancada } from \"../../components\";\r\n\r\nexport default function Fornecedor() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n const [open, setOpen] = useState(false);\r\n\r\n useEffect(() => {\r\n let _ativo = !!!form.getFieldsValue().fornecedorAtivo ? 1 : form.getFieldsValue().fornecedorAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${_ativo}`, ordem: '+pes_nome' } })\r\n form.setFieldsValue({ fornecedorAtivo: 1 });\r\n }, []);\r\n\r\n function editarFornecedor(record) {\r\n setEditando(true);\r\n record.pef_datanascimento = moment(record.pef_datanascimento);\r\n record.pej_datafundacao = !!record.pej_datafundacao ? moment(record.pej_datafundacao) : null;\r\n record.cpfCnpj = !!record.pef_cpf ? record.pef_cpf : (!!record.pej_cnpj ? record.pej_cnpj : '');\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function aplicarFiltrosAvancados() {\r\n let outrosFiltros = '';\r\n outrosFiltros += `&Ativo=${form.getFieldsValue().fornecedorAtivo}`;\r\n\r\n if (form.getFieldValue().produtorRural) {\r\n outrosFiltros += `&ProdutorRural=${form.getFieldValue().produtorRural}`;\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: outrosFiltros } });\r\n }\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n function modalExcluir(record) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Deseja realmente excluir o Fornecedor?`,\r\n okText: 'Excluir',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluir(record);\r\n }\r\n });\r\n }\r\n\r\n function excluir(record) {\r\n api.delete(`Fornecedor/Excluir/${record.for_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Aviso', description: 'Fornecedor excluído com sucesso!' });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n modalInativarRegistro(record);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().fornecedorAtivo}`, ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n const modalInativarRegistro = (record) => {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Não foi possível excluir o fornecedor ${record.pes_nome}. Deseja inativar este registro?`,\r\n okText: 'Inativar',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n function inativarRegistro(record) {\r\n api.put(`Fornecedor/InativarFornecedor/${record.for_id}`).then(\r\n res => {\r\n notification.success({ description: 'Registros inativado com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().fornecedorAtivo}`, ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().fornecedorAtivo}&ProdutorRural=${form.getFieldValue().produtorRural}&filtroAdicional=${btoa(expressao)}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().fornecedorAtivo}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n aplicarFiltrosAvancados()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n
\r\n \r\n aplicarFiltrosAvancados()}> Produtor Rural \r\n \r\n \r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={form} telaFiltro={4} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {for_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Fornecedor',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nome Fantasia',\r\n render: ({ pej_nomefantasia }) => (\r\n
\r\n {pej_nomefantasia || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 138,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, pee_numero, bai_nome, cep_cep, cid_descricao, est_sigla }) => (\r\n
\r\n {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n editarFornecedor(record);\r\n }} icon={} />\r\n \r\n \r\n {\r\n modalExcluir(record)\r\n }} icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandir={({ pej_nomefantasia, pef_rg, pej_inscricaoestadual, pem_email }) => {\r\n return (\r\n
\r\n \r\n {!!pej_nomefantasia ?
\r\n Nome Fantasia: {pej_nomefantasia}\r\n : null}\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoTransportador from './manutencao';\r\nimport { drawerActions, listagemActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function DrawerTransportador({ editando }) {\r\n\r\n const [formTransportador] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && editando.editando && !isObjetoDiffVazio(formTransportador.getFieldValue())) {\r\n formTransportador.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formTransportador.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n editando.setEditando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={() => { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Popover, Tag, notification, Modal, Menu, Button, Dropdown, Form, Collapse, Radio } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, CloudUploadOutlined, MoreOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport { Link } from \"react-router-dom\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerTransportador from \"./drawer\";\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BreadcrumbPage, BotaoIncluirDados, PesquisaAvancada } from \"../../components\";\r\n\r\nexport default function Transportadores() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [form] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n\r\n useEffect(() => {\r\n let _ativo = !!!form.getFieldsValue().transportadorAtivo ? 1 : form.getFieldsValue().transportadorAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${_ativo}`, filtro: '', ordem: '+pes_nome' } })\r\n form.setFieldsValue({ transportadorAtivo: 1 });\r\n }, []);\r\n\r\n\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n\r\n\r\n function editarTransportador(valores) {\r\n setEditando(true);\r\n valores.pej_datafundacao = !!valores.pej_datafundacao ? moment(valores.pej_datafundacao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.cpfCnpj = !!valores.pef_cpf ? valores.pef_cpf : valores.pej_cnpj;\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function modalExcluir(record) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Deseja realmente excluir o Transportador`,\r\n okText: 'Excluir',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluir(record);\r\n }\r\n });\r\n }\r\n\r\n function excluir(record) {\r\n api.delete(`Transportador/Excluir/${record.trn_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Aviso', description: 'Transportador excluído com sucesso!' });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n modalInativarRegistro(record);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${form.getFieldsValue().transportadorAtivo}`, ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n const modalInativarRegistro = (record) => {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Não foi possível excluir o transportador ${record.pes_nome}. Deseja inativar este registro?`,\r\n okText: 'Inativar',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n function inativarRegistro(record) {\r\n api.put(`Transportador/InativarTransportador/${record.trn_id}`).then(\r\n res => {\r\n notification.success({ description: 'Registros inativado com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${form.getFieldsValue().transportadorAtivo}`, ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${form.getFieldsValue().transportadorAtivo}&filtroAdicional=${btoa(expressao)}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${form.getFieldsValue().transportadorAtivo}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n { retornoPesquisaAvancada(ret) }} funcaoLimpar={() => { limparFiltroPesquisa() }} telaFiltro={1} />\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {trn_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Transportador',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nome Fantasia',\r\n render: ({ pej_nomefantasia }) => (\r\n
\r\n {pej_nomefantasia || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 138,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, pee_numero, bai_nome, cep_cep, cid_descricao, est_sigla }) => (\r\n
\r\n {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n editarTransportador(record);\r\n\r\n }} icon={} />\r\n \r\n \r\n {\r\n modalExcluir(record);\r\n }}\r\n icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandir={({ pef_rg, pej_inscricaoestadual, pem_email }) => {\r\n return (\r\n
\r\n \r\n {!!pef_rg ?
\r\n RG: {pef_rg}\r\n : null}\r\n {!!pej_inscricaoestadual ? \r\n IE: {pej_inscricaoestadual}\r\n : null}\r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n\r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Tabs, Typography, Row, Col, Form, Divider, Input, Select, Radio, Checkbox, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\"\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { Data, FormGW, FormularioDinamico, InputCpfCnpj, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { Endereco, Email, Telefone, Ocupacao, Nacionalidade, OutrosContatos } from '../pessoas/pages';\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico, HasValue, isObjetoDiffVazio, validarCpf, validarCnpj } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoFuncionario({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [estadoCivil, setEstadoCivil] = useState([]);\r\n const [pessoaJuridica, setPessoaJuridica] = useState(false);\r\n const [supervisor, setSupervisor] = useState([]);\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [listaCidades, setListaCidades] = useState(false);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [controleCnhCategoria, setControleCnhCategoria] = useState([]);\r\n const [cnhCategoria, setCnhCategoria] = useState(false);\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length > 0) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n useEffect(() => {\r\n if (manutencao?.dados?.funcionariocampopersonalizados?.length > 0)\r\n carregaDadosCamposAdicionais();\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n listarEstadoCivil();\r\n listarSupervisor();\r\n carregaCamposPersonalizados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.fun_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: manutencao.dados.pef_rguf });\r\n }\r\n if (!!manutencao.dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: manutencao.dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n\r\n formulario.setFieldsValue(manutencao.dados);\r\n cnhCategoriaPreenchida(manutencao.dados.cnh_categoria);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.fun_id)\r\n listaFuncionario(manutencao.dados.fun_id)\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let _cpfCnpj = formulario.getFieldValue().pef_cpf ? formulario.getFieldValue().pef_cpf : manutencao.dados.pef_cpf;\r\n _cpfCnpj = _cpfCnpj?.replace(/[^\\d]+/g, '');\r\n if (HasValue(_cpfCnpj)) {\r\n if (_cpfCnpj.length === 11) {\r\n if (validarCpf(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n }\r\n else if (_cpfCnpj.length === 14) {\r\n if (validarCnpj(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n } else {\r\n setDesabilitarCpfCnpj(false);\r\n }\r\n }\r\n if (!!manutencao.dados.pef_cpf) {\r\n if (manutencao.dados.pef_cpf.length > 11) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=CnhCategoria`).then(res => {\r\n if (res.status === 200) {\r\n setControleCnhCategoria(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, [])\r\n\r\n function setFocusCpfCnpj() {\r\n setTimeout(\r\n () => {\r\n try {\r\n let element = document.getElementById(\"pef_cpf\");\r\n if (element) {\r\n element.focus();\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 300);\r\n }\r\n\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(` &UfEstado=${UfEstado}`);\r\n }\r\n else {\r\n setListaCidades(false);\r\n }\r\n }\r\n\r\n const salvarManutencao = valores => {\r\n valores = { ...valores, ...formulario.getFieldValue() };\r\n if (!!manutencao.dados) {\r\n if (!manutencao.dados.enderecos || manutencao.dados.enderecos.length === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Nenhum endereço foi cadastrado!' });\r\n return false;\r\n } else if (!manutencao.dados.telefones || manutencao.dados.telefones.length === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Nenhum número de telefone foi cadastrado!' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor informar o endereço, telefone.' });\r\n return false;\r\n }\r\n valores.pessoaemails = !!manutencao.dados.emails && manutencao.dados.emails.length > 0 ? manutencao.dados.emails : [];\r\n valores.pessoasocupacoes = !!manutencao.dados.ocupacoes && manutencao.dados.ocupacoes.length > 0 ? manutencao.dados.ocupacoes : [];\r\n valores.pessoaoutrocontatos = !!manutencao.dados.pessoaoutrocontatos && manutencao.dados.pessoaoutrocontatos.length > 0 ? manutencao.dados.pessoaoutrocontatos : [];\r\n valores.pessoatelefones = !!manutencao.dados.telefones && manutencao.dados.telefones.length > 0 ? manutencao.dados.telefones : [];\r\n valores.enderecos = !!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0 ? manutencao.dados.enderecos : [];\r\n valores.pessoanacionalidades = !!manutencao.dados.nacionalidades && manutencao.dados.nacionalidades.length > 0 ? manutencao.dados.nacionalidades : [];\r\n\r\n valores.estadocivil = estadoCivil.filter((ecv) => (ecv.ecv_id === valores.ecv_id))[0];\r\n valores.supervisor = {};\r\n if (!!valores.fun_supervisor) {\r\n valores.supervisor.fun_id = supervisor.filter((sup) => (sup.fun_id === valores.fun_supervisor))[0].fun_id;\r\n }\r\n\r\n valores.pessoacnh = {};\r\n if (!!valores.cnh_numero || !!valores.cnh_categoria) {\r\n valores.pessoacnh.cnh_id = !!valores.cnh_id ? valores.cnh_id : null;\r\n valores.pessoacnh.cnh_numero = valores.cnh_numero;\r\n valores.pessoacnh.cnh_categoria = !!valores.cnh_categoria ? valores.cnh_categoria : null;\r\n valores.pessoacnh.cnh_dataemissao = !!valores.cnh_dataemissao ? moment(valores.cnh_dataemissao) : null;\r\n valores.pessoacnh.cnh_datavencimento = !!valores.cnh_datavencimento ? moment(valores.cnh_datavencimento) : null;\r\n }\r\n\r\n valores.fun_datademissao = !!valores.fun_datademissao ? moment(valores.fun_datademissao) : null;\r\n valores.fun_dataadmissao = !!valores.fun_dataadmissao ? moment(valores.fun_dataadmissao) : null;\r\n valores.pef_cpf = valores.pef_cpf.replace(/\\D/g, '');\r\n\r\n if (valores.pef_cpf.length === 11) {\r\n valores.pes_fisicajuridica = 1;\r\n valores.cpfCnpj = valores.pef_cpf;\r\n if (!validarCpf(valores.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n return false;\r\n }\r\n } else if (valores.pef_cpf.length === 14) {\r\n valores.pes_fisicajuridica = 2;\r\n valores.pej_cnpj = valores.pef_cpf;\r\n if (!validarCnpj(valores.pef_cpf)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'CPF/CNPJ informado é inválido' });\r\n return false;\r\n }\r\n\r\n\r\n valores.fun_valorcustohora = parseFloat(valores.fun_valorcustohora);\r\n valores.fun_valorcustomes = parseFloat(valores.fun_valorcustomes);\r\n valores.funcionariocampopersonalizados = salvarCamposAdicionais(valores);\r\n carregando(true);\r\n if (!!valores.fun_id) {\r\n api.put(`Funcionario/Editar`, valores).then(\r\n res => {\r\n notification.success({ message: 'Aviso!', description: `Funcionario editado com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post(`Funcionario/Incluir`, valores).then(\r\n res => {\r\n notification.success({ message: 'Aviso!', description: `Funcionario incluído com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n };\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n let camposPersonalizados = { ...manutencao.dados };\r\n camposPersonalizados?.funcionariocampopersonalizados?.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n if (!!elemento)\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.fcp_valor);\r\n })\r\n }\r\n\r\n const salvarCamposAdicionais = (values) => {\r\n var camposAdicionais = [];\r\n elementosFormulario?.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let funcionariocampopersonalizados = { ...manutencao.dados };\r\n let forDados = funcionariocampopersonalizados.funcionariocampopersonalizados?.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if (!!values[elemento.cap_nomeelemento]) {\r\n camposAdicionais.push({ fcp_id: !!forDados ? forDados.fcp_id : null, fun_id: values.fun_id, cap_id: elemento.cap_id, fcp_valor: String(values[elemento.cap_nomeelemento]) });\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?entidade=3&PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n function validarCpfExistente(cpf) {\r\n api.get(`PessoaFisica/VerificarCpfExistente?cpf=${cpf}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_funcionario) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CPF informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarFuncionarioCpf(cpf);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarFuncionarioCpf(cpf);\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n\r\n function verificarCpfValido(dado) {\r\n let valorCampo;\r\n if (!!dado.currentTarget) {\r\n valorCampo = dado.currentTarget.value.replace(/\\D/g, '');\r\n } else {\r\n valorCampo = dado;\r\n }\r\n if (HasValue(valorCampo)) {\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n formulario.setFieldsValue({ pef_cpf: null });\r\n setFocusCpfCnpj();\r\n } else {\r\n validarCpfExistente(valorCampo)\r\n }\r\n }\r\n }\r\n\r\n function listaFuncionario(fun_id) {\r\n if (!!!fun_id) {\r\n return;\r\n }\r\n api.get(`Funcionario/BuscarFuncionario/${fun_id}`).then(\r\n (res) => {\r\n let valores = res.data;\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n res.data.pef_rguf = res.data.pef_rguf == \"\" ? null : res.data.pef_rguf\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.fun_dataadmissao = !!valores.fun_dataadmissao ? moment(valores.fun_dataadmissao) : null;\r\n valores.fun_datademissao = !!valores.fun_datademissao ? moment(valores.fun_datademissao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.cnh_dataemissao = !!valores.cnh_dataemissao ? moment(valores.cnh_dataemissao) : null;\r\n valores.cnh_datavencimento = !!valores.cnh_datavencimento ? moment(valores.cnh_datavencimento) : null;\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarFuncionarioCpf(cpf) {\r\n api.get(`Funcionario/BuscarFuncionarioCpf/${cpf}`).then(\r\n res => {\r\n let valores = res.data;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.fun_dataadmissao = !!valores.fun_dataadmissao ? moment(valores.fun_dataadmissao) : null;\r\n valores.fun_datademissao = !!valores.fun_datademissao ? moment(valores.fun_datademissao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.fun_ativo = true;\r\n let lista = [];\r\n if (!!valores.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: valores.pef_rguf });\r\n }\r\n if (!!valores.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: valores.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function listarEstadoCivil() {\r\n api.get(`EstadoCivil/Listar`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setEstadoCivil(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function listarSupervisor() {\r\n api.get(`Funcionario/BuscarSupervisor`).then(\r\n res => {\r\n setSupervisor(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const cnhCategoriaPreenchida = (value) => {\r\n if (value) {\r\n setCnhCategoria(true);\r\n } else {\r\n setCnhCategoria(false);\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n { verificarCpfValido(pef_cpf) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Funcionário Ativo? \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"Outras Outras Informações\r\n \r\n \r\n Outras Informações Relacionadas.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Campos Campos Adicionais\r\n \r\n \r\n Adicione abaixo as informações adicionais.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoFuncionario from './manutencao';\r\nimport { drawerActions, listagemActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function DrawerFuncionario({ editando }) {\r\n\r\n const [formFuncionario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && editando.editando && !isObjetoDiffVazio(formFuncionario.getFieldValue())) {\r\n formFuncionario.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formFuncionario.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n editando.setEditando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n { fecharDrawer() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Button, Dropdown, Menu, Form, Collapse, Radio } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, MoreOutlined, CloudUploadOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerFuncionario from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BotaoIncluirDados, BreadcrumbPage, PesquisaAvancada } from \"../../components\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nexport default function Funcionario() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n const [open, setOpen] = useState(false);\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n useEffect(() => {\r\n let _ativo = !!!form.getFieldsValue().funcionarioAtivo ? 1 : form.getFieldsValue().funcionarioAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${_ativo}`, ordem: '+pes_nome' } })\r\n form.setFieldsValue({ funcionarioAtivo: 1 });\r\n }, []);\r\n\r\n function excluirRegistro(funcionario) {\r\n api.delete(`Funcionario/Excluir/${funcionario.fun_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: 'funcionario excluído com sucesso!' });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().funcionarioAtivo}`, filtro: '', ordem: '+pes_nome' } });\r\n }).catch(\r\n (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(funcionario);\r\n })\r\n };\r\n\r\n function inativarRegistro(funcionario) {\r\n api.put(`Funcionario/InativarFuncionario/${funcionario.fun_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().funcionarioAtivo}`, filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (funcionario) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o funcionario ${funcionario.fun_id}-${funcionario.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(funcionario);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (funcionario) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o funcionario!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o funcionario ${funcionario.fun_id}-${funcionario.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(funcionario);\r\n }\r\n });\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n function editarFuncionario(record) {\r\n setEditando(true);\r\n record.fun_dataadmissao = moment(record.fun_dataadmissao);\r\n record.fun_datademissao = moment(record.fun_datademissao);\r\n record.pef_rgdataexpedicao = moment(record.pef_rgdataexpedicao);\r\n record.pef_datanascimento = moment(record.pef_datanascimento);\r\n record.pef_dataalteracao = moment(record.pef_dataalteracao);\r\n record.pes_datainclusao = moment(record.pes_datainclusao);\r\n record.pes_dataalteracao = moment(record.pes_dataalteracao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().funcionarioAtivo}&filtroAdicional=${btoa(expressao)}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().funcionarioAtivo}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={form} telaFiltro={4} />\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {fun_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Funcionário',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF',\r\n width: 138,\r\n render: ({ pef_cpf }) => (\r\n
\r\n {MaskFormat(pef_cpf, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, pee_numero, bai_nome, cep_cep, cid_descricao, est_sigla }) => (\r\n
\r\n \r\n {!!log_logradouro ? log_logradouro : 'Não Informado'}\r\n {!!pee_numero ? (', ' + pee_numero) : ''}\r\n {!!bai_nome ? (', ' + bai_nome) : ''}\r\n {!!cep_cep ? ('- ' + cep_cep) : ''}\r\n {!!cid_descricao ? ('- ' + cid_descricao) : ''}\r\n {!!est_sigla ? ('- ' + est_sigla) : ''}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n editarFuncionario(record);\r\n }} icon={} />\r\n \r\n \r\n { modalExcluirRegistro(record) }} icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]}\r\n expandir={({ pem_email, pef_rg }) => {\r\n return (\r\n \r\n {!!pef_rg ? \r\n RG: {pef_rg}\r\n : null}\r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Form, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoVendedor from './manutencao';\r\nimport { drawerActions, manutencaoActions, listagemActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function DrawerVendedor({ editando }) {\r\n const [formVendedor] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [pagina, setPagina] = useState(1);\r\n\r\n if (!!manutencao.dados && editando.editando && !isObjetoDiffVazio(formVendedor.getFieldValue())) {\r\n formVendedor.setFieldsValue(manutencao.dados);\r\n }\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n formVendedor.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n setPagina(1);\r\n editando.setEditando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n onCloseEdit={onClose}\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Tag, Popover, notification, Modal, Dropdown, Button, Menu, Form, Collapse, Radio } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, MoreOutlined, CloudUploadOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerVendedor from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, FormatarCPF } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BotaoIncluirDados, BreadcrumbPage, PesquisaAvancada } from \"../../components\";\r\nimport { Link } from 'react-router-dom';\r\n\r\nexport default function Vendedor() {\r\n\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n const [open, setOpen] = useState(false);\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n useEffect(() => {\r\n let _ativo = !!!form.getFieldsValue().vendedorAtivo ? 1 : form.getFieldsValue().vendedorAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${_ativo}`, filtro: '', ordem: '+pes_nome' } })\r\n form.setFieldsValue({ vendedorAtivo: 1 });\r\n }, []);\r\n\r\n function editarVendedor(valores) {\r\n setEditando(true);\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.id_rguf = valores.pef_rguf\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function excluirRegistro(vendedor) {\r\n api.delete(`Vendedor/Excluir/${vendedor.ven_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: 'vendedor excluído com sucesso!' });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().vendedorAtivo}`, filtro: '', ordem: '+pes_nome' } });\r\n }).catch(\r\n (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(vendedor);\r\n })\r\n };\r\n\r\n function inativarRegistro(vendedor) {\r\n api.put(`Vendedor/InativarVendedor/${vendedor.ven_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().vendedorAtivo}`, filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (vendedor) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o vendedor ${vendedor.ven_id}-${vendedor.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(vendedor);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (vendedor) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o vendedor!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o vendedor ${vendedor.ven_id}-${vendedor.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(vendedor);\r\n }\r\n });\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().vendedorAtivo}&filtroAdicional=${btoa(expressao)}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&ativo=${form.getFieldValue().vendedorAtivo}`, ordem: '+pes_nome' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={form} telaFiltro={6} />\r\n \r\n
\r\n \r\n \r\n\r\n \r\n
\r\n (\r\n \r\n \r\n {ven_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vendedor', key: 'pes_nome',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF',\r\n width: 138,\r\n render: ({ pef_cpf }) => (\r\n
\r\n {FormatarCPF(pef_cpf) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'RG',\r\n width: 120,\r\n render: ({ pef_rg }) => (\r\n
\r\n {pef_rg || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, pee_numero, bai_nome, cep_cep, cid_descricao, est_sigla }) => (\r\n
\r\n {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n editarVendedor(record)} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluirRegistro(record)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]}\r\n expandir={({ pem_email }) => {\r\n return (\r\n
\r\n \r\n
\r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n \r\n );\r\n }}\r\n />\r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, notification, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, CloseCircleOutlined, ExclamationCircleOutlined, CopyFilled } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerTributacaoIcms from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function TributacaoIcms() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } }), []);\r\n\r\n function excluirRegistro(item) {\r\n setCarregando(true);\r\n api.delete(`tributacaoIcms/Excluir/${item.icm_id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Os dados do ICMS foram excluídos com sucesso!\" });\r\n dispatch({ type: listagemActions.CHANGE, data: { label: \"Nome Z - A\", ordem: '+icm_descricao' } })\r\n }).catch(err => {\r\n modalInativarConta(item);\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarConta = (dados) => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir a Tributação ICMS ${dados.icm_descricao}!`,\r\n icon: ,\r\n content: `Deve conter referências com outros registros!`,\r\n okText: 'Inativar Registro',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n console.log(dados);\r\n dados.inativar = 1;\r\n dados.icm_ativo = false;\r\n api.put(`tributacaoIcms/editar`, dados).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Tributação inativada com sucesso!\" });\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { label: \"Nome Z - A\", ordem: '+icm_descricao' } })\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } });\r\n });\r\n }\r\n });\r\n };\r\n\r\n const modalDuplicarDados = (dados) => {\r\n Modal.confirm({\r\n title: 'Duplicar?',\r\n icon: ,\r\n content: `Deseja duplicar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dados.duplicar = true;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {icm_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tributações do ICMS',\r\n render: ({ icm_descricao }) => (\r\n
\r\n {icm_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(record)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Tag, Popover, Divider, Modal, notification } from \"antd\";\r\nimport { EditOutlined, ExclamationCircleOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerTributacaoPisCofins from './drawer';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function TributacaoPisCofins() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function excluirRegistro(id) {\r\n setCarregando(true);\r\n api.delete(`TributacaoPisCofins/Excluir/${id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, erro => {\r\n modalInativarRegistro(id);\r\n })\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n const modalInativarRegistro = (id) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a Tributação Pis/Cofins. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(id);\r\n }\r\n });\r\n };\r\n\r\n function inativarRegistro(id) {\r\n api.put(`TributacaoPisCofins/Inativar/${id}`).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Tributação Pis/Cofins inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pis_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {pis_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tributação do PIS e COFINS',\r\n render: ({ pis_descricao }) => (\r\n
\r\n \r\n
\r\n {pis_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n render: ({ nat_descricao }) => (\r\n
\r\n \r\n {nat_descricao}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n let item = { ...record };\r\n item.cpc_saidacstpis = { cpc_id: record.cpc_saidacstpis };\r\n item.cpc_saidacstcofins = { cpc_id: record.cpc_saidacstcofins };\r\n item.cpc_entradacstpispj = { cpc_id: record.cpc_entradacstpispj };\r\n item.cpc_entradacstpispf = { cpc_id: record.cpc_entradacstpispf };\r\n item.cpc_entradacstcofinspj = { cpc_id: record.cpc_entradacstcofinspj };\r\n item.cpc_entradacstcofinspf = { cpc_id: record.cpc_entradacstcofinspf };\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: item } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(record.pis_id)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n }\r\n expandir={(record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Tributação PIS\r\n \r\n \r\n \r\n \r\n CST Saída: {record.cpc_saidacstpis || 'Não Informado'} \r\n \r\n \r\n Perc.Redução BC: {record.pis_saidapercredbcpis || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_saidapercpis || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Física: {record.cpc_entradacstpispf || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbcpispf || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradapercpispf || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Jurídica: {record.cpc_entradacstpispj || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbcpispj || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_entradapercpispj || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Tributação COFINS\r\n \r\n \r\n \r\n \r\n CST Saída: {record.cpc_saidacstcofins || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_saidapercredbccofins || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_saidaperccofins || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Física: {record.cpc_entradacstcofinspf || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbccofinspf || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradaperccofinspf || 'Não Informado'} \r\n \r\n \r\n \r\n CST Entrada Pessoa Jurídica: {record.cpc_entradacstcofinspj || 'Não Informado'} \r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbccofinspj || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradaperccofinspj || 'Não Informado'} \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, notification, Table, Form, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { ModalNcm } from \"../../components/modals/\";\r\n\r\nexport default function TabDadosOrigemDestino({ formulario }) {\r\n\r\n const [formModal] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModal, setOpenModal] = useState(false);\r\n const [listaNcm, setListaNcm] = useState([]);\r\n const [dadosNcm, setDadosNcm] = useState(null);\r\n\r\n const modalExcluir = (item, index) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerRegistro(item, index);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.mvaorigemdestinos) {\r\n setListaNcm(manutencao.dados.mvaorigemdestinos);\r\n }\r\n }, [manutencao.dados])\r\n\r\n function fecharModal() {\r\n setOpenModal(false);\r\n if (dadosNcm.mvaorigemdestinos) {\r\n let listTemp = [...dadosNcm.mvaorigemdestinos];\r\n setListaNcm(listTemp);\r\n }\r\n }\r\n\r\n function removerRegistro(item, index) {\r\n let listTemp = [...manutencao.dados.mvaorigemdestinos];\r\n if (index !== -1) {\r\n if (index > -1) {\r\n listTemp.splice(index, 1)\r\n }\r\n setListaNcm(listTemp);\r\n manutencao.dados.mvaorigemdestinos = listTemp\r\n }\r\n }\r\n function editarRegistro(item, index) {\r\n setOpenModal(true);\r\n setDadosNcm(manutencao.dados);\r\n formModal.setFieldsValue(item);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados de Origem e Destino (OPCIONAL)\r\n \r\n \r\n Defina as Informações de Origem e Destino referente a Substituição Tributário.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {mva_uforigem}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Destino',\r\n align: 'center',\r\n width: 80,\r\n render: ({ mva_ufdestino }) => (\r\n
\r\n {mva_ufdestino}\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Redução da Base de Cálculo',\r\n align: 'center',\r\n render: ({ mva_percaliquotaicmsreducao }) => (\r\n
\r\n {mva_percaliquotaicmsreducao}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Alíquota ICMS ST',\r\n align: 'center',\r\n render: ({ mva_percaliquotaicms }) => (\r\n
\r\n {mva_percaliquotaicms}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'MVA',\r\n align: 'center',\r\n width: 100,\r\n render: ({ mva_percmva }) => (\r\n
\r\n {mva_percmva}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'MVA Ajustado',\r\n align: 'center',\r\n render: ({ mva_ajustado }) => (\r\n
\r\n {mva_ajustado}%\r\n
\r\n ),\r\n },\r\n {\r\n title: ' MVA Interestadual',\r\n align: 'center',\r\n render: ({ mva_simplesnacional }) => (\r\n
\r\n {mva_simplesnacional}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 75,\r\n render: (item, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({cip.cip_id} - {cip.cip_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n ({cip.cip_id} - {cip.cip_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoNcmSubtituicaoTributaria from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerNcmSubtituicaoTributaria() {\r\n\r\n const [formNCM] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null)\r\n formNCM.setFieldsValue(manutencao.dados);\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n function fecharDrawer() {\r\n formNCM.resetFields();\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ncm_id' } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Button, Tag, Modal, notification, Radio, Form, Popover } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerNcmSubtituicaoTributaria from './drawer';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BotaoIncluirDados, BreadcrumbPage } from \"../../components\";\r\nimport { func } from \"prop-types\";\r\nimport { ModalCarregando } from \"../../components/modals\";\r\n\r\nexport default function NcmSubtituicaoTributaria() {\r\n\r\n const [{ manutencao, listagem }, dispatch] = useStateValue();\r\n const [formPesquisaAvancada] = Form.useForm();\r\n\r\n const atualizarSiscomex = () => {\r\n return api.post('Ncm/AtualizarSiscomex')\r\n .finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ncm_id' } });\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisaAvancada.getFieldsValue().ncmAtivo ? 1 : formPesquisaAvancada.getFieldsValue().ncmAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: '', outrosFiltros: `&Ativo=${_ativo}`, ordem: '+ncm_id' } });\r\n formPesquisaAvancada.setFieldsValue({ ncmAtivo: 1 });\r\n }, [])\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n listagem.outrosFiltros = '';\r\n expressao = !!expressao ? expressao : '';\r\n let filtrosTela = popularFiltrosTela();\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: !!listagem.filtro ? listagem.filtro : '', outrosFiltros: `${filtrosTela}&filtroAdicional=${btoa(expressao)}`, ordem: '+ncm_id' } })\r\n };\r\n\r\n function popularFiltrosTela() {\r\n let filtrosTela = '';\r\n filtrosTela += `&Ativo=${formPesquisaAvancada.getFieldsValue().ncmAtivo}`\r\n\r\n return filtrosTela;\r\n }\r\n\r\n function excluirNcm(record) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(record) {\r\n api.delete(`Ncm/Excluir/${record.ncm_id}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do NCM foram salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ncm_id' } });\r\n });\r\n };\r\n\r\n function duplicarNcm(record) {\r\n record.ncm_id = null;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function atualizarNcm() {\r\n ModalCarregando({\r\n title: 'Atualizar?',\r\n titleModalLoading: 'Atualizando NCMs ...',\r\n confirmContent: 'Deseja atualizar os NCMs conforme a última atualização realizada com base na tabela Siscomex?',\r\n apiCall: atualizarSiscomex,\r\n successMessage: 'Os dados do NCM foram salvos com sucesso!',\r\n errorMessage: 'Ocorreu um erro ao atualizar os NCMs',\r\n successCallback: () => console.log('Atualização bem-sucedida'),\r\n errorCallback: () => console.log('Falha na atualização'),\r\n });\r\n }\r\n //Criado um componente ModalCarregando\r\n // Modal.confirm({\r\n // title: 'Atualizar?',\r\n // icon: ,\r\n // content: 'Deseja atualizar os NCMs conforme a última atualização realizada com base na tabela Siscomex?',\r\n // okText: 'Sim',\r\n // cancelText: 'Não',\r\n // centered: true,\r\n // onOk() {\r\n // // Exibe uma modal de \"Atualizando...\"\r\n // const loadingModal = Modal.info({\r\n // title: 'Atualizando...',\r\n // content: (\r\n //
\r\n // \r\n //

Por favor, aguarde enquanto os NCMs estão sendo atualizados.

\r\n //
\r\n // ),\r\n // okButtonProps: { disabled: true },\r\n // closable: false,\r\n // centered: true,\r\n // });\r\n\r\n // // Chama a função de atualização\r\n // atualizarSiscomex()\r\n // .then(() => {\r\n // // Fecha a modal de \"Atualizando...\" e exibe uma confirmação\r\n // loadingModal.destroy();\r\n // Modal.success({\r\n // title: 'Atualização Completa',\r\n // content: 'Os NCMs foram atualizados com sucesso!',\r\n // });\r\n // })\r\n // .catch((error) => {\r\n // // Fecha a modal de \"Atualizando...\" e exibe uma mensagem de erro\r\n // loadingModal.destroy();\r\n // Modal.error({\r\n // title: 'Erro na Atualização',\r\n // content: `Ocorreu um erro durante a atualização dos NCMs: ${error.message}`,\r\n // });\r\n // });\r\n // }\r\n // });\r\n // }\r\n\r\n // function atualizarSiscomex() {\r\n // return api.post('Ncm/AtualizarSiscomex')\r\n // .then(res => {\r\n // notification.success({\r\n // message: 'Operação concluída',\r\n // description: \"Os dados do NCM foram salvos com sucesso!\"\r\n // });\r\n // })\r\n // .catch(error => {\r\n // console.error(error);\r\n // throw new Error('Ocorreu um erro ao atualizar os NCMs');\r\n // })\r\n // .finally(() => {\r\n // dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ncm_id' } });\r\n // });\r\n // }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {ncm_codigo.codigoNcm ? ncm_codigo.codigoNcm : ncm_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ ncm_descricao }) => (\r\n
\r\n {ncm_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { excluirNcm(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } expandir={({ cip_entrada, cip_saida, ncm_percentual, ncm_extipi }) => {\r\n return (\r\n
\r\n \r\n
\r\n CST IPI para Entrada: {cip_entrada || 'Não Informado'}\r\n \r\n \r\n CST IPI para Saída: {cip_saida || 'Não Informado'}\r\n \r\n \r\n Alíquota do IPI: {ncm_percentual || 'Não Informado'}\r\n \r\n \r\n Exceção do IPI: {ncm_extipi || 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, Drawer } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport ManutencaoMarca from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerMarca({cadMarca, openDrawer, setOpenDrawer, retornoSalvar}) {\r\n\r\n const [formMarca] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) {\r\n formMarca.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n //formMarca.resetFields();\r\n formMarca.setFieldsValue({mar_ativa:true});\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n } \r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n formMarca.resetFields();\r\n if (!!openDrawer) {\r\n setOpenDrawer(false);\r\n }\r\n else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n } \r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n onClose={() => onClose()}\r\n \r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport DrawerMarca from './drawer';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar } from \"../../components\";\r\n\r\nexport default function Marca() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+mar_nome' } }), []);\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`Marca/Excluir/${dados.mar_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Marca excluida com sucesso!` });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarRegistro(dados);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mar_nome' } });\r\n });\r\n }\r\n\r\n function inativarRegistro(dados) {\r\n dados.mar_ativa = false;\r\n api.put(`Marca/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Marca inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mar_nome' } });\r\n }\r\n )\r\n }\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a marca ${dados.mar_nome}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Marca: ${dados.mar_nome}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalDuplicarDados = (dados) => {\r\n Modal.confirm({\r\n title: 'Duplicar?',\r\n icon: ,\r\n content: `Deseja duplicar a Marca: ${dados.mar_nome}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n duplicarDados(dados);\r\n }\r\n });\r\n };\r\n\r\n function duplicarDados(dados) {\r\n let valores = { ...dados };\r\n valores.mar_id = null;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {mar_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Marca',\r\n render: ({ mar_nome }) => (\r\n
\r\n {mar_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => { modalDuplicarDados(dados) }} />\r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoMarcaVeiculo({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'marcaVeiculo/';\r\n\r\n if (values.mav_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: \"Operação concluída\", description: \"Os dados da Marca foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: \"Erro ao processar a requisição.\", description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: \"Operação concluída\", description: \"Os dados da Marca foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: \"Erro ao processar a requisição.\", description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n };\r\n }\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: \"+mav_descricao\" } });\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Marca Ativa\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, Drawer } from 'antd';\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from '@ant-design/icons';\r\n\r\nimport ManutencaoMarcaVeiculo from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerMarcaVeiculo({ cadMarcaVeiculo, openDrawer, setOpenDrawer, retornoSalvar }) {\r\n\r\n const [formMarcaVeiculo] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formMarcaVeiculo.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formMarcaVeiculo.setFieldsValue({ mav_ativa: true });\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if (!!retornoSalvar) {\r\n retornoSalvar(retorno);\r\n }\r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n formMarcaVeiculo.resetFields();\r\n if (!!openDrawer) {\r\n setOpenDrawer(false);\r\n }\r\n else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: \"Cancelar?\",\r\n icon: ,\r\n content: \"Deseja cancelar a operação e ignorar o que foi realizado até o momento?\",\r\n okText: \"Sim\",\r\n cancelText: \"Não\",\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n\r\n return (\r\n }\r\n onClose={() => onClose()}\r\n\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\n\r\nimport DrawerMarcaVeiculo from \"./drawer\";\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar } from \"../../components\";\r\nimport { CopyOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { DeleteOutline } from \"@material-ui/icons\";\r\n\r\nexport default function MarcaVeiculo() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+mav_descricao' } }), []);\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Marca ${dados.mav_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirMarca(dados);\r\n }\r\n });\r\n };\r\n\r\n function excluirMarca(dados) {\r\n api.delete(`MarcaVeiculo/Excluir/${dados.mav_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Sucesso!', description: 'Marca excluída com sucesso!' });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarMarca(dados);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mav_descricao' } });\r\n });\r\n }\r\n\r\n const modalInativarMarca = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a marca ${dados.mav_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarMarca(dados);\r\n }\r\n });\r\n };\r\n\r\n function inativarMarca(dados) {\r\n dados.mav_ativa = false;\r\n api.put(`MarcaVeiculo/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: 'Marca inativada com sucesso!' })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mav_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n const modalDuplicarDados = (dados) => {\r\n Modal.confirm({\r\n title: 'Duplicar?',\r\n icon: ,\r\n content: `Deseja duplicar a Marca ${dados.mav_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n duplicarDados(dados);\r\n }\r\n })\r\n }\r\n\r\n function duplicarDados(dados) {\r\n let valores = { ...dados };\r\n valores.mav_id = null;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {mav_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Marca de Veículo',\r\n render: ({ mav_descricao }) => (\r\n
\r\n {mav_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => { modalDuplicarDados(dados) }} />\r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Divider, Col, Input, Checkbox, notification, Select, message } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW, SelectPaginacao, Data } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { validarIE } from \"../../services/funcoesIE\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nexport default function ManutencaoVeiculo({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [controleTipoRodado, setControleTipoRodado] = useState([]);\r\n const [controleTipoCarroceria, setControleTipoCarroceria] = useState([]);\r\n const [controleTipoProprietario, setControleTipoProprietario] = useState([]);\r\n const [controleTipoTransporte, setControleTipoTransporte] = useState([]);\r\n const [listaCidades, setListaCidades] = useState(false);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const [cpfCnpj, setCpfCnpj] = useState(null);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=TipoRodado`).then(res => {\r\n if (res.status === 200) {\r\n setControleTipoRodado(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoCarroceria`).then(res => {\r\n if (res.status === 200) {\r\n setControleTipoCarroceria(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoProprietario`).then(res => {\r\n if (res.status === 200) {\r\n setControleTipoProprietario(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoTransporte`).then(res => {\r\n if (res.status === 200) {\r\n setControleTipoTransporte(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.vei_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.vei_uf) {\r\n lista.push({ name: \"vei_uf\", campo: \"Uf\", value: manutencao.dados.vei_uf });\r\n }\r\n if (!!manutencao.dados.cid_id) {\r\n lista.push({ name: \"cid_id\", campo: \"IdCidade\", value: manutencao.dados.cid_id });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n setListaCidades(true);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'veiculo/';\r\n\r\n if (values.vei_inscricaoestadual_numeroInscricaoEstadual === undefined) {\r\n values.vei_inscricaoestadual_numeroInscricaoEstadual = \"\";\r\n }\r\n if (values.vei_inscricaoestadual_ufestado === undefined) {\r\n values.vei_inscricaoestadual_ufestado = \"\";\r\n }\r\n\r\n if (!!values.vei_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: \"Operação concluída\", description: \"Os dados do Veículo foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: \"Erro ao processar a requisição.\", description: \"Ocorreu um erro ao tentar salvar os dados do Veículo. Por favor, tente novamente.\" });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: \"Operação concluída\", description: \"Os dados do Veículo foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: \"Erro ao processar a requisição.\", description: \"Ocorreu um erro ao tentar salvar os dados do Veículo. Por favor, tente novamente.\" });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n };\r\n if (!!values.vei_inscricaoestadual_numeroInscricaoEstadual && !validarIE(values.vei_inscricaoestadual_numeroInscricaoEstadual, values.vei_inscricaoestadual_ufestado)) {\r\n notification.warning({ message: 'Aviso', description: 'Inscrição Estadual informada é inválida' });\r\n return false;\r\n } else if (!!!values.vei_inscricaoestadual_numeroInscricaoEstadual) {\r\n values.vei_inscricaoestadual_numeroInscricaoEstadual = \"\";\r\n }\r\n }\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: \"+vei_descricao\" } });\r\n }\r\n\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(`&UfEstado=${UfEstado}`);\r\n formulario.setFieldsValue({ cid_id: undefined });\r\n }\r\n else {\r\n setListaCidades(false);\r\n formulario.setFieldsValue({ cid_id: undefined });\r\n }\r\n }\r\n\r\n const validatorInput = (_, value) => {\r\n if (!value || /^[0-9]+$/.test(value)) {\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(new Error('Insira apenas números'));\r\n };\r\n\r\n function validarCpfCnpj(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length !== 14 && cpfCnpj.length !== 11) {\r\n notification.warning({ message: 'Aviso!', description: 'O CPF/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n formulario.setFieldsValue({\r\n vei_cpfcnpj: \"\"\r\n })\r\n }\r\n }\r\n }\r\n\r\n function validarPlaca(event) {\r\n const placa = event.target.value;\r\n const placaConfirm = /^[a-z]{3}[0-9]{4}$|^[a-z]{3}[0-9]{1}[a-z]{1}[0-9]{2}$|^[A-Z]{3}[0-9]{4}$|^[A-Z]{3}[0-9]{1}[A-Z]{1}[0-9]{2}$/;\r\n\r\n if (!placaConfirm.test(placa)) {\r\n notification.warning({ description: \"Formato de placa inválido. Insira uma placa no formato AAA0000 ou AAA0A00.\", message: \"Atenção!\" });\r\n formulario.setFieldsValue({ vei_placa: \"\" });\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => ({est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Veículo Ativo?\r\n \r\n \r\n \r\n \r\n Veículo de Reboque?\r\n \r\n \r\n \r\n prevValues.vei_tipoproprietario !== currentValues.vei_tipoproprietario}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue().vei_tipoproprietario !== 0 && getFieldValue().vei_tipoproprietario !== undefined) return (\r\n
\r\n Proprietário\r\n \r\n
\r\n \r\n validarCpfCnpj(valor.currentTarget.value.replace(/\\D/g, '')) }\r\n onChange={(event) => {\r\n setCpfCnpj(event.target.value);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }}\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, Drawer } from 'antd';\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from '@ant-design/icons';\r\n\r\nimport ManutencaoVeiculo from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport { setClienteCatalogo } from '../../services/auth';\r\n\r\nexport default function DrawerVeiculo({ cadVeiculo, openDrawer, setOpenDrawer, retornoSalvar, editando }) {\r\n\r\n const [formVeiculo] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && editando.editando) {\r\n formVeiculo.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if (!!retornoSalvar) {\r\n retornoSalvar(retorno);\r\n }\r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n formVeiculo.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n editando.setEditando(false);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: \"Cancelar?\",\r\n icon: ,\r\n content: \"Deseja cancelar a operação e ignorar o que foi realizado até o momento?\",\r\n okText: \"Sim\",\r\n cancelText: \"Não\",\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n onClose={() => onClose()}\r\n\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\n\r\nimport DrawerVeiculo from \"./drawer\";\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar } from \"../../components\";\r\nimport { CopyOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nexport default function Veiculo() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [primeiroRender, setPrimeiroRender] = useState(false);\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+vei_descricao' } })\r\n }, []);\r\n\r\n function editarVeiculo(record) {\r\n setEditando(true);\r\n record.vei_dataaquisicao = moment(record.vei_dataaquisicao);\r\n record.vei_datavenda = moment(record.vei_datavenda);\r\n let listaTemp = { ...record.vei_inscricaoestadual }\r\n\r\n record.vei_inscricaoestadual_ufestado = listaTemp.ufEstado;\r\n record.vei_inscricaoestadual_numeroInscricaoEstadual = listaTemp.numeroInscricaoEstadual;\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n setPrimeiroRender(false);\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o Veículo ${dados.vei_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirVeiculo(dados);\r\n }\r\n });\r\n };\r\n\r\n function excluirVeiculo(dados) {\r\n api.delete(`Veiculo/Excluir/${dados.vei_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Sucesso!', description: 'Veículo excluído com sucesso!' });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarVeiculo(dados);\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vei_descricao' } });\r\n });\r\n }\r\n\r\n const modalInativarVeiculo = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir o veículo ${dados.vei_descricao}. Deseja inativar este veículo?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarVeiculo(dados);\r\n }\r\n });\r\n };\r\n\r\n function inativarVeiculo(dados) {\r\n dados.vei_ativo = false;\r\n api.put(`Veiculo/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: 'Veículo inativado com sucesso!' })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vei_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {vei_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Nome',\r\n render: ({ vei_descricao }) => (\r\n
\r\n {vei_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n render: ({ vei_modelo }) => (\r\n
\r\n {vei_modelo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Placa',\r\n render: ({ vei_placa }) => (\r\n
\r\n {vei_placa}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n {\r\n editarVeiculo(record);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n )\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Divider, Row, Col, Typography, Table, Button, notification } from \"antd\";\r\nimport { CheckOutlined, ReloadOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabPercursoMDF({ estadoInicio, estadoFinal, listaPercurso, setListaPercurso, setPercursoOk }) {\r\n const [percurso, setPercurso] = useState([estadoInicio]);\r\n const [caminho, setCaminho] = useState([]);\r\n const [ufInicial] = useState(estadoInicio);\r\n const [ufFinal] = useState(estadoFinal);\r\n\r\n const vizinhosUF = {\r\n AC: ['AM', 'RO'],\r\n AL: ['SE', 'PE', 'BA'],\r\n AP: ['PA'],\r\n AM: ['RR', 'PA', 'MT', 'RO', 'AC'],\r\n BA: ['SE', 'AL', 'PE', 'PI', 'TO', 'GO', 'MG', 'ES'],\r\n CE: ['PI', 'PE', 'PB', 'RN'],\r\n ES: ['BA', 'MG', 'RJ'],\r\n GO: ['MS', 'MG', 'BA', 'TO', 'MT', 'DF'],\r\n MA: ['PA', 'TO', 'PI'],\r\n MT: ['RO', 'AM', 'PA', 'TO', 'GO', 'MS'],\r\n MS: ['MT', 'GO', 'SP', 'MG', 'PR'],\r\n MG: ['SP', 'RJ', 'ES', 'BA', 'GO', 'MS', 'DF'],\r\n PA: ['AP', 'RR', 'AM', 'MT', 'TO', 'MA'],\r\n PB: ['PE', 'CE', 'RN'],\r\n PR: ['SC', 'SP', 'MS'],\r\n PE: ['BA', 'AL', 'PB', 'CE', 'PI'],\r\n PI: ['BA', 'PE', 'CE', 'MA', 'TO'],\r\n RJ: ['SP', 'MG', 'ES'],\r\n RN: ['PB', 'CE'],\r\n RS: ['SC'],\r\n RO: ['MT', 'AM', 'AC'],\r\n RR: ['AM', 'PA'],\r\n SC: ['RS', 'PR'],\r\n SP: ['PR', 'MS', 'MG', 'RJ'],\r\n SE: ['BA', 'AL'],\r\n TO: ['GO', 'BA', 'PI', 'MA', 'PA', 'MT'],\r\n DF: ['GO', 'MG']\r\n }\r\n\r\n const estadoId = { AC: 1, AL: 2, AP: 4, AM: 3, BA: 5, CE: 6, DF: 7, ES: 8, GO: 9, MA: 10, MT: 13, MS: 12, MG: 11, PA: 14, PB: 15, PR: 18, PE: 16, PI: 17, RJ: 19, RN: 20, RS: 23, RO: 21, RR: 22, SC: 24, SP: 26, SE: 25, TO: 27 }\r\n\r\n const iconeUf = (uf) => {\r\n if (uf === ufInicial) {\r\n return \"UF\r\n }\r\n if (uf === ufFinal) {\r\n return \"UF\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n let listaTemp = [...listaPercurso]\r\n if (listaTemp.length > 0) {\r\n redefinirPercurso();\r\n }\r\n if (ufInicial === ufFinal || vizinhosUF[ufInicial].includes(ufFinal)) {\r\n notification.success({ message: 'Atenção!', description: 'Não é necessário definir um percurso.' })\r\n setPercursoOk(true)\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n gerarCaminhos()\r\n }, [percurso])\r\n\r\n function gerarCaminhos(ultimaUF = false) {\r\n let caminhos = [];\r\n if (!ultimaUF) {\r\n for (let i = 0; i < percurso.length - 1; i++) {\r\n let ufAtual = document.getElementById(percurso[i].toLowerCase());\r\n let ufProximo = document.getElementById(percurso[i + 1].toLowerCase());\r\n\r\n if (ufAtual && ufProximo) {\r\n let x1 = ufAtual.offsetLeft + ufAtual.offsetWidth / 2;\r\n let y1 = ufAtual.offsetTop + ufAtual.offsetHeight / 2;\r\n let x2 = ufProximo.offsetLeft + ufProximo.offsetWidth / 2;\r\n let y2 = ufProximo.offsetTop + ufProximo.offsetHeight / 2;\r\n\r\n let xControle = (x1 + x2) / 2;\r\n let yControle = (y1 + y2) / 2 - 20;\r\n\r\n caminhos.push(\r\n \r\n )\r\n }\r\n }\r\n setCaminho(caminhos);\r\n } else {\r\n let caminhoTemp = [...caminho];\r\n let ufUltima = document.getElementById(percurso[percurso.length - 1].toLowerCase());\r\n let ufFim = document.getElementById(ufFinal.toLowerCase());\r\n\r\n if (ufUltima && ufFim) {\r\n let x1 = ufUltima.offsetLeft + ufUltima.offsetWidth / 2;\r\n let y1 = ufUltima.offsetTop + ufUltima.offsetHeight / 2;\r\n let x2 = ufFim.offsetLeft + ufFim.offsetWidth / 2;\r\n let y2 = ufFim.offsetTop + ufFim.offsetHeight / 2;\r\n let xControle = (x1 + x2) / 2;\r\n let yControle = (y1 + y2) / 2 - 20;\r\n\r\n caminhoTemp.push(\r\n \r\n );\r\n setCaminho(caminhoTemp);\r\n }\r\n }\r\n }\r\n\r\n function estadoClick(uf) {\r\n if (ufInicial === ufFinal || vizinhosUF[ufInicial].includes(ufFinal)) {\r\n notification.warning({ message: 'Atenção!', description: 'Não é necessário definir um percurso.' })\r\n setPercursoOk(true)\r\n return\r\n }\r\n\r\n if (percurso.includes(uf)) return;\r\n\r\n if (uf === ufInicial || uf === ufFinal) {\r\n notification.warning({ message: 'Atenção', description: 'Não é necessário selecionar o estado inicial e o final' });\r\n return;\r\n }\r\n\r\n let ultimaUF = percurso[percurso.length - 1];\r\n let ufVizinha = vizinhosUF[ultimaUF].includes(uf);\r\n\r\n if (ufVizinha) {\r\n setPercurso([...percurso, uf]);\r\n } else {\r\n notification.warning({ message: 'Alerta!', description: `Não é possível adicionar ${uf} sem passar por uma UF vizinha.` })\r\n }\r\n }\r\n\r\n function redefinirPercurso() {\r\n setPercurso([ufInicial]);\r\n setListaPercurso([]);\r\n setCaminho([]);\r\n notification.info({ message: 'Aviso!', description: 'Percurso redefinido!' })\r\n }\r\n\r\n function salvarPercurso() {\r\n if (ufInicial === ufFinal) {\r\n notification.warning({ message: 'Alerta!', description: 'Não é necessário definir um percurso' })\r\n return\r\n }\r\n let percursoFinal = [...percurso];\r\n if (!percursoFinal.includes(ufFinal)) {\r\n percursoFinal.push(ufFinal);\r\n }\r\n\r\n let percursoValido = true;\r\n for (let i = 0; i < percursoFinal.length - 1; i++) {\r\n let ufAtual = percursoFinal[i];\r\n let ufProximo = percursoFinal[i + 1];\r\n\r\n if (!vizinhosUF[ufAtual]?.includes(ufProximo)) {\r\n percursoValido = false;\r\n notification.warning({ message: 'Alerta!', description: `O percurso é inválido: ${ufAtual} não é vizinho de ${ufProximo}` });\r\n break\r\n }\r\n }\r\n\r\n if (percursoValido) {\r\n gerarCaminhos(true);\r\n percursoFinal = percursoFinal.slice(1, -1);\r\n\r\n const listaPercursoAtt = percursoFinal.map((uf, index) => ({\r\n est_id: estadoId[uf],\r\n per_sequencia: index + 1\r\n }));\r\n\r\n setListaPercurso(listaPercursoAtt);\r\n notification.success({ message: 'Aviso!', description: `O percurso de ${ufInicial} para ${ufFinal} foi salvo com sucesso.` });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Percurso\" Percurso\r\n \r\n Selecione no mapa o percurso percorrido (Clique em todas as UFs necessárias) \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {caminho}\r\n \r\n {['AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO', 'DF'].map((uf) => (\r\n estadoClick(uf)}\r\n >\r\n {uf} {iconeUf(uf)}\r\n
\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \"UFUF Inicial:{ufInicial}\r\n \r\n \r\n Percurso\r\n UF\r\n }\r\n ]}\r\n dataSource={percurso.filter(uf => uf !== ufInicial).map(uf => ({ uf }))}\r\n pagination={false}\r\n scroll={{ y: 300 }}\r\n />\r\n \r\n \r\n \"UFUF Final:{ufFinal ? ufFinal : 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Modal, Form, Descriptions, notification } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalEncerrarMdfe({ exibirModal, fecharModal, dadosMdfe, setLimparCampo }) {\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const cancelarModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n setLimparCampo(true);\r\n }\r\n });\r\n }\r\n\r\n const encerrarMdfe = () => {\r\n Modal.confirm({\r\n title: 'Encerrar MDF-e?',\r\n icon: ,\r\n content: `Deseja realmente encerrar o MDF-e Nº:${dadosMdfe.mdf_numero}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setCarregando(true);\r\n api.post(`ManifestoEletronico/EncerrarMdfe/${dadosMdfe.mdf_id}`).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.cStat === 132 || retornoNF.data.cStat === 135) {\r\n notification.success({ message: 'Sucesso', description: retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo });\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico! ' + retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo, message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico! ' + retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo, message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico!', message: `Aviso` });\r\n }\r\n setLimparCampo(true);\r\n }\r\n ).finally(() => {\r\n fecharModal();\r\n setCarregando(false);\r\n });\r\n }\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n Encerrar MDF-e\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosMdfe.mdf_chavemdfe} \r\n \r\n \r\n \r\n \r\n {dadosMdfe.mdf_numero} \r\n \r\n \r\n {moment(dadosMdfe.mdf_dataemissao).format('DD-MM-YYYY')} \r\n \r\n \r\n \r\n \r\n {dadosMdfe.mdf_modelo} \r\n \r\n \r\n {dadosMdfe.mdf_ufinicio} \r\n \r\n \r\n {dadosMdfe.mdf_uffim} \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Divider, Input, Select, Button, Table, Tag, notification, Modal } from \"antd\";\r\nimport { InputCep, SelectPaginacao } from \"../../components\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\nimport api from \"../../services/api\";\r\nimport { DeleteOutlined, PlusOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport ModalEncerrarMdfe from \"../../components/modals/modalEncerrarMdfe\";\r\nimport { retornaCep } from \"../../services/funcoes\";\r\n\r\nexport default function TabDadosManifestos({ formManifesto, listaDocs, tipoEmitente, setEstadoInicio, setEstadoFinal, listaMotorista, setListaMotorista }) {\r\n const [veiculoSelecionado, setVeiculoSelecionado] = useState(false);\r\n const [reboque1Selecionado, setReboque1Selecionado] = useState(null);\r\n const [reboque2Selecionado, setReboque2Selecionado] = useState(null);\r\n const [cpfCnpj, setCpfCnpj] = useState(null);\r\n const [listaCidadesCarregamento, setListaCidadesCarregamento] = useState(false);\r\n const [listaCidadesDescarrega, setListaCidadesDescarrega] = useState(false);\r\n const [filtroCddCarregamento, setFiltroCddCarregamento] = useState(null);\r\n const [filtroCddDescarrega, setFiltroCddDescarrega] = useState(null);\r\n const [listaEstados, setListaEstados] = useState([]);\r\n const [listaVeiculos, setListaVeiculos] = useState([]);\r\n const [openModalEncerrar, setOpenModalEncerrar] = useState(false);\r\n const [limparCampo, setLimparCampo] = useState(false);\r\n const [dadosModalEncerrar, setDadosModalEncerrar] = useState({});\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n try {\r\n const [estadosRes, veiculosRes] = await Promise.all([\r\n api.get(`estado/listar?PageSize=50&Order=est_id`),\r\n api.get(`Veiculo/listar`)\r\n ]);\r\n\r\n setListaEstados(estadosRes.data.items);\r\n setListaVeiculos(veiculosRes.data.items);\r\n if (listaDocs.length > 0) {\r\n const dadosDoc = listaDocs[0];\r\n if (dadosDoc.numero && listaDocs.length === 1) {\r\n if (dadosDoc.cepDestino) {\r\n api.get(`Cidade/BuscaCidadeCep?cep=${dadosDoc.cepOrigem}`).then(\r\n res => {\r\n let dadosOrigem = res.data[0];\r\n formManifesto.setFieldsValue({\r\n pme_cepcarrega: dadosOrigem.cep_cep,\r\n mca_id: dadosOrigem.cid_descricao,\r\n mdf_ufinicio: dadosOrigem.est_descricao\r\n });\r\n setEstadoInicio(dadosOrigem.est_sigla);\r\n \r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n if (dadosDoc.cepOrigem) {\r\n api.get(`Cidade/BuscaCidadeCep?cep=${dadosDoc.cepDestino}`).then(\r\n res => {\r\n let dadosDestino = res.data[0];\r\n formManifesto.setFieldsValue({\r\n pme_cepdescarrega: dadosDestino.cep_cep,\r\n mdf_uffim: dadosDestino.est_descricao,\r\n mde_id: dadosDestino.cid_descricao\r\n });\r\n setEstadoFinal(dadosDestino.est_sigla);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n };\r\n\r\n fetchData();\r\n\r\n if (listaDocs[0].doc_modelodoc === \"55\") {\r\n formManifesto.setFieldsValue({\r\n mdf_tipoemitente: 2\r\n })\r\n }\r\n\r\n }, [listaDocs])\r\n\r\n useEffect(() => {\r\n if (limparCampo === true) {\r\n formManifesto.setFieldsValue({ vei_id: undefined })\r\n setLimparCampo(false);\r\n }\r\n }, [limparCampo])\r\n\r\n function reboque1(value) {\r\n setReboque1Selecionado(value);\r\n setReboque2Selecionado(null)\r\n formManifesto.setFieldsValue({ vei_id_reboque2: undefined, vei_id_reboque3: undefined })\r\n };\r\n\r\n function reboque2(value) {\r\n setReboque2Selecionado(value);\r\n formManifesto.setFieldsValue({ vei_id_reboque3: undefined })\r\n };\r\n\r\n function validarCpfCnpj(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length !== 14 && cpfCnpj.length !== 11) {\r\n notification.warning({ message: 'Aviso!', description: 'O CPF/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n formManifesto.setFieldsValue({\r\n rod_cpfcnpjciot: \"\"\r\n })\r\n }\r\n }\r\n }\r\n\r\n function verificarVeiculo(dados) {\r\n if (!!dados) {\r\n api.get(`ManifestoEletronico/VerificarMdfeNaoEncerradoVeiculo/${dados}`).then(\r\n res => {\r\n let retorno = res.data;\r\n if (retorno !== \"\") {\r\n avisoPercurso(retorno);\r\n }\r\n }\r\n )\r\n }\r\n }\r\n\r\n function avisoPercurso(retorno) {\r\n Modal.confirm({\r\n title: 'Veículo em percurso',\r\n icon: ,\r\n centered: true,\r\n content: 'Já existe um MDF-e em percurso com o veículo selecionado, é necessário encerrar o MDF-e para utilizar esse veículo.',\r\n okText: 'Verificar MDF-e',\r\n cancelText: 'Cancelar',\r\n onOk() {\r\n setOpenModalEncerrar(true);\r\n setDadosModalEncerrar(retorno);\r\n },\r\n onCancel() {\r\n formManifesto.setFieldsValue({ vei_id: undefined });\r\n }\r\n });\r\n }\r\n\r\n async function verificaCepCarregamento(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n formManifesto.setFieldsValue({ mdf_ufinicio: retornoCep.est_descricao, mca_id: retornoCep.cid_descricao });\r\n setEstadoInicio(retornoCep.est_sigla);\r\n } else {\r\n formManifesto.setFieldsValue({ mdf_ufinicio: '', mca_id: '' });\r\n setEstadoInicio('');\r\n }\r\n }\r\n\r\n async function verificaCepDescarrega(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n formManifesto.setFieldsValue({ mdf_uffim: retornoCep.est_descricao, mde_id: retornoCep.cid_descricao });\r\n setEstadoFinal(retornoCep.est_sigla);\r\n } else {\r\n formManifesto.setFieldsValue({ mdf_uffim: '', mde_id: '' });\r\n setEstadoFinal('');\r\n }\r\n }\r\n\r\n function removeMotorista(record) {\r\n let index = listaMotorista.findIndex(mot => mot.sequencia_motorista === record.sequencia_motorista)\r\n let dadosTemp = [...listaMotorista];\r\n dadosTemp.splice(index, 1)\r\n\r\n dadosTemp.forEach((item, index) => {\r\n item.sequencia_motorista = index + 1;\r\n })\r\n\r\n setListaMotorista(dadosTemp);\r\n }\r\n\r\n function adicionarMotorista() {\r\n let motorista = formManifesto.getFieldValue().fun_id;\r\n\r\n let listaTemp = [...listaMotorista];\r\n if (motorista !== undefined) {\r\n api.get(`Funcionario/BuscarFuncionario/${motorista}`).then(\r\n res => {\r\n let retorno = res.data;\r\n\r\n listaTemp.push({\r\n fun_id: motorista,\r\n sequencia_motorista: listaMotorista.length + 1,\r\n nome: retorno.pes_nome || 'Não informado',\r\n cpf: retorno.pef_cpf || 'Não informado',\r\n numeroTelefone: retorno.telefones[0].psc_numero || 'Não informado'\r\n })\r\n\r\n setListaMotorista(listaTemp);\r\n formManifesto.setFieldsValue({ fun_id: undefined });\r\n notification.success({ message: 'Atenção', description: 'Motorista adicionado com sucesso' });\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n notification.error({ message: 'Atenção!', description: 'Dados do motorista não encontrado' });\r\n }\r\n )\r\n } else {\r\n notification.warning({ message: 'Alerta!', description: 'É necessário selecionar o motorista' });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n verificaCepCarregamento(cep.currentTarget.value)} rules={[{ required: true }]} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n verificaCepDescarrega(cep.currentTarget.value)} rules={[{ required: true }]} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n validarCpfCnpj(valor.currentTarget.value.replace(/\\D/g, ''))}\r\n onChange={(event) => {\r\n setCpfCnpj(event.target.value);\r\n }}\r\n />\r\n \r\n \r\n \r\n Veículo\r\n \r\n \r\n\r\n \r\n { setVeiculoSelecionado(true); verificarVeiculo(record) }} onClear={() => setVeiculoSelecionado(false)}\r\n conteudo={\r\n pc => ({pc.vei_placa} - {pc.vei_descricao}
\r\n
)\r\n } />\r\n
\r\n\r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Motorista\r\n \r\n \r\n \r\n ({fun.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n \r\n {sequencia_motorista}\r\n \r\n )\r\n },\r\n {\r\n title: 'ID',\r\n align: 'center',\r\n width: 80,\r\n render: ({ fun_id }) => (\r\n {fun_id}\r\n )\r\n },\r\n {\r\n title: 'Nome',\r\n align: 'left',\r\n width: 400,\r\n render: ({ nome }) => (\r\n {nome}\r\n )\r\n },\r\n {\r\n title: 'CPF',\r\n align: 'center',\r\n width: 150,\r\n render: ({ cpf }) => (\r\n {cpf}\r\n )\r\n },\r\n {\r\n title: 'Telefone',\r\n align: 'center',\r\n width: 150,\r\n render: ({ numeroTelefone }) => (\r\n {numeroTelefone}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n fixed: 'right',\r\n dataIndex: '',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {editando ?\r\n :\r\n \r\n }\r\n \r\n \r\n {editando &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Divider, Form, Table, Tag, Button, Modal, Input, Select } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport FiltroSeguroMDF from \"../../components/filtroSeguroMDF\";\r\nimport { InputPreco, SelectPaginacao } from \"../../components\";\r\nimport InputNumber from \"rc-input-number\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabSegEProdPredominante({ formManifesto, listaSeguro, setListaSeguro, responsavelSeguro, tipoCarga, unidadePeso, listaDocs }) {\r\n const [form] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n\r\n useEffect(() => {\r\n let dadosDocs = [...listaDocs];\r\n let totalValor = dadosDocs.reduce((vlr, item) => { let valor = parseFloat(item.doc_valortotal) || 0; return vlr + valor; }, 0);\r\n let totalPeso = dadosDocs.reduce((vlr, item) => { let peso = parseFloat(item.doc_pesobruto) || 0; return vlr + peso; }, 0);\r\n\r\n formManifesto.setFieldsValue({\r\n valorTotal: totalValor,\r\n pesoBruto: totalPeso\r\n });\r\n\r\n if (dadosDocs[0].doc_modelodoc === \"55\") {\r\n formManifesto.setFieldsValue({\r\n totalNfe: dadosDocs.length\r\n });\r\n } else if (dadosDocs[0].doc_modelodoc === \"57\") {\r\n formManifesto.setFieldsValue({\r\n totalCte: dadosDocs.length\r\n });\r\n }\r\n }, [])\r\n\r\n function editarSeguro(record) {\r\n setEditando(true);\r\n form.setFieldsValue(record);\r\n }\r\n\r\n function modalRemove(record) {\r\n const index = listaSeguro.findIndex(seg => seg.seg_sequencia === record.seg_sequencia)\r\n Modal.confirm({\r\n title: 'Excluir',\r\n icon: ,\r\n content: 'Deseja excluir a Seguradora?',\r\n okText: 'Escluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeSeguro(index);\r\n }\r\n })\r\n }\r\n\r\n function removeSeguro(index) {\r\n let dadosTemp = [...listaSeguro];\r\n dadosTemp.splice(index, 1)\r\n\r\n dadosTemp.forEach((item, index) => {\r\n item.seg_sequencia = index + 1;\r\n })\r\n\r\n setListaSeguro(dadosTemp);\r\n }\r\n\r\n async function carregarNcm(id) {\r\n api.get(`Ncm/Buscar/${id}`).then(res => {\r\n formManifesto.setFieldsValue({ ncm_codigo: res.data?.ncm_codigo.codigoNcm });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n Produto Predominante\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarNcm(valor)}\r\n conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Dados Seguradora\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
(\r\n \r\n {seg_sequencia}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Responsável',\r\n render: ({ seg_responsavel }) => (\r\n {seg_responsavel}\r\n )\r\n },\r\n {\r\n title: 'Seguradora',\r\n render: ({ seg_nomeseguradora }) => (\r\n {seg_nomeseguradora}\r\n )\r\n },\r\n {\r\n title: 'Nº Apólice',\r\n align: 'center',\r\n width: 100,\r\n render: ({ seg_numeroapolice }) => (\r\n {seg_numeroapolice}\r\n )\r\n },\r\n {\r\n title: 'Nº Averbação',\r\n align: 'center',\r\n width: 100,\r\n render: ({ seg_numeroaverbacao }) => (\r\n {seg_numeroaverbacao}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ y: 100 }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Modal, Input, notification, Tabs, Select, Button, Table, Tag } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, PlusOutlined, SaveOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport InputPreco from \"../../inputPreco\";\r\nimport Data from \"../../data\";\r\nimport api from \"../../../services/api\";\r\nimport moment from \"moment\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { func } from \"prop-types\";\r\n\r\nexport default function ModalDocsFiscais({ form, exibirModal, fecharModal, listaDocs, setListaDocs }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaDocsTab1, setListaDocsTab1] = useState([]);\r\n const [selectedRowKeys1, setSelectedRowKeys1] = useState([]);\r\n const [listaDocsTab2, setListaDocsTab2] = useState([]);\r\n const [selectedRowKeys2, setSelectedRowKeys2] = useState([]);\r\n const [carregando, setCarregando] = useState(false);\r\n const [serie, setSerie] = useState([]);\r\n\r\n useEffect(() => {\r\n setAbaSelecionada(\"1\");\r\n definirCamposTab1();\r\n definirCamposTab2();\r\n setListaDocsTab2([]);\r\n carregarDados();\r\n }, [exibirModal]);\r\n\r\n const docsSelecionados1 = (newSelectedRowKeys) => {\r\n setSelectedRowKeys1(newSelectedRowKeys);\r\n };\r\n\r\n const rowSelection1 = {\r\n selectedRowKeys1,\r\n onChange: docsSelecionados1,\r\n };\r\n\r\n const docsSelecionados2 = (newSelectedRowKeys) => {\r\n setSelectedRowKeys2(newSelectedRowKeys)\r\n };\r\n\r\n const rowSelection2 = {\r\n selectedRowKeys2,\r\n onChange: docsSelecionados2,\r\n }\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n async function carregarDados() {\r\n let listaSerie = await api.get('SerieFiscal/Listar?CodigoModeloDocFiscal=55&EmitenteDocumento=0&SomenteAtivos=true');\r\n let serie = [];\r\n if (listaSerie.status === 200) {\r\n serie = listaSerie.data.items;\r\n setSerie(serie);\r\n }\r\n }\r\n\r\n async function definirCamposTab1() {\r\n form.setFieldsValue({\r\n Filtro: null,\r\n DataInicial: moment(new Date()),\r\n DataFinal: moment(new Date())\r\n });\r\n setListaDocsTab1([]);\r\n }\r\n\r\n async function definirCamposTab2() {\r\n form.setFieldsValue({\r\n doc_chaveacesso: undefined,\r\n doc_modelodoc: undefined,\r\n origem: null,\r\n destino: null,\r\n doc_pesobruto: 0,\r\n doc_valortotal: 0\r\n })\r\n }\r\n\r\n async function buscarDoc() {\r\n setCarregando(true);\r\n let dados = form.getFieldValue();\r\n let Filtro = dados.Filtro || null;\r\n let DataInicial = Filtro === null && dados.DataInicial ? moment(dados.DataInicial).format('YYYY-MM-DD') : null;\r\n let DataFinal = Filtro === null && dados.DataFinal ? moment(dados.DataFinal).format('YYYY-MM-DD') : null;\r\n\r\n const filtros = { Filtro, DataInicial, DataFinal };\r\n\r\n await api.get(`ManifestoEletronico/ListarDocumentos`, { params: filtros }).then(\r\n res => {\r\n let retorno = res.data.items;\r\n if (retorno.length === 0) {\r\n retornoNull();\r\n } else {\r\n adicionarDoc(retorno);\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n retornoNull()\r\n console.log(error)\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n )\r\n }\r\n\r\n async function adicionarDoc(retorno) {\r\n if (abaSelecionada === \"1\") {\r\n let listaTemp = [];\r\n let sequencia = listaTemp.length;\r\n\r\n retorno.forEach((doc, index) => {\r\n doc.sequencia = sequencia + 1 + index;\r\n listaTemp.push(doc);\r\n });\r\n\r\n setListaDocsTab1(listaTemp);\r\n form.setFieldsValue({ Filtro: null })\r\n\r\n } else if (abaSelecionada === \"2\") {\r\n let dados = form.getFieldValue();\r\n\r\n if (dados.doc_chaveacesso && dados.destino && dados.doc_modelodoc && dados.doc_valortotal > 0) {\r\n if (!validarCampos(dados)) return;\r\n let listaTemp = [...listaDocsTab2];\r\n\r\n listaTemp.push({\r\n doc_sequencia: listaDocsTab2.length + 1,\r\n doc_chaveacesso: dados.doc_chaveacesso,\r\n origem: dados.origem,\r\n destino: dados.destino,\r\n doc_modelodoc: dados.doc_modelodoc,\r\n doc_valortotal: dados.doc_valortotal,\r\n doc_pesobruto: dados.doc_pesobruto\r\n })\r\n\r\n setListaDocsTab2(listaTemp);\r\n notification.success({ message: 'Atenção!', description: 'Documento Fiscal adicionado.' });\r\n definirCamposTab2();\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha todos os campos obrigatórios' });\r\n }\r\n }\r\n }\r\n\r\n function validarCampos(dados) {\r\n if (dados.doc_chaveacesso.length !== 44) {\r\n notification.warning({ message: 'Atenção!', description: 'Chave de Acesso deve possuir 44 digítos' });\r\n return false;\r\n }\r\n if (dados.doc_modelodoc !== \"55\" && dados.doc_modelodoc !== \"57\") {\r\n notification.warning({ message: 'Atenção!', description: 'Deve ser informado um modelo 55 ou 57' });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async function retornoNull() {\r\n notification.warning({ message: 'Aviso!', description: 'Não foi encontrado nenhum Documento.' })\r\n }\r\n\r\n function getModeloFiscal(value) {\r\n let chave = value.currentTarget.value;\r\n if (chave.length == 44) {\r\n let modelo = chave.slice(20, 22);\r\n form.setFieldsValue({\r\n doc_modelodoc: modelo\r\n })\r\n } else {\r\n form.setFieldsValue({ doc_modelodoc: undefined });\r\n }\r\n }\r\n\r\n function salvarDocs() {\r\n debugger\r\n const chavesExistentes = listaDocs.map((doc) => doc.doc_chaveacesso);\r\n if (abaSelecionada === \"1\") {\r\n const docsSelecionados1 = listaDocsTab1.filter((doc) => selectedRowKeys1.includes(doc.sequencia));\r\n if (docsSelecionados1.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'É necessário selecionar pelo menos um documento para vinculá-lo' })\r\n } else {\r\n const docsDuplicados = docsSelecionados1.filter((doc) => chavesExistentes.includes(doc.chave));\r\n\r\n if (docsDuplicados.length > 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Já existe um documento com a mesma chave vinculado.' });\r\n } else {\r\n const docsAtualizados = docsSelecionados1.map((doc, index) => ({\r\n doc_sequencia: listaDocs.length + index + 1,\r\n doc_chaveacesso: doc.chave,\r\n doc_modelodoc: doc.modelo,\r\n doc_pesobruto: doc.peso,\r\n doc_valortotal: doc.valorTotal,\r\n numero: doc.numero,\r\n dataEmissao: doc.dataEmissao,\r\n destinatario: doc.destinatario,\r\n idCidadeCarregamento: doc.idCidadeOrigem,\r\n idCidadeOrigem: doc.idCidadeOrigem,\r\n cidadeOrigem: doc.cidadeOrigem,\r\n ufOrigem: doc.ufOrigem,\r\n idCidadeDestino: doc.idCidadeDestino,\r\n idCidadeDescaregamento: doc.idCidadeDestino,\r\n cidadeDestino: doc.cidadeDestino,\r\n ufDestino: doc.ufDestino,\r\n cepDestino: doc.cepDestino,\r\n cepOrigem: doc.cepOrigem\r\n }))\r\n setListaDocs((prevListaDocs) => [...prevListaDocs, ...docsAtualizados]);\r\n fecharModal();\r\n }\r\n }\r\n } else if (abaSelecionada === \"2\") {\r\n const docsSelecionados2 = listaDocsTab2.filter((doc) => selectedRowKeys2.includes(doc.doc_sequencia));\r\n if (docsSelecionados2.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'É necessário selecionar pelo menos um documento para vinculá-lo' })\r\n } else {\r\n const docsDuplicados = docsSelecionados2.filter((doc) => chavesExistentes.includes(doc.doc_chaveacesso));\r\n if (docsDuplicados.length > 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Já existe um documento com a mesma chave vinculado.' });\r\n } else {\r\n const docsAtualizados = docsSelecionados2.map((doc, index) => ({\r\n doc_sequencia: listaDocs.length + index + 1,\r\n idCidadeCarregamento: doc.origem,\r\n idCidadeDescaregamento: doc.destino,\r\n doc_chaveacesso: doc.doc_chaveacesso,\r\n doc_modelodoc: doc.doc_modelodoc,\r\n doc_pesobruto: doc.doc_pesobruto,\r\n doc_valortotal: doc.doc_valortotal\r\n }));\r\n setListaDocs((prevListaDocs) => [...prevListaDocs, ...docsAtualizados]);\r\n fecharModal();\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n Vincular Documentos\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n setAbaSelecionada(tab)} >\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
record.sequencia} columns={\r\n [\r\n {\r\n title: 'Sequência',\r\n width: 30,\r\n align: 'center',\r\n render: ({ sequencia }) => (\r\n \r\n {sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave de Acesso',\r\n align: 'left',\r\n render: ({ chave }) => (\r\n {chave}\r\n )\r\n },\r\n {\r\n title: 'Data Emissão',\r\n align: 'center',\r\n width: 200,\r\n render: ({ dataEmissao }) => (\r\n {dataEmissao}\r\n )\r\n },\r\n {\r\n title: 'Modelo',\r\n align: 'center',\r\n width: 10,\r\n render: ({ modelo }) => (\r\n {modelo}\r\n )\r\n },\r\n {\r\n title: 'Número',\r\n align: 'center',\r\n width: 100,\r\n render: ({ numero }) => (\r\n {numero}\r\n )\r\n },\r\n {\r\n title: 'Destinatário',\r\n align: 'left',\r\n render: ({ destinatario }) => (\r\n {destinatario}\r\n )\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n fixed: 'right',\r\n align: 'right',\r\n width: 100,\r\n render: ({ valorTotal }) => (\r\n
\r\n R$ {FormatNumber(valorTotal, true)}\r\n
\r\n )\r\n }\r\n ]\r\n } rowSelection={rowSelection1}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n getModeloFiscal(value)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n \r\n {cid.estado.est_sigla} - {cid.cid_descricao}\r\n )\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n (\r\n \r\n {cid.estado.est_sigla} - {cid.cid_descricao}\r\n \r\n )\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
record.doc_sequencia} columns={\r\n [\r\n {\r\n title: 'Sequência',\r\n width: 30,\r\n align: 'center',\r\n render: ({ doc_sequencia }) => (\r\n \r\n {doc_sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave de Acesso',\r\n width: 300,\r\n align: 'left',\r\n render: ({ doc_chaveacesso }) => (\r\n {doc_chaveacesso}\r\n )\r\n },\r\n {\r\n title: 'Destino',\r\n align: 'center',\r\n width: 100,\r\n render: ({ destino }) => (\r\n {destino}\r\n )\r\n },\r\n {\r\n title: 'Peso',\r\n width: 100,\r\n align: 'center',\r\n render: ({ doc_pesobruto }) => (\r\n {doc_pesobruto}\r\n )\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n fixed: 'right',\r\n align: 'right',\r\n width: 100,\r\n render: ({ doc_valortotal }) => (\r\n {doc_valortotal}\r\n )\r\n }\r\n ]\r\n } rowSelection={rowSelection2}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Data, FormGW } from \"../../components\";\r\nimport { Row, Col, Form, Select, Steps, Input, Divider, notification, Typography, Button, Modal, Table, Tag } from 'antd';\r\n\r\nimport api from \"../../services/api\";\r\nimport { novaAbaNavegador, validaForm } from \"../../services/funcoes\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { TabDadosManifestos, TabPercursoMDF, TabSegEProdPredominante } from \"./tabPage\";\r\nimport moment from \"moment\";\r\nimport ModalDocsFiscais from \"../../components/modals/modalDocsFiscais\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function ManutencaoManifestoEletronico({ formManifesto, carregando, aoSalvar, pages, proximaPag }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const [percursoOk, setPercursoOk] = useState(false);\r\n const [openModal, setOpenModal] = useState(false);\r\n const [estadoInicioSelect, setEstadoInicioSelect] = useState(null);\r\n const [estadoFinalSelect, setEstadoFinalSelect] = useState(null);\r\n const [serie, setSerie] = useState([]);\r\n const [listaPercurso, setListaPercurso] = useState([]);\r\n const [listaSeguro, setListaSeguro] = useState([]);\r\n const [listaDocs, setListaDocs] = useState([]);\r\n const [listaMotorista, setListaMotorista] = useState([]);\r\n const [tipoEmitente, setTipoEmitente] = useState([]);\r\n const [tipoCarga, setTipoCarga] = useState([]);\r\n const [unidadePeso, setUnidadePeso] = useState([]);\r\n const [responsavelSeguro, setResponsavelSeguro] = useState([]);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarDados();\r\n if (!formManifesto.getFieldValue().mdf_dataemissao) {\r\n formManifesto.setFieldsValue({ mdf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [ui.showDrawer])\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=TipoEmitente`).then(res => {\r\n if (res.status === 200) {\r\n setTipoEmitente(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=ResponsavelSeguro`).then(res => {\r\n if (res.status === 200) {\r\n setResponsavelSeguro(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoCarga`).then(res => {\r\n if (res.status === 200) {\r\n setTipoCarga(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=CodigoUnidadePeso`).then(res => {\r\n if (res.status === 200) {\r\n setUnidadePeso(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, [])\r\n\r\n useEffect(() => {\r\n if ((!!proximaPag.proximaPag || proximaPag.proximaPag === 0) && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag])\r\n\r\n async function carregarDados() {\r\n let listaSerie = await api.get('SerieFiscal/Listar?CodigoModeloDocFiscal=58&EmitenteDocumento=0&SomenteAtivos=true');\r\n let serie = [];\r\n if (listaSerie.status === 200) {\r\n serie = listaSerie.data.items;\r\n setSerie(serie);\r\n if (serie.length > 0) {\r\n formManifesto.setFieldsValue({ ser_id: serie[0].ser_id });\r\n }\r\n }\r\n }\r\n\r\n async function validarVeiculo() {\r\n let formulario = form.getFieldValue();\r\n let retorno = true;\r\n await api.get(`Veiculo/Buscar/${formulario.vei_id}`).then(\r\n res => {\r\n let dados = res.data;\r\n if (dados.vei_tiporodado === 3) {\r\n if (formulario.vei_id_reboque1 === undefined) {\r\n retorno = false\r\n }\r\n }\r\n }\r\n )\r\n return retorno;\r\n }\r\n\r\n async function validarTrocaPg(pagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n switch (paginaAtual) {\r\n case 0:\r\n if (paginaAtual < pagina) {\r\n if (listaDocs.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Para prosseguir, deve ter pelo menos um Documento Fiscal.' })\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case 1:\r\n if (paginaAtual < pagina) {\r\n let f = form.getFieldValue();\r\n if (f.pme_cepcarrega === undefined || f.mca_id === undefined || f.mdf_ufinicio === undefined || f.pme_cepdescarrega === undefined || f.mde_id === undefined ||\r\n f.mdf_uffim === undefined || f.vei_id === undefined\r\n ) {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha todos os campos obrigatórios.' })\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n if (listaMotorista.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Informe pelo menos um motorista' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n let validaVeiculo = await validarVeiculo();\r\n if (validaVeiculo === false) {\r\n notification.warning({ message: 'Atenção!', description: 'Veículo com tipo rodado igual a Cavalo Mecânico, deve-se selecionar pelo menos um reboque' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case 2:\r\n if (paginaAtual < pagina) {\r\n if (listaPercurso.length === 0 && !percursoOk) {\r\n notification.warning({ message: 'Atenção!', description: 'Para prosseguir, um percurso deve ser definido.' })\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n }\r\n if (validaForm(formManifesto, listaValidacoes)) {\r\n pages.setTagPages(pagina);\r\n } else {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n }\r\n\r\n const modalExcluir = (record) => {\r\n const index = listaDocs.findIndex(doc => doc.doc_sequencia === record.doc_sequencia)\r\n Modal.confirm({\r\n title: 'Excluir',\r\n icon: ,\r\n content: 'Deseja excluir o Documento Fiscal?',\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removerDoc(index)\r\n }\r\n });\r\n }\r\n\r\n const removerDoc = (index) => {\r\n let dadosTemp = [...listaDocs];\r\n dadosTemp.splice(index, 1)\r\n\r\n dadosTemp.forEach((item, index) => {\r\n item.doc_sequencia = index + 1;\r\n })\r\n\r\n setListaDocs(dadosTemp);\r\n }\r\n\r\n async function emitirMDFe() {\r\n debugger\r\n carregando(true)\r\n const formManifes = formManifesto.getFieldValue();\r\n const dadosNewForm = form.getFieldValue();\r\n if (dadosNewForm.pme_descricao !== undefined && dadosNewForm.pme_tipocarga !== undefined && dadosNewForm.mdf_unidadepeso !== undefined) {\r\n let dados = {\r\n ser_id: formManifes.ser_id,\r\n mdf_infadicionalfisco: dadosNewForm.mdf_infadicionalfisco || null,\r\n mdf_infcomplentar: dadosNewForm.mdf_infcomplentar || null,\r\n mdf_ufinicio: estadoInicioSelect,\r\n mdf_uffim: estadoFinalSelect,\r\n mdf_tipoemitente: dadosNewForm.mdf_tipoemitente,\r\n mdf_unidadepeso: dadosNewForm.mdf_unidadepeso,\r\n\r\n produtopredominantemdfe: {\r\n pme_ncm: dadosNewForm.ncm_codigo,\r\n pme_descricao: dadosNewForm.pme_descricao,\r\n pme_ean: dadosNewForm.pme_ean,\r\n pme_tipocarga: dadosNewForm.pme_tipocarga,\r\n pme_cepcarrega: dadosNewForm.pme_cepcarrega,\r\n pme_cepdescarrega: dadosNewForm.pme_cepdescarrega\r\n },\r\n modalrodoviariomdfe: {\r\n vei_id: dadosNewForm.vei_id,\r\n rod_ciot: dadosNewForm.rod_ciot,\r\n rod_cpfcnpjciot: dadosNewForm.rod_cpfcnpjciot,\r\n vei_id_reboque1: dadosNewForm.vei_id_reboque1 || null,\r\n vei_id_reboque2: dadosNewForm.vei_id_reboque2 || null,\r\n vei_id_reboque3: dadosNewForm.vei_id_reboque3 || null\r\n },\r\n\r\n motoristasmdfe: listaMotorista.map(motorista => ({ fun_id: motorista.fun_id })),\r\n seguromdfe: [...listaSeguro],\r\n percursomdfe: [...listaPercurso],\r\n docreferenciadomdfe: [...listaDocs],\r\n };\r\n debugger\r\n api.post(`ManifestoEletronico/Incluir`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota incluída com sucesso!` });\r\n if (res.data.mdf_status === 1 && !!res.data.mdf_chavemdfe) {\r\n novaAbaNavegador(`Danfe/GerarDamdfe?chaveMdfe=${res.data.mdf_chavemdfe}`);\r\n } else {\r\n notification.error({\r\n description: (<>\r\n Não foi possível Autorizar Manifesto Eletrônico!
\r\n {res.data.mdf_cstat} - {res.data.mdf_xmotivo}\r\n ), message: `Aviso`\r\n });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar()\r\n }\r\n )\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha os campos obrigatórios' });\r\n carregando(false);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n
\r\n \r\n \"Adicione\r\n Adicione os Documentos Fiscais do Manifesto\r\n \r\n Adicione os Documentos Fiscais do Manifesto\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
(\r\n \r\n {doc_sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave',\r\n render: ({ doc_chaveacesso }) => (\r\n {doc_chaveacesso}\r\n )\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 75,\r\n align: 'center',\r\n render: ({ doc_modelodoc }) => (\r\n {doc_modelodoc}\r\n )\r\n },\r\n {\r\n title: 'Peso',\r\n width: 100,\r\n align: 'center',\r\n render: ({ doc_pesobruto }) => (\r\n {doc_pesobruto}\r\n )\r\n },\r\n {\r\n title: 'Valor Total',\r\n width: 130,\r\n align: 'right',\r\n render: ({ doc_valortotal }) => (\r\n
\r\n R$ {FormatNumber(doc_valortotal, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n setOpenModal(false)} listaDocs={listaDocs} setListaDocs={setListaDocs} />\r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Drawer, Row, Col, Button, Modal, Form } from 'antd';\r\nimport { useStateValue } from \"../../state\";\r\nimport { MinusOutlined, CloseOutlined, ExclamationCircleOutlined, RightOutlined, LeftOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport ManutencaoManifestoEletronico from \"./manutencao\";\r\n\r\nexport default function DrawerManifestoEletronico({ }) {\r\n const [formManifesto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n const onCloseDrawer = () => {\r\n Modal.confirm({\r\n title: \"Cancelar?\",\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n })\r\n }\r\n\r\n function fecharDrawer() {\r\n formManifesto.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-mdf_numero' } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n setCarregando(false);\r\n }\r\n\r\n return (\r\n }\r\n onClose={() => onCloseDrawer()}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloudUploadOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { HasValue, novaAbaNavegador } from \"../../../services/funcoes\";\r\nimport { MaskFormat, FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalReenviarMdfeSefaz({ dados, exibirModalReenviarMdfeSefaz, fecharModalReenviarMdfeSefaz, titleModal, textoBotao }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalReenviarMdfeSefaz();\r\n }\r\n });\r\n };\r\n\r\n const realizarReenvioMdfeSefaz = () => {\r\n setCarregando(true);\r\n let _link = `ManifestoEletronico/ReenviarMdfeSefaz/${dados.mdf_id}`;\r\n\r\n api.post(_link).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (res.data.mdf_status === 1 && !!res.data.mdf_chavemdfe) {\r\n notification.success({ message: 'Sucesso', description: `MDF-e Autorizada com sucesso!` });\r\n novaAbaNavegador(`Danfe/GerarDamdfe?chaveMdfe=${res.data.mdf_chavemdfe}`);\r\n } else {\r\n notification.error({\r\n description: (<>\r\n Não foi possível Autorizar Manifesto Eletrônico!
\r\n {res.data.mdf_cstat} - {res.data.mdf_xmotivo}\r\n ), message: `Aviso`\r\n });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar Manifesto Eletrônico!', message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar Manifesto Eletrônico!', message: `Aviso` });\r\n }\r\n setCarregando(false);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n form.resetFields();\r\n fecharModalReenviarMdfeSefaz();\r\n });\r\n console.log(dados)\r\n }\r\n return (\r\n \r\n Reenviar MDF-e Sefaz\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dados.mdf_numero}\r\n \r\n \r\n \r\n \r\n {dados.mdf_chavemdfe} \r\n \r\n \r\n \r\n \r\n {dados.vei_descricao + ' - ' + dados.vei_placa}\r\n \r\n \r\n \r\n \r\n {dados.mdf_serie}\r\n \r\n \r\n {dados.mdf_modelo}\r\n \r\n \r\n \r\n \r\n {moment(dados.mdf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n {FormatNumber(dados.valortotalmdfe, true)} \r\n \r\n \r\n \r\n
\r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Descriptions, Form, Input, Modal, notification, Row } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport moment from \"moment\";\r\nimport { getLocal } from \"../../../services/auth\";\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalCancelamentoMdfe({ dadosMdfe, exibirModal, fecharModal }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const realizarCancelamento = () => {\r\n let motivo = '';\r\n let dados = { ...dadosMdfe };\r\n dados.justificativa = form.getFieldValue().justificativa;\r\n if (!dados.justificativa || dados.justificativa.length < 15) {\r\n notification.warning({ message: 'Aviso!', description: 'A justificativa deve ter no mínimo 15 caracteres' });\r\n return false;\r\n }\r\n\r\n setCarregando(true);\r\n api.post(`ManifestoEletronico/CancelarMdfe`, dados).then(\r\n res => {\r\n let _cStat = res.data.cStat;\r\n let motivo = _cStat + \" - \" + res.data.xMotivo;\r\n if (_cStat == 135 || _cStat == 155 || _cStat == 101 || _cStat == 573 || _cStat == 218) {\r\n notification.success({ message: `MDF-e Nº: ${dados.mdf_numero} cancelada com sucesso !`, description: motivo });\r\n } else {\r\n notification.warning({ message: `Não foi possível efetuar o cancelamento da MDF-e Nº: ${dados.mdf_numero} !`, description: motivo });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ description: `Não foi possível efetuar o cancelamento da MDF-e Nº: ${dados.mdf_numero} !`, message: 'Aviso' });\r\n setCarregando(false);\r\n }\r\n ).finally(\r\n () => {\r\n form.resetFields();\r\n setCarregando(false);\r\n fecharModal();\r\n }\r\n );\r\n }\r\n\r\n return (\r\n \r\n Realizar Cancelamento\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dadosMdfe.ser_serie} \r\n \r\n \r\n {dadosMdfe.mdf_chavemdfe} \r\n \r\n \r\n \r\n \r\n {dadosMdfe.mdf_numero} \r\n \r\n \r\n {moment(dadosMdfe.mdf_dataemissao).format('DD-MM-YYYY')} \r\n \r\n \r\n \r\n \r\n {dadosMdfe.vei_descricao} \r\n \r\n \r\n {dadosMdfe.vei_placa} \r\n \r\n \r\n \r\n \r\n {dadosMdfe.quantidadedocs} \r\n \r\n \r\n {dadosMdfe.pesobruto} \r\n \r\n \r\n {FormatNumber(dadosMdfe.valortotalmdfe, true)} \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { Col, Descriptions, Form, Modal, notification, Row, Select } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport api from \"../../../services/api\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ModalAdicionarMotorista({ exibirModal, fecharModal, dados }) {\r\n const [form] = Form.useForm()\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const cancelarModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n }\r\n\r\n const incluirMotorista = () => {\r\n setCarregando(true);\r\n let dadosForm = form.getFieldsValue();\r\n\r\n if (dadosForm.fun_id !== undefined) {\r\n let dadosMotorista = {\r\n fun_id: dadosForm.fun_id,\r\n mdf_id: dados.mdf_id\r\n }\r\n api.post(`ManifestoEletronico/IncluirCondutor`, dadosMotorista).then(\r\n res => {\r\n let _cStat = res.data.cStat;\r\n let motivo = _cStat + \" - \" + res.data.xMotivo;\r\n if (_cStat === 135) {\r\n notification.success({ message: 'Novo condutor incluído com sucesso!', description: motivo });\r\n } else {\r\n notification.warning({ message: 'Não foi possível incluir um novo condutor!', description: motivo })\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro);\r\n notification.warning({ message: 'Atenção!', description: 'Não foi possível incluir um novo motorista' });\r\n setCarregando(false);\r\n }\r\n ).finally(\r\n () => {\r\n form.resetFields();\r\n setCarregando(false);\r\n fecharModal();\r\n }\r\n );\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'É necessário selecionar um motorista para realizar a inclusão' });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n Incluir\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dados.mdf_numero} \r\n \r\n \r\n {moment(dados.mdf_dataemissao).format('DD-MM-YYYY')} \r\n \r\n \r\n \r\n \r\n {dados.mdf_chavemdfe} \r\n \r\n \r\n \r\n
\r\n \r\n ({fun.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Tag, Table } from \"antd\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function TabDetalheDocs({ docs }) {\r\n return (\r\n
\r\n
(\r\n \r\n {doc_sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave',\r\n render: ({ doc_chaveacesso }) => (\r\n {doc_chaveacesso}\r\n )\r\n },\r\n {\r\n title: 'Modelo',\r\n align: 'center',\r\n render: ({ doc_modelodoc }) => (\r\n {doc_modelodoc}\r\n )\r\n },\r\n {\r\n title: 'Cidade',\r\n align: 'center',\r\n render: ({ cid_descricao }) => (\r\n {cid_descricao}\r\n )\r\n },\r\n {\r\n title: 'Estado (UF)',\r\n align: 'center',\r\n render: ({ est_sigla }) => (\r\n {est_sigla}\r\n )\r\n },\r\n {\r\n title: 'Peso',\r\n align: 'center',\r\n render: ({ doc_pesobruto }) => (\r\n {doc_pesobruto}\r\n )\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ doc_valortotal }) => (\r\n R$ {FormatNumber(doc_valortotal, true)}\r\n )\r\n }\r\n ]\r\n } dataSource={docs}\r\n />\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Table, Tag } from \"antd\";\r\n\r\nexport default function TabDetalheMotorista({ motorista }) {\r\n return (\r\n
\r\n
(\r\n \r\n {fun_id}\r\n \r\n )\r\n },\r\n {\r\n title: 'Nome',\r\n align: 'center',\r\n render: ({ pes_nome }) => (\r\n {pes_nome}\r\n )\r\n }\r\n ]\r\n } dataSource={motorista} />\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Table, Tag } from \"antd\";\r\n\r\nexport default function TabDetalheVeiculo({ veiculo }) {\r\n return (\r\n
\r\n
(\r\n \r\n {vei_id}\r\n \r\n )\r\n },\r\n {\r\n title: 'Descrição',\r\n align: 'center',\r\n width: 200,\r\n render: ({ vei_descricao }) => (\r\n {vei_descricao}\r\n )\r\n },\r\n {\r\n title: 'Placa',\r\n align: 'center',\r\n width: 200,\r\n render: ({ vei_placa }) => (\r\n {vei_placa}\r\n )\r\n },\r\n {\r\n title: 'Tipo Rodado',\r\n align: 'center',\r\n width: 200,\r\n render: ({ vei_tiporodado }) => (\r\n {vei_tiporodado}\r\n )\r\n }\r\n ]\r\n } dataSource={veiculo} />\r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Tabs, Divider } from \"antd\";\r\nimport moment from \"moment\";\r\nimport { TabDetalheDocs, TabDetalheMotorista, TabDetalheVeiculo } from './tabPage'\r\nimport formatNumber from '../../ValueObjects/formatNumber';\r\n\r\nexport default function DetalheMdfe({ dadosModal }) {\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [totalNfe, setTotalNfe] = useState(null);\r\n const [totalCte, setTotalCte] = useState(null);\r\n const [valorTotal, setValorTotal] = useState(null);\r\n const [pesoTotal, setPesoTotal] = useState(null);\r\n\r\n useEffect(() => {\r\n if (dadosModal?.docs?.length > 0) {\r\n let docs = [...dadosModal.docs]\r\n let totalValor = docs.reduce((vlr, item) => { let valor = parseFloat(item.doc_valortotal) || 0; return vlr + valor; }, 0);\r\n let totalPeso = docs.reduce((vlr, item) => { let peso = parseFloat(item.doc_pesobruto) || 0; return vlr + peso; }, 0);\r\n setValorTotal(totalValor);\r\n setPesoTotal(totalPeso);\r\n\r\n if (docs[0].doc_modelodoc === \"55\") {\r\n setTotalNfe(docs.length);\r\n } else if (docs[0].doc_modelodoc === \"57\") {\r\n setTotalCte(docs.length);\r\n }\r\n }\r\n\r\n }, [dadosModal])\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosModal.mdf_chavemdfe} \r\n \r\n \r\n {dadosModal.mdf_numero} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dadosModal.mdf_dataemissao).format('DD-MM-YYYY')} \r\n \r\n \r\n {dadosModal.mdf_status} \r\n \r\n \r\n {dadosModal.mdf_ambiente} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.mdf_tipoemitente} \r\n \r\n \r\n {dadosModal.mdf_tipomodal} \r\n \r\n\r\n \r\n {dadosModal.pme_descricao} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.mdf_unidadepeso} \r\n \r\n \r\n {pesoTotal} \r\n \r\n \r\n R$ {formatNumber(valorTotal, true)} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {totalNfe ?? 0} \r\n \r\n \r\n {totalCte ?? 0} \r\n \r\n \r\n {(dadosModal.mdf_infocomplementar ?? \"NÃO INFORMADO\")} \r\n \r\n \r\n \r\n \r\n Carregamento\r\n \r\n \r\n \r\n \r\n {dadosModal.pme_cepcarrega} \r\n \r\n \r\n {dadosModal.cid_descricaocarrega} \r\n \r\n \r\n {dadosModal.mdf_ufinicio} \r\n \r\n \r\n \r\n \r\n Descarregamento\r\n \r\n \r\n \r\n \r\n {dadosModal.pme_cepdescarrega} \r\n \r\n \r\n {dadosModal.cid_descricaodescarrega} \r\n \r\n \r\n {dadosModal.mdf_uffim} \r\n \r\n \r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Modal } from \"antd\";\r\nimport DetalheMdfe from \"../../detalheMdfe\";\r\n\r\nexport default function ModalDetalhesMdfe({ exibirModal, fecharModal, dadosModal }) {\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Form, Input, Select, Collapse, Menu, Tag, Dropdown, Popover, notification, Modal } from \"antd\";\r\nimport { BreadcrumbPage, ComboData, Data, EmitirManifesto, Imprimir, TabelaDados } from \"../../components\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, CloseOutlined, CloudSyncOutlined, CloudUploadOutlined, ExclamationCircleOutlined, EyeOutlined, IssuesCloseOutlined, MoreOutlined, PlusOutlined, PrinterOutlined, SearchOutlined, TruckOutlined, UserAddOutlined } from \"@ant-design/icons\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions } from \"../../actions\";\r\nimport DrawerManifestoEletronico from \"./drawer\";\r\nimport moment from \"moment\";\r\nimport api from '../../services/api';\r\nimport { novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport ModalReenviarMdfeSefaz from \"../../components/modals/modalReenviarMdfeSefaz\";\r\nimport ModalCancelamentoMdfe from \"../../components/modals/modalCancelamentoMdfe\";\r\nimport ModalAdicionarMotorista from \"../../components/modals/modalAdicionarMotorista\";\r\nimport { ModalConsultaProtocoloMdfe } from \"../../components/modals\";\r\nimport ModalDetalhesMdfe from \"../../components/modals/modalDetalhesMdfe\";\r\n\r\nexport default function ManifestoEletronico({ }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n const [formParam] = Form.useForm();\r\n const [dados, setDados] = useState({});\r\n const [listaStatus, setListaStatus] = useState([]);\r\n const [openModalReenviarMdfeSefaz, setModalReenviarMdfeSefaz] = useState(false);\r\n const [openModalCancelar, setOpenModalCancelar] = useState(false);\r\n const [dadosCancelamento, setDadosCancelamento] = useState({});\r\n const [dadosConsultaSituacao, setDadosSituacaoMdfe] = useState({});\r\n const [openModalMotorista, setOpenModalMotorista] = useState(false);\r\n const [openModalConsultaSituacao, setOpenModalConsultaSituacao] = useState(false);\r\n const [dadosDetalhesMdfe, setDadosDetalhesMdfe] = useState({});\r\n const [openDetalhesMdfe, setOpenDetalhesMdfe] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n useEffect(() => {\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n filtrosAvancados();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-mdf_dataemissao' } });\r\n carregarDados();\r\n }, []);\r\n\r\n function filtrosAvancados(value) {\r\n let sql = \"\";\r\n sql += !!formParam.getFieldValue().status ? `&StatusMDFe=${formParam.getFieldValue().status}` : \"\";\r\n sql += !!form.getFieldValue().dataInicial ? `&DataInicial=${moment(form.getFieldValue().dataInicial).format('YYYY-MM-DD')}` : `&dataInicial=${moment(new Date()).format('YYYY-MM-DD')}`;\r\n sql += !!form.getFieldValue().dataFinal ? `&DataFinal=${moment(form.getFieldValue().dataFinal).format('YYYY-MM-DD')}` : `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}`;\r\n //sql += !!form.getFieldValue().ser_serie ? `&SerieFiscal=${form.getFieldValue().ser_serie}`: \"\";\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: `${!!value ? value : !!formParam.getFieldValue().filtroPor ? formParam.getFieldValue().filtroPor : ''}${sql}`, pagina: 1 } });\r\n };\r\n\r\n function exibirDrawer() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n function retornaDescricaoStatus(mdf_status) {\r\n if (!!listaStatus) {\r\n let status = listaStatus.filter((status) => (status.key === mdf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n\r\n function autorizarMdfe(record) {\r\n setDados(record);\r\n setModalReenviarMdfeSefaz(true);\r\n };\r\n\r\n function consultaSefaz(record) {\r\n api.get(`ManifestoEletronico/ConsultarProtocolo?xmlOuChave=${record.mdf_chavemdfe}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setDadosSituacaoMdfe(res.data);\r\n setOpenModalConsultaSituacao(true);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n\r\n function encerrarMdfe(record) {\r\n Modal.confirm({\r\n title: `Encerrar MDF-e ?`,\r\n icon: ,\r\n content: `Deseje realmente Encerrar o MDF-e nº:${record.mdf_numero}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.post(`ManifestoEletronico/EncerrarMdfe/${record.mdf_id}`).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.cStat === 132 || retornoNF.data.cStat === 135) {\r\n notification.success({ message: 'Sucesso', description: retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo });\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico! ' + retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo, message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico! ' + retornoNF.data.cStat + \" - \" + retornoNF.data.xMotivo, message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Encerrar Manifesto Eletrônico!', message: `Aviso` });\r\n }\r\n }\r\n ).finally(() => {\r\n filtrosAvancados();\r\n });\r\n }\r\n });\r\n };\r\n\r\n function exportarXML(chaveMdfe) {\r\n api.get(`ManifestoEletronico/ExportarXml?chaveMdfe=${chaveMdfe}`).then(\r\n res => {\r\n let linkOculto = document.createElement('a');\r\n linkOculto.href = 'data:text/xml,' + encodeURIComponent(atob(res.data));\r\n linkOculto.download = 'MDFe-' + chaveMdfe + '.xml';\r\n document.body.appendChild(linkOculto);\r\n linkOculto.click();\r\n linkOculto.remove();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n function imprimirDamdfe(chaveMdfe) {\r\n if (chaveMdfe) {\r\n novaAbaNavegador(`Danfe/GerarDamdfe?chaveMdfe=${chaveMdfe}`)\r\n }\r\n };\r\n\r\n function recarregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-mdf_dataemissao' } });\r\n };\r\n\r\n function carregarDados() {\r\n retornaStatus();\r\n };\r\n\r\n function retornaStatus() {\r\n api.get('Enum/Listar?nome=StatusMDFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatus(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function cancelarMdfe(record) {\r\n // se aprovado.\r\n if (record.mdf_status === 1) {\r\n let dataEmissao = new Date(record.mdf_dataemissao);\r\n let dataAtual = new Date();\r\n let diferenca = dataAtual - dataEmissao;\r\n\r\n let horasDeDiferenca = diferenca / (1000 * 60 * 60);\r\n\r\n if (horasDeDiferenca > 24) {\r\n notification.warning({ message: 'Atenção!', description: 'O prazo de 24 horas para cancelamento expirou. MDFe não pode ser cancelado' })\r\n } else {\r\n setDadosCancelamento(record);\r\n setOpenModalCancelar(true);\r\n }\r\n }else{}\r\n setDadosCancelamento(record);\r\n setOpenModalCancelar(true);\r\n }\r\n\r\n async function visualizarMdfe(dados) {\r\n if (dados.mdf_id) {\r\n await api.get(`ManifestoEletronico/BuscarMdfe/${dados.mdf_id}`).then(\r\n res => {\r\n let retorno = res.data;\r\n setDadosDetalhesMdfe(retorno);\r\n setOpenDetalhesMdfe(true);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n }\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n {(record.mdf_status === 1) &&\r\n \r\n }\r\n {(record.mdf_status === 1) &&\r\n \r\n }\r\n {(record.mdf_status === 4 || record.mdf_status === 0) &&\r\n \r\n }\r\n {(record.mdf_status === 1 || record.mdf_status === 7) &&\r\n \r\n }\r\n {(record.mdf_status === 1 || record.mdf_status === 0) &&\r\n \r\n }\r\n \r\n )\r\n };\r\n function menuTableOutros(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: false } });\r\n }} icon={}>\r\n EMITIR\r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n filtrosAvancados(valor)} allowClear />\r\n \r\n \r\n \r\n {\r\n form.setFieldsValue({ DataFinal: moment(new Date()) });\r\n form.setFieldsValue({ DataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n filtrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n filtrosAvancados()}\r\n mode=\"multiple\"\r\n placeholder=\"Status Nota\"\r\n >\r\n {listaStatus.map((status) => (\r\n {status.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n filtrosAvancados()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {mdf_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n width: 100,\r\n render: ({ mdf_status }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(mdf_status)}\r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Veículo',\r\n render: ({ vei_descricao }) => (\r\n
\r\n \r\n
\r\n {vei_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Placa',\r\n width: 150,\r\n render: ({ vei_placa }) => (\r\n
\r\n \r\n
\r\n {vei_placa}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 140,\r\n render: ({ mdf_dataemissao }) => (\r\n
\r\n {moment(mdf_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 80,\r\n align: 'center',\r\n render: ({ mdf_modelo, ser_serie }) => (\r\n
\r\n \r\n
\r\n {mdf_modelo}\r\n \r\n \r\n -\r\n \r\n \r\n {ser_serie}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde Docs',\r\n align: 'right',\r\n width: 100,\r\n render: ({ quantidadedocs }) => (\r\n
\r\n {quantidadedocs}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Peso Carga',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pesobruto }) => (\r\n
\r\n {pesobruto}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Carga (R$)',\r\n align: 'right',\r\n width: 200,\r\n render: ({ valortotalmdfe }) => (\r\n
\r\n {FormatNumber(valortotalmdfe, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Rejeição: {mdf_cstat}{!!(mdf_xmotivo) ? (', ' + mdf_xmotivo) : ''}\r\n }\r\n \r\n \r\n \r\n Chave:\r\n \r\n {!!mdf_chavemdfe === false && \r\n MDF-e não gerada\r\n }\r\n {!!mdf_chavemdfe && mdf_status === 1 && mdf_status === 7 && \r\n { imprimirDamdfe(mdf_chavemdfe) }}>Clique para visualizar o DAMDFE}>\r\n {mdf_chavemdfe}\r\n \r\n }\r\n {mdf_status === 1 && mdf_status === 7 && \r\n { }} target=\"_blank\">\r\n Consultar Sefaz\r\n \r\n }\r\n \r\n \r\n \r\n Série: {(!!mdf_serie > 0 ? mdf_serie : 'Não Informada')}\r\n \r\n \r\n\r\n \r\n )\r\n }} />\r\n \r\n \r\n { setModalReenviarMdfeSefaz(false); recarregarLista() }} />\r\n { setOpenModalCancelar(false); recarregarLista(); }} />\r\n { setOpenModalMotorista(false); recarregarLista(); }} dados={dados} />\r\n { setOpenModalConsultaSituacao(false); }} />\r\n setOpenDetalhesMdfe(false)} dadosModal={dadosDetalhesMdfe} />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Card, Col, Form, Input, Row, Select, Spin } from \"antd\";\r\n\r\nimport { FormGW, InputCpfCnpj, InputPhone, SelectPaginacao } from \"../../components\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function TabRemetenteCTe({ formAutores, tomador, listaDocs, setIdTomador, editando }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [remetenteFisico, setRemetenteFisico] = useState(true);\r\n const [destinatarioFisico, setDestinatarioFisico] = useState(true);\r\n const [expedidorFisico, setExpedidorFisico] = useState(true);\r\n const [recebedorFisico, setRecebedorFisico] = useState(true);\r\n const [outrosFisico, setOutrosFisico] = useState(true);\r\n const [tomadorOutros, setTomadorOutros] = useState(false);\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [enderecoRemetente, setEnderecoRemetente] = useState([]);\r\n const [enderecoDestinatario, setEnderecoDestinatario] = useState([]);\r\n const [enderecoExpedidor, setEnderecoExpedidor] = useState([]);\r\n const [enderecoRecebedor, setEnderecoRecebedor] = useState([]);\r\n const [enderecoOutros, setEnderecoOutros] = useState([]);\r\n const tipo_prefix = {\r\n 0: 'remetente',\r\n 1: 'expedidor',\r\n 2: 'recebedor',\r\n 3: 'destinatario',\r\n 4: 'outros'\r\n }\r\n\r\n useEffect(() => {\r\n if (formAutores.getFieldValue().cte_tomador) {\r\n tratarTomador();\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (listaDocs.length > 0 && editando==false) {\r\n setCarregarPagina(true);\r\n const nota = listaDocs[0];\r\n let lista = [];\r\n\r\n if (nota.pes_destinatario) {\r\n lista.push({ name: \"pes_destinatario\", campo: \"Filtro\", value: nota.pes_destinatario });\r\n setEnderecoDestinatario(nota.enderecosDest);\r\n\r\n let dest = {\r\n pes_id: nota.pes_destinatario,\r\n pes_nome: nota.razao_destinatario,\r\n enderecos: nota.enderecosDest,\r\n pej_inscricaoestadual: nota.ie_destinatario,\r\n }\r\n \r\n if (nota.cpfCnpj_destinatario.length === 11) {\r\n setDestinatarioFisico(true);\r\n formAutores.setFieldsValue({ cpf_destinatario: nota.cpfCnpj_destinatario });\r\n dest.pef_cpf = nota.cpfCnpj_destinatario\r\n } else {\r\n setDestinatarioFisico(false);\r\n formAutores.setFieldsValue({ cnpj_destinatario: nota.cpfCnpj_destinatario });\r\n dest.pej_cnpj = nota.cpfCnpj_destinatario\r\n }\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: dest } } } });\r\n formAutores.setFieldsValue({\r\n est_destinatario: nota.enderecosDest[0].est_sigla,\r\n razao_destinatario: nota.razao_destinatario,\r\n fantasia_destinatario: nota.fantasia_destinatario,\r\n logradouro_destinatario: nota.enderecosDest[0].log_logradouro\r\n })\r\n }\r\n if (nota.pes_remetente) {\r\n lista.push({ name: \"pes_remetente\", campo: \"Filtro\", value: nota.pes_remetente });\r\n setEnderecoRemetente(nota.enderecosRem);\r\n\r\n if (nota.cpfCnpj_remetente.length === 11) {\r\n setRemetenteFisico(true);\r\n formAutores.setFieldsValue({ cpf_remetente: nota.cpfCnpj_remetente });\r\n } else {\r\n setRemetenteFisico(false);\r\n formAutores.setFieldsValue({ cnpj_remetente: nota.cpfCnpj_remetente });\r\n }\r\n\r\n formAutores.setFieldsValue({\r\n est_remetente: nota.enderecosRem[0].est_sigla,\r\n razao_remetente: nota.razao_remetente,\r\n fantasia_remetente: nota.fantasia_remetente,\r\n logradouro_remetente: nota.enderecosRem[0].log_logradouro,\r\n })\r\n }\r\n if (nota.enderecosRem) {\r\n if (nota.enderecosRem[0].cid_id) {\r\n lista.push({ name: 'cid_id_munenvio', campo: 'IdCidade', value: nota.enderecosRem[0].cid_id });\r\n lista.push({ name: 'cid_id_muninicial', campo: 'IdCidade', value: nota.enderecosRem[0].cid_id });\r\n }\r\n }\r\n if (nota.enderecosDest) {\r\n if (nota.enderecosDest[0].cid_id) {\r\n lista.push({ name: 'cid_id_munfinal', campo: 'IdCidade', value: nota.enderecosDest[0].cid_id });\r\n }\r\n }\r\n if (nota.cid_id_munfinal) {\r\n lista.push({ name: 'cid_id_munfinal', campo: 'IdCidade', value: nota.cid_id_munfinal });\r\n }\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formAutores.setFieldsValue(nota);\r\n\r\n setTimeout(() => {\r\n setCarregarPagina(false);\r\n }, 1400)\r\n }\r\n }, [listaDocs])\r\n\r\n function buscarDadosEndereco(pee_id, tipoAutor) {\r\n let enderecosMap = {\r\n 0: enderecoRemetente,\r\n 1: enderecoExpedidor,\r\n 2: enderecoRecebedor,\r\n 3: enderecoDestinatario,\r\n 4: enderecoOutros\r\n };\r\n let prefix = tipo_prefix[tipoAutor];\r\n let enderecos = enderecosMap[tipoAutor];\r\n if (!prefix || !enderecos);\r\n\r\n let end = enderecos.find(end => end.pee_id === pee_id);\r\n if (!end) return;\r\n\r\n formAutores.setFieldsValue({\r\n [`cep_${prefix}`]: end.cep_cep,\r\n [`bai_${prefix}`]: end.bai_nome,\r\n [`num_${prefix}`]: end.pee_numero,\r\n [`complemento_${prefix}`]: end.pee_complemento,\r\n [`est_${prefix}`]: end.est_sigla\r\n })\r\n if (end.pie_inscricaoestadual) {\r\n formAutores.setFieldsValue({ [`ie_${prefix}`]: end.pie_inscricaoestadual });\r\n }\r\n }\r\n\r\n function limparPessoa(autor) {\r\n if (autor === \"destinatario\") {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: null } } } });\r\n }\r\n\r\n formAutores.setFieldsValue({\r\n [`cpf_${autor}`]: null,\r\n [`cnpj_${autor}`]: null,\r\n [`ie_${autor}`]: null,\r\n [`email_${autor}`]: null,\r\n [`telefone_${autor}`]: null,\r\n [`endereco_${autor}`]: null,\r\n [`bai_${autor}`]: null,\r\n [`num_${autor}`]: null,\r\n [`complemento_${autor}`]: null,\r\n [`cep_${autor}`]: null,\r\n [`est_${autor}`]: null,\r\n [`razao_${autor}`]: null,\r\n [`logradouro_${autor}`]: null\r\n })\r\n }\r\n\r\n function tratarTomador(dados) {\r\n if (!dados && formAutores.getFieldValue().cte_tomador) {\r\n dados = formAutores.getFieldValue().cte_tomador;\r\n }\r\n\r\n if (dados === 4) {\r\n setTomadorOutros(true);\r\n } else {\r\n setTomadorOutros(false);\r\n }\r\n\r\n if (dados === 0) {\r\n setIdTomador(formAutores.getFieldValue().pes_remetente);\r\n } else if (dados === 1) {\r\n setIdTomador(formAutores.getFieldValue().pes_expedidor);\r\n } else if (dados === 2) {\r\n setIdTomador(formAutores.getFieldValue().pes_recebedor);\r\n } else if (dados === 3) {\r\n setIdTomador(formAutores.getFieldValue().pes_destinatario);\r\n } else if (dados === 4) {\r\n setIdTomador(formAutores.getFieldValue().pes_outros);\r\n }\r\n }\r\n\r\n async function carregarDadosPessoa(codigo, tipoAutor) {\r\n let prefix = tipo_prefix[tipoAutor];\r\n\r\n if (!!codigo) {\r\n let pessoa = (await api.get(`Cliente/BuscarByIdPessoa/${codigo}`)).data;\r\n\r\n if (!!pessoa) {\r\n retornarDadosCPFCNPJ(pessoa, tipoAutor, prefix);\r\n formAutores.setFieldsValue({\r\n [`ie_${prefix}`]: pessoa.pej_inscricaoestadual ?? pessoa.enderecos[0].pie_inscricaoestadual,\r\n [`razao_${prefix}`]: pessoa.pes_nome,\r\n [`fantasia_${prefix}`]: pessoa.pej_nomefantasia\r\n });\r\n\r\n if (tipoAutor === 3) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: pessoa } } } });\r\n }\r\n\r\n if (pessoa.emails.length > 0) {\r\n let emailPricipal = pessoa.emails.filter(f => f.pem_emailprincipal == true);\r\n formAutores.setFieldsValue({ [`email_${prefix}`]: emailPricipal[0].pem_email });\r\n }\r\n if (pessoa.telefones.length > 0) {\r\n let telefonePrincipal = pessoa.telefones.filter(f => f.psc_principal == true);\r\n formAutores.setFieldsValue({ [`telefone_${prefix}`]: telefonePrincipal[0].psc_numero });\r\n }\r\n if (pessoa.enderecos.length > 0) {\r\n if (tipoAutor === 0) {\r\n setEnderecoRemetente(pessoa.enderecos);\r\n } else if (tipoAutor === 1) {\r\n setEnderecoExpedidor(pessoa.enderecos);\r\n } else if (tipoAutor === 2) {\r\n setEnderecoRecebedor(pessoa.enderecos);\r\n } else if (tipoAutor === 3) {\r\n setEnderecoDestinatario(pessoa.enderecos);\r\n } else if (tipoAutor === 4) {\r\n setEnderecoOutros(pessoa.enderecos);\r\n }\r\n\r\n let enderecoPrincipal = pessoa.enderecos.filter(f => f.pee_enderecoprincipal == true);\r\n formAutores.setFieldsValue({\r\n [`endereco_${prefix}`]: enderecoPrincipal[0].pee_id,\r\n [`bai_${prefix}`]: enderecoPrincipal[0].bai_nome,\r\n [`num_${prefix}`]: enderecoPrincipal[0].pee_numero,\r\n [`complemento_${prefix}`]: enderecoPrincipal[0].pee_complemento,\r\n [`cep_${prefix}`]: enderecoPrincipal[0].cep_cep,\r\n [`est_${prefix}`]: enderecoPrincipal[0].est_sigla,\r\n [`logradouro_${prefix}`]: enderecoPrincipal[0].log_logradouro\r\n })\r\n\r\n if (tipoAutor === 0) {\r\n let lista = [];\r\n lista.push({ name: 'cid_id_munenvio', campo: 'IdCidade', value: enderecoPrincipal[0].cid_id });\r\n lista.push({ name: 'cid_id_muninicial', campo: 'IdCidade', value: enderecoPrincipal[0].cid_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n if (tipoAutor === 3) {\r\n let lista = [];\r\n lista.push({ name: 'cid_id_munfinal', campo: 'IdCidade', value: enderecoPrincipal[0].cid_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n tratarTomador();\r\n } else {\r\n limparPessoa(prefix);\r\n }\r\n } else {\r\n limparPessoa(prefix);\r\n }\r\n }\r\n\r\n async function retornarDadosCPFCNPJ(pessoa, autor, prefix) {\r\n let setFisicoMap = {\r\n 0: setRemetenteFisico,\r\n 1: setExpedidorFisico,\r\n 2: setRecebedorFisico,\r\n 3: setDestinatarioFisico,\r\n 4: setOutrosFisico\r\n }\r\n\r\n let setFisico = setFisicoMap[autor];\r\n if (!setFisico) return;\r\n\r\n let isCPF = !!pessoa.pef_cpf;\r\n setFisico(isCPF);\r\n\r\n formAutores.setFieldsValue({\r\n [`${isCPF ? 'cpf' : 'cnpj'}_${prefix}`]: isCPF ? pessoa.pef_cpf : pessoa.pej_cnpj\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n carregarDadosPessoa(dados, 0)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n {remetenteFisico && \r\n \r\n }\r\n {!remetenteFisico && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarDadosPessoa(dados, 3)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n {destinatarioFisico && \r\n \r\n }\r\n {!destinatarioFisico && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarDadosPessoa(dados, 1)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n {expedidorFisico && \r\n \r\n }\r\n {!expedidorFisico && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarDadosPessoa(dados, 2)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n {recebedorFisico && \r\n \r\n }\r\n {!recebedorFisico && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {tomadorOutros && \r\n \r\n \r\n \r\n \r\n \r\n carregarDadosPessoa(dados, 4)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n {outrosFisico && \r\n \r\n }\r\n {!outrosFisico && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({cid.cid_descricao} - {cid.estado.est_sigla})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n ({cid.cid_descricao} - {cid.estado.est_sigla})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n ({cid.cid_descricao} - {cid.estado.est_sigla})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport { Checkbox, Col, Form, Input, InputNumber, notification } from \"antd\";\r\nimport { ForkOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ManutencaoComponentesFrete({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [fileList, setFileList] = useState([]);\r\n\r\n useEffect(() => {\r\n\r\n if (ui.showDrawer && !!manutencao.dados && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.cmf_descricao) {\r\n lista.push({ name: \"cmf_descricao\", campo: \"Nome\", value: manutencao.dados.cmf_id });\r\n }\r\n if (!!manutencao.dados.cmf_percentual) {\r\n lista.push({ name: \"cmf_percentual\", campo: \"percentual\", value: manutencao.dados.cmf_descricao });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'ComponentesFrete/';\r\n\r\n if (values.cmf_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Componente de Frete editado com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Componente de Frete incluído com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n });\r\n }\r\n }\r\n\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')} />\r\n \r\n \r\n \r\n \r\n Componente principal? \r\n \r\n \r\n\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Drawer, Form, Modal, Row } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nimport { drawerActions, listagemActions } from \"../../actions\";\r\nimport ManutencaoComponentesFrete from \"./manutencao\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function DrawerComponentesFrete({ editando, openDrawerCompFrete, setOpenDrawerCompFrete, cadComp, retornoSalvar }) {\r\n\r\n const [form] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null && editando.editando) {\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n debugger\r\n if (!!retornoSalvar) {\r\n retornoSalvar(retorno);\r\n }\r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n form.resetFields();\r\n\r\n if (!!openDrawerCompFrete) {\r\n setOpenDrawerCompFrete(false);\r\n } else {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false }});\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '-cmf_id' } })\r\n }\r\n\r\n if (editando.editando) {\r\n editando.setEditando(false);\r\n }\r\n }\r\n\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n { onClose() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Card, Col, Divider, Form, Input, InputNumber, message, notification, Radio, Row, Select, Table, Tag } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco, SelectPaginacao, SelectProduto } from \"../../components\";\r\nimport { CheckOutlined, CloseOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport DrawerComponentesFrete from '../../pages/componentesFrete/drawer';\r\nimport { selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function TabDadosGerais({ formConhecimento, tipoCTe, modalCTe, tipoServico, dadosOperacao, listaDocs, dadosProdutos, unidadeCTe, componentesFrete, dadosContribuinte, dadosTomador, tipoDaMedida, setValorTotalComponentes, formAutores }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formProduto] = Form.useForm();\r\n const [editandoComponente, setEditandoComponente] = useState(false);\r\n const [openDrawerCompFrete, setOpenDrawerCompFrete] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const [dadosCfop, setDadosCfop] = useState([]);\r\n const [listaComponentes, setListaComponentes] = useState([]);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [dadosProdutoImpostos, setDadosProdutoImpostos] = useState({});\r\n\r\n useEffect(() => {\r\n carregaDados();\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (dadosProdutoImpostos.pro_id && dadosDetalhes.pro_id) {\r\n adicionarItem();\r\n }\r\n }, [dadosProdutoImpostos, dadosDetalhes])\r\n\r\n useEffect(() => {\r\n if (componentesFrete.componentesFrete.length === 0 && listaComponentes.length > 0) {\r\n\r\n let compPrincipal = listaComponentes.filter((comp) => comp.cmf_descricao.toLowerCase() === 'frete'.toLowerCase())[0] || listaComponentes.find((comp) => comp.cmf_principal === true);\r\n let obj = {\r\n cmf_sequencia: 1 + componentesFrete.componentesFrete.length,\r\n cmf_id: compPrincipal.cmf_id,\r\n cmf_descricao: compPrincipal.cmf_descricao,\r\n ccf_valor: 0\r\n }\r\n let listaTemp = [...componentesFrete.componentesFrete];\r\n listaTemp.push(obj);\r\n componentesFrete.setComponentesFrete(listaTemp);\r\n }\r\n\r\n let totalValor = componentesFrete.componentesFrete.reduce((acc, item) => acc + (parseFloat(item.ccf_valor) || 0), 0);\r\n\r\n formProduto.setFieldsValue({\r\n vlr_totalprestacao: totalValor\r\n })\r\n setValorTotalComponentes(totalValor);\r\n }, [listaComponentes, componentesFrete.componentesFrete]);\r\n\r\n function carregaDados() {\r\n api.get(`Cfop/ListarCfopTipo?tipoCfopFim=8000&tipoCfopIni=1000`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosCfop(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get(`ComponentesFrete/Listar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaComponentes(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n formConhecimento.setFieldsValue({\r\n cte_tipocte: tipoCTe[0].key,\r\n cte_modal: modalCTe[0].key,\r\n cte_tiposervico: tipoServico[0].key,\r\n cte_indglobalizado: 0,\r\n cic_qntcarga: 1\r\n })\r\n }\r\n\r\n function setarValorCompPrincipal() {\r\n let valor = parseFloat(formProduto.getFieldValue().vlr_compprincipal);\r\n\r\n if (componentesFrete.componentesFrete.length > 0) {\r\n const novaLista = [...componentesFrete.componentesFrete];\r\n novaLista[0] = { ...novaLista[0], ccf_valor: valor };\r\n componentesFrete.setComponentesFrete(novaLista);\r\n }\r\n }\r\n\r\n function salvandoDadosComponentes(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: 'cmf_id', campo: 'Codigo', value: retorno.cmf_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function adicionarComponente() {\r\n let produto = dadosProdutos.dadosProdutos[0]?.pro_id;\r\n\r\n if (produto) {\r\n if (formProduto.getFieldValue().vlr_compprincipal > 0) {\r\n let valorAtual = parseFloat(formProduto.getFieldValue()?.ccf_valor) || 0;\r\n let dados = {\r\n cmf_id: formProduto.getFieldValue()?.cmf_id,\r\n ccf_valor: valorAtual\r\n };\r\n\r\n if (dados.cmf_id && dados.ccf_valor > 0) {\r\n let dadosComp = listaComponentes.filter((item) => item.cmf_id === dados.cmf_id);\r\n dados.cmf_descricao = dadosComp[0].cmf_descricao;\r\n\r\n let listaTemp = [...componentesFrete.componentesFrete];\r\n\r\n if (editandoComponente) {\r\n dados.cmf_sequencia = formProduto.getFieldValue().cmf_sequencia\r\n let index = listaTemp.findIndex(comp => comp.cmf_sequencia === dados.cmf_sequencia);\r\n\r\n if (index !== -1) {\r\n listaTemp[index] = dados;\r\n }\r\n notification.success({ message: 'Aviso!', description: 'Componente editado com sucesso' });\r\n } else {\r\n dados.cmf_sequencia = 1 + componentesFrete.componentesFrete.length;\r\n listaTemp.push(dados);\r\n notification.success({ message: 'Aviso!', description: 'Componente de Frete adicionado com sucesso' });\r\n }\r\n\r\n componentesFrete.setComponentesFrete(listaTemp);\r\n formProduto.setFieldsValue({\r\n cmf_sequencia: null,\r\n cmf_id: null,\r\n ccf_valor: null\r\n })\r\n setEditandoComponente(false);\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha todos os campos para adicionar' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Adicione um valor ao Componente de Frete principal' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Adicione um produto antes de incluir um componente de frete' });\r\n }\r\n }\r\n\r\n function editarComponente(record) {\r\n setEditandoComponente(true);\r\n formProduto.setFieldsValue({\r\n cmf_sequencia: record.cmf_sequencia,\r\n cmf_id: record.cmf_id,\r\n ccf_valor: record.ccf_valor\r\n })\r\n }\r\n\r\n function cancelarEdit() {\r\n setEditandoComponente(false);\r\n formProduto.setFieldsValue({\r\n cmf_sequencia: null,\r\n cmf_id: null,\r\n ccf_valor: null\r\n })\r\n }\r\n\r\n function removerComponente(record) {\r\n let index = componentesFrete.componentesFrete.findIndex(comp => comp.cmf_sequencia === record.cmf_sequencia);\r\n let dadosTemp = [...componentesFrete.componentesFrete];\r\n\r\n dadosTemp.splice(index, 1)\r\n dadosTemp.forEach((item, index) => {\r\n item.cmf_sequencia = index + 1;\r\n })\r\n\r\n if (editandoComponente) {\r\n cancelarEdit();\r\n }\r\n componentesFrete.setComponentesFrete(dadosTemp);\r\n }\r\n\r\n function popularItem(item) {\r\n let itemCTe = {};\r\n let cfop = dadosCfop.filter((cfop) => (cfop.cfo_cfop === item.cfo_cfop))[0];\r\n itemCTe = {\r\n impostos: item.impostos,\r\n pro_codigo: item.pro_codigo,\r\n pro_descricao: item.pro_descricao,\r\n pro_id: item.pro_id,\r\n icm_id: item.icm_id,\r\n prg_ean: !!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean,\r\n nfi_cfop: cfop.cfo_cfop,\r\n nfi_unidademedida: item.ump_id,\r\n nfi_qtde: 1,\r\n nfi_valorunitario: item.lpi_valorvenda ?? 0,\r\n cso_id: item.cso_id,\r\n cst_id: item.cst_id\r\n };\r\n return itemCTe;\r\n }\r\n\r\n function incluirItem(dados, listaItens) {\r\n listaItens.push(dados);\r\n dadosProdutos.setDadosProdutos(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Produto incluído com sucesso!' });\r\n }\r\n\r\n async function adicionarItem(item = {}) {\r\n let dados = {}\r\n let listaItens = [...dadosProdutos.dadosProdutos];\r\n let p = { ...dadosProdutoImpostos, ...item };\r\n p.icms_id = dadosProdutoImpostos.icm_id;\r\n\r\n let possuiIe = !!listaDocs[0].ie_destinatario ? true : false;\r\n let cpfCnpjDestinatario = listaDocs[0]?.cpfCnpj_destinatario || formAutores.getFieldValue()?.cpf_destinatario || formAutores.getFieldValue()?.cnpj_destinatario;\r\n let fisicaJuridica = cpfCnpjDestinatario.length === 14 ? 2 : cpfCnpjDestinatario.length === 11 ? 1 : 3;\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, 1, p.lpi_valorvenda,\r\n 0, 0, 0, p.iod_percicms, p.iod_percdiferimentoicms, p.iod_percicmsreducaobc, p.mva_percaliquotaicms, p.mva_percmva, p.mva_percaaliqutoaicmsreducao, p.mva_ajustado, p.ncm_percentual,\r\n fisicaJuridica, 0, possuiIe, 0);\r\n\r\n item = { ...item, ...dadosDetalhes }\r\n item.impostos = impostos;\r\n dados = popularItem(item);\r\n dados.numeroItem = listaItens.length + 1;\r\n incluirItem(dados, listaItens);\r\n }\r\n\r\n async function buscarProduto(produto) {\r\n if (produto !== undefined) {\r\n let dadosDoc = listaDocs[0];\r\n let listaItens = [...listaSelectProd];\r\n let prod = listaItens.filter((item) => item.key === produto)[0];\r\n\r\n let destinoOperacao = (!!dadosTomador.cta_siglauf && !!dadosContribuinte.est_sigla && (dadosTomador.cta_siglauf === dadosContribuinte.est_sigla) ? '1' : dadosTomador.cta_siglauf === \"EX\" ? '3' : '2');\r\n let ufDest = dadosDoc.enderecosDest?.[0]?.est_sigla || dadosContribuinte.est_sigla;\r\n let inscEstadual = !!dadosDoc.ie_destinatario ? `&inscEstadual=${dadosDoc.ie_destinatario}` : '';\r\n let objProd = (await api.get(`Produto/BuscarDadosProduto?IdProduto=${prod.pro_id}&ufDestino=${ufDest}`\r\n + `&operacaoCodigo=${dadosOperacao.ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}${''}${inscEstadual}`\r\n )).data[0];\r\n\r\n setDadosProdutoImpostos(objProd);\r\n setDadosDetalhes(objProd);\r\n } else {\r\n setDadosProdutoImpostos({});\r\n setDadosDetalhes({});\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Sim\r\n Não\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Informações Quantidade de Cargas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n Prestação de Serviço\r\n \r\n \r\n
\r\n \r\n { buscarProduto(dados) }}\r\n ordem={\"pro_descricao\"}\r\n setListaDados={setListaSelectProd}\r\n filtroExtra={`&ProdutoFrete=true`}\r\n exibirValor={false}\r\n />\r\n \r\n \r\n \r\n setarValorCompPrincipal()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n Componentes de Frete\r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerCompFrete(true)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {editandoComponente ?\r\n :\r\n \r\n }\r\n \r\n \r\n {editandoComponente &&\r\n \r\n }\r\n \r\n \r\n
\r\n
{\r\n return (\r\n \r\n {record?.cmf_sequencia}\r\n \r\n )\r\n }\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ cmf_descricao }) => (\r\n {cmf_descricao}\r\n )\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ ccf_valor }) => (\r\n {FormatNumber(ccf_valor, true)}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n render: (_, record, index) => {\r\n const isFirstItem = index === 0;\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Não há Dados\r\n \r\n \r\n \r\n )\r\n }}\r\n dataSource={componentesFrete.componentesFrete}\r\n pagination={false}\r\n scroll={{ y: 100 }}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Card, Col, Divider, Form, Input, Row, Typography } from \"antd\";\r\n\r\nimport { FormasPagamento, InputPreco } from \"../../components\";\r\n\r\nexport default function TabFaturamentoCTe({ formConhecimento, dadosOperacao, listaFormaPagamento, idTomador, setListaFormaPagamento, dadosProdutos, listaDocs, valorTotalComponentes}) {\r\n\r\n useEffect(() => {\r\n if (dadosProdutos[0]) {\r\n formConhecimento.setFieldsValue({\r\n vlrIcms: dadosProdutos[0].impostos?.retornoICMS?.ret_valorIcms,\r\n valorcte: valorTotalComponentes,\r\n qntdCarda: formConhecimento.getFieldValue().cic_qntcarga,\r\n qntdDocs: listaDocs.length\r\n })\r\n }\r\n }, [])\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Totais do Conhecimento de Transporte\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total do CTe (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Card, Col, Form, Input, Modal, notification, Row, Select, Table, Tabs, Tag, Upload } from \"antd\";\r\n\r\nimport { CloseOutlined, CloudUploadOutlined, DeleteOutlined, ExclamationCircleOutlined, FileDoneOutlined, PlusOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport { getBase64, retornaSoLetras } from \"../../../services/funcoes\";\r\nimport api from \"../../../services/api\";\r\nimport moment from \"moment\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport InputPreco from \"../../inputPreco\";\r\n\r\nexport default function ModalDocsFiscaisCTe({ form, exibirModal, fecharModal, listaDocs, setListaDocs, arquivoBase64, setArquivoBase64, arquivo, setArquivo }) {\r\n const [carregando, setCarregando] = useState(false);\r\n const [carregandoButton, setCarregandoButton] = useState(false);\r\n const [atualizaBotao, setAtualizaBotao] = useState(false);\r\n const [apenasTab1, setApenasTab1] = useState(false);\r\n const [apenasTab2, setApenasTab2] = useState(false);\r\n const [apenasTab3, setApenasTab3] = useState(false);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaDocsTab2, setListaDocsTab2] = useState([]);\r\n const [selectedRowKeys2, setSelectedRowKeys2] = useState([]);\r\n const [listaDocsTab3, setListaDocsTab3] = useState([]);\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n showUploadList: false,\r\n maxCount: 1,\r\n disabled: !!arquivo,\r\n beforeUpload(file) {\r\n getBase64(file).then(base64 => {\r\n setArquivoBase64(base64.split('base64,')[1]);\r\n setArquivo(file);\r\n });\r\n }\r\n }\r\n\r\n const docsSelecionados2 = (newSelectedRowKeys) => {\r\n setSelectedRowKeys2(newSelectedRowKeys);\r\n };\r\n\r\n const rowSelection2 = {\r\n selectedRowKeys2,\r\n onChange: docsSelecionados2,\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n removerNota();\r\n }\r\n })\r\n };\r\n\r\n useEffect(() => {\r\n setAbaSelecionada(\"1\");\r\n definirCamposTab2();\r\n definirCamposTab3();\r\n setListaDocsTab3([]);\r\n }, [exibirModal])\r\n\r\n useEffect(() => {\r\n if (arquivo) {\r\n setApenasTab1(true);\r\n } else {\r\n setApenasTab1(false);\r\n }\r\n\r\n if (listaDocsTab2.length > 0) {\r\n setApenasTab2(true);\r\n } else {\r\n setApenasTab2(false);\r\n }\r\n\r\n if (listaDocsTab3.length > 0) {\r\n setApenasTab3(true);\r\n } else {\r\n setApenasTab3(false);\r\n }\r\n }, [arquivo, listaDocsTab2, listaDocsTab3])\r\n\r\n async function definirCamposTab2() {\r\n form.setFieldsValue({\r\n Filtro: null,\r\n });\r\n setListaDocsTab2([]);\r\n }\r\n\r\n async function definirCamposTab3() {\r\n form.setFieldsValue({\r\n cid_chave: undefined,\r\n cid_modelo: undefined,\r\n cid_numero: undefined,\r\n cid_id: null,\r\n cid_peso: 0,\r\n cid_valornf: 0\r\n })\r\n }\r\n\r\n async function buscarDoc() {\r\n setCarregandoButton(true);\r\n let Filtro = form.getFieldValue().Filtro || null;\r\n\r\n if (Filtro !== null && Filtro?.length === 44) {\r\n let modelo = Filtro.substring(20, 22);\r\n if (modelo === \"55\") {\r\n await api.get(`ConhecimentoTransporte/ListarDocumentos?Chave=${Filtro}`).then(\r\n res => {\r\n let retorno = [res.data];\r\n if (retorno.length === 0) {\r\n retornoNull();\r\n } else {\r\n adicionarDoc(retorno);\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n retornoNull()\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n setCarregandoButton(false)\r\n }\r\n )\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Chave da Nota não é de um documento fiscal modelo 55' });\r\n setCarregandoButton(false);\r\n }\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: `${Filtro?.length > 0 && Filtro?.length < 44 ? 'Chave da Nota deve possuir 44 digítos' : 'Informe a Chave da Nota Fiscal'}` });\r\n setCarregandoButton(false);\r\n }\r\n }\r\n\r\n async function adicionarDoc(retorno) {\r\n if (abaSelecionada === \"2\") {\r\n let listaTemp = [...listaDocsTab2];\r\n let sequencia = listaTemp.length;\r\n\r\n retorno.forEach((doc, index) => {\r\n doc.doc_sequencia = sequencia + 1 + index;\r\n listaTemp.push(doc);\r\n });\r\n\r\n setListaDocsTab2(listaTemp);\r\n form.setFieldsValue({ Filtro: null });\r\n } else if (abaSelecionada === \"3\") {\r\n let dados = form.getFieldValue();\r\n let chavesExistentes = listaDocsTab3.map((doc) => doc.cid_chave);\r\n if (dados.cid_chave && dados.cid_id && dados.cid_modelo && dados.cid_valornf > 0) {\r\n if (chavesExistentes.includes(dados.cid_chave)) {\r\n notification.warning({ message: 'Atenção!', description: 'Já existe um documento com a mesma chave adicionado.' });\r\n } else {\r\n if (!validarCampos(dados)) return;\r\n let infoCidade = await api.get(`Cidade/Buscar/${dados.cid_id}`).then(\r\n res => {\r\n if (res.data) {\r\n return res; \r\n } else \r\n throw new Error(res);\r\n }\r\n ).catch(error => {\r\n let mensagemErro = 'Erro ao buscar dados da Cidade.';\r\n if (error.response) {\r\n if (error.response.status === 500 && error.response.data.length) {\r\n mensagemErro = error.response.data;\r\n } else {\r\n mensagemErro += ` Código: ${error.response.status}`;\r\n }\r\n } else {\r\n mensagemErro += ` Detalhes: ${error.message}`;\r\n }\r\n \r\n notification.warning({ \r\n message: 'Atenção!', \r\n description: mensagemErro \r\n });\r\n \r\n console.log(error);\r\n return null; // Retorna null para indicar erro\r\n });\r\n if (infoCidade) {\r\n let listaTemp = [...listaDocsTab3];\r\n\r\n listaTemp.push({\r\n sequencia: listaTemp.length + 1,\r\n cid_chave: dados.cid_chave,\r\n cid_id_munfinal: infoCidade.data.cid_id,\r\n cid_descricao: infoCidade.data.cid_descricao,\r\n est_sigla: infoCidade.data.estado.est_sigla,\r\n cid_modelo: dados.cid_modelo,\r\n cid_numero: dados.cid_numero,\r\n cid_peso: dados.cid_peso,\r\n cid_valornf: dados.cid_valornf\r\n })\r\n\r\n setListaDocsTab3(listaTemp);\r\n notification.success({ message: 'Atenção!', description: 'Documento Fiscal adicionado.' });\r\n definirCamposTab3();\r\n }\r\n }\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha todos os campos obrigatórios' });\r\n }\r\n }\r\n }\r\n\r\n function validarCampos(dados) {\r\n if (dados.cid_chave.length !== 44) {\r\n notification.warning({ message: 'Atenção!', description: 'Chave da nota deve possuir 44 digítos' });\r\n return false;\r\n }\r\n if (dados.cid_modelo !== '55') {\r\n notification.warning({ message: 'Atenção!', description: 'Deve ser informado um modelo 55' });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async function retornoNull() {\r\n notification.warning({ message: 'Aviso!', description: 'Não foi encontrado nenhum Documento.' })\r\n }\r\n\r\n function incluirInfosDaChave(value) {\r\n let chave = value.currentTarget.value;\r\n\r\n if (chave.length >= 21) {\r\n let modelo = chave.slice(20, 22);\r\n form.setFieldsValue({\r\n cid_modelo: modelo\r\n })\r\n } else {\r\n form.setFieldsValue({ cid_modelo: undefined });\r\n }\r\n\r\n if (chave.length >= 31) {\r\n let numero = chave.slice(30, 34);\r\n form.setFieldsValue({\r\n cid_numero: numero\r\n })\r\n } else {\r\n form.setFieldsValue({ cid_numero: undefined })\r\n }\r\n }\r\n\r\n function verificaChave(value) {\r\n let chave = value.currentTarget.value;\r\n let apenasNumeros = (retornaSoLetras(chave) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n notification.warning({ message: 'Atenção!', description: 'Chave da Nota deve conter apenas números' });\r\n }\r\n }\r\n\r\n function removerNota() {\r\n setArquivoBase64(\"\");\r\n setArquivo(null);\r\n setAtualizaBotao(true);\r\n form.setFieldsValue({\r\n cid_dataemissao: null,\r\n cid_peso: null,\r\n cid_valornf: null\r\n })\r\n }\r\n\r\n function removerDoc(record) {\r\n let index = listaDocs.findIndex(doc => doc.sequencia === record.sequencia);\r\n let dadosTemp = [...listaDocsTab3];\r\n dadosTemp.splice(index, 1)\r\n\r\n dadosTemp.forEach((item, index) => {\r\n item.sequencia = index + 1;\r\n });\r\n setListaDocsTab3(dadosTemp);\r\n }\r\n\r\n function salvarDocs() {\r\n const chavesExistentes = listaDocs.map((doc) => doc.cid_chave);\r\n\r\n if (abaSelecionada === \"1\") {\r\n setCarregando(true);\r\n api.post(`NotaFiscalEntrada/ImportarXML`, JSON.stringify(arquivoBase64), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n res => {\r\n let novaNota = { ...res.data };\r\n let notas = [...listaDocs];\r\n let liberado = verificaNotas(novaNota, notas);\r\n if (liberado) {\r\n novaNota.sequencia = notas.length + 1;\r\n notas.push(novaNota);\r\n setListaDocs(notas);\r\n let dadosNota = [];\r\n dadosNota.push({ nome: 'xmlBase64', valor: arquivoBase64 });\r\n notification.success({ message: 'Atenção!', description: 'Nota vinculada com sucesso' });\r\n fecharModal();\r\n removerNota();\r\n } else if (!liberado) {\r\n removerNota();\r\n notification.warning({ message: 'Atenção!', description: 'Essa nota ja está vinculada ao CTe atual' });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ description: 'Ocorreu um erro ao vincular a nota', message: 'Aviso!' });\r\n removerNota();\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n )\r\n } else if (abaSelecionada === \"2\") {\r\n const docsSelecionados2 = listaDocsTab2.filter((doc) => selectedRowKeys2.includes(doc.doc_sequencia));\r\n if (docsSelecionados2.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'É necessário selecionar pelo menos um documento para vinculá-lo' })\r\n } else {\r\n const docsDuplicados = docsSelecionados2.filter((doc) => chavesExistentes.includes(doc.cid_chave));\r\n\r\n if (docsDuplicados.length > 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Essa nota ja está vinculada ao CTe atual' });\r\n } else {\r\n const docsAtualizados = docsSelecionados2.map((doc, index) => ({\r\n sequencia: listaDocs.length + index + 1,\r\n ...doc,\r\n }));\r\n\r\n setListaDocs((prevListaDocs) => [...prevListaDocs, ...docsAtualizados]);\r\n fecharModal();\r\n }\r\n }\r\n } else if (abaSelecionada === \"3\") {\r\n if (listaDocsTab3.length === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'É necessário adicionar pelo menos um documento para vinculá-lo' });\r\n } else {\r\n const docsDuplicados = listaDocsTab3.filter((doc) => chavesExistentes.includes(doc.cid_chave));\r\n if (docsDuplicados.length > 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Já existe um documento com a mesma chave vinculado.' });\r\n } else {\r\n const docsAtualizados = listaDocsTab3.map((doc, index) => ({\r\n sequencia: listaDocs.length + index + 1,\r\n cid_numero: doc.cid_numero,\r\n cid_id_munfinal: doc.cid_id_munfinal,\r\n cid_chave: doc.cid_chave,\r\n cid_modelo: doc.cid_modelo,\r\n cid_peso: doc.cid_peso,\r\n cid_valornf: doc.cid_valornf\r\n }));\r\n\r\n setListaDocs((prevListaDocs) => [...prevListaDocs, ...docsAtualizados]);\r\n fecharModal();\r\n }\r\n }\r\n }\r\n }\r\n\r\n function verificaNotas(novaNota, notas) {\r\n let chavesExistentes = notas.map((doc) => doc.cid_chave);\r\n let docsDuplicados = chavesExistentes.includes(novaNota.cid_chave);\r\n if (docsDuplicados) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n Vincular Documento(s)\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n setAbaSelecionada(tab)} >\r\n \r\n \r\n
\r\n \r\n {!arquivo &&
\r\n \r\n \r\n \r\n
}\r\n
\r\n {!!arquivo &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {arquivo.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
record.doc_sequencia} columns={\r\n [\r\n {\r\n title: 'Sequência',\r\n width: 30,\r\n align: 'center',\r\n render: ({ doc_sequencia }) => (\r\n \r\n {doc_sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave de Acesso',\r\n align: 'left',\r\n render: ({ cid_chave }) => (\r\n {cid_chave}\r\n )\r\n },\r\n {\r\n title: 'Data Emissão',\r\n align: 'center',\r\n width: 200,\r\n render: ({ cid_dataemissao }) => (\r\n {moment(cid_dataemissao).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Modelo',\r\n align: 'center',\r\n width: 10,\r\n render: ({ cid_modelo }) => (\r\n {cid_modelo}\r\n )\r\n },\r\n {\r\n title: 'Número',\r\n align: 'center',\r\n width: 100,\r\n render: ({ cid_numero }) => (\r\n {cid_numero}\r\n )\r\n },\r\n {\r\n title: 'Destinatário',\r\n align: 'left',\r\n render: ({ razao_destinatario }) => (\r\n {razao_destinatario}\r\n )\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n fixed: 'right',\r\n align: 'right',\r\n width: 100,\r\n render: ({ cid_valornf }) => (\r\n
\r\n R$ {FormatNumber(cid_valornf, true)}\r\n
\r\n )\r\n }\r\n ]\r\n } rowSelection={rowSelection2}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n incluirInfosDaChave(value)} onBlur={(value) => verificaChave(value)}/>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n \r\n {cid.cid_id} - {cid.cid_descricao} - {cid.estado.est_sigla}\r\n \r\n )\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n \r\n {sequencia}\r\n \r\n )\r\n },\r\n {\r\n title: 'Chave de Acesso',\r\n width: 300,\r\n align: 'left',\r\n render: ({ cid_chave }) => (\r\n {cid_chave}\r\n )\r\n },\r\n {\r\n title: 'Destino',\r\n align: 'center',\r\n width: 150,\r\n render: ({ cid_descricao, est_sigla }) => (\r\n {cid_descricao} - {est_sigla}\r\n )\r\n },\r\n {\r\n title: 'Peso',\r\n width: 100,\r\n align: 'center',\r\n render: ({ cid_peso }) => (\r\n {FormatNumber(cid_peso, true)}\r\n )\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n fixed: 'right',\r\n align: 'right',\r\n width: 100,\r\n render: ({ cid_valornf }) => (\r\n {FormatNumber(cid_valornf, true)}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 45,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)}\r\n conteudo={\r\n op => ({op.ope_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n
\r\n \r\n \"Adicione\r\n Adicione os Documentos Fiscais do CT-e\r\n \r\n Adicione os Documentos Fiscais do CT-e\r\n \r\n \r\n \r\n \r\n \r\n }\r\n onClick={() => { form.resetFields(); setOpenModal(true); }}\r\n style={{ marginBottom: '-3px' }}\r\n >\r\n ADICIONAR DOCUMENTO\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
(\r\n \r\n {cid_numero ? cid_numero : '-'}\r\n \r\n )\r\n },\r\n {\r\n title: 'CHAVE',\r\n width: 80,\r\n align: 'center',\r\n render: ({ cid_chave }) => (\r\n {cid_chave}\r\n )\r\n },\r\n {\r\n title: 'Data Emissão',\r\n width: 40,\r\n align: 'center',\r\n render: ({ cid_dataemissao }) => (\r\n {moment(cid_dataemissao).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 50,\r\n align: 'center',\r\n render: ({ cid_modelo }) => (\r\n {cid_modelo}\r\n )\r\n },\r\n {\r\n title: 'Peso Bruto',\r\n width: 70,\r\n align: 'right',\r\n render: ({ cid_peso }) => (\r\n {cid_peso}\r\n )\r\n },\r\n {\r\n title: 'Valor Total',\r\n width: 70,\r\n align: 'right',\r\n render: ({ cid_valornf }) => (\r\n R$ {formatNumber(cid_valornf, true)}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 45,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Col, Divider, Row, Table, Tag } from \"antd\";\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport moment from \"moment\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabDetalheDocsCte({ docs, listaSerieFiscal }) {\r\n\r\n function retornaSerieFiscal(cid_serie) {\r\n if (listaSerieFiscal.length > 0) {\r\n let serie = listaSerieFiscal.filter((serie) => (serie.ser_numero === parseFloat(cid_serie)))[0];\r\n return !!serie ? serie.ser_serie : cid_serie;\r\n } else {\r\n return cid_serie;\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
(\r\n \r\n {cid_numero}\r\n \r\n )\r\n },\r\n {\r\n title: 'Série',\r\n align: 'center',\r\n render: ({ cid_serie }) => (\r\n {retornaSerieFiscal(cid_serie)}\r\n )\r\n },\r\n {\r\n title: 'Chave',\r\n render: ({ cid_chave }) => (\r\n {cid_chave}\r\n )\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 90,\r\n render: ({ cid_dataemissao }) => (\r\n
\r\n {moment(cid_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n align: 'center',\r\n render: ({ cid_modelo }) => (\r\n {cid_modelo}\r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n align: 'center',\r\n render: ({ cid_cfoppred }) => (\r\n
\r\n {cid_cfoppred}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Peso',\r\n align: 'center',\r\n render: ({ cid_peso }) => (\r\n {cid_peso}\r\n )\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ cid_valornf }) => (\r\n R$ {FormatNumber(cid_valornf, true)}\r\n )\r\n }\r\n ]\r\n } dataSource={docs} pagination={false}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Não há Dados\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n )\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Descriptions, Divider, Row, Table } from \"antd\";\r\n\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabDetalheAutorCte({ autores, listaAutor }) {\r\n const [listaAutores, setListarAutores] = useState([]);\r\n\r\n useEffect(() => {\r\n if (autores) {\r\n let listaTemp = autores.map((item, index) => ({\r\n ...item,\r\n key: index\r\n }));\r\n\r\n setListarAutores(listaTemp);\r\n }\r\n }, [])\r\n\r\n function retornaDescricaoAutor(cta_tiporautor) {\r\n if (!!listaAutor) {\r\n let autor = listaAutor.filter((aut) => (aut.key === cta_tiporautor))[0];\r\n return !!autor ? autor.value : \"\";\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n {retornaDescricaoAutor(cta_tiporautor)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Razão Social',\r\n render: ({ cta_razaosocial }) => (\r\n
\r\n {cta_razaosocial}\r\n
\r\n )\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n render: ({ cta_cnpjcpf }) => (\r\n
\r\n {MaskFormat(cta_cnpjcpf, 'Não Informado', true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Insc. Estadual',\r\n align: 'center',\r\n render: ({ cta_inscricaoestadual }) => (\r\n
\r\n {cta_inscricaoestadual || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Telefone',\r\n align: 'center',\r\n render: ({ cta_telefone }) => (\r\n
\r\n {FormatFone(cta_telefone) || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Email',\r\n align: 'center',\r\n render: ({ cta_email }) => (\r\n
\r\n {cta_email || 'Não Informado'}\r\n
\r\n )\r\n },\r\n ]\r\n }\r\n expandable={{\r\n expandedRowRender: (record) => (\r\n
\r\n \r\n
\r\n Logradouro: {record.cta_Logradouro || 'Não Informado'} ,\r\n \r\n \r\n Número: {record.cta_numero || 'Não Informado'} ,\r\n \r\n \r\n Bairro: {record.cta_bairro || 'Não Informado'} ,\r\n \r\n \r\n Complemento: {record.cta_complemento || 'Não Informado'}\r\n \r\n \r\n \r\n ),\r\n }}\r\n pagination={false}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Não há Dados\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Descriptions, Divider, Form, Row, Table, Tabs } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { TabDetalheAutorCte, TabDetalheDocsCte } from './tabPage';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function DetalheCte({ dadosModal, listaTipoCte, listaTomador, listaModal }) {\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaTipoServico, setListaTipoServico] = useState([]);\r\n const [listaSerieFiscal, setListaSerieFiscal] = useState([]);\r\n const [listaUnidade, setListaUnidade] = useState([]);\r\n const [listaComponentes, setListaComponentes] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [])\r\n\r\n function carregarDados() {\r\n api.get(`SerieFiscal/Listar?SomenteAtivos=true&pageSize=1000`).then(\r\n res => {\r\n let retorno = res.data.items;\r\n setListaSerieFiscal(retorno);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get(`ComponentesFrete/Listar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaComponentes(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get('Enum/Listar?nome=tpServ').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaTipoServico(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get(`Enum/Listar?nome=cUnid`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaUnidade(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function retornaDescricaoTipoCte(cte_tipocte) {\r\n if (!!listaTipoCte) {\r\n let tipo = listaTipoCte.filter((tipo) => (tipo.key === cte_tipocte))[0];\r\n return !!tipo ? tipo.value : \"\";\r\n }\r\n }\r\n\r\n function retornaDescricaoTomador(cte_tomador) {\r\n if (!!listaTomador) {\r\n let tomador = listaTomador.filter((toma) => (toma.key === cte_tomador))[0];\r\n return !!tomador ? tomador.value : \"\";\r\n }\r\n }\r\n\r\n function retornaDescricaoModal(cte_modal) {\r\n if (!!listaModal) {\r\n let modal = listaModal.filter((modal) => (modal.key === cte_modal))[0];\r\n return !!modal ? modal.value : \"\";\r\n }\r\n }\r\n\r\n function retornaDescricaoTipoServico(cte_tiposervico) {\r\n if (!!listaTipoServico) {\r\n let servico = listaTipoServico.filter((serv) => (serv.key === cte_tiposervico))[0];\r\n return !!servico ? servico.value : \"\";\r\n }\r\n }\r\n\r\n function retornaUnidade(cic_cunit) {\r\n if (!!listaUnidade) {\r\n let unid = listaUnidade.filter((unid) => (unid.key === cic_cunit))[0];\r\n return !!unid ? unid.value : \"\";\r\n }\r\n }\r\n\r\n function retornaComponente(cmf_id) {\r\n if (!!listaComponentes) {\r\n let comp = listaComponentes.filter((comp) => (comp.cmf_id === cmf_id))[0];\r\n return !!comp ? comp.cmf_descricao : \"\";\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoTipoCte(dadosModal.cte_tipocte)} \r\n \r\n \r\n {retornaDescricaoTipoServico(dadosModal.cte_tiposervico)} \r\n \r\n \r\n {retornaDescricaoModal(dadosModal.cte_modal)} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.cte_indglobalizado === 1 ? 'Sim' : 'Não'} \r\n \r\n \r\n {retornaDescricaoTomador(dadosModal.cte_tomador)} \r\n \r\n \r\n {dadosModal.cte_prodpredominante} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.descricao_muninicio + \" - \" + dadosModal.sigla_ufinicio} \r\n \r\n \r\n {dadosModal.descricao_munenvio + \" - \" + dadosModal.sigla_ufenvio} \r\n \r\n \r\n {dadosModal.descricao_munfinal + \" - \" + dadosModal.sigla_uffinal} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.cte_observacao ?? \"Não Informado\"} \r\n \r\n \r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n {retornaUnidade(cic_cunit)}\r\n )\r\n },\r\n {\r\n title: 'Tipo de Medida',\r\n align: 'center',\r\n render: ({ cic_tipomedida }) => (\r\n {cic_tipomedida}\r\n )\r\n },\r\n {\r\n title: 'Quantidade',\r\n align: 'center',\r\n render: ({ cic_qntcarga }) => (\r\n {cic_qntcarga}\r\n )\r\n },\r\n ]\r\n } pagination={false}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Não há Dados\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n \r\n
\r\n
(\r\n {retornaComponente(cmf_id)}\r\n )\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'center',\r\n render: ({ ccf_valor }) => (\r\n R$ {FormatNumber(ccf_valor, true)}\r\n )\r\n }\r\n ]\r\n } pagination={false}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Não há Dados\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Modal } from \"antd\";\r\n\r\nimport DetalheCte from \"../../detalheCte\";\r\n\r\nexport default function ModalDetalhesCte({ exibirModal, fecharModal, dadosModal, listaTipoCte, listaTomador, listaModal }) {\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Collapse, Dropdown, Form, Input, Menu, Row, Select, Tag } from \"antd\";\r\n\r\nimport { BreadcrumbPage, ComboData, Data, EmitirConhecimento, TabelaDados, Editar } from \"../../components\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, CloseOutlined, EyeOutlined, MoreOutlined, EditOutlined, CloudUploadOutlined, PlusOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport moment from \"moment\";\r\nimport DrawerConhecimentoTransporte from \"./drawer\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport api from \"../../services/api\";\r\nimport ModalDetalhesCte from \"../../components/modals/modalDetalhesCte\";\r\nimport {ModalReenviarSefaz } from \"../../components/modals/\";\r\n\r\nexport default function ConhecimentoDeTransporte({ }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [formParam] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n const [openDetalhesCte, setOpenDetalhesCte] = useState(false);\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n const [listaTipoCte, setListaTipoCte] = useState([]);\r\n const [listaTomador, setListaTomador] = useState([]);\r\n const [listaModal, setListaModal] = useState([]);\r\n const [dadosDetalhesCte, setDadosDetalhesCte] = useState({});\r\n const [dadosCte, setDadosCte] = useState({});\r\n const [openModalReenviarSefaz, setModalReenviarSefaz] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n }\r\n\r\n useEffect(() => {\r\n filtrosAvancados();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n carregarDados();\r\n }, [])\r\n\r\n function filtrosAvancados(value) {\r\n let sql = \"\";\r\n sql += !!formParam.getFieldValue().status ? `&StatusNFe=${formParam.getFieldValue().status}` : \"\";\r\n sql += !!form.getFieldValue().dataInicial ? `&DataInicial=${moment(form.getFieldValue().dataInicial).format('YYYY-MM-DD')}` : `&dataInicial=${moment(new Date()).format('YYYY-MM-DD')}`;\r\n sql += !!form.getFieldValue().dataFinal ? `&DataFinal=${moment(form.getFieldValue().dataFinal).format('YYYY-MM-DD')}` : `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: `${!!value ? value : !!formParam.getFieldValue().filtroPor ? formParam.getFieldValue().filtroPor : ''}${sql}`, pagina: 1 } });\r\n };\r\n\r\n function carregarDados() {\r\n retornaStatusNF();\r\n retornaTipoCte();\r\n retornaTomador();\r\n retornaModal();\r\n }\r\n\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function retornaTipoCte() {\r\n api.get('Enum/Listar?nome=tpCTe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaTipoCte(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function retornaTomador() {\r\n api.get('Enum/Listar?nome=toma').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaTomador(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function retornaModal() {\r\n api.get('Enum/Listar?nome=modal').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaModal(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!listaStatusNota) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n\r\n function retornaDescricaoTipoCte(cte_tipocte) {\r\n if (!!listaTipoCte) {\r\n let tipo = listaTipoCte.filter((tipo) => (tipo.key === cte_tipocte))[0];\r\n return !!tipo ? tipo.value : \"\";\r\n }\r\n }\r\n\r\n function retornaDescricaoTomador(cte_tomador) {\r\n if (!!listaTomador) {\r\n let tomador = listaTomador.filter((toma) => (toma.key === cte_tomador))[0];\r\n return !!tomador ? tomador.value : \"\";\r\n }\r\n }\r\n\r\n function retornaDescricaoModal(cte_modal) {\r\n if (!!listaModal) {\r\n let modal = listaModal.filter((modal) => (modal.key === cte_modal))[0];\r\n return !!modal ? modal.value : \"\";\r\n }\r\n }\r\n\r\n function editarCte(record) {\r\n if (record.ntf_tiponota === 3) {\r\n let dados = { ...record };\r\n dados.ntf_dataemissao = moment(dados.ntf_dataemissao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: true } });\r\n } else {\r\n api.get(`ConhecimentoTransporte/BuscarNotaFiscalCte/${record.ntf_id}`).then(\r\n res => {\r\n let dados = res.data;\r\n dados.ntf_dataemissao = moment(dados.ntf_dataemissao);\r\n dados.ntf_datainclusao = moment(dados.ntf_datainclusao);\r\n dados.ntf_dhsaient = moment(dados.ntf_dhsaient);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function recarregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n {((record.ntf_status == 0 || record.ntf_status == 4) && record.ntf_finalidade != 4 && record.ntf_nroinutilizadosefaz == false) &&\r\n \r\n } onClick={() => {\r\n editarCte(record)\r\n }}> Editar\r\n \r\n }\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n \r\n }\r\n \r\n )\r\n // return (\r\n // \r\n // {((record.ntf_status == 0 || record.ntf_status == 4) && record.ntf_finalidade != 4 && record.ntf_nroinutilizadosefaz == false) &&\r\n // \r\n // } onClick={() => {\r\n // editarNota(record)\r\n // }}> Editar\r\n // \r\n // }\r\n // {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n // \r\n // }\r\n // {record.ntf_status === 0 && record.ntf_docfiscal === false &&\r\n // \r\n // \r\n // }\r\n // {(record.ntf_status === 1 && (record.ser_emitentedocumento === 0 || !!!record.ntf_docfiscal)) &&\r\n // \r\n // } onClick={() => abrirCancelarNota(record)}>\r\n // Cancelar/Estornar\r\n // \r\n // }\r\n // {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n // \r\n // \r\n // }\r\n // {record.ntf_status === 1 && record.ntf_docfiscal === true && record.ntf_tiponota === 1 &&\r\n // \r\n // \r\n // }\r\n // {record.ntf_status === 1 && record.ntf_docfiscal === true && record.ser_emitentedocumento === 0 &&\r\n // \r\n // \r\n // }\r\n // {(record.ntf_status === 1 && record.ntf_finalidade != 4) &&\r\n // \r\n // \r\n // }\r\n // {record.ntf_status === 1 && record.ntf_docfiscal === true &&\r\n // \r\n // \r\n // }\r\n // {(record.ntf_status === 1 && record.ntf_tiponota == 1) &&\r\n // \r\n // \r\n // }\r\n // {record.ntf_status === 1 && (record.ntf_tiponota === 1 || record.ntf_tiponota === 2) && record.ser_emitentedocumento === 1 &&\r\n // \r\n // \r\n // }\r\n // {record.ntf_status === 1 && record.ntf_docfiscal === true &&\r\n // \r\n // \r\n // }\r\n // \r\n // )\r\n \r\n };\r\n\r\n function menuTableOutros(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n function inutilizarCte(dados) {\r\n setDadosCte(dados);\r\n //setExibirModalInutilizar(true);\r\n };\r\n\r\n function autorizarCte(record) {\r\n debugger\r\n setDadosCte(record);\r\n setModalReenviarSefaz(true);\r\n };\r\n\r\n async function visualizarCte(record) {\r\n if (record.cte_id) {\r\n await api.get(`ConhecimentoTransporte/BuscarNotaFiscalCte/${record.ntf_id}`).then(\r\n res => {\r\n let retorno = res.data;\r\n setDadosDetalhesCte({ ...retorno, ...record });\r\n setOpenDetalhesCte(true);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: false } });\r\n }} icon={}>\r\n EMITIR\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n filtrosAvancados(valor)} allowClear />\r\n \r\n \r\n \r\n {\r\n form.setFieldsValue({ DataFinal: moment(new Date()) });\r\n form.setFieldsValue({ DataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n filtrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n filtrosAvancados()}\r\n mode=\"multiple\"\r\n placeholder=\"Status CTe\"\r\n >\r\n {listaStatusNota.map((statusNota) => (\r\n {statusNota.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n filtrosAvancados()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {ntf_numero}\r\n
\r\n )\r\n },\r\n {\r\n title: '',\r\n width: 170,\r\n render: ({ ntf_status, tip_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n {tip_descricao}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tipo',\r\n width: 70,\r\n align: 'center',\r\n render: ({ cte_tipocte }) => (\r\n
\r\n {retornaDescricaoTipoCte(cte_tipocte)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Modal',\r\n width: 100,\r\n align: 'center',\r\n render: ({ cte_modal }) => (\r\n
\r\n {retornaDescricaoModal(cte_modal)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 90,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tomador',\r\n width: 300,\r\n render: ({ cte_tomador, cta_razaosocial }) => (\r\n
\r\n {cta_razaosocial} ({retornaDescricaoTomador(cte_tomador)})\r\n
\r\n )\r\n },\r\n {\r\n title: 'Município Envio',\r\n width: 200,\r\n render: ({ descricao_munenvio, sigla_ufenvio }) => (\r\n
\r\n {descricao_munenvio + \" - \" + sigla_ufenvio}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Município Final',\r\n width: 200,\r\n render: ({ descricao_munfinal, sigla_uffinal }) => (\r\n
\r\n {descricao_munfinal + \" - \" + sigla_uffinal}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n )\r\n\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n } onClick={() => {modalDuplicarDados(dados)}}/>\r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record }});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true }});\r\n }} icon={}/>\r\n \r\n \r\n } onClick={() => {modalExcluir(dados.gru_id)}} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n \r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerSubGrupo from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function SubGrupo() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+sgp_nome' } }), []);\r\n\r\n function excluirRegistro(id) {\r\n api.delete(`SubGrupo/Excluir/${id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+sgp_nome' } });\r\n });\r\n }\r\n\r\n function editar(record) {\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n \r\n return (\r\n
\r\n \r\n \r\n\r\n
\r\n (\r\n \r\n \r\n {sgp_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Subgrupos de Produtos',\r\n render: ({ sgp_nome }) => (\r\n
\r\n {sgp_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Grupo',\r\n width: '50%',\r\n render: ({ grupo }) => (\r\n
\r\n {grupo?.gru_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n editar(record)\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluir(record.sgp_id) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n\r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Input, Select, notification } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPercentual, InputPreco, SelectPaginacao, SelectPaginado } from \"../../components\";\r\nimport { selectPaginadoActions, manutencaoActions } from \"../../actions\";\r\nimport { getRegimeTributario } from \"../../services/auth\";\r\nimport { debounce } from \"@material-ui/core\";\r\n\r\nexport default function TabProdutoTributacao({ formulario }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaCest, setListaCest] = useState([]);\r\n const [regimeTrib, setRegimeTrib] = useState(parseInt(getRegimeTributario()));\r\n const [listaCstOrigem, setListaCstOrigem] = useState([]);\r\n const [hiddenFci, setHiddenFci] = useState(true);\r\n const [showGas, setShowGas] = useState(false);\r\n const [listaAnp, setlistaAnp] = useState([]);\r\n const [listaTipoProdutosSped, setListaTipoProdutoSped] = useState([]);\r\n const [listaNcm, setListaNcm] = useState([]);\r\n\r\n useEffect(() => carregarDados(), []);\r\n\r\n useEffect(() => {\r\n if (listaTipoProdutosSped.length > 0) {\r\n if (!!!formulario.getFieldValue().tpi_id) {\r\n formulario.setFieldsValue({ tpi_id: listaTipoProdutosSped[0].tpi_id });\r\n }\r\n }\r\n }, [listaTipoProdutosSped])\r\n\r\n function carregarDados() {\r\n if (!!manutencao.dados?.ncm_codigo) {\r\n api.get(`produto/BuscarCest?CodigoNcm=${manutencao.dados.ncm_codigo}`).then(res => {\r\n if (res.status === 200) setListaCest(res.data);\r\n }).catch((erro) => console.error(erro));\r\n }\r\n\r\n api.get(`CstOrigemMercadoria/ListarTodos`).then(res => {\r\n if (res.status === 200) {\r\n setListaCstOrigem(res.data);\r\n if (!!manutencao.dados?.orm_id) {\r\n let number = parseInt(manutencao.dados.orm_id)\r\n formulario.setFieldsValue({ orm_id: res.data[number].orm_id });\r\n } else {\r\n formulario.setFieldsValue({ orm_id: res.data[0].orm_id });\r\n }\r\n checkMarcadores();\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`tipoprodutosped/listar`).then(res => {\r\n if (!!formulario.getFieldValue().tpi_id && res.data.length > 0 && !res.data?.find((tp) => { return tp.tpi_id === formulario.getFieldValue().tpi_id })) {\r\n formulario.setFieldsValue({ tpi_id: null });\r\n }\r\n setListaTipoProdutoSped(res.data);\r\n\r\n }).catch((erro) => console.error(erro));\r\n\r\n let lista = [];\r\n if (!!manutencao.dados?.ncm_id)\r\n lista.push({ name: \"ncm_id\", campo: \"IdNcm\", value: manutencao.dados?.ncm_id });\r\n\r\n if (!!manutencao.dados?.icm_id)\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: manutencao.dados?.icm_id })\r\n\r\n if (!!manutencao.dados?.pis_id)\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: manutencao.dados?.pis_id });\r\n\r\n if (!!manutencao.dados?.anp_id) {\r\n lista.push({ name: \"anp_id\", campo: \"IdAnp\", value: manutencao.dados?.anp_id });\r\n if (manutencao.dados?.anp_codigo === 210203001)\r\n setShowGas(true);\r\n }\r\n if (!!manutencao.dados?.cbf_id && regimeTrib === 3)\r\n lista.push({ name: \"cbf_id\", campo: \"Id\", value: manutencao.dados?.cbf_id });\r\n\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n };\r\n\r\n\r\n function checkMarcadores() {\r\n if (formulario.getFieldValue(['orm_id']) == 0 || formulario.getFieldValue(['orm_id']) == 4)\r\n setHiddenFci(true);\r\n else\r\n setHiddenFci(false);\r\n };\r\n function checkAnp(anp) {\r\n // conforme NT\r\n if (!!anp && anp.anp_codigo === 210203001) {\r\n formulario.setFieldsValue({ anp_codigo: anp.anp_codigo });\r\n setShowGas(true);\r\n }\r\n else {\r\n if (anp)\r\n formulario.setFieldsValue({ anp_codigo: anp.anp_codigo });\r\n else\r\n formulario.setFieldsValue({ anp_codigo: null });\r\n setShowGas(false);\r\n }\r\n };\r\n\r\n\r\n function buscarCest(ncm) {\r\n if (listaNcm.length > 0) {\r\n let _lista = [...listaNcm]\r\n if (!!formulario.getFieldValue().ncm_id) {\r\n let ncm = _lista.find(c => c.ncm_id == formulario.getFieldValue().ncm_id)\r\n formulario.setFieldsValue({ ncm_ativo: ncm.ncm_ativo });\r\n console.log(ncm);\r\n if (ncm.ncm_ativo === false)\r\n notification.warn({ message: 'Atenção', description: \"NCM está inativo na base de dados do SEFAZ! Certifique-se de que o NCM que você está usando está correto na aba Dados Tributários\" });\r\n }\r\n }\r\n if (!!ncm) {\r\n api.get(`produto/BuscarCest?IdNcm=${ncm}`).then(res => {\r\n if (res.status === 200) setListaCest(res.data);\r\n formulario.setFieldsValue({ cen_id: null });\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n\r\n const onFinish = values => {\r\n console.log('values trib', values);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados Tributários\r\n \r\n \r\n Defina as Tributações do Produto.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaTipoProdutosSped.map((tp) => ({tp.tpi_id} - {tp.tpi_descricao} ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCstOrigem.map((ori) => ({ori.orm_id} - {ori.orm_descricao}))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n buscarCest(ncm)} onChangeFunction={(ncm) => buscarCest(ncm)}\r\n conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})}\r\n />\r\n \r\n \r\n prevValues.hiddenCest !== currentValues.hiddenCest}>\r\n {listaCest.length > 0 &&\r\n \r\n 0 ? [{ required: true, message: 'Selecione a Classificação do CEST' }] : null}>\r\n { return { label: `${cest.cet_id} - ${cest.cet_descricao}`, value: cest.cen_id } })}>\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n ({icms.icm_id} - {icms.icm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n ({pis.pis_id} - {pis.pis_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n checkAnp(listaAnp.find(l => l.anp_id == anp));\r\n }}\r\n onClearFunction={(anp) => checkAnp(anp)}\r\n placeholder=\"Selecione o Código ANP(Caso For combustível)\"\r\n conteudo={\r\n anp => ({anp.anp_codigo} - {anp.anp_descricao})\r\n }\r\n />\r\n \r\n \r\n {regimeTrib === 3 && \r\n \r\n ({v.cbf_codigo} - {v.cbf_descricao} )\r\n } />\r\n \r\n }\r\n {showGas && <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Form, Tag, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { ModalListaPreco } from \"../../components/modals/\";\r\n\r\nexport default function TabListaPreco({ listaDePrecos, setListaDePrecos, listaPrecoExclusao }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [openModal, setOpenModal] = useState(false);\r\n\r\n const modalConfirmaExclusao = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir a lista de preço ${record.ltp_id}-${record.ltp_nome} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeLista(record);\r\n }\r\n });\r\n };\r\n\r\n const removeLista = (record) => {\r\n let ltp_id = record.ltp_id;\r\n const newData = [...listaDePrecos];\r\n const index = newData.findIndex((item) => record.key === item.key);\r\n let listaExclusao = [...listaPrecoExclusao.listaPrecoExclusao];\r\n if (!!ltp_id){\r\n listaExclusao.push(newData.find(i => i.ltp_id === ltp_id));\r\n listaPrecoExclusao.setListaPrecoExclusao(listaExclusao);\r\n } \r\n newData.splice(index, 1);\r\n setListaDePrecos(newData.map((x, idx) => ({ key: idx, ...x })));\r\n };\r\n\r\n const editarLista = (record, indice) => {\r\n form.setFieldsValue(record);\r\n setOpenModal(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Demais Demais Listas de Preços Deste Produto\r\n \r\n Demais Listas de Preços deste Produto. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{return !lista.ltp_principal})} columns={[\r\n {\r\n title: 'Código',\r\n width: 75,\r\n align: 'center',\r\n render: ({ ltp_id }) => (\r\n \r\n {ltp_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição da Lista de Preço',\r\n render: ({ ltp_nome }) => (\r\n {ltp_nome}\r\n ),\r\n },\r\n\r\n {\r\n title: 'Valor (R$)',\r\n editable: true,\r\n align: 'right',\r\n render: ({ lpi_valorvenda }) => (\r\n
\r\n {FormatNumber(lpi_valorvenda, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{x: 900}}/>\r\n \r\n \r\n setOpenModal(false)} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Checkbox, Select, Button, Tag, Popover, Table, Upload, Input, InputNumber, Modal, Collapse } from \"antd\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { PlusOutlined, AppstoreOutlined, FileImageOutlined, DeleteOutlined, DownloadOutlined, CheckOutlined, ExclamationCircleOutlined, SyncOutlined, SearchOutlined, EyeOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { arredonda, info, validarEan } from \"../../services/funcoes\";\r\n\r\nexport default function TabGrade({ gerarEANProduto, formulario, formGrade, listaDeGrades, setListaDeGrades }) {\r\n\r\n const [{ ui, manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [listaModalidadesGrades, setModalidadesGrades] = useState([]);\r\n const [listaModalidadeItens, setListaModalidadeItens] = useState([]);\r\n const [criarGrade, setCriarGrade] = useState(false);\r\n const [openModalImgGrade, setOpenModalImgGrade] = useState(false);\r\n const [dadosImgGrade, setDadosImgGrade] = useState([]);\r\n const [detalhesModalImg, setDetalhesModalImg] = useState({});\r\n const [itensGradeSelecionados, setItensGradeSelecionados] = useState([]);\r\n const [modalidadesAdicionadas, setModalidadesAdicionadas] = useState([]);\r\n const [previewImage, setPreviewImage] = useState(\"\");\r\n const [previewVisible, setPreviewVisible] = useState(false);\r\n const inputPesquisa = React.createRef();\r\n const [open, setOpen] = useState(false);\r\n useEffect(() => carregarDados(), []);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n useEffect(() => {\r\n if (open) {\r\n setTimeout(() => {\r\n if (!!inputPesquisa && !!inputPesquisa.current) {\r\n inputPesquisa.current.focus();\r\n }\r\n }, 200);\r\n }\r\n }, [open]);\r\n\r\n function carregarDados() {\r\n api.get(`ModalidadeGrade/ListarModalidade?PageSize=500`).then(res => {\r\n if (res.status === 200) setModalidadesGrades(res.data.items);\r\n }).catch((erro) => console.error(erro));\r\n };\r\n\r\n useEffect(() => {\r\n setItensGradeSelecionados([]);\r\n setModalidadesAdicionadas([]);\r\n }, [manutencao.dados]);\r\n\r\n function atualizarFormGrade(listaGrades = [...listaDeGrades]) {\r\n formGrade.resetFields();\r\n listaGrades.forEach((item, indice) => {\r\n item.key = indice + 1;\r\n formGrade.setFieldsValue({\r\n ['prg_ean' + item.key]: item.prg_ean,\r\n ['pre_custoultimacompra' + item.key]: (!!item.pre_custoultimacompra ? arredonda(item.pre_custoultimacompra, 2) : null),\r\n ['prg_markup' + item.key]: (!!item.prg_markup ? arredonda(item.prg_markup, 2) : null),\r\n ['lpi_valorvenda' + item.key]: (!!item.lpi_valorvenda ? arredonda(item.lpi_valorvenda, 2) : null),\r\n ['prg_codigoetiqueta' + item.key]: item.prg_codigoetiqueta\r\n });\r\n });\r\n setListaDeGrades(listaGrades);\r\n };\r\n\r\n function buscarModalidadeItem(modalidade) {\r\n if (modalidade) {\r\n api.get(`ModalidadeGrade/BuscarModalidade/${modalidade}`).then(res => {\r\n if (res.status === 200) {\r\n setListaModalidadeItens(res.data.map((x, idx) => ({ filtrado: true, checked: false, ...x })));\r\n }\r\n }).catch((error) => console.error(error));\r\n } else {\r\n setListaModalidadeItens([]);\r\n }\r\n setItensGradeSelecionados([]);\r\n };\r\n\r\n function abrirModalImgGrade(record) {\r\n let detalhesModal = {};\r\n let dadosImg = [];\r\n detalhesModal.descricao = '';\r\n detalhesModal.key = record.key;\r\n record.modalidadesgrade.forEach((atributo, indice) => {\r\n detalhesModal.descricao += atributo.mgp_descricao + (indice + 1 === record.modalidadesgrade.length ? '' : ' / ');\r\n });\r\n setDetalhesModalImg(detalhesModal);\r\n if (record.imagens.length === 0) {\r\n setDadosImgGrade(dadosImg);\r\n } else {\r\n record.imagens.forEach((img, indice) => {\r\n dadosImg.push({ uid: indice + 1, url: (!!img.url ? img.url : img.conteudoImagem), principal: img.principal });\r\n if (indice + 1 === record.imagens.length) {\r\n setDadosImgGrade(dadosImg);\r\n }\r\n });\r\n }\r\n setOpenModalImgGrade(true);\r\n };\r\n\r\n const onChange = ({ fileList: newFileList }) => {\r\n setDadosImgGrade(newFileList);\r\n };\r\n\r\n function getBase64(file) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n }\r\n\r\n const handlePreview = async file => {\r\n if (!file.url && !file.preview) {\r\n file.preview = await getBase64(file.originFileObj);\r\n }\r\n setPreviewImage(file.url || file.preview);\r\n setPreviewVisible(true);\r\n };\r\n\r\n function salvarDadosImgGrade() {\r\n let dadosGrade = [...listaDeGrades];\r\n let grade = dadosGrade.filter((item) => { return item.key === detalhesModalImg.key })[0];\r\n grade.imagens = [];\r\n if (dadosImgGrade.length === 0) {\r\n setListaDeGrades(dadosGrade);\r\n } else {\r\n dadosImgGrade.forEach((img, indice) => {\r\n let imgTemp = img;\r\n if (!(!!imgTemp.url)) {\r\n imgTemp.url = imgTemp.thumbUrl;\r\n }\r\n if (!(!!imgTemp.principal)) {\r\n imgTemp.principal = false;\r\n }\r\n grade.imagens.push(imgTemp);\r\n if (indice + 1 === dadosImgGrade.length) {\r\n setListaDeGrades(dadosGrade);\r\n }\r\n });\r\n }\r\n setOpenModalImgGrade(false);\r\n };\r\n\r\n function calcularValorVendaPorMarkup(key) {\r\n let valorVenda = retornaPrecoPorMarkup(formGrade.getFieldValue(['pre_custoultimacompra' + key]), formGrade.getFieldValue(['prg_markup' + key]));\r\n formGrade.setFieldsValue({ ['lpi_valorvenda' + key]: valorVenda });\r\n };\r\n\r\n function retornaPrecoPorMarkup(custo, markup) {\r\n if (parseFloat(custo) > 0 && parseFloat(markup) > 0) return (parseFloat(custo) * parseFloat(markup)).toFixed(2);\r\n else return null;\r\n };\r\n\r\n function recalcularMarkupDoProduto(key) {\r\n if (parseFloat(formGrade.getFieldValue(['pre_custoultimacompra' + key])) > 0 && parseFloat(formGrade.getFieldValue(['lpi_valorvenda' + key])) > 0) {\r\n let markupCalculado = (parseFloat(formGrade.getFieldValue(['lpi_valorvenda' + key])) / parseFloat(formGrade.getFieldValue(['pre_custoultimacompra' + key]))).toFixed(2);\r\n formGrade.setFieldsValue({ ['prg_markup' + key]: markupCalculado })\r\n } else {\r\n formGrade.setFieldsValue({ ['prg_markup' + key]: parametrosEmpresa.markupProduto });\r\n }\r\n };\r\n\r\n function verificaEanExiste(key) {\r\n let ean = formGrade.getFieldValue(['prg_ean' + key]);\r\n if (!!ean) {\r\n let produto = (!!formulario.getFieldValue('pro_id') ? `&IdProduto=${formulario.getFieldValue('pro_id')}` : '');\r\n api.get(`Produto/verificaEanExistente?CodigoEan=${ean}${produto}`).then(res => {\r\n if (res.status === 200) {\r\n if (!!res.data && res.data.existe == true) {\r\n info(\"Este EAN já existe em outro produto!\", \"EAN já informado!\");\r\n formGrade.setFieldsValue({ ['prg_ean' + key]: null });\r\n } else {\r\n for (let campo in formGrade.getFieldsValue()) {\r\n if (formGrade.getFieldsValue()[campo] === ean && campo !== ('prg_ean' + key)) {\r\n info(\"Este EAN já existe em outro produto!\", \"EAN já informado!\");\r\n formGrade.setFieldsValue({ ['prg_ean' + key]: null });\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n validaEanGrade();\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n function validaEanGrade() {\r\n let key = 0;\r\n for (let campo in listaDeGrades) {\r\n key++;\r\n let codEan = formGrade.getFieldValue(['prg_ean' + key]);\r\n if (codEan !== \"\") {\r\n if (codEan.startsWith(\"7\") && codEan.length === 13)\r\n formulario.setFieldsValue({ pro_eaninvalido: false });\r\n else {\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n break\r\n }\r\n }\r\n }\r\n }\r\n\r\n const modalExcluirGrade = (grade) => {\r\n Modal.confirm({\r\n title: 'Remover Grade do Produto?',\r\n icon: ,\r\n content: `Você deseja realmente remover esta grade do produto?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirGrade(grade);\r\n }\r\n });\r\n };\r\n\r\n function excluirGrade(grade) {\r\n if (!!grade.prg_id) {\r\n api.delete(`ProdutoGrade/ExcluirGrade/${grade.prg_id}`).then((res) => {\r\n if (res.data) {\r\n Modal.success({\r\n content: 'A Grade do produto foi removida com sucesso!',\r\n });\r\n atualizarGrade();\r\n } else {\r\n modalInativarGrade(grade.prg_id);\r\n }\r\n }, (erro) => {\r\n modalInativarGrade(grade.prg_id);\r\n });\r\n } else {\r\n let listaGrades = [...listaDeGrades];\r\n let index = listaGrades.findIndex(i => i.key === grade.key);\r\n listaGrades.splice(index, 1);\r\n listaGrades.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n setListaDeGrades(listaGrades);\r\n\r\n Modal.success({\r\n content: 'A Grade do produto foi removida com sucesso!',\r\n });\r\n atualizarFormGrade(listaGrades);\r\n }\r\n };\r\n\r\n const modalInativarGrade = (codigoGrade) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir a grade!',\r\n icon: ,\r\n content: `A Grade deve conter referências com outros registros!`,\r\n okText: 'Inativar registro',\r\n cancelText: 'Não fazer nada',\r\n centered: true,\r\n onOk() {\r\n ativarInativarItemGrade(codigoGrade, false);\r\n }\r\n });\r\n\r\n };\r\n\r\n function ativarInativarItemGrade(codigoGrade, status) {\r\n api.put(`ProdutoGrade/ativarInativar?codigoGrade=${codigoGrade}&status=${status}`).then(\r\n (res) => {\r\n Modal.success({\r\n content: `A Grade do produto foi ${status ? 'ativada' : 'inativada'} com sucesso!`,\r\n });\r\n validarGrade();\r\n atualizarGrade();\r\n }\r\n ).catch(\r\n (erro) => {\r\n error(`Não foi possivel ${status ? 'ativar' : 'inativar'} item da grade!`);\r\n }\r\n );\r\n };\r\n\r\n function validarGrade() {\r\n api.put(`ProdutoGrade/VerificarProdutoPossuiGradeAtiva?IdProduto=${formulario.getFieldsValue().pro_id}`).then(\r\n res => {\r\n formulario.setFieldsValue({ pro_ativo: res.data });\r\n if (res.data == false) {\r\n api.put(`produto/AtivarInativar?IdProduto=${formulario.getFieldsValue().pro_id}&Ativo=false`).then((res) => {\r\n })\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n\r\n function atualizarGrade() {\r\n api.get(`produto/ListarGrades?IdProduto=${formulario.getFieldsValue().pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n let lista = res.data;\r\n if (lista.length > 0) {\r\n lista.forEach((grade, index) => {\r\n grade.key = index + 1;\r\n });\r\n }\r\n setListaDeGrades(lista);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n };\r\n\r\n function adicionaGradeProduto() {\r\n if (itensGradeSelecionados.length > 0) {\r\n let listaTemp = [...modalidadesAdicionadas];\r\n let modalidade = listaModalidadesGrades.filter((item) => { return item.mgp_id === formGrade.getFieldValue('mgp_id') })[0];\r\n if (modalidadesAdicionadas.filter((modalidade) => { return modalidade.mgp_id === formGrade.getFieldValue('mgp_id') }).length > 0) {\r\n info(\"A Grade '\" + modalidade.mgp_descricao + \"' já está adicionada ao produto.\", \"Grade já adicionada!\");\r\n } else {\r\n let itens = [];\r\n listaModalidadeItens.map((item) => {\r\n if (itensGradeSelecionados.indexOf(item.mgp_id.toString()) >= 0) {\r\n itens.push(item);\r\n }\r\n });\r\n listaTemp.push({ mgp_id: modalidade.mgp_id, mgp_descricao: modalidade.mgp_descricao, itensGrade: itens });\r\n listaTemp.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n\r\n setModalidadesAdicionadas(listaTemp);\r\n formGrade.setFieldsValue({ mgp_id: undefined });\r\n }\r\n } else {\r\n info(\"Para adicionar a grade ao produto você deve selecionar ao menos um item de grade.\", \"Selecione ao menos um Item da Grade!\");\r\n }\r\n };\r\n\r\n function excluirModalidade(itemGrade) {\r\n Modal.confirm({\r\n title: 'Remover Grade do Produto?',\r\n icon: ,\r\n content: `Você deseja realmente remover a grade ${itemGrade.mgp_descricao} do produto?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let lista = [...modalidadesAdicionadas];\r\n let index = lista.findIndex(i => i.key === itemGrade.key);\r\n lista.splice(index, 1);\r\n lista.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n setModalidadesAdicionadas(lista);\r\n Modal.success({\r\n content: 'A Grade do produto foi removida com sucesso.',\r\n });\r\n }\r\n });\r\n };\r\n\r\n function gerarGrade() {\r\n let listaGrade = [];\r\n let modalidades = [...modalidadesAdicionadas];\r\n let totalModalidadesSelecionadas = modalidades.length;\r\n let posicaoGradeProduto;\r\n if (totalModalidadesSelecionadas > 1) {\r\n let primeiraModalidade = modalidades.shift();\r\n let totalOcorrencias = 0;\r\n modalidades.forEach((value, key) => {\r\n if (totalOcorrencias === 0) {\r\n totalOcorrencias = value.itensGrade.length;\r\n } else {\r\n totalOcorrencias = totalOcorrencias * value.itensGrade.length;\r\n }\r\n });\r\n totalOcorrencias = totalOcorrencias * primeiraModalidade.itensGrade.length;\r\n for (let i = 1; i <= totalOcorrencias; i++) {\r\n listaGrade.push({\r\n prg_ean: '',\r\n prg_codigoetiqueta: '',\r\n pre_custoultimacompra: formulario.getFieldValue().pre_custoultimacompra,\r\n prg_markup: parseFloat(formulario.getFieldValue().pro_markup),\r\n lpi_valorvenda: formulario.getFieldValue().lpi_valorvenda,\r\n pre_qtde: null,\r\n prg_ativa: true,\r\n modalidadesgrade: [],\r\n imagens: []\r\n });\r\n }\r\n posicaoGradeProduto = 0;\r\n for (let i = 0; i < primeiraModalidade.itensGrade.length; i++) {\r\n let itemModalidade = primeiraModalidade.itensGrade[i];\r\n for (let x = 0; x < (totalOcorrencias / primeiraModalidade.itensGrade.length); x++) {\r\n listaGrade[posicaoGradeProduto].modalidadesgrade.push(itemModalidade);\r\n posicaoGradeProduto++;\r\n }\r\n }\r\n let totalItensGradeAnterior = primeiraModalidade.itensGrade.length;\r\n let totalOcorrenciasGrade = 0;\r\n while (modalidades.length > 1) {\r\n let modalidadeDistribuicao = modalidades.shift();\r\n modalidades.forEach((value, key) => {\r\n if (totalOcorrenciasGrade == 0) {\r\n totalOcorrenciasGrade = value.itensGrade.length;\r\n } else {\r\n totalOcorrenciasGrade = totalOcorrenciasGrade * value.itensGrade.length;\r\n }\r\n });\r\n posicaoGradeProduto = 0;\r\n for (let z = 0; z < totalItensGradeAnterior; z++) {\r\n for (let i = 0; i < modalidadeDistribuicao.itensGrade.length; i++) {\r\n let itemModalidade = modalidadeDistribuicao.itensGrade[i];\r\n for (let x = 0; x < totalOcorrenciasGrade; x++) {\r\n listaGrade[posicaoGradeProduto].modalidadesgrade.push(itemModalidade);\r\n posicaoGradeProduto++;\r\n }\r\n }\r\n }\r\n totalItensGradeAnterior = modalidadeDistribuicao.itensGrade.length;\r\n }\r\n posicaoGradeProduto = 0;\r\n for (let i = 0; i < (totalOcorrencias / modalidades[0].itensGrade.length); i++) {\r\n modalidades[0].itensGrade.forEach((value, key) => {\r\n listaGrade[posicaoGradeProduto].modalidadesgrade.push(value);\r\n posicaoGradeProduto++;\r\n });\r\n }\r\n } else {\r\n modalidades[0].itensGrade.forEach((value, key) => {\r\n listaGrade.push({\r\n prg_ean: '',\r\n prg_codigoetiqueta: '',\r\n pre_custoultimacompra: formulario.getFieldValue().pre_custoultimacompra,\r\n prg_markup: parseFloat(formulario.getFieldValue().pro_markup),\r\n lpi_valorvenda: formulario.getFieldValue().lpi_valorvenda,\r\n pre_qtde: null,\r\n prg_ativa: true,\r\n modalidadesgrade: [value],\r\n imagens: []\r\n });\r\n });\r\n }\r\n\r\n listaDeGrades.forEach((item, indice) => {\r\n listaGrade.push(item);\r\n });\r\n listaGrade.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n setListaDeGrades(listaGrade);\r\n setCriarGrade(false);\r\n setModalidadesAdicionadas([]);\r\n setItensGradeSelecionados([]);\r\n atualizarFormGrade(listaGrade);\r\n };\r\n\r\n function adicionarItensSelecionados(selecionados) {\r\n let listaSel = [];\r\n let listaTemp = [...listaModalidadeItens];\r\n let filtrados = listaTemp.filter((item) => { return item.filtrado });\r\n filtrados.map((item) => {\r\n item.checked = selecionados.indexOf(item.mgp_id.toString()) >= 0;\r\n });\r\n listaTemp.map((item) => {\r\n if (item.checked) {\r\n listaSel.push(item.mgp_id.toString());\r\n }\r\n });\r\n setItensGradeSelecionados(listaSel);\r\n setListaModalidadeItens(listaTemp);\r\n };\r\n\r\n const autoTabProd = (event) => {\r\n if ((event.keyCode === 13 || event.keyCode === 9) || (!!event.which && (event.which === 13 || event.which === 9))) {\r\n if (!!event.target.form) {\r\n let elementos = event.target.form.querySelectorAll('[id^=\"prg_ean\"]');\r\n for (let key in elementos) {\r\n if (!!elementos[key].setAttribute && parseInt(key) >= 0) {\r\n elementos[key].setAttribute('index2', key);\r\n }\r\n }\r\n setTimeout(() => {\r\n let index = parseInt(event.target.getAttribute('index2'));\r\n if (!!elementos[index + 1]) {\r\n elementos[index + 1].focus();\r\n }\r\n }, 100);\r\n }\r\n }\r\n\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados da Grade\r\n \r\n \r\n \r\n {!criarGrade && listaDeGrades.length === 0 &&\r\n \r\n \r\n O recurso de Grades permite o controle dos produtos que podem ser comercializados contendo atributos semelhantes e/ou variáveis. Através deste recurso no sistema, é possível realizar o controle das vendas e estoque levando em consideração características específicas dos produtos, possibilitando a distinção de um mesmo produto através de atributos como cor, tamanho, tipo, voltagem, etc.\r\n Para realizar a configuração dos possíveis atributos vá para a tela de \r\n \r\n Modalidades de Grade de Produtos.\r\n \r\n \r\n \r\n }\r\n {!criarGrade && listaDeGrades.length === 0 &&\r\n \r\n \r\n \r\n }\r\n {listaDeGrades.length > 0 &&\r\n \r\n \r\n {!criarGrade &&\r\n \r\n \r\n \r\n }\r\n {criarGrade &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n }\r\n \r\n {criarGrade &&\r\n
\r\n \r\n
\r\n \r\n {\r\n buscarModalidadeItem(mod);\r\n }}\r\n options={listaModalidadesGrades.map((mod) => { return { label: `${mod.mgp_id} - ${mod.mgp_descricao}`, value: mod.mgp_id } })}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {\r\n if (e.target.checked) {\r\n let lista = [];\r\n listaModalidadeItens.map(item => { lista.push(item.mgp_id.toString()) });\r\n setItensGradeSelecionados(lista);\r\n } else {\r\n setItensGradeSelecionados([]);\r\n }\r\n }} valuePropName=\"checked\"> Selecionar Todos \r\n \r\n \r\n \r\n prevValues.mgp_id !== currentValues.mgp_id}>\r\n {({ getFieldValue }) => {\r\n if (!!getFieldValue('mgp_id') && listaModalidadeItens.length > 0) return (\r\n \r\n \r\n \r\n } onClick={togglePesquisa}>Buscar\r\n }>\r\n \r\n {\r\n let value = e.target.value;\r\n let listaTemp = [...listaModalidadeItens];\r\n listaTemp.map((item) => {\r\n if (!!value) {\r\n item.filtrado = item.mgp_descricao.toLowerCase().indexOf(value.toLowerCase()) >= 0;\r\n } else {\r\n item.filtrado = true;\r\n }\r\n });\r\n setListaModalidadeItens(listaTemp);\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n { adicionarItensSelecionados(lista) }} value={itensGradeSelecionados} options={listaModalidadeItens.filter((item) => { return item.filtrado || !!!formGrade.getFieldValue().pesquisaGrade }).map((mod) => {\r\n return { label: `${mod.mgp_descricao}`, value: `${mod.mgp_id}` }\r\n })} />\r\n \r\n \r\n \r\n );\r\n if (!!getFieldValue('mgp_id') && listaModalidadeItens.length === 0) return (\r\n
\r\n \r\n
\r\n \r\n Não existem itens cadastrados para essa modalidade de grade!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n para cadastrar itens para essa modalidade.\r\n \r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n prevValues.mgp_id !== currentValues.mgp_id}>\r\n {({ getFieldValue }) => {\r\n if (!!getFieldValue('mgp_id') && listaModalidadeItens.length > 0) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n }\r\n {modalidadesAdicionadas.length > 0 &&\r\n
\r\n \r\n
\r\n
\r\n
(\r\n \r\n {key}\r\n \r\n ),\r\n }, {\r\n render: ({ mgp_descricao }) => (\r\n {mgp_descricao}\r\n ),\r\n }, {\r\n render: ({ itensGrade }) => (\r\n itensGrade.map((item) => (\r\n \r\n {item.mgp_descricao}\r\n \r\n ))\r\n ),\r\n }, {\r\n title: '',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 40,\r\n fixed: 'right',\r\n render: (itemGrade) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Adicionar etiquetas automaticamente de acordo com as quantidades de estoque da grade ao salvar o produto?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {listaDeGrades.length > 0 && !criarGrade &&\r\n
\r\n
(\r\n \r\n \r\n {key}\r\n \r\n \r\n ),\r\n }, {\r\n title: 'Itens da Grade',\r\n width: 130,\r\n render: ({ modalidadesgrade }) => (\r\n modalidadesgrade.map((item) => (\r\n \r\n {item.mgp_descricao}\r\n \r\n ))\r\n ),\r\n }, {\r\n title: '',\r\n width: 100,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'EAN/GTIN',\r\n render: ({ prg_ean, key }) => (\r\n \r\n \r\n \r\n verificaEanExiste(key)} />\r\n \r\n \r\n \r\n \r\n Custo:\r\n \r\n \r\n calcularValorVendaPorMarkup(key)} placeholder=\"Informe o custo R$\" name={'pre_custoultimacompra' + key} />\r\n \r\n \r\n \r\n \r\n Markup:\r\n \r\n \r\n calcularValorVendaPorMarkup(key)} cifrao={false} placeholder=\"Informe o Markup R$\" name={'prg_markup' + key} />\r\n \r\n \r\n \r\n \r\n Valor Venda:\r\n \r\n \r\n recalcularMarkupDoProduto(key)} placeholder=\"Informe o valor R$\" name={'lpi_valorvenda' + key} />\r\n \r\n \r\n \r\n \r\n Cód. Etiqueta:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!formulario.getFieldValue('pro_id') &&\r\n \r\n \r\n Estoque:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (grade) => (\r\n
\r\n \r\n
\r\n {grade.prg_ativa &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n setPreviewVisible(false)}\r\n >\r\n \"Imagem\r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Upload, Row, Col, Typography, Divider, Button, message, Modal } from \"antd\";\r\nimport { DownloadOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabImagem({ listaImagens, setListaImagens, uploadPeca }) {\r\n\r\n const [previewImage, setPreviewImage] = useState('');\r\n const [previewVisible, setPreviewVisible] = useState(false);\r\n\r\n const onChange = ({ fileList: newFileList }) => {\r\n setListaImagens(newFileList);\r\n };\r\n\r\n const onPreview = async file => {\r\n if (!file.url && !file.preview) {\r\n file.preview = await getBase64(file.originFileObj);\r\n }\r\n\r\n setPreviewImage(file.url || file.preview);\r\n setPreviewVisible(true);\r\n };\r\n\r\n function getBase64(file) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n }\r\n\r\n function beforeUpload(file) {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n message.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n const isLt2M = file.size / 1024 / 1024 < 2;\r\n if (!isLt2M) {\r\n message.error('A imagem deve ter menos de 2 MB!');\r\n }\r\n return isJpgOrPng && isLt2M;\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Imagens Imagens dos Produtos\r\n \r\n {\r\n uploadPeca ? \r\n \r\n Adicione a imagem do produto aqui. \r\n : \r\n Adicione as imagens do produto aqui. \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {listaImagens.length < uploadPeca ? 1 : 5 && 'Arraste a Imagem ou'}\r\n
\r\n \r\n \r\n \r\n \r\n setPreviewVisible(false)}\r\n >\r\n \"Imagem\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Form, Table, Tag, Modal } from \"antd\";\r\nimport { PlusOutlined, ExclamationCircleOutlined, EditOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nimport { ModalLoteProduto } from \"../../components/modals\";\r\nimport moment from \"moment\";\r\n\r\nexport default function TabLote({ listaLote, setListaLote, casaDecimaisUnd }) {\r\n const [form] = Form.useForm();\r\n const [openModal, setOpenModal] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [sequencial, setSequencial] = useState(0);\r\n\r\n useEffect(() => {\r\n const novaListaLote = [...listaLote];\r\n novaListaLote.forEach((item, index) => {\r\n item.ordem = index + 1;\r\n });\r\n\r\n setListaLote(novaListaLote);\r\n }, [])\r\n\r\n const editarLote = (sequencia) => {\r\n setSequencial(sequencia);\r\n setEditando(true);\r\n setOpenModal(true);\r\n }\r\n\r\n const modalExcluir = (record) => {\r\n const index = listaLote.findIndex(item => item.ordem === record.ordem);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: 'Deseja realmente excluir o lote?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerLote(index);\r\n }\r\n });\r\n }\r\n\r\n const removerLote = (index) => {\r\n const novaListaLote = [...listaLote];\r\n novaListaLote.splice(index, 1);\r\n\r\n novaListaLote.forEach((item, index) => {\r\n item.ordem = index + 1;\r\n });\r\n\r\n setListaLote(novaListaLote);\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Cadastro Cadastro de Lotes do Produto\r\n \r\n Cadastro de Lotes do Produto \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
(\r\n \r\n {ordem}\r\n \r\n )\r\n },\r\n {\r\n title: 'Número',\r\n width: 180,\r\n align: 'center',\r\n render: ({ prl_numerolote }) => (\r\n {prl_numerolote}\r\n )\r\n },\r\n {\r\n title: 'Qtde',\r\n width: 75,\r\n align: 'center',\r\n render: ({ prl_qtde }) => (\r\n {prl_qtde}\r\n )\r\n },\r\n {\r\n title: 'Data Entrada',\r\n render: ({ prl_dataentrada }) => (\r\n {moment(prl_dataentrada).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Data Fabricação',\r\n render: ({ prl_datafabricacao }) => (\r\n {moment(prl_datafabricacao).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Data Validade',\r\n render: ({ prl_datavencimento }) => (\r\n {moment(prl_datavencimento).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n (setOpenModal(false), setEditando(false))} editando={editando} \r\n setEditando={setEditando} sequencia={sequencial} casaDecimaisUnd={casaDecimaisUnd} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, InputNumber, Select, Checkbox, Switch, Tooltip, Button, Modal, notification, Alert } from \"antd\";\r\nimport { QuestionCircleOutlined, BarcodeOutlined, ExclamationCircleOutlined, RestFilled } from \"@ant-design/icons\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions, drawerActions } from \"../../actions\";\r\nimport { calculaDigitoVerificadorEAN, isNotNullOrEmpty, validarCnpj, validarEan, ajustarTamanhoImagemBase64, resizeImageToMB } from \"../../services/funcoes\";\r\nimport { TabListaPreco, TabProdutoTributacao, TabGrade, TabImagem, TabLote } from './tabPage';\r\nimport { FormGW, FormularioDinamico, InputPreco, SelectIncluir, SelectPaginacao, Data } from \"../../components\";\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico } from \"../../services/funcoes\";\r\nimport moment from \"moment\";\r\nimport DrawerMarca from \"../../pages/marca/drawer\";\r\nimport DrawerGrupoProduto from \"../../pages/grupoProdutos/drawer\";\r\nimport DrawerSubGrupo from \"../../pages/subGrupo/drawer\";\r\n\r\nexport default function ManutencaoProdutos({ formulario, nameForm, salvandoDados, aoSalvar, validarAoIniciar, editando }) {\r\n const [{ ui, manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [formGrade] = Form.useForm();\r\n const [listaDePrecos, setListaDePrecos] = useState([]);\r\n const [listaDeGrades, setListaDeGrades] = useState([]);\r\n const [listaImagens, setListaImagens] = useState([]);\r\n const [listaLote, setListaLote] = useState([]);\r\n const [filtroGrupo, setFiltroGrupo] = useState(null);\r\n const [listaPrecoExclusao, setListaPrecoExclusao] = useState([]);\r\n const [produtoCamposPersonalizados, setProdutoCamposPersonalizados] = useState([]);\r\n const [listaUnidadeMedida, setListaUnidadeMedida] = useState([]);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [possuiCusto, setPossuiCusto] = useState(false);\r\n const [openDrawerMarca, setOpenDrawerMarca] = useState(false);\r\n const [openDrawerGrupo, setOpenDrawerGrupo] = useState(false);\r\n const [openDrawerSubGp, setOpenDrawerSubGp] = useState(false);\r\n const [grupoSelect, setGrupoSelect] = useState([]);\r\n const [foundGroup, setFoundGroup] = useState([]);\r\n const [casaDecimaisUnd, setCasaDecimaisUnd] = useState(0);\r\n const [exibeLote, setExibeLote] = useState(false);\r\n\r\n const trocaAbas = (pag) => {\r\n setAbaSelecionada(pag);\r\n };\r\n\r\n const listaValidacoes = [\r\n { nome: 'pro_descricao', obrigatorio: true, label: 'Descrição' },\r\n { nome: 'tpi_id', obrigatorio: true, label: 'Tipo de Produto - SPED' },\r\n { nome: 'ump_id', obrigatorio: true, label: 'Unidade de Medida' },\r\n { nome: 'orm_id', obrigatorio: true, label: 'Código Situação Tributária Origem' },\r\n { nome: 'ncm_id', obrigatorio: true, label: 'NCM - Nomenclatura Comum do Mercosul' },\r\n { nome: 'icm_id', obrigatorio: true, label: 'Classificação ICMS' }\r\n ];\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados?.mar_id) {\r\n lista.push({ name: \"mar_id\", campo: \"Codigo\", value: manutencao.dados.mar_id });\r\n }\r\n if (!!manutencao.dados?.gru_id) {\r\n lista.push({ name: \"gru_id\", campo: \"CodigoGrupo\", value: manutencao.dados.gru_id });\r\n }\r\n if (!!manutencao.dados?.sgp_id) {\r\n lista.push({ name: \"sgp_id\", campo: \"Codigo\", value: manutencao.dados.sgp_id });\r\n }\r\n if (!!manutencao.dados?.ncm_id) {\r\n lista.push({ name: \"ncm_id\", campo: \"IdNcm\", value: manutencao.dados.ncm_id });\r\n }\r\n if (!!manutencao.dados?.icm_id) {\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: manutencao.dados.icm_id });\r\n }\r\n if (!!manutencao.dados?.pis_id) {\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: manutencao.dados.pis_id });\r\n }\r\n if (!!manutencao.dados?.anp_id) {\r\n lista.push({ name: \"anp_id\", campo: \"IdAnp\", value: manutencao.dados.anp_id });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!ui.showDrawer && !!validarAoIniciar && !!formulario.getFieldValue().pro_ean) {\r\n buscarEanExistente(formulario.getFieldValue().pro_ean);\r\n }\r\n }, [ui.showDrawer])\r\n\r\n useEffect(() => {\r\n if (listaUnidadeMedida.length > 0 && !formulario.getFieldValue().ump_id) {\r\n formulario.setFieldsValue({ ump_id: listaUnidadeMedida.find(un => un.ump_id === 'UN').ump_id });\r\n }\r\n if (listaUnidadeMedida.length > 0) {\r\n checkCasaDecimalUnidadeMedida();\r\n }\r\n }, [listaUnidadeMedida]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n carregarListas();\r\n carregarParametros();\r\n }, []);\r\n\r\n useEffect(() => {\r\n const found = grupoSelect.find(element => element.gru_id === formulario.getFieldValue(['gru_id']));\r\n\r\n if (!!found) {\r\n setFoundGroup(found);\r\n carregarSubGrupos(found.gru_id);\r\n }\r\n }, [formulario.getFieldValue(['gru_id'])]);\r\n\r\n async function carregarParametros() {\r\n let markupLoc = await api.get(`/ParametroLocal/BuscarParametros`);\r\n if (markupLoc.status == 200) {\r\n if (!!markupLoc.data.par_markupproduto) {\r\n formulario.setFieldsValue({ pro_markup: markupLoc.data.par_markupproduto });\r\n } else {\r\n let markupEmp = await api.get(`/ParametroEmpresa/BuscarParametros`);\r\n if (!!markupEmp.data.par_markupproduto) {\r\n formulario.setFieldsValue({ pro_markup: markupEmp.data.par_markupproduto });\r\n }\r\n };\r\n }\r\n }\r\n\r\n async function carregarListas() {\r\n let unidade = await api.get(`unidademedida/listar?PageSize=100&PageNumber=1`);\r\n if (!!formulario.getFieldValue().ump_id && unidade.data?.items.length > 0 && !unidade.data?.items?.find((un) => { return un.ump_id === formulario.getFieldValue().ump_id })) {\r\n formulario.setFieldsValue({ ump_id: null });\r\n }\r\n setListaUnidadeMedida(unidade.data?.items);\r\n\r\n carregaCamposPersonalizados();\r\n }\r\n function checkCasaDecimalUnidadeMedida() {\r\n if (!!formulario.getFieldValue().emb_ump_id) {\r\n let und = listaUnidadeMedida.find(un => un.ump_id === formulario.getFieldValue().emb_ump_id);\r\n if (und) {\r\n setCasaDecimaisUnd(und.ump_casasdecimais);\r\n }\r\n else {\r\n setCasaDecimaisUnd(0);\r\n }\r\n } else {\r\n setCasaDecimaisUnd(0);\r\n }\r\n }\r\n\r\n function carregarSubGrupos(CodigoGrupo) {\r\n if (!!CodigoGrupo) {\r\n setFiltroGrupo(`&CodigoGrupo=${CodigoGrupo}`);\r\n let lista = [];\r\n if (!!formulario.getFieldValue().gru_id) {\r\n lista.push({ name: \"sgp_id\", campo: \"CodigoGrupo\", value: formulario.getFieldValue().gru_id });\r\n }\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n function validarForm(values, listaValidacoes) {\r\n let retorno = false;\r\n if (!!listaValidacoes) {\r\n let msgRetorno = [];\r\n listaValidacoes.forEach(\r\n (validacao) => {\r\n if (validacao.obrigatorio && (!!values[validacao.nome] === false && values[validacao.nome] !== 0)) {\r\n msgRetorno.push('O campo ' + validacao.label + ' é obrigatório!');\r\n }\r\n }\r\n );\r\n if (listaDeGrades.length > 0) {\r\n let gradeValida = true;\r\n let validaValorVenda = true;\r\n listaDeGrades.forEach((grade) => {\r\n if (!!!formGrade.getFieldValue(['prg_ean' + grade.key])) {\r\n gradeValida = false;\r\n }\r\n // if (grade.lpi_valorvenda == 0 || grade.lpi_valorvenda == null && grade.prg_valorvenda != null && grade.prg_valorvenda != 0) {\r\n // grade.lpi_valorvenda = grade.prg_valorvenda;\r\n // }\r\n if (grade.prg_valorvenda == null || grade.prg_valorvenda == 0) {\r\n validaValorVenda = false;\r\n }\r\n });\r\n if (!gradeValida) {\r\n msgRetorno.push(\"Favor informar o EAN para a grade do produto!\");\r\n }\r\n if (!validaValorVenda) {\r\n msgRetorno.push(\"Valor de Venda deve ser diferente de Zero!\");\r\n }\r\n }\r\n if (values.anp_codigo === 210203001) {\r\n let val = (parseFloat(values.prc_percglp) + parseFloat(values.prc_percglpnacional) + parseFloat(values.prc_percglpimportado));\r\n if ((parseFloat(values.prc_percglp) + parseFloat(values.prc_percglpnacional) + parseFloat(values.prc_percglpimportado)) !== 100)\r\n msgRetorno.push(\"Somatorio percentuais de GLP derivado do petroleo, GLGNn e GLGNi diferente de 100!\");\r\n }\r\n if (values.emb_ump_id && (values.pru_quantidade == null || values.pru_quantidade === 0)) {\r\n msgRetorno.push(\"Quantidade da embalagem deve ser informado quando existir unidade de medida(Embalagem)\");\r\n }\r\n if (values.ncm_ativo == false) {\r\n msgRetorno.push(\"NCM está inativo na base de dados do SEFAZ! Certifique-se de que o NCM que você está usando está correto na aba Dados Tributários\");\r\n }\r\n\r\n if (msgRetorno.length > 0) {\r\n notification.warning({ message: 'Aviso', description: msgRetorno.join('\\n') })\r\n } else {\r\n retorno = true;\r\n }\r\n\r\n }\r\n return retorno;\r\n };\r\n\r\n function salvarDadosCombustivel(dadosProd) {\r\n let dadosComb = {};\r\n if (dadosProd.anp_id && dadosProd.anp_codigo === 210203001) {// Gas\r\n dadosComb.prc_percgasnatural = dadosProd.prc_percgasnatural;\r\n dadosComb.prc_percglp = dadosProd.prc_percglp;\r\n dadosComb.prc_percglpnacional = dadosProd.prc_percglpnacional;\r\n dadosComb.prc_percglpimportado = dadosProd.prc_percglpimportado;\r\n dadosComb.prc_valorpartida = dadosProd.prc_valorpartida;\r\n dadosComb.prc_qtdetemperatura = dadosProd.prc_qtdetemperatura;\r\n return dadosComb;\r\n }\r\n return null;\r\n };\r\n function salvarProdutosUnidadeMedida(dadosProd) {\r\n let dadosUnidadeMedida = [];\r\n if (dadosProd.emb_ump_id) {\r\n dadosUnidadeMedida.push({ pru_id: dadosProd.pru_id, ump_id: dadosProd.emb_ump_id, pru_quantidade: dadosProd.pru_quantidade });\r\n return dadosUnidadeMedida;\r\n }\r\n return null;\r\n };\r\n\r\n\r\n async function salvarDados(values) {\r\n let dadosProd = {};\r\n dadosProd = { ...values, ...formulario.getFieldValue() };\r\n dadosProd.orm_id = (dadosProd.orm_id).toString();\r\n dadosProd.pro_kitcomposicao = !!dadosProd.pro_kitcomposicao ? dadosProd.pro_kitcomposicao : false;\r\n dadosProd.lpi_valorvenda = parseFloat(dadosProd.lpi_valorvenda);\r\n dadosProd.listaPreco = listaDePrecos.filter(l => l.ltp_principal == false);\r\n dadosProd.produtocampopersonalizados = salvarCamposAdicionais(formulario.getFieldValue());\r\n dadosProd.pre_qtdeestoqueinicial = parseFloat(dadosProd.pre_qtde)\r\n dadosProd.pro_markup = parseFloat(dadosProd.pro_markup)\r\n dadosProd.produtoGrade = popularGrade();\r\n dadosProd.ProdutoCombustivel = salvarDadosCombustivel(dadosProd);\r\n dadosProd.ProdutoUnidades = salvarProdutosUnidadeMedida(dadosProd);\r\n dadosProd.imagens = await popularImagens();\r\n dadosProd.produtolotes = listaLote.map(item => {\r\n const { ordem, ...restante } = item;\r\n return restante;\r\n });\r\n if (validarForm(dadosProd, listaValidacoes)) {\r\n salvandoDados(true);\r\n if (dadosProd.pro_id) {\r\n editarManutencao(dadosProd);\r\n } else {\r\n incluirManutencao(dadosProd);\r\n }\r\n }\r\n };\r\n\r\n async function editarManutencao(dadosProd) {\r\n let retornoDrawer = [];\r\n api.put(`Produto/Editar`, dadosProd).then(\r\n res => {\r\n retornoDrawer = res.data;\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Produto foram salvos com sucesso!\" });\r\n aoSalvar(retornoDrawer);\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(\r\n () => {\r\n salvandoDados(false);\r\n }\r\n );\r\n }\r\n\r\n async function incluirManutencao(dadosProd) {\r\n let retornoDrawer = [];\r\n api.post(`Produto/Incluir`, dadosProd).then(\r\n res => {\r\n retornoDrawer = res.data;\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Produto foram salvos com sucesso!\" });\r\n aoSalvar(retornoDrawer);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n salvandoDados(false);\r\n }\r\n );\r\n }\r\n\r\n function salvandoDadosMarca(retorno) {\r\n let lista = [];\r\n\r\n if (retorno) {\r\n lista.push({ name: \"mar_id\", campo: \"Codigo\", value: retorno.mar_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosGrupo(retorno) {\r\n let lista = [];\r\n\r\n if (retorno) {\r\n lista.push({ name: \"gru_id\", campo: \"CodigoGrupo\", value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosSubGrupo(retorno) {\r\n let lista = [];\r\n\r\n if (retorno) {\r\n lista.push({ name: \"sgp_id\", campo: \"Codigo\", value: retorno.sgp_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n }\r\n\r\n function popularGrade() {\r\n let dadosGrade = [...listaDeGrades];\r\n dadosGrade.forEach(\r\n (grade) => {\r\n grade.prg_ean = formGrade.getFieldValue(['prg_ean' + grade.key]);\r\n grade.prg_codigoetiqueta = formGrade.getFieldValue(['prg_codigoetiqueta' + grade.key]);\r\n grade.pre_custoultimacompra = !!parseFloat(formGrade.getFieldValue(['pre_custoultimacompra' + grade.key])) ? parseFloat(formGrade.getFieldValue(['pre_custoultimacompra' + grade.key])) : 0;\r\n grade.prg_markup = !!parseFloat(formGrade.getFieldValue(['prg_markup' + grade.key])) ? parseFloat(formGrade.getFieldValue(['prg_markup' + grade.key])) : 0;\r\n grade.prg_valorvenda = !!parseFloat(formGrade.getFieldValue(['lpi_valorvenda' + grade.key])) ? parseFloat(formGrade.getFieldValue(['lpi_valorvenda' + grade.key])) : 0;\r\n grade.pre_qtde = !!parseFloat(formGrade.getFieldValue(['pre_qtde' + grade.key])) ? parseFloat(formGrade.getFieldValue(['pre_qtde' + grade.key])) : 0;\r\n grade.prg_ativa = grade.prg_ativa;\r\n grade.imagens = popularImgGrade(grade.imagens);\r\n grade.modalidadeGrade = popularModalidades(grade.modalidadesgrade);\r\n }\r\n );\r\n return dadosGrade;\r\n };\r\n\r\n function popularImgGrade(imagens) {\r\n let imagensGrade = [];\r\n imagens.forEach(\r\n imgs => {\r\n let imagem = {};\r\n imagem.base64img = !!imgs.url ? imgs.url : imgs.thumbUrl;\r\n imagem.principal = imgs.principal;\r\n imagem.imagemComprimida = false;\r\n imagensGrade.push(imagem);\r\n }\r\n );\r\n return imagensGrade;\r\n };\r\n\r\n function popularModalidades(modalidadesgrade) {\r\n let modalidades = [];\r\n modalidadesgrade.forEach(\r\n atrib => {\r\n let mod = {\r\n mgp_id: atrib.mgp_id\r\n }\r\n modalidades.push(mod);\r\n }\r\n )\r\n return modalidades;\r\n };\r\n\r\n async function popularImagens() {\r\n let listaImg = [];\r\n let possuiPrincipal = false;\r\n let maxSize = 2 * 1024 * 1024;\r\n for (var img of listaImagens) {\r\n let imagem = {};\r\n if (img.size != null) {\r\n if ((img.size + 1) >= maxSize) {\r\n // 1200 equivale a resolução da imagem\r\n //imagem.base64img = await ajustarTamanhoImagemBase64((!!img.url ? img.url : img.thumbUrl), 1200, 1200, maxSize);\r\n //parametros para diminuir tamanho da imagem( imagem, tamanho em MB, dimensões)\r\n imagem.base64img = await resizeImageToMB((!!img.url ? img.url : img.thumbUrl), 2, 1200, 1200);\r\n imagem.imagemComprimida = false;\r\n //console.log('base64img:', imagem.base64img);\r\n imagem.principal = false;\r\n } else {\r\n imagem.base64img = !!img.url ? img.url : img.thumbUrl;\r\n imagem.imagemComprimida = false;\r\n imagem.principal = false;\r\n }\r\n } else {\r\n imagem.base64img = !!img.url ? img.url : img.thumbUrl;\r\n imagem.imagemComprimida = false;\r\n imagem.principal = false;\r\n }\r\n if (!!img.principal) {\r\n possuiPrincipal = true;\r\n imagem.principal = true;\r\n }\r\n listaImg.push(imagem);\r\n };\r\n if (!possuiPrincipal && listaImg.length > 0) {\r\n listaImg[0].principal = true;\r\n }\r\n return listaImg;\r\n };\r\n\r\n const salvarCamposAdicionais = (values) => {\r\n var camposAdicionais = [];\r\n elementosFormulario.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let proDados = produtoCamposPersonalizados.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if (!!proDados && !!proDados.pcp_valor && !!proDados.pcp_id) {\r\n camposAdicionais.push({ pcp_id: proDados.pcp_id, pro_id: values.pro_id, cap_id: elemento.cap_id, pcp_valor: values[elemento.cap_nomeelemento] });\r\n } else if (!!values[elemento.cap_nomeelemento]) {\r\n if (!!Date.parse(values[elemento.cap_nomeelemento]) && typeof values[elemento.cap_nomeelemento] === \"object\") {\r\n camposAdicionais.push({ pcp_id: null, pro_id: values.pro_id, cap_id: elemento.cap_id, pcp_valor: moment(values[elemento.cap_nomeelemento]).format(\"YYYY/MM/DD\") });\r\n } else {\r\n camposAdicionais.push({ pcp_id: null, pro_id: values.pro_id, cap_id: elemento.cap_id, pcp_valor: values[elemento.cap_nomeelemento] });\r\n }\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?TipoEntidade=4&PageSize=500&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n if (!!formulario.getFieldValue().pro_id) {\r\n api.get(`ProdutoCampoPersonalizado/Listar?IdProduto=${formulario.getFieldValue().pro_id}`).then(res => {\r\n if (res.status === 200 && !!res.data) {\r\n setProdutoCamposPersonalizados(res.data);\r\n res.data.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.pcp_valor);\r\n })\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n async function carregarDados() {\r\n if (!!formulario.getFieldsValue().pro_id) {\r\n if (!!formulario.getFieldValue().pro_controlelote) {\r\n setExibeLote(true);\r\n }\r\n\r\n let listaPreco = await api.get(`ListaPreco/ListarListaPrecoProduto?idProduto=${formulario.getFieldsValue().pro_id}`);\r\n setListaDePrecos(listaPreco.data.map((x, idx) => ({ key: idx, ...x })));\r\n\r\n let listaGrades = await api.get(`produto/ListarGrades?IdProduto=${formulario.getFieldsValue().pro_id}`);\r\n if (listaGrades.status === 200) {\r\n let lista = listaGrades.data;\r\n if (lista.length > 0) {\r\n lista.forEach((item, indice) => {\r\n item.key = indice + 1;\r\n formGrade.setFieldsValue({\r\n ['prg_ean' + item.key]: item.prg_ean,\r\n ['pre_custoultimacompra' + item.key]: (!!item.pre_custoultimacompra ? item.pre_custoultimacompra.toFixed(2) : null),\r\n ['prg_markup' + item.key]: (!!item.prg_markup ? item.prg_markup.toFixed(2) : null),\r\n ['lpi_valorvenda' + item.key]: (!!item.lpi_valorvenda ? item.lpi_valorvenda.toFixed(2) : null),\r\n ['prg_codigoetiqueta' + item.key]: item.prg_codigoetiqueta\r\n });\r\n });\r\n }\r\n setListaDeGrades(lista);\r\n }\r\n\r\n let listaImagens = await api.get(`produto/ListarImagens?IdProduto=${formulario.getFieldsValue().pro_id}`);\r\n if (listaImagens.status === 200) {\r\n let lista = [];\r\n if (listaImagens.data.length > 0) {\r\n listaImagens.data.forEach((imagem, index) => {\r\n lista.push({ url: imagem.conteudoImagem, uid: index + 1, principal: imagem.principal });\r\n });\r\n setListaImagens(lista);\r\n }\r\n }\r\n\r\n let custoProduto = await api.get(`estoque/BuscarCustosProdutos?codigoProduto=${formulario.getFieldsValue().pro_id}`);\r\n formulario.setFieldsValue({ pre_custoultimacompra: custoProduto.data.pre_custoultimacompra });\r\n setPossuiCusto(!!custoProduto.data.pre_custoultimacompra);\r\n\r\n let listaDoLote = await api.get(`ProdutoLote/Listar?IdProduto=${formulario.getFieldValue().pro_id}`);\r\n setListaLote(listaDoLote.data.items);\r\n\r\n } else {\r\n setListaDePrecos([]);\r\n setListaImagens([]);\r\n setListaDeGrades([]);\r\n }\r\n\r\n recalcularMarkupDoProduto();\r\n carregaCamposPersonalizados();\r\n };\r\n\r\n function buscarEanExistente(event) {\r\n let codEan;\r\n if (!!event.currentTarget) {\r\n codEan = event.currentTarget.value;\r\n } else {\r\n codEan = event;\r\n }\r\n if (isNaN(codEan)) {\r\n return;\r\n }\r\n api.get(`Produto/VerificaEanExistente?CodigoEan=${codEan}`).then(\r\n res => {\r\n if (!!res.data && res.data.existe == true) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Produto já cadastrado - deseja alterá-lo?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n buscarProdutosEan(res.data.pro_id);\r\n\r\n }, onCancel() {\r\n //aoSalvar();\r\n formulario.resetFields();\r\n }\r\n });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n }\r\n );\r\n };\r\n\r\n function buscarProdutosEan(IdProduto) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${IdProduto}`).then(\r\n res => {\r\n res.data.pro_datainclusao = !!res.data.pro_datainclusao ? moment(res.data.pro_datainclusao) : null;\r\n res.data.data_sincro = !!res.data.data_sincro ? moment(res.data.data_sincro) : null;\r\n formulario.setFieldsValue(res.data);\r\n editando.setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n carregarDados();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n function gerarEANProdutoBalanca(e) {\r\n if (e.target.checked == true) {\r\n api.get(`produto/GerarCodigoProdutoBalanca`).then(\r\n res => {\r\n if (res.status == 200) {\r\n console.log(res.data)\r\n formulario.setFieldsValue({ pro_ean: res.data.toString(), pro_eaninvalido: true });\r\n }\r\n else {\r\n notification.warning({ message: `Aviso!`, description: res.data })\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n formulario.setFieldsValue({ pro_ean: \"\" });\r\n console.log(erro);\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.warning({ message: `Aviso!`, description: erro.response.data })\r\n } else {\r\n notification.warning({ message: `Aviso!`, description: \"Não foi possível gerar código para balança\" })\r\n }\r\n }\r\n );\r\n\r\n if (formulario.getFieldValue().ump_id != \"UN\" && formulario.getFieldValue().ump_id != \"KG\") {\r\n notification.warning({ message: `Aviso!`, description: \"Os Padrões de Unidades de medida para balança são UN ou KG!\" });\r\n }\r\n } else {\r\n formulario.setFieldsValue({ pro_ean: \"\" });\r\n }\r\n }\r\n\r\n var eanAnterior = null;\r\n function gerarEANProduto(campo) {\r\n let primeiroNumero = \"6\";\r\n let EAN;\r\n let digitoVerificador;\r\n eanAnterior = primeiroNumero;\r\n for (let i = 0; i <= 10; i++) {\r\n eanAnterior += Math.floor((Math.random() * 9) + 1).toString();\r\n }\r\n EAN = eanAnterior;\r\n EAN = EAN.substr(0, 12);\r\n EAN = (parseInt(EAN) + 1).toString();\r\n eanAnterior = EAN;\r\n digitoVerificador = calculaDigitoVerificadorEAN(EAN);\r\n EAN = EAN + \"\" + digitoVerificador;\r\n\r\n if (!!campo) {\r\n formGrade.setFieldsValue({ [campo]: EAN });\r\n } else {\r\n formulario.setFieldsValue({ pro_ean: EAN });\r\n }\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n };\r\n\r\n function validaTipoMercadoria(campo) {\r\n if (campo === \"pro_produto\" && formulario.getFieldsValue().pro_produto) {\r\n formulario.setFieldsValue({ pro_servico: false });\r\n formulario.setFieldsValue({ pro_materiaprima: false });\r\n } else if (campo === 'pro_servico' && formulario.getFieldsValue().pro_servico) {\r\n formulario.setFieldsValue({ pro_produto: false });\r\n formulario.setFieldsValue({ pro_materiaprima: false });\r\n } else if (campo === 'pro_materiaprima' && formulario.getFieldsValue().pro_materiaprima) {\r\n formulario.setFieldsValue({ pro_produto: false });\r\n formulario.setFieldsValue({ pro_servico: false });\r\n } else {\r\n formulario.setFieldsValue({ pro_produto: true });\r\n }\r\n };\r\n\r\n function calcularValorVendaPorMarkup() {\r\n let valorVenda = retornaPrecoPorMarkup(formulario.getFieldsValue().pre_custoultimacompra, formulario.getFieldsValue().pro_markup);\r\n formulario.setFieldsValue({ lpi_valorvenda: valorVenda });\r\n };\r\n\r\n function retornaPrecoPorMarkup(custo, markup) {\r\n if (parseFloat(custo) > 0 && parseFloat(markup) > 0) {\r\n return (parseFloat(custo) * parseFloat(markup)).toFixed(2);\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n function recalcularMarkupDoProduto() {\r\n if (parseFloat(formulario.getFieldsValue().pre_custoultimacompra) > 0 && parseFloat(formulario.getFieldsValue().lpi_valorvenda) > 0) {\r\n let markupCalculado = (parseFloat(formulario.getFieldsValue().lpi_valorvenda) / parseFloat(formulario.getFieldsValue().pre_custoultimacompra)).toFixed(2);\r\n formulario.setFieldsValue({ pro_markup: markupCalculado })\r\n } else {\r\n formulario.setFieldsValue({ pro_markup: parametrosEmpresa.markupProduto });\r\n }\r\n };\r\n\r\n function verificaCnpj(record) {\r\n record = record.currentTarget.value.replace(/\\D/g, '');\r\n if (!validarCnpj(record)) {\r\n notification.warning({ message: `Aviso!`, description: `O CNPJ informado é inválido!` })\r\n }\r\n }\r\n\r\n function onBlurProEan(event) {\r\n let codEan = \"\";\r\n if (!!event.currentTarget) {\r\n codEan = event.currentTarget.value;\r\n } else {\r\n codEan = event;\r\n }\r\n if (codEan !== \"\") {\r\n if (validarEan(codEan)) {\r\n buscarEanExistente(codEan);\r\n if (codEan.startsWith(\"7\") && codEan.length === 13)\r\n formulario.setFieldsValue({ pro_eaninvalido: false });\r\n else\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n\r\n } else {\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n if (formulario.getFieldsValue().pro_usabalanca == false) {\r\n notification.warning({ description: 'EAN informado fora dos padrões GTIN, verifique o EAN antes de continuar!', message: 'Aviso' });\r\n }\r\n }\r\n }\r\n };\r\n\r\n function exibirLote() {\r\n setExibeLote(!exibeLote);\r\n };\r\n\r\n return (\r\n
\r\n salvarDados(values)} >\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!!manutencao.dados?.pro_id && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n Código de Barras - EAN\r\n \r\n \r\n \r\n \r\n }>\r\n onBlurProEan(event)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n trocaAbas(tab)}>\r\n \r\n \r\n \r\n \r\n validaTipoMercadoria('pro_produto')}> Produto/Mercadoria? \r\n \r\n \r\n {/* \r\n \r\n validaTipoMercadoria('pro_servico')}> Serviço? \r\n \r\n */}\r\n {/* \r\n \r\n validaTipoMercadoria('pro_materiaprima')}> Matéria-Prima? \r\n \r\n */}\r\n \r\n \r\n Kit Composição? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Código de Referência\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Código da Etiqueta\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerMarca(true)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n carregarSubGrupos(IdGrupo)}\r\n onChangeFunction={(IdGrupo) => carregarSubGrupos(IdGrupo)}\r\n setListaDados={setGrupoSelect}\r\n funcaoIncluir={() => setOpenDrawerGrupo(true)}\r\n allowClear={true}\r\n />\r\n \r\n \r\n \r\n \r\n 0 && (() => setOpenDrawerSubGp(true))}\r\n allowClear={true}\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {listaUnidadeMedida.map((um) => ({um.ump_id} - {um.ump_descricao}))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Unidade de Medida Tibutável\r\n \r\n \r\n \r\n \r\n }>\r\n checkCasaDecimalUnidadeMedida()}\r\n optionFilterProp=\"children\">\r\n {listaUnidadeMedida.map((um) => ({um.ump_id} - {um.ump_descricao}))}\r\n \r\n \r\n \r\n \r\n \r\n Qtde da Tributável\r\n \r\n \r\n \r\n \r\n } name=\"pru_quantidade\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.pro_diasvalidade !== currentValues.pro_diasvalidade}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue().pro_usabalanca === true) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n {listaDeGrades.length === 0 &&\r\n \r\n { calcularValorVendaPorMarkup() }} />\r\n \r\n }\r\n {listaDeGrades.length === 0 &&\r\n <>\r\n \r\n { calcularValorVendaPorMarkup() }} />\r\n \r\n \r\n {\r\n if (parseFloat(value) > 0) {\r\n return Promise.resolve();\r\n } else {\r\n return Promise.reject(new Error('Informe um valor de preço de venda!'))\r\n }\r\n }\r\n }]}\r\n placeholder=\"Informe a Margem de Lucro do Produto\" label=\"Preço de Venda (R$)\" name=\"lpi_valorvenda\" onChange={() => { recalcularMarkupDoProduto() }} />\r\n \r\n prevValues.pro_id !== currentValues.pro_id}>\r\n {({ getFieldValue }) => {\r\n if (!getFieldValue().pro_id && !getFieldValue().pre_qtde && !possuiCusto) return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Adicionar na Impressão de Etiquetas?\r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n }\r\n \r\n {listaDeGrades.length > 0 &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n Produto Ativo? \r\n \r\n \r\n \r\n \r\n gerarEANProdutoBalanca(e)}> Usa Balança? \r\n \r\n \r\n \r\n \r\n Não Gerar EAN em Documento Fiscal? \r\n \r\n \r\n \r\n \r\n Produto SEM escala relevante? \r\n \r\n \r\n \r\n \r\n Produto Fabricado? \r\n \r\n \r\n \r\n \r\n { exibirLote() }}> Controla Lotes? \r\n \r\n \r\n \r\n prevValues.pro_escalanaorelevante !== currentValues.pro_escalanaorelevante}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue().pro_escalanaorelevante === true) return (\r\n \r\n \r\n \r\n verificaCnpj(record)}\r\n />\r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!exibeLote &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoProdutos from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerProduto({ incluirMaisUm, editando }) {\r\n\r\n const nameForm = \"manutencaoProduto\"\r\n const [formProduto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n //console.log(\"valores: \", formProduto.getFieldValue().anp_id);\r\n\r\n function verificarSalvar(produto) {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: 'Produto incluído com sucesso!',\r\n okText: 'Incluir mais um',\r\n cancelText: 'Ok',\r\n centered: true,\r\n onOk() {\r\n localStorage.removeItem(nameForm);\r\n formProduto.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pro_descricao' } });\r\n let dados = { pro_id: produto.pro_id };\r\n incluirMaisUm(dados);\r\n },\r\n onCancel() {\r\n fecharDrawer();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pro_descricao' } });\r\n }\r\n });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n function fecharDrawer() {\r\n localStorage.removeItem(nameForm);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n editando.setEditando(false);\r\n formProduto.resetFields();\r\n };\r\n\r\n return (\r\n\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Form, Button, Collapse, Tag, Popover, Modal, Menu, Dropdown, Radio } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined, CloudUploadOutlined, MoreOutlined, CopyOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerProduto from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from '../../ValueObjects/';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BreadcrumbPage, BotaoIncluirDados, PesquisaAvancada, InputPreco } from \"../../components\";\r\nimport { ModalGradeEstoque } from \"../../components/modals\";\r\n\r\nexport default function Produto() {\r\n\r\n const [{ manutencao, listagem }, dispatch] = useStateValue();\r\n const [open, setOpen] = useState(false);\r\n const [formPesquisaAvancada] = Form.useForm();\r\n const [formPesquisaAdc] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n const [dadosProdutoGrade, setDadosProdutoGrade] = useState({});\r\n const [openModalEstoque, setOpenModalEstoque] = useState(false);\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const menuOutros = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisaAvancada.getFieldsValue().produtoAtivo ? 1 : formPesquisaAvancada.getFieldsValue().produtoAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}&SomenteProduto=true`, filtro: '', ordem: '+pro_descricao' } });\r\n formPesquisaAvancada.setFieldsValue({ produtoAtivo: 1 });\r\n }, [])\r\n\r\n function duplicarProduto(produto) {\r\n let dados = {};\r\n if (!!produto.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados = res.data;\r\n dados.pro_id = null;\r\n dados.pro_descricao = '';\r\n api.get(`tributacaoIcms/BuscarTributacaoPorCodigoProduto?IdProduto=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados.icm_id = res.data.icm_id;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function incluirMaisUm(produto) {\r\n let dados = {};\r\n if (!!produto.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados.pro_id = null;\r\n dados.pro_descricao = '';\r\n dados.gru_id = res.data.gru_id;\r\n dados.sgp_id = res.data.sgp_id;\r\n dados.mar_id = res.data.mar_id;\r\n dados.ncm_id = res.data.ncm_id;\r\n dados.orm_id = res.data.orm_id;\r\n dados.cen_id = res.data.cen_id;\r\n dados.pis_id = res.data.pis_id;\r\n dados.tpi_id = res.data.tpi_id;\r\n dados.ump_id = res.data.ump_id;\r\n dados.lpi_valorvenda = res.data.lpi_valorvenda;\r\n api.get(`tributacaoIcms/BuscarTributacaoPorCodigoProduto?IdProduto=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados.icm_id = res.data.icm_id;\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function showDrawer(produto) {\r\n let dados = {};\r\n if (!!produto.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados = res.data;\r\n dados.pro_datainclusao = !!dados.pro_datainclusao ? moment(dados.pro_datainclusao) : null;\r\n dados.data_sincro = !!dados.data_sincro ? moment(dados.data_sincro) : null;\r\n dados.orm_id = parseInt(dados.orm_id);\r\n // api.get(`tributacaoIcms/BuscarTributacaoPorCodigoProduto?IdProduto=${produto.pro_id}`).then(\r\n // res => {\r\n // if (res.status === 200) {\r\n // //dados.icm_id = res.data.icm_id;\r\n // }\r\n // }\r\n // ).catch(\r\n // (erro) => {\r\n // if (!!erro.response && !!erro.response.data && erro.response.data.Message) {\r\n // notification.error({ description: erro.response.data.Message, message: 'Aviso' });\r\n // } else {\r\n // console.error(erro);\r\n // }\r\n // }\r\n // ).finally(\r\n // () => {\r\n // dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n // dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n // }\r\n // );\r\n }\r\n }).catch((erro) => console.error(erro))\r\n .finally(\r\n () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n );\r\n }\r\n };\r\n\r\n function aplicarFiltros() {\r\n let filtrosTela = popularFiltrosTela();\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtrosTela, filtro: (!!listagem.filtro ? listagem.filtro : '') } });\r\n }\r\n\r\n function excluirRegistro(produto) {\r\n api.delete(`produto/excluir/${produto.pro_id}`).then((res) => {\r\n if (res.data == true) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n } else {\r\n modalInativarProduto(produto);\r\n }\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarProduto(produto);\r\n })\r\n };\r\n\r\n function inativarProduto(produto) {\r\n api.put(`produto/AtivarInativar?IdProduto=${produto.pro_id}&Ativo=false`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pro_descricao' } });\r\n })\r\n };\r\n\r\n const modalExcluirProduto = (produto) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o produto ${produto.pro_codigo}-${produto.pro_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(produto);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarProduto = (produto) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o produto!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o produto ${produto.pro_codigo}-${produto.pro_descricao} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarProduto(produto);\r\n }\r\n });\r\n };\r\n\r\n function popularFiltrosTela() {\r\n let filtrosTela = '';\r\n filtrosTela += `&SomenteProduto=true&Ativo=${formPesquisaAvancada.getFieldsValue().produtoAtivo}`\r\n if (parseFloat(formPesquisaAdc.getFieldsValue().precoMinimo) > 0.00) filtrosTela += `&precoMinimo=${formPesquisaAdc.getFieldsValue().precoMinimo}`;\r\n if (parseFloat(formPesquisaAdc.getFieldsValue().precoMaximo) > 0.00) filtrosTela += `&precoMaximo=${formPesquisaAdc.getFieldsValue().precoMaximo}`;\r\n\r\n return filtrosTela;\r\n }\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n listagem.outrosFiltros = '';\r\n expressao = !!expressao ? expressao : '';\r\n let filtrosTela = popularFiltrosTela();\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: !!listagem.filtro ? listagem.filtro : '', outrosFiltros: `${filtrosTela}&filtroAdicional=${btoa(expressao)}`, ordem: '+pro_descricao' } })\r\n };\r\n\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', ordem: '+pro_descricao' } })\r\n };\r\n\r\n function onClickEditar(produto) {\r\n setEditando(true);\r\n showDrawer(produto);\r\n };\r\n\r\n function listarGrades(record) {\r\n setDadosProdutoGrade(record);\r\n setOpenModalEstoque(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={formPesquisaAvancada} telaFiltro={4} />\r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={formPesquisaAvancada} telaFiltro={2} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'EAN-13',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pro_ean, pro_usagrade }, record) => (\r\n
\r\n \r\n
\r\n {pro_ean}\r\n \r\n {pro_usagrade &&\r\n \r\n \r\n \r\n }\r\n\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição do Produto',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Un. Medida',\r\n width: 100,\r\n render: ({ ump_descricao }) => (\r\n
\r\n {ump_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Preço (R$)',\r\n width: 120,\r\n align: 'right',\r\n render: ({ precoVendaMinimo, precoVendaMaximo }) => (\r\n
\r\n {precoVendaMinimo === precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)}\r\n }\r\n {precoVendaMinimo !== precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)} até {FormatNumber(precoVendaMaximo, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n width: 98,\r\n align: 'center',\r\n render: (produto) => (\r\n
\r\n { dispatch({ type: manutencaoActions.CHANGE, data: { dados: produto } }); }}>\r\n Mais Detalhes\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (produto) => (\r\n
\r\n \r\n
\r\n \r\n onClickEditar(produto)} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluirProduto(produto)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandir={({\r\n pro_observacao, pro_datainclusao, gru_nome, sgp_nome, orm_id, orm_descricao, ncm_codigo, pro_fci, ump_descricao, tpi_descricao, pis_descricao, nat_descricao, mar_nome, pro_ean\r\n }) => {\r\n return (\r\n
\r\n \r\n
\r\n Grupo: {gru_nome || 'Não Informado'}\r\n \r\n \r\n Subgrupo: {sgp_nome || 'Não Informado'}\r\n \r\n \r\n Marca: {mar_nome || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n NCM: {ncm_codigo || 'Não Informado'}\r\n \r\n \r\n CST Origem: {orm_id} - {orm_descricao}\r\n \r\n \r\n FCI: {pro_fci || 'Não Informado'}\r\n \r\n \r\n {/* Unidade de Medida: {ump_descricao} */}\r\n \r\n \r\n Tipo de Produto para SPED: {tpi_descricao || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Tributação Pis/Cofins: {pis_descricao || 'Não Informado'}\r\n \r\n \r\n Natureza da Receita Pis/Cofins: {nat_descricao || 'Não Informado'}\r\n \r\n \r\n Data Inclusão: {moment(pro_datainclusao).format(\"DD/MM/YYYY\")}\r\n \r\n \r\n {!!pro_observacao &&\r\n \r\n \r\n Observações: {pro_observacao}\r\n \r\n \r\n }\r\n \r\n )\r\n }} />\r\n \r\n \r\n setOpenModalEstoque(false)} />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Button, Table, notification, Modal, Checkbox, Divider } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, CheckOutlined, ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { getEmpresa } from \"../../services/auth\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabItensGrade({ formulario, itensGrade, setItensGrade, atualizarDadosGrade }) {\r\n\r\n const [editandoRegistro, setEditandoRegistro] = useState(false);\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ descricaoItem: '' });\r\n setEditandoRegistro(false);\r\n }, [itensGrade]);\r\n\r\n function incluirItemGrade() {\r\n if (!!formulario.getFieldValue().descricaoItem) {\r\n if (itensGrade.filter((item) => { return item.mgp_descricao === formulario.getFieldValue().descricaoItem }).length > 0) {\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: `Você já possui um item nessa modalidade de grade denominado ${formulario.getFieldValue().descricaoItem}. Deseja adicionar este novo item mesmo assim?`,\r\n okText: 'Sim, adicionar',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n adicionarItem();\r\n }\r\n });\r\n } else {\r\n adicionarItem();\r\n }\r\n }\r\n };\r\n\r\n function adicionarItem() {\r\n let itemAdd = {};\r\n itemAdd.emp_id = getEmpresa();\r\n itemAdd.mgp_descricao = formulario.getFieldValue().descricaoItem;\r\n itemAdd.mgp_imprimenaetiqueta = false;\r\n if (!!formulario.getFieldValue().mgp_id) {\r\n itemAdd.mgp_modalidade = formulario.getFieldValue().mgp_id;\r\n api.post(`ModalidadeGrade/Incluir`, JSON.stringify(itemAdd), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(res => {\r\n if (res.status === 200) {\r\n atualizarDadosGrade(formulario.getFieldValue().mgp_id);\r\n }\r\n }, erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n });\r\n } else {\r\n let itens = [...itensGrade];\r\n itemAdd.key = itens.length + 1;\r\n itens.push(itemAdd);\r\n setItensGrade(itens);\r\n }\r\n formulario.setFieldsValue({ descricaoItem: '' });\r\n };\r\n\r\n function editarRegistro(dados) {\r\n if (!!dados.key) {\r\n setEditandoRegistro(true);\r\n formulario.setFieldsValue({ descricaoItem: dados.mgp_descricao, keyItem: dados.key });\r\n }\r\n };\r\n\r\n function salvarItemGrade() {\r\n let itens = [...itensGrade];\r\n let itemEditar = itens.filter((item) => { return item.key === formulario.getFieldValue().keyItem })[0];\r\n itemEditar.mgp_descricao = formulario.getFieldValue().descricaoItem;\r\n\r\n /*if (!!formulario.getFieldValue().mgp_id) {\r\n api.post(`ModalidadeGrade/editar`, JSON.stringify(itemEditar), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(res => {\r\n if (res.status === 200) {\r\n atualizarDadosGrade(formulario.getFieldValue().mgp_id);\r\n }\r\n }, erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n });\r\n } else {*/\r\n setItensGrade(itens);\r\n //}\r\n };\r\n\r\n function excluirRegistro(dadosItem) {\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: `Remover o item ${dadosItem.mgp_descricao} desta modalidade de grade?`,\r\n okText: 'Sim, quero remover',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let mgp_id = formulario.getFieldValue().mgp_id;\r\n if (!!mgp_id) {\r\n api.delete(`ModalidadeGrade/Excluir?IdModalidade=${dadosItem.mgp_id}`).then(res => {\r\n if (res.data) {\r\n atualizarDadosGrade(mgp_id);\r\n } else {\r\n error('É provável que o item que você esta tentando remover esteja relacionado a algum produto cadastrado no sistema.', 'Não foi possível excluir o item da modalidade de grade!');\r\n }\r\n }, erro => {\r\n error('É provável que o item que você esta tentando remover esteja relacionado a algum produto cadastrado no sistema.', 'Não foi possível excluir o item da modalidade de grade!');\r\n });\r\n } else {\r\n let itens = [...itensGrade];\r\n let index = itens.findIndex(i => i.key === dadosItem.key);\r\n itens.splice(index, 1);\r\n itens.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n setItensGrade(itens);\r\n }\r\n }\r\n });\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n };\r\n\r\n function selecionarItemGrade(key) {\r\n let itens = [...itensGrade];\r\n let itemEditar = itens.filter((item) => { return item.key === key })[0];\r\n itemEditar.mgp_imprimenaetiqueta = !itemEditar.mgp_imprimenaetiqueta;\r\n setItensGrade(itens);\r\n };\r\n\r\n function selecionarTodos(checked){\r\n let itens = [...itensGrade];\r\n itens.map((item) => { \r\n item.mgp_imprimenaetiqueta = (checked ? true : false);\r\n });\r\n setItensGrade(itens);\r\n };\r\n\r\n return (\r\n
\r\n {editandoRegistro &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!editandoRegistro &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n
{return
{ selecionarTodos(event.target.checked) }} /> Imprime na Etiqueta?
},\r\n align: 'left',\r\n width: 150,\r\n render: ({ mgp_imprimenaetiqueta, key }) => (\r\n
\r\n { selecionarItemGrade(key) }} />\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n align: 'left',\r\n render: ({ mgp_descricao }) => (\r\n
\r\n {mgp_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Tabs, Button, notification } from \"antd\";\r\nimport { EyeOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport TabItensGrade from './tabItens';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { validaForm } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoGradeProduto({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [itensGrade, setItensGrade] = useState([]);\r\n\r\n const salvarManutencao = (values) => {\r\n if (validaForm(formulario, listaValidacoes)) {\r\n carregando(true);\r\n\r\n let dadosEnviar = {};\r\n dadosEnviar.mgp_id = (!!values.mgp_id ? values.mgp_id : null);\r\n dadosEnviar.grade = itensGrade;\r\n dadosEnviar.mgp_modalidade = (!!values.mgp_modalidade ? values.mgp_modalidade : null) ;\r\n dadosEnviar.mgp_descricao = values.mgp_descricao;\r\n dadosEnviar.mgp_imprimenaetiqueta = (!!values.mgp_imprimenaetiqueta ? values.mgp_imprimenaetiqueta : null);\r\n let enderecoUrl = 'ModalidadeGrade/';\r\n \r\n if (values.mgp_id ){\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, dadosEnviar).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Modalidade da Grade salva com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Atenção!', description: \"Não foi possivel incluir os dados desta Modalidade da Grade!\" });\r\n }).finally(() => {\r\n aoSalvar();\r\n carregando(false);\r\n atualizarPagina();\r\n });\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, dadosEnviar).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Modalidade da Grade salva com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Atenção!', description: \"Não foi possivel incluir os dados desta Modalidade da Grade!\" });\r\n }).finally(() => {\r\n aoSalvar();\r\n carregando(false);\r\n atualizarPagina();\r\n });\r\n };\r\n }\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mgp_descricao' } });\r\n //listar();\r\n };\r\n\r\n const listaValidacoes = [\r\n { nome: 'mgp_descricao', obrigatorio: true, label: 'Descrição da Modalidade da Grade' }\r\n ];\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.mgp_id) {\r\n atualizarDadosGrade(manutencao.dados.mgp_id);\r\n setAbaSelecionada(\"1\");\r\n } else {\r\n setItensGrade([]);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function atualizarDadosGrade(mgp_id) {\r\n if (!!mgp_id) {\r\n api.get(`ModalidadeGrade/BuscarModalidade/${mgp_id}`).then(res => {\r\n if (res.status === 200) {\r\n let lista = res.data;\r\n lista.map((item, indice) => {\r\n item.key = indice + 1;\r\n });\r\n setItensGrade(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n return (\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoGradeProduto from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerGradeProduto () {\r\n\r\n const [formGradeProduto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) formGradeProduto.setFieldsValue(manutencao.dados);\r\n else {\r\n //formGradeProduto.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formGradeProduto.resetFields();\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerGradeProduto from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function GradeProduto() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mgp_descricao' } }), []);\r\n\r\n function excluirRegistro(dados) {\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: `Remover a modalidade de grade ${dados.mgp_descricao}?`,\r\n okText: 'Sim, quero remover',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.delete(`ModalidadeGrade/Excluir?IdModalidade=${dados.mgp_id}`).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: `Sucesso!`, description: `Modalidade Grade excluida com sucesso!` });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+mgp_descricao' } });\r\n } else {\r\n error('É provável que esta modalidade de grade possua um ou mais itens relacionados a algum produto cadastrado no sistema.', 'Não foi possível excluir esta modalidade de grade!');\r\n }\r\n }, erro => {\r\n error('É provável que esta modalidade de grade possua um ou mais itens relacionados a algum produto cadastrado no sistema.', 'Não foi possível excluir esta modalidade de grade!');\r\n });\r\n }\r\n });\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n {mgp_id}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modalidade de Grades',\r\n render: ({ mgp_descricao }) => (\r\n
\r\n {mgp_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { excluirRegistro(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Row, Col, Form, Select, Input, Button, Switch, Tag, Alert, Typography, Divider, Table, Modal, Tooltip, InputNumber } from \"antd\";\r\nimport { PlusOutlined, DownloadOutlined, BarcodeOutlined, SearchOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport CurrencyInput from 'react-currency-input';\r\n\r\nimport api from '../../services/api';\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { ModalGrade } from '../../components/modals';\r\nimport { InputPreco, SelectPaginacao, SelectPagination } from \"../../components\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function TabItens({ formulario, listaItensExcluir, setListaItensExcluir, listaEditarItens, setListaEditarItens, setEditandoItens }) {\r\n\r\n const [formItens] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formImportItens] = Form.useForm();\r\n const [formTableItens] = Form.useForm();\r\n const [filtros, setFiltros] = useState([]);\r\n const [itemProduto, setItemProduto] = useState(false);\r\n const [importarProduto, setImportarProduto] = useState(false);\r\n const [editiItemId, setEditiItenId] = useState({});\r\n const [visibleModalGrade, setVisibleModalGrade] = useState(false);\r\n const [grades, setGrades] = useState([]);\r\n const [subgrupos, setSubgrupos] = useState(false);\r\n const [listaPrecoSelectd, setListaPrecoSelectd] = useState(null);\r\n const [itens, setItens] = useState(() => {\r\n if (formulario.getFieldValue('ltp_id')) {\r\n let list = formulario.getFieldValue('itens');\r\n return list ? list : [];\r\n }\r\n return []\r\n });\r\n const searchInput = useRef();\r\n const [productName, setProductName] = useState('');\r\n\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ itens: itens });\r\n }, [itens])\r\n\r\n const togglePesquisa = () => {\r\n setProductName('');\r\n setItemProduto(!itemProduto);\r\n };\r\n\r\n async function onPressEnterProCodigo(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let dadosRequisicao = await api.get(`Produto/ListaProdutoFiltro?filtro=${codigoEan}`);\r\n setProductName(dadosRequisicao.data.items[0].pro_descricao);\r\n\r\n let grade = dadosRequisicao.data.items[0].prg_id;\r\n if (dadosRequisicao.data.items[0].pro_usagrade) {\r\n let itenSelected = (await api.get(`Produto/RetornaDadosItem?ProdutoId=${dadosRequisicao.data.items[0].pro_id}`)).data;\r\n setGrades([]);\r\n api.get(`ProdutoGrade/RetornaGradesProduto?produtoId=${dadosRequisicao.data.items[0].pro_id}`).then((res) => {\r\n if (res.status === 200) {\r\n let array = [...res.data].filter(item => item.prg_id == grade);\r\n array = array.map((x) => ({ ...{ ...itenSelected, ...x }, lpi_valorvenda: x.prg_valorvenda, lpi_naocalculacomissao: false }));\r\n setGrades(array);\r\n setVisibleModalGrade(true);\r\n }\r\n }).catch((err) => {\r\n console.log('error ao buscar grades :>> ', err);\r\n });\r\n }\r\n else {\r\n onChangeProdutoFiltro(dadosRequisicao.data.items[0].pro_id, 2);\r\n formulario.setFieldsValue({ pro_id: dadosRequisicao.data.items[0].pro_id });\r\n }\r\n };\r\n\r\n async function onChangeProdutoFiltro(value, chamada) {\r\n let itenSelected = (await api.get(`Produto/RetornaDadosItem?ProdutoId=${value}`)).data;\r\n\r\n if (itenSelected.pro_usagrade) {\r\n setGrades([]);\r\n api.get(`ProdutoGrade/RetornaGradesProduto?produtoId=${value}`).then((result) => {\r\n if (result.status === 200) {\r\n let array = [...result.data];\r\n array = array.map((x) => ({ ...{ ...itenSelected, ...x }, lpi_valorvenda: x.prg_valorvenda, lpi_naocalculacomissao: false }));\r\n setGrades(array);\r\n setVisibleModalGrade(true);\r\n formItens.resetFields();\r\n }\r\n }).catch((err) => {\r\n console.log('error ao buscar grades :>> ', err);\r\n });\r\n } else\r\n api.get(`ListaPrecoItem/BuscaPrecoItem?CodigoListaPreco=${formulario.getFieldValue('ltp_id')}&CodigoProduto=${value}`).then((res) => {\r\n if (res.data) {\r\n formItens.setFieldsValue(res.data);\r\n } else {\r\n api.get(`ListaPrecoItem/BuscarPrecoPadraoItem?codigoProduto=${value}`).then((res) => {\r\n if (res.status === 200) {\r\n let valorVenda = 1;\r\n if (res.data)\r\n valorVenda = res.data;\r\n formItens.setFieldsValue({\r\n lpi_valorvenda: valorVenda,\r\n lpi_perccomissao: 0,\r\n lpi_naocalculacomissao: false\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n const onSaveGrades = () => {\r\n let array = [...itens];\r\n let verify = grades.filter(x => x.lpi_valorvenda !== null && parseFloat(x.lpi_valorvenda) !== 0);\r\n if (verify.length !== 0) {\r\n grades.forEach(element => {\r\n if (element.lpi_valorvenda !== null) {\r\n let index = array.findIndex(x => x.pro_id == element.pro_id && x.prg_ean == element.prg_ean);\r\n element.lpi_valorvenda = parseFloat(element.lpi_valorvenda.toString().replaceAll(`.`, ``).replaceAll(`,`, `.`));\r\n if (index !== -1) {\r\n array[index] = element;\r\n // console.log(\"editou ==>\")\r\n } else {\r\n array.push(element);\r\n }\r\n }\r\n });\r\n setItens(array);\r\n onCloseModal();\r\n } else {\r\n Modal.warning({\r\n title: 'Atenção',\r\n icon: ,\r\n content: `Existem itens da grade que não possuem valor informado, por favor verifique-os!`,\r\n okText: 'Ok',\r\n centered: true,\r\n });\r\n }\r\n }\r\n\r\n const getColumnSearchProps = dataIndex => ({\r\n filterDropdown: ({ setSelectedKeys, selectedKeys, clearFilters }) => (\r\n
\r\n \r\n
\r\n setSelectedKeys(e.target.value ? [e.target.value] : [])}\r\n onPressEnter={() => handleSearch(selectedKeys, dataIndex, clearFilters)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n filterIcon: filtered => ,\r\n onFilter: (value, record) =>\r\n record[dataIndex] ? record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()) : '',\r\n onFilterDropdownVisibleChange: visible => {\r\n if (visible) {\r\n setTimeout(() => searchInput.current.focus());\r\n }\r\n },\r\n render: text => text\r\n });\r\n\r\n const handleSearch = (selectedKeys, dataIndex, clearFilters) => {\r\n let listaFiltros = [...filtros];\r\n let indice = listaFiltros.findIndex(f => f.campo === dataIndex);\r\n if (indice < 0) listaFiltros.push({ campo: dataIndex, valor: selectedKeys[0], clearFilters });\r\n else listaFiltros[indice].valor = selectedKeys[0];\r\n setFiltros(listaFiltros);\r\n };\r\n\r\n async function onFinishItens(values) {\r\n let produto = (await api.get(`Produto/RetornaDadosItem?ProdutoId=${formulario.getFieldValue().pro_id}`)).data;\r\n delete produto.lpi_valorvenda;\r\n delete values.produto;\r\n let array = [...itens];\r\n let index = array.findIndex(x => x.pro_id == produto.pro_id);\r\n values.pro_id = formulario.getFieldValue().pro_id;\r\n values.lpi_perccomissao = !!values.lpi_perccomissao ? values.lpi_perccomissao : 0;\r\n values.lpi_naocalculacomissao = !!values.lpi_naocalculacomissao ? values.lpi_naocalculacomissao : false;\r\n let obj = { ...produto, ...values };\r\n\r\n if (index !== -1) {\r\n array.splice(index, 1, { ...obj });\r\n setItens(array);\r\n } else\r\n setItens((prev) => ([...prev, { ...obj }]));\r\n\r\n formItens.resetFields();\r\n }\r\n\r\n function onDeleteItem(value) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o item selecionado?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n deleteItem(value);\r\n }\r\n });\r\n }\r\n\r\n function deleteItem(value) {\r\n let array = [...itens];\r\n let index = array.indexOf(value);\r\n if (index !== -1) {\r\n array.splice(index, 1);\r\n setItens(array);\r\n }\r\n let listaExcluir = [...listaItensExcluir];\r\n listaExcluir.push(value);\r\n setListaItensExcluir(listaExcluir);\r\n }\r\n\r\n const EditableCell = ({\r\n editing,\r\n dataIndex,\r\n title,\r\n inputType,\r\n record,\r\n index,\r\n children,\r\n required,\r\n ...restProps\r\n }) => {\r\n const inputNode = inputType === 'number' ? (\r\n \r\n ) : (\r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n );\r\n return (\r\n \r\n );\r\n };\r\n\r\n const editRow = (record) => {\r\n formTableItens.setFieldsValue({ ...record });\r\n setEditiItenId({ pro_id: record.pro_id, prg_ean: record.prg_ean });\r\n setEditandoItens(true);\r\n }\r\n\r\n const saveRow = async (data) => {\r\n try {\r\n const obj = await formTableItens.validateFields();\r\n if (typeof obj.lpi_valorvenda !== `number`) {\r\n obj.lpi_valorvenda = parseFloat(obj.lpi_valorvenda.toString().replaceAll(`.`, ``).replaceAll(`,`, `.`));\r\n }\r\n const array = [...itens];\r\n const index = array.findIndex(x => x === data);\r\n let reg = { ...array[index] };\r\n if (!!reg.lpi_id) {\r\n let listaEditarItensTemp = [...listaEditarItens];\r\n listaEditarItensTemp.push({ ...array[index], ...obj });\r\n setListaEditarItens(listaEditarItensTemp);\r\n }\r\n if (index !== -1) {\r\n array.splice(index, 1, { ...array[index], ...obj });\r\n setItens(array);\r\n }\r\n setEditiItenId({});\r\n setEditandoItens(false);\r\n } catch (error) {\r\n console.log('Valores inválidos ', error);\r\n }\r\n }\r\n const onCloseModal = () => setVisibleModalGrade(false);\r\n\r\n const cancelEdition = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: `Tem certeza que deseja cancelar?`,\r\n okText: 'OK',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setEditandoItens(false);\r\n setEditiItenId({});\r\n }\r\n });\r\n }\r\n\r\n const isEditing = (record) => record.pro_id === editiItemId.pro_id && record.prg_ean === editiItemId.prg_ean;\r\n\r\n const columns = [\r\n {\r\n title: 'Código',\r\n width: 75,\r\n align: 'center',\r\n render: ({ pro_codigo }) => (\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n ...getColumnSearchProps('produto'),\r\n render: ({ pro_descricao, pro_ean, prg_ean, descricaoGrade }) => (\r\n
\r\n \r\n
\r\n {pro_descricao}\r\n \r\n {pro_ean && \r\n \r\n EAN: {pro_ean}\r\n \r\n }\r\n \r\n {prg_ean && \r\n \r\n \r\n EAN Grade: {prg_ean}\r\n \r\n \r\n \r\n \r\n Grade: {descricaoGrade}\r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n {\r\n title: 'Comissão',\r\n align: 'right',\r\n dataIndex: 'lpi_perccomissao',\r\n width: '25%',\r\n editable: true,\r\n render: text => {text}%\r\n },\r\n {\r\n title: 'Valor Item (R$)',\r\n dataIndex: 'lpi_valorvenda',\r\n width: '25%',\r\n align: 'right',\r\n required: true,\r\n editable: true,\r\n render: text => {FormatNumber(text, true)}\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => {\r\n const editable = isEditing(record);\r\n return editable ? (\r\n
\r\n \r\n
\r\n saveRow(record)}\r\n icon={}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!importarProduto === false &&\r\n
\r\n
\r\n \r\n {itemProduto &&\r\n
\r\n \r\n { onPressEnterProCodigo(value) }}\r\n conteudo={\r\n pro => ({pro.pro_id} - {pro.pro_descricao})\r\n }\r\n />\r\n
\r\n {productName && (\r\n

Nome do Produto: {productName}

\r\n )}\r\n
\r\n
\r\n \r\n }\r\n {!itemProduto &&\r\n \r\n \r\n onChangeProdutoFiltro(value, 1)}\r\n conteudo={\r\n pro => ({pro.pro_id} - {pro.pro_descricao})\r\n } />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n A lista abaixo está sendo filtrada por:\r\n \r\n {filtros.map((_filtro, indice) => (\r\n {\r\n filtros[indice].clearFilters();\r\n let _filtros = [...filtros];\r\n _filtros.splice(indice, 1);\r\n setFiltros(_filtros);\r\n }} className=\"m-l-5 text-uppercase\">\r\n {`${_filtro.valor}`}\r\n \r\n ))}\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n { filtroItens(value) }} allowClear />\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {editing ? (\r\n \r\n {inputNode}\r\n \r\n ) : (\r\n children\r\n )}\r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n }\r\n \r\n\r\n {!!importarProduto === true &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onChangeListaPreco(value)}\r\n showSearch={true}\r\n allowClear={true}\r\n conteudo={\r\n lp => ({lp.ltp_nome})\r\n } />\r\n \r\n \r\n \r\n {listaPrecoSelectd != null &&
\r\n \r\n
\r\n \r\n \"Filtrar Produtos\r\n \r\n \r\n Realize o filtro dos produtos da lista de preço selecionada para importar\r\n \r\n \r\n \r\n \r\n \r\n \r\n ({mar.mar_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n onChangeGrupo(value)}\r\n conteudo={\r\n gp => ({gp.gru_nome})\r\n }\r\n />\r\n \r\n \r\n {subgrupos &&\r\n \r\n \r\n ({sgp.sgp_nome})\r\n }\r\n />\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n Total de produtos à importar: 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Tag, Button, Table, Modal, Divider, Select } from \"antd\";\r\nimport { DeleteOutlined, PlusOutlined, ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\n\r\nimport { SelectPagination } from \"../../components\";\r\nimport { FormatFone, MaskFormat } from \"../../ValueObjects\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabCliente({ formulario }) {\r\n\r\n const [form] = Form.useForm();\r\n const [clientes, setClientes] = useState(() => {\r\n if (formulario.getFieldValue('ltp_id')) {\r\n let list = formulario.getFieldValue('clientes');\r\n return list ? list : [];\r\n }\r\n return []\r\n });\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ clientes: clientes });\r\n }, [clientes])\r\n\r\n async function onAddClienteList() {\r\n let cliente = (await api.get(`Cliente/BuscarCliente/${formulario.getFieldValue().cli_id}`)).data;\r\n cliente.ltp_id = formulario.getFieldValue('ltp_id');\r\n let array = [...clientes];\r\n let index = array.findIndex(x => x.cli_id == cliente.cli_id);\r\n if (index === -1)\r\n setClientes((prev) => ([...prev, { ...cliente }]));\r\n\r\n form.resetFields();\r\n }\r\n\r\n function onDelete(value) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o cliente selecionado?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n deleteCliente(value);\r\n }\r\n })\r\n }\r\n\r\n const deleteCliente = (value) => {\r\n let array = [...clientes];\r\n let index = array.findIndex(x => x.cli_id == value.cli_id);\r\n if (index !== -1) {\r\n array.splice(index, 1);\r\n setClientes(array);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n ({c.cli_id} - {c.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {cli_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Nome',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 138,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }} expandIcon={({ record, expanded, onExpand }) => {\r\n return expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n );\r\n }} columnWidth={30} dataSource={clientes} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Modal, Tag, Button, Table, Divider, Select } from \"antd\";\r\nimport { DeleteOutlined, PlusOutlined, ExclamationCircleOutlined, } from \"@ant-design/icons\";\r\n\r\nimport { SelectPagination } from \"../../components\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabVendedor({ formulario }) {\r\n\r\n const [form] = Form.useForm();\r\n const [vendedores, setVendedores] = useState(() => {\r\n if (formulario.getFieldValue('ltp_id')) {\r\n let list = formulario.getFieldValue('vendedores');\r\n return list ? list : [];\r\n }\r\n return []\r\n });\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ vendedores: vendedores });\r\n }, [vendedores])\r\n\r\n async function onAddVendedorList() {\r\n let array = [...vendedores];\r\n let dadosVendedor = (await api.get(`Vendedor/RetornaVendedor?idVendedor=${formulario.getFieldValue().ven_id}`)).data;\r\n array.push(dadosVendedor);\r\n let key = 0;\r\n array.forEach(item => {\r\n item.key = key++;\r\n });\r\n setVendedores(array);\r\n form.resetFields();\r\n }\r\n\r\n function onDelete(value) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o vendedor selecionado?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n deleteVendedor(value);\r\n }\r\n })\r\n }\r\n\r\n const deleteVendedor = (value) => {\r\n let array = [...vendedores];\r\n let index = array.findIndex(x => x.ven_id == value.ven_id);\r\n if (index !== -1) {\r\n array.splice(index, 1);\r\n setVendedores(array);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n ({v.ven_id} - {v.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {ven_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Nome',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Tabs, Alert, Button, Modal, notification } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, CheckCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { Data, FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { compararDatas, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { TabItens, TabCliente, TabVendedor } from \"./tabPage\";\r\n\r\nexport default function ManutencaoPreco({ formulario, carregando, setExibeButtons, setCarregando, aoSalvar, onCancel }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [somenteCabecalho, setSomenteCabecalho] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [exibeItens, setExibeItens] = useState(false);\r\n const [dadosSalvos, setDadosSalvos] = useState({});\r\n const [listaItensExcluir, setListaItensExcluir] = useState([]);\r\n const [listaEditarItens, setListaEditarItens] = useState([]);\r\n const [editandoItens, setEditandoItens] = useState(false)\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n if (!!manutencao.dados) {\r\n setExibeButtons(true);\r\n setExibeItens(true);\r\n manutencao.dados.listaEmpresa = (manutencao.dados.loc_id === null);\r\n if (manutencao.dados.loc_id === null)\r\n formulario.setFieldsValue({ ltp_somenteestelocal: false });\r\n else\r\n formulario.setFieldsValue({ ltp_somenteestelocal: true });\r\n formulario.setFieldsValue(manutencao.dados);\r\n setListaEditarItens([]);\r\n setListaItensExcluir([]);\r\n } else {\r\n setExibeButtons(false);\r\n setExibeItens(false);\r\n formulario.setFieldsValue({\r\n ltp_ativa: true,\r\n listaEmpresa: true,\r\n ltp_somenteestelocal: false,\r\n ltp_consideradescontopgto: false,\r\n ltp_principal: false\r\n });\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n\r\n function modalInserirItem() {\r\n Modal.confirm({\r\n title: 'Lista de Preço Adicionada com sucesso!',\r\n icon: ,\r\n content: 'Deseja adicionar os itens na lista de preço?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk() {\r\n setExibeItens(true);\r\n setExibeButtons(true);\r\n return false;\r\n },\r\n onCancel() {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n\r\n const salvar = () => {\r\n if (editandoItens) {\r\n notification.warning({ description: \"Favor finalizar as alterações dos itens antes de salvar\", message: \"Aviso\" });\r\n return;\r\n }\r\n let values = isObjetoDiffVazio(dadosSalvos) ? dadosSalvos : formulario.getFieldsValue();\r\n values.listaItemsExcluir = listaItensExcluir;\r\n values.listaEditarItens = listaEditarItens;\r\n if ((!!values.listaItemsExcluir && values.listaItemsExcluir.length > 0) || (!!values.listaEditarItens && values.listaEditarItens.length > 0)) {\r\n values.listaprecoitens = [];\r\n } else {\r\n values.listaprecoitens = formulario.getFieldsValue().itens;\r\n }\r\n values.listaprecoclientes = values.clientes;\r\n values.listaprecovendedores = values.vendedores;\r\n if (!!values.ltp_datainicial && values.ltp_datafinal) {\r\n if (compararDatas(values.ltp_datainicial, values.ltp_datafinal, '>')) {\r\n notification.warning({ message: `Aviso!`, description: `Data Final não pode ser menor que a data Inicial!` })\r\n return false;\r\n }\r\n }\r\n\r\n setCarregando(true);\r\n if (!!values.ltp_id) {\r\n editarLista(values);\r\n } else {\r\n incluirLista(values);\r\n }\r\n };\r\n\r\n function editarLista(values) {\r\n api.put(`ListaPreco/EditarAsync`, values).then(\r\n res => {\r\n setDadosSalvos(res.data);\r\n aoSalvar();\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n notification.success({ message: `Os dados da Lista de Preço foram editados com sucesso!` });\r\n setCarregando(false);\r\n });\r\n }\r\n\r\n function incluirLista(values) {\r\n api.post(`ListaPreco/IncluirAsync`, values).then(\r\n res => {\r\n setDadosSalvos(res.data);\r\n modalInserirItem();\r\n aoSalvar();\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n notification.success({ message: `Os dados da Lista de Preço foram incluídos com sucesso!` });\r\n setCarregando(false);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Lista de preço disponível apenas para esta filial \r\n \r\n \r\n \r\n \r\n Considerar os descontos na condição de pagamento \r\n \r\n \r\n \r\n \r\n Lista Principal \r\n \r\n \r\n \r\n \r\n Lista a Ativa \r\n \r\n \r\n \r\n \r\n prev.listaEmpresa !== current.listaEmpresa}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(\"listaEmpresa\"))\r\n return (\r\n \r\n \r\n \r\n );\r\n else \r\n return (\r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n \r\n {!exibeItens &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {exibeItens &&\r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport ManutencaoPreco from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from \"../../components\";\r\nimport { drawerActions, manutencaoActions, listagemActions } from '../../actions';\r\n\r\nexport default function DrawerPreco() {\r\n\r\n const [formPreco] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [exibeButtons, setExibeButtons] = useState(false);\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ltp_id' } })\r\n formPreco.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n destroyOnClose={true}\r\n footer={exibeButtons &&\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Form, Input, Select, Table, Button, Modal, Card, Radio, InputNumber, Tag, Divider, notification } from \"antd\";\r\nimport { CloseOutlined, PlusOutlined, RedoOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { info } from \"../../services/funcoes\";\r\nimport { InputPreco, SelectPaginacao, SelectPaginado } from \"../../components\";\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { getEmpresa } from \"../../services/auth\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function AtualizarPreco({ formulario, carregando, aoSalvar }) {\r\n\r\n const [listaItens, setListaItens] = useState([]);\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [quantidadeEncontrados, setQuantidadeImportar] = useState(0);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawerExtra) {\r\n if (!!formulario.getFieldValue('itens')) {\r\n setListaItens(formulario.getFieldValue('itens'));\r\n } else {\r\n setListaItens([]);\r\n }\r\n buscarQuantidadeProdutos();\r\n if (!formulario.getFieldValue().tipoAtualizacaoPreco) {\r\n formulario.setFieldsValue({ tipoAtualizacaoPreco: 0 });\r\n }\r\n }\r\n }, [ui.showDrawerExtra]);\r\n\r\n function buscarQuantidadeProdutos() {\r\n let filtros = '';\r\n if (!!formulario.getFieldValue().mar_id) {\r\n filtros += `&idMarca=${formulario.getFieldValue().mar_id}`;\r\n }\r\n if (!!formulario.getFieldValue().gru_id) {\r\n filtros += `&idGrupo=${formulario.getFieldValue().gru_id}`;\r\n }\r\n if (!!formulario.getFieldValue().sgp_id) {\r\n filtros += `&idSubGrupo=${formulario.getFieldValue().sgp_id}`;\r\n }\r\n api.get(`ListaPreco/QuantidadeProdutosImportar?idListaOrigem=${formulario.getFieldValue().ltp_id}${filtros}`).then(res => {\r\n if (res.status === 200) {\r\n setQuantidadeImportar(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n };\r\n\r\n function limparFiltros() {\r\n formulario.setFieldsValue({ mar_id: null, gru_id: null, sgp_id: null });\r\n };\r\n\r\n function popularDadosSubGrupo(codigoGrupo) {\r\n let lista = [];\r\n lista.push({ name: \"sgp_id\", campo: \"CodigoGrupo\", value: codigoGrupo });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: {itens: lista} });\r\n };\r\n\r\n function atualizarPrecos(values) {\r\n if (parseFloat(values.reajustarValor) > 0) {\r\n let valuesEnviar = {};\r\n valuesEnviar.filtrosAdicional = null;//não implementado\r\n valuesEnviar.gru_id = !!values.gru_id ? values.gru_id : null;\r\n valuesEnviar.ltp_id = values.ltp_id;\r\n valuesEnviar.mar_id = !!values.mar_id ? values.mar_id : null;\r\n valuesEnviar.spg_id = !!values.sgp_id ? values.sgp_id : null;\r\n valuesEnviar.tipoAtualizacaoPreco = values.tipoAtualizacaoPreco;\r\n\r\n if (valuesEnviar.tipoAtualizacaoPreco === 2 || valuesEnviar.tipoAtualizacaoPreco === 4) {\r\n valuesEnviar.reajustarValor = parseFloat(values.reajustarValor) / 100;\r\n } else {\r\n valuesEnviar.reajustarValor = parseFloat(values.reajustarValor);\r\n }\r\n\r\n Modal.confirm({\r\n title: 'Confirmar atualização de preços?',\r\n icon: ,\r\n content: '',\r\n okText: 'Sim, atualizar preços',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.post('ListaPreco/AtualizarPrecosProdutos', valuesEnviar).then(res => {\r\n if (res.status === 200) {\r\n Modal.success({\r\n title: 'Preços atualizados com sucesso!',\r\n content: `Os preços dos ${listaItens.length} produtos localizados da lista ${formulario.getFieldValue().ltp_nome} foram atualizados com sucesso!`,\r\n });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ltp_id' } });\r\n aoSalvar();\r\n }\r\n }, err => {\r\n Modal.error({\r\n title: 'Atenção!',\r\n content: (\r\n
\r\n

Ocorreu um erro ao tentar realizar o reajuste de preços!

\r\n
\r\n ),\r\n });\r\n });\r\n }\r\n });\r\n } else {\r\n info('Você deve informar o valor ou percentual para realizar o reajuste de preços!');\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Atualização Atualização de Preços de Produtos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Lista de Preços: {formulario.getFieldValue().ltp_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Para realizar a atualização dos preços configure os filtros abaixo:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n {marca.mar_nome}\r\n )} onClearFunction={() => { formulario.setFieldsValue({ \"mar_id\": null }) }} />\r\n \r\n \r\n \r\n \r\n popularDadosSubGrupo(value)}\r\n conteudo={\r\n (grupo) => (\r\n {grupo.gru_nome}\r\n )} onClearFunction={() => { formulario.setFieldsValue({ \"gru_id\": null }) }} />\r\n \r\n \r\n \r\n \r\n (\r\n {subGrupo.sgp_nome}\r\n )} onClearFunction={() => { formulario.setFieldsValue({ \"sgp_id\": null }) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Definir um novo valor especifico para os produtos nesta lista de preços\r\n
\r\n Aumentar o preço de venda atual, aplicando um aumento fixo em reais (R$)\r\n
\r\n Aumentar o preço de venda atual, aplicando um aumento percentual sobre o valor de venda atual (%)\r\n
\r\n Diminuir o preço de venda atual, aplicando uma redução fixa em reais (R$)\r\n
\r\n Diminuir o preço de venda atual, aplicando uma redução percentual sobre o valor de venda atual (%)\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Produtos Encontrados\r\n \r\n \r\n \r\n \r\n \r\n \r\n {quantidadeEncontrados}\r\n \r\n \r\n \r\n \r\n \r\n prevValues.tipoAtualizacaoPreco !== currentValues.tipoAtualizacaoPreco}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('tipoAtualizacaoPreco') === 0) return (\r\n \r\n );\r\n if (getFieldValue('tipoAtualizacaoPreco') === 1) return (\r\n \r\n );\r\n if (getFieldValue('tipoAtualizacaoPreco') === 3) return (\r\n \r\n );\r\n else return (\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')} />\r\n \r\n );\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Item (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ lpi_valorvenda }) => (\r\n
\r\n {FormatNumber(lpi_valorvenda, true)}\r\n
\r\n ),\r\n }\r\n ]\r\n } expandedRowRender={({ pro_ean, descricaoGrade }) => {\r\n return (\r\n
\r\n \r\n
\r\n Código de Barras (EAN): {pro_ean}\r\n \r\n \r\n Grade: {descricaoGrade}\r\n \r\n \r\n \r\n )\r\n }} expandIconColumnIndex={-1} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { DrawerNav } from \"../../components\";\r\nimport AtualizarPreco from './atualizarPreco';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerAtualizarPreco() {\r\n\r\n const [formAtualizar] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) formAtualizar.setFieldsValue(manutencao.dados);\r\n else {\r\n //formAtualizar.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: false } });\r\n formAtualizar.resetFields();\r\n\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Popover } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, EditOutlined, SyncOutlined, PrinterOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatDate } from '../../ValueObjects';\r\nimport { DrawerPreco, DrawerAtualizarPreco } from \"./drawerPage\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacaoData, TabelaDados, Editar, Imprimir, Data, PesquisaAvancada } from \"../../components\";\r\n\r\nexport default function Preco() {\r\n\r\n const [open, setOpen] = useState(false);\r\n const [loadingEdit, setLoadingEdit] = useState(false);\r\n const [itemEdit, setItemEdit] = useState(null);\r\n const [dataAtual] = useState(new Date());\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [clientes, setClientes] = useState([]);\r\n const [vendedores, setVendedores] = useState([]);\r\n const [formPesquisaAvancada] = Form.useForm();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ltp_id' } });\r\n formulario.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n\r\n api.get('Cliente/Listar?filtro=&ordem=%2Bpes_nome').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setClientes(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n\r\n api.get('Vendedor/ListarVendedor').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setVendedores(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const loadDada = async (data) => {\r\n setItemEdit(data.ltp_id);\r\n if (!!data.ltp_datafinal) {\r\n data.ltp_datafinal = !!data.ltp_datafinal ? moment(data.ltp_datafinal) : null;\r\n }\r\n if (!!data.ltp_datainicial) {\r\n data.ltp_datainicial = !!data.ltp_datainicial ? moment(data.ltp_datainicial) : null;\r\n }\r\n if (data.loc_id == null) {\r\n data.ltp_todaempresa = true;\r\n }\r\n setLoadingEdit(true);\r\n data.itens = await getList(`ListaPrecoItem/ListarItens?codigoLista=${data.ltp_id}&Ativo=1`);\r\n data.clientes = await getList(`ListaPrecoCliente/ListarTodos?CodigoLista=${data.ltp_id}`);\r\n data.vendedores = await getList(`ListaPrecoVendedor/ListarTodos?codigoLista=${data.ltp_id}`);\r\n setLoadingEdit(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: data } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n const openAtualizarPrecos = async (data) => {\r\n data.itens = await getList(`ListaPrecoItem/ListarItens?codigoLista=${data.ltp_id}`);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: data } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: true } });\r\n }\r\n\r\n const getList = async (url) => {\r\n return await api.get(url).then((result) => {\r\n if (result.status === 200)\r\n return result.data;\r\n return [];\r\n }).catch((err) => {\r\n console.log('err request :>> ', err);\r\n return [];\r\n });\r\n };\r\n\r\n function aplicarFiltros() {\r\n let dataInicial = (!!formulario.getFieldValue().dataInicial ? FormatDate(formulario.getFieldValue().dataInicial._d.toLocaleDateString()) : moment(formulario.getFieldValue().dataPesquisa).format('YYYY-MM-DD'));\r\n let dataFinal = (!!formulario.getFieldValue().dataFinal ? FormatDate(formulario.getFieldValue().dataFinal._d.toLocaleDateString()) : FormatDate(dataAtual.toLocaleDateString()));\r\n let cliente = (!!formulario.getFieldValue().cli_id ? `&idCliente=${formulario.getFieldValue().cli_id}` : '');\r\n let vendedor = (!!formulario.getFieldValue().ven_id ? `&idVendedor=${formulario.getFieldValue().ven_id}` : '');\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ltp_id', outrosFiltros: `&dataFinal=${dataFinal}&dataInicial=${dataInicial}${cliente}${vendedor}` } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}&dataInicial=${moment(formulario.getFieldValue().dataPesquisa).format('YYYY-MM-DD')}` } });\r\n }} />\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n {\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {ltp_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ ltp_nome }) => (\r\n
\r\n {ltp_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Padrão?',\r\n width: 100,\r\n align: 'center',\r\n render: ({ ltp_principal }) => (\r\n
\r\n {ltp_principal ? 'SIM' : 'NÃO'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Inicial',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ltp_datainicial }) => (\r\n
\r\n {(ltp_datainicial ? moment(ltp_datainicial).format(\"DD/MM/YYYY\") : '')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Final',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ltp_datafinal }) => (\r\n
\r\n {(ltp_datafinal ? moment(ltp_datafinal).format(\"DD/MM/YYYY\") : '')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n align: 'center',\r\n width: 158,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n } loading={record.ltp_id === itemEdit ? loadingEdit : false} onClick={() => {\r\n loadDada(record)\r\n }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Form, Select, Input, Button, Table, Tag, Modal, notification, Switch, InputNumber, Card, Checkbox, Tooltip } from \"antd\";\r\nimport { BarcodeOutlined, CloseOutlined, CopyOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined, PrinterOutlined, SearchOutlined, TableOutlined } from \"@ant-design/icons\";\r\nimport jsreports from \"jsreports/jsreports-all\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions } from \"../../actions\";\r\nimport { getEmpresa } from \"../../services/auth\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { FormGW, SelectProduto } from \"../../components\";\r\nimport { ModalProdutoGrade } from \"../../components/modals\"\r\nimport { isNotNullOrEmpty, isObjetoDiffVazio, retornaSoNumeros, validaForm } from \"../../services/funcoes\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function ImprimirEtiqueta({ formulario }) {\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [listaPreco, setListaPreco] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const [dadosAdicionais, setDadosAdicionais] = useState(false);\r\n const [dadosEmpresa, setDadosEmpresa] = useState({});\r\n const [multiplosReg, setMultiplosReg] = useState(false);\r\n const [listaSubGrupo, setListaSubGrupo] = useState([]);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n const [filtroProd, setFiltroProd] = useState(\"\");\r\n const [atualizarListaProd, setAtualizarListaProd] = useState(false);\r\n const [consultaProduto, setConsultaProduto] = useState(true);\r\n const [recordEditando, setRecordEditando] = useState({});\r\n const [possuiGrade, setPossuiGrade] = useState(false);\r\n const [abrirModalGrade, setAbrirModalGrade] = useState(false);\r\n const codBarras = useRef();\r\n const squemaEtiquetaProduto = [\r\n {\r\n nome: 'Codigo_Empresa',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Empresa',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Produto',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Produto',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Grade',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Marca',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Preco',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Ean',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Etiqueta',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Referencia',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Observacao',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Quantidade_Parcela',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Valor_Parcelado',\r\n tipo: 'string'\r\n }\r\n ];\r\n\r\n const listaValidacao = [\r\n { nome: 'modelo', obrigatorio: true, label: 'Modelo de Etiqueta' }\r\n ];\r\n\r\n const modalExcluirItem = (record) => {\r\n Modal.confirm({\r\n title: 'Remover?',\r\n icon: ,\r\n content: `Deseja realmente remover o item selecionado?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerItem(record);\r\n }\r\n });\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setConsultaProduto(!consultaProduto);\r\n };\r\n\r\n useEffect(() => {\r\n buscarListaPreco();\r\n buscarDadosEmpresa();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!recordEditando && isObjetoDiffVazio(recordEditando)) {\r\n let dados = listaSelectPaginacao?.itens?.filter((item) => item.pro_id === recordEditando.pro_id && ((!!recordEditando.prg_id && recordEditando.prg_id === item.prg_id) || !!!recordEditando.prg_id))[0];\r\n if (!!dados) {\r\n prepararDadosEditar(recordEditando, dados);\r\n }\r\n setRecordEditando({});\r\n }\r\n }, [listaSelectPaginacao.itens]);\r\n\r\n\r\n function buscarListaPreco() {\r\n api.get('ListaPreco/ListarTodasListaPreco').then(\r\n res => {\r\n setListaPreco(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarDadosEmpresa() {\r\n api.get(`Empresa/Buscar/${getEmpresa()}`).then(\r\n res => {\r\n setDadosEmpresa(res.data)\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarSubGrupo(grupo) {\r\n api.get(`SubGrupo/ListarSemPaginacao?&Ativo=true&CodigoGrupo=${grupo}`).then(\r\n res => {\r\n setListaSubGrupo(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function popularDadosProdutonew(key, editando = false) {\r\n if (!isNotNullOrEmpty(key)) {\r\n setAtualizarListaProd(true);\r\n if (possuiGrade) {\r\n setPossuiGrade(false);\r\n }\r\n return;\r\n }\r\n let prod = {};\r\n if (!editando) {\r\n prod = listaSelectPaginacao?.itens?.filter(item => key === item.key)[0];\r\n } else {\r\n prod = listaItens.filter(item => item.key === key)[0];\r\n if (!!!prod || !isObjetoDiffVazio(prod)) {\r\n prod = listaSelectPaginacao?.itens?.filter(item => key === item.key)[0];\r\n prod = listaItens.filter(item => item.pro_id === prod.pro_id && item.prg_id === prod.prg_id)[0];\r\n }\r\n }\r\n if (prod.pro_usagrade === true) {\r\n let res = await api.get(`Produto/ListaProdutoComGradeFiltro?Filtro=${prod.prg_ean}`);\r\n prod = { ...prod, ...res.data.items[0]};\r\n }\r\n\r\n formulario.setFieldsValue({ ltp_id: null });\r\n let listaPrecosProduto = await api.get(`ListaPreco/ListarListaPrecoProduto?idProduto=${prod.pro_id}${!!prod.prg_id ? '&idProdutoGrade=' + prod.prg_id : ''}`);\r\n let listaPadraoProduto = await api.get(`ListaPreco/ListarListaPrecoProduto?idProduto=${prod.pro_id}${!!prod.prg_id ? '&idProdutoGrade=' + prod.prg_id : ''}`);\r\n if (!!prod.prg_id) {\r\n setPossuiGrade(true);\r\n }\r\n let idx = 0;\r\n listaPrecosProduto.data.forEach(item => item.key = idx++);\r\n setListaPreco(listaPrecosProduto.data);\r\n setDadosProduto(prod);\r\n setRecordEditando({});\r\n formulario.setFieldsValue({ ltp_id: listaPadraoProduto.data[0].ltp_id });\r\n };\r\n\r\n function adicionarItem(lstPreco = listaPreco, prod = dadosProduto) {\r\n let dados = [...listaItens];\r\n let obj = {};\r\n let editando = true;\r\n if (!multiplosReg) {\r\n obj = dados.find((item) => (prod.pro_id === item.pro_id && prod.prg_id === item.prg_id));\r\n if (!!!obj) {\r\n obj = prod;\r\n obj.sequencia = !!dados.length > 0 ? dados[dados.length - 1].sequencia + 1 : 1;\r\n editando = false;\r\n } else {\r\n setAtualizarListaProd(true);\r\n setFiltroProd(\"\");\r\n }\r\n obj.quantidade = parseInt(formulario.getFieldValue().quantidade);\r\n if (!!lstPreco && lstPreco.length > 0) {\r\n obj.lpi_valorvenda = lstPreco.filter((preco) => (preco.ltp_id === formulario.getFieldValue().ltp_id))[0].lpi_valorvenda;\r\n obj.observacao = formulario.getFieldValue().observacao;\r\n obj.pro_ean = !!obj.pro_ean ? obj.pro_ean : obj.prg_ean;\r\n obj.descricaograde = obj.grade;\r\n if (parseFloat(obj.lpi_valorvenda) > 0) {\r\n if (!editando) {\r\n dados.push(obj);\r\n }\r\n setListaItens(dados);\r\n setPossuiGrade(false);\r\n limparCampos();\r\n } else {\r\n notification.warning({ description: 'Tabela de preço sem valor para o produto atual', message: 'Aviso' });\r\n return false;\r\n }\r\n }\r\n } else {\r\n let filtros = '';\r\n filtros += !!formulario.getFieldValue().ltp_id ? `&listaPrecoId=${formulario.getFieldValue().ltp_id}` : '';\r\n filtros += !!formulario.getFieldValue().pro_id ? `&produtoId=${formulario.getFieldValue().pro_id}` : '';\r\n filtros += !!formulario.getFieldValue().mar_id ? `&marcaId=${formulario.getFieldValue().mar_id}` : '';\r\n filtros += !!formulario.getFieldValue().gru_id ? `&grupoId=${formulario.getFieldValue().gru_id}` : '';\r\n filtros += !!formulario.getFieldValue().sgp_id ? `&subGrupoId=${formulario.getFieldValue().sgp_id}` : '';\r\n api.get(`RelatorioModeloEtiqueta/DadosEtiquetaProduto?${filtros}`).then(\r\n res => {\r\n let qtd = 0;\r\n res.data.forEach((item) => {\r\n if (parseFloat(item.listaPrecoProduto) > 0) {\r\n item.sequencia = !!dados.length > 0 ? dados[dados.length - 1].sequencia + 1 : 1;\r\n item.quantidade = 1;\r\n item.lpi_valorvenda = item.listaPrecoProduto;\r\n item.observacao = formulario.getFieldValue().observacao;\r\n qtd++;\r\n dados.push(item);\r\n }\r\n });\r\n if (qtd === 0) {\r\n notification.warning({ description: 'Produtos sem preço de venda', message: 'Aviso' });\r\n return false;\r\n }\r\n setListaItens(dados);\r\n setPossuiGrade(false);\r\n limparCampos()\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n };\r\n\r\n function editarItem(record) {\r\n setFiltroProd(record.pro_ean);\r\n let dados = listaSelectPaginacao?.itens?.filter((item) => item.pro_id === recordEditando.pro_id && ((!!recordEditando.prg_id && recordEditando.prg_id === item.prg_id) || !!!recordEditando.prg_id))[0];\r\n if (!!!dados || !isObjetoDiffVazio(dados)) {\r\n setRecordEditando(record);\r\n } else {\r\n prepararDadosEditar(record, dados);\r\n }\r\n };\r\n\r\n function prepararDadosEditar(record, dados) {\r\n formulario.setFieldsValue({ pro_id: dados.key, prg_id: record.prg_id, quantidade: record.quantidade, observacao: record.observacao });\r\n setMultiplosReg(false);\r\n popularDadosProdutonew(dados.key, true);\r\n };\r\n\r\n function removerItem(record) {\r\n let dados = listaItens.filter((item) => item.pro_id !== record.pro_id || (item.pro_id === record.pro_id && item.prg_id !== record.prg_id));\r\n setListaItens(dados);\r\n };\r\n\r\n function limparCampos() {\r\n formulario.setFieldsValue({ pro_id: null, pro_codigo: null, quantidade: null, ltp_id: null, observacao: '', mar_id: null, gru_id: null, sgp_id: null });\r\n };\r\n\r\n\r\n function imprimir() {\r\n\r\n let idModelo = formulario.getFieldValue().modelo;\r\n api.get(`RelatorioModeloEtiqueta/Listar?id=${idModelo}`).then(\r\n res => {\r\n montarEtiqueta(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarFormulario() {\r\n if (validaForm(formulario, listaValidacao)) {\r\n imprimir();\r\n }\r\n }\r\n\r\n function retornaObjeto(listaObj) {\r\n var objRetorno = {};\r\n for (var i = 0; i < listaObj.length; i++) {\r\n for (var attrname in listaObj[i]) {\r\n objRetorno[attrname] = listaObj[i][attrname];\r\n }\r\n }\r\n return objRetorno;\r\n }\r\n\r\n function montarEtiqueta(dadosRel) {\r\n let qtd = dadosRel.quantidadeColuna;\r\n let qtdTot = 0;\r\n let campos = [];\r\n let dadosCampos = [];\r\n let listaDadosImpressora = [];\r\n let dadosImpressora = {\r\n id: \"etiqueta\",\r\n name: \"etiqueta\",\r\n };\r\n listaItens.forEach((itens) => {\r\n qtdTot += itens.quantidade;\r\n });\r\n squemaEtiquetaProduto.forEach((squema) => {\r\n for (let i = 1; i <= qtd; i++) {\r\n campos.push({ name: `${squema.nome}_Coluna_${i}`, type: squema.tipo })\r\n }\r\n });\r\n let numeroColuna = 1;\r\n let dadosAux = [];\r\n listaItens.forEach((produto) => {\r\n for (let idx = 1; idx <= produto.quantidade; idx++) {\r\n let valorParcelado = 0;\r\n let quantidadeParcela = '';\r\n if (dadosAdicionais) {\r\n let qtdParcelas = !!formulario.getFieldValue().numeroParcelas ? formulario.getFieldValue().numeroParcelas : 1;\r\n if (!!formulario.getFieldValue().possuiEntrada) {\r\n quantidadeParcela = `${qtdParcelas}x(1+${qtdParcelas - 1})`;\r\n } else {\r\n quantidadeParcela = qtdParcelas + 'x';\r\n }\r\n\r\n valorParcelado = FormatNumber(produto.lpi_valorvenda / qtdParcelas, true);\r\n }\r\n dadosAux.push({\r\n ['Codigo_Empresa_Coluna_' + numeroColuna]: getEmpresa(),\r\n ['Empresa_Coluna_' + numeroColuna]: dadosEmpresa.emp_nomefantasia,\r\n ['Codigo_Produto_Coluna_' + numeroColuna]: produto.pro_codigo,\r\n ['Produto_Coluna_' + numeroColuna]: produto.pro_descricao,\r\n ['Grade_Coluna_' + numeroColuna]: produto.descricaograde,\r\n ['Marca_Coluna_' + numeroColuna]: produto.mar_nome,\r\n ['Preco_Coluna_' + numeroColuna]: FormatNumber(produto.lpi_valorvenda, true),\r\n ['Ean_Coluna_' + numeroColuna]: produto.pro_ean,\r\n ['Codigo_Etiqueta_Coluna_' + numeroColuna]: produto.pro_codigoetiqueta,\r\n ['Codigo_Referencia_Coluna_' + numeroColuna]: produto.pro_referencia,\r\n ['Observacao_Coluna_' + numeroColuna]: produto.observacao,\r\n ['Quantidade_Parcela_Coluna_' + numeroColuna]: quantidadeParcela,\r\n ['Valor_Parcelado_Coluna_' + numeroColuna]: valorParcelado\r\n });\r\n\r\n if (numeroColuna === qtd || (qtdTot < qtd && qtdTot === numeroColuna)) {\r\n if (qtdTot < qtd) {\r\n numeroColuna++;\r\n for (let idx = numeroColuna; idx <= qtd; idx++) {\r\n dadosAux.push(retornaEtiquetaEmBranco(idx));\r\n }\r\n }\r\n dadosCampos.push(retornaObjeto(dadosAux));\r\n qtdTot = qtdTot - qtd;\r\n dadosAux = [];\r\n numeroColuna = 1;\r\n } else {\r\n numeroColuna++;\r\n }\r\n }\r\n });\r\n dadosImpressora.data = dadosCampos;\r\n dadosImpressora.schema = {\r\n fields: campos\r\n };\r\n\r\n listaDadosImpressora.push(dadosImpressora);\r\n jsreports.export({\r\n report_def: JSON.parse(dadosRel.jsonRelatorio),\r\n datasets: listaDadosImpressora,\r\n format: 'pdf',\r\n outputHandler: function (dados) {\r\n window.open(URL.createObjectURL(dados), '_blank');\r\n }\r\n })\r\n };\r\n\r\n function retornaEtiquetaEmBranco(numeroColuna) {\r\n return {\r\n ['Codigo_Empresa_Coluna_' + numeroColuna]: null,\r\n ['Empresa_Coluna_' + numeroColuna]: '',\r\n ['Codigo_Produto_Coluna_' + numeroColuna]: null,\r\n ['Produto_Coluna_' + numeroColuna]: '',\r\n ['Grade_Coluna_' + numeroColuna]: '',\r\n ['Marca_Coluna_' + numeroColuna]: '',\r\n ['Preco_Coluna_' + numeroColuna]: null,\r\n ['Ean_Coluna_' + numeroColuna]: '',\r\n ['Codigo_Etiqueta_Coluna_' + numeroColuna]: null,\r\n ['Codigo_Referencia_Coluna_' + numeroColuna]: '',\r\n ['Observacao_Coluna_' + numeroColuna]: '',\r\n ['Quantidade_Parcela_Coluna_' + numeroColuna]: null,\r\n ['Valor_Parcelado_Coluna_' + numeroColuna]: null\r\n }\r\n };\r\n\r\n function limparItens() {\r\n setListaItens([]);\r\n };\r\n\r\n async function buscarProdutoCodBarra(codigoBarras) {\r\n let dados = [...listaItens];\r\n let res = await api.get(`Produto/ListaProdutoComGradeFiltro?Filtro=${codigoBarras}`);\r\n codBarras.current.focus();\r\n if (!!res.data && res.data.items.length > 0) {\r\n let prod = res.data.items[0];\r\n let obj = dados.filter((item) => item.pro_id === prod.pro_id && ((!!prod.prg_id && prod.prg_id === item.prg_id) || !!!prod.prg_id))[0];\r\n let qtd = 1;\r\n if (!!obj && isObjetoDiffVazio(obj)) {\r\n qtd = obj.quantidade + 1;\r\n }\r\n setDadosProduto(prod);\r\n \r\n let listaPrecosProduto = await api.get(`ListaPreco/ListarListaPrecoProduto?idProduto=${prod.pro_id}${!!prod.prg_id ? '&idProdutoGrade=' + prod.prg_id : ''}`);\r\n let listaPadraoProduto = await api.get(`ListaPreco/ListaPrecoPadraoProduto?idProduto=${prod.pro_id}${!!prod.prg_id ? '&IdProdutoGrade=' + prod.prg_id : ''}`);\r\n let idx = 0;\r\n listaPrecosProduto.data.forEach(item => item.key = idx++);\r\n setListaPreco(listaPrecosProduto.data);\r\n formulario.setFieldsValue({ ltp_id: listaPadraoProduto.data[0]?.ltp_id, quantidade: qtd });\r\n adicionarItem(listaPrecosProduto.data, prod);\r\n } else {\r\n notification.warning({ description: 'Produto não localizado', message: 'Atenção!' })\r\n }\r\n };\r\n\r\n function exibirTodasGrades() {\r\n setAbrirModalGrade(true);\r\n };\r\n\r\n function aoFecharModalGrade(dados) {\r\n if (!!dados && dados.length > 0) {\r\n adicionarItensGrade(dados);\r\n }\r\n setAbrirModalGrade(false);\r\n };\r\n\r\n function adicionarItensGrade(listaGrade) {\r\n let dados = [...listaItens];\r\n let obj = {};\r\n if (!!!listaGrade || listaGrade.length === 0) {\r\n return false;\r\n }\r\n listaGrade.forEach((grade, indice) => {\r\n obj = dados.find((item) => (grade.pro_id === item.pro_id && grade.prg_id === item.prg_id));\r\n if (!!!obj) {\r\n obj = grade;\r\n obj.sequencia = !!dados.length > 0 ? dados[dados.length - 1].sequencia + 1 : 1;\r\n obj.observacao = \"\";\r\n obj.pro_ean = !!obj.prg_ean ? obj.prg_ean : obj.pro_ean;\r\n }\r\n obj.quantidade = parseInt(grade.quantidade);\r\n dados.push(obj);\r\n\r\n if (indice === listaGrade.length - 1) {\r\n setListaItens(dados);\r\n setPossuiGrade(false);\r\n limparCampos();\r\n }\r\n });\r\n\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n { adicionarItem() }}>\r\n \r\n \r\n \r\n (\r\n {modelo.nome}\r\n )} />\r\n \r\n \r\n \r\n {!multiplosReg &&\r\n \r\n {!!consultaProduto && \r\n \r\n { popularDadosProdutonew(formulario.getFieldValue().pro_id) }}\r\n ordem={\"pro_id\"} \r\n filtroPesq={filtroProd} \r\n atualizaComponente={atualizarListaProd} \r\n />\r\n \r\n \r\n }\r\n {!!!consultaProduto && \r\n \r\n {\r\n const value = e.target.value;\r\n if (value.trim()) {\r\n buscarProdutoCodBarra(value)\r\n } else {\r\n notification.warning({ description: 'Informe o código do Produto', message: 'Atenção!' })\r\n }\r\n }} \r\n placeholder=\"Informe o Produto/Mercadoria\" \r\n />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n {!multiplosReg &&\r\n \r\n \r\n {!!consultaProduto && possuiGrade && \r\n \r\n }\r\n {!!consultaProduto &&\r\n <>\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n }\r\n \r\n {multiplosReg &&
\r\n \r\n
\r\n \r\n (\r\n {listaPre.ltp_nome}\r\n )} />\r\n \r\n \r\n \r\n \r\n ({marca.mar_nome})} />\r\n \r\n \r\n \r\n \r\n ({grupo.gru_nome})} onChangeFunction={(rec) => { buscarSubGrupo(rec) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {listaItens.length > 0 &&
(\r\n
\r\n \r\n
\r\n \r\n {sequencia}\r\n \r\n \r\n \r\n {pro_codigo} - {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {pro_ean}\r\n \r\n {!!descricaograde && \r\n Grade: {descricaograde}\r\n }\r\n \r\n \r\n )\r\n }, {\r\n title: 'Valor Unit. (R$)',\r\n align: 'right',\r\n width: 150,\r\n align: 'center',\r\n render: ({ lpi_valorvenda }) => (\r\n
\r\n {FormatNumber(lpi_valorvenda, true)}\r\n
\r\n )\r\n }, {\r\n title: 'Quant. Etiqueta',\r\n width: 120,\r\n align: 'center',\r\n render: ({ quantidade }) => (\r\n
\r\n {quantidade}\r\n
\r\n )\r\n }, {\r\n title: 'Ações',\r\n fixed: 'right',\r\n width: 65,\r\n align: 'center',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n { setDadosAdicionais(!dadosAdicionais) }} />\r\n \r\n \r\n \r\n {dadosAdicionais && \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Possui Entrada?\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { aoFecharModalGrade(dados) }} />\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Form } from \"antd\";\r\nimport { MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport ImprimirEtiqueta from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\n\r\nexport default function DrawerImprimirEtiqueta() {\r\n\r\n const [formImprimirEtiqueta] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formImprimirEtiqueta.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={() => {\r\n formImprimirEtiqueta.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }}\r\n >\r\n \r\n \r\n\r\n )\r\n}","import React, { useState } from 'react';\r\nimport { Form } from \"antd\";\r\nimport { MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions } from '../../actions';\r\nimport ServidorImpressao from './servidorImpressao';\r\n\r\nexport default function DrawerServidorImpressao({ servidor }) {\r\n\r\n const [formImprimirEtiqueta] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (!!manutencao.dados) formImprimirEtiqueta.setFieldsValue(manutencao.dados);\r\n else {\r\n //formImprimirEtiqueta.resetFields();\r\n }\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formImprimirEtiqueta.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: false } });\r\n }\r\n\r\n return (\r\n\r\n }\r\n fecharDrawerExtra={() => {\r\n formImprimirEtiqueta.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: false } });\r\n }}>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Button, Card, notification } from \"antd\";\r\nimport { PrinterOutlined } from \"@ant-design/icons\";\r\n\r\nimport \"./index.less\";\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions } from '../../actions';\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { BreadcrumbPage } from \"../../components\";\r\nimport { DrawerImprimirEtiqueta, DrawerServidorImpressao } from './drawerPages';\r\nimport { carregarConfiguracoes, ServidorImpressoraOnline } from \"../../services/servidorImpressora\";\r\n\r\nexport default function Etiqueta() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [servidorOn, setServidorOn] = useState(true);\r\n \r\n useEffect(() => {\r\n verificarServidor();\r\n }, []);\r\n\r\n async function verificarServidor() {\r\n let servidorOn = await ServidorImpressoraOnline();\r\n if (servidorOn.online) {\r\n let conf = await carregarConfiguracoes();\r\n if (!!conf) {\r\n if (!!!conf.impressoraEtiqueta || !isObjetoDiffVazio(conf.impressoraEtiqueta)) {\r\n notification.warn({ description: 'Você deve configurar a impressora de etiquetas a ser utilizada nesse computador!', message: 'Aviso' });\r\n //setServidorOn(false);\r\n } else if (!!!conf.modeloEtiqueta || !isObjetoDiffVazio(conf.modeloEtiqueta)) {\r\n notification.warn({ description: 'Você deve configurar o modelo de etiquetas padrão a ser utilizado nesse computador!', message: 'Aviso' });\r\n //setServidorOn(false);\r\n }\r\n\r\n }\r\n } else {\r\n notification.warn({ description: 'O Servidor de impressão não esta em execução nesse computador, para utilizar impressoras de etiquetas verifique as configurações!', message: 'Aviso' });\r\n setServidorOn(false);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Selecione a impressora que deseja imprimir as etiquetas.\r\n \r\n \r\n \r\n \r\n \r\n
{\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }}>\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
{\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: true } });\r\n }}>\r\n } size=\"large\" type=\"primary\">\r\n Servidor de Impressão\r\n \r\n }>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Card, Typography, Select, Button, Radio, Table, Modal, Tag, Divider } from \"antd\";\r\nimport { EditOutlined, CloseOutlined, ArrowUpOutlined, ArrowDownOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { arredonda, isNotNullOrEmpty } from \"../../services/funcoes\";\r\nimport { FormatarQuantidade, FormatDate, FormatNumber } from \"../../ValueObjects\";\r\nimport { BreadcrumbAbrirChamado, Data } from \"../../components\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { Link } from \"@material-ui/core\";\r\nimport { ModalGradeEstoque } from \"../../components/modals\";\r\n\r\nexport default function ResumoProduto() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaProdutos, setListaProdutos] = useState([]);\r\n const [dadosProdutoGrade, setDadosProdutoGrade] = useState({});\r\n const [openGradeProduto, setOpenGradeProduto] = useState(false);\r\n const [openProduto, setOpenProduto] = useState(false);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n const [dadosUltimaVenda, setDadosUltimaVenda] = useState({});\r\n const [dadosUltimaCompra, setDadosUltimaCompra] = useState({});\r\n const [dadosUltimosCustos, setDadosUltimosCustos] = useState({});\r\n const [listaNotasVenda, setListaNotasVenda] = useState([]);\r\n const [listaNotasCompra, setListaNotasCompra] = useState([]);\r\n const [dadosCondicionais, setDadosCondicionais] = useState([]);\r\n const [listaOrdemCompra, setListaOrdemCompra] = useState([]);\r\n const [listaPedidos, setListaPedidos] = useState([]);\r\n const [listaMovimentacoes, setListaMovimentacoes] = useState([]);\r\n const [listaPreco, setListaPreco] = useState([]);\r\n const [dadosEstoque, setDadosEstoque] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const [totalEstoque, setTotalEstoque] = useState(0);\r\n const [casasDecimaisUnidadeMedida, setCasasDecimaisUnidadeMedida] = useState(0);\r\n const [totalVef, setTotalVef] = useState(0);\r\n const [totalPedido, setTotalPedido] = useState(0);\r\n const [totalCondicional, setTotalCondicional] = useState(0);\r\n const [totalInicial, SetTotalInicial] = useState(0);\r\n const [totalPrevisoes, setTotalPrevisoes] = useState(0);\r\n const [openModalEstoque, setOpenModalEstoque] = useState(false);\r\n const [movtotalQtdeEntrada, setMovtotalQtdeEntrada] = useState(0);\r\n const [movtotalQtdeSaida, setMovtotalQtdeSaida] = useState(0);\r\n const [movtotalvalorEntrada, setMovtotalvalorEntrada] = useState(0);\r\n const [movtotalvalorsaida, setMovtotalvalorsaida] = useState(0);\r\n const [qtdeTotalVenda, setQtdeTotalVenda] = useState(0);\r\n const [valorTotalVenda, setValorTotalVenda] = useState(0);\r\n const [qtdeTotalCompra, setQtdeTotalCompra] = useState(0);\r\n const [valorTotalCompra, setValorTotalCompra] = useState(0);\r\n const alterarProduto = () => {\r\n setOpenProduto(!openProduto);\r\n };\r\n\r\n const Movimentacoes = () => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n Totalizador: \r\n \r\n \r\n Qtde Entrada: {FormatarQuantidade(movtotalQtdeEntrada, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n \r\n Valor Entrada: R${FormatNumber(movtotalvalorEntrada, true)}\r\n \r\n \r\n \r\n Total Saída: {FormatarQuantidade(movtotalQtdeSaida, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n Valor Saída: R${FormatNumber(movtotalvalorsaida, true)}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const Venda = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n Totalizador: \r\n \r\n \r\n {FormatarQuantidade(qtdeTotalVenda, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(valorTotalVenda, true)}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const Compra = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n Totalizador: \r\n \r\n \r\n {FormatNumber(qtdeTotalCompra, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(valorTotalCompra, true)}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const footer = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n Totalizador: \r\n \r\n \r\n {dadosEstoque.possuiGrade ? \r\n {FormatarQuantidade(totalInicial, casasDecimaisUnidadeMedida)}\r\n : null}\r\n \r\n \r\n {FormatarQuantidade(totalEstoque, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n {FormatarQuantidade(totalVef, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n {FormatarQuantidade(totalPedido, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n {FormatarQuantidade(totalCondicional, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n {FormatarQuantidade(totalPrevisoes, casasDecimaisUnidadeMedida)}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n useEffect(() => {\r\n api.get(`Produto/ListaProdutoFiltro?filtro=&ordem=%2Bpro_descricao`).then(res => {\r\n if (res.status === 200) {\r\n setListaProdutos(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ periodo: 2 });\r\n montarFiltro(false);\r\n if (!!manutencao.dados && !!manutencao.dados.pro_id) {\r\n setDadosProduto(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (JSON.stringify(dadosProduto) !== '{}' && !!dadosProduto.pro_id) {\r\n listarDados(dadosProduto);\r\n }\r\n }, [dadosProduto]);\r\n\r\n function onChangeProId(value) {\r\n api.get(`Produto/RetornaDadosProduto?ProdutoId=${value}`).then(\r\n res => {\r\n if (!!res.data) {\r\n setDadosProduto(res.data);\r\n }\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n );\r\n };\r\n\r\n function listarDados(produto = dadosProduto) {\r\n let dataInicial;\r\n let dataFinal;\r\n if (!!!formulario.getFieldValue().dataInicial || !!!formulario.getFieldValue().dataFinal) {\r\n let dataInicial = retornaDataInicial();\r\n\r\n dataInicial = FormatDate(moment(dataInicial).toDate().toLocaleDateString());\r\n dataFinal = FormatDate(moment(new Date()).toDate().toLocaleDateString());\r\n } else {\r\n dataInicial = FormatDate(formulario.getFieldValue().dataInicial.toDate().toLocaleDateString());\r\n dataFinal = FormatDate(formulario.getFieldValue().dataFinal.toDate().toLocaleDateString());\r\n }\r\n if (JSON.stringify(produto) !== '{}') {\r\n api.get(`NotaFiscal/RetornaDadosUltimaCompraVendaCRM?IdProduto=${produto.pro_id}&tiponota=0`).then(res => {\r\n if (res.status === 200 && !!res.data) {\r\n setDadosUltimaVenda(res.data);\r\n } else {\r\n setDadosUltimaVenda({});\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`NotaFiscal/RetornaDadosUltimaCompraVendaCRM?IdProduto=${produto.pro_id}&tiponota=1`).then(res => {\r\n if (res.status === 200 && !!res.data) {\r\n setDadosUltimaCompra(res.data);\r\n } else {\r\n setDadosUltimaCompra({});\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Produto/BuscarUltimoCustoProduto?idProduto=${produto.pro_id}`).then(res => {\r\n if (res.status === 200 && !!res.data) {\r\n setDadosUltimosCustos(res.data);\r\n } else {\r\n setDadosUltimosCustos({});\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`ListaPreco/ListarListaPrecoProduto?idProduto=${produto.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n setListaPreco(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Estoque/Listar?CodProduto=${produto.pro_id}&TipoLista=5`).then(res => {\r\n if (res.status === 200) {\r\n setDadosEstoque(res.data.items);\r\n setCasasDecimaisUnidadeMedida(res.data.items[0].ump_casasdecimais);\r\n setTotalEstoque(res.data.items[0].totalEstoque);\r\n setTotalVef(res.data.items[0].totalVef);\r\n setTotalPedido(res.data.items[0].totalPedido);\r\n setTotalCondicional(res.data.items[0].totalCondicional);\r\n SetTotalInicial(res.data.items[0].totalInicial)\r\n setTotalPrevisoes(res.data.items[0].totalPrevisoes);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`NotaFiscal/RetornaDadosCompraVendaCRMProduto?idProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}&tiponota=0`).then(res => {\r\n if (res.status === 200) {\r\n setQtdeTotalVenda(res.data[0].qtdeTipo);\r\n setValorTotalVenda(res.data[0].valorTipo);\r\n setListaNotasVenda(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`NotaFiscal/RetornaDadosCompraVendaCRMProduto?idProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}&tiponota=1`).then(res => {\r\n if (res.status === 200) {\r\n setQtdeTotalCompra(res.data[0].qtdeTipo);\r\n setValorTotalCompra(res.data[0].valorTipo);\r\n setListaNotasCompra(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`VendaCondicional/RetornaDadosCondicionaisCRMProduto?idProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}`).then(res => {\r\n if (res.status === 200) {\r\n setDadosCondicionais(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`VendaCondicional/RetornaDadosCondicionaisCRMProduto?idProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}`).then(res => {\r\n if (res.status === 200) {\r\n setDadosCondicionais(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`OrdemCompra/RetornaDadosOrdemCompraCRMProduto?idProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}`).then(res => {\r\n if (res.status === 200) {\r\n setListaOrdemCompra(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`Pedido/RetornaDadosPedidoCRMProduto?IdProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}`).then(res => {\r\n if (res.status === 200) {\r\n setListaPedidos(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get(`Estoque/RetornaDadosMovimentacaoEstoqueCRMProduto?CodigoProduto=${produto.pro_id}&dataFinal=${dataFinal}&dataInicial=${dataInicial}`).then(res => {\r\n if (res.status === 200) {\r\n res.data.map((movimento) => {\r\n movimento.key = movimento.codigoMovimento;\r\n });\r\n setMovtotalQtdeEntrada(res.data[0].qtdeEntrada);\r\n setMovtotalQtdeSaida(res.data[0].qtdeSaida);\r\n setMovtotalvalorEntrada(res.data[0].valorEntrada);\r\n setMovtotalvalorsaida(res.data[0].valorSaida);\r\n setListaMovimentacoes(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function filtrarProduto(pro_id) {\r\n api.get(`Produto/RetornaDadosProduto?ProdutoId=${pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n setDadosProduto(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n };\r\n\r\n function montarFiltro(listar = true) {\r\n let dataInicial = retornaDataInicial();\r\n\r\n formulario.setFieldsValue({ dataInicial: moment(dataInicial), dataFinal: moment(new Date()) });\r\n\r\n if (listar) {\r\n listarDados();\r\n }\r\n };\r\n\r\n function retornaDataInicial() {\r\n let periodo = isNotNullOrEmpty(formulario.getFieldValue().periodo) ? formulario.getFieldValue().periodo : 2;\r\n\r\n let dataInicial = new Date();\r\n switch (periodo) {\r\n case 0:\r\n dataInicial = new Date(new Date().getFullYear() - 1, new Date().getMonth(), new Date().getDate());\r\n break;\r\n case 1:\r\n dataInicial = new Date(new Date().getFullYear(), new Date().getMonth() - 6, new Date().getDate());\r\n break;\r\n case 2:\r\n dataInicial = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 30);\r\n break;\r\n };\r\n return dataInicial;\r\n };\r\n\r\n function listarGrades(record) {\r\n setDadosProdutoGrade(record);\r\n setOpenModalEstoque(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n { montarFiltro() }}>\r\n 1 Ano\r\n 6 Meses\r\n Últimos 30 dias\r\n \r\n \r\n \r\n \r\n \r\n \r\n { listarDados() }} label=\"Data Inicial\" name=\"dataInicial\" />\r\n \r\n \r\n { listarDados() }} label=\"Data Final\" name=\"dataFinal\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n alterarProduto()} icon={openProduto ? : } />\r\n }>\r\n {!!openProduto === true &&\r\n \r\n \r\n \r\n onChangeProId(cod)} conteudo={\r\n pro => ({pro.pro_id} - {pro.pro_descricao}\r\n {(!!pro.pro_ean ?
EAN/GTIN: {pro.pro_ean}
: \"\")}\r\n {(!!pro.descricaograde ?
Grade: {pro.descricaograde}
: \"\")}\r\n {(!!pro.pro_codigoetiqueta ?
Cód. Etiqueta: {pro.pro_codigoetiqueta}
: \"\")}\r\n
)\r\n }\r\n />\r\n
\r\n \r\n \r\n }\r\n \r\n \r\n \r\n {!!dadosProduto && !!dadosProduto.pro_descricao ? dadosProduto.pro_descricao : 'Não localizado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
(\r\n
\r\n {loc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n width: 98,\r\n align: 'center',\r\n render: (dadosEstoque) => (\r\n dadosEstoque.possuiGrade ? (\r\n
\r\n listarGrades(dadosEstoque)}>\r\n Estoque Grade\r\n \r\n
\r\n ) : null\r\n ),\r\n },\r\n {\r\n title: 'Un. Medida',\r\n align: 'center',\r\n width: 120,\r\n render: ({ ump_id }) => (\r\n
\r\n {ump_id}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Preço (R$)',\r\n align: 'right',\r\n render: ({ precoVendaMinimo, precoVendaMaximo }) => (\r\n
\r\n {parseFloat(precoVendaMaximo) > parseFloat(precoVendaMinimo) ?
\r\n {FormatNumber(precoVendaMinimo, true)} \r\n até {FormatNumber(precoVendaMaximo, true)} \r\n
:
\r\n {FormatNumber(precoVendaMinimo, true)} \r\n
}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Inicial',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pre_dataposicao }) => (\r\n
\r\n {pre_dataposicao ? moment(pre_dataposicao).format(\"DD/MM/YYYY\") : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Posição Inicial',\r\n align: 'center',\r\n width: 110,\r\n render: ({ estoqueInicial, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(estoqueInicial, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Estoque',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pre_qtde, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(pre_qtde, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'V.E.F',\r\n align: 'center',\r\n width: 80,\r\n render: ({ pre_qtdevef, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(pre_qtdevef, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Pedido',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pre_qtdePedido, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(pre_qtdePedido, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Condicional',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pre_qtdeCondicional, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(pre_qtdeCondicional, ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Previsão',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pre_qtde, pre_qtdePedido, pre_qtdevef, pre_qtdeCondicional, ump_casasdecimais }) => (\r\n
\r\n {FormatarQuantidade(parseFloat(pre_qtde) - parseFloat(pre_qtdePedido) - parseFloat(pre_qtdevef) - parseFloat(pre_qtdeCondicional), ump_casasdecimais)}\r\n
\r\n ),\r\n },\r\n ]}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Nº Nota\r\n \r\n \r\n {!!dadosUltimaVenda.ntf_numero ? dadosUltimaVenda.ntf_numero : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Data\r\n \r\n \r\n {!!dadosUltimaVenda.ntf_dataemissao ? moment(dadosUltimaVenda.ntf_dataemissao).format(\"DD/MM/YYYY\") : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qtde\r\n \r\n \r\n {!!dadosUltimaVenda.nfi_qtde ? FormatarQuantidade(dadosUltimaVenda.nfi_qtde, casasDecimaisUnidadeMedida) : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n R$\r\n \r\n \r\n {FormatNumber(!!dadosUltimaVenda.totalItem ? dadosUltimaVenda.totalItem : 0, true, false)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Nº Nota\r\n \r\n \r\n {!!dadosUltimaCompra.ntf_numero ? dadosUltimaCompra.ntf_numero : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Data\r\n \r\n \r\n {!!dadosUltimaCompra.ntf_dataemissao ? moment(dadosUltimaCompra.ntf_dataemissao).format(\"DD/MM/YYYY\") : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qtde\r\n \r\n \r\n {!!dadosUltimaCompra.nfi_qtde ? FormatarQuantidade(dadosUltimaCompra.nfi_qtde, casasDecimaisUnidadeMedida) : ''}\r\n \r\n \r\n \r\n \r\n \r\n \r\n R$\r\n \r\n \r\n {FormatNumber(!!dadosUltimaCompra.totalItem ? dadosUltimaCompra.totalItem : 0, true, false)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Última Compra (R$)\r\n \r\n \r\n {FormatNumber(!!dadosUltimosCustos.pre_custoultimacompra ? dadosUltimosCustos.pre_custoultimacompra : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Custo Médio (R$)\r\n \r\n \r\n {FormatNumber(!!dadosUltimosCustos.pre_valorcustomedio ? dadosUltimosCustos.pre_valorcustomedio : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Com ICMS (R$)\r\n \r\n \r\n {FormatNumber(!!dadosUltimosCustos.pre_custocomicms ? dadosUltimosCustos.pre_custocomicms : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sem ICMS (R$)\r\n \r\n \r\n {FormatNumber(!!dadosUltimosCustos.pre_custosemicms ? dadosUltimosCustos.pre_custosemicms : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Informado (R$)\r\n \r\n \r\n {FormatNumber(!!dadosUltimosCustos.pre_valorcustoinformado ? dadosUltimosCustos.pre_valorcustoinformado : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {ser_serie}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: 85,\r\n align: 'center',\r\n render: ({ numeroNota }) => (\r\n
\r\n {numeroNota}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 450,\r\n render: ({ pessoaNome }) => (\r\n
\r\n {pessoaNome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataEmissao }) => (\r\n
\r\n {moment(dataEmissao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Unit.',\r\n align: 'right',\r\n width: 95,\r\n render: ({ valorTotal, quantidade }) => (\r\n
\r\n {FormatNumber(valorTotal / quantidade, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'right',\r\n width: 95,\r\n render: ({ quantidade }) => (\r\n
\r\n {FormatarQuantidade(quantidade, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n width: 120,\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {numeroNota}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Fornecedor',\r\n render: ({ pessoaNome }) => (\r\n
\r\n {pessoaNome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataEmissao }) => (\r\n
\r\n {moment(dataEmissao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'right',\r\n width: 95,\r\n render: ({ quantidade }) => (\r\n
\r\n {FormatarQuantidade(quantidade, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {codigoCondicional}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Situação',\r\n width: 125,\r\n render: ({ situacao }) => (\r\n
\r\n {situacao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n render: ({ nomeCliente }) => (\r\n
\r\n {nomeCliente}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataCondicional }) => (\r\n
\r\n {moment(dataCondicional).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde Dev.',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ qtdeDevol }) => (\r\n
\r\n {FormatarQuantidade(qtdeDevol, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ qtde }) => (\r\n
\r\n {FormatarQuantidade(qtde, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {codigoOrdemCompra}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Fornecedor',\r\n render: ({ nomeFornecedor }) => (\r\n
\r\n {nomeFornecedor}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataOrdemCompra }) => (\r\n
\r\n {moment(dataOrdemCompra).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {numeroPedido}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente/Fornecedor',\r\n width: 750,\r\n render: ({ pessoaNome }) => (\r\n
\r\n {pessoaNome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataPedido }) => (\r\n
\r\n {moment(dataPedido).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Unit.',\r\n align: 'right',\r\n width: 95,\r\n render: ({ valorUnitario }) => (\r\n
\r\n {FormatNumber(valorUnitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'right',\r\n width: 95,\r\n render: ({ quantidade }) => (\r\n
\r\n {FormatarQuantidade(quantidade, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 120,\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n align: 'right',\r\n width: 120,\r\n render: ({ statusAtual }) => (\r\n
\r\n {statusAtual}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n {ser_serie}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Operação',\r\n width: 200,\r\n render: ({ ope_descricao }) => (\r\n
\r\n {ope_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº Nota',\r\n width: 120,\r\n render: ({ numeroNota }) => (\r\n
\r\n {numeroNota}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 450,\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 95,\r\n render: ({ dataPosicao }) => (\r\n
\r\n {moment(dataPosicao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Unit.',\r\n align: 'right',\r\n width: 95,\r\n render: ({ vlrUnitario }) => (\r\n
\r\n {FormatNumber(vlrUnitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'right',\r\n width: 95,\r\n render: ({ quantidade }) => (\r\n
\r\n {FormatarQuantidade(quantidade, casasDecimaisUnidadeMedida)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 120,\r\n render: ({ vlrTotalItem }) => (\r\n
\r\n {FormatNumber(vlrTotalItem, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n align: 'right',\r\n width: 120,\r\n render: ({ tipoRegistro }) => (\r\n
\r\n {tipoRegistro}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} columnWidth={30} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {ltp_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ lpi_valorvenda }) => (\r\n
\r\n {FormatNumber(lpi_valorvenda, true)}\r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenModalEstoque(false)} />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Divider, Form, Row, Select, Typography } from \"antd\";\r\nimport { SelectPaginado } from \"../../components\";\r\n\r\nexport default function TabServicoTributacao({ formulario }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados Tributários\r\n \r\n \r\n Defina as Tributações do Serviço.\r\n \r\n \r\n \r\n \r\n \r\n \r\n ({ser.csv_id} - {ser.csv_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n ({pis.pis_id} - {pis.pis_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Input, Row, Col, Tabs, Select, Checkbox, notification } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { Data, FormGW, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport TabServicoTributacao from \"./tabServicoTributacao\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport DrawerGrupoProduto from \"../grupoProdutos/drawer\";\r\nimport DrawerSubGrupo from \"../subGrupo/drawer\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ManutencaoServico({ formulario, salvandoDados, aoSalvar, editando }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaUnidadeMedida, setListaUnidadeMedida] = useState([]);\r\n const [filtroGrupo, setFiltroGrupo] = useState(null);\r\n const [grupoSelect, setGrupoSelect] = useState([]);\r\n const [openDrawerGrupo, setOpenDrawerGrupo] = useState(false);\r\n const [openDrawerSubGp, setOpenDrawerSubGp] = useState(false);\r\n const [foundGroup, setFoundGroup] = useState([]);\r\n\r\n const trocaAbas = (pag) => {\r\n setAbaSelecionada(pag);\r\n }\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!editando) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n } else if (manutencao.dados !== null && !editando) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n carregarListas();\r\n }, []);\r\n\r\n useEffect(() => {\r\n const found = grupoSelect.find(element => element.gru_id === formulario.getFieldValue(['gru_id']));\r\n if (!!found) {\r\n setFoundGroup(found);\r\n carregarSubGrupos(found.gru_id);\r\n }\r\n }, [formulario.getFieldValue(['gru_id'])]);\r\n\r\n async function carregarListas() {\r\n let unidade = await api.get(`unidademedida/listar?PageSize=100&PageNumber=1`);\r\n if (!!formulario.getFieldValue().ump_id && unidade.data?.items.length > 0 && !unidade.data?.items?.find((un) => { return un.ump_id === formulario.getFieldValue().ump_id })) {\r\n formulario.setFieldsValue({ ump_id: null });\r\n }\r\n setListaUnidadeMedida(unidade.data?.items);\r\n }\r\n\r\n function carregarSubGrupos(CodigoGrupo) {\r\n if (!!CodigoGrupo) {\r\n setFiltroGrupo(`&CodigoGrupo=${CodigoGrupo}`);\r\n let lista = [];\r\n if (!!formulario.getFieldValue().gru_id) {\r\n lista.push({ name: 'sgp_id', campo: 'CodigoGrupo', value: formulario.getFieldValue().gru_id });\r\n }\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosGrupo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: 'gru_id', campo: 'CodigoGrupo', value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function salvandoDadosSubGrupo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: 'gru_id', campo: 'CodigoGrupo', value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n async function salvarDados(values) {\r\n let dadosServico = { ...values, ...formulario.getFieldsValue() };\r\n\r\n if (dadosServico.lpi_valorvenda === 0) {\r\n notification.warning({ message: 'Atenção!', description: 'Informe o valor do Preço de Venda' });\r\n return;\r\n }\r\n if (validarForm(dadosServico, listaValidacoes)) {\r\n if (dadosServico.pro_id) {\r\n editarManutencao(dadosServico);\r\n } else {\r\n incluirManutencao(dadosServico);\r\n }\r\n }\r\n }\r\n\r\n const listaValidacoes = [\r\n { nome: 'pro_descricao', obrigatorio: true, label: 'Descrição' },\r\n { nome: 'ump_id', obrigatorio: true, label: 'Unidade de Medida' },\r\n { nome: 'csv_id', obrigatorio: true, label: 'Tipo de Serviço' }\r\n ];\r\n\r\n function validarForm(values, listaValidacoes) {\r\n let retorno = false;\r\n if (!!listaValidacoes) {\r\n let msgRetorno = [];\r\n listaValidacoes.forEach(\r\n (validacao) => {\r\n if (validacao.obrigatorio && (!!values[validacao.nome] === false && values[validacao.nome] !== 0)) {\r\n msgRetorno.push('O campo ' + validacao.label + ' é obrigatório!');\r\n }\r\n }\r\n );\r\n if (msgRetorno.length > 0) {\r\n notification.warning({ message: 'Aviso', description: msgRetorno.join('\\n') })\r\n } else {\r\n retorno = true;\r\n }\r\n\r\n }\r\n return retorno;\r\n }\r\n\r\n\r\n async function editarManutencao(dadosServico) {\r\n api.put(`Produto/EditarServico`, dadosServico).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Serviço foram salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n aoSalvar();\r\n salvandoDados(false);\r\n }\r\n );\r\n }\r\n\r\n async function incluirManutencao(dadosServico) {\r\n api.post(`Produto/IncluirServico`, dadosServico).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: 'Os dados do Serviço foram salvos com sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n aoSalvar();\r\n salvandoDados(false);\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n salvarDados(values)} initialValues={{ ump_id: \"UN\" }} >\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!!manutencao.dados?.pro_id && \r\n \r\n \r\n \r\n }\r\n \r\n trocaAbas(tab)} >\r\n \r\n \r\n \r\n \r\n \r\n carregarSubGrupos(IdGrupo)}\r\n onClearFunction={(IdGrupo) => carregarSubGrupos(IdGrupo)}\r\n setListaDados={setGrupoSelect}\r\n funcaoIncluir={() => setOpenDrawerGrupo(true)}\r\n />\r\n \r\n \r\n \r\n \r\n 0 && (() => setOpenDrawerSubGp(true))}\r\n allowClear={true}\r\n />\r\n \r\n \r\n {editando && \r\n \r\n }\r\n {editando && \r\n \r\n }\r\n \r\n \r\n \r\n {listaUnidadeMedida.map((um) => ({um.ump_id} - {um.ump_descricao}))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Serviço Ativo? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Form, Modal, Row, Col, Drawer } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport ManutencaoServico from \"./manutencao\";\r\n\r\nexport default function DrawerServico({ editando }) {\r\n const [formServico] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function onClose() {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n })\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pro_descricao' } });\r\n editando.setEditando(false);\r\n setCarregando(false);\r\n formServico.resetFields();\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Button, Tag, Popover, Modal, Radio } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, CopyOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from '../../ValueObjects/';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, Editar, Excluir, BreadcrumbPage, BotaoIncluirDados, } from \"../../components\";\r\nimport DrawerServico from \"./drawer\";\r\n\r\nexport default function Servico() {\r\n const [{ manutencao, listagem }, dispatch] = useStateValue();\r\n const [formFiltros] = Form.useForm();\r\n const [formPesquisaAdc] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formFiltros.getFieldsValue().produtoAtivo ? 1 : formFiltros.getFieldsValue().produtoAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}&SomenteServico=true`, filtro: '', ordem: '+pro_descricao' } });\r\n formFiltros.setFieldsValue({ produtoAtivo: 1 });\r\n }, [])\r\n\r\n function duplicarServico(servico) {\r\n let dados = {};\r\n if (!!servico.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${servico.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados = res.data;\r\n dados.pro_id = null;\r\n dados.pro_descricao = '';\r\n dados.pro_datainclusao = '';\r\n dados.data_sincro = '';\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function showDrawer(servico) {\r\n let dados = {};\r\n if (!!servico.pro_id) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${servico.pro_id}`).then(res => {\r\n if (res.status === 200) {\r\n dados = res.data;\r\n dados.pro_datainclusao = !!dados.pro_datainclusao ? moment(dados.pro_datainclusao) : null;\r\n dados.data_sincro = !!dados.data_sincro ? moment(dados.data_sincro) : null;\r\n dados.orm_id = parseInt(dados.orm_id);\r\n }\r\n }).catch((erro) => console.error(erro))\r\n .finally(\r\n () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n );\r\n }\r\n };\r\n\r\n const modalExcluirServico = (servico) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o serviço ${servico.pro_codigo}-${servico.pro_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(servico);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(servico) {\r\n api.delete(`produto/excluir/${servico.pro_id}`).then((res) => {\r\n if (res.data == true) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n } else {\r\n modalInativarServico(servico);\r\n }\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarServico(servico);\r\n })\r\n };\r\n\r\n const modalInativarServico = (servico) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o serviço!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o serviço ${servico.pro_codigo}-${servico.pro_descricao} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarServico(servico);\r\n }\r\n });\r\n };\r\n\r\n function inativarServico(servico) {\r\n api.put(`produto/AtivarInativar?IdProduto=${servico.pro_id}&Ativo=false`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '&SomenteServico=true', filtro: '', ordem: '+pro_descricao' } });\r\n })\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n listagem.outrosFiltros = '';\r\n expressao = !!expressao ? expressao : '';\r\n let filtrosTela = popularFiltrosTela();\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: !!listagem.filtro ? listagem.filtro : '', outrosFiltros: `${filtrosTela}&filtroAdicional=${btoa(expressao)}`, ordem: '+pro_descricao' } })\r\n };\r\n\r\n function popularFiltrosTela() {\r\n let filtrosTela = '';\r\n filtrosTela += `&SomenteServico=true&Ativo=${formFiltros.getFieldsValue().produtoAtivo}`\r\n if (parseFloat(formPesquisaAdc.getFieldsValue().precoMinimo) > 0.00) filtrosTela += `&precoMinimo=${formPesquisaAdc.getFieldsValue().precoMinimo}`;\r\n if (parseFloat(formPesquisaAdc.getFieldsValue().precoMaximo) > 0.00) filtrosTela += `&precoMaximo=${formPesquisaAdc.getFieldsValue().precoMaximo}`;\r\n\r\n return filtrosTela;\r\n }\r\n\r\n function onClickEditar(servico) {\r\n setEditando(true);\r\n showDrawer(servico);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição do Serviço',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo de Serviço',\r\n render: ({ csv_descricao }) => (\r\n
\r\n {csv_descricao || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Tributação Pis/Confins',\r\n width: 150,\r\n render: ({ pis_descricao }) => (\r\n
\r\n {pis_descricao || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Un. Medida',\r\n width: 100,\r\n render: ({ ump_descricao }) => (\r\n
\r\n {ump_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Preço (R$)',\r\n width: 120,\r\n align: 'right',\r\n render: ({ precoVendaMinimo, precoVendaMaximo }) => (\r\n
\r\n {precoVendaMinimo === precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)}\r\n }\r\n {precoVendaMinimo !== precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)} até {FormatNumber(precoVendaMaximo, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (servico) => (\r\n
\r\n \r\n
\r\n \r\n onClickEditar(servico)} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluirServico(servico)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Button, notification } from \"antd\";\r\nimport { EditOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport jsreports from \"jsreports/jsreports-all\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { delay } from \"../../services/funcoes\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { getEmpresa, getLocal, getNomeEmpresa } from '../../services/auth';\r\n\r\nexport default function ManutencaoRelatorioEtiqueta({ formulario, carregando, aoSalvar, exibeModelo }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue(); \r\n const nomeEmpresa = getNomeEmpresa(); \r\n const empresa = getEmpresa();\r\n const locais = getLocal();\r\n \r\n useEffect(() => {\r\n definirDadosPadrao();\r\n }, []);\r\n\r\n const squemaEtiquetaProduto = [\r\n {\r\n nome: 'Codigo_Empresa',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Empresa',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Produto',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Produto',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Grade',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Marca',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Preco',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Ean',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Etiqueta',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Referencia',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Observacao',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Quantidade_Parcela',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Valor_Parcelado',\r\n tipo: 'string'\r\n }\r\n ];\r\n\r\n const salvarManutencao = (record) => {\r\n record.jsonRelatorio = JSON.stringify(record.jsonRelatorio)\r\n if(record.loc_id == null && record.emp_id == null){\r\n record.id = null;\r\n record.loc_id = locais;\r\n record.emp_id = empresa;\r\n record.nome = (record.nome + \" \" + nomeEmpresa);\r\n }\r\n carregando(true);\r\n if (!!record.id) {\r\n api.put(`RelatorioModeloEtiqueta/Editar`, record).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Etiqueta foram salvos com sucesso!\" });\r\n aoSalvar(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ' ', filtro: ' ', ordem: 'Nome' } })\r\n }\r\n );\r\n } else {\r\n api.post(`RelatorioModeloEtiqueta/Incluir`, record).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Etiqueta foram salvos com sucesso!\" });\r\n aoSalvar(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ' ', filtro: ' ', ordem: 'Nome' } })\r\n }\r\n );\r\n }\r\n };\r\n\r\n\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n api.get(`RelatorioModeloEtiqueta/Listar?id=${manutencao.dados.id}`).then(\r\n res => {\r\n formulario.setFieldsValue(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function definirDadosPadrao() {\r\n let json = { \"title\": \"Relatório\", \"id\": \"rtpRelatorioEtiqueta\", \"default_format\": \"html\", \"version\": \"1.4.122\", \"page\": { \"units\": \"mm\", \"paper_size\": { \"name\": \"A4\", \"inches\": [\"8.5\", \"11.69\"], \"mm\": [\"210\", \"297\"], \"id\": \"a4\" }, \"margins\": { \"top\": 0, \"left\": 0, \"right\": 0, \"bottom\": 0 } }, \"filters\": [], \"inputs\": [], \"header\": { \"visible\": false, \"height\": 27, \"elements\": [] }, \"body\": { \"data_source\": \"etiqueta\", \"show_detail\": true, \"height\": 16.897356568410437, \"elements\": [], \"sublevels\": [], \"column_count\": 1, \"pivot_enabled\": false, \"pivot_column_left\": 84.5, \"pivot_column_right\": 105.50000000000001, \"pivot_area_right\": 137, \"visible\": \"\", \"shrinkToFit\": false, \"order_detail_by\": \"\" }, \"footer\": { \"visible\": false, \"height\": 6, \"elements\": [] }, \"page_header\": { \"visible\": false, \"elements\": [], \"height\": 54.39344262295082 }, \"page_footer\": { \"visible\": false, \"elements\": [], \"height\": 5.0000034679066045 }, \"type\": \"hierarchical\", \"defaultFont\": { \"name\": \"Arial\", \"css\": \"Arial, \\\"Helvetica Neue\\\", Helvetica, sans-serif\" }, \"defaultFontSize\": 8 };\r\n formulario.setFieldsValue({ jsonRelatorio: json });\r\n }\r\n\r\n function imprimirEtiqueta(modelo) {\r\n if (!!!formulario.getFieldValue().jsonRelatorio) {\r\n api.get(`RelatorioModeloEtiqueta/Listar?id=${formulario.getFieldValue().id}`).then(\r\n res => {\r\n exibeModelo(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n } else {\r\n exibeModelo(formulario.getFieldValue());\r\n }\r\n };\r\n\r\n function abrirMontarRelatorio() {\r\n let data_sources = [];\r\n let dataSource = {\r\n id: 'etiqueta',\r\n name: 'Etiqueta',\r\n data: []\r\n }\r\n let atributosSquema = [];\r\n squemaEtiquetaProduto.forEach((squema) => {\r\n for (let i = 1; i <= formulario.getFieldValue().quantidadeColuna; i++) {\r\n atributosSquema.push({ name: squema.nome + \"_Coluna_\" + i, type: squema.tipo });\r\n }\r\n });\r\n\r\n dataSource.schema = {\r\n fields: atributosSquema\r\n }\r\n\r\n data_sources.push(dataSource);\r\n\r\n let designer = new jsreports.Designer({\r\n data_sources: data_sources,\r\n report_def: formulario.getFieldValue().jsonRelatorio\r\n\r\n });\r\n let outPutReport = document.getElementsByClassName('report-output');\r\n\r\n delay(function () {\r\n designer.on(\"save\", function (reportdef) {\r\n let reportDef = JSON.parse(reportdef);\r\n if (!!reportDef.body.data_source) {\r\n formulario.setFieldsValue({ jsonRelatorio: reportDef });\r\n jsreports.render({\r\n report_def: (formulario.getFieldValue().jsonRelatorio),\r\n target: outPutReport,\r\n datasets: data_sources,\r\n showToolbar: false\r\n });\r\n } else {\r\n notification.warn({ description: 'Data Source não foi selecionado!', message: 'Aviso' });\r\n }\r\n }, 100);\r\n })\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport ManutencaoRelatorioEtiqueta from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\n\r\nexport default function DrawerRelatorioEtiqueta({ exibeModelo }) {\r\n\r\n const [formularioEtiquetas] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (!!manutencao.dados) {\r\n formularioEtiquetas.setFieldsValue(manutencao.dados);\r\n } else {\r\n formularioEtiquetas.resetFields();\r\n }\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formularioEtiquetas.resetFields();\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button } from \"antd\";\r\nimport { EditOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { TabelaDados } from \"../../components\";\r\nimport DrawerRelatorioEtiqueta from './drawer';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function TabModeloFixo({ exibeModelo }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ' ', filtro: ' ', ordem: 'Nome' } })\r\n }, []);\r\n\r\n function imprimirEtiqueta(modelo) {\r\n if (!!!modelo.jsonRelatorio) {\r\n api.get(`RelatorioModeloEtiqueta/Listar?id=${modelo.id}`).then(\r\n res => {\r\n exibeModelo(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n } else {\r\n exibeModelo(modelo);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n { return campo.emp_id === null && campo.loc_id === null }} colunas={\r\n [\r\n {\r\n title: 'Modelo',\r\n render: ({ nome }) => (\r\n
\r\n {nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n return (\r\n
\r\n
\r\n { return campo.emp_id !== null }} colunas={\r\n [\r\n {\r\n title: 'Modelo',\r\n render: ({ nome }) => (\r\n
\r\n {nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Input, InputNumber } from \"antd\";\r\n\r\nexport default function TabAgenciaBancaria() {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados da Agência Bancária\r\n \r\n \r\n Informe os dados da Agência Bancária\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}`}\r\n parser={value => value.replace('', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Input } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { InputCep } from \"../../components\";\r\nimport { retornaCep } from \"../../services/funcoes\";\r\n\r\nexport default function TabEndereco({ formulario }) {\r\n\r\n async function verificaCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n formulario.setFieldsValue({\r\n ctc_cidadeagencia: retornoCep.cid_descricao,\r\n ctc_ufagencia: retornoCep.est_sigla,\r\n ctc_bairroagencia: retornoCep.bai_nome ?? '',\r\n ctc_enderecoagencia: retornoCep.log_logradouro ?? ''\r\n })\r\n } else {\r\n formulario.setFieldsValue({ ctc_cepagencia: undefined });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n Defina o Endereço da Agência\r\n \r\n \r\n \r\n \r\n \r\n verificaCep(event.currentTarget.value)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Input } from \"antd\";\r\n\r\nimport { InputPhone } from \"../../components\";\r\n\r\nexport default function TabGerente() {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Dados Dados do Gerente\r\n \r\n Informe os Dados do Gerente \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, Select, Checkbox, notification, Button, Table } from \"antd\";\r\nimport { PlusOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { info } from \"../../services/funcoes\";\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { Data, FormGW, InputPreco, SelectPaginado } from \"../../components\";\r\nimport { TabAgenciaBancaria, TabEndereco, TabGerente } from './tabPage';\r\nexport default function ManutencaoContaCorrente({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaTipoContaCorrente, setListaTipoContaCorrente] = useState([]);\r\n const [listaUsuarios, setListaUsuarios] = useState([]);\r\n const [contaBancaria, setContaBancaria] = useState(false);\r\n const [listaUsuariosPermitidos, setListaUsuariosPermitidos] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const onFinishFailed = errorInfo => {\r\n console.log('Failed:', errorInfo);\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`TipoContaCorrente/Listar`).then(res => {\r\n setListaTipoContaCorrente(res.data);\r\n });\r\n api.get(`Usuario/RetornaUsuariosLocal?PageSize=500`).then(res => {\r\n setListaUsuarios(res.data.items);\r\n });\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?Ativo=true&CodReceitaDespesa=1`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && manutencao.dados.ctc_id > 0 && ui.showDrawer) {\r\n api.get(`ContaCorrente/UsuariosPermissaoSaldo?idContaCorrente=${manutencao.dados.ctc_id}`).then(res => {\r\n setListaUsuariosPermitidos(res.data);\r\n if (res.data.length > 0) {\r\n formulario.setFieldsValue({ limitarSaldoUsuarios: true });\r\n }\r\n });\r\n\r\n let lista = [];\r\n if (!!manutencao.dados.ban_id) {\r\n lista.push({ name: \"ban_id\", campo: \"CodigoBanco\", value: manutencao.dados.ban_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n\r\n setContaBancaria(manutencao.dados.tcc_id === 2);\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n function setAbaTipoContaCorrente(tc){\r\n setContaBancaria(tc === 2);\r\n }\r\n\r\n function adicionarUsuario() {\r\n let usu_id = formulario.getFieldValue().usu_id;\r\n let lista = [...listaUsuariosPermitidos];\r\n if (listaUsuariosPermitidos.length > 0 && listaUsuariosPermitidos.filter(usuario => { return usuario.usu_id === usu_id }).length > 0) {\r\n info(\"Este usuário já foi adicionado!\");\r\n return;\r\n } else {\r\n var user = listaUsuarios.find(usuario => { return usuario.usu_id === usu_id })\r\n lista.push(user);\r\n }\r\n setListaUsuariosPermitidos(lista);\r\n };\r\n\r\n function excluirRegistro(id) {\r\n let lista = [...listaUsuariosPermitidos];\r\n let index = lista.findIndex(i => i.key === id);\r\n lista.splice(index, 1);\r\n setListaUsuariosPermitidos(lista);\r\n }\r\n\r\n function salvarManutencao(valores) {\r\n let values = { ...manutencao.dados, ...valores };\r\n let idRetorno;\r\n values.contacorrenteusuarios = listaUsuariosPermitidos;\r\n values.ban_id = !!values.ban_id ? values.ban_id.toString() : '';\r\n values.ctc_saldoinicial = values.ctc_saldoinicial > 0 ? values.ctc_saldoinicial : 0;\r\n values.ctc_operacaoconta = values.ctc_operacaoconta;\r\n values.contacorrentelocal = true;\r\n values.ctc_unidadeatendimento = values.ctc_unidadeatendimento == \"\" ? null : values.ctc_unidadeatendimento\r\n if (!!values.ctc_fonegerente) {\r\n values.ctc_fonegerente = values.ctc_fonegerente.replace(/\\D/g, '');\r\n }\r\n carregando(true);\r\n if (!!values.ctc_id) {\r\n editarManutencao(values, idRetorno);\r\n } else {\r\n incluirManutencao(values, idRetorno);\r\n }\r\n\r\n };\r\n\r\n function editarManutencao(values, idRetorno) {\r\n api.put(`ContaCorrente/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Corrente foram salvos com sucesso!\" });\r\n idRetorno = res.data.ctc_id;\r\n\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '' } });\r\n carregando(false);\r\n aoSalvar(idRetorno);\r\n });\r\n }\r\n\r\n function incluirManutencao(values, idRetorno) {\r\n api.post(`ContaCorrente/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Corrente foram salvos com sucesso!\" });\r\n idRetorno = res.data.ctc_id;\r\n\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '' } });\r\n carregando(false);\r\n aoSalvar(idRetorno);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n prevValues.tcc_id !== currentValues.tcc_id}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(['tcc_id']) === 2)\r\n return (\r\n \r\n \r\n ({ban.ban_id} - {ban.ban_descricao})\r\n } />\r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n 0)}>\r\n \r\n \r\n prevValues.ctc_saldoinicial !== currentValues.ctc_saldoinicial}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(['ctc_saldoinicial']) > 0)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n prevValues.ctc_saldoinicial !== currentValues.ctc_saldoinicial}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(['ctc_saldoinicial']) > 0)\r\n return (\r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0))}>\r\n \r\n Conta Corrente Ativa?\r\n \r\n \r\n \r\n \r\n Limitar visualização do saldo por usuários/grupo de usuários?\r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.limitarSaldoUsuarios !== currentValues.limitarSaldoUsuarios}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(['limitarSaldoUsuarios']) === true)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n {!!listaUsuariosPermitidos && listaUsuariosPermitidos.length > 0 &&\r\n
\r\n
(\r\n
\r\n Usuário: {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 42,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, Menu, Dropdown, notification, Modal, Radio, Form } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, MoreOutlined, ExclamationCircleOutlined, CloseCircleOutlined, FileSearchOutlined, ArrowLeftOutlined, ArrowRightOutlined, RetweetOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Link } from \"react-router-dom\";\r\nimport DrawerContaCorrente from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, DrawerLancamentoTransferencia, DrawerManutencaoCaixa, Excluir, Editar, LancamentoEntrada, LancamentoSaida, LancamentoTransferencia } from \"../../components\";\r\n\r\nexport default function ContaCorrente() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [formPesquisa] = Form.useForm();\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisa.getFieldsValue().statusAtivo ? 1 : formPesquisa.getFieldsValue().statusAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}`, filtro: '', ordem: '+ctc_descricao' } });\r\n formPesquisa.setFieldsValue({ statusAtivo: 1 });\r\n }, [])\r\n\r\n\r\n const modalInativarConta = (dados) => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir a Conta Corrente ${dados.ctc_descricao}!`,\r\n icon: ,\r\n content: `Deve conter referências com outros registros!`,\r\n okText: 'Inativar Registro',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n api.put(`ContaCorrente/InativarContaCorrente?idContaCorrente=${dados.ctc_id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+ctc_descricao' } })\r\n notification.success({ message: 'Operação concluída', description: \"Conta inativada com sucesso!\" });\r\n }\r\n });\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Conta Corrente: ${dados.ctc_id}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function aplicarFiltros() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+ctc_descricao' } });\r\n }\r\n\r\n function abrirLancamentoEntradaSaida(operacao, record) {\r\n record.operacao = operacao;\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerManutencaoCaixa: true } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n };\r\n\r\n function abrirLancamentoTransferencia(record) {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerTransferencia: true } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n };\r\n\r\n function abrirLancamentoCaixa(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record.ctc_id } });\r\n }\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n abrirLancamentoCaixa(record)}> Consultar Movimentação\r\n \r\n \r\n } onClick={() => abrirLancamentoEntradaSaida(\"2\", record)}> Lançamento de Entrada\r\n \r\n \r\n } onClick={() => abrirLancamentoEntradaSaida(\"1\", record)}> Lançamento de Saída\r\n \r\n \r\n } onClick={() => {\r\n abrirLancamentoTransferencia(record);\r\n }}> Lançamento de Transferência\r\n \r\n \r\n )\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n Modal.confirm({\r\n title: 'Deseja deletar esta conta corrente?',\r\n icon: ,\r\n onOk() {\r\n setCarregando(true);\r\n api.post(`ContaCorrente/Excluir?codigoContaCorrente=${dados.ctc_id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Corrente foram excluídos com sucesso!\" });\r\n }, err => {\r\n modalInativarConta(dados);\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`,ordem: '+ctc_descricao' } });\r\n });\r\n }\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n aplicarFiltros()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {ctc_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ ctc_descricao }) => (\r\n
\r\n {ctc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo de Conta',\r\n render: ({ tcc_descricao }) => (\r\n
\r\n {tcc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Agência',\r\n width: 120,\r\n render: ({ ctc_numeroagencia }) => (\r\n
\r\n {(!!ctc_numeroagencia) ? (ctc_numeroagencia) : 'Não Informada'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Conta Bancária',\r\n width: 150,\r\n render: ({ ctc_numeroconta }) => (\r\n
\r\n {(!!ctc_numeroconta) ? (ctc_numeroconta) : 'Não Informada'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Abertura',\r\n align: 'center',\r\n width: 120,\r\n render: ({ ctc_datasaldoinicial }) => (\r\n
\r\n {(!!ctc_datasaldoinicial) ? moment(ctc_datasaldoinicial).format('DD/MM/YYYY') : 'Não Informada'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Saldo Atual (R$)',\r\n align: 'right',\r\n render: ({ saldo }) => (\r\n
\r\n {(!!saldo) ? FormatNumber(saldo, true) : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n {/* \r\n excluirRegistro(record)} icon={}/>\r\n */}\r\n \r\n } onClick={() => modalExcluir(record)} />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \"Configura Configuração da Conta Gerencial - (OPCIONAL)\r\n \r\n \r\n Adicione a(s) configuração(ões) da Conta Gerencial aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {cgc_descricaoTipo} - {cgc_descricaocontadestino}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} pagination={false} dataSource={listaConfigContaGerencial} scroll={{x: 900}}/>\r\n \r\n setOpenModalContaGerencial(false)} listaConfigContaGerencial={listaConfigContaGerencial}/>\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, Select, Checkbox, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { TabConfigConta } from './tabPage.js';\r\nimport { listagemActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoContaGerencial({ formulario, carregando, aoSalvar }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listarContaDRE, setListarContaDRE] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaConfigContaGerencial, setListaConfigContaGerencial] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Dre/ListarTodas`).then(res => {\r\n setListarContaDRE(res.data);\r\n })\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.conta) {\r\n let index = 1;\r\n let dados = manutencao.dados.conta;\r\n dados.map((item) => {\r\n item.key = index;\r\n index++;\r\n });\r\n setListaConfigContaGerencial(dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function salvarContaGerencial(values) {\r\n values.conta = listaConfigContaGerencial;\r\n carregando(true);\r\n if (!!values.ctg_id) {\r\n editarManutencao(values);\r\n } else {\r\n incluirManutencao(values);\r\n }\r\n };\r\n\r\n function editarManutencao(values) {\r\n api.put(`ContaGerencial/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Gerencial foram salvos com sucesso!\" });\r\n\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '' } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function incluirManutencao(values) {\r\n api.post(`ContaGerencial/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Gerencial foram salvos com sucesso!\" });\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '' } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoContaGerencial from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerContaGerencial({ filtrarConta, formPesquisa }) {\r\n\r\n const [formContaGerencial] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formContaGerencial.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formContaGerencial.resetFields();\r\n formContaGerencial.setFieldsValue({ ctg_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n formContaGerencial.resetFields();\r\n filtrarConta(formPesquisa.getFieldValue().pesquisa);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Button, Table, Collapse, notification, Modal, Popover, Tag, Input, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined, MinusOutlined, ExclamationCircleOutlined, PrinterOutlined, CloseCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerContaGerencial from './drawer';\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, Adicionar, Excluir, Imprimir } from \"../../components\";\r\n\r\nexport default function ContaGerencial() {\r\n\r\n const [formPesquisa] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n\r\n // useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '' } }), []);\r\n\r\n useEffect(() => {\r\n filtrarConta('');\r\n }, [])\r\n\r\n function excluirRegistro(dados) {\r\n Modal.confirm({\r\n title: 'Deseja deletar esta conta gerencial?',\r\n icon: ,\r\n onOk() {\r\n setCarregando(true);\r\n api.post(`ContaGerencial/Excluir?idContaGerencial=${dados.ctg_id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Os dados da Conta Gerencial foram excluídos com sucesso!\" });\r\n }, err => {\r\n modalInativarConta(dados);\r\n }).finally(() =>{\r\n filtrarConta(formPesquisa.getFieldValue().pesquisa);\r\n });\r\n }\r\n });\r\n }\r\n\r\n const modalInativarConta = (dados) => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir a Conta Gerencial ${dados.ctg_descricao}!`,\r\n icon: ,\r\n content: `Deve conter referências com outros registros!`,\r\n okText: 'Inativar Registro',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n api.post(`ContaGerencial/AtivarInativar?idConta=${dados.ctg_id}`).then(\r\n res => {\r\n if (res.status === 200){\r\n filtrarConta(formPesquisa.getFieldValue().pesquisa);\r\n notification.success({ message: 'Operação concluída', description: \"Conta inativada com sucesso!\" });\r\n } \r\n });\r\n }\r\n });\r\n };\r\n\r\n function filtrarConta(filtro){\r\n if (!(!!filtro)){\r\n filtro = '';\r\n }else{\r\n\r\n }\r\n api.get(`ContaGerencial/ListarTodos?filtro=${filtro}`).then(res => {\r\n let index = 0;\r\n res.data.map((item) => {\r\n item.contasGerenciais.map(conta => {\r\n conta.key = index;\r\n index++; \r\n });\r\n });\r\n setListaContaGerencial(res.data);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n filtrarConta(valor) } allowClear/>\r\n \r\n \r\n \r\n \r\n
\r\n isActive ? : }>\r\n {listaContaGerencial.map(conta => (\r\n \r\n
(\r\n \r\n \r\n {ctg_descricao}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'right',\r\n width: 98,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n }/>\r\n \r\n \r\n \r\n } onClick={() => excluirRegistro(record.dados)} /> \r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandable={{\r\n expandedRowRender: ({dre_descricao}) => \r\n
\r\n \r\n
\r\n DRE: {dre_descricao || 'Não Informado'}\r\n \r\n \r\n ,\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }} dataSource={conta.contasGerenciais} columnWidth={30}\r\n />\r\n \r\n \r\n \r\n } size=\"middle\" onClick={() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true}});\r\n }}>\r\n Adicionar\r\n \r\n \r\n \r\n\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Button, Divider, Tag, Form, Table, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { ModalCfop } from \"../../components/modals/\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function ManutencaoOperacaoFiscal({ listaCfop, setListaCfop }) {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [formulario] = Form.useForm();\r\n const [listaDestinoOperacao, setListaDestinoOperacao] = useState([]);\r\n const [listaCategoriaOperacao, setListaCategoriaOperacao] = useState([]);\r\n const [dadosEditando, setDadosEditando] = useState([]);\r\n\r\n const selecionarOpcao = (checked, key) => {\r\n let listaTemp = [...listaCfop];\r\n listaTemp.filter(item => { return item.key === key })[0].opc_ativo = checked;\r\n\r\n setListaCfop(listaTemp);\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=DestinoOperacao`).then(res => {\r\n setListaDestinoOperacao(res.data);\r\n });\r\n api.get(`Enum/Listar?nome=Categoria`).then(res => {\r\n setListaCategoriaOperacao(res.data);\r\n });\r\n\r\n }, []);\r\n\r\n function adicionarCfop(values) {\r\n let listaTemp = [...listaCfop];\r\n let index = listaTemp.findIndex(i => i.key === values.key);\r\n \r\n if (index !== -1) {\r\n listaTemp[index] = { ...listaTemp[index], ...values };\r\n } else {\r\n values.key = listaTemp.length > 0 ? Math.max(...listaTemp.map(i => i.key)) +1 : 1;\r\n values.opc_ativo = true;\r\n listaTemp.push(values);\r\n }\r\n listaTemp.sort((a, b) => a.opc_destinooperacao - b.opc_destinooperacao)\r\n setListaCfop(listaTemp);\r\n setOpenModal(false);\r\n };\r\n\r\n function excluirRegistro(id) {\r\n Modal.confirm({\r\n title: 'Deseja deletar este registro?',\r\n icon: ,\r\n onOk() {\r\n let lista = [...listaCfop];\r\n let index = lista.findIndex(i => i.key === id);\r\n lista.splice(index, 1);\r\n setListaCfop(lista);\r\n }\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Código Código Fiscal de Operação - CFOP\r\n \r\n \r\n Adicione os CFOPs relacionados aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n {cfo_cfop} - {cfo_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Destino',\r\n align: 'center',\r\n width: 75,\r\n render: ({ opc_destinooperacao }) => (\r\n
\r\n {listaDestinoOperacao.filter(x => x.key === opc_destinooperacao)[0]?.value}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Categoria',\r\n align: 'center',\r\n width: 75,\r\n render: ({ opc_categoria }) => (\r\n
\r\n {listaCategoriaOperacao.filter(x => x.key === opc_categoria)[0]?.value}\r\n
\r\n )\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n width: 65,\r\n render: ({ opc_ativo, key }) => (\r\n
\r\n selecionarOpcao(checked, key)}\r\n >\r\n {opc_ativo ? 'Ativo' : 'Inativo'}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n};","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Select, Tooltip, Tabs, Typography, notification, Divider, Button } from \"antd\";\r\nimport { QuestionCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\n\r\nimport TabCfop from \"./tabCfop\";\r\nimport api from \"../../services/api\";\r\nimport { FormGW, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport DrawerContaGerencial from './drawerContaGerencial';\r\n\r\nexport default function ManutencaoOperacaoFiscal({ formulario, carregando, aoSalvar }) {\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [hiddenFlagsCompra, setHiddenFlagsCompra] = useState(true);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaCfop, setListaCfop] = useState([]);\r\n const [listaIndicadorPresenca, setListaIndicadorPresenca] = useState([]);\r\n const [listaNaturezaOperacao, setListaNaturezaOperacao] = useState([]);\r\n const [listaTipoLancamentoOperacaoFiscal, setTipoLancamentoOperacaoFiscal] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [listaTipoPreco, setListaTipoPreco] = useState([]);\r\n const [listaTributacaoPisCofins, setListaTributacaoPisCofins] = useState([]);\r\n const [listaTributacaoIcms, setListaTributacaoIcms] = useState([]);\r\n const [openDrawerContaGerencial, setOpenDrawerContaGerencial] = useState(false);\r\n const [codigoContaGerencial, setCodigoContaGerencial] = useState(null);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=IndicadorPresenca`).then(res => {\r\n setListaIndicadorPresenca(res.data);\r\n });\r\n api.get(`TipoOperacao/Listar?filtro=`).then(res => {\r\n setListaNaturezaOperacao(res.data);\r\n });\r\n carregarContasGerenciais();\r\n api.get(`Enum/Listar?nome=TipoPrecoUtilizar`).then(res => {\r\n setListaTipoPreco(res.data);\r\n });\r\n api.get(`TributacaoPisCofins/ListarAtivos`).then(res => {\r\n setListaTributacaoPisCofins(res.data);\r\n });\r\n api.get(`TributacaoIcms/Listar`).then(res => {\r\n setListaTributacaoIcms(res.data.items);\r\n });\r\n api.get(`Enum/Listar?nome=TipoLancamentoOperacaoFiscal`).then(res => {\r\n setTipoLancamentoOperacaoFiscal(res.data);\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados?.cfop) {\r\n let key = 0;\r\n manutencao.dados.cfop.forEach(\r\n (item) => {\r\n item.key = key++;\r\n }\r\n )\r\n manutencao.dados.cfop.sort((a, b) => a.opc_destinooperacao - b.opc_destinooperacao)\r\n setListaCfop(manutencao.dados.cfop);\r\n if (manutencao.dados.tip_id == 2)\r\n setHiddenFlagsCompra(false);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n if (!!codigoContaGerencial) {\r\n carregarContasGerenciais();\r\n }\r\n }, [codigoContaGerencial]);\r\n\r\n function carregarContasGerenciais() {\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n }).finally(\r\n formulario.setFieldsValue({ ctg_id: codigoContaGerencial })\r\n );\r\n }\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ope_descricao' } });\r\n };\r\n\r\n function salvarOperacaoFiscal(values) {\r\n if (!!listaCfop && listaCfop.length > 0) {\r\n values.operacaocfops = listaCfop;\r\n } else {\r\n notification.warning({ message: `Aviso!`, description: `É Obrigatório informar pelo menos um CFOP na operação` })\r\n return false;\r\n }\r\n values.ope_calculacomissao = false;\r\n values.ope_alteracontagerencial = false;\r\n carregando(true);\r\n\r\n if (!!values.ope_id) {\r\n editarManutencao(values);\r\n } else {\r\n incluirManutencao(values);\r\n };\r\n };\r\n\r\n function editarManutencao(values) {\r\n api.put(`OperacaoFiscal/Editar`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Operação Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function incluirManutencao(values) {\r\n api.post(`OperacaoFiscal/Incluir`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Operação Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n function checkMarcadores() {\r\n if (formulario.getFieldValue(['tip_id']) == 2)\r\n setHiddenFlagsCompra(false);\r\n else\r\n setHiddenFlagsCompra(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n Selecione o Tipo de Imposto a Calcular\r\n \r\n \r\n \r\n \r\n \r\n \r\n ICMS?\r\n \r\n \r\n \r\n \r\n IPI?\r\n \r\n \r\n \r\n \r\n ICMS ST?\r\n \r\n \r\n \r\n \r\n PIS/COFINS?\r\n \r\n \r\n \r\n \r\n ISSQN?\r\n \r\n \r\n \r\n \r\n Retenção?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Tipo Preço\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Código Tributação para PIS/COFINS\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Código Tributação para ICMS\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n (\r\n {item.icm_descricao}\r\n )} />\r\n \r\n \r\n \r\n\r\n \r\n \r\n ({v.cbf_codigo} - {v.cbf_descricao} )\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Danfe Rascunho antes envio Sefaz?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoOperacaoFiscal from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerOperacaoFiscal() {\r\n\r\n const [formOperacaoFiscal] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n formOperacaoFiscal.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados])\r\n\r\n function fecharDrawer() {\r\n formOperacaoFiscal.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { Tag, Popover, notification } from 'antd';\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW, TabelaDados } from \"../../components\";\r\n\r\nexport default function ImportarOperacao({ formulario, carregando, aoSalvar }) {\r\n\r\n const[ operacao, setOperacao ] = useState(null);\r\n\r\n function salvarOperacoes() {\r\n api.post(`OperacaoFiscal/ImportarOperacao`, operacao).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Operações Fiscais importadas com Sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n };\r\n\r\n function populaOperacaoSel(keys, linhas) {\r\n let operacao = [];\r\n // Extrai os ope_id das linhas selecionadas e cria um array de objetos\r\n operacao = linhas.map(linha => ({ope_id: linha.ope_id}));\r\n // Armazena o array de objetos diretamente\r\n setOperacao(operacao);\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n (\r\n \r\n \r\n {ope_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Operação Fiscal',\r\n render: ({ ope_descricao }) => (\r\n
\r\n {ope_descricao}\r\n
\r\n ),\r\n }\r\n ]\r\n } parametrosSelecionarItens={\r\n {\r\n tipo: \"change\",\r\n funcao: populaOperacaoSel\r\n }\r\n }\r\n />\r\n
\r\n
\r\n
\r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { DrawerNav } from '../../components';\r\nimport ImportarOperacao from './importarOperacao';\r\n\r\nexport default function DrawerOperacaoFiscalImportar({ showDrawer, onClose }) {\r\n\r\n const [formOperacaoFiscal] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const {showImportar, setShowImportar } = showDrawer;\r\n\r\n function fecharDrawer() {\r\n formOperacaoFiscal.resetFields();\r\n onClose(); \r\n };\r\n\r\n const handleOnClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function ImportarOperacaoFiscal(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(23));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Button, Dropdown, Menu } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, CloseCircleOutlined, MoreOutlined, CloudUploadOutlined, ImportOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport DrawerOperacaoFiscal from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, Editar, Excluir, PesquisaOrdenacao, TabelaDados, BreadcrumbPage, BotaoIncluirDados } from \"../../components\";\r\nimport DrawerOperacaoFiscalImportar from \"./drawerImportar\";\r\nimport ImportarOperacaoFiscal from \"../../components/importarOperacaoFiscal\";\r\nimport { Link } from \"@material-ui/core\";\r\n\r\nexport default function OperacaoFiscal() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [showImportar, setShowImportar] = useState(false);\r\n const [refreshKey, setRefreshKey] = useState(0);\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a Opecação Fiscal ${dados.ope_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Operação Fiscal: ${dados.ope_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`OperacaoFiscal/Excluir/${dados.ope_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ope_descricao' } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarRegistro(dados);\r\n }\r\n );\r\n }\r\n\r\n function inativarRegistro(dados) {\r\n api.put(`OperacaoFiscal/Inativar?id=${dados.ope_id}`).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Operação Fiscal inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ope_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n function editarRegistro(record) {\r\n console.log(record);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n function menuOutros() {\r\n return (\r\n \r\n { setShowImportar(true); }}\r\n >\r\n }>\r\n Importar Operação Fiscal\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n editarRegistro(record);\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(record)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } expandir={(record) => {\r\n return (\r\n record.cfop.map(item => (\r\n \r\n \r\n Cfop: {item.cfo_cfop} - {item.cfo_descricao}\r\n \r\n \r\n ))\r\n )\r\n }} />\r\n \r\n \r\n {\r\n setShowImportar(false); setRefreshKey(prevKey => prevKey + 1); // Incrementa a key para forçar a recriação do componente\r\n }} />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Select, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoOperacaoDebitoCredito({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao ,ui}, dispatch] = useStateValue();\r\n const [listaTipoImposto, setlistaTipoImposto] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=TipoNotaDebitoCredito`).then(res => {\r\n setlistaTipoImposto(res.data);\r\n })\r\n }, []);\r\n \r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.odc_id) {\r\n let lista = [];\r\n if (!!manutencao.dados.cfo_cfop) {\r\n lista.push({ name: \"cfo_cfop\", campo: \"Cfop\", value: manutencao.dados.cfo_cfop });\r\n } \r\n if (!!manutencao.dados.taj_id) {\r\n lista.push({ name: \"taj_id\", campo: \"Id\", value: manutencao.dados.taj_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: {itens: lista} });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarOperacaoDebitoCredito = (values) => {\r\n values.odc_cfop = values.cfo_cfop;\r\n carregando(true);\r\n if (values.odc_id) {\r\n api.put(`operacaoDebitoCredito/Alterar` , values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Operação Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n } else {\r\n api.post(`operacaoDebitoCredito/Incluir`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Operação Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n };\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+odc_id' } });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({c.cfo_cfop} - {c.cfo_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({t.taj_codigoajuste} - {t.taj_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoOperacaoDebitoCredito from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerOperacaoDebitoCredito() {\r\n\r\n const [formOperacaoDebitoCredito] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) formOperacaoDebitoCredito.setFieldsValue(manutencao.dados);\r\n else {\r\n //formOperacaoDebitoCredito.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formOperacaoDebitoCredito.resetFields();\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não', \r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerOperacaoDebitoCredito from './drawer';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Excluir, Imprimir, Editar } from \"../../components\";\r\n\r\nexport default function OperacaoDebitoCredito() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+odc_descricao'}}), []);\r\n\r\n function excluirRegistro(dados){\r\n setCarregando(true);\r\n api.delete(`OperacaoDebitoCredito/Excluir?id=${dados.odc_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" }); \r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n },(erro) => {\r\n notification.error({ message: 'Atenção', description: \"Não foi possível excluír o registro!\" }); \r\n //modalInativarRegistro(dados)\r\n }\r\n ).finally(() => {dispatch({ type: listagemActions.CHANGE, data: { ordem: '+odc_descricao'}})\r\n }\r\n );\r\n };\r\n\r\n function inativarRegistro(dados) {\r\n dados.mar_ativa = false;\r\n api.put(`operacaoDebitoCredito/Alterar`, dados).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Operação inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+odc_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a marca ${dados.odc_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a operação: ${dados.odc_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n {odc_id}\r\n \r\n ),\r\n },\r\n { \r\n title: 'Operações para Nota Fiscal de Ajuste', \r\n render: ({odc_descricao}) => (\r\n
\r\n {odc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95, \r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record }});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true }});\r\n }} icon={}/>\r\n \r\n \r\n } onClick={() => modalExcluir(dados)}/>\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n \r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Table } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabCondicaoPagamento({ listaCondPag }) {\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n\r\n useEffect(() => {\r\n popularCondicao();\r\n }, []);\r\n\r\n function popularCondicao() {\r\n api.get('CondicaoPagamento/Ativos?PageSize=500').then(\r\n res => {\r\n let sequencia = 0;\r\n res.data.items.forEach((cond) => {\r\n cond.key = sequencia;\r\n sequencia++;\r\n })\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const configSelecionarItem =\r\n {\r\n selectedRowKeys,\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n setSelectedRowKeys(selectedRowKeys);\r\n popularCondicaoPgto(selectedRowKeys, selectedRows);\r\n }\r\n };\r\n\r\n function popularCondicaoPgto(key, rows) {\r\n listaCondPag.setListaCondPag(rows);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!listaCondPag.listaCondPag.length > 0) {\r\n let listIndex = [];\r\n condicaoPagamento.forEach((condPgto, index, array) => {\r\n listaCondPag.listaCondPag.forEach((condPag) => {\r\n if (condPgto.cpg_id === condPag.cpg_id) {\r\n listIndex.push(index);\r\n }\r\n });\r\n });\r\n setSelectedRowKeys(listIndex);\r\n }\r\n }, [condicaoPagamento]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Condições Condições de Pagamento\r\n \r\n \r\n Defina as condições de pagamento. Pode ser selecionadas uma ou mais na tabela abaixo.\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {cpg_descricao}\r\n
\r\n ),\r\n },\r\n ]\r\n } locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input, Select, InputNumber } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { getEmpresa } from \"../../services/auth\";\r\n\r\nexport default function TabBoleto({ formulario, dadosBoleto }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaJuroMora, setListaJuroMora] = useState([]);\r\n const [listaRegistro, setListaRegistro] = useState([]);\r\n const [listaFormaEmissao, setListaFormaEmissao] = useState([]);\r\n const [listaEspecieDocumento, setListaEspecieDocumento] = useState([]);\r\n const [listaTipoAceite, setListaTipoAceite] = useState([]);\r\n const [listaCodigoProtesto, setListaCodigoProtesto] = useState([]);\r\n const [listaDistribuicao, setListaDistribuicao] = useState([]);\r\n const [listaCodigoMulta, setListaCodigoMulta] = useState([]);\r\n const [listaCodigoBaixa, setListaCodigoBaixa] = useState([]);\r\n const [listaConvenio, setListaConvenio] = useState([]);\r\n const [listaCarteira, setListaCarteira] = useState([]);\r\n const [listaPadraoArq, setListaPadraoArq] = useState([]);\r\n const [contemProtesto, setContemProtesto] = useState(true);\r\n const [ehBaixa, setEhBaixa] = useState(true);\r\n const [modeloImpressao, setModeloImpressao] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n async function carregarDados() {\r\n let _banco = \"\";\r\n if (!!manutencao.dados && !!manutencao.dados.ban_id) {\r\n _banco = !!manutencao.dados.ban_id ? manutencao.dados.ban_id : dadosBoleto.ban_id;\r\n } else {\r\n let bancos = await api.get(`ContaCorrente/Buscar?idContaCorrente=${formulario.getFieldValue().ctc_id}`);\r\n _banco = bancos.data.ban_id;\r\n }\r\n let jurosMora = await api.get('Enum/Listar?nome=BoletoTipoJuroMora');\r\n setListaJuroMora(jurosMora.data);\r\n let BoletoRegistro = await api.get('Enum/Listar?nome=BoletoRegistro');\r\n setListaRegistro(BoletoRegistro.data);\r\n let boletoFormaEmissao = await api.get('Enum/Listar?nome=BoletoFormaEmissao');\r\n setListaFormaEmissao(boletoFormaEmissao.data);\r\n let boletoEspecieDocumento = await api.get('Enum/Listar?nome=TipoEspecieDocumento');\r\n setListaEspecieDocumento(boletoEspecieDocumento.data);\r\n let boletoTipoAceite = await api.get('Enum/Listar?nome=BoletoTipoAceite');\r\n setListaTipoAceite(boletoTipoAceite.data);\r\n let boletoDistribuicao = await api.get('Enum/Listar?nome=BoletoDistribuicao');\r\n setListaDistribuicao(boletoDistribuicao.data)\r\n let boletoCodigoMulta = await api.get('Enum/Listar?nome=BoletoCodigoMulta');\r\n setListaCodigoMulta(boletoCodigoMulta.data);\r\n let boletoCodigoProtesto = await api.get('Enum/Listar?nome=BoletoCodigoProtesto');\r\n setListaCodigoProtesto(boletoCodigoProtesto.data);\r\n let boletoCodigoBaixa = await api.get('Enum/Listar?nome=BoletoCodigoBaixa');\r\n setListaCodigoBaixa(boletoCodigoBaixa.data);\r\n let boletoConvenio = await api.get(`BoletoConvenio/Listar?CodigoBanco=${_banco}&PageSize=500&filtro=`);\r\n setListaConvenio(boletoConvenio.data.items);\r\n let boletoCarteira = await api.get(`BoletoCarteira/Listar?filtro=&CodigoBanco=${_banco}&PageSize=500&Order=%2Bcrt_descricao`);\r\n setListaCarteira(boletoCarteira.data.items);\r\n let padraoArquivoRemessa = await api.get('Enum/Listar?nome=PadraoArquivoRemessa');\r\n setListaPadraoArq(padraoArquivoRemessa.data);\r\n let modeloImpresaoBoleto = await api.get('Enum/Listar?nome=BoletoModeloImpressao');\r\n setModeloImpressao(modeloImpresaoBoleto.data);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!listaPadraoArq && listaPadraoArq.length > 0) {\r\n popularDadosBoleto();\r\n }\r\n }, [listaPadraoArq]);\r\n\r\n function popularDadosBoleto() {\r\n if (!!formulario.getFieldValue()) {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n if (!!formulario.getFieldValue().crt_id) {\r\n let crt_id = parseInt(formulario.getFieldValue().crt_id);\r\n dados.crt_id = listaCarteira.filter((carteira) => (carteira.crt_id === crt_id))[0];\r\n }\r\n if (!!formulario.getFieldValue().dbl_tipojuromora) {\r\n let dbl_tipojuromora = parseInt(formulario.getFieldValue().dbl_tipojuromora);\r\n dados.dbl_tipojuromora = listaJuroMora.filter((juroMora) => (juroMora.key === dbl_tipojuromora))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_formatonossonumero) {\r\n let dbl_formatonossonumero = parseInt(formulario.getFieldValue().dbl_formatonossonumero);\r\n dados.dbl_formatonossonumero = listaConvenio.filter((listaConvenio) => (listaConvenio.cvn_id === dbl_formatonossonumero))[0];\r\n }\r\n if (!!formulario.getFieldValue().dbl_formaemissao) {\r\n let dbl_formaemissao = parseInt(formulario.getFieldValue().dbl_formaemissao);\r\n dados.dbl_formaemissao = listaFormaEmissao.filter((formaEmissao) => (formaEmissao.key === dbl_formaemissao))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_especiedocumento) {\r\n let dbl_especiedocumento = parseInt(formulario.getFieldValue().dbl_especiedocumento);\r\n dados.dbl_especiedocumento = listaEspecieDocumento.filter((EspecieDocumento) => (EspecieDocumento.key === dbl_especiedocumento))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_aceite) {\r\n let dbl_aceite = formulario.getFieldValue().dbl_aceite;\r\n dados.dbl_aceite = listaTipoAceite.filter((tipoAceite) => (tipoAceite.key === dbl_aceite))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_distribuicao) {\r\n let dbl_distribuicao = parseInt(formulario.getFieldValue().dbl_distribuicao);\r\n dados.dbl_distribuicao = listaDistribuicao.filter((distribuicao) => (distribuicao.key === dbl_distribuicao))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_codigoprotesto) {\r\n let dbl_codigoprotesto = parseInt(formulario.getFieldValue().dbl_codigoprotesto);\r\n if (!!dbl_codigoprotesto && dbl_codigoprotesto !== 3) {\r\n setContemProtesto(true);\r\n } else {\r\n setContemProtesto(false);\r\n }\r\n dados.dbl_codigoprotesto = listaCodigoProtesto.filter((codigoProtesto) => (codigoProtesto.key === dbl_codigoprotesto))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_codigomulta) {\r\n let dbl_codigomulta = parseInt(formulario.getFieldValue().dbl_codigomulta);\r\n dados.dbl_codigomulta = listaCodigoMulta.filter((codigoMulta) => (codigoMulta.key === dbl_codigomulta))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_codigobaixa) {\r\n let dbl_codigobaixa = parseInt(formulario.getFieldValue().dbl_codigobaixa);\r\n if (!!dbl_codigobaixa && dbl_codigobaixa !== 2) {\r\n setEhBaixa(true);\r\n } else {\r\n setEhBaixa(false);\r\n }\r\n dados.dbl_codigobaixa = listaCodigoBaixa.filter((codigoBaixa) => (codigoBaixa.key === dbl_codigobaixa))[0].key;\r\n }\r\n if (!!formulario.getFieldValue().dbl_padraoarquivoremessa) {\r\n let dbl_padraoarquivoremessa = parseInt(formulario.getFieldValue().dbl_padraoarquivoremessa);\r\n dados.dbl_padraoarquivoremessa = listaPadraoArq.filter((padraoArq) => (padraoArq.key === dbl_padraoarquivoremessa))[0].key;\r\n }\r\n if (JSON.stringify(dados) !== \"{}\") {\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n }\r\n\r\n };\r\n\r\n function popularDadosCarteira() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let crt_id = parseInt(formulario.getFieldValue().crt_id);\r\n if (crt_id) {\r\n dados.crt_id = listaCarteira.filter((carteira) => (carteira.crt_id === crt_id))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularJurosMora() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_tipojuromora = parseInt(formulario.getFieldValue().dbl_tipojuromora);\r\n if (dbl_tipojuromora) {\r\n dados.dbl_tipojuromora = listaJuroMora.filter((juroMora) => (juroMora.key === dbl_tipojuromora))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularFormatoNossoNum() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_formatonossonumero = parseInt(formulario.getFieldValue().dbl_formatonossonumero);\r\n if (dbl_formatonossonumero) {\r\n dados.dbl_formatonossonumero = listaConvenio.filter((listaConvenio) => (listaConvenio.cvn_id === dbl_formatonossonumero))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularFormaEmissao() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_formaemissao = parseInt(formulario.getFieldValue().dbl_formaemissao);\r\n if (dbl_formaemissao) {\r\n dados.dbl_formaemissao = listaFormaEmissao.filter((formaEmissao) => (formaEmissao.key === dbl_formaemissao))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularEspecieDocumento() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_especiedocumento = parseInt(formulario.getFieldValue().dbl_especiedocumento);\r\n if (dbl_especiedocumento) {\r\n dados.dbl_especiedocumento = listaEspecieDocumento.filter((EspecieDocumento) => (EspecieDocumento.key === dbl_especiedocumento))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n }\r\n\r\n function popularIdentificacaoTitulo() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_aceite = formulario.getFieldValue().dbl_aceite;\r\n if (dbl_aceite) {\r\n dados.dbl_aceite = listaTipoAceite.filter((tipoAceite) => (tipoAceite.key === dbl_aceite))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularFormaDistribuicao() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_distribuicao = parseInt(formulario.getFieldValue().dbl_distribuicao);\r\n if (dbl_distribuicao) {\r\n dados.dbl_distribuicao = listaDistribuicao.filter((distribuicao) => (distribuicao.key === dbl_distribuicao))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularProtestoTitulo() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_codigoprotesto = parseInt(formulario.getFieldValue().dbl_codigoprotesto);\r\n if (dbl_codigoprotesto) {\r\n if (!!dbl_codigoprotesto && dbl_codigoprotesto !== 3) {\r\n setContemProtesto(true);\r\n } else {\r\n setContemProtesto(false);\r\n }\r\n dados.dbl_codigoprotesto = listaCodigoProtesto.filter((codigoProtesto) => (codigoProtesto.key === dbl_codigoprotesto))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularMultaTitulo() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_codigomulta = parseInt(formulario.getFieldValue().dbl_codigomulta);\r\n if (dbl_codigomulta) {\r\n dados.dbl_codigomulta = listaCodigoMulta.filter((codigoMulta) => (codigoMulta.key === dbl_codigomulta))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularBaixaDevTitulo() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_codigobaixa = parseInt(formulario.getFieldValue().dbl_codigobaixa);\r\n if (dbl_codigobaixa) {\r\n if (!!dbl_codigobaixa && dbl_codigobaixa !== 2) {\r\n setEhBaixa(true);\r\n } else {\r\n setEhBaixa(false);\r\n }\r\n dados.dbl_codigobaixa = listaCodigoBaixa.filter((codigoBaixa) => (codigoBaixa.key === dbl_codigobaixa))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n function popularPadraoArquivoRemessa() {\r\n let dados = { ...dadosBoleto.dadosBoleto };\r\n let dbl_padraoarquivoremessa = parseInt(formulario.getFieldValue().dbl_padraoarquivoremessa);\r\n if (dbl_padraoarquivoremessa) {\r\n dados.dbl_padraoarquivoremessa = listaPadraoArq.filter((padraoArq) => (padraoArq.key === dbl_padraoarquivoremessa))[0].key;\r\n dadosBoleto.setDadosBoleto(dados);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Boleto\" Boleto\r\n \r\n \r\n Informe abaixo os dados para que seja possível emitir boletos.\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.dbl_tipojuromora !== currentValues.dbl_tipojuromora}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('dbl_tipojuromora') === 1) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n if (getFieldValue('dbl_tipojuromora') === 2) return (\r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* verificar uma melhor forma para remover e preencher via beck direto se possivel */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {contemProtesto &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n {contemProtesto &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.dbl_codigomulta !== currentValues.dbl_codigomulta}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('dbl_codigomulta') === 1) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n if (getFieldValue('dbl_codigomulta') === 2) return (\r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ehBaixa &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Select, Checkbox, Tooltip, Tabs, notification } from \"antd\";\r\nimport { QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport CurrencyInput from 'react-currency-input';\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { TabCondicaoPagamento, TabBoleto } from \"./tabPage\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoFormaPagamento({ formulario, carregando, aoSalvar }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [tipoPagamento, setTipoPagamento] = useState([]);\r\n const [tipoIntegracao, setTipoIntegracao] = useState([]);\r\n const [funcaoTef, setFuncaoTef] = useState([]);\r\n const [tpFuncao, setTpIntegracao] = useState(0);\r\n const [tipoTef, setTipoTef] = useState();\r\n const [showItegracao, setShowItegracao] = useState(false);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [contaCorrente, setContaCorrente] = useState([]);\r\n const [listaCondPag, setListaCondPag] = useState([]);\r\n const [isBoleto, setIsBoleto] = useState(false);\r\n const [definirDadosBoletos, setDefinirDadosBoletos] = useState(false);\r\n const [isCarne, setIsCarne] = useState(false);\r\n const [isValePresente, setIsValePresente] = useState(false);\r\n const [mostrarCondicao, setMostarCondicao] = useState(false);\r\n const [dadosBoleto, setDadosBoleto] = useState({});\r\n const [obrigaBanco, setObrigaBanco] = useState(false);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.fpg_id) {\r\n let lista = [];\r\n if (!!manutencao.dados.ctc_id) {\r\n lista.push({ name: \"ctc_id\", campo: \"Filtro\", value: manutencao.dados.ctc_id });\r\n formulario.setFieldsValue({ ctc_id: manutencao.dados.ctc_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n\r\n const salvarManutencao = values => {\r\n let retorno;\r\n carregando(true);\r\n var dados = {};\r\n dados.ctc_id = formulario.getFieldValue().ctc_id;\r\n dados.fpg_id = formulario.getFieldValue().fpg_id;\r\n dados.fpg_descricao = formulario.getFieldValue().fpg_descricao;\r\n dados.fpg_ativo = formulario.getFieldValue().fpg_ativo;\r\n dados.fpg_emiteboleto = formulario.getFieldValue().fpg_emiteboleto;\r\n dados.fpg_tipopagamento = formulario.getFieldValue().fpg_tipopagamento;\r\n dados.fpg_imprimecarne = formulario.getFieldValue().fpg_imprimecarne;\r\n dados.fpg_padraosistema = formulario.getFieldValue().fpg_padraosistema;\r\n dados.fpg_tipointegracao = formulario.getFieldValue().fpg_tipointegracao;\r\n dados.fpg_codigofuncaotef = !!formulario.getFieldValue().fpg_codigofuncaotef ? formulario.getFieldValue().fpg_codigofuncaotef : 0;\r\n dados.fpg_descontopadrao = !!formulario.getFieldValue().fpg_descontopadrao ? calcPercent(formulario.getFieldValue().fpg_descontopadrao) : null;\r\n dados.formacondicaopagamentos = listaCondPag.length > 0 ? listaCondPag : [];\r\n\r\n if (isBoleto) {\r\n dados.definicaoboleto = {};\r\n dados.definicaoboleto.dbl_id = formulario.getFieldValue().dbl_id;\r\n dados.definicaoboleto.dbl_boletosfaltantes = 1;//parseInt(valores.dbl_boletosfaltantes); VERIFICAR\r\n dados.definicaoboleto.dbl_codigomulta = !!formulario.getFieldValue().dbl_codigomulta ? parseInt(formulario.getFieldValue().dbl_codigomulta) : null;\r\n dados.definicaoboleto.dbl_tipojuromora = !!formulario.getFieldValue().dbl_tipojuromora ? parseInt(formulario.getFieldValue().dbl_tipojuromora) : 0;\r\n dados.definicaoboleto.dbl_percjuromora = !!formulario.getFieldValue().dbl_percjuromora ? formulario.getFieldValue().dbl_percjuromora : null;\r\n dados.definicaoboleto.dbl_formatonossonumero = !!formulario.getFieldValue().dbl_formatonossonumero ? parseInt(formulario.getFieldValue().dbl_formatonossonumero) : null;\r\n dados.definicaoboleto.dbl_diasaplicarmulta = !!formulario.getFieldValue().dbl_diasaplicarmulta ? parseInt(formulario.getFieldValue().dbl_diasaplicarmulta) : null;\r\n dados.definicaoboleto.dbl_codigobaixa = !!formulario.getFieldValue().dbl_codigobaixa ? parseInt(formulario.getFieldValue().dbl_codigobaixa) : null;\r\n dados.definicaoboleto.dbl_modeloimpressao = !!formulario.getFieldValue().dbl_modeloimpressao ? parseInt(formulario.getFieldValue().dbl_modeloimpressao) : 1;\r\n dados.definicaoboleto.dbl_formaemissao = !!formulario.getFieldValue().dbl_formaemissao ? parseInt(formulario.getFieldValue().dbl_formaemissao) : 1;\r\n dados.definicaoboleto.dbl_distribuicao = !!formulario.getFieldValue().dbl_distribuicao ? parseInt(formulario.getFieldValue().dbl_distribuicao) : 1;\r\n dados.definicaoboleto.dbl_codigoprotesto = !!formulario.getFieldValue().dbl_codigoprotesto ? parseInt(formulario.getFieldValue().dbl_codigoprotesto) : 1;\r\n dados.definicaoboleto.dbl_diasbaixa = !!formulario.getFieldValue().dbl_diasbaixa ? parseInt(formulario.getFieldValue().dbl_diasbaixa) : null;\r\n dados.definicaoboleto.dbl_diasparaprotestar = !!formulario.getFieldValue().dbl_diasparaprotestar ? parseInt(formulario.getFieldValue().dbl_diasparaprotestar) : null;\r\n dados.definicaoboleto.dbl_valorminimoprotesto = !!formulario.getFieldValue().dbl_valorminimoprotesto ? parseFloat(formulario.getFieldValue().dbl_valorminimoprotesto) : null;\r\n dados.definicaoboleto.dbl_valormulta = parseFloat(formulario.getFieldValue().dbl_valormulta);\r\n dados.definicaoboleto.dbl_aceite = formulario.getFieldValue().dbl_aceite;\r\n dados.definicaoboleto.dbl_padraoarquivoremessa = formulario.getFieldValue().dbl_padraoarquivoremessa;\r\n dados.definicaoboleto.crt_id = formulario.getFieldValue().crt_id;\r\n dados.definicaoboleto.dbl_nomearquivoremessa = formulario.getFieldValue().dbl_nomearquivoremessa;\r\n dados.definicaoboleto.dbl_padraoarquivoremessa = formulario.getFieldValue().dbl_padraoarquivoremessa;\r\n dados.definicaoboleto.dbl_extensaoarquivoremessa = formulario.getFieldValue().dbl_extensaoarquivoremessa;\r\n dados.definicaoboleto.dbl_nossonumeroinicial = !!formulario.getFieldValue().dbl_nossonumeroinicial ? formulario.getFieldValue().dbl_nossonumeroinicial : '';\r\n dados.definicaoboleto.dbl_nossonumerofinal = !!formulario.getFieldValue().dbl_nossonumerofinal ? formulario.getFieldValue().dbl_nossonumerofinal : '';\r\n dados.definicaoboleto.dbl_numeroconvenio = !!formulario.getFieldValue().dbl_numeroconvenio ? formulario.getFieldValue().dbl_numeroconvenio : '';\r\n dados.definicaoboleto.dbl_numerocontrato = !!formulario.getFieldValue().dbl_numerocontrato ? formulario.getFieldValue().dbl_numerocontrato : '';\r\n dados.definicaoboleto.dbl_msglocalpagamento = !!formulario.getFieldValue().dbl_msglocalpagamento ? formulario.getFieldValue().dbl_msglocalpagamento : '';\r\n dados.definicaoboleto.dbl_mensagem1 = !!formulario.getFieldValue().dbl_mensagem1 ? formulario.getFieldValue().dbl_mensagem1 : '';\r\n dados.definicaoboleto.dbl_mensagem2 = !!formulario.getFieldValue().dbl_mensagem2 ? formulario.getFieldValue().dbl_mensagem2 : '';\r\n dados.definicaoboleto.dbl_mensagem3 = !!formulario.getFieldValue().dbl_mensagem3 ? formulario.getFieldValue().dbl_mensagem3 : '';\r\n dados.definicaoboleto.dbl_mensagemmora = !!formulario.getFieldValue().dbl_mensagemmora ? formulario.getFieldValue().dbl_mensagemmora : '';\r\n dados.definicaoboleto.dbl_especiedocumento = !!formulario.getFieldValue().dbl_especiedocumento ? parseInt(formulario.getFieldValue().dbl_especiedocumento) : 0;\r\n }\r\n\r\n let enderecoUrl = 'FormaPagamento/';\r\n if (dados.fpg_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, dados).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Forma de Pagamento editada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n resetarConstantes();\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, dados).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Forma de Pagamento adicionada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n resetarConstantes();\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados) {\r\n resetarConstantes();\r\n if (manutencao.dados.fpg_emiteboleto && manutencao.dados.fpg_tipopagamento === 15) {\r\n setIsBoleto(true);\r\n carregarBoleto();\r\n }\r\n if (manutencao.dados.fpg_tipopagamento === 5) {\r\n setIsCarne(true);\r\n } else {\r\n setIsCarne(false);\r\n }\r\n if (manutencao.dados.fpg_tipopagamento !== 1 && manutencao.dados.fpg_tipopagamento !== 2 && manutencao.dados.fpg_tipopagamento !== 12) {\r\n setMostarCondicao(true);\r\n carregarCondicoes();\r\n } else if (manutencao.dados.fpg_tipopagamento === 12) {\r\n setIsValePresente(true);\r\n }\r\n if (manutencao.dados.fpg_tipopagamento == 3 || manutencao.dados.fpg_tipopagamento == 4 || manutencao.dados.fpg_tipopagamento == 17) {\r\n setShowItegracao(true)\r\n setTpIntegracao(manutencao.dados.fpg_tipointegracao);\r\n if (manutencao.dados.fpg_tipointegracao === 3 && !tipoTef) {\r\n notification.warning({ message: \"Atenção!\", description: \"Nenhum Tipo TEF selecionado nas Parâmetros do Local\" })\r\n }\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n switch (tipoTef) {\r\n case 0: //Sitef\r\n api.get('Enum/Listar?nome=TabelaCodigoFuncaoSitef').then(\r\n res => {\r\n setFuncaoTef(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n break;\r\n case 1: // Auttar\r\n api.get('Enum/Listar?nome=TabelaCodigoFuncaoAuttar').then(\r\n res => {\r\n setFuncaoTef(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n break;\r\n default:\r\n break;\r\n }\r\n }, [tipoTef])\r\n\r\n function carregarDados() {\r\n popularFormas();\r\n definirDadosBoleto();\r\n };\r\n\r\n function popularFormas() {\r\n api.get('Enum/Listar?nome=FormaDePagamento').then(\r\n res => {\r\n setTipoPagamento(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get(`ParametroLocal/BuscarParametros`).then(\r\n res => {\r\n setTipoTef(res.data.par_tipotef);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n api.get('Enum/Listar?nome=IntegracaoPagamentos').then(\r\n res => {\r\n setTipoIntegracao(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n\r\n };\r\n\r\n function resetarConstantes() {\r\n setDadosBoleto([]);\r\n setListaCondPag([]);\r\n setAbaSelecionada(\"1\");\r\n };\r\n function alterarTpIntegracao(tpIntegracao) {\r\n setTpIntegracao(tpIntegracao);\r\n\r\n if (tpIntegracao === 3 && !tipoTef) {\r\n notification.warning({ message: \"Atenção!\", description: \"Nenhum Tipo TEF selecionado nas Parâmetros do Local\" })\r\n }\r\n };\r\n\r\n function definirDadosBoleto(e) {\r\n if (e?.target.checked == true || formulario.getFieldValue().fpg_emiteboleto == true) {\r\n setDefinirDadosBoletos(true);\r\n }\r\n if (e != undefined && e?.target.checked == false) {\r\n setDefinirDadosBoletos(false);\r\n }\r\n }\r\n\r\n function alterarTpPagamento(tpPagamento) {\r\n tpPagamento = parseInt(tpPagamento);\r\n\r\n if (tpPagamento === 15) {\r\n setIsBoleto(true);\r\n setObrigaBanco(true);\r\n } else {\r\n setIsBoleto(false);\r\n }\r\n if (tpPagamento === 5) {\r\n setIsCarne(true);\r\n } else {\r\n setIsCarne(false);\r\n }\r\n\r\n if (tpPagamento === 12) {\r\n setIsValePresente(true);\r\n } else {\r\n setIsValePresente(false);\r\n }\r\n\r\n if (!!tpPagamento && tpPagamento !== 1 && tpPagamento !== 2 && tpPagamento !== 12) {\r\n setMostarCondicao(true);\r\n } else {\r\n setMostarCondicao(false);\r\n }\r\n if (tpPagamento == 3 || tpPagamento == 4 || tpPagamento == 17) {\r\n setShowItegracao(true)\r\n }\r\n else {\r\n setShowItegracao(false)\r\n }\r\n };\r\n\r\n function carregarBoleto() {\r\n if (!!manutencao.dados.fpg_id) {\r\n api.get(`DefinicaoBoleto/Listar?codigoFormaPagamento=${manutencao.dados.fpg_id}`).then(\r\n res => {\r\n setDadosBoleto(res.data);\r\n formulario.setFieldsValue(res.data);\r\n if (!!manutencao.dados.dadosBoleto) {\r\n manutencao.dados.dadosBoleto = res.data;\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function carregarCondicoes() {\r\n if (!!manutencao.dados.fpg_id) {\r\n api.get(`FormaPagamento/ListarCondicaoPgtoRelacionadas?CodigoFormaPagamento=${manutencao.dados.fpg_id}`).then(\r\n res => {\r\n setListaCondPag(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n };\r\n\r\n const calcPercent = value => {\r\n let result = 0;\r\n if (value) {\r\n value = value.toString();\r\n if (value.includes(\"%\"))\r\n result = (parseFloat(value.toString().replace(\".\", \"\").replace(\",\", \".\").replace(\"%\", \"\")) / 100);\r\n else\r\n result = (value / 100);\r\n }\r\n return result;\r\n }\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Forma de Pagamento Ativa\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!isValePresente && \r\n {/* ---> não remover required nem filtroPesq, pois são utilizados caso seja boleto para preenchimento obrigatorio da conta corrente */}\r\n \r\n ({cta.ctc_id} - {cta.ctc_descricao})\r\n }\r\n />\r\n \r\n }\r\n {!isValePresente &&\r\n \r\n prevValues.fpg_descontopadrao !== currentValues.fpg_descontopadrao}>\r\n {({ getFieldValue, setFieldsValue }) => {\r\n let value = getFieldValue(\"fpg_descontopadrao\");\r\n if (value && value !== \"\") {\r\n value = value.toString();\r\n if (value.includes(\"%\")) {\r\n value = value.replace(\".\", \"\").replace(\",\", \".\").replace(\"%\", \"\");\r\n if (parseFloat(value) > 100) {\r\n setFieldsValue({ fpg_descontopadrao: 100 });\r\n }\r\n }\r\n }\r\n return \r\n Desconto Padrão Aplicado\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n }}\r\n \r\n \r\n }\r\n {showItegracao && \r\n \r\n \r\n \r\n }\r\n {showItegracao && tpFuncao == 3 && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n {isBoleto && \r\n \r\n definirDadosBoleto(e)}>Emite Boleto?\r\n \r\n }\r\n {isCarne && \r\n \r\n Imprime Carnê?\r\n \r\n }\r\n \r\n \r\n {mostrarCondicao && \r\n \r\n }\r\n {definirDadosBoletos && \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoFormaPagamento from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerFormaPagamento() {\r\n\r\n const [formFormaPagamento] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados === null) {\r\n formFormaPagamento.setFieldsValue({ fpg_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n formFormaPagamento.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+fpg_descricao' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","export default function roundValue(num, places = 2) {\r\n if (!(\"\" + num).includes(\"e\")) {\r\n return +(Math.round(num + \"e+\" + places) + \"e-\" + places);\r\n } else {\r\n let arr = (\"\" + num).split(\"e\");\r\n let sig = \"\"\r\n if (+arr[1] + places > 0) {\r\n sig = \"+\";\r\n }\r\n\r\n return +(Math.round(+arr[0] + \"e\" + sig + (+arr[1] + places)) + \"e-\" + places);\r\n }\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerFormaPagamento from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\nimport roundValue from '../../ValueObjects/roundValue';\r\n\r\nexport default function FormaPagamento() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+fpg_descricao' } }), []);\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a forma de pagamento ${dados.fpg_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n function excluirRegistro(dados) {\r\n api.delete(`FormaPagamento/Excluir/${dados.fpg_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Forma de Pagamento excluida com sucesso!` });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarRegistro(dados);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+fpg_descricao' } });\r\n });\r\n }\r\n\r\n const modalExcluirCondicao = forma => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Excluir a forma de Pagamento ${forma.fpg_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(forma);\r\n }\r\n });\r\n };\r\n function inativarRegistro(dados) {\r\n dados.fpg_ativo = false;\r\n api.put(`FormaPagamento/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Forma de Pagamento inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+fpg_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {fpg_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Forma de Pagamento',\r\n render: ({ fpg_descricao, fpg_principal }) => (\r\n
\r\n \r\n
\r\n \r\n Principal\r\n \r\n \r\n \r\n {fpg_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Conta Corrente',\r\n render: ({ ctc_descricao }) => (\r\n
\r\n {(!!ctc_descricao) ? (ctc_descricao) : 'Não Informada'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto Padrão',\r\n align: 'right',\r\n render: ({ fpg_descontopadrao }) => (\r\n
\r\n {roundValue(fpg_descontopadrao * 100)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n record.dadosBoleto = {};\r\n record.fpg_descontopadrao = (record.fpg_descontopadrao && record.fpg_descontopadrao > 0) ? (record.fpg_descontopadrao * 100) : 0;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluirCondicao(record) }}/>\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Table } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function TabFormaPagamento({ formasPagamento }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarFormasPgto();\r\n }, []);\r\n\r\n function carregarFormasPgto() {\r\n api.get(`FormaPagamento/ListarAtivos?PageSize=200`).then(\r\n res => {\r\n if (!!res.data.items) {\r\n let index = 0;\r\n let dados = [...res.data.items];\r\n dados.sort((a, b) => (\r\n (a.fpg_descricao.charAt(0) + a.fpg_descricao.charAt(1) > b.fpg_descricao.charAt(0) + b.fpg_descricao.charAt(1)) ? 1 :\r\n ((b.fpg_descricao.charAt(0) + b.fpg_descricao.charAt(1)) > (a.fpg_descricao.charAt(0) + a.fpg_descricao.charAt(1))) ? -1 : 0\r\n ))\r\n dados.forEach(dados => {\r\n dados.key = index;\r\n index++;\r\n });\r\n setListaFormaPagamento(dados);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n useEffect(() => {\r\n if (formasPagamento.listaFormasPagamento.length > 0 && listaFormaPagamento.length > 0) {\r\n let listIndex = [];\r\n listaFormaPagamento.forEach((listaForma, index, array) => {\r\n formasPagamento.listaFormasPagamento.forEach((forma) => {\r\n if (forma.fpg_id === listaForma.fpg_id) {\r\n listIndex.push(index);\r\n }\r\n });\r\n });\r\n setSelectedRowKeys(listIndex);\r\n }\r\n }, [formasPagamento.listaFormasPagamento, listaFormaPagamento]);\r\n\r\n function popularFormasPgtoSelect(keys, linhas) {\r\n formasPagamento.setListaFormasPagamento(linhas);\r\n };\r\n\r\n const configSelecionarItem =\r\n {\r\n selectedRowKeys,\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n setSelectedRowKeys(selectedRowKeys);\r\n popularFormasPgtoSelect(selectedRowKeys, selectedRows);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Forma Forma de Pagamento\r\n \r\n \r\n Defina as formas de pagamento. Pode ser selecionadas uma ou mais formas de pagamento na tabela abaixo.\r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {fpg_descricao}\r\n
\r\n ),\r\n },\r\n ]\r\n }\r\n rowSelection={configSelecionarItem}\r\n />\r\n
\r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Button, Typography, Divider, InputNumber } from \"antd\";\r\nimport { RedoOutlined, PlusOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabParcelas({ formulario, listaParcelas }) {\r\n\r\n useEffect(() => {\r\n if (listaParcelas.parcelas.length > 0) {\r\n let parcelas = [...listaParcelas.parcelas];\r\n parcelas.forEach(\r\n (parcela) => {\r\n formulario.setFieldsValue({ ['perc' + parcela.pcl_numeroparcela]: parcela.pcl_percparcela });\r\n formulario.setFieldsValue({ ['dias' + parcela.pcl_numeroparcela]: parcela.pcl_numerodias });\r\n }\r\n );\r\n }\r\n }, [listaParcelas.parcelas]);\r\n\r\n\r\n function criarParcelas() {\r\n let qtdParcelas = parseInt(formulario.getFieldValue().pcl_numeroparcela);\r\n let dias = parseInt(formulario.getFieldValue().pcl_numerodias);\r\n let nDiasParcelas = 0;\r\n let somaPercentual = 0;\r\n let resto = 0;\r\n let nUltimaParcela = qtdParcelas - 1;\r\n let percParcela = (100 / qtdParcelas).toFixed(2);\r\n let dadosParcelamento = [];\r\n for (let i = 0; i < qtdParcelas; i++) {\r\n nDiasParcelas += dias;\r\n dadosParcelamento.push({\r\n pcl_numeroparcela: i + 1,\r\n pcl_numerodias: nDiasParcelas,\r\n pcl_percparcela: parseFloat(percParcela)\r\n });\r\n \r\n somaPercentual += parseFloat(percParcela);\r\n }\r\n resto = (100 - somaPercentual).toFixed(2);\r\n if (resto != 0) {\r\n resto = parseFloat(resto);\r\n dadosParcelamento[nUltimaParcela].pcl_percparcela = parseFloat((dadosParcelamento[nUltimaParcela].pcl_percparcela + resto).toFixed(2));\r\n }\r\n listaParcelas.setParcelas(dadosParcelamento);\r\n };\r\n\r\n function reorganizarParcelas() {\r\n listaParcelas.setParcelas([]);\r\n };\r\n\r\n function alterarParcela(campo, name) {\r\n let dados = [...listaParcelas.parcelas];\r\n let valor = parseFloat(formulario.getFieldValue()[name]);\r\n let posicao = parseInt(name.replace(campo, '').trim()) - 1;\r\n if (campo === 'dias') {\r\n dados[posicao].pcl_numerodias = valor;\r\n for (let i = posicao + 1; i < listaParcelas.parcelas.length; i++) {\r\n valor += parseInt(formulario.getFieldValue().pcl_numerodias);\r\n dados[i].pcl_numerodias = valor;\r\n }\r\n } else {\r\n if (valor > 100) {\r\n valor = 100;\r\n }\r\n let valorPerc = (100 - valor) / (dados.length - 1);\r\n let valorInteiro = valorPerc.toFixed(2).split('.');\r\n valorInteiro = parseInt(valorInteiro);\r\n let percValorInt = valorInteiro * (dados.length - 1) + valor;\r\n for (let i = 0; i < dados.length; i++) {\r\n if (posicao != i) {\r\n dados[i].pcl_percparcela = valorInteiro;\r\n } else {\r\n dados[i].pcl_percparcela = valor;\r\n }\r\n }\r\n let sobra = 100 - percValorInt;\r\n if (posicao === 0) {\r\n dados[1].pcl_percparcela += sobra;\r\n } else {\r\n dados[0].pcl_percparcela += sobra;\r\n }\r\n }\r\n listaParcelas.setParcelas(dados);\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Parcelas\" Parcelas\r\n \r\n Defina o número de parcelas e a quantidade de dias que as mesmas terão de intervalo. \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaParcelas.parcelas.map(parcela => (\r\n \r\n \r\n \r\n \r\n Parcela - {parcela.pcl_numeroparcela}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { alterarParcela('dias', 'dias' + parcela.pcl_numeroparcela) }}\r\n />\r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n onChange={() => { alterarParcela('perc', 'perc' + parcela.pcl_numeroparcela) }}\r\n parser={value => value.replace('%', '')} />\r\n \r\n \r\n \r\n \r\n ))}\r\n {listaParcelas.parcelas.length > 0 && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Tooltip, Tabs, notification } from \"antd\";\r\nimport { QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport CurrencyInput from 'react-currency-input';\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { TabFormaPagamento, TabParcelas } from \"./tabPage\";\r\n\r\n\r\nexport default function ManutencaoCondicaoPagamento({ formulario, carregando, aoSalvar }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [exibeParcelas, setExibeParcelas] = useState(false);\r\n const [listaFormasPagamento, setListaFormasPagamento] = useState([]);\r\n const [parcelas, setParcelas] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaDadosForma, setListaDadoForma] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!formulario.getFieldValue().cpg_id) {\r\n let dados = manutencao.dados;\r\n dados.cpg_descontopadrao = (dados.cpg_descontopadrao && dados.cpg_descontopadrao > 0) ? (dados.cpg_descontopadrao * 100) : 0;\r\n dados.cpg_percentualjuros = (dados.cpg_percentualjuros && dados.cpg_percentualjuros > 0) ? (dados.cpg_percentualjuros * 100) : 0;\r\n formulario.setFieldsValue(dados);\r\n carregarDadosCondicao();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n buscarDadosFormasPgto();\r\n }, []);\r\n\r\n const salvarManutencao = async valores => {\r\n let dados = {};\r\n let retorno;\r\n carregando(true);\r\n if (!(await validarCondicaoCrediario(valores))) {\r\n return;\r\n }\r\n\r\n dados.cpg_ativo = valores.cpg_ativo;\r\n dados.cpg_descontopadrao = !!valores.cpg_descontopadrao ? calcPercent(valores.cpg_descontopadrao) : null;\r\n dados.cpg_descricao = valores.cpg_descricao;\r\n dados.cpg_id = valores.cpg_id;\r\n dados.cpg_percentualjuros = !!valores.cpg_percentualjuros ? calcPercent(valores.cpg_percentualjuros) : null;\r\n dados.formacondicaopagamentos = listaFormasPagamento;\r\n dados.mostraParcela = valores.mostraParcela;\r\n dados.parcelamentos = parcelas;\r\n\r\n let enderecoUrl = 'CondicaoPagamento/';\r\n if (dados.cpg_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, dados).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Condição de Pagamento editada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n carregando(false);\r\n console.log(err);\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cpg_descricao' } });\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, dados).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Condição de Pagamento adicionada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n carregando(false);\r\n console.log(err);\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cpg_descricao' } });\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n };\r\n\r\n const calcPercent = value => {\r\n let result = 0;\r\n if (value) {\r\n value = value.toString();\r\n if (value.includes(\"%\"))\r\n result = (parseFloat(value.toString().replace(\".\", \"\").replace(\",\", \".\").replace(\"%\", \"\")) / 100);\r\n else\r\n result = (value / 100);\r\n }\r\n return result;\r\n };\r\n\r\n async function validarCondicaoCrediario(valores) {\r\n let lista = [...listaFormasPagamento];\r\n for (let forma of lista) {\r\n let formaPgto = listaDadosForma.find(f => f.fpg_id === forma.fpg_id);\r\n if (!!formaPgto && formaPgto.fpg_tipopagamento == 5 && parcelas.length <= 0) {\r\n notification.warning({ description: \"Condição com forma de pagamento do tipo crediario deve possuir parcelas!\", message: \"Aviso\" });\r\n carregando(false);\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n\r\n function buscarDadosFormasPgto() {\r\n api.get('FormaPagamento/Listar?filtro=&apenasAtivos=true&PageSize=200').then(\r\n (res) => {\r\n if (!!res.data) {\r\n setListaDadoForma(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n\r\n function defineParcelas() {\r\n setExibeParcelas(!exibeParcelas);\r\n };\r\n\r\n function carregarDadosCondicao() {\r\n let cpg_id = formulario.getFieldValue().cpg_id;\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${cpg_id}`).then(\r\n res => {\r\n if (res.data.length > 0) {\r\n formulario.setFieldsValue({ mostraParcela: true });\r\n defineParcelas();\r\n res.data.sort((a, b) => (a.pcl_numeroparcela > b.pcl_numeroparcela) ? 1 : ((b.pcl_numeroparcela > a.pcl_numeroparcela) ? -1 : 0));\r\n setParcelas(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n api.get(`CondicaoPagamento/ListarFormaPagamentoRelacionadas?codigoCondicaoPagamento=${cpg_id}`).then(\r\n res => {\r\n setListaFormasPagamento(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n prevValues.cpg_descontopadrao !== currentValues.cpg_descontopadrao}>\r\n {({ getFieldValue, setFieldsValue }) => {\r\n let value = getFieldValue(\"cpg_descontopadrao\");\r\n if (value && value !== \"\") {\r\n value = value.toString();\r\n if (value.includes(\"%\")) {\r\n value = value.replace(\".\", \"\").replace(\",\", \".\").replace(\"%\", \"\");\r\n if (parseFloat(value) > 100) {\r\n setFieldsValue({ cpg_descontopadrao: 100 });\r\n }\r\n }\r\n }\r\n return \r\n Desconto Padrão Aplicado\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n }}\r\n \r\n \r\n \r\n prevValues.cpg_percentualjuros !== currentValues.cpg_percentualjuros}>\r\n {({ getFieldValue, setFieldsValue }) => {\r\n let value = getFieldValue(\"cpg_percentualjuros\");\r\n if (value && value !== \"\") {\r\n value = value.toString();\r\n if (value.includes(\"%\")) {\r\n value = value.replace(\".\", \"\").replace(\",\", \".\").replace(\"%\", \"\");\r\n if (parseFloat(value) > 100) {\r\n setFieldsValue({ cpg_percentualjuros: 100 });\r\n }\r\n }\r\n }\r\n return \r\n Percentual de Juros Aplicado\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n }}\r\n \r\n \r\n \r\n \r\n { defineParcelas() }}>Definir Parcelas\r\n \r\n \r\n \r\n \r\n Condição de Pagamento Ativa?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibeParcelas && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoCondicaoPagamento from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerCentroDistribuicao() {\r\n\r\n const [formCondicaoPagamento] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formCondicaoPagamento.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formCondicaoPagamento.resetFields();\r\n formCondicaoPagamento.setFieldsValue({ cpg_ativo: true });\r\n };\r\n\r\n function fecharDrawer() {\r\n formCondicaoPagamento.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cpg_descricao' } });\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\nimport { EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerCondicaoPagamento from './drawer';\r\nimport roundValue from '../../ValueObjects/roundValue';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function CondicaoPagamento() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cpg_descricao' } });\r\n }, []);\r\n\r\n function excluirCondicao(condicao) {\r\n api.post(`CondicaoPagamento/Excluir/${condicao.cpg_id}`).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: 'Condição de pagamento inativada com sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cpg_descricao' } });\r\n }\r\n );\r\n\r\n };\r\n\r\n const modalExcluirCondicao = condicao => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Excluir a Condição de Pagamento ${condicao.cpg_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirCondicao(condicao);\r\n }\r\n });\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {cpg_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Condição de Pagamento',\r\n render: ({ cpg_descricao }) => (\r\n
\r\n {cpg_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto Padrão',\r\n align: 'right',\r\n render: ({ cpg_descontopadrao }) => (\r\n
\r\n {roundValue(cpg_descontopadrao * 100)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Percentual Juros',\r\n align: 'right',\r\n render: ({ cpg_percentualjuros }) => (\r\n
\r\n {roundValue(cpg_percentualjuros * 100)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n {/* \r\n {\r\n modalExcluirCondicao(record);\r\n }} icon={} />\r\n */}\r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Checkbox, Input, Select, notification, Radio } from \"antd\";\r\n\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n//import { listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoSerieFiscal({ formulario, carregando, aoSalvar }) {\r\n\r\n const [listaModelo, setListaModelo] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [bloquearCampos, setBloquearCampos] = useState(false);\r\n const [ocultarNumeroLoteRps, setOcultarNumeroLoteRps] = useState(true);\r\n\r\n useEffect(() => {\r\n api.get(`ModeloDocumentoFiscal/ListarTodos`).then(res => {\r\n setListaModelo(res.data);\r\n })\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (!!manutencao && isObjetoDiffVazio(manutencao.dados)) {\r\n setBloquearCampos(true);\r\n if(manutencao.dados.mdf_id == \"98\")\r\n setOcultarNumeroLoteRps(false);\r\n } else {\r\n setBloquearCampos(false);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ser_serie' } });\r\n };\r\n function verificarModeloDocumento() {\r\n if(formulario.getFieldValue(['mdf_id']) == \"98\"){\r\n setOcultarNumeroLoteRps(false);\r\n }\r\n else{\r\n setOcultarNumeroLoteRps(true);\r\n }\r\n };\r\n\r\n function salvarManutencao(values) {\r\n carregando(true);\r\n if (values.ser_id) {\r\n editarSerie(values);\r\n } else {\r\n incluirSerie(values);\r\n };\r\n }\r\n\r\n function incluirSerie(values) {\r\n api.post(`SerieFiscal/Incluir`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Série Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function editarSerie(values) {\r\n api.put(`SerieFiscal/Editar`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Série Fiscal foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Emissão Própria\r\n Emissão Terceiros\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Série Ativa?\r\n \r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoSerieFiscal from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerSerieFiscal() {\r\n\r\n const [formSerieFiscal] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (!!manutencao.dados) {\r\n formSerieFiscal.setFieldsValue(manutencao.dados);\r\n } \r\n else {\r\n // formSerieFiscal.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n formSerieFiscal.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Radio, Form } from \"antd\";\r\nimport { EditOutlined, ExclamationCircleOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerSerieFiscal from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function SerieFiscal() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formPesquisa] = Form.useForm();\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisa.getFieldsValue().statusAtivo ? 1 : formPesquisa.getFieldsValue().statusAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}`, filtro: '', ordem: '+ser_serie' } });\r\n formPesquisa.setFieldsValue({ statusAtivo: 1 });\r\n }, [])\r\n\r\n function editarSerie(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n function aplicarFiltros() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+ser_serie' } });\r\n }\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a Série ${dados.ser_serie}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n function inativarRegistro(dados) {\r\n api.put(`SerieFiscal/InativarSerie/${dados.ser_id}`).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Série inativada com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ser_serie' } });\r\n }\r\n )\r\n }\r\n function excluirRegistro(dados) {\r\n api.delete(`SerieFiscal/Excluir/${dados.ser_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n erro => {\r\n modalInativarRegistro(dados);\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ser_serie' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n aplicarFiltros()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {ser_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Modelo da Série',\r\n render: ({ mdf_id, modelodocfiscal }) => (\r\n
\r\n {mdf_id} - {modelodocfiscal.mdf_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n width: 150,\r\n render: ({ ser_serie }) => (\r\n
\r\n {ser_serie}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Série Fiscal do Documento',\r\n align: 'center',\r\n width: 178,\r\n render: ({ ser_numero }) => (\r\n
\r\n {ser_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (dados, record) => (\r\n
\r\n \r\n
\r\n editarSerie(record)} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Form, Row, Col, Radio, Input, Checkbox, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoHistorico({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = (values) => {\r\n let retorno;\r\n carregando(true);\r\n\r\n\r\n let enderecoUrl = 'Historico/';\r\n if (values.his_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Condição de Pagamento editada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n carregando(false);\r\n console.log(err);\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } });\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ description: `Condição de Pagamento adicionada com sucesso!`, message: 'Sucesso' });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n carregando(false);\r\n console.log(err);\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } });\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && manutencao.dados.duplicar) {\r\n formulario.setFieldsValue({ his_id: 0 });\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Saída\r\n Entrada\r\n Extra-Caixa\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoHistorico from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerHistorico() {\r\n\r\n const [formHistorico] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null){\r\n formHistorico.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formHistorico.setFieldsValue({his_ativo:true});\r\n }\r\n\r\n function fecharDrawer() {\r\n formHistorico.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerHistorico from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar } from \"../../components\";\r\n\r\nexport default function Historico() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } }), []);\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`Historico/Excluir/${dados.his_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarRegistro(dados);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } });\r\n });\r\n }\r\n\r\n function inativarRegistro(dados) {\r\n dados.his_ativo = false;\r\n api.put(`Historico/Editar`,dados).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Status inativado com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+his_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a Status ${dados.his_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Status: ${dados.his_id} - ${dados.his_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalDuplicarDados = (dados) => {\r\n Modal.confirm({\r\n title: 'Duplicar?',\r\n icon: ,\r\n content: `Deseja duplicar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dados.duplicar = true;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados }});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true }});\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {his_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Histórico',\r\n render: ({ his_descricao }) => (\r\n
\r\n {his_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95, \r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => {modalDuplicarDados(dados)}}/>\r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => {modalExcluir(dados)}}/>\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined, FileDoneOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoNotaFiscal from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerNotaFiscal({ drawerExtra = { showDrawerExtra: false }, fecharDrawerNotaFiscal}) {\r\n\r\n const [formNotaFiscal] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [salvarRascunho, setSalvarRascunho] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formNotaFiscal.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n if (!!drawerExtra.showDrawerExtra) {\r\n drawerExtra.setShowDrawerExtra(false)\r\n }\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Form, Table, Tag, Checkbox, Input, Modal } from \"antd\";\r\nimport { PlusOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { info } from \"../../services/funcoes\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalEditarItemDevolucao, ModalEditarCFOP } from \"../../components/modals/\";\r\nimport { calculoICMS, calculoICMSST, calculoIPI } from \"../../services/calculaImposto\";\r\n\r\nexport default function TabItens({ listaNotaDevolucao, adicionarNotas, dadosNfe }) {\r\n\r\n const [form] = Form.useForm();\r\n const [openModalEditarItemDevolucao, setOpenModalEditarItemDevolucao] = useState(false);\r\n const [openModalEditarCFOP, setOpenModalEditarCFOP] = useState(false);\r\n const [itemEditar, setItemEditar] = useState({});\r\n const [listaCFOP, setListaCFOP] = useState([]);\r\n\r\n function removeNotaFiscal(ntf_id) {\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Remover a Nota Fiscal Selecionada?',\r\n okText: 'Sim, quero remover',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let indice = lista.findIndex(nota => nota.ntf_id === ntf_id);\r\n lista.splice(indice, 1);\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n listarCFOP();\r\n }, []);\r\n\r\n function listarCFOP() {\r\n api.get(`Cfop/ListarCFOPDevolucao?tipoOperacao=${dadosNfe.dadosNfeDevolucao.ntf_tipooperacao}&ufDest=${dadosNfe.dadosNfeDevolucao.ntf_ufdest}&ufOrigem=${dadosNfe.dadosNfeDevolucao.ntf_ufdest}`).then(\r\n res => {\r\n setListaCFOP(res.data);\r\n }\r\n ).catch(\r\n erro => { console.log(erro); }\r\n );\r\n };\r\n\r\n function selecionarTodos(checked, ntf_id) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === ntf_id });\r\n nota.checked = checked;\r\n nota.itens.forEach((item) => {\r\n item.checked = checked;\r\n });\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n };\r\n\r\n function selecionarItem(nfi_id, ntf_id) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === ntf_id });\r\n let item = nota.itens.find((item) => { return item.nfi_id === nfi_id });\r\n item.checked = !item.checked;\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n };\r\n\r\n function excluirMarcados(ntf_id) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === ntf_id });\r\n nota.itens = nota.itens.filter((item) => { return !item.checked });\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n };\r\n\r\n function excluirItem(ntf_id, nfi_id) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === ntf_id });\r\n nota.itens = nota.itens.filter((item) => { return item.nfi_id !== nfi_id });\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n };\r\n\r\n async function salvarItemNota() {\r\n let quantidade = parseFloat(form.getFieldValue().nfi_qtde);\r\n if (itemEditar.qtdeOriginal < quantidade) {\r\n info(`Quantidade informada maior que quantidade disponível para devolução (${itemEditar.qtdeOriginal})!`);\r\n return;\r\n }\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === itemEditar.ntf_id });\r\n let item = nota.itens.find((item) => { return item.nfi_id === itemEditar.nfi_id });\r\n item.qtdeRestante = quantidade;\r\n\r\n if (!!item.nfi_valorseguro) {\r\n item.valorSeguroRateio = (parseFloat(item.nfi_valorseguro) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.nfi_valorfrete) {\r\n item.valorFreteRateio = (parseFloat(item.nfi_valorfrete) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.nfi_valoroutros) {\r\n item.valorOutrosRateio = (parseFloat(item.nfi_valoroutros) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.nfi_valordesconto) {\r\n item.valorDescontoRateio = (parseFloat(item.nfi_valordesconto) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n\r\n if (!!item.bcIcms) {\r\n item.nig_valorbc = (parseFloat(item.bcIcms) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.valorIcms) {\r\n item.nig_valoricms = (parseFloat(item.valorIcms) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.bcIcmsSt) {\r\n item.nig_valorbcst = (parseFloat(item.bcIcmsSt) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.valorIcmsSt) {\r\n item.nig_valoricmsst = (parseFloat(item.valorIcmsSt) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.bcIpi) {\r\n item.npi_valorbcipi = (parseFloat(item.bcIpi) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n if (!!item.valorIpi) {\r\n item.npi_valoripi = (parseFloat(item.valorIpi) / itemEditar.nfi_qtde) * quantidade;\r\n }\r\n\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n setOpenModalEditarItemDevolucao(false);\r\n };\r\n\r\n function pesquisarItem(value, ntf_id) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === ntf_id });\r\n nota.filtro = value;\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n };\r\n\r\n function selecionarCFOP(cfo_cfop) {\r\n if (!!cfo_cfop) {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let nota = lista.find((nota) => { return nota.ntf_id === itemEditar.ntf_id });\r\n let item = nota.itens.find((item) => { return item.nfi_id === itemEditar.nfi_id });\r\n item.nfi_cfop = cfo_cfop;\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n setOpenModalEditarCFOP(false);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Itens Itens das Notas Fiscais Referenciadas\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n {ntf_numero}\r\n \r\n \r\n \r\n ),\r\n }, {\r\n title: 'Outras Informações',\r\n render: ({ ser_serie, ntf_dataemissao, ntf_chavenfe }) => (\r\n
\r\n \r\n
\r\n Série: {(!!ser_serie ? ser_serie : '')}\r\n \r\n \r\n Emissão: {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n {!(!!ntf_chavenfe) && \r\n NF-e não gerada\r\n }\r\n {!!ntf_chavenfe && \r\n NF-e: {ntf_chavenfe}\r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total',\r\n width: 220,\r\n render: ({ totalNfe }) => (\r\n
\r\n \r\n
\r\n Total da Nota\r\n \r\n \r\n \r\n \r\n {FormatNumber(totalNfe, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 75,\r\n render: ({ ntf_id }) => (\r\n
\r\n \r\n
\r\n \r\n selecionarTodos(e.target.checked, ntf_id)}>Selecionar Todos\r\n \r\n \r\n \r\n pesquisarItem(value, ntf_id)} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{ return item.pro_descricao.toUpperCase().indexOf((filtro.trim()).toUpperCase()) >= 0 || item.pro_codigo.toString().indexOf((filtro.trim()).toUpperCase()) >= 0 }) : itens} columns={[\r\n {\r\n title: 'Itens da Nota',\r\n width: '48%',\r\n render: ({ checked, pro_codigo, pro_descricao, nfi_ean, grade, nfi_id }) => (\r\n
\r\n \r\n
\r\n { selecionarItem(nfi_id, ntf_id) }} />\r\n \r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {nfi_ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n ),\r\n }, {\r\n title: 'CFOP',\r\n width: '5%',\r\n align: 'center',\r\n render: (record) => (\r\n \r\n ),\r\n }, {\r\n title: 'CST/CSOSN',//`${record.nis_csosn ? 'CSOSN' : 'CST'}`,\r\n align: 'center',\r\n width: '6%',\r\n render: ({ nig_origemmercadoria, nig_cst, nis_origemmercadoria, nis_csosn }) => (\r\n
\r\n
\r\n {nis_csosn ? nis_origemmercadoria + nis_csosn : nig_origemmercadoria + nig_cst}\r\n \r\n \r\n ),\r\n }, {\r\n title: 'Qtde',\r\n width: '7%',\r\n align: 'right',\r\n render: ({ qtdeRestante, nfi_unidademedida }) => (\r\n
\r\n {FormatNumber(qtdeRestante, true, false, 3)} {nfi_unidademedida}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Unit.(R$)',\r\n width: '8%',\r\n align: 'right',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Desc.(R$)',\r\n width: '7%',\r\n align: 'right',\r\n render: ({ valorDescontoRateio }) => (\r\n
\r\n {FormatNumber(valorDescontoRateio, true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Frete.(R$)',\r\n width: '7%',\r\n align: 'right',\r\n render: ({ nfi_valorfrete }) => (\r\n
\r\n {FormatNumber(nfi_valorfrete, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Total(R$)',\r\n align: 'right',\r\n width: '8%',\r\n render: ({ nfi_valorunitario, qtdeRestante, valorDescontoRateio }) => (\r\n
\r\n {FormatNumber((nfi_valorunitario * qtdeRestante) - valorDescontoRateio, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} pagination={false} scroll={{ x: 900 }} />\r\n \r\n \r\n ,\r\n defaultExpandAllRows: true,\r\n expandIconColumnIndex: -1\r\n }} />\r\n \r\n \r\n \r\n { selecionarCFOP(cfo_cfop) }} fecharModal={() => setOpenModalEditarCFOP(false)} listaCFOP={{ listaCFOP, setListaCFOP }} />\r\n { salvarItemNota() }} cancelar={() => setOpenModalEditarItemDevolucao(false)} itemEditar={itemEditar} />\r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Card, Form, Typography, Input, Divider } from \"antd\";\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { validarNumeros } from \"../../services/funcoes\";\r\n\r\nexport default function TabResumo({ form, listaNotaDevolucao, resumoNota, zerarFrete, setZerarFrete }) {\r\n\r\n useEffect(() => {\r\n let formulario = form.getFieldValue();\r\n let resumo = {\r\n valorProduto: 0,\r\n valorFrete: 0,\r\n valorOutros: 0,\r\n valorSeguro: 0,\r\n valorBaseICMS: 0,\r\n valorICMS: 0,\r\n valorBaseST: 0,\r\n valorICMSST: 0,\r\n valorBaseIPI: 0,\r\n valorIPI: 0,\r\n valorDesconto: 0,\r\n valorTotalNotaFiscal: 0\r\n };\r\n\r\n listaNotaDevolucao.listaNotaDevolucao.forEach((nota) => {\r\n nota.itens.forEach((item) => {\r\n resumo.valorProduto += (item.nfi_valorunitario * item.qtdeRestante) || 0;\r\n resumo.valorFrete += (item.valorFreteRateio) || 0;\r\n resumo.valorOutros += (item.valorOutrosRateio) || 0;\r\n resumo.valorSeguro += (item.valorSeguroRateio) || 0;\r\n resumo.valorDesconto += (item.valorDescontoRateio) || 0;\r\n resumo.valorBaseICMS += (item.nig_valorbc) || 0;\r\n resumo.valorICMS += (item.nig_valoricms) || 0;\r\n resumo.valorBaseST += (item.nig_valorbcst) || 0;\r\n resumo.valorICMSST += (item.nig_valoricmsst) || 0;\r\n resumo.valorBaseIPI += (item.npi_valorbcipi) || 0;\r\n resumo.valorIPI += (item.npi_valoripi) || 0;\r\n });\r\n\r\n });\r\n resumo.valorFrete = validarNumeros(formulario.valorFrete);\r\n if (zerarFrete) { \r\n resumo.valorFrete = 0;\r\n setZerarFrete(false);\r\n };\r\n \r\n resumo.valorSeguro += validarNumeros(formulario.valorSeguro);\r\n resumo.valorTotalNotaFiscal = resumo.valorProduto + resumo.valorOutros + resumo.valorIPI + resumo.valorICMSST - resumo.valorDesconto + resumo.valorFrete + resumo.valorSeguro;\r\n\r\n resumoNota.setResumoNota(resumo);\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorProduto, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorFrete, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorSeguro, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorOutros, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorDesconto, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseIPI, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorIPI, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseICMS, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorICMS, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseST, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorICMSST, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota\r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorTotalNotaFiscal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Tag, Table, Modal } from \"antd\";\r\nimport { PlusOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function TabNotasFiscais({ listaNotaDevolucao, retornaDescricaoStatus, adicionarNotas }) {\r\n\r\n function removeNotaFiscal(ntf_id){\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Remover a Nota Fiscal Selecionada?',\r\n okText: 'Sim, quero remover',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let lista = [...listaNotaDevolucao.listaNotaDevolucao];\r\n let indice = lista.findIndex(nota => nota.ntf_id === ntf_id);\r\n lista.splice(indice, 1);\r\n listaNotaDevolucao.setListaNotaDevolucao(lista);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Notas Notas Fiscais Referenciadas\r\n \r\n Referencie todas as notas que deseja devolver para o mesmo destinatário aqui! \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {ntf_numero}\r\n \r\n \r\n \r\n ),\r\n }, {\r\n title: 'Outras Informações',\r\n render: ({ tip_descricao, ser_serie, ntf_dataemissao, ntf_finalidadeNfe, ntf_chavenfe, pes_nome }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n \r\n \r\n Série: {(!!ser_serie > 0 ? ser_serie : '')}\r\n \r\n \r\n Emissão: {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n Nota de: {tip_descricao}\r\n \r\n \r\n Finalidade: {ntf_finalidadeNfe}\r\n \r\n {!(!!ntf_chavenfe) && \r\n NF-e não gerada\r\n }\r\n {!!ntf_chavenfe && \r\n NF-e: {ntf_chavenfe}\r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 220,\r\n render: ({ totalNfe }) => (\r\n
\r\n {FormatNumber(totalNfe, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: ({ntf_id}) => (\r\n
\r\n \r\n
\r\n \r\n {ambiente === 2 &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)} nameValue=\"ope_id\" nameLabel=\"ope_descricao\" filtroExtra={filtroAdd}\r\n conteudo={\r\n op => ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n {!!dadosNfe.dadosNfeDevolucao.pes_id &&\r\n \r\n \r\n
{dadosNfe.dadosNfeDevolucao.ntf_nomedest}
\r\n
\r\n \r\n }\r\n {!!!dadosNfe.dadosNfeDevolucao.pes_id &&\r\n \r\n \r\n {\r\n validarFisicoJuridico(valor); listarClienteCpfCnpj(valor.currentTarget.value.replace(/\\D/g, ''));\r\n }}\r\n />\r\n \r\n \r\n }\r\n {!!!dadosNfe.dadosNfeDevolucao.pes_id &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n {(!!!dadosNfe.dadosNfeDevolucao.pes_id && pages.tagPages === 0 && !possuiCliente) &&\r\n <>\r\n \r\n \r\n \r\n \r\n {!isEstrangeiro && \r\n buscarCep(cep.currentTarget.value)} onPressEnter={(cep) => buscarCep(cep.currentTarget.value)} />\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({tipoEnd.pse_nome})\r\n }\r\n />\r\n {/* \r\n {listaPais.map(pais => (\r\n {pais.pse_nome}\r\n ))}\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {(!!!dadosNfe.dadosNfeDevolucao.pes_id && pages.tagPages === 0 && !possuiCliente) &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({tipoEnd.tpe_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n ({tp.tpt_descricao})\r\n } />\r\n \r\n */}\r\n \r\n }\r\n {(!!!dadosNfe.dadosNfeDevolucao.pes_id && pages.tagPages === 0 && !possuiCliente) &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n \r\n \r\n :\r\n \r\n \r\n \r\n \r\n \r\n \"Notas Notas Fiscais\r\n \r\n \r\n \r\n \r\n \r\n listarNotasReferenciadas(value)} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {ntf_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ntf_status }) => (\r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Outras Informações',\r\n render: ({ ntf_tipooperacao, ser_serie, ntf_dataemissao, ntf_finalidade, ntf_chavenfe, ntf_nomedest }) => (\r\n
\r\n \r\n
\r\n {ntf_nomedest}\r\n \r\n \r\n \r\n \r\n Série: {(!!ser_serie ? ser_serie : '')}\r\n \r\n \r\n Emissão: {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n Nota de: {ntf_tipooperacao === 0 ? 'Entrada' : 'Saída'}\r\n \r\n \r\n Finalidade: {listaFinalidadeNota[ntf_finalidade - 1].value}\r\n \r\n {!(!!ntf_chavenfe) && \r\n NF-e não gerada\r\n }\r\n {!!ntf_chavenfe && \r\n NF-e: {ntf_chavenfe}\r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n width: 220,\r\n align: 'right',\r\n render: ({ valortotalnota }) => (\r\n
\r\n {FormatNumber(valortotalnota, true)}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 35,\r\n render: ({ checked, key }) => (\r\n
\r\n \r\n
\r\n { selecionarNota(key) }} />\r\n \r\n \r\n \r\n ),\r\n }\r\n ]} scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n \r\n }\r\n { setOpenDevolucaoSubstituicaoTributaria(false) }} aoSalvar={(dadosNotaDevSt) => { setOpenDevolucaoSubstituicaoTributaria(false); salvarNotaAjuste(dadosNotaDevSt) }} dadosNfe={dadosNfe} serieFiscal={serieFiscal} dadosNotaDevSt={dadosNotaDevSt} />\r\n { formulario.setFieldsValue({ antecipacaoEstorno: 1 }); setOpenModalAntecipacao(false) }} aoSalvar={() => { setOpenModalAntecipacao(false); salvarNotaDevolucao() }} />\r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, RightOutlined, LeftOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from \"../../components\";\r\nimport NotaDevolucao from '../notaFiscalDevolucao/index';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerDevolucao({ dadosNfeDevolucao }) {\r\n\r\n const [formDevolucao] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [tagPages, setTagPages] = useState(null);\r\n const [adicionarNotas, setAdicionarNotas] = useState(false);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n function fecharDrawer() {\r\n formDevolucao.resetFields();\r\n setProximaPag(null);\r\n setTagPages(0);\r\n setAdicionarNotas(false);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerDevolucao: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Input, Alert, Tooltip, notification, Modal } from \"antd\";\r\nimport { QuestionCircleOutlined, CheckCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { Data, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { getEmpresa, getLocal } from \"../../services/auth\";\r\nimport { MaskFormat } from '../../ValueObjects/index';\r\n\r\nexport default function NotaFiscalDebitoCredito({ formulario, carregando, aoSalvar }) {\r\n\r\n const [ambiente, setAmbiente] = useState([]);\r\n const [operacao, setOperacao] = useState([]);\r\n const [serieFiscal, setSerieFiscal] = useState([]);\r\n const [listaPessoas, setListaPessoas] = useState([]);\r\n const [exibeDestinatario, setExibeDestinatario] = useState(false);\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [editando, setEditando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = (values) => {\r\n values.ntf_numero = !!values.ntf_numero ? values.ntf_numero : dadosContribuinte.ntf_numero;\r\n values.ntf_status = 1;\r\n values.baseCalculo = !!values.baseCalculo ? values.baseCalculo : 0;\r\n values.valorDebitoCredito = !!values.valorDebitoCredito ? values.valorDebitoCredito : 0;\r\n values.emitirNfe = true;\r\n values.dadosContribuinte = dadosContribuinte;\r\n values.dadosDestinatario = listaPessoas.find((pes) => { return pes.pes_id === values.pes_id });\r\n values.operacao = operacao.filter((odc) => odc.odc_id === values.odc_id)[0];\r\n\r\n carregando(true);\r\n if (values.ntf_id) {\r\n api.put('/NotaFiscalDebitoCredito/Alterar', values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }\r\n }, erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n // notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post('/NotaFiscalDebitoCredito/Incluir', values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n // notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Nfe/VerificarAmbiente?codigoLocal=${getLocal()}`).then(retornoAmbiente => {\r\n if (!!retornoAmbiente.data) {\r\n setAmbiente(retornoAmbiente.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n\r\n api.get(`OperacaoDebitoCredito/Listar`).then(res => {\r\n if (res.status === 200) {\r\n setOperacao(res.data.items);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`SerieFiscal/Listar?EmitenteDocumento=0&CodigoModeloDocFiscal=55&SomenteAtivos=true`).then(res => {\r\n if (res.status === 200) {\r\n setSerieFiscal(res.data.items);\r\n if (res.data.items.length === 1) {\r\n formulario.setFieldsValue({ ser_id: res.data.items[0].ser_id });\r\n }\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n // api.get(`Pessoa/ListarPessoasAtivas`).then(\r\n // res => {\r\n // if (res.status === 200) {\r\n // setListaPessoas(res.data.items);\r\n // }\r\n // }).catch((erro) => console.error(erro));\r\n\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawerExtra && operacao.length > 0) {\r\n verificarOperacao();\r\n if (!!formulario.getFieldValue().pes_id) {\r\n verificarPessoaContribuinte(formulario.getFieldValue().pes_id);\r\n }\r\n }\r\n if (!!manutencao.dados) {\r\n setEditando(true);\r\n formulario.setFieldsValue(manutencao.dados);\r\n } else {\r\n formulario.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }, [ui.showDrawerExtra, operacao]);\r\n\r\n function verificarOperacao() {\r\n if (!!formulario.getFieldValue().odc_id) {\r\n let odc = operacao.find((odc) => { return odc.odc_id === formulario.getFieldValue().odc_id });\r\n if (odc.cfo_cfop > 5000) {\r\n setExibeDestinatario(true);\r\n }\r\n } else {\r\n setExibeDestinatario(false);\r\n }\r\n };\r\n\r\n function verificarPessoaContribuinte(id) {\r\n if (!!id && !listaPessoas.find((pes) => { return pes.pes_id === id }).pej_inscricaoestadual) {\r\n formulario.setFieldsValue({ pes_id: null });\r\n notification.error({ message: 'Destinatário inválido para este tipo de operação', description: \"Não é possível emitir NF-e de Débito ou Crédito de ICMS para não Contribuinte de ICMS - Verifique no cadastro do destinatário a informação da Inscrição Estadual!\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {ambiente === 2 &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n {!!editando && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibeDestinatario &&\r\n \r\n \r\n {\r\n verificarPessoaContribuinte(dados)\r\n }} conteudo={\r\n pc => ({pc.pes_id} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}
\r\n {(!!pc.pej_inscricaoestadual ? ` IE.: ${pc.pej_inscricaoestadual}` : '')}\r\n
)\r\n } />\r\n
\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from \"../../components\";\r\nimport NotaFiscalDebitoCredito from './debitoCredito';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerDebitoCredito() {\r\n\r\n const [formDebitoCredito] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (manutencao.dados !== null) {\r\n formDebitoCredito.setFieldsValue(manutencao.dados);\r\n } else {\r\n ///formNotaFiscal.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formDebitoCredito.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n return (\r\n\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React from 'react';\r\nimport { Modal } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { manutencaoActions } from '../../actions';\r\nimport { DetalheNotaFiscal } from \"../../components\";\r\n\r\nexport default function ModalDetalheNotaFiscal({ exibirModal, fecharModal, dadosModal }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const onClose = () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharModal();\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n\r\n )\r\n}","import { Col, Divider, Form, Input, Row, Select, Typography, notification } from 'antd';\r\nimport React, { useState, useEffect } from 'react';\r\nimport { InputCep, InputCpfCnpj, SelectIncluir, SelectPaginacao } from '../../components';\r\nimport { MaskFormat } from '../../ValueObjects';\r\nimport { useStateValue } from '../../state';\r\nimport api from '../../services/api';\r\nimport { selectPaginadoActions } from '../../actions';\r\nimport { ModalTelefone } from '../../components/modals';\r\nimport { retornaCep } from '../../services/funcoes';\r\n\r\nexport default function FornecedorNFE({ form, dadosEndereco, dadosFornecedor, setDadosFornecedor, operacaoFiscal, setOperacaoFiscal }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [openDrawerFornecedor, setOpenDrawerFornecedor] = useState(false);\r\n const [listaEndereco, setListaEndereco] = useState([]);\r\n const [listaEmail, setListaEmail] = useState([]);\r\n const [dadosTelefone, setDadosTelefone] = useState([]);\r\n const [abreModalTelefone, setAbreModalTelefone] = useState(false);\r\n const [pessoaFisica, setPessoaFisica] = useState(1);\r\n const [formularioTelefone] = Form.useForm();\r\n\r\n useEffect(() => {\r\n if (listaEndereco?.length > 0 && !!form.getFieldValue().ntf_endereco) {\r\n buscarDadosEndereco(form.getFieldValue().ntf_endereco);\r\n }\r\n }, [listaEndereco]);\r\n\r\n\r\n async function buscarDadosFornecedor(registro) {\r\n if (registro) {\r\n let fornecedor = (await api.get(`Fornecedor/BuscarFornecedor/${registro}`)).data;\r\n if (fornecedor) {\r\n setDadosFornecedor(fornecedor);\r\n let retorno = await validarProdutorRural(fornecedor);\r\n if (retorno === true) {\r\n if (fornecedor.pef_produtorrural) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': fornecedor?.enderecos[0].pie_inscricaoestadual });\r\n } else {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': fornecedor.pej_inscricaoestadual });\r\n }\r\n let enderecoP = fornecedor.enderecos?.find(e => e.pee_enderecoprincipal);\r\n if (!!enderecoP) {\r\n form.setFieldsValue({ 'ntf_endereco': enderecoP.pee_id });\r\n }\r\n let telefoneP = fornecedor.telefones?.find(t => t.psc_principal);\r\n if (!!telefoneP) {\r\n form.setFieldsValue({ 'telefoneDestinatario': telefoneP.psc_id });\r\n }\r\n let emailP = fornecedor.emails?.find(e => e.pem_emailprincipal);\r\n if (!!emailP) {\r\n form.setFieldsValue({ 'ntf_emaildestinatario': emailP.pem_id })\r\n }\r\n setDadosTelefone(fornecedor.telefones);\r\n setListaEndereco(fornecedor.enderecos);\r\n setListaEmail(fornecedor.emails);\r\n setarCpfCnpj(fornecedor);\r\n }\r\n }\r\n } else {\r\n form.resetFields(); \r\n setDadosFornecedor({});\r\n setOperacaoFiscal({});\r\n }\r\n }\r\n\r\n async function validarProdutorRural(fornecedor) {\r\n let retorno = true;\r\n\r\n if (Object.keys(fornecedor).length > 0 && Object.keys(operacaoFiscal).length > 0) {\r\n if (fornecedor.pef_produtorrural === false && operacaoFiscal.ope_notaprodutorrural === true) {\r\n notification.warning({ message: 'Atenção!', description: 'O fornecedor selecionado não é um produtor rural.' })\r\n form.setFieldsValue({ for_id: null });\r\n setDadosFornecedor({});\r\n retorno = false;\r\n }\r\n }\r\n\r\n return retorno;\r\n }\r\n\r\n function buscarDadosEndereco(pee_id) {\r\n let end = listaEndereco.filter((end) => (end.pee_id === pee_id))[0];\r\n if (!!end) {\r\n form.setFieldsValue({ pse_id: end.pse_id });\r\n if (end.pse_id) {\r\n let lista = [];\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: end.pse_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n if (end.pie_inscricaoestadual) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': end.pie_inscricaoestadual });\r\n }\r\n form.setFieldsValue({ cep_cep: end.cep_cep });\r\n buscarCep(end.cep_cep);\r\n dadosEndereco(end);\r\n form.setFieldsValue({ bai_nome: end.bai_nome });\r\n form.setFieldsValue({ pee_numero: end.pee_numero });\r\n form.setFieldsValue({ pee_complemento: end.pee_complemento });\r\n }\r\n }\r\n\r\n async function buscarCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({ cidade: `${retornoCep.cid_descricao} / ${retornoCep.est_sigla}` });\r\n } else {\r\n form.setFieldsValue({ cep_cep: undefined });\r\n }\r\n };\r\n\r\n function adicionarTelefone() {\r\n if (!!form.getFieldValue().pes_id) {\r\n setAbreModalTelefone(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" });\r\n }\r\n };\r\n\r\n function onCloseModalTelefone() {\r\n setAbreModalTelefone(false);\r\n };\r\n\r\n function setarCpfCnpj(registro) {\r\n let cpfCnpj = '';\r\n if (registro.pes_fisicajuridica > 0) {\r\n setPessoaFisica(registro.pes_fisicajuridica)\r\n if (registro.pes_fisicajuridica === 1) {\r\n cpfCnpj = registro.pef_cpf;\r\n } else if (registro.pes_fisicajuridica === 2) {\r\n cpfCnpj = registro.pej_cnpj;\r\n } else if (registro.pes_fisicajuridica === 3) {\r\n cpfCnpj = registro.pes_idestrangeiro;\r\n }\r\n form.setFieldsValue({ ntf_cpfcnpj: cpfCnpj });\r\n } else {\r\n notification.warn(\"Fornecedor informado com cadastro de pessoa física/jurídica/estrangeira incorreto!\");\r\n form.setFieldsValue({ for_id: null });\r\n return false;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n setOpenDrawerFornecedor(true)}\r\n nameValue=\"for_id\"\r\n allowClear={true} \r\n onChangeFunction={(dados) => {buscarDadosFornecedor(dados)}} \r\n conteudo={\r\n pc => ({pc.for_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n } />\r\n
\r\n \r\n \r\n {pessoaFisica === 1 &&\r\n \r\n }\r\n {pessoaFisica === 2 &&\r\n \r\n }\r\n {pessoaFisica === 3 &&\r\n \r\n } \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { adicionarTelefone() }}\r\n campoDescricao={'psc_numero'}\r\n campoValue={'psc_id'}\r\n campokey={'psc_id'}\r\n placeHolder={'Selecione o Telefone'}\r\n labelFormItem={'Telefone'}\r\n nameFormItem={'telefoneDestinatario'} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({pse.pse_nome})\r\n } />\r\n \r\n \r\n \r\n { buscarCep(event.currentTarget.value) }} />\r\n \r\n \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n \r\n \r\n {\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { onCloseModalTelefone() }} />\r\n\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Table, InputNumber, Select, notification, Tag, Modal, Descriptions, Input } from \"antd\";\r\nimport { CheckOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport Data from \"../data\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { getTela } from \"../../services/auth\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport DrawerVendedores from \"../drawerVendedores\";\r\nimport { isObjetoDiffVazio, validarNumeros } from \"../../services/funcoes\";\r\nimport { ModalAntecipacaoClienteFornecedor, ModalBandeiraCartao, ModalContaCorrente, ModalParcelasPendentes, ModalSenhaLiberacao, ModalCheque } from \"../modals\";\r\nimport SelectPaginado from \"../selectPaginado\";\r\nimport FormaDePagamento from \"../enuns/formaDePagamento\";\r\n\r\nexport default function FormasPagamentoNfEntrada({ form, dadosOperacao, listaFormaPagamento, setListaFormaPagamento }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formaPagamento, setFormaPagamento] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [valorJaPago, setValorJaPago] = useState(false);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [multiplasFormasPagamento, setMultiplasFormasPagamento] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [abrirDrawerVendedores, setAbrirDrawerVendedores] = useState(false);\r\n const [formVendedores] = Form.useForm();\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [semCondicao, setSemCondicao] = useState(false);\r\n const [ehCheque, setEhCheque] = useState(false);\r\n const [ehValePresente, setEhValePresente] = useState(false);\r\n const [dadosTela] = useState(getTela());\r\n const [isNota, setIsNota] = useState(false);\r\n const [openModalCartao, setOpenModalCartao] = useState(false);\r\n const [dadosParcelas, setDadosParcelas] = useState([]);\r\n const [executarParcelas, setExecutarParcelas] = useState(false);\r\n const [formaPagamentoAntecipacao, setFormaPagamentoAntecipacao] = useState({});\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [exibirModalCheque, setExibirModalCheque] = useState(false);\r\n const [dadosCheque, setDadosCheque] = useState([]);\r\n const [abreModalContaCorrente, setAbreModalContaCorrente] = useState(false);\r\n const [contaCorrente, setContaCorrente] = useState({});\r\n const [tipoContaCorrente, setTipoContaCorrente] = useState(\"1\");\r\n const [desabilitaBtn, setDesabilitaBtn] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [semPagamento, setSemPagamento] = useState(false);\r\n\r\n const fecharModalOK = () => {\r\n setOpenModalCartao(false);\r\n };\r\n\r\n const fecharModalCartao = () => {\r\n let dados = [...listaFormaPagamento];\r\n let index = listaFormaPagamento.length - 1;\r\n removerFormaPagamento(dados[index]);\r\n setOpenModalCartao(false);\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n if (validarNumeros(valorTotal) === 0) {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (validarNumeros(valorTotal) !== 0) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [valorTotal]);\r\n\r\n useEffect(() => {\r\n if (!!dadosTela) {\r\n let tela = JSON.parse(dadosTela).formulario.replaceAll('/', '');\r\n if (tela === `notaFiscal`) {\r\n setIsNota(true);\r\n }\r\n }\r\n }, [dadosTela]);\r\n\r\n useEffect(() => {\r\n if (isNota) {\r\n setMultiplasFormasPagamento(true);\r\n }\r\n }, [isNota]);\r\n\r\n useEffect(() => {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n let dadosFpg = [...listaFormaPagamento]\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (!!form.getFieldValue().fpg_id) {\r\n listarCondicao(form.getFieldValue().fpg_id, true);\r\n }\r\n if (valor >= valorTotal && valor >= parseFloat(form.getFieldValue().valorTotal)) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n setExecutarParcelas(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: listaFormaPagamento } } } });\r\n if (dadosFpg.some(dado => dado.parcelas && dado.parcelas.length > 0)) {\r\n dadosFpg.forEach(dado => {\r\n if (dado.parcelas && dado.parcelas.length > 0) {\r\n dado.parcelas.forEach(parcela => {\r\n parcela.pcl_numeroparcela = parcela.prc_numeroparcela;\r\n parcela.dataVencimento = parcela.prc_datavencimento;\r\n parcela.valorParcela = parcela.prc_valor;\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n if (!!listaFormaPagamento[listaFormaPagamento.length - 1] && !!!listaFormaPagamento[listaFormaPagamento.length - 1].ctc_id &&\r\n (listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpDepositoBancario\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpPixDinamico)) {\r\n setAbreModalContaCorrente(true);\r\n setTipoContaCorrente(\"2\")\r\n }\r\n if (!!listaFormaPagamento[listaFormaPagamento.length - 1] && !!!listaFormaPagamento[listaFormaPagamento.length - 1].ctc_id &&\r\n (listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpCheque\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpDinheiro)) {\r\n setTipoContaCorrente(\"1\");\r\n setAbreModalContaCorrente(true);\r\n }\r\n\r\n setEhValePresente(false);\r\n setValorJaPago(valor);\r\n }, [listaFormaPagamento]);\r\n\r\n useEffect(() => {\r\n if (parseFloat(form.getFieldValue().valorTotal) > 0 && !editando) {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (valor >= valorTotal && valor >= parseFloat(form.getFieldValue().valorTotal)) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }\r\n }\r\n\r\n }, [form.getFieldValue()]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento && executarParcelas) {\r\n let dados = manutencao.dados.faturamento;\r\n let index = dados.length - 1;\r\n setExecutarParcelas(false);\r\n if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n validarJaPossuiCrediario(() => {\r\n popularParcelas();\r\n });\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n validarJaPossuiBoleto(() => {\r\n popularParcelas();\r\n });\r\n } else if ((((dados[index].fpg_tipopagamento === FormaDePagamento.fpCartaoCredito && dadosParcelas.length === 0)\r\n || dados[index].fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) && !!!manutencao.dados.credito) && !openModalCartao) {\r\n abrirModalCartao(dados[index]);\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n abrirModalCheque(dados[index]);\r\n }\r\n } else if (!!manutencao.dados && !!manutencao.dados.antecipacao) {\r\n retornaFormaPagamentoAntecipacao();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n if (multiplasFormasPagamento && (!!dadosFormaPagamento && dadosFormaPagamento.fpg_tipopagamento !== FormaDePagamento.fpValePresente)) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [multiplasFormasPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().fpg_id) {\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ formaPagamento: dadosFormaPagamento } } } });\r\n }\r\n }, [form.getFieldValue().fpg_id]);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(formaPagamentoAntecipacao)) {\r\n adicionarFormaPagamento(false, true);\r\n\r\n }\r\n }, [formaPagamentoAntecipacao]);\r\n\r\n useEffect(() => {\r\n\r\n if (semCondicao && !!form.getFieldValue().fpg_id) {\r\n adicionarFormaPagamento();\r\n }\r\n }, [semCondicao]);\r\n\r\n useEffect(() => {\r\n if (semPagamento) {\r\n\r\n }\r\n }, [semPagamento]);\r\n\r\n const formaPgtoAntecipacao = {\r\n fpg_id: 10758,\r\n ctc_descricao: null,\r\n ctc_id: null,\r\n dbl_extensaoarquivoremessa: null,\r\n dbl_nomearquivoremessa: null,\r\n dbl_padraoarquivoremessa: null,\r\n fpg_ativo: true,\r\n fpg_descontopadrao: null,\r\n fpg_descricao: \"ANTECIPACAO\",\r\n fpg_emiteboleto: false,\r\n fpg_imprimecarne: false,\r\n fpg_padraosistema: true,\r\n fpg_principal: true,\r\n parcelas: [],\r\n cheques: [],\r\n antecipacoes: !!manutencao.dados && !!manutencao.dados.antecipacao ? manutencao.dados.antecipacao : [],\r\n fpg_tipopagamento: FormaDePagamento.fpProgramaFidelidade,//A prazo\r\n };\r\n\r\n function onCloseModalCheque() {\r\n setExibirModalCheque(false);\r\n };\r\n\r\n function carregarDados() {\r\n api.get('FormaPagamento/Listar?Ativo=true&EntradaSaida=2').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dados = res.data.items;\r\n if (!!dadosOperacao && isObjetoDiffVazio(dadosOperacao)) {\r\n if (dadosOperacao.tip_id === 5) {\r\n setFormaPagamento(dados);\r\n } else {\r\n setFormaPagamento(dados.filter((fpg) => (fpg.fpg_tipopagamento !== 90)));\r\n }\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function valorRestantePgto(dadosTemp) {\r\n let restante = 0;\r\n let valorPago = 0;\r\n if (!editando) {\r\n dadosTemp.forEach((dados) => {\r\n valorPago += parseFloat(dados.pfp_valor);\r\n });\r\n restante = parseFloat(valorTotal) - valorPago;\r\n form.setFieldsValue({ pfp_valor: restante.toFixed(2) });\r\n } else {\r\n setEditando(false);\r\n }\r\n };\r\n\r\n function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null });\r\n }\r\n api.get(`CondicaoPagamento/Listar?Ativo=true&CodigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function retornaFormaPagamentoAntecipacao() {\r\n api.get(`FormaPagamento/RetornaFormaPagamentoAntecipacao?Ativo=true&FormasPagtoQuitaAntecipacao=true`).then(\r\n res => {\r\n setFormaPagamentoAntecipacao(res.data.items[0]);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarJaPossuiCrediario(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n };\r\n\r\n function validarJaPossuiBoleto(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoleto && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n async function adicionarFormaPagamento(liberadoCredito = false, antecipacao = false) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n let pagamentoCartao = false;\r\n\r\n if (parseFloat(form.getFieldValue().pfp_valor) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de Pagamento Inválido!' });\r\n return false;\r\n }\r\n\r\n if (ehValePresente && !!!form.getFieldValue().codigoValePresente) {\r\n notification.warning({ description: 'Favor informar um vale presente válido!', message: 'Aviso' });\r\n return;\r\n }\r\n\r\n //Utilizado para atualizar a constante de valor total da nota de acordo com o formulario que é o valor exibido em tela.\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n\r\n if (antecipacao) {\r\n if (!dadosTemp.find(formasPgto => formasPgto.fpg_tipopagamento === FormaDePagamento.fpProgramaFidelidade && formasPgto.fpg_quitacaoantecipacao)) {\r\n dadosTemp.push({\r\n fpg_id: formaPagamentoAntecipacao.fpg_id,\r\n fpg_descricao: formaPagamentoAntecipacao.fpg_descricao,\r\n cpg_descricao: '',\r\n cpg_id: null,\r\n condicaoPagamento: {},\r\n formaPagamento: formaPgtoAntecipacao,\r\n pfp_valor: manutencao.dados.antecipacao[0].valorAntecipacao,\r\n parcelas: [],\r\n descontoPadrao: {},\r\n ctc_id: formaPagamentoAntecipacao.ctc_id,\r\n fpg_tipopagamento: FormaDePagamento.fpProgramaFidelidade,\r\n fpg_quitacaoantecipacao: formaPagamentoAntecipacao.fpg_quitacaoantecipacao,\r\n });\r\n setListaFormaPagamento(dadosTemp);\r\n setFormaPagamentoAntecipacao({});\r\n valorRestantePgto(dadosTemp);\r\n }\r\n } else {\r\n if (!!form.getFieldValue().fpg_id && (semCondicao || (condicaoPagamento.length === 0 || !!form.getFieldValue().cpg_id))) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n if (listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ))) {\r\n let dados = listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ));\r\n dados.pfp_valor = parseFloat(form.getFieldValue().pfp_valor);\r\n validarContaCorrente(dadosTemp, () => {\r\n if (!pagamentoCartao) {\r\n valorRestantePgto(dadosTemp);\r\n }\r\n });\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n form.setFieldsValue({ numeroCheques: null });\r\n } else {\r\n incluirNovaFormaPagamento(dadosTemp);\r\n }\r\n\r\n }\r\n else if (form.getFieldValue().cpg_id === null) {\r\n notification.warning({ message: 'Aviso', description: 'Informe a condição de pagamento!' });\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condição de pagamento!' });\r\n }\r\n }\r\n };\r\n\r\n\r\n async function incluirNovaFormaPagamento(listaForma) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n\r\n if (semCondicao) {\r\n let valor = 0;\r\n if (!semPagamento) {\r\n valor = form.getFieldValue().pfp_valor;\r\n }\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: '',\r\n cpg_id: null,\r\n condicaoPagamento: {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n numeroCheques: null,\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento,\r\n fpg_tipointegracao: dadosFormaPagamento.fpg_tipointegracao,\r\n });\r\n\r\n validarContaCorrente(listaForma, () => {\r\n if (!semPagamento) {\r\n valorRestantePgto(listaForma);\r\n }\r\n });\r\n\r\n\r\n } else {\r\n if (parseFloat(valorTotal) < parseFloat(parseFloat(form.getFieldValue().pfp_valor) + parseFloat(valorJaPago)).toFixed(2)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total do pedido!' });\r\n } else {\r\n let dadosCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!dadosCondicoesPagamento && dadosCondicoesPagamento.cpg_descricao ? dadosCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n condicaoPagamento: !!dadosCondicoesPagamento && JSON.stringify(dadosCondicoesPagamento) !== '{}' ? dadosCondicoesPagamento : {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: form.getFieldValue().pfp_valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n numeroCheques: form.getFieldValue().numeroCheques,\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento,\r\n fpg_tipointegracao: dadosFormaPagamento.fpg_tipointegracao,\r\n });\r\n validarContaCorrente(listaForma, () => {\r\n valorRestantePgto(listaForma);\r\n });\r\n }\r\n }\r\n\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n form.setFieldsValue({ numeroCheques: null });\r\n };\r\n\r\n function validarContaCorrente(dados, callback) {\r\n let ultimaForma = dados[dados.length - 1];\r\n if (!!!ultimaForma.ctc_id && (ultimaForma.fpg_tipopagamento === FormaDePagamento.fpCheque || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDinheiro\r\n || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDepositoBancario || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpPixDinamico\r\n || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria)) {\r\n setAbreModalContaCorrente(true);\r\n }\r\n\r\n setListaFormaPagamento(dados);\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function onCloseModalContaCorrente() {\r\n let ultimaForma = listaFormaPagamento[listaFormaPagamento.length - 1];\r\n ultimaForma.ctc_id = contaCorrente.ctc_id;\r\n ultimaForma.ctc_descricao = contaCorrente.ctc_descricao;\r\n setListaFormaPagamento(listaFormaPagamento);\r\n setAbreModalContaCorrente(false);\r\n };\r\n\r\n function abrirModalCartao(dados) {\r\n if (!!!dados.parcelas || dados.parcelas <= 0) {\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n popularParcelas(() => {\r\n if (dados.fpg_tipointegracao == null) {\r\n setOpenModalCartao(true);\r\n }\r\n });\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n popularParcelasDebito(() => {\r\n if (dados.fpg_tipointegracao == null) {\r\n setOpenModalCartao(true);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n function abrirModalCheque(dados) {\r\n setDadosCheque(dados);\r\n setExibirModalCheque(!exibirModalCheque);\r\n };\r\n\r\n function popularParcelas(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${manutencao.dados.faturamento[index].cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(manutencao.dados.faturamento[index].pfp_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados[index].parcelas = listaParcelas;\r\n manutencao.dados.faturamento[indexPosicao].editando = false;\r\n if (manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpBoleto) {\r\n let creditoDebito = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento === FormaDePagamento.fpCartaoCredito;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: creditoDebito } } } });\r\n }\r\n setListaFormaPagamento(dados);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularParcelasDebito(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n let parc = {};\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_percparcela = 100;\r\n parc.pcl_numeroparcela = 1;\r\n parc.prc_numeroparcela = 1;\r\n let valorParcela = ((parc.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n listaParcelas.push(parc);\r\n dados[index].parcelas = listaParcelas;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: false } } } });\r\n setListaFormaPagamento(dados);\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function pagamentoCartao(dados, dadosCartao) {\r\n let dataAtual = new Date();\r\n let listaFormasPagamento = [...manutencao.dados.faturamento];\r\n let indexPosicao = listaFormasPagamento.length - 1;\r\n let recebimentoCartao = [];\r\n let retorno = {};\r\n if (dadosCartao.tipoParcelamento === 0) {//Estabelecimento\r\n let numeroDias = !!dados.credito ? dadosCartao.bandeira.bce_nrodiasrecebimentocredito : dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n listaFormasPagamento[indexPosicao].parcelas.forEach((parcela) => {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = parcela.pcl_numeroparcela;\r\n retorno.rcc_valor = parcela.prc_valor;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + numeroDias));\r\n recebimentoCartao.push(retorno);\r\n });\r\n } else {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = 1;\r\n retorno.rcc_valor = listaFormasPagamento[indexPosicao].valorPago;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentocredito)));\r\n recebimentoCartao.push(retorno);\r\n }\r\n if (listaFormasPagamento[indexPosicao].fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n let formaPagamento = listaFormaPagamento[indexPosicao];\r\n formaPagamento.parcelas.forEach(parcela => {\r\n parcela.pcl_numerodias = dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(parcela.pcl_numerodias)));\r\n parcela.dataPagamento = dataVencimento;\r\n parcela.prc_datavencimento = moment(dataVencimento);\r\n parcela.dataVencimento = moment(dataVencimento);\r\n });\r\n setListaFormaPagamento(listaFormaPagamento);\r\n }\r\n\r\n listaFormaPagamento[indexPosicao].recebimentoCartao = recebimentoCartao;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ recebimentoCartao: recebimentoCartao } } } });\r\n };\r\n\r\n function cancelarAlteracoesFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.editando = false;\r\n setEditandoParcelas(false);\r\n setEditando(false);\r\n };\r\n\r\n function salvarFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.parcelas.forEach((item, i) => {\r\n i++;\r\n item.prc_datavencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.dataVencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.valorParcela = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n item.prc_valor = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n });\r\n formaPgto.editando = false;\r\n setListaFormaPagamento(formasPgto);\r\n setEditandoParcelas(false);\r\n };\r\n\r\n function editarFormasPagamento(forma) {\r\n let dados = forma;\r\n setPagamentoTotal(false);\r\n setMultiplasFormasPagamento(true);\r\n setEditando(true);\r\n let lista = [];\r\n lista.push({ name: \"fpg_id\", campo: \"Filtro\", value: forma.fpg_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue({ fpg_id: forma.fpg_id });\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpDinheiro || dados.fpg_tipopagamento === FormaDePagamento.fpCheque || dados.fpg_tipopagamento === FormaDePagamento.fpValePresente ||\r\n dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoleto) {\r\n setSemCondicao(true);\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n setEhCheque(true);\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpValePresente) {\r\n setEhValePresente(true);\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoleto) {\r\n forma.editando = true;\r\n setEditandoParcelas(true);\r\n }\r\n } else {\r\n form.setFieldsValue({ cpg_id: forma.cpg_id });\r\n }\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n };\r\n\r\n function removerFormaPagamento(forma) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpProgramaFidelidade) {\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento), antecipacao: null\r\n }\r\n }\r\n }\r\n });\r\n } else if (forma.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || forma.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento), credito: null\r\n }\r\n }\r\n }\r\n });\r\n } else {\r\n setDadosParcelas([]);\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento),\r\n }\r\n }\r\n }\r\n });\r\n }\r\n dadosTemp = dadosTemp.filter((dados) => dados !== forma);\r\n valorRestantePgto(dadosTemp);\r\n setListaFormaPagamento(dadosTemp);\r\n };\r\n\r\n function fecharDrawerVendedores() {\r\n setAbrirDrawerVendedores(false);\r\n };\r\n\r\n async function validacaoFormasPagamento(registro) {\r\n let dados = (await api.get(`FormaPagamento/Get?id=${registro}`)).data;\r\n setSemCondicao(false);\r\n setEhCheque(false);\r\n setEhValePresente(false);\r\n setSemPagamento(false);\r\n switch (dados.fpg_tipopagamento) {\r\n case FormaDePagamento.fpDinheiro:\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpCheque:\r\n setEhCheque(true)\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpValePresente:\r\n setEhValePresente(true);\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpBoleto:\r\n case FormaDePagamento.fpCreditoLoja:\r\n let cliente = !!manutencao.dados && manutencao.dados.destinatario ? manutencao.dados.destinatario : null;\r\n if (!!cliente && cliente.cli_vendasomenteavista) {\r\n form.setFieldsValue({ fpg_id: null });\r\n notification.warn({ description: 'Venda a prazo não autorizada!', message: 'Aviso' });\r\n }\r\n break;\r\n case FormaDePagamento.fpSemPagamento:\r\n setSemCondicao(true);\r\n setSemPagamento(true);\r\n break;\r\n }\r\n };\r\n\r\n function buscarValePresente(codVale) {\r\n setDesabilitaBtn(true);\r\n api.get(`AntecipacaoClienteFornecedor/BuscarValePresente?codigoVale=${codVale.currentTarget.value}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let saldoVale = res.data;\r\n let valorTotal = parseFloat(form.getFieldValue().valorTotal);\r\n setMultiplasFormasPagamento(true);\r\n if (saldoVale === 0) {\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setMultiplasFormasPagamento(false);\r\n notification.warning(\"Não existe saldo para o vale presente informado!\");\r\n } else {\r\n if (valorTotal > saldoVale) {\r\n form.setFieldsValue({ pfp_valor: saldoVale });\r\n } else {\r\n form.setFieldsValue({ pfp_valor: valorTotal });\r\n }\r\n }\r\n setDesabilitaBtn(false);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: \"Aviso\", description: \"Vale presente não encontrado!\" });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setDesabilitaBtn(false);\r\n }\r\n );\r\n };\r\n\r\n function cancelaContaCorrente() {\r\n setAbreModalContaCorrente(false);\r\n let listaTemp = [...listaFormaPagamento];\r\n listaTemp.splice((listaFormaPagamento.length - 1), 1);\r\n valorRestantePgto(listaTemp);\r\n setListaFormaPagamento(listaTemp);\r\n }\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(form.getFieldValue().pfp_valor);\r\n let dados = form.getFieldValue();\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n };\r\n\r\n function ajustarDataParcelas(numeroParc, qtdTotParcelas) {\r\n let dataAtual = new Date(form.getFieldValue([`dataVencimento${numeroParc}`]).toDate());\r\n for (let i = numeroParc + 1; i <= qtdTotParcelas; i++) {\r\n let dataVenc = new Date(dataAtual.setDate(new Date(dataAtual).getDate() + 30));\r\n form.setFieldsValue({ [`dataVencimento${i}`]: moment(dataVenc) });\r\n }\r\n }\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { ajustarDataParcelas(pcl_numeroparcela, record.parcelas.length) }} /> : {moment(dataVencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { onChangeValorParc(pcl_numeroparcela, record.parcelas.length) }} /> : {FormatNumber(valorParcela, true)}}\r\n
\r\n ),\r\n }\r\n ]} dataSource={record.parcelas} pagination={false} />\r\n };\r\n\r\n const rowExpandable = record => { return (record.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || record.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || record.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || record.fpg_tipopagamento === FormaDePagamento.fpBoleto) && !record.fpg_quitacaoantecipacao };\r\n\r\n return (\r\n
\r\n {!pagamentoTotal && \r\n
\r\n \r\n { listarCondicao(registro); validacaoFormasPagamento(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n \r\n {!semCondicao && \r\n \r\n \r\n \r\n }\r\n {ehCheque && \r\n \r\n \r\n \r\n }\r\n {ehValePresente && \r\n \r\n { buscarValePresente(codVale) }}\r\n />\r\n \r\n }\r\n \r\n {!pagamentoTotal && multiplasFormasPagamento &&\r\n //multiplasFormasPagamento &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n {!!manutencao.dados && !!manutencao.dados.antecipacao && \r\n \r\n \r\n \r\n Valor antecipação utilizada (R$): {FormatNumber(manutencao.dados.antecipacao[0].valorAntecipacao)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n {listaFormaPagamento.length > 0 &&
(\r\n
\r\n \r\n {!!cpg_descricao ? fpg_descricao + ' / ' + cpg_descricao : fpg_descricao}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ pfp_valor }) => (\r\n
\r\n {FormatNumber(pfp_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n {record.fpg_tipopagamento !== FormaDePagamento.fpProgramaFidelidade && !record.fpg_quitacaoantecipacao &&
\r\n {!editandoParcelas &&\r\n \r\n {!editandoParcelas &&\r\n \r\n \r\n \r\n Total dos Pagamentos (R$): \r\n \r\n \r\n \r\n {FormatNumber(totalPagamento, true)}\r\n \r\n \r\n \r\n \r\n )\r\n }} dataSource={listaFormaPagamento}\r\n />}\r\n \r\n \r\n \r\n \r\n { onCloseModalContaCorrente() }} fecharModalContaCorrente={() => { cancelaContaCorrente(); }} contaCorrente={{ contaCorrente, setContaCorrente }} listaContaCorrente={{ listaContaCorrente, setListaContaCorrente }} tipoConta={tipoContaCorrente} />\r\n \r\n \r\n \r\n );\r\n};","import { ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport { Card, Col, Divider, Form, InputNumber, Modal, Row, Typography } from 'antd';\r\nimport React, { useState, useEffect } from 'react';\r\nimport { FormasPagamento, InputPreco } from '../../components';\r\nimport { validarNumeros } from '../../services/funcoes';\r\nimport { useStateValue } from '../../state';\r\nimport FormasPagamentoNfEntrada from '../../components/formasPagamentoNfEntrada';\r\n\r\nexport default function FaturamentoNFE({ form, dadosItens, dadosOperacao, resume }) {\r\n const [valorNota, setValorNota] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState(!!manutencao.dados && !!manutencao.dados.faturamento && manutencao.dados.faturamento.length > 0 ? manutencao.dados.faturamento : [])\r\n const [controlModal, setControlModal] = useState(false);\r\n\r\n useEffect(() => {\r\n resume(false);\r\n calcularFaturamento();\r\n }, [manutencao.dados])\r\n\r\n function calcularFaturamento() {\r\n let formulario = form.getFieldValue();\r\n let subTotal = 0;\r\n dadosItens.forEach((item) => {\r\n subTotal += item.total;\r\n });\r\n form.setFieldsValue({ subTotalNotaFiscal: subTotal });\r\n form.setFieldsValue({ valorFrete: validarNumeros(formulario.valorFrete) });\r\n form.setFieldsValue({ valorSeguro: validarNumeros(formulario.valorSeguro) });\r\n\r\n setValorNota(parseFloat(subTotal) + parseFloat(formulario.valorFrete) + parseFloat(formulario.valorSeguro) + parseFloat(formulario.valorOutrasDespesas));\r\n };\r\n\r\n useEffect(() => {\r\n recalcularTotal();\r\n }, [valorNota]);\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.percentualDesconto);\r\n let tot = parseFloat(valorNota);\r\n let result = 0;\r\n\r\n if (listaFormaPagamento.length > 0 && !!!controlModal) {\r\n setControlModal(true);\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Tem certeza que deseja adicionar desconto? As formas de pagamento terão que ser incluídas novamente.',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaFormaPagamento([]);\r\n },\r\n onCancel() {\r\n form.setFieldsValue({ valorDesconto: 0, percentualDesconto: 0, valorTotal: listaFormaPagamento[0].pfp_valor });\r\n }\r\n });\r\n }\r\n \r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualDesconto: result.toFixed(2) });\r\n }\r\n\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function calcularAcrescimo(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorAcrescimo);\r\n let perc = validarNumeros(formulario.percentualAcrescimo);\r\n let tot = (!!valorNota ? parseFloat(valorNota) : 0);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorAcrescimo: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualAcrescimo: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function recalcularTotal() {\r\n let formulario = form.getFieldValue();\r\n let valor = 0;\r\n if (!!formulario) {\r\n valor = valorNota - validarNumeros(formulario.valorDesconto) + validarNumeros(formulario.valorAcrescimo);\r\n form.setFieldsValue({ valorTotal: valor.toFixed(2) });\r\n let valorPago = 0;\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento) {\r\n manutencao.dados.faturamento.forEach((dadosFat) => {\r\n valorPago += parseFloat(dadosFat.pfp_valor);\r\n if (listaFormaPagamento.length == 0 || form.getFieldValue().valorDesconto > 0);\r\n {\r\n valorPago = 0;\r\n }\r\n });\r\n }\r\n form.setFieldsValue({ pfp_valor: (valor - valorPago).toFixed(2) });\r\n }\r\n };\r\n\r\n function vendedorDescMaxFinal() {\r\n let totalDesconto = 0;\r\n let totalValorDescontoItens = 0;\r\n dadosItens.forEach((itens) => {\r\n totalValorDescontoItens += parseFloat(itens.nfi_valordesconto);\r\n });\r\n let percentualDescontoConcedido = parseFloat(((totalValorDescontoItens * 100) / parseFloat(form.getFieldsValue().subTotalNotaFiscal)).toFixed(2));\r\n totalDesconto = percentualDescontoConcedido + parseFloat(form.getFieldValue().percentualDesconto);\r\n\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Totais da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { vendedorDescMaxFinal(); }}\r\n onChange={() => { calcularDesconto('PERC'); }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { vendedorDescMaxFinal(); }} onChange={() => { calcularDesconto('VALOR'); }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onChange={() => { calcularAcrescimo('PERC') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calcularAcrescimo('VALOR') }} />\r\n \r\n \r\n \r\n \r\n IPI (R$): 0,00\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): 0,00\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Card, Col, Divider, Form, Input, InputNumber, Row, Typography } from 'antd';\r\nimport React, { useState, useEffect } from 'react';\r\nimport { InputPreco } from '../../components';\r\nimport moment from 'moment';\r\n\r\n\r\nexport default function ResumoNFE({ form, itensNota, dadosNfp, resume }) {\r\n resume(true);\r\n\r\n const calcFunrural = () => {\r\n let valorTot = form.getFieldValue('subTotalNotaFiscal');\r\n let aliqFunr = dadosNfp[0].Aliq/*.replace(\"%\", \"\")*/\r\n\r\n let calcTot = valorTot * (aliqFunr / 100);\r\n\r\n return calcTot.toFixed(2);\r\n }\r\n\r\n useEffect(() => {\r\n if (dadosNfp.length > 0) {\r\n form.setFieldsValue({\r\n ntf_infcomplementar: `CONTRA NOTA REF.COMPRA DE PRODUTOR RURAL: ${dadosNfp[0].Chave ? 'Chave:' + dadosNfp[0].Chave+', ' : ''} N°: ${dadosNfp[0].Nfp}, Serie: ${dadosNfp[0].Serie}, Emitida em: ${moment(dadosNfp[0].Data).format('DD/MM/YYYY')}`\r\n });\r\n } else {\r\n form.setFieldsValue({ ntf_infcomplementar: '' })\r\n }\r\n }, [dadosNfp, form])\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n IPI: R$ 0,00\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): 0,00\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Itens da Nota: {itensNota.length}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Select, Card, notification, Tooltip, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { ModalManutencaoNota, ModalSelectLote, ModalSenhaLiberacao } from \"../modals\";\r\nimport { HasValue, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { InputPreco, SelectProduto, SelectPaginacao } from \"../../components\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function FiltroProdutoNfEntrada({ form, dadosTabela, dadosEndereco = {}, dadosOperacao = {}, dadosVendedor = {}, btnEditando, itemEditando, carregarPagina }) {\r\n\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [buscarProdutosCodBarra, setBuscarProdutosCodBarra] = useState(null);\r\n const [dadosCfop, setDadosCfop] = useState([]);\r\n const [abrirModalManutencaoNota, setAbrirModalManutencaoNota] = useState(false);\r\n const [dadosProdutoImpostos, setDadosProdutoImpostos] = useState({});\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const codBarras = useRef();\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [liberacaoSenha, setLiberacaoSenha] = useState(null);\r\n const [controleLote, setControleLote] = useState(false);\r\n const [abrirModalLote, setAbrirModalLote] = useState(false);\r\n const [dadosLote, setDadosLote] = useState([]);\r\n const [dadosItem, setDadosItem] = useState([]);\r\n const [nfSaida, setNfSaida] = useState(false);\r\n const [numeroPedido, setNumeroPedido] = useState(null);\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n buscarDadosProdImpostos(itemEditando.pro_id);\r\n }\r\n }, [btnEditando])\r\n\r\n useEffect(() => {\r\n popularDadosContribuintes();\r\n carregaDados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (dadosOperacao.tipooperacao.tip_entradasaida === 1) {\r\n setNfSaida(true);\r\n } else if (dadosOperacao.tipooperacao.tip_entradasaida === 0) {\r\n setNfSaida(false);\r\n }\r\n }, [dadosOperacao])\r\n\r\n useEffect(() => {\r\n if (buscarProdutosCodBarra && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }, [buscarProdutosCodBarra]);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(dadosContribuinte)) {\r\n if (!!manutencao.dados && (!!form.getFieldsValue().vnc_id || !!form.getFieldsValue().ped_id)) {\r\n incluirItemPedidoCondicional();\r\n }\r\n }\r\n }, [dadosContribuinte]);\r\n\r\n //#region dados impostos produtos \r\n\r\n async function buscarDadosProdImpostos(produto, listapreco) {\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let codigoProd = !!produto ? produto : form.getFieldValue().pro_id;\r\n let ufDest = !!dadosEndereco.est_sigla ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla;\r\n let indicadorPresenca = !!form.getFieldsValue().ntf_indicadorpresenca ? `&indicadorPresenca=${form.getFieldsValue().ntf_indicadorpresenca}` : '';\r\n let listaPreco = !!listapreco ? `&ListaPreco=${listapreco}` : '';\r\n let inscEstadual = !!form.getFieldValue().pej_inscricaoestadual ? `&inscEstadual=${form.getFieldValue().pej_inscricaoestadual}` : '';\r\n let listaPrecoPar = !!listapreco ? `&ListaPreco=${listapreco}` : '';\r\n let objProd = (await api.get(`Produto/BuscarDadosProduto?IdProduto=${codigoProd}&ufDestino=${ufDest}`\r\n + `&operacaoCodigo=${dadosOperacao.ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}${indicadorPresenca}${inscEstadual}${listaPrecoPar}`\r\n )).data[0];\r\n setDadosProdutoImpostos(objProd);\r\n form.setFieldsValue({\r\n pis_id: objProd.pis_id,\r\n cbf_id: !!dadosOperacao.cbf_id ? dadosOperacao.cbf_id : objProd.cbf_id, // se tem fixo na operação \r\n ncm_id: objProd.ncm_id,\r\n icm_id: objProd.icm_id,\r\n nfi_cfop: objProd.cfo_cfop,\r\n informacaoAdicional: !!form.getFieldValue().informacaoAdicional ? form.getFieldValue().informacaoAdicional : objProd.pro_observacao\r\n });\r\n return objProd;\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosProdutoImpostos && JSON.stringify(dadosProdutoImpostos) !== '{}') {\r\n abrirModalManutencaoProd();\r\n }\r\n }, [dadosProdutoImpostos]);\r\n\r\n function abrirModalManutencaoProd() {\r\n if (dadosContribuinte.emp_regimetributario === 3 && (!!!dadosProdutoImpostos.icm_id || !!!dadosProdutoImpostos.ncm_id || !!!dadosProdutoImpostos.ump_id ||\r\n !!!dadosProdutoImpostos.pro_descricao || !!!dadosProdutoImpostos.pis_id || !!!dadosProdutoImpostos.iod_ufdestino)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (dadosContribuinte.emp_regimetributario !== 3 && (!!!dadosProdutoImpostos.icm_id || !!!dadosProdutoImpostos.ncm_id || !!!dadosProdutoImpostos.ump_id)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (!!dadosProdutoImpostos.cst_id && !!!dadosProdutoImpostos.mva_ufdestino && (dadosProdutoImpostos.cst_id === '10' || dadosProdutoImpostos.cst_id === '30' || dadosProdutoImpostos.cst_id === '70')) {\r\n setAbrirModalManutencaoNota(true);\r\n }\r\n };\r\n\r\n async function carregarNcm(id) {\r\n api.get(`Ncm/Buscar/${id}`).then(res => {\r\n dadosProdutoImpostos.ncm_ativo = res.data.ncm_ativo;\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n function carregarSelectPaginados() {\r\n let lista = [];\r\n if (!!form.getFieldsValue().icm_id)\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: form.getFieldsValue().icm_id })\r\n\r\n if (!!form.getFieldsValue().pis_id)\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: form.getFieldsValue().pis_id })\r\n\r\n if (!!form.getFieldValue().ncm_id)\r\n lista.push({ name: \"ncm_id\", campo: \"IdNcm\", value: form.getFieldValue().ncm_id });\r\n\r\n if (dadosContribuinte.emp_regimetributario === 3 && (!!form.getFieldValue().cbf_id || !!dadosOperacao.cbf_id))\r\n lista.push({ name: \"cbf_id\", campo: \"Id\", value: !!dadosOperacao.cbf_id ? dadosOperacao.cbf_id : form.getFieldValue().cbf_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n //#endregion\r\n\r\n //#region Buscar dados banco \r\n\r\n function carregaDados() {\r\n buscarDadosCfop();\r\n };\r\n\r\n async function popularDadosContribuintes(callback) {\r\n await api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarDadosCfop() {\r\n api.get(`Cfop/ListarCfopTipo?tipoCfopFim=8000&tipoCfopIni=1000`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosCfop(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Funções de campos do formulario \r\n\r\n async function onChangeProID(pro_id) {\r\n let listaItens = [...listaSelectProd]\r\n let produto = listaItens.filter(pro => pro.key === pro_id)[0];\r\n let filtros = !!produto.pro_id ? `idProduto=${produto.pro_id}` : '';\r\n filtros += !!produto.prg_id ? `&idProdutoGrade=${produto.prg_id}` : '';\r\n filtros += !!dadosOperacao.ope_id ? `&idOperacaoFiscal=${dadosOperacao.ope_id}` : '';\r\n filtros += !!form.getFieldValue().cli_id ? `&idCliente=${form.getFieldValue().cli_id}` : '';\r\n setControleLote(produto.pro_controlelote)\r\n form.setFieldsValue({ nfi_numeropedidocompra: numeroPedido });\r\n\r\n let produtoImposto = await buscarDadosProdImpostos(produto.pro_id);\r\n produtoImposto.prg_id = produto.prg_id;\r\n produtoImposto.prg_ean = produto.prg_ean;\r\n produtoImposto.descricaograde = produto.descricaograde;\r\n await popularFormProduto(produtoImposto);\r\n carregarSelectPaginados();\r\n };\r\n\r\n async function onPressEnterProCodigo(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let dadosRequisicao = await api.get(`Produto/ListaProdutoFiltro?filtro=${codigoEan}`);\r\n if (!!dadosRequisicao.data && dadosRequisicao.data.items.length > 0) {\r\n let dadosProduto = dadosRequisicao.data.items[0];\r\n let produtoImposto = await buscarDadosProdImpostos(dadosProduto.pro_id);\r\n produtoImposto.prg_id = dadosProduto.prg_id;\r\n produtoImposto.descricaograde = dadosProduto.descricaograde;\r\n await popularFormProduto(produtoImposto);\r\n adicionarItem(produtoImposto);\r\n if (!!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setBuscarProdutosCodBarra(!buscarProdutosCodBarra);\r\n };\r\n\r\n function onChangeQuantidade() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onChangeValorUnitario() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onChangeValorTotal() {\r\n recalcularValorUnitario();\r\n }\r\n\r\n function onChangePercDesc() {\r\n calculaDesconto('PERC');\r\n };\r\n\r\n function onChangeDesconto() {\r\n calculaDesconto('VALOR');\r\n };\r\n\r\n function onChangePercAcresc() {\r\n calculaAcrescimo('PERC');\r\n };\r\n\r\n function onChangeAcrescimo() {\r\n calculaAcrescimo('VALOR');\r\n };\r\n\r\n function onClickBtnCancelar() {\r\n cancelar();\r\n };\r\n\r\n function onClickBtnAdicionar() {\r\n adicionarItem();\r\n }\r\n\r\n //#endregion\r\n\r\n //#region calculos do item \r\n\r\n function recalcularValorTotal() {\r\n let total = 0;\r\n total = parseFloat(parseFloat(form.getFieldValue().quantidade) * parseFloat(form.getFieldValue().valorUnitario));\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n calculaDesconto('ATT');\r\n calculaAcrescimo('ATT');\r\n };\r\n\r\n function recalcularValorUnitario() {\r\n let vlrUnit = 0;\r\n vlrUnit = parseFloat(parseFloat(form.getFieldValue().valorTotalItem) / parseFloat(form.getFieldValue().quantidade));\r\n form.setFieldsValue({ valorUnitario: vlrUnit.toFixed(4) });\r\n calculaDesconto('ATT');\r\n calculaAcrescimo('ATT');\r\n }\r\n\r\n function calculaDesconto(campo) {\r\n let valor = parseFloat((!!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0));\r\n let perc = parseFloat((!!form.getFieldValue().percdesc ? form.getFieldValue().percdesc : 0));\r\n let tot = parseFloat(form.getFieldValue().valorTotalItem);\r\n let result = 0;\r\n if (validarDescontoMaximoVendedor(perc)) {\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n valor = (!!form.getFieldValue().desconto ? parseFloat(form.getFieldValue().desconto) : 0);\r\n result = (!!tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n } else {\r\n if (valor > tot) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de desconto maior do que valor total do item!' });\r\n form.setFieldsValue({ desconto: tot });\r\n }\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n } else {\r\n form.setFieldsValue({ desconto: 0 });\r\n form.setFieldsValue({ percdesc: 0 });\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n function calculaAcrescimo(campo) {\r\n let valor = (!!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0);\r\n let perc = (!!form.getFieldValue().percacresc ? form.getFieldValue().percacresc : 0);\r\n let tot = (!!form.getFieldValue().valorTotalItem ? parseFloat(form.getFieldValue().valorTotalItem) : 0);\r\n let result = 0;\r\n\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n valor = !!form.getFieldValue().acrescimo ? parseFloat(form.getFieldValue().acrescimo) : 0;\r\n result = (tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n function calculaTotalItemDescAcr() {\r\n let valorTot = 0;\r\n let valorItens = !!form.getFieldValue().valorTotalItem ? form.getFieldValue().valorTotalItem : 0;\r\n let valorAcrescimo = !!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0;\r\n let valorDesc = !!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0;\r\n\r\n valorTot = parseFloat(valorItens) + parseFloat(valorAcrescimo) - parseFloat(valorDesc);\r\n form.setFieldsValue({ valorItemDesconto: valorTot.toFixed(2) });\r\n };\r\n\r\n //#endregion\r\n\r\n //#region processos itens \r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n async function popularFormProduto(produto) {\r\n let valorVenda = (!!produto.lpi_valorvenda ? produto.lpi_valorvenda : 0);\r\n setExibirDetalhes(true);\r\n form.setFieldsValue({\r\n quantidade: 1,\r\n valorUnitario: valorVenda,\r\n valorTotalItem: valorVenda,\r\n valorItemDesconto: valorVenda,\r\n nfi_itempedidocompra: null\r\n });\r\n setDadosDetalhes(produto);\r\n return produto;\r\n };\r\n\r\n async function carregarParametrosLocal(item, listaItens, lista) {\r\n const codigo = item.pro_id\r\n const codigoGrade = item.prg_id\r\n const quantidade = item.quantidade\r\n\r\n let resParams = await api.get(`ParametroLocal/BuscarParametros`);\r\n if (resParams.status == 200) {\r\n let paramsEstoque = resParams.data.par_avisoestoqueinsuficiente;\r\n\r\n let dados = lista.filter(item => item.key === form.getFieldValue().pro_id || item.pro_id === form.getFieldValue().pro_id)[0];\r\n var dadosIncluido = listaItens\r\n .filter((prod) => (prod.pro_id === dados.pro_id && (!!!dados.prg_id || dados.prg_id === prod.prg_id)))\r\n .reduce((total, prod) => total + prod.nfi_qtde, 0);\r\n\r\n if (paramsEstoque === null) {\r\n return;\r\n }\r\n\r\n let resEstoque = await api.get(`Estoque/BuscarEstoqueProduto?codigoProduto=${codigo}` + (codigoGrade ? `&codigoGrade=${codigoGrade}` : ''))\r\n let estoque = resEstoque.data.valorTotal;\r\n\r\n let valorEstoque = calcularValorEstoque(estoque, dadosIncluido, quantidade);\r\n\r\n return new Promise((resolve, reject) => {\r\n if (valorEstoque <= 0) {\r\n estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n }\r\n }\r\n\r\n function calcularValorEstoque(estoque, dadosIncluido, quantidade) {\r\n if (dadosIncluido !== 0) {\r\n var novosDadosIncluido = dadosIncluido + quantidade\r\n }\r\n if (novosDadosIncluido > estoque) {\r\n return estoque - novosDadosIncluido;\r\n } else if (quantidade > estoque) {\r\n return estoque - quantidade;\r\n } else {\r\n return estoque\r\n }\r\n }\r\n\r\n function estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject) {\r\n if (paramsEstoque === 0) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar?`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n resolve();\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 1) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar? Será solicitado uma senha Gerencial`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n setLiberacaoSenha({ resolve, reject });\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 2) {\r\n Modal.warning({\r\n title: 'Atenção Sistema de Controle de Estoque!',\r\n icon: ,\r\n content: `Produto com estoque ${valorEstoque}, sistema está configurado para bloquear vendas de produtos sem estoque!`,\r\n centered: true,\r\n onOk() {\r\n reject();\r\n }\r\n });\r\n }\r\n }\r\n\r\n const onCloseModalLiberacao = (aprovado) => {\r\n setAbreModalLiberacao(false);\r\n if (aprovado && liberacaoSenha) {\r\n liberacaoSenha.resolve();\r\n } else if (liberacaoSenha) {\r\n liberacaoSenha.reject();\r\n }\r\n setLiberacaoSenha(null);\r\n }\r\n\r\n async function adicionarItem(item = {}) {\r\n let possuiIe = !!form.getFieldValue().pej_inscricaoestadual ? true : false;\r\n let fisicaJuridica = form.getFieldValue().ntf_cpfcnpj.length === 14 ? 2 : form.getFieldValue().ntf_cpfcnpj.length == 11 ? 1 : 3;\r\n let p = dadosProdutoImpostos;\r\n if (p.ncm_ativo == false) {\r\n notification.warning({ message: 'Aviso!', description: 'NCM do produto está invativo na base de dados do SEFAZ, altere o NCM no cadastro do produto para seguir com operação!' });\r\n return;\r\n }\r\n if (!!!p.iod_ufdestino) {\r\n notification.warning({ message: 'Aviso!', description: 'Não encontrado Dados de Origem e Destino no cadastro de tributação para o UF destino, Verifique no cadastro de tributação do produto!' });\r\n return\r\n }\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, form.getFieldValue().quantidade, form.getFieldValue().valorUnitario,\r\n form.getFieldValue().nfi_valorfrete, form.getFieldValue().acrescimo, form.getFieldValue().desconto, p.iod_percicms, p.iod_percdiferimentoicms, p.iod_percicmsreducaobc,\r\n p.mva_percaliquotaicms, p.mva_percmva, p.mva_percaliquotaicmsreducao, p.mva_ajustado, p.ncm_percentual, fisicaJuridica, form.getFieldValue().ntf_consumidorfinal, possuiIe,\r\n form.getFieldValue().ntf_indicadorpresenca);\r\n\r\n let listaItens = [...dadosTabela.dadosItens];\r\n let lista = [...listaSelectProd]\r\n let dadosFormulario = form.getFieldValue();\r\n setNumeroPedido(dadosFormulario.nfi_numeropedidocompra);\r\n if (!buscarProdutosCodBarra) {\r\n if (btnEditando.editando) {\r\n item = listaItens.filter((prod) => (prod.nfi_numeroitem === dadosFormulario.nfi_numeroitem))[0];\r\n } else {\r\n item = { ...item, ...dadosFormulario, ...dadosDetalhes };\r\n }\r\n }\r\n if (\r\n dadosOperacao.tipooperacao.tip_entradasaida === 1 &&\r\n !btnEditando.editando) {\r\n try {\r\n await carregarParametrosLocal(item, listaItens, lista);\r\n } catch (error) {\r\n return;\r\n }\r\n }\r\n let dados = {};\r\n if (!!validarItem(dadosFormulario)) {\r\n let dadosEditando = listaItens.filter((prod) => (prod.pro_id === item.pro_id && (!!!item.prg_id || item.prg_id === prod.prg_id)))[0];\r\n if (!!dadosEditando) {\r\n dadosEditando.impostos = impostos;\r\n dados = popularItemNota(true, item, dadosEditando);\r\n if (!!btnEditando && btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n alterarItem(dados, listaItens, dadosEditando)\r\n } else {\r\n if (buscarProdutosCodBarra) {\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens);\r\n } else {\r\n Modal.confirm({\r\n title: 'Atualizar?',\r\n icon: ,\r\n content: 'Item já cadastrado na nota, deseja atualizar suas informações?',\r\n okText: 'Atualizar',\r\n cancelText: 'Incluir',\r\n centered: true,\r\n onOk() {\r\n alterarItem(dados, listaItens, dadosEditando)\r\n },\r\n onCancel() {\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n if (!!controleLote) {\r\n verificarItemLote(dados, listaItens)\r\n } else {\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n });\r\n }\r\n }\r\n } else {\r\n item.impostos = impostos;\r\n dados = popularItemNota(false, item);\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n if (!!controleLote) {\r\n verificarItemLote(dados, listaItens)\r\n } else {\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n }\r\n };\r\n\r\n function validarItem(dados) {\r\n if (dados.quantidade === 0 || !!!dados.quantidade) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade do Item Inválida!' });\r\n return false;\r\n }\r\n if (parseFloat(dados.valorItemDesconto) === 0 || parseFloat(dados.valorUnitario) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor do Item Inválido!' });\r\n return false\r\n }\r\n if (!!!dados.nfi_cfop) {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP é obrigatório!' });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async function verificarItemLote(dados) {\r\n let listaLote = (await api.get(`ProdutoLote/ListarLotesSaldo?IdProduto=${dados.pro_id}&ComSaldo=true`));\r\n if (listaLote.data.length > 0) {\r\n let seq = 0;\r\n listaLote.data.forEach((lote) => {\r\n lote.key = seq;\r\n seq++;\r\n });\r\n setDadosLote(listaLote.data);\r\n setDadosItem(dados);\r\n setAbrirModalLote(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Nenhum lote encontrado para o produto selecionado!' });\r\n return false;\r\n }\r\n }\r\n\r\n function salvarLotes(itemCLote, listaTemp) {\r\n setAbrirModalLote(false);\r\n if (itemCLote !== undefined && listaTemp !== undefined) {\r\n let dados = itemCLote;\r\n let listaItens = [...dadosTabela.dadosItens];\r\n if (listaTemp.length > 0) {\r\n dados.nfitemlotes = listaTemp;\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n }\r\n\r\n function incluirItem(dados, listaItens) {\r\n listaItens.push(dados);\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item incluído com sucesso!' });\r\n }\r\n\r\n function alterarItem(dados, listaItens, dadosEditando) {\r\n let indice = listaItens.findIndex((item) => (item === dadosEditando));\r\n listaItens.splice(indice, 1, { ...dados });\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item editado com sucesso!' });\r\n }\r\n\r\n function popularItemNota(editando, item, dadosEditando) {\r\n let itemNota = {};\r\n let formulario = form.getFieldValue();\r\n let valorIpi = 0;\r\n let valorSt = 0;\r\n\r\n if (editando) {\r\n if (isObjetoDiffVazio(dadosEditando.impostos)) {\r\n valorSt = dadosEditando.impostos.retornoICMSST.ret_valorIcmsSt;\r\n valorIpi = dadosEditando.impostos.retornoIPI.ret_valorIpi;\r\n }\r\n itemNota = {\r\n ...dadosEditando,\r\n impostos: dadosEditando.impostos,\r\n iod_uforigem: dadosEditando.iod_uforigem,\r\n iod_ufdestino: dadosEditando.iod_ufdestino,\r\n orm_id: dadosEditando.orm_id,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_numeropedidocompra: formulario.nfi_numeropedidocompra,\r\n nfi_itempedidocompra: formulario.nfi_itempedidocompra,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario),\r\n percdesc: parseFloat(formulario.percdesc),\r\n nfi_valorfrete: dadosEditando.nfi_valorfrete,\r\n nfi_valoroutros: parseFloat(formulario.acrescimo),\r\n nfi_valordesconto: parseFloat(formulario.desconto),\r\n percacresc: parseFloat(formulario.percacresc),\r\n nfi_valoricmsst: parseFloat(valorSt),\r\n nfi_valoripi: parseFloat(valorIpi),\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n nfi_cfop: formulario.nfi_cfop,\r\n total: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt)),\r\n };\r\n } else {\r\n let cfop = dadosCfop.filter((cfop) => (cfop.cfo_cfop === formulario.nfi_cfop))[0];\r\n if (isObjetoDiffVazio(item.impostos)) {\r\n valorSt = item.impostos.retornoICMSST.ret_valorIcmsSt;\r\n valorIpi = item.impostos.retornoIPI.ret_valorIpi;\r\n }\r\n itemNota = {\r\n impostos: item.impostos,\r\n iod_uforigem: item.iod_uforigem,\r\n iod_ufdestino: item.iod_ufdestino,\r\n orm_id: item.orm_id,\r\n pro_id: item.pro_id,\r\n prg_id: item.prg_id,\r\n nfi_cfop: cfop.cfo_cfop,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_numeroitem: !!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 ? dadosTabela.dadosItens.length + 1 : 1,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario ?? 0),\r\n total: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt)),\r\n percdesc: parseFloat(formulario.percdesc ?? 0),\r\n nfi_valordesconto: parseFloat(formulario.desconto ?? 0),\r\n percacresc: parseFloat(formulario.percacresc ?? 0),\r\n nfi_valoroutros: parseFloat(formulario.acrescimo ?? 0),\r\n nfi_valoricmsst: parseFloat(valorSt),\r\n nfi_valoripi: parseFloat(valorIpi),\r\n nfi_valorfrete: 0,\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n cfo_cfop: cfop.cfo_cfop,\r\n cfo_descricao: cfop.cfo_descricao,\r\n cfo_id: cfop.cfo_id,\r\n nfi_ean: HasValue(item.prg_ean) ? item.prg_ean : item.pro_ean,\r\n nfi_unidademedida: item.ump_id,\r\n pro_codigo: item.pro_codigo,\r\n pro_descricao: item.pro_descricao,\r\n pro_ean: item.pro_ean,\r\n ump_id: item.ump_id,\r\n nfi_numeropedidocompra: item.nfi_numeropedidocompra,\r\n nfi_itempedidocompra: item.nfi_itempedidocompra,\r\n grade: item.descricaograde,\r\n nfi_ncm: item.ncm_codigo ?? dadosProdutoImpostos.ncm_codigo,\r\n cbf_id: formulario.cbf_id,\r\n icm_id: item.icm_id ?? dadosProdutoImpostos.icm_id,\r\n ncm_id: item.ncm_id ?? dadosProdutoImpostos.ncm_id,\r\n pis_id: item.pis_id ?? dadosProdutoImpostos.pis_id,\r\n cso_id: item.cso_id ?? dadosProdutoImpostos.cso_id,\r\n cst_id: item.cst_id ?? dadosProdutoImpostos.cst_id,\r\n };\r\n }\r\n return itemNota;\r\n };\r\n\r\n async function incluirItemPedidoCondicional() {\r\n let listaItens = [];\r\n let indice = 0;\r\n carregarPagina(true);\r\n for (let [idx, itens] of dadosTabela.dadosItens.entries()) {\r\n let prodNota = await buscarDadosProdImpostos(itens.pro_id)\r\n let obj = { ...prodNota, ...itens };\r\n obj.nfi_cfop = obj.cfo_cfop;\r\n obj.grade = obj.descricaograde;\r\n obj.nfi_ncm = obj.ncm_codigo.toString();\r\n listaItens.push(obj)\r\n if (indice === dadosTabela.dadosItens.length - 1) {\r\n dadosTabela.setDadosItens(listaItens);\r\n carregarPagina(false);\r\n }\r\n indice = indice + 1;;\r\n };\r\n };\r\n\r\n function validarDescontoMaximoVendedor(perDesconto) {\r\n let retorno = true;\r\n if (!!dadosVendedor && !!dadosVendedor.ven_maximodesconto) {\r\n if (perDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: \"O desconto máximo para este vendedor não pode exceder \" + dadosVendedor.ven_maximodesconto * 100 + \"% !\", message: \"Aviso\" });\r\n form.setFieldsValue({\r\n desconto: null,\r\n percdesc: null\r\n });\r\n retorno = false;\r\n }\r\n }\r\n return retorno;\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, nfi_cfop: null, icm_id: null, informacaoAdicional: '' });\r\n };\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n prg_id: dados.prg_id,\r\n quantidade: dados.nfi_qtde,\r\n valorUnitario: dados.nfi_valorunitario,\r\n nfi_numeroitem: dados.nfi_numeroitem,\r\n valorTotalItem: dados.nfi_qtde * dados.nfi_valorunitario,\r\n valorItemDesconto: (dados.nfi_qtde * dados.nfi_valorunitario) - dados.nfi_valordesconto + dados.nfi_valoroutros,\r\n desconto: dados.nfi_valordesconto,\r\n nfi_valorfrete: dados.nfi_valorfrete,\r\n percacresc: dados.percacresc,\r\n percdesc: dados.percdesc,\r\n nfi_cfop: dados.nfi_cfop,\r\n acrescimo: dados.nfi_valoroutros,\r\n informacaoAdicional: dados.nfi_informacaoadicional,\r\n icm_id: (!!dados.icm_id ? dados.icm_id : null), ncm_id: (!!dados.ncm_id ? dados.ncm_id : null), pis_id: (!!dados.pis_id ? dados.pis_id : null),\r\n nfi_itempedidocompra: dados.nfi_itempedidocompra,\r\n nfi_numeropedidocompra: dados.nfi_numeropedidocompra\r\n });\r\n dadosTemp = {\r\n prg_id: dadosEditando.prg_id,\r\n pro_descricao: dadosEditando.pro_descricao,\r\n pro_codigo: dadosEditando.pro_codigo,\r\n pro_ean: dadosEditando.pro_ean,\r\n ncm_codigo: dadosEditando.ncm_codigo,\r\n ncm_id: dadosEditando.ncm_id,\r\n ncm_porcentagem: dadosEditando.ncm_porcentagem,\r\n ump_id: dadosEditando.ump_id,\r\n informacaoAdicional: dadosEditando.nfi_informacaoadicional,\r\n };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n //#endregion\r\n\r\n return (\r\n
\r\n \r\n {!!!buscarProdutosCodBarra &&\r\n
\r\n \r\n { onChangeProID(dados) }}\r\n setListaDados={setListaSelectProd} />\r\n \r\n \r\n }\r\n {!!buscarProdutosCodBarra &&\r\n \r\n \r\n {\r\n onPressEnterProCodigo(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao} {!!dadosDetalhes.descricaograde ? dadosDetalhes.descricaograde : ''}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {!!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean}\r\n \r\n \r\n NCM: {dadosDetalhes.ncm_codigo}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({icm.icm_id} - {icm.icm_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n carregarNcm(valor)} conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n { onChangeQuantidade() }} />\r\n \r\n \r\n \r\n onChangeValorUnitario()} />\r\n \r\n \r\n onChangeValorTotal()} />\r\n \r\n \r\n \r\n (onChangePercDesc())}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n onChangeDesconto()} />\r\n \r\n \r\n \r\n { onChangePercAcresc() }}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n { onChangeAcrescimo() }} />\r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n ({pis.pis_id} - {pis.pis_descricao})\r\n } />\r\n \r\n */}\r\n {dadosContribuinte.emp_regimetributario === 3 && \r\n \r\n ({v.cbf_codigo} - {v.cbf_descricao} )\r\n } />\r\n \r\n }\r\n {nfSaida === true && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { setAbrirModalManutencaoNota(false); }} dadosContribuinte={dadosContribuinte} dadosOperacao={dadosOperacao} dadosEndereco={dadosEndereco} dadosProduto={dadosProdutoImpostos} aoSalvar={(value) => buscarDadosProdImpostos(value)} />\r\n \r\n salvarLotes(itemCLote, listaTemp)} dadosLote={dadosLote} setDadosLote={setDadosLote} formulario={form} dadosItem={dadosItem} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Button, Col, Modal, Row, Table, Tag } from 'antd';\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport FiltroProdutoNfEntrada from '../../components/filtroProdutoNfEntrada';\r\n\r\n\r\nexport default function ItensNFE({ form, dadosItens, dadosEndereco, dadosOperacao, carregarPagina }) {\r\n const [quantidadeItens, setQuantidadeItens] = useState(0);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n\r\n useEffect(() => {\r\n if (dadosItens.dadosItens.length > 0) {\r\n let total = 0;\r\n setQuantidadeItens(dadosItens.dadosItens.length);\r\n dadosItens.dadosItens.forEach((item) => {\r\n total += parseFloat(item.total);\r\n });\r\n setValorTotal(total);\r\n form.setFieldsValue({ valorTotal: total });\r\n } else {\r\n setQuantidadeItens(0);\r\n setValorTotal(0);\r\n }\r\n }, [dadosItens.dadosItens]);\r\n\r\n function editarItemNota(registro) {\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n };\r\n\r\n function removerItemNota(record, indice) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover o item da nota?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let dadosTemp = [...dadosItens.dadosItens];\r\n let dadosRet = dadosTemp.filter((item) => item.nfi_numeroitem !== record.nfi_numeroitem);\r\n dadosItens.setDadosItens(dadosRet);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {!!dadosItens.dadosItens && dadosItens.dadosItens.length > 0 &&
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {nfi_ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n align: 'center',\r\n width: 30,\r\n render: ({ nfi_cfop }) => (\r\n
\r\n {nfi_cfop}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 40,\r\n align: 'center',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n {FormatNumber(nfi_qtde, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 50,\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'center',\r\n width: 40,\r\n render: ({ percdesc }) => (\r\n
\r\n {percdesc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'center',\r\n width: 40,\r\n render: ({ percacresc }) => (\r\n
\r\n {percacresc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 60,\r\n render: ({ total }) => (\r\n
\r\n {FormatNumber(total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 40,\r\n fixed: 'right',\r\n render: (record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n ICMS Base de Cálculo: {nig_valorbc}\r\n \r\n \r\n Alíquota: {nig_percicms}\r\n \r\n \r\n Valor (R$): {nig_valoricms}\r\n \r\n \r\n \r\n \r\n IPI Base de Cálculo: {npi_valorbcipi}\r\n \r\n \r\n Alíquota: {npi_percaliquotaipi}\r\n \r\n \r\n Valor (R$): {npi_valoripi}\r\n \r\n \r\n \r\n \r\n ICMS ST Base de Cálculo: {nig_valorbcst}\r\n \r\n \r\n Alíquota: {nig_percmvast}\r\n \r\n \r\n Valor (R$): {nig_valoricmsst}\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />}\r\n \r\n
\r\n \r\n
\r\n Quantidade Itens:\r\n \r\n \r\n {quantidadeItens}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n )\r\n}","import { Col, Form, Radio, Row, Select, Tabs, notification } from 'antd';\r\nimport React, { useState, useEffect } from 'react';\r\nimport { SelectPaginacao } from '../../components';\r\nimport { TabValores, TabVeiculo, TabVolumes } from '../tabNotaFiscal';\r\nimport api from '../../services/api';\r\n\r\n\r\nexport default function TransportadorNFE({ form, veiculos, dadosTransp }) {\r\n \r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [mostrarTransportador, setMostrarTransportador] = useState(true);\r\n const [listaTransportadores, setListaTransportadores] = useState([]);\r\n const [dadosVeiculos, setDadosVeiculos] = useState({});\r\n\r\n useEffect(() => {\r\n buscarTransportadores();\r\n if (form.getFieldValue().ntf_modalidadefrete === 9) {\r\n setMostrarTransportador(false);\r\n setAbaSelecionada(\"2\");\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().trn_id) {\r\n buscarDadosTransp(form.getFieldValue().trn_id);\r\n }\r\n }, [listaTransportadores]);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().trv_id) {\r\n popularDadosVeiculo(form.getFieldValue().trv_id);\r\n }\r\n }, [veiculos.listaVeiculos]);\r\n\r\n function alterarFrete(event) {\r\n if (event.target.value === 9) {\r\n form.setFieldsValue({ trn_id: null });\r\n form.setFieldsValue({ trv_id: null });\r\n form.setFieldsValue({ valorFrete: null });\r\n form.setFieldsValue({ valorSeguro: null });\r\n form.setFieldsValue({ trv_placa: null });\r\n form.setFieldsValue({ trv_uf: null });\r\n form.setFieldsValue({ trv_rntc: null });\r\n form.setFieldsValue({ trv_modelo: null });\r\n form.setFieldsValue({ trv_marca: null });\r\n form.setFieldsValue({ trv_observacao: null });\r\n form.setFieldsValue({ nvl_qtdevolumes: null });\r\n form.setFieldsValue({ nvl_especievolume: null });\r\n form.setFieldsValue({ nvl_numeracaovolume: null });\r\n form.setFieldsValue({ nvl_marcavolume: null });\r\n form.setFieldsValue({ nvl_pesoliquido: null });\r\n form.setFieldsValue({ nvl_pesobruto: null });\r\n setDadosVeiculos({});\r\n setMostrarTransportador(false);\r\n setAbaSelecionada(\"2\");\r\n } else {\r\n setMostrarTransportador(true);\r\n setAbaSelecionada(\"1\");\r\n }\r\n };\r\n\r\n function buscarTransportadores() {\r\n api.get('Transportador/ListarTodos?filtro=').then(\r\n (res) => {\r\n setListaTransportadores(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function buscarDadosTransp(trn_id) {\r\n if (!!trn_id) {\r\n await api.get(`Transportador/BuscarTransportador/${trn_id}`).then(\r\n res => {\r\n if (res.status === 200){\r\n dadosTransp.setDadosTransp(res.data);\r\n veiculos.setListaVeiculos(res.data.veiculos);\r\n }\r\n }\r\n ).catch( error => {\r\n console.log(error);\r\n notification.warning({message: 'Aviso!', description: 'Erro ao buscar dados do transportador!'});\r\n })\r\n }\r\n };\r\n\r\n function popularDadosVeiculo(trv_id) {\r\n let veiculo = veiculos.listaVeiculos.filter((veiculo) => (veiculo.trv_id === trv_id))[0];\r\n setDadosVeiculos(veiculo);\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n { alterarFrete(dados) }}>\r\n 0 - Contratação do Frete por conta do Remetente (CIF)\r\n 1 - Contratação do Frete por conta do Destinatário (FOB)\r\n 2 - Contratação do Frete por conta de Terceiros\r\n 3 - Transporte Próprio por conta do Remetente\r\n 4 - Transporte Próprio por conta do Destinatário\r\n 9 - Sem Frete\r\n \r\n \r\n \r\n \r\n {mostrarTransportador && \r\n \r\n \r\n buscarDadosTransp(dados)} conteudo={\r\n tp => ({tp.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import { CheckOutlined, CloseOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport { Button, Col, Divider, Form, Input, Modal, Row, Table, Typography, Select } from 'antd';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { Data, InputPreco } from '../../components';\r\nimport api from '../../services/api';\r\nimport moment from 'moment';\r\n\r\nexport default function NotasBlocoNFE(dadosNfp) {\r\n const [exibirModal, setExibirModal] = useState(false);\r\n const [valueRadio, setValueRadio] = useState('04');\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [editingNfp, setEditingNfp] = useState(false);\r\n const [listaModelo, setListaModelo] = useState([]);\r\n const [form] = Form.useForm();\r\n\r\n const saveNFP = () => {\r\n let modelNfp = valueRadio;\r\n let keyNumber = form.getFieldValue().key;\r\n let numberNfp = form.getFieldValue().nfp;\r\n let serie = form.getFieldValue().serie;\r\n let data = moment(form.getFieldValue().data);\r\n let valorTotal = parseFloat(form.getFieldValue().nfpValue).toFixed(2);\r\n\r\n const newNFP = {\r\n Model: modelNfp, Chave: keyNumber, Nfp: numberNfp,\r\n Serie: serie, Data: data, Valor: valorTotal\r\n };\r\n\r\n if (!!editingNfp) {\r\n dadosNfp.dadosNfp.setDadosNfp((pre) => {\r\n let verif = pre.filter(nota => nota.Nfp !== newNFP.Nfp)\r\n return [...verif, newNFP];\r\n })\r\n } else {\r\n dadosNfp.dadosNfp.setDadosNfp((pre) => {\r\n return [...pre, newNFP];\r\n });\r\n }\r\n setExibirModal(false);\r\n form.resetFields();\r\n setEditingNfp(null);\r\n setValueRadio('04');\r\n }\r\n\r\n const deleteItem = (record) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover a NFP?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dadosNfp.dadosNfp.setDadosNfp((pre) => {\r\n return pre.filter(nota => nota.Nfp !== record.Nfp)\r\n });\r\n form.resetFields();\r\n }\r\n })\r\n }\r\n\r\n const edittingNfp = (record) => {\r\n setEditingNfp(true);\r\n setValueRadio(record.Model);\r\n form.setFieldsValue({\r\n model: record.Model,\r\n key: record.Chave,\r\n nfp: record.Nfp,\r\n serie: record.Serie,\r\n data: moment(record.Data, 'DD/MM/YYYY'),\r\n nfpValue: parseFloat(record.Valor).toFixed(2),\r\n });\r\n setExibirModal(true);\r\n }\r\n\r\n const callInput = () => {\r\n let valueNumber = form.getFieldValue().key;\r\n\r\n form.setFieldsValue({\r\n nfp: valueNumber.substring(25, 34),\r\n serie: valueNumber.substring(22, 25)\r\n })\r\n }\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setExibirModal(false);\r\n setEditingNfp(null);\r\n setValueRadio('04');\r\n form.resetFields();\r\n }\r\n });\r\n }\r\n\r\n const onChangeRadio = (e) => {\r\n setValueRadio(e);\r\n if (e === \"04\") {\r\n form.setFieldsValue({\r\n key: undefined,\r\n nfp: undefined,\r\n serie: undefined\r\n })\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (dadosNfp.dadosNfp.dadosNfp.length > 0) {\r\n let total = 0;\r\n dadosNfp.dadosNfp.dadosNfp.forEach((nfp) => {\r\n total += parseFloat(nfp.Valor.replace(/,/g, ''));\r\n });\r\n setValorTotal(total);\r\n form.setFieldsValue({ valorTotal: total });\r\n } else {\r\n setValorTotal(0);\r\n }\r\n }, [dadosNfp.dadosNfp]);\r\n\r\n useEffect(() => {\r\n api.get(`ModeloDocumentoFiscal/ListarTodos`).then(\r\n res => {\r\n let dados = res.data;\r\n let filtroDados = dados.filter(item => item.mdf_id === '04' || item.mdf_id === '55');\r\n setListaModelo(filtroDados);\r\n }\r\n )\r\n }, [])\r\n\r\n return (\r\n
\r\n \r\n
\r\n ,\r\n \"Notas Notas Fiscais Referenciadas\r\n \r\n Referencie todas as notas que deseja! \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n form.submit()}\r\n destroyOnClose\r\n title=\"Dados da Nota do Produtor Rural\"\r\n okText={\r\n <>\r\n Confirmar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n {Model}\r\n ),\r\n },\r\n {\r\n title: 'Chave de Acesso',\r\n width: 450,\r\n render: ({ Chave }) => (\r\n {Chave || \"Não Informado\"}\r\n ),\r\n },\r\n {\r\n title: 'Número',\r\n align: 'center',\r\n render: ({ Nfp }) => (\r\n {Nfp}\r\n ),\r\n },\r\n {\r\n title: 'Série',\r\n align: 'center',\r\n render: ({ Serie }) => (\r\n {Serie}\r\n ),\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n align: 'right',\r\n render: ({ Valor }) => (\r\n R$ {FormatNumber(Valor, true)}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n width: 100,\r\n render: (record) => {\r\n return (\r\n <>\r\n \r\n Valor Total das Notas (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Data, FormGW, SelectPaginacao, SelectPaginado } from '../../components';\r\nimport { Col, Form, Input, Modal, Row, Select, Spin, Steps, notification } from 'antd';\r\nimport { useStateValue } from '../../state';\r\nimport moment from 'moment';\r\nimport api from '../../services/api';\r\nimport FornecedorNFE from './fornecedorNFE';\r\nimport FaturamentoNFE from './faturamentoNFE';\r\nimport ResumoNFE from './resumoNFE';\r\nimport { novaAbaNavegador, validaForm, validarNumeros } from '../../services/funcoes';\r\nimport ItensNFE from './itensNFE';\r\nimport TransportadorNFE from './transportadorNFE';\r\nimport { manutencaoActions } from '../../actions';\r\nimport NotasBlocoNFE from './notasBlocoNFE';\r\nimport FormaDePagamento from '../../components/enuns/formaDePagamento';\r\n\r\nexport default function NFEntrada({ form, showDrawer, carregando, aoSalvar, pages, proximaPag, resume }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [listaSerie, setListaSerie] = useState([]);\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [dadosNfp, setDadosNfp] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [dadosEndereco, setDadosEndereco] = useState({});\r\n const [operacaoFiscal, setOperacaoFiscal] = useState({});\r\n const [dadosFornecedor, setDadosFornecedor] = useState({});\r\n const [listaVeiculos, setListaVeiculos] = useState([]);\r\n const [dadosTransp, setDadosTransp] = useState({});\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const listaValidacoesForn = [\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação Fiscal' },\r\n { nome: 'for_id', obrigatorio: true, label: 'Fornecedor' }\r\n ];\r\n\r\n const popularOperacaoFiscal = (id) => {\r\n if (!!id) {\r\n api.get(`OperacaoFiscal/Buscar/${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setOperacaoFiscal(res.data);\r\n }\r\n }\r\n ).catch(\r\n error => { console.log(error); }\r\n )\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (showDrawer) {\r\n carregarDados();\r\n if (!!manutencao.dados && !!manutencao.dados.ntf_id) {\r\n form.setFieldsValue(manutencao.dados);\r\n setEditando(true);\r\n } else {\r\n setEditando(false);\r\n }\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [showDrawer]);\r\n\r\n useEffect(() => {\r\n if (!!proximaPag.proximaPag || proximaPag.proximaPag === 0 && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.faturamento) {\r\n setListaFormaPagamento(manutencao.dados.faturamento);\r\n }\r\n\r\n if (!!manutencao.dados.formaPgto && !!!manutencao.dados.faturamento) {\r\n manutencao.dados.formaPgto.forEach((formas) => {\r\n formas.pfp_valor = parseFloat(formas.nfp_valor);\r\n });\r\n let dadosFormaPgto = [...manutencao.dados.formaPgto];\r\n dadosFormaPgto = manutencao.dados.formaPgto.filter((dados) => dados.fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && !dados.fpg_quitacaoantecipacao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: dadosFormaPgto } } } });\r\n }\r\n /*if (!!manutencao.dados.pes_id && (!!!manutencao.dados.destinatario || (manutencao.dados.destinatario.pes_id !== manutencao.dados.pes_id))) {\r\n let lista = [];\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: manutencao.dados.pes_id });\r\n lista.push({ name: \"ope_id\", campo: \"CodigoOperacao\", value: manutencao.dados.ope_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n buscarDadosCliente(manutencao.dados.pes_id);\r\n popularOperacaoFiscal(manutencao.dados.ope_id);\r\n }*/\r\n if (!!manutencao.dados && !!manutencao.dados.itensNf) {\r\n if (!!manutencao.dados.itensNf[0].ntf_id) {\r\n calcularFrete(manutencao.dados.itensNf);\r\n }\r\n if (dadosItens.length === 0) {\r\n setDadosItens(manutencao.dados.itensNf);\r\n }\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n async function carregarDados() {\r\n setCarregarPagina(true);\r\n let listaSerie = await api.get('SerieFiscal/Listar?EmitenteDocumento=0&CodigoModeloDocFiscal=55&SomenteAtivos=true');\r\n let serie = [];\r\n if (listaSerie.status === 200) {\r\n serie = listaSerie.data.items;\r\n setListaSerie(serie);\r\n if (serie.length > 0) {\r\n form.setFieldsValue({ ser_id: serie[0].ser_id });\r\n }\r\n }\r\n setCarregarPagina(false);\r\n }\r\n\r\n async function validarTrocaPg(pagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesForn;\r\n let retorno = await validarFornecedor();\r\n if (!retorno) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n break;\r\n\r\n case !!operacaoFiscal.ope_notaprodutorrural && 1:\r\n if (paginaAtual < pagina) {\r\n console.log(\"passada de pag\");\r\n if (!!dadosNfp && dadosNfp.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Nota Fiscal deve ter ao menos 1 NFP referenciada!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case !!operacaoFiscal.ope_notaprodutorrural ? 2 : 1:\r\n if (paginaAtual < pagina) {\r\n if (!!dadosItens && dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Nota Fiscal deve ter ao menos 1 item!' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n else if (dadosNfp.length > 0) {\r\n if (parseFloat(dadosNfp[0]?.Valor) !== form.getFieldValue('valorTotal')) {\r\n notification.warning({ message: 'Aviso', description: 'Valor total dos itens deve ser o mesmo total da NFP!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case !!operacaoFiscal.ope_notaprodutorrural ? 4 : 3:\r\n if (paginaAtual < pagina) {\r\n listaValidacoes = [];\r\n let validaFaturamento = await validarFaturamento();\r\n if (validaFaturamento === false && listaFormaPagamento.length === 0) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n }\r\n if (validaForm(form, listaValidacoes)) {\r\n pages.setTagPages(pagina);\r\n } else {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n };\r\n\r\n async function validarFaturamento() {\r\n let formulario = form.getFieldsValue();\r\n let retorno = true;\r\n let valorTotal = 0;\r\n let operacao = operacaoFiscal;\r\n\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach(forma => {\r\n valorTotal += parseFloat(forma.pfp_valor);\r\n if (forma.editando == true) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor salvar as alterações em andamento nas parcelas(forma pagamento) para continuar!' });\r\n }\r\n });\r\n if (parseFloat(formulario.valorTotal) === 0) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso!', description: 'Valor da Nota Inválido!' });\r\n } else {\r\n if ((validarNumeros(formulario.valorTotal) == !parseFloat(valorTotal.toFixed(2))) || operacao.tip_id == !5) {\r\n notification.warning({ message: 'Aviso', description: 'Valor informado nas formas de pagamento é menor que o valor total da nota!' });\r\n }\r\n }\r\n } else {\r\n if (!!formulario.fpg_id) {\r\n let formaPagamento = (await api.get(`FormaPagamento/Get?id=${formulario.fpg_id}`)).data;\r\n if (!listaFormaPagamento.cpg_id) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n else if (formaPagamento.fpg_tipoavistaaprazo === 1) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n } else {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n }\r\n return retorno;\r\n }\r\n\r\n async function validarFornecedor() {\r\n let retorno = true\r\n if (Object.keys(dadosFornecedor).length > 0 && Object.keys(operacaoFiscal).length > 0) {\r\n if (operacaoFiscal.ope_notaprodutorrural === true) {\r\n if (form.getFieldValue('pej_inscricaoestadual') === \"\") {\r\n notification.warning({ message: 'Atenção!', description: 'Inscrição Estadual obrigatória' });\r\n retorno = false;\r\n }\r\n }\r\n }\r\n return retorno;\r\n }\r\n\r\n async function ValidarNota(dados) {\r\n dados = await popularDados();\r\n dados.gerarBoleto = false;\r\n dados.ntf_ufdest = dados.notaFiscalDestinatario?.ntf_ufdest;\r\n dados.notaFiscalFaturamento.forEach((formasPgto) => {\r\n if (formasPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n dados.gerarBoleto = true;\r\n }\r\n });\r\n dados.notasProdutorReferenciados = dadosNfp.map((item) => ({\r\n nfp_modelo: item.Model,\r\n nfp_serie: item.Serie,\r\n nfp_numeronota: item.Nfp,\r\n nfp_dataemissao: item.Data,\r\n nfp_chave: item.Chave,\r\n }));\r\n dados.ntf_modalidadefrete = !!dados.notaFiscalTransportadora ? dados.notaFiscalTransportadora.ntf_modalidadefrete : 9;\r\n if (!!form.getFieldValue().ntf_id) {\r\n dados.ntf_id = form.getFieldValue().ntf_id;\r\n } else {\r\n dados.ntf_dhsaient = moment(new Date());\r\n }\r\n SalvarNota(dados);\r\n }\r\n\r\n async function popularDados() {\r\n let valores = form.getFieldsValue();\r\n let dados = form.getFieldValue();\r\n valores.ntf_docfiscal = !!dados.ser_id;\r\n valores.notafiscalitens = popularDadosItens(dados);\r\n valores.notaFiscalFaturamento = preencherDadosFaturamento(dados);\r\n valores.notaFiscalDestinatario = await preencherDadosDestinatario(dados);\r\n valores.notaFiscalTransportadora = preencherDadosTransportadores(dados);\r\n valores.tipooperacao = operacaoFiscal;\r\n valores.serieFiscal = preencherDadosSerieFiscal(dados);\r\n return valores;\r\n };\r\n\r\n function popularDadosItens(dados) {\r\n let valorFrete = dados.valorFrete;\r\n let valorSeguro = dados.valorSeguro;\r\n let qtdTotalItens = 0;\r\n let freteUn = 0;\r\n let seguroUn = 0;\r\n dadosItens.forEach((itens) => {\r\n qtdTotalItens += itens.nfi_qtde;\r\n itens.nfi_numeropedidocompra = !!itens.nfi_numeropedidocompra ? itens.nfi_numeropedidocompra.toString() : '';\r\n });\r\n freteUn = valorFrete / qtdTotalItens;\r\n seguroUn = valorSeguro / qtdTotalItens;\r\n dadosItens.forEach((itens) => {\r\n itens.nfi_valorfrete = freteUn * dados.nfi_qtde;\r\n itens.nfi_valorseguro = seguroUn * dados.nfi_qtde;\r\n });\r\n return dadosItens;\r\n };\r\n\r\n function preencherDadosFaturamento() {\r\n let dadosForma = [];\r\n let recebimentoCartao = !!manutencao.dados.recebimentoCartao ? manutencao.dados.recebimentoCartao[0] : null;\r\n listaFormaPagamento.forEach(forma => {\r\n let aux = { ...forma };\r\n aux.fpg_id = forma.fpg_id;\r\n aux.cpg_id = forma.cpg_id;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCheque && !!manutencao.dados.dadosModalCheque) {\r\n aux.ctc_id = manutencao.dados.dadosModalCheque.contaCorrente;\r\n aux.cheques = manutencao.dados.dadosModalCheque.cheques;\r\n }\r\n aux.nfp_valor = parseFloat(forma.pfp_valor);\r\n aux.bce_id = !!recebimentoCartao ? recebimentoCartao.bce_id : null;\r\n aux.rcc_nsu = !!recebimentoCartao ? recebimentoCartao.rcc_nsu : null;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpValePresente) {\r\n aux.antecipacoes = forma.formaPagamento.antecipacoes;\r\n } else {\r\n aux.antecipacoes = [];\r\n }\r\n dadosForma.push(aux);\r\n });\r\n return dadosForma;\r\n };\r\n\r\n async function preencherDadosDestinatario(form) {\r\n let dadosDestinatario = {};\r\n let enderecoDest = dadosEndereco;\r\n let telefoneDest = dadosFornecedor.telefones?.filter(pt => pt.psc_id === form.telefoneDestinatario)[0];\r\n let emailDest = dadosFornecedor.emails?.filter(pem => pem.pem_id === form.ntf_emaildestinatario)[0];\r\n dadosDestinatario.pes_id = dadosFornecedor.pes_id;\r\n dadosDestinatario.pes_fisicajuridica = dadosFornecedor.pes_fisicajuridica;\r\n dadosDestinatario.ntf_nomedest = dadosFornecedor.pes_nome;\r\n dadosDestinatario.ntf_cnpjcpfdest = (!!dadosFornecedor.pej_cnpj ? dadosFornecedor.pej_cnpj : dadosFornecedor.pef_cpf);\r\n dadosDestinatario.ntf_iedest = form.pej_inscricaoestadual;\r\n dadosDestinatario.ntf_idestrangeirodest = dadosFornecedor.pes_idestrangeiro;\r\n dadosDestinatario.ntf_logradourodest = enderecoDest?.log_logradouro;\r\n dadosDestinatario.ntf_numeroenderecodest = enderecoDest?.pee_numero;\r\n dadosDestinatario.ntf_complementodest = enderecoDest?.complemento;\r\n dadosDestinatario.ntf_bairrodest = enderecoDest?.bai_nome;\r\n dadosDestinatario.ntf_cepdest = enderecoDest?.cep_cep;\r\n dadosDestinatario.ntf_ufdest = enderecoDest?.est_sigla;\r\n dadosDestinatario.ntf_telefonedest = telefoneDest?.psc_numero ?? '';\r\n dadosDestinatario.ntf_emaildest = emailDest?.pem_email ?? null;\r\n return dadosDestinatario;\r\n };\r\n\r\n function preencherDadosTransportadores(form) {\r\n let dadosTransportador = {};\r\n let veiculoTransp = listaVeiculos.filter((veiculo) => (veiculo.trv_id = form.trv_id))[0];\r\n dadosTransportador.ntf_modalidadefrete = form.ntf_modalidadefrete;\r\n dadosTransportador.trn_id = !!dadosTransp && !!dadosTransp.trn_id ? dadosTransp.trn_id : null;\r\n dadosTransportador.trv_id = !!veiculoTransp ? veiculoTransp.trv_id : null;\r\n dadosTransportador.trv_observacao = !!veiculoTransp ? veiculoTransp.trv_observacao : null;\r\n dadosTransportador.trv_placa = !!veiculoTransp ? veiculoTransp.trv_placa : null;\r\n dadosTransportador.trv_uf = !!veiculoTransp ? veiculoTransp.trv_uf : null;\r\n dadosTransportador.trv_marca = !!veiculoTransp ? veiculoTransp.trv_marca : null;\r\n dadosTransportador.trv_modelo = !!veiculoTransp ? veiculoTransp.trv_modelo : null;\r\n dadosTransportador.trv_rntc = !!veiculoTransp ? veiculoTransp.trv_rntc : null;\r\n dadosTransportador.nvl_pesoliquido = form.nvl_pesoliquido;\r\n dadosTransportador.nvl_qtdevolumes = form.nvl_qtdevolumes;\r\n dadosTransportador.nvl_pesobruto = form.nvl_pesobruto;\r\n dadosTransportador.nvl_especievolume = form.nvl_especievolume;\r\n dadosTransportador.nvl_marcavolume = form.nvl_marcavolume;\r\n return dadosTransportador;\r\n };\r\n\r\n function validarProdutorRural() {\r\n if (Object.keys(dadosFornecedor).length > 0 && Object.keys(operacaoFiscal).length > 0) {\r\n if (operacaoFiscal.ope_notaprodutorrural === true && dadosFornecedor.pef_produtorrural === false) {\r\n notification.warning({ message: 'Atenção!', description: 'A operação selecionada é destinada apenas para produtores rurais' });\r\n form.setFieldsValue({ ope_id: null });\r\n setOperacaoFiscal({});\r\n }\r\n }\r\n }\r\n\r\n function preencherDadosSerieFiscal(dados) {\r\n let dadosSerieFiscal = listaSerie.filter((item) => (item.ser_id === dados.ser_id))[0];\r\n return dadosSerieFiscal;\r\n }\r\n\r\n function SalvarNota(dados) {\r\n if (!!dados.ntf_id) {\r\n editarNota(dados);\r\n } else {\r\n incluirNota(dados);\r\n }\r\n }\r\n\r\n function incluirNota(dados) {\r\n carregando(true);\r\n api.post(\"NotaFiscal/Incluir\", dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: 'Nota incluída com sucesso!' });\r\n\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && !!res.data.ntf_docfiscal) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n function editarNota(dados) {\r\n carregando(true);\r\n api.put(`NotaFiscal/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota editada com sucesso!` });\r\n\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && !!res.data.ntf_docfiscal) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n )\r\n }\r\n\r\n function calcularFrete() {\r\n let valorFrete = 0;\r\n manutencao.dados.itensNf.forEach((item) => {\r\n if (!!item.ped_id) {\r\n valorFrete += parseFloat(!!item.pdi_valorfrete ? item.pdi_valorfrete : 0);\r\n } else {\r\n valorFrete += parseFloat(!!item.nfi_valorfrete ? item.nfi_valorfrete : 0);\r\n }\r\n });\r\n form.setFieldsValue({ valorFrete: valorFrete });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {!!editando &&
\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)}\r\n onBlurFunction={() => validarProdutorRural()} \r\n conteudo={\r\n op => ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n {!!operacaoFiscal.ope_notaprodutorrural && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n \r\n }\r\n {!!operacaoFiscal.ope_notaprodutorrural &&\r\n pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === (!!operacaoFiscal.ope_notaprodutorrural ? 2 : 1) &&\r\n \r\n }\r\n {pages.tagPages === (!!operacaoFiscal.ope_notaprodutorrural ? 3 : 2) &&\r\n \r\n }\r\n {pages.tagPages === (!!operacaoFiscal.ope_notaprodutorrural ? 4 : 3) &&\r\n \r\n }\r\n {pages.tagPages === (!!operacaoFiscal.ope_notaprodutorrural ? 5 : 4) &&\r\n \r\n }\r\n\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, RightOutlined, LeftOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from \"../../components\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport NFEntrada from '../notaFiscalEntrada/manutencao';\r\n\r\nexport default function DrawerEntrada({ showDrawer }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formEntrada] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [resume, setResume] = useState(false);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n function fecharDrawer() {\r\n formEntrada.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n setResume(false);\r\n showDrawer.setShowNFEntrada(false);\r\n };\r\n\r\n const ActionsController = () => {\r\n setProximaPag(tagPages - 1)\r\n setResume(false);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setResume(false);\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Col, Divider, Form, Input, Modal, Row, Select, Typography, notification } from 'antd';\r\nimport { ExclamationOutlined } from \"@ant-design/icons\";\r\n\r\nimport { DrawerCliente, InputCep, InputCpfCnpj, SelectIncluir, SelectPaginacao, SelectPaginado } from '../../components';\r\nimport { MaskFormat } from '../../ValueObjects';\r\nimport { useStateValue } from '../../state';\r\nimport api from '../../services/api';\r\nimport { manutencaoActions, selectPaginadoActions } from '../../actions';\r\nimport { ModalEndereco } from '../../components/modals';\r\nimport { retornaCep } from '../../services/funcoes';\r\n\r\nexport default function TomadorNFSE({ form, setInfoEndereco, carregarPagina, showDrawerExtra }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formTomador] = Form.useForm();\r\n const [openDrawerCliente, setOpenDrawerCliente] = useState(false);\r\n const [openModalEndereco, setOpenModalEndereco] = useState(false);\r\n const [listaCidade, setListaCidade] = useState(false);\r\n const [cepInformado, setCepInformado] = useState(false);\r\n const [codigoCliente, setCodigoCliente] = useState(null);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const [clientes, setClientes] = useState([]);\r\n const [dadosEndereco, setDadosEndereco] = useState([]);\r\n const [telefone, setTelefone] = useState([]);\r\n const [email, setEmail] = useState([]);\r\n const [pessoaFisica, setPessoaFisica] = useState(1);\r\n\r\n useEffect(() => {\r\n if (!!codigoCliente) {\r\n api.get(`Cliente/ListarClientesAtivos?filtro=&ordem=%2Bpes_nome`).then(listaCliente => {\r\n setClientes(listaCliente.data);\r\n }).finally(() => {\r\n form.setFieldsValue({ pes_id: codigoCliente });\r\n let lista = [];\r\n lista.push({ name: 'pes_id', campo: 'Filtro', value: codigoCliente });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n })\r\n }\r\n }, [codigoCliente]);\r\n\r\n useEffect(() => {\r\n if (!!codigoCliente) {\r\n buscarDadosCliente(codigoCliente);\r\n }\r\n }, [clientes]);\r\n\r\n useEffect(() => {\r\n if (!!clientes && clientes.length > 0 && (!!manutencao.dados || !!form.getFieldValue().pes_id)) {\r\n let cliente = !!manutencao.dados ? manutencao.dados.pes_id : form.getFieldValue().pes_id;\r\n buscarDadosCliente(cliente);\r\n }\r\n }, [clientes]);\r\n\r\n useEffect(() => {\r\n if (!carregarPagina) {\r\n setTimeout(() => {\r\n let element = document.getElementById(\"cep_cep\");\r\n element?.blur();\r\n }, 100);\r\n }\r\n }, [carregarPagina]);\r\n\r\n useEffect(() => {\r\n if (!!showDrawerExtra && !!form.getFieldValue().pes_id) {\r\n if (!!form.getFieldValue().pes_id) {\r\n buscarDadosCliente(form.getFieldValue().pes_id);\r\n }\r\n }\r\n }, [showDrawerExtra])\r\n\r\n async function buscarCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({ cidade: `${retornoCep.cid_descricao} / ${retornoCep.est_sigla}` });\r\n } else {\r\n form.setFieldsValue({ cep_cep: undefined });\r\n }\r\n }\r\n\r\n async function verificaCepIncidencia(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({ uf_incidencia: retornoCep.est_descricao, mun_incidencia: retornoCep.cid_descricao });\r\n setCepInformado(true);\r\n } else {\r\n form.setFieldsValue({ uf_incidencia: '', mun_incidencia: '', cep_incidencia: '' });\r\n setCepInformado(false);\r\n }\r\n }\r\n\r\n async function buscarDadosCliente(registro) {\r\n if (!!registro) {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${registro}`)).data;\r\n if (!!cliente) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: cliente } } } });\r\n form.setFieldsValue({ 'pej_inscricaoestadual': cliente.pej_inscricaoestadual });\r\n form.setFieldsValue({ 'pes_nome': cliente.pes_nome });\r\n form.setFieldsValue({ 'cli_id': cliente.cli_id });\r\n setarCpfCnpj(cliente);\r\n setarEnderecos(cliente.enderecos);\r\n setInfoEndereco(cliente.enderecos[0]);\r\n setarTelefones(cliente.telefones);\r\n setarEmails(cliente.emails);\r\n if (cliente.pes_fisicajuridica === 1) {\r\n if (cliente.pef_produtorrural) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': cliente.enderecos[0].pie_inscricaoestadual });\r\n }\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n }\r\n\r\n function limparCliente() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: null } } } });\r\n form.setFieldsValue({\r\n 'pej_inscricaoestadual': null, 'pes_nome': null, 'ntf_cpfcnpj': null, 'telefoneDestinatario': null, 'ntf_emaildestinatario': null, 'ntf_endereco': null, 'pse_id': null,\r\n 'cep_cep': null, 'cidade': null, 'bai_nome': null, 'pee_numero': null, 'pee_complemento': null\r\n });\r\n setarEnderecos([]);\r\n setarTelefones([]);\r\n setarEmails([]);\r\n }\r\n\r\n function setarCpfCnpj(cliente) {\r\n let tiposPessoa = {\r\n 1: cliente.pef_cpf,\r\n 2: cliente.pej_cnpj,\r\n 3: cliente.pes_idestrangeiro\r\n };\r\n\r\n let cpfCnpj = tiposPessoa[cliente.pes_fisicajuridica];\r\n\r\n if (cpfCnpj) {\r\n setPessoaFisica(cliente.pes_fisicajuridica);\r\n form.setFieldsValue({ ntf_cpfcnpj: cpfCnpj });\r\n } else {\r\n notification.warning({ message: 'Atenção', description: \"Destinatário/Tomador informado com cadastro de pessoa física/jurídica/estrangeira incorreto!\" });\r\n form.setFieldsValue({ pes_id: null, ntf_cpfcnpj: null });\r\n return false;\r\n }\r\n }\r\n\r\n function setarEnderecos(enderecos) {\r\n if (enderecos?.length) {\r\n setDadosEndereco(enderecos);\r\n const { cep_cep, pee_id, pse_id, bai_nome, pee_numero, pee_complemento } = enderecos[0];\r\n buscarCep(cep_cep);\r\n\r\n form.setFieldsValue({\r\n ntf_endereco: pee_id,\r\n cep_cep,\r\n pse_id,\r\n bai_nome,\r\n pee_numero,\r\n pee_complemento\r\n });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: [{ name: \"pse_id\", campo: \"pse_id\", value: pse_id }] } });\r\n } else {\r\n setDadosEndereco([]);\r\n if (form.getFieldValue().pes_id) {\r\n Modal.confirm({\r\n title: 'Endereço não encontrado',\r\n icon: ,\r\n content: 'Deseja incluir um endereço para este destinatário/tomador?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setOpenModalEndereco(true);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n function setarTelefones(telefones) {\r\n setTelefone(telefones);\r\n if (telefones?.length) {\r\n const telefone = telefones.find(f => f.psc_principal) ?? telefones[0];\r\n form.setFieldsValue({ telefoneDestinatario: telefone.psc_id });\r\n }\r\n }\r\n\r\n function setarEmails(emails) {\r\n setEmail(emails);\r\n if (emails?.length) {\r\n const email = emails.find(f => f.pem_emailprincipal) ?? emails[0];\r\n form.setFieldsValue({ ntf_emaildestinatario: email.pem_id });\r\n }\r\n }\r\n\r\n function buscarDadosEndereco(pee_id) {\r\n let end = dadosEndereco.filter((end) => (end.pee_id === pee_id))[0];\r\n if (!!end) {\r\n form.setFieldsValue({ pse_id: end.pse_id });\r\n if (end.pse_id) {\r\n let lista = [];\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: end.pse_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n if (end.pie_inscricaoestadual) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': end.pie_inscricaoestadual });\r\n }\r\n form.setFieldsValue({ cep_cep: end.cep_cep });\r\n form.setFieldsValue({ bai_nome: end.bai_nome });\r\n form.setFieldsValue({ pee_numero: end.pee_numero });\r\n form.setFieldsValue({ pee_complemento: end.pee_complemento });\r\n buscarCep(end.cep_cep);\r\n }\r\n }\r\n\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidade(true);\r\n setFiltroCdd(`&UfEstado=${UfEstado}`);\r\n } else {\r\n setListaCidade(false);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n setOpenDrawerCliente(true)}\r\n nameValue=\"pes_id\"\r\n allowClear={true}\r\n onChangeFunction={(dados) => { buscarDadosCliente(dados) }}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n } />\r\n
\r\n \r\n \r\n {pessoaFisica === 1 &&\r\n \r\n }\r\n {pessoaFisica === 2 &&\r\n \r\n }\r\n {pessoaFisica === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({pse.pse_nome})\r\n } />\r\n \r\n \r\n \r\n { buscarCep(event.currentTarget.value) }} />\r\n \r\n \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n \r\n \r\n {\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Endereço\" Cidade da Prestação do Serviço\r\n \r\n \r\n Informe o CEP ou selecione a UF e o Município\r\n \r\n \r\n \r\n \r\n \r\n verificaCepIncidencia(cep.currentTarget.value)} />\r\n \r\n \r\n ou\r\n \r\n \r\n \r\n carregarCidades(UfEstado)}\r\n onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n setOpenModalEndereco(false)} />\r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Card, Col, Form, Input, InputNumber, Modal, notification, Row, Select } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\n\r\nimport SelectProduto from \"../selects/selectProduto\";\r\nimport api from \"../../services/api\";\r\nimport InputPreco from \"../inputPreco\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function FiltroServicoNFSE({ form, dadosTabela, infoEndereco, operacaoFiscal, dadosVendedor, btnEditando, itemEditando, carregarPagina }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [listaSelectServ, setListaSelectServ] = useState([]);\r\n const [dadosCfop, setDadosCfop] = useState([]);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [dadosProdutosImpostos, setDadosProdutosImpostos] = useState({});\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n popularDadosContribuinte();\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando.editando])\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(dadosContribuinte)) {\r\n if (!!manutencao.dados && (!!form.getFieldValue().vnc_id || !!form.getFieldValue().ped_id)) {\r\n incluirItemPedidoCondicional();\r\n }\r\n }\r\n }, [dadosContribuinte]);\r\n\r\n function carregarDados() {\r\n api.get(`Cfop/ListarCfopTipo?tipoCfopFim=8000&tipoCfopIni=1000`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosCfop(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n async function popularDadosContribuinte(callback) {\r\n await api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n async function incluirItemPedidoCondicional() {\r\n let listaItens = [];\r\n let indice = 0;\r\n carregarPagina(true);\r\n for (let [idx, itens] of dadosTabela.dadosItens.entries()) {\r\n let servNota = await buscarDadosProdImpostos(itens.pro_id)\r\n let obj = { ...servNota, ...itens};\r\n obj.nfi_cfop = obj.cfo_cfop;\r\n listaItens.push(obj)\r\n if (indice === dadosTabela.dadosItens.length - 1) {\r\n dadosTabela.setDadosItens(listaItens);\r\n carregarPagina(false);\r\n }\r\n indice = indice + 1;;\r\n };\r\n }\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n quantidade: dados.nfi_qtde,\r\n valorUnitario: dados.nfi_valorunitario,\r\n nfi_numeroitem: dados.nfi_numeroitem,\r\n valorTotalItem: dados.nfi_qtde * dados.nfi_valorunitario,\r\n valorItemDesconto: (dados.nfi_qtde * dados.nfi_valorunitario) - dados.nfi_valordesconto + dados.nfi_valoroutros,\r\n desconto: dados.nfi_valordesconto,\r\n percacresc: dados.percacresc,\r\n percdesc: dados.percdesc,\r\n nfi_cfop: dados.nfi_cfop,\r\n acrescimo: dados.nfi_valoroutros,\r\n informacaoAdicional: dados.nfi_informacaoadicional,\r\n aliquotaIssqn: dados.aliquotaIssqn\r\n });\r\n dadosTemp = {\r\n pro_descricao: dadosEditando.pro_descricao,\r\n pro_codigo: dadosEditando.pro_codigo,\r\n ump_id: dadosEditando.ump_id,\r\n informacaoAdicional: dadosEditando.nfi_informacaoadicional,\r\n };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n\r\n //#region Calculos do Item\r\n\r\n function onChangeQuantidade() {\r\n recalcularValorTotal();\r\n }\r\n\r\n function onChangeValorUnitario() {\r\n recalcularValorTotal();\r\n }\r\n\r\n function onChangeValorTotal() {\r\n recalcularValorUnitario();\r\n }\r\n\r\n function onChangePercDesc() {\r\n calculaDesconto('PERC');\r\n }\r\n\r\n function onChangeDesconto() {\r\n calculaDesconto('VALOR');\r\n }\r\n\r\n function onChangePercAcresc() {\r\n calculaAcrescimo('PERC');\r\n }\r\n\r\n function onChangeAcrescimo() {\r\n calculaAcrescimo('VALOR');\r\n }\r\n\r\n function onClickBtnCancelar() {\r\n cancelar();\r\n }\r\n\r\n function onClickBtnAdicionar() {\r\n adicionarItem();\r\n }\r\n\r\n function recalcularValorTotal() {\r\n let total = 0;\r\n total = parseFloat(parseFloat(form.getFieldValue().quantidade) * parseFloat(form.getFieldValue().valorUnitario));\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n calculaDesconto('ATT');\r\n calculaAcrescimo('ATT');\r\n }\r\n\r\n function recalcularValorUnitario() {\r\n let vlrUnit = 0;\r\n vlrUnit = parseFloat(parseFloat(form.getFieldValue().valorTotalItem) / parseFloat(form.getFieldValue().quantidade));\r\n form.setFieldsValue({ valorUnitario: vlrUnit.toFixed(2) });\r\n calculaDesconto('ATT');\r\n calculaAcrescimo('ATT');\r\n }\r\n\r\n function calculaDesconto(campo) {\r\n let valor = parseFloat((!!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0));\r\n let perc = parseFloat((!!form.getFieldValue().percdesc ? form.getFieldValue().percdesc : 0));\r\n let tot = parseFloat(form.getFieldValue().valorTotalItem);\r\n let result = 0;\r\n if (validarDescontoMaximoVendedor(perc)) {\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n valor = (!!form.getFieldValue().desconto ? parseFloat(form.getFieldValue().desconto) : 0);\r\n result = (!!tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n } else {\r\n if (valor > tot) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de desconto maior do que valor total do item!' });\r\n form.setFieldsValue({ desconto: tot });\r\n }\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n } else {\r\n form.setFieldsValue({ desconto: 0 });\r\n form.setFieldsValue({ percdesc: 0 });\r\n calculaTotalItemDescAcr();\r\n }\r\n }\r\n\r\n function validarDescontoMaximoVendedor(perDesconto) {\r\n let retorno = true;\r\n if (!!dadosVendedor && !!dadosVendedor.ven_maximodesconto) {\r\n if (perDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: \"O desconto máximo para este vendedor não pode exceder \" + dadosVendedor.ven_maximodesconto * 100 + \"% !\", message: \"Aviso\" });\r\n form.setFieldsValue({\r\n desconto: null,\r\n percdesc: null\r\n });\r\n retorno = false;\r\n }\r\n }\r\n return retorno;\r\n }\r\n\r\n function calculaAcrescimo(campo) {\r\n let valor = (!!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0);\r\n let perc = (!!form.getFieldValue().percacresc ? form.getFieldValue().percacresc : 0);\r\n let tot = (!!form.getFieldValue().valorTotalItem ? parseFloat(form.getFieldValue().valorTotalItem) : 0);\r\n let result = 0;\r\n\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n valor = !!form.getFieldValue().acrescimo ? parseFloat(form.getFieldValue().acrescimo) : 0;\r\n result = (tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n function calculaTotalItemDescAcr() {\r\n let valorTot = 0;\r\n let valorItens = !!form.getFieldValue().valorTotalItem ? form.getFieldValue().valorTotalItem : 0;\r\n let valorAcrescimo = !!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0;\r\n let valorDesc = !!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0;\r\n\r\n valorTot = parseFloat(valorItens) + parseFloat(valorAcrescimo) - parseFloat(valorDesc);\r\n form.setFieldsValue({ valorItemDesconto: valorTot.toFixed(2) })\r\n }\r\n\r\n //#endregion\r\n\r\n //#region Processos do Item\r\n\r\n async function onChangeServID(pro_id) {\r\n let listaItens = [...listaSelectServ];\r\n let servico = listaItens.filter(pro => pro.key === pro_id)[0];\r\n let servicoImposto = await buscarDadosProdImpostos(servico.pro_id);\r\n await popularFormServico(servicoImposto);\r\n setarCampoQtde();\r\n }\r\n\r\n async function buscarDadosProdImpostos(servico) {\r\n let destinoOperacao = (!!infoEndereco.est_sigla && !!dadosContribuinte.est_sigla && (infoEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let codigoServ = !!servico ? servico : form.getFieldValue().pro_id;\r\n let ufDest = !!infoEndereco.est_sigla ? infoEndereco.est_sigla : dadosContribuinte.est_sigla;\r\n let inscEstadual = !!form.getFieldValue().pej_inscricaoestadual ? `&inscEstadual=${form.getFieldValue().pej_inscricaoestadual}` : '';\r\n let objProd = (await api.get(`Produto/BuscarDadosProduto?IdProduto=${codigoServ}&ufDestino=${ufDest}`\r\n + `&operacaoCodigo=${operacaoFiscal.ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}${''}${inscEstadual}`\r\n )).data[0];\r\n setDadosProdutosImpostos(objProd);\r\n form.setFieldsValue({\r\n pis_id: objProd.pis_id,\r\n nfi_cfop: objProd.cfo_cfop,\r\n informacaoAdicional: !!form.getFieldValue().informacaoAdicional ? form.getFieldValue().informacaoAdicional : objProd.pro_observacao,\r\n aliquotaIssqn: objProd.aliquotaIssqn\r\n });\r\n return objProd;\r\n }\r\n\r\n async function popularFormServico(servico) {\r\n let valorVenda = (!!servico.lpi_valorvenda ? servico.lpi_valorvenda : 0);\r\n setExibirDetalhes(true);\r\n form.setFieldsValue({\r\n quantidade: 1,\r\n valorUnitario: valorVenda,\r\n valorTotalItem: valorVenda,\r\n valorItemDesconto: valorVenda,\r\n nfi_itempedidocompra: null\r\n });\r\n setDadosDetalhes(servico);\r\n return servico;\r\n }\r\n\r\n async function adicionarItem(item = {}) {\r\n let dadosForm = form.getFieldValue();\r\n let possuiIe = !!dadosForm.pej_inscricaoestadual ? true : false;\r\n let fisicaJuridica = dadosForm.ntf_cpfcnpj.length === 14 ? 2 : dadosForm.ntf_cpfcnpj.length === 11 ? 1 : 3;\r\n let aliquota = !!dadosForm.aliquotaIssqn ? dadosForm.aliquotaIssqn : 0;\r\n let impostos = await CalcularImpostoItem(\"0\", null, null, null, null, dadosForm.quantidade, dadosForm.valorUnitario, null, null, null, null, null, null, null,\r\n null, null, null, null, fisicaJuridica, 0, possuiIe, dadosForm.ntf_indicadorpresenca, false, false, true, aliquota);\r\n let listaItens = [...dadosTabela.dadosItens];\r\n\r\n if (btnEditando.editando) {\r\n item = listaItens.filter((serv) => (serv.nfi_numeroitem === dadosForm.nfi_numeroitem))[0];\r\n } else {\r\n item = { ...item, ...dadosForm, ...dadosDetalhes };\r\n }\r\n let dados = {};\r\n if (!!validarItem(dadosForm)) {\r\n let dadosEditando = listaItens.filter((serv) => (serv.pro_id === item.pro_id))[0];\r\n if (!!dadosEditando) {\r\n dadosEditando.impostos = impostos;\r\n dados = popularItemNota(true, item, dadosEditando);\r\n if (!!btnEditando && btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n alterarItem(dados, listaItens, dadosEditando)\r\n } else {\r\n Modal.confirm({\r\n title: 'Atualizar?',\r\n icon: ,\r\n content: 'Serviço já cadastrado na nota, deseja atualizar suas informações?',\r\n okText: 'Atualizar',\r\n cancelText: 'Incluir',\r\n centered: true,\r\n onOk() {\r\n alterarItem(dados, listaItens, dadosEditando)\r\n },\r\n onCancel() {\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens)\r\n }\r\n });\r\n }\r\n } else {\r\n item.impostos = impostos;\r\n dados = popularItemNota(false, item);\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens)\r\n }\r\n setExibirDetalhes(false);\r\n limparCampos();\r\n }\r\n }\r\n\r\n function validarItem(dados) {\r\n if (dados.quantidade === 0 || !!!dados.quantidade) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade do serviço inválida!' });\r\n return false;\r\n }\r\n if (parseFloat(dados.valorItemDesconto) === 0 || parseFloat(dados.valorUnitario) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor do serviço inválido!' });\r\n return false\r\n }\r\n if (!!!dados.nfi_cfop) {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP é obrigatório!' });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function popularItemNota(editando, item, dadosEditando) {\r\n let itemNota = {};\r\n let formulario = form.getFieldValue();\r\n\r\n if (editando) {\r\n itemNota = {\r\n ...dadosEditando,\r\n impostos: dadosEditando.impostos,\r\n orm_id: dadosEditando.orm_id,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario),\r\n percdesc: parseFloat(formulario.percdesc),\r\n nfi_valoroutros: parseFloat(formulario.acrescimo),\r\n nfi_valordesconto: parseFloat(formulario.desconto),\r\n percacresc: parseFloat(formulario.percacresc),\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n nfi_cfop: formulario.nfi_cfop,\r\n total: parseFloat(formulario.valorItemDesconto),\r\n aliquotaIssqn: parseFloat(formulario.aliquotaIssqn ?? 0)\r\n };\r\n } else {\r\n let cfop = dadosCfop.filter((cfop) => (cfop.cfo_cfop === formulario.nfi_cfop))[0];\r\n itemNota = {\r\n impostos: item.impostos,\r\n orm_id: item.orm_id,\r\n pro_id: item.pro_id,\r\n nfi_cfop: cfop.cfo_cfop,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_numeroitem: !!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 ? dadosTabela.dadosItens.length + 1 : 1,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario ?? 0),\r\n total: parseFloat(formulario.valorItemDesconto),\r\n percdesc: parseFloat(formulario.percdesc ?? 0),\r\n nfi_valordesconto: parseFloat(formulario.desconto ?? 0),\r\n percacresc: parseFloat(formulario.percacresc ?? 0),\r\n nfi_valoroutros: parseFloat(formulario.acrescimo ?? 0),\r\n aliquotaIssqn: parseFloat(formulario.aliquotaIssqn ?? 0),\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n cfo_cfop: cfop.cfo_cfop,\r\n cfo_descricao: cfop.cfo_descricao,\r\n cfo_id: cfop.cfo_id,\r\n nfi_unidademedida: item.ump_id,\r\n pro_codigo: item.pro_codigo,\r\n pro_descricao: item.pro_descricao,\r\n ump_id: item.ump_id,\r\n pis_id: item.pis_id ?? dadosProdutosImpostos.pis_id,\r\n };\r\n }\r\n return itemNota;\r\n }\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, nfi_cfop: null, icm_id: null, informacaoAdicional: '' });\r\n };\r\n\r\n function alterarItem(dados, listaItens, dadosEditando) {\r\n let indice = listaItens.findIndex((item) => (item === dadosEditando));\r\n listaItens.splice(indice, 1, { ...dados });\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Serviço editado com sucesso!' });\r\n }\r\n\r\n function incluirItem(dados, listaItens) {\r\n listaItens.push(dados);\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Serviço incluído com sucesso!' });\r\n }\r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n }\r\n\r\n function setarCampoQtde() {\r\n setTimeout(() => {\r\n try {\r\n let element = document.getElementById(\"qtde\");\r\n if (element) {\r\n element.focus();\r\n element.select(); // Seleciona todo o texto dentro do campo\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 200);\r\n }\r\n\r\n //#endregion\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n { onChangeServID(dados) }}\r\n />\r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Serviço: {dadosDetalhes.pro_descricao}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`} parser={value => value.replace('%', '')} />\r\n \r\n \r\n \r\n \r\n { onChangeQuantidade() }} />\r\n \r\n \r\n \r\n onChangeValorUnitario()} />\r\n \r\n \r\n onChangeValorTotal()} />\r\n \r\n \r\n \r\n (onChangePercDesc())}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n onChangeDesconto()} />\r\n \r\n \r\n \r\n { onChangePercAcresc() }}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n { onChangeAcrescimo() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Modal, Row, Table, Tag } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport FiltroServicoNFSE from \"../../components/filtroServicoNfse\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function ServicosNFSE({ form, dadosItens, infoEndereco, operacaoFiscal, dadosVendedor, carregarPagina }) {\r\n const [quantidadeItens, setQuantidadeItens] = useState(0);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n\r\n useEffect(() => {\r\n if (dadosItens.dadosItens.length > 0) {\r\n let total = 0;\r\n setQuantidadeItens(dadosItens.dadosItens.length);\r\n dadosItens.dadosItens.forEach((item) => {\r\n total += parseFloat(item.total);\r\n });\r\n setValorTotal(total);\r\n form.setFieldsValue({ valorTotal: total });\r\n } else {\r\n setQuantidadeItens(0);\r\n setValorTotal(0);\r\n }\r\n }, [dadosItens.dadosItens]);\r\n\r\n function editarServicoNota(registro) {\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n }\r\n\r\n function removerServicoNota(record) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover o item da nota?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let dadosTemp = [...dadosItens.dadosItens];\r\n if (record.nfi_numeroitem) {\r\n let dadosRet = dadosTemp.filter((item) => item.nfi_numeroitem !== record.nfi_numeroitem);\r\n dadosItens.setDadosItens(dadosRet);\r\n } else if (record.pdi_numeroitem) {\r\n let dadosRet = dadosTemp.filter((item) => item.pdi_numeroitem !== record.pdi_numeroitem);\r\n dadosItens.setDadosItens(dadosRet);\r\n }\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {!!dadosItens.dadosItens && dadosItens.dadosItens.length > 0 &&
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n align: 'center',\r\n width: 40,\r\n render: ({ nfi_cfop }) => (\r\n
\r\n {nfi_cfop}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 40,\r\n align: 'center',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n {FormatNumber(nfi_qtde, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 40,\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'right',\r\n width: 40,\r\n render: ({ percdesc }) => (\r\n
\r\n {/* {percdesc}% */}\r\n {FormatNumber(percdesc, true)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'right',\r\n width: 40,\r\n render: ({ percacresc }) => (\r\n
\r\n {FormatNumber(percacresc, true)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. Issqn',\r\n align: 'right',\r\n width: 40,\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoISSQN?.ret_baseIssqn, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: '% Issqn',\r\n align: 'right',\r\n width: 40,\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoISSQN?.ret_aliquotaIssqn, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Vlr Issqn',\r\n align: 'right',\r\n width: 40,\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoISSQN?.ret_valorIssqn, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 60,\r\n render: ({ total }) => (\r\n
\r\n {FormatNumber(total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 40,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade Serviços:\r\n \r\n \r\n {quantidadeItens}\r\n \r\n \r\n \r\n \r\n Valor Total dos Serviços (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Card, Col, Row, Typography, InputNumber, Form, notification, Modal, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormasPagamento, InputPreco } from \"../../components\";\r\nimport { calculaValorProporcional, isObjetoDiffVazio, validarNumeros } from \"../../services/funcoes\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function FaturamentoNFSE({ form, dadosItens, dadosVendedor, operacaoFiscal, resume }) {\r\n const [{ manutencao }] = useStateValue();\r\n const [valorNota, setValorNota] = useState(0);\r\n const [valorTotalIssqn, setValorTotalIssqn] = useState(0);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState(!!manutencao.dados && !!manutencao.dados.faturamento && manutencao.dados.faturamento.length > 0 ? manutencao.dados.faturamento : []);\r\n const [controlModal, setControlModal] = useState(false);\r\n\r\n useEffect(() => {\r\n resume(false);\r\n recalcularTotal();\r\n }, [valorNota])\r\n\r\n useEffect(() => {\r\n rateios();\r\n calcularFaturamento();\r\n }, [manutencao.dados])\r\n\r\n function calcularFaturamento() {\r\n let formulario = form.getFieldValue();\r\n let subTotal = 0;\r\n dadosItens.forEach((item) => {\r\n subTotal += item.total;\r\n });\r\n form.setFieldsValue({ subTotalNotaFiscal: subTotal });\r\n setValorTotalIssqn(formulario.valorTotalIssqn);\r\n setValorNota(parseFloat(subTotal) + parseFloat(formulario.valorOutrasDespesas));\r\n }\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.percentualDesconto);\r\n let tot = parseFloat(valorNota);\r\n let result = 0;\r\n\r\n if (listaFormaPagamento.length > 0 && !!!controlModal) {\r\n setControlModal(true);\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Tem certeza que deseja adicionar desconto? As formas de pagamento terão que ser incluídas novamente.',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaFormaPagamento([]);\r\n },\r\n onCancel() {\r\n form.setFieldsValue({ valorDesconto: 0, percentualDesconto: 0, valorTotal: listaFormaPagamento[0].pfp_valor });\r\n }\r\n })\r\n }\r\n\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 1001) / tot;\r\n form.setFieldsValue({ percentualDesconto: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n }\r\n\r\n function calcularAcrescimo(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorAcrescimo);\r\n let perc = validarNumeros(formulario.percentualAcrescimo);\r\n let tot = (!!valorNota ? parseFloat(valorNota) : 0);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorAcrescimo: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualAcrescimo: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n }\r\n\r\n function recalcularTotal() {\r\n let formulario = form.getFieldValue();\r\n let valor = 0;\r\n if (!!formulario) {\r\n valor = valorNota - validarNumeros(formulario.valorDesconto) + validarNumeros(formulario.valorAcrescimo);\r\n form.setFieldsValue({ valorTotal: valor.toFixed(2) });\r\n let valorPago = 0;\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento) {\r\n manutencao.dados.faturamento.forEach((dadosFat) => {\r\n valorPago += parseFloat(dadosFat.pfp_valor);\r\n if (listaFormaPagamento.length == 0 || form.getFieldValue().valorDesconto > 0);\r\n {\r\n valorPago = 0;\r\n }\r\n })\r\n }\r\n form.setFieldsValue({ pfp_valor: (valor - valorPago).toFixed(2) });\r\n }\r\n }\r\n\r\n function vendedorDescMaxFinal() {\r\n let totalDesconto = 0;\r\n let totalValorDescontoItens = 0;\r\n dadosItens.forEach((itens) => {\r\n totalValorDescontoItens += parseFloat(itens.nfi_valordesconto);\r\n });\r\n let percentualDescontoConcedido = parseFloat(((totalValorDescontoItens * 100) / parseFloat(form.getFieldsValue().subTotalNotaFiscal)).toFixed(2));\r\n totalDesconto = percentualDescontoConcedido + parseFloat(form.getFieldValue().percentualDesconto);\r\n if (!!dadosVendedor && JSON.stringify(dadosVendedor) !== '{}' && !!dadosVendedor.ven_maximodesconto) {\r\n if (totalDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: `O desconto máximo para este vendedor não pode exceder ${dadosVendedor.ven_maximodesconto * 100}% !`, message: 'Aviso' });\r\n form.setFieldsValue({ percentualDesconto: (dadosVendedor.ven_maximodesconto * 100) - parseFloat(percentualDescontoConcedido) });\r\n calcularDesconto('PERC');\r\n }\r\n }\r\n }\r\n\r\n async function rateios() {\r\n await rateioDesconto();\r\n await recalcularImpostos();\r\n }\r\n\r\n async function rateioDesconto() {\r\n let formulario = form.getFieldsValue();\r\n let _numeroItem = 1;\r\n let _totalDesconto = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorDesconto = parseFloat(formulario.valorDesconto);\r\n if (_valorDesconto > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.nfi_valorunitario * item.nfi_qtde;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.nfi_valorunitario * item.nfi_qtde);\r\n item.nfi_valordescontorateado = calculaValorProporcional(valorTotalItem, _valorDesconto, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.nfi_valordescontorateado = parseFloat((_valorDesconto - _totalDesconto).toFixed(2))\r\n }\r\n _totalDesconto += item.nfi_valordescontorateado;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n\r\n async function recalcularImpostos() {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalIssqn = 0;\r\n let possuiIe = !!form.getFieldValue().pej_inscricaoestadual ? true : false;\r\n let fisicaJuridica = form.getFieldValue().ntf_cpfcnpj.length === 14 ? 2 : form.getFieldValue().ntf_cpfcnpj.length === 11 ? 1 : 3;\r\n for (const p of dadosItens) {\r\n try {\r\n let impostos = await CalcularImpostoItem(\"0\", null, null, null, null, p.nfi_qtde, p.nfi_valorunitario, null, null, p.nfi_valordesconto, null, null, null,\r\n null, null, null, null, null, fisicaJuridica, 0, possuiIe, form.getFieldValue().ntf_indicadorpresenca, false, false, true, p.aliquotaIssqn || 0);\r\n\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.total = (p.nfi_qtde * p.nfi_valorunitario) - p.nfi_valordesconto + p.nfi_valoroutros;\r\n p.impostos = impostos;\r\n }\r\n totalIssqn += parseFloat(impostos.retornoISSQN.ret_valorIssqn);\r\n total += parseFloat(p.total);\r\n } catch (error) {\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n form.setFieldsValue({ valorTotalIssqn: totalIssqn });\r\n calcularFaturamento();\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Totais da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { vendedorDescMaxFinal(); rateios(); }}\r\n onChange={() => { calcularDesconto('PERC'); }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { vendedorDescMaxFinal(); rateios(); }} onChange={() => { calcularDesconto('VALOR') }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onChange={() => { calcularAcrescimo('PERC') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calcularAcrescimo('VALOR') }} />\r\n \r\n \r\n \r\n \r\n Valor Issqn (R$): {FormatNumber(valorTotalIssqn, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Card, Col, Divider, Form, Input, InputNumber, Row, Typography } from \"antd\";\r\n\r\nimport { InputPreco } from \"../../components\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function ResumoNFSE({ form, itensNota, resume }) {\r\n resume(true);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Issqn (R$): {FormatNumber(form.getFieldValue().valorTotalIssqn, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Itens da Nota: {itensNota.length}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Col, Form, Input, Modal, Row, Select, Spin, Steps, notification } from 'antd';\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { Data, FormGW, SelectPaginacao } from '../../components';\r\nimport api from '../../services/api';\r\nimport TomadorNFSE from './tomadorNFSE';\r\nimport { HasValue, isObjetoDiffVazio, novaAbaNavegador, validaForm, validarNumeros } from '../../services/funcoes';\r\nimport ServicosNFSE from './servicosNFSE';\r\nimport FaturamentoNFSE from './faturamentoNFSE';\r\nimport ResumoNFSE from './resumoNFSE';\r\nimport { getCnpjEmpresa, setDadosIntegra } from '../../services/auth';\r\nimport apiPayer from '../../services/apiPayer';\r\nimport moment from 'moment';\r\nimport { selectPaginadoActions } from '../../actions';\r\nimport FormaDePagamento from '../../components/enuns/formaDePagamento';\r\n\r\nexport default function NFServico({ form, showDrawer, carregando, aoSalvar, pages, proximaPag, resume, showDrawerExtra }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [listaSerie, setListaSerie] = useState([]);\r\n const [infoEndereco, setInfoEndereco] = useState([]);\r\n const [vendedores, setVendedores] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [operacaoFiscal, setOperacaoFiscal] = useState({});\r\n const [dadosVendedor, setDadosVendedor] = useState({});\r\n const listaValidacoesTom = [\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' },\r\n { nome: 'pes_id', obrigatorio: true, label: 'Destinatário/Tomador' },\r\n { nome: 'cep_cep', obrigatorio: true, label: 'Cep' },\r\n { nome: 'pee_numero', obrigatorio: true, label: 'Número' },\r\n { nome: 'ntf_endereco', obrigatorio: true, label: 'Endereço' },\r\n ];\r\n\r\n const statusPagamentoIntegraPagto = {\r\n Aprovada: 1,\r\n Rejeitada: 2,\r\n Pendente: 3,\r\n Cancelada: 4,\r\n Abortada: 5,\r\n Finalizada: 6,\r\n NaoAutorizada: 7,\r\n }\r\n\r\n var modalInstance = null;\r\n\r\n const popularOperacaoFiscal = (id) => {\r\n if (!!id) {\r\n api.get(`OperacaoFiscal/Buscar/${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setOperacaoFiscal(res.data);\r\n }\r\n }\r\n ).catch(\r\n error => { console.log(error); }\r\n )\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.faturamento) {\r\n setListaFormaPagamento(manutencao.dados.faturamento);\r\n }\r\n if (!!manutencao.dados.pes_id && (!!!manutencao.dados.destinatario || (manutencao.dados.destinatario.pes_id !== manutencao.dados.pes_id))) {\r\n let lista = [];\r\n lista.push({ name: \"ope_id\", campo: \"CodigoOperacao\", value: manutencao.dados.ope_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n popularOperacaoFiscal(manutencao.dados.ope_id);\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.itensNf) {\r\n if (dadosItens.length === 0) {\r\n setDadosItens(manutencao.dados.itensNf);\r\n }\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (showDrawer) {\r\n carregarDados();\r\n if (!!manutencao.dados && !!manutencao.dados.ntf_id) {\r\n form.setFieldsValue(manutencao.dados);\r\n setEditando(true);\r\n } else {\r\n setEditando(false);\r\n }\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [showDrawer]);\r\n\r\n useEffect(() => {\r\n if (!!showDrawerExtra) {\r\n carregarDados();\r\n form.setFieldsValue(manutencao.dados);\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n if (!!showDrawerExtra && !!form.getFieldValue().pes_id) {\r\n let lista = [];\r\n if (!!form.getFieldValue().pes_id) {\r\n lista.push({ name: 'pes_id', campo: 'Filtro', value: form.getFieldValue().pes_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n }, [showDrawerExtra]);\r\n\r\n useEffect(() => {\r\n if ((!!proximaPag.proximaPag || proximaPag.proximaPag === 0) && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n async function carregarDados() {\r\n setCarregarPagina(true);\r\n let listaVendedor = await api.get('Vendedor/ListarVendedor');\r\n if (listaVendedor.status === 200) {\r\n setVendedores(listaVendedor.data.items);\r\n }\r\n let listaSerie = await api.get('SerieFiscal/Listar?EmitenteDocumento=0&CodigoModeloDocFiscal=98&SomenteAtivos=true');\r\n let serie = [];\r\n if (listaSerie.status === 200) {\r\n serie = listaSerie.data.items;\r\n setListaSerie(serie);\r\n if (serie.length > 0) {\r\n form.setFieldsValue({ ser_id: serie[0].ser_id });\r\n }\r\n }\r\n setCarregarPagina(false);\r\n }\r\n\r\n async function validarTrocaPg(pagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesTom;\r\n break;\r\n case 1:\r\n if (paginaAtual < pagina) {\r\n if (!!dadosItens && dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Nota Fiscal deve ter ao menos 1 serviço!' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n if (!!dadosItens && dadosItens.length > 0) {\r\n let naoTemCfop = dadosItens.some(item => item.cfo_cfop === null);\r\n if (naoTemCfop) {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP do serviço adicionado é obrigatório!' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n }\r\n break;\r\n case 2:\r\n if (paginaAtual < pagina) {\r\n listaValidacoes = [];\r\n let validaFaturamento = await validarFaturamento();\r\n if (validaFaturamento === false || listaFormaPagamento.length === 0) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n }\r\n if (validaForm(form, listaValidacoes)) {\r\n pages.setTagPages(pagina);\r\n } else {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n }\r\n\r\n async function validarFaturamento() {\r\n let formulario = form.getFieldsValue();\r\n let retorno = true;\r\n let valorTotal = 0;\r\n let operacao = operacaoFiscal;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach(forma => {\r\n valorTotal += parseFloat(forma.pfp_valor);\r\n if (forma.editando == true) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor salvar as alterações em andamento nas parcelas(forma pagamento) para continuar!' });\r\n }\r\n });\r\n if (parseFloat(formulario.valorTotal) === 0) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso!', description: 'Valor da Nota Inválido!' });\r\n } else {\r\n if ((validarNumeros(formulario.valorTotal) !== parseFloat(valorTotal.toFixed(2))) || operacao.tip_id == !5) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Valor informado nas formas de pagamento é menor que o valor total da nota!' });\r\n }\r\n }\r\n } else {\r\n if (!!formulario.fpg_id) {\r\n let formaPagamento = (await api.get(`FormaPagamento/Get?id=${formulario.fpg_id}`)).data;\r\n if (!listaFormaPagamento.cpg_id) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n else if (formaPagamento.fpg_tipoavistaaprazo === 1) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n } else {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n }\r\n return retorno;\r\n }\r\n\r\n function alterarVendedor() {\r\n let dadosVen = vendedores.filter((ven) => (ven.ven_id === parseInt(form.getFieldValue().ven_id)))[0];\r\n setDadosVendedor(dadosVen);\r\n }\r\n\r\n async function validarNota(dados) {\r\n dados = await popularDados();\r\n dados.gerarBoleto = false;\r\n dados.ntf_ufdest = dados.notaFiscalDestinatario?.ntf_ufdest;\r\n dados.notaFiscalFaturamento.forEach((formasPgto) => {\r\n if (formasPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n dados.gerarBoleto = true;\r\n }\r\n });\r\n salvarNota(dados);\r\n }\r\n\r\n async function popularDados() {\r\n let valores = form.getFieldsValue();\r\n let dados = form.getFieldValue();\r\n valores.ntf_docfiscal = !!dados.ser_id;\r\n valores.cid_idPrestacaoServico = dados.mun_incidencia;\r\n valores.notafiscalitens = popularDadosItens();\r\n valores.notaFiscalFaturamento = preencherDadosFaturamento();\r\n valores.notaFiscalDestinatario = await preencherDadosDestinatario(dados);\r\n valores.tipooperacao = operacaoFiscal;\r\n valores.ope_gerarespelho = operacaoFiscal.ope_gerarespelho;\r\n valores.serieFiscal = preencherDadosSerieFiscal(dados);\r\n return valores;\r\n }\r\n\r\n function popularDadosItens() {\r\n dadosItens.forEach((itens) => {\r\n itens.nfi_ncm = \"00000000\";\r\n itens.nfi_numeropedidocompra = !!itens.nfi_numeropedidocompra ? itens.nfi_numeropedidocompra.toString() : '';\r\n if (itens.pdi_id) {\r\n itens.itempedidonota = [{ pdi_id: itens.pdi_id }]\r\n }\r\n })\r\n return dadosItens;\r\n }\r\n\r\n function preencherDadosFaturamento() {\r\n let dadosForma = [];\r\n let recebimentoCartao = !!manutencao.dados.recebimentoCartao ? manutencao.dados.recebimentoCartao[0] : null;\r\n listaFormaPagamento.forEach(forma => {\r\n let aux = { ...forma };\r\n aux.fpg_id = forma.fpg_id;\r\n aux.cpg_id = forma.cpg_id;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCheque && !!manutencao.dados.dadosModalCheque) {\r\n aux.ctc_id = manutencao.dados.dadosModalCheque.contaCorrente;\r\n aux.cheques = manutencao.dados.dadosModalCheque.cheques;\r\n }\r\n aux.nfp_valor = parseFloat(forma.pfp_valor);\r\n aux.bce_id = !!recebimentoCartao ? recebimentoCartao.bce_id : null;\r\n aux.rcc_nsu = !!recebimentoCartao ? recebimentoCartao.rcc_nsu : null;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpValePresente || forma.fpg_tipopagamento === FormaDePagamento.fpCreditoEmLoja) {\r\n aux.antecipacoes = forma.antecipacoes;\r\n } else {\r\n aux.antecipacoes = [];\r\n }\r\n dadosForma.push(aux);\r\n });\r\n return dadosForma;\r\n }\r\n\r\n async function preencherDadosDestinatario(form) {\r\n let dadosDestinatario = {};\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${form.pes_id}`)).data;\r\n let enderecoDest = infoEndereco;\r\n let telefoneDest = cliente.telefones?.filter(pt => pt.psc_id === form.telefoneDestinatario)[0];\r\n let emailDest = cliente.emails?.filter(pem => pem.pem_id === form.ntf_emaildestinatario)[0];\r\n dadosDestinatario.pes_id = form.pes_id;\r\n dadosDestinatario.pes_fisicajuridica = cliente.pes_fisicajuridica;\r\n dadosDestinatario.ntf_nomedest = cliente.pes_nome;\r\n dadosDestinatario.ntf_cnpjcpfdest = (!!cliente.pej_cnpj ? cliente.pej_cnpj : cliente.pef_cpf);\r\n dadosDestinatario.ntf_iedest = form.pej_inscricaoestadual;\r\n dadosDestinatario.ntf_idestrangeirodest = cliente.pes_idestrangeiro;\r\n dadosDestinatario.ntf_logradourodest = enderecoDest?.log_logradouro;\r\n dadosDestinatario.ntf_numeroenderecodest = enderecoDest?.pee_numero ?? form.pee_numero;\r\n dadosDestinatario.ntf_complementodest = enderecoDest?.complemento ?? form.pee_complemento;\r\n dadosDestinatario.ntf_bairrodest = enderecoDest?.bai_nome;\r\n dadosDestinatario.ntf_cepdest = enderecoDest?.cep_cep;\r\n dadosDestinatario.ntf_ufdest = enderecoDest?.est_sigla;\r\n dadosDestinatario.ntf_telefonedest = telefoneDest?.psc_numero ;\r\n dadosDestinatario.ntf_emaildest = emailDest?.pem_email ?? null;\r\n return dadosDestinatario;\r\n }\r\n\r\n function preencherDadosSerieFiscal(dados) {\r\n let dadosSerieFiscal = listaSerie.filter((item) => (item.ser_id === dados.ser_id))[0];\r\n return dadosSerieFiscal;\r\n }\r\n\r\n async function salvarNota(dados) {\r\n if (dados.notaFiscalDestinatario.pes_fisicajuridica === 1) {\r\n dados.ntf_consumidorfinal = 1;\r\n } \r\n // else {\r\n // if (dados.ntf_consumidorfinal !== 0 && dados.ntf_consumidorfinal !== 1) {\r\n // notification.warning({ message: 'Aviso', description: 'Não foi selecionado o destino da mercadoria!' });\r\n // return;\r\n // }\r\n // }\r\n // dados.ntf_modalidadefrete = 9;\r\n await analisaFormaPagamento(dados);\r\n }\r\n\r\n async function analisaFormaPagamento(dados) {\r\n let pagamentoMaquininha = false;\r\n let dadosIntegracaoPos = {};\r\n let cnpjEmpresa = getCnpjEmpresa();\r\n let listaIdsIntegracao = [];\r\n for (const item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null) {\r\n if (item.fpg_tipointegracao == 1) {// vero\r\n let tipopgto = 0;\r\n let metodopgto = 0;\r\n let submetodopgto = 0;\r\n\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n tipopgto = 2;\r\n metodopgto = 1;\r\n submetodopgto = 4;\r\n if (item.parcelas?.length == 1) {\r\n submetodopgto = 1\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n tipopgto = 3;\r\n metodopgto = 1;\r\n submetodopgto = 3;\r\n if (item.parcelas?.length == 1) {\r\n submetodopgto = 1\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n tipopgto = 1;\r\n metodopgto = 3;\r\n submetodopgto = 1\r\n }\r\n dadosIntegracaoPos = {\r\n imp_cnpjlocal: cnpjEmpresa,\r\n imp_valor: item.pfp_valor,\r\n imp_tipopgto: tipopgto,\r\n imp_metodopgto: metodopgto,\r\n imp_submetodopgto: submetodopgto,\r\n imp_qtdeparcelas: item.parcelas?.length,\r\n }\r\n if (!isObjetoDiffVazio(item.integrapgto)) {\r\n item.integrapgtook = false;\r\n item.integrapgto = await criaRegistroIntegraPagto(dadosIntegracaoPos);\r\n listaIdsIntegracao.push(item.integrapgto);\r\n }\r\n item.imp_id = item.integrapgto.imp_id;\r\n } else if (item.fpg_tipointegracao == 2) {//payer localhost\r\n await pagamentoPayer(item);\r\n pagamentoMaquininha = true;\r\n break;\r\n }\r\n else if (item.fpg_tipointegracao == 4) {//payer Gateway\r\n await pagamentoPayer(item);\r\n pagamentoMaquininha = true;\r\n break;\r\n }\r\n pagamentoMaquininha = true;\r\n } else {\r\n pagamentoMaquininha = false;\r\n }\r\n }\r\n }\r\n if (pagamentoMaquininha) {\r\n setDadosIntegra(dados);\r\n modalAguardandoPagamento(dados);\r\n } else {\r\n concluirVenda(dados);\r\n }\r\n }\r\n\r\n async function criaRegistroIntegraPagto(dadosIntegracaoPos) {\r\n let retorno;\r\n try {\r\n retorno = (await api.post(`IntegraPagto/Incluir`, dadosIntegracaoPos)).data;\r\n } catch (error) {\r\n notification.warning({ description: 'Erro ao mandar o pagamento para a máquina!', message: 'AVISO!' });\r\n console.log(error);\r\n return false;\r\n }\r\n return retorno;\r\n }\r\n\r\n async function pagamentoPayer(item) {\r\n let dadosIntegracaoPos = {};\r\n let _paymentType = \"\";\r\n let _paymentMethodSubType = \"\";\r\n let _installments = \"\";\r\n let _paymentMethod = \"\";\r\n let _command = \"payment\"\r\n\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Credit\";\r\n _paymentMethodSubType = \"Financed_no_Fees\";\r\n\r\n if (item.parcelas?.length == 1) {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n } else {\r\n _installments = (item.parcelas?.length).toString();\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n if (item.parcelas?.length > 1) {\r\n _paymentMethodSubType = \"Financed_Debit\";\r\n _installments = (item.parcelas?.length).toString();\r\n } else {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n }\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Debit\"\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n _paymentType = \"Cash\";\r\n _paymentMethod = \"Pix\";\r\n }\r\n\r\n dadosIntegracaoPos = {\r\n command: _command,\r\n value: parseFloat(item.pfp_valor),\r\n paymentMethod: _paymentMethod,\r\n paymentType: _paymentType,\r\n paymentMethodSubType: _paymentMethodSubType,\r\n installments: _installments\r\n };\r\n if (!isObjetoDiffVazio(item.integrapgto)) {\r\n if (item.fpg_tipointegracao == 2) {//payer localhost\r\n try {\r\n let retorno = await apiPayer.post('Client/Request', dadosIntegracaoPos);\r\n item.integrapgtook = false;\r\n } catch (error) {\r\n notification.warning({ description: 'Verifique se o checkout Payer esteja iniciado, caso contrário inicie o mesmo para continuar !', message: 'AVISO!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao == 4) {//payer Gateway\r\n try {\r\n dadosIntegracaoPos.installments = parseInt(dadosIntegracaoPos.installments);\r\n let retorno = (await api.post(`Payer/IncluirPayerRequest`, dadosIntegracaoPos)).data;\r\n item.integrapgtook = false;\r\n item.integrapgto = retorno;\r\n } catch (error) {\r\n if (!!error.response && !!error.response.data)\r\n notification.warning({ description: error.response.data[0], message: 'AVISO!' });\r\n else\r\n notification.warning({ description: 'Erro ao mandar o pagamento para API Payer!', message: 'AVISO!' });\r\n }\r\n }\r\n }\r\n }\r\n\r\n function modalAguardandoPagamento(dados) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalInstance = Modal.confirm({\r\n title: 'Aviso',\r\n content: 'Aguardando Pagamento!',\r\n okText: 'Pagamento Efetuado',\r\n cancelText: 'Cancelar Pagamento',\r\n onOk: () => {\r\n verificarPagamentos(dados);\r\n },\r\n onCancel: () => {\r\n cancelarPagamentoMaquina(dados);\r\n }\r\n });\r\n }\r\n\r\n async function cancelarPagamentoMaquina(dados) {\r\n for (var item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n let retorno = (await api.put(`IntegraPagto/CancelarPagamento?Id=${item.integrapgto.imp_id}`)).data;\r\n if (retorno) {\r\n item.integrapgtook = false;\r\n item.integrapgto = null;\r\n } else {\r\n notification.warning({ description: 'Erro ao efetuar o cancelamento!', message: 'Aviso!' });\r\n modalAguardandoPagamento(dados)\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n async function verificarPagamentos(dados) {\r\n for (var item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false || item.integrapgtook == null || item.integrapgtook == undefined) && item.fpg_tipointegracao == 1) {// Vero\r\n let retorno = (await api.get(`IntegraPagto/Buscar/${item.integrapgto.imp_id}`)).data;\r\n if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Pendente) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalAguardandoPagamento(dados);\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Aprovada) {\r\n item.integrapgtook = true;\r\n item.integrapgto = retorno;\r\n item.rcc_nsu = retorno.imp_autorizacao;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.NaoAutorizada) {\r\n notification.warning({ description: 'Pagamento não Autorizado!', message: 'Aviso!' });\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Cancelada) {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false) && item.fpg_tipointegracao == 2) {// Payer localhost\r\n let retorno;\r\n try {\r\n retorno = (await apiPayer.get('Client/Response')).data;\r\n\r\n } catch (error) {\r\n notification.warning({ description: 'Verifique se o checkout Payer esteja iniciado, caso contrário inicie o mesmo para continuar !', message: 'AVISO!' });\r\n await pagamentoPayer(item);\r\n break\r\n }\r\n if (retorno.statusTransaction == \"PENDING\") {\r\n break\r\n } else if (retorno.statusTransaction == \"APPROVED\") {\r\n let ret = (await api.post(`IntegraPagto/IncluirPayer`, retorno)).data;\r\n item.integrapgtook = true;\r\n item.integrapgto = ret;\r\n item.rcc_nsu = ret.authorizerId;\r\n item.imp_id = ret.imp_id;\r\n } else if (retorno.statusTransaction == \"UNAUTHORIZED\") {\r\n notification.warning({ description: 'Pagamento não Autorizado, verifique no Checkout Payer e tente novamente!', message: 'Aviso!' });\r\n return;\r\n } else if (retorno.statusTransaction == \"ABORTED\") {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false) && item.fpg_tipointegracao == 4) {// Payer Gateway\r\n try {\r\n let retorno = (await api.get(`Payer/BuscarOrdemPagamento/${item.integrapgto.imp_id}`)).data;\r\n\r\n if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Pendente) {\r\n break\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Aprovada) {\r\n item.integrapgtook = true;\r\n item.integrapgto = retorno;\r\n item.rcc_nsu = retorno.imp_autorizacao;\r\n item.imp_id = retorno.imp_id;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.NaoAutorizada) {\r\n notification.warning({ description: 'Pagamento não Autorizado, verifique no Checkout Payer e tente novamente!', message: 'Aviso!' });\r\n return;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Abortada) {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n } catch (error) {\r\n notification.warning({ description: 'Erro ao consultar o pagamento na API!', message: 'AVISO!' });\r\n }\r\n\r\n\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == null || item.integrapgtook == undefined) && (item.fpg_tipointegracao == 2 || item.fpg_tipointegracao == 4)) {\r\n await pagamentoPayer(item);\r\n }\r\n }\r\n }\r\n await verificaTodosPagamentos(dados);\r\n }\r\n\r\n async function verificaTodosPagamentos(dados) {\r\n let finalizarVenda = true;\r\n let listaFaturamento = dados.notaFiscalFaturamento;\r\n listaFaturamento.forEach(item => {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false || item.integrapgtook == null || item.integrapgtook == undefined)) {\r\n finalizarVenda = false;\r\n }\r\n }\r\n });\r\n if (finalizarVenda == true) {\r\n concluirVenda(dados);\r\n } else {\r\n modalAguardandoPagamento(dados);\r\n }\r\n }\r\n\r\n function concluirVenda(dados) {\r\n if (!!form.getFieldValue().ntf_id) {\r\n dados.ntf_id = form.getFieldValue().ntf_id;\r\n editarNota(dados);\r\n } else {\r\n dados.ntf_dhsaient = moment(new Date());\r\n incluirNota(dados);\r\n }\r\n }\r\n\r\n function incluirNota(dados) {\r\n carregando(true);\r\n api.post(`NotaFiscal/Incluir`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota incluída com sucesso!` });\r\n if (HasValue(dados.ser_id)) {\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && res.data.ntf_docfiscal == true) {\r\n window.open(res.data.controleloterps.clr_linknfse);\r\n\r\n let formaPagItegrado = res.data.notafiscalformapgtos.filter((item) => (HasValue(item.imp_id)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${res.data.ntf_id}`);\r\n }\r\n }\r\n }\r\n if (dados.gerarBoleto && !!res.data.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${res.data.ntf_id}`);\r\n }\r\n //COMENTADO POIS ESSE TRATAMENTO ESTÁ SENDO FEITO NO BACK\r\n // if (res.status === 200 && !!dados.ped_id) {\r\n // tratarPedidoFaturado(dados.ped_id);\r\n // }\r\n if (res.status === 200 && !!dados.vnc_id) {\r\n AlterarSituacaoCondicional(dados.vnc_id);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n function editarNota(dados) {\r\n carregando(true);\r\n api.put(`NotaFiscal/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota editada com sucesso!` });\r\n if (HasValue(dados.ser_id)) {\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && res.data.ntf_docfiscal == true) {\r\n window.open(res.data.controleloterps.clr_linknfse);\r\n }\r\n }\r\n if (dados.gerarBoleto && !!res.data.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${res.data.ntf_id}`);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n\r\n async function tratarPedidoFaturado(id) {\r\n api.put(`Pedido/TratarHistoricoPedidoFaturado/${id}`).then(\r\n ok => {\r\n console.log(ok);\r\n }).catch(\r\n error => {\r\n console.log(error)\r\n }).finally(() => {\r\n aoSalvar();\r\n });\r\n }\r\n\r\n async function AlterarSituacaoCondicional(id) {\r\n api.put(`VendaCondicional/AlterarSituacaoCondicional?IdCondicional=${id}&SituacaoCondicional=2`).then(\r\n ok => {\r\n console.log(ok);\r\n }).catch(\r\n error => {\r\n console.log(error)\r\n }).finally(() => {\r\n aoSalvar();\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {!!editando &&
\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)}\r\n conteudo={\r\n op => ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, LeftOutlined, MinusOutlined, RightOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport NFServico from \"../notaFiscalServico/manutencao\";\r\n\r\nexport default function DrawerServico({ showDrawer }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formServico] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [resume, setResume] = useState(false);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n const ActionsController = () => {\r\n setProximaPag(tagPages - 1)\r\n setResume(false);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setResume(false);\r\n fecharDrawer();\r\n }\r\n });\r\n }\r\n\r\n function fecharDrawer() {\r\n formServico.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n setResume(false);\r\n showDrawer.setShowNFServico(false);\r\n }\r\n \r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Dropdown, Menu, Popover, Modal, notification, Input } from \"antd\";\r\nimport {\r\n ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, EditOutlined, DeleteOutlined, CloseOutlined, PrinterOutlined, FileTextOutlined, DollarOutlined, WhatsAppOutlined,\r\n TagOutlined, UndoOutlined, CloudUploadOutlined, MoreOutlined, SendOutlined, EyeOutlined, ExclamationCircleOutlined, StopOutlined, PlusOutlined, FileDoneOutlined, FileSearchOutlined\r\n} from \"@ant-design/icons\";\r\nimport { Link } from \"react-router-dom\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerNotaFiscal from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerDevolucao from './drawerDevolucao';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport DrawerDebitoCredito from './drawerDebitoCredito';\r\nimport ModalDetalheNotaFiscal from \"./modalDetalheNotaFiscal\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { formatarCpfCnpj, HasValue, imprimirRelatorioJasper, novaAbaNavegador, openPdfNewTab } from \"../../services/funcoes\";\r\nimport { BreadcrumbPage, ComboData, TabelaDados, Inutilizar, ImportarXML, EmitirNotaFiscal, EmitirNotaFiscalDebito, EmitirNotaFiscalTransferencia, CancelarEstorno, Editar, Imprimir, Data, EmitirNotaFiscalEntada, EmitirNotaFiscalServico } from \"../../components\";\r\nimport { ModalImprimirEtiquetas, ModalDevolucao, ModalAjudaRejeicaoNfe, ModalEnvioNFeEmail, ModalEnvioNFeWhats, ModalCancelamentoNfe, ModalCartaCorrecaoNotaFiscal, ModalEstornoNfe, ModalInutilizarNota, ModalReenviarSefaz } from \"../../components/modals/\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport DrawerEntrada from \"./drawerEntrada\";\r\nimport DrawerServico from \"./drawerServico\";\r\n\r\nexport default function NotaFiscal() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [formParam] = Form.useForm();\r\n const [openModalCartaCorrecao, setOpenModalCartaCorrecao] = useState(false);\r\n const [openModalExcluir, setOpenModalExcluir] = useState(false);\r\n const [openModalDevolucao, setOpenModalDevolucao] = useState(false);\r\n const [openModalEnvioNFeEmail, setOpenModalEnvioNFeEmail] = useState(false);\r\n const [openModalEnvioNFeWhats, setOpenModalEnvioNFeWhats] = useState(false);\r\n const [openModalAjudaRejeicaoNfe, setOpenModalAjudaRejeicaoNfe] = useState(false);\r\n const [openModalCancelarEstornar, setOpenModalCancelarEstornar] = useState(false);\r\n const [openModalImprimirEtiquetas, setOpenModalImprimirEtiquetas] = useState(false);\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n const [listaFinalidadeNota, setListaFinalidadeNota] = useState([]);\r\n const [listaTipoNota, setListaTipoNota] = useState([]);\r\n const [open, setOpen] = useState(false);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [openModalEstorno, setOpenModalEstorno] = useState(false);\r\n const [openModalDetalhes, setOpenModalDetalhes] = useState(false);\r\n const [dadosDetalhesNota, setDadosDetalhesNota] = useState({});\r\n const [dadosNfeDevolucao, setDadosNfeDevolucao] = useState([]);\r\n const [dadosNfeEtiqueta, setDadosNfeEtiqueta] = useState({});\r\n const [exibirModalInutilizar, setExibirModalInutilizar] = useState(false);\r\n const [openModalReenviarSefaz, setModalReenviarSefaz] = useState(false);\r\n const [showNFEntrada, setShowNFEntrada] = useState(false);\r\n const [showNFServico, setShowNFServico] = useState(false);\r\n const [parametrosLocal, setParametrosLocal] = useState({});\r\n\r\n function menuEmitir() {\r\n return (\r\n \r\n \r\n {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: false } });\r\n }} icon={}>\r\n Nota Fiscal\r\n \r\n \r\n \r\n {\r\n setShowNFEntrada(true);\r\n }} icon={}>\r\n Nota Fiscal Entrada\r\n \r\n \r\n \r\n {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: true } });\r\n }} icon={}>\r\n Nota Fiscal de Débito e Crédito\r\n \r\n \r\n \r\n }>\r\n \r\n Nota Fiscal de Transferência\r\n \r\n \r\n \r\n \r\n {\r\n setShowNFServico(true);\r\n }} icon={}>\r\n Nota Fiscal de Serviço\r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function menuOutros() {\r\n return (\r\n \r\n \r\n }>\r\n Inutilizar Numeração de Nota Fiscal \r\n \r\n \r\n \r\n }>\r\n Importar XML \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const abrirEnvioEmail = (record) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } })\r\n setOpenModalEnvioNFeEmail(true);\r\n }\r\n\r\n async function verificarTelefone() {\r\n let verificaTelefone = (await api.get(`ParametroLocal/BuscarParametros`)).data;\r\n setParametrosLocal(verificaTelefone);\r\n }\r\n\r\n const abrirEnvioWhats = (record) => {\r\n if (typeof parametrosLocal?.par_numerowhatsapp === \"string\" && parametrosLocal.par_numerowhatsapp.trim() !== \"\") {\r\n debugger;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } })\r\n setOpenModalEnvioNFeWhats(true);\r\n\r\n } else {\r\n notification.info({ message: 'Operação não permitida', description: \"Cliente sem telefone cadastrado nas Configurações do Local!\" });\r\n return;\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n filtrosAvancados();\r\n //dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n carregarDados();\r\n verificarTelefone();\r\n }, []);\r\n\r\n function carregarDados() {\r\n retornaFinalidadeNota();\r\n retornaStatusNF();\r\n retornaTipoNota();\r\n };\r\n\r\n function retornaFinalidadeNota() {\r\n api.get('Enum/Listar?nome=FinalidadeNfe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaFinalidadeNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function retornaTipoNota() {\r\n api.get('Enum/Listar?nome=TipoNota').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaTipoNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function retornaCondicaoPagamento(fpg_id) {\r\n api.get(`CondicaoPagamento/Listar?filtro=&codigoFormaPagamento=${fpg_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function abrirCartaCorrecao(record) {\r\n setDadosNota(record);\r\n setOpenModalCartaCorrecao(true);\r\n };\r\n\r\n async function abrirCancelarNota(record) {\r\n let filtros = \"\";\r\n if (!!record.ntf_dataemissao) {\r\n filtros += `DataInicial=${record.ntf_dataemissao}&DataFinal=${record.ntf_dataemissao}`\r\n }\r\n if (!!record.ntf_id) {\r\n filtros += `&ntf_id=${record.ntf_id}`\r\n }\r\n let remessa = (await api.get(`Boleto/ListarDados?${filtros}`)).data;\r\n let nomeRemessa = [...new Set(remessa.map(item => item.rem_nomearquivoremessa))].join(\", \");;\r\n let boletos = remessa.map(item => item.ntf_numero + \"/ \" + item.prc_numeroparcela).join(\", \");\r\n record = { ...record, ...remessa};\r\n if(nomeRemessa != \"\" && nomeRemessa != null){ \r\n notification.warn({ message: `Nota Fiscal Possui remessa gerada!\\nRemessa com nome: ${nomeRemessa} e boletos N°: ${boletos}` });\r\n }\r\n\r\n api.get(`NotaFiscal/VerificarTempoEmissao?IdNotaFiscal=${record.ntf_id}`).then(\r\n res => {\r\n if (record.ntf_docfiscal) {\r\n if (!!res.data.terminouPrazoCancelamento) {\r\n api.get(`NotaFiscalDevolucao/VerificaDevolucaoTotal?IdNotaFiscal=${record.ntf_id}`).then(\r\n (res) => {\r\n if (!res.data) {\r\n record.horas = res.data.horas;\r\n record.dias = res.data.dias;\r\n setDadosNota(record);\r\n setOpenModalEstorno(true);\r\n } else {\r\n Modal.warning({\r\n title: \"Esta Nota Fiscal já foi totalmente extornada.\",\r\n });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n setDadosNota(record);\r\n setOpenModalCancelarEstornar(true);\r\n }\r\n } else {\r\n setDadosNota(record);\r\n setOpenModalCancelarEstornar(true);\r\n }\r\n }\r\n )\r\n };\r\n\r\n\r\n function abrirExcluirNota(record) {\r\n setDadosNota(record);\r\n setOpenModalExcluir(true);\r\n };\r\n\r\n function recarregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n };\r\n\r\n function removerNotaDigitacao(record) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Excluir a Nota Fiscal ${record.ntf_numero}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk() {\r\n excluirNota(record);\r\n },\r\n onCancel() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n },\r\n })\r\n };\r\n\r\n function excluirNota(record) {\r\n api.post(`NotaFiscal/Excluir?notaFiscalId=${record.ntf_id}`).then(\r\n res => {\r\n notification.success({ message: 'Nota Fiscal Excluida Com Sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n }\r\n )\r\n };\r\n\r\n function imprimirDanfe(dados) {\r\n if (dados.ntf_modelo == '55' || dados.ntf_modelo == '65') {\r\n if (dados.ntf_status == 1 && !!dados.ntf_chavenfe && !!dados.ntf_docfiscal) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${dados.ntf_chavenfe}`)\r\n }\r\n } else if (dados.ntf_modelo == '57') {\r\n if (dados.ntf_status == 1 && !!dados.ntf_chavenfe && !!dados.ntf_docfiscal) {\r\n novaAbaNavegador(`Danfe/GerarDacte?chave=${dados.ntf_chavenfe}`)\r\n }\r\n } else if (dados.ntf_modelo == '98') {\r\n // if (dados.ntf_status == 1 && !!dados.ntf_chavenfe) {\r\n // novaAbaNavegador(`Danfe/GerarDanfse?chave=${dados.ntf_chavenfe}`)\r\n // }\r\n window.open(dados.clr_linknfse);\r\n }\r\n\r\n imprimirComprovantePagamentoIntegrado(dados);\r\n };\r\n\r\n function imprimirComprovantePagamentoIntegrado(dados) {\r\n if (dados.ntf_status == 1) {\r\n let formaPagItegrado = dados.formasPgto.filter((item) => (HasValue(item.imp_autorizacao)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${dados.ntf_id}`);\r\n }\r\n }\r\n }\r\n\r\n function modalExcluirNotaCompra(dados) {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: `Está ação irá Excluir a Nota Fiscal de Entrada Nº ${dados.ntf_numero}, deseja realmente realizada excluir a nota fiscal?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk() {\r\n excluirNotaCompra(dados);\r\n },\r\n onCancel() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n },\r\n })\r\n };\r\n\r\n function excluirNotaCompra(dados) {\r\n api.delete(`NotaFiscal/ExcluirNotaEntrada/${dados.ntf_id}`).then(\r\n res => {\r\n notification.success({ description: \"Registro excluído com sucesso!\", message: \"Aviso\" });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ message: 'Não foi possivel excluir a Nota Fiscal !' });\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function imprimirBoleto(record) {\r\n if (!!record.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${record.ntf_id}`);\r\n }\r\n };\r\n\r\n function menuTable(record) {\r\n if (record.ntf_modelo === \"98\") {\r\n return (\r\n \r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true && HasValue(record.clr_protocolo) &&\r\n \r\n \r\n }\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n \r\n \r\n }\r\n\r\n {(record.ntf_status === 1 || record.ntf_status === 0 && (record.ser_emitentedocumento === 0 || !!!record.ntf_docfiscal)) &&\r\n \r\n } onClick={() => abrirCancelarNota(record)}>\r\n Cancelar/Estornar\r\n \r\n }\r\n \r\n )\r\n } else {\r\n return (\r\n \r\n {((record.ntf_status == 0 || record.ntf_status == 4) && record.ntf_finalidade != 4 && record.ntf_nroinutilizadosefaz == false) &&\r\n \r\n } onClick={() => {\r\n editarNota(record)\r\n }}> Editar\r\n \r\n }\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n \r\n }\r\n {record.ntf_status === 0 && record.ntf_docfiscal === false &&\r\n \r\n \r\n }\r\n {(record.ntf_status === 1 && (record.ser_emitentedocumento === 0 || !!!record.ntf_docfiscal)) &&\r\n \r\n } onClick={() => abrirCancelarNota(record)}>\r\n Cancelar/Estornar\r\n \r\n }\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_docfiscal === true &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 && record.ntf_docfiscal === true && record.ntf_tiponota === 1 &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 && record.ntf_docfiscal === true && record.ser_emitentedocumento === 0 &&\r\n \r\n \r\n }\r\n {(record.ntf_status === 1 && record.ntf_finalidade != 4) &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 && record.ntf_docfiscal === true &&\r\n \r\n \r\n }\r\n {(record.ntf_status === 1 && record.ntf_tiponota == 1) &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 && (record.ntf_tiponota === 1 || record.ntf_tiponota === 2) && record.ser_emitentedocumento === 1 &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 && record.ntf_docfiscal === true &&\r\n \r\n \r\n }\r\n \r\n )\r\n }\r\n };\r\n\r\n function abrirNotaDevolucao(dadosNotaFiscalDevolucao) {\r\n if (!!dadosNotaFiscalDevolucao.ntf_id) {\r\n api.get(`NotaFiscalDevolucao/VerificaDevolucaoTotal?IdNotaFiscal=${dadosNotaFiscalDevolucao.ntf_id}`).then(\r\n (res) => {\r\n if (!res.data) {\r\n api.get(`NotaFiscalDevolucao/ListarNotaFiscalDevolucao?IdNotaFiscal=${dadosNotaFiscalDevolucao.ntf_id}`).then(\r\n res => {\r\n if (!!res.data) {\r\n res.data.itensNf?.forEach((item) => {\r\n item.valorDescontoRateio = (parseFloat(item.nfi_valordesconto) / item.nfi_qtde) * item.qtdeRestante;\r\n })\r\n setDadosNfeDevolucao(res.data);\r\n if (res.data.for_regimetributariofiscal === null && res.data.cli_regimetributariofiscal === null && res.data.pes_fisicajuridica === 2) {\r\n setOpenModalDevolucao(true);\r\n } else {\r\n abrirDrawerDevolucao(res.data);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n } else {\r\n Modal.warning({\r\n title: \"Esta Nota Fiscal já foi totalmente devolvida.\",\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n };\r\n\r\n async function inutilizarNota(dados) {\r\n let filtros = \"\";\r\n if (!!dados.ntf_dataemissao) {\r\n filtros += `DataInicial=${dados.ntf_dataemissao}&DataFinal=${dados.ntf_dataemissao}`\r\n }\r\n if (!!dados.ntf_id) {\r\n filtros += `&ntf_id=${dados.ntf_id}`\r\n }\r\n let remessa = (await api.get(`Boleto/ListarDados?${filtros}`)).data;\r\n let nomeRemessa = [...new Set(remessa.map(item => item.rem_nomearquivoremessa))].join(\", \");;\r\n let boletos = remessa.map(item => item.ntf_numero + \"/ \" + item.prc_numeroparcela).join(\", \");\r\n dados = { ...dados, ...remessa};\r\n if(nomeRemessa != \"\" && nomeRemessa != null){ \r\n notification.warn({ message: `Nota Fiscal Possui remessa gerada!\\nRemessa com nome: ${nomeRemessa} e boletos N°: ${boletos}` });\r\n return;\r\n }else{ \r\n setDadosNota(dados);\r\n setExibirModalInutilizar(true);\r\n }\r\n };\r\n\r\n function autorizarNota(record) {\r\n setDadosNota(record);\r\n setModalReenviarSefaz(true);\r\n };\r\n\r\n function consutarNfseByProtocolo(record) {\r\n let _link = `NotaServico/ConsultarLoteRps/${record.ntf_id}`;\r\n api.get(_link).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1) {\r\n notification.success({ message: 'Sucesso', description: `NF-e Autorizada com sucesso!` });\r\n } else {\r\n notification.error({ description: retornoNF.data.ntf_xmotivo, message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n }\r\n ).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n });\r\n console.log(record)\r\n };\r\n\r\n function fecharModalInutilizar() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_dataemissao' } });\r\n setExibirModalInutilizar(false);\r\n }\r\n\r\n function abrirDrawerDevolucao(dados) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerDevolucao: true } });\r\n };\r\n\r\n async function visualizarNota(dados) {\r\n let retorno = [];\r\n let vendedor = [];\r\n if (!!dados.ntf_id) {\r\n retorno = await api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${dados.ntf_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data;\r\n if (!!retorno.ven_id) {\r\n vendedor = await api.get(`Vendedor/RetornaVendedor?idVendedor=${retorno.ven_id}`);\r\n if (vendedor.status === 200) {\r\n retorno.nomeVendedor = vendedor.data.pes_nome;\r\n }\r\n }\r\n retorno.itensNf.forEach((item) => {\r\n let totalItemSemDesconto = parseFloat((item.nfi_qtde * item.nfi_valorunitario)).toFixed(2);\r\n item.perc_desconto = parseFloat((item.nfi_valordesconto / (totalItemSemDesconto)) * 100).toFixed(2);\r\n let valorDesconto = item.nfi_valordesconto;\r\n item.valor_item_desconto = parseFloat(totalItemSemDesconto - valorDesconto).toFixed(2);\r\n });\r\n setDadosDetalhesNota(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n function menuTableOutros(record) {\r\n const getImprimirLabel = (modelo) => {\r\n switch (modelo) {\r\n case '55':\r\n return 'Imprimir DANFE';\r\n case '65':\r\n return 'Imprimir DANFCE';\r\n case '57':\r\n return 'Imprimir DACTE';\r\n case '98':\r\n return 'Imprimir DANFSE';\r\n default:\r\n return 'Imprimir';\r\n }\r\n };\r\n\r\n return (\r\n \r\n {record.ntf_docfiscal && record.ntf_status == 1 && (['55', '65', '57', '98'].includes(record.ntf_modelo)) && (\r\n <>\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n\r\n function gerarRascunho(record) {\r\n openPdfNewTab(`NotaFiscal/GerarEspelhoDanfeNFe?IdNotaFiscal=${record.ntf_id}`)\r\n };\r\n\r\n function imprimirDAVLS(registro) {\r\n Modal.confirm({\r\n title: 'Qual modelo de impressão deseja?',\r\n icon: ,\r\n okText: 'Não Fiscal',\r\n cancelText: 'Modelo A4',\r\n centered: true,\r\n onOk() {\r\n novaAbaNavegador(`NotaFiscal/Imprimir?id=${registro.ntf_id}`);\r\n },\r\n onCancel() {\r\n imprimirRelatorioJasper(20, { idNotaFiscal: registro.ntf_id });\r\n }\r\n });\r\n };\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!listaStatusNota) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n\r\n function editarNota(record) {\r\n if (record.ntf_tiponota === 3) {\r\n let dados = { ...record };\r\n dados.ntf_dataemissao = moment(dados.ntf_dataemissao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerExtra: true } });\r\n } else {\r\n api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${record.ntf_id}`).then(\r\n res => {\r\n let dados = res.data;\r\n dados.ntf_dataemissao = moment(dados.ntf_dataemissao);\r\n dados.ntf_datainclusao = moment(dados.ntf_datainclusao);\r\n dados.ntf_dhsaient = moment(dados.ntf_dhsaient);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function filtrosAvancados(value) {\r\n let sql = \"\";\r\n sql += !!formParam.getFieldValue().finalidade ? `&Finalidade=${formParam.getFieldValue().finalidade}` : \"\";\r\n sql += !!formParam.getFieldValue().status ? `&StatusNFe=${formParam.getFieldValue().status}` : \"\";\r\n sql += !!formParam.getFieldValue().tipoNota ? `&Tipo=${formParam.getFieldValue().tipoNota}` : \"\";\r\n sql += !!formParam.getFieldValue().modeloNota ? `&ModeloNota=${formParam.getFieldValue().modeloNota}` : \"\";\r\n sql += !!form.getFieldValue().condicaoPagamento ? `&CondicoesPagamento=${form.getFieldValue().condicaoPagamento}` : \"\";\r\n sql += !!form.getFieldValue().formaPagamento ? `&FormasPagamento=${form.getFieldValue().formaPagamento}` : \"\";\r\n sql += !!form.getFieldValue().operacaoFiscal ? `&OperacoesFiscais=${form.getFieldValue().operacaoFiscal}` : \"\";\r\n sql += !!form.getFieldValue().vendedor ? `&Vendedores=${form.getFieldValue().vendedor}` : \"\";\r\n sql += !!form.getFieldValue().dataInicial ? `&DataInicial=${moment(form.getFieldValue().dataInicial).format('YYYY-MM-DD')}` : `&dataInicial=${moment(new Date()).format('YYYY-MM-DD')}`;\r\n sql += !!form.getFieldValue().dataFinal ? `&DataFinal=${moment(form.getFieldValue().dataFinal).format('YYYY-MM-DD')}` : `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}`;\r\n sql += !!form.getFieldValue().ser_serie ? `&SerieFiscal=${form.getFieldValue().ser_serie}` : \"\";\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: `${!!value ? value : !!formParam.getFieldValue().filtroPor ? formParam.getFieldValue().filtroPor : ''}${sql}`, ordem: '-ntf_dataemissao', pagina: 1 } });\r\n };\r\n\r\n function visualizarDanfe(notaFiscal) {\r\n if (notaFiscal.ntf_modelo === '00') {\r\n imprimirRelatorioNaoFiscal(notaFiscal);\r\n } else if (notaFiscal.ntf_modelo === '98') {\r\n window.open(`${notaFiscal.clr_linknfse}`);\r\n } else {\r\n if (notaFiscal.ntf_status === 1)\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${notaFiscal.ntf_chavenfe}`);\r\n //openPdf(`NotaFiscal/GerarEspelhoDanfeNFe?IdNotaFiscal=${notaFiscal.ntf_id}`);\r\n else\r\n notification.error({ message: 'Nota Fiscal ainda não foi aprovada na Sefaz!' });\r\n }\r\n };\r\n\r\n function consultaSefaz(chave) {\r\n window.open(`https://www.nfe.fazenda.gov.br/portal/consultaRecaptcha.aspx?tipoConsulta=resumo&tipoConteudo=7PhJ+gAVw2g=&nfe=${chave}`, '_blank');\r\n };\r\n\r\n function imprimirRelatorioNaoFiscal(notaFiscal) {\r\n imprimirRelatorioJasper(20, { idNotaFiscal: notaFiscal.ntf_id });\r\n };\r\n\r\n function exportarXML(nota) {\r\n const getLabel = (modelo) => {\r\n switch (modelo) {\r\n case '55':\r\n return 'NFe-';\r\n case '65':\r\n return 'NFCe-';\r\n case '57':\r\n return 'CTe-';\r\n case '98':\r\n return 'NFSe-';\r\n default:\r\n return '';\r\n }\r\n };\r\n if (nota.ntf_modelo == '98') {\r\n api.get(`NotaServico/ExportarXml?chave=${nota.ntf_chavenfe}`).then(\r\n res => {\r\n let linkOculto = document.createElement('a');\r\n linkOculto.href = 'data:text/xml,' + encodeURIComponent(atob(res.data));\r\n linkOculto.download = getLabel(nota.ntf_modelo) + nota.ntf_chavenfe + '.xml';\r\n document.body.appendChild(linkOculto);\r\n linkOculto.click();\r\n linkOculto.remove();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n api.get(`NotaFiscal/ExportarXml?chaveNfe=${nota.ntf_chavenfe}`).then(\r\n res => {\r\n let linkOculto = document.createElement('a');\r\n linkOculto.href = 'data:text/xml,' + encodeURIComponent(atob(res.data));\r\n linkOculto.download = getLabel(nota.ntf_modelo) + nota.ntf_chavenfe + '.xml';\r\n document.body.appendChild(linkOculto);\r\n linkOculto.click();\r\n linkOculto.remove();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n const abrirImprimirEtiqueta = (record) => {\r\n setDadosNfeEtiqueta(record);\r\n setOpenModalImprimirEtiquetas(true);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n filtrosAvancados(valor)} allowClear />\r\n \r\n \r\n \r\n {\r\n form.setFieldsValue({ DataFinal: moment(new Date()) });\r\n form.setFieldsValue({ DataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n filtrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n filtrosAvancados()}\r\n mode=\"multiple\"\r\n placeholder=\"Tipo Nota\"\r\n >\r\n {listaTipoNota.map((tpNota) => (\r\n {tpNota.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n \r\n filtrosAvancados()}\r\n mode=\"multiple\"\r\n placeholder=\"Status Nota\"\r\n >\r\n {listaStatusNota.map((statusNota) => (\r\n {statusNota.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n \r\n filtrosAvancados()}>\r\n NF-e\r\n NFC-e\r\n NFS-e\r\n CT-e\r\n D.A.V\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n filtrosAvancados()} />\r\n \r\n \r\n \r\n filtrosAvancados()} conteudo={\r\n serie => ({serie.ser_serie})\r\n } />\r\n \r\n \r\n \r\n \r\n filtrosAvancados()} conteudo={\r\n op => ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n filtrosAvancados()} conteudo={\r\n pv => ({pv.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n { form.setFieldsValue({ condicaoPagamento: null }); retornaCondicaoPagamento(dados); filtrosAvancados() }}\r\n conteudo={\r\n fp => ({fp.fpg_descricao})} />\r\n \r\n \r\n \r\n \r\n filtrosAvancados()\r\n }>\r\n {condicaoPagamento.map((condPagamento) => (\r\n {condPagamento.cpg_descricao}\r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n \r\n filtrosAvancados()}\r\n >\r\n {listaFinalidadeNota.map((finalidade) => (\r\n {finalidade.value} \r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {ntf_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 210,\r\n render: ({ ntf_status, tip_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n {tip_descricao}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 125,\r\n render: ({ ntf_cnpjcpfdest }) => (\r\n
\r\n \r\n
\r\n {formatarCpfCnpj(ntf_cnpjcpfdest)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n render: ({ ntf_nomedest }) => (\r\n
\r\n \r\n
\r\n {ntf_nomedest}\r\n \r\n {!!ntf_nomedest === false && \r\n Consumidor Final\r\n }\r\n\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 140,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 80,\r\n align: 'center',\r\n render: ({ mdf_id, ser_serie }) => (\r\n
\r\n \r\n
\r\n {mdf_id}\r\n \r\n \r\n -\r\n \r\n \r\n {ser_serie}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 200,\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {ntf_modelo != '98' &&\r\n <>\r\n \r\n Chave:\r\n \r\n {!!ntf_chavenfe === false &&\r\n \r\n NF-e não gerada\r\n \r\n }\r\n {!!ntf_chavenfe && \r\n { visualizarDanfe({ ntf_chavenfe: ntf_chavenfe, ntf_modelo: ntf_modelo, ntf_id: ntf_id, ntf_status: ntf_status }) }}>Clique para visualizar o Danfe}>\r\n {ntf_chavenfe}\r\n \r\n }\r\n \r\n }\r\n {ntf_modelo == '98' &&\r\n <>\r\n \r\n Código Verificação:\r\n \r\n {!!ntf_chavenfe === false &&\r\n \r\n Código não gerado\r\n \r\n }\r\n {!!ntf_chavenfe && \r\n { visualizarDanfe({ clr_linknfse: clr_linknfse, ntf_modelo: ntf_modelo, ntf_id: ntf_id, ntf_status: ntf_status }) }}>Clique para visualizar o Danfe}>\r\n {ntf_chavenfe}\r\n \r\n }\r\n \r\n Nº RPS:\r\n \r\n \r\n {clr_numerorps}\r\n \r\n \r\n Nº Lote:\r\n \r\n \r\n {clr_numerolote}\r\n \r\n \r\n Protocolo:\r\n \r\n \r\n {clr_protocolo}\r\n \r\n \r\n Data Recebimento:\r\n \r\n \r\n {moment(clr_datarecebimento).format('DD/MM/YYYY HH:mm')}\r\n \r\n \r\n }\r\n {ntf_status === 1 && ntf_modelo === \"55\" && \r\n { consultaSefaz(ntf_chavenfe) }} target=\"_blank\">\r\n Consultar Sefaz\r\n \r\n }\r\n \r\n \r\n \r\n Série: {(!!ntf_serie > 0 ? ntf_serie : 'Não Informada')}\r\n \r\n \r\n Finalidade: {(ntf_finalidade === 1) ? 'NF-e Normal' : (ntf_finalidade === 2) ? 'NF-e Complementar' : (ntf_finalidade === 3) ? 'NF-e de Ajuste' : (ntf_finalidade === 4) ? 'Devolução' : ''}\r\n \r\n {!!vendedor ? \r\n Vendedor: {vendedor}\r\n : null}\r\n \r\n \r\n \r\n Forma de Pagamento:\r\n \r\n \r\n {formasPgto.map((formas) => (\r\n <>\r\n \r\n {formas.fpg_descricao}{(!!formas.cpg_descricao) ? ' - ' + formas.cpg_descricao : '' + ' -'}\r\n \r\n \r\n R$ {FormatNumber(formas.nfp_valor, true)}\r\n \r\n \r\n ))}\r\n \r\n \r\n {(ntf_status == 3 || ntf_status == 4) && \r\n \r\n Rejeição: {ntf_cstat}{!!(ntf_xmotivo) ? (', ' + ntf_xmotivo) : ''}\r\n \r\n \r\n }\r\n \r\n )\r\n }} />\r\n \r\n { recarregarLista() }} />\r\n \r\n \r\n \r\n \r\n { setOpenModalDetalhes(false) }} dadosModal={dadosDetalhesNota} />\r\n\r\n { setOpenModalImprimirEtiquetas(false); recarregarLista(); }} dadosNota={dadosNfeEtiqueta} />\r\n { setOpenModalAjudaRejeicaoNfe(false); recarregarLista(); }} />\r\n { setOpenModalCartaCorrecao(false); recarregarLista() }} />\r\n { setOpenModalDevolucao(false); if (openDrawerDevolucao) { abrirDrawerDevolucao(dadosNfeDevolucao) } }} />\r\n { setOpenModalEnvioNFeEmail(false); recarregarLista(); }} />\r\n { setOpenModalEnvioNFeWhats(false); recarregarLista(); }} />\r\n { setOpenModalEstorno(false); recarregarLista(); }} />\r\n { setOpenModalExcluir(false); recarregarLista(); }} />\r\n { setOpenModalCancelarEstornar(false); recarregarLista() }} />\r\n { setExibirModalInutilizar(false); recarregarLista() }} />\r\n { setModalReenviarSefaz(false); recarregarLista() }} />\r\n \r\n );\r\n}","\r\n// const dataBase = openDatabase(\"NotaEntradaXML\", \"1.0\", \"Teste Web SQL Database\", 200000);\r\n\r\n\r\nexport function criarBanco(nomeTabela, campos = [], version) {\r\n const request = indexedDB.open(\"NotaEntradaXML\", version);\r\n\r\n request.onupgradeneeded = function(event) {\r\n const db = event.target.result;\r\n const objectStore = db.createObjectStore(nomeTabela, { keyPath: 'id', autoIncrement: true });\r\n let i = 0;\r\n campos.forEach(campo => {\r\n \r\n if(version !== 1){\r\n if(i > 0) return;\r\n campo.forEach(campo => {\r\n \r\n objectStore.createIndex(campo.nome, campo.nome, { unique: !!campo.unico });\r\n })\r\n }\r\n else {\r\n \r\n objectStore.createIndex(campo.nome, campo.nome, { unique: !!campo.unico });\r\n }\r\n i++;\r\n });\r\n };\r\n\r\n request.onsuccess = function(event) {\r\n const db = event.target.result;\r\n db.close();\r\n };\r\n\r\n request.onerror = function(event) {\r\n console.log('Erro ao abrir o banco de dados:', event.target.error);\r\n };\r\n}\r\n\r\nexport async function excluirBancoDados(callback) { \r\n const tempDBName = \"NotaEntradaXML\";\r\n const request = indexedDB.deleteDatabase(tempDBName);\r\n\r\n request.onsuccess = function() {\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n request.onerror = function(event) {\r\n console.log(\"Erro ao excluir o banco de dados:\", event.target.error);\r\n };\r\n}\r\n\r\nexport async function incluirBanco(nomeTabela, dados = [], version) {\r\n return new Promise((resolve, reject) => {\r\n const request = indexedDB.open(\"NotaEntradaXML\", version);\r\n\r\n request.onsuccess = function(event) {\r\n \r\n const db = event.target.result;\r\n const transaction = db.transaction([nomeTabela], 'readwrite');\r\n const objectStore = transaction.objectStore(nomeTabela);\r\n\r\n dados.forEach(dado => {\r\n if (!dado.unico) {\r\n const addObjectRequest = objectStore.add(dado);\r\n addObjectRequest.onerror = function(event) {\r\n console.log(\"Erro ao inserir dados: \" + event.target.error);\r\n };\r\n }\r\n });\r\n\r\n transaction.oncomplete = function() {\r\n db.close();\r\n resolve(); // Resolva a Promise após a inclusão dos dados\r\n };\r\n\r\n transaction.onerror = function(event) {\r\n reject(new Error(\"Erro ao iniciar transação: \" + event.target.error));\r\n };\r\n };\r\n\r\n request.onerror = function(event) {\r\n reject(new Error(\"Erro ao abrir o banco de dados: \" + event.target.error));\r\n };\r\n });\r\n}\r\n\r\n\r\nexport function buscarDadosBanco(nomeTabela, campos = [], condicao, retorno = () => { }, callback) {\r\n if (!validarNomeTabela(nomeTabela)) return;\r\n\r\n const request = indexedDB.open(\"BancoTeste1\", 1.0);\r\n \r\n request.onsuccess = function(event) {\r\n const db = event.target.value;\r\n const transaction = db.transaction([nomeTabela], \"readonly\");\r\n const objectStore = transaction.objectStore(nomeTabela);\r\n\r\n let index;\r\n\r\n if(!!condicao && condicao.campo) {\r\n index = objectStore.index(condicao.campo);\r\n }\r\n\r\n const getRequest = index ? index.get(condicao.valor) : objectStore.getAll();\r\n\r\n getRequest.onsuccess = function(event) {\r\n const result = event.target.value;\r\n console.log(\"Busca concluída com sucesso!\");\r\n if (retorno) {\r\n retorno(result);\r\n }\r\n if(callback) {\r\n callback();\r\n }\r\n db.close();\r\n };\r\n\r\n getRequest.onerror = function(event) {\r\n console.log(\"Erro ao buscar dados: \", event.target.error);\r\n };\r\n };\r\n}\r\n\r\nexport function buscarDadosTabela(retorno = [], tabela, callback, version) {\r\n const request = indexedDB.open(\"NotaEntradaXML\", version);\r\n \r\n request.onsuccess = function(event) {\r\n \r\n const db = event.target.result;\r\n const transaction = db.transaction([tabela], 'readonly');\r\n const objectStore = transaction.objectStore(tabela);\r\n const getRequest = objectStore.getAll();\r\n\r\n getRequest.onsuccess = function(event) {\r\n const result = event.target.result;\r\n if(retorno) {\r\n \r\n retorno.push(result);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n db.close();\r\n }\r\n getRequest.onerror = function(event) {\r\n console.log(\"Erro ao buscar dados: \", event.target.error);\r\n }\r\n }\r\n request.onerror = function(event) {\r\n console.log(\"Erro: \", event.target.error);\r\n }\r\n}\r\n\r\nexport function editarDadosBanco(nomeTabela, alteracao = [], condicao, callback) {\r\n const request = indexedDB.open(\"NotaEntradaXML\", 1.0);\r\n \r\n request.onsuccess = function(event) {\r\n const db = event.target.result;\r\n const transaction = db.transaction([nomeTabela], \"readwrite\");\r\n const objectStore = transaction.objectStore(nomeTabela);\r\n\r\n const getRequest = objectStore.get(condicao.valor);\r\n\r\n getRequest.onsuccess = function(event) {\r\n const data = event.target.result;\r\n alteracao.forEach(campo => {\r\n data[campo.campo] = campo.valor;\r\n });\r\n\r\n const updateRequest = objectStore.put(data);\r\n\r\n updateRequest.onsuccess = function(event) {\r\n if(!!callback) {\r\n callback();\r\n }\r\n };\r\n updateRequest.onerror = function(event) {\r\n console.log(\"Erro ao editar dados: \", event.target.error);\r\n }\r\n }\r\n getRequest.onerror = function(event) {\r\n console.log(\"Erro ao buscar dados: \", event.target.error);\r\n }\r\n }\r\n request.onerror = function(event) {\r\n console.log(\"Erro ao abrir banco: \", event.target.error);\r\n }\r\n}\r\n\r\nexport function excluirDadosBanco(nomeTabela, condicao, callback) {\r\n const request = indexedDB.open(\"NotaEntradaXML\", 1);\r\n \r\n request.onsuccess = function(event) {\r\n const db = event.target.result;\r\n const transaction = db.transaction([nomeTabela], \"readwrite\");\r\n const objectStore = transaction.objectStore(nomeTabela);\r\n const deleteRequest = objectStore.delete(condicao.valor);\r\n\r\n deleteRequest.onsuccess = function(event) {\r\n if(callback) {\r\n callback();\r\n }\r\n }\r\n deleteRequest.onerror = function(event) {\r\n console.log(\"Erro ao excluir dados: \", event.target.error);\r\n }\r\n }\r\n request.onerror = function(event) {\r\n console.log(\"Erro ao abrir banco: \", event.target.error);\r\n }\r\n}\r\n\r\n// \r\n\r\nfunction validarNomeTabela(nomeTabela) {\r\n let retorno = false;\r\n if (!!nomeTabela) {\r\n retorno = true;\r\n } else {\r\n console.log(`Nome da tabela não informada!`);\r\n }\r\n return retorno;\r\n};\r\n\r\nfunction validarCondicao(condicao) {\r\n let retorno = false;\r\n if (!!condicao && !!condicao.campo && !!condicao.valor) {\r\n retorno = true;\r\n } else {\r\n console.log(`Condições não informadas!`);\r\n }\r\n return retorno;\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Typography, Divider, Select, Descriptions } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport SelectPaginado from '../../components/selectPaginado';\r\nimport { Data, InputPreco } from \"../../components\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { formatarCnpj, formatarCpf, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function TabNotaFiscal({ form, dadosNota, dadosRemetente }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(dadosNota)) {\r\n form.setFieldsValue(dadosNota);\r\n form.setFieldsValue({ ntf_dataentrada: moment(new Date()) });\r\n }\r\n }, [dadosNota]);\r\n\r\n useEffect(() => {\r\n if (!!dadosRemetente?.for_id) {\r\n let lista = [];\r\n\r\n if (!!dadosRemetente?.for_id)\r\n lista.push({ name: \"orc_id\", campo: \"IdFornecedor\", value: dadosRemetente?.for_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: {itens: lista} });\r\n\r\n }\r\n }, [dadosRemetente])\r\n \r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n ({oc.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n Data Emissão: {moment(dadosNota.find(obj => obj.nome === 'ntf_dataemissao')?.valor).format('DD/MM/YYYY')}\r\n \r\n \r\n Chave NF-e: {dadosNota.find(obj => obj.nome === 'ntf_chavenfe')?.valor}\r\n \r\n \r\n Nº da Nota: {dadosNota.find(obj => obj.nome === 'ntf_numero')?.valor}\r\n \r\n \r\n Série: {dadosNota.find(obj => obj.nome === 'ser_numero')?.valor}\r\n \r\n \r\n \r\n \r\n \r\n \"Fornecedor\" Fornecedor\r\n \r\n \r\n \r\n \r\n \r\n \r\n Nome: {dadosRemetente?.[0]?.find(obj => obj.nome === 'pes_nome')?.valor}\r\n \r\n \r\n CPF/CNPJ: {(!!dadosRemetente?.[0]?.find(obj => obj.nome === 'cnpjcpf') && dadosRemetente?.[0]?.find(obj => obj.nome === 'cnpjcpf')?.valor.length > 11 ? \r\n formatarCnpj(dadosRemetente?.[0]?.find(obj => obj.nome === 'cnpjcpf')) : formatarCpf(dadosNota.find(obj => obj.nome === 'cnpjcpf')?.valor))}\r\n \r\n \r\n Inscrição Estadual: {dadosRemetente?.[0]?.find(obj => obj.nome === 'pej_inscricaoestadual')?.valor}\r\n \r\n \r\n Endereço: {dadosRemetente?.[0]?.find(obj => obj.nome === 'log_logradouro')?.valor}, {dadosRemetente?.[0]?.find(obj => obj.nome === 'pee_numero')?.valor},\r\n {dadosRemetente?.[0]?.find(obj => obj.nome === 'bai_bairro')?.valor}, {dadosRemetente?.[0]?.find(obj => obj.nome === 'cid_descricao')?.valor} - \r\n {dadosRemetente?.[0]?.find(obj => obj.nome === 'est_sigla')?.valor}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Impostos\" Impostos\r\n \r\n \r\n \r\n \r\n \r\n \r\n Base de Cálculo ICMS: {dadosNota.find(objeto => objeto.nome === 'vBaseCalculoIcms')?.valor}\r\n \r\n \r\n Valor ICMS (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorIcms')?.valor, true)}\r\n \r\n \r\n Base de Cálculo ICMSST: {dadosNota.find(objeto => objeto.nome === 'vBaseCalculoIcmsSt')?.valor}\r\n \r\n \r\n Valor ICMS-ST (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorIcmsSt')?.valor, true)}\r\n \r\n \r\n Valor PIS (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorPis')?.valor, true)}\r\n \r\n \r\n Valor COFINS (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorCofins')?.valor, true)}\r\n \r\n \r\n Valor IPI (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorIpi')?.valor, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Totais Totais da Nota\r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total dos Produtos (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorTotalProdutos')?.valor, true)}\r\n \r\n \r\n Valor do Frete (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorFrete')?.valor, true)}\r\n \r\n \r\n Valor do Seguro (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorSeguro')?.valor, true)}\r\n \r\n \r\n Descontos (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vDesconto')?.valor, true)}\r\n \r\n \r\n Outras Despesas (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vOutrasDespesas')?.valor, true)}\r\n \r\n \r\n Valor Total da NF-e (R$): {FormatNumber(dadosNota.find(objeto => objeto.nome === 'vValorTotalNfe')?.valor, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Informações Informações Fora da Nota\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoProdutos from '../produto/manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerProduto({ callback, editando }) {\r\n\r\n const [formProduto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n if (manutencao.dados !== null && !!editando.editando) {\r\n formProduto.setFieldsValue(manutencao.dados)\r\n } else {\r\n formProduto.setFieldsValue({ pro_id: null, pro_ativo: true, pro_produto: true });\r\n }\r\n }, [])\r\n\r\n function fecharDrawer(retornoDrawer) {\r\n if (!!callback) {\r\n callback(!!retornoDrawer ? retornoDrawer : {});\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n formProduto.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Modal, Descriptions, Table, InputNumber } from \"antd\";\r\n\r\nimport formatNumber from \"../../../ValueObjects/formatNumber\";\r\n\r\nexport default function ModalSelecionarGrade({ dadosProduto = {}, exibirModal, onCloseModal }) {\r\n \r\n const [form] = Form.useForm();\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [gradesSelecionadas, setGradesSelecionadas] = useState([]);\r\n\r\n function selecionarGrades(selectedRowKeys, selectedRows) {\r\n setGradesSelecionadas(selectedRows);\r\n }\r\n\r\n const functionOnOK = record => {\r\n let gradesSelecionadasBkp = [...gradesSelecionadas];\r\n setGradesSelecionadas([]);\r\n onCloseModal(gradesSelecionadasBkp);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n Código: {dadosProduto.pro_codigo}\r\n \r\n \r\n Produto: {dadosProduto.pro_descricao}\r\n \r\n \r\n
{\r\n selecionarGrades(selectedRowKeys, selectedRows);\r\n }\r\n }}\r\n columns={[\r\n {\r\n title: \"Grade\",\r\n render: ({ descricaoGrade }) => (\r\n
\r\n {descricaoGrade}\r\n
\r\n )\r\n }, {\r\n title: \"EAN\",\r\n render: ({ prg_ean }) => (\r\n
\r\n {prg_ean}\r\n
\r\n )\r\n }, {\r\n title: \"Valor (R$)\",\r\n align: \"right\",\r\n render: ({ pre_custoultimacompra }) => (\r\n
\r\n {formatNumber(pre_custoultimacompra, true, false)}\r\n
\r\n )\r\n }\r\n ]}\r\n dataSource={!!dadosProduto.grades ? dadosProduto.grades : []}\r\n />\r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Typography, Divider, InputNumber, Table, Select, Tag, Dropdown, Menu, Button, Input, notification, Modal } from \"antd\";\r\nimport { MoreOutlined, DeleteOutlined, PlusOutlined, EditOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport DrawerProduto from \"./drawerProduto\";\r\nimport { InputPreco, SelectProduto } from \"../../components\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { isNotNullOrEmpty, isObjetoDiffVazio, HasValue } from \"../../services/funcoes\";\r\nimport { ModalGradeProdutoImportacao } from \"../../components/modals\";\r\nimport ModalSelecionarGrade from \"../../components/modals/modalSelecionarGrade\";\r\n\r\nexport default function TabItens({ dadosRemetente, dadosItens }) {\r\n\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n const [listaProdutosSistema, setListaProdutosSistema] = useState([]);\r\n const [produtos, setProdutos] = useState([]);\r\n const [form] = Form.useForm();\r\n const [keyProdutoCadastrado, setKeyProdutoCadastrado] = useState(null);\r\n const [atualizarProduto, setAtualizarProduto] = useState(false);\r\n const [aguardandoPopular, setAguardandoPopular] = useState(false);\r\n const [filtroProd, setFiltroProd] = useState(\"\");\r\n const [exibirModalSelecGrade, setExibirModalSelecGrade] = useState(false);\r\n const [dadosModalGrade, setDadosModalGrade] = useState({});\r\n const [editando, setEditando] = useState(true);\r\n const [ativarMarkup, setAtivarMarkup] = useState();\r\n const [parametrosEmpresa, setParametrosEmpresa] = useState({});\r\n const [dadosGrade, setDadosGrade] = useState([]);\r\n const [abrirModalGrade, setAbrirModalGrade] = useState(false);\r\n const [possuiGrade, setPossuiGrade] = useState(false);\r\n\r\n const configSelecionarItem =\r\n {\r\n selectedRowKeys,\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n ///criar quantidade setando\r\n setSelectedRowKeys(selectedRowKeys);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n api.get('/ParametroEmpresa/BuscarParametros').then(res => {\r\n if (res.data.par_calculaprecovenda == true) {\r\n setAtivarMarkup(true);\r\n setParametrosEmpresa(true);\r\n } else {\r\n setAtivarMarkup(false);\r\n setParametrosEmpresa(false);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n setProdutos(dadosItens.dadosItens);\r\n buscarProdutosNotaEntrada();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!produtos && produtos.length > 0 && !isNotNullOrEmpty(produtos[0].key)) {\r\n let id = 0;\r\n let dados = [...produtos];\r\n let listaItemSis = [];\r\n dados.forEach(async (produto) => {\r\n produto.key = id;\r\n let dadosItensSistema = produto.dadosItensSistema.length ? JSON.parse(produto.dadosItensSistema) : [];\r\n if (dadosItensSistema.length > 0) {\r\n let itemSis = dadosItensSistema;\r\n let seq = 0;\r\n itemSis.forEach(async item => {\r\n item.seqPai = id;\r\n item.key = seq;\r\n item.ativarDisabled = true;\r\n item.nfi_custoinformado = produto.xValorUnitarioProduto / itemSis.length;\r\n\r\n let ParMarkup = 1;\r\n let filtro = (item.pro_id ? `&IdProduto=${item.pro_id}` : '');\r\n filtro += (!!item.prg_ean ? `&ean=${item.prg_ean}` : (!!produto.pro_ean ? `&ean=${produto.pro_ean}` : ''));\r\n filtro += (!!item.prg_id ? `&grade=${item.prg_id}` : '');\r\n api.get(`Produto/MarkupProduto?${filtro}`).then(\r\n res => {\r\n let parametro = res.data;\r\n item.pro_markup = parametro.pro_markup;\r\n })\r\n item.valorVenda = ((produto.xValorUnitarioProduto / itemSis.length) * ParMarkup).toFixed(2);\r\n seq++;\r\n listaItemSis.push(item);\r\n });\r\n form.setFieldsValue({ [`qtdItem${id}`]: produto.xQuantidade });\r\n form.setFieldsValue({ [`valorUnitario${id}`]: produto.xValorUnitarioProduto / itemSis.length });\r\n } else {\r\n }\r\n id++;\r\n });\r\n setListaProdutosSistema(listaItemSis)\r\n setProdutos(dados);\r\n }\r\n }, [produtos]);\r\n\r\n useEffect(() => {\r\n if (!!listaProdutosSistema && listaProdutosSistema.length > 0) {\r\n setAtualizarProduto(true);\r\n let produtosSistema = [...listaProdutosSistema];\r\n let dados = [...produtos];\r\n let linhasSeleq = [];\r\n limparItensSistemas(dados, (dados) => {\r\n produtosSistema.forEach((item) => {\r\n let prod = dados.find(prod => prod.key === item.seqPai);\r\n if (!!prod) {\r\n if (linhasSeleq.indexOf(item.seqPai) === -1) {\r\n linhasSeleq.push(item.seqPai);\r\n }\r\n prod.dadosItensSistema.push(item);\r\n }\r\n });\r\n setProdutos(dados);\r\n setSelectedRowKeys(linhasSeleq);\r\n buscarSobra(produtosSistema[produtosSistema.length - 1].seqPai);\r\n });\r\n } else {\r\n }\r\n }, [listaProdutosSistema]);\r\n\r\n useEffect(() => {\r\n if (!!aguardandoPopular && !!listaSelectPaginacao?.itens) {\r\n let dados = listaSelectPaginacao?.itens;\r\n let itens = [...listaProdutosSistema];\r\n let ultimorProd = itens[itens.length - 1].pro_id;\r\n let prod = dados.filter((item) => (item.pro_id === ultimorProd))[0];\r\n if (!!prod) {\r\n form.setFieldsValue({ [`produtoCodigoUN${keyProdutoCadastrado}`]: prod.key });\r\n setKeyProdutoCadastrado(null);\r\n setAguardandoPopular(false);\r\n }\r\n setFiltroProd(\"\");\r\n setAtualizarProduto(true);\r\n }\r\n }, [listaSelectPaginacao]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.dadosGrade) {\r\n buscarDadosGradeModal();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function limparItensSistemas(dados, callback) {\r\n dados.forEach((itemXml) => {\r\n itemXml.dadosItensSistema = [];\r\n });\r\n if (!!callback) {\r\n callback(dados)\r\n }\r\n };\r\n\r\n function adicionarControleQtd(qtd, key) {\r\n let dados = [...produtos];\r\n let registroItem = dados.filter((item) => item.key === key)[0];\r\n let valorUni = 0;\r\n if (qtd > 0) {\r\n valorUni = registroItem.xValorTotalProduto / qtd;\r\n form.setFieldsValue({ [`valorUnitario${key}`]: parseFloat(valorUni.toFixed(6)) });\r\n form.setFieldsValue({ [`nfi_custoinformado${key}`]: parseFloat(valorUni.toFixed(6)) });\r\n form.setFieldsValue({ [`nfi_qtde${key}`]: parseFloat(qtd) });\r\n }\r\n };\r\n\r\n function abrirCadastroProduto(record) {\r\n let dadosProd = {};\r\n let dadosProdutoXml = {};\r\n if (!!!record.xEan || isNaN(record.xEan)) {\r\n dadosProdutoXml = produtos.filter((prod) => prod.cProd === record.cProd)[0];\r\n } else {\r\n dadosProdutoXml = produtos.filter((prod) => prod.xEan === record.xEan)[0];\r\n }\r\n dadosProd.pro_descricao = dadosProdutoXml.xProd;\r\n if (dadosProdutoXml.xEan !== 'SEM GTIN') {\r\n dadosProd.pro_ean = dadosProdutoXml.xEan;\r\n } else {\r\n dadosProd.pro_ean = null;\r\n }\r\n dadosProd.orm_id = !!dadosProdutoXml.xOrigem ? dadosProdutoXml.xOrigem + \"\" : \"0\";\r\n dadosProd.orm = dadosProdutoXml.xOrigem;\r\n dadosProd.ncm_id = dadosProdutoXml.ncm_id;\r\n dadosProd.ump_id = dadosProdutoXml.xUnidadeMedida;\r\n dadosProd.ump = dadosProdutoXml.xUnidadeMedida;\r\n dadosProd.pre_custoultimacompra = dadosProdutoXml.xValorUnitarioProduto;\r\n dadosProd.pro_markup = dadosProdutoXml.pro_markup;\r\n dadosProd.pro_servico = false;\r\n dadosProd.pro_kitcomposicao = false;\r\n dadosProd.pro_materiaprima = false;\r\n dadosProd.pro_ativo = true;\r\n dadosProd.pro_referencia = \"\";\r\n dadosProd.pro_modelo = \"\";\r\n dadosProd.pro_observacao = \"\";\r\n dadosProd.icm_id = null;\r\n dadosProd.pro_usabalanca = false;\r\n dadosProd.gru_id = null;\r\n dadosProd.sgp_id = null;\r\n dadosProd.mar_id = null;\r\n dadosProd.tpi_id = \"00\";\r\n dadosProd.listaPreco = [];\r\n dadosProd.tpi = { tpi_id: \"00\", tpi_descricao: \"Mercadorias para Revenda\" };\r\n dadosProd.csv_id = null;\r\n dadosProd.pis_id = null;\r\n if (!!dadosProdutoXml.nfs_valorissqn) {\r\n dadosProd.pro_servico = true;\r\n dadosProd.pro_produto = false;\r\n } else {\r\n dadosProd.pro_produto = true;\r\n }\r\n setEditando(true);\r\n setKeyProdutoCadastrado(record.key);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosProd } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function buscarProdutosNotaEntrada() {\r\n api.get(`Produto/ListaProdutoFiltroNfEntrada?filtro=&ordem=%2Bpro_descricao`).then(\r\n res => {\r\n let dados = [...res.data.items];\r\n let seq = 0;\r\n dados.forEach((item) => {\r\n item.seqAuxiliar = seq;\r\n seq++;\r\n });\r\n setListaProduto(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularQuantidade(valor, key) {\r\n let itens = [...produtos];\r\n itens.find((produto) => (produto.key === key));\r\n itens.nfi_qtde = valor;\r\n };\r\n\r\n function popularCustoInformado(valor, key) {\r\n let itens = [...produtos];\r\n itens.find((produto) => (produto.key === key));\r\n itens.nfi_custoinformado = (parseFloat(valor)).toFixed(2);\r\n };\r\n\r\n async function buscarDadosGradeModal() {\r\n // Dados necessarios para adicionar em banco podem ser adicionados ha função 'buscarGradeProduto'\r\n let itensSistema = [...listaProdutosSistema];\r\n let produtoGrade = manutencao.dados.dadosGrade.filter((produto) => (produto.nfi_qtde > 0));\r\n let salvarGrades = [];\r\n produtoGrade.forEach(prodGrade => {\r\n let itens = listaSelectPaginacao?.itens;\r\n let prod = (itens.filter((item) => item.prg_id == prodGrade.prg_id))[0];\r\n form.setFieldsValue({\r\n [`qtdItem${prod.key}`]: prodGrade.nfi_qtde, [`nfi_custoinformado${prod.key}`]: prodGrade.nfi_custoinformado,\r\n [`produtoCodigo${prod.key}`]: prodGrade.pro_id, [`codigograde${prod.key}`]: prodGrade.prg_id,\r\n });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, dadosGrade: null } } })\r\n //ajustar este campo para que leve os dados necessarios e salve a lista de grades no fornecedor produto\r\n let prodVincular = {};\r\n prodVincular.pro_id = prodGrade.pro_id;\r\n prodVincular.for_id = dadosRemetente[0].find(obj => obj.nome === 'for_id')?.valor;\r\n prodVincular.fpr_codigo = prodGrade.cProd;\r\n prodVincular.fpr_descricao = prodGrade.xProd;\r\n prodVincular.prg_id = prodGrade.prg_id;\r\n salvarGrades.push(prodVincular);\r\n //adiciona a lista de produtosgrade(listaProdutosSistema)\r\n let dados = {};\r\n dados.key = prodGrade.key;\r\n dados.nfi_custoinformado = prodGrade.nfi_custoinformado;\r\n dados.prg_id = prodGrade.prg_id;\r\n dados.nfi_qtde = prodGrade.nfi_qtde;\r\n dados.par_calculaprecovenda = parametrosEmpresa;\r\n dados.seqPai = prodGrade.seqPai;\r\n dados.pro_id = prodGrade.pro_id;\r\n dados.pro_codigo = prodGrade.pro_codigo;\r\n dados.descricaoGrade = prodGrade.descricaoGrade;\r\n dados.pro_descricao = prodGrade.pro_descricao;\r\n dados.ativarDisabled = true;\r\n if (parametrosEmpresa == true) {\r\n dados.pro_markup = prodGrade.pro_markup;\r\n dados.valorVenda = (prodGrade.nfi_custoinformado * prodGrade.pro_markup).toFixed(2)\r\n }\r\n else (\r\n dados.valorVenda = prodGrade.nfi_custoinformado\r\n );\r\n itensSistema.push(dados);\r\n }\r\n );\r\n setListaProdutosSistema(itensSistema);\r\n await api.post(`FornecedorProduto/IncluirLista`, salvarGrades);\r\n }\r\n\r\n async function buscarGradeProduto(keyGrade, cProd, keyLista) {\r\n if (!!listaSelectPaginacao?.itens) {\r\n let dados = [...listaSelectPaginacao?.itens];\r\n let item = null;\r\n let buscaItem = dados.filter((item) => item.key === keyGrade)[0];\r\n if(!!buscaItem){\r\n item = buscaItem;\r\n }\r\n let produtoXml = produtos.filter((pro) => pro.key === keyLista)[0];\r\n if (!!item?.pro_id && !!item?.prg_id) {\r\n let grade = await api.get(`ProdutoGrade/ListarGradesProdutos?codigoProduto=${item.pro_id}`);\r\n if (grade.data.length >= 2) {\r\n setPossuiGrade(true);\r\n grade.data.forEach(async (pro) => {\r\n let buscaGrade = dados.filter((item) => item.prg_id == pro.prg_id)[0];\r\n pro.nfi_custoinformado = form.getFieldValue()[`nfi_custoinformado${keyLista}`];\r\n pro.seqPai = produtoXml.key;\r\n pro.pro_descricao = item.pro_descricao;\r\n pro.pro_codigo = item.pro_codigo;\r\n pro.descricaoGrade = buscaGrade.descricaograde;\r\n pro.xQuantidade = buscaGrade.quantidade;\r\n pro.prg_id = pro.prg_id;\r\n pro.pro_id = item.pro_id;\r\n pro.key = keyLista;\r\n pro.cProd = cProd;\r\n pro.xProd = produtoXml.xProd;\r\n pro.key = buscaGrade.key;\r\n if (parametrosEmpresa == true) {\r\n let ParMarkup = await buscaMarkup(buscaGrade);\r\n pro.pro_markup = ParMarkup;\r\n }\r\n });\r\n setAbrirModalGrade(true);\r\n setDadosGrade(grade.data);\r\n } else {\r\n incluirProdutoItem(keyLista, item?.prg_id);\r\n }\r\n } else {\r\n incluirProdutoItem(keyLista, item?.prg_id);\r\n }\r\n }\r\n };\r\n\r\n function incluirProdutoItem(key, IdGrade) {\r\n let itens = [...listaProdutosSistema];\r\n let dados = {};\r\n let qtde = form.getFieldValue()[`nfi_qtde${key}`];\r\n let custo = form.getFieldValue()[`nfi_custoinformado${key}`];\r\n let cprod = form.getFieldValue()[`produtoCodigo${key}`];\r\n let grade = !!form.getFieldValue()[`codigograde${key}`] ? form.getFieldValue()[`codigograde${key}`] : IdGrade;\r\n let valorTotal = parseFloat(produtos.filter((prod) => prod.key === key)[0].xValorTotalProduto);\r\n let dadosProduto = [];\r\n if (!(qtde > 0 && custo > 0)) {\r\n notification.warning({ description: \"Favor informar o valor e a quantidade do item\", message: \"Aviso\" });\r\n return;\r\n }\r\n if (!!!listaSelectPaginacao.itens) {\r\n setAtualizarProduto(true);\r\n }\r\n if (parseFloat((qtde * custo).toFixed(2)) > valorTotal) {\r\n notification.warning({ message: 'Aviso', description: 'Valor informado maior que o valor total do item!' });\r\n form.setFieldsValue({ [`valorUnitario${key}`]: parseFloat(valorTotal / qtde) });\r\n form.resetFields([`produtoCodigoUN${key}`, `codigogradeUN${key}`]);\r\n return;\r\n }\r\n if (!!grade) {\r\n dadosProduto = listaSelectPaginacao?.itens.filter((prod) => (prod.prg_id === IdGrade))[0];\r\n }\r\n else {\r\n dadosProduto = listaSelectPaginacao?.itens.filter((prod) => (prod.key === cprod))[0];\r\n }\r\n validarValorTot(custo, qtde, key, async () => {\r\n if (!!!dadosProduto || !isObjetoDiffVazio(dadosProduto)) {\r\n return;\r\n }\r\n let dadosItem = itens.find(produtoSis => (produtoSis.pro_id === dadosProduto.pro_id && produtoSis.prg_id === grade && produtoSis.seqPai === key));\r\n if (!!dadosItem) {\r\n notification.warning({ description: 'Lista já possuí o produto informado!', message: 'Aviso' });\r\n } else {\r\n let ParMarkup = 1;\r\n if (ativarMarkup == true) {\r\n ParMarkup = await buscaMarkup(dadosProduto);\r\n dados.pro_markup = ParMarkup;\r\n if (!!parametrosEmpresa.par_calculaprecovenda != null && !!parametrosEmpresa.par_calculaprecovenda != false) {\r\n if (ParMarkup <= 1) {\r\n notification.warn({\r\n description: (\r\n
\r\n \r\n Valor de Venda é o mesmo do valor de Compra.\r\n
\r\n Ajustar valor Markup ou Valor de Venda!
\r\n
\r\n ), message: (
Aviso
)\r\n });\r\n }\r\n }\r\n }\r\n dados.valorVenda = (!!dadosProduto.valorVenda ? dadosProduto : (ParMarkup * custo)).toFixed(2);\r\n dados.key = !!itens && itens.length > 0 ? itens[itens.length - 1].key + 1 : 1;\r\n dados.nfi_custoinformado = custo;\r\n dados.prg_id = !!grade ? grade : null;\r\n dados.nfi_qtde = qtde;\r\n dados.par_calculaprecovenda = parametrosEmpresa.par_calculaprecovenda;\r\n dados.seqPai = key;\r\n dados.pro_id = dadosProduto.pro_id;\r\n dados.pro_codigo = dadosProduto.pro_codigo;\r\n dados.descricaoGrade = dadosProduto.descricaograde;\r\n dados.pro_descricao = dadosProduto.pro_descricao;\r\n dados.ump_descricao = dadosProduto.ump_id;\r\n dados.ump_casasdecimais = 2;\r\n dados.ativarDisabled = true;\r\n dados.qtdeAnterior = qtde;\r\n itens.push(dados);\r\n //vincula poroduto a nota fical na tabela fornecedorproduto\r\n vincularProdutoNota(dados);\r\n setListaProdutosSistema(itens);\r\n form.setFieldsValue({ [`produtoCodigo${key}`]: null, [`codigograde${key}`]: null });\r\n }\r\n });\r\n };\r\n\r\n async function vincularProdutoNota(produto) {\r\n let proKey = HasValue(keyProdutoCadastrado) ? keyProdutoCadastrado : produto.seqPai;\r\n let produtoXml = produtos.filter((pro) => pro.key === proKey)[0];\r\n let dados = { produto };\r\n dados.for_id = dadosRemetente[0].find(obj => obj.nome === 'for_id')?.valor;\r\n dados.pro_id = produto.pro_id;\r\n dados.fpr_codigo = produtoXml.cProd;\r\n dados.fpr_descricao = produtoXml.xProd;\r\n if (produto.prg_id != null || produto.prg_id != 0) {\r\n dados.prg_id = produto.prg_id;\r\n }\r\n await api.post(`FornecedorProduto/Incluir`, dados);\r\n };\r\n\r\n async function modalExcluir(record) {\r\n record.fpr_id = dadosRemetente[0].find(obj => obj.nome === 'for_id')?.valor;\r\n Modal.confirm({\r\n title: \"Excluir?\",\r\n content: `Deseja excluir o item ${record.pro_descricao} da nota?`,\r\n okText: `Excluir`,\r\n cancelText: `Não`,\r\n okType: \"danger\",\r\n centered: true,\r\n onOk() {\r\n excluirItem(record)\r\n }\r\n })\r\n };\r\n\r\n function excluirItem(record) {\r\n let itens = [...listaProdutosSistema];\r\n let dados = itens.filter(produto => produto.key !== record.key || produto.prg_id !== record.prg_id);\r\n setListaProdutosSistema(dados);\r\n setExibirModalSelecGrade(false);\r\n if(record.pro_descricao != null){\r\n excluirItemSistemaXml(record);\r\n }\r\n calculaSobraAoRemoverItem(record);\r\n };\r\n\r\n function excluirItemSistemaXml(record) {\r\n api.delete(`FornecedorProduto/Excluir/${record.fpr_id}`).then(\r\n res => {\r\n notification.success({ description: 'Item removido com sucesso!', message: \"Aviso\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function salvarUnidadeMedida(record, key) {\r\n let itens = [...produtos];\r\n let dados = itens.find(produto => (produto.key === key));\r\n dados.unidadeMedida = record.target.value;\r\n setProdutos(itens);\r\n };\r\n\r\n function calculaSobraAoRemoverItem(record) {\r\n let key = record.seqPai;\r\n let itens = [...listaProdutosSistema];\r\n let dados = itens.filter(produto => produto.seqPai == record.seqPai)\r\n\r\n let custoInformadoAtual = parseFloat(form.getFieldsValue()[`nfi_custoinformado${key}`]);\r\n let qtdeInformadoAtual = parseFloat(form.getFieldsValue()[`nfi_qtde${key}`]);\r\n if (isNaN(custoInformadoAtual)) custoInformadoAtual = 0;\r\n if (isNaN(qtdeInformadoAtual)) qtdeInformadoAtual = 0;\r\n\r\n let custo = custoInformadoAtual + parseFloat(record.nfi_custoinformado);\r\n let qtde = qtdeInformadoAtual + record.nfi_qtde;\r\n\r\n form.setFieldsValue({ [`nfi_custoinformado${key}`]: custo });\r\n form.setFieldsValue({ [`nfi_qtde${key}`]: qtde });\r\n let valorRetorno = 0;\r\n let itensXml = [...produtos];\r\n let dadosProduto = itensXml.find((item) => (item.key === key));\r\n valorRetorno = parseFloat((dadosProduto.xValorTotalProduto - parseFloat(custo * qtde)).toFixed(3));\r\n };\r\n\r\n function buscarSobra(key, listaProd = []) {\r\n let itensXml = [...produtos];\r\n let itensSistema = [];\r\n if (listaProd.length > 0) {\r\n itensSistema = [...listaProd];\r\n } else {\r\n itensSistema = [...listaProdutosSistema];\r\n }\r\n let valor = 0;\r\n let qtde = 0;\r\n let valorRetorno = 0;\r\n let qtdTotal = parseInt(form.getFieldValue()[`qtdItem${key}`]);\r\n let dadosItem = itensSistema.filter((item) => (item.seqPai === key));\r\n let dadosProduto = itensXml.find((item) => (item.key === key));\r\n if (isNaN(qtdTotal)) qtdTotal = 0;\r\n if (!!dadosProduto) {\r\n if (!!dadosItem) {\r\n dadosItem.forEach((item) => {\r\n valor += parseFloat((parseFloat(item.nfi_custoinformado) * parseFloat(item.nfi_qtde)).toFixed(3));\r\n qtde += parseFloat(item.nfi_qtde);\r\n });\r\n } else {\r\n valor = parseFloat(form.getFieldValue()[`nfi_custoinformado${key}`]);\r\n }\r\n valorRetorno = parseFloat((dadosProduto.xValorTotalProduto - parseFloat(valor.toFixed(2))).toFixed(3));\r\n let valorRestante = valorRetorno;\r\n let qdteRestante = parseFloat((qtdTotal - parseFloat(qtde.toFixed(2))).toFixed(3));\r\n if (qdteRestante > 0) {\r\n valorRestante = parseFloat(valorRetorno / qdteRestante).toFixed(2);\r\n setSelectedRowKeys(selectedRowKeys);\r\n }\r\n form.setFieldsValue({ [`nfi_custoinformado${key}`]: valorRestante });\r\n form.setFieldsValue({ [`nfi_qtde${key}`]: qdteRestante });\r\n }\r\n return valorRetorno;\r\n };\r\n\r\n function validarValorTot(custo, qtd, key, callback) {\r\n let itens = [...listaProdutosSistema];\r\n let itemXml = produtos.filter((prod) => prod.key === key)[0];\r\n let valorItens = 0;\r\n let qtdItens = 0;\r\n let qtdTotal = parseInt(form.getFieldValue()[`qtdItem${key}`]);\r\n itens.forEach(item => {\r\n if (item.seqPai === key) {\r\n valorItens += parseFloat(item.nfi_custoinformado) * parseInt(item.nfi_qtde);\r\n qtdItens += parseInt(item.nfi_qtde);\r\n }\r\n });\r\n valorItens += (parseFloat(qtd) * parseFloat(custo));\r\n if (!!itemXml) {\r\n if (parseFloat(parseFloat(qtd) * parseFloat(custo)).toFixed(2) > parseFloat(itemXml.xValorTotalProduto)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor informado maior que o valor total do item!' });\r\n form.setFieldsValue({ [`nfi_custoinformado${key}`]: parseFloat(itemXml.xValorTotalProduto) / parseFloat(qtd) })\r\n } else if (parseFloat(valorItens).toFixed(2) > parseFloat(itemXml.xValorTotalProduto)) {\r\n notification.warning({ message: 'Aviso', description: 'A soma dos valores ultrapassa o valor total do item!' });\r\n } else if (parseInt(qtd) + qtdItens > qtdTotal) {\r\n notification.warning({ message: 'Aviso', description: 'Quantidade informada maior que quantidade total do item!' });\r\n } else {\r\n if (!!callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n };\r\n\r\n async function buscaMarkup(produto) {\r\n let filtro = (produto.pro_id ? `&IdProduto=${produto.pro_id}` : '');\r\n filtro += (!!produto.prg_id ? `&grade=${produto.prg_id}` : '');\r\n let Valor = (await api.get(`Produto/MarkupProduto?${filtro}`)).data;\r\n return Valor.pro_markup;\r\n }\r\n\r\n async function aoFecharDrawerProduto(produto) {\r\n if (!!produto && !!produto.pro_id) {\r\n let itens = [...listaProdutosSistema];\r\n setAtualizarProduto(true);\r\n let dados = {};\r\n dados.key = 1;\r\n dados.nfi_custoinformado = form.getFieldValue()[`valorUnitario${keyProdutoCadastrado}`];\r\n dados.prg_id = null;\r\n dados.nfi_qtde = form.getFieldValue()[`qtdItem${keyProdutoCadastrado}`];\r\n dados.valorVenda = produto.valorVenda;\r\n dados.par_calculaprecovenda = parametrosEmpresa.par_calculaprecovenda;\r\n dados.seqPai = keyProdutoCadastrado;\r\n dados.pro_codigo = produto.pro_codigo;\r\n dados.pro_id = produto.pro_id;\r\n dados.pro_markup = produto.pro_markup;\r\n dados.pro_descricao = produto.pro_descricao;\r\n dados.ump_descricao = produto.ump_id;\r\n dados.ump_casasdecimais = 2;\r\n dados.ativarDisabled = true;\r\n let grades = await api.get(`ProdutoGrade/RetornaGradesProduto?produtoId=${produto.pro_id}`); \r\n if (!!produto.produtogrades && produto.produtogrades.length > 0 && grades.data.length >= 1) {\r\n dados.grades = [...grades.data];\r\n let seq = 0;\r\n dados.grades.forEach((grade) => { grade.key = seq++; grade.qtdeItem = 1 });\r\n setDadosModalGrade(dados);\r\n setExibirModalSelecGrade(true);\r\n } else {\r\n let itemExiste = itens.filter((obj) => (obj.pro_id === produto.pro_id));\r\n if (itemExiste.length == 0)\r\n itens.push(dados);\r\n vincularProdutoNota(produto);\r\n setAguardandoPopular(true);\r\n setFiltroProd(produto.pro_codigo);\r\n setListaProdutosSistema(itens);\r\n }\r\n }\r\n };\r\n\r\n function validarValorItem(key) {\r\n let dados = [...produtos];\r\n let produto = dados.find((obj) => (obj.key === key));\r\n let valor = parseFloat(form.getFieldValue()[`valorUnitario${key}`]);\r\n let qtd = parseFloat(form.getFieldValue()[`qtdItem${key}`]);\r\n let valorTotal = parseFloat((valor * qtd).toFixed(2));\r\n if (produto.xValorTotalProduto < valorTotal) {\r\n notification.warn({ description: 'Valor informado é maior que o total!', message: 'Aviso' });\r\n form.setFieldsValue({ [`valorUnitario${key}`]: parseFloat((produto.xValorTotalProduto / qtd).toFixed(3)) });\r\n }\r\n };\r\n\r\n function modalEditar(record) {\r\n let prod = [...produtos];\r\n let itens = [...listaProdutosSistema];\r\n let produtoSelecionado = itens.find((p) => { return p.seqPai === record.seqPai && p.pro_id === record.pro_id && p.prg_id === record.prg_id });\r\n let itensProduto = itens.filter((prod) => { return prod.seqPai === record.seqPai })\r\n let valorItemSelecionado = form.getFieldValue()[`valorUnitario${record.seqPai}`];\r\n let qtdTotal = parseInt(form.getFieldValue()[`qtdItem${record.seqPai}`]);\r\n let qtdItens = 0;\r\n itensProduto.forEach((it) => {\r\n qtdItens += parseInt(it.nfi_qtde);\r\n });\r\n if (!produtoSelecionado.ativarDisabled) {\r\n if (!(record.nfi_qtde > 0)) {\r\n notification.warning({ description: \"Favor informar a quantidade do item!\", message: \"Aviso\" });\r\n return;\r\n } else\r\n if (qtdItens > qtdTotal) {\r\n notification.warning({ message: 'Aviso', description: 'Quantidade informada maior que quantidade total do item!' });\r\n return;\r\n } else {\r\n produtoSelecionado.ativarDisabled = true;\r\n produtoSelecionado.nfi_custoinformado = valorItemSelecionado; //parseFloat(valorItemSelecionado) / parseFloat(produtoSelecionado.nfi_qtde);\r\n produtoSelecionado.qtdeAnterior = produtoSelecionado.nfi_qtde;\r\n setProdutos(prod);\r\n }\r\n } else {\r\n produtoSelecionado.ativarDisabled = false;\r\n setProdutos(prod);\r\n }\r\n buscarSobra(record.seqPai);\r\n };\r\n\r\n function alterarQtde(e, record) {\r\n let itens = [...listaProdutosSistema];\r\n let dados = itens.find(p => (p.seqPai === record.seqPai && p.pro_id === record.pro_id && p.prg_id === record.prg_id));\r\n dados.nfi_qtde = e.target.value;\r\n setListaProdutosSistema(itens);\r\n }\r\n\r\n function alterarMarkup(e, record) {\r\n let itens = [...listaProdutosSistema];\r\n let dados = itens.find(p => (p.seqPai === record.seqPai && p.pro_id === record.pro_id && p.prg_id === record.prg_id));\r\n dados.pro_markup = (e.target.value).replace(\",\", \".\")\r\n dados.valorVenda = parseFloat((dados.nfi_custoinformado * (dados.pro_markup).replace(\",\", \".\"))).toFixed(2);\r\n setListaProdutosSistema(itens);\r\n }\r\n\r\n function valorVendas(e, record) {\r\n let itens = [...listaProdutosSistema];\r\n let dados = itens.find(p => (p.seqPai === record.seqPai && p.pro_id === record.pro_id && p.prg_id === record.prg_id));\r\n dados.valorVenda = parseFloat((e.target.value)).toFixed(2);\r\n dados.pro_markup = parseFloat((parseFloat(e.target.value) / dados.nfi_custoinformado)).toFixed(2);\r\n setListaProdutosSistema(itens);\r\n }\r\n\r\n async function onCloseModalGrade(record) {\r\n let itens = [...listaProdutosSistema];\r\n let produto = dadosModalGrade;\r\n let item = {};\r\n for (let i = 0; i < record.length; i++) {\r\n item = record[i];\r\n let dados = {};\r\n dados.key = i;\r\n dados.nfi_custoinformado = item.pre_custoultimacompra;\r\n dados.prg_id = item.prg_id;\r\n dados.nfi_qtde = record.qtdeItem;\r\n dados.valorVenda = record.valorVenda;\r\n dados.par_calculaprecovenda = parametrosEmpresa.par_calculaprecovenda;\r\n dados.seqPai = keyProdutoCadastrado;\r\n dados.pro_codigo = produto.pro_codigo;\r\n dados.pro_id = produto.pro_id;\r\n dados.pro_markup = produto.pro_markup;\r\n dados.pro_descricao = produto.pro_descricao;\r\n dados.ump_descricao = produto.ump_descricao;\r\n dados.ump_casasdecimais = 2;\r\n dados.descricaoGrade = item.descricaoGrade;\r\n itens.push(dados);\r\n await vincularProdutoNota({ pro_id: produto.pro_id, pro_descricao: produto.pro_descricao, prg_id: item.prg_id });\r\n };\r\n setListaProdutosSistema(itens);\r\n setExibirModalSelecGrade(false);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Itens Itens da Nota\r\n \r\n \r\n \r\n \r\n \r\n
{\r\n return {\r\n onMouseLeave: event => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n },\r\n onMouseEnter: event => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n },\r\n };\r\n }} columns={[\r\n {\r\n title: 'Itens NF-e',\r\n render: ({ cProd, xProd, xEan, key, xQuantidade, xUnidadeMedida, xValorUnitarioProduto, listaGrade, ativarDisabled }) => (\r\n
\r\n \r\n
\r\n \r\n {cProd}\r\n \r\n \r\n \r\n {xProd}\r\n \r\n \r\n {xEan}\r\n \r\n \r\n \r\n \r\n Quant. para controle de estoque:\r\n \r\n \r\n \r\n { adicionarControleQtd(record, key) }} />\r\n \r\n \r\n \r\n \r\n { salvarUnidadeMedida(record, key); }} />\r\n \r\n \r\n \r\n { validarValorItem(key) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { popularQuantidade(dado, key) }} />\r\n \r\n \r\n \r\n { popularCustoInformado(dado, key) }} />\r\n \r\n \r\n \r\n { buscarGradeProduto(record, cProd, key); }} ordem={'pro_id'} detalhes={true} //registrosPorPagina={10} \r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n !!listaProdutosSistema && listaProdutosSistema.filter((record) => { return record.seqPai === key }).length > 0 &&\r\n
(\r\n \r\n {pro_codigo}\r\n \r\n )\r\n },\r\n {\r\n title: 'Produto',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Grade',\r\n render: ({ descricaoGrade }) => (\r\n
\r\n {descricaoGrade}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Custo Inf.(R$)',\r\n align: 'right',\r\n width: 50,\r\n render: ({ nfi_custoinformado }) => (\r\n
\r\n {FormatNumber(nfi_custoinformado, true, false, 2)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Quant.',\r\n align: 'center',\r\n width: 50,\r\n render: ({ nfi_qtde, ativarDisabled }, record) => (\r\n alterarQtde(e, record)} disabled={ativarDisabled} placeholder=\"\" />\r\n )\r\n },\r\n ativarMarkup ? {\r\n title: 'Markup',\r\n align: 'right',\r\n width: 60,\r\n render: ({ pro_markup, ativarDisabled }, record) => (\r\n alterarMarkup(e, record)}\r\n disabled={ativarDisabled}\r\n placeholder=\"\" />\r\n )\r\n } : {},\r\n ativarMarkup ? {\r\n title: 'Vlr. Venda(R$)',\r\n align: 'center',\r\n width: 80,\r\n render: ({ valorVenda, ativarDisabled }, record) => (\r\n valorVendas(v, record)}\r\n disabled={ativarDisabled}\r\n placeholder=\"\" />\r\n )\r\n } : {},\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 80,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0 - Contratação do Frete por conta do Remetente (CIF)\r\n 1 - Contratação do Frete por conta do Destinatário (FOB)\r\n 2 - Contratação do Frete por conta de Terceiros\r\n 3 - Transporte Próprio por conta do Remetente\r\n 4 - Transporte Próprio por conta do Destinatário\r\n 9 - Sem Frete\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Dados Dados Transportador\r\n \r\n \r\n \r\n \r\n \r\n \r\n Nome: {!!dadosTransporte ? dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'pes_nome')?.valor : ''}\r\n \r\n \r\n CPF/CNPJ: {!!dadosTransporte ? !!dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'cnpjcpf') && \r\n dadosTransporte?.[0]?.find(obj => obj.nome === 'cnpjcpf')?.valor.length > 11 ? \r\n formatarCnpj(dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'cnpjcpf')?.valor) : \r\n formatarCpf(dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'cnpjcpf')?.valor) : \"\"}\r\n \r\n \r\n Inscrição Estadual: {!!dadosTransporte ? dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'pej_inscricaoestadual')?.valor : ''}\r\n \r\n \r\n Endereço: {!!dadosTransporte ? dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'log_logradouro')?.valor : \"\"}\r\n \r\n \r\n Município: {!!dadosTransporte ? dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'cid_descricao')?.valor : \"\"}\r\n \r\n \r\n UF: {!!dadosTransporte ? dadosTransporte.dadosTransporte?.[0]?.find(obj => obj.nome === 'est_sigla')?.valor : \"\"}\r\n \r\n \r\n \r\n \r\n {/*\r\n \r\n \r\n \"Retenção Retenção ICMS\r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor do Serviço: valorServico\r\n \r\n \r\n Base Cálculo Retenção: valorBCRetencao\r\n \r\n \r\n Alíquota: picmsRetido\r\n \r\n \r\n ICMS Retido: valorIcmsRetido\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Veículo\" Veículo\r\n \r\n \r\n \r\n \r\n \r\n \r\n Placa Veículo: placaVeiculo\r\n \r\n \r\n UF Veículo: ufVeiculo\r\n \r\n \r\n Placa Reboque: placaReboque\r\n \r\n \r\n UF Reboque: ufReboque\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Volumes\" Volumes\r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n
\r\n Numeração: {nVol}\r\n \r\n \r\n Quantidade: {qVol}\r\n \r\n \r\n Espécie: {esp}\r\n \r\n \r\n Marca: {marca}\r\n \r\n \r\n \r\n \r\n Peso Líquido: {pesoL}\r\n \r\n \r\n Peso Bruto: {qVpesoBol}\r\n \r\n \r\n Visualizar Lacres: {nLacre} \r\n \r\n \r\n \r\n Número Fatura: {objFaturamento[0]?.numeroFatura}\r\n \r\n \r\n Valor Original (R$): {FormatNumber(objFaturamento[0]?.nfp_valor, true)}\r\n \r\n \r\n Desconto (R$): {FormatNumber(objFaturamento[0]?.vDesconto, true)}\r\n \r\n \r\n Valor Líquido (R$): {FormatNumber(objFaturamento[0]?.nfp_valor, true)}\r\n \r\n \r\n Forma de pagamento: {objFaturamento[0]?.tipoavistaaprazo}\r\n \r\n \r\n Tipo de pagamento: {objFaturamento[0]?.tipopagamento}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
adicionarFormaDePagamento()}>\r\n \r\n
\r\n \r\n { buscarCondicaoPagamento(record) }}\r\n conteudo={\r\n formas => ({formas.fpg_descricao})\r\n } />\r\n \r\n \r\n \r\n
\r\n {!semCondicaoPagamento &&\r\n \r\n \r\n \r\n\r\n }\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {parcelasGeradas.length > 0 &&\r\n
\r\n \r\n Parcelas Geradas\r\n \r\n \r\n
(\r\n \r\n {prc_numeroparcela} - {parcelasGeradas.length}\r\n \r\n )\r\n },\r\n {\r\n title: 'Vencimento',\r\n align: 'center',\r\n width: 110,\r\n render: ({ prc_datavencimento, prc_numeroparcela }, record, idx) => (\r\n
\r\n {editandoParcela ? ajustarDatasParcelas(record, idx)} /> : {moment(prc_datavencimento).format('DD/MM/YYYY')}}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor Parcela(R$)',\r\n align: 'right',\r\n render: ({ prc_valor, prc_numeroparcela }) => (\r\n
\r\n {editandoParcela ? onChangevalorParcela(prc_numeroparcela)} disabled={prc_numeroparcela === parcelasGeradas.length} /> : {FormatNumber(prc_valor, true)}}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: () => (\r\n \r\n \r\n {!editandoParcela ? \r\n
\r\n
(\r\n
\r\n {fpg_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Condição de Pagamento',\r\n render: ({ cpg_descricao }) => (\r\n
\r\n {cpg_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ nfp_valor }) => (\r\n
\r\n {FormatNumber(nfp_valor, true)}\r\n
\r\n ),\r\n },\r\n\r\n {\r\n title: 'Operações',\r\n align: 'right',\r\n render: ({ }, record, idx) => (\r\n
\r\n
\r\n )\r\n }\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n { onCloseModalContaCorrente() }} fecharModalContaCorrente={() => { setAbreModalContaCorrente(false); }} listaContaCorrente={{ listaContaCorrente, setListaContaCorrente }} contaCorrente={{ contaCorrente, setContaCorrente }} />\r\n { setOpenModalEditarNotaFiscalEntrada(false) }} />\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Form, Modal, notification, Row, Tabs } from \"antd\";\r\nimport { TabNotaFiscal, TabItens, TabTransporte, TabFaturamento } from \"./tabPage\";\r\nimport moment from \"moment\";\r\nimport { getNomeUsuario, getIdUsuario, getEmpresa, getLocal } from '../../services/auth';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { CloseOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { isNotNullOrEmpty, isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function ImportacaoNotaFiscalEntrada({ form, exibir, fechar }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [dadosNota, setDadosNota] = useState([]);\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [dadosFaturamento, setDadosFaturamento] = useState([]);\r\n const [faturamentoDados, setFaturamentoDados] = useState([]);\r\n const [dadosRemetente, setDadosRemetente] = useState([])\r\n const [dadosTransporte, setDadosTransporte] = useState([]);\r\n const [correlacaoCFOP, setCorrelacaoCFOP] = useState([]);\r\n const [indicadorPagamento, setIndicadorPagamento] = useState([]);\r\n const [desabilitaBotao, setDesabilitaBotao] = useState(true);\r\n const [keys, setKeys] = useState([0]);\r\n const [carregando, setCarregando] = useState(false);\r\n const [listapreco, setListaPreco] = useState([]);\r\n const [parametrosEmpresa, setParametrosEmpresa] = useState({});\r\n\r\n const salvarNota = (valores) => {\r\n validarDados(() => {\r\n setCarregando(true);\r\n let dados = {};\r\n let find = dadosNota.find(objeto => objeto.nome === 'xmlBase64');\r\n let findXml = dadosNota.find(objeto => objeto.nome === 'xml');\r\n dados.xml = find && find.valor ? find.valor : btoa(findXml.valor);\r\n dados.ntf_numero = dadosNota.find(objeto => objeto.nome === 'ntf_numero')?.valor;\r\n dados.ntf_dataemissao = moment(dadosNota.find(objeto => objeto.nome === 'ntf_dataemissao')?.valor);\r\n dados.ntf_chavenfe = dadosNota.find(objeto => objeto.nome === 'ntf_chavenfe')?.valor;\r\n dados.ntf_modalidadefrete = dadosNota.find(objeto => objeto.nome === 'ntf_modalidadefrete')?.valor;\r\n dados.ntf_finalidade = dadosNota.find(objeto => objeto.nome === 'ntf_finalidade')?.valor;\r\n dados.ser_numero = dadosNota.find(objeto => objeto.nome === 'ser_numero')?.valor;\r\n dados.mdf_id = dadosNota.find(objeto => objeto.nome === 'mdf_id')?.valor;\r\n dados.vDesconto = parseFloat(dadosNota.find(objeto => objeto.nome === 'vDesconto')?.valor);\r\n dados.vOutrasDespesas = parseFloat(dadosNota.find(objeto => objeto.nome === 'vOutrasDespesas')?.valor);\r\n dados.vValorFrete = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorFrete')?.valor);\r\n dados.vValorSeguro = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorSeguro')?.valor);\r\n dados.vValorTotalNfe = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorTotalNfe')?.valor);\r\n dados.vValorTotalProdutos = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorTotalProdutos')?.valor);\r\n dados.vBaseCalculoIcms = parseFloat(dadosNota.find(objeto => objeto.nome === 'vBaseCalculoIcms')?.valor);\r\n dados.vValorIcms = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorIcms')?.valor);\r\n dados.vValorIpi = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorIpi')?.valor);\r\n dados.vBaseCalculoIcmsSt = parseFloat(dadosNota.find(objeto => objeto.nome === 'vBaseCalculoIcmsSt')?.valor);\r\n dados.vValorIcmsSt = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorIcmsSt')?.valor);\r\n dados.vValorCofins = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorCofins')?.valor);\r\n dados.vValorPis = parseFloat(dadosNota.find(objeto => objeto.nome === 'vValorPis')?.valor);\r\n dados.ope_id = valores.ope_id;\r\n dados.ntf_datainclusao = moment(new Date());\r\n dados.valorFreteForaNota = parseFloat(valores.freteForaNota);\r\n dados.valorICMSSTForaNota = parseFloat(valores.icmsstForaNota);\r\n dados.valorOutrasDespesasForaNota = parseFloat(valores.outrasDespesasForaNota);\r\n dados.dadosRemetente = popularDadosRemetente();\r\n dados.dadosFaturamento = popularDadosFaturamento();\r\n dados.dadosTransportador = popularDadosTransportador();\r\n dados.dadosItens = dadosItens;\r\n dados.mar_id = form.getFieldsValue().mar_id ?? null;\r\n if (parametrosEmpresa.par_calculaprecovenda == true) {\r\n listaPreco(dadosItens);\r\n }\r\n incluirDadosNota(dados);\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n api.get('/ParametroEmpresa/BuscarParametros').then(res => {\r\n setParametrosEmpresa(res.data);\r\n }).catch((erro) => console.error(erro));\r\n buscarCorrelacaoCFOP();\r\n buscarIndicadorPagamento();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (exibir && !!manutencao.dados) {\r\n if (!!manutencao.dados.notaEntrada) {\r\n setDadosNota(manutencao.dados.notaEntrada);\r\n }\r\n if (!!manutencao.dados.dadosItens) {\r\n let i = 0;\r\n let itens = [];\r\n while (i < manutencao.dados.dadosItens.length) {\r\n // manutencao.dados.dadosItens.i = i;\r\n itens.push(manutencao.dados.dadosItens[i]);\r\n i++;\r\n }\r\n const itensOrd = itens.map(subvetor => { const objeto = {}; subvetor.forEach(item => { objeto[item.nome] = item.valor; }); return objeto; });\r\n setDadosItens(itensOrd);\r\n }\r\n if (!!manutencao.dados.dadosFaturamento) {\r\n let i = 0;\r\n let itens = [];\r\n while (i < manutencao.dados.dadosFaturamento.length) {\r\n itens.push(manutencao.dados.dadosFaturamento);\r\n i++;\r\n }\r\n itens.forEach((item) => {\r\n item.formaPagamento = [];\r\n item.condicaoPagamento = [];\r\n if (item.nfp_valor == null) item.nfp_valor = 0;\r\n });\r\n let keys = [];\r\n for (const [i, fat] of itens.entries()) {\r\n fat.key = i;\r\n fat.id = i;\r\n keys.push(i);\r\n }\r\n setKeys(keys);\r\n setDadosFaturamento(itens);\r\n }\r\n if (!!manutencao.dados.dadosRemetente) {\r\n setDadosRemetente(manutencao.dados.dadosRemetente);\r\n }\r\n if (!!manutencao.dados.dadosTransportador) {\r\n setDadosTransporte(manutencao.dados.dadosTransportador);\r\n }\r\n }\r\n }, [exibir]);\r\n\r\n function incluirDadosNota(dados) {\r\n api.post(`NotaFiscalEntrada/IncluirNotaEntrada`, dados).then(\r\n res => {\r\n notification.success({ description: 'Nota importada com sucesso!', message: 'Aviso' });\r\n setTimeout(() => { window.location = \"/Home#/monitoramentoNfe\"; }, 1000);\r\n }\r\n ).catch(\r\n erro => {\r\n setCarregando(false);\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.error({ content: erro.response.data, title: 'Aviso' });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n );\r\n };\r\n\r\n async function listaPreco(dadosItens) {\r\n let ListaPrecoItem = [...listapreco];\r\n for (var item of dadosItens) {\r\n let idProduto = item.dadosItensSistema[0].pro_id;\r\n let idProdutoGrade = item.dadosItensSistema[0].prg_id;\r\n let precoLista = {};\r\n precoLista.pro_id = idProduto;\r\n precoLista.prg_id = idProdutoGrade;\r\n precoLista.lpi_valorvenda = parseFloat(item.dadosItensSistema[0].valorVenda);\r\n ListaPrecoItem.push(precoLista);\r\n }\r\n editarValorVenda(ListaPrecoItem);\r\n }\r\n\r\n function editarValorVenda(ListaPrecoItem) {\r\n api.put(`ListaPrecoItem/EditarAsync`, ListaPrecoItem).then(\r\n res => {\r\n notification.success({ description: 'Valor Venda Ajustado com sucesso!', message: 'Aviso' });\r\n setTimeout(() => { window.location = \"/Home#/monitoramentoNfe\"; }, 1000);\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.error({ content: erro.response.data.Message, title: 'Aviso' });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n }\r\n );\r\n };\r\n\r\n function validarDados(callback) {\r\n if (faturamentoDados.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher a forma de pagamento!' });\r\n } else {\r\n let valorTotal = 0;\r\n faturamentoDados.forEach(item => {\r\n valorTotal += parseFloat(item.nfp_valor);\r\n })\r\n if (valorTotal != dadosFaturamento[0][0]?.find(obj => obj.nome === 'nfp_valor')?.valor) {\r\n notification.warning({ message: 'Aviso', description: 'Valor informado diferente do total da nota!' });\r\n return false;\r\n }\r\n validarItens(null,\r\n () => {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n function popularDadosRemetente() {\r\n let dadosRem = {};\r\n dadosRem.for_id = dadosRemetente[0].find(obj => obj.nome === 'for_id')?.valor;\r\n dadosRem.cnpjCpf = dadosRemetente[0].find(obj => obj.nome === 'cnpjcpf')?.valor;\r\n dadosRem.for_regimetributariofiscal = dadosRemetente[0].find(obj => obj.nome === 'for_regimetributariofiscal')?.valor;\r\n dadosRem.pej_inscricaoestadual = dadosRemetente[0].find(obj => obj.nome === 'pej_inscricaoestadual')?.valor;\r\n dadosRem.pes_nome = dadosRemetente[0].find(obj => obj.nome === 'pse_nome')?.valor;\r\n dadosRem.psc_numero = !!dadosRemetente[0].find(obj => obj.nome === 'psc_numero') ? dadosRemetente.find(obj => obj.nome === 'psc_numero')?.valor : null;\r\n dadosRem.pej_nomefantasia = dadosRemetente[0].find(obj => obj.nome === 'pej_nomefantasia')?.valor;\r\n dadosRem.cep_cep = dadosRemetente[0].find(obj => obj.nome === 'cep_cep')?.valor;\r\n dadosRem.log_logradouro = dadosRemetente[0].find(obj => obj.nome === 'log_logradouro')?.valor;\r\n dadosRem.bai_bairro = dadosRemetente[0].find(obj => obj.nome === 'bai_bairro')?.valor;\r\n dadosRem.pee_numero = dadosRemetente[0].find(obj => obj.nome === 'pee_numero')?.valor;\r\n dadosRem.pee_complemento = dadosRemetente[0].find(obj => obj.nome === 'pee_complemento')?.valor;\r\n dadosRem.cid_descricao = dadosRemetente[0].find(obj => obj.nome === 'cid_descricao')?.valor;\r\n dadosRem.est_sigla = dadosRemetente[0].find(obj => obj.nome === 'est_sigla')?.valor;\r\n dadosRem.pes_nome = dadosRemetente[0].find(obj => obj.nome === 'pes_nome')?.valor;\r\n return dadosRem;\r\n };\r\n\r\n function popularDadosFaturamento() {\r\n let dadosFat = [];\r\n faturamentoDados.forEach((faturamento) => {\r\n let dados = {};\r\n dados.numeroFatura = faturamento.numeroFatura;\r\n dados.fpg_id = faturamento.fpg_id;\r\n dados.cpg_id = faturamento.cpg_id;\r\n dados.ctc_id = faturamento.ctc_id;\r\n dados.nfp_valor = parseFloat(faturamento.nfp_valor);\r\n if (dados.nfp_valor == null) {\r\n dados.nfp_valor = 0;\r\n }\r\n dados.parcelas = popularParcelas(faturamento);\r\n dados.antecipacoes = popularAntecipacoes(faturamento);\r\n dadosFat.push(dados);\r\n });\r\n return dadosFat;\r\n };\r\n\r\n function popularParcelas(faturamento) {\r\n let dadosParcelas = [];\r\n if (!!faturamento.parcelas && faturamento.parcelas.length > 0) {\r\n faturamento.parcelas.forEach((parcela) => {\r\n let dados = {};\r\n dados.prc_numeroparcela = parcela.prc_numeroparcela;\r\n dados.prc_datavencimento = moment(parcela.prc_datavencimento);\r\n dados.prc_numeroduplicata = parcela.prc_numeroDuplicata;\r\n dados.prc_valor = parseFloat(parcela.prc_valor);\r\n dadosParcelas.push(dados);\r\n })\r\n }\r\n return dadosParcelas;\r\n };\r\n\r\n function popularAntecipacoes(faturamento) {\r\n let dadosAntecipacoes = [];\r\n /*let dados = {};\r\n dados.acf_id = 0;\r\n dados.valorUtilizado = parseFloat(0);*/\r\n return dadosAntecipacoes;\r\n };\r\n\r\n function popularDadosTransportador() {\r\n let dados = {};\r\n if (isObjetoDiffVazio(dadosTransporte)) {\r\n dados.cnpjCpf = dadosTransporte?.[0]?.find(obj => obj.nome === 'cnpjcpf')?.valor;\r\n dados.pes_nome = dadosTransporte?.[0]?.find(obj => obj.nome === 'pes_nome')?.valor;\r\n dados.est_sigla = dadosTransporte?.[0]?.find(obj => obj.nome === 'est_sigla')?.valor;\r\n dados.pej_inscricaoestadual = dadosTransporte?.[0]?.find(obj => obj.nome === 'pej_inscricaoestadual')?.valor;\r\n dados.log_logradouro = dadosTransporte?.[0]?.find(obj => obj.nome === 'log_logradouro')?.valor;\r\n dados.cid_descricao = dadosTransporte?.[0]?.find(obj => obj.nome === 'cid_descricao')?.valor;\r\n }\r\n return dados;\r\n };\r\n\r\n function buscarCorrelacaoCFOP() {\r\n api.get(`CorrelacaoCFOP/CorrelacaoCFOP?cfop=5101&tipoCorrelacao=1&tipoNota=1`).then(\r\n res => {\r\n setCorrelacaoCFOP(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function buscarIndicadorPagamento() {\r\n api.get(`Enum/Listar?nome=IndicadorPagamento`).then(\r\n res => {\r\n setIndicadorPagamento(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarItens(tab, callback) {\r\n\r\n let valido = true;\r\n dadosItens.forEach((item, indice, lista) => {\r\n if (!!item.dadosItensSistema && item.dadosItensSistema.length > 0 && valido) {\r\n let valor = 0;\r\n if (typeof item.dadosItensSistema !== 'object') {\r\n item.dadosItensSistema = JSON.parse(item.dadosItensSistema);\r\n }\r\n if (typeof item.lote !== 'object') {\r\n item.lote = JSON.parse(item.lote);\r\n }\r\n item.dadosItensSistema.forEach((itemSis, idx, array) => {\r\n if (parseFloat(itemSis.nfi_qtde) === 0) {\r\n valido = false;\r\n notification.warning({ message: 'Aviso', description: \"Item nº: \" + item.nItem + \" - \" + item.cProd + \" - \" + item.xProd + \" não informado Quantidade!\" });\r\n }\r\n valor += parseFloat(itemSis.nfi_custoinformado) * parseFloat(itemSis.nfi_qtde);\r\n if (idx === array.length - 1) {\r\n // faz o teste do null pq tem algumas notas que vem com o valor 0.\r\n if (item.xValorUnitarioProduto === null) {\r\n item.xValorUnitarioProduto = parseFloat(0);\r\n item.xValorTotalProduto = parseFloat(0);\r\n }\r\n }\r\n });\r\n } else if (item.dadosItensSistema.length === 0 || !isNotNullOrEmpty(item.dadosItensSistema.length)) {\r\n valido = false;\r\n notification.warning({ message: 'Aviso', description: \"Item nº: \" + item.nItem + \" - \" + item.cProd + \" - \" + item.xProd + \" não informado!\" });\r\n }\r\n if (indice === lista.length - 1) {\r\n if (valido && !!callback) {\r\n callback(tab);\r\n }\r\n }\r\n });\r\n };\r\n\r\n function validarAba(tab) {\r\n if (parseInt(abaSelecionada) === 1) {\r\n if (!!form.getFieldValue().ope_id) {\r\n setAbaSelecionada(tab);\r\n } else {\r\n notification.warning({ description: 'Favor informar uma operação fiscal', message: 'Aviso' });\r\n }\r\n } else if (parseInt(abaSelecionada) === 2) {\r\n validarItens(tab, () => {\r\n setAbaSelecionada(tab);\r\n });\r\n } else {\r\n setAbaSelecionada(tab);\r\n }\r\n if (parseInt(tab) !== 4) {\r\n setDesabilitaBotao(true);\r\n } else {\r\n setDesabilitaBotao(false);\r\n }\r\n\r\n };\r\n\r\n function cancelarOperacao() {\r\n setAbaSelecionada(\"1\");\r\n setDadosNota([]);\r\n setDadosItens([]);\r\n setDadosFaturamento([]);\r\n setDadosRemetente([]);\r\n setDadosTransporte([]);\r\n setDesabilitaBotao(true);\r\n fechar();\r\n };\r\n\r\n return (\r\n
\r\n {exibir &&
\r\n validarAba(tab)} className=\"p-b-75\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n }\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Upload, Button, notification, Form } from \"antd\";\r\nimport { CloudUploadOutlined } from \"@ant-design/icons\";\r\n\r\nimport { BreadcrumbPage } from \"../../components\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\nimport api from \"../../services/api\";\r\nimport { buscarDadosTabela, criarBanco, excluirBancoDados, incluirBanco } from \"../../services/webSql\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport ImportacaoNotaFiscalEntrada from \"../importacaoNotaFiscalEntrada\";\r\n\r\nexport default function ImportarNotaFiscalEntrada() {\r\n const [arquivoBase64, setArquivoBase64] = useState(\"\");\r\n const [arquivo, setArquivo] = useState(null);\r\n const [formNotaEntrada] = Form.useForm();\r\n const [openNota, setOpenNota] = useState(false);\r\n const [carregando, setCarregando] = useState(false);\r\n const [versionDB, setVersionDB] = useState(1);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n showUploadList: false,\r\n maxCount: 1,\r\n disabled: !!arquivo,\r\n beforeUpload(file) {\r\n getBase64(file).then(base64 => {\r\n setArquivoBase64(base64.split('base64,')[1]);\r\n setArquivo(file);\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n let chave = localStorage.getItem('@GestorWeb-ChaveImportar');\r\n if (!!chave) {\r\n carregarNota(chave);\r\n }\r\n }, []);\r\n\r\n function carregarNota(chave) {\r\n setCarregando(true);\r\n api.post(`NotaFiscalEntrada/CarregarNfe?ChaveNfe=${chave}`).then(\r\n res => {\r\n let dados = { ...res.data };\r\n let dadosNota = [];\r\n incluirDadosNota(dados, dadosNota);\r\n localStorage.removeItem('@GestorWeb-ChaveImportar');\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ description: erro.response.data, message: 'Aviso' });\r\n setCarregando(false);\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarNotaFiscal() {\r\n setCarregando(true);\r\n api.post(`NotaFiscalEntrada/ValidarXML`, JSON.stringify(arquivoBase64), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n res => {\r\n let dados = { ...res.data };\r\n let dadosNota = [];\r\n dadosNota.push({ nome: 'xmlBase64', valor: arquivoBase64 });\r\n incluirDadosNota(dados, dadosNota);\r\n }\r\n ).catch(\r\n erro => {\r\n setCarregando(false);\r\n notification.error({ description: erro.response.data, message: 'Aviso' });\r\n removerNota();\r\n }\r\n );\r\n };\r\n\r\n async function incluirDadosNota(dados, dadosNota) {\r\n let dadosItens = [];\r\n let dadosCamposItens = [];\r\n let dadosFaturamento = [];\r\n let dadosFat = [];\r\n let dadosTransp = [];\r\n let dadosTransportador = [];\r\n let dadosRem = [];\r\n let dadosRemetente = [];\r\n for (let key in dados) {\r\n if (typeof dados[key] !== 'object') {\r\n dadosNota.push({ nome: key, valor: dados[key] });\r\n } else if (key === 'dadosItens') {\r\n dados.dadosItens.forEach((item) => {\r\n for (let keyItens in item) {\r\n if (!!!item[keyItens]) {\r\n dadosCamposItens.push({ nome: keyItens, unico: false, valor: null });\r\n } else if (typeof item[keyItens] === 'object') {\r\n dadosCamposItens.push({ nome: keyItens, unico: false, valor: JSON.stringify(item[keyItens]) });\r\n } else {\r\n dadosCamposItens.push({ nome: keyItens, unico: false, valor: item[keyItens] });\r\n }\r\n }\r\n dadosItens.push(dadosCamposItens);\r\n dadosCamposItens = [];\r\n });\r\n } else if (key === 'dadosFaturamento') {\r\n dados.dadosFaturamento.forEach((fat) => {\r\n for (let keyFat in fat) {\r\n if (!!!fat[keyFat]) {\r\n if (keyFat === \"nfp_valor\") {\r\n dadosFat.push({ nome: keyFat, unico: false, valor: 0 });\r\n } else {\r\n dadosFat.push({ nome: keyFat, unico: false, valor: null });\r\n }\r\n } else if (typeof fat[keyFat] === 'object') {\r\n dadosFat.push({ nome: keyFat, unico: false, valor: JSON.stringify(fat[keyFat]) });\r\n } else {\r\n dadosFat.push({ nome: keyFat, unico: false, valor: fat[keyFat] });\r\n }\r\n }\r\n dadosFaturamento.push(dadosFat);\r\n dadosFat = [];\r\n });\r\n } else if (key === 'dadosRemetente') {\r\n for (let keyRem in dados.dadosRemetente) {\r\n if (!!!dados.dadosRemetente[keyRem]) {\r\n dadosRem.push({ nome: keyRem, unico: false, valor: null });\r\n } else if (typeof dados.dadosRemetente[keyRem] === 'object') {\r\n dadosRem.push({ nome: keyRem, unico: false, valor: JSON.stringify(dados.dadosRemetente[keyRem]) });\r\n } else {\r\n dadosRem.push({ nome: keyRem, unico: false, valor: dados.dadosRemetente[keyRem] });\r\n }\r\n }\r\n dadosRemetente.push(dadosRem);\r\n dadosRem = [];\r\n } else if (key === 'dadosTransportador') {\r\n for (let keyTransp in dados.dadosTransportador) {\r\n if (!!!dados.dadosTransportador[keyTransp]) {\r\n dadosTransp.push({ nome: keyTransp, unico: false, valor: null });\r\n } else if (typeof dados.dadosTransportador[keyTransp] === 'object') {\r\n dadosTransp.push({ nome: keyTransp, unico: false, valor: JSON.stringify(dados.dadosTransportador[keyTransp]) });\r\n } else {\r\n dadosTransp.push({ nome: keyTransp, unico: false, valor: dados.dadosTransportador[keyTransp] });\r\n }\r\n }\r\n dadosTransportador.push(dadosTransp);\r\n dadosTransp = [];\r\n }\r\n }\r\n let retorno = [];\r\n excluirBancoDados(() => {\r\n criarBancoWeb('notaEntrada', 1, dadosNota, () => {\r\n criarBancoWeb('dadosItens', 2, dadosItens, () => {\r\n criarBancoWeb('dadosFaturamento', 3, dadosFaturamento, () => {\r\n criarBancoWeb('dadosRemetente', 4, dadosRemetente, () => {\r\n criarBancoWeb('dadosTransportador', 5, dadosTransportador, () => {\r\n buscarDadosTabela(retorno, 'notaEntrada', () => {\r\n buscarDadosTabela(retorno, 'dadosItens', () => {\r\n buscarDadosTabela(retorno, 'dadosFaturamento', () => {\r\n buscarDadosTabela(retorno, 'dadosRemetente', () => {\r\n buscarDadosTabela(retorno, 'dadosTransportador', () => {\r\n setCarregando(false);\r\n const vetorSeparado = {\r\n notaEntrada: retorno[0],\r\n dadosItens: retorno[1],\r\n dadosFaturamento: retorno[2],\r\n dadosRemetente: retorno[3],\r\n dadosTransportador: retorno[4]\r\n };\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: vetorSeparado } });\r\n setOpenNota(true);\r\n }, 5);\r\n }, 5);\r\n }, 5);\r\n }, 5);\r\n }, 5);\r\n });\r\n });\r\n });\r\n });\r\n });\r\n });\r\n };\r\n\r\n\r\n function removerNota() {\r\n setArquivoBase64(\"\");\r\n setArquivo(null);\r\n excluirBancoDados();\r\n };\r\n\r\n async function criarBancoWeb(nomeBanco, version, campos, callback) {\r\n\r\n await criarBanco(nomeBanco, campos, version);\r\n await incluirBanco(nomeBanco, campos, version);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {!openNota &&
\r\n \r\n {!!!arquivo &&
\r\n \r\n
\r\n

\r\n \r\n

\r\n \r\n \r\n

Arraste o xml aqui! (o arquivo deve estar no formato .xml)

\r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!!arquivo &&
\r\n \r\n
\r\n \r\n \r\n \r\n {arquivo.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n { setOpenNota(false) }} />\r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Col, notification, Row, Upload } from \"antd\";\r\nimport { CloudUploadOutlined } from \"@ant-design/icons\";\r\n\r\nimport { BreadcrumbPage, BotaoAbrirChamado } from \"../../components\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function ImportarNotaFiscalSuporte() {\r\n const [arquivoBase64, setArquivoBase64] = useState(\"\");\r\n const [arquivo, setArquivo] = useState(null);\r\n const [carregando, setCarregando] = useState(false);\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n showUploadList: false,\r\n maxCount: 1,\r\n disabled: !!arquivo,\r\n beforeUpload(file) {\r\n getBase64(file).then(base64 => {\r\n setArquivoBase64(base64.split('base64,')[1]);\r\n setArquivo(file);\r\n });\r\n }\r\n }\r\n\r\n function validarNotaFiscal() {\r\n setCarregando(true);\r\n let obj = {\r\n chaveNfe: arquivo.name,\r\n xmlDistribuicaoNfe: arquivoBase64\r\n }\r\n api.post(`NotaFiscal/ImportarXmlNota`, obj, { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n res => {\r\n notification.error({ description: \"Nota Fiscal importada\", message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n setCarregando(false);\r\n notification.error({ description: erro.response.data, message: 'Aviso' });\r\n }\r\n );\r\n }\r\n\r\n function removerNota() {\r\n setArquivoBase64(\"\");\r\n setArquivo(null);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {!!!arquivo &&
\r\n \r\n
\r\n

\r\n \r\n

\r\n \r\n \r\n

Arraste o xml aqui! (Formato .xml)

\r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!!arquivo &&
\r\n \r\n
\r\n \r\n \r\n \r\n {arquivo.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, {useState} from \"react\";\r\nimport { Button } from \"antd\";\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function ButtonXMLSuporte(props) {\r\n const [invisivel, setInvisivel] = useState(false);\r\n\r\n useState(() => {\r\n setInvisivel(validarPermissaoTela(24));\r\n }, []);\r\n\r\n return (\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tooltip, Form, Input, Select, Button, Collapse, Typography, Tag, Dropdown, Menu, Alert, notification, Modal, InputNumber } from \"antd\";\r\nimport { DownloadOutlined, CloseOutlined, QuestionCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, FileProtectOutlined, ExclamationCircleOutlined, MoreOutlined, CheckOutlined, ReloadOutlined, CloudUploadOutlined } from \"@ant-design/icons\";\r\nimport { Link } from \"react-router-dom\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { getLocal } from \"../../services/auth\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\nimport { ModalManifestoDestinatario } from \"../../components/modals/\";\r\nimport { BreadcrumbAbrirChamado, TabelaDados, Data } from \"../../components\";\r\nimport { retornaSoNumeros } from \"../../services/funcoes\";\r\nimport ButtonXMLSuporte from \"../../components/buttonXmlSuporte\";\r\n\r\nexport default function MonitoramentoNfe() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [open, setOpen] = useState(false);\r\n const [openModal, setOpenModal] = useState(false);\r\n const [ambiente, setAmbiente] = useState(null);\r\n const [cnpj, setCnpj] = useState(null);\r\n const [tipoNfe, setTipoNfe] = useState([]);\r\n const [situacaoNfe, setSituacaoNfe] = useState([]);\r\n const [dadosNota, setDadosNota] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const dataAtual = new Date();\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const menuTable = (record) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n const menuOpcoes = () => (\r\n \r\n \r\n \r\n \r\n \r\n Importar XML \r\n \r\n \r\n } > \r\n Importar Nota Fiscal (PDV) \r\n \r\n \r\n \r\n );\r\n\r\n useEffect(() => {\r\n limparFiltros();\r\n }, []);\r\n\r\n function verificarLocal() {\r\n api.get(`Local/BuscarLocal`).then(function (local) {\r\n if (local.status === 200) {\r\n setCnpj(local.data.loc_cnpj.numero);\r\n }\r\n });\r\n };\r\n function limparFiltros() {\r\n formulario.setFieldsValue({ dataEmissao: moment(new Date(dataAtual.getFullYear(), dataAtual.getMonth() - 1, 1)), dataMaxEmissao: moment(new Date()), nsuEspecifico: \"\" });\r\n\r\n listarTipoNfe();\r\n listarSituacaoNfe();\r\n verificarAmbiente();\r\n verificarLocal();\r\n listarNotas();\r\n };\r\n function verificarAmbiente() {\r\n api.get(`Nfe/VerificarAmbiente?codigoLocal=${getLocal()}`).then(function (retornoAmbiente) {\r\n if (retornoAmbiente.status === 200) {\r\n setAmbiente(retornoAmbiente.data.lcn_ambienteemissao);\r\n formulario.setFieldsValue({ nsuUltimo: retornoAmbiente.data.lcn_monitoramentonsuproducao });\r\n }\r\n });\r\n };\r\n\r\n const verificarNotas = () => {\r\n api.get(`Nfe/Monitoramento`).then(res => {\r\n if (res.status === 200) {\r\n if (res.data.retorno.cStat === 138) {\r\n notification.success({ description: res.data.retorno.xMotivo, message: `Operação Realizada com Sucesso!` });\r\n } else {\r\n notification.error({ description: res.data.retorno.xMotivo, message: `SEFAZ Informa !` });\r\n }\r\n listarNotas();\r\n }\r\n }).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarTipoNfe() {\r\n api.get(`Enum/Listar?nome=TipoNFe`).then(function (res) {\r\n if (res.status === 200) {\r\n setTipoNfe(res.data);\r\n let tipoNf = [];\r\n res.data.forEach((item) => {\r\n tipoNf.push(item.key.toString());\r\n });\r\n formulario.setFieldsValue({ tipoNf: tipoNf });\r\n }\r\n });\r\n };\r\n\r\n function listarSituacaoNfe() {\r\n api.get(`Enum/Listar?nome=SituacaoNfe`).then(function (res) {\r\n if (res.status === 200) {\r\n setSituacaoNfe(res.data);\r\n let situacaoNf = [];\r\n res.data.forEach((item) => {\r\n situacaoNf.push(item.key.toString());\r\n });\r\n formulario.setFieldsValue({ situacaoNf: situacaoNf });\r\n }\r\n });\r\n };\r\n\r\n function listarNotas() {\r\n if (!!formulario.getFieldValue().pesquisa) {\r\n let modelo = \"\";\r\n let chaveAcesso = retornaSoNumeros(formulario.getFieldValue().pesquisa);\r\n if (chaveAcesso.length === 44)\r\n modelo = chaveAcesso.substring(20, 22);\r\n if (modelo !== \"55\")\r\n notification.error({ description: \"Chave de acesso não é de um documento fiscal modelo 55 NF-e!\", message: \"Atenção!\" })\r\n }\r\n let filtros = `&SituacaoNf=${(!!formulario.getFieldValue().situacaoNf ? formulario.getFieldValue().situacaoNf.join(',') : '')}\r\n &Tipodocumento=${(!!formulario.getFieldValue().tipoNf ? formulario.getFieldValue().tipoNf.join(',') : '')}`;\r\n filtros += (!!formulario.getFieldValue().pesquisa ? `&Filtro=${formulario.getFieldValue().pesquisa}` : '');\r\n filtros += (!!formulario.getFieldValue().nsuEspecifico ? `&NsuEspecifico=${formulario.getFieldValue().nsuEspecifico}` : '');\r\n filtros += (!!formulario.getFieldValue().dataEmissao ? `&DataEmissao=${formulario.getFieldValue().dataEmissao.format('YYYY-MM-DD')}` : '');\r\n filtros += (!!formulario.getFieldValue().dataMaxEmissao ? `&DataMaxEmissao=${formulario.getFieldValue().dataMaxEmissao.format('YYYY-MM-DD')}` : '');\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-nfd_datahoraemissao', outrosFiltros: filtros } });\r\n };\r\n\r\n\r\n function importarNfe(notaFiscal) {\r\n if (notaFiscal.nfd_manifestodestinatario === 0 || notaFiscal.nfd_manifestodestinatario === 1) {\r\n importarNotaFiscalEletronica(notaFiscal.nfd_chavenfe);\r\n } else {\r\n Modal.confirm({\r\n title: `Atenção!`,\r\n icon: ,\r\n content: `Esta nota fiscal não possui nenhuma manifestação de destinatário realizada. Para realizar o download da NF-e a manifestação é obrigatória. Deseja realizar a CIÊNCIA DA EMISSÃO automaticamente e continuar com o processo de importar a nota selecionada?`,\r\n okText: 'Sim, realizar manifestação e importar!',\r\n cancelText: 'Não, cancelar operação.',\r\n width: 550,\r\n onOk() {\r\n api.post(`NotaFiscal/ManifestarNfe?TipoManifesto=0&ChaveNfe=${notaFiscal.nfd_chavenfe}&justificativa=`).then(\r\n (res) => {\r\n if (res.data.retorno.cStat === 128) {\r\n if (res.data.retorno.retEvento[0].infEvento.cStat === 128 || res.data.retorno.retEvento[0].infEvento.cStat === 135) {\r\n importarNotaFiscalEletronica(notaFiscal.nfd_chavenfe);\r\n }\r\n else {\r\n notification.error({ description: res.data.retorno.retEvento[0].infEvento.xMotivo, message: `Erro na Manifestação!` });\r\n }\r\n } else {\r\n notification.error({ description: res.data.retorno.xMotivo, message: `Erro na Manifestação!` });\r\n }\r\n }\r\n ).catch(() => {\r\n notification.error({ description: 'A manifestação de CIÊNCIA DA EMISSÃO não foi realizada. Desta forma a NF-e não pode ser importada para o sistema.', message: `Erro na Manifestação!` });\r\n });\r\n },\r\n onCancel() {\r\n notification.error({ description: 'O download da nota fiscal não foi realizado, a NF-e não foi importada para o sistema.', message: `Operação Cancelada!` });\r\n }\r\n });\r\n }\r\n };\r\n function fecharModal() {\r\n setOpenModal(false);\r\n listarNotas();\r\n }\r\n function importarNotaFiscalEletronica(chaveNfe) {\r\n api.post(`Nfe/DownloadNFe?ChaveNfe=${chaveNfe}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n localStorage.setItem('@GestorWeb-ChaveImportar', chaveNfe);\r\n window.location = \"/Home#/importarNotaFiscalEntrada\";\r\n }\r\n }\r\n ).catch((erro) => {\r\n notification.error({ description: `SEFAZ Informa: Serviço indisponível no momento (${erro.response.data.Message}), Tente novamente mais tarde!`, message: `Download do arquivo XML da NF- e` });\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n {ambiente === 2 &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n \r\n
\r\n \r\n Pesquisar por\r\n \r\n \r\n \r\n \r\n }>\r\n listarNotas()} placeholder=\"Nº da Nota Fiscal / Chave de Acesso da NF-e / Emissor\" allowClear />\r\n \r\n \r\n \r\n menuOpcoes()} trigger={['click']}>\r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n {tipoNfe.map((item) => (\r\n {item.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {situacaoNfe.map((item) => (\r\n {item.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n NOTAS FISCAIS EMITIDAS CONTRA MEU CNPJ - {MaskFormat(cnpj, 'Não Informado', true)}.\r\n \r\n \r\n \r\n \r\n \r\n \r\n Ao configurar sua empresa como emissora de Notas Fiscais Eletrônicas, o GestorWeb realiza um monitoramento diário automaticamente \r\n de todas as notas emitidas contra sua empresa. Este monitoramento é realizado de forma automatica todos os dias às 05:45h. Para realizar uma verificação agora,\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n {nfd_numeronf}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n width: 100,\r\n align: 'center',\r\n render: ({ nfd_situacaonfe }) => (\r\n
\r\n \r\n \r\n {!!situacaoNfe[nfd_situacaonfe] ? situacaoNfe[nfd_situacaonfe].value : ''}\r\n \r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Emitente',\r\n render: ({ nfd_nomeemissor }) => (\r\n
\r\n {nfd_nomeemissor}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 140,\r\n render: ({ nfd_cpfcnpjemissor }) => (\r\n
\r\n {MaskFormat(nfd_cpfcnpjemissor, '', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Emissão',\r\n width: 140,\r\n render: ({ nfd_datahoraemissao }) => (\r\n
\r\n {moment(nfd_datahoraemissao).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n ),\r\n },\r\n {\r\n render: ({ nfd_manifestodestinatario }) => (\r\n \r\n
\r\n {nfd_manifestodestinatario === 0 &&\r\n \r\n Ciência da Emissão\r\n \r\n }\r\n {nfd_manifestodestinatario === 1 &&\r\n \r\n Confirmação da Operação\r\n \r\n }\r\n {nfd_manifestodestinatario === 2 &&\r\n \r\n Operação não Realizada\r\n \r\n }\r\n {nfd_manifestodestinatario === 3 &&\r\n \r\n Desconhecimento da Operação\r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n fixed: 'right',\r\n align: 'right',\r\n render: ({ nfd_valortotal }) => (\r\n
\r\n {FormatNumber(nfd_valortotal, true, false)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n {record.nfd_situacaonfe === 1 &&\r\n \r\n
\r\n menuTable(record)} trigger={['click']}>\r\n \r\n Série: {nfd_serienf}\r\n \r\n \r\n Modelo: {nfd_modelodocumento}\r\n \r\n \r\n Tipo de Nota: {tipoNfe[nfd_tipodocumento].value}\r\n \r\n \r\n Chave da NF-e: {nfd_chavenfe}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n fecharModal()} dadosNota={dadosNota} />\r\n \r\n );\r\n}\r\n\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Menu, Dropdown, Typography, Popover, Table, Divider, notification } from \"antd\";\r\nimport { MoreOutlined, PrinterOutlined, CloseOutlined, FileTextOutlined, EditOutlined, ExclamationCircleOutlined, DeleteOutlined, CloudUploadOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { Editar, TabelaDados } from \"../../components\";\r\nimport { novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { drawerActions, manutencaoActions, listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { ModalCancelamentoNfe, ModalCartaCorrecaoNotaFiscal, ModalReenviarSefaz, ModalInutilizarNota } from \"../../components/modals\";\r\n\r\nexport default function TabNotaFiscalEmitida({ retornaDescricaoStatus, carregarDados }) {\r\n\r\n const [openModalCancelar, setOpenModalCancelar] = useState(false);\r\n const [openModalCartaCorrecao, setOpenModalCartaCorrecao] = useState(false);\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [exibirModalInutilizar, setExibirModalInutilizar] = useState(false);\r\n const [openModalExcluir, setOpenModalExcluir] = useState(false);\r\n const [openModalReenviarSefaz, setModalReenviarSefaz] = useState(false);\r\n\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n {/*Não tem opção de editar no permissão de acesso.\r\n \r\n {(record.ntf_status === 0 || record.ntf_status === 4) && record.ntf_nroinutilizadosefaz == false && record.ntf_tiponota === 2 &&\r\n \r\n } onClick={() => {\r\n editarNota(record)\r\n }}> Editar \r\n \r\n } */}\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_modelo == '55' &&\r\n \r\n }\r\n {(record.ntf_status === 4 || record.ntf_status === 0) && record.ntf_modelo == '55' &&\r\n \r\n }\r\n {record.ntf_status === 1 && record.ntf_modelo == '55' && record.ntf_tiponota === 1 &&\r\n \r\n \r\n }\r\n {record.ntf_status === 1 &&\r\n \r\n \r\n \r\n }\r\n {record.ntf_status === 1 &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n function abrirExcluirNota(record) {\r\n setDadosNota(record);\r\n setOpenModalExcluir(true);\r\n };\r\n\r\n function inutilizarNota(record) {\r\n setDadosNota(record);\r\n setExibirModalInutilizar(true)\r\n };\r\n function autorizarNota(record) {\r\n setDadosNota(record);\r\n setModalReenviarSefaz(true);\r\n };\r\n\r\n\r\n function fecharModalInutilizar() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n setExibirModalInutilizar(false);\r\n }\r\n\r\n function editarNota(record) {\r\n setDadosNota(record);\r\n if (record.ntf_id) {\r\n api.get(`NotaFiscalTransferencia/dadosNotaFiscal?codigoNotaFiscal=${record.ntf_id}`).then(retornaNota => {\r\n if (retornaNota.status === 200) {\r\n retornaNota.data[0].ntf_dataemissao = moment(retornaNota.data[0].ntf_dataemissao);\r\n retornaNota.data[0].loc_id = retornaNota.data[0].localDestino;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: retornaNota.data[0] } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function abrirCancelarNota(record) {\r\n setDadosNota(record);\r\n setOpenModalCancelar(true);\r\n };\r\n\r\n function abrirCartaCorrecao(record) {\r\n setDadosNota(record);\r\n setOpenModalCartaCorrecao(true);\r\n };\r\n\r\n return (\r\n
\r\n (\r\n
\r\n \r\n {ntf_numero}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n width: 100,\r\n align: 'center',\r\n render: ({ ntf_status }) => (\r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n
\r\n ),\r\n },\r\n {\r\n width: 750,\r\n title: 'Transferências Emitidas',\r\n render: ({ ntf_status, ntf_nomedest, ser_serie, ntf_dataemissao, ntf_chavenfe, ntf_cstat, ntf_xmotivo }) => (\r\n
\r\n \r\n
\r\n \r\n {ntf_nomedest}\r\n \r\n \r\n \r\n Série: {ser_serie}\r\n \r\n \r\n Emissão: {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n {!(!!ntf_chavenfe) ?\r\n \r\n NF-e não gerada\r\n :\r\n \r\n NF-e:\r\n \r\n {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${ntf_chavenfe}`);\r\n }} target=\"_blank\">\r\n {ntf_chavenfe}\r\n \r\n \r\n \r\n }\r\n {(ntf_status == 3 || ntf_status == 4) &&\r\n \r\n Rejeição: {ntf_cstat}{!!(ntf_xmotivo) ? (', ' + ntf_xmotivo) : ''}\r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total da Nota (R$)',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n function abrirModalConfirmacao(record) {\r\n setDadosNota(record);\r\n setOpenModalConfirmacao(true);\r\n };\r\n\r\n return (\r\n
\r\n (\r\n
\r\n \r\n {ntf_numero}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n width: 100,\r\n align: 'center',\r\n render: ({ statusTransferencia }) => (\r\n
\r\n \r\n {statusTransferencia === 0 ? 'Pendente' : 'Transferido'} \r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Transferências Emitidas',\r\n render: (record ,{ ntf_nomedest, ser_serie, ntf_dataemissao, ntf_chavenfe }) => (\r\n
\r\n \r\n
\r\n \r\n {ntf_nomedest}\r\n \r\n \r\n \r\n Série: {ser_serie}\r\n \r\n \r\n Emissão: {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n {!(!!ntf_chavenfe) ?\r\n \r\n NF-e não gerada\r\n :\r\n \r\n NF-e:\r\n { imprimir(record) }}>Clique para visualizar o Danfe}>\r\n {ntf_chavenfe}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Total da Nota (R$)',\r\n align: 'right',\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {nfi_ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n align: 'center',\r\n width: '4%',\r\n fixed: 'left',\r\n render: ({ nfi_cfop }) => (\r\n
\r\n {nfi_cfop}\r\n
\r\n ),\r\n },\r\n {\r\n title: `${dadosContribuinte.emp_regimetributario === 1 ? 'CSOSN' : 'CST'}`,\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'left',\r\n render: ({ cst_id, cso_id }) => (\r\n
\r\n
\r\n {dadosContribuinte.emp_regimetributario === 1 ? cso_id : cst_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: '5%',\r\n align: 'right',\r\n fixed: 'left',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n {FormatNumber(nfi_qtde, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: '8%',\r\n fixed: 'left',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'right',\r\n width: '5%',\r\n render: ({ percdesc }) => (\r\n
\r\n {percdesc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ percacresc }) => (\r\n
\r\n {FormatNumber(percacresc, true)}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Frete',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ nfi_valorfrete }) => (\r\n
\r\n {FormatNumber(nfi_valorfrete, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. Icms',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ baseICMS }) => (\r\n
\r\n {FormatNumber(baseICMS, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: '% Icms',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ nig_percicms }) => (\r\n
\r\n {FormatNumber(nig_percicms, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ nig_valorIcms }) => (\r\n
\r\n {FormatNumber(nig_valorIcms, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. ST',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ BaseST }) => (\r\n
\r\n {FormatNumber(BaseST, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: '% ST',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ nig_percicmsst }) => (\r\n
\r\n {FormatNumber(nig_percicmsst, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr ST',\r\n align: 'right',\r\n width: '6%',\r\n render: ({ nig_valoricmsst }) => (\r\n
\r\n {FormatNumber(nig_valoricmsst, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: '8%',\r\n fixed: 'right',\r\n render: ({ total }) => (\r\n
\r\n {FormatNumber(total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'right',\r\n render: (record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade:\r\n \r\n \r\n {quantidade}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Card, Form, Typography, Input, Divider } from \"antd\";\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { validarNumeros } from \"../../services/funcoes\";\r\n\r\nexport default function TabResumoTransferencia({ form, dadosItens, resumoNota }) {\r\n\r\n useEffect(() => {\r\n let formulario = form.getFieldValue();\r\n let resumo = {\r\n valorProduto: 0,\r\n valorFrete: 0,\r\n valorOutros: 0,\r\n valorSeguro: 0,\r\n valorBaseICMS: 0,\r\n valorICMS: 0,\r\n valorBaseST: 0,\r\n valorICMSST: 0,\r\n valorBaseIPI: 0,\r\n valorIPI: 0,\r\n valorBaseICMSST: 0\r\n };\r\n dadosItens.dadosItens.forEach((item) => {\r\n resumo.valorProduto += (item.nfi_valorunitario * item.nfi_qtde) || 0;\r\n resumo.valorFrete += (item.nfi_valorfrete) || 0;\r\n resumo.valorOutros += (item.nfi_valoroutros) || 0;\r\n resumo.valorSeguro += (item.nfi_valorseguro) || 0;\r\n resumo.valorBaseICMS += (item.baseICMS) || 0;\r\n resumo.valorICMS += (item.nig_valorIcms) || 0;\r\n resumo.valorBaseST += (item.nig_valorbcst) || 0;\r\n resumo.valorICMSST += (item.nig_valoricmsst) || 0;\r\n resumo.valorBaseIPI += (item.npi_valorbcipi) || 0;\r\n resumo.valorIPI += (item.npi_valoripi) || 0;\r\n });\r\n resumo.valorFrete = validarNumeros(formulario.valorFrete);\r\n resumo.valorSeguro = validarNumeros(formulario.valorSeguro);\r\n resumo.valorTotalNotaFiscal = resumo.valorProduto + resumo.valorFrete + resumo.valorOutros + resumo.valorSeguro + resumo.valorIPI + resumo.valorICMSST + resumo.valorICMS; \r\n let dadosItensTemp = [...dadosItens.dadosItens];\r\n dadosItens.setDadosItens(dadosItensTemp);\r\n resumoNota.setResumoNota(resumo);\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo da Nota Fiscal de Transferência\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorProduto, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorFrete, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorSeguro, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorOutros, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseIPI, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorIPI, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseICMS, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorICMS, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorBaseST, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorICMSST, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$)\r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(resumoNota.resumoNota.valorTotalNotaFiscal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Form, Select, Steps, Alert, Input, notification, Tooltip } from \"antd\";\r\nimport { QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Data, FormGW } from '../../components';\r\nimport { useStateValue } from '../../state';\r\nimport { getEmpresa, getLocal } from '../../services/auth';\r\nimport { MaskFormat } from '../../ValueObjects';\r\nimport { TabTransporte } from '../tabNotaFiscal/index';\r\nimport { TabItemTransferencia, TabResumoTransferencia } from './tabPage';\r\nimport { validaForm, isObjetoDiffVazio, novaAbaNavegador, calculaValorProporcional } from '../../services/funcoes';\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function ManutencaoNotaFiscalTransferencia({ formulario, carregando, aoSalvar, pages, proximaPag, limparDados, abrirDrawer }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [serieFiscal, setSerieFiscal] = useState([]);\r\n const [tipoPreco, setTipoPreco] = useState([]);\r\n const [ambiente, setAmbiente] = useState([]);\r\n const [filiaisEmpresa, setFiliaisEmpresa] = useState([]);\r\n const [parametrosEmpresa, setParametrosEmpresa] = useState([]);\r\n const [dadosContribuinte, setDadosContribuinte] = useState([]);\r\n const [dadosEndereco, setDadosEndereco] = useState({});\r\n const [dadosNfeTransferencia, setDadosNfeTransferencia] = useState({});\r\n const [listaVeiculos, setListaVeiculos] = useState([]);\r\n const [dadosTransp, setDadosTransp] = useState({});\r\n const [resumoNota, setResumoNota] = useState({});\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [editando, setEditando] = useState(false);\r\n const [listaIndicadorPresenca, setListaIndicadorPresenca] = useState([]);\r\n const listaValidacoesDest = [\r\n { nome: 'loc_id', obrigatorio: true, label: 'Destinatário' },\r\n { nome: 'ser_id', obrigatorio: true, label: 'Série Fiscal' },\r\n { nome: 'ntf_dataemissao', obrigatorio: true, label: 'Data de Emissão' },\r\n { nome: 'custo', obrigatorio: true, label: 'Preço' }\r\n ];\r\n\r\n const listaValidacoesTransp = [\r\n { nome: 'ntf_modalidadefrete', obrigatorio: true, label: 'Modalidade do Frete' }\r\n ];\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarDados();\r\n if (!(!!formulario.getFieldValue().ntf_dataemissao)) {\r\n formulario.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.ntf_id) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n setEditando(true);\r\n } else {\r\n setEditando(false);\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n if (abrirDrawer && !!manutencao.dados && !!manutencao.dados.itensNf) {\r\n let itens = manutencao.dados.itensNf;\r\n let pdi_valorfrete = 0;\r\n let percacresc = 0;\r\n itens.forEach((item) => {\r\n pdi_valorfrete += parseFloat(!!item.pdi_valorfrete ? item.pdi_valorfrete : 0);\r\n percacresc += parseFloat(!item.percacresc ? percacresc : 0)\r\n });\r\n setDadosItens(itens);\r\n carregarDados();\r\n formulario.setFieldsValue(manutencao.dados);\r\n formulario.setFieldsValue({ valorFrete: pdi_valorfrete });\r\n formulario.setFieldsValue({ valorAcrescimo: percacresc });\r\n if (!(!!formulario.getFieldValue().ntf_dataemissao)) {\r\n formulario.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!proximaPag.proximaPag || proximaPag.proximaPag === 0) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n function salvarNota(values) {\r\n let operacao = 'Incluir';\r\n\r\n if (!!values.ntf_id) {\r\n operacao = 'Editar';\r\n }\r\n let dados = popularDados();\r\n carregando(true);\r\n api.post(`NotaFiscalTransferencia/${operacao}`, dados).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (operacao === 'Incluir') {\r\n if (retornoNF.data.ntf_status === 1 && !!retornoNF.data.ntf_chavenfe && !!retornoNF.data.ser_id) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${retornoNF.data.ntf_chavenfe}`);\r\n } else if (retornoNF.data.ntf_status === 1 && !!retornoNF.data.ntf_chavenfe) {\r\n }\r\n }\r\n notification.success({ message: 'Sucesso', description: `Nota ${operacao === 'Incluir' ? 'Incluída' : 'Editada'} com sucesso!` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível salvar os dados da nota de transferência!', message: `Aviso` });\r\n }\r\n }\r\n ).finally(() => {\r\n carregando(false);\r\n setDadosItens([]);\r\n aoSalvar();\r\n });\r\n };\r\n\r\n async function validarTrocaPg(proxPagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n if (paginaAtual < proxPagina) {\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesDest;\r\n break;\r\n case 1:\r\n if (dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: `É necessário informar um item na nota fiscal!` });\r\n validarTransporte(dadosItens);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n break;\r\n case 2:\r\n listaValidacoes = listaValidacoesTransp;\r\n await validarTransporte(dadosItens);\r\n break;\r\n }\r\n if (validaForm(formulario, listaValidacoes)) {\r\n pages.setTagPages(proxPagina);\r\n } else {\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n } else {\r\n pages.setTagPages(proxPagina);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (limparDados.limparDados) {\r\n pages.setTagPages(0);\r\n setDadosItens([]);\r\n setResumoNota({});\r\n limparDados.setLimparDados(false);\r\n }\r\n }, [limparDados.limparDados]);\r\n\r\n function popularDados() {\r\n let valores = formulario.getFieldsValue();\r\n let dados = formulario.getFieldValue();\r\n valores.dadosDestinatario = preencherDadosDestinatario(dados);\r\n valores.serieFiscal = serieFiscal.filter((serie) => { return serie.ser_id === dados.ser_id })[0];\r\n valores.dadosContribuinte = dadosContribuinte;\r\n valores.listaItemNotaFiscal = dadosItens;\r\n valores.custo = tipoPreco.filter((custo) => { return custo.key === dados.custo })[0];\r\n valores.par_69 = parametrosEmpresa.par_69;\r\n valores.transporte = preencherDadosTransportadores(dados);\r\n valores.ntf_modalidadefrete = valores.transporte.ntf_modalidadefrete;\r\n valores.resumo = resumoNota;\r\n valores.emp_id = getEmpresa();\r\n valores.ser_id = valores.serieFiscal.ser_id;\r\n valores.ser_numero = valores.serieFiscal.ser_numero;\r\n return valores;\r\n };\r\n\r\n function preencherDadosDestinatario(dados) {\r\n let dadosDestinatario = {\r\n loc_id: dados.loc_id\r\n }\r\n return dadosDestinatario;\r\n };\r\n\r\n function preencherDadosTransportadores(dados) {\r\n let dadosTransporte = {};\r\n dadosTransporte.trn_id = !!dadosTransp.trn_id ? dadosTransp.trn_id : null;\r\n dadosTransporte.trn_id = dados.trn_id;\r\n dadosTransporte.trv_marca = dados.trv_marca;\r\n dadosTransporte.trv_modelo = dados.trv_modelo;\r\n dadosTransporte.trv_placa = dados.trv_placa;\r\n dadosTransporte.trv_rntc = dados.trv_rntc;\r\n dadosTransporte.trv_uf = dados.trv_uf;\r\n dadosTransporte.trv_observacao = dados.trv_observacao\r\n dadosTransporte.nvl_especievolume = dados.nvl_especievolume;\r\n dadosTransporte.nvl_marcavolume = dados.nvl_marcavolume;\r\n dadosTransporte.nvl_numeracaovolume = !!dados.nvl_numeracaovolume ? dados.nvl_numeracaovolume.toString() : \"\";\r\n dadosTransporte.nvl_pesobruto = dados.nvl_pesobruto;\r\n dadosTransporte.nvl_pesoliquido = dados.nvl_pesoliquido;\r\n dadosTransporte.nvl_qtdevolumes = dados.nvl_qtdevolumes\r\n dadosTransporte.ntf_modalidadefrete = dados.ntf_modalidadefrete;\r\n return dadosTransporte;\r\n };\r\n\r\n async function carregarDados() {\r\n let retornoSerie = await api.get(`SerieFiscal/Listar?CodigoModeloDocFiscal=55&EmitenteDocumento=0`);\r\n if (retornoSerie.status === 200) {\r\n setSerieFiscal(retornoSerie.data.items);\r\n if (retornoSerie.data.items.length === 1) {\r\n formulario.setFieldsValue({ ser_id: retornoSerie.data.items[0].ser_id });\r\n }\r\n }\r\n let listaIndicadorPresenca = await api.get('Enum/Listar?nome=IndicadorPresenca');\r\n if (listaIndicadorPresenca.status === 200) {\r\n setListaIndicadorPresenca(listaIndicadorPresenca.data);\r\n }\r\n let retornoTipoPreco = await api.get(`Enum/Listar?nome=TipoPrecoUtilizar`);\r\n if (retornoTipoPreco.status === 200) {\r\n retornoTipoPreco.data = retornoTipoPreco.data.filter((item) => { return item.key > 0 });\r\n setTipoPreco(retornoTipoPreco.data);\r\n }\r\n let retornoAmbiente = await api.get(`Nfe/VerificarAmbiente?codigoLocal=${getLocal()}`);\r\n if (retornoAmbiente.status === 200) {\r\n setAmbiente(retornoAmbiente.data);\r\n }\r\n let retornoFiliais = await api.get(`Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`);\r\n if (retornoFiliais.status === 200) {\r\n setFiliaisEmpresa(retornoFiliais.data.items.filter((item) => { return item.loc_id !== parseInt(getLocal()) }));\r\n }\r\n let retornoParametrosEmp = await api.get('ParametroEmpresa/BuscarParametros');\r\n if (retornoParametrosEmp.status === 200) {\r\n let dados = {};\r\n dados.par_69 = retornoParametrosEmp.data.par_69;\r\n if (!!retornoParametrosEmp.data.par_custopadraonftransferencia || !!formulario.getFieldValue().custo) {\r\n let custo = retornoTipoPreco.data.filter((custo) => { return custo.key === !!formulario.getFieldValue().custo ? formulario.getFieldValue().custo : retornoParametrosEmp.data.par_custopadraonftransferencia });\r\n if (custo.length > 0) {\r\n dados.custo = custo[0];\r\n if (!(!!formulario.getFieldValue().custo)) {\r\n formulario.setFieldsValue({ custo: custo[0].key });\r\n }\r\n }\r\n }\r\n setParametrosEmpresa(retornoParametrosEmp.data);\r\n setDadosNfeTransferencia(dados);\r\n }\r\n let retornoDadosContribuinte = await api.get(`dadosContribuinte/Buscar`);\r\n setDadosContribuinte(retornoDadosContribuinte.data);\r\n if (!!formulario.getFieldValue().ntf_id && dadosItens.length === 0 && (!!manutencao.dados && manutencao.dados.listaItemNotaFiscal.length > 0)) {\r\n let itens = manutencao.dados.listaItemNotaFiscal;\r\n itens.forEach((item) => {\r\n if (!!item.icm_id) {\r\n item.icm_id = { icm_id: item.icm_id, icm_descricao: item.icm_descricao }\r\n }\r\n });\r\n setDadosItens(itens);\r\n };\r\n };\r\n\r\n useEffect(() => {\r\n if (filiaisEmpresa.length > 0 && !!formulario.getFieldValue().loc_id) {\r\n buscarEnderecoLocal(formulario.getFieldValue().loc_id);\r\n }\r\n }, [filiaisEmpresa]);\r\n\r\n function buscarEnderecoLocal(loc_id) {\r\n if (!!loc_id) {\r\n let lcd_id = filiaisEmpresa.filter((filial) => { return filial.loc_id === loc_id })[0].lcd_id;\r\n api.get(`LogradouroCidade/BuscarLogradouroCidade?codigoLogradouroCidade=${lcd_id}&estrangeiro=0`).then(res => {\r\n if (res.status === 200) {\r\n setDadosEndereco(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n };\r\n\r\n function alterarCusto(e) {\r\n if (!!e) {\r\n let custo = tipoPreco.find((custo) => { return custo.key === e });\r\n if (!!custo) {\r\n let dados = { ...dadosNfeTransferencia };\r\n dados.custo = custo;\r\n setDadosNfeTransferencia(dados);\r\n }\r\n }\r\n };\r\n\r\n async function validarTransporte(dadosItens) {\r\n await rateioFrete(dadosItens);\r\n await recalcularImpostos(dadosItens);\r\n }\r\n\r\n async function recalcularImpostos(dadosItens) {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n let possuiIe = !!formulario.getFieldValue().pej_inscricaoestadual ? true : false;\r\n let empresaSelecionada = filiaisEmpresa.filter(item => item.loc_id === formulario.getFieldValue().loc_id);\r\n let fisicaJuridica = empresaSelecionada[0].loc_tipocontribuinte;\r\n for (const p of dadosItens) {\r\n try {\r\n let aliquotaIcms = p.nig_percicms !== null && p.nig_percicms !== '' && Number(p.nig_percicms) !== 0 ? p.nig_percicms : (p.mva_percaliquotaicms !== null && p.mva_percaliquotaicms !== '' ? p.mva_percaliquotaicms : 0);\r\n let percIpi = p.ncm_percentual !== null && p.ncm_percentual !== '' && Number(p.ncm_percentual) !== 0 ? p.ncm_percentual : (!p.npi_percaliquotaipi ? p.npi_percaliquotaipi : 0);\r\n let aliquotaICMSST = !p.mva_percaliquotaicms ? p.mva_percaliquotaicms : p.nig_percicmsst;\r\n let valorOutros = parseFloat(formulario.getFieldValue().valorSeguro) + parseFloat(p.nfi_valoroutros);\r\n let valorFrete = parseFloat(formulario.getFieldValue().valorFrete);\r\n\r\n //calcula impostos da nota no beck\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id,\r\n p.iod_uforigem, p.iod_ufdestino, p.nfi_qtde, p.nfi_valorunitario, valorFrete, valorOutros,\r\n p.nfi_valordesconto, aliquotaIcms, p.iod_percdiferimentoicms, p.iod_percicmsreducaobc, aliquotaICMSST, p.mva_percmva, p.mva_percaliquotaicmsreducao, p.mva_ajustado,\r\n percIpi,\r\n fisicaJuridica, formulario.getFieldValue().ntf_consumidorfinal, possuiIe, formulario.getFieldValue().ntf_indicadorpresenca);\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.baseICMS = impostos.retornoICMS.ret_baseIcms;\r\n p.valorICMS = impostos.retornoICMS.ret_valorIcms;\r\n p.BaseST = impostos.retornoICMSST.ret_baseIcmsST;\r\n p.ValorST = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.BaseIPI = impostos.retornoIPI.ret_baseIPI;\r\n p.ValorIPI = impostos.retorno.ret_valorIpi;\r\n p.nfi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.nfi_valoripi = impostos.retornoIPI.ret_valorIpi\r\n p.nig_valorIcms = impostos.retornoICMS.ret_valorIcms;\r\n p.total = (p.nfi_qtde * p.nfi_valorunitario) - p.nfi_valordesconto + p.nfi_valoroutros + p.nfi_valoripi + p.nfi_valoricmsst;\r\n p.impostos = impostos;\r\n\r\n setDadosItens(p);\r\n }\r\n totalSt += parseFloat(p.nfi_valoricmsst);\r\n total += parseFloat(p.total);\r\n } catch (error) {\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n formulario.setFieldsValue({ valorTotalSt: totalSt });\r\n }\r\n }\r\n\r\n async function rateioFrete(dadosItens) {\r\n let _numeroItem = 1;\r\n let _totalFrete = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorFrete = parseFloat(resumoNota.valorFrete);\r\n if (_valorFrete > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.nfi_valorunitario * item.nfi_qtde;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.nfi_valorunitario * item.nfi_qtde);\r\n item.nfi_valorfrete = calculaValorProporcional(valorTotalItem, _valorFrete, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.nfi_valorfrete = parseFloat((_valorFrete - _totalFrete).toFixed(2))\r\n }\r\n _totalFrete += item.nfi_valorfrete;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n rateioAcrescimo(dadosItens);\r\n }\r\n\r\n async function rateioAcrescimo(dadosItens) {\r\n let _numeroItem = 1;\r\n let _totalAcrescimo = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorAcrescimo = (parseFloat(resumoNota.valorOutros) + parseFloat(resumoNota.valorSeguro));\r\n if (_valorAcrescimo > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.nfi_valorunitario * item.nfi_qtde;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n item.nfi_valorseguro = 0;\r\n let valorTotalItem = parseFloat(item.nfi_valorunitario * item.nfi_qtde);\r\n let valoracresc = calculaValorProporcional(valorTotalItem, _valorAcrescimo, somaTotal);\r\n //transforma o valor acrescimo em porcentagem\r\n item.percacresc = (valoracresc * 100) / valorTotalItem;\r\n item.nfi_valorseguro = valoracresc;\r\n _totalAcrescimo += item.percacresc;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n {ambiente === 2 &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n if (pagina >= pages.tagPages) {\r\n return;\r\n }\r\n pages.setTagPages(pagina);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form, notification } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { validaForm } from '../../services/funcoes';\r\nimport ManutencaoNotaFiscalTransferencia from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerNotaFiscalTransferencia({ carregarDados }) {\r\n\r\n const [formNotaFiscalTransferencia] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [carregando, setCarregando] = useState(false);\r\n const [limparDados, setLimparDados] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formNotaFiscalTransferencia.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formNotaFiscalTransferencia.resetFields();\r\n setProximaPag(null);\r\n setTagPages(0);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n carregarDados();\r\n setLimparDados(true);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Tabs, Form, Select, Button, Collapse, Input } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, CloseOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from '../../services/api';\r\nimport DrawerNotaFiscalTransferencia from './drawer';\r\nimport { BreadcrumbIncluirDados, Data, ComboData } from \"../../components\";\r\nimport { TabNotaFiscalEmitida, TabNotaFiscalRecebida } from './tabPage';\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function NotaFiscalTransferencia() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formPesquisa] = Form.useForm();\r\n const [formulario] = Form.useForm();\r\n const [statusNfe, setStatusNfe] = useState([]);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [open, setOpen] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=StatusNFe`).then(res => {\r\n if (res.status === 200) {\r\n setStatusNfe(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n formPesquisa.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formPesquisa.setFieldsValue({ dataInicial: moment(formPesquisa.getFieldValue().dataPesquisa) });\r\n }, []);\r\n\r\n function alternarTab(aba) {\r\n setAbaSelecionada(aba);\r\n carregarDados(null, null, aba);\r\n };\r\n function aplicarFiltrosAvancados() {\r\n let dataInicial = !!formPesquisa.getFieldsValue().dataInicial ? moment(formPesquisa.getFieldValue().dataInicial).format('YYYY-MM-DD') : moment(new Date()).format('YYYY-MM-DD');\r\n let dataFinal = !!formPesquisa.getFieldValue().dataFinal ? moment(formPesquisa.getFieldValue().dataFinal).format('YYYY-MM-DD') : moment(new Date()).format('YYYY-MM-DD');\r\n carregarDados(dataInicial, dataFinal);\r\n };\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!statusNfe) {\r\n return statusNfe.filter((statusNota) => (\r\n statusNota.key === ntf_status\r\n ))[0].value;\r\n }\r\n };\r\n\r\n function carregarDados(dataInicial, dataFinal, aba) {\r\n dataFinal = !!dataFinal ? dataFinal : moment(new Date()).format('YYYY-MM-DD');\r\n dataInicial = !!dataInicial ? dataInicial : !!formPesquisa.getFieldValue().dataPesquisa ? moment(formPesquisa.getFieldValue().dataPesquisa).format('YYYY-MM-DD') : moment(new Date()).format('YYYY-MM-DD');\r\n let filtros = `&situacao=0,1`;\r\n filtros += !!formulario.getFieldValue().pesquisa ? `&filtro=${formulario.getFieldValue().pesquisa}` : '';\r\n filtros += `&status=${(!!formulario.getFieldValue().situacaoNotaTransferencia ? formulario.getFieldValue().situacaoNotaTransferencia.join(',') : '0,1,2,3,4,5')}`;\r\n if (!!aba) {\r\n if (aba === \"1\") {\r\n filtros += '&tipoNFTransferencia=1';\r\n } else {\r\n filtros += '&tipoNFTransferencia=0';\r\n }\r\n } else {\r\n if (abaSelecionada === \"1\") {\r\n filtros += '&tipoNFTransferencia=1';\r\n } else {\r\n filtros += '&tipoNFTransferencia=0';\r\n }\r\n }\r\n filtros += `&dataFinal=${dataFinal}&dataInicial=${dataInicial}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `${filtros}`, ordem: '-NotaFiscal.ntf_dataemissao' } })\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n { carregarDados() }} allowClear />\r\n \r\n \r\n \r\n {\r\n formPesquisa.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formPesquisa.setFieldsValue({ dataInicial: moment(formPesquisa.getFieldValue().dataPesquisa) });\r\n carregarDados(moment(formPesquisa.getFieldValue().dataInicial).format('YYYY-MM-DD'), moment(formPesquisa.getFieldValue().dataFinal).format('YYYY-MM-DD'));\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n alternarTab(tab);\r\n }}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, Tag, Table, Input } from \"antd\";\r\nimport { PlusOutlined, PrinterFilled } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { ModalCartaCorrecaoNotaFiscal } from \"../../components/modals/\";\r\nimport { BreadcrumbPage, Imprimir, TabelaDados } from \"../../components\";\r\nimport { listagemActions } from \"../../actions\";\r\n\r\nexport default function CartaCorrecaoNotaFiscal() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosNota, setDadosNota] = useState({})\r\n const [abrirModal, setAbrirModal] = useState(false);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: \"-ntf_dataemissao\" } });\r\n };\r\n\r\n function incluirNovo(record) {\r\n record.textoCorrecao = \"\";\r\n record.pes_nome = record.ntf_nomedest;\r\n record.ntf_cnpjcpfdest = record.ntf_cpfcnpj;\r\n record.ntf_modelo = record.mdf_descricao;\r\n record.nfd_modelodocumento = !!record.mdf_id ? record.mdf_id : record.mdf_descricao;\r\n record.IdNotaFiscal = record.ntf_id;\r\n setDadosNota(record);\r\n setAbrirModal(true);\r\n };\r\n\r\n function imprimirCartaoCorrecao(correcao) {\r\n novaAbaNavegador(`Danfe/GerarCce?chaveNFe=${correcao.evt_chavenfe}&sequenciaEvento=${correcao.evt_sequencia}`);\r\n };\r\n\r\n function aoSalvar() {\r\n setAbrirModal(false);\r\n carregarDados();\r\n };\r\n\r\n function filtrarLista(valor) {\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: valor, pagina: 1, ordem: \"-ntf_dataemissao\" } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n filtrarLista(valor)} allowClear />\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {ntf_numero}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Correções Emitidas',\r\n render: ({ ntf_nomedest, ntf_chavenfe }) => (\r\n
\r\n \r\n
\r\n {ntf_nomedest}\r\n \r\n \r\n Chave NF-e: {ntf_chavenfe}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Série',\r\n width: 100,\r\n render: ({ ser_serie }) => (\r\n
\r\n {ser_serie}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 90,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total da Nota (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } expandir={({ correcoes }) => {\r\n return (\r\n
\r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n Sequência: {correcao.evt_sequencia}\r\n \r\n \r\n Correção realizada: {correcao.evt_texto}\r\n \r\n \r\n Data Envio: {moment(correcao.evt_dataEnvio).format('DD/MM/YYYY')}\r\n \r\n \r\n Protocolo: {correcao.evt_protocolo}\r\n \r\n \r\n Processamento: {moment(correcao.evt_dataprocessamento).format('DD/MM/YYYY HH:mm:ss')}\r\n \r\n \r\n \r\n )\r\n }, {\r\n align: 'right',\r\n width: 45,\r\n render: (correcao) => (\r\n
\r\n \r\n
\r\n } onClick={() => { imprimirCartaoCorrecao(correcao) }} />\r\n \r\n \r\n \r\n\r\n )\r\n }\r\n ]} />\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n aoSalvar()} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Typography, Collapse, Checkbox, Badge, Tag, Form, Input, Modal, Spin } from \"antd\";\r\nimport { PlusOutlined, CheckOutlined, CloseOutlined, ExclamationCircleOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { ModalInutilizacaoNfe } from \"../../components/modals/\";\r\nimport { BreadcrumbPage } from \"../../components\";\r\n\r\nexport default function InutilizacaoNfe() {\r\n\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n const [openModal, setOpenModal] = useState(false);\r\n const [listaNfRejeitada, setListaNfRejeitada] = useState([]);\r\n const [listaNfEmDititacaMais30Dias, setListaNfEmDititacaMais30Dias] = useState([]);\r\n const [listaNfEmDititacaMenos30Dias, setListaNfEmDititacaMenos30Dias] = useState([]);\r\n const [qtdeNumerosInutilizar, setQtdeNumerosInutilizar] = useState(0);\r\n const [qtdeInutilizados, setQtdeInutilizados] = useState(0);\r\n const [retornoInutilizacao, setRetornoInutilizacao] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const etapas = {\r\n solicitacao: 1,\r\n processando: 2,\r\n retorno: 3\r\n };\r\n const [etapaAtual, setEtapaAtual] = useState(1);\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ justificativaInutilizacao: 'Solicitada a inutilização dos números de NF-e da respectiva série fiscal pois a numeração não foi utilizada por motivo de rejeição de NF-e ou falha no processo de emissão do sistema.' });\r\n retornaStatusNF();\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n let data30Dias = new Date();\r\n data30Dias.setDate(data30Dias.getDate() - 30);\r\n api.get(`NotaFiscal/GetNotaPorStatus?StatusNFe=4`).then((res) => {\r\n if (res.status === 200) {\r\n setListaNfRejeitada(res.data);\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n\r\n api.get(`NotaFiscal/GetNotaPorStatus?StatusNFe=0&dataFinal=${moment(data30Dias).toISOString()}`).then((dadosMais30) => {\r\n if (dadosMais30.status === 200) {\r\n setListaNfEmDititacaMais30Dias(dadosMais30.data);\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n\r\n api.get(`NotaFiscal/GetNotaPorStatus?StatusNFe=0,4&dataInicial=${moment(data30Dias).toISOString()}`).then((dadosMenos30) => {\r\n if (dadosMenos30.status === 200) {\r\n setListaNfEmDititacaMenos30Dias(dadosMenos30.data.map((dados, idx) => ({ key: idx, ...dados })));\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n };\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!listaStatusNota) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n function solicitarInutilizacaoNfePendentes(values) {\r\n let listaInutilizacao = [];\r\n let quantidadeNumerosInutilizar = listaNfEmDititacaMenos30Dias.length;\r\n listaNfEmDititacaMenos30Dias.forEach((obj) => {\r\n if (obj.checked) {\r\n listaInutilizacao.unshift({\r\n ser_id: obj.ser_id,\r\n numeroInicial: obj.ntf_numero,\r\n numeroFinal: obj.ntf_numero,\r\n justificativa: values.justificativaInutilizacao\r\n });\r\n quantidadeNumerosInutilizar++;\r\n }\r\n });\r\n\r\n if (listaInutilizacao.length > 0) {\r\n Modal.confirm({\r\n title: 'Solicitar a inutilização dos números de NF-e/NFC-e?',\r\n icon: ,\r\n content: '',\r\n okText: 'Sim, Solicitar Inutilização',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setQtdeNumerosInutilizar(listaInutilizacao.length);\r\n setEtapaAtual(etapas.processando);\r\n let quantidadeInutilizados = 0;\r\n api.post(`NotaFiscal/InutilizarListaPorFaixa`, listaInutilizacao).then((dados) => {\r\n if (dados.status === 200) {\r\n dados.data.forEach((item) => {\r\n if (item.retorno.cStat === 102 || item.retorno.cStat === 206) {\r\n quantidadeInutilizados++;\r\n }\r\n });\r\n setQtdeInutilizados(quantidadeInutilizados);\r\n setRetornoInutilizacao(dados.data);\r\n setEtapaAtual(etapas.retorno);\r\n } else {\r\n setEtapaAtual(etapas.solicitacao);\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi possível realizar a inutilização.
\r\n
\r\n
{JSON.stringify(dados.data)}
\r\n \r\n ),\r\n });\r\n }\r\n }, err => {\r\n setEtapaAtual(etapas.solicitacao);\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi possível realizar a inutilização.
\r\n
\r\n
{err.message}
\r\n \r\n ),\r\n });\r\n }).finally(() => {\r\n carregarDados();\r\n });\r\n }\r\n });\r\n } else {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: 'Não existem registros de números de NF que devem ser inutilizados e/ou você não selecionou nenhum número de NF em digitação para solicitar a inutilização!',\r\n });\r\n }\r\n }\r\n\r\n const genExtraCheckbox = () => (\r\n
{\r\n event.stopPropagation();\r\n }}>\r\n \r\n
\r\n \r\n selecionarTodos(e.target.checked)} />\r\n \r\n \r\n \r\n Notas em Digitação e Rejeitadas lançadas a menos de 30 dias\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n const genExtra = () => (\r\n
{\r\n event.stopPropagation();\r\n }}>\r\n \r\n
\r\n Notas em digitação lançadas a mais de 30 dias\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n const genExtraRejeitadas = () => (\r\n
{\r\n event.stopPropagation();\r\n }}>\r\n \r\n
\r\n Notas Rejeitadas\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n function selecionarTodos(checked) {\r\n let lista = [...listaNfEmDititacaMenos30Dias];\r\n lista.forEach((item) => {\r\n item.checked = checked;\r\n });\r\n setListaNfEmDititacaMenos30Dias(lista);\r\n };\r\n\r\n function selecionarNota(nota) {\r\n let lista = [...listaNfEmDititacaMenos30Dias];\r\n let itemEditar = lista.filter((item) => { return item.key === nota.key })[0];\r\n itemEditar.checked = !itemEditar.checked;\r\n setListaNfEmDititacaMenos30Dias(lista);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {etapaAtual === etapas.solicitacao &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {etapaAtual === etapas.solicitacao &&\r\n \r\n \r\n \r\n A inutilização de número de NF-e/NFC-e tem a finalidade de permitir que o emissor comunique à Sefaz, até o décimo dia do mês subsequente os números de NF-e/NFC-e que não serão utilizados em razão de ter ocorrido uma quebra de sequência da numeração da NF-e/NFC-e. A inutilização de número só é possível caso a numeração ainda não tenha nenhum vinculo fiscal, ou seja, a numeração não pode estar associada a um Documento Fiscal autorizado, cancelado ou denegado.\r\n

\r\n Abaixo estão listadas todas as notas desta filial que não possuem vinculo fiscal e devem ser inutilizadas, notas rejeitadas ou em digitação lançadas a mais de 30 dias serão inutilizadas, notas em digitação lançadas a menos de 30 dias deverão ser selecionadas para incluir na solicitação de inutilização.\r\n
\r\n \r\n \r\n }\r\n {etapaAtual === etapas.processando &&\r\n
\r\n \r\n \r\n \r\n \r\n Processando solicitação de inutilização...\r\n \r\n \r\n Esta operação pode demorar um pouco, por favor aguarde.\r\n \r\n
\r\n }\r\n {etapaAtual === etapas.solicitacao &&\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {listaNfEmDititacaMenos30Dias.map((nota) => (\r\n
\r\n \r\n
\r\n (selecionarNota(nota))} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {retornaDescricaoStatus(nota.ntf_status)}\r\n \r\n \r\n \r\n \r\n {nota.mdf_id === '55' ? 'NF-e' : 'NFC-e'}\r\n \r\n \r\n \r\n \r\n Número: {nota.ntf_numero}\r\n \r\n \r\n Série: {nota.ser_numero} - {nota.ser_serie}\r\n \r\n \r\n Data/Hora de registro no sistema: {moment(nota.ntf_datainclusao).format('DD/MM/YYYY')} às {moment(nota.ntf_datainclusao).format('HH:mm')}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n {listaNfEmDititacaMais30Dias.map((nota) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Em Digitação\r\n \r\n \r\n \r\n {nota.mdf_id === '55' ? 'NF-e' : 'NFC-e'}\r\n \r\n \r\n \r\n \r\n Número: {nota.ntf_numero}\r\n \r\n \r\n Série: {nota.ser_numero} - {nota.ser_serie}\r\n \r\n \r\n Data/Hora de registro no sistema: {moment(nota.ntf_datainclusao).format('DD/MM/YYYY')} às {moment(nota.ntf_datainclusao).format('HH:mm')}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n {listaNfRejeitada.map((nota) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Rejeitada\r\n \r\n \r\n \r\n {nota.mdf_id === '55' ? 'NF-e' : 'NFC-e'}\r\n \r\n \r\n \r\n \r\n Número: {nota.ntf_numero}\r\n \r\n \r\n Série: {nota.ser_numero} - {nota.ser_serie}\r\n \r\n \r\n Data/Hora de registro no sistema: {moment(nota.ntf_datainclusao).format('DD/MM/YYYY')} às {moment(nota.ntf_datainclusao).format('HH:mm')}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {etapaAtual === etapas.retorno &&\r\n
\r\n \r\n \r\n \r\n \r\n Resultado da Solicitação de Inutilização\r\n \r\n \r\n
\r\n Solicitações de Inutilização:\r\n {qtdeNumerosInutilizar}\r\n \r\n \r\n \r\n \r\n Inutilizações realizadas com sucesso:\r\n {qtdeInutilizados}\r\n \r\n \r\n
\r\n {retornoInutilizacao.map((item) => (\r\n
\r\n \r\n
\r\n {item.retorno.xMotivo}\r\n \r\n \r\n {item.retorno.infInut.mod === '55' ? 'NF-e' : 'NFC-e'}\r\n \r\n \r\n Número: {item.retorno.infInut.nNFIni}\r\n \r\n \r\n Série: {item.retorno.infInut.serie}\r\n \r\n \r\n Protocolo: {item.retorno.infInut.nProt}\r\n \r\n \r\n Data/Hora de registro no sistema: {moment(item.retorno.infInut.dhRecbto).format('DD/MM/YYYY')} às {moment(item.retorno.infInut.dhRecbto).format('HH:mm')}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n }\r\n setOpenModal(false)} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Descriptions, Card, Tooltip, message, notification } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco, SelectProduto } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function FiltroProdutoOrc({ dadosTabela, form, btnEditando, itemEditando, }) {\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [consultaProduto, setConsultaProduto] = useState(false);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [listaProdutos, setListaProdutos] = useState([]);\r\n const refProd = useRef();\r\n\r\n const togglePesquisa = () => {\r\n setConsultaProduto(!consultaProduto);\r\n setExibirDetalhes(false);\r\n limparCampos();\r\n };\r\n\r\n useEffect(() => {\r\n if (consultaProduto && !!refProd && !!refProd.current) {\r\n refProd.current.focus();\r\n }\r\n }, [consultaProduto]);\r\n\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando])\r\n\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n setDesabilitarProd_id(true);\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n prg_id: dados.prg_id,\r\n pro_ean: dados.pro_ean,\r\n pro_descricao: dados.pro_descricao,\r\n ocp_quantidade: dados.ocp_quantidade,\r\n ocp_valorun: dados.ocp_valorun,\r\n });\r\n alterarValorTotal();\r\n dadosTemp = {\r\n pro_id: dadosEditando.pro_id,\r\n prg_id: dadosEditando.prg_id,\r\n pro_descricao: dadosEditando.pro_descricao,\r\n pro_codigo: dadosEditando.pro_codigo,\r\n pro_ean: dadosEditando.pro_ean,\r\n };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n\r\n function alterarValorTotal() {\r\n let total = 0;\r\n total = form.getFieldValue().ocp_quantidade * form.getFieldValue().ocp_valorun;\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.pro_id) {\r\n form.setFieldsValue({ pro_id: manutencao.dados.pro_id, ocp_quantidade: 1, });\r\n onChangeProID(manutencao.dados.pro_id);\r\n\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function popularLista(listaDados) {\r\n listaDados.sort((a, b) => b.key - a.key);\r\n dadosTabela.setItensOrdemCompra(listaDados);\r\n limparCampos();\r\n };\r\n\r\n\r\n function validarItem(dados) {\r\n if (dados.ocp_quantidade === 0 || !!!dados.ocp_quantidade) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade do Item Inválida!' });\r\n return false;\r\n }\r\n if (parseFloat(dados.ocp_valorun) === 0 || parseFloat(dados.ocp_valorun) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor do Item Inválido!' });\r\n return false\r\n }\r\n return true;\r\n }\r\n\r\n\r\n function adicionarItem(item = {}) {\r\n let dadosTemp = [...dadosTabela.itensOrdemCompra];\r\n let dadosFormulario = form.getFieldValue();\r\n let dados = {};\r\n if (consultaProduto) {\r\n dados = { ...item };\r\n dados.key = retornaSequencial(dadosTemp);\r\n adicionarItemOrdemCompra(dados, () => { dadosTemp.push(dados); });\r\n popularLista(dadosTemp);\r\n limparCampos()\r\n }\r\n else {\r\n if (!!validarItem(dadosFormulario)) {\r\n if (dadosTemp.find(campo => campo.pro_id === form.getFieldValue().pro_id\r\n && ((!!form.getFieldValue().prg_id && form.getFieldValue().prg_id === campo.prg_id) || !form.getFieldValue().prg_id))) {\r\n if (!!form.getFieldValue().prg_id) {\r\n dados = dadosTemp.find(campo => campo.prg_id === form.getFieldValue().prg_id);\r\n } else {\r\n dados = dadosTemp.find(campo => campo.pro_id === form.getFieldValue().pro_id);\r\n }\r\n adicionarItemOrdemCompra(dados);\r\n } else {\r\n dados = { ...dadosProduto };\r\n dados.key = retornaSequencial(dadosTemp);\r\n adicionarItemOrdemCompra(dados, () => { dadosTemp.push(dados); });\r\n }\r\n popularLista(dadosTemp);\r\n limparCampos()\r\n }\r\n }\r\n if (!!btnEditando && btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n function retornaSequencial(lista) {\r\n return lista.length > 0 ? lista[0].key + 1 : 0;\r\n };\r\n\r\n function adicionarItemOrdemCompra(dadosItem, callback) {\r\n\r\n let formulario = form.getFieldValue();\r\n dadosItem.ocp_quantidade = !!formulario.ocp_quantidade ? formulario.ocp_quantidade : 1;\r\n dadosItem.ocp_valorun = parseFloat(!!formulario.ocp_valorun ? formulario.ocp_valorun : dadosItem.ocp_valorun);\r\n dadosItem.grade = dadosItem.descricaograde;\r\n dadosItem.ocp_valortotal = parseFloat(dadosItem.ocp_valorun * dadosItem.ocp_quantidade);\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function cancelar() {\r\n limparCampos();\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null });\r\n setDadosProduto({})\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n async function buscarProdutoCodBarra(campo) {\r\n let dadosProduto = {};\r\n let codigoEan = campo.target.value.trim();\r\n let dados = await api.get(`Produto/ListaProdutoCodigo?filtro=${codigoEan}`);\r\n if (!!dados.data && dados.data.length > 0) {\r\n dadosProduto = dados.data[0];\r\n if (!!refProd && !!refProd.current) {\r\n refProd.current.focus();\r\n }\r\n }\r\n let unidade = await api.get(`Produto/BuscaUnidadeMedidaProduto?IdProduto=${dadosProduto.pro_id}`);\r\n let valor = 0;\r\n if (dadosProduto.prg_id != null) {\r\n valor = (await api.get(`Produto/BuscarCustoProduto?IdProduto=${dadosProduto.pro_id}&tipoCusto=2&codigoProdutoGrade=${dadosProduto.prg_id}`)).data;\r\n } else {\r\n valor = (await api.get(`Produto/BuscarCustoProduto?IdProduto=${dadosProduto.pro_id}&tipoCusto=2`)).data;\r\n }\r\n let custoProduto = valor;\r\n dadosProduto.ump_casasdecimais = 0;\r\n dadosProduto.ocp_quantidade = (dadosProduto.ocp_quantidade) ? dadosProduto.ocp_quantidade : 1;\r\n dadosProduto.ocp_valorun = (!!custoProduto) ? custoProduto : 0;\r\n dadosProduto.ocp_valortotal = parseFloat(dadosProduto.ocp_valorun * dadosProduto.ocp_quantidade);\r\n if (!!unidade.data) {\r\n dadosProduto.ump_casasdecimais = unidade.data[0].ump_casasdecimais;\r\n }\r\n setDadosProduto(dadosProduto);\r\n if (!!dados.data && dados.data.length > 0) {\r\n adicionarItem(dadosProduto);\r\n }\r\n };\r\n\r\n async function onChangeProID(pro_id) {\r\n let dadosProduto = listaProdutos.filter(pro => pro.key === pro_id)[0];\r\n let unidade = await api.get(`Produto/BuscaUnidadeMedidaProduto?IdProduto=${dadosProduto.pro_id}`);\r\n let valor = 0;\r\n if (dadosProduto.prg_id != null) {\r\n valor = (await api.get(`Produto/BuscarCustoProduto?IdProduto=${dadosProduto.pro_id}&tipoCusto=2&codigoProdutoGrade=${dadosProduto.prg_id}`)).data;\r\n } else {\r\n valor = (await api.get(`Produto/BuscarCustoProduto?IdProduto=${dadosProduto.pro_id}&tipoCusto=2`)).data;\r\n }\r\n let custoProduto = valor;\r\n dadosProduto.ump_casasdecimais = 0;\r\n dadosProduto.ocp_quantidade = (dadosProduto.ocp_quantidade) ? dadosProduto.ocp_quantidade : 1;\r\n dadosProduto.ocp_valorun = (!!custoProduto) ? custoProduto : 0;\r\n dadosProduto.ocp_valortotal = parseFloat(dadosProduto.ocp_valorun * dadosProduto.ocp_quantidade)\r\n\r\n if (!!unidade.data) {\r\n dadosProduto.ump_casasdecimais = unidade.data[0].ump_casasdecimais;\r\n }\r\n setDadosProduto(dadosProduto);\r\n form.setFieldsValue({ ocp_quantidade: dadosProduto.ocp_quantidade ?? 1, ocp_valorun: dadosProduto.ocp_valorun, valorTotalItem: dadosProduto.ocp_valortotal });\r\n\r\n setExibirDetalhes(true);\r\n let dadosTemp = {};\r\n dadosTemp.prg_id = dadosProduto.prg_id;\r\n dadosTemp.pro_descricao = `${dadosProduto.pro_descricao} ${!!dadosProduto.descricaograde ? \"-\" : \"\"} ${dadosProduto.descricaograde}`;\r\n dadosTemp.pro_codigo = dadosProduto.pro_codigo;\r\n dadosTemp.pro_ean = !!dadosProduto.prg_ean ? dadosProduto.prg_ean : dadosProduto.pro_ean;\r\n dadosTemp.ump_id = dadosProduto.ump_id;\r\n setDadosDetalhes(dadosTemp);\r\n };\r\n\r\n return (\r\n
\r\n \r\n {!!consultaProduto === false &&\r\n
\r\n \r\n { onChangeProID(dados) }} ordem={\"pro_descricao\"} setListaDados={setListaProdutos} />\r\n \r\n \r\n }\r\n {!!consultaProduto &&\r\n \r\n \r\n {\r\n buscarProdutoCodBarra(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {dadosDetalhes.pro_ean}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n }\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Select, Divider, Button, Typography, Table, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { Data, FormGW, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { ModalGradeOrdemCompra } from \"../../components/modals/\";\r\nimport FiltroProdutoOrc from \"../../components/filtroProdutoOrc\";\r\nimport { getIdUsuario } from \"../../services/auth\";\r\nimport SelectPaginado from '../../components/selectPaginado';\r\n\r\nexport default function ManutencaoOrdemCompra({ formulario, carregando, aoSalvar, transportador }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [openModalGradeOrdemCompra, setOpenModalGradeOrdemCompra] = useState(false);\r\n const [itensOrdemCompra, setItensOrdemCompra] = useState([]);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [pagina, setPagina] = useState(1);\r\n const [regPagina, setRegPagina] = useState(10);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n \r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarDados();\r\n if (!(!!formulario.getFieldValue().orc_datainclusao)) {\r\n formulario.setFieldsValue({ orc_datainclusao: moment(new Date()) });\r\n }\r\n if (!!manutencao.dados) {\r\n let lista = [];\r\n if (!!manutencao.dados.for_id) {\r\n lista.push({ name: \"for_id\", campo: \"FornecedorId\", value: manutencao.dados.for_id });\r\n }\r\n if (!!manutencao.dados.trn_id) {\r\n lista.push({ name: \"trn_id\", campo: \"IdTrasnportador\", value: manutencao.dados.trn_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n manutencao.dados.orc_dataconclusao = moment(manutencao.dados.orc_dataconclusao);\r\n manutencao.dados.orc_prazomaximo = moment(manutencao.dados.orc_prazomaximo);\r\n manutencao.dados.orc_datainclusao = moment(manutencao.dados.orc_datainclusao);\r\n if (!!manutencao.dados.orc_id && itensOrdemCompra.length === 0) {\r\n buscarItensOrdemCompra(manutencao.dados.orc_id);\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n let dados = {};\r\n dados.total = 0;\r\n dados.quantidade = 0;\r\n if (itensOrdemCompra.length > 0) {\r\n itensOrdemCompra.forEach((item) => {\r\n dados.total += parseFloat(item.ocp_valorun * item.ocp_quantidade);\r\n dados.quantidade += item.ocp_quantidade;\r\n });\r\n }\r\n formulario.setFieldsValue({ orc_valortotal: parseFloat(dados.total).toFixed(2) });\r\n dados.total += parseFloat(!!formulario.getFieldValue().orc_valorfrete ? formulario.getFieldValue().orc_valorfrete : 0);\r\n setTotalizadores(dados);\r\n }, [itensOrdemCompra]);\r\n\r\n async function salvarManutencao(values) {\r\n\r\n if (itensOrdemCompra.length > 0) {\r\n carregando(true);\r\n values.ordemcompraitens = itensOrdemCompra;\r\n values.orc_valorfrete = parseFloat(values.orc_valorfrete);\r\n if (!(!!values.orc_id)) {\r\n values.orc_status = 0;\r\n }\r\n\r\n if (typeof values.orc_id == 'undefined') delete values.orc_id;\r\n values.usu_id = getIdUsuario();\r\n\r\n try {\r\n var res = values.orc_id ? await api.put('OrdemCompra/Editar', values) : await api.post('OrdemCompra/Incluir', values);\r\n if (res.status == 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Ordem de Compra foram salvos com sucesso!\" });\r\n }\r\n } catch (error) {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(error.response) });\r\n } finally {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'É necessário informar pelo menos um item!' });\r\n }\r\n };\r\n\r\n function carregarDados() {\r\n\r\n if (!!formulario.getFieldValue().orc_id) {\r\n api.get(`OrdemCompraItem/ListarItensOrdemCompra?codigoOrdemCompra=${formulario.getFieldValue().orc_id}`).then(\r\n (res) => {\r\n let itens = res.data;\r\n itens.forEach((item, indice) => {\r\n if (!!item.prg_id) {\r\n item.grade = {\r\n prg_id: item.prg_id,\r\n grade: item.mgp_descricao,\r\n mgp_descricao: item.mgp_descricao,\r\n prg_ean: item.prg_ean,\r\n prg_codigoetiqueta: item.prg_codigoetiqueta,\r\n prg_valorvenda: item.lpi_valorvenda,\r\n }\r\n }\r\n if (indice + 1 === itens.length) {\r\n setItensOrdemCompra(itens);\r\n }\r\n });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n };\r\n\r\n function buscarItensOrdemCompra(orc_id) {\r\n api.get(`OrdemCompraItem/ListarItensOrdemCompra?codigoOrdemCompra=${orc_id}`).then(\r\n res => {\r\n setItensOrdemCompra(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n function atualizarValorTotalOC() {\r\n let dados = { ...totalizadores };\r\n dados.total = parseFloat(!!formulario.getFieldValue().orc_valortotal ? formulario.getFieldValue().orc_valortotal : 0) + parseFloat(!!formulario.getFieldValue().orc_valorfrete ? formulario.getFieldValue().orc_valorfrete : 0);\r\n setTotalizadores(dados);\r\n };\r\n\r\n function editarItem(registro) {\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n //dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n };\r\n\r\n function removerItem(item) {\r\n let dadosTemp = [...itensOrdemCompra];\r\n dadosTemp = dadosTemp.filter((dados) => dados !== item);\r\n setItensOrdemCompra(dadosTemp);\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({trn.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Produtos\" Produtos\r\n \r\n \r\n Adicione o(s) produto(s) para este ordem de compra aqui.\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {itensOrdemCompra.length > 0 &&\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n Grade: {!!mgp_descricao ? mgp_descricao : (!!grade ? grade : 'Não Possui')} \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Quantidade',\r\n align: 'center',\r\n width: 85,\r\n render: ({ ocp_quantidade }) => (\r\n
\r\n {ocp_quantidade}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Unitário (R$)',\r\n align: 'right',\r\n width: 150,\r\n render: ({ ocp_valorun }) => (\r\n
\r\n {FormatNumber(ocp_valorun || 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade de Itens: {totalizadores.quantidade}\r\n \r\n \r\n {itensOrdemCompra.length > 0 &&\r\n \r\n \r\n { atualizarValorTotalOC() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(totalizadores.total, true)}\r\n \r\n \r\n \r\n }\r\n setOpenModalGradeOrdemCompra(false)} />\r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoOrdemCompra from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerOrdemCompra({ carregarDados, alteraData, fornecedor, transportador }) {\r\n\r\n const [formOrdemCompra] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formOrdemCompra.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } }); \r\n alteraData();\r\n carregarDados();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n {fecharDrawer()}}\r\n visible={ui.showDrawer}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, InputNumber, Card } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { validarNumeros } from \"../../services/funcoes\";\r\nimport { FormasPagamentoRecebimento, InputPreco } from \"../../components\";\r\n\r\nexport default function TabFaturamento({ form, dadosItens, dadosOperacao }) {\r\n\r\n const [valorNota, setValorNota] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => {\r\n calcularFaturamento();\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n recalcularTotal();\r\n }, [valorNota]);\r\n\r\n function calcularFaturamento() {\r\n let formulario = form.getFieldValue();\r\n let subTotal = 0;\r\n dadosItens.forEach((item) => {\r\n subTotal += item.valorTotalDesconto;\r\n });\r\n form.setFieldsValue({ subTotalNotaFiscal: parseFloat(subTotal).toFixed(2)});\r\n\r\n setValorNota(parseFloat(subTotal) + validarNumeros(formulario.orc_valorfrete) + validarNumeros(formulario.orc_valorseguro) + validarNumeros(formulario.valorOutrasDespesas));\r\n\r\n recalcularTotal();\r\n };\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.percentualDesconto);\r\n let tot = parseFloat(valorNota);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualDesconto: result.toFixed(2) });\r\n }\r\n\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.percentualDesconto);\r\n let tot = parseFloat(valorNota);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualDesconto: result.toFixed(2) });\r\n }\r\n\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function calcularAcrescimo(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorAcrescimo);\r\n let perc = validarNumeros(formulario.percentualAcrescimo);\r\n let tot = (!!valorNota ? parseFloat(valorNota) : 0);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorAcrescimo: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualAcrescimo: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function recalcularTotal() {\r\n let formulario = form.getFieldValue();\r\n let valor = 0;\r\n if (!!formulario) {\r\n valor = valorNota - validarNumeros(formulario.valorDesconto) + validarNumeros(formulario.valorAcrescimo);\r\n form.setFieldsValue({ valorTotal: valor.toFixed(2) });\r\n let valorPago = 0; \r\n if (!!manutencao.dados && !!manutencao.dados.faturamento) {\r\n manutencao.dados.faturamento.forEach((dadosFat) => {\r\n valorPago += parseFloat(dadosFat.pfp_valor);\r\n });\r\n }\r\n form.setFieldsValue({ pfp_valor: (valor - valorPago).toFixed(2) });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Totais\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n calcularFaturamento()}\r\n className=\"text-right\" />\r\n \r\n \r\n calcularFaturamento()}\r\n className=\"text-right\" />\r\n \r\n \r\n calcularFaturamento()}\r\n className=\"text-right\" />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onChange={() => { calcularDesconto('PERC'); }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calcularDesconto('VALOR'); }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onChange={() => { calcularAcrescimo('PERC') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calcularAcrescimo('VALOR') }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, InputNumber, Tag, Table, Switch } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function TabItens({ form, dadosItens }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [totalizador, setTotalizador] = useState({});\r\n\r\n useEffect(() => {\r\n if (ui.showDrawerExtra) {\r\n ratearDescontoFrete();\r\n }\r\n }, [ui.showDrawerExtra]);\r\n\r\n function ratearDescontoFrete(item = [...dadosItens.dadosItens]) {\r\n\r\n var itensSemQuantidade = 0;\r\n var somaTotalOrdem = 0;\r\n let vlrTotalRecebendo = 0;\r\n let vlrTotalDesconto = 0;\r\n let somaRateio = 0;\r\n let resto = 0;\r\n let QtdeTotalRecebendo = 0;\r\n let frete = dadosItens.frete ?? 0;\r\n let totalSemDesc = 0;\r\n let valorTotal = 0;\r\n let percentualDesconto = (parseFloat(form.getFieldValue().percentualDesconto) / 100);\r\n\r\n item.forEach((itens) => {\r\n var valorTotalItem = itens.ocp_quantidade * itens.ocp_valorun;\r\n somaTotalOrdem += valorTotalItem;\r\n });\r\n\r\n item.forEach(itens => {\r\n var valorFrete = 0;\r\n var qtdrecebendo = form.getFieldValue(`ocp_qtdrecebendo${itens.key}`) ?? 0;\r\n var maximoItens = itens.ocp_quantidade - itens.ocp_quantidaderecebida;\r\n\r\n if (qtdrecebendo <= maximoItens) {\r\n itens.ocp_qtdrecebendo = qtdrecebendo;\r\n } else {\r\n itens.ocp_qtdrecebendo = maximoItens;\r\n }\r\n if (itens.max == true) {\r\n itens.ocp_qtdrecebendo = maximoItens;\r\n itens.qtdrecebendo = maximoItens;\r\n form.setFieldsValue({ [`ocp_qtdrecebendo${itens.key}`]: itens.qtdrecebendo })\r\n }\r\n\r\n itens.valorTotalDesconto = 0;\r\n itens.ocp_frete = 0;\r\n itens.ocp_desconto = 0;\r\n itens.desconto = 0;\r\n\r\n var totalItemRecebendo = qtdrecebendo * itens.ocp_valorun;\r\n var desconto = totalItemRecebendo * (!!percentualDesconto ? percentualDesconto : 0);\r\n\r\n itens.valorTotalDesconto = totalItemRecebendo;\r\n itens.desconto = desconto;\r\n itens.frete = valorFrete;\r\n vlrTotalDesconto = desconto;\r\n vlrTotalRecebendo += totalItemRecebendo;\r\n totalSemDesc += totalItemRecebendo;\r\n\r\n itensSemQuantidade++;\r\n });\r\n\r\n vlrTotalRecebendo = parseFloat(vlrTotalRecebendo.toFixed(2));\r\n totalSemDesc = parseFloat(totalSemDesc.toFixed(2));\r\n QtdeTotalRecebendo = item.length;\r\n\r\n var itensSemQuantidade = (item.length - itensSemQuantidade) < 0 ? true : false;\r\n\r\n if (somaRateio > 0 && itensSemQuantidade) {\r\n resto = parseFloat(vlrTotalRecebendo) - somaRateio;\r\n if (resto !== 0) {\r\n item[item.length - 1].valorTotalDesconto += resto;\r\n }\r\n }\r\n\r\n form.setFieldsValue({ orc_valortotal: vlrTotalRecebendo, totalSemDesc: totalSemDesc, frete: frete, QtdeTotalRecebendo: QtdeTotalRecebendo });\r\n setTotalizador({ valorTotal: vlrTotalRecebendo, totalSemDesc: totalSemDesc, totalDesconto: vlrTotalDesconto, QtdeTotalRecebendo: QtdeTotalRecebendo });\r\n dadosItens.setDadosItens(totalSemDesc);\r\n dadosItens.setDadosItens(valorTotal);\r\n dadosItens.setDadosItens(item);\r\n return item;\r\n };\r\n\r\n\r\n function switchReceber() {\r\n let valorTotal = 0;\r\n let qtdeTotalRecebendo = 0;\r\n let dados = [...dadosItens.dadosItens];\r\n dados.forEach(item => {\r\n item.max = true;\r\n item.ocp_qtdrecebendo = item.ocp_quantidade - item.ocp_quantidaderecebida;\r\n item.valorTotalDesconto = item.ocp_qtdrecebendo * item.ocp_valorun;\r\n form.setFieldsValue({ [`ocp_qtdrecebendo${item.key}`]: item.ocp_qtdrecebendo })\r\n if (item.ocp_qtdrecebendo > 0)\r\n qtdeTotalRecebendo++;\r\n\r\n valorTotal += item.valorTotalDesconto;\r\n })\r\n dadosItens.setDadosItens(dados);\r\n setTotalizador({ valorTotal: valorTotal, QtdeTotalRecebendo: qtdeTotalRecebendo });\r\n };\r\n\r\n\r\n function alteraQuantidadeItemRecebido(item, key) {\r\n\r\n let valorTotal = 0;\r\n let qtdrecebendo = form.getFieldValue(`ocp_qtdrecebendo${key}`)\r\n let dados = [...dadosItens.dadosItens];\r\n let i = dados.find(i => i.key == item.key)\r\n i.ocp_qtdrecebendo = qtdrecebendo\r\n i.valorTotalDesconto = i.ocp_qtdrecebendo * i.ocp_valorun;\r\n dadosItens.setDadosItens(dados);\r\n let itens = dadosItens.dadosItens.filter(r => r.ocp_qtdrecebendo > 0)\r\n itens.forEach(i =>{\r\n valorTotal += i.valorTotalDesconto;\r\n }) \r\n setTotalizador({ valorTotal: valorTotal, QtdeTotalRecebendo: itens.length });\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {\r\n switchReceber(item, item.key)}\r\n /> Receber Todos os Itens?\r\n }\r\n\r\n
\r\n
\r\n {\r\n !!dadosItens.dadosItens && dadosItens.dadosItens.length > 0 &&\r\n
(\r\n
\r\n \r\n
\r\n \r\n {key} \r\n \r\n {pro_id} - {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Qtde. Solic.',\r\n width: 20,\r\n align: 'center',\r\n render: ({ ocp_quantidade }) => (\r\n
\r\n {ocp_quantidade?.toFixed(0)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Recebido',\r\n align: 'center',\r\n width: 20,\r\n render: ({ ocp_quantidaderecebida }) => (\r\n
\r\n {ocp_quantidaderecebida}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde. Receber',\r\n align: 'center',\r\n width: 20,\r\n render: (item) => (\r\n
\r\n \r\n alteraQuantidadeItemRecebido(item, item.key)}\r\n className=\"w-60\" />\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 20,\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 40,\r\n render: ({ valorTotalDesconto }) => (\r\n
\r\n {FormatNumber(valorTotalDesconto, true)}\r\n
\r\n ),\r\n }\r\n ]} dataSource={dadosItens.dadosItens}\r\n\r\n scroll={{ x: 900 }} />\r\n }\r\n \r\n
\r\n \r\n
\r\n Quantidade Itens:\r\n \r\n \r\n {totalizador.QtdeTotalRecebendo}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n {FormatNumber(totalizador.valorTotal, true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Card, Form, Typography, Input, Divider, InputNumber } from \"antd\";\r\nimport { InputPreco } from \"../../components\";\r\n\r\nexport default function TabResumo({ form, dadosItens }) {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n IPI: R$ 0,00\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): 0,00\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Itens: {dadosItens.length} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Valor Total\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Steps, Select, Modal, notification, Spin } from \"antd\";\r\nimport moment from \"moment\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { TabFaturamento, TabItens, TabResumo } from './tabPage';\r\nimport { Data, FormGW, SelectPaginacao } from '../../components';\r\nimport { manutencaoActions, selectPaginadoActions } from '../../actions';\r\nimport { validaForm, validarNumeros } from '../../services/funcoes';\r\nimport SelectPaginado from '../../components/selectPaginado';\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function ManutencaoRecebimentoOrdemCompra({ carregarDados, form, carregando, aoSalvar, pages, proximaPag, alteraData }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const [dadosVendedor, setDadosVendedor] = useState({});\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const [formasPagamento, setFormasPagamento] = useState([]);\r\n const [operacaoFiscal, setOperacaoFiscal] = useState({});\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [frete, setFrete] = useState(0);\r\n const [editando, setEditando] = useState(false);\r\n\r\n const listaValidacoesDest = [\r\n { nome: 'ntf_dataemissao', obrigatorio: true, label: 'Data Lançamento' },\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' }\r\n ];\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarDados();\r\n if (!!manutencao.dados && !!manutencao.dados.ntf_id) {\r\n form.setFieldsValue(manutencao.dados);\r\n setEditando(true);\r\n } else {\r\n setEditando(false);\r\n }\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n\r\n useEffect(() => {\r\n if (!!ui.showDrawerExtra) {\r\n carregarDados();\r\n buscarItensOrdemCompra();\r\n form.setFieldsValue(manutencao.dados);\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n if (!!manutencao.dados) {\r\n let lista = [];\r\n if (!!manutencao.dados.recebimento.for_id) {\r\n lista.push({ name: \"for_id\", campo: \"FornecedorId\", value: manutencao.dados.recebimento.for_id });\r\n }\r\n if (!!manutencao.dados.recebimento.trn_id) {\r\n lista.push({ name: \"trn_id\", campo: \"IdTrasnportador\", value: manutencao.dados.recebimento.trn_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n }\r\n }, [ui.showDrawerExtra]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.faturamento) {\r\n setListaFormaPagamento(manutencao.dados.faturamento);\r\n }\r\n if (!!manutencao.dados.formaPgto && !!!manutencao.dados.antecipacao) {\r\n manutencao.dados.formaPgto.forEach((forma) => {\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && forma.fpg_quitacaoantecipacao) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ antecipacao: [{ valorAntecipacao: forma.nfp_valor }] } } } });\r\n }\r\n });\r\n }\r\n if (!!manutencao.dados.formaPgto && !!!manutencao.dados.faturamento) {\r\n manutencao.dados.formaPgto.forEach((formas) => {\r\n formas.pfp_valor = parseFloat(formas.nfp_valor);\r\n });\r\n let dadosFormaPgto = [...manutencao.dados.formaPgto];\r\n dadosFormaPgto = manutencao.dados.formaPgto.filter((dados) => dados.fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && !dados.fpg_quitacaoantecipacao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: dadosFormaPgto } } } });\r\n }\r\n\r\n\r\n if (!!manutencao.dados && !!manutencao.dados.dadosItens) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: listaItens } } } });\r\n setListaItens(manutencao.dados.Itens);\r\n setDadosItens(manutencao.dados.dadosItens);\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n\r\n useEffect(() => {\r\n\r\n if ((!!proximaPag.proximaPag || proximaPag.proximaPag === 0) && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n\r\n\r\n async function carregarDados() {\r\n setCarregarPagina(true);\r\n buscarItensOrdemCompra();\r\n\r\n let listaFormaPagamento = await api.get('FormaPagamento/Listar?Recebimento=2,3,4');\r\n if (listaFormaPagamento.status === 200) {\r\n setFormasPagamento(listaFormaPagamento.data);\r\n }\r\n let listaDadosContribuinte = await api.get('dadosContribuinte/Buscar');\r\n setCarregarPagina(false);\r\n if (listaDadosContribuinte.status === 200) {\r\n if (!!listaDadosContribuinte.data) {\r\n setDadosContribuinte(listaDadosContribuinte.data);\r\n } else {\r\n Modal.warning({\r\n title: 'Dados Contribuinte não parâmetrizados!',\r\n content: 'Favor parametrizar os dados do contribuinte'\r\n });\r\n aoSalvar();\r\n }\r\n }\r\n };\r\n\r\n function validarTrocaPg(pagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesDest;\r\n if (paginaAtual < pagina) {\r\n var recebendo = dadosItens.map(function (e) { return e.ocp_qtdrecebendo });\r\n var verifica = recebendo.reduce(function (verifica, i) {\r\n return verifica + i;\r\n });\r\n if (!!dadosItens && verifica === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Nota Fiscal deve ter ao menos 1 item!' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case 1:\r\n if (paginaAtual < pagina) {\r\n listaValidacoes = [];\r\n if (!validarFaturamento()) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n }\r\n if (validaForm(form, listaValidacoes)) {\r\n pages.setTagPages(pagina);\r\n } else {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n };\r\n\r\n function validarFaturamento() {\r\n let formulario = form.getFieldsValue();\r\n let retorno = true;\r\n let valorTotal = 0;\r\n let operacao = operacaoFiscal;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach(forma => {\r\n valorTotal += parseFloat(forma.pfp_valor);\r\n if (forma.editando == true) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor salvar as alterações em andamento nas parcelas(forma pagamento) para continuar!' });\r\n }\r\n });\r\n if (parseFloat(formulario.valorTotal) === 0) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso!', description: 'Valor da Nota Inválido!' });\r\n } else {\r\n if ((validarNumeros(formulario.valorTotal) == !parseFloat(valorTotal.toFixed(2))) || operacao.tip_id == !5) {\r\n notification.warning({ message: 'Aviso', description: 'Valor informado nas formas de pagamento é menor que o valor total da nota!' });\r\n }\r\n }\r\n } else {\r\n if (!!formulario.fpg_id) {\r\n let formaPagamento = formasPagamento.filter((forma) => (forma.fpg_id === formulario.fpg_id))[0];\r\n if (formaPagamento.fpg_tipoavistaaprazo === 1) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n } else {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n }\r\n return retorno;\r\n };\r\n\r\n function popularDadosItens() {\r\n let ordemcompraitens = [];\r\n dadosItens.forEach(itens => {\r\n let aux = { ...itens };\r\n aux.ocp_quantidaderecebidaanteriormente = itens.ocp_quantidaderecebida;\r\n aux.ocp_desconto = !!itens.ocp_desconto ? itens.ocp_desconto : form.getFieldValue().valorDesconto;\r\n aux.ocp_valortotal = form.getFieldValue().valorTotal;\r\n aux.ocp_quantidaderecebida = (itens.ocp_qtdrecebendo);\r\n aux.nfi_valorseguro = form.getFieldValue().valorSeguro;\r\n aux.nfi_valoroutros = form.getFieldValue().valorOutrasDespesas;\r\n ordemcompraitens.push(aux);\r\n })\r\n return ordemcompraitens;\r\n };\r\n\r\n function preencherDadosFaturamento() {\r\n let dadosForma = [];\r\n listaFormaPagamento.forEach(forma => {\r\n let aux = { ...forma };\r\n aux.fpg_id = forma.fpg_id;\r\n aux.cpg_id = forma.cpg_id;\r\n aux.nfp_valor = parseFloat(forma.pfp_valor);\r\n dadosForma.push(aux);\r\n });\r\n return dadosForma;\r\n };\r\n\r\n function buscarItensOrdemCompra(orc_id) {\r\n\r\n api.get(`OrdemCompraItem/ListarItensOrdemCompra?codigoOrdemCompra=${form.getFieldValue().orc_id}`).then(\r\n res => {\r\n let key = 1;\r\n res.data.forEach((itens) => {\r\n if (itens.pro_id != null) {\r\n itens.key = key++;\r\n itens.ean = !!itens.pro_ean ? itens.pro_ean : itens.prg_ean;\r\n itens.grade = itens.mgp_descricao;\r\n itens.ocp_qtdrecebendo = 0;\r\n itens.ocp_quantidade = itens.ocp_quantidade;\r\n itens.nfi_valorunitario = itens.ocp_valorun;\r\n itens.total = itens.ocp_valorun * itens.ocp_quantidade;\r\n itens.ocp_quantidaderecebida = !!itens.ocp_quantidaderecebida ? itens.ocp_quantidaderecebida : 0;\r\n itens.valorTotalDesconto = (itens.ocp_qtdrecebendo * itens.ocp_valorun);\r\n itens.ocp_frete = itens.ocp_frete;\r\n if (itens.ocp_qtdrecebendo === 0) {\r\n itens.bloquear = true;\r\n } else {\r\n itens.bloquear = false;\r\n }\r\n setDadosItens(itens);\r\n }\r\n });\r\n setDadosItens(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n };\r\n\r\n async function salvarDados(values) {\r\n console.log(\"values\", values);\r\n carregando(true);\r\n let dados = {};\r\n dados = { ...values };\r\n dados.orc_id = form.getFieldValue().orc_id;\r\n dados.for_id = form.getFieldValue().for_id;\r\n dados.orc_valorfrete = values.orc_valorfrete;\r\n dados.orc_valordesconto = values.valorDesconto;\r\n dados.orc_valoracrescimo = !!values.valorAcrescimo ? values.valorAcrescimo : form.getFieldValue().valorAcrescimo;\r\n dados.orc_valorseguro = !!values.orc_valorseguro ? values.orc_valorseguro : form.getFieldValue().orc_valorseguro;\r\n dados.ntf_numero = !!values.ntf_numero ? parseInt(values.ntf_numero) : form.getFieldValue().orc_id;\r\n dados.faturamento = preencherDadosFaturamento(values);\r\n dados.ordemcompraitens = popularDadosItens(dadosItens);\r\n\r\n try {\r\n var res = await api.post('OrdemCompra/Receber', dados);\r\n if (res.status == 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Ordem de Compra recebida com sucesso!\" });\r\n }\r\n } catch (error) {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(error.response) });\r\n } finally {\r\n carregando(false);\r\n aoSalvar();\r\n alteraData();\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {!!editando &&
\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n ({ser.ser_serie})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n (\r\n {forn.for_id} - {forn.pes_nome}\r\n {(!!forn.pej_cnpj ?
CNPJ: {forn.pej_cnpj}
: \"\")}\r\n
)\r\n }\r\n />\r\n
\r\n {/* \r\n ({forn.pes_nome})\r\n } />\r\n */}\r\n \r\n \r\n \r\n ({trn.pes_nome})\r\n } />\r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoRecebimentoOrdemCompra from './manutencaoRecebimento';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n//import FormasPagamentoRecebimento from '../../components';\r\n\r\nexport default function DrawerRecebimento({ carregarDados, alteraData, fornecedor, transportador, showDrawerExtra, setShowDrawerExtra }) {\r\n\r\n const [formRecebimentoOrdemCompra] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && manutencao.dados.recebimento !== null) {\r\n formRecebimentoOrdemCompra.setFieldsValue(manutencao.dados.recebimento);\r\n }\r\n\r\n function fecharDrawer() { \r\n setTagPages(0);\r\n setProximaPag(null);\r\n formRecebimentoOrdemCompra.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } }); \r\n alteraData();\r\n carregarDados();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n formRecebimentoOrdemCompra.resetFields();\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n fecharDrawer={() => {fecharDrawer()}}\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Dropdown, Menu, Divider, Modal, notification } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, EditOutlined, MoreOutlined, PrinterOutlined, EyeOutlined, UploadOutlined, CloseOutlined, SyncOutlined, SearchOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerOrdemCompra from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerRecebimento from './drawerRecebimento';\r\nimport { imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { FormatNumber, FormatDate } from \"../../ValueObjects\";\r\nimport { ModalDetalhesOrdemCompra } from \"../../components/modals\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaData, TabelaDados, Editar, Imprimir, Data, PesquisaOrdenacaoData } from \"../../components\";\r\nimport ComboData from \"../../components/comboData\";\r\n\r\nexport default function OrdemCompra() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [listaStatus, setListaStatus] = useState([]);\r\n const [listaFornecedor, setListaFornecedor] = useState([]);\r\n const [listaTransportador, setListaTransportador] = useState([]);\r\n const [open, setOpen] = useState(false);\r\n const [openModalDetalhes, setOpenModalDetalhes] = useState(false);\r\n const [dadosOrdemCompra, setDadosOrdemCompra] = useState({});\r\n const [form] = Form.useForm();\r\n const [formParam] = Form.useForm();\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [dataPesquisa]);\r\n\r\n function carregarDados() {\r\n let sql = \"\";\r\n sql += !!form.getFieldValue().dataInicial ? `&dataInicial=${form.getFieldValue().dataInicial.format('YYYY-MM-DD')}` : \"\";\r\n sql += !!form.getFieldValue().dataFinal ? `&dataFinal=${form.getFieldValue().dataFinal.format('YYYY-MM-DD')}` : \"\";\r\n sql += !!form.getFieldValue().for_id ? `&IdFornecedor=${form.getFieldValue().for_id}` : '';\r\n sql += !!form.getFieldValue().trn_id ? `&IdTransportador=${form.getFieldValue().trn_id}` : '';\r\n sql += !!form.getFieldValue().status ? `&status=${form.getFieldValue().status.join(',')}` : '&status=0,1,2,3';\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-orc_datainclusao', outrosFiltros: sql } });\r\n\r\n api.get('Enum/Listar?nome=StatusOrdemCompra').then(\r\n (res) => {\r\n setListaStatus(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n api.get('Fornecedor/Listar?Order=+pes_nome').then(\r\n (res) => {\r\n setListaFornecedor(res.data.items);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n\r\n api.get('Transportador/ListarTransportador?Order=+pes_nome').then(\r\n (res) => {\r\n setListaTransportador(res.data.items);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n if (!!form.getFieldValue().dataInicial) {\r\n form.setFieldsValue({ dataFinal: moment(new Date()), dataInicial: moment(form.getFieldValue().dataInicial) });\r\n } else {\r\n form.setFieldsValue({ dataFinal: moment(new Date()), dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n }\r\n };\r\n\r\n function aplicarFiltrosAvancados() {\r\n let dados = form.getFieldValue();\r\n let dataIni = dados.dataInicial;\r\n let dataFim = dados.dataFinal;\r\n let dataInicial = (!!dataIni ? moment(dataIni) : moment(dados.dataPesquisa));\r\n let dataFinal = (!!dataFim ? moment(dataFim) : moment(new Date));\r\n form.setFieldsValue({ dataFinal: dataFinal });\r\n form.setFieldsValue({ dataInicial: dataInicial });\r\n carregarDados();\r\n };\r\n\r\n function cancelarOrdem(orc_id) {\r\n Modal.confirm({\r\n title: 'Deseja Cancelar essa Ordem de Compra?',\r\n icon: ,\r\n onOk() {\r\n api.delete(`OrdemCompra/CancelarOrdemCompra?IdOrdemCompra=${orc_id}`).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Ordem de Compra cancelada com sucesso!\" });\r\n carregarDados();\r\n alteraData();\r\n }\r\n }, err => {\r\n notification.error({ message: 'Aviso!', description: \"Não foi possível cancelar a ordem de compra!\" });\r\n });\r\n }\r\n });\r\n };\r\n\r\n function cancelarOrdemRecebida(orc_id) {\r\n Modal.confirm({\r\n title: 'Deseja Cancelar essa Ordem de Compra? (Essa Ordem de Compra já foi recebida!)',\r\n icon: ,\r\n onOk() {\r\n api.delete(`OrdemCompra/CancelarOrdemCompra?IdOrdemCompra=${orc_id}`).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Ordem de Compra cancelada com sucesso!\" });\r\n carregarDados();\r\n alteraData();\r\n }\r\n }, err => {\r\n notification.error({ message: 'Aviso!', description: \"Não foi possível cancelar a ordem de compra!\" });\r\n });\r\n }\r\n });\r\n };\r\n\r\n function abrirDetalhesOrdemCompra(dados) {\r\n setDadosOrdemCompra(dados);\r\n setOpenModalDetalhes(true);\r\n };\r\n\r\n function imprimirOrdemCompra(record) {\r\n imprimirRelatorioJasper(47, { IdOrdemCompra: record.orc_id });\r\n };\r\n\r\n function menuTable(dados) {\r\n\r\n return (\r\n \r\n {dados.orc_status === 0 &&\r\n \r\n \r\n \r\n }\r\n {(dados.orc_status === 0 || dados.orc_status === 1 || dados.orc_status === 4) &&\r\n \r\n \r\n \r\n }\r\n \r\n } onClick={() => imprimirOrdemCompra(dados)}> Imprimir \r\n \r\n {\r\n \r\n \r\n \r\n }\r\n {(dados.orc_status === 1 || dados.orc_status === 2) &&\r\n \r\n \r\n \r\n }\r\n {(dados.orc_status === 1 || dados.orc_status === 2) &&\r\n \r\n \r\n \r\n }\r\n \r\n )\r\n }\r\n\r\n function reabrirOrdemCompra(orc_id) {\r\n Modal.confirm({\r\n title: 'Deseja Reabrir essa Ordem de Compra? (Essa Ordem de Compra já foi recebida!)',\r\n icon: ,\r\n async onOk() {\r\n await api.put(`OrdemCompra/ReabrirOrdemCompraRecebida?IdOrdemCompra=${orc_id}`).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Ordem de compra reaberta com sucesso!\" });\r\n carregarDados();\r\n alteraData();\r\n }\r\n }, err => {\r\n notification.error({ message: 'Aviso!', description: \"Não foi possível reabrir a ordem de compra!\" });\r\n });\r\n }\r\n });\r\n };\r\n\r\n function retornaDescricaoStatus(orc_status) {\r\n if (!!listaStatus) {\r\n return listaStatus.filter((status) => (\r\n status.key === orc_status\r\n ))[0].value;\r\n }\r\n };\r\n\r\n function editarOrdemCompra(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n function alteraData() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${FormatDate(new Date().toLocaleDateString())}&dataInicial=${moment(form.getFieldValue().dataPesquisa).format('YYYY-MM-DD')}` } });\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n }\r\n\r\n function limparFiltroPesquisa() {\r\n form.setFieldsValue({ for_id: null, trn_id: null, dataInicial: moment(form.getFieldValue().dataPesquisa), dataFinal: moment(new Date()) })\r\n dispatch({\r\n type: listagemActions.CHANGE, data: { ordem: '+orc_datainclusao' }\r\n })\r\n\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n \r\n {retornaDescricaoStatus(orc_status)} \r\n \r\n \r\n \r\n \r\n \r\n \r\n {orc_id}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ nomeFornecedor, orc_nropedido, orc_atendente, orc_valortotal, orc_datainclusao, orc_prazomaximo, orc_dataconclusao, nomeTransportador, orc_valorfrete, orc_valordesconto }) => (\r\n
\r\n \r\n
\r\n {nomeFornecedor}\r\n \r\n \r\n \r\n \r\n Nº Pedido: {orc_nropedido || 'Não Informado'}\r\n \r\n \r\n Atendente: {orc_atendente || 'Não Informado'}\r\n \r\n \r\n Transportador: {nomeTransportador || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Lançamento: {moment(orc_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Prazo: {moment(orc_prazomaximo).format('DD/MM/YYYY')}\r\n \r\n \r\n Conclusão:\r\n {!!orc_dataconclusao ? moment(orc_dataconclusao).format('DD/MM/YYYY') : 'Não'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total itens (R$): {FormatNumber(orc_valortotal, true, false)}\r\n \r\n \r\n Frete (R$): {FormatNumber(!!orc_valorfrete ? orc_valorfrete : 0, true, false)}\r\n \r\n \r\n Desconto (R$): {FormatNumber(!!orc_valordesconto ? orc_valordesconto : 0, true, false)}\r\n \r\n \r\n Total (R$): {FormatNumber(orc_valortotal + orc_valorfrete - orc_valordesconto, true, false)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n\r\n \r\n {(record.orc_status === 0) &&
\r\n {\r\n editarOrdemCompra(record);\r\n }} icon={} />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n } onClick={() => { imprimir(record) }}> Imprimir \r\n \r\n \r\n \r\n \r\n \r\n } onClick={() => { abrirEnvioWhats(record) }}> Enviar WhatsApp \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${moment(form.getFieldValue().dataPesquisa).format(\"YYYY-MM-DD\")}` } })\r\n form.setFieldsValue({ dataFinal: moment(new Date) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n }}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n {orc_numero}\r\n \r\n
\r\n )\r\n },\r\n {\r\n title: \"\",\r\n render: ({ pes_nome, pef_cpf, pej_cnpj, pes_telefone, orc_datainclusao, orc_datavalidade, qtditem }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n CPF/CNPJ: {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n \r\n \r\n Telefone: {!!pes_telefone ? (FormatFone(pes_telefone)) : 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Emissão: {moment(orc_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Entrega: {moment(orc_datavalidade).format('DD/MM/YYYY')}\r\n \r\n \r\n Quant.: {!!qtditem ? qtditem : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total do Orçamento (R$)\",\r\n align: 'right',\r\n width: 180,\r\n render: ({ orc_valortotal }) => (\r\n
\r\n {FormatNumber(orc_valortotal, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Permite emissão da NF-e?\r\n \r\n \r\n \r\n \r\n Permite edição do Pedido?\r\n \r\n \r\n {/* \r\n \r\n Concluir pedido neste Status?\r\n \r\n \r\n \r\n \r\n Cancelar pedido neste Status?\r\n \r\n */}\r\n \r\n \r\n Status Ativo?\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoStatusPedido from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerStatusPedido() {\r\n\r\n const [formStatusPedido] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (manutencao.dados !== null) formStatusPedido.setFieldsValue(manutencao.dados);\r\n else {\r\n formStatusPedido.setFieldsValue({mar_ativa:true});\r\n }\r\n\r\n const [ carregando, setCarregando ] = useState(false);\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n formStatusPedido.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, notification, Modal, Radio, Form } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerStatusPedido from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, BotaoIncluirDados, BreadcrumbPage } from \"../../components\";\r\n\r\nexport default function StatusPedido() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formPesquisa] = Form.useForm();\r\n\r\n useEffect(() => {\r\n let _ativo = !!!formPesquisa.getFieldsValue().statusAtivo ? 1 : formPesquisa.getFieldsValue().statusAtivo;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${_ativo}`, filtro: '', ordem: '+stp_descricao' } });\r\n formPesquisa.setFieldsValue({ statusAtivo: 1 });\r\n }, [])\r\n\r\n function aplicarFiltros() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+stp_descricao' } });\r\n }\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`StatusPedido/Excluir/${dados.stp_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n modalInativarRegistro(dados);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+stp_descricao' } });\r\n });\r\n }\r\n\r\n function inativarRegistro(dados) {\r\n dados.stp_ativo = false;\r\n api.put(`StatusPedido/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Status inativado com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&Ativo=${formPesquisa.getFieldsValue().statusAtivo}`, ordem: '+stp_descricao' } });\r\n }\r\n )\r\n }\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir a Status ${dados.stp_descricao}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a Status: ${dados.stp_id} - ${dados.stp_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function duplicarStatus(record) {\r\n let valores = { ...record };\r\n valores.stp_id = null;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function editarStatus(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n aplicarFiltros()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {stp_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Status',\r\n render: ({ stp_descricao }) => (\r\n
\r\n {stp_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Status para Pedido Cancelado?: {(stp_pedidocancelado) ? 'Sim' : 'Não'}\r\n \r\n \r\n Status para Pedido Concluído?: {(stp_pedidoconcluido) ? 'Sim' : 'Não'}\r\n \r\n \r\n Permite Editar Pedido?: {(stp_permiteeditarpedido) ? 'Sim' : 'Não'}\r\n \r\n \r\n Permite Emitir NF-e?: {(stp_permiteemissaonf) ? 'Sim' : 'Não'}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React from 'react';\r\nimport { Modal } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { manutencaoActions } from '../../actions';\r\nimport { DetalhePedido } from \"../../components\";\r\n\r\nexport default function ModalDetalhePedido({ exibirModal, fecharModal, dadosModal }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const onClose = () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharModal();\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoNotaFiscal from '../notaFiscal/manutencao';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerNF({ showDrawerExtra, setShowDrawerExtra, dadosNFE }) {\r\n\r\n const [formNotaFiscal] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [formulario] = Form.useForm();\r\n\r\n useEffect(() => {\r\n if (!!dadosNFE) {\r\n formulario.setFieldsValue(dadosNFE);\r\n }\r\n }, [dadosNFE])\r\n\r\n \r\n function fecharDrawer() {\r\n formNotaFiscal.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bped_datainclusao' } });\r\n setShowDrawerExtra(false)\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoNotaFiscalTransferencia from '../notaFiscalTransferencia/manutencao';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerTransferencia({ abrirDrawer, fecharDrawer, dadosPedido }) {\r\n\r\n const [formNotaFiscal] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [limparDados, setLimparDados] = useState(false);\r\n const [formulario] = Form.useForm();\r\n\r\n function fechar() {\r\n formNotaFiscal.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bped_datainclusao' } });\r\n fecharDrawer(false)\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n setLimparDados(true);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fechar();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Button, Modal, Row } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, FileOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalSelecionarNF({ exibirModal, fecharModal, drawerNFSE, drawerNF }) {\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n >\r\n \r\n \r\n \r\n \r\n Qual Documento Fiscal Deseja emitir?\r\n \r\n \r\n O pedido possui Produtos e Serviços.
\r\n Selecione o ducumento fiscal que deseja emitir primeiro.\r\n
\r\n \r\n )\r\n}","import { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, LeftOutlined, MinusOutlined, RightOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport NFServico from \"../notaFiscalServico/manutencao\";\r\n\r\nexport default function DrawerNFSE({ showDrawerExtra, setShowDrawerExtra, dadosNFSE }) {\r\n const [formServico] = Form.useForm();\r\n const [formulario] = Form.useForm();\r\n const [{ ui, manutencao}, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [resume, setResume] = useState(false);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n const ActionsController = () => {\r\n setProximaPag(tagPages - 1);\r\n setResume(false);\r\n }\r\n\r\n useEffect(() => {\r\n if (!!dadosNFSE) {\r\n formulario.setFieldsValue(dadosNFSE);\r\n }\r\n }, [dadosNFSE])\r\n\r\n function fecharDrawer() {\r\n formServico.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n setResume(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bped_datainclusao' } });\r\n setShowDrawerExtra(false);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n })\r\n }\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Dropdown, Menu, notification, Modal } from \"antd\";\r\nimport {\r\n ArrowDownOutlined, ArrowUpOutlined, EditOutlined, CloseOutlined, ExclamationCircleOutlined, PrinterOutlined, MoreOutlined, EyeOutlined, CopyOutlined, DollarOutlined,\r\n FileDoneOutlined, PlusOutlined, WhatsAppOutlined\r\n} from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport ModalDetalhePedido from \"./modalDetalhePedido\";\r\nimport { HasValue, imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { FormatNumber, MaskFormat, FormatFone } from \"../../ValueObjects\";\r\nimport { DrawerNF, DrawerPedidos, DrawerTransferencia } from './drawerPage';\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacaoData, TabelaDados, Imprimir, Data, PesquisaAvancada, BreadcrumbPage } from \"../../components\";\r\nimport ModalSelecionarNF from \"./modalSelecionarNF\";\r\nimport DrawerNFSE from \"./drawerNFSE\";\r\nimport { ModalEnvioPedidoWhats, ModalSelecionaRelatorio } from \"../../components/modals/\";\r\n\r\nexport default function Pedidos() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [open, setOpen] = useState(false);\r\n const [openModalDetalhePedido, setOpenModalDetalhePedido] = useState(false);\r\n const [dadosDetalhesPedido, setDadosDetalhesPedido] = useState({});\r\n const [formPedidos] = Form.useForm();\r\n const [idPedido, setIdPedido] = useState(0);\r\n const [status, setStatus] = useState([]);\r\n const [showDrawerNF, setShowDrawerNF] = useState(false);\r\n const [showDrawerNFSE, setShowDrawerNFSE] = useState(false);\r\n const [openModalEscolha, setOpenModalEscolha] = useState(false);\r\n const [drawerTransferencia, setDrawerTransferencia] = useState(false);\r\n const [dadosPedido, setDadosPedido] = useState({});\r\n const [dadosNFSE, setDadosNFSE] = useState({});\r\n const [dadosNF, setDadosNF] = useState({});\r\n const [exibirDrawerPedidos, setExibirDrawerPedidos] = useState(false);\r\n const [openPedidoWhats, setOpenPedidoWhats] = useState(false);\r\n const [openModalSelecionaRelatorio, setOpenModalSelecionaRelatorio] = useState(false);\r\n const [dadosDetalhesRelatorio, setDadosDetalhesRelatorio] = useState({});\r\n const [parametrosLocal, setParametrosLocal] = useState({});\r\n\r\n useEffect(() => {\r\n carregarStatus();\r\n verificarTelefone();\r\n formPedidos.setFieldsValue({ ativoPedido: [\"1\"] });\r\n }, []);\r\n\r\n function carregarPrimeiraVez() {\r\n let ativo = 2;//Toodos\r\n if (formPedidos.getFieldValue().ativoPedido.length == 1) {\r\n if (formPedidos.getFieldValue().ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (formPedidos.getFieldValue().ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n let filtro = `&Ativo=${ativo}`;\r\n let status = !!formPedidos.getFieldValue().status ? formPedidos.getFieldValue().status : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao', outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${moment(formPedidos.getFieldValue().dataPesquisa).format(\"YYYY-MM-DD\")}&filtro=&status=${status}` + filtro } })\r\n formPedidos.setFieldsValue({ dataFinal: moment(new Date) });\r\n formPedidos.setFieldsValue({ dataInicial: moment(formPedidos.getFieldValue().dataPesquisa) });\r\n };\r\n\r\n\r\n async function verificarTelefone() {\r\n let verificaTelefone = (await api.get(`ParametroLocal/BuscarParametros`)).data;\r\n setParametrosLocal(verificaTelefone);\r\n }\r\n\r\n function carregarStatus() {\r\n let key = 0;\r\n api.get(`StatusPedido/Listar`).then(\r\n res => {\r\n let listaStatus = []\r\n res.data.items.forEach(item => {\r\n item.key = key++;\r\n listaStatus.push(item.stp_id);\r\n });\r\n setStatus(res.data.items);\r\n formPedidos.setFieldsValue({ status: listaStatus });\r\n carregarPrimeiraVez();\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n );\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n function editarPedido(record) {\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n setExibirDrawerPedidos(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n };\r\n\r\n const modalConfirm = (record) => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Tem certeza que deseja cancelar esse pedido?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n cancelarPedido(record);\r\n }\r\n });\r\n }\r\n\r\n async function abrirEnvioWhats(record) {\r\n if (typeof parametrosLocal?.par_numerowhatsapp === \"string\" && parametrosLocal.par_numerowhatsapp.trim() !== \"\") {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } })\r\n setOpenPedidoWhats(true);\r\n } else {\r\n notification.info({ message: 'Operação não permitida', description: \"Cliente sem telefone cadastrado nas Configurações do Local!\" });\r\n return;\r\n }\r\n }\r\n\r\n\r\n function recarregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-orc_datainclusao' } });\r\n };\r\n\r\n function cancelarPedido(record) {\r\n api.post(`Pedido/CancelarPedido?IdPedido=${record.ped_id}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Pedido cancelado com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } });\r\n }\r\n );\r\n };\r\n\r\n //#region faturar pedidos\r\n async function emitirNf(record) {\r\n let itensPedido = await api.get(`PedidoItem/ListarItensPedido?codigoPedido=${record.ped_id}`);\r\n record.itensNf = itensPedido.data;\r\n\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ntf_modalidadefrete = record.ped_modalidadefrete;\r\n record.itensNf.forEach((item) => {\r\n item.nfi_valorunitario = item.pdi_valorunitario;\r\n item.nfi_qtde = item.pdi_quantidade;\r\n item.nfi_valordesconto = item.pdi_valordesconto;\r\n item.nfi_valoroutros = item.pdi_valoracrescimo;\r\n item.nfi_ean = !!item.prg_ean ? item.prg_ean : item.pro_ean;\r\n item.total = (item.pdi_valorunitario * item.pdi_quantidade) - item.pdi_valordesconto + item.pdi_valoracrescimo;\r\n item.percdesc = !!item.nfi_valordesconto ? (item.nfi_valordesconto * 100) / item.total : 0;\r\n item.percacresc = !!item.nfi_valoroutros ? (item.nfi_valoroutros * 100) / item.total : 0;\r\n item.nfi_numeropedidocompra = record.ped_numero;\r\n });\r\n record.faturamento = record.formaPgto;\r\n\r\n tratarDevolvidoFaturado(record);\r\n setDadosPedido(record);\r\n\r\n let temServico = record.itensNf.some(item => item.pro_servico === true);\r\n let soServico = record.itensNf.every(item => item.pro_servico === true);\r\n\r\n if (temServico && !soServico) {\r\n setOpenModalEscolha(true);\r\n } else if (soServico) {\r\n tratarFaturamentoNFSe(record);\r\n setDadosNFSE(record);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n setShowDrawerNFSE(true);\r\n } else {\r\n tratarFaturamentoNFe(record);\r\n setDadosNF(record);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n setShowDrawerNF(true);\r\n }\r\n };\r\n\r\n function tratarDevolvidoFaturado(dados) {\r\n if (!dados || !dados.itensNf) return dados;\r\n\r\n dados.itensNf = dados.itensNf.map(item => {\r\n let result = item.pdi_quantidade - item.pdi_qtdedevolvido - item.pdi_qtdeentregue;\r\n if (result === 0) {\r\n return null;\r\n } else if (result > 0) {\r\n item.pdi_quantidade = result;\r\n return item;\r\n }\r\n }).filter(item => item !== null);\r\n\r\n return dados;\r\n }\r\n\r\n function tratarFaturamentoNFSe(record) {\r\n if (record.formaPgto.length > 1) { //CONDIÇÃO PARA QUANDO SE EXISTE MAIS DE UMA FORMA DE PAGAMENTO\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0); //VALOR TOTAL INICIAL\r\n let porcentagens = record.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal); //CALCULA A PORCENTAGEM DE CADA FORMA\r\n\r\n let somaValorPagos = 0; //CALCULA OS NOVOS VALORES DAS FORMAS DE PAGAMENTO\r\n for (let i = 0; i < record.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * valorTotal).toFixed(2));\r\n record.formaPgto[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((valorTotal - somaValorPagos).toFixed(2)); //DEFINE O VALOR DA ULTIMA FORMA COM O RESTANTE\r\n record.formaPgto[record.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n record.faturamento[record.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n record.formaPgto[0].pfp_valor = valorTotal;\r\n record.faturamento[0].pfp_valor = valorTotal;\r\n }\r\n\r\n return record;\r\n }\r\n\r\n function tratarFaturamentoNFe(record) {\r\n if (record.formaPgto.length > 1) {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n let porcentagens = record.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal);\r\n\r\n let somaValorPagos = 0;\r\n for (let i = 0; i < record.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * valorTotal).toFixed(2));\r\n record.formaPgto[i].pfp_valor = novoValor;\r\n record.faturamento[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((valorTotal - somaValorPagos).toFixed(2));\r\n record.formaPgto[record.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n record.faturamento[record.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n record.formaPgto[0].pfp_valor = valorTotal;\r\n record.faturamento[0].pfp_valor = valorTotal;\r\n }\r\n\r\n return record;\r\n }\r\n\r\n function nfseEscolhida() {\r\n //FUNÇÃO EXECUTADA QUANDO NF DE SERVIÇO É ESCOLHIDA\r\n let dadosTemp = {}\r\n if (dadosPedido.formaPgto.length > 1) { //CONDIÇÃO PARA QUANDO SE EXISTE MAIS DE UMA FORMA DE PAGAMENTO\r\n let valorTotal = dadosPedido.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0); //VALOR TOTAL INICIAL\r\n let porcentagens = dadosPedido.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal); //CALCULA A PORCENTAGEM DE CADA FORMA\r\n\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_servico === true) //FILTRA APENAS OS SERVIÇOS\r\n };\r\n\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n\r\n let somaValorPagos = 0; //CALCULA OS NOVOS VALORES DAS FORMAS DE PAGAMENTO\r\n for (let i = 0; i < dadosTemp.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * novoValorTotal).toFixed(2));\r\n dadosTemp.formaPgto[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((novoValorTotal - somaValorPagos).toFixed(2)); //DEFINE O VALOR DA ULTIMA FORMA COM O RESTANTE\r\n dadosTemp.formaPgto[dadosTemp.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n dadosTemp.faturamento[dadosTemp.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_servico === true)\r\n };\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n dadosTemp.formaPgto[0].pfp_valor = novoValorTotal;\r\n dadosTemp.faturamento[0].pfp_valor = novoValorTotal;\r\n }\r\n\r\n setDadosNFSE(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNFSE(true);\r\n setOpenModalEscolha(false);\r\n }\r\n\r\n function nfEscolhida() {\r\n //FUNÇÃO EXECUTADA QUANDO NF É ESCOLHIDA\r\n let dadosTemp = {}\r\n if (dadosPedido.formaPgto.length > 1) {\r\n let valorTotal = dadosPedido.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n let porcentagens = dadosPedido.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal);\r\n\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_produto === true)\r\n };\r\n\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n\r\n let somaValorPagos = 0;\r\n for (let i = 0; i < dadosTemp.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * novoValorTotal).toFixed(2));\r\n dadosTemp.formaPgto[i].pfp_valor = novoValor;\r\n dadosTemp.faturamento[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((novoValorTotal - somaValorPagos).toFixed(2));\r\n dadosTemp.formaPgto[dadosTemp.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n dadosTemp.faturamento[dadosTemp.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_produto === true)\r\n };\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n dadosTemp.formaPgto[0].pfp_valor = novoValorTotal;\r\n dadosTemp.faturamento[0].pfp_valor = novoValorTotal;\r\n }\r\n\r\n setDadosNF(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNF(true);\r\n setOpenModalEscolha(false);\r\n }\r\n //#endregion\r\n\r\n async function emitirTransferencia(record) {\r\n let itensPedido = await api.get(`PedidoItem/ListarItensPedido?codigoPedido=${record.ped_id}`);\r\n record.itensNf = itensPedido.data;\r\n record.loc_id = record.loc_id_transferencia;\r\n record.custo = record.ped_precoutilizado;\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ntf_modalidadefrete = record.ped_modalidadefrete;\r\n record.itensNf.forEach((item) => {\r\n item.nfi_valorunitario = item.pdi_valorunitario;\r\n item.nfi_qtde = item.pdi_quantidade;\r\n item.nfi_valordesconto = item.pdi_valordesconto;\r\n item.nfi_valoroutros = item.pdi_valoracrescimo;\r\n item.nfi_ean = item.pro_ean;\r\n item.total = item.pdi_valorunitario * item.pdi_quantidade;\r\n item.percdesc = !!item.nfi_valordesconto ? (item.nfi_valordesconto * 100) / item.total : 0;\r\n item.percacresc = !!item.nfi_valoroutros ? (item.nfi_valoroutros * 100) / item.total : 0;\r\n item.nfi_numeropedidocompra = record.ped_numero;\r\n });\r\n record.faturamento = record.formaPgto;\r\n setDadosPedido(record);\r\n setDrawerTransferencia(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n };\r\n\r\n async function visualizarPedido(record) {\r\n let itensPedido = await api.get(`PedidoItem/ListarItensPedido?codigoPedido=${record.ped_id}`);\r\n record.itensNf = itensPedido.data;\r\n setDadosDetalhesPedido(record);\r\n setOpenModalDetalhePedido(true);\r\n };\r\n\r\n async function imprimirPedido(record) {\r\n let relatorioPadrao = (await api.get(`ParametroLocal/BuscarParametros`)).data;\r\n if (relatorioPadrao.par_relatoriopedido != null && relatorioPadrao.par_relatoriopedido != \"undefined\") {\r\n //ajustar para chamar o relatorio de pedido ajustar quando tiver o relatorio padrão 29 deve ser trocado pelo codigo do relatorio padrão se houver\r\n //imprimirRelatorioJasper(29, { idPedido: record.ped_id });\r\n imprimirRelatorioJasper(relatorioPadrao.par_relatoriopedido, { idPedido: record.ped_id });\r\n } else {\r\n record = {\r\n ...record, // Mantém os valores originais de record\r\n grj_id: 10,\r\n parametrosImpresao: { idPedido: record.ped_id },\r\n parametrosLocal: parametrosLocal // Adiciona parametrosLocal corretamente\r\n };\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } })\r\n setDadosDetalhesRelatorio(record);\r\n setOpenModalSelecionaRelatorio(true);\r\n }\r\n };\r\n\r\n function abrirDrawerPedido() {\r\n setExibirDrawerPedidos(true)\r\n }\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n {(record.ped_ativo === true && record.stp_pedidoconcluido === false && record.stp_permiteemissaonf === true && !!!record.loc_id_transferencia) &&\r\n \r\n \r\n \r\n }\r\n {(record.ped_ativo === true && record.stp_permiteeditarpedido === true) &&\r\n \r\n \r\n \r\n }\r\n {(record.ped_ativo === true && record.stp_pedidoconcluido === false && record.stp_permiteemissaonf === true && !!record.loc_id_transferencia) &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n } onClick={() => imprimirPedido(record)}> Imprimir \r\n \r\n \r\n } onClick={() => abrirEnvioWhats(record)}> Enviar WhatsApp \r\n \r\n \r\n )\r\n };\r\n\r\n async function duplicarPedido(record) {\r\n let pedidoDuplicar = { ...record }\r\n pedidoDuplicar.ped_datainclusao = moment(new Date());\r\n pedidoDuplicar.ped_dataprevisaoentrega = moment(pedidoDuplicar.ped_dataprevisaoentrega);\r\n pedidoDuplicar.ped_datavalidade = moment(pedidoDuplicar.ped_datavalidade);\r\n pedidoDuplicar.ped_id_duplicar = pedidoDuplicar.ped_id;\r\n pedidoDuplicar.ped_id = null;\r\n setExibirDrawerPedidos(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: pedidoDuplicar } });\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n let dados = formPedidos.getFieldValue();\r\n let filtro = '';\r\n let dataInicial = dados.dataInicial;\r\n let dataFinal = dados.dataFinal;\r\n let status = dados.status;\r\n let ativo = 2;//Toodos\r\n if (dados.ativoPedido.length == 1) {\r\n if (dados.ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (dados.ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n\r\n filtro += '&dataInicial=' + (!!dataInicial ? moment(dataInicial).format('YYYY-MM-DD') : moment(dados.dataPesquisa).format(\"YYYY-MM-DD\"));\r\n filtro += '&dataFinal=' + (!!dataFinal ? moment(dataFinal).format('YYYY-MM-DD') : moment(new Date).format('YYYY-MM-DD'));\r\n filtro += (!!status ? `&status=${status}` : '');\r\n filtro += (!!ativo ? `&Ativo=${ativo}` : '');\r\n filtro += !!expressao ? `&filtroAdicional=${btoa(expressao)}` : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao', outrosFiltros: filtro } });\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ``, ordem: '+ped_datainclusao' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n let filtro = '';\r\n let ativo = 2;//Toodos\r\n if (!!formPedidos.getFieldValue().ativoPedido) {\r\n if (formPedidos.getFieldValue().ativoPedido.length == 1) {\r\n if (formPedidos.getFieldValue().ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (formPedidos.getFieldValue().ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n }\r\n filtro += `&Ativo=${ativo}`;\r\n let status = !!formPedidos.getFieldValue().status ? formPedidos.getFieldValue().status : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${moment(formPedidos.getFieldValue().dataPesquisa).format(\"YYYY-MM-DD\")}&filtro=&status=${status}` + filtro } })\r\n formPedidos.setFieldsValue({ dataFinal: moment(new Date) });\r\n formPedidos.setFieldsValue({ dataInicial: moment(formPedidos.getFieldValue().dataPesquisa) });\r\n }} />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n {status.map(stp => (\r\n {stp.stp_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={formPedidos} telaFiltro={9} retornarSempre={true} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n \r\n \r\n {ped_numero}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Informações\",\r\n render: ({ loc_id_transferencia, loc_descricao, pes_nome, pef_cpf, pej_cnpj, pes_telefone, ped_observacao, pes_endereco, pes_nroestabelecimento, pes_bairro, pes_cep, pes_cidade, pes_uf, ped_datainclusao, ped_dataprevisaoentrega, pdi_qtditem, ped_ativo }) => (\r\n
\r\n \r\n
\r\n {!!loc_id_transferencia ? loc_descricao : pes_nome}\r\n \r\n \r\n CPF/CNPJ: {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n \r\n \r\n Telefone: {FormatFone(pes_telefone) || 'Não Informado'}\r\n \r\n \r\n \r\n {!ped_ativo && \r\n Cancelado\r\n }\r\n \r\n Emissão: {moment(ped_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Entrega: {moment(ped_dataprevisaoentrega).format('DD/MM/YYYY')}\r\n \r\n \r\n Quant. de Itens: {pdi_qtditem}\r\n \r\n \r\n Endereço: {pes_endereco}, {pes_nroestabelecimento}, {pes_bairro}, {pes_cep}, {pes_cidade}-{pes_uf}\r\n \r\n {HasValue(ped_observacao) && (\r\n \r\n Obs: {ped_observacao.length > 50 ? ped_observacao.slice(0, 50) + \"...\" : ped_observacao}\r\n \r\n )}\r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total (R$)\",\r\n align: 'right',\r\n width: 180,\r\n render: ({ ped_valortotal }) => (\r\n
\r\n {FormatNumber(ped_valortotal, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function descricaoSituacao(codigo) {\r\n if (codigo >= 0 && !!situacaoVenda[codigo]) {\r\n return situacaoVenda[codigo].value;\r\n }\r\n return '';\r\n };\r\n\r\n function deletarCondicional(registro) {\r\n api.put(`VendaCondicional/Excluir/${registro.vnc_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Venda Condicional estornada com sucesso!` })\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n });\r\n };\r\n\r\n async function editarCondicional(registro) {\r\n registro.vnc_datalancamento = moment(registro.vnc_datalancamento);\r\n registro.vnc_prazoretorno = moment(registro.vnc_prazoretorno);\r\n registro.vnc_entregaagendada = moment(registro.vnc_entregaagendada);\r\n let dadosTemp = await api.get(`VendaCondicionalItem/Listar?IdVendaCondicional=${registro.vnc_id}`);\r\n if (dadosTemp.status === 200) {\r\n registro.itens = dadosTemp.data;\r\n }\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n }\r\n\r\n const modalExcluirCondicional = (condicional) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a condicional do cliente ${condicional.cli_nome} contendo ${condicional.vnc_totalitens} itens com valor total de R$ ${!!condicional.vnc_valortotal ? condicional.vnc_valortotal : '0,00'} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n deletarCondicional(condicional);\r\n }\r\n });\r\n };\r\n\r\n function abrirModalItens(record) {\r\n setDados(record);\r\n setOpenModalProdutoCondicional(true);\r\n }\r\n\r\n function abrirModalContatos(record) {\r\n setPessoaId(record);\r\n setOpenModalContatoCliente(true);\r\n }\r\n function retornaCorSituacao(codigo) {\r\n let cor = \"\";\r\n switch (codigo) {\r\n case 0:\r\n cor = \"processing\";\r\n break;\r\n case 1:\r\n cor = \"green\";\r\n break;\r\n case 2:\r\n cor = \"#87d068\";\r\n break;\r\n case 3:\r\n cor = \"orange\";\r\n break;\r\n case 4:\r\n cor = \"red\";\r\n break;\r\n }\r\n return cor;\r\n };\r\n\r\n function alterarCondicionalEntregue(dados, valor) {\r\n let situacao = dados.vnc_situacao;\r\n if (valor === true) {\r\n situacao = 1;\r\n } else {\r\n situacao = 0;\r\n }\r\n api.post('VendaCondicional/EditarSituacaoCondicional',\r\n JSON.stringify({ vnc_id: dados.vnc_id, vnc_situacao: situacao }),\r\n { headers: { 'Content-Type': 'application/json;charset=utf-8' } }\r\n ).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n });\r\n };\r\n\r\n return (\r\n
\r\n { return campo.vnc_levarparacliente === true }} colunas={\r\n [\r\n {\r\n title: 'Situação',\r\n width: 140,\r\n align: 'center',\r\n render: ({ vnc_situacao }) => (\r\n
\r\n \r\n {(descricaoSituacao(vnc_situacao))}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: 85,\r\n align: 'center',\r\n render: ({ vnc_numero }) => (\r\n
\r\n {vnc_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ cli_nome }) => (\r\n
\r\n {cli_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 110,\r\n render: ({ vnc_telefonecliente, pes_id }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Lançamento',\r\n width: 135,\r\n render: ({ vnc_datalancamento }) => (\r\n
\r\n {moment(vnc_datalancamento).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Retorno',\r\n width: 135,\r\n render: ({ vnc_prazoretorno }) => (\r\n
\r\n {moment(vnc_prazoretorno).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'right',\r\n width: 100,\r\n render: ({ vnc_totalitens }, record) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 150,\r\n render: ({ vnc_valortotal }) => (\r\n
\r\n {FormatNumber(vnc_valortotal, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, registro) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Entregar em: {record.vnc_enderecoentrega}\r\n \r\n \r\n Melhor Horário para Entrega: {moment(record.vnc_entregaagendada).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n \r\n \r\n { alterarCondicionalEntregue(record, valor) }} /> Condicional Entregue?\r\n \r\n \r\n )\r\n }}\r\n />\r\n\r\n \r\n \r\n \r\n setOpenModalProdutoCondicional(false)} dadosItens={dados} situacaoVenda={situacaoVenda} />\r\n setOpenModalContatoCliente(false)} />\r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Dropdown, Menu, Modal, notification } from \"antd\";\r\nimport { DollarCircleOutlined, DeleteOutlined, MoreOutlined, PrinterOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerCondicional from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerDevolucao from './drawerDevolucao';\r\nimport { FormatFone, FormatNumber } from \"../../ValueObjects\";\r\nimport { TabelaDados, EditarTabela, Excluir, Imprimir } from '../../components';\r\nimport { listagemActions, manutencaoActions, drawerActions } from '../../actions';\r\nimport { ModalProdutoCondicional, ModalContatoCliente } from \"../../components/modals/\";\r\nimport DrawerNFExtra from \"./drawerNFExtra\";\r\n\r\nexport default function TabCondicionalRetirada({ situacaoVenda, dataPesquisa, imprimirCondicional }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [exibirDrawerDevolucao, setExibirDrawerDevolucao] = useState(false);\r\n const [openModalContatoCliente, setOpenModalContatoCliente] = useState(false);\r\n const [openModalProdutoCondicional, setOpenModalProdutoCondicional] = useState(false);\r\n const [exibirDrawerNota, setExibirDrawerNota] = useState(false);\r\n const [dados, setDados] = useState({});\r\n const [pessoaId, setPessoaId] = useState();\r\n\r\n function menuTable(registro) {\r\n return (\r\n \r\n \r\n \r\n \r\n } onClick={() => imprimirCondicional(registro)}> Imprimir \r\n \r\n );\r\n };\r\n\r\n function descricaoSituacao(codigo) {\r\n if (codigo >= 0 && !!situacaoVenda[codigo]) {\r\n return situacaoVenda[codigo].value;\r\n }\r\n return \"\";\r\n };\r\n\r\n function retornaCorSituacao(codigo) {\r\n let cor = \"\";\r\n switch (codigo) {\r\n case 0:\r\n cor = \"processing\";\r\n break;\r\n case 1:\r\n cor = \"green\";\r\n break;\r\n case 2:\r\n cor = \"#87d068\";\r\n break;\r\n case 3:\r\n cor = \"orange\";\r\n break;\r\n case 4:\r\n cor = \"red\";\r\n break;\r\n }\r\n return cor;\r\n };\r\n\r\n function deletarCondicional(registro) {\r\n api.put(`VendaCondicional/Excluir/${registro.vnc_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Venda Condicional estornada com sucesso!` })\r\n }\r\n ).catch((erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n });\r\n };\r\n\r\n const modalExcluirCondicional = (condicional) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente estornar a condicional do cliente ${condicional.cli_nome} contendo ${condicional.vnc_totalitens} itens com valor total de R$ ${!!condicional.vnc_valortotal ? condicional.vnc_valortotal : '0,00'} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n deletarCondicional(condicional);\r\n }\r\n });\r\n };\r\n\r\n function abrirModalItens(record) {\r\n setDados(record);\r\n setOpenModalProdutoCondicional(true);\r\n }\r\n function abrirModalContatos(record) {\r\n setPessoaId(record);\r\n setOpenModalContatoCliente(true);\r\n }\r\n\r\n async function editarCondicional(registro) {\r\n registro.vnc_datalancamento = moment(registro.vnc_datalancamento);\r\n registro.vnc_prazoretorno = moment(registro.vnc_prazoretorno);\r\n let dadosTemp = await api.get(`VendaCondicionalItem/Listar?IdVendaCondicional=${registro.vnc_id}`);\r\n registro.itens = dadosTemp.data;\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n };\r\n\r\n\r\n return (\r\n
\r\n { return campo.vnc_levarparacliente === false }} colunas={\r\n [\r\n {\r\n title: 'Situação',\r\n width: 140,\r\n align: 'center',\r\n render: ({ vnc_situacao }) => (\r\n
\r\n \r\n {descricaoSituacao(vnc_situacao)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: 100,\r\n align: 'center',\r\n render: ({ vnc_numero }) => (\r\n
\r\n {vnc_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ cli_nome }) => (\r\n
\r\n {cli_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 110,\r\n render: ({ vnc_telefonecliente, pes_id }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Lançamento',\r\n width: 135,\r\n render: ({ vnc_datalancamento }) => (\r\n
\r\n {moment(vnc_datalancamento).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Retorno',\r\n width: 135,\r\n render: ({ vnc_prazoretorno }) => (\r\n
\r\n {moment(vnc_prazoretorno).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n width: 100,\r\n render: ({ vnc_totalitens }, record) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 150,\r\n render: ({ vnc_valortotal }) => (\r\n
\r\n {FormatNumber(vnc_valortotal, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, registro) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}&dataInicial=${moment(formParametrosAvancados.getFieldValue().dataPesquisa).format('YYYY-MM-DD')}` } });\r\n formParametrosAvancados.setFieldsValue({ dataFinal: moment(dataAtual) });\r\n formParametrosAvancados.setFieldsValue({ dataInicial: moment(formParametrosAvancados.getFieldValue().dataPesquisa) });\r\n }} />\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {situacaoVenda.map(situacao => (\r\n {situacao.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={formParametrosAvancados} telaFiltro={8} retornarSempre={true} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, notification, Table, Button, Tag, Modal } from \"antd\";\r\nimport { EditOutlined } from \"@material-ui/icons\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { isObjetoDiffVazio, novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { FormGW, InputPreco, Data } from \"../../components\";\r\nimport { FormatDate, FormatNumber } from \"../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from '../../actions';\r\nimport { ModalBandeiraCartao, ModalContaCorrente, ModalParcelasPendentes, ModalSenhaLiberacao, ModalCheque, ModalRetornaContaGerencial } from \"../../components/modals\";\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function ManutencaoValePresente({ formulario, carregando, aoSalvar, formParametrosValePresente }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaCompradores, setListaCompradores] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [listaCondPagamento, setListaCondPagamento] = useState([]);\r\n const [dataAtual] = useState(new Date());\r\n const [ehCheque, setEhCheque] = useState(false);\r\n const [dadosCheque, setDadosCheque] = useState([]);\r\n const [exibirModalCheque, setExibirModalCheque] = useState(false);\r\n const [abreModalContaCorrente, setAbreModalContaCorrente] = useState(false);\r\n const [contaCorrente, setContaCorrente] = useState({});\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [openModalCartao, setOpenModalCartao] = useState(false);\r\n const [dadosVale, setDadosVale] = useState({});\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [parcelasPessoasAtraso, setParcelasPessoasAtraso] = useState([]);\r\n const [abreModalParcPendentes, setAbreModalParcPendentes] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [semCondicao, setSemCondicao] = useState(false);\r\n const [dadosEmpresa, setDadosEmpresa] = useState({});\r\n const [openModalContaGerencial, setOpenModalContaGerencial] = useState(false);\r\n const descricaoContaGerencial = \"A Conta Gerencial ainda não foi informada e para lançamentos de Vale Presente é obrigatória. A informação será exigida uma única vez, ficando disponível nos parametros do sistema.\"\r\n\r\n const onCloseModalLiberacao = () => {\r\n inserirDadosCrediario(dadosVale.formaPagamento[0]);\r\n setAbreModalLiberacao(false);\r\n };\r\n\r\n const onCloseModalCheque = () => {\r\n setExibirModalCheque(false);\r\n };\r\n\r\n const fecharModalCartao = () => {\r\n setOpenModalCartao(false);\r\n };\r\n const fecharModalOKCartao = () => {\r\n setOpenModalCartao(false);\r\n };\r\n\r\n const onCloseModalParcPendentes = () => {\r\n limparFormaPagamento();\r\n setAbreModalParcPendentes(false);\r\n };\r\n const onCloseCreditoBloqueado = () => {\r\n limparFormaPagamento();\r\n setAbreModalLiberacao(false);\r\n }\r\n\r\n const onCloseModalParcPendentesOk = () => {\r\n setAbreModalParcPendentes(false);\r\n inserirDadosCrediario(dadosVale.formaPagamento[0]);\r\n };\r\n\r\n const onCloseModalContaGerencial = (values) => {\r\n if (!!values && isObjetoDiffVazio(values) && values.listaContas) {\r\n let dadosObj = {};\r\n dadosObj.par_id = dadosEmpresa.par_id;\r\n dadosObj.emp_id = parseInt(values.emp_id);\r\n dadosObj.par_contagerencialvalepresente = values.cgc_contagerencialdestino;\r\n dadosObj.par_contagervalepresenteprazo = values.cgc_contagerencialdestino2;\r\n api.post(`ParametrosEmpresa/ManutencaoParametrosEmpresa`, dadosObj).then(\r\n res => {\r\n notification.success({ description: 'Conta gerencial parametrizada com sucesso!', message: 'Avisos' })\r\n setOpenModalContaGerencial(false);\r\n buscarParametrosEmp();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n } else {\r\n setOpenModalContaGerencial(false);\r\n }\r\n\r\n };\r\n\r\n function limparFormaPagamento() {\r\n formulario.setFieldsValue({ cpg_id: null, fpg_id: null });\r\n let dadosVal = { ...dadosVale };\r\n dadosVal.parcelas = [];\r\n dadosVal.formaPagamento = [];\r\n setDadosVale(dadosVal);\r\n carregarDados();\r\n console.log(\"Limpar\", dadosVal);\r\n }\r\n\r\n const salvarManutencao = (values) => {\r\n validarVale(() => {\r\n if (dadosVale.formaPagamento[0].fpg_tipoavistaaprazo === 0) {\r\n values.ctg_id = !!dadosEmpresa.par_contagerencialvalepresente ? dadosEmpresa.par_contagerencialvalepresente : null;\r\n } else {\r\n values.ctg_id = !!dadosEmpresa.par_contagervalepresenteprazo ? dadosEmpresa.par_contagervalepresenteprazo : null;\r\n }\r\n\r\n switch (dadosVale.formaPagamento[0].fpg_tipopagamento) {\r\n case FormaDePagamento.fpCheque:\r\n values.lancouCheque = false\r\n values.ctc_id = !!dadosVale.contaCorrente && !!dadosVale.contaCorrente.ctc_id ? dadosVale.contaCorrente.ctc_id : dadosVale.formaPagamento.ctc_id;\r\n values.cheques = dadosVale.cheques;\r\n break;\r\n case FormaDePagamento.fpCartaoDebito, FormaDePagamento.fpCartaoCredito:\r\n let recebimentoCartao = {};\r\n break;\r\n case FormaDePagamento.fpCreditoLoja:\r\n if (dadosVale.parcelas.length == 0) {\r\n notification.warning({ description: 'Parcelas não informadas!', message: 'Aviso' });\r\n }\r\n if (editandoParcelas) {\r\n dadosVale.parcelas.forEach((parc) => {\r\n parc.prc_datavencimento = moment(formulario.getFieldValue()[`dataVencimento${parc.prc_numeroparcela}`]);\r\n parc.dataVencimento = moment(formulario.getFieldValue()[`dataVencimento${parc.prc_numeroparcela}`]);\r\n parc.valorParcela = parseFloat(formulario.getFieldValue()[`valorParcela${parc.prc_numeroparcela}`]);\r\n parc.prc_valor = parseFloat(formulario.getFieldValue()[`valorParcela${parc.prc_numeroparcela}`]);\r\n parc.cpr_numeroparcelas = parc.prc_numeroparcela;\r\n });\r\n }\r\n break;\r\n case FormaDePagamento.fpDinheiro:\r\n values.ctc_id = !!dadosVale.contaCorrente && !!dadosVale.contaCorrente.ctc_id ? dadosVale.contaCorrente.ctc_id : dadosVale.formaPagamento.ctc_id;\r\n break;\r\n }\r\n\r\n values.faturamento = dadosVale.formaPagamento;\r\n values.acf_datalancamento = moment(values.acf_datalancamento);\r\n values.acf_valor = parseFloat(values.acf_valor);\r\n values.acf_valepresente = true;\r\n values.acf_entradasaida = 2;\r\n carregando(true);\r\n api.post(`AntecipacaoClienteFornecedor/IncluirValePresente`, values).then(\r\n res => {\r\n notification.success({ message: `Operação Concluída`, description: `Vale presente salvo com sucesso!` });\r\n if (res.data?.acf_id) {\r\n novaAbaNavegador(`AntecipacaoClienteFornecedor/GerarComprovante/${res.data.acf_id}`);\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n notification.warning({\r\n message: `Erro ao processar a requisição!`, description: !!error.response.data.Message ? error.response.data.Message : ''\r\n });\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: `acf_datalancamento` } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}&dataInicial=${FormatDate(formParametrosValePresente.dataPesquisa)}&filtro=&mostrarValeQuitado=${formParametrosValePresente.formParametrosValePresente.getFieldValue().valesQuitados}` } });\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n )\r\n });\r\n };\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? : moment(dataVencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { onChangeValorParc(pcl_numeroparcela) }} /> : {FormatNumber(valorParcela, true)}}\r\n
\r\n\r\n ),\r\n }\r\n ]} dataSource={record.parcelas} pagination={false} />\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.dadosModalCheque && !!manutencao.dados.dadosModalCheque.cheques) {\r\n incluirCheque(manutencao.dados.dadosModalCheque);\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n buscarParametrosEmp();\r\n }, []);\r\n\r\n useEffect(() => {\r\n let formaPgto = !!dadosVale.formaPagamento ? dadosVale.formaPagamento[dadosVale.formaPagamento.length - 1] : null;\r\n if (((!!formaPgto && formaPgto.cpg_id) || semCondicao) && !openModalCartao) {\r\n if (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || formaPgto.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n abrirModalCartao(dadosVale);\r\n } else if (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && (!!!formaPgto.parcelas || formaPgto.parcelas.length === 0)) {\r\n verificarRestricoesCredito(false, () => {\r\n inserirDadosCrediario(formaPgto);\r\n });\r\n\r\n }\r\n }\r\n }, [dadosVale]);\r\n\r\n function carregarDados() {\r\n if (!!!formulario.getFieldValue().acf_datalancamento) {\r\n formulario.setFieldsValue({ acf_datalancamento: moment(new Date()) });\r\n }\r\n api.get(`FormaPagamento/Listar?filtro=&apenasAtivos=true&Order=%2Bfpg_descricao&PageSize=500`).then(\r\n (res) => {\r\n let dados = [];\r\n res.data.items.forEach((fpg) => {\r\n //Demais formas não implementadas\r\n if (fpg.fpg_tipopagamento === FormaDePagamento.fpDinheiro || fpg.fpg_tipopagamento === FormaDePagamento.fpCheque || fpg.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n dados.push(fpg);\r\n }\r\n });\r\n setListaFormaPagamento(dados);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarCondicao(fpg_id) {\r\n api.get(`CondicaoPagamento/Listar?codigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaCondPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarParametrosEmp() {\r\n api.get(`ParametroEmpresa/BuscarParametros`).then(\r\n res => {\r\n setDadosEmpresa(res.data);\r\n if (!!!res.data.par_contagerencialvalepresente || !!!res.data.par_contagervalepresenteprazo && (!!!manutencao.dados || (!!manutencao.dados && !!!manutencao.dados.acf_id))) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Conta gerencial não parametrizada para vale presente, deseja parametrizar as mesmas?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let obj = {};\r\n obj.cgc_contagerencialdestino = res.data.par_contagerencialvalepresente;\r\n obj.cgc_contagerencialdestino2 = res.data.par_contagervalepresenteprazo;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ dadosEmpresa: obj } } } });\r\n setOpenModalContaGerencial(true);\r\n }\r\n });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function onChangeFormaPagamento(fpg_id) {\r\n if (fpg_id) {\r\n let dados = { ...dadosVale };\r\n let formaPagamento = [];\r\n let faturamento = listaFormaPagamento.filter((forma) => (forma.fpg_id === formulario.getFieldValue().fpg_id))[0];\r\n let cliente = listaCompradores.filter((compradores) => compradores.pes_id === formulario.getFieldValue().pes_id)[0];\r\n formulario.setFieldsValue({ cpg_id: null });\r\n if (faturamento.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n if (!!cliente && cliente.cli_vendasomenteavista) {\r\n formulario.setFieldsValue({ fpg_id: null });\r\n notification.warn({ description: 'Venda a prazo não autorizada!', message: 'Aviso' });\r\n return false;\r\n }\r\n }\r\n faturamento.parcelas = [];\r\n faturamento.cheques = [];\r\n faturamento.valor = parseFloat(formulario.getFieldValue().acf_valor);\r\n formaPagamento.push(faturamento);\r\n dados.formaPagamento = formaPagamento;\r\n if (faturamento.fpg_tipopagamento !== FormaDePagamento.fpCheque) {\r\n if (faturamento.fpg_tipopagamento === FormaDePagamento.fpDinheiro || faturamento.fpg_tipopagamento === FormaDePagamento.fpValePresente) {\r\n setSemCondicao(true);\r\n validarContaCorrente(dados);\r\n } else {\r\n listarCondicao(fpg_id);\r\n setSemCondicao(false);\r\n }\r\n setEhCheque(false);\r\n formulario.setFieldsValue({ numeroCheques: null });\r\n } else {\r\n setEhCheque(true);\r\n setSemCondicao(true);\r\n }\r\n setDadosVale(dados);\r\n } else {\r\n limparFormaPagamento();\r\n }\r\n };\r\n\r\n function onChangeCondicao(cpg_id) {\r\n let dados = { ...dadosVale };\r\n let dadosFormaPagamento = dados.formaPagamento.find((forma) => forma.fpg_id === formulario.getFieldValue().fpg_id);\r\n dadosFormaPagamento.cpg_id = cpg_id;\r\n if (parseFloat(formulario.getFieldValue().acf_valor) !== 0) {\r\n validarContaCorrente(dados, () => {\r\n setDadosVale(dados);\r\n });\r\n } else {\r\n formulario.setFieldsValue({ cpg_id: null });\r\n notification.warning({ description: 'Favor informar o valor do vale', message: 'Aviso' });\r\n }\r\n };\r\n\r\n function validarContaCorrente(dados, callback) {\r\n let formaPgto = dados.formaPagamento[dados.formaPagamento.length - 1];\r\n if ((!!!formaPgto.ctc_id && (!!!dados.contaCorrente || (!!dados.contaCorrente && !!!dados.contaCorrente.ctc_id)))\r\n && (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCheque || formaPgto.fpg_tipopagamento === FormaDePagamento.fpDinheiro\r\n || formaPgto.fpg_tipopagamento === FormaDePagamento.fpDepositoBancario || formaPgto.fpg_tipopagamento === FormaDePagamento.fpPixDinamico\r\n || formaPgto.fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria)) {\r\n setAbreModalContaCorrente(true);\r\n } else {\r\n if (!!callback) {\r\n callback();\r\n }\r\n }\r\n\r\n\r\n };\r\n\r\n function validarVale(callback) {\r\n let dados = { ...dadosVale };\r\n dados.formaPagamento.forEach((faturamento) => {\r\n if (faturamento.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!!formulario.getFieldValue().pes_id) {\r\n notification.warning({ description: 'Para venda a prazo é obrigatório informar o comprador!', message: 'Aviso' });\r\n return;\r\n }\r\n if (faturamento.fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n\r\n }\r\n });\r\n if (!(parseFloat(formulario.getFieldValue().acf_valor) > 0)) {\r\n notification.warning({ description: 'Favor informar o valor do vale', message: 'Aviso' });\r\n return;\r\n }\r\n\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function pagamentoCartao(dados, dadosCartao) {\r\n let dataAtual = new Date();\r\n let dadosVal = { ...dadosVale };\r\n let recebimentoCartao = [];\r\n let retorno = {};\r\n if (dadosCartao.tipoParcelamento === 0) {//Estabelecimento\r\n let numeroDias = !!dados.credito ? dadosCartao.bandeira.bce_nrodiasrecebimentocredito : dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n dadosVal.parcelas.forEach((parcela) => {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = parcela.pcl_numeroparcela;\r\n retorno.rcc_valor = parcela.prc_valor;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + numeroDias));\r\n recebimentoCartao.push(retorno);\r\n });\r\n } else {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = 1;\r\n retorno.rcc_valor = formulario.getFieldValue().acf_valor;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentocredito)));\r\n recebimentoCartao.push(retorno);\r\n }\r\n if (dadosVal.formaPagamento.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n dadosVal.parcelas.forEach(parcela => {\r\n parcela.pcl_numerodias = dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(parcela.pcl_numerodias)));\r\n parcela.dataPagamento = dataVencimento;\r\n parcela.prc_datavencimento = moment(dataVencimento);\r\n parcela.dataVencimento = moment(dataVencimento);\r\n });\r\n }\r\n\r\n dadosVal.recebimentoCartao = recebimentoCartao;\r\n setDadosVale(dadosVal);\r\n };\r\n\r\n function incluirCheque(dados) {\r\n let dadosVal = { ...dadosVale };\r\n dadosVal.formaPagamento[dadosVal.formaPagamento.length - 1].cheques = dados.cheques;\r\n dadosVal.formaPagamento[dadosVal.formaPagamento.length - 1].ctc_id = dados.contaCorrente;\r\n setDadosVale(dadosVal);\r\n };\r\n\r\n function onCloseModalContaCorrente() {\r\n let dados = { ...dadosVale };\r\n dados.formaPagamento[dados.formaPagamento.length - 1].ctc_id = contaCorrente.ctc_id;\r\n dados.contaCorrente = { ctc_id: contaCorrente.ctc_id, ctc_descricao: contaCorrente.ctc_descricao };\r\n setDadosVale(dados);\r\n setAbreModalContaCorrente(false);\r\n };\r\n\r\n function abrirModalCheque() {\r\n if (!!formulario.getFieldValue().numeroCheques && parseFloat(formulario.getFieldValue().numeroCheques) > 0) {\r\n if (!!formulario.getFieldValue().acf_valor && parseFloat(formulario.getFieldValue().acf_valor) > 0) {\r\n let dados = {\r\n numeroCheques: formulario.getFieldValue().numeroCheques,\r\n pfp_valor: formulario.getFieldValue().acf_valor\r\n };\r\n setDadosCheque(dados);\r\n setExibirModalCheque(true);\r\n } else {\r\n notification.warning({ description: 'Favor informar o valor do vale!', message: 'Aviso' })\r\n }\r\n } else {\r\n notification.warning({ description: 'Favor informar o número de cheques!', message: 'Aviso' })\r\n }\r\n };\r\n\r\n function abrirModalCartao(dados) {\r\n if (dados.formaPagamento.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n popularParcelas(dados, () => {\r\n setOpenModalCartao(true);\r\n });\r\n } else if (dados.formaPagamento.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n popularParcelasDebito(dados, () => {\r\n setOpenModalCartao(true);\r\n });\r\n }\r\n };\r\n\r\n function popularParcelas(dados, callback) {\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${dados.cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = dados.fpg_id;\r\n parc.fpg_descricao = dados.fpg_descricao;\r\n parc.fpg_tipopagamento = dados.fpg_tipopagamento;\r\n parc.cpg_id = dados.cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(formulario.getFieldValue().acf_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(formulario.getFieldValue().acf_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados.parcelas = listaParcelas;\r\n if (dados.fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja) {\r\n let creditoDebito = dados.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: creditoDebito } } } });\r\n }\r\n let dadosVal = { ...dadosVale };\r\n dadosVal.parcelas = listaParcelas;\r\n dadosVal.formaPagamento[dadosVal.formaPagamento.length - 1] = dados;\r\n setDadosVale(dadosVal);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularParcelasDebito(dados, callback) {\r\n let listaParcelas = [];\r\n let parc = {};\r\n parc.fpg_id = dados.formaPagamento.fpg_id;\r\n parc.fpg_descricao = dados.formaPagamento.fpg_descricao;\r\n parc.fpg_tipopagamento = dados.formaPagamento.fpg_tipopagamento;\r\n parc.cpg_id = dados.condicao.cpg_id;\r\n parc.pcl_percparcela = 100;\r\n parc.pcl_numeroparcela = 1;\r\n parc.prc_numeroparcela = 1;\r\n let valorParcela = ((parc.pcl_percparcela / 100) * parseFloat(formulario.getFieldValue().acf_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n listaParcelas.push(parc);\r\n dados.parcelas = listaParcelas;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: false } } } });\r\n setDadosVale(dados);\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function popularValor() {\r\n let dados = { ...dadosVale };\r\n dados.valor = formulario.getFieldValue().acf_valor;\r\n setDadosVale(dados);\r\n if (!!formulario.getFieldValue().numeroCheques && parseFloat(formulario.getFieldValue().numeroCheques) > 0 && ehCheque) {\r\n abrirModalCheque();\r\n }\r\n };\r\n\r\n function editarFormasPagamento() {\r\n setEditandoParcelas(true);\r\n dadosVale.parcelas.forEach((parc) => {\r\n formulario.setFieldsValue({ [`valorParcela${parc.pcl_numeroparcela}`]: parc.pfp_valor });\r\n });\r\n };\r\n\r\n function verificarRestricoesCredito(liberado, callback) {\r\n let parcelasAtraso = [];\r\n let dadosVal = { ...dadosVale };\r\n let limiteCreditoDisp = {};\r\n if (liberado) {\r\n callback();\r\n } else if (parseInt(dadosVal.formaPagamento[0].fpg_tipopagamento) === FormaDePagamento.fpCreditoLoja) {\r\n if (!!!formulario.getFieldValue().pes_id) {\r\n notification.warning({ description: 'Favor informar o comprador do vale presente!', message: 'Aviso' });\r\n }\r\n api.get(`Parcela/ListarParcelasClientesEmAtrazo?IdPessoa=${formulario.getFieldValue().pes_id}&pageSize=500`).then(\r\n parcelasPessoa => {\r\n let dados = [...parcelasPessoa.data.items];\r\n api.get(`Cliente/LimiteCreditoDisponivel/${formulario.getFieldValue().pes_id}`).then(\r\n limiteCredito => {\r\n parcelasAtraso = parcelasPessoa.data.items;\r\n limiteCreditoDisp = limiteCredito.data;\r\n dados.forEach((parcelas) => { parcelas.limiteCredito = limiteCreditoDisp.valorTotal });\r\n setParcelasPessoasAtraso(dados);\r\n if (!!!parcelasAtraso) {\r\n notification.warning({ description: 'Não foi possível verificar as parcelas em atraso deste cliente. É recomendável que você fale com seu supervisor/gerente antes de prosseguir com a venda!', message: 'Aviso' });\r\n } else if (parcelasAtraso.length > 0) {\r\n setAbreModalParcPendentes(true);\r\n } else if (!!!limiteCreditoDisp) {\r\n notification.warning({ description: 'Não foi possível verificar o limite de crédito disponível para realizar a venda no crediário. É recomendável que você fale com seu supervisor/gerente antes de prosseguir com a venda!', message: 'Aviso' });\r\n } else if (limiteCreditoDisp.valorTotal !== 0 && limiteCreditoDisp.valorTotal < parseFloat(dadosVal.valor)) {\r\n Modal.confirm({\r\n title: `Aviso`,\r\n icon: ,\r\n content: `O limite de crédito ainda disponível para compras à prazo deste cliente é: ${parseFloat(limiteCreditoDisp.valorTotal).toFixed(2).toString()}. Para continuar com a venda à prazo você deve solicitar autorização da operação com seu supervisor/gerente.`,\r\n okText: 'Solicitar Autorização',\r\n cancelText: 'OK',\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n }\r\n });\r\n } else {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n callback();\r\n }\r\n };\r\n\r\n function inserirDadosCrediario(formaPgto) {\r\n popularParcelas(formaPgto, () => { });\r\n };\r\n\r\n function onChangeValorParc(numeroParc) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(formulario.getFieldValue().acf_valor);\r\n let dados = formulario.getFieldValue();\r\n let qtdTotParcelas = dadosVale.parcelas.length;\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n formulario.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n formulario.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n ({com.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {ehCheque && \r\n \r\n { abrirModalCheque() }}>\r\n \r\n }\r\n {!ehCheque && !semCondicao && \r\n \r\n \r\n \r\n }\r\n \r\n { popularValor() }} />\r\n \r\n \r\n \r\n \r\n
\r\n {!!dadosVale.parcelas && dadosVale.parcelas.length > 0 &&
(\r\n
\r\n \r\n {!!condicao && !!condicao.cpg_descricao ? formaPagamento.fpg_descricao + ' / ' + condicao.cpg_descricao : formaPagamento.fpg_descricao}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valor }) => (\r\n
\r\n {FormatNumber(valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Total dos Pagamentos (R$): \r\n \r\n \r\n \r\n {FormatNumber(dadosVale.valor, true)}\r\n \r\n \r\n \r\n \r\n )\r\n }} dataSource={[dadosVale]}\r\n />}\r\n \r\n \r\n \r\n \r\n \r\n \r\n { onCloseModalContaCorrente() }} fecharModalContaCorrente={() => { setAbreModalContaCorrente(false); }} contaCorrente={{ contaCorrente, setContaCorrente }} listaContaCorrente={{ listaContaCorrente, setListaContaCorrente }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoValePresente from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerValePresente(formParametrosValePresente, dataPesquisa) {\r\n\r\n const [formValePresente] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n\r\n if (manutencao.dados !== null) { formValePresente.setFieldsValue(manutencao.dados); }\r\n else {\r\n //formValePresente.resetFields();\r\n formValePresente.setFieldsValue({ icm_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n formValePresente.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport moment from 'moment';\r\nimport { Row, Col, Form, Button, Collapse, Checkbox, Modal, notification } from 'antd';\r\nimport { ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, PrinterOutlined, DeleteOutlined, ExclamationCircleOutlined, CloseOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerValePresente from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { linkApi } from '../../services/auth';\r\nimport { FormatNumber, FormatDate } from \"../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from '../../actions';\r\nimport { BreadcrumbIncluirDados, ComboData, TabelaDados, Excluir, Imprimir, Data, FiltroSearch } from '../../components';\r\n\r\nexport default function ValePresente() {\r\n\r\n const [open, setOpen] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [parametrosValePresente] = Form.useForm();\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [dataAtual] = useState(new Date());\r\n const [valesQuitados, setValesQuitados] = useState(false);\r\n\r\n useEffect(() => {\r\n aplicarFiltrosAvancados();\r\n }, [valesQuitados]);\r\n\r\n function aplicarFiltrosAvancados() {\r\n let filtros = '';\r\n filtros += `&SomenteAtivos=true`;\r\n filtros += `&dataInicial=${(!!!parametrosValePresente.getFieldValue().dataPesquisa ? moment(dataAtual).format(\"YYYY-MM-DD\") : !!parametrosValePresente.getFieldValue().DataInicial ? moment(parametrosValePresente.getFieldValue().DataInicial).format('YYYY-MM-DD') : moment(parametrosValePresente.getFieldValue().DataPesquisa).format('YYYY-MM-DD'))}`;\r\n filtros += `&dataFinal=${(!!!parametrosValePresente.getFieldValue().DataFinal ? moment(dataAtual).format(\"YYYY-MM-DD\") : moment(parametrosValePresente.getFieldValue().DataFinal).format('YYYY-MM-DD'))}`;\r\n filtros += `&filtro=&mostrarValeQuitado=${(!!parametrosValePresente.getFieldValue().valesQuitados ? parametrosValePresente.getFieldValue().valesQuitados : false)}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros, ordem: 'acf_datalancamento' } });\r\n };\r\n\r\n const modalImprimir = (record) => {\r\n Modal.confirm({\r\n title: 'Imprimir',\r\n icon: ,\r\n content: `Confirmar impressão do vale ${record.acf_nomepresenteado} no valor de ${FormatNumber(record.acf_valor, true)}?`,\r\n okText: 'Imprimir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n imprimir(record);\r\n }\r\n });\r\n };\r\n\r\n function excluirVale(valePresente) {\r\n api.post(`AntecipacaoClienteFornecedor/ExcluirValePresente/${valePresente.acf_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n notification.success({ message: 'Vale presente excluida com Sucesso!' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: `Aviso!`, description: erro.response.data });\r\n //notification.warning({ message: `Aviso!`, description: `Não foi possivel excluir, deve conter referências com outros registros!` });\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: 'acf_datalancamento' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&SomenteAtivos=true&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}&dataInicial=${FormatDate(dataPesquisa)}&filtro=&mostrarValeQuitado=${parametrosValePresente.getFieldValue().valesQuitados}` } })\r\n }\r\n );\r\n };\r\n\r\n const modalExcluirVale = (ValePresente) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o Vale de R$ ${ValePresente.acf_valor} presenteado à ${ValePresente.acf_nomepresenteado} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirVale(ValePresente);\r\n }\r\n });\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n const imprimir = ValePresente => {\r\n window.open(linkApi + 'AntecipacaoClienteFornecedor/GerarComprovante/' + ValePresente.acf_id, \"_blank\");\r\n };\r\n\r\n useEffect(() => {\r\n parametrosValePresente.setFieldsValue({ DataFinal: moment(dataAtual) });\r\n parametrosValePresente.setFieldsValue({ DataInicial: moment(parametrosValePresente.getFieldValue().dataPesquisa) });\r\n }, [])\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {\r\n parametrosValePresente.setFieldsValue({ DataFinal: moment(dataAtual) });\r\n parametrosValePresente.setFieldsValue({ DataInicial: moment(parametrosValePresente.getFieldValue().dataPesquisa) });\r\n aplicarFiltrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n { setValesQuitados(value) }}> Mostrar Vales Quitados? \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n {acf_codigovalepresente}\r\n \r\n \r\n -\r\n \r\n \r\n {acf_nomepresenteado}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 40,\r\n render: ({ acf_datalancamento }) => (\r\n
\r\n {moment(acf_datalancamento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n width: 50,\r\n align: 'right',\r\n render: ({ acf_valor }) => (\r\n
\r\n {FormatNumber(acf_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Utilizado (R$)',\r\n width: 50,\r\n align: 'right',\r\n render: ({ valorUtilizado }) => (\r\n
\r\n {FormatNumber(valorUtilizado, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Saldo (R$)',\r\n width: 50,\r\n align: 'right',\r\n render: ({ saldoAntecipacao }) => (\r\n
\r\n {FormatNumber(saldoAntecipacao, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'right',\r\n fixed: 'right',\r\n width: 30,\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => { modalImprimir(dados) }} />\r\n \r\n \r\n modalExcluirVale(dados)} icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]}\r\n />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from 'react';\r\nimport { Form, Row, Col, Input, notification, Tag, Alert } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { compararDatas } from '../../services/funcoes';\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { Data, FormGW, InputPreco, TabelaDados } from \"../../components\";\r\n\r\nexport default function ManutencaoMetas({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n\r\n function salvarMeta(values) {\r\n if (!values.mtv_id) {\r\n if (manutencao.dados.length == 0) {\r\n notification.error({ message: 'Atenção', description: \"Não foi selecionado nenhum vendedor!\" });\r\n return;\r\n } values.listaVendedoresMetas = manutencao.dados;\r\n }\r\n carregando(true);\r\n if (!!values.mtv_id) {\r\n api.put(`MetaVenda/EditarAsync`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da meta foram editados com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post(`MetaVenda/IncluirAsync`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da meta foram incluídos com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n };\r\n\r\n function listarMsgVendedorComMeta(valor) {\r\n if (valor > 0) {\r\n return \r\n } else {\r\n return ;\r\n }\r\n };\r\n\r\n function populaVendedoresSel(keys, linhas) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: linhas } });\r\n };\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n if (compararDatas(formulario.getFieldValue().mtv_datainicial, formulario.getFieldValue().mtv_datafinal, '<=')) {\r\n return Promise.resolve();\r\n } else {\r\n formulario.setFieldsValue({ mtv_datafinal: null });\r\n return Promise.reject(notification.warning({ description: 'Data final deve ser maior que a data inicial!' }));\r\n }\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport ManutencaoMetas from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport { FormatDate } from '../../ValueObjects';\r\nimport moment from 'moment';\r\n\r\nexport default function DrawerMetas() {\r\n\r\n const [formManutencao, setFormManutencao] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (!!manutencao.dados && !editando) {\r\n if (!!manutencao.dados.mtv_id)\r\n setEditando(true);\r\n\r\n formManutencao.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formManutencao.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formManutencao.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome', outrosFiltros: `&dataInicial=${FormatDate(moment(new Date()).toDate().toLocaleDateString())}` } });\r\n setEditando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Tag, Progress, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport DrawerMetas from './drawer';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber, FormatDate } from '../../ValueObjects/';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { TabelaDados, Editar, Excluir, Data, BotaoIncluirDados, BreadcrumbPage, FiltroOrdenacao, FiltroSearch } from \"../../components\";\r\n\r\nexport default function Metas() {\r\n\r\n const [parametrosMetasVendas] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n\r\n useEffect(() => {\r\n parametrosMetasVendas.setFieldsValue({ dataInicial: moment(new Date()) });\r\n let data = !!parametrosMetasVendas.getFieldValue().dataInicial ? `&dataInicial=${FormatDate(parametrosMetasVendas.getFieldValue().dataInicial.toDate().toLocaleDateString())}` : null;\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome', outrosFiltros: data } });\r\n carregarDados();\r\n }, []);\r\n\r\n function excluirMeta(metaVenda) {\r\n api.delete(`MetaVenda/ExcluirAsync/${metaVenda.mtv_id}`).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n notification.warning({ message: 'Aviso!', description: 'Erro ao excluir a meta!' });\r\n }\r\n ).finally(\r\n () => {\r\n let data = !!parametrosMetasVendas.getFieldValue().dataInicial ? `&dataInicial=${FormatDate(parametrosMetasVendas.getFieldValue().dataInicial.toDate().toLocaleDateString())}` : null;\r\n dispatch({ type: listagemActions.CHANGE, data: { pageNumber: '1', ordem: '+pes_nome', outrosFiltros: data } });\r\n }\r\n );\r\n };\r\n\r\n const modalExcluirMeta = (metaVenda) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a meta de R$ ${metaVenda.mtv_valor} para o vendedor ${metaVenda.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirMeta(metaVenda);\r\n }\r\n });\r\n };\r\n\r\n function calculaPorcentagem(valor, vendido) {\r\n return (vendido * 100) / valor\r\n };\r\n\r\n function carregarDados() {\r\n if (!!parametrosMetasVendas.getFieldsValue().dataInicial) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataInicial=${FormatDate(parametrosMetasVendas.getFieldValue().dataInicial.toDate().toLocaleDateString())}` } });\r\n }\r\n };\r\n function showDrawerEdit(record) {\r\n record.mtv_datainicial = moment(record.mtv_datainicial);\r\n record.mtv_datafinal = moment(record.mtv_datafinal);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n { carregarDados(value) }} name=\"dataInicial\" label=\"Data Inicial\" />\r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {ven_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Vendedor',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Metas',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'Meta (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ mtv_valor }) => (\r\n
\r\n {FormatNumber(mtv_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vendido (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ mtv_totalvendido }) => (\r\n
\r\n {FormatNumber(mtv_totalvendido, true)}\r\n
\r\n ),\r\n },\r\n {\r\n render: ({ mtv_valor, mtv_totalvendido }) => (\r\n
\r\n `${parseFloat(percent.toFixed(2))}%`} />\r\n
\r\n ),\r\n },\r\n ]\r\n },\r\n {\r\n title: 'Datas',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'Inicial',\r\n align: 'center',\r\n width: 120,\r\n render: ({ mtv_datainicial }) => (\r\n
\r\n {moment(mtv_datainicial).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Final',\r\n align: 'center',\r\n width: 120,\r\n render: ({ mtv_datafinal }) => (\r\n
\r\n {moment(mtv_datafinal).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n { showDrawerEdit(record) }} icon={} />\r\n \r\n \r\n { modalExcluirMeta(record) }} icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Form, Row, Col, InputNumber, Tag, Alert, Radio, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormGW, TabelaDados } from \"../../components\";\r\n\r\nexport default function ManutencaoComissao({ formulario, carregando, aoSalvar, editar }) {\r\n\r\n const [formComissao] = Form.useForm();\r\n const [dados, setDados] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [vendedorSelec, setVendedorSelec] = useState([]);\r\n\r\n function possuiComissao(registro) {\r\n let retorno = false;\r\n if ((!!registro.ven_perccomissaoaprazo && registro.ven_perccomissaoaprazo > 0) ||\r\n (!!registro.ven_perccomissaoavista && registro.ven_perccomissaoavista > 0)) {\r\n retorno = true;\r\n }\r\n return retorno;\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+loc_id' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `` } });\r\n formulario.setFieldsValue({ ven_formacalculocomissao: 1 });\r\n }, []);\r\n\r\n function popularVendedoresSelec(keys, linhas) {\r\n setVendedorSelec(linhas);\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+loc_id' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `` } });\r\n };\r\n\r\n function salvarDados(dados) {\r\n if ((!!vendedorSelec && vendedorSelec.length > 0) || editar) {\r\n let dadosTemp = {};\r\n dadosTemp.ven_formacalculocomissao = !!dados.ven_formacalculocomissao ? dados.ven_formacalculocomissao : \"\";\r\n dadosTemp.ven_formulacomissao = !!dados.ven_formulacomissao ? dados.ven_formulacomissao : \"\";\r\n dadosTemp.ven_perccomissaoaprazo = dados.ven_perccomissaoaprazo;\r\n dadosTemp.ven_perccomissaoavista = dados.ven_perccomissaoavista;\r\n dadosTemp.vendedores = vendedorSelec;\r\n if (editar) {\r\n dadosTemp.vendedores.push({ ven_id: dados.ven_id });\r\n }\r\n carregando(true);\r\n api.put('Comissao/EditarComissao', dadosTemp).then(\r\n res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados de comissão foram salvos com sucesso!\" });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n notification.warning({ message: 'Vendedores não selecionados', description: \"Favor selecionar ao menos um vendedor!\" });\r\n }\r\n };\r\n\r\n function retornaFormula(valor) {\r\n let retorno = \"\";\r\n\r\n if (valor === 1) {\r\n retorno = \"Recebimento\";\r\n } else if (valor === 2) {\r\n retorno = \"Faturamento\";\r\n } else {\r\n retorno = \"\";\r\n }\r\n return retorno;\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')} />\r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {!editar && (\r\n \r\n {ven_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Vendedores',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Percentual %',\r\n align: 'center',\r\n colSpan: 3,\r\n children: [\r\n {\r\n title: 'à Vista',\r\n align: 'center',\r\n render: ({ ven_perccomissaoavista }) => (\r\n
\r\n {((ven_perccomissaoavista > 0) ? {ven_perccomissaoavista}% : '')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'à Prazo',\r\n align: 'center',\r\n render: ({ ven_perccomissaoaprazo }) => (\r\n
\r\n {((ven_perccomissaoaprazo > 0) ? {ven_perccomissaoaprazo} % : '')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Atenção',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n render: (record) => (\r\n
\r\n {!possuiComissao(record) && }\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n render: ({ ven_formacalculocomissao }) => (\r\n
\r\n {retornaFormula(ven_formacalculocomissao)}\r\n
\r\n ),\r\n },\r\n ]\r\n } parametrosSelecionarItens={\r\n {\r\n tipo: \"change\",\r\n funcao: popularVendedoresSelec\r\n }\r\n } />}\r\n
\r\n \r\n );\r\n\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoComissao from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerComissao({editar}) {\r\n\r\n const [formManutencao, setFormManutencao] = Form.useForm();\r\n const [ carregando, setCarregando ] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n if (manutencao.dados !== null) {\r\n formManutencao.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formManutencao.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formManutencao.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n destroyOnClose\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","\r\nimport React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Form, Tag } from \"antd\";\r\nimport { EditOutlined } from \"@ant-design/icons\";\r\n\r\nimport DrawerComissao from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BotaoIncluirDados, BreadcrumbPage, FiltroSearch, TabelaDados, Editar } from \"../../components\";\r\n\r\nexport default function Comissao() {\r\n\r\n const [openManutencao, setOpenManutencao] = useState(false);\r\n const [registroManutencao, setRegistroManutencao] = useState({});\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editar, setEditar] = useState(false);\r\n\r\n const showDrawer = () => {\r\n setEditar(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+loc_id' } });\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `` } });\r\n }, []);\r\n\r\n function editarComissao(registro) {\r\n setEditar(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n showDrawer({})}>\r\n DEFINIR COMISSÃO\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {ven_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Comissões',\r\n render: ({ pes_nome}) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Comissão %',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'à Vista',\r\n align: 'center',\r\n width: '20%',\r\n render: ({ ven_perccomissaoavista }) => (\r\n
\r\n {ven_perccomissaoavista}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'à Prazo',\r\n align: 'center',\r\n width: '20%',\r\n render: ({ ven_perccomissaoaprazo }) => (\r\n
\r\n {ven_perccomissaoaprazo}%\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n editarComissao(record)} icon={} />\r\n \r\n
\r\n ),\r\n },\r\n ]\r\n } />\r\n
\r\n setOpenManutencao(false)} editar={editar} />\r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Form, Select, Button, Table, Collapse, Divider } from \"antd\";\r\nimport { SearchOutlined, ArrowUpOutlined, ArrowDownOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { ModalGerarComissao } from \"../../components/modals/\";\r\nimport { FormatDate, FormatNumber } from \"../../ValueObjects\";\r\nimport { BreadcrumbPage, BotaoIncluirDados, Data } from \"../../components\";\r\nimport { isNotNullOrEmpty } from '../../services/funcoes';\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function ConsultaComissao() {\r\n const [openModal, setOpenModal] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formConsultaComissao] = Form.useForm();\r\n const [dados, setDados] = useState([]);\r\n const [detalhesDados, setDetalhesDados] = useState([]);\r\n const [painelAtivo, setPainelAtivo] = useState([]);\r\n const [dadosModal, setDadosModal] = useState([]);\r\n\r\n\r\n function efetuarPesquisa() {\r\n let filtro = '';\r\n filtro += (!!formConsultaComissao.getFieldValue().dataFinal ? '&dataFinal=' + FormatDate(formConsultaComissao.getFieldValue().dataFinal.toDate().toLocaleDateString()) : '&dataFinal=')\r\n filtro += (!!formConsultaComissao.getFieldValue().dataInicial ? '&dataInicial=' + FormatDate(formConsultaComissao.getFieldValue().dataInicial.toDate().toLocaleDateString()) : '&dataInicial=');\r\n filtro += (!!formConsultaComissao.getFieldValue().ven_id ? '&vendedores=' + formConsultaComissao.getFieldValue().ven_id : '&vendedores=');\r\n api.get(`Comissao/ConsultarComissao?` + filtro).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDados(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n if (dados.length > 0) {\r\n let indice = 0;\r\n dados.forEach((vendedor) => {\r\n vendedor.comissaoVendedores.forEach((comissao) => {\r\n comissao.indice = indice;\r\n indice++;\r\n })\r\n })\r\n }\r\n }, [dados])\r\n\r\n function retornaDescTipo(tipo) {\r\n let retorno = '';\r\n if (!!tipo || tipo === 0) {\r\n switch (tipo) {\r\n case 0:\r\n retorno = 'Vendas à Vista';\r\n break;\r\n case 1:\r\n retorno = 'Recebimentos Parcelas';\r\n\r\n break;\r\n case 3:\r\n retorno = 'Devoluções';\r\n break;\r\n }\r\n }\r\n return retorno;\r\n };\r\n\r\n function buscarDadosDetalhados(indice, ven_id) {\r\n if (isNotNullOrEmpty(indice)) {\r\n let comissaoVendedores = dados.find(vendedor => { return vendedor.ven_id === ven_id })?.comissaoVendedores;\r\n let tipo = comissaoVendedores.find(com => { return com.indice === parseInt(indice) })?.fpg_tipoavistaaprazo;\r\n setPainelAtivo(indice);\r\n let filtro = '';\r\n filtro += '&IdVendedor=' + ven_id;\r\n filtro += (!!formConsultaComissao.getFieldValue().dataFinal ? '&dataFinal=' + FormatDate(formConsultaComissao.getFieldValue().dataFinal.toDate().toLocaleDateString()) : '&dataFinal=')\r\n filtro += (!!formConsultaComissao.getFieldValue().dataInicial ? '&dataInicial=' + FormatDate(formConsultaComissao.getFieldValue().dataInicial.toDate().toLocaleDateString()) : '&dataInicial=');\r\n switch (tipo) {\r\n case 1:\r\n api.get(`Comissao/ListaComissaoAprazo?` + filtro).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDetalhesDados(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n break;\r\n case 0:\r\n api.get(`Comissao/ListaComissaoAvista?` + filtro).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDetalhesDados(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n break;\r\n case 3:\r\n api.get(`Comissao/ListaComissaoDevolucao?` + filtro).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDetalhesDados(res.data.dados);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n } else {\r\n setPainelAtivo(\"\");\r\n }\r\n };\r\n\r\n function abrirModalComissao() {\r\n setOpenModal(true);\r\n let dadosTemp = [];\r\n dadosTemp.dataInicial = formConsultaComissao.getFieldValue().dataInicial;\r\n dadosTemp.dataFinal = formConsultaComissao.getFieldValue().dataFinal;\r\n setDadosModal(dadosTemp);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n abrirModalComissao({})}>\r\n GERAR COMISSÃO\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n ({ven.ven_id} - {ven.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {dados.length > 0 && \r\n
\r\n Vendedor\r\n \r\n \r\n Total de Vendas (R$)\r\n \r\n \r\n Percentual de Comissão\r\n \r\n \r\n Total de Comissão (R$)\r\n \r\n }\r\n {dados.map((vendedor) => (\r\n
\r\n \r\n
\r\n {vendedor.pes_nome}\r\n \r\n \r\n {FormatNumber(vendedor.valorTotalVenda, true)}\r\n \r\n \r\n \r\n {FormatNumber(vendedor.valorTotalComissao, true)}\r\n \r\n \r\n (buscarDadosDetalhados(indice, vendedor.ven_id))}\r\n expandIcon={({ isActive }) => isActive ? : }>\r\n {vendedor.comissaoVendedores.map((comissao) => (\r\n \r\n \r\n {retornaDescTipo(comissao.fpg_tipoavistaaprazo)}\r\n \r\n \r\n {FormatNumber(comissao.com_basecalculo, true)}\r\n \r\n \r\n {comissao.com_percentual} %\r\n \r\n \r\n {FormatNumber(comissao.com_valor, true)}\r\n \r\n \r\n } key={comissao.indice}>\r\n \r\n \r\n
(\r\n
\r\n \r\n {ser_serie || 'Não Informada'} / {ntf_numero || 'Não Informado'} / {prc_numeroparcela || 'Não Informada'}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Data',\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n \r\n {(moment(ntf_dataemissao).format('DD/MM/YYYY'))}\r\n \r\n
\r\n )\r\n }, {\r\n title: 'Base de Cálculo (R$)',\r\n align: 'right',\r\n render: ({ mcc_valor, valorTotalNota }) => (\r\n
\r\n \r\n {FormatNumber((!!mcc_valor ? mcc_valor : valorTotalNota), true)}\r\n \r\n
\r\n )\r\n }, {\r\n title: 'Valor Comissão (R$)',\r\n align: 'right',\r\n render: ({ valorComissao }) => (\r\n
\r\n \r\n {FormatNumber(valorComissao, true)}\r\n \r\n
\r\n )\r\n }\r\n ]} dataSource={detalhesDados} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n ))}\r\n \r\n setOpenModal(false)} dadosModal={dadosModal} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, notification, InputNumber, Table, Button, Modal } from \"antd\";\r\nimport { EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { Data, FormGW, InputPreco } from \"../../components\";\r\nimport { imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { ModalEditarVencimentoParcela } from '../../components/modals/';\r\nimport SelectPaginado from '../../components/selectPaginado';\r\n\r\nexport default function ManutencaoContaReceber({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const { Option } = Select;\r\n const [openIntevaloDias, setOpenIntevaloDias] = useState(false);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [dadosContasReceber, setDadosContasReceber] = useState([]);\r\n const [openModalEditarParcela, setOpenModalEditarParcela] = useState(false);\r\n const [dadosLinhaEditar, setDadosLinhaEditar] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n\r\n const salvarManutencao = (values) => {\r\n values.parcelas = dadosContasReceber.parcelas;\r\n values.cpr_intervalodias = dadosContasReceber.cpr_intervalodias;\r\n values.cpr_numerodocumento = !!values.cpr_numerodocumento ? values.cpr_numerodocumento.toString() : \"\";\r\n \r\n if (!(!!values.valortotal) || values.valortotal === 0) {\r\n notification.warn({ message: 'Aviso!', description: 'Informe um valor total do documento!' });\r\n return false;\r\n }\r\n carregando(true);\r\n api.post('/contasPagarReceber/IncluirContasReceber', values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Conta a receber incluída com sucesso!\" });\r\n modalImprimir(res.data);\r\n }\r\n ).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }\r\n ).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } })\r\n aoSalvar();\r\n carregando(false);\r\n });\r\n };\r\n\r\n const modalImprimir = (record) => {\r\n Modal.confirm({\r\n title: 'Imprimir?',\r\n icon: ,\r\n content: 'Deseja imprimir a duplicata?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n imprimirRelatorioJasper(37, { IdContaPagarReceber: record.cpr_id });\r\n }\r\n });\r\n };\r\n\r\n function gerarParcelas() {\r\n let dados = [];\r\n let parcelas = {};\r\n dados.parcelas = [];\r\n let qtdDias = 0;\r\n let somaDasParcelas = 0;\r\n let dataVencimento = moment(formulario.getFieldValue().cpr_datavencimento);\r\n let valorTotal = parseFloat(formulario.getFieldValue().valortotal);\r\n let quantidadeParcelas = formulario.getFieldValue().cpr_numeroparcelas;\r\n let periodo = formulario.getFieldValue().cpr_periodicidade;\r\n let primeiroPagamento = moment(formulario.getFieldValue().cpr_dataprimeiropagamento);\r\n let divisao = 0;\r\n let intervaloDias = formulario.getFieldValue().cpr_intervalodias;\r\n if (!!valorTotal && !!quantidadeParcelas && ((quantidadeParcelas === 1 && !!dataVencimento) || (quantidadeParcelas > 1 && !!primeiroPagamento && !!periodo && ((periodo === 4 && !!intervaloDias) || periodo !== 4)))) {\r\n divisao = parseFloat((valorTotal / quantidadeParcelas).toFixed(2));\r\n if (quantidadeParcelas > 1) {\r\n if (!!periodo && !!primeiroPagamento) {\r\n if (periodo === 1) {\r\n qtdDias = 7;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else if (periodo === 2) {\r\n qtdDias = 15;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else if (periodo === 3) {\r\n qtdDias = 30;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else {\r\n qtdDias = intervaloDias;\r\n dados.cpr_intervalodias = qtdDias;\r\n }\r\n }\r\n for (var i = 0; i < quantidadeParcelas; i++) {\r\n parcelas = {};\r\n parcelas.prc_numeroparcela = i + 1;\r\n parcelas.prc_valor = divisao;\r\n\r\n if (!!primeiroPagamento) {\r\n var outraData = new Date(primeiroPagamento);\r\n outraData.setDate((outraData.getDate()) + (i * qtdDias));\r\n parcelas.prc_datavencimento = moment(outraData);\r\n } else {\r\n parcelas.prc_datavencimento = dataVencimento;\r\n }\r\n dados.parcelas.push(parcelas);\r\n if (i !== 0)\r\n somaDasParcelas += parseFloat(divisao.toFixed(2));\r\n }\r\n if (somaDasParcelas > 0)\r\n dados.parcelas[0].prc_numeroparcela = 1;\r\n dados.parcelas[0].prc_valor = parseFloat((valorTotal - somaDasParcelas).toFixed(2));\r\n } else {\r\n parcelas = {};\r\n dados.cpr_periodicidade = null;\r\n dados.prc_periodicidade = null;\r\n dados.cpr_dataprimeiropagamento = dataVencimento;\r\n parcelas.prc_datavencimento = dataVencimento;\r\n parcelas.prc_numeroparcela = 1;\r\n parcelas.prc_valor = parseFloat(valorTotal).toFixed(2);\r\n dados.parcelas.push(parcelas);\r\n }\r\n setDadosContasReceber(dados);\r\n } else {\r\n setDadosContasReceber([]);\r\n }\r\n };\r\n\r\n function mostrarIntervaloDias(value, option) {\r\n gerarParcelas();\r\n if (option.value === 4) setOpenIntevaloDias(true);\r\n else setOpenIntevaloDias(false);\r\n };\r\n\r\n function editarDataVencimentoParcela(linha) {\r\n setDadosLinhaEditar(linha);\r\n setOpenModalEditarParcela(true);\r\n };\r\n\r\n function carregarListas() {\r\n api.get(`contaCorrente/listar?filtro=&ordem=+ctc_descricao`).then(res => {\r\n let key = 0;\r\n res.data.items.forEach((item) => { item.key = key++ }\r\n )\r\n setListaContaCorrente(res.data.items);\r\n })\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?Ativo=true&CodReceitaDespesa=2`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ cpr_datainclusao: moment(new Date()), cpr_periodicidade: 3, cpr_numeroparcelas: 1 });\r\n carregarListas();\r\n gerarParcelas();\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n ({pc.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaContaCorrente.map((item) => (\r\n {item.ctc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n gerarParcelas()} label=\"Valor Total do Documento (R$)\" name=\"valortotal\" rules={[{ required: true }]} />\r\n \r\n \r\n \r\n gerarParcelas()} step={1}\r\n min={1}\r\n placeholder=\"Informe o Número de Parcelas\"\r\n />\r\n \r\n \r\n prevValues.cpr_numeroparcelas !== currentValues.cpr_numeroparcelas}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('cpr_numeroparcelas') === 1) return (\r\n <>\r\n \r\n gerarParcelas()} label=\"Data Vencimento\" name=\"cpr_datavencimento\" rules={[{ required: true, message: 'Informe a data de vencimento' }]} />\r\n \r\n \r\n );\r\n if (getFieldValue('cpr_numeroparcelas') > 1) return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n gerarParcelas()} label=\"Data Primeiro Vencimento\" name=\"cpr_dataprimeiropagamento\" rules={[{ required: true, message: 'Informe a data do primeiro vencimento' }]} />\r\n \r\n {openIntevaloDias === true &&\r\n \r\n \r\n gerarParcelas()} placeholder=\"Informe o intervalo de dias\" />\r\n \r\n \r\n }\r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosContasReceber.parcelas && dadosContasReceber.parcelas.length > 1 &&\r\n
\r\n
(\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n align: 'center',\r\n width: 98,\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Popover, Modal, notification } from 'antd';\r\nimport { ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, EyeOutlined, DeleteOutlined, ExclamationCircleOutlined, CheckCircleOutlined, CloseOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerContaReceber from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber, FormatDate } from '../../ValueObjects';\r\nimport { ModalListarParcelas } from \"../../components/modals/\";\r\nimport { imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { listagemActions, manutencaoActions, drawerActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, TabelaDados, ComboData, Data, FiltroSearch } from \"../../components\";\r\n\r\nexport default function ContaReceber() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openPesquisaAvancada, setOpenPesquisaAvancada] = useState(false);\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [dataAtual] = useState(new Date());\r\n const [parametrosContasReceber] = Form.useForm();\r\n const [listaStatusParcela, setListaStatusParcela] = useState([]);\r\n const [openModal, setOpenModal] = useState(false);\r\n const [parcelas, setParcelas] = useState([]);\r\n\r\n const togglePesquisa = () => {\r\n setOpenPesquisaAvancada(!openPesquisaAvancada);\r\n };\r\n\r\n const modalNovaConta = (item) => {\r\n Modal.confirm({\r\n title: 'Conta estornada com sucesso!',\r\n icon: ,\r\n content: `Deseja criar uma nova conta com base nesta conta estornada?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.get(`ContasPagarReceber/Buscar/${item.cpr_id}`).then(\r\n res => {\r\n let dadosTemp = res.data;\r\n dadosTemp.valortotal = 0;\r\n dadosTemp.cpr_datainclusao = moment(res.data.cpr_datainclusao);\r\n dadosTemp.cpr_dataprimeiropagamento = moment(res.data.cpr_dataprimeiropagamento);\r\n res.data.parcelas.forEach(parcela => {\r\n dadosTemp.valortotal += parcela.prc_valor;\r\n });\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n });\r\n }\r\n });\r\n };\r\n\r\n async function modalEstornar(item) {\r\n if (!!item.ntf_id) {\r\n Modal.warning({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Parcela ligada a Nota Fiscal: ${item.ntf_id}, realizar a devolução ou o cancelamento!`,\r\n centered: true\r\n });\r\n return false;\r\n } else {\r\n Modal.confirm({\r\n title: 'Estornar Parcela',\r\n icon: ,\r\n content: `Deseja estornar a conta de ${item.pes_nome} no valor de ${FormatNumber(item.prc_valor, true)}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.post(`ContasPagarReceber/CancelarContaPagarReceber?ContaPagarReceberId=${item.cpr_id}`).then(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } })\r\n modalNovaConta(item);\r\n }).catch(\r\n err => {\r\n Modal.warning({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: !!err && !!err.response && !!err.response.data && !!err.response.data.Message ? err.response.data.Message : 'Erro ao efetuar o estorno da parcela!',\r\n centered: true\r\n });\r\n });\r\n }\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=StatusParcela`).then(res => {\r\n setListaStatusParcela(res.data);\r\n });\r\n parametrosContasReceber.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n }, []);\r\n\r\n useEffect(() => {\r\n carregarLista();\r\n }, [dataPesquisa]);\r\n\r\n function carregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&tipoMovimentacao=1&dataInicial=${FormatDate(dataPesquisa)}&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}`, ordem: '+pes_nome' } });\r\n }\r\n\r\n function aplicarFiltrosAvancados() {\r\n let filtros = '&tipoMovimentacao=1';\r\n filtros += `&dataInicial=${(!!parametrosContasReceber.getFieldValue().dataInicial ? moment(parametrosContasReceber.getFieldValue().dataInicial).format('YYYY-MM-DD') : FormatDate(dataAtual))}`;\r\n filtros += `&dataFinal=${(parametrosContasReceber.getFieldValue().dataFinal === undefined ? FormatDate(dataAtual) : FormatDate(parametrosContasReceber.getFieldValue().dataFinal._d.toLocaleDateString()))}`;\r\n filtros += `&statusParcela=${(!!parametrosContasReceber.getFieldValue().statusParcela ? parametrosContasReceber.getFieldValue().statusParcela.join(',') : '0,1,2,3')}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros } });\r\n };\r\n\r\n function retornarStatus(prc_status) {\r\n if (prc_status === 0) {\r\n return 'Pendente'\r\n } else if (prc_status === 1) {\r\n return 'Rcto. Parcial'\r\n } else if (prc_status === 2) {\r\n return 'Liquidada'\r\n } else if (prc_status === 3) {\r\n return 'Reparcelada'\r\n }\r\n };\r\n\r\n function buscarParcelas(dados) {\r\n if (!!dados.cpr_id) {\r\n api.get(`Parcela/ListarParcelas?IdContaPagarReceber=${dados.cpr_id}&Estornado=false&PagarOuReceber=1&PageSize=100&Order=+prc_numeroparcela`).then(res => {\r\n setParcelas(res.data.items);\r\n setOpenModal(true);\r\n }).catch(\r\n error => {\r\n notification.warning({ message: 'Aviso!', description: 'Erro ao pesquisar as parcelas!' });\r\n }\r\n );\r\n }\r\n };\r\n\r\n function imprimirContaReceber(record) {\r\n imprimirRelatorioJasper(37, { IdContaPagarReceber: record.cpr_id });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n parametrosContasReceber.setFieldsValue({ dataFinal: moment(new Date()) });\r\n parametrosContasReceber.setFieldsValue({ dataInicial: moment(parametrosContasReceber.getFieldValue().dataPesquisa) });\r\n aplicarFiltrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {openPesquisaAvancada ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n {\r\n if (prc_status === 0 || prc_status === 1 || prc_status === 3) {\r\n return 'Parcela Pendente'\r\n } else if (prc_status === 2) {\r\n return 'Parcela Liquidada'\r\n }\r\n }} placement=\"right\">\r\n \r\n {retornarStatus(prc_status)}\r\n \r\n \r\n ),\r\n }, {\r\n title: 'Nº Doc.',\r\n width: 80,\r\n align: 'center',\r\n render: ({ cpr_numerodocumento }) => (\r\n \r\n {cpr_numerodocumento}\r\n \r\n ),\r\n }, {\r\n title: 'Cliente',\r\n width: 330,\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n width: 80,\r\n align: 'center',\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Observação',\r\n width: 300,\r\n render: ({ cpr_observacao }) => (\r\n
\r\n {cpr_observacao}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n width: 200,\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: ({ prc_status }, record, dados) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {(prc_status === 0 || prc_status === 1 || prc_status === 3) && \r\n Obs.: {cpr_descricao || ``}\r\n \r\n \r\n Nota N°: {ntf_numero || 'Não Informado'}\r\n \r\n \r\n Parcela N°: {prc_numeroparcela || 'Não Informado'}\r\n \r\n \r\n Saldo Devedor (R$): {FormatNumber(saldo, true)}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n setOpenModal(false)} parcelas={parcelas} setParcelas={setParcelas} />\r\n \r\n\r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Tag, InputNumber, Typography, Row, Col, Table, Form, Button, Modal, notification, Tooltip } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, FormOutlined, EditOutlined, CheckOutlined, DeleteOutlined, ReloadOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { Data, InputPreco } from \"../../components\";\r\nimport { diferencaDatas, info } from \"../../services/funcoes\";\r\n\r\nexport default function ReparcelamentoParcelas({ aoSalvar, carregando, listaParcelas, totalizadores, formulario, dadosCliente, parcelasGeradas }) {\r\n\r\n const [dadosReparcelamento, setDadosReparcelamento] = useState({});\r\n const [listaParcelasReparcelar, setListaParcelasReparcelar] = useState(listaParcelas);\r\n const [descontoItem, setDescontoItem] = useState(false);\r\n const [paginaParcAntigas, setPaginaParcAntigas] = useState(1);\r\n const [paginaParcGeradas, setPaginaParcGeradas] = useState(1);\r\n const [nroRegistrosParcAntigas, setNroRegistrosParcAntigas] = useState(10);\r\n const [nroRegistrosParcGeradas, setNroRegistrosParcGeradas] = useState(100);\r\n\r\n function reparcelar(values) {\r\n carregando(true);\r\n values = { ...dadosReparcelamento };\r\n values.parcelas = parcelasGeradas.parcelasGeradas;\r\n values.parcelasQuitadas = listaParcelasReparcelar;\r\n values.pes_id = dadosCliente.pes_id;\r\n\r\n api.post('/Reparcelamento/Incluir', values).then(res => {\r\n if (res.data) {\r\n Modal.success({\r\n content: 'Reparcelamento realizado com sucesso!',\r\n });\r\n }\r\n }, err => {\r\n info('Não foi possivel realizar o reparcelamento!');\r\n }).finally(() => {\r\n aoSalvar();\r\n carregando(false);\r\n });\r\n };\r\n\r\n function zerarJuros() {\r\n let listaTemp = [...listaParcelasReparcelar];\r\n let listaTotalizadores = { ...totalizadores.listaTotalizadoresReparcelar };\r\n listaTotalizadores.valorAReceber = 0;\r\n listaTemp.forEach(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n item.valorJuros = 0;\r\n if (parseFloat(item.valorDesconto) > valorTotal) {\r\n item.valorDesconto = valorTotal;\r\n }\r\n item.valorAReceber = parseFloat((valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorAcrescimo)).toFixed(2));\r\n item.valorPago = item.valorAReceber;\r\n item.prc_valor = item.valorAReceber;\r\n listaTotalizadores.valorTotalJuros = 0;\r\n listaTotalizadores.valorAReceber += item.valorAReceber;\r\n });\r\n setListaParcelasReparcelar(listaTemp);\r\n totalizadores.setListaTotalizadoresReparcelar(listaTotalizadores);\r\n\r\n };\r\n function gerarParcelas() {\r\n if (!!formulario.getFieldValue().numeroParcelas) {\r\n let valorParcela = parseFloat((parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber) / formulario.getFieldValue().numeroParcelas).toFixed(2));\r\n let novaData = new Date();\r\n let dataInclusao = new Date();\r\n let somaDasParcelas = 0;\r\n let parcelarGeradas = [];\r\n let dados = {};\r\n dados.cpr_descricao = 'Reparcelamento de Parcelas';\r\n dados.ntf_id = null;\r\n dados.cpr_numerodocumento = '';\r\n dados.cpr_numeroparcelas = formulario.getFieldValue().numeroParcelas;\r\n dados.cpr_pagarreceber = 1;\r\n dados.cpr_observacao = '';\r\n dados.prc_periodicidade = null;\r\n dados.cpr_intervalodias = null;\r\n dados.cpr_datainclusao = dataInclusao;\r\n dados.cpr_contaestornadarelacionada = null;\r\n dados.pessoaAutorizadaId = null;\r\n dados.contaGerencial = { ctg_id: null };\r\n dados.contaCorrente = { ctc_id: null };\r\n setDadosReparcelamento(dados);\r\n\r\n for (let i = 0; i < formulario.getFieldValue().numeroParcelas; i++) {\r\n novaData.setDate(novaData.getDate() + 30);\r\n if (i !== 0) {\r\n somaDasParcelas += valorParcela;\r\n }\r\n let parcela = {\r\n cpr_datainclusao: dataInclusao,\r\n cpr_id: null,//não pode ser nulo...\r\n cpr_numerodocumento: null,\r\n cpr_numeroparcelas: formulario.getFieldValue().numeroParcelas,\r\n loc_id: null,\r\n mcc_datapagamento: null,\r\n ntf_id: null,\r\n prc_codigobarras: null,//criar no momento de incluir o registro no banco\r\n prc_datavencimento: novaData,\r\n prc_estornado: false,\r\n prc_id: null,\r\n prc_numeroparcela: i + 1,\r\n statusParcela: null,\r\n prc_valor: valorParcela,\r\n valorParcela: valorParcela,\r\n valorDesconto: 0,\r\n valorTotalJuros: 0,\r\n ctg_id: null,\r\n ctc_id: null,\r\n bol_id: null,\r\n fpg_id: null,\r\n cpg_id: null\r\n }\r\n novaData = new Date(parcela.prc_datavencimento);\r\n parcelarGeradas.push(parcela);\r\n }\r\n if (somaDasParcelas > 0) {\r\n parcelarGeradas[0].prc_valor = parseFloat((parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber) - somaDasParcelas).toFixed(2));\r\n parcelarGeradas[0].valorParcela = parcelarGeradas[0].prc_valor;\r\n }\r\n parcelasGeradas.setParcelasGeradas(parcelarGeradas);\r\n }\r\n };\r\n\r\n async function ajustaDatasParcelas(record, idx) {\r\n let listaTemp = [...parcelasGeradas.parcelasGeradas];\r\n if (listaTemp[idx - 1] != null) {\r\n if (diferencaDatas(listaTemp[idx - 1].prc_datavencimento, new Date(formulario.getFieldValue(`prc_datavencimento${idx + 1}`))) > 30) {\r\n notification.warning({ message: 'Aviso!', description: 'Data das parcelas maior do que um mês!' });\r\n formulario.setFieldsValue({ [`prc_datavencimento${idx + 1}`]: listaTemp[idx].prc_datavencimento });\r\n return false;\r\n }\r\n }\r\n listaTemp[idx].prc_datavencimento = moment(new Date(formulario.getFieldValue(`prc_datavencimento${idx + 1}`)));\r\n for (let i = idx; i < listaTemp.length; i++) {\r\n if (listaTemp[i + 1] != null) {\r\n let dataVencimento = moment(new Date(new Date(formulario.getFieldValue(`prc_datavencimento${i + 1}`)).setDate(new Date(formulario.getFieldValue(`prc_datavencimento${i + 1}`)).getDate() + 30)));\r\n formulario.setFieldsValue({ [`prc_datavencimento${i + 2}`]: dataVencimento });\r\n listaTemp[i + 1].prc_datavencimento = moment(new Date(new Date(listaTemp[i].prc_datavencimento).setDate(new Date(listaTemp[i].prc_datavencimento).getDate() + 30)));\r\n }\r\n }\r\n parcelasGeradas.setParcelasGeradas(listaTemp);\r\n }\r\n\r\n function onBlurValorParc(record) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let qtdTotParcelas = parcelasGeradas.parcelasGeradas.length;\r\n let valorTotal = parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber);\r\n let dados = formulario.getFieldsValue();\r\n for (let i = 1; i <= record; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - record)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > record; i--) {\r\n valorRestanteTot += valorParcelas;\r\n formulario.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let listaTemp = [...parcelasGeradas.parcelasGeradas];\r\n for (let a = 0; a < qtdTotParcelas; a++) {\r\n listaTemp[a].valorParcela = formulario.getFieldValue(`valorParcela${a + 1}`);\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n formulario.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n recalcularTotal(listaTemp);\r\n };\r\n\r\n function recalcularTotal(listaTemp) {\r\n listaTemp.forEach((parc) => {\r\n parc.prc_valor = parseFloat(parc.valorParcela) + parseFloat(parc.valorTotalJuros);\r\n });\r\n parcelasGeradas.setParcelasGeradas(listaTemp);\r\n };\r\n\r\n function onBlurValorJuros(parcela) {\r\n let listaTemp = [...parcelasGeradas.parcelasGeradas];\r\n let linha = listaTemp.filter((parc) => { return parc.prc_numeroparcela === parcela })[0];\r\n linha.valorTotalJuros = parseFloat(formulario.getFieldValue(`valorJuros${parcela}`));\r\n recalcularTotal(listaTemp);\r\n };\r\n\r\n useEffect(() => {\r\n let listaTotalizadores = { ...totalizadores.listaTotalizadoresReparcelar };\r\n if (!!parcelasGeradas && !!parcelasGeradas.parcelasGeradas && parcelasGeradas.parcelasGeradas.length > 0) {\r\n let totalJuros = 0;\r\n let valorAReceber = 0;\r\n for (const parc of parcelasGeradas.parcelasGeradas) {\r\n totalJuros += parc.valorTotalJuros;\r\n valorAReceber += parseFloat(parc.valorParcela);\r\n formulario.setFieldsValue({\r\n [`valorParcela${parc.prc_numeroparcela}`]: parc.valorParcela,\r\n [`valorJuros${parc.prc_numeroparcela}`]: parc.valorTotalJuros,\r\n [`prc_datavencimento${parc.prc_numeroparcela}`]: parc.prc_datavencimento\r\n });\r\n }\r\n listaTotalizadores.valorTotalJuros = totalJuros;\r\n listaTotalizadores.valorAReceber = valorAReceber;\r\n totalizadores.setListaTotalizadoresReparcelar(listaTotalizadores);\r\n formulario.setFieldsValue({ valorJuros: parseFloat(totalJuros.toFixed(2)) });\r\n } else {\r\n listaTotalizadores.valorTotalJuros = 0;\r\n totalizadores.setListaTotalizadoresReparcelar(listaTotalizadores);\r\n }\r\n }, [parcelasGeradas.parcelasGeradas]);\r\n\r\n function rateioJuros() {\r\n let valorJuros = parseFloat(formulario.getFieldValue(\"valorJuros\")) > 0 ? parseFloat(formulario.getFieldValue(\"valorJuros\")) : 0;\r\n let valorTotal = parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber);\r\n\r\n let listaTemp = [...parcelasGeradas.parcelasGeradas];\r\n let sobraJuros = 0;\r\n\r\n for (const [idx, item] of listaTemp.entries()) {\r\n let percentualJuros = (item.valorParcela * 100) / valorTotal;\r\n let juros = (valorJuros * percentualJuros) / 100;\r\n sobraJuros += juros - parseFloat(juros.toFixed(2));\r\n item.valorTotalJuros = parseFloat((parseFloat(juros.toFixed(2)) + (idx === listaTemp.length - 1 ? sobraJuros : 0)).toFixed(2));\r\n formulario.setFieldsValue({ [`valorJuros${item.prc_numeroparcela}`]: item.valorTotalJuros });\r\n item.prc_valor = item.valorParcela + item.valorTotalJuros;\r\n }\r\n parcelasGeradas.setParcelasGeradas(listaTemp);\r\n };\r\n\r\n function calcularJuros() {\r\n let percentual = parseFloat(formulario.getFieldValue(\"percentualJuros\"));\r\n let valorTotal = parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber);\r\n let valorJuros = (valorTotal * percentual) / 100;\r\n formulario.setFieldsValue({ valorJuros: valorJuros });\r\n rateioJuros();\r\n };\r\n\r\n return (\r\n
\r\n \r\n Parcelas Vencidas\r\n \r\n
\r\n
(\r\n \r\n {prc_numeroparcela} - {cpr_numeroparcelas}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Vencimento',\r\n width: 130,\r\n align: 'center',\r\n render: ({ prc_datavencimento, vencida }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Parcela (R$)',\r\n align: 'right',\r\n render: ({ valorOriginal }) => (\r\n
\r\n \r\n {FormatNumber(!!valorOriginal ? valorOriginal : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Valor Recebido Parcela (R$)',\r\n align: 'right',\r\n render: ({ valorQuitado }) => (\r\n
\r\n \r\n {FormatNumber(!!valorQuitado ? valorQuitado : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
Juros\r\n \r\n \r\n \r\n Cód. Barras: {prc_codigobarras || 'Não Informado'}\r\n \r\n \r\n Nº Documento: {cpr_numerodocumento || 'Não Informado'}\r\n \r\n \r\n ,\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }} columnWidth={30}\r\n pagination={{\r\n current: paginaParcAntigas,\r\n pageSize: nroRegistrosParcAntigas,\r\n total: listaParcelasReparcelar.length,\r\n onChange: (pg) => setPaginaParcAntigas(pg),\r\n onShowSizeChange: (current, page) => setNroRegistrosParcAntigas(page)\r\n }} />\r\n \r\n
\r\n {parcelasGeradas.parcelasGeradas.length === 0 &&\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n prevValues.numeroParcelas !== currentValues.numeroParcelas}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('numeroParcelas') > 0) return (\r\n \r\n );\r\n else return (\r\n \r\n );\r\n }}\r\n \r\n \r\n \r\n }\r\n {parcelasGeradas.parcelasGeradas.length > 0 &&\r\n
\r\n \r\n
\r\n \r\n Parcelas Geradas\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {prc_numeroparcela} - {cpr_numeroparcelas}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Vencimento',\r\n width: 130,\r\n render: ({ prc_numeroparcela }, record, idx) => (\r\n
\r\n ajustaDatasParcelas(record, idx)} onPressEnter={() => ajustaDatasParcelas(record, idx)} />\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Juros (R$)',\r\n width: 130,\r\n align: 'right',\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n onBlurValorJuros(prc_numeroparcela)} />\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Parcela (R$)',\r\n align: 'right',\r\n width: 130,\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n onBlurValorParc(prc_numeroparcela)} disabled={prc_numeroparcela === parcelasGeradas.parcelasGeradas.length} />\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ prc_valor }) => (\r\n
\r\n {{FormatNumber(prc_valor, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 10,\r\n render: ({ }) => (\r\n
\r\n
\r\n ),\r\n }\r\n ]\r\n } columnWidth={30}\r\n scroll={{ x: 900, y: 200 }}\r\n pagination={{\r\n current: paginaParcGeradas,\r\n pageSize: nroRegistrosParcGeradas,\r\n total: parcelasGeradas.parcelasGeradas.length,\r\n onChange: (pg) => setPaginaParcGeradas(pg),\r\n onShowSizeChange: (current, page) => setNroRegistrosParcGeradas(page)\r\n }} />\r\n \r\n \r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Juros\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!descontoItem &&\r\n \r\n { rateioJuros() }} />\r\n \r\n }\r\n {descontoItem &&\r\n \r\n { calcularJuros() }} />\r\n \r\n }\r\n \r\n \r\n {(!!totalizadores.listaTotalizadoresReparcelar.valorDesconto && totalizadores.listaTotalizadoresReparcelar.valorDesconto !== 0) &&\r\n \r\n \r\n \r\n Valor Descontos (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadoresReparcelar.valorDesconto, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {(!!totalizadores.listaTotalizadoresReparcelar.valorAReceber && totalizadores.listaTotalizadoresReparcelar.valorAReceber !== 0) &&\r\n \r\n \r\n \r\n Valor à Receber (R$):\r\n \r\n \r\n {FormatNumber(parseFloat(totalizadores.listaTotalizadoresReparcelar.valorTotalJuros) + parseFloat(totalizadores.listaTotalizadoresReparcelar.valorAReceber), true)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Drawer, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions } from '../../actions';\r\nimport ReparcelamentoParcelas from './reparcelamentoParcelas';\r\n\r\nexport default function DrawerReparcelamento({ listaParcelasReparcelar, totalizadores, dadosCliente, buscarParcelasPessoa }) {\r\n\r\n const [formReparcelamento] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [parcelasGeradas, setParcelasGeradas] = useState([]);\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formReparcelamento.resetFields();\r\n setParcelasGeradas([]);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n useEffect(() => {\r\n setParcelasGeradas([]);\r\n formReparcelamento.resetFields();\r\n }, [listaParcelasReparcelar]);\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n { fecharDrawer(); buscarParcelasPessoa(); }} listaParcelas={listaParcelasReparcelar} totalizadores={totalizadores} dadosCliente={dadosCliente} parcelasGeradas={{ parcelasGeradas, setParcelasGeradas }} />\r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Menu, Checkbox, Form, Dropdown, Table } from \"antd\";\r\nimport { ArrowLeftOutlined, FileDoneOutlined, EyeOutlined, DollarCircleOutlined, MoreOutlined, DollarOutlined, SyncOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport DrawerReparcelamento from './drawerReparcelamento';\r\nimport DrawerDetalheNotaFiscal from './drawerDetalheNotaFiscal';\r\n\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { compararDatas, diferencaDatas } from \"../../services/funcoes\";\r\nimport ModalDetalheNotaFiscal from \"../notaFiscal/modalDetalheNotaFiscal\";\r\n\r\nexport default function ListaParcelasCliente({ selectedRowKeys, setSelectedRowKeys, selecionados, setListaParcelasCliente, receberSelecionados, listaParcelasReceber, setDadosCliente, dadosCliente }) {\r\n const [{ manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [listaParcelas, setListaParcelas] = useState([]);\r\n const [listaParcelasReparcelar, setListaParcelasReparcelar] = useState([]);\r\n const [listaTotalizadoresReparcelar, setListaTotalizadoresReparcelar] = useState({});\r\n const [openModalDetalhes, setOpenModalDetalhes] = useState(false);\r\n const [dadosModalNota, setDadosModalNota] = useState({});\r\n const [dadosDetalhesNota, setDadosDetalhesNota] = useState({});\r\n\r\n const rowSelection = {\r\n selectedRowKeys,\r\n onChange: (key, selectedRow) => {\r\n somarParcelas(key);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n buscarParcelasPessoa();\r\n }, []);\r\n\r\n function somarParcelas(keys) {\r\n let totais = [];\r\n totais.quantidade = keys.length;\r\n totais.valorOriginal = 0;\r\n totais.juros = 0;\r\n totais.multa = 0;\r\n totais.total = 0;\r\n\r\n keys.forEach((key) => {\r\n let parcela = listaParcelas.filter((item) => { return item.key === key })[0];\r\n totais.valorOriginal += parcela.valorOriginal;\r\n totais.juros += parcela.valorJuros;\r\n totais.multa += parcela.valorMulta;\r\n totais.total += parcela.valorPagoRecebido;\r\n });\r\n selecionados.setTotalSelecionados(totais);\r\n setSelectedRowKeys(keys);\r\n };\r\n async function visualizarNota(dados) {\r\n let retorno = [];\r\n let vendedor = [];\r\n if (!!dados.ntf_id) {\r\n retorno = await api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${dados.ntf_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data;\r\n if (!!retorno.ven_id) {\r\n vendedor = await api.get(`Vendedor/RetornaVendedor?idVendedor=${retorno.ven_id}`);\r\n if (vendedor.status === 200) {\r\n retorno.nomeVendedor = vendedor.data.pes_nome;\r\n }\r\n }\r\n retorno.itensNf.forEach((item) => {\r\n let totalItemSemDesconto = parseFloat((item.nfi_qtde * item.nfi_valorunitario)).toFixed(2);\r\n item.perc_desconto = parseFloat((item.nfi_valordesconto / (totalItemSemDesconto)) * 100).toFixed(2);\r\n let valorDesconto = item.nfi_valordesconto;\r\n item.valor_item_desconto = parseFloat(totalItemSemDesconto - valorDesconto).toFixed(2);\r\n });\r\n setDadosDetalhesNota(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n function buscarParcelasPessoa() {\r\n if (!!dadosCliente.pes_id) {\r\n api.get(`Parcela/ListarParcelas?PagarOuReceber=1&IdPessoa=${dadosCliente.pes_id}&StatusParcela=0,1&Estornado=false&PageSize=1000&Order=prc_datavencimento`).then(res => {\r\n listarParcelas(res);\r\n })\r\n }\r\n };\r\n\r\n function selecionarVencidas(e) {\r\n let keys = [];\r\n if (e.target.checked) {\r\n listaParcelas.map((item) => {\r\n if (compararDatas(item.prc_datavencimento, null, '<')) {\r\n keys.push(item.key);\r\n }\r\n });\r\n }\r\n somarParcelas(keys);\r\n };\r\n\r\n function listarParcelas(dados) {\r\n let totalReceber = 0;\r\n let parcelasReceber = [];\r\n let keys = [];\r\n let items = dados.data.items;\r\n if (listaParcelasReceber.length > 0) {\r\n listaParcelasReceber.map((parcela) => {\r\n keys.push(parcela.key);\r\n });\r\n setSelectedRowKeys(keys);\r\n }\r\n items.forEach((item) => {\r\n let valorReceber;\r\n item.vencida = compararDatas(item.prc_datavencimento, new Date(), '<');\r\n item.numeroDiasVencida = 0;\r\n item.valorJuros = 0;\r\n item.valorMulta = 0;\r\n item.key = item.cpr_id.toString().concat(item.prc_id);\r\n item.zerouJuros = false;\r\n item.zerouMulta = false;\r\n if (item.vencida) {\r\n item.numeroDiasVencida = diferencaDatas(item.prc_datavencimento);\r\n if (!(!!parametrosEmpresa.par_diastoleranciacobrancajuro)) {\r\n valorReceber = parseFloat((item.prc_valor - item.valorQuitado).toFixed(2));\r\n item.valorJuros = parseFloat((((valorReceber * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * item.numeroDiasVencida).toFixed(2));\r\n\r\n if(parametrosEmpresa.par_tipocalculomulta == 1){\r\n item.valorMulta= !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if(parametrosEmpresa.par_tipocalculomulta == 2){\r\n item.valorMulta= !!parametrosEmpresa.par_multaparcelavencida ? (item.prc_valor * ( parametrosEmpresa.par_multaparcelavencida/100)) : 0;\r\n } \r\n } else if (item.numeroDiasVencida > parametrosEmpresa.par_diastoleranciacobrancajuro) {\r\n valorReceber = parseFloat((item.prc_valor - item.valorQuitado).toFixed(2));\r\n item.valorJuros = parseFloat((((valorReceber * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * item.numeroDiasVencida).toFixed(2));\r\n\r\n if(parametrosEmpresa.par_tipocalculomulta == 1){\r\n item.valorMulta= !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if(parametrosEmpresa.par_tipocalculomulta == 2){\r\n item.valorMulta= !!parametrosEmpresa.par_multaparcelavencida ? (item.prc_valor * ( parametrosEmpresa.par_multaparcelavencida/100)) : 0;\r\n } \r\n }\r\n }\r\n item.valorOriginal = parseFloat(item.prc_valor);\r\n item.prc_valor = parseFloat(((item.prc_valor - item.valorQuitado) + item.valorJuros + item.valorMulta).toFixed(2) );\r\n item.valorPagoRecebido = parseFloat(item.prc_valor);\r\n item.valorDesconto = 0.00;\r\n item.valorAReceber = item.prc_valor;\r\n totalReceber += parseFloat((item.valorPagoRecebido).toFixed(2));\r\n parcelasReceber.push(item);\r\n });\r\n parcelasReceber.totalReceber = totalReceber;\r\n setListaParcelas(parcelasReceber);\r\n setListaParcelasReparcelar([]);\r\n setListaTotalizadoresReparcelar({});\r\n };\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function reparcelarSelecionados(listaParcelas, selectedRowKeys) {\r\n let listaTemp = [];\r\n\r\n listaParcelas.map(parcela => {\r\n if (selectedRowKeys.indexOf(parcela.key) >= 0) {\r\n listaTemp.push(parcela);\r\n }\r\n });\r\n\r\n let lista = {};\r\n lista.valorTotalJuros = 0;\r\n lista.valorTotalMulta = 0;\r\n lista.valorDesconto = 0;\r\n lista.valorAReceber = 0;\r\n if (listaTemp.length > 0) {\r\n listaTemp.map(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n lista.valorDesconto += parseFloat(item.valorDesconto);\r\n lista.valorAReceber += parseFloat(valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorMulta));\r\n });\r\n }\r\n lista.valorDesconto = parseFloat(lista.valorDesconto.toFixed(2));\r\n lista.valorAReceber = parseFloat(lista.valorAReceber.toFixed(2));\r\n setListaTotalizadoresReparcelar(lista);\r\n\r\n setListaParcelasReparcelar(listaTemp);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerReparcelamento: true } })\r\n };\r\n\r\n async function showDrawerExtra(dados) {\r\n let retorno = [];\r\n let vendedor = [];\r\n if (!!dados.ntf_id) {\r\n retorno = await api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${dados.ntf_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data;\r\n if (!!retorno.ven_id) {\r\n vendedor = await api.get(`Vendedor/RetornaVendedor?idVendedor=${retorno.ven_id}`);\r\n if (vendedor.status === 200) {\r\n retorno.nomeVendedor = vendedor.data.pes_nome;\r\n }\r\n }\r\n retorno.itensNf.forEach((item) => {\r\n let totalItemSemDesconto = parseFloat((item.nfi_qtde * item.nfi_valorunitario)).toFixed(2);\r\n item.perc_desconto = parseFloat((item.nfi_valordesconto / (totalItemSemDesconto)) * 100).toFixed(2);\r\n let valorDesconto = item.nfi_valordesconto;\r\n item.valor_item_desconto = parseFloat(totalItemSemDesconto - valorDesconto).toFixed(2);\r\n });\r\n\r\n setDadosModalNota(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Parcelas em Aberto do cliente
\r\n {dadosCliente.pes_nome}\r\n \r\n \r\n
\r\n Total à receber do cliente
\r\n {FormatNumber(!!listaParcelas.totalReceber ? listaParcelas.totalReceber : 0, true)}\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecionar Vencidas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {cpr_numerodocumento || '--'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº Parcela',\r\n align: 'left',\r\n width: 75,\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n align: 'center',\r\n width: 115,\r\n render: ({ cpr_datainclusao }) => (\r\n
\r\n {moment(cpr_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n align: 'center',\r\n width: 115,\r\n render: ({ prc_datavencimento, vencida }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Dias Venc.',\r\n width: 85,\r\n align: 'right',\r\n render: ({ diasAtrazo, vencida }) => (\r\n
\r\n {diasAtrazo}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Original (R$)',\r\n \r\n align: 'right',\r\n render: ({ valorOriginal }) => (\r\n
\r\n \r\n {FormatNumber(!!valorOriginal ? valorOriginal : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Juros (R$)',\r\n align: 'right',\r\n render: ({ valorJuros }) => (\r\n
\r\n 0 ? 'c-red' : ''}>\r\n {FormatNumber(!!valorJuros ? valorJuros : 0, true)}\r\n \r\n
\r\n ),\r\n },{\r\n title: 'Multa (R$)',\r\n align: 'right',\r\n render: ({ valorMulta }) => (\r\n
\r\n 0 ? 'c-red' : ''}>\r\n {FormatNumber(!!valorMulta ? valorMulta : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Recebido (R$)',\r\n align: 'right',\r\n render: ({ valorQuitado }) => (\r\n
\r\n \r\n {FormatNumber(!!valorQuitado ? valorQuitado : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'A Receber (R$)',\r\n align: 'right',\r\n render: ({ valorPagoRecebido }) => (\r\n
\r\n \r\n {FormatNumber(!!valorPagoRecebido ? valorPagoRecebido : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n ),\r\n }\r\n ]\r\n } rowSelection={rowSelection} scroll={{ x: 900 }} />\r\n \r\n
\r\n \r\n
\r\n Quantidade: \r\n {!!selecionados.totalSelecionados.quantidade ? selecionados.totalSelecionados.quantidade : 0}\r\n \r\n \r\n Original (R$): \r\n {FormatNumber(!!selecionados.totalSelecionados.valorOriginal ? selecionados.totalSelecionados.valorOriginal : 0, true)}\r\n \r\n \r\n Juros (R$): \r\n {FormatNumber(!!selecionados.totalSelecionados.juros ? selecionados.totalSelecionados.juros : 0, true)}\r\n \r\n \r\n Multa (R$): \r\n {FormatNumber(!!selecionados.totalSelecionados.multa ? selecionados.totalSelecionados.multa : 0, true)}\r\n \r\n \r\n Total (R$): \r\n {FormatNumber(!!selecionados.totalSelecionados.total ? selecionados.totalSelecionados.total : 0, true)}\r\n \r\n \r\n \r\n { setOpenModalDetalhes(false) }} dadosModal={dadosDetalhesNota} />\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Input, Form, Select, Tag, Modal, Table, notification, Tooltip, InputNumber } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, ArrowRightOutlined, DeleteOutlined, ExclamationCircleOutlined, EditOutlined, CloseOutlined, SaveOutlined, ArrowUpOutlined, ArrowDownOutlined, CheckCircleOutlined, ReloadOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { getCnpjEmpresa, getLocal } from \"../../services/auth\";\r\nimport ListaParcelasCliente from './listaParcelasCliente';\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { FormatFone, MaskFormat, FormatNumber } from '../../ValueObjects/';\r\nimport { ModalEditarValoresParcela, ModalBandeiraCartao } from \"../../components/modals\";\r\nimport { compararDatas, diferencaDatas, info, isObjetoDiffVazio, novaAbaNavegador, removerCarcaterEspecial } from \"../../services/funcoes\";\r\nimport { BreadcrumbPage, FiltroSearch, TabelaDados, InputPreco, Editar, Excluir, Data, InputPercentual } from \"../../components\";\r\n\r\nimport { ModalCheque } from \"../../components/modals\";\r\nimport apiPayer from \"../../services/apiPayer\";\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function RecebimentoParcela() {\r\n\r\n const [{ manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [pesquisaCodBarras, setPesquisaCodBarras] = useState(true);\r\n const [listaParcelasCliente, setListaParcelasCliente] = useState(false);\r\n const [listaParcelasReceber, setListaParcelasReceber] = useState([]);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [listaCondicaoPagamento, setListaCondicaoPagamento] = useState([]);\r\n const [openModalEditarParcela, setOpenModalEditarParcela] = useState(false);\r\n const [openModalCheque, setOpenModalCheque] = useState(false);\r\n const [openModalBandeiraCartao, setOpenModalBandeiraCartao] = useState(false);\r\n const [dadosLinhaEditar, setDadosLinhaEditar] = useState([]);\r\n const [listaTotalizadores, setListaTotalizadores] = useState({});\r\n const [dadosCliente, setDadosCliente] = useState({});\r\n const [totalSelecionados, setTotalSelecionados] = useState([]);\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const [alterarValorPago, setAlterarValorPago] = useState(true);\r\n const [carregando, setCarregando] = useState(false);\r\n const [pagina, setPagina] = useState(1);\r\n const [nroRegistros, setNroRegistros] = useState(5);\r\n const [valoresPagamento, setValoresPagamento] = useState();\r\n\r\n const { Option } = Select;\r\n\r\n let modalInstance = null;\r\n\r\n const statusPagamentoIntegraPagto = {\r\n Aprovada: 1,\r\n Rejeitada: 2,\r\n Pendente: 3,\r\n Cancelada: 4,\r\n Abortada: 5,\r\n Finalizada: 6,\r\n NaoAutorizada: 7,\r\n }\r\n\r\n const tipoFormaPagExistente = [\r\n FormaDePagamento.fpDinheiro,\r\n FormaDePagamento.fpCheque,\r\n FormaDePagamento.fpCartaoCredito,\r\n FormaDePagamento.fpCartaoDebito,\r\n FormaDePagamento.fpDepositoBancario,\r\n FormaDePagamento.fpPixDinamico,\r\n FormaDePagamento.fpPixEstatico,\r\n FormaDePagamento.fpTransferenciaBancaria,\r\n ];\r\n\r\n const tipoParcelamentoCartao = {\r\n estabelecimento: 0,\r\n comprador: 1\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n\r\n api.get(`contaCorrente/ListarAtivos?filtro=&Order=+ctc_descricao&PageSize=1000`).then(res => {\r\n setListaContaCorrente(res.data.items);\r\n });\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?CodReceitaDespesa=2&filtro=`).then(res => {\r\n if (res.status === 200) {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n }\r\n });\r\n api.get(`FormaPagamento/Listar?PageNumber=1&PageSize=1000`).then(res => {\r\n if (res.status === 200) {\r\n setListaFormaPagamento(res.data.items);\r\n }\r\n });\r\n if (!!!formulario.getFieldValue().dataPagamentoRecebimento) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date()) });\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!!formulario.getFieldValue().dataPagamentoRecebimento) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date()) });\r\n }\r\n let lista = {};\r\n lista.valorTotal = 0;\r\n lista.valorTotalParcelas = 0;\r\n lista.valorTotalJuros = 0;\r\n lista.valorTotalMulta = 0\r\n lista.valorDesconto = 0;\r\n lista.valorAReceber = 0;\r\n let valorRecebido = 0;\r\n if (listaParcelasReceber.length > 0) {\r\n listaParcelasReceber.map(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n lista.valorTotalParcelas += parseFloat(item.valorOriginal);\r\n lista.valorTotalJuros += parseFloat(item.valorJuros);\r\n lista.valorTotalMulta += parseFloat(item.valorMulta);\r\n lista.valorDesconto += parseFloat(item.valorDesconto);\r\n lista.valorTotal += valorTotal;\r\n lista.valorAReceber += parseFloat(((valorTotal + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)) - parseFloat(item.valorDesconto)).toFixed(2));\r\n valorRecebido += parseFloat(item.valorAReceber);\r\n });\r\n if (alterarValorPago) {\r\n formulario.setFieldsValue({ valorPago: parseFloat(valorRecebido).toFixed(2) });\r\n }\r\n formulario.setFieldsValue({ valorDesconto: parseFloat(lista.valorDesconto.toFixed(2)) });\r\n calcularSobra(lista);\r\n }\r\n }, [listaParcelasReceber]);\r\n\r\n function calcularSobra(lista = { ...listaTotalizadores }) {\r\n let sobra = parseFloat((parseFloat(!!formulario.getFieldValue(\"valorPago\") ? formulario.getFieldValue(\"valorPago\") : 0) - parseFloat(lista.valorAReceber)).toFixed(2));\r\n lista.restanteReceber = 0;\r\n lista.troco = 0;\r\n if (sobra < 0) {\r\n lista.restanteReceber = parseFloat((sobra * -1).toFixed(2));\r\n } else {\r\n lista.troco = parseFloat(sobra);\r\n }\r\n setAlterarValorPago(true);\r\n setListaTotalizadores(lista);\r\n };\r\n\r\n function calcularRecebimentoParcial() {\r\n let valorRecebido = parseFloat(formulario.getFieldValue(\"valorPago\"));\r\n\r\n if (valorRecebido > 0) {\r\n let listaTemp = [...listaParcelasReceber];\r\n for (const item of listaTemp) {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n if (item.vencida && !item.zerouJuros) {\r\n if (!(!!parametrosEmpresa.par_diastoleranciacobrancajuro)) {\r\n item.valorJuros = parseFloat((((valorTotal * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * item.numeroDiasVencida).toFixed(2));\r\n } else if (item.numeroDiasVencida > parametrosEmpresa.par_diastoleranciacobrancajuro) {\r\n item.valorJuros = parseFloat((((valorTotal * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * item.numeroDiasVencida).toFixed(2));\r\n }\r\n }\r\n let valorParcela = parseFloat((valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)).toFixed(2));\r\n if (item.vencida && !item.zerouMulta) {\r\n if (parametrosEmpresa.par_tipocalculomulta == 1) {\r\n item.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if (parametrosEmpresa.par_tipocalculomulta == 2) {\r\n item.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? (valorParcela * (parametrosEmpresa.par_multaparcelavencida / 100)) : 0;\r\n }\r\n }\r\n if (valorRecebido >= valorParcela) {\r\n item.valorAReceber = valorParcela;\r\n } else {\r\n let _perc = (parseFloat(valorRecebido).toFixed(2) / valorParcela);\r\n item.valorJuros = parseFloat(item.valorJuros * _perc).toFixed(2);\r\n item.valorAReceber = parseFloat(valorRecebido).toFixed(2);\r\n if (parametrosEmpresa.par_tipocalculomulta == 1) {\r\n item.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if (parametrosEmpresa.par_tipocalculomulta == 2) {\r\n item.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? (valorParcela * (parametrosEmpresa.par_multaparcelavencida / 100)) : 0;\r\n }\r\n }\r\n item.prc_valor = item.valorAReceber;\r\n item.valorPagoRecebido = item.valorAReceber;\r\n valorRecebido -= item.valorAReceber;\r\n }\r\n setAlterarValorPago(false);\r\n\r\n setListaParcelasReceber(listaTemp);\r\n } else {\r\n calcularSobra();\r\n }\r\n };\r\n function setaPercDesc() {\r\n debugger;\r\n let valorTotalSemDesconto = (parseFloat(listaTotalizadores.valorTotal) + parseFloat(listaTotalizadores.valorTotalJuros) + parseFloat(listaTotalizadores.valorTotalMulta));\r\n let valorDesconto = 0;\r\n let percentual = parseFloat(formulario.getFieldValue(\"percentualDesconto\")) > 0 ? parseFloat(formulario.getFieldValue(\"percentualDesconto\")) : 0;\r\n if (percentual === 0 || percentual === 'undefined') {\r\n formulario.setFieldsValue({ valorDesconto: 0, percentualDesconto: 0 });\r\n }\r\n else {\r\n valorDesconto = ((valorTotalSemDesconto * percentual) / 100).toFixed(2);\r\n formulario.setFieldsValue({ percentualDesconto: percentual, valorDesconto: valorDesconto });\r\n }\r\n rateioDesconto();\r\n }\r\n\r\n function setaValorDesc() {\r\n debugger;\r\n let valorTotalSemDesconto = (parseFloat(listaTotalizadores.valorTotal) + parseFloat(listaTotalizadores.valorTotalJuros) + parseFloat(listaTotalizadores.valorTotalMulta));\r\n let desconto = parseFloat(formulario.getFieldValue(\"valorDesconto\")) > 0 ? parseFloat(formulario.getFieldValue(\"valorDesconto\")) : 0;\r\n let percentualDesconto = 0;\r\n if (desconto === 0 || desconto === 'undefined') {\r\n formulario.setFieldsValue({ valorDesconto: 0, percentualDesconto: 0 });\r\n }\r\n else {\r\n percentualDesconto = ((desconto * 100) / valorTotalSemDesconto).toFixed(2);\r\n formulario.setFieldsValue({ valorDesconto: desconto, percentualDesconto: percentualDesconto });\r\n }\r\n rateioDesconto();\r\n }\r\n\r\n function rateioDesconto() {\r\n debugger;\r\n\r\n let valorTotalSemDesconto = (parseFloat(listaTotalizadores.valorTotal) + parseFloat(listaTotalizadores.valorTotalJuros) + parseFloat(listaTotalizadores.valorTotalMulta));\r\n let valorDesconto = parseFloat(formulario.getFieldValue(\"valorDesconto\")) > 0 ? parseFloat(formulario.getFieldValue(\"valorDesconto\")) : 0;\r\n let percentualDesconto = parseFloat(formulario.getFieldValue(\"percentualDesconto\")) > 0 ? parseFloat(formulario.getFieldValue(\"percentualDesconto\")) : 0;\r\n\r\n if (valorDesconto > 0 && valorDesconto > valorTotalSemDesconto) {\r\n formulario.setFieldsValue({ valorDesconto: valorTotalSemDesconto, percentualDesconto: 100 });\r\n valorDesconto = valorTotalSemDesconto;\r\n }\r\n\r\n let listaTemp = [...listaParcelasReceber];\r\n let sobraDesconto = 0;\r\n\r\n for (const [idx, item] of listaTemp.entries()) {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n let valorParcela = parseFloat((valorTotal + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)).toFixed(2));\r\n\r\n //calcular percentual do total \r\n let percentualDesconto = (valorParcela * 100) / valorTotalSemDesconto;\r\n let desconto = (valorDesconto * percentualDesconto) / 100;\r\n sobraDesconto += desconto - parseFloat(desconto.toFixed(2));\r\n\r\n item.valorDesconto = parseFloat((parseFloat(desconto.toFixed(2)) + (idx === listaTemp.length - 1 ? sobraDesconto : 0)).toFixed(2));\r\n item.valorAReceber = valorParcela - item.valorDesconto;\r\n item.prc_valor = item.valorAReceber;\r\n item.valorPagoRecebido = item.valorAReceber;\r\n }\r\n setAlterarValorPago(true);\r\n\r\n setListaParcelasReceber(listaTemp);\r\n };\r\n\r\n function buscarCondicaoPagamento(valor) {\r\n api.get(`CondicaoPagamento/Listar?codigoFormaPagamento=${valor}&PageNumber=1&PageSize=1000`).then(res => {\r\n setListaCondicaoPagamento(res.data.items);\r\n });\r\n formulario.setFieldsValue({ cpg_id: null });\r\n };\r\n\r\n function buscarCodBarras(valor) {\r\n api.get(`Parcela/ListarParcelas?CodigoBarras=${valor}&PagarOuReceber=1`).then(res => {\r\n if (res.data.items.length > 0) {\r\n let listaTemp = [...listaParcelasReceber];\r\n let retornoParcela = res.data.items[0];\r\n\r\n if (listaParcelasReceber.filter(item => { return item.prc_codigobarras === retornoParcela.prc_codigobarras }).length > 0) {\r\n info(\"A parcela já esta adicionada na lista para pagamento!\");\r\n } else {\r\n if (retornoParcela.prc_status !== 2 && !retornoParcela.prc_estornado) {\r\n if (!(!!dadosCliente.pes_id)) {\r\n // metodo ListaClienteCodigo parametro codigoCliente\r\n setDadosCliente({ pes_id: retornoParcela.pes_id, pes_nome: retornoParcela.pes_nome });\r\n }\r\n\r\n if (retornoParcela.pes_id === (!!dadosCliente.pes_id ? dadosCliente.pes_id : retornoParcela.pes_id)) {\r\n let valorReceber;\r\n retornoParcela.key = retornoParcela.cpr_id.toString().concat(retornoParcela.prc_id);\r\n retornoParcela.vencida = compararDatas(retornoParcela.prc_datavencimento, null, '<');\r\n retornoParcela.numeroDiasVencida = 0;\r\n retornoParcela.valorJuros = 0;\r\n retornoParcela.zerarJuros = false;\r\n retornoParcela.valorMulta = 0;\r\n retornoParcela.zerarMulta = false;\r\n if (retornoParcela.vencida) {\r\n retornoParcela.numeroDiasVencida = diferencaDatas(retornoParcela.prc_datavencimento);\r\n if (!(!!parametrosEmpresa.par_diastoleranciacobrancajuro)) {\r\n valorReceber = parseFloat((retornoParcela.prc_valor - retornoParcela.valorQuitado).toFixed(2));\r\n retornoParcela.valorJuros = parseFloat((((valorReceber * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * retornoParcela.numeroDiasVencida).toFixed(2));\r\n\r\n if (parametrosEmpresa.par_tipocalculomulta == 1) {\r\n retornoParcela.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if (parametrosEmpresa.par_tipocalculomulta == 2) {\r\n retornoParcela.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? (retornoParcela.prc_valor * (parametrosEmpresa.par_multaparcelavencida / 100)) : 0;\r\n }\r\n } else if (retornoParcela.numeroDiasVencida > parametrosEmpresa.par_diastoleranciacobrancajuro) {\r\n valorReceber = parseFloat((retornoParcela.prc_valor - retornoParcela.valorQuitado).toFixed(2));\r\n retornoParcela.valorJuros = parseFloat((((valorReceber * (parametrosEmpresa.par_percjuromesparcelavencida / 30)) / 100) * retornoParcela.numeroDiasVencida).toFixed(2));\r\n\r\n if (parametrosEmpresa.par_tipocalculomulta == 1) {\r\n retornoParcela.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? parametrosEmpresa.par_multaparcelavencida : 0;\r\n } else if (parametrosEmpresa.par_tipocalculomulta == 2) {\r\n retornoParcela.valorMulta = !!parametrosEmpresa.par_multaparcelavencida ? (retornoParcela.prc_valor * (parametrosEmpresa.par_multaparcelavencida / 100)) : 0;\r\n }\r\n\r\n }\r\n }\r\n retornoParcela.valorOriginal = parseFloat(retornoParcela.prc_valor);\r\n retornoParcela.prc_valor = parseFloat((retornoParcela.prc_valor - retornoParcela.valorQuitado + retornoParcela.valorJuros + retornoParcela.valorMulta).toFixed(2));\r\n retornoParcela.valorPagoRecebido = parseFloat(retornoParcela.prc_valor);\r\n retornoParcela.valorDesconto = 0.00;\r\n retornoParcela.valorAReceber = retornoParcela.prc_valor;\r\n listaTemp.push(retornoParcela);\r\n setListaParcelasReceber(listaTemp);\r\n } else {\r\n info(`Parcela não é do cliente ${dadosCliente.pes_nome}!`);\r\n }\r\n } else {\r\n if (retornoParcela.prc_status === 2) {\r\n info(\"Esta Parcela já foi totalmente liquidada!\");\r\n }\r\n if (retornoParcela.prc_estornado === 1) {\r\n info(\"A Parcela foi estornada!\");\r\n }\r\n }\r\n }\r\n } else {\r\n info(\"Parcela não encontrada!\");\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n Modal.confirm({\r\n title: `Remover da lista a parcela Nº ${dados.prc_numeroparcela} no valor de ${FormatNumber(!!dados.prc_valor ? dados.prc_valor : 0, true)}?`,\r\n icon: ,\r\n onOk() {\r\n let listaTemp = [...listaParcelasReceber];\r\n let index = listaTemp.findIndex(item => item.prc_codigobarras === dados.prc_codigobarras);\r\n listaTemp.splice(index, 1);\r\n if (listaTemp.length === 0) {\r\n setDadosCliente([]);\r\n }\r\n setListaParcelasReceber(listaTemp);\r\n }\r\n });\r\n };\r\n\r\n function salvarDadosModal(values) {\r\n let listaTemp = [...listaParcelasReceber];\r\n let linha = listaTemp.filter((item) => { return item.prc_codigobarras === dadosLinhaEditar.prc_codigobarras })[0];\r\n linha.valorJuros = parseFloat(values.valorJuros);\r\n linha.valorMulta = parseFloat(values.valorMulta);\r\n linha.valorDesconto = parseFloat(values.valorDesconto);\r\n linha.valorPagoRecebido = parseFloat(values.valorPago);\r\n linha.valorAReceber = parseFloat(values.valorPago);\r\n linha.valorParcela = linha.valorAReceber;\r\n setListaParcelasReceber(listaTemp);\r\n };\r\n\r\n function editarParcela(linha) {\r\n setDadosLinhaEditar(linha);\r\n setOpenModalEditarParcela(true);\r\n };\r\n\r\n function receberSelecionados(listaParcelas, selectedRowKeys) {\r\n let listaTemp = [...listaParcelasReceber];\r\n listaParcelas.map(parcela => {\r\n if (selectedRowKeys.indexOf(parcela.key) >= 0 && listaTemp.filter((item) => { return item.key === parcela.key }).length === 0) {\r\n listaTemp.push(parcela);\r\n }\r\n });\r\n setListaParcelasReceber(listaTemp);\r\n setPesquisaCodBarras(true);\r\n setListaParcelasCliente(false);\r\n };\r\n\r\n async function verificarFormaPagamento(values) {\r\n let formaPagamentoSelecionada = (await api.get(`FormaPagamento/Get?id=${values.fpg_id}`)).data;\r\n formaPagamentoSelecionada.pfp_valor = values.valorPago;\r\n formaPagamentoSelecionada.cpg_id = values.cpg_id;\r\n formaPagamentoSelecionada.ctc_id = values.ctc_id;\r\n formaPagamentoSelecionada.ctg_id = values.ctg_id;\r\n switch (formaPagamentoSelecionada.fpg_tipopagamento) {\r\n case FormaDePagamento.fpDinheiro:\r\n case FormaDePagamento.fpPixDinamico:\r\n case FormaDePagamento.fpPixEstatico:\r\n case FormaDePagamento.fpTransferenciaBancaria:\r\n case FormaDePagamento.fpDepositoBancario:\r\n efetuarRecebimento(formaPagamentoSelecionada, null);\r\n break;\r\n case FormaDePagamento.fpCheque:\r\n setValoresPagamento(values);\r\n setOpenModalCheque(true);\r\n break;\r\n case FormaDePagamento.fpCartaoDebito:\r\n formaPagamentoSelecionada.credito = false;\r\n formaPagamentoSelecionada.parcelascartao = await calcularParcelasCartao(values);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: values } });\r\n if (formaPagamentoSelecionada.fpg_tipointegracao == null) {\r\n setOpenModalBandeiraCartao(true);\r\n } else {\r\n verificaIntegracaoPagamento(formaPagamentoSelecionada);\r\n }\r\n break;\r\n case FormaDePagamento.fpCartaoCredito:\r\n formaPagamentoSelecionada.credito = true;\r\n formaPagamentoSelecionada.parcelascartao = await calcularParcelasCartao(values);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: values } });\r\n if (formaPagamentoSelecionada.fpg_tipointegracao == null) {\r\n setOpenModalBandeiraCartao(true);\r\n } else {\r\n verificaIntegracaoPagamento(formaPagamentoSelecionada);\r\n }\r\n break;\r\n };\r\n };\r\n\r\n async function calcularParcelasCartao(values) {\r\n let definicaoParcelamento = [];\r\n let parcelas = [];\r\n let somaParcelas = 0;\r\n let resto = 0;\r\n let numeroUltimaParcela;\r\n if (!!values.cpg_id) {\r\n definicaoParcelamento = (await api.get(`CondicaoPagamento/listarParcelamento?codigoCondicaoPagamento=${values.cpg_id}`)).data;\r\n if (definicaoParcelamento.length > 0) {\r\n definicaoParcelamento.forEach((parcela, indice) => {\r\n let valorParcela = 0;\r\n valorParcela = ((parcela.pcl_percparcela / 100) * (values.valorPago)).toFixed(2);\r\n parcelas.push({\r\n prc_numeroparcela: indice + 1,\r\n prc_valor: parseFloat(valorParcela),\r\n });\r\n somaParcelas += parseFloat(valorParcela);\r\n });\r\n resto = (values.valorPago - parseFloat(somaParcelas)).toFixed(2);\r\n resto = parseFloat(resto);\r\n }\r\n\r\n if (resto !== 0) {\r\n numeroUltimaParcela = 0;\r\n if (definicaoParcelamento.length > 0) {\r\n numeroUltimaParcela = definicaoParcelamento.length - 1;\r\n } else {\r\n numeroUltimaParcela = 1;\r\n }\r\n let valParcela = parseFloat(parcelas[numeroUltimaParcela].prc_valor);\r\n let totalParcela = parseFloat((valParcela + resto).toFixed(2));\r\n parcelas[numeroUltimaParcela].prc_valor = parseFloat(totalParcela);\r\n }\r\n return parcelas;\r\n }\r\n };\r\n\r\n async function verificaIntegracaoPagamento(values) {\r\n let dadosIntegracaoPos = {};\r\n let cnpjEmpresa = getCnpjEmpresa();\r\n if (values.fpg_tipointegracao != null) {\r\n if (values.fpg_tipointegracao == 1) {// vero\r\n let tipopgto = 0;\r\n let metodopgto = 0;\r\n let submetodopgto = 0;\r\n switch (values.fpg_tipopagamento) {\r\n case FormaDePagamento.fpCartaoCredito:\r\n tipopgto = 2;\r\n metodopgto = 1;\r\n submetodopgto = 4;\r\n if (values.parcelascartao?.length == 1) {\r\n submetodopgto = 1\r\n }\r\n break;\r\n case FormaDePagamento.fpCartaoDebito:\r\n tipopgto = 3;\r\n metodopgto = 1;\r\n submetodopgto = 1;\r\n if (values.parcelascartao?.length >= 1) {\r\n submetodopgto = 3\r\n }\r\n break;\r\n case FormaDePagamento.fpPixDinamico:\r\n tipopgto = 1;\r\n metodopgto = 3;\r\n submetodopgto = 1\r\n break;\r\n }\r\n dadosIntegracaoPos = {\r\n imp_cnpjlocal: cnpjEmpresa,\r\n imp_valor: values.pfp_valor,\r\n imp_tipopgto: tipopgto,\r\n imp_metodopgto: metodopgto,\r\n imp_submetodopgto: submetodopgto,\r\n imp_qtdeparcelas: values.parcelascartao?.length ?? 0,\r\n }\r\n if (!isObjetoDiffVazio(values.integrapgto)) {\r\n values.integrapgtook = false;\r\n values.integrapgto = await criaRegistroIntegraPagto(dadosIntegracaoPos);\r\n }\r\n values.imp_id = values.integrapgto.imp_id;\r\n } else if (values.fpg_tipointegracao == 2) {//payer\r\n let _paymentType = \"\";\r\n let _paymentMethodSubType = \"\";\r\n let _installments = \"\";\r\n let _paymentMethod = \"\";\r\n let _command = \"payment\"\r\n\r\n if (values.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Credit\";\r\n _paymentMethodSubType = \"Financed_no_Fees\";\r\n\r\n if (values.parcelascartao?.length == 1) {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n } else {\r\n _installments = (values.parcelascartao?.length).toString();\r\n }\r\n }\r\n if (values.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n if (values.parcelascartao?.length > 1) {\r\n if (values.parcelascartao.length == 1) {\r\n _paymentMethodSubType = \"Predated_Debit\";\r\n } else {\r\n _paymentMethodSubType = \"Financed_Debit\";\r\n }\r\n _installments = (values.parcelascartao?.length).toString();\r\n } else {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n }\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Debit\"\r\n }\r\n if (values.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n _paymentType = \"Cash\";\r\n _paymentMethod = \"Pix\";\r\n }\r\n\r\n dadosIntegracaoPos = {\r\n command: _command,\r\n value: parseFloat(values.pfp_valor),\r\n paymentMethod: _paymentMethod,\r\n paymentType: _paymentType,\r\n paymentMethodSubType: _paymentMethodSubType,\r\n installments: _installments\r\n };\r\n if (!isObjetoDiffVazio(values.integrapgto)) {\r\n values.integrapgtook = false;\r\n let retorno = await apiPayer.post('Client/Request', dadosIntegracaoPos);\r\n }\r\n }\r\n modalAguardandoPagamento(values);\r\n }\r\n }\r\n\r\n async function criaRegistroIntegraPagto(dadosIntegracaoPos) {\r\n let retorno;\r\n try {\r\n retorno = (await api.post(`IntegraPagto/Incluir`, dadosIntegracaoPos)).data;\r\n } catch (error) {\r\n notification.warning({ description: 'Erro ao mandar o pagamento para a máquina!', message: 'Aviso!' });\r\n console.log(error);\r\n return false;\r\n }\r\n return retorno;\r\n }\r\n\r\n function modalAguardandoPagamento(values) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalInstance = Modal.confirm({\r\n title: 'Aviso',\r\n content: 'Aguardando Pagamento!',\r\n okText: 'Pagamento Efetuado',\r\n cancelText: 'Cancelar Pagamento',\r\n\r\n onOk: () => {\r\n verificarPagamentoMaquina(values);\r\n },\r\n onCancel: () => {\r\n cancelarPagamentoMaquina(values);\r\n }\r\n });\r\n }\r\n\r\n async function verificarPagamentoMaquina(values) {\r\n if (values.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || values.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || values.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (values.fpg_tipointegracao != null && values?.integrapgtook == false && values.fpg_tipointegracao == 1) {\r\n let retorno = (await api.get(`IntegraPagto/Buscar/${values.integrapgto.imp_id}`)).data;\r\n if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Pendente) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalAguardandoPagamento(values);\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Aprovada) {\r\n values.integrapgtook = true;\r\n values.integrapgto = retorno;\r\n values.rcc_nsu = retorno.imp_autorizacao;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.NaoAutorizada) {\r\n notification.warning({ description: 'Pagamento não Autorizado!', message: 'Aviso!' });\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Cancelada) {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n if (values.fpg_tipointegracao != null && values.integrapgtook == false && values.fpg_tipointegracao == 2) {\r\n let retorno = (await apiPayer.get('Client/Response')).data;\r\n if (retorno.statusTransaction == \"PENDING\") {\r\n return;\r\n } else if (retorno.statusTransaction == \"APPROVED\") {\r\n let ret = (await api.post(`IntegraPagto/IncluirPayer`, retorno)).data;\r\n values.integrapgtook = true;\r\n values.integrapgto = ret;\r\n values.rcc_nsu = ret.authorizerId;\r\n values.imp_id = ret.imp_id;\r\n } else if (retorno.statusTransaction == \"UNAUTHORIZED\") {\r\n notification.warning({ description: 'Pagamento não Autorizado, verifique no Checkout Payer e tente novamente!', message: 'Aviso!' });\r\n return;\r\n //analisaFormaPagamento(docfiscal);\r\n } else if (retorno.statusTransaction == \"ABORTED\") {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n }\r\n await verificaTodosPagamentos(values);\r\n }\r\n\r\n async function cancelarPagamentoMaquina(values) {\r\n let retorno = (await api.put(`IntegraPagto/CancelarPagamento?Id=${values.integrapgto?.imp_id}`)).data;\r\n if (retorno) {\r\n values.integrapgtook = false;\r\n values.integrapgto = null;\r\n } else {\r\n notification.warning({ description: 'Erro ao efetuar o cancelamento!', message: 'Aviso!' });\r\n modalAguardandoPagamento(values)\r\n }\r\n }\r\n\r\n async function verificaTodosPagamentos(values) {\r\n let finalizarVenda = true;\r\n if (values.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || values.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || values.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (values.fpg_tipointegracao != null && values.integrapgtook == false) {\r\n finalizarVenda = false;\r\n }\r\n }\r\n if (finalizarVenda == true) {\r\n efetuarRecebimento(values);\r\n } else {\r\n modalAguardandoPagamento(values);\r\n }\r\n }\r\n\r\n const modalParcelaLiquidada = () => (\r\n Modal.confirm({\r\n title: 'Parcelas liquidadas com sucesso!',\r\n icon: ,\r\n content: 'Deseja continuar na tela com parcelas do cliente ou realizar uma nova pesquisa?',\r\n okText: 'Continuar',\r\n cancelText: 'Nova Pesquisa',\r\n centered: true,\r\n onOk() {\r\n setListaParcelasCliente(true);\r\n setPesquisaCodBarras(false);\r\n setListaParcelasReceber([]);\r\n setListaTotalizadores({});\r\n formulario.resetFields();\r\n },\r\n onCancel() {\r\n limparListas();\r\n }\r\n }));\r\n\r\n function efetuarRecebimento(values, dadosCartao) {\r\n var diasTolerancia = 30;\r\n if (formulario.getFieldValue().dataPagamentoRecebimento) {\r\n if (formulario.getFieldValue().dataPagamentoRecebimento > new Date()) {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() + 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n return;\r\n }\r\n } else {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() - 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n return;\r\n }\r\n }\r\n values.dataPagamentoRecebimento = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('YYYY-MM-DD HH:mm:ss');\r\n } else {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') });\r\n }\r\n let dataAtual = new Date();\r\n var recebimento = valoresPagamento ??\r\n {\r\n ctg_id: values.ctg_id,\r\n ctc_id: values.ctc_id,\r\n fpg_id: values.fpg_id,\r\n cpg_id: values.cpg_id,\r\n };\r\n recebimento.dataPagamentoRecebimento = formulario.getFieldValue().dataPagamentoRecebimento;\r\n let valorTot = values.valorPago ?? values.pfp_valor;\r\n recebimento.valorTotalPagoRecebido = parseFloat(valorTot);\r\n recebimento.valorTotalParcelas = parseFloat(listaTotalizadores.valorTotalParcelas.toFixed(2));\r\n recebimento.valorTotalDesconto = parseFloat(listaTotalizadores.valorDesconto.toFixed(2));\r\n recebimento.valorTotalJuros = parseFloat(listaTotalizadores.valorTotalJuros.toFixed(2));\r\n recebimento.valorTotalMulta = parseFloat(listaTotalizadores.valorTotalMulta.toFixed(2));\r\n recebimento.pes_id = dadosCliente.pes_id;\r\n recebimento.cpr_pagarreceber = 1;\r\n\r\n let pagamento = {\r\n fpg_id: recebimento.fpg_id,\r\n ctc_id: recebimento.ctc_id,\r\n cpg_id: recebimento.cpg_id,\r\n bce_id: dadosCartao == null ? null : dadosCartao.bandeira.bce_id,\r\n rcc_nsu: dadosCartao == null ? null : dadosCartao.nsu,\r\n valorFormaPgto: parseFloat(recebimento.valorTotalPagoRecebido),\r\n valorDescontoFormaPgto: parseFloat(formulario.getFieldValue('valorDesconto')),\r\n valorJurosFormaPgto: listaTotalizadores.valorTotalJuros,\r\n valorMultaFormaPgto: listaTotalizadores.valorTotalMulta,\r\n cheques: values.cheques,\r\n imp_id: values?.imp_id ?? null\r\n };\r\n recebimento.formaPgto = [pagamento];\r\n recebimento.parcelasQuitadas = [...listaParcelasReceber];\r\n\r\n if (!!dadosCartao) {\r\n let recebimentoCartao = [];\r\n let parcelas = values.parcelasCartao;\r\n if (values.credito) {\r\n if (dadosCartao.tipoParcelamento === tipoParcelamentoCartao.estabelecimento) {\r\n let numeroDias = parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentocredito);\r\n parcelas.forEach((parcela) => {\r\n recebimentoCartao.push({\r\n tipoParcelamento: tipoParcelamentoCartao.estabelecimento,\r\n bce_id: dadosCartao.bandeira.bce_id,\r\n rcc_parcelarecebimento: parcela.prc_numeroparcela,\r\n rcc_valor: parcela.prc_valor,\r\n rcc_nsu: dadosCartao.nsu,\r\n rcc_previsaorecebimento: new Date(dataAtual.setDate(dataAtual.getDate() + numeroDias))\r\n });\r\n })\r\n } else {\r\n dataAtual = new Date();\r\n recebimentoCartao.push({\r\n tipoParcelamento: tipoParcelamentoCartao.comprador,\r\n bce_id: dadosCartao.bandeira.bce_id,\r\n rcc_parcelarecebimento: 1,\r\n rcc_valor: values.valorPago,\r\n rcc_nsu: dadosCartao.nsu,\r\n rcc_previsaorecebimento: new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentocredito)))\r\n });\r\n }\r\n } else {\r\n dataAtual = new Date();\r\n recebimentoCartao.push({\r\n tipoParcelamento: null,\r\n bce_id: dadosCartao.bandeira.bce_id,\r\n rcc_parcelarecebimento: 1,\r\n rcc_valor: values.valorPago,\r\n rcc_nsu: dadosCartao.nsu,\r\n rcc_previsaorecebimento: new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentodebito)))\r\n });\r\n }\r\n values.recebimentoCartao = recebimentoCartao;\r\n }\r\n setCarregando(true);\r\n api.post('/ContasPagarReceber/RecebimentoParcelas', recebimento).then(\r\n (res) => {\r\n if (res.data) {\r\n let dadosParcelas = [];\r\n recebimento.parcelasQuitadas.forEach((parcela) => {\r\n if (parcela.valorPagoRecebido > 0) {\r\n dadosParcelas.push({\r\n prc_id: parcela.prc_id,\r\n loc_id: getLocal(),\r\n pes_id: dadosCliente.pes_id,\r\n usu_nome: removerCarcaterEspecial(localStorage.getItem(\"@GestorWeb-NomeUsuario\")),\r\n fpg_id: values.fpg_id,\r\n cpg_id: values.cpg_id\r\n });\r\n }\r\n });\r\n let dadosReceber = btoa(JSON.stringify(dadosParcelas));\r\n novaAbaNavegador(`ContasPagarReceber/ImprimirComprovantePagamento?hashParcelas=${dadosReceber}`);\r\n modalParcelaLiquidada();\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: `Aviso!`, description: `Não foi possivel liquidar parcelas!` });\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n });\r\n }\r\n\r\n function limparListas() {\r\n setListaParcelasCliente(true);\r\n setPesquisaCodBarras(false);\r\n setListaTotalizadores({});\r\n setSelectedRowKeys([]);\r\n setTotalSelecionados([]);\r\n setListaParcelasReceber([]);\r\n formulario.resetFields();\r\n\r\n };\r\n\r\n function zerarJuros() {\r\n let listaTemp = [...listaParcelasReceber];\r\n listaTemp.forEach(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n item.valorJuros = 0;\r\n if (parseFloat(item.valorDesconto) > valorTotal) {\r\n item.valorDesconto = valorTotal;\r\n }\r\n item.zerarJuros = true;\r\n item.valorAReceber = parseFloat((valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)).toFixed(2));\r\n item.valorPagoRecebido = item.valorAReceber;\r\n item.prc_valor = item.valorAReceber;\r\n });\r\n setListaParcelasReceber(listaTemp);\r\n };\r\n\r\n function zerarMulta() {\r\n let listaTemp = [...listaParcelasReceber];\r\n listaTemp.forEach(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n item.valorMulta = 0;\r\n if (parseFloat(item.valorDesconto) > valorTotal) {\r\n item.valorDesconto = valorTotal;\r\n }\r\n item.zerarMulta = true;\r\n item.valorAReceber = parseFloat((valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)).toFixed(2));\r\n item.valorPagoRecebido = item.valorAReceber;\r\n item.prc_valor = item.valorAReceber;\r\n });\r\n setListaParcelasReceber(listaTemp);\r\n };\r\n\r\n function validaIntervaloData() {\r\n var diasTolerancia = 30;\r\n if (formulario.getFieldValue().dataPagamentoRecebimento) {\r\n if (formulario.getFieldValue().dataPagamentoRecebimento > new Date()) {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() + 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n }\r\n } else {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() - 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {pesquisaCodBarras && !listaParcelasCliente &&\r\n
\r\n
\r\n \r\n
\r\n \r\n } placeholder=\"Informe o Código de Barras\" onSearch={valor => {\r\n if (!!valor) buscarCodBarras(valor)\r\n }} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!pesquisaCodBarras && !listaParcelasCliente &&\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n }, {\r\n title: 'CPF/CNPJ',\r\n width: 140,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, '', true) : MaskFormat(pej_cnpj, '', true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Telefone',\r\n width: 125,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n
\r\n ),\r\n },\r\n ]\r\n } />\r\n
\r\n \r\n }\r\n {pesquisaCodBarras && !listaParcelasCliente && listaParcelasReceber.length > 0 &&\r\n
\r\n
\r\n
(\r\n
\r\n {cpr_numerodocumento || '--'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº Parcela',\r\n align: 'left',\r\n width: 75,\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n render: ({ cpr_datainclusao }) => (\r\n
\r\n {moment(cpr_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n render: ({ prc_datavencimento, vencida }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Original (R$)',\r\n align: 'right',\r\n render: ({ valorOriginal }) => (\r\n
\r\n \r\n {FormatNumber(!!valorOriginal ? valorOriginal : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
Juros\r\n \r\n \r\n Multa\r\n \r\n \r\n \r\n editarParcela(record)} icon={} />\r\n \r\n \r\n { excluirRegistro(record) }} icon={} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } expandable={{\r\n expandedRowRender: ({ prc_codigobarras, cpr_numerodocumento }) =>\r\n
\r\n \r\n
\r\n Cód. Barras: {prc_codigobarras || 'Não Informado'}\r\n \r\n \r\n Nº Documento: {cpr_numerodocumento || 'Não Informado'}\r\n \r\n \r\n ,\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }} scroll={{ x: 900 }}\r\n columnWidth={30}\r\n pagination={{\r\n current: pagina,\r\n pageSize: nroRegistros,\r\n total: listaParcelasReceber.length,\r\n onChange: (pg) => setPagina(pg),\r\n onShowSizeChange: (current, page) => setNroRegistros(page)\r\n }} />\r\n \r\n
\r\n \r\n
\r\n validaIntervaloData()} />\r\n \r\n \r\n \r\n {\r\n return { label: item.cpg_descricao, value: item.cpg_id, key: item.cpg_id }\r\n })} filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} placeholder=\"Selecione a Condição de Pagamento...\" />\r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n {listaContaGerencialAgrupador.map(item => (\r\n \r\n {listaContaGerencial.filter((conta) => { return conta.ctc_id === item.ctc_id }).map(conta => (\r\n {conta.ctg_descricao}\r\n ))}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n calcularRecebimentoParcial()} onPressEnter={() => calcularRecebimentoParcial()} name={'valorPago'} label={'Valor Recebido (R$)'} />\r\n \r\n \r\n \r\n {(!!listaTotalizadores.valorTotalParcelas && listaTotalizadores.valorTotalParcelas !== 0) &&\r\n \r\n \r\n \r\n Valor Parcelas (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.valorTotalParcelas, true)}\r\n \r\n \r\n \r\n }\r\n {/* \r\n \r\n \r\n Descontos (R$):\r\n \r\n \r\n { rateioDesconto() }} />\r\n \r\n \r\n */}\r\n \r\n \r\n {/* Grupo 1: Descontos em porcentagem */}\r\n \r\n \r\n \r\n Descontos: \r\n \r\n \r\n { setaPercDesc() }}\r\n />\r\n \r\n \r\n %\r\n \r\n \r\n \r\n \r\n {/* Grupo 2: Descontos em valor monetário */}\r\n \r\n \r\n \r\n R$\r\n \r\n \r\n { setaValorDesc() }} />\r\n \r\n \r\n \r\n \r\n \r\n {(!!listaTotalizadores.valorTotalJuros && listaTotalizadores.valorTotalJuros !== 0) &&\r\n \r\n \r\n \r\n Valor Juros (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.valorTotalJuros, true)}\r\n \r\n \r\n \r\n }\r\n {(!!listaTotalizadores.valorTotalMulta && listaTotalizadores.valorTotalMulta !== 0) &&\r\n \r\n \r\n \r\n Valor Multa (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.valorTotalMulta, true)}\r\n \r\n \r\n \r\n }\r\n {(!!listaTotalizadores.valorAReceber && listaTotalizadores.valorAReceber !== 0) &&\r\n \r\n \r\n \r\n Valor à Receber (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.valorAReceber, true)}\r\n \r\n \r\n \r\n }\r\n {(!!listaTotalizadores.troco && listaTotalizadores.troco !== 0) &&\r\n \r\n \r\n \r\n Troco (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.troco, true)}\r\n \r\n \r\n \r\n }\r\n {(!!listaTotalizadores.restanteReceber && listaTotalizadores.restanteReceber !== 0) &&\r\n \r\n \r\n \r\n Restante a Receber (R$):\r\n \r\n \r\n {FormatNumber(listaTotalizadores.restanteReceber, true)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {listaParcelasCliente &&\r\n \r\n }\r\n\r\n setOpenModalEditarParcela(false)} dadosLinha={dadosLinhaEditar} salvarDadosModal={salvarDadosModal} />\r\n setOpenModalBandeiraCartao(false)} retornoModal={efetuarRecebimento} />\r\n setOpenModalCheque(false)} dadosCheque={{ numeroCheques: 1, pfp_valor: listaTotalizadores.valorAReceber, cli_id: dadosCliente.cli_id }} funcaoSalvar={efetuarRecebimento} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, notification, InputNumber, Table, Button } from \"antd\";\r\nimport { EditOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Data, FormGW, InputPreco } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalEditarVencimentoParcela } from '../../components/modals/';\r\nimport SelectPaginado from '../../components/selectPaginado';\r\n\r\nexport default function ManutencaoContaPagar({ formulario, carregando, aoSalvar }) {\r\n\r\n const { Option } = Select;\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosContasPagar, setDadosContasPagar] = useState([]);\r\n const [openModalEditarParcela, setOpenModalEditarParcela] = useState(false);\r\n const [dadosLinhaEditar, setDadosLinhaEditar] = useState([]);\r\n const [openIntevaloDias, setOpenIntevaloDias] = useState(false);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n\r\n const salvarManutencao = (values) => {\r\n if (parseFloat(values.valortotal) <= 0) {\r\n notification.error({ message: 'Atenção!', description: 'Valor Total do Documento precisa ser maior que 0!' });\r\n return;\r\n }\r\n carregando(true);\r\n values.parcelas = dadosContasPagar.parcelas;\r\n values.cpr_numerodocumento = !!values.cpr_numerodocumento ? values.cpr_numerodocumento.toString() : \"\";\r\n\r\n api.post('/contasPagarReceber/IncluirContasPagar', values).then(res => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Conta a pagar incluída com sucesso!\" });\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } })\r\n aoSalvar();\r\n carregando(false);\r\n });\r\n };\r\n\r\n function gerarParcelas() {\r\n let dados = [];\r\n let parcelas = {};\r\n dados.parcelas = [];\r\n let qtdDias = 0;\r\n let somaDasParcelas = 0;\r\n let dataVencimento = moment(formulario.getFieldValue().cpr_datavencimento);\r\n let valorTotal = parseFloat(formulario.getFieldValue().valortotal);\r\n let quantidadeParcelas = formulario.getFieldValue().cpr_numeroparcelas;\r\n let periodo = formulario.getFieldValue().cpr_periodicidade;\r\n let primeiroPagamento = moment(formulario.getFieldValue().cpr_dataprimeiropagamento);\r\n let divisao = 0;\r\n let intervaloDias = formulario.getFieldValue().cpr_intervalodias;\r\n if (!!valorTotal && !!quantidadeParcelas && ((quantidadeParcelas === 1 && !!dataVencimento) || \r\n (quantidadeParcelas > 1 && !!primeiroPagamento && !!periodo && ((periodo === 4 && !!intervaloDias) || periodo !== 4)))) {\r\n divisao = parseFloat((valorTotal / quantidadeParcelas).toFixed(2));\r\n if (quantidadeParcelas > 1) {\r\n if (!!periodo && !!primeiroPagamento) {\r\n if (periodo === 1) {\r\n qtdDias = 7;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else if (periodo === 2) {\r\n qtdDias = 15;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else if (periodo === 3) {\r\n qtdDias = 30;\r\n dados.cpr_intervalodias = qtdDias;\r\n } else {\r\n qtdDias = intervaloDias;\r\n dados.cpr_intervalodias = qtdDias;\r\n }\r\n }\r\n for (var i = 0; i < quantidadeParcelas; i++) { \r\n parcelas = {};\r\n parcelas.prc_numeroparcela = i + 1;\r\n parcelas.prc_valor = divisao;\r\n\r\n if (!!primeiroPagamento) {\r\n var outraData = new Date(primeiroPagamento);\r\n outraData.setDate((outraData.getDate()) + (i * qtdDias));\r\n parcelas.prc_datavencimento = outraData;\r\n } else {\r\n parcelas.prc_datavencimento = dataVencimento;\r\n }\r\n dados.parcelas.push(parcelas);\r\n if (i !== 0)\r\n somaDasParcelas += parseFloat(divisao.toFixed(2));\r\n }\r\n if (somaDasParcelas > 0)\r\n dados.parcelas[0].prc_numeroparcela = 1;\r\n dados.parcelas[0].prc_valor = parseFloat((valorTotal - somaDasParcelas).toFixed(2));\r\n } else {\r\n parcelas = {};\r\n dados.cpr_periodicidade = null;\r\n dados.prc_periodicidade = null;\r\n dados.cpr_dataprimeiropagamento = dataVencimento;\r\n parcelas.prc_datavencimento = dataVencimento;\r\n parcelas.prc_numeroparcela = 1;\r\n parcelas.prc_valor = parseFloat(valorTotal.toFixed(2));\r\n dados.parcelas.push(parcelas);\r\n }\r\n setDadosContasPagar(dados);\r\n } else {\r\n setDadosContasPagar([]);\r\n }\r\n };\r\n\r\n function mostrarIntervaloDias(value, option) {\r\n gerarParcelas();\r\n if (option.value === 4) setOpenIntevaloDias(true);\r\n else setOpenIntevaloDias(false);\r\n };\r\n\r\n function editarDataVencimentoParcela(linha) {\r\n setDadosLinhaEditar(linha);\r\n setOpenModalEditarParcela(true);\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`contaCorrente/listar?filtro=&ordem=+ctc_descricao`).then(res => {\r\n setListaContaCorrente(res.data.items);\r\n })\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?Ativo=true&CodReceitaDespesa=1`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n formulario.setFieldsValue({ cpr_datainclusao: moment(new Date()), cpr_periodicidade: 3, cpr_numeroparcelas: 1 });\r\n gerarParcelas();\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n ({pc.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaContaGerencialAgrupador.map(item => (\r\n \r\n {listaContaGerencial.filter((conta) => { return conta.ctc_id === item.ctc_id }).map(conta => (\r\n {conta.ctg_descricao}\r\n ))}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n gerarParcelas()} rules={[{ required: true }]} />\r\n \r\n \r\n \r\n gerarParcelas()}\r\n step={1}\r\n min={1}\r\n placeholder=\"Informe o Número de Parcelas\"\r\n />\r\n \r\n \r\n <>\r\n prevValues.cpr_numeroparcelas !== currentValues.cpr_numeroparcelas}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('cpr_numeroparcelas') === 1) return (\r\n \r\n gerarParcelas()} label=\"Data Vencimento\" name=\"cpr_datavencimento\" rules={[{ required: true, message: 'Informe a data de vencimento' }]} />\r\n \r\n );\r\n if (getFieldValue('cpr_numeroparcelas') > 1) return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n gerarParcelas()} label=\"Data Primeiro Vencimento\" name=\"cpr_dataprimeiropagamento\" rules={[{ required: true, message: 'Informe a data do primeiro vencimento' }]} />\r\n \r\n {openIntevaloDias === true &&\r\n \r\n \r\n gerarParcelas()} placeholder=\"Informe o intervalo de dias\" />\r\n \r\n \r\n }\r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosContasPagar.parcelas && dadosContasPagar.parcelas.length > 1 &&\r\n
\r\n
(\r\n
\r\n Parcela: {prc_numeroparcela}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n align: 'center',\r\n width: 98,\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n title: 'Ações',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Collapse, Tag, Popover, Modal, notification } from 'antd';\r\nimport { ArrowDownOutlined, ArrowUpOutlined, SearchOutlined, DeleteOutlined, EyeOutlined, CheckCircleOutlined, ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerContaPagar from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatDate, FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalListarParcelas } from \"../../components/modals/\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, TabelaDados, Data, FiltroSearch, ComboData } from \"../../components\";\r\n\r\nexport default function ContaPagar() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openPesquisaAvancada, setOpenPesquisaAvancada] = useState(false);\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [dataAtual] = useState(new Date());\r\n const [parametrosContasPagar] = Form.useForm();\r\n const [listaStatusParcela, setListaStatusParcela] = useState([]);\r\n const [openModal, setOpenModal] = useState(false);\r\n const [parcelas, setParcelas] = useState([]);\r\n\r\n const togglePesquisa = () => {\r\n setOpenPesquisaAvancada(!openPesquisaAvancada);\r\n };\r\n\r\n const modalNovaConta = (item) => {\r\n Modal.confirm({\r\n title: 'Conta estornada com sucesso!',\r\n icon: ,\r\n content: `Deseja criar uma nova conta com base nesta conta estornada?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.get(`ContasPagarReceber/Buscar/${item.cpr_id}`).then(\r\n res => {\r\n let dadosTemp = res.data;\r\n dadosTemp.valortotal = 0;\r\n dadosTemp.cpr_datainclusao = moment(res.data.cpr_datainclusao);\r\n dadosTemp.cpr_dataprimeiropagamento = moment(res.data.cpr_dataprimeiropagamento);\r\n res.data.parcelas.forEach(parcela => {\r\n dadosTemp.valortotal += parcela.prc_valor;\r\n });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n\r\n }\r\n );\r\n },\r\n onCancel() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n }\r\n });\r\n };\r\n\r\n const modalEstornar = (item) => {\r\n Modal.confirm({\r\n title: 'Estornar Parcela',\r\n icon: ,\r\n content: `Deseja estornar a conta de ${item.pes_nome} no valor de ${FormatNumber(item.prc_valor, true)}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.post(`ContasPagarReceber/CancelarContaPagarReceber?ContaPagarReceberId=${item.cpr_id}`).then(\r\n res => {\r\n if (res.data.cpr_estornado === true) {\r\n modalNovaConta(item);\r\n } else {\r\n Modal.success({\r\n title: 'Não foi possivel estornar a Conta!',\r\n icon: ,\r\n content: `Existe pagamentos referentes a esta conta`,\r\n okText: 'OK'\r\n })\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n notification.warn({ message: 'Aviso!', description: !!error.response.data ? error.response.data : 'Não foi possivel estonar a conta!' })\r\n }\r\n )\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=StatusParcela`).then(res => {\r\n setListaStatusParcela(res.data);\r\n });\r\n parametrosContasPagar.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n }, []);\r\n\r\n useEffect(() => {\r\n carregarLista();\r\n }, [dataPesquisa]);\r\n\r\n function carregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&tipoMovimentacao=0&dataInicial=${FormatDate(dataPesquisa)}&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}&statusParcela=0,1,2,3`, ordem: '+pes_nome' } });\r\n }\r\n\r\n function aplicarFiltrosAvancados() {\r\n let filtros = '&tipoMovimentacao=0';\r\n filtros += `&dataInicial=${(!!parametrosContasPagar.getFieldValue().dataInicial ? moment(parametrosContasPagar.getFieldValue().dataInicial).format('YYYY-MM-DD') : FormatDate(dataAtual))}`;\r\n filtros += `&dataFinal=${(!!parametrosContasPagar.getFieldValue().dataFinal ? moment(parametrosContasPagar.getFieldValue().dataFinal).format('YYYY-MM-DD') : FormatDate(dataAtual))}`;\r\n filtros += `&statusParcela=${(!!parametrosContasPagar.getFieldValue().statusParcela ? parametrosContasPagar.getFieldValue().statusParcela.join(',') : '0,1,2,3')}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros } });\r\n };\r\n\r\n function retornarStatus(prc_status) {\r\n if (prc_status === 0) {\r\n return 'Pendente'\r\n } else if (prc_status === 1) {\r\n return 'Rcto. Parcial'\r\n } else if (prc_status === 2) {\r\n return 'Liquidada'\r\n } else if (prc_status === 3) {\r\n return 'Reparcelada'\r\n }\r\n };\r\n\r\n function buscarParcelas(dados) {\r\n if (!!dados.cpr_id) {\r\n setOpenModal(true);\r\n api.get(`Parcela/ListarParcelas?IdContaPagarReceber=${dados.cpr_id}&Estornado=false&PagarOuReceber=0&PageSize=100&Order=+prc_numeroparcela`).then(res => {\r\n res.data.items.forEach(parc => { parc.editando = false });\r\n setParcelas(res.data.items);\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n parametrosContasPagar.setFieldsValue({ dataFinal: moment(new Date()) });\r\n parametrosContasPagar.setFieldsValue({ dataInicial: moment(parametrosContasPagar.getFieldValue().dataPesquisa) });\r\n aplicarFiltrosAvancados();\r\n }} />\r\n {/* */}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {openPesquisaAvancada ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n {\r\n if (prc_status === 0 || prc_status === 1 || prc_status === 3) {\r\n return 'Parcela Pendente'\r\n } else if (prc_status === 2) {\r\n return 'Parcela Liquidada'\r\n }\r\n }} placement=\"right\">\r\n \r\n {retornarStatus(prc_status)}\r\n \r\n \r\n ),\r\n }, {\r\n title: 'Nº Doc.',\r\n width: 80,\r\n align: 'center',\r\n render: ({ cpr_numerodocumento }) => (\r\n \r\n {cpr_numerodocumento || `N/D`}\r\n \r\n ),\r\n }, {\r\n title: 'Fornecedor',\r\n width: 330,\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n }, {\r\n title: 'Vencimento',\r\n width: 80,\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n }, {\r\n title: 'Observação',\r\n width: 300,\r\n render: ({ cpr_observacao }) => (\r\n
\r\n {cpr_observacao}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Obs.: {cpr_descricao || ``}\r\n \r\n \r\n Nota Nº: {ntf_numero || `Não Informado`}\r\n \r\n \r\n Parcela Nº: {prc_numeroparcela || `Não Informado`}\r\n \r\n \r\n Saldo Devedor (R$): {FormatNumber(saldo, true)}\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n setOpenModal(false)} parcelas={parcelas} setParcelas={setParcelas} />\r\n \r\n );\r\n}\r\n\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Select, Form, Table, Input, Tag, Modal, notification } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, DeleteOutlined, ExclamationCircleOutlined, BarcodeOutlined, EditOutlined } from \"@ant-design/icons\";\r\n\r\nimport moment from 'moment';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { InputPreco, Data } from \"../../components\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { compararDatas, diferencaDatas, info } from \"../../services/funcoes\";\r\nimport { ModalEditarValoresParcela } from \"../../components/modals\";\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function ManutencaoPagamento({ formulario, totalizadores, calcularPagamentoParcial, listaParcelasPagar, carregando, aoSalvar, dadosFornecedor }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [openModalEditarParcela, setOpenModalEditarParcela] = useState(false);\r\n const [dadosLinhaEditar, setDadosLinhaEditar] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [listaCondicaoPagamento, setListaCondicaoPagamento] = useState([]);\r\n const [exibirCondicaoPag, setExibirCondicaoPag] = useState(false);\r\n const inputRef = React.createRef();\r\n\r\n useEffect(() => {\r\n api.get(`contaCorrente/ListarAtivos?filtro=&Order=+ctc_descricao&PageSize=1000`).then(res => {\r\n setListaContaCorrente(res.data.items);\r\n });\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?CodReceitaDespesa=1&filtro=`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n api.get(`FormaPagamento/Listar?filtro=&PageNumber=1&PageSize=1000`).then(res => {\r\n let forma = res.data.items.filter(forma => forma.fpg_tipopagamento === FormaDePagamento.fpPixDinamico || forma.fpg_tipopagamento === FormaDePagamento.fpDinheiro || forma.fpg_tipopagamento === FormaDePagamento.fpCheque);\r\n setListaFormaPagamento(forma);\r\n });\r\n if (!!!formulario.getFieldValue().dataPagamentoRecebimento) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date()) });\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!inputRef.current) {\r\n inputRef.current.focus();\r\n };\r\n }, [inputRef]);\r\n\r\n function salvarDadosModal(values) {\r\n let listaTemp = [...listaParcelasPagar.listaParcelasPagar];\r\n let linha = listaTemp.filter((item) => { return item.prc_id === dadosLinhaEditar.prc_id })[0];\r\n linha.valorJuros = parseFloat(values.valorJuros);\r\n linha.valorDesconto = parseFloat(values.valorDesconto);\r\n linha.valorMulta = parseFloat(values.valorMulta);\r\n linha.valorPagoRecebido = parseFloat(values.valorPago);\r\n linha.valorAReceber = parseFloat(values.valorPago);\r\n linha.valorParcela = linha.valorAReceber;\r\n linha.valorPago = parseFloat(values.valorPago);\r\n listaParcelasPagar.setListaParcelasPagar(listaTemp);\r\n };\r\n\r\n function editarParcela(linha) {\r\n setDadosLinhaEditar(linha);\r\n setOpenModalEditarParcela(true);\r\n };\r\n\r\n async function buscarCondicaoPagamento(valor) {\r\n if (!!valor) {\r\n let formaPagamento = (await api.get(`FormaPagamento/Get?id=${valor}`)).data;\r\n if (formaPagamento.fpg_tipopagamento !== FormaDePagamento.fpDinheiro && formaPagamento.fpg_tipopagamento !== FormaDePagamento.fpPixDinamico && formaPagamento.fpg_tipopagamento !== FormaDePagamento.fpPixEstatico) {\r\n setExibirCondicaoPag(true);\r\n setListaCondicaoPagamento(formaPagamento.formacondicaopagamentos);\r\n } else {\r\n setExibirCondicaoPag(false);\r\n }\r\n } else {\r\n setExibirCondicaoPag(false);\r\n }\r\n formulario.setFieldsValue({ cpg_id: null });\r\n };\r\n\r\n function efetuarPagamento(values) {\r\n if (!(!!values)) {\r\n values = manutencao.dados;\r\n }\r\n values.valorTotalPagoRecebido = parseFloat(values.valorPago);\r\n if (!!!values.valorTotalPagoRecebido) {\r\n notification.warning({ message: `Aviso!`, description: `Favor informar o campo Valor Pago!` });\r\n return;\r\n }\r\n var diasTolerancia = 30;\r\n if (formulario.getFieldValue().dataPagamentoRecebimento) {\r\n if (formulario.getFieldValue().dataPagamentoRecebimento > new Date()) {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() + 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n return;\r\n }\r\n } else {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() - 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n return;\r\n }\r\n }\r\n } else {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date()) });\r\n }\r\n values.cpr_pagarreceber = 0;\r\n values.dataPagamentoRecebimento = formulario.getFieldValue().dataPagamentoRecebimento;\r\n values.valorTotalParcelas = parseFloat(totalizadores.listaTotalizadores.valorAPagar.toFixed(2));\r\n values.valorTotalMulta = parseFloat(totalizadores.listaTotalizadores.valorMulta.toFixed(2));\r\n values.valorTotalDesconto = totalizadores.listaTotalizadores.valorDesconto;\r\n values.valorTotalJuros = totalizadores.listaTotalizadores.valorTotalJuros;\r\n values.cpg_id = (!!values.cpg_id ? values.cpg_id : null);\r\n values.parcelasQuitadas = listaParcelasPagar.listaParcelasPagar;\r\n values.pes_id = dadosFornecedor.pes_id;\r\n values.parcelasQuitadas.forEach((item) => {\r\n item.valorParcela = item.prc_valor;\r\n item.valorPagoRecebido = item.valorPago;\r\n item.valorMulta = item.valorMulta;\r\n item.valorJuros = item.valorJuros;\r\n });\r\n\r\n values.formaPgto = [\r\n { fpg_id: values.fpg_id, cpg_id: values.cpg_id, ctc_id: values.ctc_id, valorFormaPgto: values.valorTotalPagoRecebido, valorDescontoFormaPgto: 0, valorJurosFormaPgto: 0 }\r\n ];\r\n\r\n carregando(true);\r\n api.post('/ContasPagarReceber/PagamentoParcelas', values).then(res => {\r\n notification.success({ message: 'Aviso!', description: 'Parcelas liquidadas com sucesso!' });\r\n aoSalvar();\r\n }).catch(\r\n (erro) => {\r\n notification.warning({ message: `Aviso!`, description: `Não foi possivel liquidar parcelas!` });\r\n }\r\n ).finally(() => {\r\n carregando(false);\r\n });\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n Modal.confirm({\r\n title: `Remover da lista a parcela Nº ${dados.prc_numeroparcela} no valor de ${FormatNumber(!!dados.prc_valor ? dados.prc_valor : 0, true)}?`,\r\n icon: ,\r\n onOk() {\r\n let listaTemp = [...listaParcelasPagar.listaParcelasPagar];\r\n let index = listaTemp.findIndex(item => item.prc_codigobarras === dados.prc_codigobarras);\r\n listaTemp.splice(index, 1);\r\n listaParcelasPagar.setListaParcelasPagar(listaTemp);\r\n }\r\n });\r\n };\r\n\r\n function buscarCodBarras(valor) {\r\n api.get(`Parcela/ListarParcelas?CodigoBarras=${valor}&PagarOuReceber=0`).then(res => {\r\n if (res.data.items.length > 0) {\r\n let listaTemp = [...listaParcelasPagar.listaParcelasPagar];\r\n let retornoParcela = res.data.items[0];\r\n\r\n if (listaTemp.filter(item => { return item.prc_codigobarras === retornoParcela.prc_codigobarras }).length > 0) {\r\n info(\"A parcela já esta adicionada na lista para pagamento!\");\r\n } else {\r\n if (retornoParcela.prc_status !== 2 && !retornoParcela.prc_estornado) {\r\n if (retornoParcela.pes_id === (!!dadosFornecedor.pes_id ? dadosFornecedor.pes_id : retornoParcela.pes_id)) {\r\n let valorReceber;\r\n retornoParcela.key = retornoParcela.cpr_id.toString().concat(retornoParcela.prc_id);\r\n retornoParcela.vencida = compararDatas(retornoParcela.prc_datavencimento, null, '<');\r\n retornoParcela.numeroDiasVencida = 0;\r\n retornoParcela.valorJuros = 0;\r\n retornoParcela.valorOriginal = parseFloat(retornoParcela.prc_valor);\r\n retornoParcela.prc_valor = parseFloat((retornoParcela.prc_valor - retornoParcela.valorQuitado + retornoParcela.valorJuros).toFixed(2));\r\n retornoParcela.valorPago = parseFloat(retornoParcela.prc_valor);\r\n retornoParcela.valorDesconto = 0.00;\r\n retornoParcela.valorMulta = 0;\r\n retornoParcela.valorAReceber = retornoParcela.prc_valor;\r\n listaTemp.push(retornoParcela);\r\n listaParcelasPagar.setListaParcelasPagar(listaTemp);\r\n } else {\r\n info(`Parcela não é do cliente ${dadosFornecedor.pes_nome}!`);\r\n }\r\n } else {\r\n if (retornoParcela.prc_status === 2) {\r\n info(\"Esta Parcela já foi totalmente liquidada!\");\r\n }\r\n if (retornoParcela.prc_estornado === 1) {\r\n info(\"A Parcela foi estornada!\");\r\n }\r\n }\r\n }\r\n } else {\r\n info(\"Parcela não encontrada!\");\r\n }\r\n });\r\n };\r\n\r\n function rateioDesconto() {\r\n let valorDesconto = parseFloat(formulario.getFieldValue(\"valorDesconto\")) > 0 ? parseFloat(formulario.getFieldValue(\"valorDesconto\")) : 0;\r\n\r\n let valorTotalSemDesconto = (parseFloat(totalizadores.listaTotalizadores.valorTotal) + parseFloat(totalizadores.listaTotalizadores.valorTotalJuros) + parseFloat(totalizadores.listaTotalizadores.valorMulta));\r\n if (valorDesconto > 0 && valorDesconto > valorTotalSemDesconto) {\r\n formulario.setFieldsValue({ valorDesconto: valorTotalSemDesconto });\r\n valorDesconto = valorTotalSemDesconto;\r\n }\r\n\r\n let listaTemp = [...listaParcelasPagar.listaParcelasPagar];\r\n let sobraDesconto = 0;\r\n\r\n for (const [idx, item] of listaTemp.entries()) {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n let valorParcela = parseFloat((valorTotal + parseFloat(item.valorMulta) + parseFloat(item.valorJuros)).toFixed(2));\r\n\r\n //calcular percentual do total \r\n let percentualDesconto = (valorParcela * 100) / valorTotalSemDesconto;\r\n let desconto = (valorDesconto * percentualDesconto) / 100;\r\n sobraDesconto += desconto - parseFloat(desconto.toFixed(2));\r\n\r\n item.valorDesconto = parseFloat((parseFloat(desconto.toFixed(2)) + (idx === listaTemp.length - 1 ? sobraDesconto : 0)).toFixed(2));\r\n item.prc_valor = valorParcela - item.valorDesconto;\r\n item.valorPago = item.prc_valor;\r\n }\r\n\r\n listaParcelasPagar.setListaParcelasPagar(listaTemp);\r\n };\r\n\r\n function validaIntervaloData() {\r\n var diasTolerancia = 30;\r\n if (formulario.getFieldValue().dataPagamentoRecebimento) {\r\n if (formulario.getFieldValue().dataPagamentoRecebimento > new Date()) {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() + 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n }\r\n } else {\r\n if (diferencaDatas(formulario.getFieldValue().dataPagamentoRecebimento) > diasTolerancia) {\r\n formulario.setFieldsValue({ dataPagamentoRecebimento: moment(new Date(new Date().setDate(new Date().getDate() - 30))) });\r\n let dataFormatada = moment(formulario.getFieldValue().dataPagamentoRecebimento).format('DD/MM/YYYY')\r\n info(`Data Movimento informada maior que tolerância de ${diasTolerancia} dias, Data Máxima ${dataFormatada}`);\r\n }\r\n }\r\n }\r\n }\r\n \r\n function windowHeight() {\r\n if(window.innerHeight > 800) {\r\n return 388;\r\n }\r\n else if (window.innerHeight < 800 && window.innerHeight > 740){\r\n return 288;\r\n }\r\n else {\r\n return 228;\r\n }\r\n \r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n } placeholder=\"Informe o Código de Barras\" onSearch={valor => {\r\n if (!!valor) buscarCodBarras(valor)\r\n }} allowClear />\r\n \r\n \r\n \r\n \r\n {listaParcelasPagar.listaParcelasPagar.length > 0 &&
\r\n
(\r\n \r\n {prc_numeroparcela} - {cpr_numeroparcelas}\r\n \r\n ),\r\n }, {\r\n title: 'Fornecedor',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vencimento',\r\n width: 85,\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Par. (R$)',\r\n align: 'right',\r\n width: 75,\r\n render: ({ valorOriginal }) => (\r\n
\r\n \r\n {FormatNumber(!!valorOriginal ? valorOriginal : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Juros (R$)',\r\n align: 'right',\r\n width: 75,\r\n render: ({ valorJuros }) => (\r\n
\r\n \r\n {FormatNumber(!!valorJuros ? valorJuros : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc. (R$)',\r\n align: 'right',\r\n width: 75,\r\n render: ({ valorDesconto }) => (\r\n
\r\n \r\n {FormatNumber(!!valorDesconto ? valorDesconto : 0, true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Multa (R$)',\r\n align: 'right',\r\n width: 75,\r\n render: ({ valorMulta }) => (\r\n
\r\n \r\n {FormatNumber(!!valorMulta ? valorMulta : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Pago (R$)',\r\n align: 'right',\r\n width: 75,\r\n render: ({ valorQuitado }) => (\r\n
\r\n \r\n {FormatNumber((!!valorQuitado ? valorQuitado : 0), true)}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'A Pagar (R$)',\r\n align: 'right',\r\n width: 115,\r\n render: ({ valorPago }) => (\r\n
\r\n \r\n {FormatNumber(!!valorPago ? valorPago : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n title: 'Ações',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Cód. Barras: {prc_codigobarras || 'Não Informado'}\r\n \r\n \r\n Nº Documento: {cpr_numerodocumento || 'Não Informado'}\r\n \r\n \r\n ,\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }} scroll={{ x: 900, y: windowHeight()}} columnWidth={30} \r\n />\r\n
\r\n
\r\n \r\n
\r\n validaIntervaloData()} />\r\n \r\n \r\n \r\n {\r\n return { label: item.cpg_descricao, value: item.cpg_id, key: item.cpg_id }\r\n })} filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} placeholder=\"Selecione a Condição de Pagamento...\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n {listaContaGerencialAgrupador.map(item => (\r\n \r\n {listaContaGerencial.filter((conta) => { return conta.ctc_id === item.ctc_id }).map(conta => (\r\n {conta.ctg_descricao}\r\n ))}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n calcularPagamentoParcial()} onPressEnter={() => calcularPagamentoParcial()} name={'valorPago'} label={'Valor Pago (R$)'} />\r\n \r\n \r\n \r\n
\r\n \r\n {(!!totalizadores.listaTotalizadores.valorTotalParcelas && totalizadores.listaTotalizadores.valorTotalParcelas !== 0) &&\r\n
\r\n \r\n \r\n Valor Parcelas (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadores.valorTotalParcelas, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n Multas (R$):\r\n \r\n \r\n \r\n {FormatNumber(listaParcelasPagar.listaParcelasPagar[0].valorMulta, true)}\r\n \r\n \r\n \r\n \r\n \r\n Descontos (R$):\r\n \r\n \r\n { rateioDesconto() }} />\r\n \r\n \r\n \r\n {(!!totalizadores.listaTotalizadores.valorTotalJuros && totalizadores.listaTotalizadores.valorTotalJuros !== 0) &&\r\n \r\n \r\n \r\n Valor Juros (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadores.valorTotalJuros, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {(!!totalizadores.listaTotalizadores.valorAPagar && totalizadores.listaTotalizadores.valorAPagar !== 0) &&\r\n \r\n \r\n \r\n Valor à Pagar (R$):\r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadores.valorAPagar, true)}\r\n \r\n \r\n \r\n }\r\n {(!!totalizadores.listaTotalizadores.troco && totalizadores.listaTotalizadores.troco !== 0) &&\r\n \r\n \r\n \r\n Troco (R$):\r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadores.troco, true)}\r\n \r\n \r\n \r\n }\r\n {(!!totalizadores.listaTotalizadores.restantePagar && totalizadores.listaTotalizadores.restantePagar !== 0) &&\r\n \r\n \r\n \r\n Restante a Pagar (R$):\r\n \r\n \r\n {FormatNumber(totalizadores.listaTotalizadores.restantePagar, true)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n setOpenModalEditarParcela(false)} dadosLinha={dadosLinhaEditar} salvarDadosModal={salvarDadosModal} />\r\n \r\n )\r\n}","import React, { useState } from 'react';\r\nimport { Button, Col, Drawer, Form, Modal, Row } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions } from '../../actions';\r\nimport ManutencaoPagamento from './pagamento';\r\nimport { InputPreco } from \"../../components\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from '@ant-design/icons';\r\n\r\nexport default function DrawerPagamento({ formulario, calcularPagamentoParcial, listaParcelasPagar, totalizadores, limparListas, dadosFornecedor }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n limparListas();\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n { dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } }) }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Menu, Input, Form, Table, Checkbox, Dropdown } from \"antd\";\r\nimport { SearchOutlined, EyeOutlined, ArrowLeftOutlined, ArrowRightOutlined, FileDoneOutlined, DollarOutlined, MoreOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport DrawerPagamento from './drawerPagamento';\r\nimport { compararDatas, info } from \"../../services/funcoes\";\r\nimport { drawerActions, listagemActions } from \"../../actions\";\r\nimport { FormatFone, MaskFormat, FormatNumber } from '../../ValueObjects';\r\nimport { BreadcrumbPage, TabelaDados, Data } from \"../../components\";\r\nimport ModalDetalheNotaFiscal from \"../notaFiscal/modalDetalheNotaFiscal\";\r\n\r\nexport default function PagamentoParcela() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaParcelasFornecedor, setListaParcelasFornecedor] = useState(false);\r\n const [listaParcelasPagar, setListaParcelasPagar] = useState([]);\r\n const [dadosFornecedor, setDadosFornecedor] = useState({});\r\n const [listaTotalizadores, setListaTotalizadores] = useState({});\r\n const [formulario] = Form.useForm();\r\n const [alterarValorPago, setAlterarValorPago] = useState(true);\r\n const [formParametros] = Form.useForm();\r\n const [listaParcelas, setListaParcelas] = useState([]);\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [openModalDetalhes, setOpenModalDetalhes] = useState(false);\r\n const [dadosModalNota, setDadosModalNota] = useState({});\r\n const [dadosDetalhesNota, setDadosDetalhesNota] = useState({});\r\n function selecionarParcelas(keys) {\r\n setSelectedRowKeys(keys);\r\n };\r\n\r\n const rowSelection = {\r\n selectedRowKeys,\r\n onChange: selecionarParcelas,\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosFornecedor.pes_id) {\r\n api.get(`Parcela/ListarParcelas?PagarOuReceber=0&IdPessoa=${dadosFornecedor.pes_id}&StatusParcela=0,1&Estornado=false&PageSize=1000&Order=prc_datavencimento`).then(res => {\r\n listarParcelas(res.data.items);\r\n });\r\n }\r\n }, [dadosFornecedor]);\r\n\r\n function listarParcelas(dados) {\r\n let parcelasPagar = [];\r\n let keys = [];\r\n\r\n if (listaParcelasPagar.length > 0) {\r\n listaParcelasPagar.map((parcela) => {\r\n keys.push(parcela.key);\r\n });\r\n setSelectedRowKeys(keys);\r\n }\r\n\r\n dados.forEach((item) => {\r\n item.key = item.cpr_id.toString().concat(item.prc_id);\r\n item.vencida = compararDatas(item.prc_datavencimento, null, '<');\r\n item.valorOriginal = parseFloat(item.prc_valor);\r\n item.valorDesconto = 0.00;\r\n item.valorJuros = 0.00;\r\n item.valorMulta = 0.00;\r\n item.prc_valor = parseFloat((item.prc_valor - item.valorQuitado).toFixed(2));\r\n item.valorPago = parseFloat(item.prc_valor);\r\n parcelasPagar.push(item);\r\n });\r\n setListaParcelas(parcelasPagar);\r\n };\r\n\r\n function selecionarVencidas(e) {\r\n let keys = [];\r\n if (e.target.checked) {\r\n listaParcelas.map((item) => {\r\n if (compararDatas(item.prc_datavencimento, null, \"<\")) {\r\n keys.push(item.key);\r\n }\r\n });\r\n }\r\n setSelectedRowKeys(keys);\r\n };\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n async function visualizarNota(dados) {\r\n let retorno = [];\r\n let vendedor = [];\r\n if (!!dados.ntf_id) {\r\n retorno = await api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${dados.ntf_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data;\r\n if (!!retorno.ven_id) {\r\n vendedor = await api.get(`Vendedor/RetornaVendedor?idVendedor=${retorno.ven_id}`);\r\n if (vendedor.status === 200) {\r\n retorno.nomeVendedor = vendedor.data.pes_nome;\r\n }\r\n }\r\n retorno.itensNf.forEach((item) => {\r\n let totalItemSemDesconto = parseFloat((item.nfi_qtde * item.nfi_valorunitario)).toFixed(2);\r\n item.perc_desconto = parseFloat((item.nfi_valordesconto / (totalItemSemDesconto)) * 100).toFixed(2);\r\n let valorDesconto = item.nfi_valordesconto;\r\n item.valor_item_desconto = parseFloat(totalItemSemDesconto - valorDesconto).toFixed(2);\r\n });\r\n setDadosDetalhesNota(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n\r\n async function showDrawerExtra(dados) {\r\n let retorno = [];\r\n let vendedor = [];\r\n if (!!dados.ntf_id) {\r\n retorno = await api.get(`NotaFiscal/ListarNotaFiscal?IdNotaFiscal=${dados.ntf_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data;\r\n if (!!retorno.ven_id) {\r\n vendedor = await api.get(`Vendedor/listarVendedorCodigo?codigoVendedor=${retorno.ven_id}`);\r\n if (vendedor.status === 200) {\r\n retorno.nomeVendedor = vendedor.data.pes_nome;\r\n }\r\n }\r\n retorno.itensNf.forEach((item) => {\r\n let totalItemSemDesconto = parseFloat((item.nfi_qtde * item.nfi_valorunitario)).toFixed(2);\r\n item.perc_desconto = parseFloat((item.nfi_valordesconto / (totalItemSemDesconto)) * 100).toFixed(2);\r\n let valorDesconto = item.nfi_valordesconto;\r\n item.valor_item_desconto = parseFloat(totalItemSemDesconto - valorDesconto).toFixed(2);\r\n });\r\n\r\n setDadosModalNota(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n let lista = {};\r\n lista.valorTotal = 0;\r\n lista.valorTotalParcelas = 0;\r\n lista.valorTotalJuros = 0;\r\n lista.valorDesconto = 0;\r\n lista.valorAPagar = 0;\r\n lista.valorMulta = 0;\r\n let valorRecebido = 0;\r\n if (listaParcelasPagar.length > 0) {\r\n listaParcelasPagar.map(item => {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n lista.valorTotalParcelas += parseFloat(item.valorOriginal);\r\n lista.valorTotalJuros += parseFloat(item.valorJuros);\r\n lista.valorDesconto += parseFloat(item.valorDesconto);\r\n lista.valorMulta += parseFloat(item.valorMulta > 0 ? item.valorMulta : 0);\r\n lista.valorTotal += valorTotal;\r\n lista.valorAPagar += parseFloat((valorTotal + parseFloat(item.valorMulta) + parseFloat(item.valorJuros) - parseFloat(item.valorDesconto)).toFixed(2))\r\n valorRecebido += parseFloat(!!item.valorPago ? item.valorPago : 0);\r\n });\r\n if (alterarValorPago) {\r\n formulario.setFieldsValue({ valorPago: parseFloat((valorRecebido).toFixed(2)) });\r\n }\r\n formulario.setFieldsValue({ valorMulta: parseFloat(lista.valorMulta.toFixed(2)), valorDesconto: parseFloat(lista.valorDesconto.toFixed(2)) });\r\n calcularSobra(lista);\r\n }\r\n }, [listaParcelasPagar]);\r\n\r\n function calcularSobra(lista = { ...listaTotalizadores }) {\r\n let sobra = parseFloat((parseFloat(!!formulario.getFieldValue(\"valorPago\") ? formulario.getFieldValue(\"valorPago\") : 0) - parseFloat(lista.valorAPagar)).toFixed(2));\r\n lista.restantePagar = 0;\r\n lista.troco = 0;\r\n if (sobra < 0) {\r\n lista.restantePagar = (parseFloat(sobra) * -1).toFixed(2);\r\n } else {\r\n lista.troco = parseFloat(sobra);\r\n }\r\n setAlterarValorPago(true);\r\n setListaTotalizadores(lista);\r\n };\r\n\r\n function calcularPagamentoParcial() {\r\n let valorInformado = parseFloat(formulario.getFieldValue(\"valorPago\"));\r\n if (valorInformado > 0) {\r\n let listaTemp = [...listaParcelasPagar];\r\n for (const item of listaTemp) {\r\n let valorTotal = parseFloat((!!item.valorOriginal ? item.valorOriginal : 0)) - parseFloat((!!item.valorQuitado ? item.valorQuitado : 0));\r\n let valorParcela = parseFloat((valorTotal - parseFloat(item.valorDesconto) + parseFloat(item.valorJuros) + parseFloat(item.valorMulta)).toFixed(2));\r\n if (valorInformado > valorParcela) {\r\n item.prc_valor = valorParcela;\r\n item.valorPago = valorParcela;\r\n } else {\r\n item.prc_valor = valorInformado;\r\n item.valorPago = valorInformado;\r\n }\r\n valorInformado -= item.prc_valor;\r\n }\r\n setAlterarValorPago(false);\r\n\r\n setListaParcelasPagar(listaTemp);\r\n } else {\r\n calcularSobra();\r\n }\r\n };\r\n\r\n function pagarSelecionados(listaParcelas, selectedRowKeys) {\r\n if (selectedRowKeys.length === 0) {\r\n info(\"Selecione uma parcela!\");\r\n return;\r\n }\r\n let listaTemp = [...listaParcelasPagar];\r\n\r\n listaParcelas.map(parcela => {\r\n if (selectedRowKeys.indexOf(parcela.key) >= 0 && listaTemp.filter((item) => { return item.key === parcela.key }).length === 0) {\r\n listaTemp.push(parcela);\r\n }\r\n });\r\n\r\n setListaParcelasPagar(listaTemp);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function limparListas() {\r\n setListaParcelasFornecedor(false);\r\n setDadosFornecedor({});\r\n setSelectedRowKeys([]);\r\n setListaParcelasPagar([]);\r\n setListaTotalizadores({});\r\n formulario.resetFields();\r\n };\r\n\r\n function filtrarPeriodo() {\r\n let valor = formParametros.getFieldValue().pesquisa;\r\n if (!!formParametros.getFieldValue().dataInicial && !!formParametros.getFieldValue().dataFinal) {\r\n let dataInicial = moment(formParametros.getFieldValue().dataInicial).format('YYYY-MM-DD');\r\n let dataFinal = moment(formParametros.getFieldValue().dataFinal).format('YYYY-MM-DD');\r\n api.get(`Parcela/ListarParcelas?filtro=${!!valor ? valor : ''}&Estornado=false&DataInicial=${dataInicial}&DataFinal=${dataFinal}&PagarOuReceber=0&StatusParcela=0,1&PageSize=1000&Order=prc_datavencimento`).then(res => {\r\n listarParcelas(res.data.items);\r\n });\r\n setListaParcelasFornecedor(true);\r\n setDadosFornecedor({});\r\n }\r\n };\r\n\r\n function filtrarFornecedor() {\r\n let valor = formParametros.getFieldValue().pesquisa;\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: '', outrosFiltros: `&Filtro=${valor}` } });\r\n setListaParcelasFornecedor(false);\r\n\r\n if (!!formParametros.getFieldValue().dataInicial && !!formParametros.getFieldValue().dataFinal) {\r\n filtrarPeriodo();\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!listaParcelasFornecedor &&\r\n
\r\n (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n }, {\r\n title: 'CPF/CNPJ',\r\n width: 140,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, '', true) : MaskFormat(pej_cnpj, '', true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Telefone',\r\n width: 125,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero)}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n
\r\n ),\r\n },\r\n ]\r\n } />\r\n
\r\n }\r\n {listaParcelasFornecedor &&\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Parcelas em Aberto do Fornecedor
\r\n {dadosFornecedor.pes_nome || \"VÁRIOS\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n Selecionar Vencidas\r\n \r\n
(\r\n
\r\n {cpr_numerodocumento || '--'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº Parcela',\r\n align: 'left',\r\n width: 80,\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Fornecedor',\r\n width: 330,\r\n align: 'left',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 85,\r\n render: ({ cpr_datainclusao }) => (\r\n
\r\n {moment(cpr_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vencimento',\r\n width: 80,\r\n render: ({ prc_datavencimento, vencida }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Original (R$)',\r\n align: 'right',\r\n render: ({ valorOriginal }) => (\r\n
\r\n \r\n {FormatNumber(!!valorOriginal ? valorOriginal : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Pago (R$)',\r\n align: 'right',\r\n render: ({ valorQuitado }) => (\r\n
\r\n \r\n {FormatNumber(!!valorQuitado ? valorQuitado : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. A Pagar (R$)',\r\n align: 'right',\r\n render: ({ valorPago }) => (\r\n
\r\n \r\n {FormatNumber(!!valorPago ? valorPago : 0, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n \r\n
\r\n ),\r\n }]\r\n } rowSelection={rowSelection} scroll={{ x: 900 }} />\r\n \r\n { setOpenModalDetalhes(false) }} dadosModal={dadosDetalhesNota} />\r\n {/* { setOpenModalDetalhes(false) }} dadosDrawer={dadosModalNota} /> */}\r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Form, Select, Collapse, Input, Checkbox, Table, Modal, Divider, Popover } from 'antd';\r\nimport { CloseOutlined, ArrowDownOutlined, ArrowLeftOutlined, ArrowRightOutlined, ArrowUpOutlined, CheckOutlined, DeleteOutlined, RetweetOutlined, SearchOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { ModalSenhaLiberacao } from \"../../components/modals\";\r\nimport { FormatNumber, FormatDate } from '../../ValueObjects/';\r\nimport { manutencaoActions, drawerActions } from \"../../actions\";\r\nimport { info } from '../../services/funcoes';\r\nimport { BreadcrumbPage, DrawerLancamentoTransferencia, DrawerManutencaoCaixa, InputPreco, Excluir, LancamentoEntrada, LancamentoSaida, LancamentoTransferencia, Data, ComboData } from \"../../components\";\r\nimport { linkApi } from '../../services/auth';\r\nimport SelectPaginado from '../../components/selectPaginado';\r\n\r\nexport default function LancamentoCaixa() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openPesquisaAvancada, setOpenPesquisaAvancada] = useState(false);\r\n const [listaContaCorrenteSaldo, setListaContaCorrenteSaldo] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [listaPessoas, setListaPessoas] = useState([]);\r\n const [entradaSaida, setEntradaSaida] = useState(\"\");\r\n const [tipoMovimentacaoFinanceira, setTipoMovimentacaoFinanceira] = useState([]);\r\n const [listaCaixa, setListaCaixa] = useState([]);\r\n const [infoContas, setInfoContas] = useState({});\r\n const [openModalSenha, setOpenModalSenha] = useState(false);\r\n const [dadosLancamentoEstornar, setDadosLancamentoEstornar] = useState({});\r\n const [formulario] = Form.useForm();\r\n const [consuMovimentacao, setConsuMovimentacao] = useState(null);\r\n const [inputPesquisa, setInputPesquisa] = useState('');\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n setOpenPesquisaAvancada(!openPesquisaAvancada);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!listaContaCorrenteSaldo && listaContaCorrenteSaldo.length === 0) {\r\n setConsuMovimentacao(manutencao.dados);\r\n }\r\n }, [manutencao.dados, listaContaCorrenteSaldo]);\r\n\r\n useEffect(() => {\r\n if (!!consuMovimentacao) {\r\n listarCaixa(true, false, consuMovimentacao);\r\n }\r\n }, [consuMovimentacao]);\r\n\r\n useEffect(() => {\r\n listarCaixa(true);\r\n\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&CodReceitaDespesa=${entradaSaida}`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n\r\n api.get(`Pessoa/ListarPessoasAtivas?filtro=&ordem=+pes_nome`).then(res => {\r\n setListaPessoas(res.data);\r\n });\r\n\r\n api.get(`Enum/Listar?nome=TipoMovimentacaoFinanceira`).then(res => {\r\n setTipoMovimentacaoFinanceira(res.data);\r\n });\r\n\r\n formulario.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n }, []);\r\n\r\n async function listarCaixa(marcarTodos = false, pesquisaAvancada = false, ctc_id = null) {\r\n setCarregando(true)\r\n let contas = '';\r\n let info = {};\r\n let idContas = [];\r\n let contasSelecionadas = [];\r\n console.log(formulario.getFieldValue().filtro);\r\n /* Irá buscar a lista de contas selecionadas */\r\n if (!marcarTodos) {\r\n listaContaCorrenteSaldo.forEach((conta) => {\r\n if (conta.marcado) {\r\n contasSelecionadas.push(conta.ctc_id);\r\n }\r\n });\r\n }\r\n if (!!ctc_id) {\r\n contasSelecionadas.push(ctc_id);\r\n }\r\n\r\n let contaCorrente = await api.get(`ContaCorrente/ListarSaldoContaCorrente?tipoLancamento=1`);\r\n contaCorrente = contaCorrente.data;\r\n contaCorrente.forEach((conta) => {\r\n if (contasSelecionadas.includes(conta.ctc_id)) {\r\n conta.marcado = true;\r\n idContas.push(conta.ctc_id);\r\n }\r\n if (contasSelecionadas.length === 0) {\r\n idContas.push(conta.ctc_id);\r\n }\r\n if (marcarTodos) {\r\n conta.marcado = true;\r\n }\r\n });\r\n\r\n if (idContas.length > 1) {\r\n info.contaAtiva = 'Várias';\r\n } else {\r\n info.contaAtiva = contaCorrente.filter((conta) => { return conta.ctc_id === idContas[0] })[0].ctc_descricao;\r\n }\r\n contas = idContas.join(',');\r\n if (pesquisaAvancada && !!formulario.getFieldValue().reprocessarCaixa && formulario.getFieldValue().reprocessarCaixa) {\r\n await api.get(`ContaCorrente/reprocessarSaldoContaCorrentes?dataInicial=${FormatDate(!!formulario.getFieldValue().dataInicial ? formulario.getFieldValue().dataInicial.toDate().toLocaleDateString() : new Date().toLocaleDateString())}&contas=${contas}`).then(\r\n (retorno) => {\r\n if (retorno.data) {\r\n formulario.setFieldsValue({ reprocessarCaixa: false });\r\n listarCaixa(false, true);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n } else {\r\n setListaContaCorrenteSaldo(contaCorrente);\r\n let url = `MovimentoContaCorrente/ListarMovimentacao?IdsContaCorrente=${contas}\r\n &DataFinal=${FormatDate(!!formulario.getFieldValue().dataFinal ? formulario.getFieldValue().dataFinal.toDate().toLocaleDateString() : new Date().toLocaleDateString())}\r\n &DataInicial=${FormatDate(!!formulario.getFieldValue().dataInicial ? formulario.getFieldValue().dataInicial.toDate().toLocaleDateString() : new Date().toLocaleDateString())}\r\n &Filtro=${(!!formulario.getFieldValue().filtro ? formulario.getFieldValue().filtro : '')}\r\n &mostrarEstornados=${(!!formulario.getFieldValue().exibirEstornados ? formulario.getFieldValue().exibirEstornados : false)}\r\n &nroRegistros=1&ordem=-mcc_dataHora&pagina=1\r\n &TipoMovimentacao=${(!!formulario.getFieldValue().tipoMovimentacao ? formulario.getFieldValue().tipoMovimentacao.join(',') : '1,2,3')}\r\n &FiltroValorInicial=${(!!formulario.getFieldValue().lc_valor_final && formulario.getFieldValue().lc_valor_final > 0 ? formulario.getFieldValue().lc_valor_final : '')}\r\n &FiltroValorFinal=${(!!formulario.getFieldValue().lc_valor_inicial && formulario.getFieldValue().lc_valor_inicial > 0 ? formulario.getFieldValue().lc_valor_inicial : '')}`;\r\n\r\n if (!!formulario.getFieldValue().pes_id) {\r\n url += `&IdPessoa=${formulario.getFieldValue().pes_id}`;\r\n }\r\n if (!!formulario.getFieldValue().ctg_id) {\r\n url += `&IdContaGerencial=${formulario.getFieldValue().ctg_id}`;\r\n }\r\n if (!!formulario.getFieldValue().his_id){\r\n url += `&Historico=${formulario.getFieldValue().his_id}`;\r\n }\r\n\r\n let retorno = await api.get(url);\r\n let listaCaixaContas = (retorno.data.contas.length > 0 ? retorno.data.contas : []);\r\n let movimento = [];\r\n info.saldoAtual = retorno.data.saldoAtual\r\n\r\n for (const conta of listaCaixaContas) {\r\n let valormcc = conta.saldoAnterior;\r\n movimento = reverse(conta.movimento);\r\n movimento.forEach(\r\n (mov) => {\r\n if (mov.mcc_movimentoestornado == null) {\r\n if (mov.mcc_entradasaida === 1) {\r\n valormcc -= parseFloat(mov.mcc_valor);\r\n } else if (mov.mcc_entradasaida === 2) {\r\n valormcc += parseFloat(mov.mcc_valor);\r\n }\r\n mov.valormcc = valormcc;\r\n }\r\n mov.key = mov.mcc_id;\r\n });\r\n conta.saldoAtual = conta.saldoAtual;\r\n conta.movimento = reverse(movimento);\r\n }\r\n\r\n setInfoContas(info);\r\n setListaCaixa(listaCaixaContas);\r\n if (pesquisaAvancada) {\r\n formulario.setFieldsValue({ lc_valor_inicial: null, lc_valor_final: null, pes_id: null, lc_complemento: null, exibirEstornados: false, reprocessarCaixa: false });\r\n }\r\n }\r\n setCarregando(false);\r\n };\r\n\r\n function modalEstornar(record, event) {\r\n let dados = event.movimento[record];\r\n if (!!dados) {\r\n Modal.confirm({\r\n title: 'Estornar Parcela',\r\n icon: ,\r\n content: `Deseja realmente estornar o valor de ${FormatNumber(dados.mcc_valor, true)} referente ao lançamento na conta ${dados.ctc_descricao}?`,\r\n okText: 'Sim, quero estornar',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setDadosLancamentoEstornar(dados);\r\n setOpenModalSenha(true);\r\n }\r\n });\r\n }\r\n };\r\n\r\n function retornoModalSenha(dados) {\r\n if (dados) {\r\n if (!!dadosLancamentoEstornar.mcc_id) {\r\n api.post(`MovimentoContaCorrente/EstornarLancamento?IdLancamento=${dadosLancamentoEstornar.mcc_id}`).then((retornoExclusao) => {\r\n if (!!retornoExclusao.data) {\r\n\r\n if (!!retornoExclusao.data.prc_id) {\r\n Modal.success({\r\n content: 'Lançamento estornado com sucesso!',\r\n });\r\n } else if (!!retornoExclusao.data.ntf_id) {\r\n info('Este movimento foi gerado a partir de uma Venda, para estornar este movimento é necessário CANCELAR a venda.', 'Operação de Estorno não foi executada!');\r\n } else if (!(!!retornoExclusao.data.mcc_estornado)) {\r\n info('Operação de Estorno não foi executada!');\r\n }\r\n listarCaixa();\r\n }\r\n });\r\n } else {\r\n info('Operação de Estorno não foi executada!');\r\n }\r\n } else {\r\n info('Operação de Estorno foi cancelada!');\r\n }\r\n };\r\n\r\n function reverse(lista) {\r\n let retorno = [];\r\n\r\n for (let i = lista.length - 1; i >= 0; i--) {\r\n retorno.push(lista[i])\r\n }\r\n return retorno;\r\n };\r\n\r\n function abrirLancamentoEntradaSaida(operacao) {\r\n setEntradaSaida(operacao);\r\n let dados = {};\r\n dados.operacao = operacao;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerManutencaoCaixa: true } });\r\n };\r\n\r\n function selecionarConta(contaSelecionada) {\r\n let listaContaCorrente = [...listaContaCorrenteSaldo];\r\n let conta = listaContaCorrente.filter((item) => { return item.ctc_id === contaSelecionada.ctc_id })[0];\r\n conta.marcado = (!!conta.marcado ? !conta.marcado : true);\r\n\r\n setListaContaCorrenteSaldo(listaContaCorrente);\r\n listarCaixa();\r\n };\r\n\r\n function marcarTodos() {\r\n let listaContaCorrente = [...listaContaCorrenteSaldo];\r\n listaContaCorrente.forEach((conta) => {\r\n conta.marcado = !conta.marcado;\r\n });\r\n\r\n setListaContaCorrenteSaldo(listaContaCorrente);\r\n listarCaixa();\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n } size=\"middle\" onClick={() => {\r\n abrirLancamentoEntradaSaida(\"2\");\r\n }}>\r\n Entradas\r\n \r\n
\r\n \r\n \r\n
\r\n } size=\"middle\" onClick={() => {\r\n abrirLancamentoEntradaSaida(\"1\");\r\n }}>\r\n Saídas\r\n \r\n
\r\n \r\n \r\n
\r\n } size=\"middle\" onClick={() => {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerTransferencia: true } });\r\n }}>\r\n Transferência\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { listarCaixa() }} />\r\n \r\n \r\n { listarCaixa() }} />\r\n \r\n \r\n {\r\n formulario.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formulario.setFieldsValue({ dataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n formulario.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formulario.setFieldsValue({ dataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n listarCaixa();\r\n }} />\r\n \r\n \r\n \r\n { listarCaixa() }} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {openPesquisaAvancada ? : } Realizar uma pesquisa avançada\r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({p.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n ({h.his_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Reprocessar Caixa?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Saldo Atual (R$): {FormatNumber(infoContas.saldoAtual, true)}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n marcarTodos()} />\r\n
\r\n
\r\n Contas \r\n \r\n \r\n \r\n \r\n {\r\n setInputPesquisa(e.target.value);\r\n }} />\r\n \r\n \r\n \r\n {listaContaCorrenteSaldo.filter((item) => { return !!!inputPesquisa || (item.ctc_descricao.toLowerCase().indexOf(inputPesquisa.toLowerCase()) >= 0 || item.ctc_id.toString().indexOf(inputPesquisa) >= 0) }).map(conta => (\r\n selecionarConta(conta)} span={24}>\r\n
\r\n {conta.marcado ? : ''}\r\n
\r\n \r\n \r\n {conta.ctc_descricao}\r\n \r\n \r\n {FormatNumber(conta.saldo, true)}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n Data\r\n \r\n \r\n Conta Gerencial\r\n \r\n \r\n Entrada (R$)\r\n \r\n \r\n Saída (R$)\r\n \r\n \r\n Saldo (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {ctc_descricao}\r\n \r\n \r\n \r\n \r\n {FormatNumber(entrada, true)}\r\n \r\n \r\n {FormatNumber(saida, true)}\r\n \r\n \r\n {(saldoAtual < 0) ? {FormatNumber(saldoAtual, true)} : {FormatNumber(saldoAtual, true)}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {movimento.map((mov, record) => (\r\n
\r\n \r\n
\r\n
\r\n {moment(mov.mcc_dataHora).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n \r\n \r\n
\r\n {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? \r\n {(!!mov.mcc_transferencia ? \"Transferência / \" : \"\" + (!!mov.ctg_descricao ? mov.ctg_descricao : '-'))}\r\n : \r\n {(!!mov.mcc_transferencia ? \"Transferência / \" : \"\" + (!!mov.ctg_descricao ? mov.ctg_descricao : '-'))}\r\n }\r\n {!!mov.pes_nome ?\r\n
\r\n Pessoa: {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? {mov.pes_nome} : {mov.pes_nome}}\r\n
\r\n : null}\r\n
\r\n \r\n \r\n
\r\n {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? {(mov.mcc_entradasaida === 2) ? FormatNumber(!!mov.mcc_valor ? mov.mcc_valor : 0, true) : '-'}\r\n : {(mov.mcc_entradasaida === 2) ? FormatNumber(!!mov.mcc_valor ? mov.mcc_valor : 0, true) : '-'}}\r\n
\r\n \r\n \r\n
\r\n {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? {(mov.mcc_entradasaida === 1) ? FormatNumber(!!mov.mcc_valor ? mov.mcc_valor : 0, true) : '-'}\r\n : {(mov.mcc_entradasaida === 1) ? FormatNumber(!!mov.mcc_valor ? mov.mcc_valor : 0, true) : '-'}}\r\n
\r\n \r\n \r\n
\r\n {(mov.valormcc < 0) ?\r\n {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? {FormatNumber(mov.valormcc, true)} : {FormatNumber(mov.valormcc, true)}} :\r\n {mov.mcc_estornado || !!mov.mcc_movimentoestornado ? {FormatNumber(mov.valormcc, true)} : {FormatNumber(mov.valormcc, true)}}\r\n }\r\n
\r\n \r\n \r\n \r\n modalEstornar(record, event)} icon={} />\r\n \r\n \r\n \r\n \r\n {(!!mov.loc_descricao || !!mov.mcc_complemento || !!mov.mcc_numerodocumento || !!mov.mcc_valorjuros || !!mov.mcc_valormulta || !!mov.mcc_valordesconto) &&\r\n \r\n \r\n {!!mov.loc_descricao ?\r\n
\r\n \r\n {mov.loc_descricao}\r\n \r\n
\r\n : null}\r\n \r\n \r\n {!!mov.mcc_complemento ?\r\n
\r\n Compl.: {mov.mcc_complemento}\r\n
\r\n : null}\r\n \r\n \r\n {!!mov.mcc_numerodocumento ?\r\n
\r\n Nº Doc.: {mov.mcc_numerodocumento}\r\n
\r\n : null}\r\n \r\n \r\n {!!mov.mcc_valorjuros ?\r\n
\r\n Juros (R$): {FormatNumber(!!mov.mcc_valorjuros ? mov.mcc_valorjuros : 0, true)}\r\n
\r\n : null}\r\n \r\n \r\n {!!mov.mcc_valormulta ?\r\n
\r\n Multa (R$): {FormatNumber(!!mov.mcc_valormulta ? mov.mcc_valormulta : 0, true)}\r\n
\r\n : null}\r\n \r\n \r\n {!!mov.mcc_valordesconto ?\r\n
\r\n Descontos (R$): {FormatNumber(!!mov.mcc_valordesconto ? mov.mcc_valordesconto : 0, true)}\r\n
\r\n : null}\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n Saldo Anterior (R$):\r\n \r\n \r\n \r\n {FormatNumber(!!saldoAnterior ? saldoAnterior : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]} dataSource={listaCaixa} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n { setOpenModalSenha(false); retornoModalSenha(retorno) }} />\r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Divider, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaDiarioLocalAnalitico({ valoresProvisionados, tabelaFluxoCaixa, saldos, form, filtros }) {\r\n\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaFinal, setListaFinal] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n return (\r\n
\r\n
\r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n Contas: {tabelaFluxoCaixa[0]?.nomeLocal}\r\n
\r\n {listaFinal.map((row, index) => (\r\n
\r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldoInicial, true)}\r\n \r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldosConta, true)}\r\n \r\n
\r\n ))}\r\n
\r\n SALDO INICIAL: {FormatNumber(saldoInicial, true)}\r\n \r\n SALDO FINAL: {FormatNumber(saldoFinal, true)}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n {/* Cabeçalho da Tabela */}\r\n
DATA\r\n ENTRADA\r\n SAÍDA\r\n \r\n\r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.datapgtovencimento}\r\n \r\n \r\n {FormatNumber(fluxoLocal.entradarealizado, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.saidarealizado, true, false)}\r\n \r\n \r\n ))}\r\n\r\n {/* Linha de Totais */}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n
\r\n \r\n \r\n DATA\r\n \r\n \r\n \r\n \r\n ENTRADA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.datapgtovencimento}\r\n \r\n \r\n {FormatNumber(fluxoLocal.provisaoreceber, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.entradarealizado, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.provisaopagar, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.saidarealizado, true, false)}\r\n \r\n \r\n ))}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.prevReceber, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.prevPagar, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaDiarioSintetico({ valoresProvisionados, tabelaFluxoCaixa, saldos, filtros }) {\r\n\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaFinal, setListaFinal] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n
FLUXO DE CAIXA DE {moment(saldos.dataInicial).format('DD/MM/YYYY')} A {moment(saldos.dataFinal).format('DD/MM/YYYY')}\r\n SALDO INICIAL\r\n ENTRADA\r\n SAÍDA\r\n SALDO FINAL\r\n \r\n
\r\n {tabelaFluxoCaixa.map((fluxoLocal) => {\r\n return (\r\n \r\n
{fluxoLocal.nomelocal}\r\n {FormatNumber(saldoInicial, true, false)}\r\n {FormatNumber(fluxoLocal.totalentradarealizadolocal, true, false)}\r\n {FormatNumber(fluxoLocal.totalsaidarealizadolocal, true, false)}\r\n {FormatNumber(saldoFinal, true, false)}\r\n \r\n )\r\n })}\r\n \r\n TOTAL DO PERÍODO\r\n {FormatNumber(saldos.saldoInicial < 0 ? saldos.saldoInicial * -1 : saldos.saldoInicial, true, false)}\r\n {FormatNumber(saldos.totalentradarealizado, true, false)}\r\n {FormatNumber(saldos.totalsaidarealizado, true, false)}\r\n {FormatNumber(saldos.saldoFinal < 0 ? saldos.saldoFinal * -1 : saldos.saldoFinal, true, false)}\r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n
FLUXO DE CAIXA DE {moment(saldos.dataInicial).format('DD/MM/YYYY')} A {moment(saldos.dataFinal).format('DD/MM/YYYY')}\r\n SALDO INICIAL\r\n \r\n \r\n ENTRADA\r\n \r\n \r\n PREVISTO\r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n PREVISTO\r\n REALIZADO\r\n \r\n \r\n SALDO FINAL\r\n \r\n
\r\n {tabelaFluxoCaixa.map((fluxoLocal) => {\r\n return (\r\n \r\n
{fluxoLocal.nomelocal}\r\n {FormatNumber(fluxoLocal.valor_SaldoInicial, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.totalprovisaoreceberlocal, true, false)}\r\n {FormatNumber(fluxoLocal.totalentradarealizadolocal, true, false)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(fluxoLocal.totalprovisaopagarlocal, true, false)}\r\n {FormatNumber(fluxoLocal.totalsaidarealizadolocal, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.totalentradarealizadolocal - fluxoLocal.totalsaidarealizadolocal, true, false)}\r\n \r\n )\r\n })}\r\n \r\n TOTAL DO PERÍODO\r\n {FormatNumber(saldoInicial < 0 ? saldoInicial * -1 : saldoInicial, true, false)}\r\n \r\n \r\n {FormatNumber(saldos.totalprovisaoreceber, true, false)}\r\n {FormatNumber(saldos.totalentradarealizado, true, false)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(saldos.totalprovisaopagar, true, false)}\r\n {FormatNumber(saldos.totalsaidarealizado, true, false)}\r\n \r\n \r\n {FormatNumber(saldoFinal < 0 ? saldoFinal * -1 : saldoFinal, true, false)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n\r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaMensalAnalitico({ valoresProvisionados, tabelaFluxoCaixa, saldos, form, filtros }) {\r\n\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaFinal, setListaFinal] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n Contas: {tabelaFluxoCaixa[0]?.nomeLocal}\r\n
\r\n {listaFinal.map((row, index) => (\r\n
\r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldoInicial, true)}\r\n \r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldosConta, true)}\r\n \r\n
\r\n ))}\r\n
\r\n SALDO INICIAL: {FormatNumber(saldoInicial, true)}\r\n \r\n SALDO FINAL: {FormatNumber(saldoFinal, true)}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n {/* Cabeçalho da Tabela */}\r\n
DATA\r\n ENTRADA\r\n SAÍDA\r\n \r\n\r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.mesExtenso + \"/\" + fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaMesAno, true, false)}\r\n \r\n \r\n ))}\r\n\r\n {/* Linha de Totais */}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n {/* FLUXO DE CAIXA DE {moment(form.getFildValue().flx_mesInicial).format('DD/MM/YYYY')} A {moment(form.getFildValue().flx_mesFinal).format('DD/MM/YYYY')} */}\r\n DATA\r\n \r\n \r\n ENTRADA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.mesExtenso + \"/\" + fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevReceberMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevPagarMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaMesAno, true, false)}\r\n \r\n \r\n ))}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.prevReceber, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.prevPagar, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaMensalLocalSintetico({ valoresProvisionados, tabelaFluxoCaixa, saldos, form, filtros }) {\r\n\r\n return (\r\n
\r\n
\r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n \r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n {/* Cabeçalho da Tabela */}\r\n
DATA\r\n ENTRADA\r\n SAÍDA\r\n \r\n\r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.mesExtenso + \"/\" + fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaMesAno, true, false)}\r\n \r\n \r\n ))}\r\n\r\n {/* Linha de Totais */}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n {/*
FLUXO DE CAIXA DE {moment(form.getFildValue().flx_mesInicial).format('DD/MM/YYYY')} A {moment(form.getFildValue().flx_mesFinal).format('DD/MM/YYYY')} */}\r\n DATA\r\n \r\n \r\n ENTRADA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.mesExtenso + \"/\" + fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevReceberMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevPagarMesAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaMesAno, true, false)}\r\n \r\n \r\n ))}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.prevReceber, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.prevPagar, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaAnualAnalitico({valoresProvisionados, tabelaFluxoCaixa, saldos, form, filtros }) {\r\n\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaFinal, setListaFinal] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n Contas: {tabelaFluxoCaixa[0]?.nomeLocal}\r\n
\r\n {listaFinal.map((row, index) => (\r\n
\r\n {row.nomeContaCorrente}: \r\n \r\n {/* {row.nomeContaCorrente} */}\r\n {FormatNumber(row.saldoInicial, true)}\r\n \r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldosConta, true)}\r\n \r\n
\r\n ))}\r\n
\r\n SALDO INICIAL: {FormatNumber(saldoInicial, true)}\r\n \r\n SALDO FINAL: {FormatNumber(saldoFinal, true)}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n {/* Cabeçalho da Tabela */}\r\n
DATA\r\n ENTRADA\r\n SAÍDA\r\n \r\n\r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaAno, true, false)}\r\n \r\n \r\n ))}\r\n\r\n {/* Linha de Totais */}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n {/*
FLUXO DE CAIXA DE {moment(form.getFildValue().flx_mesInicial).format('DD/MM/YYYY')} A {moment(form.getFildValue().flx_mesFinal).format('DD/MM/YYYY')} */}\r\n DATA\r\n \r\n \r\n ENTRADA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevReceberAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevPagarAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaAno, true, false)}\r\n \r\n \r\n ))}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.prevReceber, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.prevPagar, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaAnualLocalSintetico({valoresProvisionados, tabelaFluxoCaixa, saldos, form, filtros }) {\r\n\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaInicial, setListaInicial] = useState([]);\r\n const [listaFinal, setListaFinal] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n api.get(`FluxoCaixa/SaldoInicial?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}\r\n &caixaOrganizacao=${filtros.fluxoOrganizacao}&dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosInicial = res.data;\r\n let saldoInicial = dadosInicial.map(item =>\r\n createInicial(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldoConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaInicial(dadosInicial);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n }\r\n );\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n setSaldoFinal(res.data[0].totalSaldosConta);\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n function createInicial(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
Fluxo de Caixa de {moment(filtros.dataInicial).format('DD/MM/YYYY')} a {moment(filtros.dataFinal).format('DD/MM/YYYY')}\r\n \r\n {/*
\r\n
\r\n
\r\n
\r\n Contas: Loja Matriz\r\n
\r\n {listaFinal.map((row, index) => (\r\n
\r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldoInicial, true)}\r\n \r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(row.saldosConta, true)}\r\n \r\n
\r\n ))}\r\n
\r\n SALDO INICIAL: {FormatNumber(saldoInicial, true)}\r\n \r\n SALDO FINAL: {FormatNumber(saldoFinal, true)}\r\n \r\n
\r\n \r\n \r\n */}\r\n
\r\n
\r\n {!valoresProvisionados &&\r\n
\r\n \r\n {/* Cabeçalho da Tabela */}\r\n
DATA\r\n ENTRADA\r\n SAÍDA\r\n \r\n\r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaAno, true, false)}\r\n \r\n \r\n ))}\r\n\r\n {/* Linha de Totais */}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n {valoresProvisionados &&\r\n
\r\n \r\n {/*
FLUXO DE CAIXA DE {moment(form.getFildValue().flx_mesInicial).format('DD/MM/YYYY')} A {moment(form.getFildValue().flx_mesFinal).format('DD/MM/YYYY')} */}\r\n DATA\r\n \r\n \r\n ENTRADA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n \r\n SAÍDA\r\n \r\n \r\n \r\n PREVISTO\r\n \r\n REALIZADO\r\n \r\n \r\n \r\n
\r\n {/* Mapeando os dados do fluxo de caixa */}\r\n {tabelaFluxoCaixa.map((fluxoLocal, index) => (\r\n \r\n
\r\n {fluxoLocal.ano}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevReceberAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoEntradaAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.prevPagarAno, true, false)}\r\n \r\n \r\n {FormatNumber(fluxoLocal.realizadoSaidaAno, true, false)}\r\n \r\n \r\n ))}\r\n \r\n TOTAL DO PERÍODO\r\n \r\n {FormatNumber(saldos.prevReceber, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoEntrada, true)}\r\n \r\n \r\n {FormatNumber(saldos.prevPagar, true)}\r\n \r\n \r\n {FormatNumber(saldos.realizadoSaida, true)}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row, Divider } from 'antd';\r\nimport { Table, TableBody, TableCell, TableRow } from \"@material-ui/core\";\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaDiarioGerencialAnalitico({ filtros, valoresProvisionados, form }) {\r\n\r\n const [receitaDespesa, setReceitaDespesa] = useState([]);\r\n const [categoria, setCategoria] = useState([]);\r\n const [contaGerencial, setContaGerencial] = useState([]);\r\n const [dataInicial, setDataInicial] = useState();\r\n const [dataFinal, setDataFinal] = useState();\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaInicial, setListaInicial] = useState([]);\r\n const [listaFinal, setListaFinal] = useState([]);\r\n const [saldoPrevisto, setSaldoPrevisto] = useState();\r\n const [saldoRealizado, setSaldoRealizado] = useState();\r\n const [local, setLocal] = useState();\r\n\r\n //constantes utilizadas para criar uma nova lista de acordo com o filtro item.\r\n const ReceitaDespesa = (itens) => {\r\n // Criar um novo mapa para armazenar combinações únicas de categorias e contas gerenciais\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.receitaDespesaCategoria}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n // Converter o mapa de volta para uma lista de objetos únicos\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n const FiltraCategoria = (itens) => {\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.codigoCategoria}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n const FiltraConta = (itens) => {\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.codigoContaGerencial}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n setDataFinal(filtros.dataFinal);\r\n setDataInicial(filtros.dataInicial);\r\n api.get(`FluxoCaixa/ListarDiarioGerencialAnalitico?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}\r\n &caixaOrganizacao=${filtros.fluxoOrganizacao}&dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n setLocal(res.data[0].nomeLocal);\r\n let dadosReceita = ReceitaDespesa(res.data);\r\n setSaldoPrevisto((dadosReceita[0].totalProvisaoReceber - dadosReceita[0].totalProvisaoPagar));\r\n setSaldoRealizado((dadosReceita[0].totalEntradaRealizado - dadosReceita[0].totalSaidaRealizado))\r\n\r\n let dadosCategoria = FiltraCategoria(res.data);\r\n let dadosConta = FiltraConta(res.data);\r\n let ListaReceitaDespesa = dadosReceita.map(item =>\r\n createData(\r\n item.receitaDespesaCategoria,\r\n item.totalEntradaRealizado,\r\n item.totalProvisaoPagar,\r\n item.totalProvisaoReceber,\r\n item.totalSaidaRealizado\r\n )\r\n );\r\n setReceitaDespesa(ListaReceitaDespesa);\r\n let ListaCategoria = dadosCategoria.map(item =>\r\n createCategoria(\r\n item.receitaDespesaCategoria,\r\n item.descricaoCategoria,\r\n item.codigoCategoria,\r\n item.realizadoentradaCategoria,\r\n item.realizadosaidaCategoria,\r\n item.provisaopagarCategoria,\r\n item.provisaoreceberCategoria\r\n )\r\n );\r\n setCategoria(ListaCategoria);\r\n let ListaConta = dadosConta.map(item =>\r\n createConta(\r\n item.receitaDespesaCategoria,\r\n item.codigoCategoria,\r\n item.codigoContaGerencial,\r\n item.descricaoContaGerencial,\r\n item.valor_RealizadoEntrada,\r\n item.valor_RealizadoSaida,\r\n item.valor_ProvisaoPagar,\r\n item.valor_ProvisaoReceber\r\n )\r\n );\r\n setContaGerencial(ListaConta);\r\n }\r\n }).catch(err => {\r\n console.log(err);\r\n }\r\n );\r\n\r\n api.get(`FluxoCaixa/SaldoInicial?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}\r\n &caixaOrganizacao=${filtros.fluxoOrganizacao}&dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosInicial = res.data;\r\n let InicialSaldo = (!res.data[0].totalSaldoConta && res.data[0].totalSaldoInicial !== 0) ? res.data[0].totalSaldoInicial : res.data[0].totalSaldo;\r\n setSaldoInicial(InicialSaldo);\r\n\r\n let saldoInicial = dadosInicial.map(item =>\r\n createInicial(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldoConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaInicial(dadosInicial);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n }\r\n );\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (!res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0 && res.data[0].totalSaldoConta !== undefined) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldosConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n }\r\n\r\n function createData(receitaDespesa, totalEntradaRealizado, totalProvisaoPagar, totalProvisaoReceber, totalSaidaRealizado) {\r\n return { receitaDespesa, totalEntradaRealizado, totalProvisaoPagar, totalProvisaoReceber, totalSaidaRealizado }\r\n };\r\n function createCategoria(receitaDespesaCategoria, descricaoCategoria, codigoCategoria, realizadoentradaCategoria, realizadosaidaCategoria, provisaopagarCategoria, provisaoreceberCategoria) {\r\n return { receitaDespesaCategoria, descricaoCategoria, codigoCategoria, realizadoentradaCategoria, realizadosaidaCategoria, provisaopagarCategoria, provisaoreceberCategoria }\r\n };\r\n function createConta(receitaDespesaCategoria, codigoCategoria, codigoContaGerencial, descricaoContaGerencial, valor_RealizadoEntrada, valor_RealizadoSaida, valor_ProvisaoPagar, valor_ProvisaoReceber) {\r\n return { receitaDespesaCategoria, codigoCategoria, codigoContaGerencial, descricaoContaGerencial, valor_RealizadoEntrada, valor_RealizadoSaida, valor_ProvisaoPagar, valor_ProvisaoReceber }\r\n };\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n function createInicial(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldosConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Contas: {local}\r\n
\r\n {listaFinal.map((row, index) => (\r\n
\r\n {row.nomeContaCorrente}: \r\n \r\n {/* {row.nomeContaCorrente} */}\r\n {FormatNumber(row.saldoInicial, true)}\r\n \r\n {row.nomeContaCorrente}: \r\n \r\n {FormatNumber(((!row.saldosConta && row.saldosConta !== 0) ? row.saldosConta : row.saldo), true)}\r\n \r\n
\r\n ))}\r\n
\r\n SALDO INICIAL: {FormatNumber(saldoInicial, true)}\r\n \r\n SALDO FINAL: {FormatNumber(saldoFinal, true)}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
Fluxo de Caixa de {moment(dataInicial).format('DD/MM/YYYY')} a {moment(dataFinal).format('DD/MM/YYYY')}\r\n \r\n
\r\n
\r\n \r\n
\r\n {valoresProvisionados && (\r\n
\r\n PREVISTO\r\n
\r\n )}\r\n
\r\n REALIZADO\r\n
\r\n
\r\n
\r\n
\r\n \r\n {receitaDespesa.map((row) => {\r\n // Filtrando categorias de acordo com a receita/despesa\r\n const categoriasFiltradas = categoria.filter(\r\n (categoria) => categoria.receitaDespesaCategoria === row.receitaDespesa\r\n );\r\n return (\r\n \r\n {categoriasFiltradas.map((categoria) => {\r\n // Filtra a lista de contas gerenciais por categoria e tipo de receita/despesa\r\n const contasGerenciaisFiltradas = contaGerencial.filter(\r\n (conta) =>\r\n conta.codigoCategoria === categoria.codigoCategoria &&\r\n conta.receitaDespesaCategoria === row.receitaDespesa\r\n );\r\n return (\r\n \r\n {/* Linha para a categoria */}\r\n \r\n \r\n {categoria.descricaoCategoria}\r\n \r\n {/* Coluna de valores provisionados ou realizados de entrada ou saída */}\r\n \r\n {valoresProvisionados ? (\r\n categoria.receitaDespesaCategoria === 2 ? (\r\n FormatNumber(categoria.provisaoreceberCategoria, true)\r\n ) : (\r\n FormatNumber(categoria.provisaopagarCategoria, true)\r\n )\r\n ) : null}\r\n \r\n {/* Coluna de valores realizados de entrada ou saída */}\r\n \r\n {categoria.receitaDespesaCategoria === 2 ? (\r\n FormatNumber(categoria.realizadoentradaCategoria, true)\r\n ) : (\r\n FormatNumber(categoria.realizadosaidaCategoria, true)\r\n )}\r\n \r\n \r\n {/* Linhas para cada conta gerencial dentro da categoria */}\r\n {contasGerenciaisFiltradas.map((conta) => (\r\n \r\n \r\n {conta.descricaoContaGerencial}\r\n \r\n {/* Coluna de valores provisionados ou realizados de entrada ou saída */}\r\n \r\n {valoresProvisionados ? (\r\n row.receitaDespesa === 2 ? (\r\n FormatNumber(conta.valor_ProvisaoReceber, true)\r\n ) : (\r\n FormatNumber(conta.valor_ProvisaoPagar, true)\r\n )\r\n ) : null}\r\n \r\n {/* Coluna de valores realizados de entrada ou saída */}\r\n \r\n {row.receitaDespesa === 2 ? (\r\n FormatNumber(conta.valor_RealizadoEntrada, true)\r\n ) : (\r\n FormatNumber(conta.valor_RealizadoSaida, true)\r\n )}\r\n \r\n \r\n ))}\r\n \r\n );\r\n })}\r\n {/* Linha para totais de entradas */}\r\n {row.receitaDespesa === 2 && (\r\n \r\n \r\n TOTAL DE RECEITAS\r\n \r\n \r\n {valoresProvisionados && FormatNumber(row.totalProvisaoReceber, true)}\r\n \r\n \r\n {FormatNumber(row.totalEntradaRealizado, true)}\r\n \r\n \r\n )}\r\n {/* Linha para totais de saídas */}\r\n {row.receitaDespesa === 1 && (\r\n \r\n \r\n TOTAL DE DESPESAS\r\n \r\n \r\n {valoresProvisionados && FormatNumber(row.totalProvisaoPagar, true)}\r\n \r\n \r\n {FormatNumber(row.totalSaidaRealizado, true)}\r\n \r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n SALDO DO PERÍODO\r\n
\r\n {valoresProvisionados && (\r\n
\r\n {FormatNumber(saldoPrevisto)}\r\n
\r\n )}\r\n
\r\n {FormatNumber(saldoRealizado, true)}\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../../services/api';\r\nimport { Col, Row } from 'antd';\r\nimport { Table, TableBody, TableCell, TableRow } from \"@material-ui/core\";\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function FluxoCaixaDiarioGerencialSintetico({ filtros, valoresProvisionados, form }) {\r\n\r\n const [receitaDespesa, setReceitaDespesa] = useState([]);\r\n const [categoria, setCategoria] = useState([]);\r\n const [contaGerencial, setContaGerencial] = useState([]);\r\n const [dataInicial, setDataInicial] = useState();\r\n const [dataFinal, setDataFinal] = useState();\r\n const [saldoInicial, setSaldoInicial] = useState();\r\n const [saldoFinal, setSaldoFinal] = useState();\r\n const [listaInicial, setListaInicial] = useState([]);\r\n const [listaFinal, setListaFinal] = useState([]);\r\n //constantes utilizadas para criar uma nova lista de acordo com o filtro item.\r\n const ReceitaDespesa = (itens) => {\r\n // Criar um novo mapa para armazenar combinações únicas de categorias e contas gerenciais\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.receitaDespesaCategoria}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n // Converter o mapa de volta para uma lista de objetos únicos\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n const FiltraCategoria = (itens) => {\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.codigoCategoria}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n const FiltraConta = (itens) => {\r\n const mapaUnico = new Map();\r\n itens.forEach(item => {\r\n const chave = `${item.codigoContaGerencial}`;\r\n if (!mapaUnico.has(chave)) {\r\n mapaUnico.set(chave, item);\r\n }\r\n });\r\n return Array.from(mapaUnico.values());\r\n };\r\n\r\n // const FiltraFinal = (itens) => {\r\n // const mapaUnico = new Map();\r\n // itens.forEach(item => {\r\n // const chave = `${item.contacorrente}`;\r\n // if (!mapaUnico.has(chave)) {\r\n // mapaUnico.set(chave, item);\r\n // }\r\n // });\r\n // return Array.from(mapaUnico.values());\r\n // };\r\n\r\n // const FiltraInicial = (itens) => {\r\n // const mapaUnico = new Map();\r\n // itens.forEach(item => {\r\n // const chave = `${item.contacorrente}`;\r\n // if (!mapaUnico.has(chave)) {\r\n // mapaUnico.set(chave, item);\r\n // }\r\n // });\r\n // return Array.from(mapaUnico.values());\r\n // };\r\n\r\n useEffect(() => {\r\n if (!!filtros) {\r\n tratarDados(filtros);\r\n }\r\n }, []);\r\n\r\n async function tratarDados(filtros) {\r\n setDataFinal(filtros.dataFinal);\r\n setDataInicial(filtros.dataInicial);\r\n api.get(`FluxoCaixa/ListarDiarioGerencialAnalitico?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}\r\n &caixaOrganizacao=${filtros.fluxoOrganizacao}&dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosReceita = ReceitaDespesa(res.data);\r\n let dadosCategoria = FiltraCategoria(res.data);\r\n let dadosConta = FiltraConta(res.data);\r\n let ListaReceitaDespesa = dadosReceita.map(item =>\r\n createData(\r\n item.receitaDespesaCategoria,\r\n item.totalEntradaRealizado,\r\n item.totalProvisaoPagar,\r\n item.totalProvisaoReceber,\r\n item.totalSaidaRealizado\r\n )\r\n );\r\n setReceitaDespesa(ListaReceitaDespesa);\r\n let ListaCategoria = dadosCategoria.map(item =>\r\n createCategoria(\r\n item.receitaDespesaCategoria,\r\n item.descricaoCategoria,\r\n item.codigoCategoria,\r\n item.realizadoentradaCategoria,\r\n item.realizadosaidaCategoria,\r\n item.provisaopagarCategoria,\r\n item.provisaoreceberCategoria\r\n )\r\n );\r\n setCategoria(ListaCategoria);\r\n let ListaConta = dadosConta.map(item =>\r\n createConta(\r\n item.receitaDespesaCategoria,\r\n item.codigoCategoria,\r\n item.codigoContaGerencial,\r\n item.descricaoContaGerencial,\r\n item.valor_RealizadoEntrada,\r\n item.valor_RealizadoSaida,\r\n item.valor_ProvisaoPagar,\r\n item.valor_ProvisaoReceber\r\n )\r\n );\r\n setContaGerencial(ListaConta);\r\n }\r\n }).catch(err => {\r\n console.log(err);\r\n }\r\n );\r\n api.get(`FluxoCaixa/SaldoFinal?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}\r\n &dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosFinal = res.data;\r\n let FinalSaldo = (!res.data[0].totalSaldoConta && res.data[0].totalSaldoConta !== 0 && res.data[0].totalSaldoConta !== undefined) ? res.data[0].totalSaldosConta : res.data[0].totalSaldo;\r\n setSaldoFinal(FinalSaldo);\r\n let saldoFinal = dadosFinal.map(item =>\r\n createFinal(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldoConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaFinal(saldoFinal);\r\n }\r\n }\r\n ).catch(err => {\r\n }\r\n );\r\n api.get(`FluxoCaixa/SaldoInicial?caixaPeriodo=${filtros.fluxoPeriodo}&caixaApresentacao=${filtros.fluxoApresentacao}&caixaOrganizacao=${filtros.fluxoOrganizacao}&dataInicial=${filtros.dataInicial}&dataFinal=${filtros.dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dadosInicial = res.data;\r\n setSaldoInicial(res.data[0].totalSaldoInicial);\r\n let totalInicial = dadosInicial.reduce((sum, item) => sum + item.saldoInicial, 0);\r\n let saldoInicial = dadosInicial.map(item =>\r\n createInicial(\r\n item.codigoLocal,\r\n item.CodigoLocal,\r\n item.contaCorrente,\r\n item.nomeContaCorrente,\r\n item.saldo,\r\n item.saldoConta,\r\n item.saldoInicial,\r\n item.totalSaldo,\r\n item.totalSaldoInicial,\r\n item.totalSaldosConta\r\n )\r\n );\r\n setListaInicial(saldoInicial);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n }\r\n );\r\n }\r\n\r\n function createData(receitaDespesa, totalEntradaRealizado, totalProvisaoPagar, totalProvisaoReceber, totalSaidaRealizado) {\r\n return { receitaDespesa, totalEntradaRealizado, totalProvisaoPagar, totalProvisaoReceber, totalSaidaRealizado }\r\n };\r\n function createCategoria(receitaDespesaCategoria, descricaoCategoria, codigoCategoria, realizadoentradaCategoria, realizadosaidaCategoria, provisaopagarCategoria, provisaoreceberCategoria) {\r\n return { receitaDespesaCategoria, descricaoCategoria, codigoCategoria, realizadoentradaCategoria, realizadosaidaCategoria, provisaopagarCategoria, provisaoreceberCategoria }\r\n };\r\n function createConta(receitaDespesaCategoria, codigoCategoria, codigoContaGerencial, descricaoContaGerencial, valor_RealizadoEntrada, valor_RealizadoSaida, valor_ProvisaoPagar, valor_ProvisaoReceber) {\r\n return { receitaDespesaCategoria, codigoCategoria, codigoContaGerencial, descricaoContaGerencial, valor_RealizadoEntrada, valor_RealizadoSaida, valor_ProvisaoPagar, valor_ProvisaoReceber }\r\n };\r\n function createFinal(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldoConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldoConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n function createInicial(codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldoConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta) {\r\n return { codigoLocal, CodigoLocal, contaCorrente, nomeContaCorrente, saldo, saldoConta, saldoInicial, totalSaldo, totalSaldoInicial, totalSaldosConta }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n Fluxo de Caixa de {moment(dataInicial).format('DD/MM/YYYY')} a {moment(dataFinal).format('DD/MM/YYYY')}\r\n
\r\n
\r\n
\r\n \r\n
\r\n {valoresProvisionados && (\r\n
\r\n PREVISTO\r\n
\r\n )}\r\n
\r\n REALIZADO\r\n
\r\n
\r\n\r\n
\r\n
\r\n SALDO INICIAL\r\n
\r\n {valoresProvisionados && (\r\n
\r\n {FormatNumber(saldoInicial, true)}\r\n
\r\n )}\r\n
\r\n {FormatNumber(saldoInicial, true)}\r\n
\r\n
\r\n
\r\n \r\n \r\n {receitaDespesa.map((row) => {\r\n // Filtrando categorias de acordo com a receita/despesa\r\n const categoriasFiltradas = categoria.filter(\r\n (categoria) => categoria.receitaDespesaCategoria === row.receitaDespesa\r\n );\r\n\r\n return (\r\n \r\n {categoriasFiltradas.map((categoria) => {\r\n // Filtra a lista de contas gerenciais por categoria e tipo de receita/despesa\r\n const contasGerenciaisFiltradas = contaGerencial.filter(\r\n (conta) =>\r\n conta.codigoCategoria === categoria.codigoCategoria &&\r\n conta.receitaDespesaCategoria === row.receitaDespesa\r\n );\r\n\r\n return (\r\n \r\n {/* Linha para a categoria */}\r\n \r\n \r\n {categoria.descricaoCategoria}\r\n \r\n {/* Coluna de valores provisionados ou realizados de entrada ou saída */}\r\n \r\n {valoresProvisionados ? (\r\n categoria.receitaDespesaCategoria === 2 ? (\r\n FormatNumber(categoria.provisaoreceberCategoria, true)\r\n ) : (\r\n FormatNumber(categoria.provisaopagarCategoria, true)\r\n )\r\n ) : null}\r\n \r\n {/* Coluna de valores realizados de entrada ou saída */}\r\n \r\n {categoria.receitaDespesaCategoria === 2 ? (\r\n FormatNumber(categoria.realizadoentradaCategoria, true)\r\n ) : (\r\n FormatNumber(categoria.realizadosaidaCategoria, true)\r\n )}\r\n \r\n \r\n\r\n {/* Linhas para cada conta gerencial dentro da categoria */}\r\n {contasGerenciaisFiltradas.map((conta) => (\r\n \r\n \r\n {conta.descricaoContaGerencial}\r\n \r\n {/* Coluna de valores provisionados ou realizados de entrada ou saída */}\r\n \r\n {valoresProvisionados ? (\r\n row.receitaDespesa === 2 ? (\r\n FormatNumber(conta.valor_ProvisaoReceber, true)\r\n ) : (\r\n FormatNumber(conta.valor_ProvisaoPagar, true)\r\n )\r\n ) : null}\r\n \r\n {/* Coluna de valores realizados de entrada ou saída */}\r\n \r\n {row.receitaDespesa === 2 ? (\r\n FormatNumber(conta.valor_RealizadoEntrada, true)\r\n ) : (\r\n FormatNumber(conta.valor_RealizadoSaida, true)\r\n )}\r\n \r\n \r\n ))}\r\n \r\n );\r\n })}\r\n\r\n {/* Linha para totais de entradas */}\r\n {row.receitaDespesa === 2 && (\r\n \r\n \r\n TOTAL DE ENTRADAS\r\n \r\n \r\n {valoresProvisionados && FormatNumber(row.totalProvisaoReceber, true)}\r\n \r\n \r\n {FormatNumber(row.totalEntradaRealizado, true)}\r\n \r\n \r\n )}\r\n\r\n {/* Linha para totais de saídas */}\r\n {row.receitaDespesa === 1 && (\r\n \r\n \r\n TOTAL DE SAÍDAS\r\n \r\n \r\n {valoresProvisionados && FormatNumber(row.totalProvisaoPagar, true)}\r\n \r\n \r\n {FormatNumber(row.totalSaidaRealizado, true)}\r\n \r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n
\r\n
\r\n
\r\n
\r\n SALDO FINAL\r\n
\r\n {valoresProvisionados && (\r\n
\r\n {FormatNumber((saldoFinal), true)}\r\n
\r\n )}\r\n
\r\n {FormatNumber((saldoFinal), true)}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Col, Form, Row, Select, Checkbox, Button, DatePicker } from 'antd';\r\nimport { SearchOutlined } from '@ant-design/icons';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { BreadcrumbPage, Data } from '../../components';\r\nimport {\r\n FluxoCaixaDiarioLocalAnalitico, FluxoCaixaDiarioLocalSintetico, FluxoCaixaMensalLocalAnalitico, FluxoCaixaAnualLocalAnalitico, FluxoCaixaDiarioGerencialAnalitico,\r\n FluxoCaixaDiarioGerencialSintetico, FluxoCaixaAnualLocalSintetico, FluxoCaixaMensalLocalSintetico\r\n} from './pages';\r\n\r\nexport default function FluxoCaixa() {\r\n\r\n const [formFluxoCaixa] = Form.useForm();\r\n const [tipoFluxoCaixa, setTipoFluxoCaixa] = useState(\"\");\r\n const [valoresProvisionados, setValoresProvisionados] = useState(false);\r\n const [periodo, setPeriodo] = useState([]);\r\n const [organizacao, setOrganizacao] = useState([]);\r\n const [formaApresentacao, setFormaApresentacao] = useState([]);\r\n const [tabelaFluxoCaixa, setTabelaFluxoCaixa] = useState([]);\r\n const [saldos, setSaldos] = useState({});\r\n const [filtros, setFiltros] = useState([]);\r\n const anoAtual = new Date().getFullYear(); // Obtém o ano atual\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=FluxoCaixaPeriodo`).then(res => {\r\n setPeriodo(res.data);\r\n });\r\n api.get(`Enum/Listar?nome=FluxoCaixaFormaApresentacao`).then(res => {\r\n setFormaApresentacao(res.data);\r\n });\r\n api.get(`Enum/Listar?nome=FluxoCaixaOrganizacao`).then(res => {\r\n let organizacaoFiltrada = res.data.filter(item => item.key !== 2);\r\n //colocado condição para que seja diferente de 3 para que não pegue a categoria, pois a mesma consta dentro da 2 que é por contagerencial\r\n setOrganizacao(organizacaoFiltrada);\r\n });\r\n }, []);\r\n\r\n function montaDataMes(mes) {\r\n let data = new Date(anoAtual, mes, 1); // `mes - 1` porque os meses são indexados a partir de 0\r\n return moment(data).toISOString();\r\n }\r\n\r\n function montaDataMesFim(mes) {\r\n let data = new Date(anoAtual, mes + 1, 0); // `mes + 1` porque os meses são indexados a partir de 0\r\n return moment(data).toISOString();\r\n }\r\n\r\n function montaDataAno(ano, dia) {\r\n let data = new Date(ano, 0, dia); // `0` representa janeiro, pois os meses são indexados de 0 a 11\r\n return moment(data).toISOString();\r\n }\r\n\r\n function montaDataAnoFim(ano, dia) {\r\n let data = new Date(ano, 11, dia); // `0` representa janeiro, pois os meses são indexados de 0 a 11\r\n return moment(data).toISOString();\r\n }\r\n\r\n async function verificarFluxo() {\r\n let tipo = \"\";\r\n let fluxoPeriodo = formFluxoCaixa.getFieldValue().flx_periodo;\r\n let fluxoOrganizacao = formFluxoCaixa.getFieldValue().flx_organizacao;\r\n let fluxoApresentacao = formFluxoCaixa.getFieldValue().flx_apresentacao;\r\n let dataInicial = moment(formFluxoCaixa.getFieldValue().flx_dataInicial).toISOString();\r\n let dataFinal = moment(formFluxoCaixa.getFieldValue().flx_dataFinal).toISOString();\r\n let mesInicial = moment(formFluxoCaixa.getFieldValue().flx_mesInicial).month();\r\n let mesFinal = moment(formFluxoCaixa.getFieldValue().flx_mesFinal).month();\r\n let anoInicial = moment(formFluxoCaixa.getFieldValue().flx_anoInicial).year();\r\n let anoFinal = moment(formFluxoCaixa.getFieldValue().flx_anoFinal).year();\r\n\r\n if (fluxoPeriodo === 1 && fluxoOrganizacao === 1 && fluxoApresentacao === 1) {\r\n let dataInicio = montaDataMes(mesInicial);\r\n let dataFim = montaDataMesFim(mesFinal);\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicio;\r\n filtro.dataFinal = dataFim;\r\n setFiltros(filtro);\r\n tipo = \"diarioLocalAnalitico\";\r\n api.get(`FluxoCaixa/ListarFluxoDiarioLocal?DataInicial=${dataInicial}&DataFinal=${dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n prevPagar: dados.totalprovisaopagar || 0,\r\n prevReceber: dados.totalprovisaoreceber || 0,\r\n realizadoEntrada: dados.totalentradarealizado || 0,\r\n realizadoSaida: dados.totalsaidarealizado || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n } else if (fluxoPeriodo === 1 && fluxoOrganizacao === 1 && fluxoApresentacao === 2) {\r\n tipo = \"diarioLocalSintetico\";\r\n api.get(`FluxoCaixa/ListarFluxoDiarioLocalSintetico?DataInicial=${dataInicial}&DataFinal=${dataFinal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n totalprovisaopagar: dados.totalprovisaopagar || 0,\r\n totalprovisaoreceber: dados.totalprovisaoreceber || 0,\r\n totalentradarealizado: dados.totalentradarealizado || 0,\r\n totalsaidarealizado: dados.totalsaidarealizado || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n } else if (fluxoPeriodo === 4 && fluxoOrganizacao === 1 && fluxoApresentacao === 2) {\r\n let dataInicio = montaDataMes(mesInicial);\r\n let dataFim = montaDataMesFim(mesFinal);\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicio;\r\n filtro.dataFinal = dataFim;\r\n setFiltros(filtro);\r\n tipo = \"mensalLocalSintetico\";\r\n api.get(`FluxoCaixa/ListarMensalLocal?DataInicial=${dataInicio}&DataFinal=${dataFim}&caixaPeriodo=${fluxoPeriodo}&caixaApresentacao=${fluxoApresentacao}&caixaOrganizacao=${fluxoOrganizacao}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n prevPagar: dados.prevPagar || 0,\r\n prevReceber: dados.prevReceber || 0,\r\n realizadoEntrada: dados.realizadoEntrada || 0,\r\n realizadoSaida: dados.realizadoSaida || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n } else if (fluxoPeriodo === 4 && fluxoOrganizacao === 1 && fluxoApresentacao === 1) {\r\n let dataInicio = montaDataMes(mesInicial);\r\n let dataFim = montaDataMesFim(mesFinal);\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicio;\r\n filtro.dataFinal = dataFim;\r\n setFiltros(filtro);\r\n tipo = \"mensalLocalAnalitico\";\r\n api.get(`FluxoCaixa/ListarMensalLocal?DataInicial=${dataInicio}&DataFinal=${dataFim}&caixaPeriodo=${fluxoPeriodo}&caixaApresentacao=${fluxoApresentacao}&caixaOrganizacao=${fluxoOrganizacao}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n prevPagar: dados.prevPagar || 0,\r\n prevReceber: dados.prevReceber || 0,\r\n realizadoEntrada: dados.realizadoEntrada || 0,\r\n realizadoSaida: dados.realizadoSaida || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n\r\n } else if (fluxoPeriodo === 5 && fluxoOrganizacao === 1 && fluxoApresentacao === 1) {\r\n let dataInicio = montaDataAno(anoInicial, 0);\r\n let dataFim = montaDataAnoFim(anoFinal, 31);\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicio;\r\n filtro.dataFinal = dataFim;\r\n setFiltros(filtro);\r\n tipo = \"anualLocalAnalitico\";\r\n api.get(`FluxoCaixa/ListarAnualLocal?DataInicial=${dataInicio}&DataFinal=${dataFim}&caixaPeriodo=${fluxoPeriodo}&caixaApresentacao=${fluxoApresentacao}&caixaOrganizacao=${fluxoOrganizacao}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n prevPagar: dados.prevPagar || 0,\r\n prevReceber: dados.prevReceber || 0,\r\n realizadoEntrada: dados.realizadoEntrada || 0,\r\n realizadoSaida: dados.realizadoSaida || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n\r\n } else if (fluxoPeriodo === 5 && fluxoOrganizacao === 1 && fluxoApresentacao === 2) {\r\n let dataInicio = montaDataAno(anoInicial, 0);\r\n let dataFim = montaDataAnoFim(anoFinal, 31);\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicio;\r\n filtro.dataFinal = dataFim;\r\n setFiltros(filtro);\r\n tipo = \"anualLocalSintetico\";\r\n api.get(`FluxoCaixa/ListarAnualLocal?DataInicial=${dataInicio}&DataFinal=${dataFim}&caixaPeriodo=${fluxoPeriodo}&caixaApresentacao=${fluxoApresentacao}&caixaOrganizacao=${fluxoOrganizacao}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = res.data[0];\r\n let valores = {\r\n prevPagar: dados.prevPagar || 0,\r\n prevReceber: dados.prevReceber || 0,\r\n realizadoEntrada: dados.realizadoEntrada || 0,\r\n realizadoSaida: dados.realizadoSaida || 0\r\n };\r\n setSaldos(valores);\r\n setTabelaFluxoCaixa(res.data);\r\n }\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n });\r\n }\r\n else if (fluxoPeriodo === 1 && fluxoOrganizacao === 3 && fluxoApresentacao === 1) {\r\n tipo = \"diarioGerencialAnalitico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicial;\r\n filtro.dataFinal = dataFinal;\r\n setFiltros(filtro);\r\n } else if (fluxoPeriodo === 1 && fluxoOrganizacao === 3 && fluxoApresentacao === 2) {\r\n tipo = \"diarioGerencialSintetico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = dataInicial;\r\n filtro.dataFinal = dataFinal;\r\n setFiltros(filtro);\r\n } else if (fluxoPeriodo === 4 && fluxoOrganizacao === 3 && fluxoApresentacao === 1) {\r\n tipo = \"mensalGerencialAnalitico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = montaDataMes(mesInicial);\r\n filtro.dataFinal = montaDataMesFim(mesFinal);\r\n setFiltros(filtro);\r\n } else if (fluxoPeriodo === 4 && fluxoOrganizacao === 3 && fluxoApresentacao === 2) {\r\n tipo = \"mensalGerencialSintetico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = montaDataMes(mesInicial);\r\n filtro.dataFinal = montaDataMesFim(mesFinal);\r\n setFiltros(filtro);\r\n } else if (fluxoPeriodo === 5 && fluxoOrganizacao === 3 && fluxoApresentacao === 1) {\r\n tipo = \"anualGerencialAnalitico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = montaDataAno(anoInicial, 1);\r\n filtro.dataFinal = montaDataAnoFim(anoFinal, 31);\r\n setFiltros(filtro);\r\n } else if (fluxoPeriodo === 5 && fluxoOrganizacao === 3 && fluxoApresentacao === 2) {\r\n tipo = \"anualGerencialSintetico\";\r\n let filtro = [];\r\n filtro.fluxoPeriodo = fluxoPeriodo;\r\n filtro.fluxoApresentacao = fluxoApresentacao;\r\n filtro.fluxoOrganizacao = fluxoOrganizacao;\r\n filtro.dataInicial = montaDataAno(anoInicial, 1);\r\n filtro.dataFinal = montaDataAnoFim(anoFinal, 31);\r\n setFiltros(filtro);\r\n }\r\n\r\n setTipoFluxoCaixa(tipo);\r\n }\r\n\r\nreturn (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.flx_periodo !== currentValues.flx_periodo} rules={[{ required: true }]}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('flx_periodo') === 1) return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n if (getFieldValue('flx_periodo') === 4) return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n if (getFieldValue('flx_periodo') === 5) return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.flx_periodo !== currentValues.flx_periodo || prevValues.flx_organizacao !== currentValues.flx_organizacao}>\r\n {({ getFieldValue }) => {\r\n // if (((getFieldValue('flx_periodo') === 1 || getFieldValue('flx_periodo') === 5) && (getFieldValue('flx_organizacao') === 1) || getFieldValue('flx_organizacao') === 3)) \r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n // else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n setValoresProvisionados(event.target.checked)}>\r\n Mostrar Coluna de Valores Provisionados?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n {tipoFluxoCaixa === \"diarioLocalAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"diarioLocalSintetico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"diarioGerencialSintetico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"diarioGerencialAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"mensalGerencialAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"anualGerencialAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"mensalGerencialSintetico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"anualGerencialSintetico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"mensalLocalAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"mensalLocalSintetico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"anualLocalAnalitico\" &&\r\n \r\n }\r\n {tipoFluxoCaixa === \"anualLocalSintetico\" &&\r\n \r\n }\r\n\r\n
\r\n
\r\n);\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Button, Radio, Collapse, Card, Typography, Tag, InputNumber, Table, Modal, Select } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { FormatDate, FormatNumber } from '../../ValueObjects/';\r\nimport { BreadcrumbPage, Data } from \"../../components\";\r\n\r\nexport default function ConciliacaoCartoes() {\r\n\r\n const [listaMovimentacao, setListaMovimentacao] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [listaContaGerencialTaxas, setListaContaGerencialTaxas] = useState([]);\r\n const [listaContaGerencialAgrupadorTaxas, setListaContaGerencialAgrupadorTaxas] = useState([]);\r\n\r\n const toggleDetalhes = (bnd_id, fpg_tipopagamento) => {\r\n let listaTemp = [...listaMovimentacao];\r\n let mov = listaTemp.filter((item) => { return item.bnd_id === bnd_id && item.fpg_tipopagamento === fpg_tipopagamento })[0];\r\n mov.openDetalhes = !mov.openDetalhes;\r\n setListaMovimentacao(listaTemp);\r\n };\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n listarContaGerencial();\r\n listarMovimentacao();\r\n }, []);\r\n\r\n function listarContaGerencial() {\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?CodReceitaDespesa=2`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?CodReceitaDespesa=1`).then(res => {\r\n setListaContaGerencialAgrupadorTaxas(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencialTaxas(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n }\r\n function listarMovimentacao() {\r\n let filtro = `dataFinal=${FormatDate(!!formulario.getFieldValue().dataFinal ? formulario.getFieldValue().dataFinal.toDate().toLocaleDateString() : new Date().toLocaleDateString())}\r\n &dataInicial=${FormatDate(!!formulario.getFieldValue().dataInicial ? formulario.getFieldValue().dataInicial.toDate().toLocaleDateString() : new Date().toLocaleDateString())}\r\n ${(formulario.getFieldValue().tipo !== 1 ? `&tipoMovimentacao=${formulario.getFieldValue().tipo}` : '')}&conciliado=false`;\r\n setListaMovimentacao([]);\r\n api.get(`ConciliacaoCartao/ListarMovimentacao?${filtro}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dadosMovimentacao = res.data;\r\n for (var i = 0; i < dadosMovimentacao.length; i++) {\r\n let lancamentos = dadosMovimentacao[i].conciliacaoCartaoDetalhamento;\r\n let taxas = dadosMovimentacao[i].dadosTaxaCartaoCreditoParcela;\r\n dadosMovimentacao[i].totaltaxas = 0;\r\n dadosMovimentacao[i].totalBruto = 0;\r\n dadosMovimentacao[i].auxTotaltaxas = 0;\r\n dadosMovimentacao[i].auxTotalBruto = 0;\r\n\r\n lancamentos.forEach((item) => {\r\n item.key = item.rcc_id;\r\n });\r\n // usando reduce\r\n dadosMovimentacao[i].totalBruto = lancamentos.reduce((prevVal, elem) => {\r\n //usando filter\r\n if (taxas.length > 0) {\r\n let taxa = taxas.filter((tax, index, taxas) => {\r\n return (tax.tcp_parcelaminima <= elem.numeroParcelas && tax.tcp_parcelamaxima >= elem.numeroParcelas);\r\n });\r\n if (taxa.length > 0) {\r\n dadosMovimentacao[i].totaltaxas += parseFloat((elem.rcc_valor * taxa[0].tcp_taxa).toFixed(2));\r\n }\r\n } else {\r\n if (dadosMovimentacao[i].fpg_tipopagamento === 4) {\r\n dadosMovimentacao[i].totaltaxas += parseFloat((elem.rcc_valor * dadosMovimentacao[i].bce_taxapadraodebito).toFixed(2));\r\n } else {\r\n dadosMovimentacao[i].totaltaxas += parseFloat((elem.rcc_valor * dadosMovimentacao[i].bce_taxapadraocredito).toFixed(2));\r\n }\r\n }\r\n return prevVal + elem.rcc_valor;\r\n }, 0);\r\n\r\n dadosMovimentacao[i].bce_taxapadraodebito = parseFloat((dadosMovimentacao[i].bce_taxapadraodebito * 100).toFixed(2));\r\n dadosMovimentacao[i].bce_taxapadraocredito = parseFloat((dadosMovimentacao[i].bce_taxapadraocredito * 100).toFixed(2));\r\n dadosMovimentacao[i].openDetalhes = false;\r\n }\r\n setListaMovimentacao(dadosMovimentacao);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function calcularTaxaCartao(e, bnd_id, fpg_tipopagamento) {\r\n let value = e.target.value.replace('%', '').replace(',', '.');\r\n value = (value > 100 ? 100 : value);\r\n let listaTemp = [...listaMovimentacao];\r\n let mov = listaTemp.filter((item) => { return item.bnd_id === bnd_id && item.fpg_tipopagamento === fpg_tipopagamento })[0];\r\n\r\n if (mov.fpg_tipopagamento === 4) {\r\n mov.totaltaxas = parseFloat((mov.totalBruto * (parseFloat(value) / 100)).toFixed(2));\r\n mov.auxTotaltaxas = parseFloat((mov.auxTotalBruto * (parseFloat(value) / 100)).toFixed(2));\r\n } else if (mov.fpg_tipopagamento === 3) {\r\n mov.totaltaxas = parseFloat((mov.totalBruto * (parseFloat(value) / 100)).toFixed(2));\r\n mov.auxTotaltaxas = parseFloat((mov.auxTotalBruto * (parseFloat(value) / 100)).toFixed(2));\r\n }\r\n\r\n setListaMovimentacao(listaTemp);\r\n };\r\n\r\n function marcarDesmarcarTodos(selectedRowKeys, bnd_id, fpg_tipopagamento) {\r\n let listaTemp = [...listaMovimentacao];\r\n let dados = listaTemp.filter((item) => { return item.bnd_id === bnd_id && item.fpg_tipopagamento === fpg_tipopagamento })[0];\r\n let lancamentos = dados.conciliacaoCartaoDetalhamento;\r\n let taxas = dados.dadosTaxaCartaoCreditoParcela;\r\n dados.auxTotaltaxas = 0;\r\n dados.auxTotalBruto = 0;\r\n dados.auxTotalBruto = lancamentos.reduce((prevVal, elem) => {\r\n let somaTotal = 0;\r\n if ((selectedRowKeys === null && elem.marcado === true) || (selectedRowKeys !== null && selectedRowKeys.indexOf(elem.rcc_id) >= 0)) {\r\n if (taxas.length > 0) {\r\n let taxa = taxas.filter((tax, index, taxas) => {\r\n return (tax.tcp_parcelaminima <= elem.numeroParcelas && tax.tcp_parcelamaxima >= elem.numeroParcelas);\r\n });\r\n if (taxa.length > 0) {\r\n dados.auxTotaltaxas += parseFloat((elem.rcc_valor * taxa[0].tcp_taxa).toFixed(2));\r\n }\r\n } else {\r\n if (dados.fpg_tipopagamento === 4) {\r\n dados.auxTotaltaxas += parseFloat((elem.rcc_valor * (parseFloat(dados.bce_taxapadraodebito) / 100)).toFixed(2));\r\n } else {\r\n dados.auxTotaltaxas += parseFloat((elem.rcc_valor * (parseFloat(dados.bce_taxapadraocredito) / 100)).toFixed(2));\r\n }\r\n }\r\n elem.marcado = true;\r\n somaTotal += parseFloat((elem.rcc_valor).toFixed(2));\r\n } else {\r\n elem.marcado = false;\r\n }\r\n return prevVal + somaTotal;\r\n }, 0);\r\n setListaMovimentacao(listaTemp);\r\n };\r\n\r\n function efetuarConciliacao() {\r\n let dadosEnviar = {};\r\n let listaMov = [];\r\n\r\n dadosEnviar.ctg_id = formulario.getFieldValue().ctg_id;\r\n dadosEnviar.ctg_id_taxas = formulario.getFieldValue().ctg_id_taxas;\r\n dadosEnviar.observacao = !!formulario.getFieldValue().observacao ? formulario.getFieldValue().observacao : \"\";\r\n let listaComMovimentacao = listaMovimentacao.filter((tax, index, movimentacao) => {\r\n return (tax.auxTotalBruto > 0);\r\n });\r\n let indice = 0;\r\n for (let i = 0; i < listaComMovimentacao.length; i++) {\r\n let dados = {};\r\n dados.hcc_totalbrutodebito = 0;\r\n dados.hcc_taxadebito = 0;\r\n dados.hcc_totalliquidodebito = 0;\r\n dados.hcc_totalbrutocredito = 0;\r\n dados.hcc_taxacredito = 0;\r\n dados.hcc_totalliquidocredito = 0;\r\n if (listaComMovimentacao[i].fpg_tipopagamento === 4) {\r\n dados.hcc_totalbrutodebito = parseFloat(listaComMovimentacao[i].auxTotalBruto.toFixed(2));\r\n dados.hcc_taxadebito = parseFloat(listaComMovimentacao[i].auxTotaltaxas.toFixed(2));\r\n dados.hcc_totalliquidodebito = parseFloat((dados.hcc_totalbrutodebito - dados.hcc_taxadebito).toFixed(2));\r\n } else {\r\n dados.hcc_totalbrutocredito = parseFloat(listaComMovimentacao[i].auxTotalBruto.toFixed(2));\r\n dados.hcc_taxacredito = parseFloat(listaComMovimentacao[i].auxTotaltaxas.toFixed(2));\r\n dados.hcc_totalliquidocredito = parseFloat((dados.hcc_totalbrutocredito - dados.hcc_taxacredito).toFixed(2));\r\n }\r\n dados.bce_id = listaComMovimentacao[i].bce_id;\r\n dados.ctc_id = listaComMovimentacao[i].ctc_id;\r\n dados.bnd_id = listaComMovimentacao[i].bnd_id;\r\n let lista = listaComMovimentacao[i].conciliacaoCartaoDetalhamento;\r\n dados.conciliacaoCartaoDetalhamento = lista.filter((mov, index, lista) => {\r\n return (mov.marcado === true);\r\n });\r\n if (i > 0) {\r\n let listDados = listaMov.filter((list, index, listaMov) => {\r\n return (listaComMovimentacao[i].bce_id === list.bce_id && listaComMovimentacao[i].bnd_id === list.bnd_id);\r\n });\r\n if (listDados.length > 0) {\r\n let listaA = listaMov[listDados[0].indice].conciliacaoCartaoDetalhamento\r\n let listaConcatenada = listaA.concat(dados.conciliacaoCartaoDetalhamento);\r\n delete listaMov[listDados[0].indice].conciliacaoCartaoDetalhamento;\r\n listaMov[listDados[0].indice].conciliacaoCartaoDetalhamento = listaConcatenada;\r\n\r\n if (listaComMovimentacao[i].fpg_tipopagamento === 4) {\r\n listaMov[listDados[0].indice].hcc_totalbrutodebito = parseFloat(listaComMovimentacao[i].auxTotalBruto.toFixed(2));\r\n listaMov[listDados[0].indice].hcc_taxadebito = parseFloat(listaComMovimentacao[i].auxTotaltaxas.toFixed(2));\r\n listaMov[listDados[0].indice].hcc_totalliquidodebito = parseFloat((dados.hcc_totalbrutodebito - dados.hcc_taxadebito).toFixed(2));\r\n } else {\r\n listaMov[listDados[0].indice].hcc_totalbrutocredito = parseFloat(listaComMovimentacao[i].auxTotalBruto.toFixed(2));\r\n listaMov[listDados[0].indice].hcc_taxacredito = parseFloat(listaComMovimentacao[i].auxTotaltaxas.toFixed(2));\r\n listaMov[listDados[0].indice].hcc_totalliquidocredito = parseFloat((dados.hcc_totalbrutocredito - dados.hcc_taxacredito).toFixed(2));\r\n }\r\n } else {\r\n dados.indice = indice;\r\n listaMov.push(dados);\r\n indice++;\r\n }\r\n } else {\r\n dados.indice = indice;\r\n listaMov.push(dados);\r\n indice++;\r\n }\r\n }\r\n dadosEnviar.HistoricoConciliacaoCartao = listaMov;\r\n setCarregando(false);\r\n if (!dadosEnviar.ctg_id_taxas || !dadosEnviar.ctg_id) {\r\n error(\"Não foi possível realizar a conciliação de cartões, Favor selecionar uma conta Gerencial!\");\r\n }\r\n else if (dadosEnviar.HistoricoConciliacaoCartao == []) {\r\n error(\"Não foi possível realizar a conciliação de cartões, Favor selecionar os registros a serem conciliados e tente novamente!\");\r\n } else {\r\n setCarregando(true);\r\n api.post(`ConciliacaoCartao/efetuarConciliacao`, JSON.stringify(dadosEnviar), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n (retorno) => {\r\n if (retorno) {\r\n Modal.success({\r\n content: 'Conciliação de cartões efetivada com sucesso!',\r\n });\r\n } else {\r\n error('Não foi possível realizar a conciliação de cartões!');\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n error(erro.response.data.Message, \"Não foi possível realizar a conciliação de cartões!\");\r\n }\r\n ).finally(() => {\r\n formulario.resetFields();\r\n formulario.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n listarMovimentacao();\r\n setCarregando(false);\r\n });\r\n }\r\n };\r\n\r\n function calculaValores(bnd_id, fpg_tipopagamento, valor, dadosTaxa) {\r\n let listaTemp = [...listaMovimentacao];\r\n let dados = listaTemp.filter((item) => { return item.bnd_id === bnd_id && item.fpg_tipopagamento === fpg_tipopagamento })[0];\r\n let lancamentos = dados.conciliacaoCartaoDetalhamento;\r\n let taxas = dados.dadosTaxaCartaoCreditoParcela;\r\n dados.totaltaxas = 0;\r\n dados.totalBruto = 0;\r\n\r\n let taxaAlterar = taxas.filter((taxa) => {\r\n return (taxa.tcp_parcelaminima === dadosTaxa.tcp_parcelaminima && taxa.tcp_parcelamaxima === dadosTaxa.tcp_parcelamaxima);\r\n });\r\n if (taxaAlterar.length > 0) {\r\n taxaAlterar[0].tcp_taxa = parseFloat(valor) / 100;\r\n }\r\n\r\n dados.totalBruto = lancamentos.reduce((prevVal, elem) => {\r\n if (taxas.length > 0) {\r\n let taxa = taxas.filter((taxa, index, taxas) => {\r\n return (taxa.tcp_parcelaminima <= elem.numeroParcelas && taxa.tcp_parcelamaxima >= elem.numeroParcelas);\r\n });\r\n if (taxa.length > 0) {\r\n dados.totaltaxas += parseFloat((elem.rcc_valor * taxa[0].tcp_taxa).toFixed(2));\r\n }\r\n } else {\r\n if (dados.fpg_tipopagamento === 4) {\r\n dados.totaltaxas += parseFloat((elem.rcc_valor * (parseFloat(dados.bce_taxapadraodebito) / 100)).toFixed(2));\r\n } else {\r\n dados.totaltaxas += parseFloat((elem.rcc_valor * (parseFloat(dados.bce_taxapadraocredito) / 100)).toFixed(2));\r\n }\r\n }\r\n return parseFloat((prevVal + elem.rcc_valor).toFixed(2));\r\n }, 0);\r\n setListaMovimentacao(listaTemp);\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaMovimentacao.map((item) => (\r\n
\r\n \r\n \r\n \r\n
\r\n \"Visa\"\r\n
\r\n \r\n \r\n \r\n \r\n {item.fpg_tipopagamento === 3 ? \"Crédito\" : \"Débito\"} \r\n \r\n \r\n \r\n \r\n \r\n {item.bce_nomecredenciadora}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.ban_descricao} {item.ban_id} - {item.ban_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Agência: {item.ctc_numeroagencia}\r\n \r\n \r\n \r\n \r\n Conta: {item.ctc_numeroconta}\r\n \r\n \r\n \r\n \r\n \r\n {item.dadosTaxaCartaoCreditoParcela.length === 0 &&\r\n \r\n {item.fpg_tipopagamento === 3 && { calcularTaxaCartao(e, item.bnd_id, item.fpg_tipopagamento) }}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />}\r\n {item.fpg_tipopagamento === 4 && { calcularTaxaCartao(e, item.bnd_id, item.fpg_tipopagamento) }}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />}\r\n \r\n }\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Total Bruto (R$): {FormatNumber(item.totalBruto, true, false)}\r\n \r\n \r\n \r\n \r\n Taxas (R$): {FormatNumber(item.totaltaxas, true, false)}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n Total Líquido (R$):
\r\n {FormatNumber(item.totalBruto - item.totaltaxas, true, false)}\r\n
\r\n
\r\n \r\n
\r\n \r\n {item.dadosTaxaCartaoCreditoParcela.map((taxa) => (\r\n \r\n \r\n Modalidade\r\n Taxa\r\n \r\n \r\n \r\n Parcelado: {taxa.tcp_parcelaminima} a {taxa.tcp_parcelamaxima} vezes\r\n \r\n \r\n {\r\n calculaValores(item.bnd_id, item.fpg_tipopagamento, e.target.value.replace('%', '').replace(',', '.'), taxa);\r\n marcarDesmarcarTodos(null, item.bnd_id, item.fpg_tipopagamento);\r\n }}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n (\r\n
\r\n {moment(rcc_datalancamento).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Previsão de Recebimento',\r\n width: 158,\r\n render: ({ rcc_previsaorecebimento }) => (\r\n
\r\n {moment(rcc_previsaorecebimento).format(\"DD/MM/YYYY\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Série',\r\n render: ({ ser_serie }) => (\r\n
\r\n {ser_serie || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Doc. Fiscal',\r\n render: ({ ntf_numero }) => (\r\n
\r\n {ntf_numero || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Parcela',\r\n width: 65,\r\n align: 'center',\r\n render: ({ rcc_parcelarecebimento, numeroParcelas }) => (\r\n
\r\n {rcc_parcelarecebimento}\r\n {item.fpg_tipopagamento === 3 && /{numeroParcelas}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'NSU',\r\n render: ({ rcc_nsu }) => (\r\n
\r\n {rcc_nsu || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ rcc_valor }) => (\r\n
\r\n {FormatNumber(rcc_valor, true)}\r\n
\r\n ),\r\n },\r\n ]\r\n } rowSelection={{\r\n onChange: (selectedRowKeys) => marcarDesmarcarTodos(selectedRowKeys, item.bnd_id, item.fpg_tipopagamento)\r\n }} scroll={{ x: 900 }} />\r\n {!!item.auxTotalBruto &&\r\n
\r\n \r\n
\r\n \r\n \r\n Total Bruto (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotalBruto, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Tarifas (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotaltaxas, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total Líquido (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotalBruto - item.auxTotaltaxas, true)}\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Modal } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { LancamentoCheque } from \"../../components\";\r\n\r\nexport default function ManutencaoCheque({ form, carregando, aoSalvar }) {\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n api.post(`Cheque/Incluir?IdContaCorrente=${values.ctc_id}`, values.cheques).then(\r\n (retorno) => {\r\n if (retorno) {\r\n Modal.success({\r\n content: 'Cheque incluído com sucesso!',\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n error(erro.response.data.Message, \"Não foi possível incluir o cheque!\");\r\n }\r\n ).finally(() => {\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n };\r\n\r\n return (\r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport ManutencaoCheque from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerCheque() {\r\n\r\n const [formCheque] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) formCheque.setFieldsValue(manutencao.dados);\r\n else {\r\n //formCheque.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formCheque.resetFields();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-chq_dataemissao' } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Form, Select, Button, Dropdown, Menu } from \"antd\";\r\nimport { MoreOutlined, CheckOutlined, FileDoneOutlined, SyncOutlined, BankOutlined, SendOutlined, UserSwitchOutlined, TeamOutlined } from \"@ant-design/icons\";\r\n\r\nimport DrawerCheque from './drawer';\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalOcorrenciaCheque } from \"../../components/modals/\";\r\nimport { BreadcrumbIncluirDados, FiltroSearch, FiltroOrdenacao, TabelaDados } from \"../../components\";\r\n\r\nexport default function Cheque() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const [openModalOcorrencia, setOpenModalOcorrencia] = useState(false);\r\n const [statusCheque, setStatusCheque] = useState([]);\r\n const [dadosCheque, setDadosCheque] = useState({});\r\n const [ocorrencia, setOcorrencia] = useState(null);\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-chq_dataemissao' } });\r\n\r\n api.get(`Enum/Listar?nome=StatusCheque`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setStatusCheque(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n {dados.chq_status !== 0 &&\r\n < Menu.Item key=\"1\">\r\n \r\n \r\n }\r\n {dados.chq_status === 0 &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 1 || dados.chq_status === 7) &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 1 || dados.chq_status === 7) &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 6) &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 0 || dados.chq_status === 6) &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 0 || dados.chq_status === 6) &&\r\n \r\n \r\n \r\n }\r\n {(dados.chq_status === 0) &&\r\n \r\n \r\n \r\n }\r\n \r\n )\r\n };\r\n\r\n function filtrarStatusCheque(status) {\r\n if (typeof status != 'undefined') dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&status=${status}` } });\r\n else dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '' } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {chq_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Banco',\r\n render: ({ ban_id, ban_descricao, chq_agencia, chq_contacorrente, banco }) => (\r\n
\r\n \r\n
\r\n {banco.ban_descricao}{ban_id} - {banco.ban_descricao}\r\n \r\n \r\n \r\n \r\n Agência: {chq_agencia}\r\n \r\n \r\n Conta: {chq_contacorrente}\r\n \r\n \r\n \r\n ),\r\n }, {\r\n render: ({ chq_status, pessoa }) => (\r\n
\r\n \r\n
\r\n Cheque Recebido de: {pessoa.pes_nome}\r\n \r\n \r\n {statusCheque.length > 0 &&\r\n \r\n \r\n Situação: {statusCheque[chq_status].value}\r\n \r\n \r\n }\r\n \r\n ),\r\n }, {\r\n title: 'Data',\r\n width: 150,\r\n render: ({ chq_dataemissao, chq_bompara }) => (\r\n
\r\n \r\n
\r\n Emitido em: {moment(chq_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n {!!chq_bompara &&\r\n \r\n \r\n Bom para: {moment(chq_bompara).format('DD/MM/YYYY')}\r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ chq_valor }) => (\r\n
\r\n {FormatNumber(chq_valor, true, false)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n formulario.setFieldsValue({ DataFinal: moment(new Date()) });\r\n formulario.setFieldsValue({ DataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n formulario.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formulario.setFieldsValue({ dataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n aplicarFiltrosAvancados();\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {openPesquisaAvancada ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({cliente.pes_nome})} />\r\n \r\n \r\n \r\n \r\n ( {`${banco.ban_id} - ${banco.ban_descricao}`})} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {ban_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Informações',\r\n render: ({ pes_nome, ser_serie, ntf_numero, prc_numeroparcela, bol_numerodocumento }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n \r\n \r\n Nº Doc.: {bol_numerodocumento}\r\n \r\n \r\n Parcela: {prc_numeroparcela}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Data Emissão',\r\n align: 'center',\r\n render: ({ bol_dataemissao }) => (\r\n
\r\n {moment(bol_dataemissao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Vencimento',\r\n align: 'center',\r\n render: ({ bol_datavencimento }) => (\r\n
\r\n {moment(bol_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ bol_valor }) => (\r\n
\r\n {FormatNumber(bol_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n width: 65,\r\n align: 'center',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n buscarContaCorrente(dados);\r\n }} conteudo={\r\n cc => ({cc.ctc_descricao})\r\n } />\r\n \r\n \r\n \r\n }\r\n disabled={selecionado != true} // Botão desativado quando `selecionado` for falso\r\n onClick={() => {\r\n if (selecionado) { // Apenas executa a ação se `selecionado` for verdadeiro\r\n setParcelaEditar(listaParcelas);\r\n setOpenModalInstrucaoRemessa(true);\r\n }\r\n }} block >\r\n Instrução\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n selecionarTodos(event.target.checked)}\r\n />\r\n
\r\n ),\r\n align: 'center',\r\n width: 25,\r\n render: ({ key, selecionado }) => (\r\n
\r\n selecionarItem(key)}\r\n />\r\n
\r\n ),\r\n },\r\n {\r\n title: \"Cliente\",\r\n width: 190,\r\n render: ({ pes_nome }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: \"Série\",\r\n width: 40,\r\n dataIndex: \"ser_serie\",\r\n render: (ser_serie) => {ser_serie},\r\n },\r\n {\r\n title: \"N.° Doc.\",\r\n width: 50,\r\n dataIndex: \"ntf_numero\",\r\n render: (ntf_numero) => {ntf_numero},\r\n },\r\n {\r\n title: \"Parcela\",\r\n width: 45,\r\n dataIndex: \"prc_numeroparcela\",\r\n render: (prc_numeroparcela) => {prc_numeroparcela},\r\n },\r\n {\r\n title: \"Banco, Data Venc.\",\r\n width: 105,\r\n render: ({ bol_datavencimento, ban_id, ban_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {bol_datavencimento && moment(bol_datavencimento).format(\"DD/MM/YYYY\") !== \"01/01/0001\" ? moment(bol_datavencimento).format(\"DD/MM/YYYY\") : \"\"}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: \"Data Remessa\",\r\n width: 80,\r\n render: ({ rem_datageracao }) => {\r\n const dataFormatada = rem_datageracao ? moment(rem_datageracao).format(\"DD/MM/YYYY\") : \"\";\r\n return
{dataFormatada === \"01/01/0001\" ? \"\" : dataFormatada}
;\r\n },\r\n },\r\n {\r\n title: \"Instrução Remessa\",\r\n width: 125,\r\n render: ({ isp_descricao }) => (\r\n
\r\n {isp_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: \"Valor (R$)\",\r\n align: \"right\",\r\n width: 90,\r\n render: ({ bol_valor }) => (\r\n
\r\n {FormatNumber(bol_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: \"Ações\",\r\n dataIndex: \"\",\r\n key: \"x\",\r\n align: \"center\",\r\n width: 50,\r\n fixed: \"right\",\r\n render: (record) => (\r\n
\r\n \r\n
\r\n }\r\n onClick={() => {\r\n setParcelaEditar(record);\r\n setSelecionado(true);\r\n setOpenModalInstrucaoRemessa(true);\r\n }}\r\n />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]}\r\n scroll={{ x: 900 }}\r\n />\r\n \r\n \r\n setOpenModalInstrucaoRemessa(false)} form={formulario} parcela={parcelaEditar} onOk={salvarInstrucao} selecionado={selecionado} />\r\n setOpenModalGerarRemessa(false)} dadosSelecionados={dadosSelecionados} download={downloadArquivo} />\r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, RedoOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoRemessa from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerRemessa({ listarRemessas }) {\r\n\r\n const [formRemessa] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados) {\r\n formRemessa.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n //formRemessa.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n listarRemessas();\r\n formRemessa.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React from 'react';\r\nimport { Modal } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { manutencaoActions } from '../../actions';\r\nimport { DetalheRemessa } from \"../../components\";\r\n\r\nexport default function ModalDetalheRemessa({ exibirModal, fecharModal, dadosModal }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const onClose = () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharModal();\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Collapse, Button, Tag, Menu, Dropdown } from \"antd\";\r\nimport { DownloadOutlined, ArrowUpOutlined, ArrowDownOutlined, SearchOutlined, EyeOutlined, DeleteOutlined, MoreOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Modal } from 'antd';\r\nimport DrawerRemessa from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport ModalDetalheRemessa from \"./modalDetalheRemessa\";\r\nimport { BreadcrumbIncluirDados, TabelaDados, Download, Data, FiltroSearch, ComboData } from \"../../components\";\r\n\r\nexport default function Remessa() {\r\n\r\n const [open, setOpen] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [clientes, setClientes] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const [openModalDetalhes, setOpenModalDetalhes] = useState(false);\r\n const [dadosDetalhesRemessa, setDadosDetalhesRemessa] = useState({});\r\n\r\n useEffect(() => {\r\n api.get(`Cliente/Listar?filtro=&ordem=%2brem_id`).then(\r\n res => {\r\n setClientes(res.data.items);\r\n }).catch(error => {\r\n console.log(error);\r\n })\r\n listarRemessas();\r\n formulario.setFieldsValue({ dataFinal: moment(new Date()), dataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n }, [])\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n function listarRemessas() {\r\n let cliente = !!formulario.getFieldValue().codigoCliente ? formulario.getFieldValue().codigoCliente : 0;\r\n let notaFiscal = !!formulario.getFieldValue().notaFiscal ? formulario.getFieldValue().notaFiscal : 0;\r\n let dataInicial = !!formulario.getFieldValue().dataInicial ? moment(formulario.getFieldValue().dataInicial).format('YYYY-MM-DD') : moment(new Date()).format('YYYY-MM-DD');\r\n let dataFinal = !!formulario.getFieldValue().dataFinal ? moment(formulario.getFieldValue().dataFinal).format('YYYY-MM-DD') : moment(new Date()).format('YYYY-MM-DD');\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataInicial=${dataInicial}&dataFinal=${dataFinal}&IdCliente=${cliente}&IdNota=${notaFiscal}`, ordem: '-rem_id' } });\r\n }\r\n\r\n function downloadArquivo(dados) {\r\n api.post(`RemessaBoleto/DownloadArquivo`, dados).then((retornoRemessa) => {\r\n if (!!retornoRemessa) {\r\n var parts = retornoRemessa.headers['content-type'].split('/');\r\n var filename = parts[0];\r\n var contentType = parts[1];\r\n try {\r\n var blob = new Blob([retornoRemessa.data], { type: contentType });\r\n //verifica se o usuário usa IE\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n window.navigator.msSaveBlob(blob, filename);\r\n } else //se for outro navegador, return 0\r\n {\r\n //Cria a url para o blob\r\n var url = window.URL.createObjectURL(blob);\r\n var linkElement = document.createElement('a');\r\n linkElement.setAttribute('href', url);\r\n linkElement.setAttribute(\"download\", filename);\r\n //Força o download\r\n var clickEvent = new MouseEvent(\"click\", {\r\n \"view\": window,\r\n \"bubbles\": true,\r\n \"cancelable\": false\r\n });\r\n linkElement.dispatchEvent(clickEvent);\r\n }\r\n } catch (ex) {\r\n console.log(ex);\r\n }\r\n }\r\n }).catch(err => {\r\n console.log(err);\r\n });\r\n };\r\n\r\n function menuTableOutros(dados) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n async function visualizarRemessa(dados) {\r\n let retorno = [];\r\n if (!!dados.rem_id) {\r\n retorno = await api.get(`RemessaBoleto/ListarDetalhes?Id=${dados.rem_id}`);\r\n if (retorno.status === 200) {\r\n retorno = retorno.data.items;\r\n setDadosDetalhesRemessa(retorno);\r\n setOpenModalDetalhes(true);\r\n }\r\n }\r\n };\r\n\r\n async function ExcluirRemessa(dados) {\r\n if (!!dados.rem_id) {\r\n Modal.confirm({\r\n title: \"Confirmação\",\r\n content: \"Deseja realmente excluir a remessa?\",\r\n okText: \"Sim\",\r\n cancelText: \"Não\",\r\n onOk: async () => {\r\n try {\r\n await api.delete(`RemessaBoleto/Excluir/${dados.rem_id}`);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+rem_nome' } });\r\n listarRemessas();\r\n } catch (erro) {\r\n console.error(erro); // Opcional: log de erro\r\n }\r\n },\r\n onCancel: () => {\r\n console.log(\"Exclusão cancelada\"); // Opcional: log de cancelamento\r\n },\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n formulario.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formulario.setFieldsValue({ dataInicial: moment(formulario.getFieldValue().dataPesquisa) });\r\n listarRemessas();\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {rem_id}\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: '40%',\r\n render: ({ usu_id, ban_id, ban_descricao }) => (\r\n
\r\n \r\n
\r\n {ban_descricao}\r\n \r\n \r\n Usuário {usu_id}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Nome Arquivo',\r\n width: '20%',\r\n render: ({ rem_nomearquivoremessa }) => (\r\n
\r\n {rem_nomearquivoremessa}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: '8%',\r\n render: ({ rem_datageracao }) => (\r\n
\r\n \r\n {rem_datageracao && moment(rem_datageracao).format('DD/MM/YYYY') !== \"01/01/0001\" ? moment(rem_datageracao).format('DD/MM/YYYY') : \"\"}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Quant.',\r\n align: 'center',\r\n width: '8%',\r\n render: ({ rem_qtdeboletos }) => (\r\n
\r\n {rem_qtdeboletos}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n width: '20%',\r\n render: ({ rem_valortotal }) => (\r\n
\r\n {FormatNumber(rem_valortotal, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '8%',\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n {/*
\r\n } />\r\n */}\r\n \r\n } onClick={() => downloadArquivo(dados)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {\r\n form.setFieldsValue({ ban_id: null });\r\n buscarBancos(dados);\r\n }} conteudo={\r\n ban => ({ban.ban_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n FiltraMotivo(e)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
selecionarTodos(e.target.checked)} />,\r\n align: 'center',\r\n width: 10,\r\n render: (record) => (\r\n selecionarItem(record)}\r\n />\r\n )\r\n },\r\n {\r\n width: 10,\r\n render: (record) =>\r\n {record.ban_descricao},\r\n },\r\n {\r\n width: 60,\r\n title: 'Nº Doc.:',\r\n align: 'center',\r\n render: (record) => {record.bol_numero},\r\n },\r\n {\r\n width: 110,\r\n title: 'Nosso N°:',\r\n align: 'center',\r\n render: (record) => {record.nossoNumero},\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 210,\r\n render: (record) => {record.cliente},\r\n },\r\n {\r\n width: 80,\r\n title: 'Cpf/CNPJ',\r\n align: 'center',\r\n render: (record) => {record.cpfCnpjCliente},\r\n },\r\n {\r\n width: 140,\r\n title: 'Motivo',\r\n render: (record) => {record.ocorrencia},\r\n },\r\n {\r\n width: 45,\r\n title: 'Série',\r\n align: 'center',\r\n render: (record) => {record.ser_serie},\r\n },\r\n {\r\n width: 25,\r\n title: 'Par.',\r\n align: 'center',\r\n render: (record) => {record.par_numeroParcela},\r\n },\r\n {\r\n width: 60,\r\n title: 'Dat. Venc.',\r\n align: 'center',\r\n render: (record) => {moment(record.datavencimento).format('DD/MM/YYYY')}\r\n },\r\n {\r\n width: 70,\r\n title: 'Dat. Mov.',\r\n align: 'center',\r\n render: (record) => {(record.dataPagamento != \"0001-01-01T00:00:00\" && record.dataPagamento != null) ?\r\n moment(record.dataPagamento).format('DD/MM/YYYY') : 'Sem data'}\r\n },\r\n {\r\n width: 80,\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: (record) => {FormatNumber(record.prc_valor, true)},\r\n }\r\n ]}\r\n expandable={{\r\n expandedRowKeys: expandedRowKey ? [expandedRowKey] : [],\r\n onExpand: (expanded, record) => handleExpand(record),\r\n expandedRowRender: (record) => (\r\n
\r\n \r\n
\r\n Descrição Ocorrência: {record.descricaoMotivoOcorrencia}\r\n \r\n \r\n \r\n ),\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { Row, Col, Upload, Button, message, notification, Form } from \"antd\";\r\nimport { CloudUploadOutlined, UploadOutlined, ArrowRightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { BreadcrumbPage } from \"../../components\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\nimport api from \"../../services/api\";\r\nimport { buscarDadosBanco, buscarDadosTabela, buscarDadosTotal, criarBanco, excluirBancoDados, incluirBanco } from \"../../services/webSql\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport RetornoBancarioLista from '../retornoBancarioLista';\r\n\r\nexport default function RetornoBancario() {\r\n\r\n const [arquivoBase64, setArquivoBase64] = useState(\"\");\r\n const [arquivo, setArquivo] = useState(null);\r\n const [form] = Form.useForm();\r\n const [openRetorno, setOpenRetorno] = useState(false);\r\n const [carregando, setCarregando] = useState(false);\r\n const [versionDB, setVersionDB] = useState(1);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosRetorno, setDadosRetorno] = useState([]);\r\n const history = useHistory();\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n showUploadList: false,\r\n maxCount: 1,\r\n disabled: !!arquivo,\r\n beforeUpload(file) {\r\n convertToBase64(file).then(base64 => {\r\n setArquivoBase64(base64.split('base64,')[1]);\r\n setArquivo(file);\r\n });\r\n return false; // Evita upload automático\r\n }\r\n ,\r\n onRemove() {\r\n removerRetorno();\r\n }\r\n };\r\n\r\n const convertToBase64 = (file) => {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n };\r\n\r\n useEffect(()=>{\r\n if(!!arquivoBase64){\r\n validarRetorno();\r\n }\r\n },[arquivoBase64])\r\n\r\n function validarRetorno() {\r\n setCarregando(true);\r\n let base64 = arquivoBase64;\r\n api.post(`RetornoBoleto/ImportarRetorno`, {base64}).then(\r\n res => {\r\n if (res.data && res.data.length > 0) {\r\n setDadosRetorno(res.data);\r\n console.log(res.data);\r\n history.push({\r\n pathname: '/retornobancariolista',\r\n state: { dadosRetorno: res.data, arquivo: arquivo }\r\n });\r\n } else {\r\n notification.error({ description: \"Arquivo sem conteúdo válido!\", message: 'Aviso' });\r\n removerRetorno();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n setCarregando(false);\r\n notification.error({ description: \"Erro ao importar arquivo!\", message:'Aviso' });\r\n removerRetorno();\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n );\r\n };\r\n\r\n function removerRetorno() {\r\n setArquivoBase64(\"\");\r\n setArquivo(null);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n

\r\n \r\n

\r\n

\r\n Arraste o Arquivo de Retorno aqui!\r\n

\r\n \r\n \r\n \r\n {/* \r\n \r\n */}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n \r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Table, Input, Checkbox, Tag, Button, Modal, notification, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, PlusOutlined, ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormGW, Editar, Excluir } from \"../../components\";\r\nimport { getEmpresa, getLocal } from \"../../services/auth\";\r\n\r\nexport default function ManutencaoArmazemEstoque({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaSetor, setListaSetor] = useState([]);\r\n const [exibirAlterarSetor, setExibirAlterarSetor] = useState(false);\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const selecionarOpcao = (record, checked) => {\r\n let setores = [...listaSetor];\r\n setores.filter((setor => (record === setor)))[0].ses_ativo = checked;\r\n setListaSetor(setores);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n buscarSetores();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n //#region alterações setor\r\n\r\n function buscarSetores() {\r\n api.get(`SetorEstoque/ListarPorArmazem?aes_id=${manutencao.dados.aes_id}&codigoLocal=${getLocal()}`).then(\r\n res => {\r\n if (manutencao.dados?.duplicar) {\r\n res.data.forEach(\r\n item => {\r\n item.aes_id = 0;\r\n item.ses_id = 0;\r\n }\r\n );\r\n }\r\n setListaSetor(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n if (manutencao.dados.duplicar) {\r\n formulario.setFieldsValue({ aes_id: 0 });\r\n }\r\n }\r\n )\r\n };\r\n\r\n function incluirSetor() {\r\n let setores = [...listaSetor];\r\n let setor = formulario.getFieldValue().ses_descricaoItem;\r\n if (!!setor) {\r\n let obj = {};\r\n obj.ses_id = 0;\r\n obj.aes_id = formulario.getFieldValue().aes_id;\r\n obj.ses_descricao = setor;\r\n obj.ses_ativo = true;\r\n setores.push(obj);\r\n setListaSetor(setores);\r\n formulario.setFieldsValue({ ses_descricaoItem: null });\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'Informe a descrição do setor' });\r\n return false;\r\n }\r\n };\r\n\r\n function editarSetor(record) {\r\n formulario.setFieldsValue({ ses_id: record.ses_id });\r\n formulario.setFieldsValue({ ses_descricaoItem: record.ses_descricao });\r\n setExibirAlterarSetor(true);\r\n };\r\n\r\n function alterarSetor() {\r\n let setores = [...listaSetor];\r\n setores.filter((setor) => (setor.ses_id === formulario.getFieldValue().ses_id))[0].ses_descricao = formulario.getFieldValue().ses_descricaoItem;\r\n setListaSetor(setores);\r\n cancelarAlteracaoSetor();\r\n };\r\n\r\n function cancelarAlteracaoSetor() {\r\n formulario.setFieldsValue({ id: null });\r\n formulario.setFieldsValue({ ses_descricaoItem: null });\r\n setExibirAlterarSetor(false);\r\n };\r\n\r\n //#endregion\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+aes_descricao' } });\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n let setores = [...listaSetor];\r\n setores = setores.filter((setor) => (setor !== dados));\r\n setListaSetor(setores);\r\n };\r\n\r\n function salvarManutencao(values) {\r\n values.setorestoques = listaSetor;\r\n values.emp_id = getEmpresa();\r\n values.loc_id = getLocal();\r\n\r\n carregando(true);\r\n if (values.aes_id) {\r\n editar(values);\r\n } else {\r\n incluir(values);\r\n };\r\n }\r\n\r\n function editar(values) {\r\n api.put(`ArmazemEstoque/Editar`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Armazém de Estoque foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function incluir(values) {\r\n api.post(`ArmazemEstoque/Incluir`, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Armazém de Estoque foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!exibirAlterarSetor && \r\n \r\n \r\n \r\n }\r\n {exibirAlterarSetor &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n Armazém Ativo?\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} dataSource={listaSetor} columns={\r\n [\r\n {\r\n title: 'Descrição do setor',\r\n render: ({ ses_descricao }) => (\r\n
\r\n {ses_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n render: (record) => (\r\n selecionarOpcao(record, checked)}\r\n >\r\n Ativo\r\n \r\n\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => { editarSetor(dados) }} />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n );\r\n\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Form, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoArmazemEstoque from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerArmazemEstoque() {\r\n\r\n const [formArmazemEstoque] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (!!manutencao.dados){\r\n formArmazemEstoque.setFieldsValue(manutencao.dados);\r\n }\r\n \r\n function fecharDrawer() {\r\n formArmazemEstoque.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerArmazemEstoque from './drawer';\r\nimport { getEmpresa, getLocal } from \"../../services/auth\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar } from \"../../components\";\r\n\r\nexport default function ArmazemEstoque() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n const modalDuplicarDados = (dados) => {\r\n Modal.confirm({\r\n title: 'Duplicar?',\r\n icon: ,\r\n content: `Deseja duplicar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dados.duplicar = true;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+aes_descricao' } })\r\n }, []);\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`ArmazemEstoque/Excluir/${dados.aes_id}`).then(\r\n res => {\r\n notification.success({ description: `Armazém de Estoque excluido com sucesso!`, message: 'Sucesso' });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+aes_descricao' } });\r\n }\r\n ).catch(\r\n erro => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir o Armazém de Estoque ${dados.aes_descricao}`,\r\n icon: ,\r\n content: `Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.put(`ArmazemEstoque/Inativar/${dados.aes_id}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: 'Armazém de Estoque inativado com sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: 'Não foi possivel inativar o Armazém de Estoque' });\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+aes_descricao' } });\r\n }\r\n );\r\n }\r\n });\r\n }\r\n )\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {aes_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Armazém de Estoque',\r\n render: ({ aes_descricao }) => (\r\n
\r\n {aes_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n } onClick={() => { modalDuplicarDados(dados) }} />\r\n \r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandir={({ aes_endereco, aes_numero, aes_bairro }) => {\r\n return (\r\n
\r\n \r\n
\r\n Endereço: {aes_endereco || 'Não Informado'}{(!!aes_numero) ? (', ' + aes_numero) : ''}{!!(aes_bairro) ? (', ' + aes_bairro) : ''}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Row, Col, Typography, Input, Button, Tag, Table } from \"antd\";\r\nimport { SearchOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\n\r\nexport default function OutrasFiliais() {\r\n\r\n const searchInput = useRef();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [filtros, setFiltros] = useState([]);\r\n const [dadosEstoque, setDadosEstoque] = useState([]);\r\n const [dadosEstoqueGeral, setDadosEstoqueGeral] = useState([]);\r\n const [pagina, setPagina] = useState(1);\r\n const [registrosPorPagina, setRegistrosPorPagina] = useState(50);\r\n useEffect(() => {\r\n let items = [];\r\n dadosEstoqueGeral.filter(\r\n (estoque, index) => {\r\n\r\n let retorno = true;\r\n filtros.forEach((filtro, index, array) => {\r\n if (!(estoque[filtro.campo].toLowerCase().indexOf(filtro.valor.toLowerCase()) > -1) && filtro.valor !== '') {\r\n retorno = false;\r\n }\r\n if (index === array.length - 1 && retorno) {\r\n items.push(estoque)\r\n }\r\n\r\n })\r\n if (index === dadosEstoque.length - 1) {\r\n if (items.length > 0 || filtros.length > 0) {\r\n setDadosEstoque(items);\r\n } else {\r\n setDadosEstoque(dadosEstoqueGeral);\r\n }\r\n } else {\r\n setDadosEstoque(dadosEstoqueGeral);\r\n }\r\n }\r\n );\r\n }, [filtros]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n buscarDadosEstoque();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function buscarDadosEstoque() {\r\n api.get(`Estoque/Listar?CodProduto=${manutencao.dados.pro_id}&TipoLista=2`).then(\r\n res => {\r\n if (res.status === 200) {\r\n let sequencia = 1;\r\n res.data.items.forEach(item => {\r\n item.indice = sequencia;\r\n sequencia++;\r\n });\r\n setDadosEstoqueGeral(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosEstoqueGeral && dadosEstoqueGeral.length > 0) {\r\n setDadosEstoque(dadosEstoqueGeral);\r\n }\r\n }, [dadosEstoqueGeral]);\r\n\r\n const getColumnSearchProps = dataIndex => ({\r\n filterDropdown: ({ setSelectedKeys, selectedKeys, clearFilters }) => (\r\n
\r\n \r\n
\r\n setSelectedKeys(e.target.value ? [e.target.value] : [])}\r\n onPressEnter={() => handleSearch(selectedKeys, dataIndex, clearFilters)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n filterIcon: filtered => ,\r\n onFilter: (value, record) =>\r\n record[dataIndex] ? record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()) : '',\r\n onFilterDropdownVisibleChange: visible => {\r\n if (visible) {\r\n setTimeout(() => searchInput.current.focus());\r\n }\r\n },\r\n render: text => text\r\n });\r\n\r\n const handleSearch = (selectedKeys, dataIndex, clearFilters) => {\r\n let listaFiltros = [...filtros];\r\n let indice = listaFiltros.findIndex(f => f.campo === dataIndex);\r\n if (indice < 0) {\r\n listaFiltros.push({ campo: dataIndex, valor: selectedKeys[0], clearFilters });\r\n } else {\r\n listaFiltros[indice].valor = selectedKeys[0];\r\n }\r\n setFiltros(listaFiltros);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n A lista abaixo está sendo filtrada por:\r\n \r\n \r\n \r\n {filtros.map((_filtro, indice) => (\r\n {\r\n filtros[indice].clearFilters();\r\n let _filtros = [...filtros];\r\n _filtros.splice(indice, 1);\r\n setFiltros(_filtros);\r\n }}>\r\n {`${_filtro.valor}`}\r\n \r\n ))}\r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {loc_codigo}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n ...getColumnSearchProps('loc_descricao'),\r\n render: ({ loc_descricao }) => (\r\n
\r\n {loc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Quantidade',\r\n align: 'center',\r\n width: 120,\r\n render: ({ pre_qtde }) => (\r\n
\r\n {pre_qtde}\r\n
\r\n ),\r\n },\r\n ]} dataSource={dadosEstoque} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { Row, Col, Typography, Input, Button, Tag, Table } from \"antd\";\r\nimport { SearchOutlined } from \"@ant-design/icons\";\r\n\r\nimport { TabelaDados } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function Armazem({ idProduto }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const searchInput = useRef();\r\n const [listaArmazens, setListaArmazens] = useState([]);\r\n const [filtros, setFiltros] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!idProduto)\r\n carregarDados(idProduto);\r\n }, [idProduto])\r\n\r\n useEffect(() => {\r\n console.log('Busca do Servidor com os Filtros: ', filtros);\r\n }, [filtros])\r\n\r\n function carregarDados(id) {\r\n api.get(`ArmazemEstoque/ListarArmazensProduto?idProduto=${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setListaArmazens(res.data);\r\n }\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n O Produto está nos seguintes armazéns:\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {aes_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Quantidade',\r\n align: 'center',\r\n width: 150,\r\n render: ({ pre_qtde }) => (\r\n
\r\n {pre_qtde}\r\n
\r\n ),\r\n }\r\n ]}\r\n dataSource={listaArmazens}\r\n />\r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Button, Tag, Drawer, Input, Checkbox } from \"antd\";\r\nimport { HomeOutlined, EyeOutlined, ArrowLeftOutlined, HddOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { OutrasFiliais, Armazem } from \"./pages\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { listaTabelaDadosActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbPage, SelectPaginacao, TabelaDados } from \"../../components\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { ModalGradeEstoque } from \"../../components/modals\";\r\n\r\nexport default function Estoque() {\r\n\r\n const [{ listaTabelaDados }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [openOutras, setOpenOutras] = useState(false);\r\n const [openArmazem, setOpenArmazem] = useState(false);\r\n const [consultaGeral, setConsultaGeral] = useState(false);\r\n const [listaMarca, setListaMarca] = useState([]);\r\n const [listaGrupo, setListaGrupo] = useState([]);\r\n const [listaSubGrupo, setListaSubGrupo] = useState([]);\r\n const [idProduto, setIdProduto] = useState(null);\r\n const [dadosProdutoGrade, setDadosProdutoGrade] = useState([]);\r\n const [carregando, setCarregando] = useState(false);\r\n const [totalEstoque, setTotalEstoque] = useState(0);\r\n const [totalPedido, setTotalPedido] = useState(0);\r\n const [totalCondicional, setTotalCondicional] = useState(0);\r\n const [totalPrevisoes, setTotalPrevisoes] = useState(0);\r\n const [exibeFooter, setExibeFooter] = useState(false);\r\n const [openModalEstoque, setOpenModalEstoque] = useState(false);\r\n const showDrawerOutras = record => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n setOpenOutras(true);\r\n };\r\n\r\n const onCloseOutras = () => {\r\n setOpenOutras(false);\r\n };\r\n\r\n function showDrawerArmazem(id) {\r\n setIdProduto(id);\r\n setOpenArmazem(true);\r\n };\r\n\r\n const onCloseArmazem = () => {\r\n setOpenArmazem(false);\r\n };\r\n\r\n function carregarDados() {\r\n popularDadosMarca();\r\n popularDadosGrupo();\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: form.getFieldValue().ordem } });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!listaTabelaDados.itens && isObjetoDiffVazio(listaTabelaDados.itens)) {\r\n setCarregando(false);\r\n dispatch({ type: listaTabelaDadosActions.CHANGE, data: { itens: null } })\r\n }\r\n\r\n if (consultaGeral) {\r\n // let totalEstoque = 0;\r\n // let totalPedido = 0;\r\n // let totalCondicional = 0;\r\n // let totalPrevisoes = 0;\r\n\r\n if (!!listaTabelaDados.itens) {\r\n // listaTabelaDados.itens.forEach((item) => {\r\n // totalEstoque += parseFloat(item.pre_qtde);\r\n // totalPedido += parseFloat(item.pre_qtdePedido);\r\n // totalCondicional += parseFloat(item.pre_qtdeCondicional);\r\n // totalPrevisoes = totalEstoque - totalPedido - totalCondicional;\r\n // });\r\n // setTotalEstoque(totalEstoque); \r\n // setTotalPedido(totalPedido);\r\n // setTotalCondicional(totalCondicional);\r\n // setTotalPrevisoes(totalPrevisoes);\r\n setTotalEstoque(listaTabelaDados.itens[0].totalEstoque);\r\n setTotalPedido(listaTabelaDados.itens[0].totalPedido);\r\n setTotalCondicional(listaTabelaDados.itens[0].totalCondicional);\r\n setTotalPrevisoes(listaTabelaDados.itens[0].totalPrevisoes);\r\n }\r\n }\r\n }, [listaTabelaDados.itens]);\r\n\r\n function popularDadosMarca() {\r\n api.get('Marca/Listar?Ativa=true&order=+mar_nome').then(\r\n res => {\r\n setListaMarca(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function popularDadosGrupo() {\r\n api.get(`GrupoProduto/Listar?filtro&order=+gru_nome`).then(\r\n res => {\r\n setListaGrupo(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function popularDadosSubGrupo(gru_id) {\r\n api.get(`SubGrupo/Listar?CodigoGrupo=${gru_id}&ordem=+sgp_nome`).then(\r\n res => {\r\n setListaSubGrupo(res.data.items);\r\n form.setFieldsValue({ sgp_id: null });\r\n consultar();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function consultaTodosProd() {\r\n setConsultaGeral(true);\r\n consultar(true);\r\n };\r\n\r\n\r\n function filtro(tpLista = 1) {\r\n let grupo = !!form.getFieldValue().gru_id ? \"&CodGrupo=\" + form.getFieldValue().gru_id : '';\r\n let marca = !!form.getFieldValue().mar_id ? \"&CodMarca=\" + form.getFieldValue().mar_id : '';\r\n let produto = !!form.getFieldValue().pro_id ? \"&CodProduto=\" + form.getFieldValue().pro_id : '';\r\n let subGrupo = !!form.getFieldValue().sgp_id ? \"&CodSubGrupo=\" + form.getFieldValue().sgp_id : '';\r\n let filtroDesc = !!form.getFieldValue().filtro ? \"&filtro=\" + form.getFieldValue().filtro : '';\r\n let filtroTpEstoque = !!form.getFieldValue().tpEstoque ? \"&TpEstoque=\" + form.getFieldValue().tpEstoque : '';\r\n let ativo = !!form.getFieldValue().ativo ? \"&Ativo=\" + form.getFieldValue().ativo : '';\r\n let fil = `${filtroDesc + grupo + marca + produto + subGrupo + filtroTpEstoque + ativo + \"&TipoLista=\" + tpLista + \"&SomenteProduto=true\"}`;\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: fil, filtro: '', ordem: '+pro_descricao' } });\r\n }\r\n\r\n function consultar() {\r\n filtro();\r\n };\r\n\r\n function buscarProduto() {\r\n filtro(3);\r\n };\r\n\r\n function listarGrades(record) {\r\n setDadosProdutoGrade(record);\r\n setOpenModalEstoque(true);\r\n };\r\n\r\n function pesqProdutoUnico() {\r\n setConsultaGeral(false);\r\n };\r\n\r\n function onChangeOrdem(val) {\r\n if (consultaGeral) {\r\n consultar(val);\r\n } else {\r\n buscarProduto();\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: form.getFieldValue().ordem } });\r\n }\r\n\r\n //onChangeAtivos\r\n function onChangeAtivos(val) {\r\n if (consultaGeral) {\r\n consultar(val);\r\n } else {\r\n buscarProduto();\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: form.getFieldValue().ordem } });\r\n }\r\n\r\n function mostrarFooter() {\r\n setExibeFooter(!exibeFooter);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {\r\n
\r\n
\r\n \r\n
\r\n {!consultaGeral &&\r\n \r\n { buscarProduto(value) }}\r\n conteudo={\r\n pro => (\r\n {pro.pro_codigo} - {pro.pro_descricao}
\r\n {!!pro.pro_ean ? 'EAN/GTIN:' + pro.pro_ean : ''}\r\n {!!pro.pro_ean && !!pro.prg_id ?
: ''}\r\n {!!pro.prg_id ? 'Grade: ' + pro.descricaograde : ''}\r\n
)\r\n } />\r\n
}\r\n {consultaGeral && \r\n { consultar() }} />\r\n }\r\n \r\n {consultaGeral && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n consultar()}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n \r\n {!!!consultaGeral &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!!consultaGeral &&\r\n <>\r\n \r\n \r\n { consultar() }}\r\n conteudo={mar => (\r\n {mar.mar_nome}\r\n )} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { mostrarFooter() }}>Exibir Totais\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n
\r\n (\r\n
\r\n \r\n {pro_codigo}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n width: 400,\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'EAN',\r\n width: 100,\r\n render: ({ pro_ean, possuiGrade }, record) => (\r\n
\r\n \r\n
\r\n {!possuiGrade ?\r\n {pro_ean || 'Não Informado'}\r\n : ''}\r\n \r\n \r\n {possuiGrade ?\r\n : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Preço (R$)',\r\n align: 'right',\r\n width: 90,\r\n render: ({ precoVendaMinimo, precoVendaMaximo }) => (\r\n
\r\n {parseFloat(precoVendaMaximo) > parseFloat(precoVendaMinimo) ?
\r\n {FormatNumber(precoVendaMinimo, true)} \r\n até {FormatNumber(precoVendaMaximo, true)} \r\n
:
\r\n {FormatNumber(precoVendaMinimo, true)} \r\n
}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Estoque',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pre_qtde }) => (\r\n
\r\n {pre_qtde}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Pedido',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pre_qtdePedido }) => (\r\n
\r\n {pre_qtdePedido}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Condicional',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pre_qtdeCondicional }) => (\r\n
\r\n {pre_qtdeCondicional}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Previsão',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pre_qtde, pre_qtdePedido, pre_qtdeCondicional }) => (\r\n
\r\n {parseFloat(pre_qtde) - parseFloat(pre_qtdePedido) - parseFloat(pre_qtdeCondicional)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Totalizador:\r\n \r\n \r\n \r\n Estoque: \r\n {FormatNumber(totalEstoque, true)}\r\n \r\n \r\n \r\n Pedidos: \r\n {FormatNumber(totalPedido, true)}\r\n \r\n \r\n \r\n Condicionais: \r\n {FormatNumber(totalCondicional, true)}\r\n \r\n \r\n \r\n Previsões: \r\n {FormatNumber(totalPrevisoes, true)}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenModalEstoque(false)} />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Descriptions, Select, Input, InputNumber, Button, Table, Tag, Tooltip } from \"antd\";\r\nimport { ArrowLeftOutlined, BarcodeOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { SelectProduto } from \"../../components\";\r\n\r\nexport default function CustosInventario({ formulario, exibirCustos, setExibirCustos, itensGrade, grade}) {\r\n\r\n const [itemProduto, setItemProduto] = useState(true);\r\n const [carregando, setCarregando] = useState(false);\r\n const [ehFracionado, setEhFracionado] = useState(false);\r\n const [ listaProduto, setListaProduto] = useState();\r\n\r\n const togglePesquisa = () => {\r\n resetarCampos();\r\n setItemProduto(!itemProduto);\r\n };\r\n\r\n const custoMedio = {\r\n title: 'Custo Médio (R$)',\r\n align: 'right',\r\n width: 140,\r\n render: ({ prg_id, pre_valorcustomedio }) => (\r\n
\r\n \r\n
\r\n )\r\n };\r\n\r\n const custoComIcms = {\r\n title: 'Custo com ICMS (R$)',\r\n align: 'right',\r\n width: 140,\r\n render: ({ prg_id, pre_valorcustocomicms }) => (\r\n
\r\n \r\n
\r\n )\r\n };\r\n\r\n const custoSemIcms = {\r\n title: 'Custo sem ICMS (R$)',\r\n align: 'right',\r\n width: 140,\r\n render: ({ prg_id, pre_valorcustosemicms }) => (\r\n
\r\n \r\n
\r\n )\r\n };\r\n\r\n const custoUltimaCompra = {\r\n title: 'Custo Ultima Compra (R$)',\r\n align: 'right',\r\n width: 140,\r\n render: ({ prg_id, pre_valorcustoultimacompra }) => (\r\n
\r\n \r\n
\r\n )\r\n };\r\n\r\n useEffect(() => {\r\n setListaProduto();\r\n }, []);\r\n\r\n function resetarCampos() {\r\n let custoMedio = !!formulario.getFieldValue().customedio;\r\n let custoComIcms = !!formulario.getFieldValue().custocomicms;\r\n let custoSemIcms = !!formulario.getFieldValue().custosemicms;\r\n let custoUltimaCompra = !!formulario.getFieldValue().custoultimacompra;\r\n let dataPosicao = formulario.getFieldValue().pre_dataposicao;\r\n formulario.resetFields();\r\n itensGrade.setItensGrade([]);\r\n grade.setPossuiGrade(false);\r\n formulario.setFieldsValue({ customedio: custoMedio, custocomicms: custoComIcms, custosemicms: custoSemIcms, custoultimacompra: custoUltimaCompra, pre_dataposicao: moment(dataPosicao) });\r\n }\r\n\r\n async function onChangeProCodigo() {\r\n if (!!formulario.getFieldValue().pro_codigo) {\r\n let produto = await (await api.get(`Produto/ListaProdutoFiltro?filtro=${formulario.getFieldValue().pro_codigo}`)).data.items[0];\r\n //substituido lista por uma busca direta, ja que a listaProduto sempre vinha vazia.\r\n // let produto = listaProduto.filter(\r\n // (produto) => (produto.pro_ean === formulario.getFieldValue().pro_codigo))[0];\r\n if (!!produto && !!produto.pro_id) {\r\n validarProduto(produto.pro_id);\r\n }\r\n }\r\n };\r\n\r\n function validarProduto(idProduto) {\r\n grade.setPossuiGrade(false);\r\n validarEstoqueProduto(idProduto);\r\n setCarregando(true);\r\n };\r\n\r\n function validarEstoqueProduto(idProduto) {\r\n api.get(`Inventario/ListarProdutoCodigoDTO?CodigoProduto=${idProduto}`).then(\r\n res => {\r\n if (!!res.data && JSON.stringify(res.data) !== `{}`) {\r\n let dados = res.data[0];\r\n dados.pro_codigo = formulario.getFieldValue().pro_codigo;\r\n dados.pre_justificativa = \"Registro incluído pelo usuário para manutenção do saldo\";\r\n dados.pre_dataposicao = formulario.getFieldValue().pre_dataposicao;\r\n setEhFracionado(dados.ump_casasdecimais > 0);\r\n formulario.setFieldsValue(dados);\r\n formulario.setFieldsValue({pre_qtde: dados.pre_qtde});\r\n formulario.setFieldsValue({pro_id: dados.pro_id});\r\n validarGradeProduto(idProduto);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n });\r\n };\r\n\r\n function validarGradeProduto(produtoId) {\r\n api.get(`ProdutoGrade/ListarGradesProdutos?codigoProduto=${produtoId}&order=-mgp_id`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.length > 0) {\r\n grade.setPossuiGrade(true);\r\n res.data.forEach((dados) => {\r\n formulario.setFieldsValue({ [dados.prg_id + 'gradeCustoMedio']: dados.pre_valorcustomedio })\r\n formulario.setFieldsValue({ [dados.prg_id + 'gradeCustoComIcms']: dados.pre_custocomicms })\r\n formulario.setFieldsValue({ [dados.prg_id + 'gradeCustoSemIcms']: dados.pre_custosemicms })\r\n formulario.setFieldsValue({ [dados.prg_id + 'gradeCustoUltimaCompra']: dados.pre_custoultimacompra })\r\n formulario.setFieldsValue({ [dados.prg_id + 'pre_qtde']: dados.pre_qtde })\r\n });\r\n itensGrade.setItensGrade(res.data);\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularCustoMedioGrade() {\r\n if (grade.possuiGrade) {\r\n if (!!formulario.getFieldValue().pre_valorcustomedio && parseFloat(formulario.getFieldValue().pre_valorcustomedio) > 0) {\r\n itensGrade.itensGrade.forEach((item) => {\r\n let campo = item.prg_id + 'gradeCustoMedio';\r\n formulario.setFieldsValue({\r\n [campo]: parseFloat(formulario.getFieldValue().pre_valorcustomedio)\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n function popularCustoComIcmsGrade() {\r\n if (grade.possuiGrade) {\r\n if (!!formulario.getFieldValue().pre_custocomicms && parseFloat(formulario.getFieldValue().pre_custocomicms) > 0) {\r\n itensGrade.itensGrade.forEach((item) => {\r\n let campo = item.prg_id + 'gradeCustoComIcms';\r\n formulario.setFieldsValue({\r\n [campo]: parseFloat(formulario.getFieldValue().pre_custocomicms)\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n function popularCustoSemIcmsGrade() {\r\n if (grade.possuiGrade) {\r\n if (!!formulario.getFieldValue().pre_custosemicms && parseFloat(formulario.getFieldValue().pre_custosemicms) > 0) {\r\n itensGrade.itensGrade.forEach((item) => {\r\n let campo = item.prg_id + 'gradeCustoSemIcms';\r\n formulario.setFieldsValue({\r\n [campo]: parseFloat(formulario.getFieldValue().pre_custosemicms)\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n function popularCustoUltimaCompraGrade() {\r\n if (grade.possuiGrade) {\r\n if (!!formulario.getFieldValue().pre_custoultimacompra && parseFloat(formulario.getFieldValue().pre_custoultimacompra) > 0) {\r\n itensGrade.itensGrade.forEach((item) => {\r\n let campo = item.prg_id + 'gradeCustoUltimaCompra';\r\n formulario.setFieldsValue({\r\n [campo]: parseFloat(formulario.getFieldValue().pre_custoultimacompra)\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {exibirCustos &&
\r\n \r\n \r\n
\r\n \r\n \r\n {moment(formulario.getFieldValue().pre_dataposicao).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!itemProduto &&\r\n \r\n \r\n validarProduto(valor)} detalhes={true} placeholder=\"Selecione o Produto\" name=\"pro_id\" form={formulario} ordem={\"pro_descricao\"} /> \r\n \r\n \r\n }\r\n {!!!itemProduto &&\r\n \r\n \r\n onChangeProCodigo()} />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n {ehFracionado ? : }\r\n \r\n \r\n }\r\n {!!formulario.getFieldValue().customedio &&\r\n \r\n { popularCustoMedioGrade() }} />\r\n \r\n }\r\n {!!formulario.getFieldValue().custocomicms &&\r\n \r\n { popularCustoComIcmsGrade() }} />\r\n \r\n }\r\n {!!formulario.getFieldValue().custosemicms &&\r\n \r\n { popularCustoSemIcmsGrade() }} />\r\n \r\n }\r\n {!!formulario.getFieldValue().custoultimacompra &&\r\n \r\n { popularCustoUltimaCompraGrade() }} />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {grade.possuiGrade &&
(\r\n
\r\n \r\n
\r\n \r\n {ean}\r\n \r\n \r\n {atributos.map(atr => (\r\n \r\n {atr.mgp_descricao}\r\n \r\n ))}\r\n \r\n \r\n\r\n )\r\n },\r\n !!formulario.getFieldValue().customedio ? custoMedio :
,\r\n !!formulario.getFieldValue().custocomicms ? custoComIcms :
,\r\n !!formulario.getFieldValue().custosemicms ? custoSemIcms :
,\r\n !!formulario.getFieldValue().custoultimacompra ? custoUltimaCompra :
,\r\n {\r\n title: 'Quantidade',\r\n width: 100,\r\n render: ({ prg_id, qtdEstoque }) => (\r\n \r\n \r\n \r\n )\r\n }]} dataSource={itensGrade.itensGrade} scroll={{ x: 900 }} />}\r\n \r\n }\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Typography, Checkbox, Button, notification, Modal, Input } from \"antd\";\r\nimport { ArrowRightOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment, { min } from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { Data, FormGW } from \"../../components\";\r\nimport { getLocal } from \"../../services/auth\";\r\nimport CustosInventario from './custosInventario';\r\n\r\nexport default function ManutencaoEstoqueInventario({ formulario, carregando, aoSalvar, exibirCustos, setExibirCustos }) {\r\n\r\n const [itensGrade, setItensGrade] = useState([]);\r\n const [possuiGrade, setPossuiGrade] = useState(false);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n const [dataHora, setDataHora] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarData();\r\n }, []);\r\n\r\n function carregarData() {\r\n let dataAtual = moment(new Date());\r\n formulario.setFieldsValue({ pre_dataposicao: dataAtual });\r\n let hora = dataAtual.hours();\r\n let minuto = dataAtual.minutes();\r\n if (hora < 10) hora = '0' + hora;\r\n if (minuto < 10) minuto = '0' + minuto;\r\n formulario.setFieldsValue({ pre_hora: hora + ':' + minuto });\r\n let teste = formulario.getFieldValue().pre_hora;\r\n setDataHora(hora + ':' + minuto);\r\n };\r\n\r\n function modalConfirmacao(values) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Caso já existam registros com data posterior a data ${moment(formulario.getFieldValue().pre_dataposicao).format('DD/MM/YYYY')} eles serão excluídos, deseja continuar?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n salvarManutencao(values);\r\n }\r\n });\r\n };\r\n\r\n function changeExibirCustos() {\r\n if (!!formulario.getFieldValue().customedio || !!formulario.getFieldValue().custocomicms\r\n || !!formulario.getFieldValue().custosemicms || !!formulario.getFieldValue().custoultimacompra) {\r\n if (!!formulario.getFieldValue().pre_dataposicao) {\r\n setExibirCustos(!exibirCustos);\r\n } else {\r\n notification.warning({ description: `Informe a data da posição do inventário`, message: 'Aviso' })\r\n }\r\n } else {\r\n notification.warning({ description: 'Selecione pelo menos um custo para ser informado no inventário!', message: 'Aviso' })\r\n }\r\n };\r\n\r\n function validarValoresInformados(valores) {\r\n let retorno = true;\r\n let campos = [];\r\n if (!!formulario.getFieldValue().customedio && !!!valores.pre_valorcustomedio) {\r\n retorno = false;\r\n campos.push(\"Custo Médio\");\r\n }\r\n if (!!formulario.getFieldValue().custocomicms && !!!valores.pre_custocomicms) {\r\n retorno = false;\r\n campos.push(\"Custo com Icms\");\r\n }\r\n if (!!formulario.getFieldValue().custosemicms && !!!valores.pre_custosemicms) {\r\n retorno = false;\r\n campos.push(\"Custo sem Icms\");\r\n }\r\n if (!!formulario.getFieldValue().custoultimacompra && !!!valores.pre_custoultimacompra) {\r\n retorno = false;\r\n campos.push(\"Custo Ultima Compra\");\r\n }\r\n if (!retorno) {\r\n notification.error({ description: `Os campos: ${campos.join(\",\")} devem possuir valores maiores do que R$ 0,00`, message: \"Aviso\" });\r\n }\r\n return retorno;\r\n };\r\n\r\n function salvarManutencao(valores) {\r\n valores.pro_id = formulario.getFieldValue().pro_id;\r\n let teste = formulario.getFieldValue().pre_hora;\r\n let dados = {};\r\n let dadosItens = {};\r\n let listaInventario = [];\r\n let dataHoraPosicao = moment(formulario.getFieldValue().pre_dataposicao);\r\n let horas = '00';\r\n let minutos = '00';\r\n if (!!moment(formulario.getFieldValue().pre_hora) || !!moment(dataHora) ) {\r\n horas = (!!formulario.getFieldValue().pre_hora ? formulario.getFieldValue().pre_hora : dataHora).substring(0, 2);\r\n minutos = (!!formulario.getFieldValue().pre_hora ? formulario.getFieldValue().pre_hora : dataHora).substring(3, 5);\r\n }\r\n dataHoraPosicao.set(\"hour\", parseInt(horas)); // Setando a hora\r\n dataHoraPosicao.set(\"minute\", parseInt(minutos)); // Setando os minutos\r\n \r\n valores.pre_dataposicao = dataHoraPosicao;\r\n\r\n if (!!valores.pro_id) {\r\n carregando(true);\r\n let form = formulario.getFieldValue();\r\n if (!validarValoresInformados(valores)) {\r\n carregando(false);\r\n return;\r\n }\r\n if (itensGrade.length > 0) {\r\n itensGrade.forEach((item) => {\r\n dadosItens = {};\r\n dadosItens.pre_valorcustomedio = !!form[item.prg_id + 'gradeCustoMedio'] ? parseFloat(form[item.prg_id + 'gradeCustoMedio']) : null;\r\n dadosItens.pre_custocomicms = !!form[item.prg_id + 'gradeCustoComIcms'] ? parseFloat(form[item.prg_id + 'gradeCustoComIcms']) : null;\r\n dadosItens.pre_custosemicms = !!form[item.prg_id + 'gradeCustoSemIcms'] ? parseFloat(form[item.prg_id + 'gradeCustoSemIcms']) : null;\r\n dadosItens.pre_custoultimacompra = !!form[item.prg_id + 'gradeCustoUltimaCompra'] ? parseFloat(form[item.prg_id + 'gradeCustoUltimaCompra']) : null;\r\n dadosItens.pre_qtde = form[item.prg_id + 'pre_qtde'];\r\n dadosItens.pre_dataposicao = valores.pre_dataposicao;\r\n dadosItens.pre_justificativa = valores.pre_justificativa;\r\n dadosItens.pro_id = valores.pro_id;\r\n dadosItens.prg_id = item.prg_id;\r\n dadosItens.loc_id = parseInt(getLocal());\r\n listaInventario.push(dadosItens);\r\n });\r\n } else {\r\n dadosItens.pre_custocomicms = !!form.pre_custocomicms ? parseFloat(form.pre_custocomicms) : null;\r\n dadosItens.pre_valorcustomedio = !!form.pre_valorcustomedio ? parseFloat(form.pre_valorcustomedio) : null;\r\n dadosItens.pre_custosemicms = !!form.pre_custosemicms ? parseFloat(form.pre_custosemicms) : null;\r\n dadosItens.pre_custoultimacompra = !!form.pre_custoultimacompra ? parseFloat(form.pre_custoultimacompra) : null;\r\n dadosItens.pre_dataposicao = valores.pre_dataposicao;\r\n dadosItens.pre_justificativa = valores.pre_justificativa;\r\n dadosItens.pro_id = valores.pro_id;\r\n dadosItens.prg_id = valores.prg_id;\r\n dadosItens.pre_qtde = valores.pre_qtde;\r\n listaInventario.push(dadosItens);\r\n }\r\n dados.manutencaoInventario = listaInventario;\r\n console.log(\"dados\", dados);\r\n api.post(`Inventario/ManutencaoInventario`, dados).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: 'Inventário adicionado com sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n carregando(false);\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n formulario.resetFields();\r\n carregando(false);\r\n setPossuiGrade(false);\r\n setItensGrade([]);\r\n setExibirCustos(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n notification.warning({ description: 'Favor preencher o formulario!', message: 'Aviso' });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n {!!!exibirCustos &&
\r\n \r\n
\r\n \r\n Utilize este processo para registrar alterações no estoque de algum produto, isto é, alterar a quantidade já existente e que não condiz com o estoque real.\r\n \r\n \r\n \r\n \r\n \r\n \r\n Custo Médio \r\n \r\n \r\n \r\n \r\n Custo Com ICMS \r\n \r\n \r\n \r\n \r\n Custo Sem ICMS \r\n \r\n \r\n \r\n \r\n Custo Última Compra \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions } from '../../actions';\r\nimport ManutencaoEstoqueInventario from './manutencao';\r\n\r\nexport default function DrawerEstoque() {\r\n\r\n const [formEstoqueInventario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [exibirCustos, setExibirCustos] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formEstoqueInventario.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formEstoqueInventario.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formEstoqueInventario.resetFields();\r\n setExibirCustos(false);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={() => { fecharDrawer() }}\r\n footer={\r\n
\r\n {!exibirCustos &&\r\n \r\n
\r\n \r\n \r\n }\r\n {exibirCustos &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Button, Tag, InputNumber, Tooltip } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined } from \"@ant-design/icons\";\r\nimport { FormGW, InputPreco, SelectProduto } from \"../../components\";\r\n\r\nimport DrawerEstoque from './drawer';\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions } from '../../actions';\r\nimport { BreadcrumbPage, TabelaDados, BotaoIncluirDados } from \"../../components\";\r\n\r\nexport default function EstoqueManutencao() {\r\n\r\n const [{ listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [filtroProd, setFiltroProd] = useState('');\r\n const [itemProduto, setItemProduto] = useState(true);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n const [form] = Form.useForm();\r\n const [listaSelect, setListaSelect] = useState([]);\r\n const [atualizarListaProd, setAtualizarListaProd] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n setItemProduto(!itemProduto);\r\n };\r\n\r\n useEffect(() => {\r\n if (!!filtroProd) {\r\n setFiltroProd('');\r\n setAtualizarListaProd(true);\r\n }\r\n }, [filtroProd]);\r\n\r\n useEffect(() => {\r\n buscarProduto();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (listaSelectPaginacao?.itens.length > 0) {\r\n setListaSelect(listaSelectPaginacao.itens);\r\n }\r\n }, [listaSelectPaginacao?.itens]);\r\n\r\n function buscarProduto() {\r\n api.get(`Produto/ListaProdutoFiltro?&ordem=+pro_descricao`).then(\r\n res => {\r\n let sequencia = 1;\r\n res.data.items.forEach((produto) => {\r\n produto.index = sequencia;\r\n sequencia++;\r\n });\r\n setListaProduto(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function pesquisarInventario() {\r\n let dados = [...listaSelect];\r\n let key = formulario.getFieldValue().pro;\r\n let codProd = \"\";\r\n if (!!key || key == 0) {\r\n let pro = dados.find((item) => item.key === key);\r\n codProd = `&CodigoProduto=${pro.pro_id}`;\r\n }\r\n\r\n let mes = !!form.getFieldValue().inv_mes ? `&mes=${form.getFieldValue().inv_mes}` : ``;\r\n let ano = !!form.getFieldValue().inv_ano ? `&ano=${form.getFieldValue().inv_ano}` : ``;\r\n let parametro = `${mes}${ano}${codProd}`\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: parametro } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '%2Bpro_descricao' } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n { dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } }); }}>\r\n LANÇAMENTO\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!itemProduto &&\r\n \r\n\r\n \r\n { pesquisarInventario(dados) }}\r\n filtroPesq={filtroProd} atualizaComponente={atualizarListaProd} />\r\n \r\n \r\n }\r\n {!!itemProduto === false &&\r\n \r\n \r\n { pesquisarInventario() }} />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Inventário',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'EAN',\r\n width: 180,\r\n render: ({ pro_ean }) => (\r\n
\r\n {pro_ean || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Mês',\r\n width: 80,\r\n align: 'center',\r\n render: ({ mes }) => (\r\n
\r\n {mes}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ano',\r\n width: 80,\r\n align: 'center',\r\n render: ({ ano }) => (\r\n
\r\n {ano}\r\n
\r\n )\r\n },\r\n {\r\n width: 100,\r\n align: 'center',\r\n title: 'Quantidade',\r\n render: ({ pre_qtde }) => (\r\n
\r\n {pre_qtde || '-'}\r\n
\r\n )\r\n },\r\n ]} />\r\n
\r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Table, Tag } from \"antd\";\r\nimport moment from \"moment\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function Log({ dadosItens }) {\r\n\r\n return (\r\n
\r\n
(\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'right',\r\n render: ({ iic_quantidade }) => (\r\n
\r\n {FormatNumber(iic_quantidade, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data/Hora',\r\n align: 'center',\r\n render: ({ iic_datahora }) => (\r\n
\r\n {moment(iic_datahora).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n render: ({ usu_nome }) => (\r\n
\r\n {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Grade',\r\n render: ({ grade }) => (\r\n
\r\n {grade}\r\n
\r\n ),\r\n },\r\n ]} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Input, Modal, notification, Form, Table, Select } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { ModalItemInventario } from \"../../components/modals\";\r\nimport { TabelaDados } from \"../../components\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { useStateValue } from '../../state';\r\nimport moment from \"moment\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\n\r\nexport default function Itens({ form, dadosItens, TipoCodigoProduto, onCloseModalItem }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [dadosTipoCodigo, setDadosTipoCodigo] = useState([]);\r\n const [abrirModalItem, setAbrirModalItem] = useState();\r\n const [dadosRegistro, setDadosRegistro] = useState({});\r\n const [listaItem, setListaItem] = useState([]);\r\n const [filtro, setFiltro] = useState(0);\r\n\r\n const onCloseModal = () => {\r\n setAbrirModalItem(false);\r\n onCloseModalItem();\r\n };\r\n const [situacao] = useState({\r\n 0: 'Falta',\r\n 1: 'Ok',\r\n 2: 'Sobra'\r\n });\r\n\r\n useEffect(() => {\r\n carregarTipoCodigo();\r\n }, []);\r\n\r\n\r\n function carregarTipoCodigo() {\r\n api.get('Enum/Listar?nome=TipoCodigoProdutoUtilizar').then(\r\n res => {\r\n setDadosTipoCodigo(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function defineFiltro(valor) {\r\n setFiltro(valor);\r\n };\r\n\r\n const verificaSituacao = record => {\r\n let retorno = 0;\r\n if (record.ivi_estoqueanterior > record.ivi_estoqueatual) {\r\n retorno = 0;\r\n } else if (record.ivi_estoqueanterior === record.ivi_estoqueatual) {\r\n retorno = 1;\r\n } else if (record.ivi_estoqueanterior < record.ivi_estoqueatual) {\r\n retorno = 2;\r\n }\r\n return retorno;\r\n };\r\n const filtroItens = valor => {\r\n api.get(`Inventario/ListarItens?InventarioId=${form.getFieldValue().inv_id}&Filtro=${valor}&PageSize=100&Order=-ivi_id&PageNumber=1`).then(\r\n\r\n res => {\r\n res.data.items.forEach(item => {\r\n item.situacao_id = verificaSituacao(item);\r\n item.situacao = situacao[verificaSituacao(item)];\r\n });\r\n setListaItem(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosItens.listaDadosItens) {\r\n setListaItem(dadosItens.listaDadosItens);\r\n if (!!form.getFieldValue().pesquisa) {\r\n filtroItens(form.getFieldValue().pesquisa);\r\n }\r\n }\r\n }, [dadosItens.listaDadosItens]);\r\n\r\n function excluirItem(dados) {\r\n Modal.confirm({\r\n title: `Remover produto ${dados.pro_descricao}?`,\r\n icon: ,\r\n onOk() {\r\n api.delete(`Inventario/RemoverItem/${dados.ivi_id}`).then(\r\n res => {\r\n notification.success({ description: 'Item do inventário excluído com sucesso!', message: 'Aviso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n onCloseModalItem();\r\n }\r\n )\r\n }\r\n });\r\n };\r\n return (\r\n
\r\n \r\n {/* Ver para inplementar mais opçoes de filtro, tipo estoque negativos, se custo medio, sem custo atual.... */}\r\n {/*
\r\n \r\n \r\n \r\n */}\r\n \r\n \r\n { filtroItens(valor) }} allowClear />\r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n width: '15%',\r\n fixed: 'left',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Grade',\r\n width: '8%',\r\n render: ({ grade }) => (\r\n
\r\n {grade}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Posição',\r\n align: 'center',\r\n width: '7%',\r\n render: ({ ivi_dataposicao }) => (\r\n
\r\n {ivi_dataposicao ? moment(ivi_dataposicao).format('DD/MM/YYYY HH:mm') : \"\"}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde. Anterior',\r\n align: 'right',\r\n width: '5%',\r\n render: ({ ivi_estoqueanterior }) => (\r\n
\r\n {FormatNumber(ivi_estoqueanterior, true, 3)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde. Atual',\r\n align: 'right',\r\n width: '5%',\r\n render: ({ ivi_estoqueatual }) => (\r\n
\r\n {FormatNumber(ivi_estoqueatual, true, 3)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Custo Médio',\r\n align: 'right',\r\n width: '5%',\r\n render: ({ ivi_customedio }) => (\r\n
\r\n {FormatNumber(ivi_customedio, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Custo Atual',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ ivi_custoultimacompra }) => (\r\n
\r\n {FormatNumber(ivi_custoultimacompra, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Situação',\r\n align: 'center',\r\n width: '5%',\r\n render: ({ situacao_id, situacao }) => (\r\n \r\n {situacao}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: '4%',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {!!inventario.inv_descricao\r\n ? inventario.inv_descricao.length > 50\r\n ? `${inventario.inv_descricao.substring(0, 50)}...`\r\n : inventario.inv_descricao\r\n : ''}\r\n \r\n \r\n \r\n Inventário Nº: {!!inventario.inv_numero ? inventario.inv_numero : null}\r\n \r\n \r\n Iniciado em: {moment(dataAtual).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n \r\n \r\n Responsável: {inventario.usu_nome}\r\n \r\n \r\n Data Base Inventário: {dataAtual ? moment(dataAtual).format(\"DD/MM/YYYY\") : 'Atual'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { config.somLeituraItem = !config.somLeituraItem }}>\r\n Registrar um Item \r\n \r\n \r\n \r\n { config.somErroLeituraItem = !config.somErroLeituraItem }}>\r\n Ocorrer Erro ao Registrar um Item \r\n \r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!produtoPorEAN &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { adicionarItem(valor) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {produtoPorEAN &&\r\n \r\n \r\n \r\n { onChangeProduto(dados) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n \"Totalizadores\" Totalizadores\r\n \r\n Abaixo encontra-se os Totalizadores do seu estoque. \r\n \r\n \r\n \r\n \r\n \r\n {inventario.numeroItens}\r\n \r\n \r\n \r\n \r\n {FormatNumber(inventario.valorEstoque, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(inventario.qtdeEstoque, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(inventario.qtdeEstoqueAnterior, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(inventario.qtdeFalta, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(inventario.qtdeSobra, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Log\r\n \r\n \r\n Itens\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!listaItem === false &&\r\n \r\n \r\n \r\n }\r\n {!!listaItem &&\r\n \r\n \r\n \r\n }\r\n \r\n { setExibirSenha(false); tratarFechamentoModalSenha(dados); }} />\r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { DrawerNav } from '../../components';\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoInventario from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerInventario() {\r\n\r\n const [formInventario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [permiteSalvar, setPermiteSalvar] = useState(false);\r\n\r\n if (!!manutencao.dados) {\r\n formInventario.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n formInventario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-inv_numero' } });\r\n setPermiteSalvar(false);\r\n setCarregando(false);\r\n };\r\n\r\n const onClose = () => {\r\n fecharDrawer();\r\n\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, notification, Modal, Input, Tag, Dropdown, Menu, Checkbox } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, SearchOutlined, ExclamationCircleOutlined, PlusOutlined, SaveOutlined, CloseOutlined, MoreOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from '../../services/api';\r\nimport DrawerInventario from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\nimport { imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbPage, TabelaDados, Data } from \"../../components\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function Inventario() {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [desabilitarBtnNovo, setDesabilitarBtnNovo] = useState(false);\r\n const [openModalInventario, setOpenModalInventario] = useState(false);\r\n const [dadosInventario, setDadosInventario] = useState({});\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-inv_numero' } });\r\n }, []);\r\n\r\n useEffect(() => {\r\n setDesabilitarBtnNovo(validarPermissaoTela(0));\r\n }, []);\r\n\r\n function abrirInventario() {\r\n api.post(`Inventario/Incluir`).then(\r\n res => {\r\n formulario.resetFields();\r\n setDadosInventario(res.data);\r\n setOpenModalInventario(true);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n const modalExcluirInventario = dados => {\r\n Modal.confirm({\r\n title: 'Aviso: deseja excluir este inventario?',\r\n icon: ,\r\n content: `Ao realizar a exclusão de um inventário em andamento você irá remover todos os itens e log de contagem associados. Deseja realmente realizar a exclusão?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirInventario(dados);\r\n }\r\n });\r\n\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function carregarProdInventario(dados) {\r\n setCarregando(true);\r\n let item = {\r\n InventarioId: dados.inv_id,\r\n AtribuirEstoqueAtual: formulario.getFieldsValue().AtribuirEstoqueAtual,\r\n DataBaseEstoque: formulario.getFieldsValue().DataBaseEstoque,\r\n NomeInventario: formulario.getFieldsValue().inv_descricao\r\n }\r\n api.post(`Inventario/CarregarProdutosInventario`, item).then(\r\n res => {\r\n formulario.setFieldsValue({ inv_id: dados.inv_id });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { inv_id: dados.inv_id } } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: false } });\r\n setCarregando(false);\r\n setOpenModalInventario(false);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n setCarregando(false);\r\n }\r\n );\r\n };\r\n function alteraInventario(dados) {\r\n let item = {\r\n inv_id: dados.inv_id,\r\n inv_dataposicao: formulario.getFieldsValue().DataBaseEstoque,\r\n inv_descricao: formulario.getFieldsValue().inv_descricao\r\n }\r\n api.put(`Inventario/Editar`, item).then(\r\n res => {\r\n formulario.setFieldsValue({ inv_id: dadosInventario.inv_id });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { inv_id: dadosInventario.inv_id } } })\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: false } });\r\n setOpenModalInventario(false);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n setCarregando(false);\r\n }\r\n );\r\n }\r\n\r\n function excluirInventario(dados) {\r\n api.delete(`Inventario/Excluir/${dados.inv_id}`).then(\r\n res => {\r\n notification.success({ description: 'Inventário excluído do sistema.', message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response.data.Message) {\r\n notification.warning({ description: erro.response.data.Message, message: 'Aviso' });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-inv_numero' } });\r\n }\r\n );\r\n };\r\n\r\n function pesquisar() {\r\n let sql = \"\";\r\n if (!!formulario.getFieldValue().dataIncFinal && !!formulario.getFieldValue().dataIncInicial && !!formulario.getFieldValue().inventarioPesq) {\r\n sql += `&dataConclusao=${moment(formulario.getFieldValue().dataIncFinal).format('YYYY-MM-DD')}&dataInclusao=${moment(formulario.getFieldValue().dataIncInicial).format('YYYY-MM-DD')}&filtro=${formulario.getFieldValue().inventarioPesq}`\r\n }\r\n if (!!formulario.getFieldValue().inventarioPesq) {\r\n sql += `&filtro=${formulario.getFieldValue().inventarioPesq}`\r\n }\r\n if (!!formulario.getFieldValue().dataIncFinal) {\r\n sql += `&dataConclusao=${moment(formulario.getFieldValue().dataIncFinal).format('YYYY-MM-DD')}`\r\n }\r\n if (!!formulario.getFieldValue().dataIncInicial) {\r\n sql += `&dataInclusao=${moment(formulario.getFieldValue().dataIncInicial).format('YYYY-MM-DD')}`\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: sql, ordem: '-inv_numero' } });\r\n };\r\n\r\n function imprimirInventario(inv_id) {\r\n\r\n imprimirRelatorioJasper(32, { inventarioId: inv_id })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n pesquisar(valor)} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n {inv_numero}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Responsável',\r\n width: 200,\r\n render: ({ usu_nome }) => (\r\n
\r\n {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n width: 200,\r\n render: ({ inv_descricao }) => (\r\n
\r\n {inv_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Posição',\r\n width: 100,\r\n render: ({ inv_dataposicao }) => (\r\n
\r\n {inv_dataposicao ? moment(inv_dataposicao).format(\"DD/MM/YYYY\") : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Incluído em',\r\n width: 100,\r\n render: ({ inv_datainclusao }) => (\r\n
\r\n {moment(inv_datainclusao).format(\"DD/MM/YYYY\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Finalizado em',\r\n width: 100,\r\n render: ({ inv_dataconclusao }) => (\r\n
\r\n {inv_dataconclusao ? moment(inv_dataconclusao).format(\"DD/MM/YYYY\") : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Situação',\r\n width: 150,\r\n render: ({ inv_conclusao }) => (\r\n
\r\n {!!inv_conclusao ? ` Inventário conluído em: ${moment(inv_conclusao).format('DD/MM/YYYY HH:mm:ss')}` : 'Inventário em contagem'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Estoque',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'Atual',\r\n align: 'center',\r\n width: 110,\r\n render: ({ qtdeEstoque }) => (\r\n
\r\n {FormatNumber(qtdeEstoque, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Anterior',\r\n align: 'center',\r\n width: 110,\r\n render: ({ qtdeEstoqueAnterior }) => (\r\n
\r\n {FormatNumber(qtdeEstoqueAnterior, true)}\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'Com Sobra',\r\n align: 'center',\r\n width: 110,\r\n render: ({ qtdeSobra }) => (\r\n
\r\n {FormatNumber(qtdeSobra, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Com Falta',\r\n align: 'center',\r\n width: 110,\r\n render: ({ qtdeFalta }) => (\r\n
\r\n {FormatNumber(qtdeFalta, true)}\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record, { inv_conclusao }) => (\r\n
\r\n \r\n {!!inv_conclusao === false &&
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Estoque como Posição Atual? \r\n \r\n \r\n \r\n \r\n \r\n O Inventário de Nº: {dadosInventario.inv_numero} foi iniciado, deseja pré-carregar seu cadastro de produtos com a quantidade atual em estoque?\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input, Checkbox, Upload, message, Tooltip, Button } from \"antd\";\r\nimport { LoadingOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport ImgCrop from \"antd-img-crop\";\r\nimport { DeleteOutlined } from \"@material-ui/icons\";\r\n\r\nexport default function TabFilial({ imageUrl, setImageUrl }) {\r\n\r\n const [loading, setLoading] = useState(false);\r\n const [hover, setHover] = useState(false);\r\n\r\n function getBase64(img, callback) {\r\n const reader = new FileReader();\r\n reader.addEventListener('load', () => callback(reader.result));\r\n reader.readAsDataURL(img);\r\n }\r\n\r\n function beforeUpload(file) {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n message.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n const isLt2M = file.size / 1024 / 1024 < 2;\r\n if (!isLt2M) {\r\n message.error('A imagem deve ter menos de 2 MB!');\r\n }\r\n return isJpgOrPng && isLt2M;\r\n }\r\n\r\n const handleChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n return;\r\n }\r\n getBase64(info.file.originFileObj, (imageUrl) => {\r\n setLoading(false);\r\n setImageUrl(imageUrl);\r\n });\r\n };\r\n\r\n const borderColor = hover ? \"#004b97\" : \"#d9d9d9\";\r\n const mouseEnter = () => { setHover(true); }\r\n const mouseLeave = () => { setHover(false); }\r\n const removerImagem = () => { setImageUrl(null); }\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
{loading ? 'Carregando...' : 'Selecionar Imagem'}
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Filial\" Filial\r\n \r\n \r\n Adicione as informações referente a Filial.\r\n \r\n \r\n \r\n \r\n \r\n \r\n setImageUrl(null)}\r\n maxCount={1}\r\n disabled={imageUrl}\r\n >\r\n {imageUrl ?\r\n \"avatar\"\r\n : uploadButton}\r\n \r\n \r\n { imageUrl &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Filial Ativa?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input } from \"antd\";\r\nimport { InputCep } from \"../../components\";\r\n\r\nexport default function TabEndereco({ verificaCep }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n Adicione abaixo as informações referente ao endereço.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input, Select, InputNumber, Checkbox, Tooltip } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { Data, InputPhone, InputCpfCnpj } from \"../../components\";\r\nimport { QuestionCircleOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabOutrasInformacoes() {\r\n\r\n const [exigibilidadeIssqn, setExigibilidadeIssqn] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=ExigibilidadeIssqn`).then(res => {\r\n if (res.status === 200) {\r\n setExigibilidadeIssqn(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Outras Outras Informações\r\n \r\n \r\n Adicione abaixo as informações para realizar o cadastro com sucesso.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n Código ANTT\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Incentivo Fiscal ISSQN?\r\n \r\n \r\n \r\n \r\n Substituto Tributário?\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input, Button, notification } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { getIdUsuario } from \"../../services/auth\";\r\nimport { UnlockFilled } from '@ant-design/icons';\r\n\r\nexport default function TabSenhaGerencial(form) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [possuiSenha, setPossuiSenha] = useState(true);\r\n const [Usuario, setUsuario] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n if (!!manutencao.dados.loc_senhagerencial) {\r\n setPossuiSenha(true);\r\n } else {\r\n setPossuiSenha(false);\r\n }\r\n } else {\r\n setPossuiSenha(false);\r\n }\r\n carregarUsuario();\r\n }, [manutencao.dados]);\r\n\r\n function carregarUsuario() {\r\n let userId = parseInt(getIdUsuario());\r\n api.get(`Usuario/RetornaUsuarioId?IdUser=${userId}`).then(\r\n res => {\r\n setUsuario(res.data);\r\n console.log(\"usuario\", res.data);\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n })\r\n };\r\n\r\n function ValidarSenhaGerencial(value) {\r\n if (!!value && !!manutencao.dados.loc_id) {\r\n api.get(`Local/ValidarSenhaGerencial?LocalId=` + manutencao.dados.loc_id + `&SenhaGerencial=` + value).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (res.data == false)\r\n notification.error({ message: 'Atenção', description: \"Senha atual e nova senha não conferem!\" });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n notification.error({ message: 'Atenção', description: \"Não foi possível validar a senha gerencial!\" });\r\n }\r\n );\r\n }\r\n };\r\n\r\n //ta funcionando\r\n function RecuperaSenhaGerencial() {\r\n if (Usuario.usu_admin === true) {\r\n let emailUsuario = Usuario.usu_email;\r\n if (!!emailUsuario) {\r\n api.put(`Usuario/EnviarEmailRecuperarSenhaGerencial/${emailUsuario}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Enviamos um E-mail para você com as instruções para recuperar a senha gerencial!\" })\r\n }\r\n ).catch(\r\n error => {\r\n notification.warning({ message: `AVISO!`, description: `Usuário não encontrado!` });\r\n }\r\n )\r\n }\r\n }\r\n else {\r\n notification.error({ message: 'Atenção', description: \"Usuário não é Administrador\" });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Senha Senha Gerencial\r\n \r\n \r\n A Senha Gerencial é utilizada no Gestor Web para ser utilizada pelos gerentes e supervisores para liberar descontos acima do limite definido, vendas a prazo para clientes com limite de crétido abaixo do necessário, dentre outras operações.\r\n \r\n \r\n \r\n \r\n {possuiSenha && \r\n \r\n { ValidarSenhaGerencial(event.currentTarget.value); }} />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {possuiSenha &&\r\n \r\n }\r\n\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Tabs, Input, Select, Checkbox, Modal, notification } from \"antd\";\r\nimport { ConsoleSqlOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { Data, FormGW, InputCpfCnpj } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { consultaCNPJ, HasValue, isObjetoDiffVazio, validaForm, retornaSoNumeros, retornaCep } from \"../../services/funcoes\";\r\nimport { validarIE } from \"../../services/funcoesIE\";\r\nimport { TabFilial, TabEndereco, TabOutrasInformacoes, TabSenhaGerencial } from \"./tabPage\";\r\nimport { drawerActions, manutencaoActions, listagemActions } from \"../../actions\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nexport default function ManutencaoMatrizFilial({ formulario, carregando, aoSalvar, fechar }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [tipoContribuinte, setTipoContribuinte] = useState([]);\r\n const [tipoAtividade, setTipoAtividade] = useState([]);\r\n const [regimeTributarioFiscal, setRegimeTributarioFiscal] = useState([]);\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [desabilitaCNPJ, setDesabilitaCNPJ] = useState(false);\r\n const [cpfCnpj, setCpfCnpj] = useState(null);\r\n const listaValidacoes = [\r\n { nome: 'loc_cpfCnpj', obrigatorio: true, label: 'CNPJ' },\r\n { nome: 'loc_tipocontribuinte', obrigatorio: true, label: 'Tipo de Contribuinte' },\r\n { nome: 'emp_regimetributario', obrigatorio: true, label: 'Regime Tributário Fiscal' },\r\n { nome: 'loc_descricao', obrigatorio: true, label: 'Nome da Filial' },\r\n { nome: 'cep_cep', obrigatorio: true, label: 'CEP' },\r\n { nome: 'log_logradouro', obrigatorio: true, label: 'Endereço' },\r\n { nome: 'loc_numeroestabelecimento', obrigatorio: true, label: 'Número' },\r\n { nome: 'bai_nome', obrigatorio: true, label: 'Bairro' },\r\n { nome: 'loc_telefone', obrigatorio: true, label: 'Telefone' }\r\n ];\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n if ((!!manutencao.dados?.loc_cnpj?.numero || manutencao.dados?.loc_cpf?.numero) && !!manutencao.dados.loc_id) {\r\n if (!!manutencao.dados.loc_inscricaoestadual.numeroInscricaoEstadual) {\r\n formulario.setFieldsValue({ loc_inscricaoestadual: manutencao.dados.loc_inscricaoestadual.numeroInscricaoEstadual })\r\n } else {\r\n formulario.setFieldsValue({ loc_inscricaoestadual: '' })\r\n }\r\n if (!!manutencao.dados.loc_cnpj.numero || !!manutencao.dados.loc_cpf.numero) {\r\n formulario.setFieldsValue({ loc_cpfCnpj: manutencao.dados.loc_cnpj.numero !== \"\" ? manutencao.dados.loc_cnpj.numero : manutencao.dados.loc_cpf.numero })\r\n }\r\n if (!!manutencao.dados.loc_cpfresponsavel && manutencao.dados.loc_cpfresponsavel.numero) {\r\n formulario.setFieldsValue({ loc_cpfresponsavel: manutencao.dados.loc_cpfresponsavel.numero })\r\n } else {\r\n formulario.setFieldsValue({ loc_cpfresponsavel: '' })\r\n }\r\n formulario.setFieldsValue({ loc_email: manutencao.dados.loc_email.endereco })\r\n formulario.setFieldsValue({ log_logradouro: manutencao.dados.logradouroCidade.logradouro.log_logradouro })\r\n formulario.setFieldsValue({ log_id: manutencao.dados.logradouroCidade.log_id })\r\n formulario.setFieldsValue({ cid_id: manutencao.dados.logradouroCidade.cidade.cid_id })\r\n formulario.setFieldsValue({ est_id: manutencao.dados.logradouroCidade.cidade.estado.est_id })\r\n formulario.setFieldsValue({ est_sigla: manutencao.dados.logradouroCidade.cidade.estado.est_sigla })\r\n formulario.setFieldsValue({ cid_descricao: manutencao.dados.logradouroCidade.cidade.cid_descricao })\r\n formulario.setFieldsValue({ bai_nome: manutencao.dados.logradouroCidade.bairro.bai_nome })\r\n formulario.setFieldsValue({ bai_id: manutencao.dados.logradouroCidade.bairro.bai_id })\r\n formulario.setFieldsValue({ cep_cep: manutencao.dados.logradouroCidade.cep.cep_cep })\r\n formulario.setFieldsValue({ cep_id: manutencao.dados.logradouroCidade.cep.cep_id })\r\n setDesabilitaCNPJ(true);\r\n if (!!manutencao.dados.loc_logo) setImageUrl(\"data:image/jpeg;base64,\" + manutencao.dados.loc_logo);\r\n else setImageUrl(null);\r\n }\r\n buscarCep(manutencao.dados.logradouroCidade.cep.cep_cep);\r\n } else {\r\n formulario.setFieldsValue({ loc_ativo: true })\r\n setDesabilitaCNPJ(false);\r\n }\r\n\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n formulario.setFieldsValue({ emp_regimetributario: res.data.emp_regimetributario })\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, [manutencao.dados, ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=TipoContribuinte`).then(res => {\r\n if (res.status === 200) {\r\n setTipoContribuinte(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=RegimeTributarioFiscal`).then(res => {\r\n if (res.status === 200) {\r\n setRegimeTributarioFiscal(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoAtividade`).then(res => {\r\n if (res.status === 200) {\r\n setTipoAtividade(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n const salvarManutencao = () => {\r\n if (validaForm(formulario, listaValidacoes)) {\r\n carregando(true);\r\n verificaMatriz();\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n function verificaMatriz() {\r\n if (formulario.getFieldValue().loc_matriz) {\r\n api.get(`Local/BuscarLocalCpfCnpj/${formulario.getFieldValue().loc_cpfCnpj}`).then(retornoFilial => {\r\n if (retornoFilial.data.length > 0) {\r\n for (var i = 0; i < retornoFilial.data.length; i++) {\r\n if (retornoFilial.data[i].loc_cnpj.numero !== formulario.getFieldValue().loc_cpfCnpj || retornoFilial.data[i].loc_cpf.numero !== formulario.getFieldValue().loc_cpfCnpj) {\r\n modalAlterarMatriz();\r\n } else {\r\n salvarFilial();\r\n }\r\n }\r\n } else {\r\n salvarFilial(true);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n } else {\r\n salvarFilial();\r\n }\r\n };\r\n\r\n function modalAlterarMatriz() {\r\n Modal.confirm({\r\n title: 'Alterar Matriz',\r\n icon: ,\r\n content: 'Esta empresa já possui um local definido como Matriz, deseja alterar para este local?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n salvarFilial(true);\r\n },\r\n onCancel() {\r\n salvarFilial();\r\n }\r\n });\r\n };\r\n\r\n function salvarFilial(matriz = false) {\r\n let values = { ...formulario.getFieldValue() };\r\n const cpfCnpj = values.loc_cpfCnpj.replace(/\\D/g, '');\r\n values.loc_inscricaoestadual = !!values.loc_inscricaoestadual ? values.loc_inscricaoestadual : '';\r\n values.loc_inscricaoestadual_ufestado = !!values.est_sigla ? values.est_sigla : '';\r\n if (!!values.loc_inscricaoestadual && !validarIE(values.loc_inscricaoestadual, values.loc_inscricaoestadual_ufestado)) {\r\n notification.warning({ message: 'Aviso', description: 'Inscrição Estadual informada é inválida' });\r\n return false;\r\n }\r\n values.alteraMatriz = matriz;\r\n var logo = (imageUrl == null ? \"\" : imageUrl);\r\n if (!!logo) {\r\n values.loc_logo = (logo.split(\",\", 2)[1]);\r\n } else {\r\n values.loc_logo = \"\";\r\n }\r\n if (!(!!values.loc_centrodistribuicao)) {\r\n values.loc_centrodistribuicao = false;\r\n }\r\n if (!!values.loc_senhagerencial) {\r\n if (values.novaSenhaGerencial === '') {\r\n delete values.novaSenhaGerencial;\r\n }\r\n if (values.senhaGerencialAtual === '') {\r\n delete values.senhaGerencialAtual;\r\n }\r\n }\r\n if (cpfCnpj.length === 11) {\r\n values.loc_cpf = cpfCnpj;\r\n values.loc_cnpj = \"\";\r\n } else if (cpfCnpj.length === 14) {\r\n values.loc_cnpj = cpfCnpj;\r\n values.loc_cpf = \"\";\r\n }\r\n delete values.loc_cpfCnpj\r\n\r\n let enderecoUrl = 'local/';\r\n if (values.loc_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Local foram salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response.data) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Local foram salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: err.response.data });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n };\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: 'loc_descricao' } });\r\n };\r\n\r\n function pesquisaInformacoesCep() {\r\n if (!!formulario.getFieldValue().loc_cep) {\r\n let cep = formulario.getFieldValue().loc_cep.replace('-', '');\r\n api.get(`Cidade/ListarCidadeCep?cep=${cep}`).then(retornoCep => {\r\n if (!!retornoCep.data[0]) {\r\n formulario.setFieldsValue({\r\n cid_id: retornoCep.data[0].cid_id,\r\n cep: retornoCep.data[0],\r\n loc_cep: retornoCep.data[0].cep_cep,\r\n cid_descricao: retornoCep.data[0].cid_descricao + \" / \" + retornoCep.data[0].est_sigla,\r\n siglaEstado: retornoCep.data[0].est_sigla\r\n });\r\n } else {\r\n pesquisaCepPostmon(cep, false);\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n };\r\n\r\n function pesquisaCepPostmon(cep, possuiCep) {\r\n fetch(`https://api.postmon.com.br/v1/cep/${cep}`).then(\r\n res => res.json()\r\n ).then(\r\n retornoCep => {\r\n if (!possuiCep) {\r\n formulario.setFieldsValue({\r\n cep: {},\r\n loc_cep: retornoCep.cep,\r\n cid_descricao: retornoCep.cidade,\r\n siglaEstado: retornoCep.estado\r\n });\r\n }\r\n }, erro => {\r\n Modal.warning({\r\n content: `Cep (${cep}) não encontrado!`,\r\n });\r\n formulario.setFieldsValue({\r\n loc_cep: '',\r\n cid_descricao: ''\r\n });\r\n }\r\n );\r\n };\r\n\r\n function validarCpfCnpj(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length !== 14 && cpfCnpj.length !== 11) {\r\n notification.warning({ message: 'Aviso!', description: 'O CPF/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n } else {\r\n verificarLocal(cpfCnpj);\r\n }\r\n }\r\n }\r\n\r\n function verificarLocal(cpfCnpj) {\r\n if (!!cpfCnpj) {\r\n api.get(`Local/BuscarLocalCpfCnpj/${cpfCnpj}`).then(retornoCnpjLocal => {\r\n if (!!retornoCnpjLocal.data) {\r\n Modal.warning({\r\n title: 'Aviso!',\r\n content: \"CPF/CNPJ já cadastrado!\",\r\n onOk() {\r\n formulario.setFieldsValue({ loc_cpfCnpj: \"\" });\r\n }\r\n });\r\n } else {\r\n consultaCNPJ(cpfCnpj).then((retorno) => {\r\n if (retorno.status === \"ERROR\") {\r\n api.get(`Empresa/BuscarDadosNovaEmpresa?cpfCnpj=${cpfCnpj}`).then(retornoCnpj => {\r\n if (retornoCnpj.data.length > 0) {\r\n formulario.setFieldsValue({\r\n loc_inscricaoestadual: retornoCnpj.data[0].pej_inscricaoestadual,\r\n loc_telefone: retornoCnpj.data[0].psc_numero,\r\n loc_descricao: retornoCnpj.data[0].pes_nome,\r\n loc_nomefantasia: retornoCnpj.data[0].pej_nomefantasia,\r\n cep_cep: retornoCnpj.data[0].cep_cep,\r\n cid_descricao: retornoCnpj.data[0].cid_descricao + \" / \" + retornoCnpj.data[0].est_sigla,\r\n loc_numeroestabelecimento: retornoCnpj.data[0].pee_numero,\r\n bai_nome: retornoCnpj.data[0].bai_nome,\r\n loc_complemento: retornoCnpj.data[0].pee_complemento\r\n });\r\n pesquisaInformacoesCep();\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n } else {\r\n formulario.setFieldsValue({\r\n loc_inscricaoestadual: \"\",\r\n loc_telefone: retorno.telefone.replaceAll('(', '').replaceAll(')', '').replaceAll(' ', '').replaceAll('-', ''),\r\n loc_descricao: retorno.nome,\r\n loc_nomefantasia: retorno.fantasia,\r\n cep_cep: retorno.cep.replace('.', '').replace('-', ''),\r\n cid_descricao: retorno.municipio + \" / \" + retorno.uf,\r\n loc_numeroestabelecimento: retorno.numero,\r\n bai_nome: retorno.bairro,\r\n loc_complemento: retorno.complemento,\r\n log_logradouro: retorno.logradouro\r\n });\r\n pesquisaInformacoesCep();\r\n }\r\n }, (erro) => {\r\n console.log('ERRO:', erro);\r\n });\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n };\r\n\r\n async function buscarCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n formulario.setFieldsValue({\r\n cid_descricao: `${retornoCep.cid_descricao} / ${retornoCep.est_sigla}`, est_sigla: retornoCep.est_sigla, cep_id: retornoCep.cep_id\r\n });\r\n } else {\r\n formulario.setFieldsValue({ cep_cep: undefined });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n validarCpfCnpj(valor.currentTarget.value.replace(/\\D/g, ''))}\r\n onChange={(event) => {\r\n setCpfCnpj(event.target.value);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n return { label: item.value, value: item.key, key: item.key }\r\n })} filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} placeholder=\"Selecione o Regime Tributário Fiscal\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n Matriz?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoMatrizFilial from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerMatrizFilial({ listarFiliais }) {\r\n\r\n const [formMatrizFilial] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formMatrizFilial.resetFields();\r\n setCarregando(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n { fecharDrawer();}} fechar={fecharDrawer} />\r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, Button } from \"antd\";\r\nimport { CheckOutlined, EditOutlined, } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerMatrizFilial from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { MaskFormat, FormatFone } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { Editar, TabelaDados, BreadcrumbIncluirDados, PesquisaOrdenacao } from \"../../components\";\r\nimport { Tooltip, notification } from \"antd\";\r\n\r\nexport default function MatrizFilial() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [usuario, setUsuario] = useState(null);\r\n const [localInativo, setLocalInativo] = useState(false);\r\n\r\n useEffect(() => {\r\n const dadosSalvos = localStorage.getItem(\"@GestorWeb-DadosUsuario\");\r\n if (dadosSalvos) {\r\n setUsuario(JSON.parse(dadosSalvos)); // Converte a string de volta para objeto\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: 'loc_descricao' } });\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (usuario) {\r\n VerificaLocal();\r\n }\r\n }, [usuario]);\r\n\r\n async function VerificaLocal() {\r\n let locAtivo = (await api.get('local/BuscarLocal')).data.loc_ativo;\r\n let tipoUsuario = usuario.Suporte;\r\n if (locAtivo == false && tipoUsuario == 'true') {\r\n setLocalInativo(true);\r\n }\r\n };\r\n\r\n async function AtivarLocal() {\r\n let locAtivo = (await api.get('local/AtivarLocal'));\r\n if(locAtivo.data == true){\r\n notification.success({ description: \"Local Ativado com Sucesso! Efetue loguin para que a ativaçao seja aplicada\", message: \"Aviso\" });\r\n setLocalInativo(false);\r\n } else {\r\n notification.error({ message: 'Erro ao ativar local !' });\r\n }\r\n };\r\n\r\n function mascaraIE(iscricaoEstadual, uf) {\r\n if (iscricaoEstadual.toUpperCase() == \"ISENTO\") {\r\n return 'ISENTO';\r\n }\r\n if (uf === 'AC') {\r\n return MaskFormat(iscricaoEstadual, '00.000.000/000-00');\r\n } else if (uf === 'AM' || uf === 'GO' || uf === 'RN') {\r\n return MaskFormat(iscricaoEstadual, '00.000.000-0');\r\n } else if (uf === 'BA') {\r\n return MaskFormat(iscricaoEstadual, '000000-00');\r\n } else if (uf === 'CE' || uf === 'PB' || uf === 'RR') {\r\n return MaskFormat(iscricaoEstadual, '00000000-0');\r\n } else if (uf === 'DF') {\r\n return MaskFormat(iscricaoEstadual, '00000000000-00');\r\n } else if (uf === 'MT') {\r\n return MaskFormat(iscricaoEstadual, '0000000000-0');\r\n } else if (uf === 'MG') {\r\n return MaskFormat(iscricaoEstadual, '000.000.000-0000');\r\n } else if (uf === 'PA') {\r\n return MaskFormat(iscricaoEstadual, '00-000000-0');\r\n } else if (uf === 'PR') {\r\n return MaskFormat(iscricaoEstadual, '00000000-00');\r\n } else if (uf === 'PE') {\r\n return MaskFormat(iscricaoEstadual, '00.0.000.0000000-0');\r\n } else if (uf === 'RJ') {\r\n return MaskFormat(iscricaoEstadual, '00.000.00-0');\r\n } else if (uf === 'RS') {\r\n return MaskFormat(iscricaoEstadual, '000/0000000');\r\n } else if (uf === 'RO') {\r\n return MaskFormat(iscricaoEstadual, '000.00000-0');\r\n } else if (uf === 'SC') {\r\n return MaskFormat(iscricaoEstadual, '000.000.000');\r\n } else if (uf === 'SP') {\r\n return MaskFormat(iscricaoEstadual, '000.000.000.000');\r\n } else if (uf === 'SE') {\r\n return MaskFormat(iscricaoEstadual, '000000000-0');\r\n } else {\r\n return iscricaoEstadual;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {loc_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Filial',\r\n width: '30%',\r\n render: ({ loc_matriz, loc_ativo, loc_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {loc_matriz ? 'Matriz' : 'Filial'}\r\n \r\n \r\n \r\n \r\n {loc_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n render: ({ loc_cnpj, loc_cpf }) => (\r\n
\r\n {loc_cnpj.numero ? MaskFormat(loc_cnpj.numero, '', true) : MaskFormat(loc_cpf.numero, '', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'I.E',\r\n render: ({ loc_inscricaoestadual }) => (\r\n
\r\n {(!!loc_inscricaoestadual.numeroInscricaoEstadual) ? (mascaraIE(loc_inscricaoestadual.numeroInscricaoEstadual, loc_inscricaoestadual.ufEstado)) : 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'I.M',\r\n render: ({ loc_inscricaomunicipal }) => (\r\n
\r\n {(!!loc_inscricaomunicipal) ? (loc_inscricaomunicipal) : 'Não Informada'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n render: ({ loc_telefone }) => (\r\n
\r\n {(!!loc_telefone) ? FormatFone(loc_telefone) : 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={}\r\n />\r\n \r\n {record.loc_ativo === false && \r\n \r\n }\r\n onClick={() => AtivarLocal()}\r\n />\r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n ]} expandir={({ loc_numeroestabelecimento, loc_email, loc_telefone, logradouroCidade }) => {\r\n return (\r\n
\r\n \r\n
\r\n Endereco : {logradouroCidade.logradouro.log_logradouro} {loc_numeroestabelecimento}, {logradouroCidade.bairro.bai_nome}, {logradouroCidade.cidade.cid_descricao}-{logradouroCidade.cidade.estado.est_sigla}\r\n \r\n \r\n Email: {loc_email.endereco}\r\n \r\n \r\n Telefone: {loc_telefone}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Typography, Input, Button, Radio, Divider, message, notification, Modal, Select } from \"antd\";\r\nimport { CloseOutlined, CloudUploadOutlined, ContainerOutlined, SaveOutlined, UploadOutlined, ExclamationCircleOutlined, EyeOutlined, EyeInvisibleOutlined, EyeTwoTone } from \"@ant-design/icons\";\r\nimport Dragger from \"antd/lib/upload/Dragger\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { getLocal, linkApi } from \"../../services/auth\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\nimport { BreadcrumbAbrirChamado } from \"../../components\";\r\n\r\nexport default function ConfiguracaoDFe() {\r\n const [formulario] = Form.useForm();\r\n const [config, setConfig] = useState({});\r\n const [exibeMotivoContingencia, setExibeMotivoContingencia] = useState(false);\r\n const [exibeMotivoContingenciaNFCe, setExibeMotivoContingenciaNFCe] = useState(false);\r\n const [certificadoValido, setCertificadoValido] = useState(false);\r\n const [ambienteEmissao, setAmbienteEmissao] = useState(1);\r\n const [formaEmissaoNormal, setFormaEmissaoNormal] = useState([]);\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!formulario.getFieldValue().lcn_ambienteemissao) {\r\n setAmbienteEmissao(parseInt(formulario.getFieldValue().lcn_ambienteemissao));\r\n }\r\n }, [formulario])\r\n\r\n\r\n // Gerado em https://designer.mocky.io/manage\r\n const props = {\r\n name: 'file',\r\n multiple: false,\r\n action: `${linkApi}LocalConfigNfe/RetornaOk`,\r\n headers: {\r\n authorization: 'authorization-text',\r\n },\r\n onChange(info) {\r\n if (info.file.status !== 'uploading') {\r\n console.log(info.file, info.fileList);\r\n }\r\n if (info.file.status === 'done') {\r\n getBase64(info.file.originFileObj).then(\r\n base64 => {\r\n let dados = { ...config };\r\n dados.conteudo = base64;\r\n dados.nome = info.file.name;\r\n dados.loc_id = getLocal();\r\n setConfig(dados);\r\n message.success(`${info.file.name} arquivo enviado com sucesso.`);\r\n }\r\n );\r\n } else if (info.file.status === 'error') {\r\n message.error(`${info.file.name} falha no envio do arquivo.`);\r\n }\r\n },\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n window.location = '/Home#/'\r\n }\r\n });\r\n };\r\n function salvarConf(valores) {\r\n let dados = { ...valores, ...config };\r\n if (!(!!!config.conteudo) && certificadoValido == false) {\r\n notification.warning({ description: \"Certificado ou senha informada inválido!\", message: \"Aviso\" });\r\n } else {\r\n\r\n let enderecoUrl = 'LocalConfigNfe/';\r\n if (dados.lcn_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, dados).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Configuração do envio de NF-e salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(\r\n () => {\r\n });\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, dados).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Configuração do envio de NF-e salvos com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n }\r\n );\r\n }\r\n }\r\n };\r\n\r\n function carregarDados() {\r\n api.get(`Enum/Listar?nome=FormaRetornoEmissaoNormalSefaz`).then(res => {\r\n setFormaEmissaoNormal(res.data);\r\n });\r\n\r\n api.get(`LocalConfigNfe/Listar`).then(\r\n res => {\r\n if (!!res.data) {\r\n let dados = { ...config };\r\n dados.lcn_validadecertificado = res.data.lcn_validadecertificado;\r\n setAmbienteEmissao(res.data.lcn_ambienteemissao);\r\n if (res.data.lcn_tipoemissao > 1) {\r\n setExibeMotivoContingencia(true);\r\n }\r\n if (res.data.lcn_tipoemissaonfce > 1) {\r\n setExibeMotivoContingenciaNFCe(true);\r\n }\r\n setConfig(dados);\r\n formulario.setFieldsValue(res.data);\r\n } else {\r\n let conf = {};\r\n conf.lcn_ambienteemissao = 2;\r\n conf.lcn_tipoemissao = 1;\r\n setAmbienteEmissao(conf.lcn_ambienteemissao);\r\n\r\n formulario.setFieldsValue(conf);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function consultaStatusSefaz() {\r\n api.get(`Nfe/ConsultaStatus`).then(\r\n res => {\r\n if (res.data) {\r\n if (res.data.retorno.cStat === 107)\r\n notification.success({ message: res.data.retorno.cStat, description: res.data.retorno.xMotivo });\r\n else\r\n notification.warning({ message: res.data.retorno.cStat, description: res.data.retorno.xMotivo });\r\n } else {\r\n notification.warning({ description: \"Erro ao consultar status sefaz !\", message: \"Aviso\" });\r\n }\r\n console.log(\"RES\", res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n if (erro.response?.data) {\r\n notification.warning({ description: (<> Erro ao consultar Status.
{erro.response.data} ), message: \"Aviso\" });\r\n } else {\r\n notification.warning({ description: \"Erro ao consultar Status. Verifique o Certificado.\", message: \"Aviso\" });\r\n }\r\n }\r\n );\r\n };\r\n function validarCertificado() {\r\n if (!!config && JSON.stringify(config) !== '{}') {\r\n let dados = { ...config, ...formulario.getFieldValue() };\r\n api.post(`LocalConfigNfe/RetornaValidadeCertificado`, dados).then(\r\n res => {\r\n if (res.data.validaCnpj) {\r\n setCertificadoValido(true);\r\n dados = { ...config, ...formulario.getFieldValue() };\r\n dados.lcn_validadecertificado = res.data.dataValidade;\r\n setConfig(dados);\r\n } else {\r\n notification.warning({ description: \"CNPJ do certificado não é compativel com o CNPJ do local !\", message: \"Aviso\" });\r\n }\r\n console.log(\"RES\", res.data);\r\n }\r\n\r\n ).catch(\r\n erro => {\r\n if (erro.response?.data) {\r\n notification.warning({ description: (<> Erro ao validar Certificado.
{erro.response.data} ), message: \"Aviso\" });\r\n } else {\r\n notification.warning({ description: \"A senha especificada não está correta.\", message: \"Aviso\" });\r\n }\r\n\r\n }\r\n );\r\n }\r\n };\r\n\r\n const exibeContingencia = tipoEmissao => {\r\n tipoEmissao = tipoEmissao.target.value;\r\n if (tipoEmissao > 1) {\r\n setExibeMotivoContingencia(true);\r\n } else {\r\n setExibeMotivoContingencia(false);\r\n }\r\n };\r\n const exibeContingenciaNFCe = tipoEmissao => {\r\n tipoEmissao = tipoEmissao.target.value;\r\n if (tipoEmissao == 1) {\r\n setExibeMotivoContingenciaNFCe(false);\r\n } else {\r\n setExibeMotivoContingenciaNFCe(true);\r\n }\r\n };\r\n\r\n function trocarAmbiente(event) {\r\n setAmbienteEmissao(event.target.value);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n { trocarAmbiente(value) }}>\r\n Produção\r\n Homologação\r\n \r\n \r\n \r\n {ambienteEmissao === 1 && <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {ambienteEmissao === 2 && <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (exibeContingencia(value))}>\r\n Emissão Normal\r\n Contingência FS-IA\r\n Contingência SCAN\r\n Contingência EPEC\r\n Contingência FS-DA\r\n Contingência SVC-AN\r\n Contingência SVC-RS\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (exibeContingenciaNFCe(value))}>\r\n Emissão Normal\r\n Contingência off-line da NFC-e\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (visible ? : )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Informe Informe os dados do certificado a ser utilizado\r\n \r\n * Caso nenhum certificado seja informado, será utilizado o certificado da Matriz como Padrão! \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {!!!config.conteudo &&
\r\n \r\n
\r\n

\r\n \r\n \r\n

Arraste o certificado digital aqui!

\r\n \r\n \r\n

(o arquivo deve estar no formato .pfx, modelo A1)

\r\n \r\n \r\n \r\n \r\n \r\n {!!config.lcn_validadecertificado &&\r\n Certificado Válido até: {moment(config.lcn_validadecertificado).format('DD/MM/YYYY')}\r\n }\r\n \r\n \r\n }\r\n {!!config.conteudo &&
\r\n \r\n
\r\n

\r\n \r\n \r\n

{config.nome}

\r\n \r\n \r\n {!!config.lcn_validadecertificado &&\r\n Certificado Válido até: {moment(config.lcn_validadecertificado).format('DD/MM/YYYY')}\r\n }\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n { validarCertificado() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { SelectPaginacao } from '../../components';\r\nimport { Form, Row, Col, Input, Button, Tooltip, Select, notification, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, QuestionCircleOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { BreadcrumbAbrirChamado, InputPhone } from \"../../components\";\r\n\r\nexport default function ParametrosLocal() {\r\n const [formulario] = Form.useForm();\r\n const [controleAvisoEstoque, setControleAvisoEstoque] = useState([]);\r\n const [tipoTef, setTipoTef] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n api.get('Enum/Listar?nome=ControleEstoque').then(res => {\r\n if (res.status === 200) {\r\n setControleAvisoEstoque(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n api.get('Enum/Listar?nome=TipoTEF').then(res => {\r\n if (res.status === 200) {\r\n setTipoTef(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n window.location = '/Home#/'\r\n }\r\n });\r\n };\r\n const salvarConf = valores => {\r\n debugger;\r\n let dados = { ...valores };\r\n\r\n api.put('ParametroLocal/Editar', dados).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Parâmetros do Local salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(\r\n () => {\r\n });\r\n };\r\n\r\n function carregarDados() {\r\n api.get(`ParametroLocal/BuscarParametros`).then(\r\n res => {\r\n if (!!res.data) {\r\n debugger;\r\n var parametros = res.data;\r\n parametros.rel_id = res.data.par_relatoriopedido;\r\n formulario.setFieldsValue(parametros);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n % Máximo Desconto\r\n \r\n \r\n \r\n \r\n } placeholder=\"Informe o % desconto máximo \" name=\"par_maximodesconto\" cifrao={false}>\r\n \r\n \r\n \r\n Markup Local\r\n \r\n \r\n \r\n \r\n } placeholder=\"Informe o Markup Padrão\" name=\"par_markupproduto\" cifrao={false}>\r\n \r\n \r\n \r\n ({op.ope_id} - {op.ope_descricao}
\r\n
)\r\n } />\r\n
\r\n \r\n \r\n \r\n Aviso Estoque Insuficiente\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Tipo TEF\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Número WhatsApp\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Menu, Form, Select } from \"antd\";\r\n\r\nimport { listagemActions } from \"../../actions\";\r\nimport { useStateValue } from '../../state';\r\nimport { ModalExibirAcaoUsuario } from \"../../components/modals/\";\r\nimport { FormatDate } from '../../ValueObjects/';\r\nimport { TabelaDados, FiltroOrdenacao, BreadcrumbPage, FiltroSearch, Data } from \"../../components\";\r\nimport { EyeOutlined } from \"@ant-design/icons\";\r\nimport SelectPaginado from '../../components/selectPaginado';\r\nimport moment from \"moment\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function AcaoUsuario() {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [dadosModal, setDadosModal] = useState([]);\r\n const [listaTipoEntidade, setListaTipoEntidade] = useState([]);\r\n const [{ }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ DataInicial: moment(new Date()) });\r\n formulario.setFieldsValue({ DataFinal: moment(new Date()) });\r\n\r\n retornaTipoEntidade();\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '-aco_datahora' } })\r\n }, []);\r\n\r\n function carregarDados() {\r\n let data = `&DataInicial=${FormatDate(formulario.getFieldValue().DataInicial.toDate().toLocaleDateString())}\r\n &DataFinal=${FormatDate(formulario.getFieldValue().DataFinal.toDate().toLocaleDateString())}`\r\n if (formulario.getFieldValue().loc_id)\r\n data += `&CodigoLocal=${formulario.getFieldValue().loc_id}`\r\n if (formulario.getFieldValue().usu_id)\r\n data += `&CodigoUsuario=${formulario.getFieldValue().usu_id}`\r\n if (formulario.getFieldValue().TipoEntidade)\r\n data += `&TipoEntidade=${formulario.getFieldValue().TipoEntidade}`\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: data } });\r\n };\r\n\r\n function menuTableOutros(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n async function visualizar(Id) {\r\n api.get(`acaousuario/Buscar/${Id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setOpenModal(true);\r\n setDadosModal(res);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n \r\n \r\n \r\n };\r\n\r\n\r\n\r\n\r\n function retornaTipoEntidade() {\r\n api.get('Enum/Listar?nome=TipoTabelaAcaoUsuario').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaTipoEntidade(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n carregarDados()}\r\n conteudo={\r\n l => ({l.loc_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n carregarDados()}\r\n conteudo={\r\n u => ({u.usu_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n carregarDados()}\r\n placeholder=\"Tipo Entidade\"\r\n >\r\n {listaTipoEntidade.map((x) => (\r\n {x.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n { carregarDados(value) }} name=\"DataInicial\" label=\"Data Inicial\" />\r\n \r\n \r\n { carregarDados(value) }} name=\"DataFinal\" label=\"Data Final\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n
\r\n (\r\n
\r\n {moment(aco_datahora).format('DD-MM-YYYY HH:mm:ss')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo Ação',\r\n width: 12,\r\n render: ({ aco_tipoacao }) => (\r\n
\r\n
\r\n {aco_tipoacao}\r\n
\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n width: 20,\r\n render: ({ usu_nome }) => (\r\n
\r\n
\r\n {usu_nome}\r\n
\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Titulo',\r\n width: 50,\r\n render: ({ aco_titulo }) => (\r\n
\r\n {aco_titulo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 5,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {pdv_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Nº do Caixa',\r\n width: 105,\r\n align: 'center',\r\n render: ({ pdv_numerocaixa }) => (\r\n
\r\n {(!!pdv_numerocaixa) ? (pdv_numerocaixa) : 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Computador',\r\n render: ({ pdv_nomecomputador }) => (\r\n
\r\n {(!!pdv_nomecomputador) ? (pdv_nomecomputador) : '--'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nº Registro',\r\n render: ({ pdv_registro }) => (\r\n
\r\n {pdv_registro}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 145,\r\n render: ({ pdv_dataregistro }) => (\r\n
\r\n {moment(pdv_dataregistro).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Versão',\r\n width: 145,\r\n render: ({pdv_versaoatualpdv }) => (\r\n
\r\n {pdv_versaoatualpdv}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'PDV Ativo?',\r\n align: 'center',\r\n width: 78,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n ativarDesativarPDV(record)} />\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n IP: {pdv_ipredelocal}\r\n \r\n \r\n Série Fiscal: {(!!ser_id) ? (ser_id) : 'Não Informado'}\r\n \r\n \r\n Registrado por: {usu_nome}\r\n \r\n\r\n \r\n E-mail: {usu_email}\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n { onCloseModalSerie() }} dadosPdv={dadosPdv} setDadosPdv={setDadosPdv} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Input, Table, Button, Typography, Divider, InputNumber, Modal } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, PlusOutlined, ExclamationCircleOutlined, CloseOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function TabRespostas({ formulario, respostas }) {\r\n\r\n const [formResposta] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaSomaSubtrai, setListaSomaSubtrai] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=SomaSubtrai`).then(res => {\r\n if (!!res) {\r\n setListaSomaSubtrai(res.data);\r\n }\r\n });\r\n }, []);\r\n\r\n function editarRegistro(item) {\r\n let itemTemp = { ...item };\r\n if (typeof itemTemp.rlc_somasubtrai === 'object') {\r\n itemTemp.rlc_somasubtrai = itemTemp.rlc_somasubtrai.key;\r\n }\r\n formResposta.setFieldsValue(itemTemp);\r\n }\r\n\r\n function removerRegistro(registro) {\r\n let lista = [...respostas.respostasLimiteCredito];\r\n let index = lista.findIndex(item => item === registro);\r\n\r\n if (index !== -1) {\r\n lista.splice(index, 1);\r\n if (lista.length > 0) {\r\n lista.map((item, indice) => {\r\n if (item.rlc_ordem > registro.rlc_ordem) {\r\n item.rlc_ordem = (item.rlc_ordem !== 1 ? (item.rlc_ordem - 1) : item.rlc_ordem);\r\n }\r\n\r\n if ((indice + 1) === lista.length) {\r\n respostas.setRespostasLimiteCredito(lista);\r\n }\r\n });\r\n } else {\r\n respostas.setRespostasLimiteCredito(lista);\r\n }\r\n }\r\n }\r\n\r\n const adicionarResposta = (values) => {\r\n let listaTemp = [...respostas.respostasLimiteCredito];\r\n if (!!values.rlc_id)\r\n {\r\n let itemEditar = listaTemp.find((item) => (item.rlc_id === values.rlc_id));\r\n itemEditar.rlc_percentual = values.rlc_percentual;\r\n itemEditar.rlc_resposta = values.rlc_resposta;\r\n itemEditar.rlc_somasubtrai = values.rlc_somasubtrai;\r\n }else{\r\n values.rlc_somasubtrai = values.rlc_somasubtrai;\r\n values.rlc_ordem = listaTemp.length + 1;\r\n listaTemp.push(values);\r\n }\r\n respostas.setRespostasLimiteCredito(listaTemp);\r\n formResposta.resetFields();\r\n };\r\n\r\n const modalExcluir = (item) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerRegistro(item);\r\n }\r\n });\r\n };\r\n\r\n function alterarOrdem(ordemAtual, ordemNova){\r\n let listaTemp = [...respostas.respostasLimiteCredito];\r\n let itemAtual = listaTemp.find(item => item.rlc_ordem === ordemAtual);\r\n let itemEditar = listaTemp.find(item => item.rlc_ordem === ordemNova);\r\n itemAtual.rlc_ordem = ordemNova;\r\n itemEditar.rlc_ordem = ordemAtual;\r\n\r\n listaTemp.sort(function (x, y){\r\n return x.rlc_ordem - y.rlc_ordem;\r\n });\r\n \r\n respostas.setRespostasLimiteCredito(listaTemp);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \"Informações Respostas\r\n \r\n \r\n Adicione a resposta aqui.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n \r\n {rlc_ordem !== 1 &&\r\n \r\n \r\n \r\n }\r\n {rlc_ordem !== respostas.respostasLimiteCredito.length &&\r\n \r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ordem',\r\n width: 75,\r\n align: 'center',\r\n render: ({ rlc_ordem }) => (\r\n
\r\n {rlc_ordem}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Resposta',\r\n render: ({ rlc_resposta }) => (\r\n
\r\n {rlc_resposta}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Soma / Subtrai ',\r\n align: 'right',\r\n render: ({ rlc_somasubtrai, rlc_percentual }) => (\r\n
\r\n { (typeof rlc_somasubtrai === 'number')\r\n ?\r\n {listaSomaSubtrai.filter((item) => (item.key === rlc_somasubtrai)).length > 0 ? listaSomaSubtrai.filter((item) => (item.key === rlc_somasubtrai))[0].value : ''} - {rlc_percentual}%\r\n :\r\n {rlc_somasubtrai.value} - {rlc_percentual}%\r\n }\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (item) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Tabs, Input, Select, notification, Button } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport TabRespostas from './tabRespostas';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { getEmpresa } from \"../../services/auth\";\r\nimport { validaForm } from \"../../services/funcoes\";\r\nimport { ArrowRightOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ManutencaoLimiteCreditoCliente({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaTipoResposta, setListaTipoResposta] = useState([]);\r\n const [showRespostas, setShowRespostas] = useState(false);\r\n const [respostasLimiteCredito, setRespostasLimiteCredito] = useState([]);\r\n\r\n useEffect(() => {\r\n setAbaSelecionada(\"1\");\r\n carregarListaTipoResposta();\r\n }, [manutencao.dados])\r\n\r\n function carregarListaTipoResposta() {\r\n api.get(`Enum/Listar?nome=TipoResposta`).then(res => {\r\n if (!!res) {\r\n setListaTipoResposta(res.data);\r\n }\r\n });\r\n\r\n if (!!manutencao.dados) {\r\n tipoResposta(manutencao.dados.qlc_tiporesposta);\r\n setRespostasLimiteCredito(manutencao.dados.respostalimitecreditos.sort((a, b) => a.rlc_ordem - b.rlc_ordem));\r\n } else {\r\n tipoResposta(1);\r\n }\r\n };\r\n\r\n const salvarManutencao = (values) => {\r\n if (respostasLimiteCredito.length === 0 && values.qlc_tiporesposta === 2) {\r\n notification.warning({ message: 'Aviso', description: 'É preciso adicionar pelo menos uma resposta!' });\r\n return;\r\n }\r\n if (validaForm(formulario, listaValidacoes)) {\r\n values.qlc_tiporesposta = listaTipoResposta.find((item) => (item.key === values.qlc_tiporesposta)).key;\r\n values.respostalimitecreditos = respostasLimiteCredito;\r\n\r\n if (!!values.qlc_id) {\r\n editarLimiteCredito(values);\r\n } else {\r\n incluirLimiteCredito(values);\r\n }\r\n }\r\n };\r\n\r\n function incluirLimiteCredito(values) {\r\n carregando(true);\r\n api.post(`QuestaoLimiteCredito/Incluir`, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+qlc_ordem', outrosFiltros: `&codigoEmpresa=${getEmpresa()}` } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function editarLimiteCredito(values) {\r\n carregando(true);\r\n api.put(`QuestaoLimiteCredito/Editar`, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+qlc_ordem', outrosFiltros: `&codigoEmpresa=${getEmpresa()}` } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n const listaValidacoes = [\r\n { nome: 'qlc_questao', obrigatorio: true, label: 'Pergunta' },\r\n { nome: 'qlc_tiporesposta', obrigatorio: true, label: 'Tipo de Resposta' }\r\n ];\r\n\r\n const tipoResposta = (value) => {\r\n if (value === 2) {\r\n setShowRespostas(true);\r\n } else {\r\n setShowRespostas(false);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n verificaCep(event.currentTarget.value)} />\r\n \r\n \r\n \r\n Não sei o CEP \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Card, Button, Form, Input, notification, Alert } from \"antd\";\r\nimport { ArrowLeftOutlined, CheckOutlined, EyeOutlined, ShoppingOutlined, CloudUploadOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { getEmailUsuario } from \"../../services/auth\";\r\nimport { ModalPlano } from \"../../components/modals/\";\r\nimport { compararDatas ,encodeBase64} from \"../../services/funcoes\";\r\n\r\nexport default function Planos() {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [recursosPlano, setRecursosPlano] = useState([]);\r\n const [alterarPlano, setAlterarPlano] = useState(false);\r\n const [listaPlanos, setListaPlanos] = useState([]);\r\n const [planoAtual, setPlanoAtual] = useState({});\r\n const [planoSelecionado, setPlanoSelecionado] = useState({});\r\n const [formAlterarPlano] = Form.useForm();\r\n const [comparaPlano, setComparaPlano] = useState(null);\r\n\r\n useEffect(() => {\r\n listarPlanos();\r\n }, []);\r\n\r\n async function listarPlanos() {\r\n let lista = [];\r\n try {\r\n var planoUsuario = await api.get(`LocalPlano/VerificarStatusPlano`);\r\n setPlanoAtual({ pla_nome: planoUsuario.data.plano.pla_nome, pla_valor: planoUsuario.data.plano.pla_valor, lcp_id: planoUsuario.data.lcp_id, validade: planoUsuario.data.lcp_validadeplano });\r\n\r\n var retornoPlanos = await api.get(`Plano/ListarPlanosAtivos`);\r\n retornoPlanos.data.items.forEach((listaPlano) => {\r\n let plano = listaPlano;\r\n plano.planoUsuario = false;\r\n if (plano.pla_id === planoUsuario.data.plano.pla_id) {\r\n plano.planoUsuario = true;\r\n };\r\n if (plano.pla_nivel >= planoUsuario.data.plano.pla_nivel) {\r\n lista.push(plano);\r\n }\r\n });\r\n lista.forEach((item) => {\r\n item.diferenciais = JSON.parse(item.pla_diferenciais);\r\n });\r\n lista = lista.reverse();\r\n setListaPlanos(lista);\r\n\r\n } catch (erro) {\r\n console.log(erro);\r\n };\r\n };\r\n\r\n async function confirmarMudancaPlano(values) {\r\n try {\r\n var senhaValida = await api.get(`Usuario/ValidaSenhaAtual?email=${getEmailUsuario()}&senha=${encodeBase64(values.senhaUsuario)}`);\r\n if (senhaValida.data != \"\") {\r\n var retornoMudancaPlano = await api.put(`LocalPlano/MudarLocalPlanoUsuario?novoPlano=${planoSelecionado.pla_id}`);\r\n if (retornoMudancaPlano.status == 200) {\r\n notification.success({ message: 'Seu plano foi alterado com sucesso', description: `Bem-vindo ao plano ${planoSelecionado.pla_nome}` });\r\n setAlterarPlano(false);\r\n listarPlanos();\r\n formAlterarPlano.resetFields();\r\n } else {\r\n notification.warning({ message: 'Não foi possível mudar o plano', description: 'Tente mais tarde. Se o problema persistir contate o suporte do Gestor Web.' });\r\n }\r\n } else {\r\n notification.error({ message: 'Senha inválida!', description: 'Verifique a senha informada.' });\r\n }\r\n } catch (erro) {\r\n notification.error({ message: 'Não foi possível mudar o plano', description: 'Tente mais tarde. Se o problema persistir contate o suporte do Gestor Web.' });\r\n };\r\n };\r\n\r\n return (\r\n\r\n
\r\n {!alterarPlano &&\r\n
\r\n \r\n {compararDatas(planoAtual.validade, null, \"<\") &&\r\n
\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n Você possui o Plano:\r\n \r\n \r\n \r\n
\r\n \r\n {planoAtual.pla_nome}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {FormatNumber(planoAtual.pla_valor, true, false)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {listaPlanos.map((plano) => (\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {plano.pla_nome}\r\n \r\n
\r\n \r\n \r\n \r\n {/* \r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {FormatNumber(plano.pla_valor, true, false)}\r\n \r\n */}\r\n \r\n \r\n \r\n \r\n Por CNPJ\r\n \r\n \r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n setOpenModal(false)} recursosPlano={recursosPlano} />\r\n \r\n }\r\n {alterarPlano &&\r\n
\r\n
\r\n \r\n
\r\n \r\n Para confirmar a mudança de plano é necessário informar sua senha.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n\r\n );\r\n}","import React from \"react\";\r\n\r\nimport Planos from \"./planos\";\r\nimport { BreadcrumbAbrirChamado } from \"../../components\";\r\n\r\nexport default function Plano() {\r\n\r\n return (\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Select, Typography, Divider, InputNumber, Radio, Table, Modal, notification } from \"antd\";\r\nimport { DeleteOutlined, PlusOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { getLocal, linkApi } from \"../../services/auth\";\r\nimport { FormGW, Adicionar, Excluir, InputCpfCnpj, InputPercentual } from \"../../components\";\r\nimport { consultaCNPJ, info, validaForm } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoBandeiraCartaoEmpresa({ formulario, carregando, aoSalvar }) {\r\n\r\n const [value, setValue] = useState(1);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [contaCorrente, setContaCorrente] = useState([]);\r\n const [dadosCartao, setDadosCartao] = useState([]);\r\n const [listaTaxasCartao, setListaTaxasCartao] = useState([]);\r\n const [formularioTaxas] = Form.useForm();\r\n\r\n const listaValidacoes = [\r\n { nome: 'bce_cnpjcredenciadora', obrigatorio: true, label: 'CNPJ da Credenciadora' },\r\n { nome: 'ctc_id', obrigatorio: true, label: 'Conta Bancária para Recebimento' }\r\n ];\r\n\r\n useEffect(() => {\r\n api.get(`ContaCorrente/AtivosTipoConta?tipoConta=2&ordem=+ctc_descricao`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setContaCorrente(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (manutencao.dados !== null) {\r\n if (manutencao.dados.taxasCartaoCreditoParcelados.length > 0) {\r\n setValue(2);\r\n let indice = 1;\r\n manutencao.dados.taxasCartaoCreditoParcelados.map((taxa) => {\r\n taxa.key = indice++;\r\n });\r\n setListaTaxasCartao(manutencao.dados.taxasCartaoCreditoParcelados);\r\n } else {\r\n setValue(1);\r\n setListaTaxasCartao([]);\r\n }\r\n if (manutencao.dados.bce_id === null) {\r\n formulario.setFieldsValue({ bce_ativo: true });\r\n }\r\n if (manutencao.dados.ctc_id !== null && contaCorrente.filter((conta) => { return conta.ctc_id === manutencao.dados.ctc_id }).length === 0) {\r\n formulario.setFieldsValue({ ctc_id: manutencao.dados.ctc_descricao });\r\n }\r\n setDadosCartao(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function buscarDadosCNPJ(event) {\r\n let cnpj = event.target.value;\r\n consultaCNPJ(cnpj).then(\r\n res => {\r\n formulario.setFieldsValue({ bce_nomecredenciadora: res.nome });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function adicionarTaxa(values) {\r\n let listaTemp = [...listaTaxasCartao];\r\n if (values.tcp_taxa > 0) {\r\n values.tcp_taxa = parseFloat(values.tcp_taxa) / 100;\r\n values.key = listaTemp.length + 1;\r\n listaTemp.push(values);\r\n setListaTaxasCartao(listaTemp);\r\n } else {\r\n info('Informe a Taxa!');\r\n }\r\n };\r\n\r\n function excluirTaxa(id) {\r\n let lista = [...listaTaxasCartao];\r\n let index = lista.findIndex(i => i.key === id);\r\n lista.splice(index, 1);\r\n setListaTaxasCartao(lista);\r\n };\r\n\r\n function salvarManutencao(values) {\r\n if (validaForm(formulario, listaValidacoes)) {\r\n\r\n if (isNaN(values.ctc_id) && !!dadosCartao.ctc_id) {\r\n values.ctc_id = dadosCartao.ctc_id;\r\n values.ctc_descricao = dadosCartao.ctc_descricao;\r\n } else {\r\n values.ctc_id = parseInt(values.ctc_id);\r\n values.ctc_descricao = contaCorrente.filter((conta) => { return conta.ctc_id === values.ctc_id })[0].ctc_descricao;\r\n }\r\n\r\n if (!!values.bce_taxapadraocredito) {\r\n values.bce_taxapadraocredito = parseFloat(parseFloat(values.bce_taxapadraocredito) / 100);\r\n }\r\n if (!!values.bce_taxapadraodebito) {\r\n values.bce_taxapadraodebito = parseFloat(parseFloat(values.bce_taxapadraodebito) / 100);\r\n }\r\n\r\n values.ban_id = dadosCartao.ban_id;\r\n values.ban_descricao = dadosCartao.ban_descricao;\r\n values.bnd_id = dadosCartao.bnd_id;\r\n values.bnd_nome = dadosCartao.bnd_nome;\r\n values.ctc_digitoverificadoragencia = dadosCartao.ctc_digitoverificadoragencia;\r\n values.ctc_digitoverificadorconta = dadosCartao.ctc_digitoverificadorconta;\r\n values.ctc_numeroagencia = dadosCartao.ctc_numeroagencia;\r\n values.ctc_numeroconta = dadosCartao.ctc_numeroconta;\r\n values.ctc_numeroconta = dadosCartao.ctc_numeroconta;\r\n values.loc_id = getLocal();\r\n values.taxasCartaoCreditoParcelados = (value === 2 ? listaTaxasCartao : []);\r\n\r\n carregando(true);\r\n if (!!values.bce_id) {\r\n editar(values);\r\n } else {\r\n incluir(values);\r\n }\r\n }\r\n };\r\n\r\n function editar(values) {\r\n api.put(`BandeiraCartaoEmpresa/Editar`, values).then(res => {\r\n notification.success({ message: 'Operação concluída!', description: 'Bandeira de Cartão de Crédito salva com sucesso!' });\r\n }).catch(error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: error.response.data.Message });\r\n }).finally(() => {\r\n carregando(false);\r\n setDadosCartao([]);\r\n setListaTaxasCartao([]);\r\n aoSalvar();\r\n })\r\n }\r\n\r\n function incluir(values) {\r\n api.post(`BandeiraCartaoEmpresa/Incluir`, values).then(res => {\r\n notification.success({ message: 'Operação concluída!', description: 'Bandeira de Cartão de Crédito salva com sucesso!' });\r\n }).catch(error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: error.response.data.Message });\r\n }).finally(() => {\r\n carregando(false);\r\n setDadosCartao([]);\r\n setListaTaxasCartao([]);\r\n aoSalvar();\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n {dadosCartao.bnd_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { buscarDadosCNPJ(value) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ativo?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Cartão Cartão de Débito\r\n \r\n \r\n Informações referente a Cartão de Débito.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Cartão Cartão de Crédito\r\n \r\n \r\n Informações referente a Cartão de Crédito.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {value === 1 &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n setValue(e.target.value)} value={value}>\r\n \r\n Taxa Única\r\n \r\n \r\n Taxa Variável por Parcelas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {value === 2 &&\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n } block onClick={() => { formularioTaxas.submit() }}> Adicionar \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n De {tcp_parcelaminima} parcela(s)\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Parcela Máxima',\r\n render: ({ tcp_parcelamaxima }) => (\r\n
\r\n Até {tcp_parcelamaxima} parcela(s)\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Taxa %',\r\n align: 'right',\r\n render: ({ tcp_taxa }) => (\r\n
\r\n {FormatNumber(parseFloat(tcp_taxa) * 100, true, false)}%\r\n
\r\n ),\r\n }, {\r\n title: 'Ações',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n align: 'center',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n excluirTaxa(record.key)} icon={} />\r\n \r\n \r\n \r\n ),\r\n }\r\n ]\r\n } scroll={{ x: 900 }} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n }\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoBandeiraCartaoEmpresa from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerBandeiraCartaoEmpresa({consultar}) {\r\n\r\n const [formBandeiraCartao] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formBandeiraCartao.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formBandeiraCartao.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formBandeiraCartao.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n consultar();\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Button, Divider, Typography, Card, Tooltip, Modal } from \"antd\";\r\nimport { QuestionCircleOutlined, EditOutlined, SettingOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { linkApi } from \"../../services/auth\";\r\nimport DrawerBandeiraCartaoEmpresa from './drawer';\r\nimport { FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { ModalTaxasCartaoCredito } from \"../../components/modals/\";\r\nimport { BreadcrumbAbrirChamado, Editar } from \"../../components\";\r\n\r\nexport default function BandeiraCartaoEmpresa() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [bandeirasCartao, setBandeirasCartao] = useState([]);\r\n const [openModalTaxas, setOpenModalTaxas] = useState(false);\r\n const [dadosTaxaCartao, setDadosTaxaCartao] = useState({});\r\n const [formPesquisa] = Form.useForm();\r\n\r\n useEffect(() => {\r\n consultar();\r\n }, []);\r\n\r\n function consultar() {\r\n let filtro = '';\r\n if (!!formPesquisa.getFieldValue().pesquisa) {\r\n filtro = formPesquisa.getFieldValue().pesquisa;\r\n }\r\n\r\n api.get(`BandeiraCartao/Listar?filtro=${filtro}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setBandeirasCartao(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function ativarBandeiraCartaoEmpresa(cartao) {\r\n cartao.bce_ativo = true;\r\n api.put(`BandeiraCartaoEmpresa/Editar`, cartao).then(res => {\r\n if (res.status === 200) {\r\n Modal.success({\r\n content: 'Bandeira de Cartão de Crédito ativada com sucesso!',\r\n });\r\n }\r\n }, erro => {\r\n Modal.error({\r\n title: \"Não foi possivel ativar a Bandeira de Cartão de Crédito!\",\r\n content: (\r\n
\r\n

{erro.response.data.Message}

\r\n
\r\n )\r\n });\r\n }).finally(() => {\r\n consultar();\r\n });\r\n };\r\n\r\n function abrirModalTaxas(cartao) {\r\n setDadosTaxaCartao(cartao);\r\n setOpenModalTaxas(true);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n Selecione abaixo uma das bandeiras de cartão de crédito.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Pesquisar por\r\n \r\n \r\n \r\n \r\n }>\r\n { consultar() }} placeholder=\"Cartão de crédito, Credenciadora...\" allowClear />\r\n \r\n \r\n \r\n \r\n {bandeirasCartao.map((cartao) => (\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n {cartao.bnd_nome}\r\n \r\n {cartao.bce_id !== null && cartao.bce_ativo &&\r\n
\r\n } onClick={() => {\r\n let dados = { ...cartao };\r\n dados.bce_taxapadraocredito = (parseFloat(dados.bce_taxapadraocredito) * 100).toFixed(2);\r\n dados.bce_taxapadraodebito = (parseFloat(dados.bce_taxapadraodebito) * 100).toFixed(2);\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }}>\r\n Editar\r\n \r\n
\r\n }\r\n \r\n \r\n {cartao.bce_id !== null && cartao.bce_ativo &&\r\n
\r\n
\r\n \r\n
\r\n \r\n Credenciadora: {!!cartao.bce_nomecredenciadora ? cartao.bce_nomecredenciadora : 'Não Informada'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n CNPJ da Credenciadora: {MaskFormat(cartao.bce_cnpjcredenciadora, '', true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Banco: {cartao.ban_descricao}\r\n {cartao.ban_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Ag.: {cartao.ctc_numeroagencia}\r\n \r\n \r\n \r\n \r\n Conta: {cartao.ctc_numeroconta}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n Débito (R$):\r\n \r\n \r\n
\r\n \r\n {FormatNumber((parseFloat(cartao.bce_taxapadraodebito) * 100), true, false)}%\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n {cartao.bce_nrodiasrecebimentodebito} dias\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Crédito (R$):\r\n \r\n {cartao.taxasCartaoCreditoParcelados.length > 0 &&\r\n abrirModalTaxas(cartao)}>\r\n
\r\n Ver Taxas\r\n
\r\n \r\n }{cartao.taxasCartaoCreditoParcelados.length === 0 &&\r\n \r\n
\r\n {FormatNumber((parseFloat(cartao.bce_taxapadraocredito) * 100), true, false)}% \r\n
\r\n \r\n }\r\n \r\n
\r\n \r\n {cartao.bce_nrodiasrecebimentocredito} dias\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {cartao.bce_id === null &&\r\n
\r\n \r\n
\r\n
\r\n \r\n Não configurado!\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n }\r\n {cartao.bce_id !== null && !cartao.bce_ativo &&\r\n
\r\n \r\n
\r\n
\r\n \r\n Bandeira de Cartão INATIVA.\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n {\r\n setOpenModalTaxas(false);\r\n setDadosTaxaCartao({});\r\n }} dadosTaxaCartao={dadosTaxaCartao}/>\r\n \r\n );\r\n}\r\n","import React, { useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input, notification } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputCep } from \"../../components\";\r\nimport { retornaCep } from \"../../services/funcoes\";\r\n\r\nexport default function TabEndereco({ formulario }) {\r\n\r\n const [cidade, setCidade] = useState(null);\r\n\r\n async function verificaCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n setCidade(retornoCep);\r\n formulario.setFieldsValue({\r\n cid_descricao: `${retornoCep.cid_descricao} / ${retornoCep.est_sigla}`,\r\n est_sigla: retornoCep.est_sigla,\r\n cep_id: retornoCep.cep_id\r\n })\r\n } else {\r\n formulario.setFieldsValue({ cep_cep: undefined });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n Adicione abaixo as informações referente ao endereço.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Row, Col, Typography, Divider, Form, Input } from \"antd\";\r\nimport { InputCpfCnpj, InputPhone } from \"../../components\";\r\n\r\nexport default function TabResponsavel({ formulario }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Outras Outras Informações\r\n \r\n \r\n Adicione abaixo as informações para realizar o cadastro com sucesso.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Tabs, Input, Checkbox, notification } from \"antd\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { TabEndereco, TabResponsavel } from \"./tabPage\";\r\nimport { validaForm, validarCpf } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoCentroDistribuicao({ formulario, carregando, aoSalvar, listar }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [filialInexistente, setFilialInexistente] = useState(false);\r\n const [centroCadastrado, setCentroCadastrado] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const listaValidacoes = [\r\n { nome: 'loc_cnpj', obrigatorio: true, label: 'CNPJ' },\r\n { nome: 'loc_descricao', obrigatorio: true, label: 'Nome do Centro de Distribuição' },\r\n { nome: 'cep_cep', obrigatorio: true, label: 'CEP' },\r\n { nome: 'log_logradouro', obrigatorio: true, label: 'Endereço' },\r\n { nome: 'loc_numeroestabelecimento', obrigatorio: true, label: 'Número' },\r\n { nome: 'bai_nome', obrigatorio: true, label: 'Bairro' },\r\n { nome: 'loc_email', obrigatorio: true, label: 'E-mail' },\r\n { nome: 'loc_cpfresponsavel', obrigatorio: true, label: 'CPF do Responsável' }\r\n ];\r\n\r\n const salvarManutencao = () => {\r\n if (filialInexistente) {\r\n notification.warn({ message: 'Atenção!', description: \"Nenhuma Filial com esse CNPJ, O centro de distribuição deve pertencer a uma filial!\" });\r\n return false;\r\n }\r\n if (centroCadastrado) {\r\n notification.warn({ message: 'Atenção!', description: \"Já existe um Centro de Distribuição com esse CNPJ!\" });\r\n return false;\r\n }\r\n\r\n let values = formulario.getFieldValue();\r\n\r\n if (!!values.loc_cpfresponsavel && !validarCpf(values.loc_cpfresponsavel)) {\r\n notification.warn({ message: 'Atenção!', description: \"CPF do responsável informado não é valido!\" });\r\n return false;\r\n }\r\n\r\n if (validaForm(formulario, listaValidacoes)) {\r\n carregando(true);\r\n let enderecoUrl = 'CentroDistribuicao/';\r\n if (values.loc_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Filial foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Atenção!', description: \"Não foi possivel incluir os dados desta filial!\" });\r\n }).finally(() => {\r\n aoSalvar();\r\n carregando(false);\r\n atualizarPagina();\r\n });\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Filial foram salvos com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Atenção!', description: \"Não foi possivel incluir os dados desta filial!\" });\r\n }).finally(() => {\r\n aoSalvar();\r\n carregando(false);\r\n atualizarPagina();\r\n });\r\n };\r\n };\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+loc_descricao' } });\r\n listar();\r\n };\r\n\r\n function buscarDadosFilial(e) {\r\n let cnpj = e.target.value.replaceAll('.', '').replaceAll('/', '').replaceAll('-', '');\r\n if (cnpj.length === 14) {\r\n api.get(`CentroDistribuicao/VerificarCentroExistente?cnpjLocal=${cnpj}`).then(\r\n (centroExiste) => {\r\n if (!centroExiste.data) {\r\n api.get(`Local/BuscarLocalCnpj/${cnpj}`).then(\r\n (retorno) => {\r\n let dados = retorno.data;\r\n if (!!dados) {\r\n let dadosCentroDistribuicao = {\r\n loc_cnpj: dados.loc_cnpj.numero,\r\n loc_codigo: dados.loc_codigo,\r\n loc_descricao: dados.loc_descricao,\r\n loc_numeroestabelecimento: dados.loc_numeroestabelecimento,\r\n loc_complemento: dados.loc_complemento,\r\n loc_pontoreferencia: dados.loc_pontoreferencia,\r\n loc_email: dados.loc_email.endereco,\r\n loc_telefone: dados.loc_telefone,\r\n loc_responsavelestabelecimento: dados.loc_responsavelestabelecimento,\r\n loc_cpfresponsavel: dados.loc_cpfresponsavel.numero,\r\n loc_tipocontribuinte: dados.loc_tipocontribuinte\r\n };\r\n formulario.setFieldsValue(dadosCentroDistribuicao);\r\n setFilialInexistente(false);\r\n setCentroCadastrado(false);\r\n } else {\r\n if (!!!formulario.getFieldValue().loc_id) {\r\n setFilialInexistente(true);\r\n setCentroCadastrado(false);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n if (!!!formulario.getFieldValue().loc_id) {\r\n setFilialInexistente(false);\r\n setCentroCadastrado(true);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n buscarDadosFilial(e)}\r\n />\r\n \r\n {!!filialInexistente && * Sem filiais com esse CNPJ}\r\n {!!centroCadastrado && * Já Existe um Centro de Distribuição com esse CNPJ}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Centro de Distribuição Ativo?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveFilled, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoCentroDistribuicao from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerCentroDistribuicao({listar}) {\r\n\r\n const [formCentroDistribuicao] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) formCentroDistribuicao.setFieldsValue(manutencao.dados);\r\n else {\r\n formCentroDistribuicao.setFieldsValue({ loc_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n formCentroDistribuicao.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, Form, Table, Select, Input, notification } from \"antd\";\r\nimport { EditOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerCentroDistribuicao from './drawer';\r\nimport { MaskFormat, FormatFone } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, Editar, TabelaDados, PesquisaOrdenacao } from \"../../components\";\r\nimport { getEmpresa, setEmpresa, setLocal, setNomeLocal } from \"../../services/auth\";\r\n\r\nexport default function CentroDistribuicao() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [formPesquisa] = Form.useForm();\r\n\r\n function editarCentro(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true, editItem: true } });\r\n };\r\n\r\n function listar(filtro = null, ordem = null) {\r\n if (!!formPesquisa.getFieldValue().filtro) {\r\n filtro = formPesquisa.getFieldValue().filtro;\r\n }\r\n if (!!formPesquisa.getFieldValue().ordem) {\r\n ordem = formPesquisa.getFieldValue().ordem;\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { campoFiltro: 'Filtro', filtro: filtro, ordem: ordem } });\r\n };\r\n\r\n async function acessarCentroDistribuicao(centro) {\r\n let codigoEmpresa = getEmpresa();\r\n if (codigoEmpresa) {\r\n let listaLocaisUsuario = await api.get(`/Local/ListarLocalUsuario?codigoEmpresa=${codigoEmpresa}`);\r\n if (!!listaLocaisUsuario.data.items && listaLocaisUsuario.data.items.length > 0) {\r\n let local = listaLocaisUsuario.data.items.find((item) => { return item.loc_id === centro.loc_id });\r\n if (!!local) {\r\n setEmpresa(codigoEmpresa);\r\n setLocal(local.loc_id);\r\n setNomeLocal(local.loc_descricao);\r\n window.location = \"/Home\";\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'Você não possui acesso a esta filial!' });\r\n }\r\n }\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {loc_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Centro de Distribuição',\r\n render: ({ loc_descricao }) => (\r\n
\r\n {loc_descricao || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CNPJ',\r\n render: ({ loc_cnpj }) => (\r\n
\r\n {MaskFormat(loc_cnpj, '', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n render: ({ loc_telefone }) => (\r\n
\r\n {(!!loc_telefone) ? FormatFone(loc_telefone) : 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n editarCentro(record)} icon={} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]} expandir={\r\n (record) => {\r\n return (\r\n
\r\n \r\n
\r\n Endereço: {record.log_logradouro || 'Não Informado'}{(!!record.loc_numeroestabelecimento) ? (', ' + record.loc_numeroestabelecimento) : ''} {!!(record.cid_descricao) ? ('- ' + record.cid_descricao) : ''}\r\n {!!(record.est_sigla) ? ('/ ' + record.est_sigla) : ''}\r\n \r\n \r\n E-mail: {(!!record.loc_email) ? (record.loc_email) : 'Não Informado'}\r\n \r\n \r\n Responsável: {(!!record.loc_responsavelestabelecimento) ? (record.loc_responsavelestabelecimento) : 'Não Informado'}\r\n \r\n \r\n \r\n )\r\n }\r\n } scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Form, Row, Col, Select, Button, Input } from \"antd\";\r\nimport { PrinterOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { BreadcrumbAbrirChamado, TabelaDados } from \"../../components\";\r\n\r\nexport default function Relatorios() {\r\n\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [grupos, setGrupos] = useState([]);\r\n const [formulario] = Form.useForm();\r\n\r\n useEffect(() => {\r\n api.get(`RelatorioJasper/ListarGruposRelatorio`).then(res => {\r\n if (res.status === 200) {\r\n setGrupos(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n function filtroGrupo(val) {\r\n if (val) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&MostrarList=true&Sistema=1&CodigoGrupo=${val}` } })\r\n }\r\n else {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&MostrarList=true&Sistema=1` } })\r\n }\r\n }\r\n\r\n function visualizarRelatorio(dados) {\r\n\r\n };\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '&MostrarList=true&Sistema=1', filtro: '', ordem: '+rel_nome' } }), []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: valor } })} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {rel_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: \"Descrição do Relatório\",\r\n render: ({ rel_descricao }) => (\r\n
\r\n {rel_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n localStorage.setItem(\"@GestorWeb-FiltrosRelatorio\", JSON.stringify({ id: record.rel_id, nomeArquivo: record.rel_nomearquivo, nomeRelatorio: record.rel_nome, retorno: \"/relatorios\" }))\r\n }}>\r\n \r\n }\r\n />\r\n \r\n \r\n\r\n );\r\n\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Checkbox, Input, Form, Tabs, notification, Select } from 'antd';\r\nimport { ArrowRightOutlined, UploadOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\nimport { EditorFormularioRelatorio, FormGW } from '../../components';\r\n\r\nexport default function Formularios({ formulario, carregando, aoSalvar, grupos }) {\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [aoUpload, setAoUpload] = useState(false);\r\n const [sistema, setSistema] = useState([]);\r\n\r\n function atribuiNomeRelatorio(nomeRel) {\r\n //formulario.setFieldsValue({ rel_nomearquivo: nomeRel.replace(' ','_')})\r\n }\r\n\r\n useEffect(() => {\r\n let sis = sistema.filter((s) => { return s.key === formulario.getFieldValue().rel_sistema });\r\n if (sis.length > 0) {\r\n if (!(!!formulario.getFieldValue().rel_sistema)) {\r\n formulario.setFieldsValue({ rel_sistema: sis[0].key });\r\n }\r\n }\r\n }, [sistema]);\r\n\r\n function carregarEnumSistema() {\r\n api.get(`Enum/Listar?nome=Sistema`).then(\r\n res => {\r\n if (res.status === 200) {\r\n res.data = res.data.filter((item) => { return item.key > 0 });\r\n setSistema(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n };\r\n\r\n function carregarDados() {\r\n carregando(false)\r\n if (!!formulario.getFieldValue().rel_id) {\r\n console.log(formulario.getFieldValue().rel_id);\r\n api.get(`RelatorioJasper/BuscarRelatorio/${formulario.getFieldValue().rel_id}`).then(\r\n res => {\r\n console.log(\"BuscarRelatorio\", res.data)\r\n setElementosFormulario(!!res.data.relatorioParametro ? res.data.relatorioParametro : []);\r\n }).catch(\r\n erro =>\r\n console.error(erro)\r\n );\r\n\r\n } else {\r\n setElementosFormulario([]);\r\n }\r\n\r\n carregarEnumSistema();\r\n }\r\n\r\n const salvarManutencao = values => {\r\n carregando(true);\r\n aoSalvar();\r\n values.rel_nomearquivo = values.rel_nomearquivo.replace(/[\\\\\"]/g, \"/\");\r\n let elementosOrdem = []\r\n elementosFormulario.map((elemento, indice) => {\r\n if (elemento.rpj_ordem != indice) {\r\n elemento.rpj_ordem = indice\r\n !!elemento.status == false ? elemento.status = 2 : elemento.status = elemento.status\r\n }\r\n elementosOrdem.push(elemento)\r\n })\r\n values.RelatorioParametro = elementosOrdem;\r\n console.log({ values });\r\n let url = 'Incluir'\r\n if (!!values.rel_id) {\r\n url = 'Editar';\r\n api.put(`RelatorioJasper/${url}`, values).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Relatório Jasper ${url === 'Incluir' ? 'incluído' : 'editado'} com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n notification.error({ message: 'Erro ao Gravar Relatório Jasper.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: listagem.ordem } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n } else {\r\n api.post(`RelatorioJasper/${url}`, values).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Relatório Jasper ${url === 'Incluir' ? 'incluído' : 'editado'} com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n notification.error({ message: 'Erro ao Gravar Relatório Jasper.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: listagem.ordem } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n };\r\n\r\n function uploadRelatorio() {\r\n setAoUpload(true)\r\n let arquivoRel = formulario.getFieldValue().rel_nomearquivo;\r\n let sistema = formulario.getFieldValue().rel_sistema;\r\n api.post(`RelatorioJasper/UploadRelatorios?SalvarEm=${arquivoRel}&sistema=${sistema}`).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Upload do Relatório para o servidor realizado com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n notification.error({ message: 'Aviso', description: 'Erro ao Atualizar Relatório.\\n' + erro })\r\n }\r\n ).finally(\r\n () => {\r\n setAoUpload(false)\r\n\r\n });\r\n }\r\n\r\n useEffect(() => carregarDados(), [!!formulario.getFieldValue().rel_id]);\r\n useEffect(() => console.log({ grupos }), []);\r\n\r\n return (\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {grupos.map((grupo) => (\r\n {grupo.grj_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {sistema.map((sis) => (\r\n {sis.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Mostrar na Lista de Impressão?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React,{ useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nimport Formularios from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\n\r\nexport default function DrawerPersonalizacao({grupos}) {\r\n\r\n const [ formFormulario ] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n const idRel = 0\r\n \r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n formFormulario.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() =>{\r\n if (manutencao.dados !== null) {\r\n formFormulario.setFieldsValue(manutencao.dados);\r\n console.log(\"manutenção\",manutencao.dados);\r\n } else {\r\n formFormulario.resetFields();\r\n }\r\n },[!!manutencao.dados])\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Form, Button, Tag, Popconfirm, notification, Select } from 'antd';\r\nimport { EditOutlined, DeleteOutlined, PrinterOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerPersonalizacao from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport { Link } from 'react-router-dom';\r\n\r\nexport default function PersonalizacaoRelatorios({ }) {\r\n\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [grupos, setGrupos] = useState([]);\r\n const [listaSistema, setSistema] = useState([]);\r\n const [formPesquisaAvancada] = Form.useForm();\r\n\r\n\r\n function editarFormRelatorio(valores) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function excluirRegistro(record) {\r\n api.delete(`RelatorioJasper/Excluir/${record.rel_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Relatório Jasper excluído com sucesso!` })\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao excluir Telatório!');\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+rel_nome' } });\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n api.get('Enum/Listar?nome=Sistema').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setSistema(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`RelatorioJasper/ListarGruposRelatorio`).then(res => {\r\n if (res.status === 200) {\r\n setGrupos(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+rel_nome' } }), []);\r\n\r\n\r\n function retornoPesquisaAvancada() {\r\n var filtrosTela = ``;\r\n if (formPesquisaAvancada.getFieldsValue().grupo) filtrosTela += `&CodigoGrupo=${formPesquisaAvancada.getFieldsValue().grupo}`;\r\n if (formPesquisaAvancada.getFieldsValue().sistema) filtrosTela += `&Sistema=${formPesquisaAvancada.getFieldsValue().sistema}`;\r\n if (filtrosTela) dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtrosTela, filtro: '', ordem: '+rel_nome' } })\r\n else dispatch({ type: listagemActions.CHANGE, data: { filtro: '', outrosFiltros: '', ordem: '+rel_nome' } })\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}\r\n placeholder=\"Selecionar Relatórios por Grupo\"\r\n allowClear\r\n showSearch\r\n optionFilterProp=\"children\"\r\n >\r\n {grupos.map((grupo) => (\r\n {grupo.grj_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada()}\r\n placeholder=\"Sistema\"\r\n allowClear\r\n >\r\n {listaSistema.map((s) => (\r\n {s.value}\r\n ))}\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {rel_id}\r\n \r\n )\r\n },\r\n {\r\n title: 'Nome Relatório',\r\n width: '20%',\r\n render: ({ rel_nome }) => (\r\n
\r\n {rel_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ rel_descricao }) => (\r\n
\r\n {rel_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Disponível',\r\n render: ({ rel_nomearquivo }) => (\r\n
\r\n {rel_nomearquivo}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 100,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n //dispatch({ type: manutencaoActions.CHANGE, data: { dados: produto } });\r\n localStorage.setItem(\"@GestorWeb-FiltrosRelatorio\", JSON.stringify({ id: record.rel_id, nomeArquivo: record.rel_nomearquivo, nomeRelatorio: record.rel_nome, retorno: \"/personalizacaoRelatorios\" }))\r\n }}>\r\n \r\n \r\n excluirRegistro(record)} okText=\"Sim\" cancelText=\"Não\">\r\n \r\n \r\n \"Título {tituloRelatorio}\r\n \r\n \r\n Filtre os dados abaixo para gerar o relatório.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.tipoRelatorio !== currentValues.tipoRelatorio}>\r\n {({ getFieldValue }) => {\r\n let elemento = getFieldValue('tipoRelatorio');\r\n if (elemento !== 'PDF' && !!elemento)\r\n return (\r\n setimprimirSomenteCorpo(value.target.checked)}>Imprimir somente corpo do Relatório\r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Divider } from \"antd\";\r\nimport { StopOutlined, SaveOutlined, CheckOutlined, DeleteFilled } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { ModalDefinirHorario } from \"../../components/modals\";\r\nimport { DataUsage } from \"@material-ui/icons\";\r\n\r\nexport default function TabHorariosAcessoUsuario({ formulario }) {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [idDay, setIdDay] = useState(null);\r\n const [listHorarios, setListHorarios] = useState(\r\n [{\r\n id: 0,\r\n name: 'Domingo',\r\n disabled: false,\r\n description: 'Domingo',\r\n day: []\r\n }, {\r\n id: 1,\r\n name: 'Segunda',\r\n disabled: false,\r\n description: 'Segunda-feira',\r\n day: []\r\n }, {\r\n id: 2,\r\n name: 'Terca',\r\n disabled: false,\r\n description: 'Terça-feira',\r\n day: []\r\n }, {\r\n id: 3,\r\n name: 'Quarta',\r\n disabled: false,\r\n description: 'Quarta-feira',\r\n day: []\r\n }, {\r\n id: 4,\r\n name: 'Quinta',\r\n disabled: false,\r\n description: 'Quinta-feira',\r\n day: []\r\n }, {\r\n id: 5,\r\n name: 'Sexta',\r\n disabled: false,\r\n description: 'Sexta-feira',\r\n day: []\r\n }, {\r\n id: 6,\r\n name: 'Sabado',\r\n disabled: false,\r\n description: 'Sábado',\r\n day: []\r\n },]);\r\n\r\n useEffect(() => {\r\n carregarListaHorariosAcesso();\r\n }, [])\r\n\r\n const carregarListaHorariosAcesso = async () => {\r\n if (!!formulario.getFieldValue('usu_id')) {\r\n var res = await api.get(`Usuario/ListaHorariosAcesso?codigoUsuario=${formulario.getFieldValue('usu_id')}`);\r\n if (res.status === 200) {\r\n let array = [...listHorarios];\r\n res.data.forEach(element => {\r\n if (element.uac_dia > -1) {\r\n array[element.uac_dia].disabled = element.uac_bloqueado;\r\n array[element.uac_dia].day.push({\r\n uac_id: element.uac_id,\r\n bloqueado: element.uac_bloqueado,\r\n horaInicial: element.uac_horainicial != null ? moment(element.uac_horainicial) : null,\r\n horaFinal: element.uac_horafinal != null ? moment(element.uac_horafinal) : null\r\n });\r\n }\r\n });\r\n setListHorarios(array);\r\n transformList(array, false);\r\n }\r\n }\r\n }\r\n\r\n const setDataModal = (id) => {\r\n setIdDay(id);\r\n setOpenModal(true);\r\n }\r\n\r\n const onChangeHorario = (id, disabled = false, desbloquear = false, horaInicial = null, horaFinal = null,) => {\r\n\r\n let array = [...listHorarios];\r\n\r\n array[id].disabled = disabled;\r\n\r\n if (desbloquear) {\r\n array[id].day = []\r\n } else {\r\n array[id].day.push(\r\n {\r\n horaInicial: horaInicial != null ? horaInicial : \"\",\r\n horaFinal: horaFinal != null ? horaFinal : \"\",\r\n bloqueado: disabled\r\n });\r\n }\r\n\r\n setListHorarios(array);\r\n transformList(array, true);\r\n }\r\n\r\n const deleteHorario = (id, key) => {\r\n let array = [...listHorarios];\r\n array[id].day.splice(key, 1);\r\n setListHorarios(array);\r\n transformList(array, true);\r\n }\r\n\r\n const transformList = (array, change) => {\r\n let usuarioacessos = [];\r\n\r\n array.forEach(e => {\r\n e.day.forEach(d => {\r\n var obj = {\r\n uac_dia: e.id,\r\n usu_id: formulario.getFieldValue('usu_id'),\r\n uac_horainicial: new Date(d.horaInicial),\r\n uac_horafinal: new Date(d.horaFinal),\r\n uac_bloqueado: d.bloqueado\r\n };\r\n\r\n if (d.uac_id != null || typeof d.uac_id != 'undefined' || d.uac_id != \"\") obj.uac_id = d.uac_id;\r\n\r\n usuarioacessos.push(obj);\r\n })\r\n })\r\n formulario.setFieldsValue({ usuarioacessos: usuarioacessos, mudarAcesso: change });\r\n }\r\n\r\n return (\r\n
\r\n \r\n {listHorarios.map(({ id, description, disabled, day }, idx) => (\r\n
\r\n \r\n \r\n {description}\r\n \r\n \r\n \r\n {!disabled && \r\n {day.map((x, idx) => (\r\n \r\n \r\n \r\n {moment(x.horaInicial).format(\"HH:mm\")} até {moment(x.horaFinal).format(\"HH:mm\")}\r\n \r\n \r\n }\r\n type=\"link\"\r\n onClick={() => deleteHorario(id, idx)} />\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {disabled && \r\n \r\n

Bloqueado

\r\n \r\n \r\n \r\n \r\n }\r\n \r\n ))}\r\n \r\n setOpenModal(false)} />\r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Tag, Divider, Button, Table, notification } from \"antd\";\r\nimport { CheckOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\n\r\nexport default function TabPermissoesUsuario({ formulario }) {\r\n\r\n const [load, setLoad] = useState(false);\r\n const [listPermissoes, setListPermissoes] = useState([]);\r\n const [pagina, setPagina] = useState(1);\r\n const [nroRegistros, setNroRegistros] = useState(10);\r\n const [ordem, setOrdem] = useState('loc_id');\r\n\r\n useEffect(() => { loadPermissoes() }, [pagina, nroRegistros]);\r\n\r\n async function loadPermissoes() {\r\n setLoad(true);\r\n\r\n var _listaPermissoesPagina = await api.get(`PermissaoUsuario/ListarPermissoesPaginas`);\r\n if (_listaPermissoesPagina.status === 200) {\r\n const list = _listaPermissoesPagina.data;\r\n let userId = formulario.getFieldValue('usu_id');\r\n if (userId) {\r\n try {\r\n var _listarPersmissoesMongo = await api.get(`PermissaoUsuario/Listar?idUser=${userId}`);\r\n if (_listarPersmissoesMongo.status === 200) {\r\n let dataAcess = _listarPersmissoesMongo.data;\r\n for (let i in list) {\r\n let idx = dataAcess.findIndex(x => x.pru_nome === list[i].pagina);\r\n if (idx > -1) {\r\n let obj = JSON.parse(dataAcess[idx].pru_permissoes);\r\n let { api, sistema } = obj[0];\r\n var permissoes = list[i].permissoes;\r\n let acessoModulo = false;\r\n if (typeof api != \"undefined\" && sistema != \"undefined\") {\r\n var permissoesApi = api[0].metodos;\r\n permissoes.forEach(e => {\r\n var indexMetodo = permissoesApi.findIndex(pm => pm.nome == e.metodo);\r\n e.acesso = permissoesApi[indexMetodo].acesso;\r\n if (!acessoModulo) acessoModulo = permissoesApi[indexMetodo].acesso ? true : false;\r\n });\r\n } else {\r\n var acessoPermissoesMongo = obj;\r\n permissoes.forEach(e => {\r\n var indexMetodo = acessoPermissoesMongo.findIndex(pm => pm.metodo == e.metodo);\r\n e.acesso = acessoPermissoesMongo[indexMetodo].acesso;\r\n if (!acessoModulo) acessoModulo = acessoPermissoesMongo[indexMetodo].acesso ? true : false;\r\n });\r\n }\r\n if (acessoModulo) {\r\n list[i].acesso = true\r\n }\r\n }\r\n }\r\n setListPermissoes(list.map((x, idx) => ({ key: idx, ...x })));\r\n }\r\n } catch (error) {\r\n const array = list.map((x, idx) => ({ key: idx, ...x }));\r\n setListPermissoes(array);\r\n setLoad(false)\r\n }\r\n } else {\r\n const array = list.map((x, idx) => ({ key: idx, ...x }));\r\n setListPermissoes(array);\r\n }\r\n }\r\n setLoad(false)\r\n }\r\n\r\n const handleChangeBloqueioPagina = (key, metodo = null) => {\r\n let array = [...listPermissoes];\r\n let index = array.findIndex(x => x.key == key);\r\n if (index > -1) {\r\n if (metodo != null) {\r\n let idx = array[index].permissoes.findIndex(x => x.metodo == metodo);\r\n if (idx > -1)\r\n array[index].permissoes[idx].acesso = !array[index].permissoes[idx].acesso;\r\n }\r\n else {\r\n array[index].acesso = !array[index].acesso;\r\n for (let y in array[index].permissoes)\r\n array[index].permissoes[y].acesso = array[index].acesso;\r\n }\r\n setListPermissoes(array);\r\n formulario.setFieldsValue({ listaPermissoesPaginas: array });\r\n }\r\n }\r\n\r\n const handleChangeBloqueioAll = (option, list = null) => {\r\n\r\n let array = (list != null) ? list : [...listPermissoes];\r\n for (let i in array) {\r\n array[i].acesso = option;\r\n for (let y in array[i].permissoes) {\r\n array[i].permissoes[y].acesso = option;\r\n }\r\n }\r\n setListPermissoes(array);\r\n formulario.setFieldsValue({ listaPermissoesPaginas: array });\r\n }\r\n\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n handleChangeBloqueioPagina(record.key)}\r\n >\r\n {(!!acesso) ? 'Liberado' : 'Bloqueado'}\r\n \r\n \r\n \r\n {pagina}\r\n \r\n \r\n {acesso &&\r\n
\r\n \r\n \r\n {permissoes.map((item, idx) =>\r\n
\r\n \r\n \r\n {item.metodo}\r\n \r\n \r\n handleChangeBloqueioPagina(record.key, item.metodo)}>\r\n {(item.acesso) ? 'Sim' : 'Não'}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n ]}\r\n dataSource={listPermissoes} scroll={{ x: 900 }}\r\n />\r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tag, Table, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { MaskFormat } from '../../ValueObjects';\r\n\r\nexport default function TabFiliaisUsuario({ formulario }) {\r\n\r\n const [load, setLoad] = useState(false);\r\n const [locais, setLocais] = useState({});\r\n const [pagina, setPagina] = useState(1);\r\n const [nroRegistros, setNroRegistros] = useState(10);\r\n const [pageRows, setPageRows] = useState([]);\r\n const [ordem, setOrdem] = useState('loc_id');\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [validaLocId, setValidaLocId] = useState(true);\r\n const [outrosLocId, setOutrosLocId] = useState([]);\r\n\r\n useEffect(() => {\r\n //if (formulario.getFieldValue('usu_id') != undefined)\r\n loadLocais()\r\n }, [pagina, nroRegistros, formulario.getFieldValue('usu_id')]);\r\n\r\n async function loadLocais() {\r\n var keys = []\r\n setSelectedRowKeys([]);\r\n setLoad(true);\r\n var itens = [];\r\n\r\n try {\r\n var resListar = await api.get(`Local/Listar?PageNumber=${pagina}&PageSize=${nroRegistros}&Order=${ordem}`)\r\n\r\n if (resListar.status === 200) {\r\n\r\n resListar.data.items.map(i => {\r\n itens.push(i.loc_id)\r\n });\r\n setPageRows(itens);\r\n\r\n resListar.data.items = await resListar.data.items.map((x) => ({ key: x.loc_id, ...x }));\r\n formulario.setFieldsValue({usuarioslocais: resListar.data.items});\r\n setLocais({dados: resListar.data.items, totalItens: resListar.data.totalItems})\r\n \r\n }\r\n var usu_id = formulario.getFieldValue('usu_id');\r\n if (typeof usu_id != 'undefined') {\r\n var resLocais = await api.get(`Local/LocaisSelecionadosUsuario?idUser=${usu_id}`)\r\n\r\n if (resLocais.status === 200) {\r\n resLocais.data.items = await resLocais.data.map((x) => ({ key: x.loc_id, ...x }));\r\n let locaisSelecionados = resLocais.data.items;\r\n locaisSelecionados.forEach(e => {\r\n keys.push(e.key);\r\n });\r\n setSelectedRowKeys(keys);\r\n formulario.setFieldsValue({locaisselecionados: locaisSelecionados});\r\n }\r\n }\r\n } catch (error) {\r\n console.log(error.response)\r\n } finally {\r\n setLoad(false)\r\n }\r\n };\r\n\r\n const rowSelection = {\r\n selectedRowKeys,\r\n onChange: (keys, selectedRows) => {\r\n var others = [];\r\n\r\n if (keys.length == 0) {\r\n return notification.info({description: \"Ao menos uma filial deve permanecer selecionada. Para desativar o usuário desmarque a opção \\\"Usuário Ativo?\\\".\"})\r\n }\r\n\r\n if (validaLocId) {\r\n var is = false;\r\n var justOutCheck = [];\r\n pageRows.forEach(p => {\r\n for (var i = 0; i < keys.length; i++) {\r\n is = p == keys[i] ? true : false;\r\n if (is) break;\r\n }\r\n if (!is) justOutCheck.push(p);\r\n is = false;\r\n });\r\n\r\n var selected = selectedRowKeys;\r\n var sel_page = keys;\r\n\r\n is = false;\r\n selected.forEach(s => {\r\n for (var i = 0; i < sel_page.length; i++) {\r\n is = s == sel_page[i] ? true : false;\r\n if (is) break;\r\n }\r\n if (!is) others.push(s);\r\n var is = false;\r\n })\r\n\r\n justOutCheck.forEach(o => {\r\n for (var i = 0; i < others.length; i++) {\r\n if (others[i] == o) others.pop(o);\r\n }\r\n })\r\n setValidaLocId(false);\r\n setOutrosLocId(others);\r\n }\r\n\r\n var include = others.concat(keys);\r\n let list = include.map(x => ({ loc_id: x }));\r\n\r\n if (!others.length > 0) others = outrosLocId;\r\n \r\n setSelectedRowKeys(keys);\r\n\r\n formulario.setFieldsValue({ locaisselecionados: list });\r\n },\r\n };\r\n\r\n return (\r\n
\r\n (\r\n \r\n {loc_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Filial',\r\n render: ({ loc_descricao }) => (\r\n {loc_descricao}\r\n ),\r\n },\r\n {\r\n title: 'CNPJ',\r\n render: ({ loc_cnpj: { numero } }) => (\r\n {MaskFormat(numero, \"00.000.000/0000-00\")}\r\n ),\r\n\r\n },\r\n ]}\r\n pagination={{\r\n current: pagina,\r\n pageSize: nroRegistros,\r\n total: locais.totalItens,\r\n onChange: (pg) => setPagina(pg),\r\n onShowSizeChange: (current, page) => setNroRegistros(page)\r\n }} scroll={{ x: 900 }} />\r\n
\r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Upload, Image, Checkbox, Tabs, notification, Modal } from \"antd\";\r\nimport { LoadingOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport ImgCrop from 'antd-img-crop';\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { TabFiliaisUsuario, TabPermissoesUsuario, TabHorariosAcessoUsuario } from \"./tabPage\";\r\n\r\nimport { getEmpresa, getIdUsuario } from '../../services/auth'\r\n\r\n\r\nexport default function ManutencaoUsuario({ formulario, carregando, aoSalvar }) {\r\n\r\n const [loading, setLoading] = useState(false);\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [userId, setUserId] = useState(null);\r\n const [fileList, setFileList] = useState([]);\r\n const [array, setArray] = useState([]);\r\n const [emailAtual, setEmailAtual] = useState(formulario.getFieldValue('usu_email'));\r\n const [previewVisible, setPreviewVisible] = useState(false);\r\n const [previewImage, setPreviewImage] = useState('');\r\n\r\n useEffect(() => {\r\n carregarAvatar();\r\n getPermissoesDefault();\r\n formulario.setFieldsValue({ usu_email: emailAtual });\r\n }, []);\r\n\r\n const getBase64 = async (img, callback) => {\r\n const reader = new FileReader();\r\n reader.addEventListener('load', () => callback(reader.result));\r\n reader.readAsDataURL(img);\r\n }\r\n\r\n const beforeUpload = async (file) => {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n notification.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n return isJpgOrPng;\r\n }\r\n\r\n\r\n const setImageComponent = (dadosImg) => {\r\n if (formulario.getFieldValue('usu_id')) {\r\n setUserId(formulario.getFieldValue('usu_id'));\r\n var caminho_avatar = `data:${dadosImg.mimiType};base64,${dadosImg.imagem}`;\r\n let img = [\r\n {\r\n uid: '-1',\r\n name: 'image.png',\r\n status: 'done',\r\n url: caminho_avatar,\r\n },\r\n ];\r\n if (dadosImg.padrao) {\r\n img[0].type = dadosImg.mimiType\r\n }\r\n setImageUrl(caminho_avatar);\r\n setFileList(img);\r\n }\r\n };\r\n\r\n const carregarAvatar = async () => {\r\n if (!!formulario.getFieldValue('usu_email')) {\r\n await api.get(`Usuario/AvatarBase64/${formulario.getFieldValue('usu_email')}`).then(\r\n res => {\r\n if (res.status == 200) {\r\n setImageComponent(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n }\r\n )\r\n }\r\n };\r\n\r\n const getPermissoesDefault = async () => {\r\n let permissaoDefault;\r\n await api.get(`PermissaoUsuario/ListarPermissoesPaginas`).then(\r\n res => {\r\n permissaoDefault = res.data.map(\r\n (x, idx) =>\r\n ({ key: idx, ...x })\r\n );\r\n permissaoDefault.forEach(e => {\r\n e.acesso = true;\r\n e.permissoes.forEach(p => {\r\n p.acesso = true;\r\n });\r\n });\r\n setArray(permissaoDefault);\r\n }).catch(\r\n (err) => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n function salvarManutencao(values) {\r\n values.usu_sac = false;\r\n values.usu_suporte = false;\r\n var usuarios_locais = [];\r\n if (typeof values.locaisselecionados == 'undefined') {\r\n Modal.warning({\r\n title: \"Verifique os Locais de acesso!\",\r\n content: \"Não foi selecionado local de acesso para o usuário!\",\r\n });\r\n return;\r\n }\r\n values.locaisselecionados.forEach(l => {\r\n usuarios_locais.push({ usu_id: getIdUsuario(), loc_id: l.loc_id })\r\n })\r\n delete values.locaisselecionados;\r\n values.usuarioslocais = usuarios_locais;\r\n\r\n\r\n if (!values.listaPermissoesPaginas && !values.usu_id) {\r\n values.listaPermissoesPaginas = array;\r\n }\r\n\r\n if (typeof values.usuarioacessos != 'undefined') {\r\n values.usuarioacessos.map(item => {\r\n item.emp_id = getEmpresa();\r\n })\r\n }\r\n\r\n //tratamento senha\r\n if (values.usu_senha == \"\" || values.usu_confirmaSenha == \"\" || values.usu_senha != values.usu_confirmaSenha) {\r\n delete values.usu_senha;\r\n delete values.usu_confirmaSenha;\r\n }\r\n\r\n //tratamento do avatar\r\n if ((imageUrl != null) && (fileList != '')) {\r\n values.avatar = { data: imageUrl, type: fileList[0].type };\r\n } else {\r\n delete values.usu_avatar;\r\n }\r\n if (!!values.usu_id) {\r\n editar(values);\r\n } else {\r\n incluir(values);\r\n }\r\n }\r\n\r\n function incluir(values) {\r\n //tratamento dos campos\r\n carregando(true);\r\n api.post(`Usuario/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Usuário foram salvos com sucesso, um e-mail foi enviado para a definição de senha!\" });\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n notification.error({ message: 'Aviso!', description: 'Problema ao incluir Usuario!' });\r\n }).finally(() => {\r\n carregando(false);\r\n formulario.resetFields();\r\n aoSalvar();\r\n })\r\n }\r\n\r\n function editar(values) {\r\n carregando(true);\r\n api.put(`Usuario/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: 'Usuário alterado com Sucesso' });\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n notification.error({ message: 'Aviso!', description: 'Problema ao editar Usuário!' });\r\n }).finally(() => {\r\n carregando(false);\r\n formulario.resetFields();\r\n aoSalvar();\r\n })\r\n }\r\n\r\n\r\n const handleChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n }\r\n if (info.file.status !== 'removed') {\r\n getBase64(info.file.originFileObj, (base64) => {\r\n setLoading(false);\r\n setImageUrl(base64);\r\n });\r\n }\r\n if (info.file.status === 'removed')\r\n setImageUrl(null);\r\n setFileList(info.fileList);\r\n };\r\n\r\n const handlePreview = async (file) => {\r\n if (!file.url && !file.preview) {\r\n file.preview = await getBase64(file);\r\n }\r\n setPreviewImage(file.url || file.preview);\r\n setPreviewVisible(true);\r\n };\r\n\r\n const onBlurVerificaEmail = async () => {\r\n var usuario;\r\n setEmailAtual(formulario.getFieldValue('usuEmail'));\r\n let emailNovo = formulario.getFieldValue('usu_email');\r\n let idUsuario = formulario.getFieldValue('usu_id');\r\n try {\r\n if (typeof idUsuario != 'undefined' & idUsuario != 0) usuario = `&idUsuario=${idUsuario}`;\r\n var result = await api.get(`Usuario/ValidarEmailEmpresa?email=${emailNovo}`);\r\n if (result.status == 200) {\r\n if (result.data) {\r\n formulario.setFieldsValue(result.data)\r\n carregarAvatar();\r\n }\r\n }\r\n } catch (err) {\r\n console.log('err :>> ', err);\r\n };\r\n }\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
\r\n {loading ? 'Carregando...' : 'Selecionar Imagem'}\r\n
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n setImageUrl(null)}\r\n onPreview={handlePreview}\r\n maxCount={1}\r\n >\r\n {(fileList.length == 0) && uploadButton}\r\n \r\n \r\n\r\n {previewImage && (\r\n setPreviewVisible(visible),\r\n afterOpenChange: (visible) => !visible && setPreviewImage(''),\r\n }}\r\n src={previewImage}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userId != null &&\r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value)\r\n return Promise.resolve();\r\n\r\n const regexNumber = /[0-9]/;\r\n const regexLetrasMaiuscula = /[A-Z]/;\r\n const regexLetrasMinuscula = /[a-z]/;\r\n\r\n if (regexNumber.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter números!'));\r\n } else if (regexLetrasMaiuscula.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter letras maiúsculas!'));\r\n } else if (regexLetrasMinuscula.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter letras minúscula!'));\r\n } else if (value.length < 6) {\r\n return Promise.reject(new Error('A senha deve conter no mínimo 6 caracteres!'));\r\n } else if ((value == \" \") || (value == \"\")) {\r\n return Promise.reject(new Error('A senha não pode ser vazia'));\r\n }\r\n else\r\n return Promise.resolve();\r\n },\r\n }),\r\n ]}\r\n label=\"Nova Senha\"\r\n name=\"usu_senha\">\r\n \r\n \r\n \r\n \r\n ({\r\n required: getFieldValue('usu_confirmaSenha'),\r\n message: 'Informe a confirmação de sua senha!',\r\n }),\r\n ({ getFieldValue }) => ({\r\n validator(_, value) {\r\n if (!value || getFieldValue('usu_senha') === value) {\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(new Error('As senhas informadas não conferem!'));\r\n },\r\n\r\n })\r\n ]}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n Este usuário irá possuir privilégios de administrador no sistema?\r\n \r\n \r\n \r\n \r\n Este usuário irá possuir acesso apenas no PDV?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport ManutencaoUsuario from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, manutencaoActions, listagemActions } from '../../actions';\r\n\r\nexport default function DrawerUsuario() {\r\n\r\n const [formUsuario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formUsuario.setFieldsValue(manutencao.dados, {usu_sac: false, usu_suporte: false});\r\n }\r\n else {\r\n formUsuario.setFieldsValue({ usu_ativo: false, usu_usuariopdv: false, usu_admin: false, usu_sac: false, usu_suporte: false, listaFiliais: [] });\r\n }\r\n\r\n\r\n function fecharDrawer() {\r\n formUsuario.resetFields();\r\n \r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+usu_nome' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n { fecharDrawer() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, Modal, notification } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, PrinterOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport DrawerUsuario from './drawer';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Imprimir } from \"../../components\";\r\n\r\nexport default function Usuario() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: \"&Ativos=1\", ordem: '+usu_nome' } }), []);\r\n\r\n const loadData = (record) => {\r\n record.usuEmail = record.usu_email;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o usuário: ${dados.usu_nome}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir usuário ${dados.usu_nome}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n function inativarRegistro(dados) {\r\n api.put(`Usuario/Inativar/${dados.usu_id}`).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Usuario(a) inativado(a) com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: \"&Ativos=1\", ordem: '+usu_nome' } });\r\n }\r\n )\r\n }\r\n function excluirRegistro(dados) {\r\n api.delete(`Usuario/Excluir/${dados.usu_id}`).then((res) => {\r\n if (res.data == false) {\r\n modalInativarRegistro(dados);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (err) => {\r\n console.error(err);\r\n modalInativarRegistro(dados);\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: \"&Ativos=1\", ordem: '+usu_nome' } });\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {usu_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n render: ({ usu_nome }) => (\r\n
\r\n {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'E-mail',\r\n render: ({ usu_email }) => (\r\n
\r\n {usu_email}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Inclusão',\r\n render: ({ usu_datainclusao }) => (\r\n
\r\n {(usu_datainclusao ? moment(usu_datainclusao).format(\"DD/MM/YYYY\") : '')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n {/*
\r\n }/>\r\n */}\r\n \r\n loadData(record)} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(dados)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Divider } from \"antd\";\r\nimport { StopOutlined, SaveOutlined, CheckOutlined, DeleteFilled } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { ModalDefinirHorario } from \"../../components/modals/\";\r\n\r\nexport default function TabHorariosAcessoGrupo({ listHorarios, transformList }) {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [idDay, setIdDay] = useState(null);\r\n\r\n const setDataModal = (id) => {\r\n setIdDay(id);\r\n setOpenModal(true);\r\n }\r\n\r\n const onChangeHorario = (id, disabled = false, horaInicial = null, horaFinal = null) => {\r\n let array = [...listHorarios.listHorarios];\r\n array[id].disabled = disabled;\r\n if (horaInicial != null && horaFinal != null)\r\n array[id].day.push(\r\n {\r\n horaInicial: horaInicial != null ? horaInicial : null,\r\n horaFinal: horaFinal != null ? horaFinal : null,\r\n bloqueado: disabled,\r\n });\r\n listHorarios.setListHorarios(array);\r\n transformList(array);\r\n }\r\n\r\n const deleteHorario = (id, key) => {\r\n let array = [...listHorarios.listHorarios];\r\n array[id].day.splice(key, 1);\r\n listHorarios.setListHorarios(array);\r\n transformList(array);\r\n }\r\n\r\n return (\r\n
\r\n \r\n {listHorarios.listHorarios.map(({ id, description, disabled, day }, idx) => (\r\n
\r\n \r\n \r\n {description}\r\n \r\n \r\n \r\n {!disabled && \r\n {day.map((x, idx) => (\r\n\r\n \r\n \r\n \r\n {moment(x.horaInicial).format(\"HH:mm\")} até {moment(x.horaFinal).format(\"HH:mm\")}\r\n \r\n \r\n }\r\n type=\"link\"\r\n onClick={() => deleteHorario(id, idx)} />\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {disabled && \r\n \r\n

Bloqueado

\r\n \r\n \r\n \r\n \r\n }\r\n \r\n ))}\r\n \r\n setOpenModal(false)} />\r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Row, Col, Tag, Divider, Button, Table } from \"antd\";\r\nimport { CheckOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function TabPermissoesGrupo({ listPermissoes, load, handleChangeBloqueioAll }) {\r\n\r\n const handleChangeBloqueioPagina = (key, metodo = null) => {\r\n let array = [...listPermissoes.listPermissoes];\r\n let index = array.findIndex(x => x.key == key);\r\n if (index > -1) {\r\n if (metodo != null) {\r\n let idx = array[index].permissoes.findIndex(x => x.metodo == metodo);\r\n if (idx > -1)\r\n array[index].permissoes[idx].acesso = !array[index].permissoes[idx].acesso;\r\n }\r\n else {\r\n array[index].acesso = !array[index].acesso;\r\n for (let y in array[index].permissoes)\r\n array[index].permissoes[y].acesso = array[index].acesso;\r\n }\r\n listPermissoes.setListPermissoes(array);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n handleChangeBloqueioPagina(record.key)}\r\n >\r\n {(!!acesso) ? 'Liberado' : 'Bloqueado'}\r\n \r\n \r\n \r\n {pagina}\r\n \r\n \r\n {acesso &&\r\n
\r\n \r\n \r\n {permissoes.map((item, idx) =>\r\n
\r\n \r\n \r\n {item.metodo}\r\n \r\n \r\n handleChangeBloqueioPagina(record.key, item.metodo)}>\r\n {(item.acesso) ? 'Sim' : 'Não'}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n\r\n }\r\n \r\n ),\r\n },\r\n ]}\r\n dataSource={listPermissoes.listPermissoes}\r\n />\r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Typography, Divider, Card, Modal } from \"antd\";\r\nimport { PlusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { ModalAdicionarUsuario } from \"../../components/modals/\";\r\n\r\nexport default function TabUsuarioGrupo({ formulario, usuarios }) {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n\r\n function incluirRemoverUsuario(user, incluir, mensagem = '') {\r\n let lista = [...usuarios.usuarios];\r\n let indice = usuarios.usuarios.findIndex((element) => {\r\n return element.usu_email === user.usu_email;\r\n });\r\n lista[indice].incluido = incluir;\r\n\r\n formulario.setFieldsValue({ usuarios: lista.filter((user) => { return user.incluido }) });\r\n usuarios.setUsuarios(lista);\r\n if (!!mensagem){\r\n Modal.success({\r\n content: mensagem,\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Usuário Informações Usuário do Grupo\r\n \r\n \r\n Adicione um novo usuário.\r\n \r\n \r\n \r\n {/* \r\n \r\n
\r\n
\r\n \r\n */}\r\n
\r\n \r\n {usuarios.usuarios.filter((user) => { return !user.usu_email.includes('@newerp.com.br') }).map((item) => (\r\n
\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n {!item.incluido &&\r\n \r\n \r\n \r\n }\r\n {item.incluido &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n setOpenModal(false)} incluirRemoverUsuario={incluirRemoverUsuario}/>\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Checkbox, Tabs, notification } from \"antd\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { TabUsuarioGrupo, TabHorariosAcessoGrupo, TabPermissoesGrupo } from \"./tabPage\";\r\n\r\nexport default function ManutencaoGrupoUsuario({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [usuarios, setUsuarios] = useState([]);\r\n const [listPermissoes, setListPermissoes] = useState([]);\r\n const [load, setLoad] = useState(false);\r\n const [telaDuplicar, setTelaDuplicar] = useState(false);\r\n const [listHorarios, setListHorarios] = useState(\r\n [{\r\n id: 0,\r\n name: 'dom',\r\n disabled: false,\r\n description: 'Domingo',\r\n day: []\r\n }, {\r\n id: 1,\r\n name: 'seg',\r\n disabled: false,\r\n description: 'Segunda-feira',\r\n day: []\r\n }, {\r\n id: 2,\r\n name: 'ter',\r\n disabled: false,\r\n description: 'Terça-feira',\r\n day: []\r\n }, {\r\n id: 3,\r\n name: 'qua',\r\n disabled: false,\r\n description: 'Quarta-feira',\r\n day: []\r\n }, {\r\n id: 4,\r\n name: 'qui',\r\n disabled: false,\r\n description: 'Quinta-feira',\r\n day: []\r\n }, {\r\n id: 5,\r\n name: 'sex',\r\n disabled: false,\r\n description: 'Sexta-feira',\r\n day: []\r\n }, {\r\n id: 6,\r\n name: 'sab',\r\n disabled: false,\r\n description: 'Sábado',\r\n day: []\r\n },]);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarUsuarios();\r\n loadPermissoes();\r\n carregarHorariosAcesso();\r\n if (!!manutencao.dados && manutencao.dados.duplicar) {\r\n setTelaDuplicar(true);\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n if (telaDuplicar) {\r\n formulario.setFieldsValue({ gru_ativo: true, gru_nome: null, gru_descricao: null });\r\n }\r\n }, [telaDuplicar]);\r\n\r\n function loadPermissoes() {\r\n setLoad(true);\r\n api.get(`PermissaoUsuario/ListarPermissoesPaginas`).then(res => {\r\n if (res.status === 200) {\r\n const list = res.data;\r\n let gru_id = formulario.getFieldValue('gru_id');\r\n if (gru_id) {\r\n api.get(`PermissaoGrupo/Listar?codigoGrupoUsuario=${gru_id}`).then((result) => {\r\n if (result.status === 200) {\r\n let dataAcess = result.data;\r\n for (let i in list) {\r\n let idx = dataAcess.findIndex(x => x.prg_nome === list[i].pagina);\r\n if (idx > -1) {\r\n let obj = JSON.parse(dataAcess[idx].prg_permissoes);\r\n if (!!obj) {\r\n let { api, sistema } = obj[0];\r\n if (api.length > 0 && sistema.length > 0 && sistema[0].acesso) {\r\n list[i].acesso = sistema[0].acesso;\r\n if (api[0].controller)\r\n list[i].permissoes = sistema[0].elementos.map((x) => ({ controller: api[0].controller, ...x }));\r\n }\r\n }\r\n }\r\n }\r\n setListPermissoes(list.map((x, idx) => ({ key: idx, ...x })));\r\n }\r\n }).catch((err) => {\r\n console.log(err.response)\r\n }).finally(() => setLoad(false));\r\n } else {\r\n const array = list.map((x, idx) => ({ key: idx, ...x }));\r\n handleChangeBloqueioAll(true, array);\r\n setLoad(false)\r\n }\r\n\r\n }\r\n }, err => {\r\n console.log(err.response)\r\n setLoad(false)\r\n });\r\n }\r\n\r\n const handleChangeBloqueioAll = (option, list = null) => {\r\n let array = (list != null) ? list : [...listPermissoes];\r\n for (let i in array) {\r\n array[i].acesso = option;\r\n for (let y in array[i].permissoes) {\r\n array[i].permissoes[y].acesso = option;\r\n }\r\n }\r\n setListPermissoes(array);\r\n };\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ listaPermissoesPaginas: listPermissoes });\r\n }, [listPermissoes]);\r\n\r\n async function carregarUsuarios() {\r\n let usuariosEmpresa = await api.get(`Usuario/ListarUsuarioAcessos?Ativo=true&PageSize=500&filtro=`);\r\n if (usuariosEmpresa.status === 200 && usuariosEmpresa.data.items.length > 0) {\r\n const list = usuariosEmpresa.data.items;\r\n let usuariosGrupo = [];\r\n let gru_id = formulario.getFieldValue('gru_id');\r\n if (gru_id) {\r\n let listaUsuarios = await api.get(`Usuario/ListarUsuariosGrupo?IdGrupo=${gru_id}`);\r\n if (listaUsuarios.status === 200 && listaUsuarios.data.length > 0) {\r\n listaUsuarios.data.forEach((value) => {\r\n let indice = list.findIndex((element) => {\r\n return element.usu_email === value.usu_email;\r\n });\r\n if (indice >= 0) {\r\n list[indice].incluido = true;\r\n usuariosGrupo.push(list[indice]);\r\n }\r\n });\r\n }\r\n }\r\n setUsuarios(list.map((x, idx) => ({ key: idx, ...x })));\r\n formulario.setFieldsValue({ usuarios: usuariosGrupo });\r\n }\r\n };\r\n\r\n function carregarHorariosAcesso() {\r\n if (formulario.getFieldValue('gru_id')) {\r\n api.get(`GrupoUsuario/ListarHorariosAcessoGrupo?IdGrupo=${formulario.getFieldValue('gru_id')}`).then((result) => {\r\n if (result.status === 200) {\r\n let array = [...listHorarios];\r\n result.data.forEach(element => {\r\n array[element.uac_dia].disabled = element.uac_bloqueado;\r\n if (!element.uac_bloqueado) {\r\n array[element.uac_dia].day.push({\r\n bloqueado: element.uac_bloqueado,\r\n horaInicial: element.uac_horainicial != null ? moment(element.uac_horainicial) : null,\r\n horaFinal: element.uac_horafinal != null ? moment(element.uac_horafinal) : null\r\n });\r\n }\r\n });\r\n setListHorarios(array)\r\n transformList(array);\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n }\r\n };\r\n\r\n const transformList = (array) => {\r\n let obj = {};\r\n for (let i in array) {\r\n if (array[i].disabled)\r\n obj[array[i].name] = [{ horaInicial: null, horaFinal: null, bloqueado: true }];\r\n else\r\n obj[array[i].name] = array[i].day.length > 0 ? array[i].day.map((x) => (\r\n {\r\n horaInicial: new Date(x.horaInicial),\r\n horaFinal: new Date(x.horaFinal),\r\n bloqueado: x.bloqueado\r\n })) : [];\r\n\r\n }\r\n formulario.setFieldsValue({ listaDefinicaoHorario: { ...obj } });\r\n }\r\n\r\n function salvarManutencao(values) {\r\n values.usuariogrupousuarios = values.usuarios;\r\n carregando(true);\r\n if (!!values.gru_id) {\r\n editar(values);\r\n } else {\r\n incluir(values);\r\n }\r\n }\r\n \r\n function incluir(values) {\r\n //tratamento dos campos\r\n api.post(`GrupoUsuario/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: `Grupo de Usuários ${values.duplicar ? 'duplicado' : 'salvo'} com sucesso!` });\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n notification.error({ message: 'Aviso!', description: 'Problema ao incluir Grupo de Usuários!' });\r\n }).finally(() => {\r\n formulario.resetFields();\r\n aoSalvar();\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } });\r\n })\r\n }\r\n \r\n function editar(values) {\r\n api.put(`GrupoUsuario/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: `Grupo de Usuários ${values.duplicar ? 'duplicado' : 'salvo'} com sucesso!` });\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n notification.error({ message: 'Aviso!', description: 'Problema ao editar Grupo de Usuários!' });\r\n }).finally(() => {\r\n formulario.resetFields();\r\n aoSalvar();\r\n carregando(false);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } });\r\n })\r\n }\r\n\r\n\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Grupo Ativo?\r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoGrupoUsuario from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerUsuario() {\r\n\r\n const [formGrupoUsuario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (manutencao.dados !== null) {\r\n formGrupoUsuario.setFieldsValue(manutencao.dados);\r\n } else {\r\n //formGrupoUsuario.resetFields();\r\n formGrupoUsuario.setFieldsValue({ mar_ativa: true });\r\n }\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formGrupoUsuario.resetFields();\r\n\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Button, Dropdown, Menu, Tag, Popover, notification, Modal} from \"antd\";\r\nimport { EditOutlined, MoreOutlined, DeleteOutlined, PrinterOutlined, CopyOutlined, ToTopOutlined, CloseCircleOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport DrawerGrupoUsuario from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir, Duplicar, Exportar, Imprimir } from \"../../components\";\r\n\r\nexport default function GrupoUsuario() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } }), []);\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n \r\n } onClick={() => abrirManutencaoDuplicar(dados)}> Duplicar \r\n \r\n \r\n }> Exportar \r\n \r\n \r\n }> Imprimir \r\n \r\n \r\n )\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Excluir o grupo de usuários ${dados.gru_nome}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function abrirManutencaoDuplicar(dados){\r\n let dadosDuplicar = {...dados};\r\n dadosDuplicar.duplicar = true;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosDuplicar } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n api.post(`GrupoUsuario/Excluir?grupoUsuarioId=${dados.gru_id}`).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Grupo de usuários excluído com sucesso!\" });\r\n }\r\n }, (err) => {\r\n modalInativarGrupo(dados);\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } });\r\n });\r\n }\r\n\r\n const modalInativarGrupo = (dados) => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir o grupo de usuários ${dados.gru_nome}!`,\r\n icon: ,\r\n content: `Deve conter referências com outros registros!`,\r\n okText: 'Inativar Registro',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n dados.gru_ativo = false;\r\n dados.usuarios = [];\r\n dados.usuarios = [];\r\n api.post(`GrupoUsuario/Editar`, dados).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Grupo de Usuários inativado com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } });\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {gru_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Grupos de Usuários',\r\n render: ({ gru_nome }) => (\r\n
\r\n {gru_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(dados)} />\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n
{\r\n if ('dataInventario' in changedValues) {\r\n setDataInventirioInformada(!!allValues.dataInventario);\r\n }\r\n }}>\r\n \r\n
\r\n \r\n \r\n (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())\r\n }\r\n optionLabelProp=\"label\" // Define que o label será usado para filtragem e exibição no dropdown\r\n >\r\n {dadosLocais.map((l) => (\r\n \r\n {l.loc_descricao} {/* Exibe o loc_id na interface */}\r\n {(!!l.loc_cnpj ?
{maskFormat(l.loc_cnpj.numero, '', true)}
: '')}\r\n \r\n ))}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaFinalidadeArquivo.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaPerfilContribuinte.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaApuracaoICMS.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCodigoGuiaRecolhimento.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaMotivoInventario.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCustoInventario.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCodigoReceitaDifal.map((c) => (\r\n {c.value} \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n Gerar Bloco K? \r\n \r\n \r\n \r\n \r\n Gerar registro C170 para todos os modelos de documentos? \r\n \r\n \r\n \r\n \r\n Gerar registro 0150 para documentos modelo 65? \r\n \r\n \r\n \r\n \r\n Gerar registro C176 para vendas interestaduais? \r\n \r\n \r\n \r\n \r\n Empresa optante pela dispensa da informação das NFC-es - IN 48/20? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n } loading={carregando} size=\"large\" htmlType=\"submit\" onClick={gerarEfdIcmsIpi}>\r\n Gerar\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Button, Col, Form, Row, Select } from \"antd\";\r\nimport moment from \"moment\";\r\nimport { useEffect } from \"react\";\r\nimport api from \"../../services/api\";\r\nimport { BreadcrumbPage, Data, GerarEfdPisCofins } from \"../../components\";\r\nimport { useState } from \"react\";\r\nimport maskFormat from \"../../ValueObjects/maskFormat\";\r\nimport { CloseOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function EfdPisCofins() {\r\n\r\n const [formulario] = Form.useForm();\r\n const [dadosLocais, setDadosLocais] = useState([]);\r\n const [listaFinalidadeArquivo, setListaFinalidadeArquivo] = useState([]);\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n carregandoDados();\r\n setMonthDates();\r\n }, [])\r\n\r\n\r\n const setMonthDates = () => {\r\n formulario.setFieldsValue({\r\n dataInicial: moment().startOf('month'),\r\n dataFinal: moment().endOf('month')\r\n });\r\n };\r\n\r\n function carregandoDados() {\r\n api.get('Local/Listar?Ativo=true').then(\r\n res => {\r\n setDadosLocais(res.data?.items);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n\r\n function gerarEfdPisCofins() {\r\n let sql = \"\";\r\n sql += !!formulario.getFieldValue().local ? `Local=${formulario.getFieldValue().local}` : ``;\r\n sql += !!formulario.getFieldValue().dataInicial ? `&DataInicial=${moment(formulario.getFieldValue().dataInicial).format('YYYY-MM-DD')}` : `&dataInicial=${moment(new Date()).format('YYYY-MM-DD')}`;\r\n sql += !!formulario.getFieldValue().dataFinal ? `&DataFinal=${moment(formulario.getFieldValue().dataFinal).format('YYYY-MM-DD')}` : `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}`;\r\n\r\n\r\n\r\n setCarregando(true);\r\n api.get(`EfdPisCofins/GerarEfdPisCofins?` + sql, { responseType: 'blob' })\r\n .then(res => {\r\n // Log para verificar os headers\r\n console.log(res.headers);\r\n\r\n // Extrair o Content-Disposition\r\n const contentDisposition = res.headers['content-disposition'];\r\n let filename = 'SPED.txt'; // Nome padrão\r\n\r\n if (contentDisposition) {\r\n // Tentar extrair o nome do arquivo da maneira mais robusta possível\r\n const filenameMatch = contentDisposition.match(/filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/);\r\n if (filenameMatch && filenameMatch[1]) {\r\n filename = filenameMatch[1].replace(/['\"]/g, ''); // Remover aspas\r\n } else {\r\n // Tentar a variante filename*\r\n const utfFilenameMatch = contentDisposition.match(/filename\\*\\s*=\\s*UTF-8''(.+)/);\r\n if (utfFilenameMatch && utfFilenameMatch[1]) {\r\n filename = decodeURIComponent(utfFilenameMatch[1]);\r\n }\r\n }\r\n }\r\n\r\n // Cria o blob e dispara o download com o nome extraído\r\n const blob = new Blob([res.data], { type: 'application/txt' });\r\n const link = document.createElement('a');\r\n link.href = URL.createObjectURL(blob);\r\n link.download = filename;\r\n document.body.appendChild(link);\r\n link.click();\r\n link.remove();\r\n setCarregando(false);\r\n })\r\n .catch(erro => {\r\n console.log(erro);\r\n }).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n );\r\n\r\n };\r\n\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n (optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())\r\n }\r\n optionLabelProp=\"label\" // Define que o label será usado para filtragem e exibição no dropdown\r\n >\r\n {dadosLocais.map((l) => (\r\n \r\n {l.loc_descricao} {/* Exibe o loc_id na interface */}\r\n {(!!l.loc_cnpj ?
{maskFormat(l.loc_cnpj.numero, '', true)}
: '')}\r\n \r\n ))}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaFinalidadeArquivo.map((c) => (\r\n \r\n {c.value} \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n } loading={carregando} size=\"large\" htmlType=\"submit\" onClick={gerarEfdPisCofins}>\r\n Gerar\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Button } from \"antd\";\r\nimport { CheckOutlined, ExclamationCircleOutlined, EyeOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { BreadcrumbAbrirChamado, TabelaDados } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function Notificacao() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n function excluirNotificacao(record) {\r\n api.delete(`Notificacao/Excluir/${record.id}`).then(\r\n res => {\r\n console.log(`Notificações excluidas com sucesso!`);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+not_datahora' } });\r\n }\r\n )\r\n };\r\n function visualizar(record) {\r\n Modal.info({\r\n title: ('Notificação!'),\r\n content: (\r\n
\r\n

\r\n {record.not_descricao}\r\n

\r\n
\r\n ),\r\n });\r\n };\r\n\r\n const modalExcluirNotificacao = (record) => {\r\n Modal.confirm({\r\n Title: 'Aviso',\r\n icon: ,\r\n content: 'Deseja excluir essa notificação?',\r\n okText: 'Excluir',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirNotificacao(record);\r\n }\r\n });\r\n };\r\n\r\n function excluirTodasNotificacao() {\r\n Modal.confirm({\r\n Title: 'Aviso',\r\n icon: ,\r\n content: 'Deseja excluir todas as notificações?',\r\n okText: 'Excluir',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.delete(`Notificacao/ExcluirTodos`).then(\r\n res => {\r\n console.log(`Notificacões excluidas com sucesso!`);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+not_datahora' } });\r\n }\r\n )\r\n }\r\n });\r\n }\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-not_datahora' } });\r\n }, [])\r\n\r\n return (\r\n
\r\n \r\n
\r\n (\r\n
\r\n {moment(not_datahora).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Notificações',\r\n render: ({ not_descricao }) => (\r\n
\r\n {not_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: excluirTodasNotificacao()} />,\r\n width: 95,\r\n align: 'center',\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n\r\n } />\r\n\r\n \r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Select, Checkbox, InputNumber } from \"antd\";\r\n\r\nexport default function TabPdv({ impressaoComprovantes, listaContaGerencial, listaContaGerencialAgrupador }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Comandar emissão de NFC-e Manualmente?\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Tabs, Select, Checkbox, Tooltip, Input, Upload, message, InputNumber, Button, Modal } from \"antd\";\r\nimport { QuestionCircleOutlined, CloseOutlined, SaveOutlined, LoadingOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport ImgCrop from \"antd-img-crop\";\r\n\r\nimport TabPdv from './tabPdv';\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { parametrosEmpresaActions } from \"../../actions\";\r\nimport { getEmpresa, linkApi } from \"../../services/auth\";\r\nimport { isNotNullOrEmpty } from \"../../services/funcoes\";\r\n\r\nexport default function ParametrosEmpresa() {\r\n\r\n const [{ manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [carregando, setCarregando] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n const [listaImagens, setListaImagens] = useState([]);\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [formulario] = Form.useForm();\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [custo, setCusto] = useState([]);\r\n const [tipoMarkup, setTipoMarkup] = useState([]);\r\n const [impressaoComprovantes, setImpressaoComprovantes] = useState([]);\r\n const [regimeTributarioFiscal, setRegimeTributarioFiscal] = useState([]);\r\n const [enquadramentoFiscal, setEnquadramentoFiscal] = useState([]);\r\n const [codigoBarrasBalanca, setCodigoBarrasBalanca] = useState([]);\r\n const [numeroDigitosBalanca, setNumeroDigitosBalanca] = useState([]);\r\n const [modeloBalanca, setModeloBalanca] = useState([]);\r\n const [tipoCalculo, setTipoCalculo] = useState([]);\r\n const [controleInadimplencia, setControleInadimplencia] = useState([]);\r\n\r\n const onChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n }\r\n if (info.file.status !== 'removed') {\r\n getBase64(info.file.originFileObj, (imageUrl) => {\r\n setLoading(false);\r\n setImageUrl(imageUrl);\r\n });\r\n }\r\n if (info.file.status === 'removed') {\r\n setImageUrl(null);\r\n }\r\n\r\n setListaImagens(info.fileList);\r\n };\r\n\r\n function getBase64(img, callback) {\r\n const reader = new FileReader();\r\n reader.addEventListener('load', () => callback(reader.result));\r\n reader.readAsDataURL(img);\r\n }\r\n\r\n function beforeUpload(file) {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n message.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n const isLt2M = file.size / 1024 / 1024 < 2;\r\n if (!isLt2M) {\r\n message.error('A imagem deve ter menos de 2 MB!');\r\n }\r\n return isJpgOrPng && isLt2M;\r\n }\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
{loading ? 'Carregando...' : 'Selecionar Imagem'}
\r\n
\r\n );\r\n\r\n useEffect(() => {\r\n api.get(`Empresa/Buscar/${getEmpresa()}`).then(retornoEmpresa => {\r\n formulario.setFieldsValue({\r\n emp_nomefantasia: retornoEmpresa.data.emp_nomefantasia,\r\n emp_razaosocial: retornoEmpresa.data.emp_razaosocial,\r\n emp_regimetributario: retornoEmpresa.data.emp_regimetributario,\r\n emp_enquadramentofiscal: retornoEmpresa.data.emp_enquadramentofiscal\r\n });\r\n let url = `${linkApi}Empresa/RetornaLogo?id=${getEmpresa()}`;\r\n setImageUrl(retornoEmpresa.data.emp_logo);\r\n setListaImagens([{ url: url, uid: 1 }]);\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get('ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&').then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get('Enum/Listar?nome=TipoPrecoUtilizar').then(res => {\r\n if (res.status === 200) {\r\n setCusto(res.data.filter((item) => { return item.key > 0; }));\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get('Enum/Listar?nome=TipoMarkup').then(res => {\r\n if (res.status === 200) {\r\n setTipoMarkup(res.data.filter((item) => { return item.key > 0; }));\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n\r\n api.get('Enum/Listar?nome=ImpressaoComprovantes').then(res => {\r\n if (res.status === 200) {\r\n setImpressaoComprovantes(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get('/ParametroEmpresa/BuscarParametrosEmpresa').then(res => {\r\n if (res.status === 200) {\r\n dispatch({ type: parametrosEmpresaActions.CHANGE, data: res.data });\r\n formulario.setFieldsValue(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=RegimeTributarioFiscal`).then(res => {\r\n if (res.status === 200) {\r\n setRegimeTributarioFiscal(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=EnquadramentoFiscal`).then(res => {\r\n if (res.status === 200) {\r\n setEnquadramentoFiscal(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=ModeloBalanca`).then(res => {\r\n if (res.status === 200) {\r\n setModeloBalanca(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=NumeroDigitosBalanca`).then(res => {\r\n if (res.status === 200) {\r\n setNumeroDigitosBalanca(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=CodigoBarrasBalanca`).then(res => {\r\n if (res.status === 200) {\r\n setCodigoBarrasBalanca(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=TipoCalculo`).then(res => {\r\n if (res.status === 200) {\r\n setTipoCalculo(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get('Enum/Listar?nome=ControleInadimplencia').then(res => {\r\n if (res.status === 200) {\r\n setControleInadimplencia(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }, []);\r\n\r\n function salvarParametros() {\r\n let dadosParametrosEmpresa = formulario.getFieldValue();\r\n dadosParametrosEmpresa.par_contagerencialsangriapdv = !!dadosParametrosEmpresa.par_contagerencialsangriapdv ? dadosParametrosEmpresa.par_contagerencialsangriapdv : null;\r\n dadosParametrosEmpresa.par_contagerencialsuprimentopdv = !!dadosParametrosEmpresa.par_contagerencialsuprimentopdv ? dadosParametrosEmpresa.par_contagerencialsuprimentopdv : null;\r\n dadosParametrosEmpresa.par_contagerencialvalepresente = isNotNullOrEmpty(dadosParametrosEmpresa.par_contagerencialvalepresente) ? dadosParametrosEmpresa.par_contagerencialvalepresente : null;\r\n dadosParametrosEmpresa.par_contagervalepresenteprazo = isNotNullOrEmpty(dadosParametrosEmpresa.par_contagervalepresenteprazo) ? dadosParametrosEmpresa.par_contagervalepresenteprazo : null;\r\n dadosParametrosEmpresa.par_ctg_recebimentoparcela = isNotNullOrEmpty(dadosParametrosEmpresa.par_ctg_recebimentoparcela) ? dadosParametrosEmpresa.par_ctg_recebimentoparcela : null;\r\n dadosParametrosEmpresa.par_viasimpressaonfce = !!dadosParametrosEmpresa.par_viasimpressaonfce ? dadosParametrosEmpresa.par_viasimpressaonfce : 1;\r\n dadosParametrosEmpresa.par_impressaodavls = isNotNullOrEmpty(dadosParametrosEmpresa.par_impressaodavls) ? dadosParametrosEmpresa.par_impressaodavls : null;\r\n dadosParametrosEmpresa.par_impressaonfce = isNotNullOrEmpty(dadosParametrosEmpresa.par_impressaonfce) ? dadosParametrosEmpresa.par_impressaonfce : null;\r\n dadosParametrosEmpresa.par_impressaocondicional = isNotNullOrEmpty(dadosParametrosEmpresa.par_impressaocondicional) ? dadosParametrosEmpresa.par_impressaocondicional : null;\r\n dadosParametrosEmpresa.par_impressaorecbtoparcela = isNotNullOrEmpty(dadosParametrosEmpresa.par_impressaorecbtoparcela) ? dadosParametrosEmpresa.par_impressaorecbtoparcela : null;\r\n dadosParametrosEmpresa.par_custopadraonftransferencia = isNotNullOrEmpty(dadosParametrosEmpresa.par_custopadraonftransferencia) ? dadosParametrosEmpresa.par_custopadraonftransferencia : null;\r\n dadosParametrosEmpresa.ope_id = isNotNullOrEmpty(dadosParametrosEmpresa.ope_id) ? dadosParametrosEmpresa.ope_id : null;\r\n dadosParametrosEmpresa.par_impressaocarne = isNotNullOrEmpty(dadosParametrosEmpresa.par_impressaocarne) ? dadosParametrosEmpresa.par_impressaocarne : null;\r\n dadosParametrosEmpresa.par_viasimpressaocarne = !!dadosParametrosEmpresa.par_viasimpressaocarne ? dadosParametrosEmpresa.par_viasimpressaocarne : 1;\r\n dadosParametrosEmpresa.emp_id = getEmpresa();\r\n dadosParametrosEmpresa.emp_logo = imageUrl;\r\n dadosParametrosEmpresa.par_tipocalculomulta = !!dadosParametrosEmpresa.par_tipocalculomulta ? dadosParametrosEmpresa.par_tipocalculomulta : null;\r\n\r\n setCarregando(true);\r\n api.put(\"ParametroEmpresa/Editar\", dadosParametrosEmpresa).then(res => {\r\n if (res.status === 200) {\r\n Modal.success({\r\n title: 'Parametros da empresa atualizados',\r\n content: 'As definições dos parâmetros do Gestor ERP para sua empresa foram atualizados com sucesso!',\r\n onOk() {\r\n onOk();\r\n }\r\n });\r\n } else {\r\n Modal.error({\r\n title: 'Não foi possivel salvar os parâmetros.',\r\n onOk() {\r\n onOk();\r\n }\r\n });\r\n }\r\n }, erro => {\r\n Modal.error({\r\n title: 'Não foi possivel salvar os parâmetros.',\r\n content: erro.message,\r\n onOk() {\r\n onOk();\r\n }\r\n });\r\n }).finally(() => {\r\n atualizarParametrosEmpresa();\r\n setCarregando(false);\r\n });\r\n };\r\n\r\n function onOk() {\r\n window.history.back();\r\n };\r\n\r\n function atualizarParametrosEmpresa() {\r\n api.get('/ParametroEmpresa/BuscarParametros').then(res => {\r\n if (res.status === 200) {\r\n dispatch({ type: parametrosEmpresaActions.CHANGE, data: res.data });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n };\r\n\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaImagens.length === 0 && uploadButton}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Conta Gerencial Recebimento\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Usar Limite de Crédito? \r\n \r\n \r\n \r\n \r\n % da Renda Limite de Crédito\r\n \r\n \r\n \r\n \r\n } placeholder=\"Informe o Percentual do Limite de Crédito\" name=\"par_percentuallimitecredito\" cifrao={false}>\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Markup Padrão\r\n \r\n \r\n \r\n \r\n } placeholder=\"Informe o Markup Padrão (R$)\" name=\"par_markupproduto\" cifrao={false}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Nº Dias Tolerância\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n Nº Dias Tolerância\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n % Juros\r\n \r\n \r\n \r\n \r\n }>\r\n `${value} %`}\r\n decimalSeparator={','}\r\n />\r\n \r\n \r\n \r\n \r\n Valor Multa\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Custo Padrão\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Aviso Inadimplência Clientes\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Imprimir Desconto em cada Item do Cupom Fiscal? \r\n \r\n \r\n \r\n \r\n Usa Promissória? \r\n \r\n \r\n \r\n \r\n Calcular preço de venda automático pelas notas de compra? \r\n \r\n \r\n prevValues.par_calculaprecovenda !== currentValues.par_calculaprecovenda}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue().par_calculaprecovenda) return (\r\n \r\n \r\n Markup Definido em :\r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n prevValues.par_usanotapromissoria !== currentValues.par_usanotapromissoria}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue().par_usanotapromissoria) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Form, Select, Layout, Card, notification } from \"antd\";\r\nimport { CheckOutlined, PrinterFilled } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { formatarCnpj } from \"../../services/funcoes\";\r\nimport { getEmpresa, getNomeEmpresa } from \"../../services/auth\";\r\nimport { Data } from \"../../components\";\r\n\r\nexport default function AnaliseInadimplenciaCliente() {\r\n const [form] = Form.useForm();\r\n const [listaIndice, setListaIndice] = useState([]);\r\n const [listaLocais, setListaLocais] = useState([]);\r\n const [logoEmpresa, setLogoEmpresa] = useState(\"\");\r\n const [listaDadosInadimplencia, setListaDadosInadimplencia] = useState([]);\r\n const [tiposPagamento, setTiposPagamento] = useState([])\r\n const [indiceSelecionado, setIndiceSelecionado] = useState(0);\r\n const [totalizadores, setTotalizadores] = useState({});\r\n const [imprimir, setImprimir] = useState(false);\r\n const [mostrarScroll, setMostrarScroll] = useState(false)\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n carregarDadosIndice();\r\n carregarDadosLocal();\r\n BuscarParametrosEmpresa();\r\n popularTipoCobranca();\r\n setarFuncaoTamanho();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!listaLocais && listaLocais.length > 0) {\r\n carregarLocaisPadroes();\r\n }\r\n }, [listaLocais]);\r\n\r\n useEffect(() => {\r\n if (!!tiposPagamento && tiposPagamento.length > 0) {\r\n popularLabelTpPag();\r\n }\r\n }, [tiposPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!window.outerHeight) {\r\n if (window.outerHeight < 800) {\r\n setMostrarScroll(true);\r\n } else {\r\n setMostrarScroll(false);\r\n }\r\n }\r\n }, [window]);\r\n\r\n function carregarDadosIndice() {\r\n let indices = [];\r\n let numeroIndice = 30;\r\n for (let i = 0; i < 6; i++) {\r\n indices.push({ key: i, label: `Indice +${numeroIndice} dias.`, value: numeroIndice });\r\n numeroIndice += 30;\r\n }\r\n setListaIndice(indices);\r\n };\r\n\r\n function carregarDadosLocal() {\r\n api.get(`Local/ListarLocalUsuario?CodigoEmpresa=${getEmpresa()}`).then(\r\n res => {\r\n setListaLocais(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function carregarLocaisPadroes() {\r\n let locais = []\r\n listaLocais.forEach((local) => {\r\n locais.push(local.loc_id);\r\n });\r\n form.setFieldsValue({ loc_id: locais });\r\n };\r\n\r\n function BuscarParametrosEmpresa() {\r\n api.get(`Empresa/Buscar/${getEmpresa()}`).then(\r\n res => {\r\n setLogoEmpresa(res.data.emp_logo);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularTipoCobranca() {\r\n let listaTpCobranca = [];\r\n listaTpCobranca.push({ id: 1, value: 'Cheques' });\r\n listaTpCobranca.push({ id: 2, value: 'Crediario' });\r\n setTiposPagamento(listaTpCobranca);\r\n };\r\n\r\n function popularLabelTpPag() {\r\n let formTiposCobranca = form.getFieldValue().tiposCobranca;\r\n let retorno = []\r\n tiposPagamento.forEach(\r\n (tpCobranca) => {\r\n if (formTiposCobranca.indexOf(tpCobranca.id) > -1) {\r\n retorno.push(tpCobranca.value);\r\n }\r\n }\r\n );\r\n form.setFieldsValue({ tipoCobrancaLabel: retorno.join(', ') });\r\n };\r\n\r\n function setarFuncaoTamanho() {\r\n window.addEventListener(\"resize\", () => {\r\n if (!!window.outerHeight) {\r\n if (window.outerHeight < 800 && listaDadosInadimplencia.length > 1) {\r\n setMostrarScroll(true);\r\n } else {\r\n setMostrarScroll(false);\r\n }\r\n }\r\n });\r\n };\r\n\r\n async function buscarDadosInadimplencia() {\r\n if (!!!form.getFieldValue().dataAnalise) {\r\n notification.warning({ description: 'Favor informe uma data para análise!', message: 'Aviso' });\r\n return false;\r\n }\r\n let formTiposCobranca = form.getFieldValue().tiposCobranca;\r\n let dadosCrediario = [];\r\n let dadosCheques = [];\r\n let listaDados = [];\r\n let dadosTabela = [];\r\n let obj = {};\r\n let localAtual = 0;\r\n\r\n setCarregando(true);\r\n\r\n if (formTiposCobranca.indexOf(1) > -1) {\r\n let reqCheques = await api.get(`AnaliseInadimplenciaClientes/ListarCheques?filiais=${form.getFieldValue().loc_id.join(',')}&dataBase=${moment(form.getFieldValue().dataAnalise).format(\"YYYY-MM-DD\")}`);\r\n if (reqCheques.status === 200) {\r\n dadosCheques = reqCheques.data;\r\n }\r\n }\r\n\r\n if (formTiposCobranca.indexOf(2) > -1) {\r\n let reqCrediario = await api.get(`AnaliseInadimplenciaClientes/ListarCrediario?filiais=${form.getFieldValue().loc_id.join(',')}&dataBase=${moment(form.getFieldValue().dataAnalise).format(\"YYYY-MM-DD\")}`);\r\n if (reqCrediario.status === 200) {\r\n dadosCrediario = reqCrediario.data;\r\n }\r\n }\r\n\r\n if (dadosCheques.length > 0) {\r\n listaDados.push(dadosCheques);\r\n }\r\n\r\n if (dadosCrediario.length > 0) {\r\n listaDados.push(dadosCrediario);\r\n }\r\n\r\n listaDados = dadosCheques.concat(dadosCrediario);\r\n //localAtual = parseInt(listaDados[0].codigoLocal);\r\n limparVariaveis(obj);\r\n\r\n listaDados.forEach((dados, idx, array) => {\r\n obj.codigoLocal = dados.codigoLocal;\r\n obj.nomeLocal = dados.nomeLocal;\r\n obj.cnpjLocal = dados.cnpjLocal;\r\n obj.vlr_AVencer += parseFloat(dados.vlr_AVencer);\r\n obj.vlr_Ate30dias += parseFloat(dados.vlr_Ate30dias);\r\n obj.vlr_Ate60dias += parseFloat(dados.vlr_Ate60dias);\r\n obj.vlr_Ate90dias += parseFloat(dados.vlr_Ate90dias);\r\n obj.vlr_Ate120dias += parseFloat(dados.vlr_Ate120dias);\r\n obj.vlr_Ate150dias += parseFloat(dados.vlr_Ate150dias);\r\n obj.vlr_Ate180dias += parseFloat(dados.vlr_Ate180dias);\r\n obj.vlr_Acima180dias += parseFloat(dados.vlr_Acima180dias);\r\n obj.vlr_Vencidos += parseFloat(dados.vlr_Vencidos);\r\n obj.vlr_Total += parseFloat(dados.vlr_Total);\r\n obj.vlr_Indicador_Acima30dias += parseFloat(dados.vlr_Indicador_Acima30dias);\r\n obj.vlr_Indicador_Acima60dias += parseFloat(dados.vlr_Indicador_Acima60dias);\r\n obj.vlr_Indicador_Acima90dias += parseFloat(dados.vlr_Indicador_Acima90dias);\r\n obj.vlr_Indicador_Acima120dias += parseFloat(dados.vlr_Indicador_Acima120dias);\r\n obj.vlr_Indicador_Acima150dias += parseFloat(dados.vlr_Indicador_Acima150dias);\r\n obj.vlr_Indicador_Acima180dias += parseFloat(dados.vlr_Indicador_Acima180dias);\r\n\r\n if (localAtual !== parseInt(dados.codigoLocal)) {\r\n localAtual = parseInt(dados.codigoLocal);\r\n dadosTabela.push({ ...obj });\r\n limparVariaveis(obj);\r\n } else if (idx === array.length - 1) {\r\n dadosTabela.push(obj);\r\n }\r\n });\r\n setCarregando(false);\r\n setListaDadosInadimplencia(dadosTabela);\r\n calcularTotal(dadosTabela);\r\n };\r\n\r\n function limparVariaveis(obj) {\r\n obj.vlr_AVencer = 0;\r\n obj.vlr_Ate30dias = 0;\r\n obj.vlr_Ate60dias = 0;\r\n obj.vlr_Ate90dias = 0;\r\n obj.vlr_Ate120dias = 0;\r\n obj.vlr_Ate150dias = 0;\r\n obj.vlr_Ate180dias = 0;\r\n obj.vlr_Acima180dias = 0;\r\n obj.vlr_Vencidos = 0;\r\n obj.vlr_Total = 0;\r\n obj.vlr_Indicador_Acima30dias = 0;\r\n obj.vlr_Indicador_Acima60dias = 0;\r\n obj.vlr_Indicador_Acima90dias = 0;\r\n obj.vlr_Indicador_Acima120dias = 0;\r\n obj.vlr_Indicador_Acima150dias = 0;\r\n obj.vlr_Indicador_Acima180dias = 0;\r\n };\r\n\r\n function calcularTotal(dadosTabela) {\r\n let objTotalizador = {};\r\n objTotalizador.vlr_AVencer = 0;\r\n objTotalizador.vlr_Ate30dias = 0;\r\n objTotalizador.vlr_Ate60dias = 0;\r\n objTotalizador.vlr_Ate90dias = 0;\r\n objTotalizador.vlr_Ate120dias = 0;\r\n objTotalizador.vlr_Ate150dias = 0;\r\n objTotalizador.vlr_Ate180dias = 0;\r\n objTotalizador.vlr_Acima180dias = 0;\r\n objTotalizador.vlr_Vencidos = 0;\r\n objTotalizador.vlr_Total = 0;\r\n objTotalizador.vlr_Indicador_Acima30dias = 0;\r\n objTotalizador.vlr_Indicador_Acima60dias = 0;\r\n objTotalizador.vlr_Indicador_Acima90dias = 0;\r\n objTotalizador.vlr_Indicador_Acima120dias = 0;\r\n objTotalizador.vlr_Indicador_Acima150dias = 0;\r\n objTotalizador.vlr_Indicador_Acima180dias = 0;\r\n\r\n dadosTabela.forEach((dados => {\r\n objTotalizador.vlr_AVencer += dados.vlr_AVencer;\r\n objTotalizador.vlr_Ate30dias += dados.vlr_Ate30dias;\r\n objTotalizador.vlr_Ate60dias += dados.vlr_Ate60dias;\r\n objTotalizador.vlr_Ate90dias += dados.vlr_Ate90dias;\r\n objTotalizador.vlr_Ate120dias += dados.vlr_Ate120dias;\r\n objTotalizador.vlr_Ate150dias += dados.vlr_Ate150dias;\r\n objTotalizador.vlr_Ate180dias += dados.vlr_Ate180dias;\r\n objTotalizador.vlr_Acima180dias += dados.vlr_Acima180dias;\r\n objTotalizador.vlr_Vencidos += dados.vlr_Vencidos;\r\n objTotalizador.vlr_Total += dados.vlr_Total;\r\n objTotalizador.vlr_Indicador_Acima30dias += dados.vlr_Indicador_Acima30dias;\r\n objTotalizador.vlr_Indicador_Acima60dias += dados.vlr_Indicador_Acima60dias;\r\n objTotalizador.vlr_Indicador_Acima90dias += dados.vlr_Indicador_Acima90dias;\r\n objTotalizador.vlr_Indicador_Acima120dias += dados.vlr_Indicador_Acima120dias;\r\n objTotalizador.vlr_Indicador_Acima150dias += dados.vlr_Indicador_Acima150dias;\r\n objTotalizador.vlr_Indicador_Acima180dias += dados.vlr_Indicador_Acima180dias;\r\n }));\r\n\r\n setTotalizadores(objTotalizador);\r\n };\r\n\r\n function impressao() {\r\n setImprimir(true);\r\n window.print();\r\n };\r\n\r\n return (\r\n
\r\n \r\n {!imprimir &&\r\n \r\n \r\n
\r\n \"Gestor\r\n \r\n \r\n Análise de Inadimplência de Clientes\r\n \r\n \r\n \r\n }\r\n \r\n \r\n {!imprimir &&
\r\n \r\n
\r\n \r\n \r\n {listaLocais.map(local => (\r\n {local.loc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { popularLabelTpPag() }}\r\n mode=\"multiple\">\r\n {tiposPagamento.map((tpPag) => (\r\n {tpPag.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {listaDadosInadimplencia.length > 0 &&\r\n
\r\n \r\n \r\n
\r\n \"Logo\"\r\n \r\n \r\n \r\n \r\n {getNomeEmpresa()}\r\n \r\n \r\n \r\n \r\n Data base da análise: {moment(form.getFieldValue().dataAnalise).format(\"DD/MM/YYYY\")}\r\n \r\n \r\n \r\n \r\n Tipos de cobrança: {form.getFieldValue().tipoCobrancaLabel}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Data: {moment(new Date()).format(\"DD/MM/YYYY\")}\r\n \r\n \r\n \r\n \r\n Hora: {moment(new Date()).format(\"HH:mm:ss\")}\r\n \r\n \r\n \r\n \r\n \r\n \r\n A Vencer\r\n \r\n \r\n Até 30 dias\r\n \r\n \r\n Até 60 dias\r\n \r\n \r\n Até 90 dias\r\n \r\n \r\n Até 120 dias\r\n \r\n \r\n Até 150 dias\r\n \r\n \r\n Até 180 dias\r\n \r\n \r\n Mais de 180 dias\r\n \r\n \r\n Vencidos\r\n \r\n \r\n Total\r\n \r\n {indiceSelecionado === 0 &&\r\n \r\n Indice (+30)\r\n \r\n }\r\n {indiceSelecionado === 1 &&\r\n \r\n Indice (+60)\r\n \r\n }\r\n {indiceSelecionado === 2 &&\r\n \r\n Indice (+90)\r\n \r\n }\r\n {indiceSelecionado === 3 &&\r\n \r\n Indice (+120)\r\n \r\n }\r\n {indiceSelecionado === 4 &&\r\n \r\n Indice (+150)\r\n \r\n }\r\n {indiceSelecionado === 5 &&\r\n \r\n Indice (+180)\r\n \r\n }\r\n \r\n {listaDadosInadimplencia.map((dados) => (\r\n
\r\n \r\n
\r\n {getNomeEmpresa()} / {dados.nomeLocal} \r\n \r\n \r\n CNPJ: {formatarCnpj(dados.cnpjLocal)}\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n {FormatNumber(dados.vlr_AVencer, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate30dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate60dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate90dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate120dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate150dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Ate180dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Acima180dias, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Vencidos, 2)}\r\n \r\n \r\n {FormatNumber(dados.vlr_Total, 2)}\r\n \r\n {indiceSelecionado === 0 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima30dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 1 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima60dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 2 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima90dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 3 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima120dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 4 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima150dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 5 &&\r\n \r\n {FormatNumber(dados.vlr_Indicador_Acima180dias, 2)}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n % {(((dados.vlr_AVencer * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate30dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate60dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate90dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate120dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate150dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Ate180dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Acima180dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n % {(((dados.vlr_Vencidos * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n \r\n \r\n {indiceSelecionado === 0 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima30dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n {indiceSelecionado === 1 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima60dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n {indiceSelecionado === 2 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima90dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n {indiceSelecionado === 3 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima120dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n {indiceSelecionado === 4 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima150dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n {indiceSelecionado === 5 &&\r\n \r\n % {(((dados.vlr_Indicador_Acima180dias * 100) / (dados.vlr_Total > 0 ? dados.vlr_Total : 1)).toFixed(2)).replaceAll(\".\", \",\")}\r\n }\r\n \r\n \r\n\r\n \r\n ))}\r\n \r\n \r\n Totais (R$):\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_AVencer, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate30dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate60dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate90dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate120dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate150dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Ate180dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Acima180dias, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Vencidos, 2)}\r\n \r\n \r\n {FormatNumber(totalizadores.vlr_Total, 2)}\r\n \r\n {indiceSelecionado === 0 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima30dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 1 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima60dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 2 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima90dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 3 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima120dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 4 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima150dias, 2)}\r\n \r\n }\r\n {indiceSelecionado === 5 &&\r\n \r\n {FormatNumber(totalizadores.vlr_Indicador_Acima180dias, 2)}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n )\r\n};","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Layout, Row, Col, Typography, Divider, Radio, Form, Card, Tag, Input, Select, Button, Modal, notification } from \"antd\";\r\nimport { RocketOutlined, ArrowRightOutlined, ShoppingOutlined, EyeOutlined, ArrowLeftOutlined } from \"@ant-design/icons\";\r\nimport ReCAPTCHA from \"react-google-recaptcha\";\r\n\r\nimport { ModalContrato, ModalPlano } from \"../../components/modals/\";\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { consultaCNPJ, removerCarcaterEspecial, textoAleatorio, validaForm } from \"../../services/funcoes\";\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { InputCep, InputCpfCnpj, InputPhone } from \"../../components\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\"\r\n\r\nexport default function NovaEmpresa() {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [listaPlanos, setListaPlanos] = useState([]);\r\n const [recursosPlano, setRecursosPlano] = useState([]);\r\n const [formulario] = Form.useForm();\r\n const [periodoAssinatura, setPeriodoAssinatura] = useState(1);\r\n const [planoSelecionado, setPlanoSelecionado] = useState({});\r\n const [testeGratuito, setTesteGratuito] = useState(false);\r\n const [urlContrato, setUrlContrato] = useState('');\r\n const [dadosNovaEmpresa, setDadosNovaEmpresa] = useState({});\r\n const [informacoes, setInformacoes] = useState({});\r\n const [openModalContrato, setOpenModalContrato] = useState(false);\r\n const [codigoSegurancaContrato, setCodigoSegurancaContrato] = useState('');\r\n const TEST_SITE_KEY = \"6LeoNSQcAAAAANE1sxJTZvTYWXi9rzrNH_LuWf9e\";\r\n const [captcha, setCaptcha] = useState('');\r\n const reCaptchaRef = React.createRef();\r\n const inputEmail = useRef();\r\n const [carregando, setCarregando] = useState(false);\r\n const [cpfCnpj, setCpfCnpj] = useState(null);\r\n const [regimeTributarioFiscal, setRegimeTributarioFiscal] = useState([]);\r\n\r\n const dadosLocalAtivacao = {\r\n loc_id: 10086,\r\n emp_id: 1022,\r\n pla_id: 1\r\n };\r\n\r\n const formasPagamento = {\r\n cartaoCredito: 1,\r\n boleto: 2\r\n };\r\n\r\n const [dadosContrato, setDadosContrato] = useState({\r\n codigoSegurancaContrato: '',\r\n formaPagamento: formasPagamento.boleto,\r\n diaPagamento: 10,\r\n emailEnvioCobranca: '',\r\n periodoAssinatura: 1,\r\n cartaoCredito: {\r\n numero: '',\r\n nome: '',\r\n mesValidade: '',\r\n anoValidade: '',\r\n cvv: '',\r\n dadosTitular: {\r\n cpfCnpj: '',\r\n endereco: {\r\n cep: '',\r\n cidade: '',\r\n uf: '',\r\n logradouro: '',\r\n bairro: '',\r\n numero: '',\r\n complemento: ''\r\n }\r\n }\r\n },\r\n planoId: null\r\n });\r\n\r\n const handleChange = (value) => {\r\n if (value !== null) {\r\n setCaptcha(value);\r\n } else {\r\n setCaptcha('');\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Plano/ListarPlanosAtivos`).then(retornoPlanos => {\r\n let lista = retornoPlanos.data.items.reverse();\r\n lista.forEach((item) => {\r\n item.diferenciais = JSON.parse(item.pla_diferenciais);\r\n });\r\n setListaPlanos(lista);\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }, []);\r\n\r\n function selecionarPlano(plano, teste) {\r\n setPlanoSelecionado(plano);\r\n setTesteGratuito(teste);\r\n setTimeout(() => inputEmail.current.focus(), [500]);\r\n };\r\n\r\n function pesquisaEmail() {\r\n if (!!formulario.getFieldsValue().usu_email) {\r\n api.get(`Usuario/RetornaUsuarioEmail?email=${formulario.getFieldsValue().usu_email}`).then(retornoPesquisaEmail => {\r\n if (!!retornoPesquisaEmail.data) {\r\n formulario.setFieldsValue({ usu_nome: retornoPesquisaEmail.data.usu_nome, usu_email: retornoPesquisaEmail.data.usu_email, usu_id: retornoPesquisaEmail.data.usu_id });\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n };\r\n\r\n function validarCpfCnpj(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length !== 14 && cpfCnpj.length !== 11) {\r\n notification.warning({ message: 'Aviso!', description: 'O CPF/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n } else {\r\n pesquisaCNPJ(cpfCnpj);\r\n }\r\n }\r\n }\r\n\r\n function validarCpfResponsavel(cpfresponsavel) {\r\n if (cpfresponsavel) {\r\n if (cpfresponsavel.length !== 11) {\r\n notification.warning({ message: 'Aviso!', description: 'O CPF do responsável informado é inválido. Deve conter 11 dígitos' });\r\n }\r\n }\r\n }\r\n\r\n function pesquisaCNPJ(cpfCnpj) {\r\n if (!!cpfCnpj) {\r\n api.get(`Local/BuscarLocalCpfCnpj/${cpfCnpj}`).then(\r\n retornoCnpjLocal => {\r\n if (!!retornoCnpjLocal.data || retornoCnpjLocal !== \"\") {\r\n consultaCNPJ(cpfCnpj).then((retorno) => {\r\n if (retorno.status === \"ERROR\") {\r\n api.get(`Empresa/BuscarDadosNovaEmpresa?cpfCnpj=${cpfCnpj}`).then(retornoCnpj => {\r\n if (!!retornoCnpj.data) {\r\n formulario.setFieldsValue({\r\n loc_inscricaoestadual: retornoCnpj.data.pej_inscricaoestadual,\r\n loc_telefone: retornoCnpj.data.psc_numero,\r\n emp_razaosocial: retornoCnpj.data.pes_nome,\r\n emp_nomefantasia: retornoCnpj.data.pej_nomefantasia,\r\n cep_cep: retornoCnpj.data.cep_cep,\r\n log_logradouro: retornoCnpj.data.log_logradouro,\r\n cidade: retornoCnpj.data.cid_descricao + \" / \" + retornoCnpj.data.est_sigla,\r\n loc_numeroestabelecimento: retornoCnpj.data.pee_numero,\r\n bai_nome: retornoCnpj.data.bai_nome,\r\n loc_complemento: retornoCnpj.data.pee_complemento\r\n });\r\n pesquisaInformacoesCep();\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n } else {\r\n formulario.setFieldsValue({\r\n loc_inscricaoestadual: \"\",\r\n loc_telefone: retorno.telefone.replaceAll('(', '').replaceAll(')', '').replaceAll(' ', '').replaceAll('-', ''),\r\n emp_razaosocial: retorno.nome,\r\n emp_nomefantasia: retorno.fantasia,\r\n cep_cep: retorno.cep.replace('.', '').replace('-', ''),\r\n cidade: retorno.municipio + \" / \" + retorno.uf,\r\n loc_numeroestabelecimento: retorno.numero,\r\n bai_nome: retorno.bairro,\r\n loc_complemento: retorno.complemento,\r\n log_logradouro: retorno.logradouro\r\n });\r\n pesquisaInformacoesCep();\r\n }\r\n }, (erro) => {\r\n console.log('ERRO:', erro);\r\n });\r\n } else {\r\n Modal.warning({\r\n title: 'Você já é nosso cliente!',\r\n content: \"Caso não lembre sua senha utilize a opção de 'Esqueci a Senha'\",\r\n onOk() {\r\n window.location = \"/\";\r\n }\r\n });\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n };\r\n\r\n function pesquisaInformacoesCep() {\r\n if (!!formulario.getFieldValue().cep_cep) {\r\n let cep = formulario.getFieldValue().cep_cep.replace('-', '');\r\n api.get(`Cidade/BuscaCidadeCep?cep=${cep}`).then(retornoCep => {\r\n if (!!retornoCep.data[0]) {\r\n formulario.setFieldsValue({\r\n cid_id: retornoCep.data[0].cid_id,\r\n cep: retornoCep.data[0],\r\n cep_cep: retornoCep.data[0].cep_cep,\r\n cidade: retornoCep.data[0].cid_descricao + \" / \" + retornoCep.data[0].est_sigla,\r\n siglaEstado: retornoCep.data[0].est_sigla\r\n });\r\n } else {\r\n pesquisaCepPostmon(cep, false);\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n };\r\n\r\n function pesquisaCepPostmon(cep, possuiCep) {\r\n fetch(`https://api.postmon.com.br/v1/cep/${cep}`).then(\r\n res => res.json()\r\n ).then(\r\n retornoCep => {\r\n if (!possuiCep) {\r\n formulario.setFieldsValue({\r\n cep: {},\r\n cep_cep: retornoCep.cep,\r\n cidade: retornoCep.cidade,\r\n siglaEstado: retornoCep.estado\r\n });\r\n }\r\n }, erro => {\r\n Modal.warning({\r\n content: `Cep (${cep}) não encontrado!`,\r\n });\r\n formulario.setFieldsValue({\r\n cep_cep: '',\r\n cidade: ''\r\n });\r\n }\r\n );\r\n };\r\n\r\n function salvar(values) {\r\n const cpfCnpj = values.loc_cpfCnpj.replace(/\\D/g, '');\r\n if (!(!!values.loc_inscricaoestadual)) {\r\n values.loc_inscricaoestadual = \"ISENTO\";\r\n }\r\n let novaEmpresa = {};\r\n novaEmpresa.usu_email = values.usu_email;\r\n novaEmpresa.usu_nome = values.usu_nome;\r\n novaEmpresa.usu_id = values.usu_id;\r\n novaEmpresa.loc_inscricaoestadual = values.loc_inscricaoestadual;\r\n novaEmpresa.loc_telefone = values.loc_telefone.replaceAll('(', '').replaceAll(')', '').replaceAll('-', '').replaceAll(' ', '');\r\n novaEmpresa.emp_razaosocial = values.emp_razaosocial;\r\n novaEmpresa.emp_nomefantasia = values.emp_nomefantasia;\r\n novaEmpresa.cep_cep = values.cep_cep;\r\n novaEmpresa.est_sigla = values.cep.est_sigla;\r\n novaEmpresa.cid_descricao = values.cep.cid_descricao;\r\n novaEmpresa.log_logradouro = values.log_logradouro;\r\n novaEmpresa.logradouro = values.endereco;\r\n novaEmpresa.bai_nome = values.bai_nome;\r\n novaEmpresa.loc_numeroestabelecimento = values.loc_numeroestabelecimento;\r\n novaEmpresa.loc_complemento = values.loc_complemento;\r\n novaEmpresa.emp_regimetributario = values.emp_regimetributario;\r\n novaEmpresa.enquadramentoFiscal = 3;\r\n novaEmpresa.loc_tipoContribuinte = values.loc_tipoContribuinte;\r\n novaEmpresa.loc_cpfresponsavel = values.loc_cpfresponsavel ? values.loc_cpfresponsavel.replaceAll('.', '').replaceAll('-', '') : \"\";\r\n novaEmpresa.planoSelecionado = {};\r\n novaEmpresa.planoSelecionado.plano = planoSelecionado;\r\n novaEmpresa.pla_id = planoSelecionado.pla_id;\r\n novaEmpresa.pla_numeropdvs = planoSelecionado.pla_numeropdvs;\r\n novaEmpresa.planoSelecionado.testeGratuito = testeGratuito;\r\n novaEmpresa.testegratis = testeGratuito;\r\n if (cpfCnpj.length === 11) {\r\n novaEmpresa.loc_cpf = cpfCnpj\r\n } else if (cpfCnpj.length === 14) {\r\n novaEmpresa.loc_cnpj = cpfCnpj\r\n }\r\n setDadosNovaEmpresa(novaEmpresa);\r\n setCarregando(true);\r\n if (testeGratuito) {\r\n let dados = { ...dadosContrato };\r\n dados.codigoSegurancaContrato = textoAleatorio(4);\r\n dados.periodoAssinatura = periodoAssinatura;\r\n setCodigoSegurancaContrato(dados.codigoSegurancaContrato);\r\n setUrlContrato(`${linkApi}Contrato/gerar?codigoAceitacao=${dados.codigoSegurancaContrato}&localid=${dadosLocalAtivacao.loc_id}&planoId=${planoSelecionado.pla_id}&periodoAssinatura=${periodoAssinatura}&cnpj=${cpfCnpj}`);\r\n setDadosContrato(dados);\r\n setOpenModalContrato(true);\r\n } else {\r\n cadastrarEmpresa(novaEmpresa);\r\n }\r\n };\r\n\r\n function cadastrarEmpresa(novaEmpresa = dadosNovaEmpresa) {\r\n novaEmpresa.captcha = captcha;\r\n api.post(`Empresa/Incluir`, novaEmpresa).then((retornoNovaEmpresa) => {\r\n if (retornoNovaEmpresa.status === 200) {\r\n let informacoes = {};\r\n informacoes.nome = novaEmpresa.usu_nome;\r\n informacoes.email = novaEmpresa.usu_email;\r\n informacoes.chave = retornoNovaEmpresa.data.chave;\r\n informacoes.loc_id = retornoNovaEmpresa.data.loc_id;\r\n informacoes.emp_id = retornoNovaEmpresa.data.emp_id;\r\n informacoes.lcp_id = retornoNovaEmpresa.data.lcp_id;\r\n informacoes.pla_id = planoSelecionado.pla_id;\r\n informacoes.periodoAssinatura = periodoAssinatura;\r\n setInformacoes(informacoes);\r\n\r\n if (testeGratuito) {\r\n api.post(`EnviaEmail/EnviaEmailAtivacaoEmpresa`, informacoes).then((retornoEmail) => {\r\n if (!!retornoEmail) {\r\n Modal.success({\r\n title: 'Quase tudo pronto!',\r\n content: `Acesse o e-mail cadastrado (${novaEmpresa.usu_email}) para ativar sua conta e definir sua senha de acesso.`,\r\n onOk() {\r\n window.location = \"/\";\r\n }\r\n });\r\n }\r\n });\r\n } else {\r\n let dados = { ...dadosContrato };\r\n dados.codigoSegurancaContrato = textoAleatorio(4);\r\n dados.periodoAssinatura = periodoAssinatura;\r\n setCodigoSegurancaContrato(dados.codigoSegurancaContrato);\r\n setUrlContrato(`${linkApi}Contrato/Gerar?codigoAceitacao=${dados.codigoSegurancaContrato}&localId=${informacoes.loc_id}&planoId=${informacoes.pla_id}&periodoAssinatura=${periodoAssinatura}&cnpj=${novaEmpresa.loc_cnpj ? novaEmpresa.loc_cnpj : novaEmpresa.loc_cpf}`);\r\n dados.emailEnvioCobranca = informacoes.email;\r\n dados.planoId = informacoes.pla_id;\r\n setDadosContrato(dados);\r\n setOpenModalContrato(true);\r\n }\r\n }\r\n }).catch(err => {\r\n Modal.error({\r\n title: 'Não foi possível incluir a empresa!',\r\n content: (\r\n
{err.response.data.Message}
\r\n ),\r\n onOk() {\r\n setOpenModalContrato(false);\r\n }\r\n });\r\n }).finally(() => {\r\n setCarregando(false);\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!openModalContrato) {\r\n setCarregando(false);\r\n }\r\n }, [openModalContrato]);\r\n\r\n function assinarContrato(periodoTeste = false) {\r\n dadosContrato.periodoTeste = periodoTeste;\r\n dadosContrato.localId = informacoes.loc_id;\r\n api.post(`Assinatura/AssinarPlano`, dadosContrato).then(\r\n (retornoAssinatura) => {\r\n if (retornoAssinatura.status === 200) {\r\n api.post(`EnviaEmail/EnviaEmailAtivacaoEmpresa`, informacoes).then(\r\n (retornoEmail) => {\r\n if (retornoEmail.status === 200) {\r\n Modal.success({\r\n title: 'Quase tudo pronto!',\r\n content: `Acesse o e-mail cadastrado ('${informacoes.email}') para ativar sua conta e definir sua senha de acesso.`,\r\n onOk() {\r\n window.location = \"/\";\r\n }\r\n });\r\n } else {\r\n console.log('Erro envio Email:', retornoEmail)\r\n }\r\n }).catch(\r\n err => {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi enviar e-mail de ativação!
\r\n \r\n ),\r\n });\r\n }\r\n );\r\n } else {\r\n console.log('Erro EnviaEmailAtivacaoEmpresa:', retornoAssinatura)\r\n Modal.success({\r\n title: 'Assinatura realizada com sucesso!',\r\n onOk() {\r\n window.location = \"/\";\r\n }\r\n });\r\n }\r\n }\r\n ).catch(\r\n err => {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi possível realizar a assinatura!
\r\n \r\n ),\r\n });\r\n }\r\n );\r\n };\r\n\r\n function validarRazaoSocial() {\r\n let razao = formulario.getFieldValue().emp_razaosocial;\r\n razao = removerCarcaterEspecial(razao);\r\n formulario.setFieldsValue({ emp_razaosocial: razao });\r\n };\r\n\r\n function fecharModalContrato() {\r\n assinarContrato(true);\r\n setOpenModalContrato(false);\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n \"Gestor\r\n \r\n \r\n \r\n \r\n {JSON.stringify(planoSelecionado) === \"{}\" &&\r\n
\r\n \r\n
\r\n \r\n \"Planos\" Planos\r\n \r\n Abaixo selecione o plano mais adequado às necessidades de sua empresa. \r\n \r\n \r\n \r\n \r\n Período da Assinatura\r\n \r\n \r\n \r\n { setPeriodoAssinatura(e.target.value) }} size=\"large\" optionType=\"button\" buttonStyle=\"solid\" defaultValue={1} options={[{ label: 'Mensal', value: 1 }]} />\r\n \r\n \r\n \r\n
\r\n \r\n {listaPlanos.map((plano) => (\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {plano.pla_nome}\r\n \r\n
\r\n \r\n \r\n \r\n {/* \r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {periodoAssinatura === 1 ? FormatNumber(plano.pla_valor, true, false) : FormatNumber(((plano.pla_valor - (plano.pla_valor * 0.1)) * 12), true, false)}\r\n \r\n \r\n \r\n {periodoAssinatura === 1 ? 'ao Mês' : 'ao Ano'} | Por CNPJ\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n setOpenModal(false)} recursosPlano={recursosPlano} />\r\n \r\n }\r\n {JSON.stringify(planoSelecionado) !== \"{}\" &&\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Você escolheu o Plano:\r\n \r\n \r\n \r\n
\r\n \r\n {planoSelecionado.pla_nome}\r\n \r\n
\r\n \r\n \r\n {testeGratuito && \r\n \r\n \r\n Teste gratuito de 15 dias\r\n \r\n \r\n }\r\n \r\n {/* \r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {periodoAssinatura === 1 ? FormatNumber(planoSelecionado.pla_valor, true, false) : FormatNumber(((planoSelecionado.pla_valor - (planoSelecionado.pla_valor * 0.1)) * 12), true, false)}\r\n \r\n \r\n \r\n {periodoAssinatura === 1 ? 'ao Mês' : 'ao Ano'}\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \"Usuário\" Usuário\r\n \r\n Informe abaixo os dados do Usuário. \r\n \r\n \r\n \r\n \r\n \r\n pesquisaEmail()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"Empresa\" Empresa\r\n \r\n Informe abaixo os dados do Empresa. \r\n \r\n \r\n \r\n \r\n \r\n validarCpfCnpj(valor.currentTarget.value.replace(/\\D/g, '')) }\r\n onChange={(event) => {\r\n setCpfCnpj(event.target.value);\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(cpfCnpj && cpfCnpj.replace(/\\D/g, '').length > 11 )&& \r\n \r\n validarCpfResponsavel(value.currentTarget.value.replace(/\\D/g, ''))} />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { validarRazaoSocial() }} />\r\n \r\n \r\n \r\n \r\n < Input placeholder=\"Informe a Nome Fantasia\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n * No momento estamos atendento apenas empresas do Simples Nacional.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n pesquisaInformacoesCep('', true)} />\r\n \r\n \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { pesquisaBairro() }} */ />\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"Cobrança/Faturamento\" Cobrança/Faturamento\r\n \r\n Informações referente a cobrança e faturamento de sua assinatura. \r\n \r\n \r\n \r\n \r\n {testeGratuito ?\r\n \r\n Não existe cobrança para o periodo de testes de 15 dias.\r\n

Se você assinar o plano após o período de teste, a cobrança será via Boleto Bancário com vencimento dia 10 de cada mês.

\r\n :\r\n \r\n Cobrança via Boleto Bancário com vencimento dia 10 de cada mês.\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {testeGratuito ? :\r\n }\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n fecharModalContrato()} urlContrato={urlContrato} testeGratuito={testeGratuito} cadastrarEmpresa={cadastrarEmpresa} assinarContrato={assinarContrato} codigoSeguranca={codigoSegurancaContrato} />\r\n
\r\n \r\n \r\n
\r\n comercial.gestor@abase.com.br \r\n \r\n \r\n (55) 3535-4922\r\n \r\n \r\n www.gestorweb.com.br \r\n \r\n \r\n Copyright © Gestor Web\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Layout, Row, Col, Form, Input, Button, Typography, Modal } from 'antd';\r\nimport { UnlockFilled, SendOutlined } from '@ant-design/icons';\r\n\r\nimport { SlideLogin } from \"../../components\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function AtivarUsuarioPlano() {\r\n const [dadosUsuario, setDadosUsuario] = useState({});\r\n const [senhaValida, setSenhaValida] = useState(false);\r\n const [form] = Form.useForm();\r\n\r\n useEffect(() => {\r\n carregarUsuario();\r\n }, []);\r\n\r\n function carregarUsuario() {\r\n let url = window.location.href;\r\n let dadosUsuario = atob(url.substr(url.lastIndexOf('/') + 1)).split('|');\r\n api.get(`Usuario/RetornaUsuarioEmail?email=${dadosUsuario[0]}`).then(\r\n res => {\r\n if (!!res.data) {\r\n if (!!res.data.usu_ativo) {\r\n ativarEmpresaLocal();\r\n Modal.warning({\r\n title: 'Atenção!',\r\n content: 'Usuário já está ativo! caso não lembre sua senha clique em \"Esqueci minha senha\"',\r\n onOk() {\r\n voltarLogin();\r\n }\r\n });\r\n } else {\r\n setDadosUsuario(res.data)\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n function ativarEmpresaLocal() {\r\n let url = window.location.href;\r\n let dadosUsuario = atob(url.substr(url.lastIndexOf('/') + 1)).split('|');\r\n let dados = {\r\n email: dadosUsuario[0],\r\n senha: null\r\n };\r\n api.post(`Empresa/AtivarNovaEmpresa`, dados).then(\r\n res => {\r\n console.log(res);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n function ativarUsuario() {\r\n let url = window.location.href;\r\n let dadosUsuario = atob(url.substr(url.lastIndexOf('/') + 1)).split('|');\r\n \r\n let dados = {\r\n email: dadosUsuario[0],\r\n senha: btoa(form.getFieldValue().usu_senha)\r\n };\r\n api.post(`Empresa/AtivarNovaEmpresa`, dados).then(\r\n res => {\r\n Modal.success({\r\n title: 'Aviso!',\r\n content: 'Sua conta foi ativada com sucesso!',\r\n onOk() {\r\n voltarLogin();\r\n }\r\n });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarSenha() {\r\n let usu_senha = '';\r\n let usu_confirmaSenha = '';\r\n if (!!form.getFieldValue().usu_senha) {\r\n usu_senha = form.getFieldValue().usu_senha.trim();\r\n }\r\n if (!!form.getFieldValue().usu_confirmaSenha) {\r\n usu_confirmaSenha = form.getFieldValue().usu_confirmaSenha.trim();\r\n }\r\n\r\n form.setFieldsValue({ usu_senha: usu_senha, usu_confirmaSenha: usu_confirmaSenha });\r\n if (usu_senha.length >= 6 && usu_senha === usu_confirmaSenha) {\r\n let letrasMinusculas = /[a-z]+/.test(usu_senha);\r\n let letrasMaiusculas = /[A-Z]+/.test(usu_senha);\r\n let numeros = /[0-9]+/.test(usu_senha);\r\n if (letrasMinusculas && letrasMaiusculas && numeros) {\r\n setSenhaValida(true);\r\n } else {\r\n setSenhaValida(false);\r\n }\r\n } else {\r\n setSenhaValida(false);\r\n }\r\n };\r\n\r\n function voltarLogin() {\r\n window.location = '/';\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n Olá {dadosUsuario.usu_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Antes de ativar sua conta, precisamos definir sua senha de acesso.
\r\n A senha deve atender os seguintes requisitos:

\r\n
\r\n \r\n \r\n 1. Mínimo de 6 caracteres;\r\n \r\n \r\n 2. Deve conter números e letras (maiúsculas e minúsculas);\r\n \r\n \r\n \r\n \r\n \r\n } onChange={() => { validarSenha() }} />\r\n \r\n \r\n \r\n \r\n } onChange={() => { validarSenha() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { notification } from 'antd';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\nimport { EditorCamposPersonalizados, FormGW } from '../../components';\r\n\r\nexport default function CamposPersonalizados({formulario, carregando, aoSalvar, tipoEntidade}) {\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [ elementosFormulario, setElementosFormulario ] = useState([]);\r\n\r\n const salvarManutencao = values => {\r\n carregando(true);\r\n console.log(\"valores Salvar: \"+{values});\r\n let elementosOrdem=[]\r\n elementosFormulario.map((elemento, indice) =>{\r\n if (elemento.cap_ordem != (indice+1)){\r\n elemento.cap_ordem = (indice+1)\r\n !!elemento.status==false?elemento.status = 1 : elemento.status = elemento.status\r\n }\r\n elemento.cap_tipoentidade = tipoEntidade;\r\n elementosOrdem.push(elemento)\r\n })\r\n console.log({elementosOrdem});\r\n api.post(`CamposPersonalizados/Salvar`, elementosOrdem).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Campos Personalizados Salvos com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro.response.status);\r\n notification.error({ message: 'Erro ao Gravar Campos Personalizados.', description: JSON.stringify(erro.response.status == 500?`Campo personalizado possui vínculo com outra informação! `:erro.response) \r\n });\r\n carregando(false);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: listagem.ordem } });\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n };\r\n\r\n useEffect(() => setElementosFormulario(manutencao.dados),[!!manutencao.dados]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n}","import React,{ useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nimport Manutencao from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\n\r\nexport default function DrawerPersonalizacao({tipoEntidade, carregaCamposPersonalizados}) {\r\n\r\n const [ formFormulario ] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n const [ entidade, setEntidade ] = useState(\"\");\r\n const idRel = 0\r\n \r\n \r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n formFormulario.resetFields();\r\n carregaCamposPersonalizados();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() =>{\r\n console.log({tipoEntidade});\r\n switch (tipoEntidade) {\r\n case \"1\": \r\n setEntidade(\"Cliente\");\r\n break;\r\n case \"2\": \r\n setEntidade(\"Fornecedor\");\r\n break;\r\n default: \r\n setEntidade(\"Outros\");\r\n };\r\n },[]);\r\n\r\n useEffect(() =>{\r\n if (manutencao.dados !== null) {\r\n formFormulario.setFieldsValue(manutencao.dados);\r\n console.log(\"manutenção\",manutencao.dados);\r\n } else {\r\n formFormulario.resetFields();\r\n }\r\n },[!!manutencao.dados])\r\n\r\n return (\r\n\r\n }\r\n destroyOnClose\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Row, Col, Button, Tag, Table, Tabs, Divider } from 'antd';\r\nimport { EditOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport DrawerPersonalizacao from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbAbrirChamado } from \"../../components\";\r\n\r\nexport default function CamposPersonalizados() {\r\n const [ abaSelecionada, setAbaSelecionada ] = useState(\"1\");\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [ camposPersonalizados, setCamposPersonalizados ] = useState([]);\r\n\r\n function editarCamposPersonalizados(valores) {\r\n var camposPersonalizadosTemp = [];\r\n valores.map((data, idx) => {\r\n delete(data.key);\r\n data.key = idx;\r\n data.status = 2;\r\n camposPersonalizadosTemp.push(data)\r\n });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: camposPersonalizadosTemp } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n console.log(res);\r\n if (res.status === 200) {\r\n var camposPersonalizadosTemp = [];\r\n res.data.items.map((data, idx) => {\r\n data.key = idx;\r\n data.status = 2;\r\n camposPersonalizadosTemp.push(data)\r\n });\r\n setCamposPersonalizados(camposPersonalizadosTemp);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n const ListaCamposPersonalizados = (dataSource) => {\r\n return (\r\n
\r\n
(\r\n \r\n {cap_ordem}\r\n \r\n )\r\n },\r\n {\r\n title: 'Nome Elemento',\r\n render: ({cap_nomeelemento}) => (\r\n
\r\n {cap_nomeelemento}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Tipo Elemento',\r\n render: ({cap_tipoelemento}) => (\r\n
\r\n {cap_tipoelemento}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Obrigatorio',\r\n align: 'right',\r\n width: 80,\r\n render: ({cap_mensagemobrigatorio}) => (\r\n
\r\n {cap_mensagemobrigatorio ? \"SIM\":\"NÃO\"}\r\n
\r\n )\r\n },\r\n \r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n useEffect(() => carregaCamposPersonalizados() , []);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 1 ))}\r\n \r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 2 ))}\r\n \r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 3 ))}\r\n \r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 4 ))}\r\n \r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 5 ))}\r\n \r\n \r\n {ListaCamposPersonalizados(camposPersonalizados.filter(f => f.cap_tipoentidade == 6 ))}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Planos } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\n\r\n\r\nexport default function RenovarPlano() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n \r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, Card, Input, Select, notification } from \"antd\";\r\nimport { CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormGW, SelectProduto } from \"../../components\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoFornecedorProduto({ form, carregando, aoSalvar, editando }) {\r\n const [{ ui, manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [editandoRegistro, setEditandoRegistro] = useState(false);\r\n const [filtroProd, setFiltroProd] = useState('')\r\n\r\n const salvarManutencao = values => {\r\n let retornoDrawer = []\r\n let enderecoUrl = 'FornecedorProduto/';\r\n let listaProdutos = [...listaSelectPaginacao?.itens];\r\n let produto = listaProdutos.filter((pro) => pro.key === form.getFieldValue().pro_id)[0];\r\n if (!!!produto && !isObjetoDiffVazio(produto)) {\r\n return;\r\n }\r\n values.pro_id = produto.pro_id;\r\n values.prg_id = produto.prg_id;\r\n if (!!values.fpr_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(\r\n res => {\r\n retornoDrawer = res.data;\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(\r\n () => {\r\n aoSalvar(retornoDrawer);\r\n });\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n\r\n api.post(enderecoUrl, values).then(\r\n res => {\r\n retornoDrawer = res.data;\r\n notification.success({ message: 'Operação concluída', description: \"Os dados foram salvos com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n aoSalvar(retornoDrawer);\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n let lista = [];\r\n if (!!manutencao.dados.for_id) {\r\n lista.push({ name: \"for_id\", campo: \"FornecedorId\", value: manutencao.dados.for_id });\r\n }\r\n if (!!manutencao.dados.pro_id) {\r\n if (!!manutencao.dados.prg_id) {\r\n lista.push({ name: \"pro_id\", campo: \"IdGrade\", value: manutencao.dados.prg_id });\r\n } else {\r\n lista.push({ name: \"pro_id\", campo: \"IdProduto\", value: manutencao.dados.pro_id });\r\n }\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n function editarRegistro() {\r\n setEditandoRegistro(true);\r\n };\r\n\r\n function buscarProdutoFornecedor() {\r\n let listaProdutos = [...listaSelectPaginacao?.itens];\r\n let produto = listaProdutos.filter((pro) => pro.key === form.getFieldValue().pro_id)[0];\r\n if (!!!produto && !isObjetoDiffVazio(produto)) {\r\n return;\r\n }\r\n let forId = form.getFieldValue().for_id;\r\n let parametro = \"\";\r\n if (!!produto && isObjetoDiffVazio(produto) && !!produto.prg_id) parametro = \"&GradeId=\" + produto.prg_id;\r\n api.get(`FornecedorProduto/Listar?FornecedorId=${forId}&ProdutoId=${produto.pro_id}` + parametro).then(\r\n res => {\r\n if (res.data.items.length > 0) {\r\n let dados = res.data.items[0];\r\n form.setFieldsValue({ fpr_id: dados.fpr_id, fpr_codigo: dados.fpr_codigo, fpr_descricao: dados.fpr_descricao });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n \r\n {!editandoRegistro &&\r\n \r\n
\r\n \r\n { buscarProdutoFornecedor() }} conteudo={\r\n forn => ({forn.for_codigo} - {forn.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n { buscarProdutoFornecedor() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {editandoRegistro &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Form, Row, Col, Button, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoFornecedorProduto from './manutencao';\r\nimport { drawerActions, listagemActions } from '../../actions';\r\n\r\nexport default function DrawerFornecedorProduto() {\r\n const [formFornecedorProduto] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [edit, setEdit] = useState(false);\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados && !edit) {\r\n if (!!manutencao.dados.for_id) {\r\n setEdit(true);\r\n }\r\n formFornecedorProduto.setFieldsValue(manutencao.dados);\r\n } else {\r\n formFornecedorProduto.setFieldsValue({ cli_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n formFornecedorProduto.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n setEdit(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n fecharDrawer={() => { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, notification, Modal } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerFornecedorProduto from './drawer';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { PesquisaOrdenacao, TabelaDados, BreadcrumbAbrirChamado, Editar, Excluir } from \"../../components\";\r\n\r\nexport default function RelacionamentoFornecedorProduto() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', ordem: '+pes_nome' } })\r\n }, []);\r\n\r\n function editarRegistro(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function modalExcluirRegistro(record) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Deseja realmente excluir este registro?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(record) {\r\n api.delete(`fornecedorProduto/Excluir/${record.fpr_id}`).then(\r\n res => {\r\n notification.success({ description: 'Registro excluído com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Produto',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cód. Prod./Fornec.',\r\n width: 150,\r\n align: 'center',\r\n render: ({fpr_codigo }) => (\r\n
\r\n {fpr_codigo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Fornecedor',\r\n render: ({for_codigo, pes_nome }) => (\r\n
\r\n {for_codigo}-{pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Último Custo (R$)',\r\n align: 'right',\r\n width: 150,\r\n render: ({ ultimocusto }) => (\r\n
\r\n {FormatNumber(ultimocusto, true)}\r\n
\r\n ),\r\n }, {\r\n\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n } onClick={() => {\r\n editarRegistro(record);\r\n }}/>\r\n \r\n \r\n } onClick={() => {\r\n modalExcluirRegistro(record)\r\n }}/>\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Select } from \"antd\";\r\nimport api from \"../../services/api\";\r\nimport { InputCep } from \"../../components\";\r\n\r\nexport default function TabEndereco({ formulario, listaTipoEndereco, cidade, setCidade, listaPais }) {\r\n\r\n const [openDropdown, setOpenDropdown] = useState(false);\r\n\r\n function verificaCep(cep) {\r\n if (!!cep) {\r\n api.get(`Cidade/ListarCidadeCep?Cep=${cep.match(/\\d+/g).join('')}`).then(\r\n res => {\r\n formulario.setFieldsValue({ cid_descricao: res.data.length > 0 ? res.data[0].cid_descricao : '' });\r\n setCidade(res.data[0]);\r\n formulario.setFieldsValue({ est_sigla: res.data.length > 0 ? res.data[0].est_sigla : '' });\r\n }\r\n )\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {listaPais.map(pais => (\r\n {pais.pse_nome}\r\n ))}\r\n \r\n \r\n \r\n \r\n verificaCep(cep.target.value)} onPressEnter={(cep) => verificaCep(cep.target.value)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { setOpenDropdown(true) }}\r\n onBlur={() => setOpenDropdown(false)}\r\n onSelect={() => setOpenDropdown(false)}\r\n allowClear\r\n showSearch\r\n open={openDropdown}\r\n optionFilterProp=\"children\"\r\n placeholder=\"Informe o Tipo de Endereço\">\r\n {listaTipoEndereco.map((te) => (\r\n {te.tpe_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n MAPA\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Checkbox, Input, Select, Slider, notification, Tabs, Typography, Divider } from \"antd\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nimport api from \"../../services/api\";\r\nimport TabEndereco from './tabEndereco';\r\nimport { useStateValue } from '../../state';\r\nimport { InputPreco, InputPhone, SelectPaginado } from \"../../components\";\r\n\r\nexport default function ManutencaoRestaurante({ formulario, aoSalvar, carregando }) {\r\n\r\n const valueMaximo = 10;\r\n const inputRef = React.createRef();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [listaTipoRestaurante, setListaTipoRestaurante] = useState([]);\r\n const [valorPreferencia, setValorPreferencia] = useState(0);\r\n const [valuePreferenciaSlider, setValuePreferenciaSlider] = useState(0);\r\n const [listaTiposEndereco, setListaTiposEndereco] = useState([]);\r\n const [tiposContatos, setTiposContatos] = useState([]);\r\n const [cidade, setCidade] = useState({});\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [listaPais, setListaPais] = useState([]);\r\n const handleChange = (value) => {\r\n setValorPreferencia(value);\r\n setValuePreferenciaSlider(value);\r\n };\r\n\r\n function carregarDados() {\r\n api.get('Enum/Listar?nome=TipoRestaurante').then(\r\n res => {\r\n setListaTipoRestaurante(res.data);\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n });\r\n api.get(`TipoEndereco/Listar`).then(\r\n res => {\r\n setListaTiposEndereco(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n api.get(`TipoOutroContato/Listar`).then(\r\n res => {\r\n setTiposContatos(res.data);\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n api.get(`Pais/Listar`).then(\r\n res => {\r\n setListaPais(res.data);\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n }\r\n\r\n function salvarManutencao(values) {\r\n let operacao = !!values.res_id ? 'Editar' : 'Incluir';\r\n let coordenadas = !!values.coordenadas ? values.coordenadas.split(',') : ['', ''];\r\n let enderecoTemp = {\r\n cep_cep: values.cep_cep,\r\n cid_descricao: values.cid_descricao,\r\n est_sigla: values.est_sigla,\r\n log_logradouro: values.log_logradouro,\r\n pee_complemento: values.pee_complemento,\r\n pee_localreferencia: values.pee_localreferencia,\r\n pee_numero: values.pee_numero,\r\n tpe_id: values.tpe_id,\r\n bai_nome: values.bai_nome,\r\n pee_enderecoprincipal: true,\r\n pee_latitude: coordenadas[0],\r\n pee_longitude: coordenadas[1]\r\n }\r\n let telefoneTemp = {\r\n psc_numero: values.psc_numero,\r\n tpt_id: values.tpt_id,\r\n psc_ramal: values.psc_ramal\r\n\r\n }\r\n let emailTemp = {\r\n pem_email: values.pem_email,\r\n pem_emailprincipal: true,\r\n pem_ativo: true\r\n }\r\n let outroContato = {\r\n toc_id: 3,\r\n out_ativo: true,\r\n out_descricao: values.res_site\r\n }\r\n values.OutrosContatos = !!values.res_site ? [outroContato] : [];\r\n values.Emails = !!values.pem_email ? [emailTemp] : [];\r\n values.Enderecos = [enderecoTemp];\r\n values.Telefones = [telefoneTemp];\r\n values.cpfCnpj = values.cpfCnpj.replaceAll('-', '').replaceAll('/', '').replaceAll('.', '');\r\n values.pes_fisicajuridica = values.cpfCnpj.length <= 11 ? 1 : 2;\r\n values.res_notaavaliacao = valuePreferenciaSlider;\r\n values.pej_databaixasefaz = !!values.pej_databaixasefaz ? values.pej_databaixasefaz : null;\r\n values.pej_baixadoreceita = !!values.pej_baixadoreceita ? values.pej_baixadoreceita : false;\r\n if (!!values.cpfCnpj) {\r\n if (values.pes_fisicajuridica === 1) {\r\n values.pef_cpf = values.cpfCnpj.replace(/\\D/g, '');\r\n values.pef_rguf = values.Enderecos.filter((end) => (end.pee_enderecoprincipal === true))[0].est_sigla;\r\n } else {\r\n values.pej_cnpj = values.cpfCnpj.replace(/\\D/g, '');\r\n values.pej_inscuf = values.Enderecos.filter((end) => (end.pee_enderecoprincipal === true))[0].est_sigla;\r\n }\r\n }\r\n carregando(true);\r\n api.post(`Restaurante/${operacao}`, values).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Restaurante ${operacao === 'Editar' ? 'editado' : 'incluido'} com sucesso!` });\r\n }\r\n ).catch(\r\n error => {\r\n notification.warning({ message: `Aviso!`, description: `Erro ao ${operacao === 'Editar' ? 'editar' : 'incluir'} o Restaurante` });\r\n }\r\n ).finally(() => {\r\n aoSalvar();\r\n })\r\n\r\n }\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n setDesabilitarCpfCnpj(!!manutencao.dados && !!manutencao.dados.cpfCnpj ? true : false);\r\n setValorPreferencia(!!manutencao.dados && !!manutencao.dados.res_notaavaliacao ? manutencao.dados.res_notaavaliacao : 0);\r\n setValuePreferenciaSlider(!!manutencao.dados && !!manutencao.dados.res_notaavaliacao ? manutencao.dados.res_notaavaliacao : 0);\r\n manutencao.dados.res_site = manutencao.dados.out_descricao;\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [])\r\n\r\n return (\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaTipoRestaurante.map((tr) => (\r\n {tr.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Almoço \r\n \r\n \r\n \r\n \r\n Jantar \r\n \r\n \r\n \r\n \r\n Café da Manhã \r\n \r\n \r\n \r\n \r\n Ativo \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Telefone(s)\" Telefone(s)\r\n \r\n \r\n Adicione o(s) telefone(s) do cliente aqui.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({tp.tpt_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoRestaurante from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerRestaurante() {\r\n\r\n const [ formularioRestaurante ] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) {\r\n formularioRestaurante.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+res_id' } });\r\n setCarregando(false);\r\n formularioRestaurante.resetFields();\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, notification, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CheckOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport DrawerRestaurante from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, FormatNumber } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, Editar, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\n\r\nexport default function Restaurante() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaTiposRestaurante, setListaTiposRestaurantes] = useState([]);\r\n\r\n function excluirRegistro(record) {\r\n api.post(`Restaurante/Excluir?codigoRestaurante=${record.res_id}`).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n }).catch((erro) => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+res_id' } });\r\n });\r\n }\r\n\r\n function carregarDados() {\r\n api.get('Enum/Listar?nome=TipoRestaurante').then(\r\n res => {\r\n setListaTiposRestaurantes(res.data);\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n });\r\n }\r\n\r\n function editarRestaurante(record) {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n record.cpfCnpj = !!record.pef_cpf ? record.pef_cpf : record.pej_cnpj;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n }\r\n\r\n function modalExcluir(record) {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+res_id' } })\r\n carregarDados();\r\n }, [])\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 105,\r\n render: ({ psc_numero }) => (\r\n
\r\n {psc_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro }) => (\r\n
\r\n {log_logradouro || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Preferência',\r\n align: 'center',\r\n render: ({ res_notaavaliacao }) => (\r\n
\r\n {res_notaavaliacao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Buffet Livre (R$)',\r\n align: 'right',\r\n render: ({ res_preco_buffetlivre }) => (\r\n
\r\n {FormatNumber(!!res_preco_buffetlivre ? res_preco_buffetlivre : 0, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor por KG (R$)',\r\n align: 'right',\r\n render: ({ res_preco_kg }) => (\r\n
\r\n {FormatNumber(!!res_preco_kg ? res_preco_kg : 0, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo',\r\n render: ({ res_tipo }) => (\r\n
\r\n {res_tipo ? listaTiposRestaurante.filter(res => (res.res_tipo = res_tipo))[0].value : 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Café da Manhã',\r\n align: 'center',\r\n width: 105,\r\n render: ({ res_cafemanha }) => (\r\n
\r\n {!!res_cafemanha ? : }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Almoço',\r\n align: 'center',\r\n width: 58,\r\n render: ({ res_almoco }) => (\r\n
\r\n {!!res_almoco ? : }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Jantar',\r\n align: 'center',\r\n width: 55,\r\n render: ({ res_janta }) => (\r\n
\r\n {!!res_janta ? : }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n width: 65,\r\n align: 'center',\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {listaPaises.map((lp) => (\r\n {lp.pse_nome}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaTipoEndereco.map((lte) => (\r\n {lte.tpe_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n MAPA\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Checkbox, Input, Select, Slider, notification, Tabs, Typography, Divider } from \"antd\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nimport api from \"../../services/api\";\r\nimport TabEndereco from './tabEndereco';\r\nimport { useStateValue } from '../../state';\r\nimport { InputPhone, InputPreco, SelectPaginado } from \"../../components\";\r\n\r\nexport default function ManutencaoHotel({ formulario, aoSalvar, carregando }) {\r\n\r\n const valueMaximo = 10;\r\n const inputRef = React.createRef();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [valorPreferencia, setValorPreferencia] = useState(0);\r\n const [valuePreferenciaSlider, setValuePreferenciaSlider] = useState(0);\r\n const [listaTipoHotel, setListaTipoHotel] = useState([]);\r\n const [listaTipoEndereco, setListaTipoEndereco] = useState([]);\r\n const [listaPais, setListaPais] = useState([]);\r\n\r\n const handleChange = (value) => {\r\n setValorPreferencia(value);\r\n setValuePreferenciaSlider(value);\r\n };\r\n\r\n function salvarManutencao(values) {\r\n let operacao = !!values.hot_id ? 'Editar' : 'Incluir';\r\n let coordenadas = !!values.coordenadas ? values.coordenadas.split(',') : ['', ''];\r\n let enderecoTemp = {\r\n cep_cep: values.cep_cep,\r\n cid_descricao: values.cid_descricao,\r\n est_sigla: values.est_sigla,\r\n log_logradouro: values.log_logradouro,\r\n pee_complemento: values.pee_complemento,\r\n pee_localreferencia: values.pee_localreferencia,\r\n pee_numero: values.pee_numero,\r\n tpe_id: values.tpe_id,\r\n bai_nome: values.bai_nome,\r\n pee_enderecoprincipal: true,\r\n pee_latitude: coordenadas[0],\r\n pee_longitude: coordenadas[1]\r\n }\r\n let telefoneTemp = {\r\n psc_numero: values.psc_numero,\r\n tpt_id: values.tpt_id,\r\n psc_ramal: values.psc_ramal\r\n\r\n }\r\n let emailTemp = {\r\n pem_email: values.pem_email,\r\n pem_emailprincipal: true,\r\n pem_ativo: true\r\n }\r\n let outroContato = {\r\n toc_id: 3,\r\n out_ativo: true,\r\n out_descricao: values.out_descricao\r\n }\r\n values.OutrosContatos = !!values.out_descricao ? [outroContato] : [];\r\n values.Emails = !!values.pem_email ? [emailTemp] : [];\r\n values.Enderecos = [enderecoTemp];\r\n values.Telefones = [telefoneTemp];\r\n values.hot_nota_avaliacao = valuePreferenciaSlider;\r\n\r\n\r\n api.post(`Hotel/${operacao}`, values).then(res => {\r\n notification.success({ message: 'Sucesso!', description: `Hotel ${operacao === 'Editar' ? 'editado' : 'incluido'} com sucesso!` });\r\n }).catch(\r\n error => {\r\n notification.warn({ message: 'Aviso!', description: `Erro ao ${operacao === 'Editar' ? 'editar' : 'incluir'} o hotel!` });\r\n console.log(error);\r\n }\r\n ).finally(() => {\r\n aoSalvar();\r\n })\r\n }\r\n\r\n function carregarDados() {\r\n api.get('Enum/Listar?nome=TipoHotel').then(\r\n res => {\r\n setListaTipoHotel(res.data);\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n });\r\n api.get(`TipoEndereco/Listar`).then(\r\n res => {\r\n setListaTipoEndereco(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n api.get(`Pais/Listar`).then(\r\n res => {\r\n setListaPais(res.data);\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n }\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n manutencao.dados.coordenadas = !!manutencao.dados.pee_latitude && !!manutencao.dados.pee_longitude ? manutencao.dados.pee_latitude + ',' + manutencao.dados.pee_longitude : '';\r\n formulario.setFieldsValue(manutencao.dados);\r\n setValorPreferencia(!!manutencao.dados.hot_nota_avaliacao ? manutencao.dados.hot_nota_avaliacao : 0);\r\n setValuePreferenciaSlider(!!manutencao.dados.hot_nota_avaliacao ? manutencao.dados.hot_nota_avaliacao : 0);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [])\r\n\r\n return (\r\n
\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaTipoHotel.map((th) => (\r\n {th.value}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ativo \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Telefone(s)\" Telefone(s)\r\n \r\n \r\n Adicione o(s) telefone(s) do cliente aqui.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({tp.tpt_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport ManutencaoHotel from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerHotel() {\r\n\r\n const [formularioHotel] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n if (manutencao.dados !== null) {\r\n formularioHotel.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formularioHotel.setFieldsValue({ id: null });\r\n }\r\n\r\n function fecharDrawer() {\r\n formularioHotel.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { ordem: '+id' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, notification, Modal, Input } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, EnvironmentOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport DrawerHotel from \"./drawer\";\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { ModalMapa } from \"../../components/modals\";\r\nimport { FormatFone, FormatNumber } from \"../../ValueObjects\";\r\nimport { drawerActions, manutencaoActions, listagemActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\n\r\nexport default function Hotel() {\r\n\r\n const [formHotel] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModalMapa, setOpenModalMapa] = useState(false);\r\n \r\n function excluirRegistro(id) {\r\n api.delete(`/Hotel/${id}`).then((res) => {\r\n notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n }).catch(erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+Descricao' } })\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+hot_id' } });\r\n }, [])\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo',\r\n width: 115,\r\n render: ({ hot_tipo }) => (\r\n
\r\n {hot_tipo === 1 ? 'Hotel' : (hot_tipo === 2 ? 'Airbnb' : 'Não Informado')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 110,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ log_logradouro, bai_nome, cid_descricao, pee_numero, est_sigla }) => (\r\n
\r\n {log_logradouro + `, ${pee_numero}` + `, ${bai_nome}` + `, ${cid_descricao}` + `, ${est_sigla}`}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Standard (R$)',\r\n align: 'right',\r\n width: 130,\r\n render: ({ hot_preco_standard }) => (\r\n
\r\n {FormatNumber(!!hot_preco_standard ? hot_preco_standard : 0, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Duplo (R$)',\r\n align: 'right',\r\n width: 130,\r\n render: ({ hot_preco_duplo }) => (\r\n
\r\n {FormatNumber(!!hot_preco_duplo ? hot_preco_duplo : 0, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Triplo (R$)',\r\n align: 'right',\r\n width: 130,\r\n render: ({ hot_preco_triplo }) => (\r\n
\r\n {FormatNumber(!!hot_preco_triplo ? hot_preco_triplo : 0, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n width: 95,\r\n align: 'center',\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n setarFormulario(id)}\r\n conteudo={\r\n mar => ({mar.mar_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Marca Ativa\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n)\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Button, Checkbox, Col, Divider, Form, Input, Modal, notification, Row, Select, Table, Tag, Tooltip } from \"antd\";\r\nimport { BreadcrumbPage, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function ManutencaoProduto() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [carregandoGerar, setCarregandoGerar] = useState(false);\r\n const [considerarVigencia, setConsiderarVigencia] = useState(true);\r\n const [marcado, setMarcado] = useState(true);\r\n const [listaCest, setListaCest] = useState([]);\r\n const [listaCestAlterar, setListaCestAlterar] = useState([]);\r\n const [dadosProdutos, setDadosProdutos] = useState([]);\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n const [form] = Form.useForm();\r\n const [formAlterar] = Form.useForm();\r\n\r\n function buscarCest(ncm, cestAlterar = false) {\r\n if (!!ncm) {\r\n api.get(`produto/BuscarCest?IdNcm=${ncm}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (cestAlterar) {\r\n setListaCestAlterar(res.data);\r\n formAlterar.setFieldsValue({ cen_id: null });\r\n } else {\r\n setListaCest(res.data);\r\n form.setFieldsValue({ cen_id: null });\r\n }\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n );\r\n } else {\r\n if (cestAlterar) {\r\n setListaCestAlterar([]);\r\n formAlterar.setFieldsValue({ cen_id: null });\r\n } else {\r\n setListaCest([]);\r\n form.setFieldsValue({ cen_id: null });\r\n }\r\n }\r\n };\r\n\r\n function buscarProdutos() {\r\n if (!form.getFieldsValue().filtro && !form.getFieldsValue().filtroAnp && !form.getFieldsValue().filtroNcm && !form.getFieldsValue().filtroCest && !form.getFieldsValue().ncm_id\r\n && !form.getFieldsValue().cen_id && !form.getFieldsValue().anp_id && !form.getFieldsValue().icm_id && !form.getFieldsValue().SomenteNcmInativos && !form.getFieldsValue().EANInvalidos) {\r\n notification.warning({ message: 'Aviso!', description: 'É necessário informar pelo menos um filtro!' });\r\n return;\r\n }\r\n\r\n let outrosFiltros = `&filtro=${!!form.getFieldsValue().filtro ? form.getFieldsValue().filtro : ''}`;\r\n outrosFiltros += `&Ncm=${!!form.getFieldsValue().filtroNcm ? form.getFieldsValue().filtroNcm : ''}`;\r\n outrosFiltros += `&Cest=${!!form.getFieldsValue().filtroCest ? form.getFieldsValue().filtroCest : ''}`;\r\n outrosFiltros += `&SomenteNcmInativos=${form.getFieldsValue().SomenteNcmInativos}`;\r\n outrosFiltros += `&EANInvalidos=${form.getFieldsValue().EANInvalidos}`;\r\n\r\n if (form.getFieldsValue().ncm_id) outrosFiltros += `&IdNcm=${form.getFieldsValue().ncm_id}`;\r\n if (form.getFieldsValue().cen_id) outrosFiltros += `&IdCest=${form.getFieldsValue().cen_id}`;\r\n if (form.getFieldsValue().icm_id) outrosFiltros += `&IdIcms=${form.getFieldsValue().icm_id}`;\r\n if (form.getFieldsValue().anp_id) outrosFiltros += `&IdAnp=${form.getFieldsValue().anp_id}`;\r\n\r\n\r\n\r\n setCarregando(true);\r\n api.get(`Produto/ListaProdutoManutencao?ordem=+pro_descricao${outrosFiltros}`).then(res => {\r\n if (res.status === 200) {\r\n let keys = [];\r\n res.data.map((item, idx) => {\r\n item.key = idx;\r\n keys.push(item.key);\r\n })\r\n setSelectedRowKeys(keys);\r\n setMarcado(true);\r\n setDadosProdutos(res.data.map((item, idx) => ({ key: idx, ...item })));\r\n }\r\n }, err => {\r\n console.log(err.response);\r\n }).finally(() => setCarregando(false));\r\n }\r\n\r\n function marcarDesmarcarTodos(e) {\r\n let keys = [];\r\n if (e.target.checked) {\r\n for (const item of dadosProdutos) {\r\n keys.push(item.key);\r\n }\r\n }\r\n setMarcado(e.target.checked);\r\n setSelectedRowKeys(keys);\r\n }\r\n\r\n const rowSelection = {\r\n selectedRowKeys,\r\n hideSelectAll: true,\r\n onChange: (keys, selectedRows) => {\r\n setSelectedRowKeys(keys);\r\n },\r\n };\r\n \r\n function confirmar(values) {\r\n Modal.confirm({\r\n title: 'Deseja continuar?',\r\n icon: ,\r\n content: 'Essa operação irá alterar os itens selecionados! Após confirmar, não poderá ser desfeito!',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n gerarManutencao(values);\r\n }\r\n });\r\n };\r\n\r\n function validarManutencao(values) {\r\n if (selectedRowKeys.length === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'É necessário selecionar pelo menos um item!' });\r\n return;\r\n }\r\n if (!!values.pro_eaninvalido) {\r\n gerarManutencao(values);\r\n } else {\r\n if (!values.icm_id && !values.ncm_id && !values.anp_id) {\r\n notification.warning({ message: 'Aviso!', description: 'Informe algum parâmetro para alteração!' });\r\n return;\r\n }\r\n if (considerarVigencia && !!values.icm_id && !values.vig_id) {\r\n notification.warning({ message: 'Aviso!', description: 'Favor informar a vigência!' });\r\n return;\r\n }\r\n if (considerarVigencia && !!values.icm_id) {\r\n gerarManutencao(values);\r\n } else {\r\n confirmar(values);\r\n }\r\n }\r\n };\r\n\r\n function gerarManutencao(values) {\r\n let dados = {};\r\n dados.produtos = [];\r\n for (const item of dadosProdutos) {\r\n if (selectedRowKeys.indexOf(item.key) >= 0) {\r\n dados.produtos.push({ pro_id: item.pro_id, icm_id: item.icm_id });\r\n }\r\n }\r\n dados.ncm_id = !!values.ncm_id ? values.ncm_id : null;\r\n dados.cen_id = !!values.cen_id ? values.cen_id : null;\r\n dados.vig_id = !!values.vig_id ? values.vig_id : null;\r\n dados.icm_id = !!values.icm_id ? values.icm_id : null;\r\n dados.anp_id = !!values.anp_id ? values.anp_id : null;\r\n dados.pro_eaninvalido = !!values.pro_eaninvalido ? values.pro_eaninvalido : null;\r\n setCarregandoGerar(true);\r\n api.post(`Produto/ManutencaoProduto`, dados).then(res => {\r\n if (res.data) {\r\n notification.success({ message: 'Aviso!', description: 'Manutenção realizada com sucesso!' });\r\n form.setFieldsValue({ produtos: [] });\r\n setSelectedRowKeys([]);\r\n } else {\r\n notification.error({ message: 'Aviso!', description: 'Não foi possível realizar a manutenção dos produtos selecionados!' });\r\n }\r\n }, err => {\r\n console.log(err.response);\r\n }).finally(() => {\r\n buscarProdutos();\r\n setCarregandoGerar(false);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({icm.icm_id} - {icm.icm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n { buscarCest(ncm) }} conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({anp.anp_codigo} - {anp.anp_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n Somente NCM inativos?\r\n \r\n \r\n \r\n \r\n \r\n \r\n Somente EAN Inválidos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Marcar/Desmarcar Todos\r\n \r\n \r\n (\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'EAN',\r\n align: 'center',\r\n width: 90,\r\n render: ({ pro_ean }) => (\r\n {pro_ean}\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ pro_descricao }) => (\r\n {pro_descricao}\r\n ),\r\n },\r\n {\r\n title: 'ICMS',\r\n render: ({ icm_id, icm_descricao }) => (\r\n {icm_id} - {icm_descricao}\r\n ),\r\n },\r\n {\r\n title: 'NCM',\r\n render: ({ ncm_codigo }) => (\r\n {ncm_codigo}\r\n ),\r\n },\r\n {\r\n title: 'CEST',\r\n render: ({ cet_id }) => (\r\n {!!cet_id ? cet_id : '-'}\r\n ),\r\n },\r\n {\r\n title: 'ANP(Caso For combustível)',\r\n render: ({ anp_codigo }) => (\r\n {anp_codigo}\r\n ),\r\n }\r\n ]} scroll={{ x: 900, size: 20 }} />\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n ({icm.icm_id} - {icm.icm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n { buscarCest(ncm) }} conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({anp.anp_codigo} - {anp.anp_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n {considerarVigencia && \r\n \r\n ({vig.vig_id} - {vig.vig_descricao})\r\n }\r\n />\r\n \r\n }\r\n \r\n \r\n { setConsiderarVigencia(e.target.checked) }}>Considerar Vigência?\r\n \r\n \r\n\r\n \r\n \r\n Marcar EAN Inválidos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { Data, FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ManutencaoVigencia({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let enderecoUrl = 'VigenciaFiscal/';\r\n\r\n if (values.vig_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Vigência Fiscal salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Vigência Fiscal salvos com sucesso!\" });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n };\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vig_id' } });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoVigencia from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport moment from 'moment';\r\n\r\nexport default function DrawerVigencia() {\r\n\r\n const [form] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n \r\n if (manutencao.dados !== null) {\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n function fecharDrawer() {\r\n form.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }> \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Form } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport DrawerVigencia from './drawer';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, TabelaDados, Editar, Excluir, FiltroSearch } from \"../../components\";\r\nimport moment from 'moment';\r\n\r\nexport default function VigenciaFiscal() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vig_id' } }), []);\r\n\r\n function excluirRegistro(id) {\r\n api.delete(`VigenciaFiscal/Excluir/${id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch((erro) => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vig_id' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {vig_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ vig_descricao }) => (\r\n
\r\n {vig_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Inicial',\r\n render: ({ vig_datainicial }) => (\r\n
\r\n {moment(vig_datainicial).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {\r\n let dados = { ...record };\r\n dados.vig_datainicial = moment(dados.vig_datainicial);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluir(record.vig_id) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, Select, Checkbox, Switch, Tooltip, Button, Modal, notification, Alert } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport InputNumber from \"rc-input-number\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { FormGW } from \"../../components\";\r\nimport { ModalRetencao } from \"../../components/modals\";\r\n\r\nexport default function ManutencaoRetencao({ formulario, carregando, aoSalvar }) {\r\n\r\n const [formModal] = Form.useForm();\r\n const [dadosTipoRetencao, setDadosTipoRetencao] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModal, setOpenModal] = useState(false);\r\n const [descontoTotal, setDescontoTotal] = useState(true);\r\n const [checked1, setChecked1] = useState(false);\r\n\r\n useEffect(() => {\r\n buscarTipoRetencao();\r\n }, []);\r\n\r\n function buscarTipoRetencao() {\r\n api.get(`Enum/Listar?nome=TipoRetencao`).then(\r\n res => {\r\n setDadosTipoRetencao(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const onChangeChecked1 = (e) => {\r\n setChecked1(e.target.checked);\r\n }\r\n\r\n function tipoImpostoSelecionado(record) {\r\n if (record === 7) {\r\n setChecked1(false);\r\n setDescontoTotal(false);\r\n } else {\r\n setDescontoTotal(true);\r\n }\r\n }\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tar_id' } });\r\n };\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n values.tar_descontamovimentacaofinanceira = values.tar_descontamovimentacaofinanceira || false;\r\n values.tar_descontatotalnota = checked1;\r\n let enderecoUrl = 'TabelaRetencao/';\r\n if (values.tar_id) {\r\n enderecoUrl += 'Editar'; \r\n api.put(enderecoUrl, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados na tabela de retenção foram editados com sucesso!\" });\r\n aoSalvar();\r\n atualizarPagina();\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n } else {\r\n enderecoUrl += 'Incluir'; \r\n api.post(enderecoUrl, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados na tabela de retenção foram salvos com sucesso!\" });\r\n aoSalvar();\r\n atualizarPagina();\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tar_id' } });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Desconta total da nota?\r\n \r\n \r\n \r\n Desconta movimentação financeira?\r\n \r\n \r\n setOpenModal(false)} formulario={formModal} />\r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport ManutencaoRetencao from './manutencao';\r\n\r\nexport default function DrawerRetencao() {\r\n const [formulario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (!!manutencao.dados)\r\n {\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n function fecharDrawer() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n };\r\n\r\n return (\r\n }\r\n limparAoEditar={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, notification, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CopyOutlined, CloseCircleOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, PesquisaOrdenacao, TabelaDados, Editar, Excluir } from \"../../components\";\r\nimport DrawerRetencao from \"./drawer\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function TabelaRetencao() {\r\n\r\n const [dadosTipoRetencao, setDadosTipoRetencao] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n buscarTipoRetencao();\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tar_descricao' } });\r\n }, []);\r\n\r\n function buscarTipoRetencao() {\r\n api.get(`Enum/Listar?nome=TipoRetencao`).then(\r\n res => {\r\n let objeto = {};\r\n for (let item of res.data) {\r\n objeto[item.key] = item.value;\r\n }\r\n setDadosTipoRetencao(objeto);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function excluirRegistro(tabRetencao) {\r\n api.delete(`TabelaRetencao/Excluir?id=${tabRetencao.tar_id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Os dados foram excluídos com sucesso!\" });\r\n dispatch({ type: listagemActions.CHANGE, data: { label: \"Nome A - Z\", ordem: '+tar_descricao' } })\r\n }).catch(err => {\r\n console.error(err);\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tar_descricao' } });\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n \r\n {tar_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ tar_descricao }) => (\r\n
\r\n {tar_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Percentual',\r\n render: ({ tar_percentuaretencao }) => (\r\n
\r\n {FormatNumber(tar_percentuaretencao, true)} %\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo Imposto',\r\n render: ({ tar_tiporetencao }) => (\r\n
\r\n {dadosTipoRetencao[tar_tiporetencao] || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconta total da nota?',\r\n render: ({ tar_descontatotalnota }) => (\r\n
\r\n {tar_descontatotalnota ? 'Sim' : 'Não'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconta total da movimentação financeira?',\r\n render: ({ tar_descontamovimentacaofinanceira }) => (\r\n
\r\n {tar_descontamovimentacaofinanceira ? 'Sim' : 'Não'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n {/*
\r\n \r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } }); \r\n }} icon={} />\r\n \r\n \r\n } onClick={() => { modalExcluir(record)}} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Col, Divider, Form, notification, Row, Select, Table, Tag, Tooltip } from \"antd\";\r\n\r\nimport { BreadcrumbAbrirChamado, FormGW, SelectPaginacao, SelectProduto } from \"../../components\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, LoadingOutlined, PlusOutlined, UserSwitchOutlined } from \"@ant-design/icons\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function RetencaoPessoaProduto() {\r\n const [form] = Form.useForm();\r\n const [alterarPessoa, setAlterarPessoa] = useState(false);\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const [listaProdutos, setListaProdutos] = useState([]);\r\n const [carregandoDados, setCarregandoDados] = useState(false);\r\n\r\n const informarPessoa = () => {\r\n setAlterarPessoa(!alterarPessoa);\r\n form.setFieldsValue({ cli_id: undefined, for_id: undefined });\r\n }\r\n\r\n function verificarDados() {\r\n let values = form.getFieldValue();\r\n let cliente = values.cli_id !== undefined ? values.cli_id : null;\r\n let fornecedor = values.for_id !== undefined ? values.for_id : null;\r\n let retencao = values.tar_id !== undefined ? values.tar_id : null;\r\n let valorLista = [...listaProdutos];\r\n\r\n if (valorLista.length > 0) {\r\n if (valorLista[0].cli_id !== cliente || valorLista[0].for_id !== fornecedor || valorLista[0].tar_id !== retencao) {\r\n buscarDados(cliente, fornecedor, retencao);\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Relacionamento já carregado' });\r\n }\r\n } else {\r\n buscarDados(cliente, fornecedor, retencao);\r\n }\r\n }\r\n\r\n function buscarDados(cliente, fornecedor, retencao) {\r\n if ((cliente !== null || fornecedor !== null) && retencao !== null) {\r\n setCarregandoDados(true)\r\n let filtrosArray = [];\r\n if (cliente !== null) {\r\n filtrosArray.push(`idCliente=${cliente}`);\r\n }\r\n if (fornecedor !== null) {\r\n filtrosArray.push(`idFornecedor=${fornecedor}`);\r\n }\r\n filtrosArray.push(`idTabelaRetencao=${retencao}`);\r\n let filtros = filtrosArray.join('&');\r\n api.get(`RetencaoClienteFornecedor/Listar?${filtros}`).then(\r\n res => {\r\n let retorno = res.data.items;\r\n let proxSequencia = listaProdutos.length + 1;\r\n retorno = retorno.map((item, index) => ({\r\n ...item,\r\n sequencia: proxSequencia + index\r\n }));\r\n let listaTemp = [...retorno];\r\n\r\n setCarregandoDados(false);\r\n setListaProdutos(listaTemp);\r\n if (retorno.length > 0) {\r\n if (cliente !== null) {\r\n notification.success({ message: 'Sucesso!', description: 'Produtos relacionados ao cliente e tabela de retenção carregados' });\r\n } else if (fornecedor !== null) {\r\n notification.success({ message: 'Sucesso!', description: 'Produtos relacionados ao fornecedor e tabela de retenção carregados' });\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro)\r\n }\r\n )\r\n }\r\n }\r\n\r\n function produtoSelecioando() {\r\n let values = form.getFieldValue();\r\n let dados = {};\r\n if ((alterarPessoa ? values.cli_id !== undefined : values.for_id !== undefined) && values.tar_id !== undefined) {\r\n if (values.pro_id !== undefined) {\r\n let listaItens = [...listaSelectProd];\r\n let produto = listaItens.filter(pro => pro.key === values.pro_id)[0];\r\n let listaTemp = [...listaProdutos];\r\n produto = { ...produto, sequencia: listaProdutos.length + 1 };\r\n dados = {\r\n tar_id: values.tar_id,\r\n cli_id: values.cli_id !== undefined ? values.cli_id : null,\r\n for_id: values.for_id !== undefined ? values.for_id : null,\r\n pro_id: produto.pro_id\r\n }\r\n api.post(`RetencaoClienteFornecedor/Incluir`, dados).then(\r\n res => {\r\n if (res.status === 200) {\r\n produto = { ...produto, rcf_id: res.data.rcf_id };\r\n listaTemp.push(produto);\r\n setListaProdutos(listaTemp);\r\n if (values.cli_id !== null) {\r\n notification.success({ message: 'Sucesso!', description: 'Produto relacionado com cliente e tabela de retenção' });\r\n } else if (values.for_id !== null) {\r\n notification.success({ message: 'Sucesso!', description: 'Produto relacionado com fornecedor e tabela de retenção' });\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro)\r\n }\r\n )\r\n form.setFieldsValue({ pro_id: undefined });\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Selecione um produto para adicioná-lo' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Atenção!', description: 'Preencha os campos obrigatórios' });\r\n }\r\n }\r\n\r\n function limparLista() {\r\n setListaProdutos([]);\r\n }\r\n\r\n function removeProd(record) {\r\n let index = listaProdutos.findIndex(prod => prod.sequencia === record.sequencia)\r\n let dadosTemp = [...listaProdutos];\r\n dadosTemp.splice(index, 1)\r\n\r\n dadosTemp.forEach((item, index) => {\r\n item.sequencia = index + 1;\r\n })\r\n\r\n setListaProdutos(dadosTemp);\r\n api.delete(`RetencaoClienteFornecedor/Excluir/${record.rcf_id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Sucesso!', description: 'Relacionamento excluído com sucesso' });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro)\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n verificarDados()}\r\n onClearFunction={() => limparLista()}\r\n />\r\n \r\n }\r\n {!alterarPessoa && \r\n \r\n verificarDados()}\r\n onClearFunction={() => limparLista()}\r\n />\r\n \r\n }\r\n \r\n \r\n verificarDados()}\r\n onClearFunction={() => limparLista()}\r\n conteudo={(item) => (\r\n \r\n {item.tar_descricao} - {item.tar_percentuaretencao}%\r\n \r\n )}\r\n />\r\n \r\n \r\n {carregandoDados && \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Produto\r\n \r\n \r\n
(\r\n \r\n {rcf_id}\r\n \r\n )\r\n },\r\n {\r\n title: 'Codigo',\r\n align: 'center',\r\n render: ({ pro_id }) => (\r\n {pro_id}\r\n )\r\n },\r\n {\r\n title: 'Descrição',\r\n width: 1000,\r\n render: ({ pro_descricao }) => (\r\n {pro_descricao}\r\n )\r\n },\r\n {\r\n title: 'EAN',\r\n width: 200,\r\n align: 'center',\r\n render: ({ prg_ean, pro_ean }) => (\r\n {prg_ean ? prg_ean : pro_ean}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x', \r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n );\r\n}","import axios from 'axios';\r\nimport { getToken, logout, getEmpresa, getLocal, linkApi, linkApiGestor } from './auth';\r\nconst apiErp = axios.create({ baseURL: linkApiGestor });\r\n\r\napiErp.interceptors.request.use(async config => {\r\n const token = getToken();\r\n const empresa = getEmpresa();\r\n const local = getLocal();\r\n //config.headers.ApiKey =\"as123\";\r\n if (token) config.headers.Authorization = `Bearer ${token}`;\r\n if (empresa) config.headers.codigoempresa = empresa;\r\n if (local) config.headers.codigolocal = local;\r\n\r\n return config;\r\n});\r\n\r\napiErp.interceptors.response.use(function (response) {\r\n return response;\r\n}, function (error) {\r\n if (error.response.status === 401) {\r\n logout();\r\n }\r\n return Promise.reject(error);\r\n});\r\n\r\nexport default apiErp;\r\n\r\n","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Form, Select, notification } from 'antd';\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getNomeEmpresa, getTelaAnterior, login, setEmpresa, setLocal, setNomeEmpresa, setNomeLocal, setRegimeTributario, setStatusFilial } from '../../services/auth';\r\nimport { selectPaginadoActions } from '../../actions';\r\nimport { useStateValue } from '../../state';\r\nimport { SelectPaginacao } from '../../components';\r\nimport apiErp from '../../services/apiErp';\r\n\r\nexport default function SelecoesEmpresaCat({ veioDaHome = false, exibirModal = false }) {\r\n const [codigoEmpresa, setCodigoEmpresa] = useState(null);\r\n const [codigoLocal, setCodigoLocal] = useState(null);\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n const [formLogin] = Form.useForm();\r\n const acessar = values => {\r\n buscarTela();\r\n };\r\n\r\n useEffect(() => {\r\n if (!!formLogin.getFieldValue()?.emp_id) {\r\n carregarLocais(formLogin.getFieldValue()?.emp_id);\r\n setCodigoEmpresa(formLogin.getFieldValue()?.emp_id);\r\n }\r\n\r\n }, [formLogin.getFieldValue().emp_id]);\r\n\r\n useEffect(() => {\r\n if (!!listaSelectPaginacao?.itens && !veioDaHome) {\r\n validaLocalUnico();\r\n }\r\n }, [listaSelectPaginacao]);\r\n\r\n useEffect(() => {\r\n if (!!codigoLocal) {\r\n carregarDadosEmpresa();\r\n }\r\n }, [codigoLocal]);\r\n\r\n useEffect(() => {\r\n if (!!veioDaHome) {\r\n buscarEmpresaUnica();\r\n }\r\n }, [exibirModal]);\r\n\r\n function buscarEmpresaUnica() {\r\n let lista = [];\r\n let codigo = getEmpresa();\r\n lista.push({ name: \"emp_id\", campo: \"idEmpresa\", value: codigo });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n setCodigoEmpresa(codigo);\r\n }\r\n async function carregarDadosEmpresa() {\r\n let values = {};\r\n values.emp_id = codigoEmpresa;\r\n values.loc_id = codigoLocal;\r\n const listaEmpresa = (await api.get(`Empresa/Buscar/${codigoEmpresa}`)).data;\r\n await api.post('Local/GerarTokenLogin', values).then(res => {\r\n if (res.status === 200) {\r\n login(res.data);\r\n setEmpresa(codigoEmpresa);\r\n setLocal(codigoLocal);\r\n setNomeEmpresa(listaEmpresa.emp_razaosocial);\r\n setRegimeTributario(listaEmpresa.emp_regimetributario);\r\n api.get(`Local/GetLocalById/${codigoLocal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let listaLocal = res.data;\r\n setNomeLocal(listaLocal.loc_descricao);\r\n setStatusFilial(listaLocal.loc_ativo);\r\n buscarTela();\r\n }\r\n }\r\n )\r\n }\r\n }).catch(err => {\r\n if (!!err && !!err.response && !!err.response.data) {\r\n notification.error({ message: err.response.data || 'Falha ao efetuar o login' });\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n });\r\n }\r\n\r\n function carregarLocais(codEmpresa) {\r\n let lista = [];\r\n lista.push({ name: \"filial\", campo: \"codigoEmpresa\", value: codEmpresa });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n function buscarTela() {\r\n window.location = \"/catalogo\";\r\n };\r\n\r\n function validaLocalUnico() {\r\n if (listaSelectPaginacao?.itens?.length === 1) {\r\n setCodigoLocal(listaSelectPaginacao?.itens[0].loc_id);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n {\r\n setCodigoEmpresa(value);\r\n }} order=\"emp_razaosocial\"\r\n conteudo={\r\n e => ({e.emp_nomefantasia}
Razao Social: {e.emp_razaosocial}
)\r\n } />\r\n
\r\n \r\n \r\n {formLogin.getFieldValue()?.emp_id && \r\n \r\n \r\n setCodigoLocal(valor)} conteudo={Local => (\r\n {Local.loc_descricao}{!Local.loc_ativo ? ' (INATIVO)' : ''}\r\n )} />\r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Form, Input, Button, notification } from 'antd';\r\nimport { MailOutlined, ArrowLeftOutlined, SendOutlined } from '@ant-design/icons';\r\nimport api from '../../services/api';\r\n\r\nexport default function EsqueciSenha({ onAcessar, formulario }) {\r\n\r\n\r\n function enviarEmailRecuperarSenha() {\r\n let emailUsuario = formulario.getFieldValue().email;\r\n if (!!emailUsuario) {\r\n api.put(`Usuario/EnviarEmailRecuperarSenha/${emailUsuario}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Enviamos um E-mail para você com as instruções para recuperar sua senha!\" })\r\n }\r\n ).catch(\r\n error => {\r\n notification.warning({ message: `AVISO!`, description: `Usuário não encontrado!` });\r\n }\r\n )\r\n }\r\n\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Layout, Row, Col, Typography, Form, Input, Checkbox, Button, notification } from 'antd';\r\nimport { UnlockFilled, MailOutlined, SmileOutlined, SendOutlined, DesktopOutlined, EnvironmentOutlined, PhoneOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport { EsqueciSenha, SelecoesEmpresaCat } from \"./pages\";\r\nimport { login, setNomeUsuario, setIdUsuario, setEmailUsuario, getIdUsuario, setTelaAnterior, removerTelaAnt, removerLocal } from '../../services/auth';\r\n\r\nimport { ModulosPage, SlideLogin } from \"../../components\";\r\nimport { encodeBase64, parseToken } from '../../services/funcoes';\r\n\r\nconst FORMULARIO = {\r\n LOGIN: 1,\r\n SELECIONA_EMPRESA: 2,\r\n ESQUECI_SENHA: 3,\r\n}\r\n\r\nexport default function LoginCatalogo() {\r\n\r\n const [formularioExibir, setFormularioExibir] = useState(FORMULARIO.LOGIN);\r\n const [carregando, setCarregando] = useState(false);\r\n const [formulario] = Form.useForm();\r\n\r\n const onFinish = values => {\r\n setCarregando(true);\r\n values.senha = encodeBase64(values.senha);\r\n delete values.remember;\r\n api.post('Login/EfetuarLogin', values).then(res => {\r\n if (res.status === 200) {\r\n const token = res.data;\r\n let dadosUsuario = parseToken(res.data);\r\n setNomeUsuario(dadosUsuario.name);\r\n if (parseInt(getIdUsuario()) !== parseInt(dadosUsuario.UsuarioID)) {\r\n removerTelaAnt()\r\n }\r\n setIdUsuario(dadosUsuario.UsuarioID);\r\n setEmailUsuario(dadosUsuario.email);\r\n login(token);\r\n removerLocal();\r\n setFormularioExibir(FORMULARIO.SELECIONA_EMPRESA);\r\n }\r\n }).catch(err => {\r\n if (!!err) {\r\n if (!!err.response && !!err.response.data) {\r\n notification.error({ message: err.response.data || 'Falha ao efetuar o login' });\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n }).finally(() => setCarregando(false));\r\n };\r\n\r\n const onFinishFailed = errorInfo => {\r\n console.log('Erro ao efetuar o login:', errorInfo);\r\n };\r\n\r\n useEffect(() => {\r\n //localStorage.removeItem(\"@GestorWeb-Token\");\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n Identifique abaixo suas credenciais para realizar o acesso.

\r\n
\r\n \r\n \r\n {formularioExibir === FORMULARIO.LOGIN &&\r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n Salvar meus dados de login\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {formularioExibir === FORMULARIO.SELECIONA_EMPRESA && }\r\n {formularioExibir === FORMULARIO.ESQUECI_SENHA && setFormularioExibir(FORMULARIO.LOGIN)} />}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n www.gestorweb.com.br | (55) 3535-4922\r\n \r\n \r\n | Três de Maio - RS - 98910-000\r\n \r\n \r\n \r\n \r\n Todos os direitos reservados - Gestor Web ®\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { UserOutlined } from '@ant-design/icons';\r\nimport { Calendar, Col, Row } from 'antd';\r\nimport moment from 'moment';\r\nimport React, { useEffect, useState } from 'react';\r\n\r\nimport { getClienteCat, getNomeEmpresa, getNomeLocal, getNomeUsuario } from '../../services/auth';\r\nimport { ModalSelecaoClientesCat } from '../../components/modals';\r\n\r\nexport default function InicialCatalogo() {\r\n const [dataAtual, setDataAtual] = useState(new Date());\r\n const [exibirModal, setExibirModal] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n setExibirModal(false);\r\n }\r\n\r\n useEffect(() => {\r\n verificarCliente();\r\n setInterval(dataCalendar, 1000);\r\n }, []);\r\n\r\n function verificarCliente() {\r\n let cliente = getClienteCat();\r\n if (!!!cliente) {\r\n setExibirModal(true);\r\n }\r\n }\r\n\r\n function dataCalendar() {\r\n setDataAtual(new Date());\r\n };\r\n\r\n\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dataAtual.getHours() > 12 ? 'Boa tarde!' : dataAtual.getHours() > 18 ? 'Boa Noite!' : ' Bom dia!'}\r\n \r\n \r\n {getNomeUsuario()},\r\n \r\n \r\n você está acessado a empresa:\r\n \r\n \r\n {`${getNomeEmpresa()} / ${getNomeLocal()}`}.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {moment(dataAtual).format('DD')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('MMM')}\r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dataAtual).format('HH:mm')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Button, Col, Collapse, Form, Row } from \"antd\";\r\nimport React, { useState } from \"react\";\r\nimport { BreadcrumbPage, PesquisaAvancada, PesquisaOrdenacao } from \"../../components\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined } from \"@ant-design/icons\";\r\nexport default function CatAcessosExterno() {\r\n const [formPesquisaAvancada] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n\r\n const togglePesquisa = () => {\r\n\r\n }\r\n\r\n function aplicarFiltrosAvancados() {\r\n\r\n }\r\n\r\n function pesquisaAvancada() {\r\n\r\n }\r\n\r\n function limparFiltroPesquisa() {\r\n\r\n }\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n { pesquisaAvancada(ret) }} funcaoLimpar={() => { limparFiltroPesquisa() }} telaFiltro={1} />\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { InfoCircleOutlined, PictureOutlined } from '@ant-design/icons';\r\nimport { Button, Col, Row, Table, Tooltip, notification } from 'antd';\r\nimport { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';\r\n\r\nimport { linkApiGestor } from '../../services/auth';\r\nimport api from \"../../services/api\";\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\nimport { ModalExibeImagem } from '../../components/modals';\r\nimport ModaDadosPecas from '../../components/modals/modalDadosPeca';\r\n\r\nexport default function ConsultaPecas({ grupoAtual, catalogoExterno }) {\r\n const [listaPecas, setListaPecas] = useState([]);\r\n const [pecaSelecionada, setPecaSelecionada] = useState(null);\r\n const [openImg, setOpenImg] = useState(false);\r\n const [image, setImage] = useState({});\r\n const [imageGrupo, setImageGrupo] = useState({});\r\n \r\n const [opeModalInfo, setOpenModalInfo] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!grupoAtual && isObjetoDiffVazio(grupoAtual)) {\r\n if(!!catalogoExterno) {\r\n buscarPecasGrupoCatalogo(grupoAtual);\r\n } else {\r\n buscarPecas(grupoAtual);\r\n }\r\n buscarImagemGrupo(grupoAtual);\r\n }\r\n }, [grupoAtual]);\r\n\r\n function buscarPecas(grupo) {\r\n api.get(`Cat007/BuscarPecasGrupo?Empresa=1&CodCatalogo=${grupo.codcatalogo}&CodGrupo=${grupo.codigo}`).then(\r\n res => {\r\n if (res.data) {\r\n setListaPecas(res.data);\r\n }\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n )\r\n }\r\n\r\n function buscarPecasGrupoCatalogo(grupo) {\r\n api.get(`Cat002/ListaPecasGrupoCatalogo?Empresa=1&CodCatalogo=${grupo.codcatalogo}&CodGrupo=${grupo.codigo}`).then(\r\n res => {\r\n if (res.data) {\r\n setListaPecas(res.data);\r\n }\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n )\r\n }\r\n\r\n function buscarImagemGrupo(grupoAtual)\r\n {\r\n api.get(`${linkApiGestor}Cat004/BuscarImg?Empresa=1&CodGrupo=${grupoAtual.codigo}&CodCatalogo=${grupoAtual.codcatalogo}`).then(res => {\r\n if(res.status === 200) {\r\n let dados = res.data.map((x) => ({ ...x}))\r\n if(dados.length > 0){\r\n const objeto = {...dados[0]};\r\n setImageGrupo(objeto);\r\n }\r\n else {\r\n setImageGrupo('');\r\n }\r\n }\r\n }, err => {\r\n notification.warning({ message: 'Aviso', description: 'Ausência de Imagem para a Peça Selecionada!' });\r\n console.log(err.response);\r\n\r\n });\r\n }\r\n\r\n function buscarImagemPeca(codpeca, descpeca) {\r\n api.get(`${linkApiGestor}Cat007/BuscarImgPeca?Empresa=1&CodPeca=${codpeca}&Numero=0`).then(res => {\r\n if(res.status === 200) {\r\n let dados = res.data.map((x) => ({ ...x}))\r\n if(dados.length > 0){\r\n const objeto = {...dados[0]};\r\n objeto.codpeca = codpeca;\r\n objeto.descpeca = descpeca;\r\n setImage(objeto);\r\n setOpenImg(true);\r\n }\r\n else {\r\n setImage('');\r\n }\r\n }\r\n }, err => {\r\n notification.warning({ message: 'Aviso', description: 'Ausência de Imagem para a Peça Selecionada!' });\r\n console.log(err.response);\r\n\r\n });\r\n }\r\n\r\n function buscarImagemMongo(codPeca, descpeca)\r\n {\r\n \r\n api.get(`${linkApiGestor}UploadImagens/GetImgMongo?filename=${codPeca}`).then(res => {\r\n if (res.status === 200){\r\n let dados = res.data.map((x) => ({...x}))\r\n if (dados.length > 0){\r\n const objeto = {...dados[0]};\r\n objeto.codPeca = codPeca;\r\n objeto.descPeca = descpeca;\r\n setImage(objeto);\r\n setOpenImg(true);\r\n }\r\n }\r\n else {\r\n setImage({});\r\n }\r\n })\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Grupo: {grupoAtual.codigo} - {grupoAtual.descricao}\r\n
\r\n
(\r\n
\r\n {codpeca}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n width: 420,\r\n render: ({ descpeca }) => (\r\n {descpeca}\r\n ),\r\n },\r\n {\r\n title: 'Item',\r\n width: 60,\r\n render: ({ numeropeca }) => (\r\n
\r\n {numeropeca}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde',\r\n width: 60,\r\n render: ({ quantidade }) => (\r\n
\r\n {quantidade}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Obs',\r\n ellipsis: {\r\n showTitle: false,\r\n },\r\n render: ({ observacoes }) => (\r\n \r\n {observacoes}\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n fixed: 'right',\r\n width: 30,\r\n render: ({ codpeca, descpeca }) => (\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n fixed: 'right',\r\n width: 30,\r\n render: ({ codpeca }) => (\r\n \r\n ),\r\n },\r\n ]\r\n } dataSource={listaPecas} pagination={false}\r\n footer={() => Total de Peças: {listaPecas.length}}\r\n rowClassName={(record, index) => record.codpeca === grupoAtual.codpeca ? 'blue' : record.produzido === 1 ? 'green' : record.controle === 1 ? 'yellow' : ''}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \"grupo\"\r\n \r\n \r\n
\r\n
\r\n \r\n { setOpenModalInfo(false); }} />\r\n { setOpenImg(false); }} />\r\n \r\n );\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Button, Col, Drawer, Row, Table, Tooltip } from 'antd';\r\nimport { CloseOutlined, InfoCircleOutlined, LeftCircleOutlined, PictureOutlined, RightCircleOutlined } from '@ant-design/icons';\r\n\r\n\r\nimport ConsultaPecas from './consultaPecas';\r\nimport { useStateValue } from '../../state';\r\nimport api from '../../services/api';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\n\r\nexport default function DrawerConsulta({ exibirDrawer, onCloseDrawer, catalogoExterno}) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [grupoAtual, setGrupoAtual] = useState({});\r\n const [disabledAnt, setDisabledAnt] = useState(false);\r\n const [disabledPro, setDisabledPro] = useState(false);\r\n const [exibir, setExibir] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && exibirDrawer) {\r\n let dados = { ...manutencao.dados };\r\n //setGrupoAtual(dados);\r\n buscarGrupo(dados.codgrupo, dados.codcatalogo, dados.codpeca);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(grupoAtual)) {\r\n validarGrupo();\r\n }\r\n }, [grupoAtual]);\r\n\r\n const onClose = () => {\r\n onCloseDrawer();\r\n setExibir(false);\r\n };\r\n\r\n function onProximo() {\r\n let codProximo = grupoAtual.proximo;\r\n let codCatalogo = grupoAtual.codcatalogo;\r\n buscarGrupo(codProximo, codCatalogo);\r\n }\r\n\r\n function onAnterior() {\r\n let codAnterior = grupoAtual.anterior;\r\n let codCatalogo = grupoAtual.codcatalogo;\r\n buscarGrupo(codAnterior, codCatalogo);\r\n }\r\n\r\n function validarGrupo() {\r\n if (!!!grupoAtual.proximo) {\r\n setDisabledPro(true);\r\n } else {\r\n setDisabledAnt(false);\r\n }\r\n if (!!!grupoAtual.anterior) {\r\n setDisabledAnt(true);\r\n } else {\r\n setDisabledAnt(false);\r\n }\r\n }\r\n\r\n function buscarGrupo(codGrupo, codCatalogo, codPeca) {\r\n api.get(`Cat004/BuscarGrupoAntProx?codGrupo=${codGrupo}&codCatalogo=${codCatalogo}`).then(\r\n res => {\r\n let grupos = { ...res.data };\r\n if (!!codPeca) {\r\n grupos.codpeca = codPeca;\r\n }\r\n setGrupoAtual(grupos);\r\n setExibir(true)\r\n }\r\n ).catch(ex => console.log(ex));\r\n }\r\n\r\n return (\r\n Catálogo: {grupoAtual?.desccatalogo} } id=\"GruposCatalogo\"\r\n width=\"90%\"\r\n visible={exibir}\r\n onClose={onClose}\r\n extra={\r\n }\r\n footer={\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n );\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport { CloseOutlined, FileImageOutlined, FileSearchOutlined } from '@ant-design/icons';\r\nimport { Button, Col, Drawer, Image, Radio, Row, Space, Table, notification } from 'antd';\r\nimport { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';\r\nimport api from '../../services/api';\r\nimport { linkApiGestor } from '../../services/auth';\r\nimport DrawerConsulta from '../catPecasExterno/drawerConsulta';\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { useStateValue } from '../../state';\r\n\r\n\r\n\r\nexport default function DrawerGrupo( { codCatalogo, codLinha, exibirDrawer, fecharDrawer, nomeCatalogo, nomeLinha } ) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaGrupo, setListaGrupo] = useState([]);\r\n const [valueGrupo, setValueGrupo] = useState(0);\r\n const [valueSubGrupo, setValueSubGrupo] = useState('');\r\n const [foto, setFoto] = useState(false);\r\n const [imageGrupo, setImageGrupo] = useState({});\r\n const [listaSubGrupo, setListaSubGrupo] = useState([]);\r\n const [rowSelectionn, setRowSelectionn] = useState([]);\r\n const [rowSelectionnGrup, setRowSelectionnGrup] = useState([]);\r\n const [openDrawer, setOpenDrawer] = useState(false);\r\n\r\n useEffect(() => \r\n {\r\n if(codCatalogo != \"\")\r\n {\r\n carregaSubGrupos();\r\n }\r\n }, [codCatalogo]);\r\n\r\n useEffect(() => \r\n {\r\n if(codCatalogo != \"\" && valueGrupo > 0)\r\n {\r\n setListaGrupo([]);\r\n carregaGrupos();\r\n }\r\n }, [valueGrupo]);\r\n\r\n function carregaSubGrupos() {\r\n api.get(`Cat006/getSubGrupos?empresa=1&codCatalogo=${codCatalogo}`).then(res => {\r\n if(res.status === 200) {\r\n let dados = res.data.map((x) => ({ key: x.codSubGrupo, ...x}))\r\n setListaSubGrupo(dados);\r\n if(dados.length > 0){\r\n setValueGrupo(dados[0].numSubGrupo);\r\n setRowSelectionn(dados[0].codSubGrupo);\r\n }\r\n }\r\n }, err => {\r\n console.log(err.response);\r\n\r\n });\r\n }\r\n \r\n function carregaGrupos() {\r\n api.get(`Cat004/getGrupos?empresa=1&numGrupo=${valueGrupo}`).then(res => {\r\n if(res.status === 200) {\r\n let dados = res.data.map((x) => ({ key: x.codGrupo, ...x}))\r\n setListaGrupo(dados);\r\n if(dados.length > 0){\r\n setRowSelectionnGrup(dados[0].codGrupo);\r\n }\r\n buscarImagemGrupo(dados[0].codGrupo);\r\n }\r\n }, err => {\r\n console.log(err.response);\r\n\r\n });\r\n }\r\n \r\n function buscarImagemGrupo(rowSelectionnGrup)\r\n {\r\n api.get(`${linkApiGestor}Cat004/BuscarImg?Empresa=1&CodGrupo=${rowSelectionnGrup}&CodCatalogo=${codCatalogo}`).then(res => {\r\n if(res.status === 200) {\r\n let dados = res.data.map((x) => ({ ...x}))\r\n if(dados.length > 0){\r\n const objeto = {...dados[0]};\r\n setImageGrupo(objeto);\r\n setFoto(true);\r\n }\r\n else {\r\n setImageGrupo('');\r\n }\r\n }\r\n }, err => {\r\n notification.warning({ message: 'Aviso', description: 'Ausência de Imagem para a Peça Selecionada!' });\r\n console.log(err.response);\r\n\r\n });\r\n }\r\n\r\n const rowSelection = {\r\n type: \"radio\",\r\n selectedRowKeys: [rowSelectionn],\r\n onSelect: (record) => {\r\n funcoesAoSelecionar(record); \r\n }\r\n }\r\n\r\n const rowSelectionGrup= {\r\n type: \"radio\",\r\n selectedRowKeys: [rowSelectionnGrup],\r\n onSelect: (record) => {\r\n funcoesAoSelecionarGrup(record); \r\n }\r\n }\r\n\r\n function funcoesAoSelecionar (record) {\r\n setValueGrupo(record.numSubGrupo);\r\n setRowSelectionn(record.codSubGrupo)\r\n }\r\n \r\n function funcoesAoSelecionarGrup (record) {\r\n setValueSubGrupo(record.numGrupo);\r\n setRowSelectionnGrup(record.codGrupo);\r\n }\r\n\r\n const onCloseDrawer = () => {\r\n setOpenDrawer(false);\r\n };\r\n\r\n const onClose = () => {\r\n setFoto('');\r\n fecharDrawer();\r\n setListaGrupo([]);\r\n setListaSubGrupo([]);\r\n setValueGrupo(0);\r\n };\r\n \r\n return (\r\n Linha: {codLinha} - {nomeLinha} Catálogo: {codCatalogo} - {nomeCatalogo} } \r\n width=\"100%\" visible={exibirDrawer} onClose={onClose} extra={\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n
\r\n
(\r\n
\r\n {codSubGrupo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição do SubGrupo',\r\n fixed: 'left',\r\n render: ({descricao}) => (\r\n
\r\n {descricao}\r\n
\r\n ),\r\n },\r\n ]\r\n }\r\n rowSelection={rowSelection}\r\n pagination={false}\r\n scroll={{ y: window.innerHeight }}\r\n dataSource={listaSubGrupo}\r\n />\r\n \r\n \r\n {!!foto &&\r\n \r\n \r\n \r\n \"catalogo\" \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n
\r\n
(\r\n
\r\n {codGrupo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição do Grupo',\r\n fixed: 'left',\r\n render: ({descGrupo}) => (\r\n
\r\n {descGrupo}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'left',\r\n width: 130,\r\n render: ({ codGrupo, descGrupo }) => (\r\n \r\n ),\r\n },\r\n ]\r\n }\r\n pagination={false}\r\n rowSelection={rowSelectionGrup}\r\n scroll={{ y: window.innerHeight }}\r\n dataSource={listaGrupo}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Col, Form, Row, Select } from \"antd\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { BreadcrumbPage, FiltroSearch, TabelaDados } from \"../../components\";\r\nimport { GroupOutlined} from \"@ant-design/icons\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport DrawerGrupo from \"./listaGrupoSubgrupo\";\r\n\r\nexport default function CatalogosExterno() {\r\n const [formPesquisaAvancada] = Form.useForm();\r\n const [open, setOpen] = useState(false);\r\n const [codCatalago,setCodCatalago] = useState(\"\");\r\n const [nomeCatalago,setNomeCatalago] = useState(\"\");\r\n const [codLinha,setCodLinha] = useState(\"\");\r\n const [nomeLinha,setNomeLinha] = useState(\"\");\r\n const [openGrupo, setOpenGrupo] = useState(false);\r\n const [listaLinha, setListaLista] = useState([]);\r\n const [linhaSelecionada, setLinhaSelecionada] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n function handleChange(value) {\r\n setLinhaSelecionada(value)\r\n }\r\n \r\n const showDrawer = () => {\r\n setOpenGrupo(true);\r\n }\r\n\r\n const closeDrawer = () => {\r\n setOpenGrupo(false);\r\n setCodCatalago(\"\");\r\n }\r\n\r\n useEffect(() => {\r\n if(linhaSelecionada !== \"\") {\r\n carregaCatalogos();\r\n }\r\n },[linhaSelecionada]);\r\n\r\n function carregaCatalogos()\r\n {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&empresa=1&codLinha=${linhaSelecionada}` } });\r\n }\r\n\r\n useEffect(() => carregaLinha(),[]);\r\n\r\n function carregaLinha()\r\n {\r\n api.get(`Cat005/GetAll?empresa=1`).then(res => {\r\n if (res.status === 200) {\r\n setListaLista(res.data.map((x) => ({ key: x.key, ...x })));\r\n }\r\n }, err => {\r\n console.log(err.response);\r\n });\r\n }\r\n\r\n function aplicarFiltrosAvancados(){}\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {codigo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n fixed: 'left',\r\n render: ({ descricao }) => (\r\n
\r\n {descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Catálogo',\r\n fixed: 'left',\r\n width: 100,\r\n render: ({ codcatalogo }) => (\r\n
\r\n {codcatalogo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição Catálogo',\r\n fixed: 'left',\r\n ellipsis: {\r\n showTitle: false,\r\n },\r\n render: ({ desccatalogo }) => (\r\n \r\n {desccatalogo}\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'left',\r\n width: 130,\r\n render: ({ codcatalogo, codigo, descricao, desccatalogo, codpeca }) => (\r\n \r\n ),\r\n },\r\n ]}\r\n dataSource={listaGrupo}\r\n pagination={false}\r\n\r\n />\r\n }\r\n \r\n setOpenModal(false)} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Tag, Divider, Button, Table, notification } from \"antd\";\r\nimport api from \"../../services/api\";\r\nimport { CheckOutlined, DeleteOutlined } from \"@ant-design/icons\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\n\r\n\r\nexport default function TabPermissoes({ formulario }) {\r\n const [load, setLoad] = useState(false);\r\n const [listPermissoes, setListPermissoes] = useState([]);\r\n const [pagina, setPagina] = useState(1);\r\n const [nroRegistros, setNroRegistros] = useState(10);\r\n const [ordem, setOrdem] = useState('loc_id');\r\n\r\n useEffect(() => { loadPermissoes() }, [pagina, nroRegistros]);\r\n\r\n async function loadPermissoes() {\r\n setLoad(true);\r\n var _listaPermissoesPagina = await apiWeb.get(`PermissaoUsuario/ListarPermisoesPaginasModulo?modulo=3`);\r\n if (_listaPermissoesPagina.status === 200) {\r\n const list = _listaPermissoesPagina.data;\r\n let userId = formulario.getFieldValue('usu_id');\r\n if (userId) {\r\n try {\r\n var _listarPersmissoesMongo = await apiWeb.get(`PermissaoUsuario/Listar?idUser=${userId}`);\r\n if (_listarPersmissoesMongo.status === 200) {\r\n let dataAcess = _listarPersmissoesMongo.data;\r\n for (let i in list) {\r\n let idx = dataAcess.findIndex(x => x.pru_nome === list[i].pagina);\r\n if (idx > -1) {\r\n let obj = JSON.parse(dataAcess[idx].pru_permissoes);\r\n let { api, sistema } = obj[0];\r\n var permissoes = list[i].permissoes;\r\n let acessoModulo = false;\r\n if (typeof api != \"undefined\" && sistema != \"undefined\") {\r\n var permissoesApi = api[0].metodos;\r\n permissoes.forEach(e => {\r\n var indexMetodo = permissoesApi.findIndex(pm => pm.nome == e.metodo);\r\n e.acesso = permissoesApi[indexMetodo].acesso;\r\n if (!acessoModulo) acessoModulo = permissoesApi[indexMetodo].acesso ? true : false;\r\n });\r\n } else {\r\n var acessoPermissoesMongo = obj;\r\n permissoes.forEach(e => {\r\n var indexMetodo = acessoPermissoesMongo.findIndex(pm => pm.metodo == e.metodo);\r\n e.acesso = acessoPermissoesMongo[indexMetodo].acesso;\r\n if (!acessoModulo) acessoModulo = acessoPermissoesMongo[indexMetodo].acesso ? true : false;\r\n });\r\n }\r\n if (acessoModulo) {\r\n list[i].acesso = true\r\n }\r\n }\r\n }\r\n setListPermissoes(list.map((x, idx) => ({ key: idx, ...x })));\r\n }\r\n } catch (error) {\r\n const array = list.map((x, idx) => ({ key: idx, ...x }));\r\n setListPermissoes(array);\r\n setLoad(false)\r\n }\r\n } else {\r\n const array = list.map((x, idx) => ({ key: idx, ...x }));\r\n setListPermissoes(array);\r\n }\r\n }\r\n setLoad(false)\r\n }\r\n\r\n const handleChangeBloqueioPagina = (key, metodo = null) => {\r\n let array = [...listPermissoes];\r\n let index = array.findIndex(x => x.key == key);\r\n if (index > -1) {\r\n if (metodo != null) {\r\n let idx = array[index].permissoes.findIndex(x => x.metodo == metodo);\r\n if (idx > -1)\r\n array[index].permissoes[idx].acesso = !array[index].permissoes[idx].acesso;\r\n }\r\n else {\r\n array[index].acesso = !array[index].acesso;\r\n for (let y in array[index].permissoes)\r\n array[index].permissoes[y].acesso = array[index].acesso;\r\n }\r\n setListPermissoes(array);\r\n formulario.setFieldsValue({ listaPermissoesPaginas: array });\r\n }\r\n }\r\n\r\n const handleChangeBloqueioAll = (option, list = null) => {\r\n\r\n let array = (list != null) ? list : [...listPermissoes];\r\n for (let i in array) {\r\n array[i].acesso = option;\r\n for (let y in array[i].permissoes) {\r\n array[i].permissoes[y].acesso = option;\r\n }\r\n }\r\n setListPermissoes(array);\r\n formulario.setFieldsValue({ listaPermissoesPaginas: array });\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n handleChangeBloqueioPagina(record.key)}\r\n >\r\n {(!!acesso) ? 'Liberado' : 'Bloqueado'}\r\n \r\n \r\n \r\n {pagina}\r\n \r\n \r\n {acesso &&\r\n
\r\n \r\n \r\n {permissoes.map((item, idx) =>\r\n
\r\n \r\n \r\n {item.metodo}\r\n \r\n \r\n handleChangeBloqueioPagina(record.key, item.metodo)}>\r\n {(item.acesso) ? 'Sim' : 'Não'}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n ]}\r\n dataSource={listPermissoes} scroll={{ x: 900 }}\r\n />\r\n \r\n )\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { FormGW } from \"../../components\";\r\nimport { Checkbox, Col, Form, Input, Row, Tabs, Upload, notification } from \"antd\";\r\nimport ImgCrop from \"antd-img-crop\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\nimport { LoadingOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport api from \"../../services/api\";\r\nimport TabPermissoes from \"./tabPermissoes\";\r\n\r\nexport default function ManutencaoUsuarioCat({ formulario, carregando, aoSalvar }) {\r\n const [loading, setLoading] = useState(false);\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [userId, setUserId] = useState(null);\r\n const [fileList, setFileList] = useState([]);\r\n const [array, setArray] = useState([]);\r\n const [emailAtual, setEmailAtual] = useState(formulario.getFieldValue('usu_email'));\r\n\r\n const salvarManutencao = async (values) => {\r\n carregando(true);\r\n values.usu_sac = false;\r\n values.usu_suporte = false;\r\n if (!values.listaPermissoesPaginas && !values.usu_id) {\r\n values.listaPermissoesPaginas = array;\r\n }\r\n if (values.usu_senha == \"\" || values.usu_confirmaSenha == \"\" || values.usu_senha != values.usu_confirmaSenha) {\r\n delete values.usu_senha;\r\n delete values.usu_confirmaSenha;\r\n }\r\n\r\n if ((imageUrl != null) && (fileList != '')) {\r\n values.avatar = { data: imageUrl, type: fileList[0].type };\r\n } else {\r\n delete values.usu_avatar;\r\n }\r\n let res;\r\n try {\r\n if (values.usu_id) {\r\n res = await apiWeb.put(\"Usuario/EditarCatalogo\", values)\r\n } else {\r\n res = await apiWeb.post(\"Usuario/IncluirCatalogo\", values);\r\n }\r\n notification.success({ message: 'Operação concluída', description: `Os dados do Usuário foram ${values.usu_id ? \"Alterados\" : \"salvos\"} com sucesso, um e-mail foi enviado para a definição de senha!` });\r\n formulario.resetFields();\r\n carregando(false);\r\n aoSalvar();\r\n } catch (ex) {\r\n carregando(false);\r\n console.log(ex)\r\n }\r\n }\r\n\r\n const beforeUpload = async (file) => {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n notification.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n const isLt2M = file.size / 1024 / 1024 < 2;\r\n if (!isLt2M) {\r\n notification.error('A imagem deve ter menos de 2 MB!');\r\n }\r\n return isJpgOrPng && isLt2M;\r\n }\r\n\r\n const handleChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n }\r\n if (info.file.status !== 'removed') {\r\n getBase64(info.file.originFileObj, (base64) => {\r\n setLoading(false);\r\n setImageUrl(base64);\r\n });\r\n }\r\n if (info.file.status === 'removed')\r\n setImageUrl(null);\r\n\r\n setFileList(info.fileList);\r\n };\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
\r\n {loading ? 'Carregando...' : 'Selecionar Imagem'}\r\n
\r\n
\r\n );\r\n\r\n const onBlurVerificaEmail = async () => {\r\n let usuario;\r\n setEmailAtual(formulario.getFieldValue('usuEmail'));\r\n let emailNovo = formulario.getFieldValue('usu_email');\r\n let idUsuario = formulario.getFieldValue('usu_id');\r\n try {\r\n if (typeof idUsuario != 'undefined' & idUsuario != 0) usuario = `&idUsuario=${idUsuario}`;\r\n var result = await apiWeb.get(`Usuario/ValidarEmailEmpresa?email=${emailNovo}`);\r\n if (result.status == 200) {\r\n if (result.data) {\r\n formulario.setFieldsValue(result.data)\r\n carregarAvatar();\r\n }\r\n }\r\n } catch (err) {\r\n console.log('err :>> ', err);\r\n };\r\n }\r\n\r\n const carregarAvatar = async () => {\r\n if (!!formulario.getFieldValue('usu_email')) {\r\n await apiWeb.get(`Usuario/AvatarBase64/${formulario.getFieldValue('usu_email')}`).then(\r\n res => {\r\n if (res.status == 200) {\r\n setImageComponent(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n }\r\n )\r\n }\r\n };\r\n\r\n const setImageComponent = (dadosImg) => {\r\n if (formulario.getFieldValue('usu_id')) {\r\n setUserId(formulario.getFieldValue('usu_id'));\r\n var caminho_avatar = `data:${dadosImg.mimiType};base64,${dadosImg.imagem}`;\r\n let img = [\r\n {\r\n uid: '-1',\r\n name: 'image.png',\r\n status: 'done',\r\n url: caminho_avatar,\r\n },\r\n ];\r\n if (dadosImg.padrao) {\r\n img[0].type = dadosImg.mimiType\r\n }\r\n setImageUrl(caminho_avatar);\r\n setFileList(img);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n carregarAvatar();\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n setImageUrl(null)}\r\n maxCount={1}\r\n >\r\n {fileList.length == 0 && uploadButton}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {userId != null &&\r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value)\r\n return Promise.resolve();\r\n\r\n const regexNumber = /[0-9]/;\r\n const regexLetrasMaiuscula = /[A-Z]/;\r\n const regexLetrasMinuscula = /[a-z]/;\r\n\r\n if (regexNumber.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter números!'));\r\n } else if (regexLetrasMaiuscula.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter letras maiúsculas!'));\r\n } else if (regexLetrasMinuscula.test(value) === false) {\r\n return Promise.reject(new Error('A senha deve conter letras minúscula!'));\r\n } else if (value.length < 6) {\r\n return Promise.reject(new Error('A senha deve conter no mínimo 6 caracteres!'));\r\n } else if ((value == \" \") || (value == \"\")) {\r\n return Promise.reject(new Error('A senha não pode ser vazia'));\r\n }\r\n else\r\n return Promise.resolve();\r\n },\r\n }),\r\n ]}\r\n label=\"Nova Senha\"\r\n name=\"usu_senha\">\r\n \r\n \r\n \r\n \r\n ({\r\n required: getFieldValue('usu_confirmaSenha'),\r\n message: 'Informe a confirmação de sua senha!',\r\n }),\r\n ({ getFieldValue }) => ({\r\n validator(_, value) {\r\n if (!value || getFieldValue('usu_senha') === value) {\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(new Error('As senhas informadas não conferem!'));\r\n },\r\n\r\n })\r\n ]}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n Este usuário irá possuir privilégios de administrador no sistema?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport ManutencaoUsuarioCat from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { Button, Col, Drawer, Form, Modal, Row } from 'antd';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from '@ant-design/icons';\r\n\r\nexport default function DrawerUsuarioCatalogo({ atualizarTabela }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formUsuario] = Form.useForm();\r\n\r\n if (manutencao.dados !== null) {\r\n formUsuario.setFieldsValue(manutencao.dados, { usu_sac: false, usu_suporte: false });\r\n }\r\n else {\r\n formUsuario.setFieldsValue({ usu_ativo: false, usu_usuariopdv: false, usu_admin: false, usu_sac: false, usu_suporte: false, listaFiliais: [] });\r\n }\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function fecharDrawer() {\r\n formUsuario.resetFields();\r\n\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n atualizarTabela();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n { fecharDrawer() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { Col, Form, Input, Modal, Popover, Row, Table, Tag, notification } from \"antd\";\r\nimport { BreadcrumbIncluirDados, BreadcrumbPage, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport moment from \"moment\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\nimport DrawerUsuarioCatalogo from \"./drawer\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function UsuarioCatalogo() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaUsuarios, setListaUsuarios] = useState([]);\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o usuário: ${dados.usu_nome}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n }\r\n\r\n const modalInativarRegistro = (dados) => {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Não foi possível excluir usuário ${dados.usu_nome}. Deseja inativar este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n buscarUsuarios();\r\n }, []);\r\n\r\n function buscarUsuarios(filtro = \"\") {\r\n apiWeb.get(`Usuario/ListarUsuarioCatalogo?filtro=${filtro}`).then(\r\n res => {\r\n setListaUsuarios(res.data);\r\n }\r\n ).catch(err => {\r\n console.log(err);\r\n })\r\n }\r\n\r\n function carregarDados(dados) {\r\n dados.usuEmail = dados.usu_email;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n function excluirRegistro(dados) {\r\n apiWeb.delete(`Usuario/Excluir/${dados.usu_id}`).then((res) => {\r\n if (res.data == false) {\r\n modalInativarRegistro(dados);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch((err) => {\r\n console.error(err);\r\n modalInativarRegistro(dados);\r\n }\r\n ).finally(\r\n () => {\r\n buscarUsuarios();\r\n }\r\n );\r\n }\r\n\r\n function inativarRegistro(dados) {\r\n apiWeb.put(`Usuario/Inativar/${dados.usu_id}`).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Usuario(a) inativado(a) com sucesso!` })\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n ).finally(\r\n () => {\r\n buscarUsuarios();\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n buscarUsuarios(filtro)} />\r\n \r\n \r\n
\r\n
(\r\n \r\n \r\n {usu_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n render: ({ usu_nome }) => (\r\n
\r\n {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'E-mail',\r\n render: ({ usu_email }) => (\r\n
\r\n {usu_email}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Inclusão',\r\n render: ({ usu_datainclusao }) => (\r\n
\r\n {(usu_datainclusao ? moment(usu_datainclusao).format(\"DD/MM/YYYY\") : '')}\r\n
\r\n ),\r\n },\r\n\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n carregarDados(record)} icon={} />\r\n \r\n \r\n } onClick={() => modalExcluir(dados)} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} dataSource={listaUsuarios} />\r\n \r\n \r\n );\r\n}\r\n\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Descriptions, Divider, Row, Steps, Table, Typography } from \"antd\";\r\nimport formatNumber from \"../../ValueObjects/formatNumber\";\r\nimport { Description } from \"@material-ui/icons\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function InfosCotacao({ formulario, dadosPedidos }) {\r\n const [listaItens, setListaItens] = useState([]);\r\n const [tipoCobranca, setTipoCobranca] = useState({});\r\n const [condicaoPagamento, setCondicaoPagamento] = useState({});\r\n useEffect(() => {\r\n if (!!dadosPedidos) {\r\n buscarItens(dadosPedidos.numero);\r\n buscarTipo(dadosPedidos.codTipoCobranca);\r\n buscarCondicao(dadosPedidos.codCondicaoPag);\r\n }\r\n }, [dadosPedidos]);\r\n\r\n function buscarItens(numeroPedido) {\r\n api.get(`PedidoItem/Buscar?NumeroPedido=${numeroPedido}`).then(\r\n res => {\r\n setListaItens(res.data);\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n );\r\n }\r\n\r\n function buscarTipo(codigo) {\r\n api.get(`TipoCobranca/BuscarUm?Codigo=${codigo}`).then(\r\n (res) => {\r\n setTipoCobranca(res.data);\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n );\r\n }\r\n\r\n function buscarCondicao(codigo) {\r\n api.get(`CondicaoPagamento/Buscar?Codigo=${codigo}`).then(\r\n (res) => {\r\n setCondicaoPagamento(res.data[0]);\r\n }\r\n ).catch(\r\n err => {\r\n console.log(err);\r\n }\r\n );\r\n }\r\n\r\n return (<>\r\n \r\n \r\n \r\n {dadosPedidos?.nomeCliente}\r\n \r\n \r\n {dadosPedidos?.cnpjCliente}\r\n \r\n \r\n {dadosPedidos?.enderecoCliente}\r\n \r\n \r\n {dadosPedidos?.cidadeCliente}\r\n \r\n \r\n {dadosPedidos?.cepCliente}\r\n \r\n \r\n {dadosPedidos?.ufCliente}\r\n \r\n \r\n \r\n \r\n {tipoCobranca?.descricao}\r\n \r\n \r\n {condicaoPagamento?.descricao}\r\n \r\n \r\n \r\n Itens da Cotação\r\n \r\n \r\n
(\r\n
\r\n {codProduto}\r\n
\r\n ),\r\n }, {\r\n title: 'Descrição',\r\n render: ({ produto }) => (\r\n
\r\n {produto?.descricao}\r\n
\r\n ),\r\n }, {\r\n title: 'Quantidade',\r\n render: ({ quantidade }) => (\r\n
\r\n {quantidade}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Unitário',\r\n render: ({ valorUnitario }) => (\r\n
\r\n {formatNumber(valorUnitario, true, true, 3)}\r\n
\r\n ),\r\n }, {\r\n title: 'Valor Total',\r\n render: ({ quantidade, valorUnitario }) => (\r\n
\r\n {formatNumber(valorUnitario * quantidade, true, true, 3)}\r\n
\r\n ),\r\n }\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Drawer, Form } from \"antd\";\r\nimport InfosCotacao from './infosPedido';\r\n\r\nexport default function DrawerCotacaoCat({ openDrawer, setOpenDrawer, dados }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n function onClose() {\r\n setOpenDrawer(false);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { BreadcrumbPage, TabelaDados } from \"../../components\";\r\nimport { Button, Col, Dropdown, Menu, Row, Table } from \"antd\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport moment from \"moment\";\r\nimport { EyeOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport { getClienteCat } from \"../../services/auth\";\r\nimport DrawerCotacaoCat from \"./drawer\";\r\n\r\nexport default function CotacaoCatalogo() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openDrawer, setOpenDrawer] = useState(false);\r\n const [dadosPedido, setDadosPedido] = useState({});\r\n\r\n useState(\r\n () => {\r\n let filtro = \"\";\r\n let cliente = getClienteCat();\r\n if (cliente != null) {\r\n filtro = `&Cliente=${cliente}`;\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-DataEmissao', outrosFiltros: filtro } });\r\n }, []\r\n );\r\n\r\n function menuTableOutros(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function visualizar(record) {\r\n setOpenDrawer(true);\r\n setDadosPedido(record);\r\n };\r\n\r\n function imprimir(record) {\r\n\r\n };\r\n\r\n return (\r\n //inicial\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n {numero}\r\n )\r\n },\r\n {\r\n title: \"Cliente\",\r\n width: 250,\r\n render: ({ nomeCliente }) => (\r\n {nomeCliente}\r\n )\r\n },\r\n {\r\n title: \"Data\",\r\n width: 150,\r\n render: ({ dataEmissao }) => (\r\n {moment(dataEmissao).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Grupos\r\n \r\n Adicione o(s) grupo(s) do Catálogo aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n {Codigo}\r\n ),\r\n }, {\r\n title: \"Descrição\",\r\n align: \"center\",\r\n render: ({ Descricao }) => (\r\n {Descricao}\r\n ),\r\n }, {\r\n title: \"Sequencia\",\r\n align: \"center\",\r\n render: ({ Sequencia }) => (\r\n {Sequencia}\r\n ),\r\n }, {\r\n title: \"Sub-Grupo\",\r\n align: \"center\",\r\n render: ({ SubGrupo }) => (\r\n {SubGrupo.Codigo}\r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n ]} />\r\n \r\n \r\n \r\n )\r\n}","import { Button, Col, Form, Row, Modal, notification } from 'antd';\r\nimport React, { useState } from 'react';\r\nimport ManutencaoCatalogo from './manutencao';\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport { drawerActions } from '../../actions';\r\nimport api from '../../services/api';\r\n\r\nexport default function DrawerCadastroCatalogo() {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaGrupos, setListaGrupos] = useState([]);\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const aoSalvar = () => {\r\n let catalogoTemp = form.getFieldsValue();\r\n catalogoTemp.Empresa = 1;\r\n catalogoTemp.CaminhoImg = 'null';\r\n catalogoTemp.Grupos = listaGrupos;\r\n setCarregando(true);\r\n api.post(`Cat001/Incluir`, catalogoTemp)\r\n .then(() => {\r\n\r\n notification.success({ message: 'Sucesso!', message: 'Catálogo incluído com sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n console.error('Erro ao salvar catálogo:', error);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n fecharDrawer();\r\n setListaGrupos([]); \r\n form.resetFields();\r\n });\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n setListaGrupos([]);\r\n form.resetFields();\r\n }\r\n })\r\n }\r\n\r\n return (\r\n { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { BreadcrumbIncluirDados, TabelaDados } from '../../components';\r\nimport { Button, Col, Row, Modal, notification } from 'antd';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\nimport DrawerCadastroCatalogo from './drawer';\r\nimport { DeleteOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport api from '../../services/api';\r\n\r\nexport default function CadastroCatalogo() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+desccatalogo', outrosFiltros: `&empresa=1` } });\r\n }, []);\r\n\r\n const modalExcluirCat = (Codigo) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: 'Deseja realmente excluir o grupo?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk () {\r\n ExcluirCat(Codigo);\r\n }\r\n })\r\n }\r\n\r\n // const editCatalogo = (Codigo) => {\r\n // api.get(`Cat001/Buscar?empresa=${1}&cta001=${Codigo.codcatalogo}`).then(\r\n // (res) => {\r\n // console.log(res)\r\n // }\r\n // ).catch(\r\n // (error) => {\r\n // console.error(\"erro: \", error);\r\n // }\r\n // )\r\n // }\r\n\r\n const ExcluirCat = (Codigo) => {\r\n api.post(`Cat001/Excluir?codigo=${Codigo.codcatalogo}`).then(\r\n (res) => {\r\n notification.success({ message: 'Catálogo excluido com sucesso!' });\r\n }\r\n ).catch(\r\n (error) => {\r\n console.error('Erro ao excluir catálogo:', error);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n {codcatalogo}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ desccatalogo }) => (\r\n
\r\n {desccatalogo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cód. Linha',\r\n render: ({ codlinha }) => (\r\n
\r\n {codlinha}\r\n
\r\n ),\r\n }, {\r\n title: \"Linha\",\r\n render: ({ linha }) => (\r\n
\r\n {linha?.descLinha}\r\n
\r\n )\r\n }, {\r\n title: \"Ações\",\r\n align: \"center\",\r\n fixed: \"right\",\r\n key: \"x\",\r\n width: 95,\r\n render: (Codigo) => (\r\n
\r\n \r\n {/*
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n NF-e\r\n NFC-e\r\n \r\n \r\n \r\n \r\n \r\n \r\n {serie.map((ser) => (\r\n {ser.ser_serie}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Button, Col, Form, Input, Modal, Row, Select, Table, Tag, Tooltip, Typography, notification, Checkbox, InputNumber, Popover } from \"antd\";\r\nimport { FiltroProdutoKit, FormGW, InputPreco, SelectProduto } from \"../../components\";\r\nimport { BarcodeOutlined, CheckOutlined, CloseOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport { calculaDigitoVerificadorEAN, validarEan } from \"../../services/funcoes\";\r\nimport api from \"../../services/api\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function ManutencaoKitComposicao({ formulario, salvandoDados, aoSalvar, editando }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const [listaUnidadeMedida, setListaUnidadeMedida] = useState([]);\r\n const [listaItems, setListaItems] = useState([]);\r\n const [controlButton, setControlButton] = useState(true);\r\n\r\n const [formGrade] = Form.useForm();\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados?.pro_id) {\r\n carregarItensProdutoKit(manutencao.dados?.pro_id);\r\n }\r\n carregarListas();\r\n }, [])\r\n\r\n function carregarItensProdutoKit(pro_id, soAtivos = true) {\r\n api.get(`ProdutoKitComposicao/ListarItens?idProduto=${pro_id}&soAtivos=${soAtivos}`).then(\r\n res => {\r\n res.data?.items?.forEach(item => {\r\n item.editando = false;\r\n })\r\n setListaItems(res.data?.items)\r\n let dadosTemp = { ...manutencao.dados }\r\n dadosTemp.preco_total_kit = parseFloat(res.data?.items?.reduce((total, item) => total + parseFloat(item.qtde_item * item.pkc_valorunitario), 0));\r\n formulario.setFieldsValue(dadosTemp);\r\n\r\n }\r\n ).catch(\r\n error => console.log(error)\r\n )\r\n }\r\n\r\n async function salvarDados(values) {\r\n let dadosPost = { ...values };\r\n dadosPost.lpi_valorvenda = parseFloat(values.preco_total_kit).toFixed(2);\r\n dadosPost.listaProdutosKit = listaItems\r\n\r\n if (!dadosPost.pro_id) {\r\n salvarManutencao(dadosPost);\r\n } else {\r\n editarManutencao(dadosPost);\r\n }\r\n }\r\n\r\n function salvarManutencao(dadosPost) {\r\n salvandoDados(true);\r\n api.post(`ProdutoKitComposicao/Incluir`, dadosPost).then(\r\n res => {\r\n\r\n notification.success({ message: 'Sucesso!', description: 'Kit Composição inserido com sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n notification.warn({ message: 'Aviso!', description: 'Não foi possivel inserir o Kit!' });\r\n }\r\n ).finally(() => {\r\n salvandoDados(false);\r\n setListaItems([]);\r\n aoSalvar();\r\n })\r\n }\r\n\r\n function editarManutencao(dadosPost) {\r\n salvandoDados(true);\r\n api.put(`ProdutoKitComposicao/Editar`, dadosPost).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: 'Kit Composição inserido com sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n notification.warn({ message: 'Aviso!', description: 'Não foi possivel inserir o Kit!' });\r\n }\r\n ).finally(() => {\r\n salvandoDados(false);\r\n setListaItems([]);\r\n aoSalvar();\r\n })\r\n }\r\n\r\n async function carregarListas() {\r\n let unidade = await api.get(`unidademedida/listar?PageSize=100&PageNumber=1`);\r\n if (!!formulario.getFieldValue().ump_id && unidade.data?.items.length > 0 && !unidade.data?.items?.find((un) => { return un.ump_id === formulario.getFieldValue().ump_id })) {\r\n formulario.setFieldsValue({ ump_id: null });\r\n\r\n }\r\n setListaUnidadeMedida(unidade.data?.items);\r\n }\r\n\r\n useEffect(() => {\r\n if (listaUnidadeMedida.length > 0 && !formulario.getFieldValue().ump_id) {\r\n formulario.setFieldsValue({ ump_id: listaUnidadeMedida.find(un => un.ump_id === 'UN').ump_id });\r\n }\r\n }, [listaUnidadeMedida]);\r\n\r\n useEffect(() => {\r\n if (listaItems.length > 0) {\r\n formulario.setFieldsValue({ preco_total_kit: parseFloat(listaItems?.reduce((total, item) => total + parseFloat(item.qtde_item * item.pkc_valorunitario), 0)).toFixed(2) });\r\n }\r\n }, [listaItems])\r\n\r\n\r\n function onBlurProEan(event) {\r\n let codEan = \"\";\r\n if (!!event.currentTarget) {\r\n codEan = event.currentTarget.value;\r\n } else {\r\n codEan = event;\r\n }\r\n if (codEan !== \"\") {\r\n if (validarEan(codEan)) {\r\n buscarEanExistente(codEan);\r\n if (codEan.startsWith(\"7\") && codEan.length === 13)\r\n formulario.setFieldsValue({ pro_eaninvalido: false });\r\n else\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n } else {\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n notification.warning({ description: 'EAN informado fora dos padrões GTIN, verifique o EAN antes de continuar!', message: 'Aviso' });\r\n }\r\n }\r\n }\r\n\r\n function buscarEanExistente(event) {\r\n let codEan;\r\n if (!!event.currentTarget) {\r\n codEan = event.currentTarget.value;\r\n } else {\r\n codEan = event;\r\n }\r\n if (isNaN(codEan)) {\r\n return;\r\n }\r\n api.get(`Produto/VerificaEanExistente?CodigoEan=${codEan}`).then(\r\n res => {\r\n if (!!res.data && res.data.existe == true) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Produto já cadastrado - deseja alterá-lo?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n buscarProdutosEan(res.data.pro_id);\r\n }, onCancel() {\r\n formulario.resetFields();\r\n }\r\n });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n }\r\n );\r\n }\r\n\r\n function buscarProdutosEan(IdProduto) {\r\n api.get(`produto/RetornaDadosProduto?ProdutoId=${IdProduto}`).then(\r\n res => {\r\n formulario.setFieldsValue(res.data);\r\n editando.setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function gerarEANProduto(campo) {\r\n let eanAnterior = null;\r\n\r\n let primeiroNumero = \"6\";\r\n let EAN;\r\n let digitoVerificador;\r\n eanAnterior = primeiroNumero;\r\n for (let i = 0; i <= 10; i++) {\r\n eanAnterior += Math.floor((Math.random() * 9) + 1).toString();\r\n }\r\n EAN = eanAnterior;\r\n EAN = EAN.substring(0, 12);\r\n EAN = (parseInt(EAN) + 1).toString();\r\n eanAnterior = EAN;\r\n digitoVerificador = calculaDigitoVerificadorEAN(EAN);\r\n EAN = EAN + \"\" + digitoVerificador;\r\n\r\n if (!!campo) {\r\n formGrade.setFieldsValue({ [campo]: EAN });\r\n } else {\r\n formulario.setFieldsValue({ pro_ean: EAN });\r\n }\r\n formulario.setFieldsValue({ pro_eaninvalido: true });\r\n }\r\n\r\n function calcularValorVendaPorMarkup() {\r\n let valorItens = listaItems?.reduce((total, item) => total + parseFloat(item.qtde_item * item.pkc_valorunitario), 0);\r\n let valorProdutoKit = formulario.getFieldsValue().preco_total_kit;\r\n let porc_desconto = ((valorProdutoKit * 100) / valorItens).toFixed(6);\r\n let listaItemsTemp = [...listaItems];\r\n // Ordenar a lista primeiro por qtde_item (em ordem decrescente) e depois por pkc_valorunitario (em ordem crescente)\r\n listaItemsTemp.sort((a, b) => {\r\n if (a.qtde_item !== b.qtde_item) {\r\n return b.qtde_item - a.qtde_item;\r\n } else {\r\n return a.pkc_valorunitario - b.pkc_valorunitario;\r\n }\r\n });\r\n let count = 0;\r\n let somaValor = 0;\r\n listaItemsTemp.forEach((item) => {\r\n count++;\r\n if (listaItemsTemp.length !== count) {\r\n item.pkc_valorunitario = parseFloat(((item.pkc_valorunitario * porc_desconto)) / 100).toFixed(2);\r\n somaValor += parseFloat((item.pkc_valorunitario * item.qtde_item).toFixed(2));\r\n }\r\n else {\r\n if (item.qtde_item === 1) {\r\n let diferenca = parseFloat(valorProdutoKit - somaValor).toFixed(2);\r\n item.pkc_valorunitario = diferenca;\r\n } else {\r\n item.pkc_valorunitario = parseFloat(((item.pkc_valorunitario * porc_desconto)) / 100).toFixed(2);\r\n somaValor += parseFloat((item.pkc_valorunitario * item.qtde_item).toFixed(2));\r\n }\r\n }\r\n })\r\n setListaItems(listaItemsTemp);\r\n };\r\n\r\n const editarItem = (index) => {\r\n let listaTemp = [...listaItems];\r\n let item = listaTemp[index];\r\n listaTemp[index].editando = true;\r\n setListaItems(listaTemp);\r\n formulario.setFieldsValue({ [`pkc_valorunitario`]: item.pkc_valorunitario });\r\n formulario.setFieldsValue({ [\"pkc_qtde_item\"]: item.qtde_item });\r\n setControlButton(true);\r\n }\r\n\r\n const saveEdition = (index) => {\r\n let listaTemp = [...listaItems];\r\n let item = listaTemp[index];\r\n let qtdeItem = formulario.getFieldValue().pkc_qtde_item;\r\n let pkcValorUnitario = formulario.getFieldsValue().pkc_valorunitario;\r\n\r\n let novoValorTotal = qtdeItem * pkcValorUnitario;\r\n\r\n listaTemp[index] = {\r\n ...item,\r\n qtde_item: qtdeItem,\r\n pkc_valorunitario: pkcValorUnitario\r\n };\r\n\r\n listaTemp[index].editando = false;\r\n\r\n setListaItems(listaTemp);\r\n\r\n };\r\n\r\n const cancelEdition = (index) => {\r\n let listaTemp = [...listaItems];\r\n listaTemp[index].editando = false;\r\n setListaItems(listaTemp);\r\n }\r\n\r\n function excluirItem(record, index) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover o item do kit?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarItem(record, index)\r\n }\r\n });\r\n }\r\n\r\n async function inativarItem(record, index) {\r\n if (!!record.pkc_id) {\r\n let retorno = await api.put(`ProdutoKitComposicao/AtivarInativarItem`, record);\r\n if (!retorno) {\r\n notification.warning({ description: 'Aviso!', message: 'Não foi possivel inativar o item' });\r\n return;\r\n }\r\n notification.success({ description: 'Sucesso!', description: 'Item inativado com sucesso!' });\r\n }\r\n let listaTemp = [...listaItems];\r\n listaTemp.splice(index, 1);\r\n setListaItems(listaTemp)\r\n }\r\n\r\n function ativarItem(record) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja reativar o item do kit?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n ativarItem(record)\r\n }\r\n });\r\n }\r\n\r\n function ativarItem(record) {\r\n api.put(`ProdutoKitComposicao/AtivarInativarItem`, record).then(\r\n res => {\r\n if (res.data) {\r\n notification.success({ message: 'Sucesso!', description: 'Item ativo novamente!' });\r\n carregarItensProdutoKit(manutencao.dados?.pro_id, formulario.getFieldsValue()?.listar_inativos)\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: 'Não foi possivel ativar o Item!' });\r\n }\r\n )\r\n }\r\n\r\n function myFunction(index) {\r\n let listaTemp = [...listaItems];\r\n let item = listaTemp[index];\r\n let qtdeItem = formulario.getFieldValue().pkc_qtde_item;\r\n let pkcValorUnitario = formulario.getFieldValue().pkc_valorunitario;\r\n\r\n if (qtdeItem !== item.qtde_item || pkcValorUnitario !== item.pkc_valorunitario) {\r\n setControlButton(false);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n salvarDados(values)}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Código de Barras - EAN\r\n \r\n \r\n \r\n \r\n }>\r\n onBlurProEan(event)} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaUnidadeMedida.map((um) => ({um.ump_id} - {um.ump_descricao}))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n align: 'left',\r\n render: ({ pro_descricao }) => (\r\n {pro_descricao}\r\n )\r\n },\r\n {\r\n title: 'Qtde',\r\n width: 75,\r\n align: 'center',\r\n render: ({ qtde_item, editando }, record, index) => (\r\n
\r\n \r\n {editando ?\r\n myFunction(index)}\r\n /> : {FormatNumber(qtde_item, true)}\r\n }\r\n \r\n
\r\n )\r\n },\r\n {\r\n title: 'Vlr Tabela',\r\n width: 100,\r\n align: 'right',\r\n render: ({ lpi_valorvenda }) => (\r\n R$ {parseFloat(lpi_valorvenda).toFixed(2)}\r\n )\r\n },\r\n {\r\n title: 'Vlr Unitário',\r\n width: 100,\r\n align: 'right',\r\n render: ({ pkc_valorunitario, editando }, record, index) => (\r\n
\r\n {editando ?\r\n myFunction(index)}\r\n /> : R$ {parseFloat(pkc_valorunitario).toFixed(2)}\r\n }\r\n
\r\n )\r\n },\r\n {\r\n title: 'Vlr Total',\r\n width: 100,\r\n align: 'right',\r\n render: ({ pkc_valorunitario, qtde_item }) => (\r\n R$ {FormatNumber(parseFloat(qtde_item * pkc_valorunitario).toFixed(2))}\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: ({ editando }, record, index) => {\r\n return
\r\n \r\n
\r\n {editando ?\r\n saveEdition(index)}\r\n icon={}\r\n /> :\r\n editarItem(index)}\r\n icon={}\r\n />\r\n }\r\n \r\n \r\n {editando ? \r\n carregarItensProdutoKit(manutencao.dados?.pro_id, !formulario.getFieldsValue().listar_inativos)}>\r\n Listar Itens Inativos \r\n \r\n \r\n \r\n calcularValorVendaPorMarkup()} />\r\n \r\n \r\n \r\n \r\n \r\n Valor Total dos Itens: R$ {parseFloat(listaItems?.reduce((total, item) => total + parseFloat(item.qtde_item * item.pkc_valorunitario), 0)).toFixed(2)}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { Button, Col, Drawer, Form, Modal, Row } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport ManutencaoKitComposicao from \"./manutencao\";\r\n\r\nexport default function DrawerKitComposicao({ editando, setFechouCadastro, fechouCadastro }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [formKitComp] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n function fecharDrawer() {\r\n formKitComp.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pro_descricao' } });\r\n setFechouCadastro(!fechouCadastro);\r\n }\r\n\r\n return (\r\n }\r\n onClose={() => onClose()}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}","import { Col, Modal, Popover, Row, Table, Tag, notification } from \"antd\";\r\nimport { BreadcrumbIncluirDados, Editar, Excluir, PesquisaOrdenacao } from \"../../components\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport DrawerKitComposicao from \"./drawer\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport api from \"../../services/api\";\r\nimport { useEffect, useState } from \"react\";\r\n\r\nexport default function KitComposicao({ formulario }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaKits, setListaKits] = useState([]);\r\n const [attList, setAttList] = useState(false);\r\n const [fechouCadastro, setFechouCadastro] = useState(false)\r\n\r\n useEffect (() => {\r\n carregarListaKit();\r\n }, [ , attList, fechouCadastro]);\r\n\r\n async function carregarListaKit () {\r\n try {\r\n const response = await api.get(`ProdutoKitComposicao/ListarTodos?pageNumber=1&PageSize=20`);\r\n setListaKits(response.data?.items);\r\n } catch (error) {\r\n console.error(\"Erro ao carregar lista de kits:\", error);\r\n }\r\n };\r\n \r\n const modalExcluir = (dados, index) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o kit ${dados.pro_descricao}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n inativarKit(dados, index);\r\n }\r\n });\r\n };\r\n\r\n const inativarKit = async (dados, index) => {\r\n if (!!dados.pro_codigo) {\r\n let retorno = await api.put(`produto/AtivarInativar?IdProduto=${dados.pro_id}&Ativo=false`);\r\n if (!retorno) {\r\n notification.warning({ description: 'Aviso!', message: 'Não foi possível inativar o kit' });\r\n return;\r\n }\r\n notification.success({ description: 'Sucesso!', message: 'Kit inativado com sucesso!' });\r\n setAttList(true);\r\n }\r\n let listaTemp = [...listaKits];\r\n listaTemp.splice(index, 1);\r\n setListaKits(listaTemp)\r\n };\r\n console.log(listaKits)\r\n return (\r\n
\r\n \r\n \r\n
\r\n
(\r\n \r\n \r\n {pro_codigo}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'EAN-13',\r\n align: 'center',\r\n width: 110,\r\n render: ({ pro_ean }) => (\r\n
\r\n {pro_ean}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ pro_descricao }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Preço (R$)',\r\n align: 'right',\r\n render: ({ precoVendaMinimo, precoVendaMaximo }) => (\r\n
\r\n {precoVendaMinimo === precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)}\r\n }\r\n {precoVendaMinimo !== precoVendaMaximo &&\r\n {FormatNumber(precoVendaMinimo, true)} até {FormatNumber(precoVendaMaximo, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (record, dados) => (\r\n
\r\n \r\n
\r\n {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(record) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import { Button, Col, Form, Row, Select, notification, TimePicker } from \"antd\";\r\nimport { BreadcrumbPage, Data, SelectPaginacao } from \"../../components\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\nimport { selectPaginadoActions} from \"../../actions\";\r\nimport { DownloadOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\nimport { HasValue } from \"../../services/funcoes\";\r\n\r\nexport default function Balanca() {\r\n const [formulario] = Form.useForm();\r\n const [{ ui, manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [modeloBalanca, setModeloBalanca] = useState([]);\r\n const [filtroGrupo, setFiltroGrupo] = useState(null);\r\n const [grupoSelect, setGrupoSelect] = useState([]);\r\n const format = 'HH:mm';\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [])\r\n\r\n function carregarDados() {\r\n api.get(`/ParametroEmpresa/BuscarParametros`).then(res => {\r\n formulario.setFieldsValue({ par_modelobalanca: res.data.par_modelobalanca });\r\n }).catch((erro) => console.error(erro));\r\n\r\n\r\n api.get(`Enum/Listar?nome=ModeloBalanca`).then(res => {\r\n if (res.status === 200) {\r\n setModeloBalanca(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n\r\n function carregarSubGrupos(CodigoGrupo) {\r\n if (!!CodigoGrupo) {\r\n setFiltroGrupo(`&CodigoGrupo=${CodigoGrupo}`);\r\n let lista = [];\r\n if (!!formulario.getFieldValue().gru_id) {\r\n lista.push({ name: \"sgp_id\", campo: \"CodigoGrupo\", value: formulario.getFieldValue().gru_id });\r\n }\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n function download() {\r\n let form = formulario.getFieldsValue();\r\n let dataHoraAtz = HasValue(form.dataatualizacao)?moment(form.dataatualizacao).format('YYYY-MM-DD'):'';\r\n dataHoraAtz += dataHoraAtz!=''? (HasValue(form.horaatualizacao) ?'T'+moment(form.horaatualizacao).format('HH:mm:ss') : 'T00:00:00') : '';\r\n \r\n if (form.modeloBalanca != null) {\r\n return notification.warning({ message: \"Aviso!\", description: \"Modelo da Banlança deve ser informado!\" });\r\n }\r\n \r\n let filtros = HasValue(form.par_modelobalanca)? `?IdBalanca=${form.par_modelobalanca}` : '';\r\n filtros += HasValue(dataHoraAtz)? `&DataHora=${dataHoraAtz}` : '';\r\n filtros += HasValue(form.pro_id)? `&IdProduto=${form.pro_id}` : '';\r\n filtros += HasValue(form.gru_id)? `&IdGrupo=${form.gru_id}` : '';\r\n filtros += HasValue(form.sgp_id)? `&IdSubGrupo=${form.sgp_id}` : '';\r\n \r\n api.get(`Produto/GerarArquivoBalanca${filtros}`)\r\n .then\r\n (res => {\r\n let linkOculto = document.createElement('a');\r\n linkOculto.href = 'data:text/txt,' + encodeURIComponent((res.data));\r\n linkOculto.download = \"ITENSMGV.txt\";\r\n document.body.appendChild(linkOculto);\r\n linkOculto.click();\r\n linkOculto.remove();\r\n notification.success({ description: \"Download realizado com sucesso!\", message: 'Aviso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n let msg = !!erro && !!erro.message ? erro.message : \"Não foi possível realizar o download!\";\r\n let msg2 = !!erro.response && !!erro.response.data ? erro.response.data : \"\";\r\n notification.warning({ description: <>{msg2}
{msg} , message: 'Aviso!' });\r\n }\r\n );\r\n\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarSubGrupos(IdGrupo)}\r\n onChangeFunction={(IdGrupo) => carregarSubGrupos(IdGrupo)}\r\n setListaDados={setGrupoSelect}\r\n allowClear={true}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Tabs, Form, Table, Divider, Popover } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\nimport TabelaDados from '../tabelaDados';\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { novaAbaNavegador } from '../../services/funcoes';\r\n\r\nexport default function DetalhesRecibo({ dadosModal }) {\r\n\r\n const [detalheRecibo, setDetalheRecibo] = useState({});\r\n const [parcelasProcessadas, setParcelasProcessadas] = useState([]);\r\n\r\n useEffect(() => {\r\n if (dadosModal) {\r\n setDetalheRecibo(dadosModal);\r\n const processedParcelas = processParcelas(dadosModal.parcelas);\r\n setParcelasProcessadas(processedParcelas);\r\n }\r\n }, [dadosModal]);\r\n\r\n const processParcelas = (parcelas) => {\r\n const sortedParcelas = parcelas.sort((a, b) => a.cpr_numerodocumento - b.cpr_numerodocumento);\r\n\r\n const groupedParcelas = sortedParcelas.reduce((acc, current) => {\r\n const { prc_id, valorQuitado } = current;\r\n\r\n if (!acc[prc_id]) {\r\n acc[prc_id] = { ...current, valorQuitado: 0 };\r\n }\r\n\r\n acc[prc_id].valorQuitado += valorQuitado;\r\n return acc;\r\n }, {});\r\n\r\n return Object.values(groupedParcelas);\r\n };\r\n function visualizarDanfe(cde_chaveacesso) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${cde_chaveacesso}`);\r\n };\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosModal.pes_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.fpg_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.cpg_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosModal.rec_decricaofinanceiro}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n visualizarDanfe(dadosModal.cde_chaveacesso)}>Clique para visualizar o Danfe}\r\n title=\"Visualizar Danfe\"\r\n >\r\n {dadosModal.cde_chaveacesso}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {cpr_numerodocumento}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'N° Parcela / Qde Parcelas',\r\n width: '20%',\r\n align: 'center',\r\n render: ({ prc_numeroparcela, cpr_numeroparcelas }) => (\r\n
\r\n {prc_numeroparcela}/{cpr_numeroparcelas}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Vencimento',\r\n width: '20%',\r\n align: 'center',\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Juros (R$)',\r\n width: '20%',\r\n align: 'right',\r\n render: ({ valorJuros }) => (\r\n
\r\n {FormatNumber(valorJuros, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Desconto (R$)',\r\n width: '20%',\r\n align: 'right',\r\n render: ({ valorDesconto }) => (\r\n
\r\n {FormatNumber(valorDesconto, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Quitado (R$)',\r\n fixed: 'right',\r\n width: '25%',\r\n align: 'right',\r\n render: ({ valorQuitado }) => (\r\n
\r\n {FormatNumber(valorQuitado, true)}\r\n
\r\n ),\r\n },\r\n ]} dataSource={parcelasProcessadas} pagination={false} scroll={{\r\n x: 600,\r\n y: 300,\r\n }}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Modal } from \"antd\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport DetalhesRecibo from \"../../components/detalheRecibo\";\r\n\r\nexport default function ModalDetalheRecibo({ exibirModal, fecharModal, dadosModal }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const onClose = () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharModal();\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Button, Form, Dropdown, Menu, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, EyeOutlined, FundTwoTone, MoreOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport { BreadcrumbAbrirChamado, ComboData, Data, FiltroOrdenacao, FiltroSearch, TabelaDados } from \"../../components\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatDate, FormatNumber } from \"../../ValueObjects\";\r\nimport ModalDetalheRecibo from \"./modalDetalheRecibo\";\r\nimport { novaAbaNavegador, openPdfNewTab } from \"../../services/funcoes\";\r\n\r\nexport default function ConsultaRecebimento() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dataAtual] = useState(new Date());\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [formRecebimento] = Form.useForm();\r\n const [openModalRecibo, setOpenModalRecibo] = useState(false);\r\n const [dadosDetalheRecibo, setDadosDetalheRecibo] = useState({});\r\n\r\n useEffect(() => {\r\n formRecebimento.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n }, []);\r\n\r\n useEffect(() => {\r\n carregarData();\r\n }, [dataPesquisa]);\r\n\r\n function carregarData() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataInicial=${FormatDate(dataPesquisa)}&dataFinal=${FormatDate(dataAtual.toLocaleDateString())}`, filtro: '', ordem: '-rec_datahora' } })\r\n };\r\n\r\n function filtrarPeriodo() {\r\n let filtros = '';\r\n filtros += `&dataInicial=${(!!formRecebimento.getFieldValue().dataInicial ? moment(formRecebimento.getFieldValue().dataInicial).format('YYYY-MM-DD') : FormatDate(dataAtual))}`;\r\n filtros += `&dataFinal=${(formRecebimento.getFieldValue().dataFinal === undefined ? FormatDate(dataAtual) : FormatDate(formRecebimento.getFieldValue().dataFinal._d.toLocaleDateString()))}`;\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtros } });\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n function reimprimirRecibo(record) {\r\n Modal.confirm({\r\n title: 'Deseja reimprimir o recibo?',\r\n icon: ,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n openPdfNewTab(`ContasPagarReceber/ReImprimirComprovantePagamento?IdRecibo=${record.rec_id}`);\r\n if (record.cde_id) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNfe=${record.cde_chaveacesso}`);\r\n }\r\n },\r\n });\r\n };\r\n\r\n async function visualizarDetalhes(dados) {\r\n setDadosDetalheRecibo(dados);\r\n setOpenModalRecibo(true);\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n formRecebimento.setFieldsValue({ dataFinal: moment(new Date()) });\r\n formRecebimento.setFieldsValue({ dataInicial: moment(formRecebimento.getFieldValue().dataPesquisa) });\r\n filtrarPeriodo();\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n (\r\n
\r\n {rec_numero}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Cliente',\r\n width: '25%',\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Usuário',\r\n width: '15%',\r\n render: ({ usu_nome }) => (\r\n
\r\n {usu_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Forma Pagamento',\r\n width: '20%',\r\n render: ({ fpg_descricao }) => (\r\n
\r\n {fpg_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Descrição',\r\n width: '12%',\r\n render: ({ rec_decricaofinanceiro }) => (\r\n
\r\n {rec_decricaofinanceiro}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Data Pagamento',\r\n width: '12%',\r\n align: 'center',\r\n render: ({ rec_datahora }) => (\r\n
\r\n {moment(rec_datahora).format('DD/MM/YYYY HH:mm')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Descontos',\r\n width: '8%',\r\n align: 'right',\r\n render: ({ valorDesconto }) => (\r\n
\r\n {FormatNumber(valorDesconto, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Juros',\r\n width: '8%',\r\n align: 'right',\r\n render: ({ valorJuros }) => (\r\n
\r\n {FormatNumber(valorJuros, true)}\r\n
\r\n )\r\n }, {\r\n title: 'Multa',\r\n width: '8%',\r\n align: 'right',\r\n render: ({ valorMulta }) => (\r\n
\r\n {FormatNumber(valorMulta, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor Total',\r\n width: '10%',\r\n fixed: 'right',\r\n align: 'right',\r\n render: ({ valorTotal }) => (\r\n
\r\n {FormatNumber(valorTotal, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n listarMovimentacao(valor)} allowClear />\r\n \r\n \r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaMovimentacao.map((item) => (\r\n
\r\n \r\n \r\n
\r\n
\r\n \"Visa\"\r\n
\r\n \r\n \r\n \r\n \r\n {item.fpg_tipopagamento === 3 ? \"Crédito\" : \"Débito\"} \r\n \r\n \r\n \r\n \r\n \r\n {item.bce_nomecredenciadora}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {item.ban_descricao} {item.ban_id} - {item.ban_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Agência: {item.ctc_numeroagencia}\r\n \r\n \r\n \r\n \r\n Conta: {item.ctc_numeroconta}\r\n \r\n \r\n \r\n \r\n \r\n {item.dadosTaxaCartaoCreditoParcela.length === 0 &&\r\n \r\n {item.fpg_tipopagamento === 3 && { calcularTaxaCartao(e, item.bnd_id, item.fpg_tipopagamento) }}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />}\r\n {item.fpg_tipopagamento === 4 && { calcularTaxaCartao(e, item.bnd_id, item.fpg_tipopagamento) }}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />}\r\n \r\n }\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Total Bruto (R$): {FormatNumber(item.totalBruto, true, false)}\r\n \r\n \r\n \r\n \r\n Taxas (R$): {FormatNumber(item.totaltaxas, true, false)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n Total Líquido (R$):
\r\n {FormatNumber(item.totalBruto - item.totaltaxas, true, false)}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n
(\r\n
\r\n {moment(rcc_datalancamento).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Previsão de Recebimento',\r\n width: 158,\r\n render: ({ rcc_previsaorecebimento }) => (\r\n
\r\n {moment(rcc_previsaorecebimento).format(\"DD/MM/YYYY\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Série',\r\n render: ({ ser_serie }) => (\r\n
\r\n {ser_serie || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Doc. Fiscal',\r\n render: ({ ntf_numero }) => (\r\n
\r\n {ntf_numero || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Parcela',\r\n width: 65,\r\n align: 'center',\r\n render: ({ rcc_parcelarecebimento, numeroParcelas }) => (\r\n
\r\n {rcc_parcelarecebimento}\r\n {item.fpg_tipopagamento === 3 && /{numeroParcelas}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'NSU',\r\n render: ({ rcc_nsu }) => (\r\n
\r\n {rcc_nsu || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ rcc_valor }) => (\r\n
\r\n {FormatNumber(rcc_valor, true)}\r\n
\r\n ),\r\n },\r\n ]\r\n }\r\n scroll={{ x: 900 }} />\r\n {!!item.auxTotalBruto &&\r\n
\r\n \r\n
\r\n \r\n \r\n Total Bruto (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotalBruto, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Tarifas (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotaltaxas, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total Líquido (R$):\r\n \r\n \r\n {FormatNumber(item.auxTotalBruto - item.auxTotaltaxas, true)}\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Radio, Button, Collapse, Tag, Dropdown, Menu, Popover, Modal, notification, Input, Divider, Table } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber, FormatDate } from \"../../ValueObjects\";\r\nimport { manutencaoActions, listagemActions } from \"../../actions\";\r\nimport { formatarCpfCnpj } from \"../../services/funcoes\";\r\nimport { BreadcrumbPage, ComboData, Data } from \"../../components\";\r\nimport { linkApi } from \"../../services/auth\";\r\nimport { DownOutlined, SaveOutlined, ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ParcelaCartao() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [listaMovimentacao, setListaMovimentacao] = useState([]);\r\n const [expandedRowKey, setExpandedRowKey] = useState(null); // Estado para controlar a linha expandida\r\n const [totalConciliado, setTotalConciliado] = useState(null);\r\n const [totalNaoConciliado, setTotalNaoConciliado] = useState(null);\r\n const [totalizador, setTotalizador] = useState(false);\r\n\r\n const handleExpand = (record) => {\r\n setExpandedRowKey(record.key === expandedRowKey ? null : record.key);\r\n };\r\n\r\n useEffect(() => {\r\n form.setFieldsValue({ dataInicial: moment(new Date()), dataFinal: moment(new Date()) });\r\n listarMovimentacao();\r\n }, []);\r\n\r\n function listarMovimentacao() {\r\n let filtro = \"\";\r\n filtro += !!form.getFieldValue().dataInicial ? `&dataInicial=${moment(form.getFieldValue().dataInicial).format('YYYY-MM-DD')}` : `&dataInicial=${moment(new Date()).format('YYYY-MM-DD')}`;\r\n filtro += !!form.getFieldValue().dataFinal ? `&dataFinal=${moment(form.getFieldValue().dataFinal).format('YYYY-MM-DD')}` : `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}`;\r\n filtro += !!form.getFieldValue().tipo ? `&tipoMovimentacao=${form.getFieldValue().tipo}` : ''; \r\n filtro += !!form.getFieldValue().TipoDoc ? `&tipoDoc=${form.getFieldValue().TipoDoc}` : '';\r\n filtro += !!form.getFieldValue().conciliados ? `&conciliado=${form.getFieldValue().conciliados}` : '';\r\n filtro += !!form.getFieldValue().filtros ? `&filtro=${form.getFieldValue().filtros}` : '';\r\n api.get(`ConciliacaoCartao/ListarParcelasCartao?${filtro}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dadosMovimentacao = res.data;\r\n if (dadosMovimentacao.length > 0) {\r\n setTotalizador(true);\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: filtro } });\r\n let conciliadoTotal = 0;\r\n let nãoConciliadoTotal = 0;\r\n let conciliado = dadosMovimentacao.filter(item => item.rcc_conciliado === true);\r\n let naoconciliado = dadosMovimentacao.filter(item => item.rcc_conciliado === false);\r\n conciliadoTotal = conciliado.reduce((soma, item) => soma + item.rcc_valor, 0);\r\n nãoConciliadoTotal = naoconciliado.reduce((soma, item) => soma + item.rcc_valor, 0);\r\n setTotalConciliado(conciliadoTotal);\r\n setTotalNaoConciliado(nãoConciliadoTotal);\r\n setListaMovimentacao(dadosMovimentacao);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n\r\n return (\r\n
\r\n {/*
*/}\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n listarMovimentacao(valor)} allowClear />\r\n \r\n \r\n \r\n {\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n form.setFieldsValue({ dataFinal: moment(new Date()) });\r\n form.setFieldsValue({ dataInicial: moment(form.getFieldValue().dataPesquisa) });\r\n listarMovimentacao();\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {moment(record.rcc_previsaorecebimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Conciliado',\r\n width: 50,\r\n render: (record) => (\r\n
\r\n {/* */}\r\n
\r\n \r\n \r\n {((record.rcc_conciliado === false) ? 'Não' : (record.rcc_conciliado === true ? 'Sim' : ''))}\r\n \r\n \r\n \r\n {/* */}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Pagamento',\r\n width: 70,\r\n render: (record) => (\r\n
\r\n {record.tipo}\r\n
\r\n ),\r\n\r\n },\r\n {\r\n title: 'Tipo Doc.',\r\n width: 70,\r\n render: (record) => (\r\n
\r\n {record.tipoDoc}\r\n
\r\n ),\r\n\r\n },\r\n {\r\n title: 'Bandeira',\r\n width: 50,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n
\r\n \"Visa\"\r\n
\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Doc. Fiscal',\r\n width: 50,\r\n render: (record) => (\r\n
\r\n {record.ntf_numero}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Parcela',\r\n width: 50,\r\n render: (record) => (\r\n
\r\n {record.rcc_parcelarecebimento + \" / \" + record.cpr_numeroparcelas}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'NSU',\r\n width: 200,\r\n render: (record) => (\r\n
\r\n {record.rcc_nsu || '-'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Conciliado',\r\n width: 50,\r\n render: (record) => (\r\n
\r\n {record.hcc_datahoraconciliacao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Taxa (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: (record) => (\r\n
\r\n {FormatNumber(record.valorTaxa, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: (record) => (\r\n
\r\n {FormatNumber(record.rcc_valor, true)}\r\n
\r\n ),\r\n }\r\n ]}\r\n expandable={{\r\n expandedRowKeys: expandedRowKey ? [expandedRowKey] : [],\r\n onExpand: (expanded, record) => handleExpand(record),\r\n expandedRowRender: (record) => (\r\n
\r\n \r\n
\r\n Chave Nfe: {record.ntf_chavenfe}\r\n \r\n \r\n Série: {record.ser_serie}\r\n \r\n \r\n Cliente: {record.pessoa}\r\n \r\n \r\n \r\n ),\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}\r\n />\r\n \r\n {totalizador && (\r\n
\r\n {/* Totalizadores */}\r\n \r\n
\r\n Total Conciliado: R${FormatNumber(totalConciliado, true)}\r\n \r\n \r\n Total Não Conciliado: R${FormatNumber(totalNaoConciliado, true)}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Col, Input, Select, notification, Upload, Button, message, Tooltip, InputNumber } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { Editar, InputPercentual, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { LoadingOutlined, PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';\r\nimport ImgCrop from \"antd-img-crop\";\r\nimport { DeleteOutlined } from \"@material-ui/icons\";\r\n\r\nexport default function ManutencaoCidade({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [fileList, setFileList] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n const [listaProvedor, setListaProvedor] = useState([]);\r\n const [listaVersao, setListaVersao] = useState([]);\r\n const [hover, setHover] = useState(false);\r\n\r\n\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=NFSeProvedor`).then(res => {\r\n if (res.status === 200) {\r\n setListaProvedor(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=VersaoNFSe`).then(res => {\r\n if (res.status === 200) {\r\n setListaVersao(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n\r\n if (ui.showDrawer && !!manutencao.dados && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.cid_id) {\r\n lista.push({ name: \"cid_id\", campo: \"IdCidade\", value: manutencao.dados.cid_id });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n if (!!manutencao.dados.cnf_brasaocidade) {\r\n setImageUrl(\"data:image/jpeg;base64,\" + manutencao.dados.cnf_brasaocidade);\r\n } else { setImageUrl(null) };\r\n }\r\n\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n \r\n\r\n var logo = (imageUrl == null ? \"\" : imageUrl);\r\n if (!!logo) {\r\n values.cnf_brasaocidade = (logo.split(\",\", 2)[1]);\r\n } else {\r\n values.cnf_brasaocidade = \"\";\r\n }\r\n\r\n let enderecoUrl = 'CidadeConfigNfse/';\r\n\r\n if (values.cnf_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As novas configurações foram salvas com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As configurações foram incluidas com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cnf_id' } });\r\n }\r\n );\r\n }\r\n\r\n }\r\n\r\n const base64 = (imagem, callback) => {\r\n const reader = new FileReader();\r\n reader.addEventListener('load', () => callback(reader.result));\r\n reader.readAsDataURL(imagem);\r\n }\r\n\r\n\r\n const handleChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n return;\r\n }\r\n base64(info.file.originFileObj, (imageUrl) => {\r\n setLoading(false);\r\n setImageUrl(imageUrl);\r\n });\r\n };\r\n\r\n\r\n\r\n const borderColor = hover ? \"#004b97\" : \"#d9d9d9\";\r\n const mouseEnter = () => { setHover(true); }\r\n const mouseLeave = () => { setHover(false); }\r\n const removerImagem = () => { setImageUrl(null); }\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
{loading ? 'Carregando...' : 'Selecionar Imagem'}
\r\n
\r\n );\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n\r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n return { label: item.value, value: item.key, key: item.key }\r\n })} filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} placeholder=\"Selecione a versão para emissão\" />\r\n \r\n \r\n\r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n placeholder=\"% Aliquota de ISSQN\" />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n setImageUrl(null)}\r\n maxCount={1}\r\n disabled={imageUrl}\r\n >\r\n {imageUrl ?\r\n \"teste\"\r\n : uploadButton}\r\n \r\n \r\n {imageUrl &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}\r\n","import DrawerCidade from './drawer';\r\nimport api from '../../services/api';\r\nimport { useEffect } from 'react';\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport { Col, Modal, notification, Popover, Row, Tag } from 'antd';\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport { BreadcrumbIncluirDados, Duplicar, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from '../../components';\r\nimport { useState } from 'react';\r\n\r\n\r\nexport default function Cidade() {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [listaProvedor, setListaProvedor] = useState([]);\r\n const [listaVersao, setListaVersao] = useState([]);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+cnf_id' } }), [listagemActions]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=NFSeProvedor`).then(res => {\r\n if (res.status === 200) {\r\n setListaProvedor(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n api.get(`Enum/Listar?nome=VersaoNFSe`).then(res => {\r\n if (res.status === 200) {\r\n setListaVersao(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n function retornaDescricaoProvedor(cnf_provedornfse) {\r\n if (!!listaProvedor) {\r\n let provedor = listaProvedor.filter((pro) => (pro.key === cnf_provedornfse))[0];\r\n return !!provedor ? provedor.value : \"\";\r\n }\r\n };\r\n\r\n function retornaVersaoNfse(cnf_versaonfse) {\r\n if (!!listaVersao) {\r\n let versao = listaVersao.filter((pro) => (pro.key === cnf_versaonfse))[0];\r\n return !!versao ? versao.value : \"\";\r\n }\r\n };\r\n\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`CidadeConfigNfse/Excluir?id=${dados.cnf_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Configurações excluidas com sucesso!` });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n notification.error({ message: \"erro\", description: `${erro}` })\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+cnf_id' } });\r\n });\r\n }\r\n\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function editandoCidade(dados) {\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n
\r\n {cidade?.cid_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Provedor de NFSE',\r\n render: ({ cnf_provedornfse }) => {\r\n return (\r\n
\r\n \r\n {retornaDescricaoProvedor(cnf_provedornfse)}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Versão NFSE',\r\n render: ({ cnf_versaonfse }) => {\r\n return (\r\n
\r\n {retornaVersaoNfse(cnf_versaonfse)}\r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n {\r\n editandoCidade(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Col, Input, notification, Select, } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport { SelectPaginacao } from \"../../components\";\r\n\r\nexport default function ManutencaoCorrelacaoCfop({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [fileList, setFileList] = useState([]);\r\n const [listaTipo, setListaTipo] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=TipoNotaCorrelacaoCFOP`).then(res => {\r\n if (res.status === 200) {\r\n setListaTipo(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n\r\n if (ui.showDrawer && !!manutencao.dados && editando.editando) {\r\n let lista = [];\r\n if(!!manutencao.dados.cfop_saida){\r\n lista.push({ name: \"cfop_saida\", campo: \"Cfop\", value: manutencao.dados.cfop_saida});\r\n }\r\n if (!!manutencao.dados.cfop_entrada) {\r\n lista.push({ name: \"cfop_entrada\", campo: \"Cfop\", value: manutencao.dados.cfop_entrada});\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'CorrelacaoCfop/';\r\n\r\n if (values.crr_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As novas configurações foram salvas com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"AS configurações foram incluidas com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-crr_id' } });\r\n }\r\n );\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n\r\n
\r\n \r\n ({cfo.cfo_cfop} - {cfo.cfo_descricao})\r\n } />\r\n \r\n \r\n\r\n\r\n \r\n \r\n ({cfo.cfo_cfop} - {cfo.cfo_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n ({ label: item.value, value: item.key, key: item.key }))}\r\n filterOption={(Input, option) => option?.label.toLowerCase().includes(Input.toLocaleLowerCase())}\r\n placeholder={\"Selecione Tipo de Nota\"}\r\n onChange={() => filtro()}\r\n allowClear />\r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pdi_qtdedevolvido === pdi_quantidade ? {pro_descricao} : {pro_descricao}}\r\n \r\n \r\n \r\n \r\n {pdi_qtdedevolvido == pdi_quantidade ?\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n :\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n \r\n }\r\n \r\n \r\n {pdi_qtdedevolvido == pdi_quantidade ?\r\n \r\n Grade: {descricaograde}\r\n :\r\n \r\n Grade: {descricaograde}\r\n \r\n }\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Faturado',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'left',\r\n hidden: !mostrarFaturado,\r\n render: ({ pdi_qtdeentregue }) => (\r\n
\r\n \r\n
\r\n {pdi_qtdeentregue > 1 ? {pdi_qtdeentregue} itens : pdi_qtdeentregue === 1 ? {pdi_qtdeentregue} item : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Devolvido',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'left',\r\n hidden: !mostrarDevolvido,\r\n render: ({ pdi_quantidade, pdi_qtdedevolvido, pdi_qtdeentregue }, record) => (\r\n
\r\n \r\n
\r\n {pdi_qtdedevolvido > 1 ? {pdi_qtdedevolvido} itens : pdi_qtdedevolvido === 1 ? {pdi_qtdedevolvido} item : 0}\r\n {pdi_qtdedevolvido > 0 &&\r\n \r\n \r\n // {dadosContribuinte.emp_regimetributario === 1 ? cso_id : cst_id}\r\n // \r\n // \r\n // ),\r\n // },\r\n {\r\n title: 'Qtde.',\r\n width: '4%',\r\n align: 'right',\r\n fixed: 'left',\r\n render: ({ pdi_quantidade, pdi_qtdedevolvido }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_quantidade, true)} : {FormatNumber(pdi_quantidade, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: '5%',\r\n fixed: 'left',\r\n render: ({ pdi_valorunitario, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_valorunitario, true)} : {FormatNumber(pdi_valorunitario, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ percdesc, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(percdesc, true)}% : {FormatNumber(percdesc, true)}%}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ pdi_percacresc, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_percacresc, true)}% : {FormatNumber(pdi_percacresc, true)}%}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Frete',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ pdi_valorfrete, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_valorfrete, true)} : {FormatNumber(pdi_valorfrete, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_baseIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_baseIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: '% Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_aliquotaIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_aliquotaIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_valorIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_valorIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST?.ret_baseIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_baseIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: '% ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST.ret_aliquotaIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_aliquotaIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST.ret_aliquotaIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_valorIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: '6%',\r\n fixed: 'right',\r\n render: ({ valorItemDesconto, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(valorItemDesconto, true)}\r\n :\r\n {FormatNumber(valorItemDesconto, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'right',\r\n render: ({ pdi_qtdedevolvido, pdi_quantidade }, record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade:\r\n \r\n \r\n {quantidade}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalPedido.totalPedido, true)}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Row, Col, Input, Select, Radio } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Data, InputPreco, SelectIncluir } from '../../components';\r\nimport DrawerTransportadores from '../../components/drawerTransportadores';\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function TabTransporte({ form, dadosVeiculos, valorTotalPedido }) {\r\n\r\n const [dadosTransportador, setDadosTransportador] = useState([]);\r\n const [formTransp] = Form.useForm();\r\n const [mostrarModalTransp, setMostrarModalTransp] = useState(false);\r\n const [mostrarTransportador, setMostrarTransportador] = useState(true);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n if (!!form.getFieldValue().enderecoCliente) {\r\n form.setFieldsValue({ pee_id: form.getFieldValue().enderecoCliente });\r\n }\r\n if (!!form.getFieldValue().trn_id) {\r\n buscarVeiculos();\r\n }\r\n if (form.getFieldValue().ped_modalidadefrete === 9) {\r\n setMostrarTransportador(false);\r\n }\r\n form.setFieldsValue({ ped_dataprevisaoentrega: moment(new Date()) });\r\n //carregarListaTransp();\r\n };\r\n\r\n function buscarVeiculos() {\r\n if (!!form.getFieldValue().trn_id) {\r\n api.get(`VeiculoTransportador/ListarVeiculoTransportador?codigoTransportador=${form.getFieldValue().trn_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n dadosVeiculos.setDadosVeiculos(res.data.items);\r\n form.setFieldsValue({ trv_id: res.data.items[0].trv_id });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function retornaValorFrete() {\r\n let pdi_valorfrete = 0;\r\n let dados = [...dadosTransportador];\r\n let transportador = dados.filter((transp) => (transp.trn_id === form.getFieldValue().trn_id))[0];\r\n if (!!transportador) {\r\n if (!!transportador.trn_valorfretefixo && transportador.trn_valorfretefixo > 0) {\r\n pdi_valorfrete = transportador.trn_valorfretefixo;\r\n } else if (!!transportador.trn_percentualfrete && transportador.trn_percentualfrete > 0) {\r\n pdi_valorfrete = (valorTotalPedido * transportador.trn_percentualfrete) / 100;\r\n }\r\n }\r\n form.setFieldsValue({ pdi_valorfrete: pdi_valorfrete });\r\n };\r\n\r\n function abrirDrawerTransportador() {\r\n setMostrarModalTransp(true);\r\n };\r\n\r\n function fecharModalTransp() {\r\n //carregarListaTransp();\r\n setMostrarModalTransp(false);\r\n };\r\n\r\n function alterarFrete(event) {\r\n if (event.target.value === 9) {\r\n form.setFieldsValue({ trn_id: null });\r\n form.setFieldsValue({ trv_id: null });\r\n form.setFieldsValue({ pdi_valoroutrasdespesas: 0 });\r\n form.setFieldsValue({ pdi_valorfrete: 0 });\r\n setMostrarTransportador(false);\r\n } else {\r\n setMostrarTransportador(true);\r\n }\r\n };\r\n\r\n function carregarListaTransp(callback) {\r\n api.get(`Transportador/ListarTransportador`).then(\r\n (res) => {\r\n let seq = 0;\r\n res.data.forEach((transp) => {\r\n transp.key = seq++;\r\n });\r\n setDadosTransportador(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n if (!!callback) {\r\n callback();\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n { alterarFrete(dados) }}>\r\n 0 - Contratação do Frete por conta do Remetente (CIF)\r\n 1 - Contratação do Frete por conta do Destinatário (FOB)\r\n 2 - Contratação do Frete por conta de Terceiros\r\n 3 - Transporte Próprio por conta do Remetente\r\n 4 - Transporte Próprio por conta do Destinatário\r\n 9 - Sem Frete\r\n \r\n \r\n \r\n \r\n {mostrarTransportador &&\r\n \r\n \r\n \r\n { buscarVeiculos(campo); retornaValorFrete(campo); }} name=\"trn_id\" conteudo={\r\n trn => ({trn.trn_id} - {trn.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, Select, Button, InputNumber, Card, Table, notification, Input, Tag } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, FormOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { Data, InputPreco, SelectIncluir } from \"../../components\";\r\nimport DrawerVendedores from \"../../components/drawerVendedores\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { CheckOutlined, CloseOutlined } from \"@material-ui/icons\";\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function TabFaturamento({ form, valorTotalPedido, listaFormaPagamento, setListaFormaPagamento, emiteTransferencia, dadosOrcamento }) {\r\n \r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editarValores, setEditarValores] = useState(false);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [formaPagamento, setFormaPagamento] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [valorJaPago, setValorJaPago] = useState(false);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [executarParcelas, setExecutarParcelas] = useState(false);\r\n const [formaPagamentoAtual, setFormaPagamentoAtual] = useState(null);\r\n const editarDesconto = () => {\r\n setEditarValores(!editarValores)\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n calcularTotal();\r\n recalcularTotalPedido();\r\n }, []);\r\n\r\n useEffect(() => {\r\n let valor = 0;\r\n if (!!listaFormaPagamento && listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (valor >= valorTotal) {\r\n setPagamentoTotal(true);\r\n } else {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n if (listaFormaPagamento.some(dado => !dado.parcelas || dado.parcelas.length === 0)){\r\n setExecutarParcelas(true);\r\n } else {\r\n listaFormaPagamento.forEach(dado => {\r\n if (dado.parcelas && dado.parcelas.length > 0) {\r\n dado.pedidoparcela = dado.parcelas.map(parcela => {\r\n return {\r\n ...parcela,\r\n pcl_numeroparcela: parcela.prc_numeroparcela,\r\n dataVencimento: parcela.prc_datavencimento,\r\n valorParcela: parcela.prc_valor,\r\n };\r\n });\r\n delete dado.parcelas\r\n }\r\n });\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: {dados: { ...manutencao.dados, ...{ faturamento: listaFormaPagamento } } } });\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n setValorJaPago(valor);\r\n }, [listaFormaPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento && executarParcelas) {\r\n let dados = manutencao.dados.faturamento;\r\n let index = dados.length - 1;\r\n setExecutarParcelas(false);\r\n if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n validarJaPossuiCrediario(() => {\r\n popularParcelas();\r\n });\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n validarJaPossuiBoleto(() => {\r\n popularParcelas();\r\n });\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function carregarDados() {\r\n if (!!dadosOrcamento) {\r\n form.setFieldsValue({ pdi_valorfrete: dadosOrcamento.orc_valorfrete });\r\n if (listaFormaPagamento[0].orf_percentualdesconto) {\r\n form.setFieldsValue({ percentualDesconto: listaFormaPagamento[0].orf_percentualdesconto });\r\n calculaDesconto('perc')\r\n setEditarValores(true);\r\n }\r\n }\r\n };\r\n\r\n function validarJaPossuiCrediario(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!formaPgto.pedidoparcela && formaPgto.pedidoparcela.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n function validarJaPossuiBoleto(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let possuiBoletoComParcelas = dados.some(formaPgto => \r\n formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario &&\r\n !!formaPgto.pedidoparcela &&\r\n formaPgto.pedidoparcela.length > 0\r\n );\r\n let possuiBoletoSemParcelas = dados.some(formaPgto => \r\n formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario &&\r\n (!formaPgto.pedidoparcela || formaPgto.pedidoparcela.length === 0)\r\n );\r\n\r\n if (!possuiBoletoComParcelas || possuiBoletoSemParcelas) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n function popularParcelas(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${manutencao.dados.faturamento[index].cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(manutencao.dados.faturamento[index].pfp_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados[index].pedidoparcela = listaParcelas;\r\n manutencao.dados.faturamento[indexPosicao].editando = false;\r\n setListaFormaPagamento(dados);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function valorRestantePgto(dadosTemp) {\r\n let restante = 0;\r\n let valorPago = 0;\r\n let valor = form.getFieldValue().pfp_valor;\r\n dadosTemp.forEach((dados) => {\r\n valorPago += parseFloat(dados.pfp_valor);\r\n });\r\n restante = parseFloat(form.getFieldValue().valorTotal) - valorPago;\r\n if (parseFloat(restante.toFixed(3)) === 0) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n form.setFieldsValue({ pfp_valor: restante.toFixed(2) });\r\n setEditando(false);\r\n };\r\n\r\n function calcularTotal() {\r\n let valor = 0;\r\n valor = parseFloat(valorTotalPedido) + parseFloat(!!form.getFieldValue().pdi_valorfrete ? form.getFieldValue().pdi_valorfrete : 0) + parseFloat(!!form.getFieldValue().pdi_valoroutrasdespesas ? form.getFieldValue().pdi_valoroutrasdespesas : 0);\r\n setValorTotal(valor);\r\n form.setFieldsValue({ ped_valorTotal: valor.toFixed(2) });\r\n valorRestantePgto([...listaFormaPagamento]);\r\n };\r\n\r\n async function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null });\r\n }\r\n\r\n return api.get(`CondicaoPagamento/Listar?Ativo=true&codigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function adicionarFormaPagamento() {\r\n if (editando) {\r\n if (!form.getFieldValue().fpg_id || !form.getFieldValue().cpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condicao de pagamento!' });\r\n }\r\n let novaFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n let novaCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n let pagamentoTemp = [];\r\n pagamentoTemp.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: novaFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!novaCondicoesPagamento && novaCondicoesPagamento.cpg_descricao ? novaCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n pfp_valor: parseFloat(form.getFieldValue().pfp_valor),\r\n fpg_tipopagamento: novaFormaPagamento.fpg_tipopagamento\r\n });\r\n setListaFormaPagamento(pagamentoTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(pagamentoTemp);\r\n setEditando(false);\r\n\r\n } else {\r\n let dadosTemp = [...listaFormaPagamento];\r\n if (!!form.getFieldValue().fpg_id && (condicaoPagamento.length === 0 || !!form.getFieldValue().cpg_id)) {\r\n if (listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && formas.cpg_id === form.getFieldValue().cpg_id\r\n ))) {\r\n let dados = listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && formas.cpg_id === form.getFieldValue().cpg_id\r\n ));\r\n if (parseFloat(form.getFieldValue().ped_valorTotal) < parseFloat(form.getFieldValue().pfp_valor) + (parseFloat(valorJaPago) - dados.pfp_valor)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total da OS!' });\r\n return;\r\n } else {\r\n dados.pfp_valor = parseFloat(form.getFieldValue().pfp_valor);\r\n setListaFormaPagamento(dadosTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(dadosTemp);\r\n }\r\n } else {\r\n if (parseFloat(form.getFieldValue().ped_valorTotal) < parseFloat(form.getFieldValue().pfp_valor) + parseFloat(valorJaPago)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total da OS!' });\r\n } else {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n\r\n let dadosCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n dadosTemp.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!dadosCondicoesPagamento && dadosCondicoesPagamento.cpg_descricao ? dadosCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n pfp_valor: parseFloat(form.getFieldValue().pfp_valor),\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento\r\n });\r\n setListaFormaPagamento(dadosTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(dadosTemp);\r\n }\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condicao de pagamento!' });\r\n }\r\n }\r\n };\r\n\r\n function calculaDesconto(campo) {\r\n let percValor = (!!form.getFieldValue().percentualDesconto ? form.getFieldValue().percentualDesconto : 0);\r\n let valor = (!!form.getFieldValue().ped_valorTotalDesc ? form.getFieldValue().ped_valorTotalDesc : 0);\r\n if (campo === 'perc') {\r\n valor = (percValor * valorTotalPedido) / 100;\r\n form.setFieldsValue({ ped_valorTotalDesc: parseFloat(valor).toFixed(2) });\r\n } else if (campo === 'valor') {\r\n valor = (valor / valorTotalPedido) * 100;\r\n valor = parseFloat(valor).toFixed(2);\r\n form.setFieldsValue({ percentualDesconto: valor });\r\n }\r\n recalcularTotalPedido();\r\n };\r\n\r\n function calculaAcrescimo(campo) {\r\n let perc = (!!form.getFieldValue().percentualAcrescimo ? form.getFieldValue().percentualAcrescimo : 0);\r\n let valor = (!!form.getFieldValue().ped_valorTotalAcre ? form.getFieldValue().ped_valorTotalAcre : 0);\r\n if (campo === 'perc') {\r\n valor = (perc * valorTotalPedido) / 100;\r\n form.setFieldsValue({ ped_valorTotalAcre: parseFloat(valor).toFixed(2) });\r\n } else if (campo === 'valor') {\r\n valor = (100 * valor) / valorTotalPedido;\r\n form.setFieldsValue({ percentualAcrescimo: parseFloat(valor).toFixed(2) })\r\n }\r\n recalcularTotalPedido();\r\n };\r\n\r\n function recalcularTotalPedido() {\r\n let formulario = form.getFieldValue();\r\n const percDesconto = formulario.percentualDesconto ? parseFloat(formulario.percentualDesconto) / 100 : 0;\r\n const percAcresc = formulario.percentualAcrescimo ? parseFloat(formulario.percentualAcrescimo) / 100 : 0;\r\n const valorFrete = formulario.pdi_valorfrete;\r\n const valorOutros = formulario.pdi_valoroutrasdespesas;\r\n const valorCFreteEOutros = parseFloat(valorTotalPedido) + parseFloat(valorFrete) + parseFloat(valorOutros);\r\n const calcuPercDesc = parseFloat(valorCFreteEOutros) * parseFloat(percDesconto);\r\n const calcuPercAcresc = parseFloat(valorCFreteEOutros) * parseFloat(percAcresc);\r\n const valorTotal = parseFloat(valorCFreteEOutros) - parseFloat(calcuPercDesc) + parseFloat(calcuPercAcresc);\r\n form.setFieldsValue({ valorTotal: valorTotal.toFixed(2) });\r\n form.setFieldsValue({ ped_valorTotal: valorTotal.toFixed(2) });\r\n form.setFieldsValue({ pfp_valor: valorTotal.toFixed(2) });\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento[0].pfp_valor = valorTotal.toFixed(2);\r\n }\r\n setValorTotal(valorTotal.toFixed(2));\r\n };\r\n\r\n async function editarFormasPagamento(forma) {\r\n setPagamentoTotal(false);\r\n setEditando(true);\r\n await listarCondicao(forma.fpg_id, true)\r\n form.setFieldsValue({ fpg_id: forma.fpg_id });\r\n form.setFieldsValue({ cpg_id: forma.cpg_id });\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n };\r\n\r\n function removerFormaPagamento(forma) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n dadosTemp = dadosTemp.filter((dados) => dados !== forma);\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n setListaFormaPagamento(dadosTemp);\r\n valorRestantePgto(dadosTemp);\r\n recalcularTotalPedido();\r\n setEditando(false);\r\n };\r\n\r\n function editarParcelas(forma) {\r\n let dados = forma;\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n setEditandoParcelas(true);\r\n setFormaPagamentoAtual(dados.fpg_id);\r\n }\r\n }\r\n\r\n function salvarParcelas(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.pedidoparcela.forEach((item, i) => {\r\n i++;\r\n item.prc_datavencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.dataVencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.valorParcela = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n item.prc_valor = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n });\r\n setListaFormaPagamento(formasPgto);\r\n setEditandoParcelas(false);\r\n }\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas) {\r\n let dadosFormaPagamento = [...listaFormaPagamento];\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(dadosFormaPagamento[0].pfp_valor);\r\n let dados = form.getFieldValue();\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n }\r\n\r\n function ajustarDataParcelas(numeroParc, qtdTotParcelas) {\r\n let dataAtual = new Date(form.getFieldValue([`dataVencimento${numeroParc}`]).toDate());\r\n for (let i = numeroParc + 1; i <= qtdTotParcelas; i++) {\r\n let dataVenc = new Date(dataAtual.setDate(new Date(dataAtual).getDate() + 30));\r\n form.setFieldsValue({ [`dataVencimento${i}`]: moment(dataVenc) });\r\n }\r\n }\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela, fpg_id }) => (\r\n
\r\n {editandoParcelas && fpg_id === formaPagamentoAtual ? { ajustarDataParcelas(pcl_numeroparcela, record.pedidoparcela.length) }} /> : {moment(dataVencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n )\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela, fpg_id }) => (\r\n
\r\n {editandoParcelas && fpg_id === formaPagamentoAtual ? { onChangeValorParc(pcl_numeroparcela, record.pedidoparcela.length) }} /> : {FormatNumber(valorParcela, true)}\r\n }\r\n
\r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n {record.fpg_tipopagamento !== FormaDePagamento.fpProgramaFidelidade && !record.fpg_quitacaoantecipacao &&
\r\n {!editandoParcelas &&\r\n \r\n {editandoParcelas && record.fpg_id === formaPagamentoAtual &&\r\n */}\r\n\r\n \r\n \r\n Resumo da Ordem de Serviço\r\n \r\n }>\r\n \r\n \r\n \r\n {FormatNumber(valorTotalPedido, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(form.getFieldValue().pdi_valorfrete, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(form.getFieldValue().pdi_valoroutrasdespesas, true)}\r\n \r\n \r\n \r\n {!emiteTransferencia && \r\n \r\n \r\n \r\n }\r\n {editarValores &&\r\n
\r\n \r\n
\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { calculaDesconto('perc') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calculaDesconto('valor') }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { calculaAcrescimo('perc') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calculaAcrescimo('valor') }} />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n IPI (R$): {FormatNumber(form.getFieldValue().valorTotalIPI, true)}\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): {FormatNumber(form.getFieldValue().valorTotalSt, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da OS (R$) {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!pagamentoTotal && \r\n {!emiteTransferencia && \r\n \r\n { listarCondicao(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n }\r\n {condicaoPagamento.length > 0 && \r\n \r\n \r\n \r\n }\r\n \r\n {!emiteTransferencia &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n \r\n \r\n
\r\n {!!listaFormaPagamento && listaFormaPagamento.length > 0 &&
(\r\n
\r\n \r\n {fpg_descricao} {!!cpg_descricao ? `/ ${cpg_descricao}` : ''}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ pfp_valor }) => (\r\n
\r\n {FormatNumber(pfp_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Total dos Pagamentos (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalPagamento, true)}\r\n \r\n \r\n \r\n )\r\n }} dataSource={listaFormaPagamento}\r\n />}\r\n \r\n \r\n \r\n \r\n );\r\n}","import { Col, Form, Input, notification, Select } from \"antd\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { FormGW } from \"../../components\";\r\n\r\nexport default function ManutencaoTipoEquipamento({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [loading, setLoading] = useState(false);\r\n const [hover, setHover] = useState(false);\r\n const [fileList, setFileList] = useState([]);\r\n const [listaIdentificacao, setIdentificacao] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=OsTipoIdentificacao`).then(res => {\r\n if (res.status === 200) {\r\n setIdentificacao(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n\r\n let enderecoUrl = 'TipoEquipamento/';\r\n\r\n if (values.teq_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As novas configurações foram salvas com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As configurações foram incluidas com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n }\r\n }\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+teq_descricao' } });\r\n };\r\n\r\n return (\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerTipoEquipamento(true)}\r\n />\r\n \r\n \r\n {openDrawerTipoEquipamento && (\r\n \r\n )}\r\n \r\n )\r\n}","import { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport ManutencaoTipoEquipamento from \"./manutencao\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport { useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\n\r\nexport default function DrawerTipoEquipamento({ cadTipo, openDrawer, setOpenDrawer, retornoSalvar}) {\r\n\r\n const [formTipo] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formTipo.setFieldsValue(manutencao.dados)\r\n }\r\n else {\r\n formTipo.setFieldsValue();\r\n }\r\n\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n } \r\n fecharDrawer();\r\n }\r\n\r\n function fecharDrawer() {\r\n formTipo.resetFields();\r\n if (!!openDrawer) {\r\n setOpenDrawer(false);\r\n }\r\n else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n } \r\n }\r\n\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n }\r\n return (\r\n { fecharDrawer() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import { Checkbox, Col, Form, Input, notification, Select } from \"antd\";\r\nimport { listagemActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { SelectPaginacao } from \"../../components\";\r\nimport DrawerTipoEquipamento from \"../tipoEquipamento/drawer\";\r\nimport DrawerModeloEquipamento from \"../modeloEquipamento/drawer\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useEffect, useState } from \"react\";\r\nimport DrawerMarca from \"../marca/drawer\";\r\n\r\nexport default function ManutencaoEquipamentoCliente({ formulario, carregando, aoSalvar, carregarEquipamentos }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [loading, setLoading] = useState(false);\r\n const [hover, setHover] = useState(false);\r\n const [fileList, setFileList] = useState([]);\r\n const [openDrawerTipoEquipamento, setOpenDrawerTipoEquipamento] = useState(false);\r\n const [openDrawerModelo, setOpenDrawerModelo] = useState(false);\r\n const [listaIdentificacao, setIdentificacao] = useState([]);\r\n const [tipoIdentificacao, setTipoIdentificacao] = useState();\r\n const [openDrawerMarca, setOpenDrawerMarca] = useState(false);\r\n\r\n useEffect(() => {\r\n if (tipoIdentificacao === 0) {\r\n formulario.setFieldsValue({ eqp_identificacao: \"\" });\r\n }\r\n }, [tipoIdentificacao, formulario]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=OsTipoIdentificacao`).then(res => {\r\n if (res.status === 200) {\r\n setIdentificacao(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n values.cli_id = formulario.getFieldValue().cli_id;\r\n values.eqp_senhapin = formulario.getFieldValue().eqp_senhapin;\r\n let retorno;\r\n\r\n let enderecoUrl = 'EquipamentoCliente/';\r\n\r\n if (values.eqp_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Equipamento alterado com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Novo Equipamento incluído com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n carregarEquipamentos();\r\n }\r\n );\r\n }\r\n }\r\n function salvandoDadosModelo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: \"meq_id\", campo: \"Codigo\", value: retorno.meq_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n function salvandoDadosTipo(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: \"teq_id\", campo: \"CodigoTipo\", value: retorno });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n function salvandoDadosMarca(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: \"mar_id\", campo: \"Codigo\", value: retorno.mar_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n return (\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerTipoEquipamento(true)}\r\n />\r\n \r\n \r\n \r\n \r\n setOpenDrawerMarca(true)}\r\n />\r\n \r\n \r\n \r\n \r\n setOpenDrawerModelo(true)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {openDrawerTipoEquipamento && (\r\n \r\n )}\r\n \r\n \r\n Equipamento Ativo\r\n \r\n \r\n {openDrawerModelo && (\r\n \r\n )}\r\n {openDrawerMarca && (\r\n \r\n )}\r\n \r\n )\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport ManutencaoEquipamentoCliente from \"./manutencaoEquipamentoCliente\";\r\nimport { Button, Col, Drawer, Form, Modal, Row } from \"antd\";\r\nimport { drawerActions, listagemActions } from \"../../actions\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { DrawerNav } from \"../../components\";\r\n\r\nexport default function DrawerEquipamento({ editando, dadosEditando, openDrawerEqui, setOpenDrawerEqui, formulario, carregarEquipamentos }) {\r\n\r\n const [formEqui] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n\r\n useEffect(() => {\r\n if (dadosEditando && editando.editando) {\r\n formEqui.setFieldsValue({\r\n ...dadosEditando,\r\n cli_id: formulario.getFieldValue(\"cli_id\")\r\n });\r\n }\r\n }, [editando.editando]);\r\n\r\n\r\n function fecharDrawer() {\r\n formEqui.resetFields();\r\n formEqui.setFieldsValue({ cli_id: formulario.getFieldValue(\"cli_id\") });\r\n\r\n if (editando.editando) {\r\n editando.setEditando(false);\r\n } else {\r\n setOpenDrawerEqui(false);\r\n }\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n }\r\n\r\n return (\r\n { fecharDrawer() }}\r\n closeIcon={}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}\r\n","import { CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { Button, Col, Form, Input, Modal, notification } from \"antd\";\r\nimport api from \"../../services/api\";\r\nimport { useEffect } from \"react\";\r\n\r\nexport default function ModalVisualizaSenha({ exibirModal, fecharModal, dadosSenha, formulario, aoSalvar }) {\r\n\r\n\r\n useEffect(() => {\r\n if (exibirModal && dadosSenha?.eqp_senhapin) {\r\n\r\n formulario.setFieldsValue({ eqp_senhapin: dadosSenha.eqp_senhapin });\r\n }\r\n }, [exibirModal, dadosSenha, formulario]);\r\n\r\n function alterarSenha() {\r\n\r\n let valores = formulario.getFieldValue();\r\n\r\n let dadosAtualizados = {\r\n eqp_id: dadosSenha.eqp_id,\r\n eqp_senhapin: valores.eqp_senhapin,\r\n eqp_senhatouch: valores.eqp_senhatouch\r\n };\r\n api.put(`EquipamentoCliente/EditarSenha`, dadosAtualizados)\r\n .then(() => {\r\n notification.success({ message: 'Concluído!', description: \"Status alterado com sucesso!\" })\r\n aoSalvar();\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n }).finally(() => {\r\n fecharModal();\r\n })\r\n }\r\n\r\n\r\n return (\r\n } size=\"middle\" onClick={fecharModal}>\r\n Cancelar\r\n ,\r\n ,\r\n ]}>\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Form, Input, Radio, Row, Table, Tag, Tooltip } from \"antd\";\r\nimport { EditOutlined, EyeInvisibleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { Editar } from \"../../components\";\r\nimport DrawerEquipamento from \"./drawerEquipamento\";\r\nimport ModalVisualizaSenha from \"./modalVisualizaSenha\";\r\n\r\nexport default function TabEquipamento({ formulario }) {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [equipamentoSelecionado, setEquipamentoSelecionado] = useState(formulario.getFieldValue(\"eqp_id\"));\r\n const [dadosEditando, setDadosEditando] = useState([]);\r\n const [listaEquipamentos, setListaEquipamentos] = useState([]);\r\n const [openDrawerEqui, setOpenDrawerEqui] = useState(false);\r\n const [openModalSenha, setOpenModalSenha] = useState(false);\r\n const [dadosSenha, setDadosSenha] = useState([]);\r\n\r\n useEffect(() => {\r\n carregarEquipamentos();\r\n }, [])\r\n\r\n useEffect(() => {\r\n setEquipamentoSelecionado(formulario.getFieldValue(\"eqp_id\"));\r\n }, [formulario]);\r\n\r\n function carregarEquipamentos() {\r\n let idCliente = formulario.getFieldValue().cli_id\r\n api.get(`EquipamentoCliente/Listar?cli_id=${idCliente}`).then(\r\n res => {\r\n let retorno = res.data.items;\r\n setListaEquipamentos(retorno);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function editandoEquipamento(dados) {\r\n setDadosEditando(dados);\r\n setEditando(true);\r\n }\r\n\r\n function visualizaSenha(dados) {\r\n setDadosSenha(dados);\r\n setOpenModalSenha(true);\r\n }\r\n\r\n function selecionarEquipamento(eqp_id) {\r\n setEquipamentoSelecionado(eqp_id);\r\n formulario.setFieldsValue({ eqp_id: eqp_id });\r\n\r\n }\r\n\r\n async function filtroPesquisa(value) {\r\n let idCliente = formulario.getFieldValue().cli_id;\r\n let filtro = value || formulario.getFieldValue().filtroPor || '';\r\n api.get(`EquipamentoCliente/Listar?cli_id=${idCliente}&Filtro=${filtro}`).then(\r\n res => {\r\n let retorno = res.data.items;\r\n setListaEquipamentos(retorno);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n { filtroPesquisa(value) }}\r\n allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n selecionarEquipamento(eqp_id)}\r\n />\r\n ),\r\n },\r\n {\r\n title: 'Código',\r\n width: 50,\r\n align: 'center',\r\n render: ({ eqp_id }) => (\r\n \r\n {eqp_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ eqp_descricao }) => {\r\n return (\r\n
\r\n \r\n {eqp_descricao}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Identificação',\r\n render: ({ eqp_identificacao }) => {\r\n return (\r\n
\r\n \r\n {eqp_identificacao}\r\n \r\n
\r\n );\r\n },\r\n },\r\n \r\n {\r\n title: 'Tipo de Equipamento',\r\n render: ({ descricao_tipo }) => {\r\n return (\r\n
\r\n \r\n {descricao_tipo}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n \r\n {\r\n editandoEquipamento(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n visualizaSenha(dados);\r\n }}\r\n icon={}\r\n />\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n setOpenModalSenha(false)} dadosSenha={dadosSenha} aoSalvar={() => carregarEquipamentos()} />\r\n \r\n );\r\n}","import { useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\nimport { Col, Form, Input, notification } from \"antd\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoTipoUrgencia({ formulario, carregando, aoSalvar, editando }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [fileList, setFileList] = useState([]);\r\n\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n\r\n let enderecoUrl = 'TipoUrgencia/';\r\n\r\n if (values.tpu_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída!', description: \"As novas configurações foram salvas com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar requisição', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As configurações foram incluidas com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) })\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: 'tpu_id' } });\r\n }\r\n );\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n );\r\n}","import { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useState } from \"react\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport ManutencaoTipoUrgencia from \"./manutencao\";\r\n\r\nexport default function DrawerTipoUrgencia({ openDrawer, setOpenDrawer, retornoSalvar }) {\r\n\r\n const [formUrgencia] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState();\r\n\r\n if (manutencao.dados !== null) {\r\n formUrgencia.setFieldsValue(manutencao.dados)\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n } \r\n fecharDrawer();\r\n }\r\n\r\n\r\n function fecharDrawer() {\r\n formUrgencia.resetFields();\r\n if (!!openDrawer) {\r\n setOpenDrawer(false);\r\n } else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n}\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n }\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Form, Input } from \"antd\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { SelectPaginacao } from \"../../components\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport DrawerTipoUrgencia from \"../tipoUrgencia/drawer\";\r\n\r\nexport default function TabDadosOS({ formulario, dadosEditando }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openDrawerTipoUrgencia, setOpenDrawerTipoUrgencia] = useState(false);\r\n\r\n useEffect(() => {\r\n if (dadosEditando) {\r\n let lista = [];\r\n if (dadosEditando.fun_id) {\r\n lista.push({ name: \"fun_id\", campo: \"Filtro\", value: dadosEditando.fun_id });\r\n }\r\n if (dadosEditando.tpu_id) {\r\n lista.push({ name: \"tpu_id\", campo: \"Filtro\", value: dadosEditando.tpu_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(dadosEditando);\r\n }\r\n }, [dadosEditando, formulario]);\r\n\r\n\r\n function salvandoDadosTipoUrgencia(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: \"tpu_id\", campo: \"Codigo\", value: retorno.tpu_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerTipoUrgencia(true)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import { useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { Col, Form, Input, notification } from \"antd\";\r\nimport api from \"../../services/api\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoTipoServico({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [loading, setLoading] = useState(false);\r\n const [hover, setHover] = useState(false);\r\n const [fileList, setFileList] = useState([]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n\r\n let enderecoUrl = 'TipoServico/';\r\n\r\n if (values.tse_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As novas configurações foram salvas com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n setFileList([]);\r\n })\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"As configurações foram incluidas com sucesso!\" });\r\n retorno = res.data;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tse_id' } });\r\n }\r\n );\r\n }\r\n }\r\n\r\n return (\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value || (Number(value) >= 0 && Number(value) <= 31)) {\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(new Error(\"Informe um número entre 0 e 31\"));\r\n },\r\n }),\r\n ]}\r\n >\r\n \r\n \r\n \r\n\r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoTipoServico from './manutencao';\r\n\r\n\r\nexport default function DrawerTipoServico({ openDrawer, setOpenDrawer, retornoSalvar }) {\r\n\r\n const [formTipo] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState();\r\n\r\n if (manutencao.dados !== null) {\r\n formTipo.setFieldsValue(manutencao.dados)\r\n }\r\n\r\n function salvandoDados(retorno) {\r\n if(!!retornoSalvar){\r\n retornoSalvar(retorno);\r\n } \r\n fecharDrawer();\r\n }\r\n\r\n\r\n function fecharDrawer() {\r\n formTipo.resetFields();\r\n if (!!openDrawer) {\r\n setOpenDrawer(false);\r\n } else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n }\r\n}\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n }\r\n\r\n \r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Select, Steps, Input, notification, Modal, Switch, Typography } from \"antd\";\r\nimport { ExclamationCircleOutlined, ExclamationOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport { SelectIncluir, FormGW, Data, InputCpfCnpj, DrawerCliente, SelectPaginacao } from '../../components';\r\nimport DrawerVendedores from \"../../components/drawerVendedores\";\r\nimport { TabItens, TabTransporte, TabFaturamento } from './tabPage';\r\nimport { ModalEmail, ModalEndereco, ModalEnderecoNew, ModalTelefone } from \"../../components/modals\";\r\nimport { getNomeUsuario, getIdUsuario, getEmpresa, getLocal } from '../../services/auth';\r\nimport { compararDatas, imprimirRelatorioJasper, validaForm, calculaValorProporcional, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport { Divider } from \"@material-ui/core\";\r\nimport TabEquipamento from \"./tabEquipamento\";\r\nimport TabDadosOS from \"./tabDadosOS\";\r\nimport DrawerTipoServico from \"../tipoServico/drawer\";\r\n\r\nexport default function ManutencaoOrdemServico({ formulario, carregando, aoSalvar, clientes, dadosOrcamento, mostraBtnSalvar, proximaPag, pages, exibirDrawerOrdem, editandoOS }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [dadosEndereco, setDadosEndereco] = useState([]);\r\n const [dadosEnderecoLocal, setDadosEnderecoLocal] = useState({});\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [listaTelefone, setListaTelefone] = useState([]);\r\n const [dadosTelefone, setDadosTelefone] = useState([]);\r\n const [dadosVeiculos, setDadosVeiculos] = useState([]);\r\n const [dadosEmail, setDadosEmail] = useState([]);\r\n const [listaEmail, setListaEmail] = useState([]);\r\n const [dadosCliente, setDadosCliente] = useState([]);\r\n const [pessoaFisica, setPessoaFisica] = useState(true);\r\n const [abreModalEndereco, setAbreModalEndereco] = useState(false);\r\n const [abreModalTelefone, setAbreModalTelefone] = useState(false);\r\n const [abreModalEmail, setAbreModalEmail] = useState(false);\r\n const [formularioTelefone] = Form.useForm();\r\n const [formularioEmail] = Form.useForm();\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [dadosEquipamento, setDadosEquipamento] = useState([]);\r\n const [dadosOS, setDadosOS] = useState([]);\r\n const [totalPedido, setTotalPedido] = useState(0);\r\n const [dadosFormasPagamento, setDadosFormasPagamento] = useState([]);\r\n const [emiteTransferencia, setEmiteTransferencia] = useState(false);\r\n const [tipoPreco, setTipoPreco] = useState([]);\r\n const [filiaisEmpresa, setFiliaisEmpresa] = useState([]);\r\n const [custo, setCusto] = useState({});\r\n const [abrirDrawerVendedores, setAbrirDrawerVendedores] = useState(false);\r\n const [formVendedores] = Form.useForm();\r\n const [openDrawerCliente, setOpenDrawerCliente] = useState(false);\r\n const [openDrawerTipoServico, setOpenDrawerTipoServico] = useState(false);\r\n const [newForm] = Form.useForm();\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n\r\n\r\n const [listaIndicadorPresenca, setListaIndicadorPresenca] = useState([]);\r\n const switchTransferencia = () => {\r\n setEmiteTransferencia(!emiteTransferencia);\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirDrawerOrdem) {\r\n if (!manutencao.dados && clientes) {\r\n const { formasPagamento, itens, ...restoClientes } = clientes;\r\n manutencao.dados = {\r\n ...restoClientes,\r\n formaPgto: formasPagamento.map((forma, index) => {\r\n if (index === 0) {\r\n const { orf_id, orc_id, orf_valortotal, acrescimo, desconto, disabled, orf_observacao, total, ...restoForma } = forma;\r\n return { ...restoForma, pfp_valor: total };\r\n }\r\n return forma;\r\n }),\r\n itens: itens.map((item, index) => {\r\n const { disabled, grade, oit_desconto, oit_id, oit_observacao, oit_qtde, oit_valortotal, oit_valorunitario, orc_id, ump_casasdecimais, ump_id, ...restoItem } = item;\r\n return {\r\n ...restoItem,\r\n descricaograde: grade,\r\n pdi_quantidade: oit_qtde,\r\n pdi_valortotal: oit_valortotal,\r\n pdi_valorunitario: oit_valorunitario,\r\n valorItemDesconto: oit_valortotal,\r\n pdi_numeroitem: index + 1\r\n };\r\n })\r\n };\r\n setDadosFormasPagamento(manutencao.dados.formaPgto)\r\n dadosOrcamento.formasPagamento = manutencao.dados.formaPgto;\r\n formulario.setFieldsValue({ ven_id: dadosOrcamento.ven_id });\r\n if (clientes.pes_id) {\r\n formulario.setFieldsValue({ pes_id: clientes.pes_id });\r\n }\r\n else {\r\n formulario.setFieldsValue({ pes_id: clientes.pes_nome });\r\n notification.warning({ message: 'Aviso!', description: 'Realize o cadastro do Cliente' });\r\n }\r\n }\r\n carregarDadosInciais();\r\n if (!!manutencao.dados) {\r\n setDadosEditando(manutencao.dados);\r\n formulario.setFieldsValue(manutencao.dados);\r\n if (!!manutencao.dados.pes_id) {\r\n formulario.setFieldsValue({ pes_id: manutencao.dados.pes_id });\r\n carregarDadosCliente(manutencao.dados.pes_id)\r\n } if (!!manutencao.dados.loc_id_transferencia) {\r\n formulario.setFieldsValue({ loc_id_transferencia: manutencao.dados.loc_id_transferencia });\r\n }\r\n if (manutencao.dados.tse_id) {\r\n formulario.setFieldsValue({ tse_id: manutencao.dados.tse_id });\r\n }\r\n if (!!manutencao.dados.ped_id_duplicar) {\r\n carregarDadosAlt(manutencao.dados.ped_id_duplicar);\r\n } else if (!!manutencao.dados.ped_id) {\r\n carregarDadosItems(manutencao.dados.ped_id);\r\n if (!!manutencao.dados.itens) {\r\n setDadosItens(manutencao.dados.itens);\r\n }\r\n }\r\n if (clientes) {\r\n setDadosItens(manutencao.dados.itens);\r\n }\r\n setDadosFormasPagamento(manutencao.dados.formaPgto)\r\n\r\n popularOperacaoFiscal(manutencao.dados.ope_id);\r\n\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.ped_datainclusao) {\r\n formulario.setFieldsValue({ ped_datainclusao: moment(manutencao.dados.ped_datainclusao) });\r\n } else if (!!!formulario.getFieldsValue().ped_datainclusao) {\r\n formulario.setFieldsValue({ ped_datainclusao: moment(new Date()) });\r\n }\r\n }\r\n if (exibirDrawerOrdem && !!manutencao.dados && !!manutencao.dados.pes_id) {\r\n let lista = [];\r\n if (!!manutencao.dados.pes_id) {\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: manutencao.dados.pes_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [exibirDrawerOrdem]);\r\n\r\n useEffect(() => {\r\n if (filiaisEmpresa.length > 0 && !!formulario.getFieldValue().loc_id_transferencia) {\r\n buscarDadosLocal(formulario.getFieldValue().loc_id_transferencia);\r\n }\r\n }, [filiaisEmpresa]);\r\n\r\n useEffect(() => {\r\n if (tipoPreco.length > 0) {\r\n api.get(`ParametroEmpresa/BuscarParametros`).then(retornoParametrosEmp => {\r\n if (retornoParametrosEmp.status === 200) {\r\n let dados = {};\r\n if (!!retornoParametrosEmp.data.par_custopadraonftransferencia) {\r\n let custo = tipoPreco.filter((custo) => { return custo.key === retornoParametrosEmp.data.par_custopadraonftransferencia });\r\n if (custo.length > 0) {\r\n dados = custo[0];\r\n if (!(!!formulario.getFieldValue().ped_precoutilizado)) {\r\n formulario.setFieldsValue({ ped_precoutilizado: custo[0].key });\r\n }\r\n }\r\n }\r\n setCusto(dados);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n }, [tipoPreco]);\r\n\r\n useEffect(() => {\r\n if (!!proximaPag.proximaPag || proximaPag.proximaPag === 0) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n\r\n useEffect(() => {\r\n if (dadosTelefone.length > 0) {\r\n dadosTelefone[0].pes_id = formulario.getFieldValue().pes_id;\r\n api.post(`PessoaTelefone/Incluir`, dadosTelefone[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n carregarDadosCliente(formulario.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setDadosTelefone([]);\r\n }\r\n )\r\n }\r\n }, [dadosTelefone]);\r\n\r\n useEffect(() => {\r\n if (dadosEmail.length > 0) {\r\n dadosEmail[0].pes_id = formulario.getFieldValue().pes_id;\r\n api.post('PessoaEmail/Incluir', dadosEmail[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n carregarDadosCliente(formulario.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setDadosEmail([]);\r\n }\r\n );\r\n }\r\n }, [dadosEmail]);\r\n\r\n useEffect(() => {\r\n if (emiteTransferencia) {\r\n setPessoaFisica(false);\r\n }\r\n }, [emiteTransferencia]);\r\n\r\n async function carregarDadosInciais() {\r\n let listaIndicadorPresenca = await api.get('Enum/Listar?nome=IndicadorPresenca');\r\n if (listaIndicadorPresenca.status === 200) {\r\n setListaIndicadorPresenca(listaIndicadorPresenca.data);\r\n }\r\n let retornoSerie = await api.get(`SerieFiscal/Listar?CodigoModeloDocFiscal=55&EmitenteDocumento=0`);\r\n if (retornoSerie.status === 200) {\r\n if (retornoSerie.data.items.length === 1) {\r\n formulario.setFieldsValue({ ser_id: retornoSerie.data.items[0].ser_id });\r\n }\r\n }\r\n api.get(`Enum/Listar?nome=TipoPrecoUtilizar`).then(\r\n retornoTipoPreco => {\r\n if (retornoTipoPreco.status === 200) {\r\n retornoTipoPreco.data = retornoTipoPreco.data.filter((item) => { return item.key > 0 });\r\n setTipoPreco(retornoTipoPreco.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n\r\n api.get(`Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(\r\n retornoFiliais => {\r\n if (retornoFiliais.status === 200) {\r\n setFiliaisEmpresa(retornoFiliais.data.items.filter((item) => { return item.loc_id !== parseInt(getLocal()) }));\r\n }\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function validarTrocaPg(proxPagina) {\r\n\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n\r\n if (paginaAtual < proxPagina) {\r\n switch (paginaAtual) {\r\n case 0:\r\n if (!formulario.getFieldValue(\"tse_id\")) {\r\n notification.warning({\r\n message: \"Aviso!\",\r\n description: \"O campo Tipo de Serviço é obrigatório.\",\r\n });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n\r\n listaValidacoes = emiteTransferencia ? [\r\n { nome: 'loc_id_transferencia', obrigatorio: true, label: 'Local' },\r\n { nome: 'ped_precoutilizado', obrigatorio: true, label: 'Preço' },\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' },\r\n { nome: 'tse_id', obrigatorio: true, label: 'Tipo de Serviço' }\r\n ] : [\r\n { nome: 'enderecoCliente', obrigatorio: true, label: 'Endereço' },\r\n { nome: 'pes_id', obrigatorio: true, label: 'Cliente' },\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' },\r\n { nome: 'tse_id', obrigatorio: true, label: 'Tipo de Serviço' }\r\n ];\r\n break;\r\n case 3:\r\n if (!!dadosItens && dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Favor inserir ao menos um item no pedido!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n break;\r\n case 4:\r\n if (compararDatas(formulario.getFieldValue().ped_dataprevisaoentrega, formulario.getFieldValue().ped_datainclusao, '<')) {\r\n notification.warning({ message: 'Aviso', description: 'Data da previsa não pode ser menor que a data de emissão!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n await validarTransporte(dadosItens);\r\n break;\r\n }\r\n if (validaForm(formulario, listaValidacoes)) {\r\n pages.setTagPages(proxPagina);\r\n } else {\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n } else {\r\n pages.setTagPages(proxPagina);\r\n }\r\n };\r\n\r\n function carregarDadosAlt(ped_id) {\r\n mostraBtnSalvar(false);\r\n api.get(`PedidoItem/ListarItensPedidoADuplicar?codigoPedido=${ped_id}`).then(\r\n (res) => {\r\n res.data.forEach(item => {\r\n let grade = '';\r\n let valorTotal = 0;\r\n item.valorItemDesconto = parseFloat(item.pdi_valortotal);\r\n valorTotal = item.pdi_valorunitario * item.pdi_quantidade;\r\n item.percdesc = (valorTotal > 0 ? parseFloat(((item.pdi_valordesconto / valorTotal) * 100).toFixed(2)) : 0);\r\n if (!!item.atributos && item.atributos.length > 0) {\r\n item.atributos.forEach((atrib) => {\r\n grade += atrib.mgp_descricao + ', ';\r\n });\r\n item.grade = grade.substr(0, grade.lastIndexOf(','));\r\n }\r\n });\r\n setDadosItens(res.data);\r\n formulario.setFieldsValue({ ped_id: null });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function carregarDadosItems(ped_id) {\r\n api.get(`PedidoItem/ListarItensPedido?codigoPedido=${ped_id}`).then(\r\n (res) => {\r\n let pdi_valorfrete = 0;\r\n res.data.forEach(item => {\r\n let grade = '';\r\n let valorTotal = 0;\r\n item.valorItemDesconto = parseFloat(item.pdi_valortotal);\r\n valorTotal = item.pdi_valorunitario * item.pdi_quantidade;\r\n item.percdesc = (valorTotal > 0 ? parseFloat(((item.pdi_valordesconto / valorTotal) * 100).toFixed(2)) : 0);\r\n pdi_valorfrete += parseFloat(!!item.pdi_valorfrete ? item.pdi_valorfrete : 0);\r\n if (!!item.atributos && item.atributos.length > 0) {\r\n item.atributos.forEach((atrib) => {\r\n grade += atrib.mgp_descricao + ', ';\r\n });\r\n item.grade = grade.substr(0, grade.lastIndexOf(','));\r\n }\r\n });\r\n setDadosItens(res.data);\r\n formulario.setFieldsValue({ pdi_valorfrete: pdi_valorfrete });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validaValorPago(valores) {\r\n let retorno = false;\r\n let valorPago = 0;\r\n if (dadosFormasPagamento.length > 0) {\r\n dadosFormasPagamento.forEach(formaPgto => { valorPago += parseFloat(formaPgto.pfp_valor) });\r\n if (parseFloat(valorPago.toFixed(2)) === parseFloat(valores.ped_valorTotal) || parseFloat(valorPago.toFixed(2)) === parseFloat(formulario.getFieldValue().ped_valorTotal)) {\r\n retorno = true;\r\n }\r\n } else {\r\n retorno = true;\r\n }\r\n return retorno;\r\n };\r\n\r\n function incluirCliente(retorno) {\r\n if (retorno) {\r\n formulario.setFieldsValue({ pes_id: retorno });\r\n let lista = [];\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: retorno });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n carregarDadosCliente(retorno);\r\n }\r\n }\r\n\r\n async function salvarManutencao(valores) {\r\n if (!validaValorPago(valores)) {\r\n notification.warning({ message: 'Aviso', description: \"Valor de pagamentos menor que total do pedido!\" });\r\n return;\r\n }\r\n let endereco = {};\r\n valores.pedidoitens = dadosItens;\r\n if (dadosFormasPagamento.length > 0) {\r\n valores.pedidoformapgtos = dadosFormasPagamento;\r\n } else if (emiteTransferencia) {\r\n valores.pedidoformapgtos = [];\r\n } else {\r\n let arrayDados = [];\r\n let dados = {\r\n ped_valorTotal: formulario.getFieldValue().ped_valorTotal,\r\n pfp_valor: parseFloat(formulario.getFieldValue().ped_valorTotal),\r\n cpg_id: valores.cpg_id || null,\r\n fpg_id: valores.fpg_id\r\n };\r\n if (!dados.cpg_id || !dados.fpg_id) {\r\n valores.pedidoformapgtos = [];\r\n } else {\r\n arrayDados.push(dados);\r\n valores.pedidoformapgtos = arrayDados;\r\n }\r\n }\r\n\r\n if (emiteTransferencia) {\r\n endereco = dadosEnderecoLocal;\r\n valores.pes_id = null;\r\n let filial = filiaisEmpresa.find((filial) => { return filial.loc_id === valores.loc_id_transferencia });\r\n valores.pes_telefone = !!filial.loc_telefone ? filial.loc_telefone : \"\";\r\n valores.pes_nroestabelecimento = filial.loc_numeroestabelecimento;\r\n } else {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${formulario.getFieldValue().pes_id}`)).data;\r\n endereco = dadosEndereco.filter(endereco => (endereco.pee_id === formulario.getFieldValue().enderecoCliente))[0];\r\n valores.pes_nroestabelecimento = (!!endereco.pee_numero ? endereco.pee_numero : 'SN');\r\n valores.pes_id = endereco.pes_id;\r\n valores.loc_id_transferencia = null;\r\n valores.pes_telefone = !!formulario.getFieldValue().pes_telefone ? formulario.getFieldValue().pes_telefone : !!formulario.getFieldValue().telefoneCliente ? formulario.getFieldValue().telefoneCliente : \"\";\r\n valores.cli_id = cliente.cli_id;\r\n }\r\n valores.ven_id = formulario.getFieldValue().ven_id;\r\n valores.ped_ativo = true;\r\n valores.ped_datainclusao = formulario.getFieldValue().ped_datainclusao;\r\n valores.ped_dataprevisaoentrega = moment(new Date())\r\n valores.ped_datavalidade = formulario.getFieldValue().ped_datainclusao;\r\n valores.ped_observacao = formulario.getFieldValue().ped_observacao;\r\n valores.ped_valorfrete = (!!formulario.getFieldValue().ped_valorfrete ? parseFloat(formulario.getFieldValue().ped_valorfrete) : 0);\r\n valores.ped_valorTotalitens = parseFloat(totalPedido);\r\n valores.ped_valorTotalAcre = (!!formulario.getFieldValue().ped_valorTotalAcre ? parseFloat(formulario.getFieldValue().ped_valorTotalAcre) : 0);\r\n valores.ped_valorTotalDesc = (!!formulario.getFieldValue().ped_valorTotalDesc ? parseFloat(formulario.getFieldValue().ped_valorTotalDesc) : 0);\r\n valores.ped_valoroutrasdespesas = (!!formulario.getFieldValue().pdi_valoroutrasdespesas ? parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas) : 0);\r\n valores.ped_valorTotal = parseFloat(valores.ped_valorTotal);\r\n valores.valorFrete = (!!formulario.getFieldValue().pdi_valorfrete ? parseFloat(formulario.getFieldValue().pdi_valorfrete) : 0);\r\n valores.valorDesconto = (!!formulario.getFieldValue().ped_valorTotalDesc ? parseFloat(formulario.getFieldValue().ped_valorTotalDesc) : 0);\r\n valores.valorAcrescimo = (!!formulario.getFieldValue().ped_valorTotalAcre ? parseFloat(formulario.getFieldValue().ped_valorTotalAcre) : 0);\r\n valores.valorOutrasDespesas = (!!formulario.getFieldValue().pdi_valoroutrasdespesas ? parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas) : 0);\r\n valores.pes_bairro = endereco.bai_nome;\r\n valores.pes_cep = endereco.cep_cep;\r\n valores.pes_cidade = endereco.cid_descricao;\r\n valores.pes_endereco = endereco.log_logradouro;\r\n valores.pes_uf = endereco.est_sigla;\r\n valores.ped_responsavelpedido = getNomeUsuario();\r\n valores.ped_modalidadefrete = formulario.getFieldValue().ped_modalidadefrete;\r\n\r\n valores.eqp_id = formulario.getFieldValue().eqp_id || null;\r\n valores.eqp_id = (valores.eqp_id == 0) ? null : valores.eqp_id;\r\n\r\n valores.tse_id = formulario.getFieldValue().tse_id;\r\n valores.ors_id = formulario.getFieldValue().ors_id;\r\n valores.eqp_senhapin = formulario.getFieldValue().eqp_senhapin;\r\n valores.fun_id = newForm.getFieldValue().fun_id;\r\n valores.tpu_id = newForm.getFieldValue().tpu_id;\r\n valores.ors_descricaoservico = newForm.getFieldValue().ors_descricaoservico;\r\n valores.ors_descricaocessorio = newForm.getFieldValue().ors_descricaocessorio;\r\n valores.ors_descricaoproblema = newForm.getFieldValue().ors_descricaoproblema;\r\n valores.usu_id = parseInt(getIdUsuario());\r\n if (valores.duplicar) {\r\n valores.ped_id = null;\r\n }\r\n carregando(true);\r\n if (!!valores.ped_id && !valores.ped_id_duplicar) {\r\n valores.stp_id = formulario.getFieldValue().stp_id;\r\n api.put(`ordemservico/Editar`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: `OS editada com sucesso!` });\r\n Modal.confirm({\r\n title: \"Imprimir?\",\r\n icon: ,\r\n content: `Deseja imprimir a OS?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n okType: \"primary\",\r\n centered: true,\r\n onOk() {\r\n imprimirRelatorioJasper(29, { idPedido: res.data.ped_id });\r\n }\r\n });\r\n aoSalvar();\r\n recarregarDados();\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n } else {\r\n if (!!valores.ped_id_duplicar) {\r\n if (dadosFormasPagamento.length > 0) {\r\n valores.pedidoformapgtos.forEach((pgto) => {\r\n pgto.pfp_id = null;\r\n });\r\n }\r\n valores.pedidoitens.forEach((item) => {\r\n item.ped_id = null;\r\n item.pdi_id = null;\r\n })\r\n }\r\n api.post(`ordemservico/Incluir`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: `Ordem de Serviço incluída com sucesso!` });\r\n Modal.confirm({\r\n title: \"Imprimir?\",\r\n icon: ,\r\n content: `Deseja imprimir a OS?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n okType: \"primary\",\r\n centered: true,\r\n onOk() {\r\n imprimirRelatorioJasper(29, { idPedido: res.data.ped_id });\r\n }\r\n });\r\n aoSalvar();\r\n recarregarDados();\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n }\r\n }\r\n\r\n function recarregarDados() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } });\r\n };\r\n\r\n async function carregarDadosCliente(codigo) {\r\n if (!!codigo) {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${codigo}`)).data;\r\n if (!!cliente) {\r\n formulario.setFieldsValue({ 'pej_inscricaoestadual': cliente.pej_inscricaoestadual });\r\n retornarDadosCPFCNPJ(cliente);\r\n if (cliente.emails.length > 0) {\r\n setListaEmail(cliente.emails);\r\n formulario.setFieldsValue({ dadosEmailCliente: cliente.emails[0].pem_email })\r\n }\r\n if (cliente.cli_id) {\r\n setDadosCliente(cliente.cli_id);\r\n formulario.setFieldsValue({ cli_id: cliente.cli_id })\r\n }\r\n if (cliente.enderecos.length > 0) {\r\n setDadosEndereco(cliente.enderecos);\r\n formulario.setFieldsValue({ enderecoCliente: cliente.enderecos[0].pee_id })\r\n } else {\r\n setDadosEndereco([]);\r\n if (!!formulario.getFieldValue().pes_id) {\r\n Modal.confirm({\r\n title: 'Endereço não encontrado',\r\n icon: ,\r\n content: 'Deseja incluir um endereço para este cliente?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setAbreModalEndereco(true);\r\n }\r\n });\r\n }\r\n }\r\n if (cliente.telefones.length > 0) {\r\n setListaTelefone(cliente.telefones);\r\n formulario.setFieldsValue({ telefoneCliente: cliente.telefones[0].psc_numero })\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n };\r\n\r\n function limparCliente() {\r\n formulario.setFieldsValue({\r\n cpf: null,\r\n cnpj: null,\r\n telefoneCliente: null,\r\n enderecoCliente: null,\r\n dadosEmailCliente: null\r\n })\r\n setDadosEndereco([]);\r\n setDadosEmail([]);\r\n setListaTelefone([]);\r\n }\r\n\r\n async function retornarDadosCPFCNPJ(cliente) {\r\n if (!!cliente) {\r\n if (!!cliente.pef_cpf) {\r\n setPessoaFisica(true);\r\n formulario.setFieldsValue({ cpf: cliente.pef_cpf, cli_id: cliente.cli_id });\r\n } else if (!!cliente.pej_cnpj) {\r\n setPessoaFisica(false);\r\n formulario.setFieldsValue({ cnpj: cliente.pej_cnpj, cli_id: cliente.cli_id });\r\n }\r\n }\r\n };\r\n function adicionarEndereco() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalEndereco(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" })\r\n }\r\n };\r\n\r\n function onCloseModalEndereco(dados) {\r\n setAbreModalEndereco(false);\r\n };\r\n\r\n function adicionarTelefone() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalTelefone(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" })\r\n }\r\n };\r\n\r\n function onCloseModalTelefone() {\r\n setAbreModalTelefone(false);\r\n };\r\n\r\n function onCloseModalEmail() {\r\n setAbreModalEmail(false);\r\n };\r\n\r\n function adicionarEmail() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalEmail(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" });\r\n }\r\n };\r\n\r\n async function buscarDadosLocal(loc_id_transferencia) {\r\n if (!!loc_id_transferencia) {\r\n let filial = filiaisEmpresa.find((filial) => { return filial.loc_id === loc_id_transferencia });\r\n let retornoEndereco = await api.get(`LogradouroCidade/BuscarLogradouroCidade?codigoLogradouroCidade=${filial.lcd_id}&estrangeiro=0`)\r\n let endereco = \"\";\r\n if (retornoEndereco.status === 200) {\r\n setDadosEnderecoLocal(retornoEndereco.data);\r\n endereco = retornoEndereco.data.log_logradouro;\r\n }\r\n setEmiteTransferencia(true);\r\n formulario.setFieldsValue({ loc_email: filial.loc_email.endereco, loc_telefone: filial.loc_telefone, cnpj: filial.loc_cnpj.numero, log_logradouro: endereco });\r\n }\r\n };\r\n\r\n function alterarCusto(e) {\r\n if (!!e) {\r\n let custo = tipoPreco.find((custo) => { return custo.key === e });\r\n if (!!custo) {\r\n setCusto(custo);\r\n }\r\n }\r\n };\r\n\r\n function fecharDrawerVendedores() {\r\n setAbrirDrawerVendedores(false);\r\n };\r\n\r\n async function validarTransporte() {\r\n await rateioFrete();\r\n await recalcularImpostos();\r\n }\r\n\r\n async function recalcularImpostos() {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n let totalIPI = 0;\r\n let possuiIe = !!formulario.getFieldValue().pej_inscricaoestadual ? true : false;\r\n let cpf = formulario.getFieldValue()?.cpf || '';\r\n let cnpj = formulario.getFieldValue()?.cnpj || '';\r\n let fisicaJuridica = cnpj.length === 14 ? 2 : cpf.length == 11 ? 1 : 3;\r\n let ufDestino = dadosEndereco && dadosEndereco.length > 0 ? dadosEndereco[0].est_sigla : dadosContribuinte.est_sigla\r\n let ufOrigem = dadosContribuinte.est_sigla;\r\n for (const p of dadosItens) {\r\n console.log(\"valores\", dadosItens);\r\n try {\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_i, ufOrigem, ufDestino, p.pdi_quantidade, p.pdi_valorunitario, p.pdi_valorfrete, p.pdi_valoracrescimo,\r\n p.pdi_valordesconto, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_percReducaoIcms,\r\n p.impostos.retornoICMSST.ret_aliquotaIcmsSt, p.impostos.retornoICMSST.ret_percMva, p.impostos.retornoICMSST.ret_percReducaoIcmsST, null,\r\n p.ncm_percentual, fisicaJuridica, formulario.getFieldValue().ntf_consumidorfinal, possuiIe, formulario.getFieldValue().ped_indicadorpresenca);\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.pdi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.pdi_valoripi = impostos.retornoIPI.ret_valorIpi;\r\n p.total = (p.pdi_quantidade * p.pdi_valorunitario) - p.pdi_valordesconto + p.pdi_valoracrescimo + p.pdi_valoripi + p.pdi_valoricmsst;\r\n p.impostos = impostos;\r\n }\r\n totalSt += parseFloat(p.pdi_valoricmsst);\r\n totalIPI += parseFloat(p.pdi_valoripi);\r\n total += parseFloat(p.total);\r\n } catch (error) {\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n formulario.setFieldsValue({ valorTotalSt: totalSt, valorTotalIPI: totalIPI });\r\n }\r\n }\r\n\r\n async function rateioFrete() {\r\n let _numeroItem = 1;\r\n let _totalFrete = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorFrete = parseFloat(formulario.getFieldValue().pdi_valorfrete);\r\n if (_valorFrete > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.pdi_valorunitario * item.pdi_quantidade;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.pdi_valorunitario * item.pdi_quantidade);\r\n item.pdi_valorfrete = calculaValorProporcional(valorTotalItem, _valorFrete, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.pdi_valorfrete = parseFloat((_valorFrete - _totalFrete).toFixed(2))\r\n }\r\n _totalFrete += item.pdi_valorfrete;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n rateioAcrescimo(dadosItens);\r\n }\r\n\r\n async function rateioAcrescimo(dadosItens) {\r\n let _numeroItem = 1;\r\n let _totalAcrescimo = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorAcrescimo = parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas);\r\n if (_valorAcrescimo > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.pdi_valorunitario * item.pdi_quantidade;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n item.nfi_valorseguro = 0;\r\n let valorTotalItem = parseFloat(item.pdi_valorunitario * item.pdi_quantidade);\r\n let valoracresc = calculaValorProporcional(valorTotalItem, _valorAcrescimo, somaTotal);\r\n //transforma o valor acrescimo em porcentagem\r\n item.percacresc = (valoracresc * 100) / valorTotalItem;\r\n item.pdi_percacresc = (valoracresc * 100) / valorTotalItem;\r\n _totalAcrescimo += item.percacresc;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n\r\n async function popularOperacaoFiscal(id) {\r\n if (!!id) {\r\n api.get(`OperacaoFiscal/Buscar/${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n formulario.setFieldsValue({ ped_indicadorpresenca: res.data.ope_indicadorpresenca });\r\n }\r\n }\r\n ).catch(\r\n error => { console.log(error); }\r\n )\r\n }\r\n };\r\n\r\n function salvandoDadosTipoServico(retorno) {\r\n let lista = [];\r\n if (retorno) {\r\n lista.push({ name: \"tse_id\", campo: \"Codigo\", value: retorno.tse_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia &&
\r\n \r\n \r\n \r\n \r\n }\r\n {emiteTransferencia && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)} conteudo={\r\n ope => ({ope.ope_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerTipoServico(true)}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {editandoOS && }\r\n {editandoOS && }\r\n {editandoOS && }\r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n {!emiteTransferencia &&
\r\n \r\n carregarDadosCliente(dados)}\r\n funcaoIncluir={() => setOpenDrawerCliente(true)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n }\r\n {pessoaFisica && \r\n \r\n }\r\n {!pessoaFisica && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarEmail() }}\r\n campoDescricao={'pem_email'}\r\n campoValue={'pem_id'}\r\n campoKey={'pem_id'}\r\n placeHolder={'Selecione um E-mail'}\r\n labelFormItem={'E-mail'}\r\n nameFormItem={'dadosEmailCliente'} />}\r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarTelefone() }}\r\n campoDescricao={'psc_numero'}\r\n campoValue={'psc_id'}\r\n campokey={'psc_id'}\r\n placeHolder={'Selecione um Telefone'}\r\n labelFormItem={'Telefone'}\r\n nameFormItem={'telefoneCliente'} />}\r\n \r\n \r\n \r\n \r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarEndereco() }}\r\n campoDescricao={['log_logradouro', 'cid_descricao', 'est_sigla', 'tpe_descricao']}\r\n campoValue={'pee_id'}\r\n campoKey={'pee_id'}\r\n placeHolder={\"Selecione um Endereço\"}\r\n labelFormItem={'Endereço'}\r\n nameFormItem={'enderecoCliente'}\r\n rulesFormItem={[{ required: true, message: 'Informe o Endereço' }]}\r\n />}\r\n \r\n \r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n (endereco.pee_id === formulario.getFieldValue().enderecoCliente))[0]}\r\n dadosTabela={{ dadosItens, setDadosItens }}\r\n totalPedido={{ totalPedido, setTotalPedido }} custo={emiteTransferencia ? custo : {}}\r\n dadosOperacao={formulario.getFieldValue().ope_id}\r\n />\r\n }\r\n {pages.tagPages === 4 &&\r\n \r\n }\r\n {pages.tagPages === 5 &&\r\n \r\n }\r\n \r\n \r\n \r\n\r\n { onCloseModalEndereco() }} />\r\n { onCloseModalTelefone() }} />\r\n { onCloseModalEmail() }} />\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import { Button, Col, Form, Modal, Row } from \"antd\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useState } from \"react\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, LeftOutlined, MinusOutlined, RightOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport { DrawerNav } from \"../../components\";\r\nimport ManutencaoOrdemServico from \"./manutencao\";\r\n\r\nexport default function DrawerOrdemServico({ clientes, exibirDrawer, fecharDrawerPedidos, editandoOS, setEditandoOS }) {\r\n\r\n const [formOrdem] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [mostraBtnSalvar, setMostraBtnSalvar] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n function fecharDrawer() {\r\n if(editandoOS){\r\n setEditandoOS(false)\r\n }\r\n setProximaPag(null);\r\n setTagPages(0);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharDrawerPedidos();\r\n formOrdem.resetFields();\r\n setCarregando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n {/* \r\n {mostraBtnSalvar &&
\r\n \r\n }\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n )\r\n}","import { CheckOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { Button, Col, Form, Input, message, Modal, notification, Radio, Row, Select, Table, Tag } from \"antd\";\r\nimport api from \"../../../services/api\";\r\nimport { useEffect, useState } from \"react\";\r\nimport TabelaDados from \"../../tabelaDados\";\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\n\r\nexport default function ModalStatus({ onCloseModal, exibirModal, fecharModalStatus, dadosStatus, onSave }) {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [statusSelecionado, setStatusSelecionado] = useState(null);\r\n const [listaStatus, setListaStatus] = useState([]);\r\n\r\n\r\n useEffect(() => {\r\n api.get(`StatusPedido/Listar`).then(res => {\r\n setListaStatus(res.data.items);\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n formulario.resetFields();\r\n setStatusSelecionado(null); \r\n }\r\n }, [exibirModal]);\r\n\r\n \r\n function alterarStatus() {\r\n if (!statusSelecionado) {\r\n notification.warning(\"Selecione um status!\");\r\n return;\r\n }\r\n let observacao = formulario.getFieldValue(\"peh_observacao\");\r\n let dadosAtualizados = {\r\n ped_id: dadosStatus.ped_id,\r\n stp_id: statusSelecionado,\r\n peh_observacao: observacao\r\n };\r\n api.put(`OrdemServico/EditarStatus`, dadosAtualizados)\r\n .then(() => {\r\n notification.success({ message: 'Concluído!', description: \"Status alterado com sucesso!\" })\r\n onSave();\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n }).finally(() => {\r\n\r\n fecharModalStatus();\r\n })\r\n }\r\n\r\n return (\r\n } size=\"middle\" onClick={fecharModalStatus}>\r\n Cancelar\r\n ,\r\n ,\r\n ]}>\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Tag, Table, Button } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabDetalheItens({ itensNF }) {\r\n\r\n const [percentualDesc, setPercentualDesc] = useState(false);\r\n\r\n function retornarPercentual(perc_desconto, nfi_valordesconto) {\r\n if (percentualDesc) {\r\n return (\r\n
\r\n {perc_desconto}%\r\n
\r\n )\r\n } else {\r\n return (\r\n
\r\n {FormatNumber(nfi_valordesconto, true)}\r\n
\r\n )\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n {!!descricaograde &&\r\n \r\n \r\n {descricaograde}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Faturado',\r\n align: 'right',\r\n width: 60,\r\n render: ({ pdi_qtdeentregue }) => (\r\n
\r\n \r\n
\r\n {!!pdi_qtdeentregue ? {pdi_qtdeentregue} : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Devolvido',\r\n align: 'right',\r\n width: 60,\r\n render: ({ pdi_qtdedevolvido }) => (\r\n
\r\n \r\n
\r\n {!!pdi_qtdedevolvido ? {pdi_qtdedevolvido} : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 50,\r\n align: 'right',\r\n render: ({ pdi_quantidade }) => (\r\n
\r\n \r\n
\r\n {pdi_quantidade}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 80,\r\n render: ({ pdi_valorunitario }) => (\r\n
\r\n {FormatNumber(pdi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desc.\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: 75,\r\n align: 'right',\r\n render: ({ perc_desconto, pdi_valordesconto }) => (\r\n retornarPercentual(perc_desconto, pdi_valordesconto)\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pdi_valortotal }) => (\r\n
\r\n {FormatNumber(pdi_valortotal, true)}\r\n
\r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n );\r\n}","import React from 'react';\r\nimport { Row, Col, Table } from \"antd\";\r\n\r\nimport moment from 'moment';\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabDetalheFormaPagamento({ formaPagamento }) {\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n
\r\n \r\n
\r\n Nº: {prc_numeroparcela}\r\n \r\n \r\n Vencimento: {!!prc_datavencimento ? moment(prc_datavencimento).format('DD/MM/YYYY') : null}\r\n \r\n \r\n Valor (R$): {FormatNumber(!!prc_valor ? prc_valor : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } pagination={false} />\r\n };\r\n\r\n const rowExpandable = record => { return (record.fpg_tipopagamento === 5 || record.fpg_tipopagamento === 15 )};\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {fpg_descricao + (!!cpg_descricao ? '/ ' + cpg_descricao : '')}\r\n \r\n \r\n R$ {FormatNumber(!!pfp_valor ? pfp_valor : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } pagination={false} expandable={{ expandedRowRender, rowExpandable }} />\r\n\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport moment from \"moment\";\r\nimport { FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\n\r\nexport default function TabDetalheRelacaoNota({ dadosNota, listaStatusNota }) {\r\n const [listaNotas, setListaNotas] = useState([]);\r\n\r\n useEffect(() => {\r\n if (dadosNota) {\r\n let listaTemp = dadosNota.map((item, index) => ({\r\n ...item,\r\n key: index\r\n }));\r\n\r\n setListaNotas(listaTemp);\r\n }\r\n }, [])\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!listaStatusNota) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {listaNotas.length > 0 ? Notas emitidas pelo pedido atual: : Nota emitida pelo pedido atual:}\r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {ntf_numero}\r\n \r\n
\r\n )\r\n },\r\n {\r\n title: 'Status',\r\n width: 130,\r\n align: 'center',\r\n render: ({ ntf_status, tip_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n {tip_descricao}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 100,\r\n render: ({ ntf_cnpjcpfdest }) => (\r\n
\r\n {MaskFormat(ntf_cnpjcpfdest, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 250,\r\n render: ({ ntf_nomedest }) => (\r\n
\r\n {ntf_nomedest}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 100,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 50,\r\n align: 'center',\r\n render: ({ ntf_modelo, ser_serie }) => (\r\n
\r\n \r\n
\r\n {ntf_modelo}\r\n \r\n \r\n -\r\n \r\n \r\n {ser_serie}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total (R$)\",\r\n width: 70,\r\n align: 'right',\r\n render: ({ valortotalnota }) => (\r\n
\r\n {FormatNumber(valortotalnota, true)}\r\n
\r\n )\r\n },\r\n ]\r\n } />\r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport moment from \"moment\";\r\n\r\nexport default function TabDetalheHistorico ({ historico }) {\r\n \r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Data de Alteração',\r\n width: 100,\r\n render: ({ peh_datahora }) => (\r\n
\r\n {moment(peh_datahora).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n width: 200,\r\n render: ({usu_nome}) => (\r\n
\r\n {usu_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Observação',\r\n width: 200,\r\n render: ({peh_observacao}) => (\r\n
\r\n {peh_observacao ?? '-'}\r\n
\r\n )\r\n },\r\n ]\r\n }/>\r\n \r\n )\r\n}","import { Button, Col, Row, Table, Tag } from \"antd\"\r\nimport { FormatNumber } from \"../../ValueObjects\"\r\nimport { useForm } from \"antd/lib/form/Form\";\r\nimport { useEffect, useState } from \"react\";\r\n\r\nexport default function TabDetalheEquipamento({ equipamento }) {\r\n\r\n const [dadosEquipa, setDadosEquipa]= useState([])\r\n\r\n\r\nuseEffect(() =>{\r\n\r\nlet listaTemp = []\r\nlistaTemp.push(equipamento)\r\nsetDadosEquipa(listaTemp)\r\n\r\n}, [equipamento])\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {eqp_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Identificação',\r\n render: ({ eqp_identificacao }) => (\r\n
\r\n \r\n
\r\n {eqp_identificacao}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tipo do Equipamento',\r\n render: ({ teq_descricao }) => (\r\n
\r\n \r\n
\r\n {teq_descricao} \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Modelo do Equipamento',\r\n render: ({ meq_descricao }) => (\r\n
\r\n \r\n
\r\n {meq_descricao}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Marca',\r\n render: ({ mar_nome }) => (\r\n
\r\n \r\n
\r\n {mar_nome}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n );\r\n}","import { Card, Col, Descriptions, Row } from \"antd\";\r\n\r\nexport default function TabDetalhesOS({ ordemservico }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {(ordemservico.ors_descricaoproblema)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {(ordemservico.ors_descricaoservico)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {(ordemservico.ors_descricaocessorio)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Tabs, Card } from \"antd\";\r\n\r\nimport { TabDetalheItens, TabDetalheRelacaoNota, TabDetalheHistorico } from './tabPages';\r\nimport moment from 'moment';\r\nimport { FormatFone, MaskFormat } from '../../ValueObjects/index';\r\nimport api from '../../services/api';\r\nimport TabDetalheFormaPagamento from './tabDetalheFormaPagamento';\r\nimport TabDetalheEquipamento from './tabDetalheEquipamento';\r\nimport TabDetalhesOS from './tabDetalhesOS';\r\n\r\nexport default function DetalheOrdemServico({ dadosModal }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [pedido, setPedido] = useState({});\r\n const [dadosNota, setDadosNota] = useState([]);\r\n const [abaRelacionamento, setAbaRelacionamento] = useState(false);\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dadosModal) {\r\n if (!!dadosModal?.ped_id) {\r\n setPedido(dadosModal)\r\n }\r\n retornaStatusNF();\r\n buscarRelacionamento();\r\n }\r\n }, [dadosModal]);\r\n\r\n\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n async function buscarRelacionamento() {\r\n let retorno = await api.get(`Pedido/ListarRelacionamento?IdPed=${dadosModal.ped_id}`);\r\n if (retorno.status === 200) {\r\n if (retorno.data.length > 0) {\r\n setDadosNota(retorno.data);\r\n setAbaRelacionamento(true);\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {(!!pedido.pes_nome ? pedido.pes_nome : 'NÃO INFORMADO')}\r\n \r\n \r\n \r\n \r\n {(!!pedido.pef_cpf ? MaskFormat(pedido.pef_cpf, '', true) : (!!pedido.pej_cnpj ? MaskFormat(pedido.pej_cnpj, '', true) : 'NÃO INFORMADO'))}\r\n \r\n \r\n \r\n \r\n {(!!pedido.ped_iedest ? pedido.ntf_iedest : 'NÃO INFORMADO')}\r\n \r\n \r\n \r\n \r\n {!!pedido.pes_telefone ? FormatFone(pedido.pes_telefone) : 'NÃO INFORMADO'}\r\n \r\n \r\n \r\n \r\n {(!!pedido.pem_email ? pedido.pem_email : 'NÃO INFORMADO')}\r\n \r\n \r\n \r\n \r\n \r\n {(!!pedido.pes_endereco ? pedido.pes_endereco : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_bairro ? pedido.pes_bairro : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_cidade ? pedido.pes_cidade : ' NÃO INFORMADO ') + '-' + (!!pedido.pes_uf ? pedido.pes_uf : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_cep ? MaskFormat(pedido.pes_cep, '00000-000') : ' NÃO INFORMADO')}.\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {pedido.ped_numero}\r\n \r\n \r\n \r\n \r\n {!!pedido.ped_datainclusao ? moment(pedido.ped_datainclusao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {(!!pedido.fun_nome ? pedido.fun_nome : 'NÃO INFORMADO')}\r\n \r\n \r\n \r\n \r\n\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {abaRelacionamento && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import { Modal } from \"antd\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { DetalhePedido } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport DetalheOrdemServico from \"../../components/detalheOrdemServico\";\r\n\r\nexport default function ModalDetalheOS({ exibirModal, fecharModalDados, dadosModal }){\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n const onClose = () => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharModalDados();\r\n };\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n\r\n )\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { Button, Col, Collapse, Dropdown, Form, Menu, Modal, notification, Row, Select, Tag } from \"antd\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, CloseOutlined, CopyOutlined, DollarOutlined, EditOutlined, ExclamationCircleOutlined, EyeOutlined, FileDoneOutlined, MoreOutlined, PlusOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\nimport { imprimirRelatorioJasper } from \"../../services/funcoes\";\r\nimport { BreadcrumbPage, Data, Imprimir, PesquisaAvancada, PesquisaOrdenacaoData, TabelaDados } from \"../../components\";\r\nimport { FormatFone, FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\nimport DrawerPedidos from \"../pedidos/drawer\";\r\nimport DrawerNF from \"../pedidos/drawerNF\";\r\nimport DrawerNFSE from \"../pedidos/drawerNFSE\";\r\nimport DrawerTransferencia from \"../pedidos/drawerTransferencia\";\r\nimport ModalDetalhePedido from \"../pedidos/modalDetalhePedido\";\r\nimport ModalSelecionarNF from \"../pedidos/modalSelecionarNF\";\r\nimport DrawerOrdemServico from \"./drawer\";\r\nimport ModalStatus from \"../../components/modals/modalTrocaStatus\";\r\nimport ModalDetalheOS from \"./modalDetalheOS\";\r\n\r\nexport default function OrdemServico() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [open, setOpen] = useState(false);\r\n const [openModalDetalhePedido, setOpenModalDetalhePedido] = useState(false);\r\n const [dadosDetalhesPedido, setDadosDetalhesPedido] = useState({});\r\n const [formOrdem] = Form.useForm();\r\n const [idPedido, setIdPedido] = useState(0);\r\n const [status, setStatus] = useState([]);\r\n const [showDrawerNF, setShowDrawerNF] = useState(false);\r\n const [showDrawerNFSE, setShowDrawerNFSE] = useState(false);\r\n const [openModalEscolha, setOpenModalEscolha] = useState(false);\r\n const [drawerTransferencia, setDrawerTransferencia] = useState(false);\r\n const [dadosPedido, setDadosPedido] = useState({});\r\n const [dadosNFSE, setDadosNFSE] = useState({});\r\n const [dadosNF, setDadosNF] = useState({});\r\n const [exibirDrawerOrdem, setExibirDrawerOrdem] = useState(false);\r\n const [editandoOS, setEditandoOS] = useState(false);\r\n const [openModalStatus, setOpenModalStatus] = useState(false);\r\n const [dadosStatus, setDadosStatus] = useState({});\r\n\r\n\r\n useEffect(() => {\r\n carregarStatus()\r\n formOrdem.setFieldsValue({ ativoPedido: [\"1\"] });\r\n }, []);\r\n\r\n function carregarPrimeiraVez() {\r\n let ativo = 2;//Toodos\r\n if (formOrdem.getFieldValue().ativoPedido.length == 1) {\r\n if (formOrdem.getFieldValue().ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (formOrdem.getFieldValue().ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n let filtro = `&Ativo=${ativo}`;\r\n let status = !!formOrdem.getFieldValue().status ? formOrdem.getFieldValue().status : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao', outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${moment(formOrdem.getFieldValue().dataPesquisa).format(\"YYYY-MM-DD\")}&filtro=&status=${status}` + filtro } })\r\n formOrdem.setFieldsValue({ dataFinal: moment(new Date) });\r\n formOrdem.setFieldsValue({ dataInicial: moment(formOrdem.getFieldValue().dataPesquisa) });\r\n \r\n };\r\n\r\n function carregarStatus() {\r\n let key = 0;\r\n api.get(`StatusPedido/Listar`).then(\r\n res => {\r\n let listaStatus = []\r\n res.data.items.forEach(item => {\r\n item.key = key++;\r\n listaStatus.push(item.stp_id);\r\n });\r\n setStatus(res.data.items);\r\n formOrdem.setFieldsValue({ status: listaStatus });\r\n carregarPrimeiraVez();\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n );\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setOpen(!open);\r\n };\r\n\r\n function editarOrdem(record) {\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n setExibirDrawerOrdem(true);\r\n setEditandoOS(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n };\r\n\r\n function trocarStatus(record) {\r\n setDadosStatus(record)\r\n setOpenModalStatus(true)\r\n }\r\n\r\n const modalConfirm = (record) => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Tem certeza que deseja cancelar essa Ordem de Serviço?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n cancelarOrdem(record);\r\n }\r\n });\r\n }\r\n\r\n function cancelarOrdem(record) {\r\n api.post(`Pedido/CancelarPedido?IdPedido=${record.ped_id}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"OS cancelada com sucesso!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } });\r\n }\r\n );\r\n };\r\n\r\n //#region faturar pedidos\r\n async function emitirNf(record) {\r\n let itensPedido = await api.get(`PedidoItem/ListarItensPedido?codigoPedido=${record.ped_id}`);\r\n record.itensNf = itensPedido.data;\r\n\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ntf_modalidadefrete = record.ped_modalidadefrete;\r\n record.itensNf.forEach((item) => {\r\n item.nfi_valorunitario = item.pdi_valorunitario;\r\n item.nfi_qtde = item.pdi_quantidade;\r\n item.nfi_valordesconto = item.pdi_valordesconto;\r\n item.nfi_valoroutros = item.pdi_valoracrescimo;\r\n item.nfi_ean = !!item.prg_ean ? item.prg_ean : item.pro_ean;\r\n item.total = (item.pdi_valorunitario * item.pdi_quantidade) - item.pdi_valordesconto + item.pdi_valoracrescimo;\r\n item.percdesc = !!item.nfi_valordesconto ? (item.nfi_valordesconto * 100) / item.total : 0;\r\n item.percacresc = !!item.nfi_valoroutros ? (item.nfi_valoroutros * 100) / item.total : 0;\r\n item.nfi_numeropedidocompra = record.ped_numero;\r\n });\r\n record.faturamento = record.formaPgto;\r\n\r\n tratarDevolvidoFaturado(record);\r\n setDadosPedido(record);\r\n\r\n let temServico = record.itensNf.some(item => item.pro_servico === true);\r\n let soServico = record.itensNf.every(item => item.pro_servico === true);\r\n\r\n if (temServico && !soServico) {\r\n setOpenModalEscolha(true);\r\n } else if (soServico) {\r\n tratarFaturamentoNFSe(record);\r\n setDadosNFSE(record);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n setShowDrawerNFSE(true);\r\n } else {\r\n tratarFaturamentoNFe(record);\r\n setDadosNF(record);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n setShowDrawerNF(true);\r\n }\r\n };\r\n\r\n function tratarDevolvidoFaturado(dados) {\r\n if (!dados || !dados.itensNf) return dados;\r\n\r\n dados.itensNf = dados.itensNf.map(item => {\r\n let result = item.pdi_quantidade - item.pdi_qtdedevolvido - item.pdi_qtdeentregue;\r\n if (result === 0) {\r\n return null;\r\n } else if (result > 0) {\r\n item.pdi_quantidade = result;\r\n return item;\r\n }\r\n }).filter(item => item !== null);\r\n\r\n return dados;\r\n }\r\n\r\n function tratarFaturamentoNFSe(record) {\r\n if (!record.formaPgto || record.formaPgto.length === 0) {\r\n return record; // Se formaPgto for vazio ou undefined, ignora e retorna o record original\r\n }\r\n if (record.formaPgto.length > 1) { //CONDIÇÃO PARA QUANDO SE EXISTE MAIS DE UMA FORMA DE PAGAMENTO\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0); //VALOR TOTAL INICIAL\r\n let porcentagens = record.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal); //CALCULA A PORCENTAGEM DE CADA FORMA\r\n\r\n let somaValorPagos = 0; //CALCULA OS NOVOS VALORES DAS FORMAS DE PAGAMENTO\r\n for (let i = 0; i < record.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * valorTotal).toFixed(2));\r\n record.formaPgto[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((valorTotal - somaValorPagos).toFixed(2)); //DEFINE O VALOR DA ULTIMA FORMA COM O RESTANTE\r\n record.formaPgto[record.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n record.faturamento[record.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n record.formaPgto[0].pfp_valor = valorTotal;\r\n record.faturamento[0].pfp_valor = valorTotal;\r\n }\r\n\r\n return record;\r\n }\r\n\r\n function tratarFaturamentoNFe(record) {\r\n debugger\r\n if (!record.formaPgto || record.formaPgto.length === 0) {\r\n return record; // Se formaPgto for vazio ou undefined, ignora e retorna o record original\r\n }\r\n if (record.formaPgto.length > 1) {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n let porcentagens = record.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal);\r\n\r\n let somaValorPagos = 0;\r\n for (let i = 0; i < record.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * valorTotal).toFixed(2));\r\n record.formaPgto[i].pfp_valor = novoValor;\r\n record.faturamento[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((valorTotal - somaValorPagos).toFixed(2));\r\n record.formaPgto[record.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n record.faturamento[record.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n let valorTotal = record.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n record.formaPgto[0].pfp_valor = valorTotal;\r\n record.faturamento[0].pfp_valor = valorTotal;\r\n }\r\n\r\n return record;\r\n }\r\n\r\n function nfseEscolhida() {\r\n //FUNÇÃO EXECUTADA QUANDO NF DE SERVIÇO É ESCOLHIDA\r\n let dadosTemp = {}\r\n if (!dadosPedido.formaPgto || dadosPedido.formaPgto.length === 0) {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_servico === true)\r\n };\r\n \r\n setDadosNFSE(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNFSE(true);\r\n setOpenModalEscolha(false);\r\n return;\r\n }\r\n if (dadosPedido.formaPgto.length > 1) { //CONDIÇÃO PARA QUANDO SE EXISTE MAIS DE UMA FORMA DE PAGAMENTO\r\n let valorTotal = dadosPedido.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0); //VALOR TOTAL INICIAL\r\n let porcentagens = dadosPedido.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal); //CALCULA A PORCENTAGEM DE CADA FORMA\r\n\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_servico === true) //FILTRA APENAS OS SERVIÇOS\r\n };\r\n\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n\r\n let somaValorPagos = 0; //CALCULA OS NOVOS VALORES DAS FORMAS DE PAGAMENTO\r\n for (let i = 0; i < dadosTemp.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * novoValorTotal).toFixed(2));\r\n dadosTemp.formaPgto[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((novoValorTotal - somaValorPagos).toFixed(2)); //DEFINE O VALOR DA ULTIMA FORMA COM O RESTANTE\r\n dadosTemp.formaPgto[dadosTemp.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n dadosTemp.faturamento[dadosTemp.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_servico === true)\r\n };\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n dadosTemp.formaPgto[0].pfp_valor = novoValorTotal;\r\n dadosTemp.faturamento[0].pfp_valor = novoValorTotal;\r\n }\r\n\r\n setDadosNFSE(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNFSE(true);\r\n setOpenModalEscolha(false);\r\n }\r\n\r\n function nfEscolhida() {\r\n //FUNÇÃO EXECUTADA QUANDO NF É ESCOLHIDA\r\n let dadosTemp = {}\r\n if (!dadosPedido.formaPgto || dadosPedido.formaPgto.length === 0) {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_produto === true) \r\n };\r\n \r\n setDadosNF(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNF(true);\r\n setOpenModalEscolha(false);\r\n return;\r\n }\r\n if (dadosPedido.formaPgto.length > 1) {\r\n let valorTotal = dadosPedido.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n let porcentagens = dadosPedido.formaPgto.map(fp => (fp.pfp_valor || 0) / valorTotal);\r\n\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_produto === true)\r\n };\r\n\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n\r\n let somaValorPagos = 0;\r\n for (let i = 0; i < dadosTemp.formaPgto.length - 1; i++) {\r\n let novoValor = parseFloat(((porcentagens[i] || 0) * novoValorTotal).toFixed(2));\r\n dadosTemp.formaPgto[i].pfp_valor = novoValor;\r\n dadosTemp.faturamento[i].pfp_valor = novoValor;\r\n somaValorPagos += novoValor;\r\n }\r\n\r\n let novoValorUltimaForma = parseFloat((novoValorTotal - somaValorPagos).toFixed(2));\r\n dadosTemp.formaPgto[dadosTemp.formaPgto.length - 1].pfp_valor = novoValorUltimaForma;\r\n dadosTemp.faturamento[dadosTemp.faturamento.length - 1].pfp_valor = novoValorUltimaForma;\r\n } else {\r\n dadosTemp = {\r\n ...dadosPedido,\r\n itensNf: dadosPedido.itensNf.filter(item => item.pro_produto === true)\r\n };\r\n let novoValorTotal = dadosTemp.itensNf.reduce((total, item) => total + (item.pdi_valortotal || 0), 0);\r\n dadosTemp.formaPgto[0].pfp_valor = novoValorTotal;\r\n dadosTemp.faturamento[0].pfp_valor = novoValorTotal;\r\n }\r\n\r\n setDadosNF(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n setShowDrawerNF(true);\r\n setOpenModalEscolha(false);\r\n }\r\n //#endregion\r\n\r\n async function visualizarPedido(record) {\r\n let itensPedido = await api.get(`PedidoItem/ListarItensPedido?codigoPedido=${record.ped_id}`);\r\n \r\n let dadosOs = (await api.get(`OrdemServico/Buscar?ped_id=${record.ped_id}`)).data;\r\n dadosOs.itensNf = itensPedido.data;\r\n dadosOs.formaPgto = record.formaPgto;\r\n dadosOs.historico = record.historico;\r\n setDadosDetalhesPedido(dadosOs);\r\n setOpenModalDetalhePedido(true);\r\n };\r\n\r\n function imprimirPedido(record) {\r\n imprimirRelatorioJasper(29, { idPedido: record.ped_id });\r\n };\r\n\r\n function abrirDrawerOrdem() {\r\n setExibirDrawerOrdem(true)\r\n }\r\n\r\n function fecharModalStatus(){\r\n setOpenModalStatus(false)\r\n carregarPrimeiraVez();\r\n }\r\n\r\n function fecharModalDados(){\r\n setOpenModalDetalhePedido(false)\r\n carregarPrimeiraVez();\r\n }\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n {(record.ped_ativo === true && record.stp_pedidoconcluido === false && record.stp_permiteemissaonf === true && !!!record.loc_id_transferencia) &&\r\n \r\n \r\n \r\n }\r\n {(record.ped_ativo === true && record.stp_permiteeditarpedido === true) &&\r\n \r\n \r\n \r\n }\r\n {(record.ped_ativo === true && record.stp_id) &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n } onClick={() => imprimirPedido(record)}> Imprimir \r\n \r\n \r\n )\r\n };\r\n\r\n\r\n async function duplicarPedido(record) {\r\n let pedidoDuplicar = { ...record }\r\n pedidoDuplicar.ped_datainclusao = moment(new Date());\r\n pedidoDuplicar.ped_dataprevisaoentrega = moment(pedidoDuplicar.ped_dataprevisaoentrega);\r\n pedidoDuplicar.ped_datavalidade = moment(pedidoDuplicar.ped_datavalidade);\r\n pedidoDuplicar.ped_id_duplicar = pedidoDuplicar.ped_id;\r\n pedidoDuplicar.ped_id = null;\r\n setExibirDrawerOrdem(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: pedidoDuplicar } });\r\n };\r\n\r\n function retornoPesquisaAvancada(expressao) {\r\n let dados = formOrdem.getFieldValue();\r\n let filtro = '';\r\n let dataInicial = dados.dataInicial;\r\n let dataFinal = dados.dataFinal;\r\n let status = dados.status;\r\n let ativo = 2;//Toodos\r\n if (dados.ativoPedido.length == 1) {\r\n if (dados.ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (dados.ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n\r\n filtro += '&dataInicial=' + (!!dataInicial ? moment(dataInicial).format('YYYY-MM-DD') : moment(dados.dataPesquisa).format(\"YYYY-MM-DD\"));\r\n filtro += '&dataFinal=' + (!!dataFinal ? moment(dataFinal).format('YYYY-MM-DD') : moment(new Date).format('YYYY-MM-DD'));\r\n filtro += (!!status ? `&status=${status}` : '');\r\n filtro += (!!ativo ? `&Ativo=${ativo}` : '');\r\n filtro += !!expressao ? `&filtroAdicional=${btoa(expressao)}` : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao', outrosFiltros: filtro } });\r\n };\r\n\r\n function limparFiltroPesquisa() {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ``, ordem: '+ped_datainclusao' } })\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n let filtro = '';\r\n let ativo = 2;//Toodos\r\n if (!!formOrdem.getFieldValue().ativoPedido) {\r\n if (formOrdem.getFieldValue().ativoPedido.length == 1) {\r\n if (formOrdem.getFieldValue().ativoPedido.find(e => e === \"0\"))\r\n ativo = 0;\r\n if (formOrdem.getFieldValue().ativoPedido.find(e => e === \"1\"))\r\n ativo = 1;\r\n }\r\n }\r\n filtro += `&Ativo=${ativo}`;\r\n let status = !!formOrdem.getFieldValue().status ? formOrdem.getFieldValue().status : '';\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${moment(formOrdem.getFieldValue().dataPesquisa).format(\"YYYY-MM-DD\")}&filtro=&status=${status}` + filtro } })\r\n formOrdem.setFieldsValue({ dataFinal: moment(new Date) });\r\n formOrdem.setFieldsValue({ dataInicial: moment(formOrdem.getFieldValue().dataPesquisa) });\r\n }} />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {open ? : } Realizar pesquisa avançada\r\n \r\n }>\r\n \r\n
\r\n \r\n \r\n {status.map(stp => (\r\n {stp.stp_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n retornoPesquisaAvancada(dados)} funcaoLimpar={() => { limparFiltroPesquisa() }} form={formOrdem} telaFiltro={9} retornarSempre={true} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n \r\n \r\n {ped_numero}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Informações\",\r\n render: ({ loc_id_transferencia, loc_descricao, pes_nome, pef_cpf, pej_cnpj, pes_telefone, pes_endereco, pes_nroestabelecimento, pes_bairro, pes_cep, pes_cidade, pes_uf, ped_datainclusao, ped_dataprevisaoentrega, pdi_qtditem, ped_ativo }) => (\r\n
\r\n \r\n
\r\n {!!loc_id_transferencia ? loc_descricao : pes_nome}\r\n \r\n \r\n CPF/CNPJ: {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n \r\n \r\n Telefone: {FormatFone(pes_telefone) || 'Não Informado'}\r\n \r\n \r\n \r\n {!ped_ativo && \r\n Cancelado\r\n }\r\n \r\n Emissão: {moment(ped_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Entrega: {moment(ped_dataprevisaoentrega).format('DD/MM/YYYY')}\r\n \r\n \r\n Quant. de Itens: {pdi_qtditem}\r\n \r\n \r\n Endereço: {pes_endereco}, {pes_nroestabelecimento}, {pes_bairro}, {pes_cep}, {pes_cidade}-{pes_uf}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total (R$)\",\r\n align: 'right',\r\n width: 180,\r\n render: ({ ped_valortotal }) => (\r\n
\r\n {FormatNumber(ped_valortotal, true)}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {\r\n editandoTipoServico(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}\r\n\r\n\r\n\r\n","import { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport { Col, Modal, notification, Row, Tag } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { BreadcrumbIncluirDados, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport DrawerModeloEquipamento from \"./drawer\";\r\n\r\nexport default function ModeloEquipamento() {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+meq_id' } }), [listagemActions]);\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`ModeloEquipamento/Excluir/${dados.meq_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Configurações excluidas com sucesso!` });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n notification.error({ message: \"erro\", description: `${erro}` })\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+meq_id' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function editandoModelo(dados) {\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n {meq_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ meq_descricao }) => {\r\n return (\r\n
\r\n \r\n {meq_descricao}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Marca',\r\n render: ({ descricao_marca }) => {\r\n return (\r\n
\r\n \r\n {descricao_marca}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Tipo do Equipamento',\r\n render: ({ descricao_tipo }) => {\r\n return (\r\n
\r\n \r\n {descricao_tipo}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n {\r\n editandoModelo(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { Col, Form, Modal, notification, Row, Select, Tag } from \"antd\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { BreadcrumbIncluirDados, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport api from \"../../services/api\";\r\nimport DrawerTipoEquipamento from \"./drawer\";\r\n\r\nexport default function TipoEquipamento() {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n const [editando, setEditando] = useState(false);\r\n const [listaIdentificacao, setIdentificacao] = useState([]);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+teq_id' } }), [listagemActions]);\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=OsTipoIdentificacao`).then(res => {\r\n if (res.status === 200) {\r\n setIdentificacao(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n\r\n }, []);\r\n\r\n function retornaDescricaoIdentificacao(teq_exigeidentificacao) {\r\n if (!!listaIdentificacao) {\r\n let identificacao = listaIdentificacao.filter((pro) => (pro.key === teq_exigeidentificacao))[0];\r\n return !!identificacao ? identificacao.value : \"\";\r\n }\r\n };\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`TipoEquipamento/Excluir/${dados.teq_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Configurações excluidas com sucesso!` });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }).catch(\r\n (erro) => {\r\n notification.error({ message: \"erro\", description: `${erro}` })\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+teq_id' } });\r\n });\r\n }\r\n\r\n\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n\r\n function editandoEquipamento(dados) {\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n {teq_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ teq_descricao }) => {\r\n return (\r\n
\r\n \r\n {teq_descricao}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Tipo de Identificação',\r\n render: ({ teq_exigeidentificacao }) => {\r\n return (\r\n
\r\n {retornaDescricaoIdentificacao(teq_exigeidentificacao)}\r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n {\r\n editandoEquipamento(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport api from \"../../services/api\";\r\nimport { Col, Modal, notification, Row, Tag } from \"antd\";\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { BreadcrumbIncluirDados, Editar, Excluir, PesquisaOrdenacao, TabelaDados } from \"../../components\";\r\nimport DrawerTipoUrgencia from \"./drawer\";\r\n\r\nexport default function TipoUrgencia() {\r\n\r\n const [{ ui, manutencao, SelectPaginado }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+tpu_id' } }), [listagemActions]);\r\n\r\n function excluirRegistro(dados) {\r\n api.delete(`TipoUrgencia/Excluir/${dados.tpu_id}`).then(\r\n (res) => {\r\n notification.success({ message: `Sucesso!`, description: `Configurações excluídas com sucesso!` });\r\n }).catch(\r\n (erro) => {\r\n notification.error({ message: \"erro\", description: `${erro}` })\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+tpu_id' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n function editandoDados(dados) {\r\n setEditando(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n (\r\n \r\n {tpu_id}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ tpu_descricao }) => {\r\n return (\r\n
\r\n \r\n {tpu_descricao}\r\n \r\n
\r\n );\r\n },\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 95,\r\n fixed: 'right',\r\n render: (dados) => (\r\n
\r\n \r\n
\r\n {\r\n editandoDados(dados);\r\n }} icon={}\r\n />\r\n \r\n \r\n } onClick={() => { modalExcluir(dados) }} />\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect, useCallback } from \"react\";\r\nimport { clearShoppingCart, deleteCartItem, deleteShoppingCart, editCartItemQuantity, getDateSincro, \r\ninitDatabase, loadShoppingCartItems, clearDateSincro } from \"../../services/CarrinhoDB\";\r\nimport { DownOutlined, ShopOutlined, ShoppingOutlined, ToolOutlined, UpOutlined } from \"@ant-design/icons\";\r\nimport { DeleteOutlineOutlined } from \"@material-ui/icons\";\r\nimport api from \"../../services/api\";\r\nimport { getClienteCat } from \"../../services/auth\";\r\nimport { DrawerPedidoCat } from \"../../components\";\r\nimport { Button } from \"antd\";\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nexport default function CarrinhoCatalogo() {\r\n const [carrinhoItens, setCarrinhoItens] = useState([]);\r\n const [atualizarCarrinho, setAtualizarCarrinho] = useState(false);\r\n const [total, setTotal] = useState(0);\r\n const [precoItem, setPrecoItem] = useState(0);\r\n const [dateSincro, setDateSincro] = useState(0);\r\n const [openDrawerPedido, setOpenDrawerPedido] = useState(false);\r\n const history = useHistory();\r\n\r\n useEffect(() => {\r\n initDatabase();\r\n loadShoppingCartItems(setCarrinhoItens);\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n loadShoppingCartItems(setCarrinhoItens);\r\n updateTotal();\r\n }, [atualizarCarrinho]);\r\n\r\n useEffect(() => {\r\n getDateSincro(setDateSincro);\r\n if (dateSincro) {\r\n var date = new Date();\r\n date = date.getTime();\r\n\r\n var eq = date - dateSincro;\r\n if (eq >= 86400000) {\r\n\r\n buscarPreco();\r\n }\r\n }\r\n updateTotal();\r\n }, [carrinhoItens])\r\n\r\n const deleteItem = useCallback((codigoPeca) => {\r\n deleteCartItem(codigoPeca);\r\n // setValorFinalPorItem(prevState => {\r\n // const novoEstado = { ...prevState };\r\n // delete novoEstado[codigoPeca];\r\n // return novoEstado;\r\n // });\r\n setAtualizarCarrinho(prevState => !prevState);\r\n }, []);\r\n\r\n const deleteAllItems = useCallback(() => {\r\n clearShoppingCart();\r\n clearDateSincro();\r\n setAtualizarCarrinho(prevState => !prevState)\r\n })\r\n\r\n const editItemQuantity = useCallback((codigoPeca, qtd, more) => {\r\n editCartItemQuantity(codigoPeca, more ? qtd + 1 : qtd - 1);\r\n // buscarDados(codigoPeca, more ? qtd + 1 : qtd - 1);\r\n setAtualizarCarrinho(prevState => !prevState);\r\n }, []);\r\n\r\n const buscarPreco = () => {\r\n var enviarPedido = ConcatPedido(carrinhoItens);\r\n api.post('Cat007/AtualizarCarrinho', enviarPedido)\r\n .then(\r\n res => {\r\n var precoFinal = res.data.map(x => x.precoFinal);\r\n setPrecoItem(precoFinal);\r\n }\r\n )\r\n .catch(\r\n console.error(\"Erro na busca pelo preco dos itens.\")\r\n )\r\n }\r\n\r\n const updateTotal = () => {\r\n const newTotal = carrinhoItens.reduce((acc, item) => {\r\n return acc + item.valor * item.Qtd;\r\n }, 0);\r\n setTotal(newTotal.toFixed(2));\r\n };\r\n\r\n const ConcatPedido = (Itens) => {\r\n var client = getClienteCat();\r\n var itemsCart = Itens.map(x => x.codigo)\r\n var object = {\r\n CodigoCliente: client,\r\n Itens: itemsCart\r\n }\r\n return object;\r\n }\r\n\r\n const concluirPedido = () => {\r\n try{\r\n buscarPreco(carrinhoItens);\r\n }\r\n catch{\r\n console.error()\r\n }\r\n finally {\r\n setOpenDrawerPedido(true);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n

Orçamento

\r\n
\r\n {carrinhoItens.map(item => (\r\n
\r\n
{item.codigo}
\r\n
\r\n {item.descricao}\r\n
\r\n \r\n
\r\n

{(item.valor * item.Qtd).toFixed(2)}

\r\n
\r\n \r\n
\r\n ))}\r\n {carrinhoItens.length < 1 &&\r\n \r\n Vazio :/\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n

Faturamento Total

\r\n
\r\n

R$

\r\n {total}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n","import React, { useEffect } from 'react';\r\nimport { Route, Switch, HashRouter } from \"react-router-dom\";\r\nimport { Layout, Modal } from 'antd';\r\nimport { HeaderPage, MenuPage } from '../../components';\r\nimport InicialCatalogo from '../InicialCatalogo';\r\nimport CatPecasExterno from '../catPecasExterno';\r\nimport CatalogosExterno from '../catalogosExterno';\r\nimport CatAcessosExterno from '../catAcessosExterno';\r\nimport UsuarioCatalogo from '../usuarioCatalogo';\r\nimport apiWeb from '../../services/apiWeb';\r\nimport { parametrosEmpresaActions, tributacaoActions } from '../../actions';\r\nimport { useStateValue } from '../../state';\r\nimport { getEmpresa, setNavegacao, setPermissoes } from '../../services/auth';\r\nimport CarrinhoCatalogo from '../CarrinhoCatalogo';\r\nimport CadastroCatalogo from '../cadastroCatalogo';\r\nimport { CotacaoCatalogo } from '..';\r\n\r\n\r\nexport default function HomeCatalogo() {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n empresaUsuario();\r\n buscarParametros();\r\n resetarNav();\r\n buscarPermissoesUsuario();\r\n }, []);\r\n\r\n function empresaUsuario() {\r\n apiWeb.get('/Empresa/Buscar/' + parseInt(getEmpresa())).then(\r\n res => {\r\n if (res.status === 200) {\r\n dispatch({\r\n type: tributacaoActions.CHANGE,\r\n data: { empRegimeTributario: res.data.emp_regimetributario, empEnquadramentoFiscal: res.data.emp_enquadramentofiscal }\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.error(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarParametros() {\r\n apiWeb.get('/ParametroEmpresa/BuscarParametros').then(\r\n res => {\r\n if (res.status === 200) {\r\n dispatch({ type: parametrosEmpresaActions.CHANGE, data: { markupProduto: res.data.par_markupproduto, par_diastoleranciacobrancajuro: res.data.par_diastoleranciacobrancajuro, par_percjuromesparcelavencida: res.data.par_percjuromesparcelavencida, par_multaparcelavencida: res.data.par_multaparcelavencida, par_tipocalculomulta: res.data.par_tipocalculomulta } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.error(erro);\r\n }\r\n );\r\n };\r\n\r\n function resetarNav() {\r\n if (!!!localStorage.getItem(\"@GestorWeb-Navegacao\")) {\r\n setNavegacao({ geral: {} });\r\n }\r\n };\r\n\r\n\r\n function buscarPermissoesUsuario() {\r\n apiWeb.get(`PermissaoUsuario/Listar`).then(\r\n (res) => {\r\n setPermissoes(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n if (erro.response.status === 426) {\r\n Modal.warn({\r\n title: erro.response.data,\r\n });\r\n window.location = '/Home#/semAcesso'\r\n } else {\r\n console.log(erro);\r\n }\r\n }\r\n );\r\n };\r\n\r\n return (\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
);\r\n}","\r\nimport React, { useState } from 'react';\r\nimport { ConfigProvider } from 'antd';\r\nimport { BrowserRouter as Router, Switch, Route, Redirect } from \"react-router-dom\";\r\nimport Circle from '@uiw/react-color-circle';\r\nimport ptBR from 'antd/lib/locale/pt_BR';\r\nimport 'moment/locale/pt-br';\r\nimport moment from 'moment';\r\n\r\nimport \"./App.less\";\r\nimport { StateProvider } from './state';\r\nimport { reducer } from './state/reducer';\r\nimport { isAuthenticated } from './services/auth';\r\nimport { Login, AtivarNovoEmail, Home, RecuperarSenha, RecuperarSenhaGerencial, AtivarConta, AnaliseInadimplenciaCliente, NovaEmpresa, AtivarUsuarioPlano, RenovarPlano, Testes, LoginCatalogo } from \"./pages\";\r\nimport HomeCatalogo from './pages/homeCatalogo';\r\n\r\nconst PrivateRoute = ({ component: Component, ...rest }) => (\r\n \r\n isAuthenticated() ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n />\r\n);\r\n\r\nfunction App() {\r\n\r\n moment.locale('pt-br');\r\n\r\n const initialState = {\r\n userConfig: { size: 'small' },\r\n ui: { showDrawer: false, showDrawerExtra: false },\r\n manutencao: { dados: null },\r\n listaSelectPaginacao: { itens: [] },\r\n listaTabelaDados: { itens: [] },\r\n listagem: { filtro: '', ordem: '', outrosFiltros: '' },\r\n tributacao: { empRegimeTributario: null, empEnquadramentoFiscal: null },\r\n parametrosEmpresa: { markupProduto: null, par_percjuromesparcelavencida: '', par_multaparcelavencida: '', par_diastoleranciacobrancajuro: '', par_tipocalculomulta: '',par_acaoparcelavencida: '' , par_diastolparcelavencida: '' }\r\n };\r\n\r\n const FormSizeDemo = () => {\r\n\r\n const [componentSize, setComponentSize] = useState('small');\r\n\r\n const [color, setColor] = useState({\r\n primaryColor: '#0053a6',\r\n });\r\n\r\n function onColorChange(nextColor) {\r\n const mergedNextColor = {\r\n ...color,\r\n ...nextColor,\r\n };\r\n setColor(mergedNextColor);\r\n ConfigProvider.config({\r\n theme: mergedNextColor,\r\n });\r\n\r\n }\r\n\r\n return (\r\n \r\n {\r\n onColorChange({\r\n primaryColor: hex,\r\n });\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n\r\n}\r\n\r\nexport default App;","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker === null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType !== null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.less';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","import api from \"./api\";\r\n\r\nexport async function ServidorImpressoraOnline() {\r\n let req;\r\n try {\r\n req = await api.get(`http://localhost:3001/online`);\r\n } catch {\r\n req = { data: { online: false } };\r\n }\r\n return req.data;\r\n}\r\n\r\nexport async function impressorasInstaladas() {\r\n let req;\r\n try {\r\n req = await api.get(`http://localhost:3001/impressao/printers`);\r\n } catch {\r\n req = { data: null };\r\n }\r\n return req.data;\r\n}\r\n\r\nexport async function carregarConfiguracoes() {\r\n let req;\r\n try {\r\n req = await api.get(`http://localhost:3001/configuracao`);\r\n } catch {\r\n req = { data: null };\r\n }\r\n return req.data;\r\n}\r\n\r\nexport async function impressoraEtiqueta() {\r\n let req = await api.get(`http://localhost:3001/configuracao/ImpressoraEtiqueta`);\r\n return req.data;\r\n}\r\n\r\nexport async function impressoraNaoFiscal() {\r\n let req = await api.get(`http://localhost:3001/configuracao/ImpressoraNaoFiscal`);\r\n return req.data;\r\n}\r\n\r\nexport async function modeloEtiqueta() {\r\n let req = await api.get(`http://localhost:3001/configuracao/ModeloEtiqueta`);\r\n return req.data;\r\n}\r\n\r\nexport async function configurarImpressoraEtiqueta(impressoraEtiqueta) {\r\n let impressora = {\r\n impressora: impressoraEtiqueta\r\n };\r\n let req = await api.post(`http://localhost:3001/configuracao/ImpressoraEtiqueta`, JSON.stringify(impressora), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\nexport async function configurarModeloEtiqueta(etiqueta) {\r\n let dados = {\r\n modeloEtiqueta: etiqueta\r\n };\r\n let req = await api.post(`http://localhost:3001/configuracao/ModeloEtiqueta`, JSON.stringify(dados), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\nexport async function salvarConfiguracoes(configuracoes) {\r\n let req = await api.post(`http://localhost:3001/configuracao/ModeloEtiqueta`, JSON.stringify(configuracoes), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\nexport async function imprimirRawBase64(nomeImpressora, conteudo) {\r\n let dados = {\r\n impressora: nomeImpressora,\r\n texto: btoa(conteudo)\r\n };\r\n\r\n let urlImpressao = 'http://localhost:3001/naofiscal/imprimirRAWB64';\r\n if (nomeImpressora.toLowerCase().includes('dymo')) urlImpressao = 'http://localhost:3001/naofiscal/imprimeEtiquetaDymo';\r\n\r\n let req = await api.post(urlImpressao, JSON.stringify(dados), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\nexport async function imprimirEtiquetaDymo(nomeImpressora, conteudo) {\r\n let dados = {\r\n impressora: nomeImpressora,\r\n texto: btoa(unescape(encodeURIComponent(conteudo)))\r\n };\r\n\r\n let req = await api.post(`http://localhost:3001/naofiscal/imprimeEtiquetaDymo`, JSON.stringify(dados), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\nexport async function enviaComandoImpressoraNaoFiscal(nomeImpressora, comando, dados) {\r\n let dadosEnviar = {\r\n impressora: nomeImpressora\r\n };\r\n\r\n if (!!dados) {\r\n dadosEnviar = { ...dadosEnviar, ...dados };\r\n }\r\n\r\n let req = await api.post(`http://localhost:3001/naofiscal/${comando}`, JSON.stringify(dadosEnviar), { headers: { 'Content-type': 'application/json;charset=utf-8' } });\r\n return req.data;\r\n}\r\n\r\n","export function initDatabase() {\r\n\r\n var request = indexedDB.open(\"CarrinhoDB\", 1);\r\n\r\n request.onupgradeneeded = function (event) {\r\n var db = event.target.result;\r\n\r\n // Cria uma object store\r\n var objectStore = db.createObjectStore(\"Carrinho\", { keyPath: \"codigo\" });\r\n var objectStoreSincro = db.createObjectStore(\"Sincronizador\", { keyPath: \"id\", autoIncrement: true });\r\n\r\n // Cria índices para pesquisa rápidaz\r\n objectStore.createIndex(\"descricao\", \"descricao\", { unique: false });\r\n objectStore.createIndex(\"quantidade\", \"quantidade\", { unique: false });\r\n objectStore.createIndex(\"valor\", \"valor\", { unique: false });\r\n objectStoreSincro.createIndex(\"data\", \"data\", { unique: false });\r\n\r\n };\r\n // Tratamento de erros\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n };\r\n}\r\n\r\nexport function dateSincro() {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Sincronizador\"], \"readwrite\");\r\n var objectStore = transaction.objectStore(\"Sincronizador\");\r\n var date = new Date();\r\n date = date.getTime();\r\n var newItem = { data: (date - 86400000) };\r\n\r\n var addRequest = objectStore.add(newItem);\r\n addRequest.onsuccess = function (event) {\r\n console.log(\"Sincronizador Atualizado\");\r\n };\r\n\r\n addRequest.onerror = function (event) {\r\n console.error(\"Erro ao atualizar Sincronizador\");\r\n };\r\n }\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao atualizar Sincronizador\");\r\n }\r\n}\r\n\r\nexport function getDateSincro(setDateSincro) {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n try {\r\n\r\n var transaction = db.transaction([\"Sincronizador\"], \"readonly\");\r\n var objectStore = transaction.objectStore(\"Sincronizador\");\r\n\r\n var cursorRequest = objectStore.openCursor();\r\n\r\n var date = 0;\r\n\r\n cursorRequest.onsuccess = function (event) {\r\n var cursor = event.target.result;\r\n\r\n if (cursor) {\r\n date = cursor.value.data;\r\n cursor.continue();\r\n } else {\r\n setDateSincro(date);\r\n }\r\n }\r\n cursorRequest.onerror = function (event) {\r\n console.error(\"Erro getDateSincro: \", event)\r\n }\r\n } catch (ex) {\r\n var a = ex;\r\n //cai aqui teu erro kadu\r\n }\r\n\r\n }\r\n}\r\n\r\nexport function clearDateSincro(){\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n var transaction = db.transaction([\"Sincronizador\"], \"readwrite\");\r\n var objectStore = transaction.objectStore(\"Sincronizador\");\r\n\r\n var clearRequest = objectStore.clear();\r\n\r\n clearRequest.onsuccess = function (event) {\r\n console.log(\"Sincronizador limpo com sucesso!\");\r\n }\r\n\r\n clearRequest.onerror = function(event) {\r\n console.log(\"Erro ao limpar sincronizador: \", event.target.errorCode);\r\n }\r\n }\r\n request.onerror = function(event) {\r\n console.error(\"Erro ao abrir o banco de dados: \", event.target.errorCode);\r\n }\r\n}\r\nexport function loadShoppingCartItems(setCarrinhoItens, callback) {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Carrinho\"], \"readonly\");\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var cursorRequest = objectStore.openCursor();\r\n\r\n var items = [];\r\n\r\n cursorRequest.onsuccess = function (event) {\r\n var cursor = event.target.result;\r\n\r\n if (cursor) {\r\n items.push(cursor.value);\r\n cursor.continue();\r\n } else {\r\n setCarrinhoItens(items);\r\n if (!!callback) {\r\n callback(items);\r\n }\r\n }\r\n\r\n };\r\n cursorRequest.onerror = function (event) {\r\n console.error(\"Erro ao carregar itens do carrinho:\", event.target.errorCode);\r\n };\r\n\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n };\r\n}\r\n\r\nexport function saveShoppingCart(codigoPeca, descricaoPeca, quantidade, valorPeca) {\r\n return new Promise((resolve, reject) => {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Carrinho\"], \"readwrite\");\r\n\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var newItem = { codigo: codigoPeca, descricao: descricaoPeca, Qtd: quantidade, valor: valorPeca };\r\n var addRequest = objectStore.add(newItem);\r\n\r\n addRequest.onsuccess = function (event) {\r\n console.log(\"Item adicionado ao carrinho com sucesso!\");\r\n dateSincro();\r\n resolve();\r\n };\r\n\r\n addRequest.onerror = function (event) {\r\n console.error(\"Erro ao adicionar item ao carrinho:\", event.target.errorCode);\r\n reject(event.target.errorCode);\r\n };\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n reject(event.target.errorCode);\r\n };\r\n })\r\n}\r\n\r\nexport function editCartItemQuantity(codigoPeca, novaQuantidade) {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Carrinho\"], \"readwrite\");\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var getRequest = objectStore.get(codigoPeca);\r\n\r\n getRequest.onsuccess = function (event) {\r\n\r\n var itemExistente = event.target.result;\r\n\r\n if (itemExistente) {\r\n if (novaQuantidade >= 1 && novaQuantidade <= 120) {\r\n itemExistente.Qtd = novaQuantidade;\r\n\r\n var putRequest = objectStore.put(itemExistente);\r\n\r\n putRequest.onsuccess = function (event) {\r\n console.log(\"Quantidade do item editada no carrinho com sucesso!\");\r\n };\r\n\r\n putRequest.onerror = function (event) {\r\n console.error(\"Erro ao editar quantidade do item no carrinho:\", event.target.errorCode);\r\n };\r\n } else {\r\n console.error(\"Quantidade não autorizada\");\r\n }\r\n } else {\r\n console.error(\"Item não encontrado no carrinho.\");\r\n }\r\n };\r\n\r\n getRequest.onerror = function (event) {\r\n console.error(\"Erro ao obter item do carrinho:\", event.target.errorCode);\r\n };\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n };\r\n}\r\n\r\nexport function deleteCartItem(codigoPeca) {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Carrinho\"], \"readwrite\");\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var deleteRequest = objectStore.delete(codigoPeca);\r\n\r\n deleteRequest.onsuccess = function (event) {\r\n console.log(\"Item excluído do carrinho com sucesso!\");\r\n };\r\n\r\n deleteRequest.onerror = function (event) {\r\n console.error(\"Erro ao excluir item do carrinho:\", event.target.errorCode);\r\n };\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n };\r\n}\r\n\r\nexport function clearShoppingCart() {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n var transaction = db.transaction([\"Carrinho\"], \"readwrite\");\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var clearRequest = objectStore.clear();\r\n\r\n clearRequest.onsuccess = function (event) {\r\n console.log(\"Carrinho limpo com sucesso!\");\r\n };\r\n\r\n clearRequest.onerror = function (event) {\r\n console.error(\"Erro ao limpar o carrinho:\", event.target.errorCode);\r\n };\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n };\r\n}\r\n\r\nexport function countItemsInCart() {\r\n return new Promise((resolve, reject) => {\r\n var request = indexedDB.open(\"CarrinhoDB\");\r\n\r\n request.onsuccess = function (event) {\r\n var db = event.target.result;\r\n\r\n var transaction = db.transaction([\"Carrinho\"], \"readonly\");\r\n var objectStore = transaction.objectStore(\"Carrinho\");\r\n\r\n var countRequest = objectStore.count();\r\n\r\n countRequest.onsuccess = function (event) {\r\n console.log(\"Contador: \", countRequest.result)\r\n resolve(countRequest.result);\r\n };\r\n\r\n countRequest.onerror = function (event) {\r\n console.error(\"Erro ao contar registros no carrinho:\", event.target.errorCode);\r\n reject(event.target.errorCode);\r\n };\r\n };\r\n\r\n request.onerror = function (event) {\r\n console.error(\"Erro ao abrir o banco de dados:\", event.target.errorCode);\r\n reject(event.target.errorCode);\r\n };\r\n });\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n initDatabase();\r\n});\r\n\r\n\r\n","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Drawer } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport ManutencaoVendedor from '../../pages/vendedor/manutencao';\r\n\r\nexport default function DrawerVendedores({ form, exibirDrawerVendedores, fecharDrawerVendedores }) {\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [pagina, setPagina] = useState(1);\r\n\r\n return (\r\n {\r\n form.resetFields();\r\n setPagina(1);\r\n fecharDrawerVendedores();\r\n }}\r\n onOk={() => form.submit()}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n );\r\n};","import React, {createContext, useContext, useReducer} from 'react';\r\nexport const StateContext = createContext();\r\nexport const StateProvider = ({reducer, initialState, children}) =>(\r\n \r\n {children}\r\n \r\n);\r\nexport const useStateValue = () => useContext(StateContext);","export default __webpack_public_path__ + \"static/media/i-endereco.c9dff16a.png\";","import axios from 'axios';\r\n\r\nconst apiPayer = axios.create({\r\n baseURL: 'http://localhost:6060/',\r\n});\r\n\r\napiPayer.interceptors.request.use(async config => {\r\n return config;\r\n});\r\n\r\napiPayer.interceptors.response.use(function (response) {\r\n return response;\r\n }, function (error) {\r\n if (error.response) { \r\n console.log(error)\r\n }\r\n return Promise.reject(error);\r\n });\r\n\r\nexport default apiPayer;","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Table, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, ArrowUpOutlined, ArrowDownOutlined } from \"@ant-design/icons\";\r\n\r\nimport { FiltroProdutoNfi } from \"../../components\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabItens({ form, dadosItens, dadosEndereco, dadosOperacao, dadosContribuinte, dadosVendedor, carregarPagina }) {\r\n\r\n const [quantidadeItens, setQuantidadeItens] = useState(0);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n\r\n useEffect(() => {\r\n if (dadosItens.dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n setQuantidadeItens(dadosItens.dadosItens.length);\r\n dadosItens.dadosItens.forEach((item) => {\r\n total += parseFloat(item.total);\r\n totalSt += parseFloat(item.nfi_valoricmsst);\r\n });\r\n form.setFieldsValue({ valorTotalSt: totalSt });\r\n setValorTotal(total);\r\n } else {\r\n setQuantidadeItens(0);\r\n setValorTotal(0);\r\n }\r\n }, [dadosItens.dadosItens]);\r\n\r\n function editarItemNota(registro) {\r\n console.log(\"Clicou no Editar:\", registro);\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n };\r\n\r\n function removerItemNota(record, indice) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover o item da nota?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let dadosTemp = [...dadosItens.dadosItens];\r\n if (record.nfi_numeroitem) {\r\n let dadosRet = dadosTemp.filter((item) => item.nfi_numeroitem !== record.nfi_numeroitem);\r\n dadosItens.setDadosItens(dadosRet);\r\n } else if (record.pdi_numeroitem) {\r\n let dadosRet = dadosTemp.filter((item) => item.pdi_numeroitem !== record.pdi_numeroitem);\r\n dadosItens.setDadosItens(dadosRet);\r\n }\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {!!dadosItens.dadosItens && dadosItens.dadosItens.length > 0 &&\r\n (\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {nfi_ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n align: 'center',\r\n width: '3%',\r\n fixed: 'left',\r\n render: ({ nfi_cfop }) => (\r\n
\r\n {nfi_cfop}\r\n
\r\n ),\r\n },\r\n {\r\n title: `${dadosContribuinte.emp_regimetributario === 1 ? 'CSOSN' : 'CST'}`,\r\n align: 'center',\r\n width: '4%',\r\n fixed: 'left',\r\n render: ({ cst_id, cso_id }) => (\r\n
\r\n
\r\n {dadosContribuinte.emp_regimetributario === 1 ? cso_id : cst_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: '4%',\r\n align: 'right',\r\n fixed: 'left',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n {FormatNumber(nfi_qtde, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: '5%',\r\n fixed: 'left',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ percdesc }) => (\r\n
\r\n {percdesc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ percacresc }) => (\r\n
\r\n {percacresc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Frete',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ nfi_valorfrete }) => (\r\n
\r\n {FormatNumber(nfi_valorfrete, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMS?.ret_baseIcms, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: '% Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMS?.ret_aliquotaIcms, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMS?.ret_valorIcms, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMSST?.ret_baseIcmsSt, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: '% ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMSST?.ret_aliquotaIcmsSt, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos }) => (\r\n
\r\n {FormatNumber(impostos?.retornoICMSST?.ret_valorIcmsSt, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: '6%',\r\n fixed: 'right',\r\n render: ({ total }) => (\r\n
\r\n {FormatNumber(total, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'right',\r\n render: (record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade Itens:\r\n \r\n \r\n {quantidadeItens}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Tabs, Radio, Select, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { TabVeiculo, TabVolumes, TabValores } from './index';\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { DataHora } from \"../../components\";\r\nimport moment from 'moment';\r\n\r\nexport default function TabTransporte({ form, veiculos, dadosTransp, dadosNfe }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [mostrarTransportador, setMostrarTransportador] = useState(true);\r\n const [listaTransportadores, setListaTransportadores] = useState([]);\r\n const [dadosVeiculos, setDadosVeiculos] = useState({});\r\n\r\n useEffect(() => {\r\n buscarTransportadores();\r\n if (dadosNfe) {\r\n if (dadosNfe.dadosNfeDevolucao) {\r\n form.setFieldsValue({\r\n ntf_modalidadefrete: dadosNfe.dadosNfeDevolucao.ntf_modalidadefrete\r\n })\r\n if (dadosNfe.dadosNfeDevolucao.ntf_modalidadefrete !== 9) {\r\n form.setFieldsValue({\r\n valorFrete: dadosNfe.dadosNfeDevolucao.valortotalfrete > 0 ? dadosNfe.dadosNfeDevolucao.valortotalfrete : 0,\r\n valorSeguro: dadosNfe.dadosNfeDevolucao.valortotalseguro > 0 ? dadosNfe.dadosNfeDevolucao.valortotalseguro : 0\r\n })\r\n setMostrarTransportador(true);\r\n }\r\n }\r\n }\r\n if (form.getFieldValue().ntf_modalidadefrete === 9) {\r\n setMostrarTransportador(false);\r\n setAbaSelecionada(\"2\");\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().trn_id) {\r\n buscarDadosTransp(form.getFieldValue().trn_id);\r\n }\r\n }, [listaTransportadores]);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().trv_id) {\r\n popularDadosVeiculo(form.getFieldValue().trv_id);\r\n }\r\n }, [veiculos.listaVeiculos]);\r\n\r\n function alterarFrete(event) {\r\n if (event.target.value === 9) {\r\n form.setFieldsValue({ trn_id: null });\r\n form.setFieldsValue({ trv_id: null });\r\n form.setFieldsValue({ valorFrete: null });\r\n form.setFieldsValue({ valorSeguro: null });\r\n form.setFieldsValue({ trv_placa: null });\r\n form.setFieldsValue({ trv_uf: null });\r\n form.setFieldsValue({ trv_rntc: null });\r\n form.setFieldsValue({ trv_modelo: null });\r\n form.setFieldsValue({ trv_marca: null });\r\n form.setFieldsValue({ trv_observacao: null });\r\n form.setFieldsValue({ nvl_qtdevolumes: null });\r\n form.setFieldsValue({ nvl_especievolume: null });\r\n form.setFieldsValue({ nvl_numeracaovolume: null });\r\n form.setFieldsValue({ nvl_marcavolume: null });\r\n form.setFieldsValue({ nvl_pesoliquido: null });\r\n form.setFieldsValue({ nvl_pesobruto: null });\r\n setDadosVeiculos({});\r\n setMostrarTransportador(false);\r\n setAbaSelecionada(\"2\");\r\n } else {\r\n setMostrarTransportador(true);\r\n setAbaSelecionada(\"1\");\r\n }\r\n };\r\n\r\n function buscarTransportadores() {\r\n api.get('Transportador/ListarTodos?filtro=').then(\r\n (res) => {\r\n setListaTransportadores(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function buscarDadosTransp(trn_id) {\r\n if (!!trn_id) {\r\n await api.get(`Transportador/BuscarTransportador/${trn_id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n dadosTransp.setDadosTransp(res.data);\r\n veiculos.setListaVeiculos(res.data.veiculos);\r\n }\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: 'Erro ao buscar dados do transportador!' });\r\n })\r\n }\r\n };\r\n\r\n function popularDadosVeiculo(trv_id) {\r\n let veiculo = veiculos.listaVeiculos.filter((veiculo) => (veiculo.trv_id === trv_id))[0];\r\n setDadosVeiculos(veiculo);\r\n };\r\n return (\r\n
\r\n \r\n
\r\n \r\n { alterarFrete(dados) }}>\r\n 0 - Contratação do Frete por conta do Remetente (CIF)\r\n 1 - Contratação do Frete por conta do Destinatário (FOB)\r\n 2 - Contratação do Frete por conta de Terceiros\r\n 3 - Transporte Próprio por conta do Remetente\r\n 4 - Transporte Próprio por conta do Destinatário\r\n 9 - Sem Frete\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {mostrarTransportador && \r\n \r\n \r\n buscarDadosTransp(dados)} conteudo={\r\n tp => ({tp.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, Input } from \"antd\";\r\n\r\nexport default function TabVeiculo({ form, dadosVeiculos }) {\r\n\r\n useEffect(() => {\r\n if (!!dadosVeiculos) {\r\n form.setFieldsValue({ trv_placa: dadosVeiculos.trv_placa });\r\n form.setFieldsValue({ trv_uf: dadosVeiculos.trv_uf });\r\n form.setFieldsValue({ trv_rntc: dadosVeiculos.trv_rntc });\r\n form.setFieldsValue({ trv_modelo: dadosVeiculos.trv_modelo });\r\n form.setFieldsValue({ trv_marca: dadosVeiculos.trv_marca });\r\n form.setFieldsValue({ trv_observacao: dadosVeiculos.trv_observacao });\r\n }\r\n }, [dadosVeiculos]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Veículo\" Veículo\r\n \r\n Informe abaixo os dados do Veículo utilizado para o transporte. \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, InputNumber, Input } from \"antd\";\r\nimport { InputPreco } from \"../../components\";\r\n\r\nexport default function TabVolumes() {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Volumes Volumes Transportados\r\n \r\n Informe os volumes transportados. \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Typography, Row, Col, Divider } from \"antd\";\r\n\r\nimport { InputPreco } from \"../../components\";\r\n\r\nexport default function TabValores({ form, mostrarTransportador }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Valores\" Valores\r\n \r\n Informe os valores do transporte. \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { Modal, notification, Row } from \"antd\";\r\nimport { func } from \"prop-types\";\r\nimport { getEmpresa, getIdUsuario, getLocal, getToken, linkApi } from \"./auth\";\r\nimport moment from 'moment';\r\nimport api from \"./api\";\r\nimport axios from 'axios';\r\n\r\nexport const calculaDigitoVerificadorEAN = (numeroEan) => {\r\n var multiplicador = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3];\r\n var somaEAN = 0;\r\n var divisao = 0;\r\n var divisaoArredondada = 0;\r\n var resultado = 0;\r\n var digitoVerificador;\r\n var Ean = numeroEan.toString();\r\n for (var i = 0; i < 12; i++) {\r\n somaEAN += Ean[i] * multiplicador[i];\r\n };\r\n\r\n divisao = somaEAN / 10;\r\n divisaoArredondada = Math.floor(divisao) + 1;\r\n resultado = divisaoArredondada * 10;\r\n digitoVerificador = resultado - somaEAN;\r\n if (digitoVerificador > 9) {\r\n digitoVerificador = 0;\r\n }\r\n return digitoVerificador;\r\n};\r\n\r\nexport const validaForm = (formulario, listaValidacoes) => {\r\n let retorno = false;\r\n if (!!formulario && !!listaValidacoes) {\r\n let formObj = formulario.getFieldValue();\r\n let msgRetorno = [];\r\n listaValidacoes.forEach((validacao) => {\r\n const valorCampo = formObj[validacao.nome];\r\n\r\n // Verifica se o campo é obrigatório e está vazio, contém apenas espaços ou é inválido\r\n if (\r\n validacao.obrigatorio &&\r\n (\r\n valorCampo === undefined || \r\n valorCampo === null || \r\n (typeof valorCampo === 'string' && valorCampo.trim() === '') ||\r\n (typeof valorCampo === 'number' && isNaN(valorCampo))\r\n )\r\n ) {\r\n msgRetorno.push('O campo ' + validacao.label + ' é obrigatório!');\r\n }\r\n });\r\n\r\n if (msgRetorno.length > 0) {\r\n msgRetorno.forEach((msg) =>\r\n notification.warning({ message: 'Aviso', description: msg })\r\n );\r\n } else {\r\n retorno = true;\r\n }\r\n }\r\n return retorno;\r\n};\r\n\r\n\r\n\r\nexport const encodeBase64 = (data) => {\r\n return Buffer.from(data).toString('base64');\r\n}\r\n\r\nexport const decodeBase64 = (data, type = 'ascii') => {\r\n return Buffer.from(data, 'base64').toString(type);;\r\n}\r\n\r\nexport const parseToken = (token) => {\r\n var base64Url = token.split('.')[1];\r\n var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\r\n var jsonPayload = decodeURIComponent(decodeBase64(base64).split('').map(function (c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n }).join(''));\r\n\r\n return JSON.parse(jsonPayload);\r\n};\r\n\r\nexport function diferencaDatas(dataInicial, dataFinal = new Date()) {\r\n var d1 = new Date(dataInicial).getTime();\r\n var d2 = new Date(dataFinal).getTime();\r\n var df = Math.abs(d1 - d2);\r\n return Math.round(df / (24 * 60 * 60 * 1000));\r\n};\r\n\r\nexport function compararDatas(dataInicial, dataFinal, operacao = '>=') {\r\n dataFinal = (!!dataFinal) ? dataFinal : new Date();\r\n dataInicial = new Date(dataInicial);\r\n dataFinal = new Date(dataFinal);\r\n dataInicial.setHours(0, 0, 0, 0);\r\n dataFinal.setHours(0, 0, 0, 0);\r\n dataInicial = dataInicial.getTime();\r\n dataFinal = dataFinal.getTime();\r\n let validacao = false;\r\n switch (operacao) {\r\n case '=':\r\n validacao = dataInicial === dataFinal;\r\n break;\r\n case '>':\r\n validacao = dataInicial > dataFinal;\r\n break;\r\n case '<':\r\n validacao = dataInicial < dataFinal;\r\n break;\r\n case '>=':\r\n validacao = dataInicial >= dataFinal;\r\n break;\r\n case '<=':\r\n validacao = dataInicial <= dataFinal;\r\n break;\r\n }\r\n\r\n return validacao;\r\n};\r\nexport const isDate = (date) => {\r\n const _regExp = new RegExp('^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$');\r\n return _regExp.test(date);\r\n};\r\n\r\nexport function validarNumeros(valor) {\r\n let numero = 0;\r\n\r\n if (!!valor && !isNaN(parseFloat(valor))) {\r\n numero = parseFloat(valor);\r\n }\r\n return numero;\r\n};\r\n\r\nexport function validarDadosObj(dados) {\r\n let retorno = {};\r\n let valido = false;\r\n if (!!dados) {\r\n for (let key in dados) {\r\n if (!!dados[key]) {\r\n valido = true;\r\n }\r\n }\r\n if (valido) {\r\n retorno = dados;\r\n }\r\n }\r\n return retorno;\r\n};\r\n\r\nexport function validarCpf(cpf) {\r\n if (cpf !== '') {\r\n cpf = cpf.replace(/[^\\d]+/g, '');\r\n\r\n if (cpf.length !== 11 ||\r\n cpf === \"00000000000\" ||\r\n cpf === \"11111111111\" ||\r\n cpf === \"22222222222\" ||\r\n cpf === \"33333333333\" ||\r\n cpf === \"44444444444\" ||\r\n cpf === \"55555555555\" ||\r\n cpf === \"66666666666\" ||\r\n cpf === \"77777777777\" ||\r\n cpf === \"88888888888\" ||\r\n cpf === \"99999999999\") {\r\n return false;\r\n }\r\n\r\n let add = 0;\r\n let i;\r\n for (i = 0; i < 9; i++)\r\n add += parseInt(cpf.charAt(i)) * (10 - i);\r\n let rev = 11 - (add % 11);\r\n if (rev === 10 || rev === 11)\r\n rev = 0;\r\n if (rev !== parseInt(cpf.charAt(9))) {\r\n return false;\r\n }\r\n\r\n add = 0;\r\n for (i = 0; i < 10; i++)\r\n add += parseInt(cpf.charAt(i)) * (11 - i);\r\n rev = 11 - (add % 11);\r\n if (rev === 10 || rev === 11)\r\n rev = 0;\r\n if (rev !== parseInt(cpf.charAt(10))) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n};\r\n\r\nexport function validarCnpj(cnpj) {\r\n if (cnpj !== '') {\r\n cnpj = cnpj.replace(/[^\\d]+/g, '');\r\n\r\n if (cnpj.length !== 14) {\r\n return false;\r\n }\r\n\r\n // Elimina CNPJs invalidos conhecidos\r\n if (cnpj === \"00000000000000\" ||\r\n cnpj === \"11111111111111\" ||\r\n cnpj === \"22222222222222\" ||\r\n cnpj === \"33333333333333\" ||\r\n cnpj === \"44444444444444\" ||\r\n cnpj === \"55555555555555\" ||\r\n cnpj === \"66666666666666\" ||\r\n cnpj === \"77777777777777\" ||\r\n cnpj === \"88888888888888\" ||\r\n cnpj === \"99999999999999\") {\r\n return false;\r\n }\r\n\r\n // Valida DVs\r\n var tamanho = cnpj.length - 2\r\n var numeros = cnpj.substring(0, tamanho);\r\n var digitos = cnpj.substring(tamanho);\r\n var soma = 0;\r\n var pos = tamanho - 7;\r\n var i;\r\n for (i = tamanho; i >= 1; i--) {\r\n soma += numeros.charAt(tamanho - i) * pos--;\r\n if (pos < 2)\r\n pos = 9;\r\n }\r\n\r\n var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;\r\n if (resultado != digitos.charAt(0)) {\r\n return false;\r\n }\r\n\r\n tamanho = tamanho + 1;\r\n numeros = cnpj.substring(0, tamanho);\r\n soma = 0;\r\n pos = tamanho - 7;\r\n for (i = tamanho; i >= 1; i--) {\r\n soma += numeros.charAt(tamanho - i) * pos--;\r\n if (pos < 2)\r\n pos = 9;\r\n }\r\n\r\n resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;\r\n if (resultado != digitos.charAt(1)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n};\r\nexport function formatarCpfCnpj(cpfCnpj) {\r\n if (HasValue(cpfCnpj)) {\r\n cpfCnpj = cpfCnpj.replace(/[^\\d]+/g, '');\r\n\r\n if (cpfCnpj.length === 14)\r\n return formatarCnpj(cpfCnpj);\r\n\r\n return formatarCpf(cpfCnpj);\r\n }\r\n return '';\r\n};\r\nexport function formatarCpf(cpf) {\r\n let valor = '';\r\n if (!!cpf && cpf !== '') {\r\n valor = cpf.slice(0, 3) + '.' + cpf.slice(3, 6) + '.' + cpf.slice(6, 9) + '-' + cpf.slice(9, 11);\r\n }\r\n return valor;\r\n};\r\n\r\nexport function formatarCnpj(cnpj) {\r\n let valor = '';\r\n if (!!cnpj && cnpj != '') {\r\n if (cnpj.valor !== undefined) {\r\n valor = cnpj.valor.slice(0, 2) + '.' + cnpj.valor.slice(2, 5) + '.' + cnpj.valor.slice(5, 8) + '/' + cnpj.valor.slice(8, 12) + '-' + cnpj.valor.slice(12, 15);\r\n } else {\r\n valor = cnpj.slice(0, 2) + '.' + cnpj.slice(2, 5) + '.' + cnpj.slice(5, 8) + '/' + cnpj.slice(8, 12) + '-' + cnpj.slice(12, 15);\r\n }\r\n }\r\n return valor;\r\n};\r\n\r\nexport const getBase64 = file => {\r\n return new Promise(resolve => {\r\n let baseURL = \"\";\r\n let reader = new FileReader();\r\n\r\n reader.readAsDataURL(file);\r\n\r\n reader.onload = () => {\r\n baseURL = reader.result;\r\n resolve(baseURL);\r\n };\r\n });\r\n};\r\n\r\nexport function novaAbaNavegador(caminho) {\r\n return window.open(linkApi + caminho, '_blank');\r\n};\r\n\r\nexport const openPdfNewTab = async (_url) => {\r\n try {\r\n let token = getToken();\r\n const response = await axios.get(linkApi + _url, {\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n responseType: 'arraybuffer',\r\n });\r\n const blob = new Blob([response.data], { type: 'application/pdf' });\r\n const url = URL.createObjectURL(blob);\r\n window.open(url, '_blank');\r\n } catch (error) {\r\n console.error('Erro ao buscar o PDF:', error);\r\n }\r\n};\r\n\r\nexport function isObjetoDiffVazio(obj = {}) {\r\n let valido = false;\r\n\r\n if (typeof obj === 'object') {\r\n if (!!obj && JSON.stringify(obj) !== '{}') {\r\n valido = true;\r\n }\r\n }\r\n return valido;\r\n};\r\n\r\nexport function retornaValorPorExtenso(valor) {\r\n\r\n var ex = [\r\n [\"zero\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\", \"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezessete\", \"dezoito\", \"dezenove\"],\r\n [\"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\"],\r\n [\"cem\", \"cento\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\"],\r\n [\"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quadrilhão\", \"quintilhão\", \"sextilhão\", \"setilhão\", \"octilhão\", \"nonilhão\", \"decilhão\", \"undecilhão\", \"dodecilhão\", \"tredecilhão\", \"quatrodecilhão\", \"quindecilhão\", \"sedecilhão\", \"septendecilhão\", \"octencilhão\", \"nonencilhão\"]\r\n ];\r\n valor = valor.toString().replace('.', ',');\r\n var a, n, v, i, n = valor.toString().replace(valor ? /[^,\\d]/g : /\\D/g, \"\").split(\",\"), e = \" e \", $ = \"real\", d = \"centavo\", sl;\r\n for (var f = n.length - 1, l, j = -1, r = [], s = [], t = \"\"; ++j <= f; s = []) {\r\n j && (n[j] = ((\".\" + n[j]) * 1).toFixed(2).slice(2));\r\n if (!(a = (v = n[j]).slice((l = v.length) % 3).match(/\\d{3}/g), v = l % 3 ? [v.slice(0, l % 3)] : [], v = a ? v.concat(a) : v).length) continue;\r\n for (a = -1, l = v.length; ++a < l; t = \"\") {\r\n if (!(i = v[a] * 1)) continue;\r\n i % 100 < 20 && (t += ex[0][i % 100]) ||\r\n i % 100 + 1 && (t += ex[1][(i % 100 / 10 >> 0) - 1] + (i % 10 ? e + ex[0][i % 10] : \"\"));\r\n s.push((i < 100 ? t : !(i % 100) ? ex[2][i == 100 ? 0 : i / 100 >> 0] : (ex[2][i / 100 >> 0] + e + t)) +\r\n ((t = l - a - 2) > -1 ? \" \" + (i > 1 && t > 0 ? ex[3][t].replace(\"?o\", \"?es\") : ex[3][t]) : \"\"));\r\n }\r\n a = ((sl = s.length) > 1 ? (a = s.pop(), s.join(\" \") + e + a) : s.join(\"\") || ((!j && (n[j + 1] * 1 > 0) || r.length) ? \"\" : ex[0][0]));\r\n a && r.push(a + (valor ? (\" \" + (v.join(\"\") * 1 > 1 ? j ? d + \"s\" : (/0{6,}$/.test(n[0]) ? \"de \" : \"\") + $.replace(\"l\", \"is\") : j ? d : $)) : \"\"));\r\n }\r\n return r.join(e);\r\n};\r\n\r\nexport function info(mensagem, titulo = null) {\r\n Modal.info({\r\n title: (!!titulo ? titulo : 'Atenção!'),\r\n content: (\r\n
\r\n

\r\n {mensagem}\r\n

\r\n
\r\n ),\r\n });\r\n};\r\nexport function HasValue(value) {\r\n if (value === undefined || value === \"\" || value === null)\r\n return false\r\n return true\r\n};\r\nexport function substituirCaracterEspecial(str) {\r\n str = str.replace('ç', 'c');\r\n str = str.replace('Ç', 'C');\r\n str = str.replace('á', 'a');\r\n str = str.replace('Á', 'A');\r\n str = str.replace('À', 'A');\r\n str = str.replace('à', 'a');\r\n str = str.replace('É', 'E');\r\n str = str.replace('é', 'e');\r\n str = str.replace('ó', 'o');\r\n str = str.replace('Ó', 'o');\r\n str = str.replace('í', 'i');\r\n str = str.replace('Í', 'i');\r\n str = str.replace('ñ', 'n');\r\n str = str.replace('Ñ', 'n');\r\n str = str.replace('ã', 'a');\r\n str = str.replace('Ã', 'A');\r\n str = str.replace('õ', 'o');\r\n str = str.replace('Õ', 'O');\r\n str = str.replace('ú', 'u');\r\n str = str.replace('Ú', 'U');\r\n str = str.replace('â', 'a');\r\n str = str.replace('Â', 'A');\r\n str = str.replace('ê', 'e');\r\n str = str.replace('Ê', 'E');\r\n str = str.replace('ô', 'o');\r\n str = str.replace('Ô', 'O');\r\n return str;\r\n\r\n};\r\n\r\nexport function retornaObjeto(listaObj) {\r\n var objRetorno = {};\r\n for (var i = 0; i < listaObj.length; i++) {\r\n for (var attrname in listaObj[i]) {\r\n objRetorno[attrname] = listaObj[i][attrname];\r\n }\r\n }\r\n return objRetorno;\r\n}\r\n\r\nexport var delay = (function () {\r\n var timer = 0;\r\n return function (callback, ms) {\r\n clearTimeout(timer);\r\n timer = setTimeout(callback, ms);\r\n };\r\n})();\r\n\r\n\r\nexport function textoAleatorio(tamanho) {\r\n var aleatorio = '';\r\n if (!!tamanho) {\r\n var letras = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n for (var i = 0; i < tamanho; i++) {\r\n var rnum = Math.floor(Math.random() * letras.length);\r\n aleatorio += letras.substring(rnum, rnum + 1);\r\n }\r\n }\r\n return aleatorio;\r\n};\r\n\r\nexport async function consultaCNPJ(cnpj) {\r\n cnpj = cnpj.replace(/\\D/g, '');\r\n\r\n return jsonp(`https://www.receitaws.com.br/v1/cnpj/${encodeURI(cnpj)}`, 60000)\r\n .then((json) => {\r\n if (json['status'] === 'ERROR') {\r\n return Promise.reject(json['message']);\r\n } else {\r\n return Promise.resolve(json);\r\n }\r\n });\r\n};\r\n\r\nexport function jsonp(url, timeout) {\r\n const func = 'jsonp_' + Math.random().toString(36).substr(2, 5);\r\n\r\n return new Promise(function (resolve, reject) {\r\n let script = document.createElement('script');\r\n\r\n let timer = setTimeout(() => {\r\n reject('Tempo limite atingido');\r\n document.body.removeChild(script);\r\n }, timeout);\r\n\r\n window[func] = (json) => {\r\n clearTimeout(timer);\r\n resolve(json);\r\n document.body.removeChild(script);\r\n delete window[func];\r\n };\r\n script.src = url + '?callback=' + encodeURI(func);\r\n document.body.appendChild(script);\r\n });\r\n};\r\n\r\nexport const retornaSoNumeros = (valor) => {\r\n if(!HasValue(valor))\r\n return;\r\n return valor.replace(/\\D/g, \"\");\r\n};\r\n\r\nexport const retornaSoLetras = (valor) => {\r\n return valor.replace(/[^a-zA-Z]/g, '');\r\n};\r\n\r\nexport const retornaCep = async (cep) => {\r\n cep = retornaSoNumeros(cep);\r\n if (!cep) {\r\n return null;\r\n }\r\n\r\n if (cep.length === 8) {\r\n return await api.get(`Cidade/BuscaCidadeCep?cep=${cep}`).then(\r\n res => {\r\n if (res.status === 200 && res.data.length > 0) {\r\n return res.data[0];\r\n } else {\r\n // notification.warning({ message: 'Aviso!', description: 'Cep não encontrado' });\r\n return null;\r\n }\r\n }\r\n ).catch((error) => {\r\n if (!!error.response && !!error.response.data) {\r\n notification.error({ message: 'Aviso', description: error.response.data });\r\n }\r\n else {\r\n notification.warning({ message: 'Atenção!', description: 'Erro ao buscar o CEP' });\r\n }\r\n return null;\r\n })\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'Informe o Cep' })\r\n return null;\r\n }\r\n};\r\n\r\nexport const trataRetornoFormularioDinamico = (values, elemento) => {\r\n if (!!Date.parse(values[elemento.cap_nomeelemento]) && typeof values[elemento.cap_nomeelemento] === \"object\" && values[elemento.cap_nomeelemento].toString().length > 30) {\r\n values[elemento.cap_nomeelemento] = moment(values[elemento.cap_nomeelemento])\r\n } else if (typeof values[elemento.cap_nomeelemento] === \"object\") {\r\n values[elemento.cap_nomeelemento] = values[elemento.cap_nomeelemento]?.join(',')\r\n }\r\n return values;\r\n};\r\n\r\nexport const trataSetaDadosFormularioDinamico = (formulario, elemento, valor) => {\r\n switch (elemento.cap_tipoelemento) {\r\n case 'dataPicker':\r\n valor = moment(valor, \"YYYY/MM/DD\");\r\n break;\r\n case 'checkbox':\r\n valor = JSON.parse(valor);\r\n break;\r\n };\r\n formulario.setFieldsValue({ [elemento.cap_nomeelemento]: valor });\r\n return true;\r\n};\r\n\r\nexport const parseBool = valor => {\r\n switch (valor) {\r\n case true:\r\n case \"true\":\r\n case 1:\r\n case \"1\":\r\n case \"on\":\r\n case \"yes\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n};\r\n\r\nexport const arredonda = (valor, casasDec = 2, retorno) => {\r\n if (typeof valor === 'number') {\r\n valor = valor.toFixed(casasDec);\r\n } else if (typeof valor === 'string') {\r\n valor = parseFloat(valor).toFixed(casasDec);\r\n } else {\r\n console.log('Valor informado não identificado! Favor informar um valor valido (Number,String)');\r\n return '';\r\n }\r\n if (retorno === 'number') {\r\n valor = parseFloat(valor);\r\n }\r\n\r\n return valor;\r\n};\r\n\r\nexport const removerCarcaterEspecial = (valor) => {\r\n valor = valor?.replaceAll(/[^a-zA-Z 0-9]+/g, '');\r\n return valor;\r\n};\r\n\r\nexport const validarImportacao = (dados, entidade) => {\r\n if (dados.possuiErro) {\r\n Modal.error({\r\n title: `${entidade} não importado, favor verificar a planilha!`,\r\n content: (\r\n <>\r\n {!!dados.campo && Coluna: {dados.campo}.}\r\n Linha: {dados.linha}.\r\n {dados.mensagem}\r\n ),\r\n });\r\n } else {\r\n notification.success({ description: `${entidade} importado com sucesso!`, message: 'Aviso' });\r\n }\r\n\r\n};\r\n\r\nexport const imprimirRelatorioJasper = (idRelatorio, parametros = {}) => {\r\n api.get(`RelatorioJasper/BuscarRelatorio/${idRelatorio}`).then(\r\n res => {\r\n let dadosRel = res.data;\r\n let filtro = [];\r\n let params = [\r\n { \"nome\": \"empresaLogado\", \"valor\": getEmpresa() },\r\n { \"nome\": \"localLogado\", \"valor\": getLocal() },\r\n { \"nome\": \"usuarioLogado\", \"valor\": getIdUsuario() }\r\n ];\r\n dadosRel.relatorioParametro.forEach((param) => {\r\n if (!!!parametros[param.rpj_nomeelemento]) {\r\n if (!!param.rpj_obrigatorio) {\r\n notification.warn({ message: \"Parâmetro não preenchido!\", description: `O parâmetro ${param.rpj_label} não foi preenchido!` });\r\n return;\r\n }\r\n } else {\r\n params.push({ \"nome\": param.rpj_nomeelemento, \"valor\": parametros[param.rpj_nomeelemento] });\r\n filtro.push(`${param.rpj_label}: ${parametros[param.rpj_nomeelemento]}`);\r\n }\r\n });\r\n params.push({ \"nome\": \"filtros\", \"valor\": filtro.join(', ') });\r\n let dados = {};\r\n dados.pathRelatorio = dadosRel.rel_nomearquivo;\r\n dados.parametros = JSON.stringify(params).replaceAll(\"\\\"\", \"'\");\r\n dados.tipo = \"PDF\";\r\n dados.nomeRelatorio = dadosRel.rel_descricao;\r\n api.post(`RelatorioJasper/RetornaDadosRelatorios`, dados).then(\r\n res => {\r\n let byteCharacters = decodeBase64(res.data, 'latin1');\r\n let byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n let byteArray = new Uint8Array(byteNumbers);\r\n let file = new Blob([byteArray], { type: 'application/pdf;base64' });\r\n let fileURL = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro);\r\n }\r\n );\r\n }\r\n ).catch(\r\n erro =>\r\n console.error(erro)\r\n );\r\n};\r\n\r\nexport const isNotNullOrEmpty = (registro) => {\r\n let retorno = false;\r\n if (!!registro || registro === 0) {\r\n retorno = true;\r\n }\r\n return retorno;\r\n};\r\n\r\nexport function calculaValorProporcional(valorUnitario, valorRatear, valorTotal) {\r\n if (valorUnitario > 0 && valorRatear > 0 && valorTotal > 0) {\r\n return parseFloat(((valorUnitario * valorRatear) / valorTotal).toFixed(2));\r\n }\r\n return 0;\r\n};\r\n\r\nexport function validarEan(eanCodigo) {\r\n if (!!eanCodigo) {\r\n let fator = 3;\r\n let sum = 0;\r\n let cc = 0;\r\n let ca = 0;\r\n let numlen = eanCodigo.length;\r\n let index = 0;\r\n if (numlen == 13) {\r\n for (index = numlen; index > 0; --index) {\r\n if (index != 13) {\r\n sum = sum + eanCodigo.substring(index - 1, index) * fator;\r\n fator = 4 - fator;\r\n }\r\n }\r\n cc = ((1000 - sum) % 10);\r\n ca = eanCodigo.substring(12);\r\n if (cc == ca) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (numlen == 14) {\r\n for (index = eanCodigo.length; index > 0; --index) {\r\n if (index != 14) {\r\n sum = sum + eanCodigo.substring(index - 1, index) * fator;\r\n fator = 4 - fator;\r\n }\r\n }\r\n cc = ((1000 - sum) % 10);\r\n ca = eanCodigo.substring(13);\r\n if (cc == ca) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (numlen == 8) {\r\n for (index = eanCodigo.length; index > 0; --index) {\r\n if (index != 8) {\r\n sum = sum + eanCodigo.substring(index - 1, index) * fator;\r\n fator = 4 - fator;\r\n }\r\n }\r\n cc = ((1000 - sum) % 10);\r\n ca = eanCodigo.substring(7);\r\n if (cc == ca) {\r\n return true\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (((numlen != 8) && (numlen != 13) && (numlen != 14) && (numlen != 0))) {\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n\r\n\r\n};\r\n\r\n// ajustar tamanho e resolução de imagem base64, base64 string da imagem, width e height é a resolução da imagem, e por fim o tamanho maximo da imagem.\r\nexport async function ajustarTamanhoImagemBase64(base64String, maxWidth, maxHeight, maxSizeInBytes) {\r\n const img = new Image();\r\n img.src = base64String;\r\n await new Promise((resolve, reject) => {\r\n img.onload = () => {\r\n let width = img.width;\r\n let height = img.height;\r\n if (width > height) {\r\n if (width > maxWidth) {\r\n height *= maxWidth / width;\r\n width = maxWidth;\r\n }\r\n } else {\r\n if (height > maxHeight) {\r\n width *= maxHeight / height;\r\n height = maxHeight;\r\n }\r\n }\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 1200;\r\n canvas.height = 1200;\r\n const ctx = canvas.getContext('2d');\r\n ctx.drawImage(img, 1200, 1200, width, height);\r\n canvas.toBlob((blob) => {\r\n resolve(blob);\r\n }, 'image/jpeg', 1); // Qualidade da compressão (0.8 neste exemplo)\r\n };\r\n img.onerror = reject;\r\n });\r\n // Verifica o tamanho do blob\r\n const blob = await fetch(base64String).then((res) => res.blob());\r\n if (blob.size <= maxSizeInBytes) {\r\n return base64String; // Retorna se o tamanho já está dentro do limite\r\n }\r\n // Se o tamanho ainda for maior que o limite, reduz a qualidade da imagem\r\n const newQuality = 0.8; // Reduz a qualidade para alcançar o tamanho desejado\r\n //const newQuality = 0.6; // Reduz a qualidade para alcançar o tamanho desejado\r\n const compressedBase64 = await new Promise((resolve) => {\r\n const canvas = document.createElement('canvas');\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n const ctx = canvas.getContext('2d');\r\n ctx.drawImage(img, 1200, 1200);\r\n canvas.toBlob((blob) => resolve(URL.createObjectURL(blob)), 'image/jpeg', newQuality);\r\n });\r\n return compressedBase64;\r\n}\r\n\r\n// Função para redimensionar e limitar o tamanho de uma imagem base64 em MB\r\nexport function resizeImageToMB(base64String, maxSizeInMB, maxWidth, maxHeight) {\r\n return new Promise((resolve, reject) => {\r\n const maxFileSize = maxSizeInMB * 1024 * 1024; // Tamanho máximo em bytes\r\n const imageQuality = 0.9; // Qualidade da imagem após compressão (0.7 é um valor de exemplo)\r\n let img = new Image();\r\n img.src = base64String;\r\n img.onload = function () {\r\n let canvas = document.createElement('canvas');\r\n let ctx = canvas.getContext('2d');\r\n const width = maxWidth;\r\n const height = maxHeight;\r\n canvas.width = width;\r\n canvas.height = height;\r\n ctx.drawImage(img, 0, 0, width, height);\r\n let compressedBase64 = canvas.toDataURL('image/jpeg', imageQuality);\r\n const base64FileSize = (compressedBase64.length * 0.75); // Calcula o tamanho em bytes\r\n if (base64FileSize > maxFileSize) {\r\n const scaleRatio = Math.sqrt(maxFileSize / base64FileSize);\r\n const scaledWidth = width * scaleRatio;\r\n const scaledHeight = height * scaleRatio;\r\n canvas.width = scaledWidth;\r\n canvas.height = scaledHeight;\r\n ctx.drawImage(img, 0, 0, scaledWidth, scaledHeight);\r\n compressedBase64 = canvas.toDataURL('image/jpeg', imageQuality);\r\n }\r\n resolve(compressedBase64); // Retorna a imagem redimensionada e limitada em MB como base64\r\n };\r\n img.onerror = function (error) {\r\n reject(error);\r\n };\r\n });\r\n}\r\nexport function validarEmail(email) {\r\n let reg = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n return reg.test(email);\r\n};\r\nexport function validarTelefone(telefone) {\r\n const phoneRegex = /^[1-9]{2}9?[0-9]{8}$/; // Exemplo para validar números de telefone no Brasil\r\n return phoneRegex.test(telefone);\r\n};\r\nexport function exibirMensagemException(execao) {\r\n let msg = \"Houve um problema\";\r\n let titulo = \"Aviso\";\r\n if (!!execao) {\r\n if (!!execao.response.data) {\r\n msg = execao.response.data.detail;\r\n titulo = execao.response.data.title;\r\n }\r\n }\r\n notification.warn({ message: titulo, description: msg });\r\n}\r\n\r\nexport const arredondar = (numero, casasDecimais = 2, limiteArredondamento = 5) => {\r\n const fator = Math.pow(10, casasDecimais);\r\n const valorArredondado = Math.round(numero * fator) / fator;\r\n const proximaCasaDecimal = Math.round((numero * fator * 10) % 10);\r\n\r\n // Verifica se a próxima casa decimal é maior que o limite\r\n if (proximaCasaDecimal >= limiteArredondamento) {\r\n // Se for maior, arredonda para cima\r\n return Math.ceil(numero * fator) / fator;\r\n } else {\r\n // Se for menor ou igual, arredonda para baixo\r\n return Math.floor(numero * fator) / fator;\r\n }\r\n};","export default __webpack_public_path__ + \"static/media/i-financeiro.04bd26bb.png\";","import { retornaSoLetras, retornaSoNumeros } from \"./funcoes\";\r\n\r\nexport const validarIE = (numeroInscricaoEstadual, ufEstado) => {\r\n let retornaIEValido = false;\r\n if(numeroInscricaoEstadual.toUpperCase() == \"ISENTO\"){\r\n return true;\r\n }\r\n if (!!numeroInscricaoEstadual && !!ufEstado) {\r\n switch (ufEstado) {\r\n case \"RS\":\r\n retornaIEValido = (ValidarInscricaoEstadualRS(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"SC\":\r\n retornaIEValido = (ValidarInscricaoEstadualSC(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"PR\":\r\n retornaIEValido = (ValidarInscricaoEstadualPR(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"SP\":\r\n retornaIEValido = (ValidarInscricaoEstadualSP(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"MG\":\r\n retornaIEValido = (ValidarInscricaoEstadualMG(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"RJ\":\r\n retornaIEValido = (ValidarInscricaoEstadualRJ(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"ES\":\r\n retornaIEValido = (ValidarInscricaoEstadualES(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"BA\":\r\n retornaIEValido = (ValidarInscricaoEstadualBA(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"SE\":\r\n retornaIEValido = (ValidarInscricaoEstadualSE(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"AL\":\r\n retornaIEValido = (ValidarInscricaoEstadualAL(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"PE\":\r\n retornaIEValido = (ValidarInscricaoEstadualPE(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"PB\":\r\n retornaIEValido = (ValidarInscricaoEstadualPB(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"RN\":\r\n retornaIEValido = (ValidarInscricaoEstadualRN(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"PI\":\r\n retornaIEValido = (ValidarInscricaoEstadualPI(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"MA\":\r\n retornaIEValido = (ValidarInscricaoEstadualMA(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"CE\":\r\n retornaIEValido = (ValidarInscricaoEstadualCE(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"GO\":\r\n retornaIEValido = (ValidarInscricaoEstadualGO(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"TO\":\r\n retornaIEValido = (ValidarInscricaoEstadualTO(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"MT\":\r\n retornaIEValido = (ValidarInscricaoEstadualMT(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"MS\":\r\n retornaIEValido = (ValidarInscricaoEstadualMS(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"DF\":\r\n retornaIEValido = (ValidarInscricaoEstadualDF(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"AM\":\r\n retornaIEValido = (ValidarInscricaoEstadualAM(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"AC\":\r\n retornaIEValido = (ValidarInscricaoEstadualAC(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"PA\":\r\n retornaIEValido = (ValidarInscricaoEstadualPA(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"RO\":\r\n retornaIEValido = (ValidarInscricaoEstadualRO(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"RR\":\r\n retornaIEValido = (ValidarInscricaoEstadualRR(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n case \"AP\":\r\n retornaIEValido = (ValidarInscricaoEstadualAP(numeroInscricaoEstadual)) ? true : false;\r\n return retornaIEValido;\r\n default:\r\n }\r\n } else {\r\n return true;\r\n }\r\n}\r\n\r\n\r\nexport const ValidarInscricaoEstadualRS = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n\r\n let pesosMultiplicador = [2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 10) {\r\n return false;\r\n }\r\n\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 9);\r\n let somaIE = 0;\r\n for (let i = 0; i < 9; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualSC = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n\r\n let resto = somaIE % 11;\r\n\r\n let digitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualPR = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 10) {\r\n return false;\r\n }\r\n let pesosMultiplicadorPrimeiro = [3, 2, 7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorSegundo = [4, 3, 2, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let resto = somaIE % 11;\r\n let primeiroDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n somaIE = 0;\r\n resto = 0;\r\n let inscricaoEstadualComPrimeiroDigitoVerificador = inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador;\r\n for (let i = 0; i < 9; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n resto = somaIE % 11;\r\n let segundoDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador + \"\" + segundoDigitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualSP = (numeroInscricao) => {\r\n let nNumero = numeroInscricao.substr(0, 1);\r\n let numeroInscricao_ = numeroInscricao;\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n\r\n if (numeroInscricao.length !== 12) {\r\n return false;\r\n }\r\n\r\n if (nNumero == \"P\") {\r\n\r\n let pesosMultiplicador = [1, 3, 4, 5, 6, 7, 8, 10];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto > 9) ? 0 : resto;\r\n\r\n return numeroInscricao_ == (\"P\" + inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador + \"\" + numeroInscricao.substr(9, 3)) ? true : false;\r\n } else {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n let pesosMultiplicadorPrimeiro = [1, 3, 4, 5, 6, 7, 8, 10];\r\n let pesosMultiplicadorSegundo = [3, 2, 10, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < inscricaoEstadualSemDigitoVerificador.length; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n\r\n let resto = somaIE % 11;\r\n let primeiroDigitoVerificador = (resto > 9) ? 0 : resto;\r\n let inscricaoEstadualComPrimeiroDigitoVerificador = inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador + \"\" + numeroInscricao.substr(9, 2);\r\n somaIE = 0;\r\n resto = 0;\r\n for (let i = 0; i < 11; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n\r\n resto = somaIE % 11;\r\n let segundoDigitoVerificador = (resto > 9) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador + \"\" + numeroInscricao.substr(9, 2) + \"\" + segundoDigitoVerificador)) ? true : false;\r\n }\r\n};\r\n\r\nexport const ValidarInscricaoEstadualMG = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length > 13 && numeroInscricao.length < 11) {\r\n return false;\r\n }\r\n\r\n numeroInscricao = numeroInscricao.padStart(13, '0');\r\n let pesosMultiplicadorPrimeiro = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2];\r\n let pesosMultiplicadorSegundo = [3, 2, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 3) + \"0\" + numeroInscricao.substr(3, 8);\r\n let somaIE = 0;\r\n let listaDigitosValorMultiplicacao = [];\r\n for (let i = 0; i < 12; i++) {\r\n let valorMultiplicacao = inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n listaDigitosValorMultiplicacao.push(valorMultiplicacao);\r\n }\r\n for (let x = 0; x < listaDigitosValorMultiplicacao.length; x++) {\r\n let numero = listaDigitosValorMultiplicacao[x].toString();\r\n if (numero.length > 1) {\r\n let valor1 = numero.substr(0, 1);\r\n let valor2 = numero.substr(1, 1);\r\n numero = parseInt(valor1) + parseInt(valor2);\r\n }\r\n somaIE += parseInt(numero);\r\n }\r\n let primeiraDezenaExata = 0;\r\n\r\n if (somaIE % 10 != 0) {\r\n let somaIEString = somaIE.toString();\r\n primeiraDezenaExata = somaIEString.substr(0, 1);\r\n primeiraDezenaExata = parseInt(primeiraDezenaExata) + 1;\r\n primeiraDezenaExata = primeiraDezenaExata.toString() + 0;\r\n primeiraDezenaExata = parseInt(primeiraDezenaExata);\r\n } else {\r\n primeiraDezenaExata = somaIE;\r\n }\r\n\r\n primeiraDezenaExata = (somaIE < 10) ? 10 : primeiraDezenaExata;\r\n\r\n let primeiroDigitoVerificador = primeiraDezenaExata - somaIE;\r\n\r\n somaIE = 0;\r\n let inscricaoEstadualComPrimeiroDigitoVerificador = numeroInscricao.substr(0, 11) + \"\" + primeiroDigitoVerificador;\r\n for (let i = 0; i < 12; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n let segundoDigitoVerificador = resto;\r\n\r\n return (numeroInscricao == (numeroInscricao.substr(0, 11) + \"\" + primeiroDigitoVerificador + \"\" + segundoDigitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualRJ = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 8) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [2, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 7);\r\n let somaIE = 0;\r\n for (let i = 0; i < 7; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (resto <= 1) ? 0 : (11 - resto);\r\n let digitoVerificador = resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualES = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (resto <= 1) ? 0 : (11 - resto);\r\n let digitoVerificador = resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualBA = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n\r\n if (numeroInscricao.length !== 8 && numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n\r\n if (numeroInscricao.length == 8) {\r\n\r\n let pesosMultiplicadorPrimeiro = [7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorSegundo = [8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 6);\r\n let somaIE = 0;\r\n for (let i = 0; i < 6; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let primeiroDigitoVerificador = 0;\r\n let resto = 0;\r\n if (numeroInscricao.substr(0, 1) == \"6\" || numeroInscricao.substr(0, 1) == \"7\" || numeroInscricao.substr(0, 1) == \"9\") {\r\n resto = somaIE % 11;\r\n resto = (11 - resto);\r\n primeiroDigitoVerificador = (resto == 0 || resto == 1) ? 0 : resto;\r\n } else {\r\n resto = somaIE % 10;\r\n resto = (10 - resto);\r\n primeiroDigitoVerificador = (resto == 0) ? 0 : resto;\r\n }\r\n\r\n let inscricaoEstadualComPrimeiroDigitoVerificador = inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador;\r\n somaIE = 0;\r\n resto = 0;\r\n for (let i = 0; i < 7; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n let segundoDigitoVerificador = 0;\r\n if (numeroInscricao.substr(0, 1) == \"6\" || numeroInscricao.substr(0, 1) == \"7\" || numeroInscricao.substr(0, 1) == \"9\") {\r\n resto = somaIE % 11;\r\n segundoDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n } else {\r\n resto = somaIE % 10;\r\n segundoDigitoVerificador = (resto == 0) ? 0 : (10 - resto);\r\n }\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + segundoDigitoVerificador + \"\" + primeiroDigitoVerificador)) ? true : false;\r\n } else {\r\n let pesosMultiplicadorSegundo = [8, 7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorPrimeiro = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 7);\r\n let somaIE = 0;\r\n for (let i = 0; i < 7; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n let segundoDigitoVerificador = 0;\r\n let resto = 0;\r\n if (numeroInscricao.substr(1, 1) == \"6\" || numeroInscricao.substr(1, 1) == \"7\" || numeroInscricao.substr(1, 1) == \"9\") {\r\n resto = somaIE % 11;\r\n segundoDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n } else {\r\n resto = somaIE % 10;\r\n segundoDigitoVerificador = (resto == 0) ? 0 : (10 - resto);\r\n }\r\n\r\n let inscricaoEstadualComSegundoDigitoVerificador = inscricaoEstadualSemDigitoVerificador + \"\" + segundoDigitoVerificador;\r\n somaIE = 0;\r\n resto = 0;\r\n for (let i = 0; i <= 7; i++) {\r\n somaIE += inscricaoEstadualComSegundoDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let primeiroDigitoVerificador = 0;\r\n if (numeroInscricao.substr(1, 1) == \"6\" || numeroInscricao.substr(1, 1) == \"7\" || numeroInscricao.substr(1, 1) == \"9\") {\r\n resto = somaIE % 11;\r\n primeiroDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n }\r\n else {\r\n resto = somaIE % 10;\r\n primeiroDigitoVerificador = (resto == 0) ? 0 : (10 - resto);\r\n }\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador + \"\" + segundoDigitoVerificador)) ? true : false;\r\n\r\n }\r\n};\r\n\r\nexport const ValidarInscricaoEstadualSE = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualAL = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualPE = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9 && numeroInscricao.length !== 14) {\r\n return false;\r\n }\r\n\r\n if (numeroInscricao.length == 9) {\r\n let pesosMultiplicadorPrimeiro = [8, 7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorSegundo = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 7);\r\n let somaIE = 0;\r\n for (let i = 0; i < 7; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let resto = somaIE % 11;\r\n let primeiroDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n let inscricaoEstadualComPrimeiroDigitoVerificador = inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador;\r\n somaIE = 0;\r\n resto = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigitoVerificador[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n resto = somaIE % 11;\r\n let segundoDigitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador + \"\" + segundoDigitoVerificador)) ? true : false;\r\n } else {\r\n\r\n let pesosMultiplicadorPrimeiro = [5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 13);\r\n let somaIE = 0;\r\n for (let i = 0; i < 13; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let primeiroDigitoVerificador = (resto > 9) ? (10 - resto) : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador)) ? true : false;\r\n }\r\n};\r\n\r\nexport const ValidarInscricaoEstadualPB = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualRN = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9 && numeroInscricao.length !== 10) {\r\n return false;\r\n }\r\n\r\n if (numeroInscricao.length == 9) {\r\n\r\n let pesosMultiplicadorPrimeiro = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let resto = (somaIE * 10) % 11;\r\n let primeiroDigitoVerificador = (resto == 10) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador)) ? true : false;\r\n } else {\r\n let pesosMultiplicadorPrimeiro = [10, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 9);\r\n let somaIE = 0;\r\n for (let i = 0; i < 9; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n let resto = (somaIE * 10) % 11;\r\n let primeiroDigitoVerificador = (resto == 10) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + primeiroDigitoVerificador)) ? true : false;\r\n }\r\n};\r\n\r\nexport const ValidarInscricaoEstadualPI = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualMA = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto == 0 || resto == 1) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualCE = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualGO = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = 0;\r\n if (inscricaoEstadualSemDigitoVerificador == \"11094402\" && (resto == 0 || resto == 1)) {\r\n digitoVerificador = parseInt(numeroInscricao.substr(8, 1));\r\n } else if (resto == 0) {\r\n digitoVerificador = 0;\r\n } else if (resto == 1 && (parseInt(inscricaoEstadualSemDigitoVerificador) >= 10103105 && parseInt(inscricaoEstadualSemDigitoVerificador) <= 10119997)) {\r\n digitoVerificador = 1;\r\n } else if (resto == 1 && (parseInt(inscricaoEstadualSemDigitoVerificador) < 10103105 || parseInt(inscricaoEstadualSemDigitoVerificador) > 10119997)) {\r\n digitoVerificador = 0;\r\n } else {\r\n digitoVerificador = (11 - resto);\r\n }\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualTO = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 11 && numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador;\r\n if (numeroInscricao.length === 11) {\r\n inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 2) + \"\" + numeroInscricao.substr(4, 6);\r\n } else {\r\n inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n }\r\n\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto < 2) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (numeroInscricao.substr(0, (numeroInscricao.length - 1)) + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualMT = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length < 9) {\r\n return false;\r\n }\r\n\r\n while (numeroInscricao.length < 11) {\r\n numeroInscricao = \"0\" + numeroInscricao;\r\n }\r\n\r\n if (numeroInscricao.length !== 11) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 10);\r\n let somaIE = 0;\r\n for (let i = 0; i < 10; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto == 1 || resto == 0) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualMS = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto == 0) ? 0 : ((11 - resto) > 9) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualDF = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 13) {\r\n return false;\r\n }\r\n let pesosMultiplicadorPrimeiro = [4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorSegundo = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 11);\r\n let somaIE = 0;\r\n for (let i = 0; i < 11; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificadorPrimeiro = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n somaIE = 0;\r\n resto = 0;\r\n let inscricaoEstadualComPrimeiroDigito = inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificadorPrimeiro;\r\n\r\n for (let i = 0; i < 12; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigito[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificadorSegundo = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificadorPrimeiro + \"\" + digitoVerificadorSegundo)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualAM = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = (somaIE < 11) ? somaIE : somaIE % 11;\r\n let digitoVerificador = (resto <= 1) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualAC = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 13) {\r\n return false;\r\n }\r\n let pesosMultiplicadorPrimeiro = [4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let pesosMultiplicadorSegundo = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 11);\r\n let somaIE = 0;\r\n for (let i = 0; i < 11; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicadorPrimeiro[i];\r\n }\r\n\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificadorPrimeiro = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n somaIE = 0;\r\n resto = 0;\r\n let inscricaoEstadualComPrimeiroDigito = inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificadorPrimeiro;\r\n\r\n for (let i = 0; i < 12; i++) {\r\n somaIE += inscricaoEstadualComPrimeiroDigito[i] * pesosMultiplicadorSegundo[i];\r\n }\r\n resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificadorSegundo = (resto == 10 || resto == 11) ? 0 : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificadorPrimeiro + \"\" + digitoVerificadorSegundo)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualPA = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n let digitoVerificador = (resto == 1 || resto == 0) ? 0 : (11 - resto);\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualRO = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 14) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 13);\r\n let somaIE = 0;\r\n for (let i = 0; i < 13; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10 || resto == 11) ? (resto - 10) : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualRR = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [1, 2, 3, 4, 5, 6, 7, 8];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let resto = somaIE % 9;\r\n let digitoVerificador = resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};\r\n\r\nexport const ValidarInscricaoEstadualAP = (numeroInscricao) => {\r\n let apenasNumeros = (retornaSoLetras(numeroInscricao) == \"\") ? true : false;\r\n if (!apenasNumeros) {\r\n return false;\r\n }\r\n numeroInscricao = retornaSoNumeros(numeroInscricao);\r\n if (numeroInscricao.length !== 9) {\r\n return false;\r\n }\r\n let pesosMultiplicador = [9, 8, 7, 6, 5, 4, 3, 2];\r\n let inscricaoEstadualSemDigitoVerificador = numeroInscricao.substr(0, 8);\r\n let somaIE = 0;\r\n for (let i = 0; i < 8; i++) {\r\n somaIE += inscricaoEstadualSemDigitoVerificador[i] * pesosMultiplicador[i];\r\n }\r\n let valorAcrescentadoNaSoma;\r\n let digitoVerificadorPadrao;\r\n if (inscricaoEstadualSemDigitoVerificador >= '03000001' && inscricaoEstadualSemDigitoVerificador <= '03017000') {\r\n valorAcrescentadoNaSoma = 5;\r\n digitoVerificadorPadrao = 0;\r\n } else {\r\n if (inscricaoEstadualSemDigitoVerificador >= '03017001' && inscricaoEstadualSemDigitoVerificador <= '03019022') {\r\n valorAcrescentadoNaSoma = 9;\r\n digitoVerificadorPadrao = 1;\r\n } else {\r\n valorAcrescentadoNaSoma = 0;\r\n digitoVerificadorPadrao = 0;\r\n }\r\n }\r\n let resto = (valorAcrescentadoNaSoma + somaIE) % 11;\r\n resto = (11 - resto);\r\n let digitoVerificador = (resto == 10) ? 0 : (resto == 11) ? digitoVerificadorPadrao : resto;\r\n\r\n return (numeroInscricao == (inscricaoEstadualSemDigitoVerificador + \"\" + digitoVerificador)) ? true : false;\r\n};","export default __webpack_public_path__ + \"static/media/logoGestor.c5a22032.png\";","import React from 'react';\r\nimport { Select } from 'antd';\r\nimport SelectPaginacao from '../selectPaginacao';\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function SelectProduto(props) {\r\n\r\n\r\n return (\r\n { }}\r\n onBlurFunction={!!props.onBlur ? props.onBlur : () => { }}\r\n onSelectFunction={!!props.onSelect ? props.onSelect : () => { }}\r\n nameLabel={props.ordem}\r\n atualizaComponente={!!props.atualizaComponente ? props.atualizaComponente : false}\r\n allowClear={!!props.allowClear ? props.allowClear : false}\r\n disabled={!!props.disabled}\r\n placeholder={!!props.placeholder ? props.placeholder : \"Selecione um produto\"}\r\n filtroExtra={props.filtroExtra}\r\n filtroPesq={props.filtroPesq}\r\n setListaDados={!!props.setListaDados ? props.setListaDados : null}\r\n selecionarRegUnico={!!props.selecionarRegUnico ? props.selecionarRegUnico : null}\r\n registrosPorPagina={props.registrosPorPagina ?? 50}\r\n conteudo={(produto) => (\r\n \r\n \r\n {produto.pro_codigo} - {produto.pro_descricao}\r\n \r\n {props.exibirValor !== false && (\r\n <>\r\n \r\n Vlr. Unitário:\r\n \r\n \r\n {FormatNumber(produto.lpi_valorvenda, true)}\r\n \r\n \r\n )}\r\n
\r\n {[\r\n (!!props.detalhes &&
),\r\n (!!props.detalhes && !!produto.descricaograde && `Grade: ${produto.descricaograde}`),\r\n (!!props.detalhes && (!!produto.descricaograde) &&
),\r\n (!!props.detalhes && (!!produto.pro_ean || !!produto.prg_ean) && (\r\n <>\r\n EAN/GTIN: {produto.pro_ean || produto.prg_ean}\r\n \r\n )),\r\n (!!props.detalhes && ((!!produto.pro_ean || !!produto.prg_ean) && !!produto.pro_codigoetiqueta) && (\r\n <>\r\n Cód.Etiqueta: {produto.pro_codigoetiqueta}\r\n \r\n )),\r\n ].filter(Boolean)}\r\n
\r\n
\r\n )}\r\n />\r\n )\r\n}\r\n","export const TOKEN_KEY = \"@GestorWeb-Token\";\r\nexport const EMPRESA_KEY = \"@GestorWeb-Empresa\";\r\nexport const LOCAL_KEY = \"@GestorWeb-Local\";\r\nexport const NOMEEMPRESA_KEY = \"@GestorWeb-NomeEmpresa\";\r\nexport const NOMELOCAL_KEY = \"@GestorWeb-NomeLocal\";\r\nexport const REGIMETRIBUTARIO_KEY = \"@GestorWeb-RegimeTributario\";\r\nexport const NOMEUSUARIO_KEY = \"@GestorWeb-NomeUsuario\";\r\nexport const IDUSUARIO_KEY = \"@GestorWeb-IdUsuario\";\r\nexport const EMAILUSUARIO_KEY = \"@GestorWeb-EmailUsuario\";\r\nexport const TELA_KEY = \"@GestorWeb-Tela\";\r\nexport const NAVEGACAO_KEY = \"@GestorWeb-Navegacao\";\r\nexport const PERMISSOES_KEY = \"@GestorWeb-Permissoes\";\r\nexport const BREADCRUMB_KEY = \"@GestorWeb-Breadcrumb\";\r\nexport const FILTROSRELATORIO_KEY = \"@GestorWeb-FiltrosRelatorio\";\r\nexport const STATUSPLANO_KEY = \"@GestorWeb-StatusPlano\";\r\nexport const TELAANTERIRO_KEY = \"@GestorWeb-TelaAnterior\";\r\nexport const ENTIDADE_KEY = \"@GestorWeb-Entidade\";\r\nexport const STATUSFILIAL_KEY = \"@GestorWeb-StatusFilial\";\r\nexport const DADOS_INTEGRA_KEY = \"@GestorWeb-DadosIntegra\";\r\nexport const CNPJ_EMPRESA_KEY = \"@GestorWeb-CnpjEmpresa\";\r\nexport const DADOSUSUARIO_KEY = \"@GestorWeb-DadosUsuario\";\r\nexport const VALIDADECERTIFICADO_KEY = \"@GestorWeb-ValidadeCertificado\";\r\nexport const CLIENTECAT_KEY = \"@CatalogoWeb-Cliente\";\r\nexport const NOMECLIENTECAT_KEY = \"@CatalogoWeb-NomeCliente\";\r\nexport const linkApi = process.env.REACT_APP_PUBLIC_URL || (window.location.href.indexOf('localhost') > -1 ? 'https://localhost:7205/' : window.location.href.indexOf('hom') > -1 ? 'http://apihom.gestorweb.com.br/' : 'https://api.gestorweb.com.br/');\r\nexport const linkApiGestor = window.location.href.indexOf('localhost') > -1 ? \"https://localhost:7298/\" : window.location.href.indexOf('hom') > -1 ? \"https://apihomgestor.gestorweb.com.br/\" : \"https://apicatalogo.gestorweb.com.br/\";\r\nexport const isAuthenticated = () => localStorage.getItem(TOKEN_KEY) !== null;\r\nexport const getToken = () => localStorage.getItem(TOKEN_KEY);\r\nexport const getEmpresa = () => localStorage.getItem(EMPRESA_KEY);\r\nexport const getCnpjEmpresa = () => localStorage.getItem(CNPJ_EMPRESA_KEY);\r\nexport const getLocal = () => localStorage.getItem(LOCAL_KEY);\r\nexport const getNomeEmpresa = () => localStorage.getItem(NOMEEMPRESA_KEY);\r\nexport const getNomeLocal = () => localStorage.getItem(NOMELOCAL_KEY);\r\nexport const getRegimeTributario = () => localStorage.getItem(REGIMETRIBUTARIO_KEY);\r\nexport const getNomeUsuario = () => localStorage.getItem(NOMEUSUARIO_KEY);\r\nexport const getIdUsuario = () => localStorage.getItem(IDUSUARIO_KEY);\r\nexport const getEmailUsuario = () => localStorage.getItem(EMAILUSUARIO_KEY);\r\nexport const getTela = () => localStorage.getItem(TELA_KEY);\r\nexport const getBreadcrumb = () => localStorage.getItem(BREADCRUMB_KEY);\r\nexport const getNavegacao = () => decodeURIComponent(localStorage.getItem(NAVEGACAO_KEY));\r\nexport const getPermissao = () => decodeURIComponent(localStorage.getItem(PERMISSOES_KEY));\r\nexport const getStatusPlano = () => localStorage.getItem(STATUSPLANO_KEY);\r\nexport const getStatusFilial = () => atob(localStorage.getItem(STATUSFILIAL_KEY)) === 'true';\r\nexport const getTelaAnterior = () => localStorage.getItem(TELAANTERIRO_KEY);\r\nexport const getEntidadeImp = () => localStorage.getItem(ENTIDADE_KEY);\r\nexport const getDadosIntegra = () => localStorage.getItem(DADOS_INTEGRA_KEY);\r\nexport const getDadosUsuario = () => { return JSON.parse(localStorage.getItem(DADOSUSUARIO_KEY)); }\r\nexport const getValidadeCertificado = () =>{ return JSON.parse(localStorage.getItem(VALIDADECERTIFICADO_KEY));}\r\nexport const getClienteCat = () => localStorage.getItem(CLIENTECAT_KEY);\r\nexport const getNomeClienteCat = () => localStorage.getItem(NOMECLIENTECAT_KEY) ?? \"\";\r\nexport const login = token => {\r\n localStorage.setItem(TOKEN_KEY, token);\r\n};\r\nexport const setEmpresa = empresa => {\r\n localStorage.setItem(EMPRESA_KEY, empresa);\r\n};\r\nexport const setLocal = local => {\r\n localStorage.setItem(LOCAL_KEY, local);\r\n};\r\nexport const removerLocal = () => {\r\n localStorage.removeItem(LOCAL_KEY);\r\n};\r\nexport const setNomeEmpresa = nomeEmpresa => {\r\n localStorage.setItem(NOMEEMPRESA_KEY, nomeEmpresa);\r\n};\r\nexport const setNomeLocal = nomeLocal => {\r\n localStorage.setItem(NOMELOCAL_KEY, nomeLocal);\r\n};\r\nexport const setRegimeTributario = regimeTributario => {\r\n localStorage.setItem(REGIMETRIBUTARIO_KEY, regimeTributario);\r\n};\r\nexport const setNomeUsuario = nomeUsuario => {\r\n localStorage.setItem(NOMEUSUARIO_KEY, nomeUsuario);\r\n};\r\nexport const setIdUsuario = idUsuario => {\r\n localStorage.setItem(IDUSUARIO_KEY, idUsuario);\r\n};\r\nexport const setEmailUsuario = emailUsuario => {\r\n localStorage.setItem(EMAILUSUARIO_KEY, emailUsuario);\r\n};\r\nexport const setTela = tela => {\r\n localStorage.setItem(TELA_KEY, tela);\r\n};\r\nexport const setNavegacao = nav => {\r\n localStorage.setItem(NAVEGACAO_KEY, encodeURIComponent(JSON.stringify(nav)));\r\n};\r\nexport const setPermissoes = perm => {\r\n localStorage.setItem(PERMISSOES_KEY, encodeURIComponent(JSON.stringify(perm)));\r\n};\r\nexport const setStatusPlano = stp => {\r\n localStorage.setItem(STATUSPLANO_KEY, stp);\r\n};\r\nexport const setTelaAnterior = tela => {\r\n localStorage.setItem(TELAANTERIRO_KEY, tela);\r\n};\r\nexport const setEntidadeImp = entidade => {\r\n localStorage.setItem(ENTIDADE_KEY, entidade);\r\n};\r\nexport const removerTelaAnt = () => {\r\n localStorage.removeItem(TELAANTERIRO_KEY);\r\n}\r\nexport const setStatusFilial = ativo => {\r\n localStorage.setItem(STATUSFILIAL_KEY, btoa(ativo));\r\n};\r\nexport const setDadosIntegra = dados => {\r\n localStorage.setItem(DADOS_INTEGRA_KEY, dados);\r\n}\r\nexport const setCnpjEmpresa = cnpj => {\r\n localStorage.setItem(CNPJ_EMPRESA_KEY, cnpj);\r\n}\r\nexport const setDadosUsuario = dadosUser => {\r\n localStorage.setItem(DADOSUSUARIO_KEY, JSON.stringify(dadosUser));\r\n}\r\nexport const setValidadeCertificado = dados => {\r\n localStorage.setItem(VALIDADECERTIFICADO_KEY, JSON.stringify(dados));\r\n}\r\nexport const setClienteCatalogo = cli => {\r\n localStorage.setItem(CLIENTECAT_KEY, cli);\r\n};\r\nexport const setNomeClienteCatalogo = cli => {\r\n localStorage.setItem(NOMECLIENTECAT_KEY, cli);\r\n};\r\nexport const logout = () => {\r\n localStorage.removeItem(TOKEN_KEY);\r\n localStorage.removeItem(EMPRESA_KEY);\r\n localStorage.removeItem(CNPJ_EMPRESA_KEY);\r\n localStorage.removeItem(LOCAL_KEY);\r\n localStorage.removeItem(NOMEEMPRESA_KEY);\r\n localStorage.removeItem(NOMELOCAL_KEY);\r\n localStorage.removeItem(REGIMETRIBUTARIO_KEY);\r\n localStorage.removeItem(NOMEUSUARIO_KEY);\r\n localStorage.removeItem(IDUSUARIO_KEY);\r\n localStorage.removeItem(EMAILUSUARIO_KEY);\r\n localStorage.removeItem(TELA_KEY);\r\n localStorage.removeItem(NAVEGACAO_KEY);\r\n localStorage.removeItem(PERMISSOES_KEY);\r\n localStorage.removeItem(BREADCRUMB_KEY);\r\n localStorage.removeItem(FILTROSRELATORIO_KEY);\r\n localStorage.removeItem(STATUSPLANO_KEY);\r\n localStorage.removeItem(TELAANTERIRO_KEY);\r\n localStorage.removeItem(ENTIDADE_KEY);\r\n localStorage.removeItem(STATUSFILIAL_KEY);\r\n localStorage.removeItem(DADOS_INTEGRA_KEY);\r\n localStorage.removeItem(VALIDADECERTIFICADO_KEY);\r\n if (window.location.pathname !== '/') window.location = '/';\r\n localStorage.removeItem(CLIENTECAT_KEY);\r\n localStorage.removeItem(NOMECLIENTECAT_KEY);\r\n if (window.location.pathname !== '/') {\r\n if (window.location.href.indexOf('catalogo') > -1 || window.location.href.indexOf(\"login-cliente\") > -1) {\r\n window.location = '/login-cliente';\r\n } else {\r\n window.location = '/';\r\n }\r\n }\r\n};\r\n\r\nexport const getUserInfo = () => {\r\n let token = localStorage.getItem(TOKEN_KEY);\r\n var base64Url = token.split('.')[1];\r\n var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\r\n var jsonPayload = decodeURIComponent(atob(base64).split('').map(function (c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n }).join(''));\r\n\r\n return JSON.parse(jsonPayload);\r\n}\r\n\r\nexport const removeDadosNota = () => {\r\n localStorage.removeItem(DADOS_INTEGRA_KEY);\r\n}\r\n\r\n","const FormaDePagamento = {\r\n fpDinheiro: 1,\r\n fpCheque: 2,\r\n fpCartaoCredito: 3,\r\n fpCartaoDebito: 4,\r\n fpCreditoLoja: 5,\r\n fpValeAlimentacao: 10,\r\n fpValeRefeicao: 11,\r\n fpValePresente: 12,\r\n fpValeCombustivel: 13,\r\n fpDuplicataMercantil: 14,\r\n fpBoletoBancario: 15,\r\n fpDepositoBancario: 16,\r\n fpPixDinamico: 17,\r\n fpTransferenciaBancaria: 18,\r\n fpProgramaFidelidade: 19,\r\n fpPixEstatico: 20,\r\n fpCreditoEmLoja: 21, \r\n fpFalhaDeHardware: 22,\r\n fpSemPagamento: 90,\r\n fpOutro: 99,\r\n}\r\n\r\nexport default FormaDePagamento;","export default __webpack_public_path__ + \"static/media/i-produto.4cf7c7e7.png\";","export default __webpack_public_path__ + \"static/media/i-grade.dd751ba6.png\";","import React, { useEffect } from 'react';\r\nimport { Select, Form } from \"antd\";\r\n\r\nexport default function ComboData({ form, eventoAoAlterar }) {\r\n const opcoes = [\r\n { label: 'Dia Atual', value: 0 },\r\n { label: 'Mês Atual', value: 1 },\r\n { label: 'Últimos 3 dias', value: 2 },\r\n { label: 'Últimos 7 dias', value: 3 },\r\n { label: 'Últimos 15 dias', value: 4 },\r\n { label: 'Últimos 30 dias', value: 5 },\r\n { label: 'Últimos 60 dias', value: 6 }\r\n ];\r\n\r\n class Data extends React.Component {\r\n onChange = e => {\r\n const value = e;\r\n let data = this.value;\r\n switch (value) {\r\n case 0:\r\n data = new Date();\r\n break;\r\n case 1:\r\n data = new Date(new Date().setDate(1));\r\n break;\r\n case 2:\r\n data = new Date(new Date().setDate((new Date().getDate() - 3)));\r\n break;\r\n case 3:\r\n data = new Date(new Date().setDate((new Date().getDate() - 7)));\r\n break;\r\n case 4:\r\n data = new Date(new Date().setDate((new Date().getDate() - 15)));\r\n break;\r\n case 5:\r\n data = new Date(new Date().setDate((new Date().getDate() - 30)));\r\n break;\r\n case 6:\r\n data = new Date(new Date().setDate((new Date().getDate() - 60)));\r\n break;\r\n }\r\n\r\n if (!!form) {\r\n form.setFieldsValue({ 'dataPesquisa': data });\r\n }\r\n if (!!eventoAoAlterar) {\r\n eventoAoAlterar();\r\n }\r\n this.props.onChange(value);\r\n }\r\n\r\n render() {\r\n const { value } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n class InputDemoDate extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: 0 };\r\n }\r\n onChange = value => {\r\n this.setState({ value });\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n }\r\n\r\n useEffect(() => {\r\n form.setFieldsValue({ 'dataPesquisa': new Date() });\r\n }, []);\r\n\r\n return (\r\n \r\n\r\n )\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Table, Tooltip, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, UndoOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { FiltroProdutoPdi, Tabela } from \"../../components\";\r\n\r\nexport default function TabItens({ formulario, dadosEndereco, dadosTabela, totalPedido, custo, dadosOperacao }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n const [quantidade, setQuantidade] = useState(0);\r\n const [mostrarFaturado, setMostrarFaturado] = useState(false);\r\n const [mostrarDevolvido, setMostrarDevolvido] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!totalPedido?.setTotalPedido) {\r\n let valorTotal = 0;\r\n let qtd = 0;\r\n let seqKey = 0;\r\n\r\n if (dadosTabela?.dadosItens) {\r\n dadosTabela.dadosItens.forEach((dado) => {\r\n valorTotal += dado.pdi_quantidade - dado.pdi_qtdedevolvido === 0 ? 0 : dado.valorItemDesconto || 0;\r\n qtd += dado.pdi_quantidade - dado.pdi_qtdedevolvido === 0 ? 0 : dado.pdi_quantidade || 0;\r\n dado.key = seqKey++;\r\n\r\n if (dado.pdi_qtdeentregue > 0) {\r\n setMostrarFaturado(true);\r\n }\r\n });\r\n }\r\n totalPedido.setTotalPedido(valorTotal);\r\n setQuantidade(qtd);\r\n } else {\r\n totalPedido.setTotalPedido(0);\r\n setQuantidade(0);\r\n }\r\n }, [dadosTabela.dadosItens]);\r\n\r\n useEffect(() => {\r\n const temDevolvido = dadosTabela?.dadosItens.some(item => item.pdi_qtdedevolvido > 0);\r\n setMostrarDevolvido(temDevolvido || false);\r\n }, [dadosTabela.dadosItens]);\r\n\r\n function editarProdutos(item) {\r\n setDadosEditando(item);\r\n setEditando(true);\r\n };\r\n\r\n function calcularTotais(itens) {\r\n return itens.reduce((acc, item) => {\r\n const quantidade = item.pdi_quantidade - (item.pdi_qtdedevolvido || 0);\r\n acc.qtd += quantidade;\r\n acc.valor += item.pdi_valorunitario * quantidade;\r\n return acc;\r\n }, { qtd: 0, valor: 0 })\r\n }\r\n\r\n function removerItem(item) {\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n\r\n if (!item.pdi_id) {\r\n dadosTemp = dadosTemp.filter((dados) => dados !== item);\r\n dadosTemp = dadosTemp\r\n .sort((a, b) => b.pdi_numeroitem - a.pdi_numeroitem)\r\n .map((dados, index) => ({\r\n ...dados,\r\n pdi_numeroitem: dadosTemp.length - index\r\n }));\r\n } else {\r\n let itemEncontrado = dadosTemp.find((i) => i.pdi_id === item.pdi_id);\r\n if (itemEncontrado) {\r\n itemEncontrado.pdi_qtdedevolvido = item.pdi_quantidade;\r\n setMostrarDevolvido(true);\r\n }\r\n }\r\n\r\n let { qtd, valor } = calcularTotais(dadosTemp);\r\n totalPedido.setTotalPedido(valor);\r\n setQuantidade(qtd);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n }\r\n\r\n function desfazerDevolucao(record) {\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n let itemEncontrado = dadosTemp.find((item) => item.pdi_id === record.pdi_id);\r\n\r\n if (itemEncontrado) {\r\n itemEncontrado.pdi_qtdedevolvido = 0;\r\n }\r\n\r\n dadosTabela.setDadosItens(dadosTemp);\r\n\r\n let { qtd, valor } = calcularTotais(dadosTemp); \r\n totalPedido.setTotalPedido(valor);\r\n setQuantidade(qtd);\r\n\r\n if (!dadosTemp.some((item) => item.pdi_qtdedevolvido > 0)) {\r\n setMostrarDevolvido(false);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n {!!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 &&\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pdi_qtdedevolvido === pdi_quantidade ? {pro_descricao} : {pro_descricao}}\r\n \r\n \r\n \r\n \r\n {pdi_qtdedevolvido == pdi_quantidade ?\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n :\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n \r\n }\r\n \r\n \r\n {pdi_qtdedevolvido == pdi_quantidade ?\r\n \r\n Grade: {descricaograde}\r\n :\r\n \r\n Grade: {descricaograde}\r\n \r\n }\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Faturado',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'left',\r\n hidden: !mostrarFaturado,\r\n render: ({ pdi_qtdeentregue }) => (\r\n
\r\n \r\n
\r\n {pdi_qtdeentregue > 1 ? {pdi_qtdeentregue} itens : pdi_qtdeentregue === 1 ? {pdi_qtdeentregue} item : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Devolvido',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'left',\r\n hidden: !mostrarDevolvido,\r\n render: ({ pdi_quantidade, pdi_qtdedevolvido, pdi_qtdeentregue }, record) => (\r\n
\r\n \r\n
\r\n {pdi_qtdedevolvido > 1 ? {pdi_qtdedevolvido} itens : pdi_qtdedevolvido === 1 ? {pdi_qtdedevolvido} item : 0}\r\n {pdi_qtdedevolvido > 0 &&\r\n \r\n \r\n // {dadosContribuinte.emp_regimetributario === 1 ? cso_id : cst_id}\r\n // \r\n // \r\n // ),\r\n // },\r\n {\r\n title: 'Qtde.',\r\n width: '4%',\r\n align: 'right',\r\n fixed: 'left',\r\n render: ({ pdi_quantidade, pdi_qtdedevolvido }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_quantidade, true)} : {FormatNumber(pdi_quantidade, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: '5%',\r\n fixed: 'left',\r\n render: ({ pdi_valorunitario, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_valorunitario, true)} : {FormatNumber(pdi_valorunitario, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desc.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ percdesc, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(percdesc, true)}% : {FormatNumber(percdesc, true)}%}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acres.',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ pdi_percacresc, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_percacresc, true)}% : {FormatNumber(pdi_percacresc, true)}%}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Frete',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ pdi_valorfrete, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ? {FormatNumber(pdi_valorfrete, true)} : {FormatNumber(pdi_valorfrete, true)}}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_baseIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_baseIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: '% Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_aliquotaIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_aliquotaIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMS?.ret_valorIcms, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMS?.ret_valorIcms, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Bc. ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST?.ret_baseIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_baseIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: '% ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST.ret_aliquotaIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_aliquotaIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr ST',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ impostos, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(impostos?.retornoICMSST.ret_aliquotaIcmsSt, true)}\r\n :\r\n {FormatNumber(impostos?.retornoICMSST?.ret_valorIcmsSt, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: '6%',\r\n fixed: 'right',\r\n render: ({ valorItemDesconto, pdi_qtdedevolvido, pdi_quantidade }) => (\r\n
\r\n {pdi_qtdedevolvido === pdi_quantidade ?\r\n {FormatNumber(valorItemDesconto, true)}\r\n :\r\n {FormatNumber(valorItemDesconto, true)}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '5%',\r\n fixed: 'right',\r\n render: ({ pdi_qtdedevolvido, pdi_quantidade }, record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade:\r\n \r\n \r\n {quantidade}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalPedido.totalPedido, true)}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Row, Col, Input, Select, Radio } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { Data, InputPreco, SelectIncluir } from '../../components';\r\nimport DrawerTransportadores from '../../components/drawerTransportadores';\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function TabTransporte({ form, dadosVeiculos, valorTotalPedido }) {\r\n\r\n const [dadosTransportador, setDadosTransportador] = useState([]);\r\n const [formTransp] = Form.useForm();\r\n const [mostrarModalTransp, setMostrarModalTransp] = useState(false);\r\n const [mostrarTransportador, setMostrarTransportador] = useState(true);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n if (!!form.getFieldValue().enderecoCliente) {\r\n form.setFieldsValue({ pee_id: form.getFieldValue().enderecoCliente });\r\n }\r\n if (!!form.getFieldValue().trn_id) {\r\n buscarVeiculos();\r\n }\r\n if (form.getFieldValue().ped_modalidadefrete === 9) {\r\n setMostrarTransportador(false);\r\n }\r\n form.setFieldsValue({ ped_dataprevisaoentrega: moment(new Date()) });\r\n //carregarListaTransp();\r\n };\r\n\r\n function buscarVeiculos() {\r\n if (!!form.getFieldValue().trn_id) {\r\n api.get(`VeiculoTransportador/ListarVeiculoTransportador?codigoTransportador=${form.getFieldValue().trn_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n dadosVeiculos.setDadosVeiculos(res.data.items);\r\n form.setFieldsValue({ trv_id: res.data.items[0].trv_id });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function retornaValorFrete() {\r\n let pdi_valorfrete = 0;\r\n let dados = [...dadosTransportador];\r\n let transportador = dados.filter((transp) => (transp.trn_id === form.getFieldValue().trn_id))[0];\r\n if (!!transportador) {\r\n if (!!transportador.trn_valorfretefixo && transportador.trn_valorfretefixo > 0) {\r\n pdi_valorfrete = transportador.trn_valorfretefixo;\r\n } else if (!!transportador.trn_percentualfrete && transportador.trn_percentualfrete > 0) {\r\n pdi_valorfrete = (valorTotalPedido * transportador.trn_percentualfrete) / 100;\r\n }\r\n }\r\n form.setFieldsValue({ pdi_valorfrete: pdi_valorfrete });\r\n };\r\n\r\n function abrirDrawerTransportador() {\r\n setMostrarModalTransp(true);\r\n };\r\n\r\n function fecharModalTransp() {\r\n //carregarListaTransp();\r\n setMostrarModalTransp(false);\r\n };\r\n\r\n function alterarFrete(event) {\r\n if (event.target.value === 9) {\r\n form.setFieldsValue({ trn_id: null });\r\n form.setFieldsValue({ trv_id: null });\r\n form.setFieldsValue({ pdi_valoroutrasdespesas: 0 });\r\n form.setFieldsValue({ pdi_valorfrete: 0 });\r\n setMostrarTransportador(false);\r\n } else {\r\n setMostrarTransportador(true);\r\n }\r\n };\r\n\r\n function carregarListaTransp(callback) {\r\n api.get(`Transportador/ListarTransportador`).then(\r\n (res) => {\r\n let seq = 0;\r\n res.data.forEach((transp) => {\r\n transp.key = seq++;\r\n });\r\n setDadosTransportador(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n if (!!callback) {\r\n callback();\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n { alterarFrete(dados) }}>\r\n 0 - Contratação do Frete por conta do Remetente (CIF)\r\n 1 - Contratação do Frete por conta do Destinatário (FOB)\r\n 2 - Contratação do Frete por conta de Terceiros\r\n 3 - Transporte Próprio por conta do Remetente\r\n 4 - Transporte Próprio por conta do Destinatário\r\n 9 - Sem Frete\r\n \r\n \r\n \r\n \r\n {mostrarTransportador &&\r\n \r\n \r\n \r\n { buscarVeiculos(campo); retornaValorFrete(campo); }} name=\"trn_id\" conteudo={\r\n trn => ({trn.trn_id} - {trn.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, Select, Button, InputNumber, Card, Table, notification, Input, Tag } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, FormOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { Data, InputPreco, SelectIncluir } from \"../../components\";\r\nimport DrawerVendedores from \"../../components/drawerVendedores\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { CheckOutlined, CloseOutlined } from \"@material-ui/icons\";\r\nimport FormaDePagamento from \"../../components/enuns/formaDePagamento\";\r\n\r\nexport default function TabFaturamento({ form, valorTotalPedido, listaFormaPagamento, setListaFormaPagamento, emiteTransferencia, dadosOrcamento }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [editarValores, setEditarValores] = useState(false);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [formaPagamento, setFormaPagamento] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [valorJaPago, setValorJaPago] = useState(false);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [executarParcelas, setExecutarParcelas] = useState(false);\r\n const [formaPagamentoAtual, setFormaPagamentoAtual] = useState(null);\r\n const editarDesconto = () => {\r\n setEditarValores(!editarValores)\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n calcularTotal();\r\n recalcularTotalPedido();\r\n }, []);\r\n\r\n useEffect(() => {\r\n let valor = 0;\r\n if (!!listaFormaPagamento && listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (valor >= valorTotal) {\r\n setPagamentoTotal(true);\r\n } else {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n if (listaFormaPagamento.some(dado => !dado.parcelas || dado.parcelas.length === 0)){\r\n setExecutarParcelas(true);\r\n } else {\r\n listaFormaPagamento.forEach(dado => {\r\n if (dado.parcelas && dado.parcelas.length > 0) {\r\n dado.pedidoparcela = dado.parcelas.map(parcela => {\r\n return {\r\n ...parcela,\r\n pcl_numeroparcela: parcela.prc_numeroparcela,\r\n dataVencimento: parcela.prc_datavencimento,\r\n valorParcela: parcela.prc_valor,\r\n };\r\n });\r\n delete dado.parcelas\r\n }\r\n });\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: {dados: { ...manutencao.dados, ...{ faturamento: listaFormaPagamento } } } });\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n setValorJaPago(valor);\r\n }, [listaFormaPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento && executarParcelas) {\r\n let dados = manutencao.dados.faturamento;\r\n let index = dados.length - 1;\r\n setExecutarParcelas(false);\r\n if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n validarJaPossuiCrediario(() => {\r\n popularParcelas();\r\n });\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n validarJaPossuiBoleto(() => {\r\n popularParcelas();\r\n });\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function carregarDados() {\r\n if (!!dadosOrcamento) {\r\n form.setFieldsValue({ pdi_valorfrete: dadosOrcamento.orc_valorfrete });\r\n if (listaFormaPagamento[0].orf_percentualdesconto) {\r\n form.setFieldsValue({ percentualDesconto: listaFormaPagamento[0].orf_percentualdesconto });\r\n calculaDesconto('perc')\r\n setEditarValores(true);\r\n }\r\n }\r\n };\r\n\r\n function validarJaPossuiCrediario(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!formaPgto.pedidoparcela && formaPgto.pedidoparcela.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n function validarJaPossuiBoleto(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let possuiBoletoComParcelas = dados.some(formaPgto => \r\n formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario &&\r\n !!formaPgto.pedidoparcela &&\r\n formaPgto.pedidoparcela.length > 0\r\n );\r\n let possuiBoletoSemParcelas = dados.some(formaPgto => \r\n formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario &&\r\n (!formaPgto.pedidoparcela || formaPgto.pedidoparcela.length === 0)\r\n );\r\n\r\n if (!possuiBoletoComParcelas || possuiBoletoSemParcelas) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n function popularParcelas(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${manutencao.dados.faturamento[index].cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(manutencao.dados.faturamento[index].pfp_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados[index].pedidoparcela = listaParcelas;\r\n manutencao.dados.faturamento[indexPosicao].editando = false;\r\n setListaFormaPagamento(dados);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function valorRestantePgto(dadosTemp) {\r\n let restante = 0;\r\n let valorPago = 0;\r\n let valor = form.getFieldValue().pfp_valor;\r\n dadosTemp.forEach((dados) => {\r\n valorPago += parseFloat(dados.pfp_valor);\r\n });\r\n restante = parseFloat(form.getFieldValue().valorTotal) - valorPago;\r\n if (parseFloat(restante.toFixed(3)) === 0) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n form.setFieldsValue({ pfp_valor: restante.toFixed(2) });\r\n setEditando(false);\r\n };\r\n\r\n function calcularTotal() {\r\n let valor = 0;\r\n valor = parseFloat(valorTotalPedido) + parseFloat(!!form.getFieldValue().pdi_valorfrete ? form.getFieldValue().pdi_valorfrete : 0) + parseFloat(!!form.getFieldValue().pdi_valoroutrasdespesas ? form.getFieldValue().pdi_valoroutrasdespesas : 0);\r\n setValorTotal(valor);\r\n form.setFieldsValue({ ped_valorTotal: valor.toFixed(2) });\r\n valorRestantePgto([...listaFormaPagamento]);\r\n };\r\n\r\n async function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null });\r\n }\r\n\r\n return api.get(`CondicaoPagamento/Listar?Ativo=true&codigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function adicionarFormaPagamento() {\r\n if (editando) {\r\n if (!form.getFieldValue().fpg_id || !form.getFieldValue().cpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condicao de pagamento!' });\r\n }\r\n let novaFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n let novaCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n let pagamentoTemp = [];\r\n pagamentoTemp.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: novaFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!novaCondicoesPagamento && novaCondicoesPagamento.cpg_descricao ? novaCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n pfp_valor: parseFloat(form.getFieldValue().pfp_valor),\r\n fpg_tipopagamento: novaFormaPagamento.fpg_tipopagamento\r\n });\r\n setListaFormaPagamento(pagamentoTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(pagamentoTemp);\r\n setEditando(false);\r\n\r\n } else {\r\n let dadosTemp = [...listaFormaPagamento];\r\n if (!!form.getFieldValue().fpg_id && (condicaoPagamento.length === 0 || !!form.getFieldValue().cpg_id)) {\r\n if (listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && formas.cpg_id === form.getFieldValue().cpg_id\r\n ))) {\r\n let dados = listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && formas.cpg_id === form.getFieldValue().cpg_id\r\n ));\r\n if (parseFloat(form.getFieldValue().ped_valorTotal) < parseFloat(form.getFieldValue().pfp_valor) + (parseFloat(valorJaPago) - dados.pfp_valor)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total do pedido!' });\r\n return;\r\n } else {\r\n dados.pfp_valor = parseFloat(form.getFieldValue().pfp_valor);\r\n setListaFormaPagamento(dadosTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(dadosTemp);\r\n }\r\n } else {\r\n if (parseFloat(form.getFieldValue().ped_valorTotal) < parseFloat(form.getFieldValue().pfp_valor) + parseFloat(valorJaPago)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total do pedido!' });\r\n } else {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n\r\n let dadosCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n dadosTemp.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!dadosCondicoesPagamento && dadosCondicoesPagamento.cpg_descricao ? dadosCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n pfp_valor: parseFloat(form.getFieldValue().pfp_valor),\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento\r\n });\r\n setListaFormaPagamento(dadosTemp);\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n valorRestantePgto(dadosTemp);\r\n }\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condicao de pagamento!' });\r\n }\r\n }\r\n };\r\n\r\n function calculaDesconto(campo) {\r\n let percValor = (!!form.getFieldValue().percentualDesconto ? form.getFieldValue().percentualDesconto : 0);\r\n let valor = (!!form.getFieldValue().ped_valorTotalDesc ? form.getFieldValue().ped_valorTotalDesc : 0);\r\n if (campo === 'perc') {\r\n valor = (percValor * valorTotalPedido) / 100;\r\n form.setFieldsValue({ ped_valorTotalDesc: parseFloat(valor).toFixed(2) });\r\n } else if (campo === 'valor') {\r\n valor = (valor / valorTotalPedido) * 100;\r\n valor = parseFloat(valor).toFixed(2);\r\n form.setFieldsValue({ percentualDesconto: valor });\r\n }\r\n recalcularTotalPedido();\r\n };\r\n\r\n function calculaAcrescimo(campo) {\r\n let perc = (!!form.getFieldValue().percentualAcrescimo ? form.getFieldValue().percentualAcrescimo : 0);\r\n let valor = (!!form.getFieldValue().ped_valorTotalAcre ? form.getFieldValue().ped_valorTotalAcre : 0);\r\n if (campo === 'perc') {\r\n valor = (perc * valorTotalPedido) / 100;\r\n form.setFieldsValue({ ped_valorTotalAcre: parseFloat(valor).toFixed(2) });\r\n } else if (campo === 'valor') {\r\n valor = (100 * valor) / valorTotalPedido;\r\n form.setFieldsValue({ percentualAcrescimo: parseFloat(valor).toFixed(2) })\r\n }\r\n recalcularTotalPedido();\r\n };\r\n\r\n function recalcularTotalPedido() {\r\n let formulario = form.getFieldValue();\r\n const percDesconto = formulario.percentualDesconto ? parseFloat(formulario.percentualDesconto) / 100 : 0;\r\n const percAcresc = formulario.percentualAcrescimo ? parseFloat(formulario.percentualAcrescimo) / 100 : 0;\r\n const valorFrete = formulario.pdi_valorfrete;\r\n const valorOutros = formulario.pdi_valoroutrasdespesas;\r\n const valorCFreteEOutros = parseFloat(valorTotalPedido) + parseFloat(valorFrete) + parseFloat(valorOutros);\r\n const calcuPercDesc = parseFloat(valorCFreteEOutros) * parseFloat(percDesconto);\r\n const calcuPercAcresc = parseFloat(valorCFreteEOutros) * parseFloat(percAcresc);\r\n const valorTotal = parseFloat(valorCFreteEOutros) - parseFloat(calcuPercDesc) + parseFloat(calcuPercAcresc);\r\n form.setFieldsValue({ valorTotal: valorTotal.toFixed(2) });\r\n form.setFieldsValue({ ped_valorTotal: valorTotal.toFixed(2) });\r\n form.setFieldsValue({ pfp_valor: valorTotal.toFixed(2) });\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento[0].pfp_valor = valorTotal.toFixed(2);\r\n }\r\n setValorTotal(valorTotal.toFixed(2));\r\n };\r\n\r\n async function editarFormasPagamento(forma) {\r\n setPagamentoTotal(false);\r\n setEditando(true);\r\n await listarCondicao(forma.fpg_id, true)\r\n form.setFieldsValue({ fpg_id: forma.fpg_id });\r\n form.setFieldsValue({ cpg_id: forma.cpg_id });\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n };\r\n\r\n function removerFormaPagamento(forma) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n dadosTemp = dadosTemp.filter((dados) => dados !== forma);\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n setListaFormaPagamento(dadosTemp);\r\n valorRestantePgto(dadosTemp);\r\n recalcularTotalPedido();\r\n setEditando(false);\r\n };\r\n\r\n function editarParcelas(forma) {\r\n let dados = forma;\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n setEditandoParcelas(true);\r\n setFormaPagamentoAtual(dados.fpg_id);\r\n }\r\n }\r\n\r\n function salvarParcelas(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.pedidoparcela.forEach((item, i) => {\r\n i++;\r\n item.prc_datavencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.dataVencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.valorParcela = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n item.prc_valor = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n });\r\n setListaFormaPagamento(formasPgto);\r\n setEditandoParcelas(false);\r\n }\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas) {\r\n let dadosFormaPagamento = [...listaFormaPagamento];\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(dadosFormaPagamento[0].pfp_valor);\r\n let dados = form.getFieldValue();\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n }\r\n\r\n function ajustarDataParcelas(numeroParc, qtdTotParcelas) {\r\n let dataAtual = new Date(form.getFieldValue([`dataVencimento${numeroParc}`]).toDate());\r\n for (let i = numeroParc + 1; i <= qtdTotParcelas; i++) {\r\n let dataVenc = new Date(dataAtual.setDate(new Date(dataAtual).getDate() + 30));\r\n form.setFieldsValue({ [`dataVencimento${i}`]: moment(dataVenc) });\r\n }\r\n }\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela, fpg_id }) => (\r\n
\r\n {editandoParcelas && fpg_id === formaPagamentoAtual ? { ajustarDataParcelas(pcl_numeroparcela, record.pedidoparcela.length) }} /> : {moment(dataVencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n )\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela, fpg_id }) => (\r\n
\r\n {editandoParcelas && fpg_id === formaPagamentoAtual ? { onChangeValorParc(pcl_numeroparcela, record.pedidoparcela.length) }} /> : {FormatNumber(valorParcela, true)}\r\n }\r\n
\r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n {record.fpg_tipopagamento !== FormaDePagamento.fpProgramaFidelidade && !record.fpg_quitacaoantecipacao &&
\r\n {!editandoParcelas &&\r\n \r\n {editandoParcelas && record.fpg_id === formaPagamentoAtual &&\r\n */}\r\n\r\n \r\n \r\n Resumo do Pedido\r\n \r\n }>\r\n \r\n \r\n \r\n {FormatNumber(valorTotalPedido, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(form.getFieldValue().pdi_valorfrete, true)}\r\n \r\n \r\n \r\n \r\n {FormatNumber(form.getFieldValue().pdi_valoroutrasdespesas, true)}\r\n \r\n \r\n \r\n {!emiteTransferencia && \r\n \r\n \r\n \r\n }\r\n {editarValores &&\r\n
\r\n \r\n
\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { calculaDesconto('perc') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calculaDesconto('valor') }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { calculaAcrescimo('perc') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calculaAcrescimo('valor') }} />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n IPI (R$): {FormatNumber(form.getFieldValue().valorTotalIPI, true)}\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): {FormatNumber(form.getFieldValue().valorTotalSt, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total do Pedido (R$) {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!pagamentoTotal && \r\n {!emiteTransferencia && \r\n \r\n { listarCondicao(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n }\r\n {condicaoPagamento.length > 0 && \r\n \r\n \r\n \r\n }\r\n \r\n {!emiteTransferencia &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n \r\n \r\n
\r\n {!!listaFormaPagamento && listaFormaPagamento.length > 0 &&
(\r\n
\r\n \r\n {fpg_descricao} {!!cpg_descricao ? `/ ${cpg_descricao}` : ''}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ pfp_valor }) => (\r\n
\r\n {FormatNumber(pfp_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Total dos Pagamentos (R$):\r\n \r\n \r\n \r\n {FormatNumber(totalPagamento, true)}\r\n \r\n \r\n \r\n )\r\n }} dataSource={listaFormaPagamento}\r\n />}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Select, Steps, Input, notification, Modal, Switch, Typography } from \"antd\";\r\nimport { ExclamationCircleOutlined, ExclamationOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions, selectPaginadoActions } from \"../../actions\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport { SelectIncluir, FormGW, Data, InputCpfCnpj, DrawerCliente, SelectPaginacao } from '../../components';\r\nimport DrawerVendedores from \"../../components/drawerVendedores\";\r\nimport { TabItens, TabTransporte, TabFaturamento } from './tabPage';\r\nimport { ModalEmail, ModalEndereco, ModalEnderecoNew, ModalTelefone } from \"../../components/modals\";\r\nimport { getNomeUsuario, getIdUsuario, getEmpresa, getLocal } from '../../services/auth';\r\nimport { compararDatas, imprimirRelatorioJasper, validaForm, calculaValorProporcional, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport { Divider } from \"@material-ui/core\";\r\n\r\nexport default function ManutencaoPedidos({ formulario, carregando, aoSalvar, clientes, dadosOrcamento, mostraBtnSalvar, proximaPag, pages, exibirDrawerPedidos }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [dadosEndereco, setDadosEndereco] = useState([]);\r\n const [dadosEnderecoLocal, setDadosEnderecoLocal] = useState({});\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [listaTelefone, setListaTelefone] = useState([]);\r\n const [dadosTelefone, setDadosTelefone] = useState([]);\r\n const [dadosVeiculos, setDadosVeiculos] = useState([]);\r\n const [dadosEmail, setDadosEmail] = useState([]);\r\n const [listaEmail, setListaEmail] = useState([]);\r\n const [pessoaFisica, setPessoaFisica] = useState(true);\r\n const [abreModalEndereco, setAbreModalEndereco] = useState(false);\r\n const [abreModalTelefone, setAbreModalTelefone] = useState(false);\r\n const [abreModalEmail, setAbreModalEmail] = useState(false);\r\n const [formularioTelefone] = Form.useForm();\r\n const [formularioEmail] = Form.useForm();\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [totalPedido, setTotalPedido] = useState(0);\r\n const [dadosFormasPagamento, setDadosFormasPagamento] = useState([]);\r\n const [emiteTransferencia, setEmiteTransferencia] = useState(false);\r\n const [tipoPreco, setTipoPreco] = useState([]);\r\n const [filiaisEmpresa, setFiliaisEmpresa] = useState([]);\r\n const [custo, setCusto] = useState({});\r\n const [abrirDrawerVendedores, setAbrirDrawerVendedores] = useState(false);\r\n const [formVendedores] = Form.useForm();\r\n const [openDrawerCliente, setOpenDrawerCliente] = useState(false);\r\n\r\n const [listaIndicadorPresenca, setListaIndicadorPresenca] = useState([]);\r\n const switchTransferencia = () => {\r\n setEmiteTransferencia(!emiteTransferencia);\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirDrawerPedidos) {\r\n if (!manutencao.dados && clientes) {\r\n const { formasPagamento, itens, ...restoClientes } = clientes;\r\n manutencao.dados = {\r\n ...restoClientes,\r\n formaPgto: formasPagamento.map((forma, index) => {\r\n if (index === 0) {\r\n const { orf_id, orc_id, orf_valortotal, acrescimo, desconto, disabled, orf_observacao, total, ...restoForma } = forma;\r\n return { ...restoForma, pfp_valor: total };\r\n }\r\n return forma;\r\n }),\r\n itens: itens.map((item, index) => {\r\n const { disabled, grade, oit_desconto, oit_id, oit_observacao, oit_qtde, oit_valortotal, oit_valorunitario, orc_id, ump_casasdecimais, ump_id, ...restoItem } = item;\r\n return {\r\n ...restoItem,\r\n descricaograde: grade,\r\n pdi_quantidade: oit_qtde,\r\n pdi_valortotal: oit_valortotal,\r\n pdi_valorunitario: oit_valorunitario,\r\n valorItemDesconto: oit_valortotal,\r\n pdi_numeroitem: index + 1\r\n };\r\n })\r\n };\r\n setDadosFormasPagamento(manutencao.dados.formaPgto)\r\n dadosOrcamento.formasPagamento = manutencao.dados.formaPgto;\r\n formulario.setFieldsValue({ ven_id: dadosOrcamento.ven_id });\r\n if (clientes.pes_id) {\r\n formulario.setFieldsValue({ pes_id: clientes.pes_id });\r\n } else {\r\n formulario.setFieldsValue({ pes_id: clientes.pes_nome });\r\n notification.warning({ message: 'Aviso!', description: 'Realize o cadastro do Cliente' });\r\n }\r\n }\r\n carregarDadosInciais();\r\n if (!!manutencao.dados) {\r\n formulario.setFieldsValue(manutencao.dados);\r\n if (!!manutencao.dados.pes_id) {\r\n formulario.setFieldsValue({ pes_id: manutencao.dados.pes_id });\r\n carregarDadosCliente(manutencao.dados.pes_id)\r\n }\r\n if (!!manutencao.dados.loc_id_transferencia) {\r\n formulario.setFieldsValue({ loc_id_transferencia: manutencao.dados.loc_id_transferencia });\r\n }\r\n if (!!manutencao.dados.ped_id_duplicar) {\r\n carregarDadosAlt(manutencao.dados.ped_id_duplicar);\r\n } else if (!!manutencao.dados.ped_id) {\r\n carregarDadosItems(manutencao.dados.ped_id);\r\n if (!!manutencao.dados.itens) {\r\n setDadosItens(manutencao.dados.itens);\r\n }\r\n }\r\n if (clientes) {\r\n setDadosItens(manutencao.dados.itens);\r\n }\r\n setDadosFormasPagamento(manutencao.dados.formaPgto)\r\n\r\n popularOperacaoFiscal(manutencao.dados.ope_id);\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.ped_datainclusao) {\r\n formulario.setFieldsValue({ ped_datainclusao: moment(manutencao.dados.ped_datainclusao) });\r\n } else if (!!!formulario.getFieldsValue().ped_datainclusao) {\r\n formulario.setFieldsValue({ ped_datainclusao: moment(new Date()) });\r\n }\r\n }\r\n if (exibirDrawerPedidos && !!manutencao.dados && !!manutencao.dados.pes_id) {\r\n let lista = [];\r\n if (!!manutencao.dados.pes_id) {\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: manutencao.dados.pes_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [exibirDrawerPedidos]);\r\n\r\n useEffect(() => {\r\n if (filiaisEmpresa.length > 0 && !!formulario.getFieldValue().loc_id_transferencia) {\r\n buscarDadosLocal(formulario.getFieldValue().loc_id_transferencia);\r\n }\r\n }, [filiaisEmpresa]);\r\n\r\n useEffect(() => {\r\n if (tipoPreco.length > 0) {\r\n api.get(`ParametroEmpresa/BuscarParametros`).then(retornoParametrosEmp => {\r\n if (retornoParametrosEmp.status === 200) {\r\n let dados = {};\r\n if (!!retornoParametrosEmp.data.par_custopadraonftransferencia) {\r\n let custo = tipoPreco.filter((custo) => { return custo.key === retornoParametrosEmp.data.par_custopadraonftransferencia });\r\n if (custo.length > 0) {\r\n dados = custo[0];\r\n if (!(!!formulario.getFieldValue().ped_precoutilizado)) {\r\n formulario.setFieldsValue({ ped_precoutilizado: custo[0].key });\r\n }\r\n }\r\n }\r\n setCusto(dados);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n }, [tipoPreco]);\r\n\r\n useEffect(() => {\r\n if (!!proximaPag.proximaPag || proximaPag.proximaPag === 0) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n\r\n useEffect(() => {\r\n if (dadosTelefone.length > 0) {\r\n dadosTelefone[0].pes_id = formulario.getFieldValue().pes_id;\r\n api.post(`PessoaTelefone/Incluir`, dadosTelefone[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n carregarDadosCliente(formulario.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setDadosTelefone([]);\r\n }\r\n )\r\n }\r\n }, [dadosTelefone]);\r\n\r\n useEffect(() => {\r\n if (dadosEmail.length > 0) {\r\n dadosEmail[0].pes_id = formulario.getFieldValue().pes_id;\r\n api.post('PessoaEmail/Incluir', dadosEmail[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n carregarDadosCliente(formulario.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setDadosEmail([]);\r\n }\r\n );\r\n }\r\n }, [dadosEmail]);\r\n\r\n useEffect(() => {\r\n if (emiteTransferencia) {\r\n setPessoaFisica(false);\r\n }\r\n }, [emiteTransferencia]);\r\n\r\n async function carregarDadosInciais() {\r\n let listaIndicadorPresenca = await api.get('Enum/Listar?nome=IndicadorPresenca');\r\n if (listaIndicadorPresenca.status === 200) {\r\n setListaIndicadorPresenca(listaIndicadorPresenca.data);\r\n }\r\n let retornoSerie = await api.get(`SerieFiscal/Listar?CodigoModeloDocFiscal=55&EmitenteDocumento=0`);\r\n if (retornoSerie.status === 200) {\r\n if (retornoSerie.data.items.length === 1) {\r\n formulario.setFieldsValue({ ser_id: retornoSerie.data.items[0].ser_id });\r\n }\r\n }\r\n api.get(`Enum/Listar?nome=TipoPrecoUtilizar`).then(\r\n retornoTipoPreco => {\r\n if (retornoTipoPreco.status === 200) {\r\n retornoTipoPreco.data = retornoTipoPreco.data.filter((item) => { return item.key > 0 });\r\n setTipoPreco(retornoTipoPreco.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n\r\n api.get(`Local/ListarLocalUsuario?codigoEmpresa=${getEmpresa()}`).then(\r\n retornoFiliais => {\r\n if (retornoFiliais.status === 200) {\r\n setFiliaisEmpresa(retornoFiliais.data.items.filter((item) => { return item.loc_id !== parseInt(getLocal()) }));\r\n }\r\n }\r\n ).catch(\r\n (erro) => console.error(erro)\r\n );\r\n\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function validarTrocaPg(proxPagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n\r\n if (paginaAtual < proxPagina) {\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = emiteTransferencia ? [\r\n { nome: 'loc_id_transferencia', obrigatorio: true, label: 'Local' },\r\n { nome: 'ped_precoutilizado', obrigatorio: true, label: 'Preço' },\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' }\r\n ] : [\r\n { nome: 'enderecoCliente', obrigatorio: true, label: 'Endereço' },\r\n { nome: 'pes_id', obrigatorio: true, label: 'Cliente' },\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' }\r\n ];\r\n break;\r\n case 1:\r\n if (!!dadosItens && dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Favor inserir ao menos um item no pedido!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n break;\r\n case 2:\r\n if (compararDatas(formulario.getFieldValue().ped_dataprevisaoentrega, formulario.getFieldValue().ped_datainclusao, '<')) {\r\n notification.warning({ message: 'Aviso', description: 'Data da previsa não pode ser menor que a data de emissão!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n await validarTransporte(dadosItens);\r\n break;\r\n }\r\n if (validaForm(formulario, listaValidacoes)) {\r\n pages.setTagPages(proxPagina);\r\n } else {\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n } else {\r\n pages.setTagPages(proxPagina);\r\n }\r\n };\r\n\r\n function carregarDadosAlt(ped_id) {\r\n mostraBtnSalvar(false);\r\n api.get(`PedidoItem/ListarItensPedidoADuplicar?codigoPedido=${ped_id}`).then(\r\n (res) => {\r\n res.data.forEach(item => {\r\n let grade = '';\r\n let valorTotal = 0;\r\n item.valorItemDesconto = parseFloat(item.pdi_valortotal);\r\n valorTotal = item.pdi_valorunitario * item.pdi_quantidade;\r\n item.percdesc = (valorTotal > 0 ? parseFloat(((item.pdi_valordesconto / valorTotal) * 100).toFixed(2)) : 0);\r\n if (!!item.atributos && item.atributos.length > 0) {\r\n item.atributos.forEach((atrib) => {\r\n grade += atrib.mgp_descricao + ', ';\r\n });\r\n item.grade = grade.substr(0, grade.lastIndexOf(','));\r\n }\r\n });\r\n setDadosItens(res.data);\r\n formulario.setFieldsValue({ ped_id: null });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function carregarDadosItems(ped_id) {\r\n api.get(`PedidoItem/ListarItensPedido?codigoPedido=${ped_id}`).then(\r\n (res) => {\r\n let pdi_valorfrete = 0;\r\n res.data.forEach(item => {\r\n let grade = '';\r\n let valorTotal = 0;\r\n item.valorItemDesconto = parseFloat(item.pdi_valortotal);\r\n valorTotal = item.pdi_valorunitario * item.pdi_quantidade;\r\n item.percdesc = (valorTotal > 0 ? parseFloat(((item.pdi_valordesconto / valorTotal) * 100).toFixed(2)) : 0);\r\n pdi_valorfrete += parseFloat(!!item.pdi_valorfrete ? item.pdi_valorfrete : 0);\r\n if (!!item.atributos && item.atributos.length > 0) {\r\n item.atributos.forEach((atrib) => {\r\n grade += atrib.mgp_descricao + ', ';\r\n });\r\n item.grade = grade.substr(0, grade.lastIndexOf(','));\r\n }\r\n });\r\n setDadosItens(res.data);\r\n formulario.setFieldsValue({ pdi_valorfrete: pdi_valorfrete });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validaValorPago(valores) {\r\n let retorno = false;\r\n let valorPago = 0;\r\n if (dadosFormasPagamento.length > 0) {\r\n dadosFormasPagamento.forEach(formaPgto => { valorPago += parseFloat(formaPgto.pfp_valor) });\r\n if (parseFloat(valorPago.toFixed(2)) === parseFloat(valores.ped_valorTotal) || parseFloat(valorPago.toFixed(2)) === parseFloat(formulario.getFieldValue().ped_valorTotal)) {\r\n retorno = true;\r\n }\r\n } else {\r\n retorno = true;\r\n }\r\n return retorno;\r\n };\r\n\r\n function incluirCliente(retorno) {\r\n if (retorno) {\r\n formulario.setFieldsValue({ pes_id: retorno });\r\n let lista = [];\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: retorno });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n carregarDadosCliente(retorno);\r\n }\r\n }\r\n\r\n async function salvarManutencao(valores) {\r\n if (!validaValorPago(valores)) {\r\n notification.warning({ message: 'Aviso', description: \"Valor de pagamentos menor que total do pedido!\" });\r\n return;\r\n }\r\n let endereco = {};\r\n valores.pedidoitens = dadosItens;\r\n if (dadosFormasPagamento.length > 0) {\r\n valores.pedidoformapgtos = dadosFormasPagamento;\r\n } else if (emiteTransferencia) {\r\n valores.pedidoformapgtos = [];\r\n } else {\r\n let arrayDados = [];\r\n let dados = {};\r\n dados.pfp_valor = parseFloat(formulario.getFieldValue().ped_valorTotal);\r\n dados.cpg_id = !!valores.cpg_id ? valores.cpg_id : null;\r\n dados.fpg_id = valores.fpg_id;\r\n arrayDados.push(dados);\r\n valores.pedidoformapgtos = arrayDados;\r\n }\r\n if (emiteTransferencia) {\r\n endereco = dadosEnderecoLocal;\r\n valores.pes_id = null;\r\n let filial = filiaisEmpresa.find((filial) => { return filial.loc_id === valores.loc_id_transferencia });\r\n valores.pes_telefone = !!filial.loc_telefone ? filial.loc_telefone : \"\";\r\n valores.pes_nroestabelecimento = filial.loc_numeroestabelecimento;\r\n } else {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${formulario.getFieldValue().pes_id}`)).data;\r\n endereco = dadosEndereco.filter(endereco => (endereco.pee_id === formulario.getFieldValue().enderecoCliente))[0];\r\n valores.pes_nroestabelecimento = (!!endereco.pee_numero ? endereco.pee_numero : 'SN');\r\n valores.pes_id = endereco.pes_id;\r\n valores.loc_id_transferencia = null;\r\n valores.pes_telefone = !!formulario.getFieldValue().pes_telefone ? formulario.getFieldValue().pes_telefone : !!formulario.getFieldValue().telefoneCliente ? formulario.getFieldValue().telefoneCliente : \"\";\r\n valores.cli_id = cliente.cli_id;\r\n }\r\n valores.emp_id = getEmpresa();\r\n valores.loc_id = getLocal();\r\n valores.ven_id = formulario.getFieldValue().ven_id;\r\n valores.ped_ativo = true;\r\n valores.ped_datainclusao = formulario.getFieldValue().ped_datainclusao;\r\n valores.ped_dataprevisaoentrega = formulario.getFieldValue().ped_dataprevisaoentrega;\r\n valores.ped_datavalidade = formulario.getFieldValue().ped_datainclusao;\r\n valores.ped_observacao = formulario.getFieldValue().ped_observacao;\r\n valores.ped_valorfrete = parseFloat(formulario.getFieldValue().pdi_valorfrete);\r\n valores.ped_valorTotalitens = parseFloat(totalPedido);\r\n valores.ped_valorTotalAcre = (!!formulario.getFieldValue().ped_valorTotalAcre ? parseFloat(formulario.getFieldValue().ped_valorTotalAcre) : 0);\r\n valores.ped_valorTotalDesc = (!!formulario.getFieldValue().ped_valorTotalDesc ? parseFloat(formulario.getFieldValue().ped_valorTotalDesc) : 0);\r\n valores.ped_valoroutrasdespesas = (!!formulario.getFieldValue().pdi_valoroutrasdespesas ? parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas) : 0);\r\n valores.ped_valorTotal = parseFloat(valores.ped_valorTotal);\r\n valores.valorFrete = parseFloat(formulario.getFieldValue().pdi_valorfrete);\r\n valores.valorDesconto = (!!formulario.getFieldValue().ped_valorTotalDesc ? parseFloat(formulario.getFieldValue().ped_valorTotalDesc) : 0);\r\n valores.valorAcrescimo = (!!formulario.getFieldValue().ped_valorTotalAcre ? parseFloat(formulario.getFieldValue().ped_valorTotalAcre) : 0);\r\n valores.valorOutrasDespesas = (!!formulario.getFieldValue().pdi_valoroutrasdespesas ? parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas) : 0);\r\n valores.pes_bairro = endereco.bai_nome;\r\n valores.pes_cep = endereco.cep_cep;\r\n valores.pes_cidade = endereco.cid_descricao;\r\n valores.pes_endereco = endereco.log_logradouro;\r\n valores.pes_uf = endereco.est_sigla;\r\n valores.ped_responsavelpedido = getNomeUsuario();\r\n valores.ped_modalidadefrete = formulario.getFieldValue().ped_modalidadefrete;\r\n valores.usu_id = parseInt(getIdUsuario());\r\n if (valores.duplicar) {\r\n valores.ped_id = null;\r\n }\r\n carregando(true);\r\n if (!!valores.ped_id && !valores.ped_id_duplicar) {\r\n valores.stp_id = formulario.getFieldValue().stp_id;\r\n api.put(`Pedido/Editar`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: `Pedido editado com sucesso!` });\r\n Modal.confirm({\r\n title: \"Imprimir?\",\r\n icon: ,\r\n content: `Deseja imprimir o pedido?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n okType: \"primary\",\r\n centered: true,\r\n onOk() {\r\n imprimirRelatorioJasper(29, { idPedido: res.data.ped_id });\r\n }\r\n });\r\n aoSalvar();\r\n recarregarDados();\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.Message) {\r\n Modal.warning({\r\n content: erro.response.data.Message,\r\n title: 'Aviso',\r\n });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n } else {\r\n if (!!valores.ped_id_duplicar) {\r\n if (dadosFormasPagamento.length > 0) {\r\n valores.pedidoformapgtos.forEach((pgto) => {\r\n pgto.pfp_id = null;\r\n });\r\n }\r\n valores.pedidoitens.forEach((item) => {\r\n item.ped_id = null;\r\n item.pdi_id = null;\r\n })\r\n }\r\n api.post(`Pedido/Incluir`, valores).then(\r\n (res) => {\r\n notification.success({ message: 'Operação concluída', description: `Pedido incluído com sucesso!` });\r\n Modal.confirm({\r\n title: \"Imprimir?\",\r\n icon: ,\r\n content: `Deseja imprimir o pedido?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n okType: \"primary\",\r\n centered: true,\r\n onOk() {\r\n imprimirRelatorioJasper(29, { idPedido: res.data.ped_id });\r\n }\r\n });\r\n aoSalvar();\r\n recarregarDados();\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n });\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n }\r\n }\r\n\r\n function recarregarDados() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } });\r\n };\r\n\r\n async function carregarDadosCliente(codigo) {\r\n if (!!codigo) {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${codigo}`)).data;\r\n if (!!cliente) {\r\n formulario.setFieldsValue({ 'pej_inscricaoestadual': cliente.pej_inscricaoestadual });\r\n retornarDadosCPFCNPJ(cliente);\r\n if (cliente.emails.length > 0) {\r\n setListaEmail(cliente.emails);\r\n formulario.setFieldsValue({ dadosEmailCliente: cliente.emails[0].pem_email })\r\n }\r\n if (cliente.enderecos.length > 0) {\r\n setDadosEndereco(cliente.enderecos);\r\n formulario.setFieldsValue({ enderecoCliente: cliente.enderecos[0].pee_id })\r\n } else {\r\n setDadosEndereco([]);\r\n if (!!formulario.getFieldValue().pes_id) {\r\n Modal.confirm({\r\n title: 'Endereço não encontrado',\r\n icon: ,\r\n content: 'Deseja incluir um endereço para este cliente?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setAbreModalEndereco(true);\r\n }\r\n });\r\n }\r\n }\r\n if (cliente.telefones.length > 0) {\r\n setListaTelefone(cliente.telefones);\r\n formulario.setFieldsValue({ telefoneCliente: cliente.telefones[0].psc_numero })\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n };\r\n\r\n function limparCliente() {\r\n formulario.setFieldsValue({\r\n cpf: null,\r\n cnpj: null,\r\n telefoneCliente: null,\r\n enderecoCliente: null,\r\n dadosEmailCliente: null\r\n })\r\n setDadosEndereco([]);\r\n setDadosEmail([]);\r\n setListaTelefone([]);\r\n }\r\n\r\n async function retornarDadosCPFCNPJ(cliente) {\r\n if (!!cliente) {\r\n if (!!cliente.pef_cpf) {\r\n setPessoaFisica(true);\r\n formulario.setFieldsValue({ cpf: cliente.pef_cpf, cli_id: cliente.cli_id });\r\n } else if (!!cliente.pej_cnpj) {\r\n setPessoaFisica(false);\r\n formulario.setFieldsValue({ cnpj: cliente.pej_cnpj, cli_id: cliente.cli_id });\r\n }\r\n }\r\n };\r\n function adicionarEndereco() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalEndereco(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" })\r\n }\r\n };\r\n\r\n function onCloseModalEndereco(dados) {\r\n setAbreModalEndereco(false);\r\n };\r\n\r\n function adicionarTelefone() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalTelefone(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" })\r\n }\r\n };\r\n\r\n function onCloseModalTelefone() {\r\n setAbreModalTelefone(false);\r\n };\r\n\r\n function onCloseModalEmail() {\r\n setAbreModalEmail(false);\r\n };\r\n\r\n function adicionarEmail() {\r\n if (!!formulario.getFieldValue().pes_id) {\r\n setAbreModalEmail(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" });\r\n }\r\n };\r\n\r\n async function buscarDadosLocal(loc_id_transferencia) {\r\n if (!!loc_id_transferencia) {\r\n let filial = filiaisEmpresa.find((filial) => { return filial.loc_id === loc_id_transferencia });\r\n let retornoEndereco = await api.get(`LogradouroCidade/BuscarLogradouroCidade?codigoLogradouroCidade=${filial.lcd_id}&estrangeiro=0`)\r\n let endereco = \"\";\r\n if (retornoEndereco.status === 200) {\r\n setDadosEnderecoLocal(retornoEndereco.data);\r\n endereco = retornoEndereco.data.log_logradouro;\r\n }\r\n setEmiteTransferencia(true);\r\n formulario.setFieldsValue({ loc_email: filial.loc_email.endereco, loc_telefone: filial.loc_telefone, cnpj: filial.loc_cnpj.numero, log_logradouro: endereco });\r\n }\r\n };\r\n\r\n function alterarCusto(e) {\r\n if (!!e) {\r\n let custo = tipoPreco.find((custo) => { return custo.key === e });\r\n if (!!custo) {\r\n setCusto(custo);\r\n }\r\n }\r\n };\r\n\r\n function fecharDrawerVendedores() {\r\n setAbrirDrawerVendedores(false);\r\n };\r\n\r\n async function validarTransporte() {\r\n await rateioFrete();\r\n await recalcularImpostos();\r\n }\r\n\r\n async function recalcularImpostos() {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n let totalIPI = 0;\r\n let possuiIe = !!formulario.getFieldValue().pej_inscricaoestadual ? true : false;\r\n let cpf = formulario.getFieldValue()?.cpf || '';\r\n let cnpj = formulario.getFieldValue()?.cnpj || '';\r\n let fisicaJuridica = cnpj.length === 14 ? 2 : cpf.length == 11 ? 1 : 3;\r\n let ufDestino = dadosEndereco && dadosEndereco.length > 0 ? dadosEndereco[0].est_sigla : dadosContribuinte.est_sigla\r\n let ufOrigem = dadosContribuinte.est_sigla;\r\n for (const p of dadosItens) {\r\n console.log(\"valores\", dadosItens);\r\n try {\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_i, ufOrigem, ufDestino, p.pdi_quantidade, p.pdi_valorunitario, p.pdi_valorfrete, p.pdi_valoracrescimo,\r\n p.pdi_valordesconto, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_percReducaoIcms,\r\n p.impostos.retornoICMSST.ret_aliquotaIcmsSt, p.impostos.retornoICMSST.ret_percMva, p.impostos.retornoICMSST.ret_percReducaoIcmsST, null,\r\n p.ncm_percentual, fisicaJuridica, formulario.getFieldValue().ntf_consumidorfinal, possuiIe, formulario.getFieldValue().ped_indicadorpresenca);\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.pdi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.pdi_valoripi = impostos.retornoIPI.ret_valorIpi;\r\n p.total = (p.pdi_quantidade * p.pdi_valorunitario) - p.pdi_valordesconto + p.pdi_valoracrescimo + p.pdi_valoripi + p.pdi_valoricmsst;\r\n p.impostos = impostos;\r\n }\r\n totalSt += parseFloat(p.pdi_valoricmsst);\r\n totalIPI += parseFloat(p.pdi_valoripi);\r\n total += parseFloat(p.total);\r\n } catch (error) {\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n formulario.setFieldsValue({ valorTotalSt: totalSt, valorTotalIPI: totalIPI });\r\n }\r\n }\r\n\r\n async function rateioFrete() {\r\n let _numeroItem = 1;\r\n let _totalFrete = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorFrete = parseFloat(formulario.getFieldValue().pdi_valorfrete);\r\n if (_valorFrete > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.pdi_valorunitario * item.pdi_quantidade;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.pdi_valorunitario * item.pdi_quantidade);\r\n item.pdi_valorfrete = calculaValorProporcional(valorTotalItem, _valorFrete, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.pdi_valorfrete = parseFloat((_valorFrete - _totalFrete).toFixed(2))\r\n }\r\n _totalFrete += item.pdi_valorfrete;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n rateioAcrescimo(dadosItens);\r\n }\r\n\r\n async function rateioAcrescimo(dadosItens) {\r\n let _numeroItem = 1;\r\n let _totalAcrescimo = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorAcrescimo = parseFloat(formulario.getFieldValue().pdi_valoroutrasdespesas);\r\n if (_valorAcrescimo > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.pdi_valorunitario * item.pdi_quantidade;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n itens.forEach(item => {\r\n item.nfi_valorseguro = 0;\r\n let valorTotalItem = parseFloat(item.pdi_valorunitario * item.pdi_quantidade);\r\n let valoracresc = calculaValorProporcional(valorTotalItem, _valorAcrescimo, somaTotal);\r\n //transforma o valor acrescimo em porcentagem\r\n item.percacresc = (valoracresc * 100) / valorTotalItem;\r\n item.pdi_percacresc = (valoracresc * 100) / valorTotalItem;\r\n _totalAcrescimo += item.percacresc;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n\r\n async function popularOperacaoFiscal(id) {\r\n if (!!id) {\r\n api.get(`OperacaoFiscal/Buscar/${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n formulario.setFieldsValue({ ped_indicadorpresenca: res.data.ope_indicadorpresenca });\r\n }\r\n }\r\n ).catch(\r\n error => { console.log(error); }\r\n )\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n Emite Nota de Transferência\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia && \r\n \r\n \r\n \r\n \r\n }\r\n {emiteTransferencia && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)} conteudo={\r\n ope => ({ope.ope_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({pv.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n {!emiteTransferencia &&
\r\n \r\n carregarDadosCliente(dados)}\r\n funcaoIncluir={() => setOpenDrawerCliente(true)}\r\n conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n }\r\n />\r\n
\r\n }\r\n {pessoaFisica && \r\n \r\n }\r\n {!pessoaFisica && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarEmail() }}\r\n campoDescricao={'pem_email'}\r\n campoValue={'pem_id'}\r\n campoKey={'pem_id'}\r\n placeHolder={'Selecione um E-mail'}\r\n labelFormItem={'E-mail'}\r\n nameFormItem={'dadosEmailCliente'} />}\r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarTelefone() }}\r\n campoDescricao={'psc_numero'}\r\n campoValue={'psc_id'}\r\n campokey={'psc_id'}\r\n placeHolder={'Selecione um Telefone'}\r\n labelFormItem={'Telefone'}\r\n nameFormItem={'telefoneCliente'} />}\r\n \r\n \r\n \r\n \r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n \r\n \r\n \r\n \r\n {emiteTransferencia ? \r\n \r\n : { adicionarEndereco() }}\r\n campoDescricao={['log_logradouro', 'cid_descricao', 'est_sigla', 'tpe_descricao']}\r\n campoValue={'pee_id'}\r\n campoKey={'pee_id'}\r\n placeHolder={\"Selecione um Endereço\"}\r\n labelFormItem={'Endereço'}\r\n nameFormItem={'enderecoCliente'}\r\n rulesFormItem={[{ required: true, message: 'Informe o Endereço' }]}\r\n />}\r\n \r\n \r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n (endereco.pee_id === formulario.getFieldValue().enderecoCliente))[0]}\r\n dadosTabela={{ dadosItens, setDadosItens }}\r\n totalPedido={{ totalPedido, setTotalPedido }} custo={emiteTransferencia ? custo : {}}\r\n dadosOperacao={formulario.getFieldValue().ope_id}\r\n />\r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n\r\n { onCloseModalEndereco() }} />\r\n { onCloseModalTelefone() }} />\r\n { onCloseModalEmail() }} />\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport ManutencaoPedidos from './manutencao';\r\nimport { DrawerNav } from '../../components';\r\n\r\nexport default function DrawerPedidos({ clientes, exibirDrawer, fecharDrawerPedidos, dadosOrcamento }) {\r\n\r\n const [formPedidos] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [mostraBtnSalvar, setMostraBtnSalvar] = useState(false);\r\n const [tagPages, setTagPages] = useState(null);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n\r\n function fecharDrawer() {\r\n setProximaPag(null);\r\n setTagPages(0);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n fecharDrawerPedidos();\r\n formPedidos.resetFields();\r\n setCarregando(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={fecharDrawer}\r\n footer={\r\n
\r\n \r\n {mostraBtnSalvar &&
\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Button, Switch, Tag, notification, Modal, Table, InputNumber } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined, UndoOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport moment from 'moment';\r\n\r\n\r\nimport api from \"../../services/api\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport SelectPaginacao from \"../../components/selects/selectPaginacao\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalSenhaLiberacao } from \"../../components/modals\";\r\nimport { Data, FiltroProdutoVnc, FormGW, InputPhone, Tabela } from \"../../components\";\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { HasValue, compararDatas, isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoCondicional({ formulario, carregando, aoSalvar, dadosItens, setDadosItens, imprimirCondicional }) {\r\n\r\n const format = 'HH:mm';\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosEntrega, setDadosEntrega] = useState(false);\r\n const [cliente, setCliente] = useState({});\r\n const [openModalSenha, setOpenModalSenha] = useState(false);\r\n const [quantidadeTot, setQuantidadeTot] = useState(0);\r\n const [valorTot, setValorTot] = useState(0.00);\r\n const [dadosSenha, setDadosSenha] = useState([]);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n const [dataRetorno, setDataRetorno] = useState(moment(new Date()).add(1, 'day'));\r\n const devolver = useRef();\r\n\r\n function switchEntregar() {\r\n setDadosEntrega(!dadosEntrega);\r\n if (!!formulario.getFieldValue().cli_id && !dadosEntrega) {\r\n if (isObjetoDiffVazio(cliente)) {\r\n if (cliente.enderecos.length > 0) {\r\n let endPrincipal = cliente.enderecos.length == 1 ? cliente.enderecos[0] : cliente.enderecos.filter((e) => (e.pee_enderecoprincipal == true))[0]\r\n if (!!endPrincipal) {\r\n let endEntrega = endPrincipal.log_logradouro + ', ' + endPrincipal.pee_numero + '. ' + endPrincipal.bai_nome + ', ' + endPrincipal.cep_cep + ', ' + endPrincipal.cid_descricao + '/' + endPrincipal.est_sigla;\r\n formulario.setFieldsValue({ vnc_enderecoentrega: endEntrega.replaceAll(\"null\", '') });\r\n formulario.setFieldsValue({ vnc_entregaagendada: moment(new Date()) });\r\n formulario.setFieldsValue({ horaagendada: '00:00' });\r\n }\r\n }\r\n } else {\r\n api.get(`PessoaEndereco/ListaEndereco?IdPessoa=${formulario.getFieldValue().pes_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (!!res.data) {\r\n if (res.data.length > 0) {\r\n let endPrincipal = res.data.length == 1 ? res.data[0] : res.data.filter((e) => (e.pee_enderecoprincipal == true))[0]\r\n if (!!endPrincipal) {\r\n let endEntrega = endPrincipal.log_logradouro + ', ' + endPrincipal.pee_numero + '. ' + endPrincipal.bai_nome + ', ' + endPrincipal.cep_cep + ', ' + endPrincipal.cid_descricao + '/' + endPrincipal.est_sigla;\r\n formulario.setFieldsValue({ vnc_enderecoentrega: endEntrega.replaceAll(\"null\", '') });\r\n formulario.setFieldsValue({ vnc_entregaagendada: moment(new Date()) });\r\n formulario.setFieldsValue({ horaagendada: '00:00' });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n }\r\n };\r\n\r\n function setarFocoDevolver() {\r\n setTimeout(() => {\r\n if (devolver && !!devolver.current) {\r\n devolver.current.focus();\r\n }\r\n }, 300);\r\n };\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ vnc_levarparacliente: dadosEntrega });\r\n }, [dadosEntrega]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.itens) {\r\n if (!!manutencao.dados.vnc_levarparacliente) {\r\n setDadosEntrega(manutencao.dados.vnc_levarparacliente);\r\n }\r\n setDadosItens(manutencao.dados.itens);\r\n } else {\r\n formulario.setFieldsValue({ vnc_prazoretorno: dataRetorno });\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let lista = [];\r\n if (!!manutencao.dados.cli_id) {\r\n lista.push({ name: \"cli_id\", campo: \"IdCliente\", value: manutencao.dados.cli_id });\r\n }\r\n if (!!manutencao.dados.ven_id) {\r\n lista.push({ name: \"ven_id\", campo: \"IdVendedor\", value: manutencao.dados.ven_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function desfazerDevolucao(record) {\r\n let dadosTemp = dadosItens;\r\n dadosTemp.filter((item) => { return item.vci_id === record.vci_id })[0].vci_devolvido = 0;\r\n dadosTemp.filter((item) => { return item.vci_id === record.vci_id })[0].totBaixado = false;\r\n setDadosItens(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n };\r\n\r\n useEffect(() => {\r\n recalcularTotais(dadosItens);\r\n }, [dadosItens]);\r\n\r\n\r\n function salvarDados(values) {\r\n if (!(!!values.vnc_levarparacliente)) {\r\n values.vnc_levarparacliente = false;\r\n } else {\r\n let dataEntrega = moment(values.vnc_entregaagendada);\r\n let horaEntrega = '00';\r\n let minutoEntrega = '00';\r\n if (!!values.horaagendada) {\r\n horaEntrega = values.horaagendada.substring(0, 2);\r\n minutoEntrega = values.horaagendada.substring(3, 5);\r\n }\r\n dataEntrega.set(\"hour\", parseInt(horaEntrega)); // Setando a hora\r\n dataEntrega.set(\"minute\", parseInt(minutoEntrega)); // Setando os minutos\r\n values.vnc_entregaagendada = dataEntrega;\r\n }\r\n values.vnc_imagemassinaturacliente = \"\";\r\n values.pes_id = cliente.pes_id;\r\n values.pes_nome = HasValue(cliente.pes_nome) ? cliente.pes_nome : formulario.getFieldValue().cli_nome;\r\n values.vnc_telefonecliente = values.vnc_telefonecliente.replaceAll(`(`, ``).replaceAll(`)`, ``).replaceAll(`-`, ``).replaceAll(` `, ``).replaceAll(`_`, ``);\r\n values.vendacondicionalitens = dadosItens;\r\n if (values.vendacondicionalitens.length == 0) {\r\n notification.warning({ message: 'Atenção', description: \"O condicional não possui itens, verifique!\" });\r\n return;\r\n }\r\n let enderecoUrl = 'VendaCondicional/';\r\n carregando(true);\r\n if (values.vnc_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n if (!!res.data) {\r\n imprimirCondicional(res.data);\r\n }\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da condicional foram salvos com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response.data.Message) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n setDadosEntrega(false);\r\n recalcularTotais(dadosItens);\r\n }\r\n );\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n if (!!res.data) {\r\n imprimirCondicional(res.data);\r\n }\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da condicional foram salvos com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: res.data } });\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response.data.Message) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n setDadosEntrega(false);\r\n recalcularTotais(dadosItens);\r\n }\r\n );\r\n };\r\n };\r\n\r\n // so deixa excluir o item se não tiver sido gravado em banco, caso contrario é apenas feito a devolução total do item, para manter historico.\r\n function excluirItem(item) {\r\n let dadosTemp = [...dadosItens];\r\n if (typeof item.vci_id === \"undefined\") {\r\n dadosTemp = dadosTemp.filter((dados) => dados !== item);\r\n dadosTemp = dadosTemp.map((dados, index) => {\r\n if (dados.vci_id > 0) {\r\n // dados.vci_sequencia = dados.vci_sequencia\r\n return dados;\r\n } else {\r\n return {\r\n ...dados,\r\n vci_sequencia: dadosTemp.length - index\r\n };\r\n };\r\n });\r\n } else {\r\n dadosTemp.filter((i) => { return i.vci_id === item.vci_id })[0].vci_devolvido = item.vci_quantidade;\r\n }\r\n setDadosItens(dadosTemp);\r\n recalcularTotais(dadosTemp);\r\n };\r\n\r\n function editarItem(registro, indice) {\r\n if (registro.vci_id) {\r\n let listaTemp = [...dadosItens];\r\n let possuiEdicaoAberta = listaTemp.filter((item) => item.editando == true);\r\n if (possuiEdicaoAberta.length > 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Antes de editar outro item, por favor, salve as alterações feitas no item atual!' });\r\n return\r\n }\r\n\r\n let item = listaTemp[indice];\r\n listaTemp[indice].editando = true;\r\n formulario.setFieldsValue({ [`vci_devolvido`]: item.vci_devolvido });\r\n setDadosItens(listaTemp);\r\n setarFocoDevolver();\r\n } else {\r\n registro.indice = indice;\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n }\r\n };\r\n\r\n function manutencaoItem(index) {\r\n let listaTemp = [...dadosItens];\r\n let item = listaTemp[index];\r\n let qtdeItem = formulario.getFieldValue().vci_devolvido;\r\n\r\n if (qtdeItem > item.vci_quantidade) {\r\n formulario.setFieldsValue({ [`vci_devolvido`]: item.vci_quantidade });\r\n }\r\n }\r\n\r\n function salvarItem(registro, indice) {\r\n let listaTemp = [...dadosItens];\r\n let item = listaTemp[indice];\r\n listaTemp[indice].editando = false;\r\n item.vci_devolvido = formulario.getFieldsValue().vci_devolvido;\r\n\r\n setDadosItens(listaTemp);\r\n\r\n };\r\n\r\n function cancelarEdicaoItem(indice) {\r\n let listaTemp = [...dadosItens];\r\n let item = listaTemp[indice];\r\n listaTemp[indice].editando = false;\r\n setDadosItens(listaTemp);\r\n }\r\n\r\n function recalcularTotais(dados) {\r\n let qtd = 0;\r\n let valor = 0;\r\n dados.forEach((dado) => {\r\n qtd += (dado.vci_quantidade - dado.vci_devolvido);\r\n valor += dado.vci_valorun * (dado.vci_quantidade - dado.vci_devolvido);\r\n });\r\n setValorTot(valor);\r\n setQuantidadeTot(qtd);\r\n };\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n };\r\n\r\n const modalParcelasAtraso = (cliente) => {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: `Este cliente possui parcelas em atraso!! Deseja Continuar? Será solicitado uma senha Gerencial!`,\r\n okText: 'Sim, quero continuar!',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n modalSenhaGerencial(cliente);\r\n },\r\n onCancel() {\r\n formulario.setFieldsValue({ cli_id: null });\r\n }\r\n });\r\n };\r\n\r\n const modalSenhaGerencial = (dados) => {\r\n setOpenModalSenha(true);\r\n setDadosSenha(dados);\r\n };\r\n\r\n function retornoModalSenha(dados) {\r\n if (!dados) {\r\n formulario.setFieldsValue({ cli_id: null });\r\n }\r\n };\r\n\r\n async function BuscarDadosCliente(IdPessoa) {\r\n if (!!IdPessoa) {\r\n var dadosCliente;\r\n await api.get(`Cliente/BuscarCliente/${IdPessoa}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (!!res.data) {\r\n dadosCliente = res.data;\r\n setCliente(res.data)\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n let telefone = dadosCliente.telefones.filter((tel) => (tel.psc_ativo == true && tel.psc_principal == true))[0]?.psc_numero;\r\n if (!!telefone) telefone = dadosCliente.telefones.filter((tel) => (tel.psc_ativo == true))[0]?.psc_numero;\r\n if (!!telefone) formulario.setFieldsValue({ vnc_telefonecliente: telefone });\r\n else formulario.setFieldsValue({ vnc_telefonecliente: \"\" });\r\n setDadosEntrega(false);\r\n await api.get(`Parcela/ListarParcelasClientesEmAtrazo?IdPessoa=${dadosCliente.pes_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (!!res.data && res.data.items.length > 0) {\r\n modalParcelasAtraso(dadosCliente);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (dadosItens.length > 0) {\r\n dadosItens.map(itens => {\r\n itens.totBaixado = (itens.vci_quantidade - itens.vci_devolvido) === 0;\r\n });\r\n }\r\n }, [dadosItens]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n (BuscarDadosCliente(valor))}\r\n nameLabel=\"pes_nome\" nameValue=\"cli_id\" form={formulario} name=\"cli_id\" conteudo={\r\n cli => ({cli.cli_codigo} - {cli.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({ven.ven_id} - {ven.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value || compararDatas(value)) {\r\n return Promise.resolve();\r\n }\r\n\r\n return Promise.reject(new Error('A data precisa ser maior que a atual!'));\r\n },\r\n }),]} />\r\n \r\n \r\n \r\n (switchEntregar(campo))} /> Entregar para o Cliente\r\n \r\n \r\n {!!dadosEntrega &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { let a = formulario.getFieldValue().horaagendada; }} />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {pro_codigo}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n width: '35%',\r\n render: ({ vci_devolvido, vci_quantidade, pro_descricao, pro_ean, prg_ean, descricaograde }) => (\r\n
\r\n \r\n
\r\n {vci_devolvido == vci_quantidade ?\r\n \r\n {pro_descricao}\r\n :\r\n {pro_descricao}\r\n }\r\n \r\n \r\n \r\n {!!pro_ean || !!prg_ean ? (\r\n {vci_devolvido == vci_quantidade ?\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n :\r\n \r\n EAN: {pro_ean ? pro_ean : prg_ean}\r\n \r\n }\r\n ) : \"\"}\r\n {!!descricaograde ? (\r\n {vci_devolvido == vci_quantidade ?\r\n \r\n Grade: {descricaograde}\r\n :\r\n \r\n Grade: {descricaograde}\r\n \r\n }\r\n ) : ''}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: '2%',\r\n render: ({ vci_sequencia }) => (\r\n
\r\n {vci_sequencia}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: '8%',\r\n render: ({ vci_quantidade, vci_devolvido }) => (\r\n
\r\n {(vci_devolvido == vci_quantidade ? (Ficou com: {vci_quantidade - vci_devolvido}) : (Ficou com: {vci_quantidade - vci_devolvido} ))}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: '12%',\r\n editable: true,\r\n render: ({ vci_quantidade, vci_devolvido }, record) => (\r\n
\r\n \r\n
\r\n {(vci_devolvido == vci_quantidade ? ( Devolveu: {vci_devolvido} ) : (vci_devolvido > 0) ? Devolveu: {vci_devolvido} : )}\r\n \r\n \r\n {(vci_devolvido > 0 ? \r\n {(vci_devolvido == vci_quantidade ? ((Todos)) : )}\r\n */}\r\n \r\n \r\n ),\r\n },\r\n {\r\n width: '8%',\r\n align: 'center',\r\n render: ({ vci_devolvido, vci_quantidade, editando }, record, indice) => (\r\n
\r\n {editando ? \"Devolver:\" : \"\"}\r\n {editando ? (\r\n \r\n manutencaoItem(indice)}\r\n />\r\n \r\n ) : (\r\n ''\r\n )}\r\n\r\n
\r\n )\r\n },\r\n {\r\n editable: true,\r\n title: 'Vlr. Unit. (R$)',\r\n align: 'right',\r\n render: ({ vci_devolvido, vci_quantidade, vci_valorun }) => (\r\n
\r\n {vci_devolvido == vci_quantidade ?\r\n \r\n {FormatNumber(vci_valorun, true)}\r\n :\r\n \r\n {FormatNumber(vci_valorun, true)}\r\n \r\n }\r\n
\r\n ),\r\n },\r\n {\r\n editable: true,\r\n title: 'Vlr. Total (R$)',\r\n align: 'right',\r\n render: ({ vci_devolvido, vci_quantidade, vci_valorun }) => (\r\n
\r\n {vci_devolvido == vci_quantidade ?\r\n \r\n {FormatNumber((vci_quantidade - vci_devolvido) * vci_valorun, true)}\r\n :\r\n \r\n {FormatNumber((vci_quantidade - vci_devolvido) * vci_valorun, true)}\r\n \r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: '8%',\r\n fixed: 'right',\r\n render: (record, e, indice) => (\r\n
\r\n \r\n
\r\n {record.editando ?\r\n salvarItem(record, indice)}\r\n icon={}\r\n /> :\r\n editarItem(record, indice)}\r\n icon={}\r\n />\r\n }\r\n \r\n \r\n {record.editando ?\r\n cancelarEdicaoItem(indice)}\r\n icon={}\r\n /> :\r\n excluirItem(record)}\r\n icon={}\r\n />\r\n }\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} dataSource={dadosItens} />\r\n \r\n \r\n \r\n { setOpenModalSenha(false); retornoModalSenha(retorno) }} dados={dadosSenha} />\r\n \r\n \r\n \r\n Quantidade Total de Itens: {quantidadeTot}\r\n \r\n \r\n Valor Total dos Itens (R$): {FormatNumber(valorTot, true)}\r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoCondicional from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerCondicional({imprimirCondicional}) {\r\n\r\n const [formManutencao, setFormManutencao] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosItens, setDadosItens] = useState([]);\r\n\r\n if (!!manutencao.dados) {\r\n formManutencao.setFieldsValue(manutencao.dados);\r\n dadosItens.sort((a, b) => b.vci_sequencia - a.vci_sequencia);\r\n } else {\r\n //formManutencao.resetFields();\r\n }\r\n\r\n function fecharDrawer() {\r\n formManutencao.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n setDadosItens([]);\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n destroyOnClose: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n }\r\n fecharDrawer={fecharDrawer}\r\n className=\"opc\"\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Form, Input, Typography, Modal, Button } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { getEmpresa } from \"../../../services/auth\";\r\n\r\nexport default function ModalAdicionarUsuario({ exibirModal, fecharModal, incluirRemoverUsuario }) {\r\n\r\n const [listaLocais, setListaLocais] = useState([]);\r\n const [form] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Realmente deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n form.resetFields();\r\n setListaLocais([]);\r\n }\r\n });\r\n };\r\n\r\n function verificarEmail() {\r\n if (!!form.getFieldValue('usu_email')) {\r\n api.get(`Usuario/Usuario?email=${form.getFieldValue('usu_email')}`).then((retornoEmail) => {\r\n if (!!retornoEmail.data) {\r\n incluirRemoverUsuario({ usu_email: retornoEmail.data.usu_email.endereco }, true, 'Usuário vinculado ao grupo com sucesso!');\r\n fecharModal();\r\n form.resetFields();\r\n setListaLocais([]);\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n }\r\n };\r\n\r\n function listarLocais() {\r\n if (!!form.getFieldValue('usu_email') && !!form.getFieldValue('usu_nome')) {\r\n api.get(`Usuario/ListarLocais?codigoEmpresa=${getEmpresa()}`).then((lista) => {\r\n if (!!lista.data) {\r\n let filiais = [];\r\n lista.data.forEach((local, indice) => {\r\n local.selected = false;\r\n filiais.push(local);\r\n if (indice + 1 === lista.data.length) {\r\n setListaLocais(filiais);\r\n }\r\n });\r\n }\r\n }).catch((err) => {\r\n console.log(err.response);\r\n });\r\n } else {\r\n setListaLocais([]);\r\n }\r\n };\r\n\r\n function selecionarLocal(id) {\r\n let lista = [...listaLocais];\r\n let indice = listaLocais.findIndex((local) => {\r\n return local.loc_id === id;\r\n });\r\n if (indice >= 0) {\r\n lista[indice].selected = !lista[indice].selected;\r\n }\r\n setListaLocais(lista);\r\n };\r\n\r\n function selecionarTodos(checked) {\r\n let lista = [...listaLocais];\r\n lista.forEach((local) => {\r\n local.selected = checked;\r\n });\r\n setListaLocais(lista);\r\n };\r\n \r\n function incluirUsuario(values){\r\n //values.usu_ativo = true;\r\n /*\r\n NÃO IMPLEMENTADO\r\n api.post(`Usuario/Incluir?email=${values.usu_email}&nome=${values.usu_nome}`).then((retornoUsuario) => {\r\n if (!!retornoUsuario.data) {\r\n let informacoesUsuario = {\r\n id: retornoUsuario.data,\r\n nome: values.usu_nome,\r\n email: values.usu_email,\r\n chave: (values.usu_email + \"|\" + values.usu_nome)\r\n }\r\n\r\n }\r\n }, err => {\r\n console.log(err);\r\n });*/\r\n };\r\n\r\n return (\r\n\r\n 0 ?\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n : null\r\n }\r\n width={720}\r\n maskClosable={false}\r\n >\r\n \r\n \r\n \r\n \r\n Adicione um novo usuário.\r\n \r\n \r\n \r\n \r\n { verificarEmail() }} />\r\n \r\n \r\n \r\n \r\n { listarLocais() }} />\r\n \r\n \r\n \r\n {/*listaLocais.length > 0 &&\r\n
{ selecionarTodos(e.target.checked) }} />,\r\n align: 'center',\r\n render: ({ selected, loc_id }) => (\r\n { selecionarLocal(loc_id) }} />\r\n ),\r\n },\r\n {\r\n title: 'Filial',\r\n align: 'left',\r\n render: ({ loc_id, loc_descricao }) => (\r\n
\r\n {loc_id} - {loc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CNPJ',\r\n render: ({ loc_cnpj }) => (\r\n
\r\n {loc_cnpj.numero}\r\n
\r\n ),\r\n },\r\n ]\r\n } />\r\n */}\r\n \r\n \r\n\r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Form, InputNumber, Select, Button, Tag, Radio, Card, Modal, notification, Input } from \"antd\";\r\nimport { ArrowRightOutlined, ArrowLeftOutlined, ExclamationCircleOutlined, CalculatorOutlined, CloseOutlined, HighlightOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport TextArea from \"rc-textarea\";\r\n\r\nexport default function ModalCalcularLimite({ formulario, exibirModal, setOpenModalCalcular }) {\r\n\r\n const [step, setStep] = useState(0);\r\n const [estadoCivil, setEstadoCivil] = useState([]);\r\n const [mostraRendaConj, setmostraRendaConj] = useState(false);\r\n const [valorsimulado, setvalorsimulado] = useState();\r\n const [listaQuestoes, setListaQuestoes] = useState([]);\r\n const [parametrosEmpresa, setParametrosEmpresa] = useState({});\r\n const [form] = Form.useForm();\r\n const [dadosResposta, setDadosResposta] = useState([]);\r\n const [valores, setValores] = useState({});\r\n\r\n useEffect(() => {\r\n listarEstadoCivil();\r\n buscarQuestoes();\r\n buscarParametrosEmpresa()\r\n }, []);\r\n\r\n /*\r\n const onNext = () => onChange(step + 1);\r\n const onPrevious = () => onChange(step - 1);\r\n const onChange = (nextStep) => {\r\n setStep(nextStep < 0 ? 0 : nextStep > 2 ? 2 : nextStep);\r\n };*/\r\n\r\n function showRendaConjunta(ecv_id) {\r\n if (ecv_id === 2) {\r\n setmostraRendaConj(true);\r\n } else {\r\n setmostraRendaConj(false);\r\n }\r\n }\r\n\r\n function listarEstadoCivil() {\r\n api.get(`EstadoCivil/Listar`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setEstadoCivil(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n function buscarQuestoes() {\r\n api.get(`QuestaoLimiteCredito/Listar`).then(\r\n res => {\r\n setListaQuestoes(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function buscarParametrosEmpresa() {\r\n api.get(`ParametroEmpresa/BuscarParametros`).then(\r\n res => {\r\n setParametrosEmpresa(res.data);\r\n }\r\n ).catch(\r\n erro => { console.log(erro); }\r\n )\r\n }\r\n\r\n function adicionarResposta(registro, pergunta) {\r\n let respostas = [...dadosResposta];\r\n let id = registro.target.value;\r\n let dadoPergunta = { ...pergunta };\r\n if (dadoPergunta.qlc_tiporesposta === 2) {\r\n dadoPergunta.respostalimitecreditos = pergunta.respostalimitecreditos.filter(respostas => (respostas.rlc_id === id))[0];\r\n } else {\r\n dadoPergunta.respostalimitecreditos = id;\r\n }\r\n let respEditar = respostas.find((resp) => resp.qlc_id === pergunta.qlc_id);\r\n if (respEditar) {\r\n if (respEditar.qlc_tiporesposta === 2) {\r\n respEditar.respostalimitecreditos = pergunta.respostalimitecreditos.filter(respostas => (respostas.rlc_id === id))[0];\r\n } else {\r\n respEditar.respostalimitecreditos = id;\r\n }\r\n } else {\r\n respostas.push(dadoPergunta);\r\n }\r\n setDadosResposta(respostas);\r\n\r\n\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosResposta && dadosResposta.length > 0) {\r\n calculoSimulado()\r\n }\r\n }, [dadosResposta]);\r\n\r\n function calculoSimulado() {\r\n let dados = {\r\n pef_renda: (!!form.getFieldValue().pef_renda ? parseFloat(form.getFieldValue().pef_renda) : 0.0),\r\n pef_rendaconjuge: (!!form.getFieldValue().pef_rendaconjuge ? parseFloat(form.getFieldValue().pef_rendaconjuge) : 0.0),\r\n questionario: dadosResposta\r\n }\r\n let porcentagemBase = ((!!parametrosEmpresa.par_percentuallimitecredito) ? parametrosEmpresa.par_percentuallimitecredito : 30) / 100;\r\n let vlrbase = 0;\r\n let vlrsim = 0.0;\r\n if (!!dadosResposta && dadosResposta.length > 0) {\r\n let porcentagem = 0.0;\r\n dadosResposta.forEach((questao) => {\r\n if (questao.qlc_tiporesposta == 2) {\r\n if (questao.respostalimitecreditos.rlc_somasubtrai == 1) {\r\n porcentagem += (questao.respostalimitecreditos.rlc_percentual / 100);\r\n } else {\r\n porcentagem -= (questao.respostalimitecreditos.rlc_percentual / 100);\r\n }\r\n }\r\n });\r\n\r\n if (!!dados.pef_rendaconjuge) {\r\n vlrbase = (dados.pef_renda + dados.pef_rendaconjuge) * porcentagemBase;\r\n vlrsim = vlrbase * porcentagem;\r\n vlrsim = (porcentagem !== 0) ? vlrbase + (vlrbase * porcentagem) : vlrbase;\r\n } else {\r\n vlrbase = dados.pef_renda * porcentagemBase;\r\n vlrsim = (porcentagem !== 0) ? vlrbase + (vlrbase * porcentagem) : vlrbase;\r\n }\r\n }\r\n\r\n setvalorsimulado(vlrsim);\r\n setValores(dados);\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Realmente deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setOpenModalCalcular(false);\r\n formulario.setFieldsValue({ pef_renda: null, ecv_id: null, pef_rendaconjuge: null });\r\n setDadosResposta({});\r\n setStep(0);\r\n }\r\n });\r\n };\r\n\r\n function salvarLimite() {\r\n let dados = { ...valores };\r\n let pergunta = {};\r\n let resposta = {};\r\n dados.questionario.forEach((q) => {\r\n pergunta.qlc_tiporesposta = q.qlc_tiporesposta;\r\n resposta.rlc_somasubtrai = q.respostalimitecreditos.rlc_somasubtrai;\r\n resposta.rlc_percentual = q.respostalimitecreditos.rlc_percentual;\r\n q.pergunta = pergunta;\r\n q.resposta = resposta;\r\n });\r\n setCarregando(true);\r\n api.post(`AnaliseCredito/GerarLimite`, dados).then(\r\n res => {\r\n formulario.setFieldsValue({ cli_valorlimitecredito: res.data });\r\n // notification.success({ message: 'Operação concluída', description: \"Limite de Crédito foi gerado!\" });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n\r\n formulario.setFieldsValue({ pef_renda: null, ecv_id: null, pef_rendaconjuge: null });\r\n setDadosResposta({});\r\n setStep(0);\r\n setOpenModalCalcular(false);\r\n setCarregando(false);\r\n }\r\n );\r\n };\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n \r\n \r\n \r\n calculoSimulado()} rules={[{ required: true, message: 'Informe a Renda.' }]}>\r\n `R$ ${value}`}\r\n parser={value => value.replace('R$ ', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {mostraRendaConj &&\r\n \r\n `R$ ${value}`}\r\n parser={value => value.replace('R$ ', '')}\r\n />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${step + 1} / ${listaQuestoes.length}`}\r\n \r\n }\r\n >\r\n
\r\n \r\n
\r\n {listaQuestoes.map((questoes, idx) => {\r\n {\r\n return step === idx ?\r\n \r\n {questoes.qlc_tiporesposta === 2 &&\r\n { adicionarResposta(registro, questoes) }}>\r\n {questoes.respostalimitecreditos.map((resposta => (\r\n {resposta.rlc_resposta}\r\n )))}\r\n \r\n }\r\n {questoes.qlc_tiporesposta === 1 &&\r\n { adicionarResposta(registro, questoes) }} rows={4} />\r\n }\r\n : null\r\n }\r\n })}\r\n \r\n \r\n \r\n \r\n {step !== 0 &&\r\n \r\n }\r\n \r\n \r\n {step !== listaQuestoes.length - 1 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Simulação (R$): {FormatNumber(valorsimulado, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Typography, Form, Input, Checkbox, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../../services/api\";\r\nimport { novaAbaNavegador } from \"../../../services/funcoes\";\r\nimport { MaskFormat, FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalCartaCorrecaoNotaFiscal({ dadosNota = {}, exibirModal, fecharModal }) {\r\n const [form] = Form.useForm();\r\n const [exibeCondicoes, setExibeCondicoes] = useState(true);\r\n const retornoProcessamento = {\r\n cancelamentoNfeHomologado: 101,\r\n eventoRegistradoEVinculadoANfe: 135\r\n }\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const salvarDados = record => {\r\n let dados = { ...dadosNota };\r\n\r\n dados.textoCorrecao = form.getFieldValue().textoCorrecao;\r\n if (!!dados.textoCorrecao) {\r\n if (dados.textoCorrecao.length >= 15) {\r\n api.post('NotaFiscal/EmitirCartaCorrecao', dados).then(\r\n res => {\r\n if (!!res.data) {\r\n let mensagemCancelamento = res.data.retorno.retEvento[0].infEvento.cStat + \"-\" + res.data.retorno.retEvento[0].infEvento.xMotivo;\r\n if (res.data.retorno.retEvento[0].infEvento.cStat == retornoProcessamento.eventoRegistradoEVinculadoANfe) {\r\n if (!!res.data.retorno.retEvento[0].infEvento.chNFe) {\r\n novaAbaNavegador(`Danfe/GerarCce?chaveNFe=${res.data.retorno.retEvento[0].infEvento.chNFe}&sequenciaEvento=${res.data.retorno.retEvento[0].infEvento.nSeqEvento}`);\r\n }\r\n notification.success({ description: mensagemCancelamento, message: `Carta de correção eletrônica referente a NF-e Nº: ${dadosNota.ntf_numero} vinculada com sucesso !` });\r\n } else {\r\n notification.warning({ description: mensagemCancelamento, message: `Não foi possível vincular a carta de correção eletrônica da NF-e Nº: ${dadosNota.ntf_numero}, verefique os erros ocorridos!` });\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModal();\r\n }\r\n );\r\n } else {\r\n notification.warning({ description: 'O tamanho mínimo da carta de correção é de 15 caracteres', message: 'Aviso' });\r\n }\r\n } else {\r\n notification.warning({ description: 'O tamanho mínimo da carta de correção é de 15 caracteres', message: 'Aviso' });\r\n }\r\n };\r\n\r\n return (\r\n \r\n Emitir Carta de Correção\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n
\r\n \r\n
\r\n Chave da NF-e: {dadosNota.ntf_chavenfe} \r\n \r\n \r\n \r\n \r\n Destinatário: {dadosNota.ntf_nomedest} \r\n \r\n \r\n CPF/CNPJ: {MaskFormat(dadosNota.ntf_cnpjcpfdest, '', true)}\r\n \r\n \r\n \r\n \r\n Modelo: {dadosNota.ntf_modelo}\r\n \r\n \r\n Emitida em: {moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY HH:mm:ss')}\r\n \r\n \r\n \r\n \r\n Tipo de Nota: {dadosNota.tip_descricao}\r\n \r\n \r\n Valor total da Nota (R$): {FormatNumber(dadosNota.valor_total, true)} \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { setExibeCondicoes(!exibeCondicoes) }}> Visualizar Condições de uso da Carta de Correção \r\n \r\n \r\n \r\n \r\n \r\n {exibeCondicoes &&
\r\n \r\n A Carta de Correção é disciplinada pelo § 1º-A do art. 7º do Convênio S/ N, de 15 de dezembro de 1970 e pode ser utilizada para regularização de erro ocorrido na emissão de documento fiscal, desde que o erro não esteja relacionado com:\r\n

\r\n I - as variáveis que determinam o valor do imposto tais como: base de cálculo, alíquota, diferença de preço, quantidade,\r\n valor da operação ou da prestação;
\r\n II - a correção de dados cadastrais que implique mudança do remetente ou do destinatário;
\r\n III - a data de emissão ou de saída.\r\n
\r\n
}\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Checkbox, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalCfop({ exibirModal, fecharModal, formulario, adicionarCfop, listaDestinoOperacao, listaCategoriaOperacao, dadosEditando }) {\r\n const [{ listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModal && !!formulario) {\r\n var lista = [];\r\n if (!!formulario.getFieldValue().cfo_id) {\r\n lista.push({ name: \"cfo_id\", campo: \"Id\", value: formulario.getFieldValue().cfo_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [exibirModal]);\r\n\r\n function retornaDadosCFOP(values) {\r\n if (dadosEditando.cfo_id !== values.cfo_id) {\r\n let listaDados = [...listaSelectPaginacao.itens];\r\n let dados = listaDados.find(o => o.cfo_id == values.cfo_id);\r\n values.cfo_cfop = dados.cfo_cfop;\r\n values.cfo_descricao = dados.cfo_descricao;\r\n }\r\n adicionarCfop(values);\r\n };\r\n\r\n\r\n return (\r\n\r\n { formulario.submit() }}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n destroyOnClose\r\n maskClosable={false}\r\n width={700}\r\n >\r\n
\r\n
retornaDadosCFOP(values)} initialValues={{ remember: true }}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n {item.cfo_cfop} - {item.cfo_descricao}\r\n )} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Radio, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined} from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { info } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalContaGerencial({ formContaGerencial, formulario, exibirModalContaGerencial, fecharModalContaGerencial, listaConfigContaGerencial, setListaConfigContaGerencial }) {\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalContaGerencial();\r\n }\r\n });\r\n };\r\n\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n\r\n const listaTipo = [\r\n { 'value': 1, 'label': 'Juros Recebidos' },\r\n { 'value': 2, 'label': 'Juros Pagos' },\r\n { 'value': 3, 'label': 'Descontos Obtidos' },\r\n { 'value': 4, 'label': 'Descontos Concedidos' },\r\n { 'value': 5, 'label': 'Multas Pagas' },\r\n { 'value': 6, 'label': 'Multas Recebidas' }\r\n ];\r\n\r\n useEffect(() => {\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&PageNumber=1&PageSize=1000`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false && item.nivel === 0}));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n })\r\n }, []);\r\n\r\n function adicionarConfig(values) {\r\n let listaTemp = [...listaConfigContaGerencial];\r\n\r\n if (listaTemp.filter(item => { return item.cgc_tipo === values.cgc_tipo }).length > 0) {\r\n info('Operação não permitida! Registro já existente para o tipo de valor selecionado!');\r\n return;\r\n }\r\n\r\n\r\n\r\n if (!!values.key) {\r\n let index = listaTemp.findIndex(i => i.key === values.key);\r\n listaTemp.splice(index, 1);\r\n } else {\r\n values.key = listaTemp.length + 1;\r\n }\r\n values.cgc_descricaoTipo = listaTipo.filter(item => { return item.value === values.cgc_tipo })[0].label;\r\n values.cgc_descricaocontadestino = listaContaGerencial.filter(item => { return item.ctg_id === values.cgc_contagerencialdestino })[0].ctg_descricao;\r\n values.ctg_id = formContaGerencial.getFieldValue()?.ctg_id;\r\n\r\n listaTemp.push(values);\r\n setListaConfigContaGerencial(listaTemp);\r\n fecharModalContaGerencial();\r\n };\r\n\r\n return (\r\n { formulario.submit() }}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n destroyOnClose \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {listaTipo.map(item => (\r\n \r\n \r\n {item.label}\r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tabs, Tag, Modal, Divider, Table } from \"antd\";\r\nimport { ArrowUpOutlined, ArrowDownOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../../services/api';\r\nimport { FormatFone } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalContatoCliente({ exibirModalContatoCliente, fecharModalContatoCliente, PessoaId }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [dados, setDados] = useState({});\r\n\r\n const onCloseModal = () => {\r\n fecharModalContatoCliente();\r\n };\r\n useEffect(() => {\r\n BuscarDadosCliente(PessoaId);\r\n }, [exibirModalContatoCliente]);\r\n\r\n async function BuscarDadosCliente(IdPessoa) {\r\n if (!!IdPessoa) {\r\n var dadosCliente;\r\n await api.get(`Cliente/BuscarByIdPessoa/${IdPessoa}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (!!res.data) {\r\n dadosCliente = res.data;\r\n setDados(res.data)\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n return (\r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n
\r\n
(\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ tpt_descricao }) => (\r\n
\r\n {tpt_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ramal',\r\n render: ({ psc_ramal }) => (\r\n
\r\n {psc_ramal}\r\n
\r\n ),\r\n },\r\n ]\r\n } locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pem_email}\r\n \r\n \r\n \r\n E-mail principal\r\n \r\n \r\n \r\n \r\n NF-e\r\n \r\n \r\n \r\n \r\n Cobrança\r\n \r\n \r\n \r\n \r\n Promoção\r\n \r\n \r\n \r\n \r\n Vencimento de Parcela\r\n \r\n \r\n \r\n \r\n Boleto\r\n \r\n \r\n \r\n\r\n \r\n ),\r\n },\r\n ]\r\n } locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n {toc_descricao}\r\n \r\n \r\n {out_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Form, TimePicker, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalDefinirHorario({ id, onSave, exibirModal, fecharModal }) {\r\n\r\n const [form] = Form.useForm();\r\n const format = 'HH:mm';\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const onSaveModal = (values) => {\r\n onSave(id, false, false, values.horaInicial, values.horaFinal);\r\n fecharModal();\r\n }\r\n\r\n return (\r\n form.submit()}\r\n okText={\r\n <>\r\n Definir\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n ({\r\n validator(_, value) {\r\n if (!value || getFieldValue('horaInicial') < value) {\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(new Error('Horário final não pode ser menor que o inicial.'));\r\n },\r\n\r\n })\r\n ]}\r\n label=\"Até\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Input, Checkbox, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalEmail({ form, listaEmail, exibirModalEmail, fecharModalEmail }) {\r\n\r\n const onFinish = values => {\r\n if (!validarEmail(values.pem_email)) {\r\n notification.info({ message: 'Favor informar um e-mail válido!' })\r\n } else {\r\n let indice = values.indice;\r\n delete values.indice;\r\n let lista = [...listaEmail.dadosEmail];\r\n if (indice >= 0) {\r\n lista[indice] = values;\r\n } else {\r\n let verificaEmailAdd = lista.filter(e => e.pem_email === form.getFieldValue().pem_email);\r\n if (verificaEmailAdd.length > 0) {\r\n fecharModalEmail();\r\n notification.info({ message: 'E-mail já adicionado!' });\r\n } else {\r\n if (lista.length > 0) {\r\n values.pem_emailprincipal = false;\r\n } else {\r\n values.pem_emailprincipal = true;\r\n }\r\n lista.push(values);\r\n }\r\n }\r\n listaEmail.setDadosEmail(lista);\r\n fecharModalEmail();\r\n }\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalEmail();\r\n }\r\n });\r\n };\r\n\r\n function validarEmail(email) {\r\n let reg = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n return reg.test(email);\r\n };\r\n\r\n return (\r\n {\r\n form.resetFields();\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n E-mail Ativo?\r\n \r\n \r\n \r\n \r\n E-mail Principal?\r\n \r\n \r\n \r\n \r\n Enviar DF-e?\r\n \r\n \r\n \r\n \r\n Enviar Carta de Cobrança?\r\n \r\n \r\n \r\n \r\n Enviar Promoção?\r\n \r\n \r\n \r\n \r\n Enviar Boleto?\r\n \r\n \r\n \r\n \r\n Enviar Vencimento Parcela?\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Typography, Modal } from \"antd\";\r\nimport { CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport { SelecoesEmpresa } from \"../../../pages/login/pages\";\r\nimport { getNomeEmpresa, getNomeLocal, getStatusFilial } from '../../../services/auth';\r\n\r\nexport default function ModalEmpresaFilial({ exibirModalEmpresaFilial, fecharModalEmpresaFilial }) {\r\n\r\n const onCloseModal = () => {\r\n fecharModalEmpresaFilial()\r\n };\r\n\r\n return (\r\n\r\n \r\n Alterar Acesso\r\n \r\n }\r\n footer={null}\r\n maskClosable={false}\r\n >\r\n \r\n \r\n \r\n Você está acessando: {`${getNomeEmpresa()} / ${getNomeLocal()}${!getStatusFilial() ? ' (INATIVO)' : ''}`}\r\n \r\n \r\n \r\n \r\n \r\n\r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Typography, Modal, notification, Form, Select } from 'antd';\r\nimport { CloseOutlined, PlusOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport { getNomeEmpresa, getNomeLocal, getStatusFilial } from '../../../services/auth';\r\nimport { FormGW, SelectPaginacao } from \"../../../components\";\r\nimport api from \"../../../services/api\";\r\n\r\n\r\nimport { selectPaginadoActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalEmpresaFilialBusca({ exibirModalEmpresaFilial, fecharModalEmpresaFilial, relatorio, rels, form }) {\r\n\r\n const [codigoEmpresa, setCodigoEmpresa] = useState(null);\r\n const [codigoLocal, setCodigoLocal] = useState(null);\r\n const [relNovo, setRelNovo] = useState();\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalEmpresaFilial();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue()?.emp_id) {\r\n setCodigoEmpresa(form.getFieldValue()?.emp_id);\r\n carregarLocais(form.getFieldValue()?.emp_id);\r\n }\r\n\r\n }, [form.getFieldValue().emp_id]);\r\n\r\n useEffect(() => {\r\n if (!!codigoLocal) {\r\n carregarDadosEmpresa();\r\n }\r\n }, [codigoLocal]);\r\n\r\n function carregarDadosEmpresa() {\r\n var rel = {};\r\n rel.Nome = relatorio.nome;\r\n rel.emp_id = codigoEmpresa;\r\n rel.loc_id = !codigoLocal ? 0 : codigoLocal;\r\n rel.QuantidadeColuna = relatorio.quantidadeColuna;\r\n rel.JsonRelatorio = relatorio.jsonRelatorio;\r\n setRelNovo(rel);\r\n }\r\n\r\n function carregarLocais(codEmpresa) {\r\n let lista = [];\r\n lista.push({ name: \"filial\", campo: \"codigoEmpresa\", value: codEmpresa });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n function onFinish () {\r\n api.post(`RelatorioModeloEtiqueta/Incluir`, relNovo).then(\r\n res => {\r\n notification.warning({ description: 'Modelo de etiqueta enviado com sucesso!', message: 'Aviso' });\r\n form.resetFields();\r\n fecharModalEmpresaFilial(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n return (\r\n\r\n {\r\n form.resetFields();\r\n onCloseModal();\r\n }}\r\n onOk={() => //form.submit()\r\n onFinish()\r\n }\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n \r\n
\r\n \r\n Você está acessando: {`${getNomeEmpresa()}/ ${getNomeLocal()}${!getStatusFilial() ? ' (INATIVO)' : ''}`}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n Relatório: {`${rels}`} \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {\r\n setCodigoEmpresa(value);\r\n }} order=\"emp_razaosocial\"\r\n conteudo={\r\n e => ({e.emp_nomefantasia}
Razao Social: {e.emp_razaosocial}
)\r\n } />\r\n
\r\n \r\n \r\n {form.getFieldValue()?.emp_id && \r\n \r\n \r\n setCodigoLocal(valor)} conteudo={Local => (\r\n {Local.loc_descricao}{!Local.loc_ativo ? ' (INATIVO)' : ''}\r\n )} />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n\r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { listagemActions, manutencaoActions, selectPaginadoActions } from \"../../../actions\";\r\nimport api from \"../../../services/api\";\r\nimport { FormGW, InputCep, SelectPaginacao } from \"../../../components\";\r\nimport SelectPaginado from \"../../selectPaginado\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport { retornaCep } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalEndereco({ form, listaEndereco, exibirModalEndereco, fecharModalEndereco, exibirPais = true, produtorRural = false, isEstrangeiro = false, setIsEstrangeiro }) {\r\n\r\n const [{ ui, manutencao, selectPaginado }, dispatch] = useStateValue();\r\n const [cidade, setCidade] = useState({});\r\n\r\n useEffect(() => {\r\n if (exibirModalEndereco) {\r\n let lista = [];\r\n if (form.getFieldValue().indice >= 0) {\r\n if (!!form.getFieldValue().pse_id) {\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: form.getFieldValue().pse_id });\r\n }\r\n } if (isEstrangeiro == true) {\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: form.getFieldValue().pse_id });\r\n }\r\n if (isEstrangeiro == false || isEstrangeiro == undefined) {\r\n lista.push({ name: \"pse_id\", campo: \"Sigla\", value: \"BR\" });\r\n }\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [exibirModalEndereco]);\r\n\r\n async function onFinish(values) {\r\n debugger;\r\n if (values.pie_inscricaoestadual != null && values.pie_inscricaoestadual != 'undefined') {\r\n debugger;\r\n let verificacao = (await api.get(`pessoaEndereco/VerificarIE?pie_inscricaoestadual=${values.pie_inscricaoestadual}&est_sigla=${values.est_sigla}`)).data;\r\n if (verificacao != (values.pie_inscricaoestadual.replace(/[^0-9]/g, ''))) { // compara o IE da verificacao e igual a inscricao estadual sem os caracteres\r\n debugger;\r\n notification.warning({ message: 'Aviso!', description: verificacao })\r\n return;\r\n }\r\n }\r\n let lista = [...listaEndereco.dadosEndereco];\r\n let indice = values.indice;\r\n if (values.log_logradouro.length <= 3) {\r\n notification.warning({ message: 'Aviso!', description: 'Logradouro deve conter mais de 3 caracteres!' });\r\n return false;\r\n }\r\n delete values.indice;\r\n values.pse_nome = !!values.pse_id ? form.getFieldValue().pse_nome : '';\r\n\r\n values.cid_descricao = !!values.cid_nome ? values.cid_nome : form.getFieldValue().cid_descricao;\r\n values.pee_ativo = true;\r\n if (listaEndereco.dadosEndereco.length === 0) {\r\n values.pee_enderecoprincipal = true;\r\n }\r\n values.uf = values.est_sigla;\r\n values.logradouro = values.log_logradouro;\r\n values.enderecoCompleto = values.log_logradouro + ',' + values.pee_numero + '-' + values.bai_nome + '-' + values.pee_complemento + '-' + values.cep_cep + '-' + values.cid_descricao + '-' + values.est_sigla;\r\n let tipoEnd = await listarTpEndereco(values.tpe_id);\r\n values.tpe_descricao = tipoEnd.tpe_descricao\r\n if (!isEstrangeiro) {\r\n values.cep_id = cidade.cep_id;\r\n } else {\r\n values.bai_id = null;\r\n values.cep_id = null;\r\n values.cid_id = null;\r\n values.uf = \"\";\r\n }\r\n\r\n values.pais = await listarPais(values.pse_id);\r\n if (indice >= 0) {\r\n lista[indice] = values;\r\n } else {\r\n lista.push(values);\r\n }\r\n listaEndereco.setDadosEndereco(lista);\r\n notification.success({ message: 'Sucesso', description: 'Endereço incluído', });\r\n form.resetFields();\r\n fecharModalEndereco();\r\n };\r\n\r\n async function listarPais(pseId) {\r\n let req = await api.get(`Pais/BuscarPorId/${pseId}`);\r\n if (req.status === 200 && !!req.data) {\r\n return req.data;\r\n }\r\n return {};\r\n }\r\n\r\n async function listarTpEndereco(tpeId) {\r\n let req = await api.get(`TipoEndereco/Listar?Filtro=${tpeId}`);\r\n if (req.status === 200 && !!req.data) {\r\n return req.data.items[0];\r\n }\r\n return {};\r\n }\r\n\r\n\r\n async function verificaCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({\r\n cid_descricao: retornoCep.cid_descricao,\r\n est_sigla: retornoCep.est_sigla,\r\n pse_id: retornoCep.pse_id,\r\n bai_nome: retornoCep.bai_nome ?? '',\r\n log_logradouro: retornoCep.log_logradouro ?? '',\r\n })\r\n setCidade(retornoCep);\r\n let lista = [];\r\n if (!!retornoCep.pse_id) {\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: retornoCep.pse_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n } else {\r\n form.setFieldsValue({ cep_cep: '' });\r\n setFocusCep();\r\n\r\n }\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalEndereco();\r\n }\r\n });\r\n };\r\n\r\n\r\n // useEffect(() => {\r\n // verificaCep(form.getFieldValue().cep_cep);\r\n // }, [form.getFieldValue().cep_cep])\r\n\r\n const inputRef = React.createRef();\r\n useEffect(() => {\r\n setTimeout(() => {\r\n setFocusCep();\r\n }, 500);\r\n }, [exibirModalEndereco, inputRef.current]);\r\n\r\n function setFocusCep() {\r\n try {\r\n if (!!!form.getFieldValue().cep_cep) {\r\n let element = document.getElementById(\"cep_cep\");\r\n if (element) {\r\n element.focus();\r\n\r\n }\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }\r\n\r\n async function alterarStatusEstrangeiro(pse_id) {\r\n if (!!pse_id) {\r\n let pais = (await api.get(`Pais/BuscarPorId/${pse_id}`)).data;\r\n if (!!pais && pais.pse_id != 33) {\r\n setIsEstrangeiro(true);\r\n } else {\r\n setIsEstrangeiro(false);\r\n }\r\n }\r\n };\r\n\r\n return (\r\n {\r\n form.resetFields();\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n
\r\n \r\n alterarStatusEstrangeiro(value)} conteudo={\r\n pse => ({pse.pse_nome})\r\n } />\r\n \r\n }\r\n {!isEstrangeiro && \r\n verificaCep(cep.currentTarget.value)} onPressEnter={(cep) => verificaCep(cep.target.value)} />\r\n }\r\n {!isEstrangeiro && \r\n \r\n \r\n \r\n }\r\n {isEstrangeiro && \r\n \r\n \r\n \r\n }\r\n {!isEstrangeiro && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({te.tpe_descricao})\r\n } />\r\n \r\n \r\n {!!produtorRural &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Form, Select, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons';\r\n\r\nimport Data from '../../data';\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport SelectPaginado from \"../../../components/selectPaginado\";\r\n\r\nexport default function ModalGerarComissao({ exibirModal, fecharModal, dadosModal }) {\r\n \r\n const [formGerarComissao] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n \r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosModal.dataInicial) {\r\n formGerarComissao.setFieldsValue({ dataInicial: dadosModal.dataInicial });\r\n }\r\n if (!!dadosModal.dataFinal) {\r\n formGerarComissao.setFieldsValue({ dataFinal: dadosModal.dataFinal });\r\n }\r\n }, [dadosModal]);\r\n\r\n\r\n function salvarDados() {\r\n if (!(!!formGerarComissao.getFieldValue().dataInicial)) {\r\n notification.warning({ message: 'Data inicial inválida', description: \"Favor informar uma data inicial válida!\" });\r\n } else if (!(!!formGerarComissao.getFieldValue().dataFinal)) {\r\n notification.warning({ message: 'Data final inválida', description: \"Favor informar uma data final válida!\" });\r\n } else if (!(!!formGerarComissao.getFieldValue().ven_id)) {\r\n notification.warning({ message: 'Vendedor selecionado inválido', description: \"Favor informar uma vendedor válido!\" });\r\n } else {\r\n api.get(`Comissao/RecalcularComissao?dataFinal=${formGerarComissao.getFieldValue().dataFinal.format('YYYY-MM-DD')}&dataInicial=${formGerarComissao.getFieldValue().dataInicial.format('YYYY-MM-DD')}&idVendedor=${formGerarComissao.getFieldValue().ven_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n if (res.data) {\r\n Modal.success({\r\n content: 'Comissão gerada com sucesso!',\r\n });\r\n }else{\r\n Modal.warning({\r\n content: 'Não foi possível gerar a comissão!',\r\n });\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModal();\r\n }\r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n Gerar Comissão\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n ({ven.ven_id} - {ven.pes_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloudUploadOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { novaAbaNavegador } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalExibirAcaoUsuario({ dadosModal, exibirModal, fecharModal }) {\r\n\r\n const onCloseModal = () => {\r\n fecharModal();\r\n };\r\n\r\n return (\r\n \r\n Fechar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {JSON.stringify(dadosModal.data)}\r\n \r\n \r\n \r\n
\r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Modal, Card } from \"antd\";\r\nimport { ExclamationCircleOutlined, DownloadOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { linkApi } from \"../../../services/auth\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalGerarRemessa({ exibirModalGerarRemessa, fecharModalGerarRemessa, dadosSelecionados, download }) {\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalGerarRemessa();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n Download\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n
\r\n Informações\r\n \r\n \r\n Valor Total (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosSelecionados.ban_descricao}\r\n \r\n \r\n Quant. Boletos: {dadosSelecionados.rem_qtdeboletos}\r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosSelecionados.rem_valortotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Typography, Select, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalInstrucaoRemessa({ exibirModalInstrucaoRemessa, fecharModalInstrucaoRemessa, form, parcela, onOk, selecionado }) {\r\n\r\n const [listaInstrucao, setListaInstrucao] = useState([]);\r\n const [formInstrucao] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalInstrucaoRemessa();\r\n }\r\n });\r\n };\r\n\r\n function onFinish(values) {\r\n let isp_codigo = listaInstrucao.find((instrucao) => { return instrucao.isp_id === values.isp_id });\r\n onOk(isp_codigo);\r\n };\r\n\r\n useEffect(() => {\r\n debugger;\r\n if (!!parcela && exibirModalInstrucaoRemessa && !!selecionado) {\r\n debugger;\r\n let parSelec = null;\r\n let cancelados = false;\r\n if (Array.isArray(parcela) === true) {\r\n parSelec = parcela.filter(parcela => parcela.selecionado === true);\r\n cancelados = parcela.some(item => item.ntf_status === 2);\r\n }\r\n if (typeof parcela === 'object' && parcela !== null && Array.isArray(parcela) === false) {\r\n parSelec = parcela;\r\n cancelados = (parcela.ntf_status === 2 ) ? true : false;\r\n }\r\n let conta = !!form.getFieldValue().ctc_id ? form.getFieldValue().ctc_id : parcela.ctc_id;\r\n if (conta == null) {\r\n conta = parSelec[0].ctc_id;\r\n }\r\n api.get(`InstrucaoBoleto/Listar?Descricao=${conta}`).then((res) => {\r\n if (res.status === 200) {\r\n //setListaInstrucao(res.data);\r\n if (cancelados) {\r\n let baixa = ['10', '18', '23', '02', '34', '46'];\r\n let dadosFiltrados = res.data.filter(item => baixa.includes(item.isp_codigo));\r\n setListaInstrucao(dadosFiltrados);\r\n } else {\r\n setListaInstrucao(res.data);\r\n }\r\n }\r\n }).catch(err => {\r\n console.log(err);\r\n });\r\n }\r\n else {\r\n fecharModalInstrucaoRemessa();\r\n }\r\n }, [exibirModalInstrucaoRemessa]);\r\n\r\n return (\r\n formInstrucao.submit()}\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
{ onFinish(values) }}>\r\n \r\n
\r\n \r\n Abaixo informe a Instrução que deseja realizar.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Modal } from \"antd\";\r\nimport { CheckOutlined, ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport api from \"../../../services/api\";\r\n\r\nimport SelectPaginado from \"../../../components/selectPaginado\";\r\n\r\nexport default function ModalInutilizacaoNfe({ exibirModal, fecharModal }) {\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ justificativa: 'Solicitada a inutilização dos números de NF-e da respectiva série fiscal pois a numeração não foi utilizada por motivo de rejeição de NF-e ou falha no processo de emissão do sistema.' });\r\n }, []);\r\n\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n function validarNumeracao(values) {\r\n let qtdNumero = parseInt(values.nroFinal) - parseInt(values.nroInicial);\r\n if (parseInt(values.nroInicial) == 0 || parseInt(values.nroFinal) == 0) {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Número Inicial e Final devem ser diferente de 0!
\r\n
\r\n \r\n ),\r\n });\r\n } else if (qtdNumero < 0) {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Número Inicial é menor que número final!
\r\n
\r\n \r\n ),\r\n });\r\n } else if (qtdNumero > 50) {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Tem certeza que deseja inutilizar uma faixa de ' + qtdNumero + ' Notas ?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n solicitarInutilizacaoNumeracao(values);\r\n fecharModal();\r\n }\r\n });\r\n } else {\r\n solicitarInutilizacaoNumeracao(values);\r\n }\r\n };\r\n\r\n function solicitarInutilizacaoNumeracao(values) {\r\n let inutilizacao = {\r\n ser_id: values.ser_id,\r\n numeroInicial: parseInt(values.nroInicial),\r\n numeroFinal: parseInt(values.nroFinal),\r\n justificativa: values.justificativa\r\n };\r\n\r\n api.post(`NotaFiscal/InutilizarPorFaixa`, inutilizacao).then((dados) => {\r\n console.log(\"dados inutilizados\", dados);\r\n if (dados.status === 200) {\r\n if (dados.data.retorno.cStat == 241) {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
{`Números solicitados para Inutilização: ${dados.data.retorno.infInut.nNFIni} até ${dados.data.retorno.infInut.nNFFin}`}
\r\n
\r\n
{`Série: ${dados.data.retorno.infInut.serie}`}
\r\n
\r\n
{`Motivo : ${dados.data.retorno.xMotivo}`}
\r\n \r\n ),\r\n });\r\n } else {\r\n Modal.success({\r\n title: 'Inutilização de Número Homologada!',\r\n content: (\r\n <>\r\n
{`Números Inutilizados: ${dados.data.retorno.infInut.nNFIni} até ${dados.data.retorno.infInut.nNFFin}`}
\r\n
\r\n
{`Série: ${dados.data.retorno.infInut.serie}`}
\r\n
\r\n
{`Protocolo: ${dados.data.retorno.infInut.nProt}`}
\r\n \r\n ),\r\n });\r\n }\r\n } else {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi possível realizar a inutilização
\r\n
\r\n
{JSON.stringify(dados.data)}
\r\n \r\n ),\r\n });\r\n }\r\n }, err => {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: (\r\n <>\r\n
Não foi possível realizar a inutilização
\r\n
\r\n
{JSON.stringify(err.Message)}
\r\n \r\n ),\r\n });\r\n }).finally(() => {\r\n fecharModal();\r\n });\r\n };\r\n\r\n return (\r\n formulario.submit()}\r\n okText={\r\n <>\r\n Solicitar Inutilização\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n ({serie.ser_serie})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, InputNumber, Checkbox, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport InputPreco from \"../../inputPreco\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalListaPreco({ form, listaPreco, setListaPreco, exibirModal, fecharModal }) {\r\n const [{ listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const salvarListaDePreco = () => {\r\n const newData = [...listaPreco];\r\n let values = form.getFieldsValue();\r\n if (!!form.getFieldValue().key || form.getFieldValue().key === 0) {\r\n let item = newData.filter((item) => (item.key === values.key))[0];\r\n item.lpi_valorvenda = values.lpi_valorvenda;\r\n item.lpi_perccomissao = values.lpi_perccomissao;\r\n item.lpi_naocalculacomissao = values.lpi_naocalculacomissao;\r\n } else {\r\n let listasPrecos = [...listaSelectPaginacao.itens];\r\n let nomeLista = listasPrecos.find(t => t.ltp_id === values.ltp_id);\r\n values.ltp_nome = nomeLista.ltp_nome;\r\n values.ltp_principal = false;\r\n values.key = newData.length;\r\n newData.push(values);\r\n }\r\n setListaPreco(newData);\r\n fecharModal();\r\n };\r\n\r\n function verificaListaPrecoExistente(lp) {\r\n let dados = {};\r\n dados = listaPreco.filter(l => l.ltp_id === lp);\r\n form.setFieldsValue(dados[0]);\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {\r\n verificaListaPrecoExistente(lp);\r\n }}\r\n placeholder=\"Selecione uma Lista\"\r\n conteudo={(l) => ({l.ltp_nome})}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n Não Calcula Comissão?\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Modal, Form, Row, Col, Input, notification } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\"\r\nimport { Data, InputPreco } from \"../../../components\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ModalLoteProduto({ form, exibirModal, fecharModal, listaLote, setListaLote, editando, sequencia, casaDecimaisUnd }) {\r\n\r\n useEffect(() => {\r\n if (!!editando) {\r\n let listaTemp = listaLote.find(x => x.ordem == sequencia);\r\n\r\n form.setFieldsValue({\r\n ordem: listaTemp.ordem,\r\n prl_dataentrada: listaTemp.prl_dataentrada,\r\n prl_datafabricacao: listaTemp.prl_datafabricacao,\r\n prl_datavencimento: listaTemp.prl_datavencimento,\r\n prl_numerolote: listaTemp.prl_numerolote,\r\n prl_qtde: listaTemp.prl_qtde,\r\n prl_infoadicional: listaTemp.prl_infoadicional\r\n });\r\n } else {\r\n form.resetFields();\r\n }\r\n if (!!exibirModal && !editando) {\r\n let listaLoteLength = listaLote ? listaLote.length : 0;\r\n form.setFieldsValue({ ordem: listaLoteLength + 1 });\r\n }\r\n }, [exibirModal, editando]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n })\r\n }\r\n\r\n const salvarLote = () => {\r\n let dados = [];\r\n let lista = [...listaLote];\r\n dados = form.getFieldValue();\r\n\r\n if (dados.prl_numerolote === undefined || dados.prl_dataentrada === undefined || dados.prl_datafabricacao === undefined || dados.prl_datavencimento === undefined) {\r\n notification.warning({ message: 'Aviso!', description: 'Preencha os campos obrigatórios.' });\r\n return\r\n }\r\n if (dados.prl_qtde <= 0 && dados.prl_qtde != undefined) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade não pode ser menor ou igual a 0' });\r\n return\r\n }\r\n if (moment(dados.prl_datafabricacao).isAfter(moment(new Date()))) {\r\n notification.warning({ message: 'Aviso!', description: 'Data de Fabricação não pode ser maior que data atual' });\r\n return\r\n }\r\n\r\n if (editando) {\r\n const index = lista.findIndex(item => item.ordem === sequencia);\r\n if (index !== -1) {\r\n lista[index] = dados;\r\n setListaLote(lista);\r\n }\r\n } else {\r\n lista.push(dados);\r\n setListaLote(lista);\r\n }\r\n\r\n form.resetFields();\r\n\r\n fecharModal();\r\n }\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qtde\r\n \r\n } name=\"prl_qtde\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Radio, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../../services/api\";\r\nimport { getLocal } from \"../../../services/auth\";\r\nimport { FormatNumber, MaskFormat } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalManifestoDestinatario({ exibirModal, fecharModal, dadosNota }) {\r\n\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ tipoManifesto: dadosNota.tipoManifesto });\r\n }, [dadosNota]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n function retornaDescricaoManifestoDestinatario(nfd_manifestodestinatario) {\r\n switch (nfd_manifestodestinatario) {\r\n case 0:\r\n return 'Ciência da Emissão';\r\n case 1:\r\n return 'Confirmação da Operação';\r\n case 2:\r\n return 'Operação não Realizada';\r\n case 3:\r\n return 'Desconhecimento da Operação';\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n function manifestarNota() {\r\n let justificativa = !!formulario.getFieldValue().justificativa ? formulario.getFieldValue().justificativa : '';\r\n api.post(`NotaFiscal/ManifestarNfe?TipoManifesto=${formulario.getFieldValue().tipoManifesto}&ChaveNfe=${dadosNota.nfd_chavenfe}&Justificativa=${justificativa}`).then(\r\n (res) => {\r\n if (res.data.retorno.cStat === 128) {\r\n if (res.data.retorno.retEvento[0].infEvento.cStat === 135) {\r\n notification.success({ description: res.data.retorno.retEvento[0].infEvento.xMotivo, message: `Manifestação do Destinatário` });\r\n } else {\r\n notification.error({ description: res.data.retorno.retEvento[0].infEvento.xMotivo, message: `Manifestação do Destinatário` });\r\n }\r\n } else {\r\n setCarregando(false);\r\n notification.error({ description: res.data.retorno.xMotivo, message: `Manifestação do Destinatário` });\r\n }\r\n }\r\n ).finally(() => {\r\n fecharModal();\r\n });\r\n };\r\n\r\n return (\r\n \r\n Realizar Manifestação\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n width={720}\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n Chave da NF-e: {dadosNota.nfd_chavenfe}\r\n \r\n \r\n \r\n \r\n Nota Emitida por: {dadosNota.nfd_nomeemissor}\r\n \r\n \r\n CPF/CNPJ do Emissor: {MaskFormat(dadosNota.nfd_cpfcnpjemissor, '', true)}\r\n \r\n \r\n \r\n \r\n Nº da Nota: {dadosNota.nfd_numeronf}\r\n \r\n \r\n Série: {dadosNota.nfd_serienf}\r\n \r\n \r\n Modelo: {dadosNota.nfd_modelodocumento}\r\n \r\n \r\n Emitida em: {moment(dadosNota.nfd_datahoraemissao).format('DD/MM/YYYY HH:mm:ss')}\r\n \r\n \r\n \r\n \r\n Tipo de Nota: {dadosNota.tipoNf}\r\n \r\n \r\n Valor Total da Nota (R$): {FormatNumber(dadosNota.nfd_valortotal, true)}\r\n \r\n \r\n Última Manifestação Realizada: {retornaDescricaoManifestoDestinatario(!!dadosNota.nfd_manifestodestinatario) ? (dadosNota.nfd_manifestodestinatario) : 'Não Informada'}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n Selecione abaixo o tipo de manifestação que deseja para esta Nota Fiscal\r\n \r\n \r\n \r\n \r\n {!(!!dadosNota.tipoManifesto) &&\r\n \r\n Ciência da Emissão: \r\n Registra que o destinatário da operação, constante nesta NF-e, tem conhecimento que o documento foi emitido, mas ainda não expressou uma manifestação conclusiva para a operação.\r\n \r\n }\r\n \r\n Confirmação da Operação: \r\n Registra que o destinatário da operação, constante nesta NF-e, confirma que a operação descrita na NF-e ocorreu.\r\n \r\n \r\n Operação não Realizada: \r\n Registra que o destinatário da operação, constante nesta NF-e, declara que a operação descrita na NF-e foi solicitada, porem não foi efetivada. Ex.: Devolução sem entrada física de mercadorias no estabeleciomento do destinatário, sinistro da carga durante o transporte, etc.\r\n \r\n \r\n Desconhecimento da Operação: \r\n Registra que o destinatário da operação, constante nesta NF-e, declara que a operação descrita na NF-e NÃO foi solicitada, informando ao fisco a utilização indevida de sua Inscrição Estadual/CNPJ por parte do emitente da NF-e em questão.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.tipoManifesto !== currentValues.tipoManifesto}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('tipoManifesto') === 2) return (\r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Checkbox, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport Data from \"../../data\";\r\n\r\nexport default function ModalNacionalidade({ form, dadosNacionalidade, exibirModalNacionalidade, fecharModalNacionalidade }) {\r\n\r\n const [listaPais, setListaPais] = useState([]);\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalNacionalidade();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n carregarPais();\r\n }, []);\r\n\r\n function carregarPais() {\r\n api.get(`Pais/listar?PageSize=1000&PageNumber=1`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setListaPais(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const salvar = record => {\r\n let nacionalidade = [...dadosNacionalidade.listaNacionalidade];\r\n let indice = form.getFieldValue().indice;\r\n delete record.indice;\r\n let pais = listaPais.filter((pais) => (pais.pse_id === record.pse_id))[0];\r\n record.pse_id = pais.pse_id;\r\n record.pse_nome = pais.pse_nome;\r\n if (indice >= 0) {\r\n nacionalidade[indice] = record;\r\n } else {\r\n nacionalidade.push(record);\r\n }\r\n dadosNacionalidade.setListaNacionalidade(nacionalidade);\r\n fecharModalNacionalidade();\r\n };\r\n\r\n return (\r\n form.submit()}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Naturalizado\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Form, Select, Input, InputNumber, Tooltip, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { InputPercentual } from '../../../components';\r\nimport SelectPaginado from \"../../selectPaginado\";\r\nimport api from \"../../../services/api\";\r\nimport { selectPaginadoActions, listagemActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalNcm({ exibirModal, fecharModal, dados, setDados, formularioDados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n formularioDados.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dados)\r\n formularioDados.setFieldsValue(dados);\r\n else\r\n formularioDados.resetFields();\r\n\r\n }, [dados, exibirModal])\r\n\r\n useEffect(() => {\r\n if (exibirModal)\r\n setEstado();\r\n }, [exibirModal])\r\n\r\n function setEstado() {\r\n api.get(`Local/BuscarLocal`).then(res => {\r\n let lista = [];\r\n formularioDados.setFieldsValue({ mva_uforigem: res.data.loc_inscricaoestadual.ufEstado });\r\n lista.push({ name: \"mva_uforigem\", campo: \"Uf\", value: res.data.loc_inscricaoestadual.ufEstado });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n })\r\n }\r\n\r\n function salvarDados(values) {\r\n console.log(manutencao);\r\n let lista = [...dados.mvaorigemdestinos];\r\n let registro = dados.mvaorigemdestinos.find(x => x.mva_uforigem == values.mva_uforigem && x.mva_ufdestino == values.mva_ufdestino)\r\n if (registro) {\r\n registro.mva_percaliquotaicmsreducao = values.mva_percaliquotaicmsreducao;\r\n registro.mva_percmva = values.mva_percmva;\r\n registro.mva_percaliquotaicms = values.mva_percaliquotaicms;\r\n registro.mva_ajustado = values.mva_ajustado;\r\n registro.mva_simplesnacional = values.mva_simplesnacional;\r\n } else {\r\n let dadosTemp = { ...values };\r\n manutencao.dados.mvaorigemdestinos.push(dadosTemp)\r\n }\r\n setDados(manutencao);\r\n fecharModal();\r\n formularioDados.resetFields();\r\n }\r\n\r\n return (\r\n {\r\n formularioDados.submit();\r\n }}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n Defina as Informações de Origem e Destino referente a Substituição Tributário!

\r\n
\r\n \r\n \r\n \r\n \r\n ({est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n ({est.est_sigla} - {est.est_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n % da Alíquota ICMS Substituição Tributária\r\n \r\n \r\n \r\n }\r\n name=\"mva_percaliquotaicms\"\r\n rules={[{ required: true, message: 'Informe o Percentual da Aliquota ICMS Substituição Tributária' }]}\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function InfoCheque({ dadosCheque }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n Recebido de: {dadosCheque?.pessoa.pes_nome}\r\n \r\n \r\n Banco: {dadosCheque.ban_id} - {dadosCheque?.banco.ban_descricao}\r\n \r\n \r\n Cheque Emitido em: {moment(dadosCheque.chq_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n Agência: {dadosCheque.chq_agencia}\r\n \r\n \r\n Nº Conta: {dadosCheque.chq_contacorrente}\r\n \r\n \r\n Bom para: {moment(dadosCheque.chq_bompara).format('DD/MM/YYYY')}\r\n \r\n \r\n Série: {dadosCheque.chq_serie}\r\n \r\n \r\n Número do Cheque: {dadosCheque.chq_numero}\r\n \r\n \r\n Valor do Cheque (R$): {FormatNumber(dadosCheque.chq_valor, true)}\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Table, Select, Input, Form, Button } from \"antd\";\r\nimport { ArrowDownOutlined, ArrowUpOutlined, ExclamationCircleOutlined, CloseOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../../services/api\";\r\nimport { getLocal, linkApi } from \"../../../services/auth\";\r\nimport InfoCheque from \"../../../pages/cheque/infoCheque\";\r\nimport SelectPaginado from \"../../selectPaginado\";\r\n\r\n\r\nexport default function ModalOcorrencia({ exibirModal, fecharModal, dadosCheque, statusCheque, ocorrencia }) {\r\n\r\n const [movimentacaoCheque, setMovimentacaoCheque] = useState([]);\r\n const [contaCorrente, setContaCorrente] = useState([]);\r\n const [motivoDevolucao, setMotivoDevolucao] = useState([]);\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n formulario.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`ContaCorrente/AtivosTipoConta?tipoConta=2&ordem=+ctc_descricao`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setContaCorrente(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n\r\n api.get(`Cheque/ListarCodigosDevolucao?filtro=&ordem=+cmc_descricao`).then(\r\n (res) => {\r\n if (res.status === 200 && res.data.length > 0) {\r\n setMotivoDevolucao(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!dadosCheque.chq_id && ocorrencia === 0) {\r\n api.get(`OcorrenciaCheque/Listar?IdCheque=${dadosCheque.chq_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n res.data.map((item) => {\r\n item.key = item.och_id;\r\n });\r\n setMovimentacaoCheque(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n }, [dadosCheque]);\r\n\r\n const tituloModal = {\r\n 0: 'Movimentação do Cheque',\r\n 1: 'Enviar para depósito',\r\n 2: 'Reapresentar ao Banco',\r\n 3: 'Marcar Cheque como Compensado',\r\n 4: 'Repassar o Cheque para terceiros',\r\n 5: 'Trocar com o Cliente',\r\n 6: 'Registrar Devolução do Cheque',\r\n 7: 'Enviar Cheque para Custódia'\r\n };\r\n\r\n const operacao = {\r\n enviarParaDeposito: 1,\r\n representadoAoBanco: 2,\r\n compensado: 3,\r\n repassado: 4,\r\n trocado: 5,\r\n devolvido: 6,\r\n emCustodia: 7\r\n };\r\n\r\n function salvar(values) {\r\n let dados = {};\r\n dados.ctc_id = (ocorrencia !== operacao.compensado && ocorrencia !== operacao.trocado && ocorrencia !== operacao.repassado) ? values.ctc_id : 0;\r\n dados.chq_id = dadosCheque.chq_id;\r\n dados.och_data = moment(new Date());\r\n dados.och_status = ocorrencia;\r\n dados.mcc_id = null;\r\n dados.loc_id = getLocal();\r\n if (ocorrencia === operacao.devolvido) {\r\n dados.cmc_id = values.cmc_id;\r\n }\r\n if (!!values.och_observacao) {\r\n dados.och_observacao = values.och_observacao;\r\n }\r\n api.post(`OcorrenciaCheque/Incluir`, dados).then(\r\n (retorno) => {\r\n if (retorno.status === 200) {\r\n Modal.success({\r\n content: 'Ocorrência registrada e vinculada ao cheque com sucesso!',\r\n });\r\n } else {\r\n error(\"Não foi possível registrar esta ocorrência no cheque.\");\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n error(\"Erro ao registrar esta ocorrência no cheque.\");\r\n }\r\n ).finally(() => {\r\n formulario.resetFields();\r\n fecharModal();\r\n });\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n : null\r\n }\r\n width={720}\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n
\r\n {ocorrencia === 0 &&\r\n
(\r\n
\r\n {usu_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n render: ({ och_data }) => (\r\n
\r\n {moment(och_data).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Banco',\r\n render: ({ och_status, ban_id, ban_descricao }) => (\r\n
\r\n {((och_status === 1 || och_status === 2 || och_status === 3 || och_status === 7) && (!!ban_id)) &&\r\n \r\n
\r\n {ban_descricao} {ban_id} - {ban_descricao}\r\n \r\n \r\n }\r\n \r\n \r\n Situação: {statusCheque[och_status].value}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Conta Destino',\r\n render: ({ och_status, ctc_descricao }) => (\r\n
\r\n {(och_status === 1 || och_status === 2 || och_status === 3 || och_status === 7) &&\r\n {ctc_descricao}\r\n }\r\n
\r\n ),\r\n },\r\n ]\r\n } expandable={{\r\n expandedRowRender: ({ och_observacao }) =>\r\n
\r\n \r\n
\r\n Observações: {och_observacao}\r\n \r\n \r\n ,\r\n expandIcon: ({ expanded, onExpand, record }) =>\r\n expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n )\r\n }} columnWidth={30} />\r\n }\r\n {(ocorrencia === 1 || ocorrencia === 2 || ocorrencia === 7) &&\r\n \r\n \r\n \r\n (\r\n {cc.ctc_descricao}\r\n )} />\r\n \r\n \r\n \r\n }\r\n {(ocorrencia === 3) &&\r\n
\r\n \r\n Este cheque será definido como compensado.\r\n \r\n \r\n Para prosseguir clique em Salvar...\r\n \r\n
\r\n }\r\n {(ocorrencia === 4) &&\r\n
\r\n \r\n Este cheque será definido como: Repassado à Terceiros.\r\n \r\n \r\n Para prosseguir clique em Salvar...\r\n \r\n
\r\n }\r\n {(ocorrencia === 5) &&\r\n
\r\n \r\n Este cheque será definido como: Trocado com o Cliente.\r\n \r\n \r\n Para prosseguir clique em Salvar...\r\n \r\n
\r\n }\r\n {(ocorrencia === 6) &&\r\n
\r\n \r\n
\r\n \r\n (\r\n {cc.ctc_descricao}\r\n )} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {ocorrencia !== 0 &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../../state\";\r\nimport { selectPaginadoActions } from \"../../../actions\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\n\r\nexport default function ModalOcupacao({ form, listaOcupacoes, exibirModalOcupacao, fecharModalOcupacao }) {\r\n const [{ ui, listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n if (exibirModalOcupacao && !!listaOcupacoes) {\r\n let lista = [];\r\n if (!!listaOcupacoes.cbo_id) {\r\n lista.push({ name: \"cbo_id\", campo: \"cbo_id\", value: listaOcupacoes.cbo_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [exibirModalOcupacao]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalOcupacao();\r\n }\r\n });\r\n };\r\n\r\n const onFinish = values => {\r\n let listaCbo = [...listaSelectPaginacao.itens];\r\n let cbo = listaCbo.filter((c) => c.cbo_id === form.getFieldValue().cbo_id)[0];\r\n let indice = form.getFieldValue().indice;\r\n let lista = [...listaOcupacoes.dadosOcupacoes];\r\n\r\n values.cbo_descricao = cbo.cbo_descricao;\r\n if (indice >= 0) {\r\n lista[indice] = values;\r\n } else {\r\n let verificaOcupacaoAdd = lista.filter((c) => c.cbo_id === form.getFieldValue().cbo_id).length;\r\n if (verificaOcupacaoAdd.length > 0) {\r\n onCloseModal();\r\n notification.info({ message: 'Ocupação já adicionada!' });\r\n } else {\r\n if (lista.length > 0) {\r\n values.poc_principal = false;\r\n } else {\r\n values.poc_principal = true;\r\n }\r\n lista.push(values);\r\n }\r\n }\r\n listaOcupacoes.setDadosOcupacoes(lista);\r\n form.resetFields();\r\n fecharModalOcupacao();\r\n };\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n ({ocup.cbo_id} - {ocup.cbo_descricao} )\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { InputPhone } from \"../..\";\r\nimport api from \"../../../services/api\";\r\nimport { InputCep } from \"../../../components\";\r\nimport { HasValue, retornaCep, retornaSoNumeros, validarEmail } from \"../../../services/funcoes\";\r\nimport InputEmail from \"../../inputEmail\";\r\n\r\nexport default function ModalOrgaoSubjacente({ form, listaOrgaoSubjacente, exibirModalOrgaoSubjacente, fecharModalOrgaoSubjacente }) {\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalOrgaoSubjacente();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModalOrgaoSubjacente && !!form.getFieldValue().pop_cep) {\r\n verificaCep(form.getFieldValue().pop_cep);\r\n }\r\n }, [exibirModalOrgaoSubjacente]);\r\n\r\n const onFinish = values => {\r\n let dados = [...listaOrgaoSubjacente.listaOrgaoSubjacente];\r\n let indice = values.indice;\r\n delete values.indice;\r\n\r\n if(HasValue(values.pop_email) && !validarEmail(values.pop_email)){\r\n notification.warning({ message: `Aviso!`, description: `E-mail invalido` });\r\n return;\r\n }\r\n\r\n values.pop_ativo = true;\r\n values.pop_email = !!values.pop_email ? values.pop_email : \"\";\r\n values.pop_cep = !!values.pop_cep ? values.pop_cep : \"\";\r\n values.pop_observacao = !!values.pop_observacao ? values.pop_observacao : \"\";\r\n values.pop_latitude = \"\";\r\n values.pop_longitude = \"\";\r\n values.pop_numero = !!values.pop_numero ? values.pop_numero : \"\";\r\n values.pop_localreferencia = !!values.pop_localreferencia ? values.pop_localreferencia : \"\";\r\n values.pop_complemento = !!values.pop_complemento ? values.pop_complemento : \"\";\r\n values.pop_bairro = !!values.pop_bairro ? values.pop_bairro : \"\";\r\n values.pop_endereco = !!values.pop_endereco ? values.pop_endereco : \"\";\r\n values.pop_telefone = !!values.pop_telefone ? values.pop_telefone : \"\";\r\n values.pop_cidade = !!values.pop_cidade ? values.pop_cidade : \"\";\r\n if (indice >= 0) {\r\n dados[indice] = values;\r\n } else {\r\n dados.push(values);\r\n }\r\n listaOrgaoSubjacente.setListaOrgaoSubjacente(dados);\r\n fecharModalOrgaoSubjacente();\r\n };\r\n\r\n async function verificaCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({ pop_cidade: `${retornoCep.cid_descricao}` });\r\n } else {\r\n form.setFieldsValue({ pop_cep: undefined });\r\n }\r\n }\r\n\r\n return (\r\n { form.submit() }}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { verificaCep(event.currentTarget.value); }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Checkbox, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport SelectPaginado from \"../../selectPaginado\";\r\nimport { selectPaginadoActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalOutroContato({ form, listaOutrosContatos, exibirModalOutroContato, fecharModalOutroContato }) {\r\n\r\n const [dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n if (exibirModalOutroContato && !!listaOutrosContatos) {\r\n let lista = [];\r\n if (!!listaOutrosContatos.toc_id) {\r\n lista.push({ name: \"toc_id\", campo: \"filtro\", value: listaOutrosContatos.toc_id });\r\n }\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n });\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalOutroContato();\r\n }\r\n });\r\n };\r\n\r\n const onFinish = async values => {\r\n let indice = form.getFieldValue().indice;\r\n delete values.indice;\r\n let lista = [...listaOutrosContatos.dadosOutrosContatos];\r\n let listaTpOutroContato = await listarTpOutroContato(form.getFieldValue().toc_id);\r\n values.toc_descricao = listaTpOutroContato[0].toc_descricao;\r\n if (indice >= 0) {\r\n lista[indice] = values;\r\n }\r\n else {\r\n let verificaOcupacaoAdd = listaTpOutroContato[0];\r\n if (verificaOcupacaoAdd.length > 0) {\r\n fecharModalOutroContato();\r\n notification.info({ message: 'Contato já adicionada!' });\r\n } else {\r\n values.out_ativo = true;\r\n lista.push(values);\r\n }\r\n }\r\n listaOutrosContatos.setDadosOutrosContatos(lista);\r\n fecharModalOutroContato();\r\n };\r\n\r\n async function listarTpOutroContato(toc_id) {\r\n let req = await api.get(`TipoOutroContato?Filtro=${toc_id}`);\r\n if (req.status === 200 && !!req.data) {\r\n return req.data.items;\r\n }\r\n return {};\r\n }\r\n return (\r\n {\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n ({toc.toc_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ativo\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, Checkbox, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { validarCpf } from \"../../../services/funcoes\";\r\nimport { InputCpfCnpj } from \"../../../components\";\r\n\r\nexport default function ModalPessoaAutorizada({ form, listaPessoasAutorizadas, exibirModalPessoaAutorizada, fecharModalPessoaAutorizada }) {\r\n const [listasGrauParentesco, setListasGrauParentesco] = useState([]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalPessoaAutorizada();\r\n }\r\n });\r\n };\r\n\r\n const onFinish = values => {\r\n let lista = [...listaPessoasAutorizadas.dadosPessoasAutorizadas];\r\n let nomeLista = listasGrauParentesco.filter(g => g.grp_id === form.getFieldValue().grp_id);\r\n values.grp_id = nomeLista[0].grp_id;\r\n values.grp_descricao = nomeLista[0].grp_descricao;\r\n\r\n let listaPessoas = lista.find((pesAuto) => pesAuto.pea_id === values.pea_id);\r\n if (!!listaPessoas) {\r\n listaPessoas.pes_nome = values.pes_nome;\r\n listaPessoas.grp_descricao = values.grp_descricao;\r\n listaPessoas.pea_ativo = values.pea_ativo;\r\n } else {\r\n let verificaOcupacaoAdd = lista.filter(p => p.pef_cpf === form.getFieldValue().pef_cpf);\r\n if (verificaOcupacaoAdd.length > 0) {\r\n fecharModalPessoaAutorizada();\r\n notification.info({ message: 'Pessoa Autorizada já adicionada!' });\r\n } else {\r\n values.pea_ativo = values.pea_ativo;\r\n lista.push(values);\r\n }\r\n }\r\n listaPessoasAutorizadas.setDadosPessoasAutorizadas(lista);\r\n fecharModalPessoaAutorizada();\r\n };\r\n\r\n useEffect(() => carregarDados(), []);\r\n\r\n function verificarCpfValido(event) {\r\n let valorCampo = event.currentTarget.value.replace(/\\D/g, '');\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n form.resetFields();\r\n return false;\r\n } else {\r\n api.get(`PessoaFisica/BuscarPessoaFisica/${valorCampo}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data) {\r\n form.setFieldsValue({ pef_id: res.data.pessoafisicas[0].pef_id, pes_nome: res.data.pes_nome })\r\n console.log(res.data);\r\n }\r\n }\r\n }\r\n ).catch((erro) => console.error(erro))\r\n }\r\n }\r\n\r\n function carregarDados() {\r\n api.get(`GrauParentesco/Listar`).then(\r\n res => {\r\n setListasGrauParentesco(res.data);\r\n }\r\n ).catch((erro) => console.error(erro))\r\n };\r\n\r\n return (\r\n\r\n {\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n { verificarCpfValido(valor) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { return { label: `${g.grp_descricao}`, value: g.grp_id } })}>\r\n \r\n \r\n \r\n \r\n \r\n Pessoa Autorizada?\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Card, Modal } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalPlano({ plano, exibirModal, fecharModal }) {\r\n\r\n const [ativo,setAtivo] = useState(\"#e3e3e3\");\r\n const [inativo,setInativo] = useState(\"white\");\r\n\r\n const [gratis,setGratis] = useState(inativo);\r\n const [mei,setMei] = useState(inativo);\r\n const [inicial,setInicial] = useState(inativo);\r\n const [avancado,setAvancado] = useState(inativo);\r\n const [completo,setCompleto] = useState(inativo);\r\n const [premium,setPremium] = useState(inativo);\r\n \r\n useEffect(()=>{\r\n\r\n setGratis(inativo);\r\n setMei(inativo);\r\n setInicial(inativo);\r\n setAvancado(inativo);\r\n setCompleto(inativo);\r\n setPremium(inativo);\r\n\r\n switch (plano) {\r\n case 1: {\r\n setPremium(ativo);\r\n break;\r\n };\r\n case 2: {\r\n setCompleto(ativo);\r\n break;\r\n }\r\n case 3: {\r\n setAvancado(ativo);\r\n break;\r\n }\r\n case 4: {\r\n setInicial(ativo);\r\n break;\r\n }\r\n case 5: {\r\n setGratis(ativo);\r\n break;\r\n }\r\n case 6: {\r\n setMei(ativo);\r\n break;\r\n }\r\n }\r\n })\r\n\r\n return (\r\n\r\n \r\n
\r\n \r\n
\r\n    \r\n \r\n {/* \r\n
\r\n GRÁTIS\r\n
\r\n \r\n \r\n
\r\n MEI\r\n
\r\n */}\r\n \r\n
\r\n INICIAL\r\n
\r\n \r\n \r\n
\r\n AVANÇADO\r\n
\r\n \r\n \r\n
\r\n COMPLETO\r\n
\r\n \r\n \r\n
\r\n PREMIUM\r\n
\r\n \r\n \r\n
\r\n \r\n
Implantação Gratuita\r\n {/* \r\n */}\r\n \r\n Sob Consulta\r\n Sob Consulta\r\n Sob Consulta\r\n \r\n \r\n Usuários Ilimitados\r\n {/* 1\r\n 1 */}\r\n 1\r\n \r\n \r\n \r\n \r\n \r\n Emissão de Nota Fiscal Ilimitada\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Dashboards Gerenciais\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Monitoramento de NF-e\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Venda Online (PDV WEB)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Ponto de Venda (PDV) Online/Offline\r\n {/* \r\n */}\r\n \r\n 1\r\n 4\r\n 6\r\n \r\n \r\n Grade de Produtos Personalizável\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Adição de Campos Personalizáveis em Cadastros Básicos\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Pré-Venda Mobile\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Backup Diário Automático\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Segurança de Dados\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Materiais de Ajuda\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Guarda do XML por 5 anos seguindo todos os critérios legais\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Permite Cadastro de Filiais\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Acesso a API de Integração\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Chamados de Suporte (Abertura de Ticket/E-mail)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n FINANCEIRO\r\n
\r\n \r\n \r\n \r\n Contas a Pagar\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Contas a Receber\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Emissão de Boletos\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n {/* \r\n Integração Bancária (Boletos)\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n {/* \r\n Fluxo de Caixa\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Lançamento de Caixa\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Dashboard Financeiro\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Contas Gerenciais\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n DRE Gerencial (Padrão)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n VENDAS\r\n
\r\n \r\n \r\n \r\n Orçamento\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Pedido\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Condicional (PDV/APP)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Controle de Comissão\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Gestão de Metas de Vendas\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Promoções\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Devolução de Produtos(Troca)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Aplicativo Pré-venda (iOS, Android)\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Análise de Crédito de Cliente\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Emissão de NF-e (Venda, Devolução, Débito de ICMS, Transferência¹)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Emissão de NF-e (Entrega Futura, Remessas)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n OBS: ¹ Nota de Transferência disponível quando houver uma ou mais filiais\r\n \r\n \r\n \r\n \r\n
\r\n PONTO DE VENDA – PDV (ONLINE/OFFLINE)\r\n
\r\n \r\n \r\n \r\n Licenças\r\n {/* \r\n */}\r\n \r\n 1\r\n 3\r\n 8\r\n \r\n \r\n Disponibilidade Offline\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n NFC-e\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Integração com Aplicativo de Pré Venda\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Recebimento de Parcelas\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Lançamento Condicional\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sincronização de Dados\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Impressão de Carnê\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Emissão de Boletos no PDV\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Gerador de Etiquetas Personalizáveis\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Cadastro de Clientes\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Lista de Clientes com Total de Compras e Ticket Médio\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Cálculo do Limite de Crédito\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Dashboard de Vendas\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Lançamento de Despesas\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Transferências Automáticas no Fechamento de Caixa\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n COMPRAS\r\n
\r\n \r\n \r\n \r\n Ordem de Compra\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Emissão de NF-e (Entrada, Crédito de ICMS, Retorno de Mercadoria)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Importação de XML\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Manifestação de Destinatário de NF-e\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n ESTOQUE\r\n
\r\n \r\n \r\n \r\n Controle de Estoque\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Dashboard de Estoque\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Registro de Inventário Automatizado\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n RELATÓRIOS\r\n
\r\n \r\n \r\n \r\n Emissão Relatórios\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Exportação de Relatórios (PDF e XLS)\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Envio de Relatórios por e-mail\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n Personalização de Relatórios\r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n Personalização de Modelos de Etiquetas\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n POLÍTICAS DE ACESSO\r\n
\r\n \r\n \r\n \r\n Cadastro de Usuários\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Grupos de Usuários\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Gerenciamento de Acesso às Filiais\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Restrição de Acesso por Dia da Semana e Horário\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Controle Permissão de Acesso por Usuário e/ou Grupo de Usuário\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n PORTAL DO CONTADOR\r\n
\r\n \r\n \r\n \r\n Acesso ao Portal do Contador\r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n );\r\n}","import { React, useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Checkbox, Modal, Form, Descriptions, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber, FormatFone } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalProdutoCondicional({ exibirModalProdutoCondicional, fecharModalProdutoCondicional, dadosItens, situacaoVenda }) {\r\n const [itens, setItens] = useState();\r\n const [dadosCondicional, setDadosCondicional] = useState({});\r\n\r\n useEffect(() => {\r\n if (!!dadosItens && !!dadosItens.vnc_id) {\r\n carregarDados();\r\n setDadosCondicional(dadosItens);\r\n }\r\n }, [dadosItens])\r\n\r\n function carregarDados() {\r\n if (!!dadosItens && !!dadosItens.vnc_id) {\r\n console.log('dadosItens', itens);\r\n api.get(`VendaCondicionalItem/Listar?IdVendaCondicional=${dadosItens.vnc_id}`).then(\r\n res => {\r\n setItens(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n );\r\n }\r\n }\r\n\r\n function descricaoSituacao(codigo) {\r\n if (codigo >= 0 && !!situacaoVenda[codigo]) {\r\n return situacaoVenda[codigo].value;\r\n }\r\n return '';\r\n };\r\n\r\n return (\r\n fecharModalProdutoCondicional(true)}\r\n footer={null}\r\n maskClosable={false}\r\n width= '80%'>\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosCondicional.vnc_numero}\r\n \r\n \r\n {dadosCondicional.cli_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatFone(dadosCondicional.vnc_telefonecliente)}\r\n \r\n \r\n {dadosCondicional.ven_nome}\r\n \r\n \r\n {(descricaoSituacao(dadosCondicional.vnc_situacao))}\r\n \r\n \r\n {moment(dadosCondicional.vnc_datalancamento).format('DD/MM/YYYY')}\r\n \r\n \r\n {moment(dadosCondicional.vnc_prazoretorno).format('DD/MM/YYYY')}\r\n \r\n \r\n {FormatNumber(dadosCondicional.vnc_valortotal, true)}\r\n \r\n {!!dadosCondicional.vnc_entregaagendada && (\r\n \r\n {moment(dadosCondicional.vnc_entregaagendada).format('DD/MM/YYYY')} | {moment(dadosCondicional.vnc_entregaagendada).format('HH:mm')}\r\n \r\n )}\r\n {!!dadosCondicional.vnc_enderecoentrega && (\r\n \r\n {dadosCondicional.vnc_enderecoentrega}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosCondicional.vnc_observacao ? dadosCondicional.vnc_observacao : 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n {!!descricaograde &&\r\n \r\n \r\n {descricaograde}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'EAN',\r\n width: 10,\r\n align: 'center',\r\n render: ({ pro_ean, prg_ean }) => (\r\n
\r\n \r\n
\r\n {!!pro_ean ? pro_ean : prg_ean}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 70,\r\n align: 'right',\r\n render: ({ vci_quantidade }) => (\r\n
\r\n \r\n
\r\n {vci_quantidade}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde Dev.',\r\n width: 70,\r\n align: 'right',\r\n render: ({ vci_devolvido }) => (\r\n
\r\n \r\n
\r\n {vci_devolvido}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 90,\r\n render: ({ vci_valorun }) => (\r\n
\r\n {FormatNumber(vci_valorun, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ vci_valorun, vci_quantidade, vci_devolvido }) => (\r\n
\r\n {FormatNumber((vci_quantidade - vci_devolvido) * vci_valorun, true)}\r\n
\r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Input, Select, notification, Modal,Checkbox } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { InputPhone, SelectPaginacao } from \"../../../components\";\r\nimport SelectPaginado from \"../../selectPaginado\";\r\nimport { selectPaginadoActions } from \"../../../actions\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport { retornaSoNumeros } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalTelefone({ form, listaTelefones, exibirModalTelefone, fecharModalTelefone, isEstrangeiro }) {\r\n const [dispatch] = useStateValue();\r\n const [numTelefone, setNumTelefone] = useState('');\r\n\r\n const handleInputChange = (e) => {\r\n var valorAnterior = numTelefone;\r\n var valorNovo = e.target.value;\r\n //var isValid = /^(\\+)?\\d*$/.test(valorNovo);//verifica se numero possui '+' somente no inicio e o restante são numeros\r\n var isValid = /^\\d*$/.test(valorNovo);//verifica se possui somente numeros\r\n if (isValid === true) {\r\n form.setFieldsValue({ psc_numero: valorNovo }); // Atualizar o valor quando válido\r\n setNumTelefone(valorNovo);\r\n } else {\r\n // Disparar a notificação\r\n notification.warn({ message: 'Somente \"+\" no início e números são permitidos.' });\r\n // Retorna ao estado anterior ao digito não permitido\r\n form.setFieldsValue({ psc_numero: valorAnterior });\r\n setNumTelefone(valorAnterior);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModalTelefone && !!listaTelefones) {\r\n var lista = [];\r\n if (!!listaTelefones.tpt_id) {\r\n lista.push({ name: \"tpt_id\", campo: \"Codigo\", value: listaTelefones.tpt_id });\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [exibirModalTelefone]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalTelefone();\r\n }\r\n });\r\n };\r\n\r\n const onFinish = async values => {\r\n let indice = form.getFieldValue().indice;\r\n let lista = [...listaTelefones.dadosTelefone];\r\n\r\n let listaTpTelefone = await listarTpTelefone(form.getFieldValue().tpt_id);\r\n values.tpt_descricao = listaTpTelefone[0].tpt_descricao;\r\n values.psc_ativo = true;\r\n values.psc_numero = retornaSoNumeros(values.psc_numero);\r\n if (!!indice) {\r\n values.psc_principal = lista.filter((psc) => (psc.indice === indice))[0].psc_principal;\r\n }\r\n values.tpt = listaTpTelefone[0];\r\n if (indice >= 0) {\r\n lista[indice] = values;\r\n } else {\r\n let verificaOcupacaoAdd = lista.filter(o => o.psc_numero === form.getFieldValue().psc_numero);\r\n if (verificaOcupacaoAdd.length > 0) {\r\n fecharModalTelefone();\r\n notification.info({ message: 'Telefone já adicionado!' });\r\n } else {\r\n if (lista.length > 0) {\r\n values.psc_principal = false;\r\n } else {\r\n values.psc_principal = true;\r\n }\r\n lista.push(values);\r\n }\r\n }\r\n listaTelefones.setDadosTelefone(lista);\r\n form.resetFields();\r\n setNumTelefone();\r\n fecharModalTelefone();\r\n };\r\n\r\n async function listarTpTelefone(tpt_id) {\r\n let req = await api.get(`TipoTelefone/Listar?Codigo=${tpt_id}`);\r\n if (req.status === 200 && !!req.data) {\r\n return req.data.items;\r\n }\r\n return {};\r\n }\r\n\r\n const inputRef = React.createRef();\r\n useEffect(() => {\r\n setTimeout(() => {\r\n if (exibirModalTelefone && !!inputRef.current) {\r\n inputRef.current.focus({ cursor: 'end', })\r\n };\r\n }, 500);\r\n }, [exibirModalTelefone])\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose={true}\r\n >\r\n
\r\n \r\n
\r\n \r\n }\r\n {isEstrangeiro && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n ({tp.tpt_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n Principal?\r\n \r\n */}\r\n {/* \r\n \r\n Ativo?\r\n \r\n */}\r\n \r\n \r\n Enviar Whatsapp?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Defina as Informações de Origem e Destino aqui!\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n }\r\n {mostrarCsoSn === true &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {est.est_sigla} - {est.est_descricao}\r\n }\r\n />\r\n \r\n \r\n \r\n {/* Quando empresa for do Geral */}\r\n \r\n {mostrarCstIcms === true && mostrarAlicotaIcms === true &&\r\n \r\n calculaAliquotaEquivalente()}\r\n />\r\n \r\n }\r\n {mostrarCstIcms === true && mostrarReducaoBC === true &&\r\n \r\n
\r\n Aliquota Efetiva\r\n \r\n \r\n \r\n
\r\n calculaPercentualReducao()}\r\n />\r\n \r\n }\r\n {mostrarCstIcms === true && mostrarReducaoBC === true &&\r\n \r\n calculaAliquotaEquivalente()}\r\n />\r\n \r\n }\r\n {mostrarCstIcms === true && mostrarDiferimentoIcms === true &&\r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n }\r\n {/* Quando empresa for do simples nacional */}\r\n \r\n {mostrarCsoSn === true && mostrarAlicotaIcms === true &&\r\n \r\n calculaAliquotaEquivalente()}\r\n />\r\n \r\n }\r\n {mostrarCsoSn === true && mostrarReducaoBC === true &&\r\n \r\n
\r\n Aliquota Efetiva\r\n \r\n \r\n \r\n
\r\n calculaPercentualReducao()}\r\n />\r\n \r\n }\r\n {mostrarCsoSn === true && mostrarReducaoBC === true &&\r\n \r\n calculaAliquotaEquivalente()}\r\n />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Form, Input, Checkbox, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../../state\";\r\n\r\nexport default function ModalVeiculo({ form, listaVeiculos, exibirModalVeiculo, fecharModalVeiculo }) {\r\n\r\n const [veiculos, setVeiculos] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalVeiculo();\r\n form.resetFields();\r\n }\r\n });\r\n };\r\n\r\n const salvarVeiculo = record => {\r\n let indice = form.getFieldValue().indice;\r\n delete record.indice;\r\n let lista = [...listaVeiculos.dadosVeiculos];\r\n if(!!manutencao.dados){\r\n record.trn_id = manutencao.dados.trn_id;\r\n }\r\n if (indice >= 0) {\r\n lista[indice] = record;\r\n } else {\r\n lista.push(record);\r\n }\r\n listaVeiculos.setDadosVeiculos(lista);\r\n fecharModalVeiculo();\r\n form.resetFields();\r\n };\r\n\r\n return (\r\n form.submit()}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Veículo Ativo? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport apiPayer from '../../../services/apiPayer';\r\nimport api from \"../../../services/api\";\r\nimport { getLocal } from \"../../../services/auth\";\r\nimport { MaskFormat, FormatNumber } from \"../../../ValueObjects\";\r\nimport { HasValue } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalCancelamentoNfe({ dadosNota, exibirModalCancelarEstornar, fecharModalCancelarEstornar, titleModal, textoBotao }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalCancelarEstornar();\r\n }\r\n });\r\n };\r\n\r\n const realizarCancelamento = async () => {\r\n let dados = { ...dadosNota };\r\n dados.loc_id = parseInt(getLocal());\r\n dados.justificativa = form.getFieldValue().justificativa;\r\n if (!dados.justificativa || dados.justificativa.length < 15) {\r\n notification.warning({ message: `Aviso!`, description: `A Justificativa deve ter no mínimo 15 caracteres!` });\r\n return false;\r\n }\r\n\r\n setCarregando(true);\r\n\r\n try {\r\n const res = await api.post(`NotaFiscal/Cancelar`, dados);\r\n\r\n if (dados.ntf_docfiscal == true) {\r\n let _cStat = res.data.retorno.cStat;\r\n let motivo = res.data.retorno.xMotivo;\r\n\r\n if (res.data.retorno.retEvento != null) {\r\n _cStat = res.data.retorno.retEvento[0].infEvento.cStat;\r\n motivo = _cStat + '-' + res.data.retorno.retEvento[0].infEvento.xMotivo;\r\n }\r\n\r\n if (_cStat == 135 || _cStat == 155 || _cStat == 101 || _cStat == 573 || _cStat == 218) {\r\n await verificarEstornoPagamentoEletronico(dados); // Aguarda antes de continuar\r\n notification.success({ message: `Doc. Fiscal Nº: ${dadosNota.ntf_numero} cancelado com sucesso!`, description: motivo });\r\n } else {\r\n notification.warning({ message: `Não foi possível efetuar o cancelamento da NF-e Nº: ${dadosNota.ntf_numero}!`, description: motivo });\r\n }\r\n } else {\r\n if (res.data.retorno.cStat == 135) {\r\n await verificarEstornoPagamentoEletronico(dados); // Aguarda antes de continuar\r\n notification.success({ message: `Doc. Fiscal Nº: ${dadosNota.ntf_numero} cancelado com sucesso!` });\r\n } else {\r\n notification.warning({ message: `Não foi possível efetuar o cancelamento do Doc. Fiscal Nº: ${dadosNota.ntf_numero}!` });\r\n }\r\n }\r\n } catch (erro) {\r\n if (erro.response.data)\r\n notification.warning({ description: `Não foi possível efetuar o cancelamento do Doc. Fiscal Nº: ${dadosNota.ntf_numero}, ${erro.response.data} !`, message: 'Aviso' });\r\n else\r\n notification.warning({ description: `Não foi possível efetuar o cancelamento do Doc. Fiscal Nº: ${dadosNota.ntf_numero}!`, message: 'Aviso' });\r\n console.error(\"Erro ao cancelar:\", erro);\r\n } finally {\r\n form.resetFields();\r\n setCarregando(false);\r\n fecharModalCancelarEstornar(); // Executa após tudo\r\n }\r\n };\r\n\r\n async function verificarEstornoPagamentoEletronico(dados) {\r\n if (dados.ntf_status == 1) {\r\n let formaPagIntegrado = dados.formasPgto.filter((item) => HasValue(item.imp_autorizacao));\r\n if (formaPagIntegrado.length > 0) {\r\n await modalEstornarPagtos(formaPagIntegrado); // Aguarda a interação do modal\r\n }\r\n }\r\n }\r\n\r\n function modalEstornarPagtos(pagamentos) {\r\n const descricoesConcatenadas = pagamentos\r\n .map((item) => item.fpg_descricao)\r\n .join(', ');\r\n\r\n return new Promise((resolve, reject) => {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: `Esta nota possui pagamentos integrados com as seguintes formas de pagamento: ${descricoesConcatenadas}. Deseja estorná-los? Pode ser necessário o uso do cartão para concluir o processo.`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk: async () => {\r\n console.log(\"Estorno confirmado.\");\r\n await verificarPagamentos(pagamentos); // Aguarda os estornos antes de concluir\r\n resolve();\r\n },\r\n onCancel: () => {\r\n console.log(\"Estorno cancelado.\");\r\n resolve();\r\n //reject();\r\n },\r\n });\r\n });\r\n }\r\n\r\n async function verificarPagamentos(pagamentos) {\r\n for (const item of pagamentos) {\r\n if (item.fpg_tipointegracao != null) {\r\n try {\r\n if (item.fpg_tipointegracao == 1) {\r\n // Integração Vero\r\n console.log(\"Estorno via Vero ainda não implementado.\");\r\n }\r\n else if (item.fpg_tipointegracao == 2) {\r\n // Payer localhost\r\n const dadosIntegracaoPos = {\r\n command: \"CANCELLMENT\",\r\n idPayer: item.imp_idintegracao,\r\n };\r\n const retorno = await apiPayer.post('Client/Request', dadosIntegracaoPos);\r\n console.log(\"Estorno Payer localhost concluído:\", retorno);\r\n }\r\n else if (item.fpg_tipointegracao == 4) {\r\n // Payer Gateway\r\n const retorno = await api.post(`Payer/IncluirCancellmentPayerRequest/${item.imp_idintegracao}`);\r\n console.log(\"Estorno Payer Gateway concluído:\", retorno.data);\r\n }\r\n } catch (error) {\r\n notification.warning({\r\n description: `Falha ao estornar a integração do pagamento ${item.fpg_descricao}. Detalhes: ${error.message}`,\r\n message: 'AVISO!',\r\n });\r\n console.error(\"Erro ao processar pagamento:\", error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n return (\r\n \r\n {textoBotao}\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe} \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n {MaskFormat(dadosNota.ntf_cnpjcpfdest, '', true)}\r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_serie}\r\n \r\n \r\n {dadosNota.ntf_modelo}\r\n \r\n \r\n \r\n \r\n {moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n {dadosNota.tip_descricao}\r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosNota.valor_total, true)} \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloudUploadOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { HasValue, novaAbaNavegador } from \"../../../services/funcoes\";\r\nimport { MaskFormat, FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalReenviarSefaz({ dadosNota, exibirModalReenviarSefaz, fecharModalReenviarSefaz, titleModal, textoBotao }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const modeloDescricao = { 55: \"NF-e\", 57: \"CT-e\", 65: \"NFC-e\", 98: \"NFS-e\", };\r\n\r\n const getDescricaoModelo = (codigo) => {\r\n return modeloDescricao[codigo] || \"Modelo desconhecido\";\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalReenviarSefaz();\r\n }\r\n });\r\n };\r\n\r\n const realizarReenvioSefaz = () => {\r\n setCarregando(true);\r\n // Nota de Serviço\r\n if (dadosNota.ntf_modelo === \"98\") {\r\n let _link = `NotaFiscal/ReenviarRps/${dadosNota.ntf_id}`;\r\n\r\n api.post(_link).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1) {\r\n notification.success({ message: 'Sucesso', description: `NF-e Autorizada com sucesso!` });\r\n novaAbaNavegador(`${retornoNF.data.controleloterps.clr_linknfse}`);\r\n let formaPagItegrado = retornoNF.data.notafiscalformapgtos.filter((item) => (HasValue(item.imp_id)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${retornoNF.data.ntf_id}`);\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n setCarregando(false);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n form.resetFields();\r\n fecharModalReenviarSefaz();\r\n });\r\n console.log(dadosNota)\r\n } else if (dadosNota.ntf_modelo === \"57\") {\r\n let _link = `ConhecimentoTransporte/ReenviarCteSefaz/${dadosNota.ntf_id}`;\r\n api.post(_link).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1) {\r\n notification.success({ message: 'Sucesso', description: `CT-e Autorizado com sucesso!` });\r\n novaAbaNavegador(`${retornoNF.data.controleloterps.clr_linknfse}`);\r\n let formaPagItegrado = retornoNF.data.notafiscalformapgtos.filter((item) => (HasValue(item.imp_id)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${retornoNF.data.ntf_id}`);\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar o Conhecimento de Transporte Eletrônico!', message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar o Conhecimento de Transporte Eletrônico!' + retornoNF.data.ntf_xmotivo, message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar o Conhecimento de Transporte Eletrônico!', message: `Aviso` });\r\n }\r\n setCarregando(false);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n form.resetFields();\r\n fecharModalReenviarSefaz();\r\n });\r\n console.log(dadosNota)\r\n } else {\r\n let _link = `NotaFiscal/ReenviarNotaSefaz/${dadosNota.ntf_id}`;\r\n if (dadosNota.ntf_tiponota == 3 && dadosNota.ntf_finalidade === 3)// Nota ajuste\r\n _link = `NotaFiscalDebitoCredito/ReenviarNotaSefaz/${dadosNota.ntf_id}`;\r\n\r\n api.post(_link).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1 && !!retornoNF.data.ntf_chavenfe) {\r\n notification.success({ message: 'Sucesso', description: `NF-e Autorizada com sucesso!` });\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${retornoNF.data.ntf_chavenfe}`);\r\n let formaPagItegrado = retornoNF.data.notafiscalformapgtos.filter((item) => (HasValue(item.imp_id)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${retornoNF.data.ntf_id}`);\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal! ' + retornoNF.data.ntf_xmotivo, message: `Aviso` });\r\n }\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar nota fiscal!', message: `Aviso` });\r\n }\r\n setCarregando(false);\r\n }\r\n ).finally(() => {\r\n setCarregando(false);\r\n form.resetFields();\r\n fecharModalReenviarSefaz();\r\n });\r\n console.log(dadosNota)\r\n }\r\n }\r\n return (\r\n \r\n Reenviar {getDescricaoModelo(dadosNota.ntf_modelo)} Sefaz\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe} \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n {MaskFormat(dadosNota.ntf_cnpjcpfdest, '', true)}\r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_serie}\r\n \r\n \r\n {dadosNota.ntf_modelo}\r\n \r\n \r\n \r\n \r\n {moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n {dadosNota.ntf_modelo === \"98\" && (\r\n <>\r\n \r\n \r\n {dadosNota.clr_numerolote}\r\n \r\n \r\n {dadosNota.clr_numerorps}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n \r\n \r\n {FormatNumber(dadosNota.valor_total, true)} \r\n \r\n \r\n \r\n
\r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Modal, Select, Typography } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalDevolucao({ exibirModalDevolucao = false, fecharModalDevolucao, dadosNotaDevolucao, abrirManutencao }) {\r\n\r\n const [regimeTributario, setRegimeTributario] = useState([]);\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalDevolucao();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?nome=RegimeTributarioFiscal`).then(\r\n res => {\r\n setRegimeTributario(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }, []);\r\n\r\n function salvarRegimeTributario() {\r\n api.post(`Pessoa/EditarRegimeTributario?codigoPessoa=${dadosNotaDevolucao.pes_id}&codigoRegimeTributario=${formulario.for_regimetributariofiscal}`).then(res => {\r\n if (res.data) {\r\n fecharModalDevolucao();\r\n }\r\n }, erro => {\r\n Modal.error({\r\n title: `Atenção!`,\r\n content: `Não foi possivel alterar o regime tributário para o fornecedor: ${dadosNotaDevolucao.pes_nome}!`\r\n });\r\n fecharModalDevolucao(false);\r\n });\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n Para efetuar devolução de notas é necessário informar um regime tributário para o fornecedor: {dadosNotaDevolucao.pes_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Button, Modal, Table, notification, Divider } from \"antd\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined, MailOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { formatarCpf, isObjetoDiffVazio } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalEnvioNFeEmail({ exibirModalEnvioNFeEmail, fecharModalEnvioNFeEmail }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [listaEmail, setListaEmail] = useState([]);\r\n const [form] = Form.useForm();\r\n const [modeloDoc, setModeloDoc] = useState(); ;\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n setDadosNota(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n \r\n useEffect(() => {\r\n if (dadosNota?.ntf_chavenfe) { \r\n setModeloDoc(dadosNota.ntf_chavenfe.substring(20, 22));\r\n }\r\n }, [dadosNota.ntf_chavenfe]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalEnvioNFeEmail();\r\n }\r\n });\r\n };\r\n\r\n const enviarEmail = () => {\r\n let dados = {};\r\n let enderecos = [];\r\n listaEmail.forEach((email) => {\r\n enderecos.push(email.dest);\r\n })\r\n dados.ntf_id =dadosNota.ntf_id;\r\n dados.chaveNFe = dadosNota.ntf_chavenfe;\r\n dados.enderecosDestinatarios = enderecos;\r\n var url = \"NotaFiscal/EnviarEmailXml\";\r\n if (modeloDoc == 57) {\r\n url = \"ConhecimentoTransporte/EnviarEmailXml\"\r\n } \r\n api.post(url, dados).then(\r\n (res) => {\r\n notification.success({ description: 'Email enviado com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModalEnvioNFeEmail()\r\n }\r\n );\r\n };\r\n\r\n function adicionarEmail() {\r\n let endereco = form.getFieldValue().enderecoEmail;\r\n if (!!endereco) {\r\n let lista = [...listaEmail];\r\n lista.push({ id: lista.length, dest: endereco });\r\n setListaEmail(lista);\r\n form.setFieldsValue({ enderecoEmail: null });\r\n }\r\n };\r\n\r\n function excluirEmail(record) {\r\n let listaE = [...listaEmail];\r\n let emailLista = listaE.filter((lista) => (lista.id !== record.id));\r\n setListaEmail(emailLista);\r\n };\r\n\r\n return (\r\n \r\n Enviar E-mail\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n {dadosNota.ser_serie}\r\n \r\n \r\n {!!dadosNota.ntf_dataemissao ? moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.valor_total ? FormatNumber(dadosNota.valor_total, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.ntf_cnpjcpfdest ? formatarCpf(dadosNota.ntf_cnpjcpfdest) : ''}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {dest}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\n\r\nexport default function ModalImagemQr({ isOpen, base64Image, tempo }) {\r\n\r\n \r\n if (!isOpen) return null; // Se a modal não estiver aberta, não renderiza nada\r\n \r\n return (\r\n
\r\n
\r\n

Escaneie o QR Code

\r\n {/* Exibe o contador */}\r\n \r\n
\r\n
\r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Button, Modal, Table, notification, Divider, Checkbox } from \"antd\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment, { now } from 'moment';\r\n\r\nimport { FaWhatsapp } from 'react-icons/fa';\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { FormatNumber, FormatFone } from \"../../../ValueObjects\";\r\nimport { formatarCpf, isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport ModalImagemQr from \"../modalImagemQr\";\r\n\r\nexport default function ModalEnvioNFeWhats({ exibirModalEnvioNFeWhats, fecharModalEnvioNFeWhats }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [listaWhats, setListaWhats] = useState([]);\r\n const [form] = Form.useForm();\r\n const [modeloDoc, setModeloDoc] = useState();\r\n const [base64Image, setBase64Image] = useState('');\r\n const [conectado, setConectado] = useState(false);\r\n const [exibirQr, setExibirQR] = useState(false);\r\n const [temporizador, setTemporizador] = useState(60);\r\n const [enviaNota, setEnviaNota] = useState(false);\r\n const [enviaBoleto, setEnviaBoleto] = useState(false);\r\n const [enviaXml, setEnviaXml] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n retornaDadosCliente(manutencao.dados.pes_id);\r\n setDadosNota(manutencao.dados);\r\n conectar();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() =>\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n\r\n useEffect(() => {\r\n if (dadosNota?.ntf_chavenfe) {\r\n setModeloDoc(dadosNota.ntf_chavenfe.substring(20, 22));\r\n }\r\n }, [dadosNota.ntf_chavenfe]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaWhats(null);\r\n form.resetFields();\r\n fecharModalEnvioNFeWhats();\r\n }\r\n });\r\n };\r\n\r\n const onCloseModalQr = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setExibirQR(false);\r\n setTemporizador(temporizador);\r\n\r\n }\r\n });\r\n };\r\n\r\n async function enviarWhats() {\r\n let dados = {};\r\n let numero = [];\r\n listaWhats.forEach((Whats) => {\r\n numero.push(Whats.dest);\r\n })\r\n dados.ntf_id = dadosNota.ntf_id;\r\n dados.chaveNFe = dadosNota.ntf_chavenfe;\r\n dados.numeroDestinatarios = numero;\r\n let whats = {\r\n Id: dadosNota.ntf_id,\r\n ChaveAcesso: dadosNota.ntf_chavenfe,\r\n numerosReceptor: numero,\r\n enviaNota: enviaNota,\r\n enviaBoleto: enviaBoleto,\r\n enviaXml: enviaXml,\r\n //extensao: 'pdf', //podera ser utilizado no futuro para enviar o arquivo em formatos alem de pdf\r\n mensagem: form.getFieldValue().mensagem\r\n };\r\n /// numero da empresa deve ser um numero com codigo de area mais numero de telefone com 8 digitos\r\n if (conectado === true && (!!!numero || numero.length > 0)) {\r\n enviarDados(whats);\r\n }\r\n else if (!numero || numero.length === 0 && conectado === false) {\r\n notification.Alert({ description: 'Adicione um ou mais numeros de remetente!', message: 'Aviso' });\r\n return;\r\n }\r\n else if (conectado === false && !!!numero || numero.length > 0) {\r\n gerarQRCode(whats);\r\n }\r\n }\r\n\r\n async function gerarQRCode(whats) {\r\n let base64 = (await api.get(`WhatsApp/GeraQrCodeWhats`)).data; // Pode passar qualquer string aqui\r\n setExibirQR(true);\r\n setBase64Image(base64); // Atualiza o estado com o QR Code\r\n verificarConexao(whats);\r\n }\r\n\r\n async function conectar() {\r\n let conectar = (await api.get('WhatsApp/WhatsConectado')).data;\r\n setConectado(conectar);\r\n return conectar;\r\n }\r\n\r\n async function verificarConexao(whats) {\r\n const timeout = Date.now() + (temporizador * 1000); // Define o tempo limite em segundos\r\n while (Date.now() < timeout) {\r\n let status = await conectar();\r\n if (status === true) {\r\n setExibirQR(false);\r\n console.log(\"Conectado!\");\r\n enviarDados(whats);\r\n notification.success({ description: 'Conectado!', message: 'Aviso' });\r\n return;\r\n }\r\n await new Promise((resolve) => setTimeout(resolve, 4500)); // Aguarda 4,5s antes de tentar novamente\r\n }\r\n gerarQRCode(); // Chama a função para gerar um novo QR Code\r\n }\r\n\r\n\r\n async function enviarDados(whats) {\r\n var url = \"NotaFiscal/EnviarWhats\";\r\n api.post(url, whats).then(\r\n (res) => {\r\n notification.success({ description: 'Nota enviada com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModalEnvioNFeWhats()\r\n }\r\n );\r\n form.resetFields();\r\n }\r\n\r\n async function retornaDadosCliente(dados) {\r\n if (!!dados) {\r\n let clienteTelefone = (await api.get(`PessoaTelefone/ListaTelefone?IdPessoa=` + dados)).data;\r\n let telefoneWhats = clienteTelefone.find(telefone => telefone.psc_whatsapp === true);\r\n let lista = [];\r\n if (telefoneWhats?.psc_numero !== null && telefoneWhats?.psc_numero !== undefined) {\r\n lista.push({ id: lista.length, dest: telefoneWhats?.psc_numero });\r\n }\r\n setListaWhats(lista);\r\n }\r\n }\r\n\r\n function adicionarWhats() {\r\n let numero = form.getFieldValue().numeroWhats;\r\n if (!!numero) {\r\n let lista = [...listaWhats];\r\n lista.push({ id: lista.length, dest: numero });\r\n setListaWhats(lista);\r\n form.setFieldsValue({ numeroWhats: null });\r\n }\r\n };\r\n\r\n function excluirWhats(record) {\r\n let listaE = [...listaWhats];\r\n let WhatsLista = listaE.filter((lista) => (lista.id !== record.id));\r\n setListaWhats(WhatsLista);\r\n };\r\n\r\n function handleEnviaNota() {\r\n setEnviaNota(!enviaNota);\r\n }\r\n function handleEnviaBoleto() {\r\n setEnviaBoleto(!enviaBoleto);\r\n }\r\n function handleEnviaXml() {\r\n setEnviaXml(!enviaXml);\r\n }\r\n\r\n\r\n return (\r\n \r\n Enviar WhatsApp\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n {dadosNota.ser_serie}\r\n \r\n \r\n {!!dadosNota.ntf_dataemissao ? moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.valor_total ? FormatNumber(dadosNota.valor_total, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.ntf_cnpjcpfdest ? formatarCpf(dadosNota.ntf_cnpjcpfdest) : ''}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n { handleEnviaNota(value) }}>Enviar Nota Fiscal? \r\n \r\n \r\n \r\n \r\n { handleEnviaBoleto(value) }}>Enviar Boleto? \r\n \r\n \r\n \r\n \r\n { handleEnviaXml(value) }}>Enviar XML? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {FormatFone(dest)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n width={305} // Define a largura do modal (padrão é 520px)\r\n bodyStyle={{ height: \"320px\" }} // Define a altura do corpo do modal\r\n >\r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Result, Row, Col, Button, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, CustomerServiceOutlined } from \"@ant-design/icons\";\r\n\r\nimport { AberturaChamado } from \"../../../components\";\r\n\r\nexport default function ModalAjudaRejeicaoNfe({exibirModalAjudaRejeicaoNfe, fecharModalAjudaRejeicaoNfe}) {\r\n\r\n const [activeOpen, setActiveOpen] = useState(false);\r\n\r\n const handleOnClickOpen = () => {\r\n setActiveOpen(true); \r\n }\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalAjudaRejeicaoNfe();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n
\r\n Aguarde... \r\n }\r\n />\r\n
\r\n \r\n
Código - Motivo \r\n \r\n \r\n \r\n No momento não temos nenhuma possivel solução para a rejeição da NF-e ocorrida nesta nota fiscal (cStat = 900) cadastrada em nossa base de dados.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { FormatNumber } from \"../ValueObjects\";\r\nimport api from \"./api\";\r\nimport { getEmpresa } from \"./auth\";\r\nimport jsreports from \"jsreports/jsreports-all\";\r\nimport { carregarConfiguracoes, imprimirRawBase64 } from \"./servidorImpressora\";\r\nimport { substituirCaracterEspecial } from \"./funcoes\";\r\n\r\nconst squemaEtiquetaProduto = [\r\n {\r\n nome: 'Codigo_Empresa',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Empresa',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Produto',\r\n tipo: 'number'\r\n },\r\n {\r\n nome: 'Produto',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Grade',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Marca',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Preco',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Ean',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Etiqueta',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Codigo_Referencia',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Observacao',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Quantidade_Parcela',\r\n tipo: 'string'\r\n },\r\n {\r\n nome: 'Valor_Parcelado',\r\n tipo: 'string'\r\n }\r\n];\r\n\r\n\r\nexport async function imprimirEtiquetaImp(modelo, listaItens) {\r\n let listaEtiqueta = [];\r\n let comandosEnviarImp = [];\r\n let config = await carregarConfiguracoes();\r\n listaItens.forEach((item) => {\r\n let indice = 0;\r\n while (indice < item.quantidade) {\r\n let etiqueta = {\r\n pro_codigo: item.pro_codigo,\r\n pro_codigoetiqueta: item.pro_codigoetiqueta,\r\n prg_codigoetiqueta: item.prg_codigoetiqueta,\r\n pro_referencia: item.pro_referencia,\r\n grade: item.grade,\r\n pro_ean: !!item.prg_ean ? item.prg_ean : item.pro_ean,\r\n lpi_valorvenda: item.lpi_valorvenda,\r\n pro_descricao: item.pro_descricao\r\n }\r\n listaEtiqueta.push(etiqueta);\r\n indice++;\r\n }\r\n });\r\n\r\n let qtdComandos = parseInt(listaEtiqueta.length / modelo.met_colunas);\r\n for (let x = 0; x <= qtdComandos; x++) {\r\n let comando = modelo.met_comando;\r\n for (let i = 1; i <= modelo.met_colunas; i++) {\r\n let indiceEtiqueta = i + (x * modelo.met_colunas);\r\n if (indiceEtiqueta <= listaEtiqueta.length) {\r\n let indice = indiceEtiqueta - 1;\r\n /* let configCodBarra = formulario.getFieldValue().persCodBarra;\r\n if (configCodBarra === 1) {\r\n comando = comando.replace('@codigoBarras' + i, listaEtiqueta[indice].pro_codigo);\r\n } else if (configCodBarra === 2) {\r\n comando = comando.replace('@codigoBarras' + i, !!listaEtiqueta[indice].pro_codigoetiqueta ? listaEtiqueta[indice].pro_codigoetiqueta : listaEtiqueta[indice].prg_codigoetiqueta);\r\n } else {*/\r\n comando = comando.replace('@codigoBarras' + i, listaEtiqueta[indice].pro_ean);\r\n //}\r\n comando = comando.replace('@precoProduto' + i, 'R$ ' + parseFloat(listaEtiqueta[indice].lpi_valorvenda).toFixed(2).replace('.', ','));\r\n /*if (dadosAdicionais) {\r\n let entrada = 1;\r\n let qtdParc = formulario.getFieldValue().numeroParcelas\r\n if (formulario.getFieldsValue().possuiEntrada) {\r\n comando = comando.replace('@formaPagamento' + i, `${qtdParc}x(${entrada}+${qtdParc - entrada})`);\r\n } else {\r\n comando = comando.replace('@formaPagamento' + i, `${qtdParc}x`);\r\n }\r\n comando = comando.replace('@valorPagamento' + i, FormatNumber(listaEtiqueta[indice].lpi_valorvenda / qtdParc, true));\r\n } else {*/\r\n comando = comando.replace('@formaPagamento' + i, ' ');\r\n comando = comando.replace('@valorPagamento' + i, ' ');\r\n //}\r\n\r\n comando = comando.replace('@codigoProduto' + i, !!listaEtiqueta[indice].pro_codigo ? listaEtiqueta[indice].pro_codigo : ' ');\r\n comando = comando.replace('@codigoEtiqueta' + i, !!listaEtiqueta[indice].pro_codigoetiqueta ? listaEtiqueta[indice].pro_codigoetiqueta : ' ');\r\n comando = comando.replace('@referenciaProduto' + i, !!listaEtiqueta[indice].pro_referencia ? listaEtiqueta[indice].pro_referencia : ' ');\r\n\r\n if (!!listaEtiqueta[indice].descricaograde) {\r\n comando = comando.replace('@gradeProduto' + i + 'Linha1', listaEtiqueta[indice].descricaograde.substr(0, parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n if (listaEtiqueta[indice].descricaograde.length > parseInt(modelo.met_quantidadecaracteresdescricaoproduto)) {\r\n comando = comando.replace('@gradeProduto' + i + 'Linha2', listaEtiqueta[indice].descricaograde.substr(parseInt(modelo.met_quantidadecaracteresdescricaoproduto), parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n } else {\r\n comando = comando.replace('@gradeProduto' + i + 'Linha2', ' ');\r\n }\r\n } else {\r\n comando = comando.replace('@gradeProduto' + i + 'Linha1', ' ');\r\n comando = comando.replace('@gradeProduto' + i + 'Linha2', ' ');\r\n }\r\n\r\n comando = comando.replace('@descricaoProduto' + i + 'Linha1', listaEtiqueta[indice].pro_descricao.substr(0, parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n\r\n if (listaEtiqueta[indice].pro_descricao.length > parseInt(modelo.met_quantidadecaracteresdescricaoproduto)) {\r\n comando = comando.replace('@descricaoProduto' + i + 'Linha2', listaEtiqueta[indice].pro_descricao.substr(parseInt(modelo.met_quantidadecaracteresdescricaoproduto), parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n } else {\r\n comando = comando.replace('@descricaoProduto' + i + 'Linha2', ' ');\r\n }\r\n\r\n comando = substituirCaracterEspecial(comando);\r\n\r\n } else {\r\n comando = comando.replace('@codigoProduto' + i, ' ');\r\n comando = comando.replace('@codigoEtiqueta' + i, ' ');\r\n comando = comando.replace('@referenciaProduto' + i, ' ');\r\n comando = comando.replace('@codigoBarras' + i, ' ');\r\n comando = comando.replace('@precoProduto' + i, ' ');\r\n comando = comando.replace('@formaPagamento' + i, ' ');\r\n comando = comando.replace('@valorPagamento' + i, ' ');\r\n comando = comando.replace('@gradeProduto' + i + 'Linha1', ' ');\r\n comando = comando.replace('@gradeProduto' + i + 'Linha2', ' ');\r\n comando = comando.replace('@descricaoProduto' + i + 'Linha1', ' ');\r\n comando = comando.replace('@descricaoProduto' + i + 'Linha2', ' ');\r\n }\r\n }\r\n comandosEnviarImp.push(comando);\r\n }\r\n\r\n comandosEnviarImp.reduce(function (p, val) {\r\n return p.then(function () {\r\n\r\n return imprimirRawBase64(config.impressoraEtiqueta.name, val);\r\n });\r\n }, Promise.resolve());\r\n};\r\n\r\nexport function imprimirImpressoraPadrao(idModelo, listaItens) {\r\n\r\n buscarDadosEmpresa((dadosEmpresa) => {\r\n api.get(`RelatorioModeloEtiqueta/Listar?Id=${idModelo}`).then(\r\n res => {\r\n montarEtiquetaImpressora(res.data, listaItens, dadosEmpresa);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n });\r\n};\r\n\r\nfunction buscarDadosEmpresa(callback) {\r\n api.get(`Empresa/Buscar/${getEmpresa()}`).then(\r\n res => {\r\n if (callback) {\r\n callback(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n};\r\n\r\nfunction montarEtiquetaImpressora(dadosRel, listaItens, dadosEmpresa) {\r\n let qtd = dadosRel.quantidadeColuna;\r\n let qtdTot = 0;\r\n let campos = [];\r\n let dadosCampos = [];\r\n let listaDadosImpressora = [];\r\n let numeroColuna = 1;\r\n let dadosAux = [];\r\n let dadosImpressora = {\r\n id: \"etiqueta\",\r\n name: \"etiqueta\",\r\n };\r\n listaItens.forEach((itens) => {\r\n qtdTot += itens.quantidade;\r\n });\r\n squemaEtiquetaProduto.forEach((squema) => {\r\n for (let i = 1; i <= qtd; i++) {\r\n campos.push({ name: `${squema.nome}_Coluna_${i}`, type: squema.tipo })\r\n }\r\n });\r\n\r\n listaItens.forEach((produto) => {\r\n for (let idx = 1; idx <= produto.quantidade; idx++) {\r\n let valorParcelado = 0;\r\n let quantidadeParcela = '';\r\n /*if (dadosAdicionais) {\r\n let qtdParcelas = !!formulario.getFieldValue().numeroParcelas ? formulario.getFieldValue().numeroParcelas : 1;\r\n if (!!formulario.getFieldValue().possuiEntrada) {\r\n quantidadeParcela = `${qtdParcelas}x(1+${qtdParcelas - 1})`;\r\n } else {\r\n quantidadeParcela = qtdParcelas + 'x';\r\n }\r\n\r\n valorParcelado = FormatNumber(produto.lpi_valorvenda / qtdParcelas, true);\r\n }*/\r\n dadosAux.push({\r\n ['Codigo_Empresa_Coluna_' + numeroColuna]: getEmpresa(),\r\n ['Empresa_Coluna_' + numeroColuna]: dadosEmpresa.emp_nomefantasia,\r\n ['Codigo_Produto_Coluna_' + numeroColuna]: produto.pro_codigo,\r\n ['Produto_Coluna_' + numeroColuna]: produto.pro_descricao,\r\n ['Grade_Coluna_' + numeroColuna]: produto.descricaograde,\r\n ['Marca_Coluna_' + numeroColuna]: produto.mar_nome,\r\n ['Preco_Coluna_' + numeroColuna]: FormatNumber(produto.lpi_valorvenda, true),\r\n ['Ean_Coluna_' + numeroColuna]: !!produto.prg_ean ? produto.prg_ean : produto.pro_ean,\r\n ['Codigo_Etiqueta_Coluna_' + numeroColuna]: produto.pro_codigoetiqueta,\r\n ['Codigo_Referencia_Coluna_' + numeroColuna]: produto.pro_referencia,\r\n ['Observacao_Coluna_' + numeroColuna]: produto.observacao,\r\n ['Quantidade_Parcela_Coluna_' + numeroColuna]: quantidadeParcela,\r\n ['Valor_Parcelado_Coluna_' + numeroColuna]: valorParcelado\r\n });\r\n\r\n if (numeroColuna === qtd || (qtdTot < qtd && qtdTot === numeroColuna)) {\r\n if (qtdTot < qtd) {\r\n numeroColuna++;\r\n for (let idx = numeroColuna; idx <= qtd; idx++) {\r\n dadosAux.push(retornaEtiquetaEmBranco(idx));\r\n }\r\n }\r\n dadosCampos.push(retornaObjeto(dadosAux));\r\n qtdTot = qtdTot - qtd;\r\n dadosAux = [];\r\n numeroColuna = 1;\r\n } else {\r\n numeroColuna++;\r\n }\r\n }\r\n });\r\n dadosImpressora.data = dadosCampos;\r\n dadosImpressora.schema = {\r\n fields: campos\r\n };\r\n\r\n listaDadosImpressora.push(dadosImpressora);\r\n jsreports.export({\r\n report_def: JSON.parse(dadosRel.jsonRelatorio),\r\n datasets: listaDadosImpressora,\r\n format: 'pdf',\r\n outputHandler: function (dados) {\r\n window.open(URL.createObjectURL(dados), '_blank');\r\n }\r\n })\r\n};\r\n\r\nfunction retornaEtiquetaEmBranco(numeroColuna) {\r\n return {\r\n ['Codigo_Empresa_Coluna_' + numeroColuna]: null,\r\n ['Empresa_Coluna_' + numeroColuna]: '',\r\n ['Codigo_Produto_Coluna_' + numeroColuna]: null,\r\n ['Produto_Coluna_' + numeroColuna]: '',\r\n ['Grade_Coluna_' + numeroColuna]: '',\r\n ['Marca_Coluna_' + numeroColuna]: '',\r\n ['Preco_Coluna_' + numeroColuna]: null,\r\n ['Ean_Coluna_' + numeroColuna]: '',\r\n ['Codigo_Etiqueta_Coluna_' + numeroColuna]: null,\r\n ['Codigo_Referencia_Coluna_' + numeroColuna]: '',\r\n ['Observacao_Coluna_' + numeroColuna]: '',\r\n ['Quantidade_Parcela_Coluna_' + numeroColuna]: null,\r\n ['Valor_Parcelado_Coluna_' + numeroColuna]: null\r\n }\r\n};\r\n\r\nfunction retornaObjeto(listaObj) {\r\n var objRetorno = {};\r\n for (var i = 0; i < listaObj.length; i++) {\r\n for (var attrname in listaObj[i]) {\r\n objRetorno[attrname] = listaObj[i][attrname];\r\n }\r\n }\r\n return objRetorno;\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Select, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, PrinterOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport api from \"../../../services/api\";\r\nimport { carregarConfiguracoes, ServidorImpressoraOnline } from \"../../../services/servidorImpressora\";\r\nimport { imprimirEtiquetaImp, imprimirImpressoraPadrao } from \"../../../services/funcoesEtiqueta\";\r\nimport SelectPaginado from \"../../../components/selectPaginado\";\r\n\r\nexport default function ModalImprimirEtiquetas({ exibirModalImprimirEtiquetas, fecharModalImprimirEtiquetas, dadosNota }) {\r\n\r\n const [listaPreco, setListaPreco] = useState([]);\r\n const [form] = Form.useForm();\r\n const [listaModelo, setListaModelo] = useState([]);\r\n const [listaModeloPadrao, setListaModeloPadrao] = useState([]);\r\n const [listaModeloEtiqueta, setListaModeloEtiqueta] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalImprimirEtiquetas();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!exibirModalImprimirEtiquetas) {\r\n verificarServidor();\r\n }\r\n }, [exibirModalImprimirEtiquetas]);\r\n\r\n useEffect(() => {\r\n buscarListaPreco();\r\n buscarModelo();\r\n buscarModeloEtiqueta();\r\n //buscarProdutos();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!dadosNota && isObjetoDiffVazio(dadosNota)) {\r\n listarItensNota();\r\n }\r\n }, [dadosNota])\r\n\r\n function buscarProdutos() {\r\n api.get(`Produto/ListaProdutoFiltro`).then(\r\n res => {\r\n let dados = res.data;\r\n let id = 0;\r\n dados.forEach((produto) => {\r\n produto.key = id;\r\n id++;\r\n });\r\n setListaProduto(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarListaPreco() {\r\n api.get(`ListaPreco/ListarTodasListaPreco`).then(\r\n res => {\r\n if (!!res.data) {\r\n setListaPreco(res.data.items);\r\n form.setFieldsValue({ ltp_id: res.data.items.filter(lista => lista.ltp_principal)[0].ltp_id })\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n async function verificarServidor() {\r\n let servidorOn = await ServidorImpressoraOnline();\r\n if (servidorOn.online) {\r\n let conf = await carregarConfiguracoes();\r\n if (!!conf) {\r\n if (!!!conf.impressoraEtiqueta || !isObjetoDiffVazio(conf.impressoraEtiqueta)) {\r\n notification.warn({ description: 'Você deve configurar a impressora de etiquetas a ser utilizada nesse computador!', message: 'Aviso' });\r\n } else if (!!!conf.modeloEtiqueta || !isObjetoDiffVazio(conf.modeloEtiqueta)) {\r\n notification.warn({ description: 'Você deve configurar o modelo de etiquetas padrão a ser utilizado nesse computador!', message: 'Aviso' });\r\n }\r\n }\r\n } else {\r\n notification.warn({ description: 'O Servidor de impressão não esta em execução nesse computador, para utilizar impressoras de etiquetas verifique as configurações!', message: 'Aviso' });\r\n //setServidorOn(false);\r\n\r\n }\r\n };\r\n\r\n function buscarModelo() {\r\n api.get(`ModeloEtiqueta/Listar?filtro=&ordem=%2Bmet_descricao`).then(\r\n res => {\r\n let dados = res.data.items;\r\n let seq = 0;\r\n dados.forEach((modelo) => {\r\n modelo.key = seq;\r\n modelo.descricaoModelo = modelo.met_descricao;\r\n modelo.id = modelo.met_id;\r\n seq++;\r\n })\r\n setListaModeloEtiqueta(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarModeloEtiqueta() {\r\n api.get(`RelatorioModeloEtiqueta/ListarGeral?TipoEtiqueta=0`).then(\r\n res => {\r\n let dados = res.data.items;\r\n let seq = 0;\r\n dados.forEach((modelo) => {\r\n modelo.key = seq;\r\n modelo.descricaoModelo = modelo.nome;\r\n seq++;\r\n });\r\n setListaModeloPadrao(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n async function listarItensNota() {\r\n let ret = await api.get(`NotaFiscal/RetornaItensEtiquetaNota?IdListaPreco=${form.getFieldValue().ltp_id}&IdNotaFiscal=${dadosNota.ntf_id}`);\r\n let retorno = ret.data;\r\n //let dados = listaProduto.filter((prodLista) => { return retorno.find((item) => (item.pro_id === prodLista.pro_id && item.prg_id === prodLista.prg_id)) });\r\n for (let [i, item] of retorno.entries()) {\r\n item.quantidade = parseInt(item.nfi_qtde);\r\n };\r\n setListaItens(retorno);\r\n };\r\n\r\n function onChangeTipo() {\r\n let tipo = parseInt(form.getFieldValue().tpEtiqueta);\r\n let lista = [];\r\n form.setFieldsValue({ modeloEtiqueta: null });\r\n if (tipo === 0) {//Impressora Padrao\r\n lista = [...listaModeloPadrao];\r\n } else {\r\n lista = [...listaModeloEtiqueta];\r\n }\r\n setListaModelo(lista);\r\n };\r\n\r\n function imprimirEtiqueta() {\r\n listarItensNota();\r\n let tipo = form.getFieldValue().tpEtiqueta;\r\n let itens = [...listaItens];\r\n let modelo = listaModelo.filter((mod) => { return mod.id === form.getFieldValue().modeloEtiqueta })[0];\r\n if (!!modelo && itens.length > 0) {\r\n if (tipo === 0) {\r\n imprimirImpressoraPadrao(modelo.id, itens)\r\n } else {\r\n imprimirEtiquetaImp(modelo, itens);\r\n }\r\n }\r\n };\r\n\r\n return (\r\n { imprimirEtiqueta() }}\r\n okText={\r\n <>\r\n Imprimir Etiqueta\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosNota.ntf_numero} \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n buscarListaPreco(value)}\r\n showSearch={true}\r\n allowClear={true}\r\n conteudo={\r\n lp => ({lp.ltp_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Descriptions, Form, InputNumber, Tooltip, Checkbox, Tag, Modal } from \"antd\";\r\nimport { QuestionCircleOutlined, ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { TabelaDados } from \"../../../components\";\r\n\r\nexport default function ModalGradeOrdemCompra({exibirModalGradeOrdemCompra, fecharModalGradeOrdemCompra}) {\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalGradeOrdemCompra();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n width={720}\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n 000 - descricao \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n Definir Valor Para todos os Itens da Grade \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `R$ ${value}`}\r\n parser={value => value.replace('R$ ', '')}\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n \r\n
\r\n \r\n {ean} \r\n \r\n \r\n \r\n {mgp_descricao} \r\n \r\n \r\n \r\n `R$ ${value}`}\r\n parser={value => value.replace('R$ ', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } /> \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Descriptions, Typography, Modal, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalDetalhePedido({ exibirModalDetalhesPedido, fecharModalDetalhesPedido, ped_id }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [dadosPedido, setDadosPedido] = useState({ pedidoItem: [], pedidoFormaPgto: [] });\r\n\r\n const onCloseModal = () => {\r\n fecharModalDetalhesPedido();\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModalDetalhesPedido && !!ped_id) {\r\n carregarItensPedido(ped_id);\r\n }\r\n }, [exibirModalDetalhesPedido]);\r\n\r\n function carregarItensPedido(ped_id) {\r\n api.get(`Pedido/BuscaPedido?IdPedido=${ped_id}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n setDadosPedido(res.data)\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function formataCpf(value) {\r\n if (!!value) {\r\n return value.replace(/\\D/g, '')\r\n .replace(/(\\d{3})(\\d)/, '$1.$2')\r\n .replace(/(\\d{3})(\\d)/, '$1.$2')\r\n .replace(/(\\d{3})(\\d{1,2})/, '$1-$2')\r\n .replace(/(-\\d{2})\\d+?$/, '$1')\r\n }\r\n };\r\n\r\n function formataCnpj(value) {\r\n if (!!value) {\r\n return value.replace(/^(\\d{2})(\\d)/, \"$1.$2\")\r\n .replace(/^(\\d{2})\\.(\\d{3})(\\d)/, \"$1 $2 $3\")\r\n .replace(/\\.(\\d{3})(\\d)/, \".$1/$2\")\r\n .replace(/(\\d{4})(\\d)/, \"$1-$2\")\r\n }\r\n };\r\n\r\n function retornaFrete() {\r\n let totFrete = 0;\r\n dadosPedido.pedidoItem.forEach((item) => {\r\n totFrete += parseFloat(item.pdi_valorfrete);\r\n });\r\n return totFrete;\r\n };\r\n\r\n function retornaValorTotal() {\r\n let valorTotal = 0;\r\n dadosPedido.pedidoItem.forEach((item) => {\r\n valorTotal += parseFloat(item.pdi_valortotal) + parseFloat(item.pdi_valorfrete);\r\n });\r\n return valorTotal;\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {dadosPedido.ped_id}\r\n \r\n \r\n {dadosPedido.ped_numero}\r\n \r\n \r\n {!!dadosPedido.pef_cpf ? formataCpf(dadosPedido.pef_cpf) : formataCnpj(dadosPedido.pej_cnpj)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosPedido.loc_id_transferencia ? dadosPedido.loc_descricao : dadosPedido.pes_nomecliente}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosPedido.pes_endereco}, {dadosPedido.pes_nroestabelecimento}, {dadosPedido.pes_bairro}, {dadosPedido.pes_cidade}, {dadosPedido.pes_uf}, {dadosPedido.pes_cep}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosPedido.pes_nometransportador}\r\n \r\n \r\n {dadosPedido.pes_nomevendedor}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosPedido.ped_observacao ? dadosPedido.ped_observacao : 'Não informado'}\r\n \r\n \r\n {FormatNumber(retornaFrete(), true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosPedido.ped_datainclusao ? moment(dadosPedido.ped_datainclusao).format('DD/MM/YYYY') : 'Não informado'}\r\n \r\n \r\n {!!dadosPedido.ped_dataprevisaoentrega ? moment(dadosPedido.ped_dataprevisaoentrega).format('DD/MM/YYYY') : 'Não informado'}\r\n \r\n \r\n {!!dadosPedido.ped_datavalidade ? moment(dadosPedido.ped_datavalidade).format('DD/MM/YYYY') : 'Não informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(retornaValorTotal(), true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Itens\" Itens\r\n \r\n \r\n \r\n {dadosPedido.pedidoItem.map((itens) => (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n {itens.pro_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {parseInt(itens.pdi_quantidade)}\r\n \r\n \r\n {FormatNumber(itens.pdi_valorunitario, true)}\r\n \r\n \r\n {FormatNumber(itens.pdi_valortotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \"Forma Forma de Pagamento\r\n \r\n \r\n \r\n {dadosPedido.pedidoFormaPgto.map(formaPagamento => (\r\n
\r\n \r\n \r\n
\r\n {formaPagamento.fpg_descricao} / {formaPagamento.cpg_descricao} (R$):\r\n \r\n \r\n {FormatNumber(formaPagamento.pfp_valor, true)}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, InputNumber, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../../state';\r\nimport { manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function ModalDevolucaoCondicional({ exibirModal, fecharModal, dados, dadosItens, setDadosItens }) {\r\n\r\n const [formDados] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n if (!!dados) {\r\n formDados.setFieldsValue(dados);\r\n formDados.setFieldsValue({ vci_quantidadeDevolvida: dados.vci_devolvido });\r\n } else {\r\n formDados.resetFields();\r\n }\r\n }, [dados]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const salvarDados = values => {\r\n if (values.vci_quantidadeDevolvida > dados.vci_quantidade) {\r\n return (\r\n notification.warning({\r\n message: \"Aviso\",\r\n description: \"Valor informado maior a que quantidade pendente\",\r\n })\r\n )\r\n } else if (values.vci_quantidadeDevolvida < 0) {\r\n return (\r\n notification.warning({\r\n message: \"Aviso\",\r\n description: \"Valor informado menor que 0, favor informar um valor valido\",\r\n })\r\n )\r\n }\r\n dadosItens.filter((item) => { return item.vci_id === dados.vci_id })[0].vci_devolvido = values.vci_quantidadeDevolvida;\r\n if (dadosItens.filter((item) => { return item.vci_id === dados.vci_id })[0].vci_devolvido === dadosItens.filter((item) => { return item.vci_id === dados.vci_id })[0].vci_quantidade) {\r\n dadosItens.filter((item) => { return item.vci_id === dados.vci_id })[0].devolvidoTotal = true;\r\n }else{\r\n dadosItens.filter((item) => { return item.vci_id === dados.vci_id })[0].devolvidoTotal = false;\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosItens } });\r\n fecharModal();\r\n }\r\n\r\n return (\r\n { formDados.submit() }}\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from 'react';\r\nimport { Row, Col, Tag, Table } from \"antd\";\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\n\r\nexport default function TabItens({ itens }) {\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n {!!atributos &&\r\n \r\n \r\n {atributos.grade}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'UM.',\r\n width: 60,\r\n align: 'right',\r\n render: ({ ump_id }) => (\r\n
\r\n \r\n
\r\n {ump_id}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 60,\r\n align: 'right',\r\n render: ({ oit_qtde }) => (\r\n
\r\n \r\n
\r\n {oit_qtde}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ oit_valorunitario }) => (\r\n
\r\n {FormatNumber(oit_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ oit_valorunitario, oit_qtde }) => (\r\n
\r\n {FormatNumber(oit_qtde * oit_valorunitario, true)}\r\n
\r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n );\r\n}","\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Table } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../../ValueObjects';\r\nimport { validarNumeros } from \"../../../services/funcoes\";\r\n\r\nexport default function TabFormaPagamento({ formaPagamento }) {\r\n\r\n const [ valorFinal, setValorFinal] = useState();\r\n\r\n useEffect(() => {\r\n valortotal();\r\n }, [formaPagamento]);\r\n\r\n function valortotal (){\r\n let pagamento = [...formaPagamento];\r\n let dados = pagamento;\r\n dados.forEach((itens) =>{\r\n let desconto = validarNumeros((itens.orf_valortotal * itens.orf_percentualdesconto)/100);\r\n let acrescimo = validarNumeros((itens.orf_valortotal * itens.orf_percentualacrescimo)/100);\r\n let total = (validarNumeros(itens.orf_valortotal) + acrescimo) - desconto;\r\n\r\n itens.desconto = desconto;\r\n itens.acrescimo = acrescimo;\r\n itens.total = total;\r\n })\r\n setValorFinal(dados);\r\n }\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n {fpg_descricao} {!!cpg_descricao ? `/ ${cpg_descricao}` : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto',\r\n align: 'center',\r\n render: ({ orf_percentualdesconto }) => (\r\n
\r\n {FormatNumber(orf_percentualdesconto, true)} %\r\n
\r\n )\r\n },\r\n {\r\n title: 'Acréscimo',\r\n align: 'center',\r\n render: ({ orf_percentualacrescimo }) => (\r\n
\r\n {FormatNumber(orf_percentualacrescimo, true)} %\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor',\r\n align: 'right',\r\n render: ({ total }) => (\r\n
\r\n R$ {FormatNumber(!!total ? total : 0, true)}\r\n
\r\n )\r\n }\r\n ]} expandable={{\r\n expandedRowRender: ({ orf_observacao }) => (\r\n
\r\n \r\n
\r\n Obs.: { !!orf_observacao ? orf_observacao : \"Não Informado\" }\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Modal, Tabs } from \"antd\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { formatarCnpj, formatarCpf } from \"../../../services/funcoes\";\r\nimport { TabItens, TabFormaPagamento } from './tabPage';\r\n\r\nexport default function ModalDetalheOrcamento({ exibirModal, fecharModal, dadosOrcamento }) {\r\n\r\n const [orcamento, setOrcamento] = useState([]);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n\r\n useEffect(() => {\r\n if (!!dadosOrcamento?.orc_id) {\r\n api.get(`Orcamento/Buscar?orc_id=${dadosOrcamento.orc_id}`).then(\r\n (res) => {\r\n setOrcamento(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n }, [dadosOrcamento]);\r\n\r\n const funcaoFecharModal = () => {\r\n setAbaSelecionada(\"1\");\r\n fecharModal();\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {orcamento.orc_numero}\r\n \r\n \r\n {orcamento.pes_nome ? orcamento.pes_nome : orcamento.orc_nomecliente}\r\n \r\n \r\n {!!orcamento.pef_cpf ? formatarCpf(orcamento.pef_cpf) : orcamento.pej_cnpj ? formatarCnpj(orcamento.pej_cnpj) : \"Não Informado\"} \r\n \r\n \r\n {!!orcamento.orc_datainclusao ? moment(orcamento.orc_datainclusao).format('DD/MM/YYYY') : \"Não Informado\"}\r\n \r\n \r\n {!!orcamento.orc_datavalidade ? moment(orcamento.orc_datavalidade).format('DD/MM/YYYY') : \"Não Informado\"}\r\n \r\n \r\n {orcamento.ven_nome}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valorfrete, true)}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valoroutros, true)}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valortotal, true)}\r\n \r\n \r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, Table, Tag, InputNumber, Input, Modal } from \"antd\";\r\nimport { PlusOutlined, MinusOutlined, ExclamationCircleOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport InputPreco from \"../../inputPreco\";\r\nimport { useStateValue } from '../../../state';\r\nimport { info, validarNumeros } from \"../../../services/funcoes\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalGradeProduto({ exibirModal, fecharModal, dados, origem, acrescimoDesconto = true, dadosValidacao }) {\r\n const [form] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosRetorno, setDadosRetorno] = useState([]);\r\n const [ehPercentual, setEhPercentual] = useState(false);\r\n const [dadosFiltrados, setDadosFiltrados] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dados) {\r\n dados.forEach((dado) => {\r\n if (!(!!dado.quantidade)) {\r\n dado.quantidade = 0;\r\n }\r\n });\r\n setDadosRetorno(dados);\r\n setDadosFiltrados(dados);\r\n } else {\r\n form.resetFields();\r\n }\r\n }, [dados]);\r\n\r\n useEffect(() => {\r\n pesquisaGrade(form.getFieldValue().pesquisa);\r\n }, [dadosRetorno]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n };\r\n\r\n const salvarDados = values => {\r\n dados?.forEach(item => {\r\n item.desconto = validarNumeros(form.getFieldValue()[`valorDesc${item.prg_id}`]);\r\n item.percDesc = validarNumeros(form.getFieldValue()[`percDesc${item.prg_id}`]);\r\n item.acrescimo = validarNumeros(form.getFieldValue()[`valorAcresc${item.prg_id}`]);\r\n item.percAcresc = validarNumeros(form.getFieldValue()[`percAcres${item.prg_id}`]);\r\n });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, dadosGrade: [...dados] } } })\r\n fecharModal();\r\n form.resetFields();\r\n };\r\n\r\n function alterarQuantidade(item, operacao, qtde = null) {\r\n let dadosTemp = [...dadosRetorno];\r\n let itemTemp = dadosTemp.find((dado) => (dado === item));\r\n\r\n if (!!dadosValidacao && dadosValidacao.dadosNfeTransferencia && parseFloat(itemTemp.valorVenda) === 0) {\r\n info(\"Não foi possivel localizar o \" + dadosValidacao.dadosNfeTransferencia.custo.value + \" do item, selecione OUTRO CUSTO e informe o produto novamente!\");\r\n return;\r\n }\r\n\r\n if (qtde !== null) {\r\n itemTemp.quantidade = qtde;\r\n } else {\r\n let qtd = !!itemTemp.quantidade ? itemTemp.quantidade : 0;\r\n if (operacao === \"mais\") {\r\n qtd++;\r\n } else if (operacao === \"menos\" && qtd > 0) {\r\n qtd--;\r\n }\r\n itemTemp.quantidade = qtd;\r\n }\r\n itemTemp.valorTotal = (parseFloat(itemTemp.quantidade) * parseFloat(itemTemp.valorVenda));\r\n if (acrescimoDesconto) {\r\n calcularAcres(ehPercentual ? 'P' : 'V', item, itemTemp);\r\n calcularDesc(ehPercentual ? 'P' : 'V', item, itemTemp);\r\n }\r\n setDadosRetorno(dadosTemp);\r\n };\r\n\r\n function pesquisaGrade(campo) {\r\n let filtrados = [];\r\n if (!!campo) {\r\n for (let item of dadosRetorno) {\r\n if (item.ean.indexOf(campo) >= 0) {\r\n filtrados.push(item);\r\n } else {\r\n for (let grade of item.atributos) {\r\n if (grade.mgp_descricao.toLowerCase().indexOf(campo.toLowerCase()) >= 0) {\r\n filtrados.push(item);\r\n }\r\n }\r\n }\r\n }\r\n setDadosFiltrados(filtrados);\r\n } else {\r\n setDadosFiltrados([...dadosRetorno]);\r\n }\r\n };\r\n\r\n function calcularDesc(tipo, item, itemTemp = null) {\r\n let salvar = false;\r\n let dadosTemp = [...dadosRetorno];\r\n if (itemTemp === null) {\r\n itemTemp = dadosTemp.find((dado) => (dado === item));\r\n itemTemp.valorTotal = (parseFloat(!!itemTemp.valorVenda ? itemTemp.valorVenda : itemTemp.pre_custoultimacompra) * itemTemp.quantidade);\r\n salvar = true;\r\n }\r\n\r\n let percDesc = parseFloat(form.getFieldValue()[`percDesc${item.prg_id}`]);\r\n let valorDesc = parseFloat(form.getFieldValue()[`valorDesc${item.prg_id}`]);\r\n let valorAcresc = parseFloat(form.getFieldValue()[`valorAcresc${item.prg_id}`]);\r\n\r\n itemTemp.valorTotal = (parseFloat(!!itemTemp.valorVenda ? itemTemp.valorVenda : itemTemp.pre_custoultimacompra) * itemTemp.quantidade);\r\n let valorRet = 0;\r\n if (!!valorDesc || !!percDesc) {\r\n if (tipo === 'P' && !!percDesc) {\r\n valorRet = (percDesc * itemTemp.valorTotal) / 100;\r\n form.setFieldsValue({ [`valorDesc${item.prg_id}`]: valorRet });\r\n valorDesc = valorRet;\r\n } else {\r\n valorRet = (valorDesc * 100) / itemTemp.valorTotal;\r\n form.setFieldsValue({ [`percDesc${item.prg_id}`]: valorRet });\r\n }\r\n }\r\n itemTemp.valorTotal = parseFloat(itemTemp.valorTotal - valorDesc + valorAcresc);\r\n\r\n if (salvar) {\r\n setDadosRetorno(dadosTemp);\r\n }\r\n };\r\n\r\n function calcularAcres(tipo, item, itemTemp = null) {\r\n let salvar = false;\r\n let dadosTemp = [...dadosRetorno];\r\n if (itemTemp === null) {\r\n itemTemp = dadosTemp.find((dado) => (dado === item));\r\n salvar = true;\r\n }\r\n\r\n let percAcresc = parseFloat(form.getFieldValue()[`percAcres${item.prg_id}`]);\r\n let valorDesc = parseFloat(form.getFieldValue()[`valorDesc${item.prg_id}`]);\r\n let valorAcresc = parseFloat(form.getFieldValue()[`valorAcresc${item.prg_id}`]);\r\n\r\n itemTemp.valorTotal = (parseFloat(!!itemTemp.valorVenda ? itemTemp.valorVenda : itemTemp.pre_custoultimacompra) * itemTemp.quantidade);\r\n let valorRet = 0;\r\n if (!!valorAcresc || !!percAcresc) {\r\n if (tipo === 'P' && !!percAcresc) {\r\n valorRet = (percAcresc * itemTemp.valorTotal) / 100;\r\n form.setFieldsValue({ [`valorAcresc${item.prg_id}`]: valorRet });\r\n valorAcresc = valorRet;\r\n } else {\r\n valorRet = (valorAcresc * 100) / itemTemp.valorTotal;\r\n form.setFieldsValue({ [`percAcres${item.prg_id}`]: valorRet });\r\n }\r\n }\r\n itemTemp.valorTotal = parseFloat(itemTemp.valorTotal - valorDesc + valorAcresc);\r\n\r\n if (salvar) {\r\n setDadosRetorno(dadosTemp);\r\n }\r\n };\r\n\r\n return (\r\n \r\n Cancelar\r\n \r\n }\r\n onOk={() => { form.submit() }}\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n width={780}\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n { pesquisaGrade(campo) }} allowClear\r\n />\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {ean}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Grade',\r\n render: ({ atributos }) => (\r\n
\r\n \r\n {atributos.map(atrib => (\r\n
\r\n {atrib.mgp_descricao}\r\n \r\n ))}\r\n \r\n \r\n ),\r\n }, acrescimoDesconto ? {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desconto\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: 175,\r\n align: 'center',\r\n render: (record, { prg_id }) => (\r\n \r\n \r\n \r\n \r\n {/*\r\n */}\r\n \r\n \r\n \r\n \r\n \r\n { alterarQuantidade(record, \"\", e) }} />\r\n \r\n \r\n \r\n Informe a Senha Gerencial para poder realizar este procedimento.\r\n \r\n \r\n \r\n (visible ? : )}\r\n />\r\n\r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Table, Tag, Form, Row, Col, notification, Modal } from \"antd\";\r\nimport { CloseOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, SaveOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport Data from \"../../data\";\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber } from '../../../ValueObjects';\r\nimport InputPreco from \"../../inputPreco\";\r\n\r\nexport default function ModalListarParcelas({ exibirModal, fecharModal, parcelas, setParcelas }) {\r\n\r\n useEffect(() => {\r\n console.log(parcelas)\r\n }, [parcelas]);\r\n\r\n const [form] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n fecharModal();\r\n form.resetFields();\r\n\r\n };\r\n function alterarParcela(record) {\r\n alterarEstado(record);\r\n }\r\n\r\n function alterarEstado(record) {\r\n let parcelaAlt = [...parcelas];\r\n let a = {};\r\n a = parcelaAlt.find((prc) => prc.prc_id === record.prc_id);\r\n a.editando = !a.editando;\r\n setParcelas(parcelaAlt);\r\n console.log(parcelaAlt)\r\n }\r\n\r\n function salvarParcela(record) {\r\n let parcela = {\r\n prc_datavencimento: form.getFieldValue([`prc_datavencimento${record.prc_id}`]),\r\n prc_valor: form.getFieldValue([`prc_valor${record.prc_id}`]),\r\n prc_id: record.prc_id\r\n }\r\n api.put(`Parcela/EditarParcelaPagar`, parcela).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Parcela alterada com Sucesso!` });\r\n alterarEstado(record)\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n function estornaParcela(record) {\r\n if (!!record.ntf_id) {\r\n notification.warning({ message: 'Aviso', description: 'Parcela vinculada com uma nota fiscal, não é possivel estorna-la!' });\r\n return false;\r\n } else {\r\n Modal.confirm({\r\n title: 'Estornar?',\r\n icon: ,\r\n content: 'Deseja realmente estornar a parcela?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n api.put(`Parcela/EstornarParcela/${record.prc_id}`).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: 'Parcela Estornada com Sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n notification.warn({ message: 'Aviso', description: 'Não foi possivel estornar a parcela!' });\r\n }\r\n ).finally(() => {\r\n fecharModal();\r\n })\r\n }\r\n });\r\n }\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n
(\r\n \r\n {prc_numeroparcela}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Status Parcela',\r\n width: 100,\r\n render: ({ saldo }) => (\r\n
\r\n {saldo === 0 ? 'Liquidada' : 'Pendente'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ prc_valor, editando, prc_id, ntf_id }, idx) => (\r\n
\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Data Vencimento',\r\n width: 135,\r\n render: ({ prc_datavencimento, prc_id, editando }, idx) => (\r\n \r\n \r\n \r\n \r\n \r\n ),\r\n }, {\r\n title: 'Ações',\r\n align: 'right',\r\n width: 65,\r\n render: (record, { nft_id, saldo }) => (\r\n \r\n {!record.editando && saldo !== 0 &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {validarValor()}}/>\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Input, Row, Col, Form, Button, Modal, Table, Tag } from 'antd';\r\nimport { ExclamationCircleOutlined, ImportOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\n\r\nexport default function ModalImportarElementosFormulario({ exibirModalImportarElementos, fecharModalImportarElementos, elementosFormulario, setElementosFormulario }) {\r\n const [{ listagem, manutencao }, dispatch] = useStateValue();\r\n const [listaElementosSelecionados, setListaElementosSelecionados] = useState([]);\r\n const [listaParametros, setListaParametros] = useState([]);\r\n const [pagina, setPagina] = useState(1);\r\n const [registrosPorPagina, setRegistrosPorPagina] = useState(50);\r\n const [filtrosRel, setFiltrosRel] = useState(\"\");\r\n const [codRel, setCodRel] = useState(\"\");\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a Importação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalImportarElementos();\r\n }\r\n });\r\n };\r\n\r\n const [form] = Form.useForm();\r\n\r\n function listarParametros() {\r\n let parametros = `${!!filtrosRel ? '&filtro=' + filtrosRel : \"\"}${!!codRel ? '&codigoRelatorio=' + codRel : ''}`;\r\n console.log(parametros.substring(0, 1));\r\n if (parametros.substring(0, 1) === '&') {\r\n parametros = parametros.substring(1, parametros.length)\r\n }\r\n\r\n api.get(`RelatorioParametroJasper/Listar?pageSize=500&${parametros}`).then(res => {\r\n if (res.status === 200) {\r\n let listaParametros = res.data.items\r\n let listaParametrosAtz = [];\r\n listaParametros.map((par) => {\r\n par.checked = false;\r\n listaParametrosAtz = [...listaParametrosAtz, par];\r\n })\r\n setListaParametros({ dados: listaParametrosAtz, total: res.data.total });\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n\r\n function selecionaElementos(indice, record, checked) {\r\n console.log(indice, record, checked)\r\n if (checked) {\r\n setListaElementosSelecionados([...listaElementosSelecionados, record])\r\n let listaParametrosTemp = [...listaParametros.dados]\r\n listaParametrosTemp[indice].checked = true\r\n setListaParametros({ dados: listaParametrosTemp, total: listaParametros.total })\r\n } else {\r\n let listaElementos = [...listaElementosSelecionados];\r\n let idx = listaElementos.indexOf(record);\r\n listaElementos.splice(idx, 1);\r\n setListaElementosSelecionados(listaElementos);\r\n let listaParametrosTemp = [...listaParametros.dados]\r\n listaParametrosTemp[indice].checked = false\r\n setListaParametros({ dados: listaParametrosTemp, total: listaParametros.total })\r\n }\r\n\r\n }\r\n\r\n function importarElementos() {\r\n let listaParametrosAtz = [];\r\n listaElementosSelecionados.map((par) => {\r\n delete (par.checked);\r\n delete (par.rel_id);\r\n delete (par.rpj_id);\r\n listaParametrosAtz = [...listaParametrosAtz, par];\r\n })\r\n setElementosFormulario([...elementosFormulario, ...listaParametrosAtz]);\r\n fecharModalImportarElementos();\r\n }\r\n\r\n useEffect(() => listarParametros(), [codRel, filtrosRel]);\r\n useEffect(() => setListaElementosSelecionados([]), []);\r\n useEffect(() => {\r\n if (exibirModalImportarElementos) listarParametros();\r\n }, [exibirModalImportarElementos]);\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }} footer={null}>\r\n
\r\n
\r\n \r\n
\r\n \r\n setFiltrosRel(valor)} allowClear />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n setPagina(pg),\r\n onShowSizeChange: (atual, porPagina) => setRegistrosPorPagina(porPagina)\r\n }}*/\r\n columns={[\r\n {\r\n title: 'Nome Elemento',\r\n Key: \"rpj_nomeelemento\",\r\n editable: true,\r\n render: ({ rpj_nomeelemento }) => (\r\n
\r\n {rpj_nomeelemento}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Label',\r\n Key: \"rpj_label\",\r\n editable: true,\r\n render: ({ rpj_label }) => (\r\n
\r\n {rpj_label}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'TipoElemento',\r\n Key: \"rpj_tipoelemento\",\r\n editable: true,\r\n render: ({ rpj_tipoelemento }) => (\r\n
\r\n {rpj_tipoelemento}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 80,\r\n render: (value, record, indice) => (\r\n selecionaElementos(indice, record, checked)}\r\n >\r\n Selecionar\r\n \r\n ),\r\n }\r\n ]} scroll={{ y: 350 }}\r\n />\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Input, Row, Col, Form, Button, Modal, Table, Tag, Select } from 'antd';\r\nimport { ExclamationCircleOutlined, ImportOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalImportarElementosCamposAdicionais({ exibirModalImportarElementos, fecharModalImportarElementos, elementosFormulario, setElementosFormulario }) {\r\n const [listaElementosSelecionados, setListaElementosSelecionados] = useState([]);\r\n const [listaParametros, setListaParametros] = useState([]);\r\n const [filtros, setFiltros] = useState(\"\");\r\n const [entidade, setEntidade] = useState();\r\n const [form] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a Importação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalImportarElementos();\r\n }\r\n });\r\n };\r\n\r\n const entidades = [\r\n { label: \"Cliente\", value: 1 },\r\n { label: \"Fornecedor\", value: 2 },\r\n { label: \"Funcionario\", value: 3 },\r\n { label: \"Produto\", value: 4 },\r\n { label: \"Trasportador\", value: 5 },\r\n { label: \"Vendedor\", value: 6 }\r\n ]\r\n\r\n function listarParametros() {\r\n // let parametros = `${!!filtros ? '&filtro=' + filtros : \"\"}${!!entidade?'&TipoEntidade='+entidade:'&ordem=+cap_ordem'}`;\r\n // api.get(`CamposPersonalizados/ListarTodos?PageNumber=1&PageSize=1000&Order=+cap_ordem${parametros}`).then(res => {\r\n let parametros = `${!!filtros?'&filtro='+filtros:\"\"}${!!entidade?'&TipoEntidade='+entidade:'&ordem=+cap_ordem'}`;\r\n api.get(`CamposPersonalizados/ListarTodos?pagina=1&PageSize=1000${parametros}`).then(res => {\r\n if (res.status === 200) {\r\n let listaParametros = res.data.items\r\n let listaParametrosAtz = [];\r\n listaParametros.map((par) => {\r\n par.checked = false;\r\n listaParametrosAtz = [...listaParametrosAtz, par];\r\n })\r\n setListaParametros({ dados: listaParametrosAtz, total: res.data.total });\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n )\r\n }\r\n\r\n function selecionaElementos(indice, record, checked) {\r\n console.log(indice, record, checked)\r\n if (checked) {\r\n setListaElementosSelecionados([...listaElementosSelecionados, record])\r\n let listaParametrosTemp = [...listaParametros.dados]\r\n listaParametrosTemp[indice].checked = true\r\n setListaParametros({ dados: listaParametrosTemp, total: listaParametros.total })\r\n } else {\r\n let listaElementos = [...listaElementosSelecionados];\r\n let idx = listaElementos.indexOf(record);\r\n listaElementos.splice(idx, 1);\r\n setListaElementosSelecionados(listaElementos);\r\n let listaParametrosTemp = [...listaParametros.dados]\r\n listaParametrosTemp[indice].checked = false\r\n setListaParametros({ dados: listaParametrosTemp, total: listaParametros.total })\r\n }\r\n\r\n }\r\n\r\n function importarElementos() {\r\n let listaParametrosAtz = [];\r\n listaElementosSelecionados.map((par) => {\r\n delete (par.checked);\r\n delete (par.rel_id);\r\n delete (par.cap_id);\r\n listaParametrosAtz = [...listaParametrosAtz, par];\r\n })\r\n setElementosFormulario([...elementosFormulario, ...listaParametrosAtz]);\r\n fecharModalImportarElementos();\r\n }\r\n\r\n useEffect(() => listarParametros(), [entidade, filtros]);\r\n useEffect(() => setListaElementosSelecionados([]), []);\r\n\r\n useEffect(() => {\r\n if (!!exibirModalImportarElementos) {\r\n listarParametros()\r\n }\r\n }, [exibirModalImportarElementos]);\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }} footer={null}>\r\n
\r\n
\r\n \r\n
\r\n \r\n setFiltros(valor)} allowClear />\r\n \r\n \r\n \r\n \r\n { setEntidade(valor); }}\r\n options={entidades}\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {cap_nomeelemento}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Label',\r\n Key: \"cap_label\",\r\n editable: true,\r\n render: ({ cap_label }) => (\r\n
\r\n {cap_label}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'TipoElemento',\r\n Key: \"cap_tipoelemento\",\r\n editable: true,\r\n render: ({ cap_tipoelemento }) => (\r\n
\r\n {cap_tipoelemento}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 80,\r\n render: (value, record, indice) => (\r\n selecionaElementos(indice, record, checked)}\r\n >\r\n Selecionar\r\n \r\n ),\r\n }\r\n ]} scroll={{ y: 350 }}\r\n />\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport FormBuilder from 'antd-form-builder';\r\nimport { Row, Col, Form, Empty, Button, Rate, Slider, Upload, TimePicker, Modal } from 'antd';\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nFormBuilder.defineWidget('rate', Rate);\r\nFormBuilder.defineWidget('slider', Slider);\r\nFormBuilder.defineWidget('time-picker', TimePicker);\r\nFormBuilder.defineWidget('upload', Upload);\r\n\r\nexport default function ModalPersonalizacaoFormulario({ exibirModalPersonalizacao, fecharModalPersonalizacao, elementosFormulario }) {\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalPersonalizacao();\r\n }\r\n });\r\n };\r\n\r\n const [ form ] = Form.useForm();\r\n\r\n const meta = {\r\n columns: 1, \r\n fields: elementosFormulario\r\n }\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }} footer={null}>\r\n
\r\n {elementosFormulario.length > 0 && \r\n
console.log(v)}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {elementosFormulario.length === 0 && }\r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Empty, Button, Modal } from 'antd';\r\nimport {FormularioDinamico} from \"../../../components\"\r\nimport moment from 'moment'\r\n\r\nexport default function ModalPersonalizacaoFormularioFiltros({ exibirModalPersonalizacao, fecharModalPersonalizacao, elementosFormulario }) {\r\n\r\n const onCloseModal = () => {\r\n fecharModalPersonalizacao();\r\n };\r\n\r\n function finish(values){\r\n //altera o Retorno dos campos data\r\n for (let valor in values){\r\n if (!!Date.parse(values[valor]) && typeof values[valor] === \"object\" && values[valor].toString().length > 30){\r\n values[valor] = moment(values[valor]).format(\"DD/MM/YYYY\")\r\n }\r\n }\r\n console.log({values}); \r\n alert(JSON.stringify(values));\r\n }\r\n\r\n const [ form ] = Form.useForm();\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }} footer={null}>\r\n
\r\n {!!elementosFormulario && elementosFormulario.length > 0 && \r\n
\r\n
finish(v)}>\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!!elementosFormulario && elementosFormulario.length === 0 && }\r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Modal } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../../state';\r\nimport { InputPreco } from \"../../../components\";\r\n\r\nexport default function ModalEditarValoresParcela({ exibirModal, fecharModal, dadosLinha, salvarDadosModal }) {\r\n\r\n const [formDados] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n if (!!dadosLinha) {\r\n formDados.setFieldsValue(dadosLinha);\r\n }\r\n }, [dadosLinha, []]);\r\n\r\n const onCloseModal = () => {\r\n formDados.resetFields();\r\n fecharModal();\r\n };\r\n\r\n const salvarDados = values => {\r\n salvarDadosModal(values);\r\n fecharModal();\r\n }\r\n\r\n function calcularValorReceber() {\r\n let valorTotal = parseFloat((!!dadosLinha.valorOriginal ? dadosLinha.valorOriginal : 0)) - parseFloat((!!dadosLinha.valorQuitado ? dadosLinha.valorQuitado : 0));\r\n if (parseFloat(formDados.getFieldValue(\"valorDesconto\")) > (valorTotal + parseFloat(formDados.getFieldValue(\"valorJuros\")) + parseFloat(formDados.getFieldValue(\"valorMulta\")))) {\r\n formDados.setFieldsValue({ valorDesconto: valorTotal + parseFloat(formDados.getFieldValue(\"valorJuros\")) + parseFloat(formDados.getFieldValue(\"valorMulta\")) });\r\n }\r\n\r\n let valorReceber = (valorTotal + parseFloat(formDados.getFieldValue(\"valorJuros\")) + parseFloat(formDados.getFieldValue(\"valorMulta\")) - parseFloat(formDados.getFieldValue(\"valorDesconto\"))).toFixed(2);\r\n formDados.setFieldsValue({ valorPago: parseFloat(valorReceber) });\r\n };\r\n\r\n function verificarValorReceber() {\r\n let valorTotal = parseFloat((!!dadosLinha.valorOriginal ? dadosLinha.valorOriginal : 0)) - parseFloat((!!dadosLinha.valorQuitado ? dadosLinha.valorQuitado : 0));\r\n let valorReceber = (valorTotal + parseFloat(formDados.getFieldValue(\"valorJuros\")) + parseFloat(formDados.getFieldValue(\"valorMulta\")) - parseFloat(formDados.getFieldValue(\"valorDesconto\"))).toFixed(2);\r\n\r\n if (parseFloat(formDados.getFieldValue(\"valorPago\")) > valorReceber) {\r\n formDados.setFieldsValue({ valorPago: valorReceber });\r\n }\r\n };\r\n\r\n return (\r\n { formDados.submit() }}\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n calcularValorReceber()} name={'valorJuros'} label={'Juros (R$)'} />\r\n \r\n \r\n calcularValorReceber()} name={'valorMulta'} label={'Multa (R$)'} />\r\n \r\n \r\n calcularValorReceber()} name={'valorDesconto'} label={'Descontos (R$)'} />\r\n \r\n \r\n verificarValorReceber()} name={'valorPago'} label={'Valor à Receber (R$)'} />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Form, Image, Input, Radio, Row, Typography, Modal } from \"antd\";\r\nimport { ArrowLeftOutlined, ExclamationCircleOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { info } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalBandeiraCartao({ exibirModal, fecharModal, retornoModal, fecharModalOK = fecharModal }) {\r\n\r\n const [formDados] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaBandeiras, setListaBandeiras] = useState([]);\r\n const [bandeiraSelecionada, setBandeiraSelecionada] = useState([]);\r\n\r\n useEffect(() => {\r\n api.get(`BandeiraCartaoEmpresa/ListarAtivos`).then(res => {\r\n if (res.status === 200) {\r\n setListaBandeiras(res.data);\r\n }\r\n });\r\n }, []);\r\n\r\n const onCloseModal = () => {\r\n formDados.resetFields();\r\n setBandeiraSelecionada([]);\r\n fecharModal();\r\n };\r\n\r\n const modalCancelar = () => {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Deseja realmente cancelar o lançamento de Cartão?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk() {\r\n onCloseModal()\r\n }\r\n });\r\n };\r\n\r\n const salvarDados = values => {\r\n if (bandeiraSelecionada.length > 0) {\r\n values.bandeira = bandeiraSelecionada[0];\r\n retornoModal(manutencao.dados, values);\r\n fecharModalOK();\r\n setBandeiraSelecionada([]);\r\n } else {\r\n info('Selecione uma bandeira!');\r\n }\r\n };\r\n\r\n\r\n function abrirTipoParcelamento(e) {\r\n if (!!e.target.value) {\r\n setBandeiraSelecionada(listaBandeiras.filter((bandeira) => { return bandeira.bnd_id === parseInt(e.target.value) }));\r\n }\r\n };\r\n\r\n function fecharTipoParcelamento() {\r\n setBandeiraSelecionada([]);\r\n formDados.resetFields();\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n >\r\n
\r\n
\r\n {bandeiraSelecionada.length === 0 &&\r\n \r\n
\r\n \r\n \r\n {listaBandeiras.map((item) => {\r\n return (\r\n abrirTipoParcelamento(e)}\r\n value={item.bnd_id}\r\n >\r\n
\r\n \r\n
\r\n {item.bnd_nome.toUpperCase()}\r\n
\r\n )\r\n })}\r\n
\r\n
\r\n \r\n \r\n }\r\n {bandeiraSelecionada.length > 0 &&\r\n
\r\n \r\n
\r\n Bandeira Selecionada:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {bandeiraSelecionada[0].bnd_nome.toUpperCase()}\r\n \r\n
\r\n \r\n \r\n
\r\n {!!manutencao.dados && manutencao.dados.credito &&\r\n
\r\n \r\n
\r\n Tipo de Parcelamento:\r\n \r\n \r\n \r\n \r\n \r\n \r\n Por Parte do Estabelecimento\r\n Por Parte do Comprador\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { isObjetoDiffVazio } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalEditarPDV({ exibirModalPDV, fecharModalPDV, dadosPdv, setDadosPdv }) {\r\n\r\n const [serieFiscal, setSerieFiscal] = useState([]);\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalPDV();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`SerieFiscal/Listar?CodigoModeloDocFiscal=65&EmitenteDocumento=0&pageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setSerieFiscal(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(dadosPdv)) {\r\n formulario.setFieldsValue({ ser_id: dadosPdv.ser_id });\r\n }\r\n }, [dadosPdv])\r\n\r\n function editarPdv(valores) {\r\n let dadosTemp = serieFiscal.filter(ser => (ser.ser_id === valores.ser_id))[0]\r\n let dadosPdvTemp = dadosPdv;\r\n dadosPdvTemp.ser_id = dadosTemp.ser_id;\r\n dadosPdvTemp.ser_serie = dadosTemp.ser_serie;\r\n dadosPdvTemp.serieFiscal = dadosTemp;\r\n api.put(`Pdv/Editar`, dadosPdvTemp).then(\r\n (res) => {\r\n notification.success({ message: 'Sucesso!', description: 'Caixa Pdv editado com sucesso!' });\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n notification.warning({ message: 'Aviso!', description: 'Problema ao editar Caixa Pdv' });\r\n }\r\n ).finally(() => { fecharModalPDV(); })\r\n }\r\n\r\n return (\r\n formulario.submit()}\r\n onCancel={onCloseModal}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Select, Form, Input, InputNumber, notification } from \"antd\";\r\nimport { PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { isNotNullOrEmpty, isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { selectPaginadoActions } from \"../../../actions\";\r\n\r\nexport default function ModalManutencaoNota({ exibirModal, fecharModal, dadosContribuinte, dadosOperacao, dadosEndereco, dadosProduto, aoSalvar }) {\r\n const [form] = Form.useForm();\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [mostrarCstIcms, setMostrarCstIcms] = useState(false);\r\n const [mostarCsoSn, setMostrarCsoSn] = useState(false);\r\n const [mostrarAlicotaIcms, setMostrarAlicotaIcms] = useState(false);\r\n const [mostrarReducaoBC, setMostrarReducaoBC] = useState(false);\r\n const [mostrarDiferimentoIcms, setMostrarDiferimentoIcms] = useState(false);\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [notaTransferencia, setNotaTransferencia] = useState(false);\r\n const [exibePerc, setExibePerc] = useState(false);\r\n const [estadoOrig, setEstadoOrig] = useState({});\r\n const [estadoDest, setEstadoDest] = useState({});\r\n\r\n const onFinish = values => {\r\n values.loc_id = dadosContribuinte.loc_id;\r\n values.pro_id = dadosProduto.pro_id;\r\n if (exibePerc) {\r\n values.mva_uforigem = values.iod_uforigem\r\n values.mva_ufdestino = values.iod_ufdestino;\r\n } else {\r\n values.mva_percmva = 0;\r\n values.mva_percaliquotaicms = 0;\r\n values.mva_percaliquotaicmsreducao = 0;\r\n }\r\n values.iod_percicms = !!form.getFieldValue().iod_percicms ? form.getFieldValue().iod_percicms : 0;\r\n values.iod_percicmsreducaobc = !!form.getFieldValue().iod_percicmsreducaobc ? form.getFieldValue().iod_percicmsreducaobc : 0;\r\n values.iod_percdiferimentoicms = !!form.getFieldValue().iod_percdiferimentoicms ? form.getFieldValue().iod_percdiferimentoicms : 0;\r\n\r\n api.post('TributacaoIcms/AtualizarTributacaoProduto', values).then(\r\n (res) => {\r\n notification.success({ message: 'Sucesso', description: 'Produto alterado com sucesso!' });\r\n form.resetFields();\r\n aoSalvar(dadosProduto.pro_id);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarCst(cst_id) {\r\n let codigoCst;\r\n if (!!cst_id) {\r\n codigoCst = cst_id;\r\n } else {\r\n codigoCst = form.getFieldValue('cst_id');\r\n }\r\n if (!!codigoCst) {\r\n if (codigoCst <= '20' || codigoCst === '90' || codigoCst === '51' || codigoCst === '70') {\r\n setMostrarAlicotaIcms(true);\r\n } else {\r\n setMostrarAlicotaIcms(false);\r\n form.setFieldsValue({ iod_percicms: 0 });\r\n }\r\n\r\n if (codigoCst === '90' || codigoCst === '20' || codigoCst === '70') {\r\n setMostrarReducaoBC(true);\r\n } else {\r\n setMostrarReducaoBC(false);\r\n form.setFieldsValue({ iod_percicmsreducaobc: 0 });\r\n }\r\n\r\n if (codigoCst === '90' || codigoCst === '51') {\r\n setMostrarDiferimentoIcms(true);\r\n } else {\r\n setMostrarDiferimentoIcms(false);\r\n form.setFieldsValue({ iod_percdiferimentoicms: 0 });\r\n }\r\n\r\n if (codigoCst === '10' || codigoCst === '30' || codigoCst === '70') {\r\n setExibePerc(true);\r\n }\r\n } else {\r\n setMostrarAlicotaIcms(true);\r\n setMostrarReducaoBC(true);\r\n setMostrarDiferimentoIcms(true);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n carregarDados()\r\n }, [exibirModal]);\r\n\r\n function carregarDados() {\r\n if (isObjetoDiffVazio(dadosContribuinte) && !!dadosOperacao && !!dadosEndereco) {\r\n if (dadosContribuinte.emp_regimetributario === 3) {\r\n if (!!!dadosProduto.cst_id){\r\n setMostrarCstIcms(true);\r\n }\r\n setMostrarCsoSn(false);\r\n } else {\r\n if (!!dadosProduto.cst_id)\r\n setMostrarCstIcms(false);\r\n setMostrarCsoSn(true);\r\n }\r\n dadosCampos();\r\n buscarEstados();\r\n }\r\n };\r\n\r\n function dadosCampos() {\r\n if (mostrarCstIcms) {\r\n if (!!dadosProduto.cst_id) {\r\n if (dadosProduto.cst_id <= 20 || dadosProduto.cst_id === 90 || dadosProduto.cst_id === 51 || dadosProduto.cst_id === 70) {\r\n setMostrarAlicotaIcms(true);\r\n } else {\r\n setMostrarAlicotaIcms(false);\r\n }\r\n\r\n if (dadosProduto.cst_id === 90 || dadosProduto.cst_id === 20 || dadosProduto.cst_id === 70) {\r\n setMostrarReducaoBC(true);\r\n } else {\r\n setMostrarReducaoBC(false);\r\n }\r\n\r\n if (dadosProduto.cst_id === 90 || dadosProduto.cst_id === 51) {\r\n setMostrarDiferimentoIcms(true);\r\n } else {\r\n setMostrarDiferimentoIcms(false);\r\n }\r\n } else {\r\n setMostrarAlicotaIcms(true);\r\n setMostrarReducaoBC(true);\r\n setMostrarDiferimentoIcms(true);\r\n }\r\n }\r\n if (!!dadosProduto && !!dadosProduto.cst_id && (dadosProduto.cst_id === '10' || dadosProduto.cst_id === '30' || dadosProduto.cst_id === '70')) {\r\n setExibePerc(true);\r\n }\r\n setDadosNota(dadosProduto);\r\n let lista = [];\r\n if (!!dadosProduto.icm_id) {\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: dadosProduto.icm_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: lista });\r\n form.setFieldsValue({ icm_id: dadosProduto.icm_id });\r\n }\r\n\r\n };\r\n\r\n function buscarEstados() {\r\n api.get(`Estado/Listar?PageSize=200`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let listaEst = [...res.data.items];\r\n if (listaEst.length > 0) {\r\n let estadoOrigem = listaEst.filter((estado) => (estado.est_sigla === dadosContribuinte.est_sigla))[0];\r\n setEstadoOrig(estadoOrigem);\r\n form.setFieldsValue({ iod_uforigem: estadoOrigem.est_sigla });\r\n if (isObjetoDiffVazio(dadosEndereco)) {\r\n let estadoDestino = listaEst.filter((estado) => (estado.est_sigla === dadosEndereco.est_sigla))[0];\r\n setEstadoDest(estadoDestino);\r\n form.setFieldsValue({ iod_ufdestino: estadoDestino.est_sigla });\r\n } else {\r\n setEstadoDest(estadoOrigem);\r\n }\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n {\r\n form.resetFields();\r\n fecharModal();\r\n }}\r\n onOk={() => {\r\n form.submit();\r\n fecharModal();\r\n }}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n O Item selecionado não possui as informações necessárias para gerar uma NF-e!
\r\n Favor complementar abaixo as informações do cadastro deste item:\r\n \r\n \r\n {!!dadosNota && dadosNota.pro_descricao === '' && \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n ({icm?.icm_id} - {icm?.icm_descricao})}\r\n />\r\n \r\n \r\n \r\n\r\n {!!dadosNota && dadosNota.orm_id === null && \r\n \r\n \r\n ({cst?.orm_id} - {cst?.orm_descricao})}\r\n />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!mostrarCstIcms && \r\n \r\n \r\n { validarCst(valor) }}\r\n conteudo={(cst) => ({cst.cst_id})}\r\n />\r\n \r\n \r\n }\r\n {!!mostarCsoSn && \r\n \r\n \r\n ({csosn.cso_id} - {csosn.cso_descricao})} />\r\n \r\n \r\n }\r\n {!!dadosNota && dadosNota.ncm_id === null && \r\n \r\n \r\n ({ncm.ncm_codigo?.codigoNcm} - {ncm.ncm_descricao})}\r\n />\r\n \r\n \r\n }\r\n {!!dadosNota && dadosNota.ump_id === null && \r\n \r\n \r\n ({unidadeMedida.ump_id} - {unidadeMedida.ump_descricao})}\r\n />\r\n \r\n \r\n }\r\n {!!dadosNota && dadosNota.pis_id === null && !!dadosContribuinte && (dadosContribuinte.emp_regimetributario === 3 || !!notaTransferencia) && \r\n \r\n \r\n ({tribPisCofins.pis_id} - {tribPisCofins.pis_descricao})}\r\n />\r\n \r\n \r\n }\r\n {mostrarAlicotaIcms && \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n }\r\n {mostrarReducaoBC && \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n }\r\n {mostrarDiferimentoIcms && \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n }\r\n {exibePerc &&
\r\n \r\n
\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Table, Form, notification, Input } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalContaCorrente({ exibirModalContaCorrente, fecharModalContaCorrenteOk, fecharModalContaCorrente, contaCorrente, listaContaCorrente, tipoConta = 1 }) {\r\n \r\n const [linhaPintada, setLinhaPintada] = useState(0);\r\n const [searchTerm, setSearchTerm] = useState(\"\");\r\n const [searchResults, setSearchResults] = useState([]);\r\n const handleChange = event => {\r\n setSearchTerm(event.target.value);\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalContaCorrente();\r\n }\r\n });\r\n };\r\n\r\n const salvarModalContaCorrente = () => {\r\n if (!!contaCorrente.contaCorrente && JSON.stringify(contaCorrente.contaCorrente) !== '{}') {\r\n fecharModalContaCorrenteOk();\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor selecionar uma conta corrente' })\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModalContaCorrente) {\r\n listarContaCorrente();\r\n }\r\n }, [exibirModalContaCorrente]);\r\n\r\n function listarContaCorrente() {\r\n api.get(`ContaCorrente/AtivosTipoConta?Ativo=true&tipoConta=${tipoConta}&PageSize=500&filtro=`).then(\r\n res => {\r\n if (res.status === 200) {\r\n res.data.items.sort(function (x, y) {\r\n let a = x.ctc_descricao.toUpperCase(),\r\n b = y.ctc_descricao.toUpperCase();\r\n return a === b ? 0 : a > b ? 1 : -1;\r\n }\r\n )\r\n listaContaCorrente.setListaContaCorrente(res.data.items);\r\n setSearchResults(res.data.items.sort());\r\n }\r\n }\r\n ).then(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n if (!!listaContaCorrente.listaContaCorrente) {\r\n if (listaContaCorrente.listaContaCorrente.length === 1) {\r\n contaCorrente.setContaCorrente(listaContaCorrente.listaContaCorrente[0]);\r\n }\r\n }\r\n }, [listaContaCorrente.listaContaCorrente]);\r\n\r\n function selecionarContaCorrente(record, rowIndex) {\r\n contaCorrente.setContaCorrente(record);\r\n setLinhaPintada(record.ctc_id);\r\n };\r\n\r\n useEffect(() => {\r\n if (listaContaCorrente.listaContaCorrente.length > 0) {\r\n const results = listaContaCorrente.listaContaCorrente.filter(cc => cc.ctc_descricao.toLowerCase().includes(searchTerm));\r\n setSearchResults(results);\r\n }\r\n }, [searchTerm])\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {(ctc_id === linhaPintada) &&\r\n
\r\n \r\n \r\n }\r\n \r\n {ctc_descricao}\r\n \r\n \r\n ),\r\n }\r\n ]\r\n }\r\n onRow={(record, rowIndex) => {\r\n return {\r\n onClick: () => {\r\n selecionarContaCorrente(record, rowIndex);\r\n }\r\n }\r\n }}\r\n dataSource={searchResults}\r\n />\r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Modal, Table, Descriptions } from \"antd\";\r\n\r\nimport { linkApi } from \"../../../services/auth\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalTaxasCartaoCredito({exibirModalTaxasCartaoCredito, fecharModalTaxasCartaoCredito, dadosTaxaCartao}) {\r\n \r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {dadosTaxaCartao.bce_nomecredenciadora}\r\n \r\n \r\n \r\n \r\n {dadosTaxaCartao.bnd_nome}\r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {tcp_parcelaminima}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Até Parcela(s)',\r\n align: 'center',\r\n render: ({ tcp_parcelamaxima }) => (\r\n
\r\n {tcp_parcelamaxima}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Taxa % Aplicada',\r\n align: 'right',\r\n render: ({ tcp_taxa }) => (\r\n
\r\n {FormatNumber(parseFloat(tcp_taxa) * 100, true, false)}%\r\n
\r\n ),\r\n },\r\n ]\r\n } />\r\n \r\n \r\n \r\n \r\n );\r\n}","\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Descriptions, Form, Table } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport { InputPreco } from \"../../\"\r\nimport { useStateValue } from \"../../../state\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function ModalAntecipacaoClienteFornecedor({ formAnterior, exibirModalAntecipacaoClienteFornecedor, fecharModalAntecipacaoClienteFornecedor, dadosAntecipacao }) {\r\n\r\n const [listaAntecipacao, setListaAntecipacao] = useState([]);\r\n const [valorAntecipacao, setValorAtecipacao] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [form] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalAntecipacaoClienteFornecedor();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModalAntecipacaoClienteFornecedor && !!formAnterior.getFieldValue() && formAnterior.getFieldValue().pfp_valor) {\r\n form.setFieldsValue({ 'valorPagar': formAnterior.getFieldValue().pfp_valor });\r\n }\r\n }, [exibirModalAntecipacaoClienteFornecedor]);\r\n\r\n useEffect(() => {\r\n let totalAntecipacao = 0;\r\n if (listaAntecipacao.length > 0) {\r\n listaAntecipacao.forEach((antecipacao) => {\r\n totalAntecipacao += parseFloat(antecipacao.acf_valor) - parseFloat(antecipacao.anm_valor);\r\n antecipacao.valorUtilizado = 0;\r\n });\r\n }\r\n setValorAtecipacao(totalAntecipacao);\r\n }, [listaAntecipacao]);\r\n\r\n function selecionarAntecipacoes(selectedRowKeys, selectedRows) {\r\n setListaAntecipacao(selectedRows);\r\n };\r\n\r\n function salvarAntecipacao() {\r\n let valorNota = 0;\r\n let valorRestante = 0;\r\n if (!!formAnterior.getFieldValue().pfp_valor) {\r\n valorNota = parseFloat(formAnterior.getFieldValue().pfp_valor);\r\n valorRestante = valorNota;\r\n }\r\n let valorAntecipacao = 0;\r\n listaAntecipacao.forEach((antecipacao, index, array) => {\r\n let saldoAUtilizar = (parseFloat(antecipacao.acf_valor) - parseFloat(antecipacao.anm_valor))\r\n if (valorRestante - saldoAUtilizar >= 0) {\r\n antecipacao.valorUtilizado = saldoAUtilizar;\r\n } else { \r\n antecipacao.valorUtilizado = saldoAUtilizar + (valorRestante - saldoAUtilizar);\r\n }\r\n valorRestante -= antecipacao.valorUtilizado;\r\n valorAntecipacao += antecipacao.valorUtilizado;\r\n if (valorAntecipacao >= valorNota) {\r\n array.length = index + 1;\r\n }\r\n });\r\n listaAntecipacao.forEach(antecipacao => { antecipacao.valorAntecipacao = valorAntecipacao });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ antecipacao: listaAntecipacao } } } });\r\n fecharModalAntecipacaoClienteFornecedor();\r\n };\r\n\r\n return (\r\n \r\n Confirmar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n Abaixo valor referente ANTECIPAÇÃO gerada por: {formAnterior.getFieldValue().pes_nome}\r\n \r\n \r\n \r\n \r\n Localize a antecipação\r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {ntf_id}\r\n
\r\n ),\r\n }, {\r\n title: 'Data',\r\n render: ({ acf_datalancamento }) => (\r\n
{moment(acf_datalancamento).format(\"DD/MM/YYYY\")}
\r\n ),\r\n }, {\r\n title: 'Vlr. Antecipação(R$)',\r\n align: 'right',\r\n render: ({ acf_valor }) => (\r\n
{FormatNumber(acf_valor, true)}
\r\n ),\r\n }, {\r\n title: 'Vlr. Utilizado(R$)',\r\n align: 'right',\r\n render: ({ anm_valor }) => (\r\n
{FormatNumber(anm_valor, true)}
\r\n ),\r\n }, {\r\n title: 'Saldo a Utilizar(R$)',\r\n align: 'right',\r\n render: ({ acf_valor, anm_valor }) => (\r\n
{FormatNumber((acf_valor) - (anm_valor), true)}
\r\n ),\r\n },\r\n ]\r\n }\r\n dataSource={dadosAntecipacao}\r\n rowSelection={{\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n selecionarAntecipacoes(selectedRowKeys, selectedRows);\r\n }\r\n }}\r\n footer={\r\n () => {\r\n return (\r\n
\r\n Antecipação Selecionada (R$): {FormatNumber(valorAntecipacao, true)}\r\n
\r\n );\r\n }\r\n }\r\n scroll={{ y: 240}}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$) {FormatNumber(formAnterior.getFieldValue().valorTotal, true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Col, Descriptions, Form, Modal, notification, Row, Table } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ModalSelectLote({ exibirModal, fecharModal, dadosLote, setDadosLote, dadosItem }) {\r\n\r\n const [listaLote, setListaLote] = useState([]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n })\r\n }\r\n function salvarLotes() {\r\n let itemCLote = { ...dadosItem };\r\n let quantidadeRestante = itemCLote.nfi_qtde;\r\n \r\n // Ordena listaLote pela data mais antiga\r\n listaLote.sort((a, b) => new Date(a.prl_datavencimento) - new Date(b.prl_datavencimento));\r\n \r\n let listaTemp = [];\r\n \r\n listaLote.forEach(item => {\r\n let quantidadeParaAtribuir = Math.min(item.saldo, quantidadeRestante);\r\n \r\n listaTemp.push({\r\n prl_id: item.prl_id,\r\n nfl_qtde: quantidadeParaAtribuir,\r\n });\r\n \r\n quantidadeRestante -= quantidadeParaAtribuir;\r\n \r\n if (quantidadeRestante <= 0) {\r\n return;\r\n }\r\n });\r\n \r\n let qtdeLote = listaTemp.reduce((total, item) => total + item.nfl_qtde, 0);\r\n \r\n if (qtdeLote < itemCLote.nfi_qtde) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade de Lotes menor que quantidade do item.' });\r\n } else {\r\n fecharModal(itemCLote, listaTemp);\r\n }\r\n };\r\n\r\n function selecionarLotes(selectedRowKeys, selectedRows) {\r\n setListaLote(selectedRows);\r\n }\r\n\r\n return (\r\n \r\n Confirmar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosItem.pro_descricao}\r\n \r\n \r\n \r\n \r\n Selecione o Lote\r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n {prl_numerolote}\r\n )\r\n },\r\n {\r\n title: 'Qtde',\r\n width: 75,\r\n align: 'center',\r\n render: ({ saldo }) => (\r\n {saldo}\r\n ),\r\n },\r\n {\r\n title: 'Data Entrada',\r\n render: ({ prl_dataentrada }) => (\r\n {moment(prl_dataentrada).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Data Fabricação',\r\n render: ({ prl_datafabricacao }) => (\r\n {moment(prl_datafabricacao).format('DD/MM/YYYY')}\r\n )\r\n },\r\n {\r\n title: 'Data Validade',\r\n render: ({ prl_datavencimento }) => (\r\n {moment(prl_datavencimento).format('DD/MM/YYYY')}\r\n ),\r\n }\r\n ]\r\n }\r\n dataSource={dadosLote}\r\n rowSelection={{\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n selecionarLotes(selectedRowKeys, selectedRows);\r\n }\r\n }}\r\n scroll={{ y: 240}}\r\n />\r\n \r\n \r\n \r\n \r\n )\r\n}","\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Descriptions, Form, Select } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { SelectPaginado } from \"../../../components\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport InputPreco from \"../../inputPreco\";\r\nimport { validaForm } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalDevolucaoSubstituicaoTributaria({ exibirModal, fecharModal, dadosNfe, aoSalvar, serieFiscal, dadosNotaDevSt }) {\r\n\r\n const [formulario] = Form.useForm();\r\n const [operacaoDebCred, setOperacaoDebCred] = useState([]);\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n // api.get('OperacaoDebitoCredito/Listar?filtro=').then(\r\n // (res) => {\r\n // if (res.status === 200) {\r\n // setOperacaoDebCred(res.data);\r\n // }\r\n // }\r\n // ).catch(\r\n // (erro) => {\r\n // console.log(erro);\r\n // }\r\n // );\r\n dadosNotaDevSt.valorBaseIcmsDev = parseFloat(dadosNotaDevSt.valorBaseIcmsDev.toFixed(2));\r\n dadosNotaDevSt.valorIcmsDev = parseFloat(dadosNotaDevSt.valorIcmsDev.toFixed(2));\r\n dadosNotaDevSt.valorBaseIcmsStDev = parseFloat(dadosNotaDevSt.valorBaseIcmsStDev.toFixed(2));\r\n dadosNotaDevSt.valorIcmsStDev = parseFloat(dadosNotaDevSt.valorIcmsStDev.toFixed(2));\r\n formulario.setFieldsValue(dadosNotaDevSt);\r\n }\r\n }, [exibirModal]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const listaValidacoes = [\r\n { nome: 'ser_id', obrigatorio: true, label: 'Série Fiscal' },\r\n { nome: 'operacaodebito', obrigatorio: true, label: 'Operação de Débito' },\r\n { nome: 'valorBaseIcmsStDev', obrigatorio: true, label: 'Valor Base de Cálculo da Substituição Tributária' },\r\n { nome: 'valorIcmsStDev', obrigatorio: true, label: 'Valor da Substituição Tributária Cálculada' },\r\n { nome: 'operacaocredito', obrigatorio: true, label: 'Operação de Crédito' },\r\n { nome: 'valorBaseIcmsDev', obrigatorio: true, label: 'Valor Base de Cálculo da Adjudicação de ICMS' },\r\n { nome: 'valorIcmsDev', obrigatorio: true, label: 'Valor da Adjudicação de ICMS' }\r\n ];\r\n\r\n async function validar(values) {\r\n \r\n if (validaForm(formulario, listaValidacoes)) {\r\n let dadosNotaDevSt = { ...values };\r\n dadosNotaDevSt.ntf_dataemissao = new Date();\r\n dadosNotaDevSt.operacaodebito = (await api.get(`OperacaoDebitoCredito/Buscar/${values.operacaodebito}`)).data;\r\n dadosNotaDevSt.operacaocredito = (await api.get(`OperacaoDebitoCredito/Buscar/${values.operacaocredito}`)).data;\r\n dadosNotaDevSt.emitirNfe = true;\r\n aoSalvar(dadosNotaDevSt);\r\n }\r\n };\r\n\r\n return (\r\n formulario.submit()}\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n okText={\r\n <>\r\n Emitir\r\n \r\n }\r\n width={850}\r\n maskClosable={false}\r\n >\r\n
\r\n
{ validar(values) }}>\r\n \r\n
\r\n \r\n A nota fiscal devolvida, possui itens com substituição tributária!
\r\n Neste caso devem ser emitidas 3(três) notas fiscais.
\r\n Para concluir a emissão preencha os dados solicitados abaixo:\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNfe.dadosNfeDevolucao.pes_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n ({odc.odc_descricao})\r\n } />\r\n \r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Operação para NF-e de Adjudicação de Crédito de ICMS. A NF-e será emitida para o emitente da NF-e!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({odc.odc_descricao})\r\n } />\r\n \r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","\r\nimport React, { useState } from \"react\";\r\nimport { Row, Col, Modal, Table, Tag, Divider, Descriptions } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalListaProduto({ exibirModalListaProduto, fecharModalListaProduto, dadosItens }) {\r\n\r\n const [selectedRowKeys, setSelectedRowKeys] = useState([]);\r\n\r\n const rowSelection = {\r\n selectedRowKeys,\r\n };\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalListaProduto();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n Abaixo selecione o produto desejado.\r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_id}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]} rowSelection={rowSelection} dataSource={dadosItens} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Modal, Descriptions, Form, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\"\r\n\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber } from '../../../ValueObjects';\r\n\r\nexport default function ModalDetalhesOrdemCompra({ exibirModal, fecharModal, dadosOrdemCompra }) {\r\n\r\n const [itensOrdemCompra, setItensOrdemCompra] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dadosOrdemCompra.orc_id) {\r\n api.get(`OrdemCompraItem/ListarItensOrdemCompra?codigoOrdemCompra=${dadosOrdemCompra.orc_id}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n let itens = res.data;\r\n itens.forEach((item, indice) => {\r\n item.ocp_faltareceber = item.ocp_quantidaderecebida;\r\n\r\n api.get(`ListaPrecoItem/BuscarPrecoPadraoItem?codigoProduto=${item.pro_id}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n item.lpi_valorvenda = res.data;\r\n }\r\n }\r\n );\r\n if (!!item.prg_id) {\r\n api.get(`Produto/ListarGrades?codigoProduto=${item.pro_id}`).then(\r\n (res) => {\r\n if (!!res.data) {\r\n res.data.forEach((grade) => {\r\n if (grade.prg_id === item.prg_id) {\r\n item.grade = {\r\n prg_id: grade.prg_id,\r\n mgp_descricao: \"\",\r\n prg_ean: grade.ean,\r\n prg_codigoetiqueta: grade.etiqueta,\r\n prg_valorvenda: grade.valorVenda,\r\n atributos: []\r\n }\r\n\r\n for (let i = 0; i < grade.atributos.length; i++) {\r\n item.grade.mgp_descricao += grade.atributos[i].mgp_descricao + \" \";\r\n let atributoTemp = {\r\n mgp_id: grade.atributos[i].mgp_id,\r\n mgp_descricao: grade.atributos[i].mgp_descricao\r\n }\r\n item.grade.atributos.push(atributoTemp);\r\n }\r\n }\r\n })\r\n }\r\n }\r\n );\r\n }\r\n\r\n if (itens.length - 1 === indice) {\r\n setItensOrdemCompra(itens);\r\n }\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n }, [dadosOrdemCompra]);\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosOrdemCompra.orc_id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosOrdemCompra.nomeFornecedor}\r\n \r\n \r\n {dadosOrdemCompra.nomeTransportador || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosOrdemCompra.orc_atendente || 'Não Informado'}\r\n \r\n \r\n {dadosOrdemCompra.orc_nropedido || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosOrdemCompra.orc_observacao || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosOrdemCompra.orc_formapagamento || 'Não Informado'}\r\n \r\n \r\n {moment(dadosOrdemCompra.orc_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n {moment(dadosOrdemCompra.orc_dataconclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosOrdemCompra.orc_valortotal - dadosOrdemCompra.orc_valorfrete + dadosOrdemCompra.orc_valordesconto, true)}\r\n \r\n \r\n {FormatNumber(dadosOrdemCompra.orc_valorfrete, true)}\r\n \r\n \r\n {FormatNumber(dadosOrdemCompra.orc_valordesconto, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total (R$): {FormatNumber(dadosOrdemCompra.orc_valortotal, true)}\r\n \r\n \r\n
\r\n
(\r\n
\r\n {pro_codigo}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n width: 180,\r\n render: ({ pro_descricao, mgp_descricao }) => (\r\n
\r\n \r\n
\r\n {pro_descricao}\r\n \r\n \r\n {mgp_descricao != \"\" &&\r\n \r\n \r\n Grade: {mgp_descricao}\r\n \r\n \r\n }\r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 50,\r\n align: 'right',\r\n render: ({ ocp_quantidade }) => (\r\n
\r\n {FormatNumber(ocp_quantidade, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Qtde. Rec.',\r\n width: 50,\r\n align: 'right',\r\n render: ({ ocp_quantidaderecebida }) => (\r\n
\r\n {FormatNumber(ocp_quantidaderecebida, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Un.(R$)',\r\n width: 50,\r\n align: 'right',\r\n render: ({ ocp_valorun }) => (\r\n
\r\n {FormatNumber(ocp_valorun, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr. Total(R$)',\r\n width: 60,\r\n align: 'right',\r\n render: ({ ocp_valorun, ocp_frete, ocp_desconto, ocp_quantidade }) => (\r\n
\r\n {FormatNumber((ocp_valorun + ocp_frete - ocp_desconto) * ocp_quantidade, true)}\r\n
\r\n ),\r\n },\r\n ]\r\n } locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ y: 196, x: 580 }} />\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { InfoNotaNFe } from \"../../../components\";\r\nimport { novaAbaNavegador } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalEstornoNfe({ dadosNota, exibirModal, fecharModal }) {\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n formulario.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n function salvar(valores) {\r\n let dados = {};\r\n dados.ntf_id = dadosNota.ntf_id;\r\n dados.textoEstorno = formulario.getFieldValue().justificativa;\r\n setCarregando(true);\r\n api.post(`NotaFiscal/IncluirEstorno`, dados).then(\r\n res => {\r\n if (res.data.ntf_status === 1) {\r\n notification.success({ description: `NF-e Nº: ${dadosNota.ntf_numero} estorna com sucesso!`, message: 'Aviso' });\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && res.data.ntf_docfiscal == true) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n } else if (res.data.ntf_status != 1) {\r\n notification.success({ description: res.data.ntf_cstat + res.data.ntf_xmotivo, message: 'Aviso' });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.warning({ description: 'Ocorreu um erro ao tentar estornar a nota fiscal.', message: 'Aviso' });\r\n }\r\n setCarregando(false);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModal();\r\n setCarregando(false);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n \r\n Realizar o Estorno\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n onOk={salvar}\r\n destroyOnClose\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n ATENÇÃO:
\r\n O prazo legal para o Cancelamento de um Nota Fiscal Eletrônica é de 168 horas.
\r\n A Nota Fiscal selecionada ultrapassou este prazo, de modo que, apenas é permitido seu Estorno.\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Descriptions, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { ModalSenhaLiberacao } from \"..\";\r\n\r\nexport default function ModalParcelasPendentes({ dadosParcelas, exibirModal, fecharModal, fecharModalOk }) {\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const solicitarPermissao = () => {\r\n setAbreModalLiberacao(true);\r\n };\r\n\r\n const onCloseModalLiberacao = (retorno) => {\r\n setAbreModalLiberacao(false);\r\n if (retorno) {\r\n fecharModalOk();\r\n }\r\n };\r\n\r\n return (\r\n \r\n Solicitar permissão para venda a prazo\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n O Cliente possui parcelas em atraso.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(!!dadosParcelas && dadosParcelas.length > 0 ? dadosParcelas[0].limiteCredito : 0, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
(\r\n
\r\n {cpr_numerodocumento}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Parcela',\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Vencimento',\r\n render: ({ prc_datavencimento }) => (\r\n
\r\n {moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Pendente (R$)',\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },\r\n ]} dataSource={dadosParcelas} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Modal, InputNumber, Select, Alert, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { getEmpresa } from \"../../../services/auth\";\r\n\r\nexport default function ModalAliquotaSimplesNacional({ exibirModal, fecharModal, aposSalvar }) {\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const salvarAliquota = () => {\r\n let valores = formulario.getFieldValue();\r\n valores.emp_id = getEmpresa();\r\n api.post(`AliquotaSimplesNacional/Incluir`, valores).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: 'Aliquota adicionada com sucesso!' })\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n ()=>{\r\n aposSalvar();\r\n }\r\n )\r\n };\r\n\r\n useEffect(() => {\r\n let data = new Date();\r\n carregarDados(data);\r\n\r\n }, []);\r\n\r\n function carregarDados(data) {\r\n formulario.setFieldsValue({ asn_mes: data.getMonth() + 1 });\r\n formulario.setFieldsValue({ asn_ano: data.getFullYear() });\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Form, Modal, Descriptions, InputNumber, notification } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport InputPreco from \"../../inputPreco\";\r\nimport InputQuantidade from \"../../inputQuantidade\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport Data from \"../../data\";\r\n\r\nexport default function ModalItemInventario({ form, dadosItem, exibirModal, onCloseModal, TipoCodigoProduto }) {\r\n\r\n const [formulario] = Form.useForm();\r\n\r\n useEffect(() => {\r\n if (dadosItem) {\r\n formulario.setFieldsValue({\r\n ivi_dataposicao: dadosItem.ivi_dataposicao,\r\n ivi_estoqueatual: dadosItem.ivi_estoqueatual,\r\n ivi_customedio: dadosItem.ivi_customedio,\r\n ivi_custoultimacompra: dadosItem.ivi_custoultimacompra,\r\n ivi_custosemicms: dadosItem.ivi_custosemicms,\r\n ivi_custocomicms: dadosItem.ivi_custocomicms,\r\n })\r\n }\r\n setarCampoQtde();\r\n }, [dadosItem]);\r\n\r\n function setarCampoQtde() {\r\n setTimeout(() => {\r\n try {\r\n let element = document.getElementById(\"qtdeEstoque\");\r\n if (element) {\r\n element.focus();\r\n element.select(); // Seleciona todo o texto dentro do campo\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 200);\r\n }\r\n\r\n\r\n const alterarItem = record => {\r\n let dados = {};\r\n dados.TipoCodigoProduto = TipoCodigoProduto;\r\n dados.inv_id = form.getFieldValue().inv_id;\r\n dados.ivi_id = dadosItem.ivi_id;\r\n dados.qtde = record.ivi_estoqueatual - dadosItem.ivi_estoqueatual;\r\n dados.ivi_dataposicao = formulario.getFieldValue().ivi_dataposicao;\r\n dados.ivi_customedio = formulario.getFieldValue().ivi_customedio;\r\n dados.ivi_custoultimacompra = formulario.getFieldValue().ivi_custoultimacompra;\r\n dados.ivi_custosemicms = formulario.getFieldValue().ivi_custosemicms;\r\n dados.ivi_custocomicms = formulario.getFieldValue().ivi_custocomicms;\r\n api.put(`Inventario/ModificarItem`, dados).then(\r\n res => {\r\n notification.success({ description: 'Item do inventário modificado com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n formulario.resetFields();\r\n onCloseModal();\r\n }\r\n )\r\n };\r\n\r\n return (\r\n {\r\n formulario.resetFields();\r\n onCloseModal();\r\n }}\r\n onOk={() => formulario.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n \r\n \r\n \r\n \r\n {dadosItem.pro_codigo} - {dadosItem.pro_descricao}\r\n \r\n \r\n \r\n \r\n {!!dadosItem.grade &&\r\n \r\n \r\n \r\n \r\n {dadosItem.grade}\r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosItem.ivi_estoqueanterior, true)} {dadosItem.ump_id}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React, { useState } from \"react\";\r\nimport { Modal, Button, } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport { PrecoGrade } from '../../';\r\n\r\nexport default function ModalGrade({ visible, onCloseModal, list, setList, onSave }) {\r\n\r\n const onCancel = () => {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: 'Deseja sair sem salvar?',\r\n okText: 'Sim',\r\n cancelText: 'Cancelar',\r\n onOk: () => {\r\n onCloseModal();\r\n }\r\n });\r\n }\r\n\r\n\r\n return (\r\n } size=\"middle\" onClick={onCancel}>\r\n Cancelar\r\n ,\r\n ,\r\n ]}>\r\n \r\n \r\n );\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Row, Col, Typography, Form, Input, Modal, Switch, Table, Tag, Select, notification, Button } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { novaAbaNavegador } from \"../../../services/funcoes\";\r\nimport { SelectPaginacao } from \"../../../components\";\r\n\r\nexport default function ModalConfirmacaoTransferencia({ dadosNota = {}, exibirModal, fecharModal }) {\r\n\r\n const [form] = Form.useForm();\r\n const [conferiTodos, setConferiTodos] = useState(false);\r\n const [usarLeitor, setUsarLeitor] = useState(false);\r\n const [serieFiscalTerceiros, setSerieFiscalTerceiros] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const [parametrosEmpresa, setParametrosEmpresa] = useState([]);\r\n const codBarrasInput = useRef();\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n setConferiTodos(false);\r\n setUsarLeitor(false);\r\n\r\n api.get('ParametroEmpresa/BuscarParametros').then(res => {\r\n if (res.status === 200) {\r\n setParametrosEmpresa(res.data);\r\n }\r\n }).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n\r\n if (!!dadosNota.ntf_id) {\r\n let listaTemp = [];\r\n api.get(`NotaFiscalTransferencia/ListarItensNotaFiscal/${dadosNota.ntf_id}`).then(itensNotaFiscal => {\r\n if (itensNotaFiscal.status === 200) {\r\n itensNotaFiscal.data.forEach((item, indice) => {\r\n item.produtoConferido = false;\r\n item.key = indice + 1;\r\n listaTemp.push(item);\r\n\r\n if (item.key === itensNotaFiscal.data.length) {\r\n setListaItens(listaTemp);\r\n }\r\n });\r\n }\r\n }).catch(erro => {\r\n console.log(erro);\r\n });\r\n }\r\n }\r\n }, [exibirModal]);\r\n\r\n function marcarItem(key, nfi_ean) {\r\n let itens = [...listaItens];\r\n let itemEditar = itens.filter((item) => { return (item.nfi_ean === nfi_ean && (!!key ? item.key === key : true)) });\r\n itemEditar.map((item) => {\r\n if (!key) {\r\n item.produtoConferido = true;\r\n form.setFieldsValue({ codBarras: '' });\r\n } else {\r\n item.produtoConferido = !item.produtoConferido;\r\n }\r\n });\r\n setListaItens(itens);\r\n };\r\n\r\n function marcarTodos(checked) {\r\n setConferiTodos(checked);\r\n\r\n let itens = [...listaItens];\r\n itens.map((item) => {\r\n item.produtoConferido = (checked ? true : false);\r\n });\r\n setListaItens(itens);\r\n };\r\n\r\n function salvarDados() {\r\n let idSerie = form.getFieldValue().ser_id;\r\n if (!idSerie) {\r\n notification.warning({ message: 'Aviso', description: ('Favor selecionar uma Série Fiscal!') });\r\n } else {\r\n setCarregando(true);\r\n api.post(`NotaFiscalTransferencia/incluirEntrada?IdNotaFiscal=${dadosNota.ntf_id}&IdSerie=${idSerie}`).then(\r\n retornoNF => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1 && !!retornoNF.data.ntf_chavenfe && !!retornoNF.data.ntf_docfiscal) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${retornoNF.data.ntf_chavenfe}`);\r\n }\r\n notification.success({ message: 'Operação Concluída', description: 'Nota Fiscal de Transferência adicionada com sucesso!' })\r\n fecharModal();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ message: 'Aviso', description: (!!erro.data ? erro.data.Message : 'Não foi possível realizar a Confirmação de Transferencia!') });\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n }\r\n );\r\n }\r\n };\r\n\r\n return (\r\n form.submit()}\r\n maskClosable={false}\r\n width={850}\r\n destroyOnClose\r\n footer={\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n >\r\n
\r\n
\r\n \r\n
\r\n {\r\n setUsarLeitor(checked);\r\n if (checked) {\r\n setTimeout(() => codBarrasInput.current.focus());\r\n }\r\n }} /> Utilizar leitor de código de barras?\r\n \r\n \r\n { marcarTodos(checked) }} /> Conferi Todos\r\n \r\n \r\n {conferiTodos &&\r\n \r\n \r\n \r\n Atenção, é Recomendado a conferência dos Itens ao Habilitar a opção 'Conferi Todos'\r\n \r\n \r\n \r\n }\r\n {usarLeitor &&\r\n \r\n \r\n \r\n {\r\n marcarItem(null, e.target.value);\r\n }} />\r\n \r\n \r\n \r\n }\r\n
\r\n
(\r\n {nfi_numeroitem}\r\n ),\r\n },\r\n {\r\n width: 110,\r\n elipse: true,\r\n title: 'Descrição',\r\n render: ({ pro_descricao, nfi_ean }) => (\r\n
\r\n {pro_descricao}\r\n
\r\n {nfi_ean}\r\n
\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Quantidade',\r\n width: 60,\r\n align: 'center',\r\n render: ({ nfi_qtde, nfi_unidademedida }) => (\r\n
\r\n {nfi_qtde} {nfi_unidademedida}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Unitário (R$)',\r\n width: 65,\r\n align: 'right',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor Total (R$)',\r\n align: 'right',\r\n width: 65,\r\n render: ({ nfi_valorunitario, nfi_qtde }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario * nfi_qtde, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Confere',\r\n align: 'center',\r\n width: 70,\r\n render: ({ produtoConferido, nfi_ean, key }) => (\r\n { marcarItem(key, nfi_ean) }} />\r\n ),\r\n }\r\n ]} scroll={{ x: 800 }} />\r\n \r\n \r\n \r\n \r\n ({pc.ser_serie}
\r\n
)\r\n } />\r\n
\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Input, Modal, InputNumber } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalEditarItemDevolucao({ form, exibirModalEditarItemDevolucao, cancelar, aoSalvar }) {\r\n\r\n return (\r\n cancelar()}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { InputPreco } from \"../../../components\";\r\nimport Data from \"../../data\";\r\n\r\nexport default function ModalEditarNotaFiscalEntrada({ form, exibirModalEditarNotaFiscalEntrada, fecharModalEditarNotaFiscalEntrada }) {\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalEditarNotaFiscalEntrada();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n {\r\n onCloseModal();\r\n }}\r\n onOk={() => form.submit()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } \r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Input, Modal, Table, Tag, Divider, Button } from \"antd\";\r\nimport { ExclamationCircleOutlined, ArrowRightOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalEditarCFOP({ exibirModal, fecharModal, aoSelecionar, listaCFOP }) {\r\n\r\n const [filtro, setFiltro] = useState(\"\");\r\n\r\n return (\r\n fecharModal()}\r\n footer={null}\r\n >\r\n
\r\n \r\n
\r\n setFiltro(value.trim())} allowClear/>\r\n \r\n \r\n
{ return cfop.cfo_cfop.toString().indexOf((filtro).toUpperCase()) >= 0 || cfop.cfo_descricao.toString().toUpperCase().indexOf((filtro).toUpperCase()) >= 0 }) : listaCFOP.listaCFOP} columns={[\r\n {\r\n title: 'CFOP',\r\n width: 75,\r\n render: ({ cfo_cfop }) => (\r\n
\r\n \r\n {cfo_cfop}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Descrição',\r\n render: ({ cfo_descricao }) => (\r\n
\r\n {cfo_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 85,\r\n render: ({ cfo_cfop }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n ]} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Radio, Modal } from \"antd\";\r\nimport { SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { info } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalAntecipacaoDevolucao({ form, exibirModal, cancelar, aoSalvar }) {\r\n\r\n const [selecionarContaCorrente, setSelecionarContaCorrente] = useState(false);\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n form.setFieldsValue({ antecipacaoEstorno: 1 });\r\n }\r\n }, [exibirModal]);\r\n\r\n function selecionaContaCorrente(value) {\r\n if (value === 1)\r\n setSelecionarContaCorrente(false)\r\n else\r\n setSelecionarContaCorrente(true)\r\n };\r\n function salvar() {\r\n if (selecionarContaCorrente && !form.getFieldValue().ctc_id) {\r\n info('Selecione uma conta corrente!');\r\n } else {\r\n aoSalvar();\r\n }\r\n }\r\n\r\n return (\r\n cancelar()}\r\n onOk={() => salvar()}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n Deseja Gerar?\r\n \r\n \r\n
\r\n \r\n { selecionaContaCorrente(event.target.value) }} >\r\n Antecipação/Crédito ?\r\n Estorno da Movimentação financeira ?\r\n \r\n \r\n \r\n {selecionarContaCorrente && \r\n \r\n (\r\n {item.ctc_id} - {item.ctc_descricao}\r\n )} />\r\n \r\n }\r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Modal, Checkbox, Input } from \"antd\";\r\nimport { ExclamationCircleOutlined, CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalContrato({ exibirModalContrato, fecharModalContrato, urlContrato, testeGratuito, cadastrarEmpresa, assinarContrato, codigoSeguranca }) {\r\n const [formulario] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalContrato();\r\n }\r\n });\r\n };\r\n\r\n function onFinish(values) {\r\n if (codigoSeguranca !== values.codigoSeguranca) {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: 'Código de segurança informado diferente do código presente no contrato!'\r\n });\r\n return false;\r\n }\r\n if (!values.confirmacaoLeitura) {\r\n Modal.error({\r\n title: 'Aviso!',\r\n content: 'É necessário confirmar a leitura!'\r\n });\r\n return false;\r\n }\r\n\r\n if (testeGratuito) {\r\n cadastrarEmpresa();\r\n } else {\r\n assinarContrato();\r\n }\r\n };\r\n\r\n return (\r\n formulario.submit()}\r\n okText={\r\n <>\r\n Aceito os Termos\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n className=\"modalPDF\"\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {testeGratuito ? 'Declaro que li e estou de acordo com os termos de uso do teste gratuito.' : 'Declaro para os devidos fins que li e concordo com os termos dispostos no CONTRATO DE LICENÇA DE USUÁRIO FINAL (EULA) E DE PRESTAÇÃO DE SERVIÇOS do GestorWeb.'} \r\n \r\n \r\n \r\n prevValues.confirmacaoLeitura !== currentValues.confirmacaoLeitura}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('confirmacaoLeitura')) return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Modal, Form, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport { LancamentoCheque } from \"../..\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\n\r\nimport api from \"../../../services/api\";\r\n\r\n\r\nexport default function ModalCheque({ form = null, exibirModal, fecharModal, dadosCheque, funcaoSalvar }) {\r\n const [formCheque] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [modal] = useState(true);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const salvarModalContaCorrente = (dados) => {\r\n //funcaoSalvar(dados);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ dadosModalCheque: { cheques: dados.cheques, contaCorrente: dados.ctc_id } } } } });\r\n //formCheque.resetFields();\r\n fecharModal();\r\n };\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ dadosModalCheque: { vemDaNota: true, quantidadeCheque: dadosCheque.numeroCheques, valorTotalCheque: dadosCheque.pfp_valor, cliente: dadosCheque.cli_id } } } } });\r\n if (form != null) formCheque.setFieldsValue({ pes_id: form.getFieldValue().pes_id });\r\n }\r\n }, [exibirModal]);\r\n \r\n return (\r\n { formCheque.submit() }}\r\n width={1000}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n } >\r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, Modal, Descriptions } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { info } from \"../../../services/funcoes\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\nimport { getEmpresa } from \"../../../services/auth\";\r\n\r\nexport default function ModalRetornaContaGerencial({ exibirModalContaGerencial, fecharModalContaGerencial, descricao = \"\", avistaAPrazo = false }) {\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialTodas, setListaContaGerencialTodas] = useState([]);\r\n const [form] = Form.useForm();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalContaGerencial();\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n carregarListaConta();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && manutencao.dados.dadosEmpresa) {\r\n if (avistaAPrazo) {\r\n form.setFieldsValue({ cgc_contagerencialdestino: manutencao.dados.dadosEmpresa.cgc_contagerencialdestino });\r\n form.setFieldsValue({ cgc_contagerencialdestino2: manutencao.dados.dadosEmpresa.cgc_contagerencialdestino2 });\r\n }\r\n }\r\n }, [manutencao.dados])\r\n\r\n function carregarListaConta() {\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?PageSize=1000&PageNumber=1`).then(\r\n res => {\r\n let lista = [];\r\n let dados = res.data.items\r\n setListaContaGerencialTodas(dados);\r\n for (const conta of dados) {\r\n if (conta.nivel === 0) {\r\n conta.listaContas = [];\r\n lista.push(conta);\r\n }\r\n }\r\n for (const conta of dados) {\r\n if (conta.nivel !== 0) {\r\n let obj = lista.find(contaLista => contaLista.ctc_id === conta.ctc_id);\r\n if (!!obj && !!obj.listaContas) {\r\n obj.listaContas.push(conta);\r\n }\r\n\r\n }\r\n }\r\n setListaContaGerencial(lista);\r\n\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function adicionarConfig(values) {\r\n values.emp_id = getEmpresa();\r\n values.listaContas = []\r\n if (!!form.getFieldValue().cgc_contagerencialdestino2) {\r\n values.listaContas = listaContaGerencialTodas.filter((conta) => conta.ctg_id === form.getFieldValue().cgc_contagerencialdestino || conta.ctg_id === form.getFieldValue().cgc_contagerencialdestino2)\r\n } else {\r\n values.listaContas = listaContaGerencialTodas.filter((conta) => conta.ctg_id === form.getFieldValue().cgc_contagerencialdestino);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ dadosContaGerencial: values } } } });\r\n fecharModalContaGerencial(values);\r\n };\r\n\r\n return (\r\n { form.submit() }}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n destroyOnClose\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {avistaAPrazo && \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, ExceptionOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { MaskFormat, FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalInutilizarNota({ dadosNota, exibirModal, fecharModal }) {\r\n const [form] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n });\r\n };\r\n\r\n const inutilizarNota = () => {\r\n let dados = { ...dadosNota };\r\n let obj = {};\r\n obj.ntf_id = dados.ntf_id;\r\n obj.justificativa = form.getFieldValue().justificativa;\r\n if (!obj.justificativa || obj.justificativa.length < 15) {\r\n notification.warning({ message: `Aviso!`, description: `A Justificativa deve ter no mínimo 15 caracteres!` })\r\n return false;\r\n }\r\n setCarregando(true);\r\n api.post(`NotaFiscal/Inutilizar`, obj).then(\r\n res => {\r\n let _cStat = res.data.retorno.infInut.cStat;\r\n let motivo = _cStat + '-' + res.data.retorno.infInut.xMotivo;\r\n if (_cStat == 102 || _cStat == 135 || _cStat == 206) {\r\n notification.success({ message: `NF-e Nº: ${dadosNota.ntf_numero} inutiliazada com sucesso !`, description: motivo });\r\n } else {\r\n notification.warning({ message: `Não foi possível efetuar a inutilização da NF-e Nº: ${dadosNota.ntf_numero}, ` + motivo, description: motivo });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ description: `Não foi possível inutilizar a NF-e Nº: ${dadosNota.ntf_numero} !`, message: 'Aviso' });\r\n setCarregando(false);\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false);\r\n form.resetFields();\r\n fecharModal();\r\n }\r\n );\r\n };\r\n\r\n return (\r\n \r\n Inutilizar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe} \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {MaskFormat(dadosNota.ntf_cnpjcpfdest, '', true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_serie}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_modelo}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.tip_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosNota.valor_total, true)} \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, Table, Tag, InputNumber, Input, Modal, notification } from \"antd\";\r\nimport { PlusOutlined, MinusOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport InputPreco from \"../../inputPreco\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport { isObjetoDiffVazio } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalProdutoGrade({ exibirModal, fecharModal, dados, acrescimoDesconto = true }) {\r\n const [form] = Form.useForm();\r\n const [ehPercentual, setEhPercentual] = useState(false);\r\n const [listaGrade, setListaGrade] = useState([]);\r\n const [listaGradeBkp, setListaGradeBkp] = useState([]);\r\n\r\n const onCloseModal = () => {\r\n fecharModal();\r\n setListaGradeBkp([]);\r\n };\r\n\r\n const salvarDados = () => {\r\n let grades = \"\";\r\n let listaItens = listaGradeBkp.filter(grade => grade.quantidade > 0);\r\n grades = listaItens.map(grade => grade.prg_id).join(',');\r\n //fecharModal(listaItens);\r\n api.get(`Produto/ListaProdutoPelaGrade?listaGrades=${grades}`).then(\r\n res => {\r\n let dados = res.data;\r\n dados.forEach((grade) => {\r\n let dadosDaGrade = listaItens.filter((item) => (item.prg_id === grade.prg_id))[0];\r\n grade.lpi_valorvenda = dadosDaGrade.lpi_valorvenda;\r\n grade.quantidade = dadosDaGrade.quantidade;\r\n });\r\n fecharModal(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setListaGradeBkp([]);\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n if (!!exibirModal && !!dados && isObjetoDiffVazio(dados)) {\r\n buscarDadosGrade();\r\n }\r\n }, [exibirModal]);\r\n\r\n useEffect(() => {\r\n if (!!listaGradeBkp) {\r\n setListaGrade(listaGradeBkp);\r\n }\r\n }, [listaGradeBkp])\r\n\r\n function buscarDadosGrade() {\r\n api.get(`Produto/ListarGrades?idProduto=${dados.pro_id}`).then(\r\n res => {\r\n let dados = res.data;\r\n dados.forEach((item) => {\r\n item.quantidade = 0;\r\n })\r\n setListaGradeBkp(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function calcularDesc() {\r\n\r\n };\r\n\r\n function calcularAcres() {\r\n\r\n };\r\n\r\n function alterarQuantidade(operacao, prg_id, qtd = 0) {\r\n let lista = [...listaGrade]\r\n let dados = lista.find((grade) => (grade.prg_id === prg_id));\r\n if (operacao === '+') {\r\n dados.quantidade++;\r\n } else if (operacao === '-') {\r\n if (dados.quantidade > 0) {\r\n dados.quantidade--;\r\n } else {\r\n notification.warn({ description: 'A quantidade informada não pode ser menor do que 0!', message: 'Aviso' });\r\n return;\r\n }\r\n } else {\r\n if (qtd > 0) {\r\n dados.quantidade = qtd;\r\n } else {\r\n notification.warn({ description: 'A quantidade informada não pode ser menor do que 0!', message: 'Aviso' });\r\n return;\r\n }\r\n }\r\n setListaGradeBkp(lista);\r\n };\r\n\r\n function pesquisaGrade(campo) {\r\n if (!!campo) {\r\n let dados = [...listaGradeBkp];\r\n dados.forEach(grade => {\r\n grade.modalidadesgrade.forEach((modalidade, idx) => {\r\n if (idx === 0) {\r\n grade.descricaoGrade = \"\";\r\n }\r\n grade.descricaoGrade += modalidade.mgp_descricao + \" \";\r\n });\r\n });\r\n dados = dados.filter((grade) => (grade.ean.indexOf(campo) > -1 || grade.descricaoGrade.toLowerCase().indexOf(campo.toLowerCase()) > -1));\r\n setListaGrade(dados);\r\n } else {\r\n setListaGrade(listaGradeBkp);\r\n }\r\n };\r\n\r\n return (\r\n \r\n Cancelar\r\n \r\n }\r\n onOk={() => { form.submit() }}\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n width={780}\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n { pesquisaGrade(campo) }} allowClear />\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {prg_ean}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Grade',\r\n render: ({ modalidadesgrade }) => (\r\n
\r\n {modalidadesgrade.map(atrib => (\r\n {atrib.mgp_descricao} \r\n ))}\r\n
\r\n ),\r\n }, acrescimoDesconto ? {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desconto/Acréscimo\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: 175,\r\n align: 'center',\r\n render: (record, { prg_id }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { alterarQuantidade(\"\", record.prg_id, valor) }} />\r\n \r\n \r\n \r\n MAPA\r\n \r\n \r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Select, notification, Modal, Radio, Input } from \"antd\";\r\nimport { ExclamationCircleOutlined, SaveOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from \"../../../state\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport InputNumber from \"rc-input-number\";\r\n\r\nexport default function ModalRetencao({exibirModalRetencao, fecharModalRetencao }) {\r\n const [dispatch] = useStateValue();\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalRetencao();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n `%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n Produto\r\n Serviço\r\n Ambos\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { useStateValue } from '../../../state';\r\nimport { Col, Form, Modal, Row, Select } from 'antd';\r\nimport { CloseOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport { getEmailUsuario, setClienteCatalogo, setNomeClienteCatalogo } from '../../../services/auth';\r\nimport SelectPaginacao from '../../selects/selectPaginacao';\r\nimport { manutencaoActions, selectPaginadoActions } from '../../../actions';\r\nimport api from '../../../services/api';\r\nimport { isObjetoDiffVazio } from '../../../services/funcoes';\r\n\r\n\r\nexport default function ModalSelecaoClientesCat({ exibirModal, onCloseModal }) {\r\n const [formClientes] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosLista, setDadosLista] = useState([]);\r\n const [abrirModal, setAbrirModal] = useState(false);\r\n\r\n useEffect(() => {\r\n if (exibirModal) {\r\n\r\n let emailusuario = getEmailUsuario();\r\n verificarCliente(emailusuario);\r\n }\r\n }, [exibirModal]);\r\n\r\n function selecionarCliente() {\r\n let lista = [...dadosLista];\r\n let codCliente = formClientes.getFieldValue().codigo;\r\n let cliente = lista.find(c => c.codigo == codCliente);\r\n if (!!cliente) {\r\n setNomeClienteCatalogo(cliente.nome);\r\n }\r\n setClienteCatalogo(codCliente);\r\n fecharModal(cliente.nome);\r\n }\r\n\r\n function verificarCliente(email) {\r\n api.get(`Ges040/BuscarClienteCatalogo?email=${email}`).then(\r\n res => {\r\n let cli = { ...res.data };\r\n if (isObjetoDiffVazio(cli)) {\r\n setAbrirModal(false);\r\n setNomeClienteCatalogo(cli.nome);\r\n setClienteCatalogo(cli.codigo);\r\n fecharModal(cli.nome);\r\n } else {\r\n setAbrirModal(true);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n setAbrirModal(true);\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n\r\n function fecharModal(nome) {\r\n setAbrirModal(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { nomeCliente: nome } } });\r\n onCloseModal();\r\n }\r\n\r\n return (\r\n\r\n { formClientes.submit() }}\r\n okText={\r\n <>\r\n Salvar\r\n \r\n }\r\n closable={false}\r\n cancelButtonProps={{ hidden: true }}\r\n destroyOnClose\r\n maskClosable={false}\r\n width={700}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n ({e.codigo} - {e.nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n );\r\n}\r\n","import React, { useState, useEffect } from 'react';\r\nimport { Modal } from 'antd';\r\nimport { CloseOutlined } from '@ant-design/icons';\r\nimport { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';\r\n\r\nexport default function ModalExibeImagem({ dadosImagem, exibirModal, onCloseModal }) {\r\n return (\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n \r\n \"imagem\"\r\n \r\n \r\n
\r\n
);\r\n}","import { Col, Form, Input, InputNumber, Modal, Row, Select, notification } from \"antd\";\r\nimport React, { useState, useEffect } from \"react\";\r\nimport SelectPaginacao from \"../../selects/selectPaginacao\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, PlusOutlined, TrophyFilled } from \"@ant-design/icons\";\r\nimport UploadFoto from \"./UploadFoto\";\r\nimport api from \"../../../services/api\";\r\n\r\nexport default function ModalManutencaoPecasCat({ formGrupo, aoSalvar, listaPecas, exibirModalItens, editando, sequencia }) {\r\n const [formulario] = Form.useForm();\r\n const [dadosPecasSelect, setDadosPecasSelect] = useState([]);\r\n const [listaImagens, setListaImagens] = useState([]);\r\n const [flagCodPeca ,setFlagCodPeca] = useState(false);\r\n const [jaTemFoto, setJaTemFoto] = useState(false);\r\n\r\n useEffect(() => {\r\n let codPeca = formulario.getFieldValue().codpeca;\r\n if(codPeca && !!flagCodPeca)\r\n {\r\n api.get(`UploadImagens/GetImgMongo?filename=${codPeca}`).then(\r\n res => {\r\n let dados = res.data.map((x) => ({ ...x}))\r\n if(dados.length > 0){\r\n setListaImagens(dados);\r\n }\r\n }\r\n ).catch(error => {\r\n console.log(error);\r\n });\r\n }\r\n setFlagCodPeca(false);\r\n }, [flagCodPeca])\r\n\r\n useEffect(() => {\r\n if (editando.editando) {\r\n let listaTemp = listaPecas.listaPecas.find(x => x.Sequencia == sequencia.sequencial);\r\n formulario.setFieldsValue({\r\n codCatalogo: formGrupo.getFieldValue().codCatalogo,\r\n sequencia: listaTemp.Sequencia,\r\n numeroItem: listaTemp.NumeroItem,\r\n codpeca: listaTemp.descpeca,\r\n quantidade: listaTemp.Quantidade,\r\n observacoes: listaTemp.Observacoes,\r\n });\r\n //verificar se ja tem imagem\r\n\r\n } else {\r\n formulario.resetFields();\r\n }\r\n //VERIFICAR LOGICA NUMEROITEM\r\n if (!!exibirModalItens && !editando.editando) {\r\n const listaPecasLength = listaPecas.listaPecas ? listaPecas.listaPecas.length : 0;\r\n formulario.setFieldsValue({ codCatalogo: formGrupo.getFieldValue().codCatalogo, sequencia: listaPecasLength + 1 })\r\n formulario.setFieldsValue({ codCatalogo: formGrupo.getFieldValue().codCatalogo, numeroItem: listaPecasLength + 1 })\r\n }\r\n }, [exibirModalItens, editando.editando]);\r\n\r\n const salvarManutencao = () => {\r\n let dados = [];\r\n dados.SeqGrupo = formulario.getFieldValue().sequencia;\r\n if(editando.editando) {\r\n const pecaEditando = listaPecas.listaPecas.find(x => x.descpeca === formulario.getFieldValue().codpeca);\r\n dados.CodPeca = pecaEditando ? pecaEditando.CodPeca : formulario.getFieldValue().codpeca;\r\n }\r\n else {\r\n dados.CodPeca = formulario.getFieldValue().codpeca;\r\n }\r\n dados.NumeroItem = formulario.getFieldValue().numeroItem;\r\n dados.Quantidade = formulario.getFieldValue().quantidade;\r\n dados.Observacoes = formulario.getFieldValue().observacoes;\r\n\r\n var dadosPeca = dadosPecasSelect.find(x => x.codpeca === dados.CodPeca);\r\n dados.descpeca = dadosPeca.descpeca;\r\n let lista = [...listaPecas.listaPecas];\r\n\r\n if (editando.editando) {\r\n const index = lista.findIndex(item => item.Sequencia === sequencia.sequencial);\r\n if (index !== -1) {\r\n dados.Sequencia = index + 1;\r\n lista[index] = dados;\r\n listaPecas.setListaPecas(lista);\r\n editando.setEditando(false);\r\n }\r\n } else {\r\n dados.Sequencia = (listaPecas.listaPecas.length + 1);\r\n lista.push(dados);\r\n listaPecas.setListaPecas(lista);\r\n }\r\n onCloseModal();\r\n formulario.resetFields();\r\n setListaImagens([]);\r\n setJaTemFoto(false);\r\n }\r\n const validarCodPeca = (rules, value, callback) => {\r\n if (value && listaPecas?.listaPecas?.some(peca => peca.CodPeca === value && peca.Sequencia !== sequencia)) {\r\n notification.warning({ description: 'Esta peça já foi adicionada!', message: 'Aviso!' });\r\n } else {\r\n callback();\r\n }\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaImagens([]);\r\n setJaTemFoto(false);\r\n onCloseModal();\r\n }\r\n })\r\n }\r\n\r\n const onCloseModal = () => {\r\n aoSalvar();\r\n formulario.resetFields();\r\n }\r\n\r\n const onOk = () => {\r\n formulario.submit();\r\n let codPeca = formulario.getFieldValue().codpeca;\r\n if(codPeca != null && !jaTemFoto && listaImagens.length > 0)\r\n {\r\n let image = {\r\n FileName: formulario.getFieldValue().codpeca,\r\n Base64Data: listaImagens[0].thumbUrl,\r\n };\r\n salvarFoto(image, codPeca);\r\n }\r\n }\r\n \r\n const salvarFoto = (image, codPeca) => {\r\n api.post(`UploadImagens/UploadImgMongo?codPeca=${codPeca}`, image).then(\r\n res => {\r\n if (res.status === 200) {\r\n notification.success(\"Imagem adicionada com sucesso!\");\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.error(erro);\r\n notification.error(\"Erro ao adicionar imagem!\");\r\n }\r\n );\r\n }\r\n\r\n return (\r\n onOk()}\r\n okText={\r\n <>\r\n Adicionar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setFlagCodPeca(true)}\r\n conteudo={res => (\r\n {res.descpeca}\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Button, Table, Tag, InputNumber, Input, Modal } from \"antd\";\r\nimport { PlusOutlined, MinusOutlined, ExclamationCircleOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport InputPreco from \"../../inputPreco\";\r\nimport { useStateValue } from '../../../state';\r\nimport { info, validarNumeros } from \"../../../services/funcoes\";\r\nimport { manutencaoActions } from \"../../../actions\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalGradeProdutoImportacao({ exibirModal, fecharModal, dados }) {\r\n const [form] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosRetorno, setDadosRetorno] = useState([]);\r\n const [dadosFiltrados, setDadosFiltrados] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dados) {\r\n dados.forEach((dado) => {\r\n if (!(!!dado.nfi_qtde)) {\r\n dado.nfi_qtde = 0;\r\n }\r\n });\r\n setDadosRetorno(dados);\r\n setDadosFiltrados(dados);\r\n } else {\r\n form.resetFields();\r\n }\r\n }, [dados]);\r\n\r\n useEffect(() => {\r\n pesquisaGrade(form.getFieldValue().pesquisa);\r\n }, [dadosRetorno]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n };\r\n\r\n const salvarDados = values => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, dadosGrade: [...dados] } } })\r\n fecharModal();\r\n form.resetFields();\r\n };\r\n\r\n function alterarQuantidade(item, operacao, qtde = null) {\r\n let dadosTemp = [...dadosRetorno];\r\n let itemTemp = dadosTemp.find((dado) => (dado === item));\r\n if (qtde !== null) {\r\n itemTemp.nfi_qtde = qtde;\r\n } else {\r\n let qtd = !!itemTemp.nfi_qtde ? itemTemp.nfi_qtde : 0;\r\n if (operacao === \"mais\") {\r\n qtd++;\r\n } else if (operacao === \"menos\" && qtd > 0) {\r\n qtd--;\r\n }\r\n itemTemp.nfi_qtde = qtd;\r\n }\r\n itemTemp.valorTotal = (parseFloat(itemTemp.nfi_qtde) * parseFloat(itemTemp.nfi_custoinformado));\r\n setDadosRetorno(dadosTemp);\r\n };\r\n\r\n function pesquisaGrade(campo) {\r\n let filtrados = [];\r\n if (!!campo) {\r\n for (let item of dadosRetorno) {\r\n if (item.ean.indexOf(campo) >= 0) {\r\n filtrados.push(item);\r\n } else {\r\n for (let grade of item.atributos) {\r\n if (grade.mgp_descricao.toLowerCase().indexOf(campo.toLowerCase()) >= 0) {\r\n filtrados.push(item);\r\n }\r\n }\r\n }\r\n }\r\n setDadosFiltrados(filtrados);\r\n } else {\r\n setDadosFiltrados([...dadosRetorno]);\r\n }\r\n };\r\n\r\n\r\n return (\r\n \r\n Cancelar\r\n \r\n }\r\n onOk={() => { form.submit() }}\r\n okText={\r\n <>\r\n Ok\r\n \r\n }\r\n width={780}\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n
\r\n \r\n { pesquisaGrade(campo) }} allowClear\r\n />\r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {ean}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Grade',\r\n render: ({ atributos }) => (\r\n
\r\n \r\n {atributos.map(atrib => (\r\n
\r\n {atrib.mgp_descricao}\r\n \r\n ))}\r\n \r\n \r\n ),\r\n }, \r\n {\r\n title: 'Quantidade',\r\n width: 112,\r\n align: 'center',\r\n render: (record, { nfi_qtde }) => (\r\n \r\n \r\n \r\n { alterarQuantidade(record, \"\", e) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
record.oit_id} rowClassName={(record) => record.disabled ? 'disabled-row' : ''} columns={\r\n [\r\n {\r\n title: 'Item',\r\n render: ({ pro_codigo, pro_descricao, atributos }) => (\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n {!!atributos &&\r\n \r\n \r\n {atributos.grade}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'UM.',\r\n width: 60,\r\n align: 'right',\r\n render: ({ ump_id }) => (\r\n
\r\n \r\n
\r\n {ump_id}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 60,\r\n align: 'right',\r\n render: ({ oit_qtde, oit_id }) => (\r\n
\r\n {editando === oit_id ? (\r\n \r\n
\r\n setItemEditado({ ...itemEditado, [oit_id]: value })}\r\n style={{ width: 80 }}\r\n />\r\n \r\n \r\n ) : (\r\n \r\n \r\n {oit_qtde}\r\n \r\n \r\n )}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ oit_valorunitario }) => (\r\n
\r\n {FormatNumber(oit_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ oit_valorunitario, oit_qtde }) => (\r\n
\r\n {FormatNumber(oit_qtde * oit_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: ({ oit_id, oit_qtde }) => (\r\n
\r\n {editando === oit_id ? (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
record.orf_id} rowClassName={(record) => record.disabled ? 'disabled-row' : ''} columns={\r\n [\r\n {\r\n title: 'Forma de Pagamento',\r\n render: ({ fpg_descricao, cpg_descricao }) => (\r\n
\r\n {fpg_descricao} {!!cpg_descricao ? `/ ${cpg_descricao}` : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto',\r\n align: 'center',\r\n render: ({ orf_percentualdesconto }) => (\r\n
\r\n {FormatNumber(orf_percentualdesconto, true)} %\r\n
\r\n )\r\n },\r\n {\r\n title: 'Acréscimo',\r\n align: 'center',\r\n render: ({ orf_percentualacrescimo }) => (\r\n
\r\n {FormatNumber(orf_percentualacrescimo, true)} %\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor',\r\n align: 'right',\r\n render: ({ total }) => (\r\n
\r\n R$ {FormatNumber(!!total ? total : 0, true)}\r\n
\r\n )\r\n }\r\n ]\r\n } expandable={{\r\n expandedRowRender: ({ orf_observacao }) => (\r\n
\r\n \r\n
\r\n Obs.: { !!orf_observacao ? orf_observacao : \"Não Informado\" }\r\n \r\n \r\n \r\n )\r\n }} rowSelection={rowSelection} />\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Descriptions, Divider, Modal, notification, Row, Tabs } from \"antd\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, PlusOutlined } from \"@ant-design/icons\";\r\nimport { formatarCnpj, formatarCpf } from \"../../../services/funcoes\";\r\nimport moment from \"moment\";\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport TabItensSelecionar from \"./tabItensSelecionar\";\r\nimport TabFormaPagamentoSelecionar from \"./tabFormaPagamentoSelec\";\r\nimport DrawerPedidos from \"../../../pages/pedidos/drawer\";\r\n\r\nexport default function ModalSelecionarOrcamento ({ exibirModal, fecharModal, dadosOrcamento }) {\r\n const [orcamento, setOrcamento] = useState([]);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [itensConfirmados, setItensConfirmados] = useState([]);\r\n const [fpgsConfirmados, setFpgsConfirmados] = useState([]);\r\n const [dadosCliente, setDadosCliente] = useState({});\r\n const [modalFechada, setModalFechada] = useState(false);\r\n const [exibirDrawerPedidos, setExibirDrawerPedidos] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!!dadosOrcamento?.orc_id) {\r\n api.get(`Orcamento/Buscar?orc_id=${dadosOrcamento.orc_id}`).then(\r\n (res) => {\r\n setOrcamento(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n }, [dadosOrcamento]);\r\n\r\n const funcaoConfirmarItens = (itensConfirmados) => {\r\n setItensConfirmados(itensConfirmados);\r\n }\r\n\r\n const funcaoConfirmarFpgs = (fpgsConfirmados) => {\r\n setFpgsConfirmados(fpgsConfirmados);\r\n }\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModal();\r\n setAbaSelecionada(\"1\")\r\n setModalFechada(true);\r\n }\r\n });\r\n }\r\n\r\n async function gerarPedido() {\r\n if (itensConfirmados.length === 0 || fpgsConfirmados.length === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Selecione pelo menos um Item e uma Forma de Pagamento'})\r\n } else {\r\n try {\r\n if (dadosOrcamento.cli_id !== null) {\r\n var response = await api.get(`Cliente/BuscarCliente/${dadosOrcamento.cli_id}`);\r\n var cliente = response.data\r\n } else {\r\n var cliente = dadosOrcamento;\r\n }\r\n cliente.itens = [...itensConfirmados];\r\n cliente.formasPagamento = [...fpgsConfirmados];\r\n setDadosCliente(cliente)\r\n fecharModal();\r\n setExibirDrawerPedidos(true);\r\n setAbaSelecionada(\"1\")\r\n setModalFechada(true);\r\n } catch (error) {\r\n console.error(\"Erro\", error);\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n Gerar Pedido \r\n }\r\n cancelText={\r\n <> Cancelar \r\n }\r\n >\r\n
\r\n \r\n
\r\n \r\n \r\n {orcamento.orc_numero}\r\n \r\n \r\n {orcamento.pes_nome ? orcamento.pes_nome : orcamento.orc_nomecliente}\r\n \r\n \r\n {!!orcamento.pef_cpf ? formatarCpf(orcamento.pef_cpf) : orcamento.pej_cnpj ? formatarCnpj(orcamento.pej_cnpj) : \"Não Informado\"} \r\n \r\n \r\n {!!orcamento.orc_datainclusao ? moment(orcamento.orc_datainclusao).format('DD/MM/YYYY') : \"Não Informado\"}\r\n \r\n \r\n {!!orcamento.orc_datavalidade ? moment(orcamento.orc_datavalidade).format('DD/MM/YYYY') : \"Não Informado\"}\r\n \r\n \r\n {orcamento.ven_nome}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valorfrete, true)}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valoroutros, true)}\r\n \r\n \r\n {FormatNumber(orcamento.orc_valortotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n Selecione para Gerar Pedido\r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n setExibirDrawerPedidos(false)}/>\r\n \r\n );\r\n}","import React from 'react';\r\nimport { Modal, Spin, notification } from 'antd';\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nconst ModalCarregando = ({\r\n title,\r\n titleModalLoading = 'Atualizando...',\r\n confirmContent,\r\n apiCall,\r\n successMessage,\r\n errorMessage,\r\n successCallback,\r\n errorCallback,\r\n okText = 'Sim',\r\n cancelText = 'Não'\r\n}) => {\r\n const handleOk = () => {\r\n // Exibe uma modal de \"Atualizando...\"\r\n const loadingModal = Modal.info({\r\n title: titleModalLoading,\r\n content: (\r\n
\r\n \r\n

Por favor, aguarde enquanto a operação está sendo realizada.

\r\n
\r\n ),\r\n okButtonProps: { disabled: true },\r\n closable: false,\r\n centered: true,\r\n });\r\n\r\n // Chama a função de API\r\n apiCall()\r\n .then(() => {\r\n loadingModal.destroy();\r\n notification.success({\r\n message: 'Operação concluída',\r\n description: successMessage,\r\n });\r\n if (successCallback) successCallback();\r\n })\r\n .catch((error) => {\r\n loadingModal.destroy();\r\n notification.error({\r\n message: 'Erro na Atualização',\r\n description: `${errorMessage}: ${error.message}`,\r\n });\r\n if (errorCallback) errorCallback();\r\n });\r\n };\r\n\r\n // Chama Modal.confirm diretamente\r\n Modal.confirm({\r\n title: title,\r\n icon: ,\r\n content: confirmContent,\r\n okText: okText,\r\n cancelText: cancelText,\r\n centered: true,\r\n onOk: handleOk\r\n });\r\n\r\n return null; // Não renderiza nada, pois o Modal é mostrado via API\r\n};\r\n\r\nexport default ModalCarregando;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Table, Modal } from \"antd\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport moment from 'moment';\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\n\r\nexport default function ModalGradeEstoque({ dadosGrade, exibirModal, fecharModal }) {\r\n\r\n const [itensGrade, setItensGrade] = useState([]);\r\n const [itensProduto, setItensProduto] = useState({});\r\n\r\n useEffect(() => {\r\n if (!!dadosGrade?.pro_id) {\r\n setItensProduto(dadosGrade);\r\n api.get(`Estoque/ListaEstoqueGradesProdutos?CodigoProduto=${dadosGrade.pro_id}`).then(\r\n res => {\r\n let key = 0;\r\n res.data.forEach((produtoGrade) => {\r\n produtoGrade.key = key;\r\n key++;\r\n });\r\n setItensGrade(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n // Limpar itens se dadosGrade não estiver disponível\r\n setItensGrade([]);\r\n setItensProduto({});\r\n }\r\n }, [dadosGrade])\r\n\r\n function onClose() {\r\n fecharModal();\r\n }\r\n\r\n return (\r\n \r\n
\r\n Produto/Mercadoria: {itensProduto.pro_codigo} - {itensProduto.pro_descricao}\r\n
\r\n
(\r\n \r\n \r\n \r\n {ean}\r\n \r\n \r\n {atributos.map(atrib => (\r\n \r\n {atrib.mgp_descricao}\r\n \r\n ))}\r\n \r\n ),\r\n }, {\r\n title: 'Preço (R$)',\r\n align: 'right',\r\n render: ({ precoVenda }) => (\r\n
\r\n {FormatNumber(precoVenda, true)}\r\n
\r\n ),\r\n }, {\r\n title: 'Data Inicial',\r\n align: 'center',\r\n render: ({ dataPosicao }) => (\r\n
\r\n { dataPosicao }\r\n
\r\n )\r\n }, {\r\n title: 'Posição Inicial',\r\n align: 'center',\r\n render: ({ qtdeInicial }) => (\r\n
\r\n {qtdeInicial }\r\n
\r\n )\r\n }, {\r\n title: 'Estoque',\r\n align: 'center',\r\n render: ({ qtdEstoque }) => (\r\n
\r\n {qtdEstoque}\r\n
\r\n )\r\n }, {\r\n title: 'Pedido',\r\n align: 'center',\r\n render: ({ qtdPedido }) => (\r\n
\r\n {qtdPedido}\r\n
\r\n )\r\n }, {\r\n title: 'Condicional',\r\n align: 'center',\r\n render: ({ qtdCondicional }) => (\r\n
\r\n {qtdCondicional}\r\n
\r\n )\r\n }, {\r\n title: 'Previsão',\r\n align: 'center',\r\n render: ({ qtdPrevisao }) => (\r\n
\r\n \r\n {qtdPrevisao}\r\n \r\n
\r\n )\r\n }\r\n ]} dataSource={itensGrade} />\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Checkbox, Modal, Table, Descriptions, Button } from \"antd\";\r\nimport { ExclamationCircleOutlined, PlusOutlined, CloseOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../../state\";\r\nimport moment from \"moment\";\r\n\r\nexport default function ModalConsultaProtocoloMdfe({ dadosMdfe, exibirModalConsultaSit, fecharModalConsultaSit }) {\r\n\r\n const [listaProcEvento, setListaProcEvento] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dadosMdfe.retorno) {\r\n setListaProcEvento(dadosMdfe.retorno.procEventoMDFe);\r\n }\r\n }, [dadosMdfe]);\r\n\r\n\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharModalConsultaSit();\r\n }\r\n });\r\n };\r\n\r\n\r\n return (\r\n \r\n Fechar\r\n ,\r\n ]}\r\n maskClosable={false}\r\n destroyOnClose\r\n >\r\n
\r\n \r\n \r\n {dadosMdfe.retorno?.protMDFe.infProt.chMDFe}\r\n \r\n \r\n \r\n \r\n {dadosMdfe.retorno?.protMDFe.infProt.cStat + \" - \" + dadosMdfe.retorno?.protMDFe.infProt.xMotivo}\r\n \r\n \r\n \r\n \r\n {moment(dadosMdfe.retorno?.protMDFe.infProt.dhRecbto).format('DD/MM/YYYY HH:mm:ss')}\r\n \r\n \r\n \r\n
\r\n (\r\n
\r\n {eventoMDFe.infEvento.nSeqEvento}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Data Hora',\r\n align: 'center',\r\n width: \"15%\",\r\n render: ({ eventoMDFe }) => (\r\n
\r\n {moment(eventoMDFe.infEvento.dhEvento).format('DD/MM/YYYY HH:mm:ss')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Evento',\r\n align: 'left',\r\n width: \"30%\",\r\n render: ({ retEventoMDFe }) => (\r\n
\r\n {retEventoMDFe.infEvento.tpEvento + \" - \" + retEventoMDFe.infEvento.xEvento}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Protocolo',\r\n align: 'left',\r\n width: \"15%\",\r\n render: ({ retEventoMDFe }) => (\r\n
\r\n {retEventoMDFe.infEvento.nProt}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Status',\r\n align: 'left',\r\n width: \"30%\",\r\n render: ({ retEventoMDFe }) => (\r\n
\r\n {retEventoMDFe.infEvento.cStat + \" - \" + retEventoMDFe.infEvento.xMotivo}\r\n
\r\n )\r\n },\r\n ]}\r\n dataSource={listaProcEvento}\r\n pagination={false}\r\n />\r\n
\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Button, Modal, Table, notification, Divider } from \"antd\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment, { now } from 'moment';\r\n\r\nimport { FaWhatsapp } from 'react-icons/fa';\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { FormatNumber, FormatFone } from \"../../../ValueObjects\";\r\nimport { formatarCpf, isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport ModalImagemQr from \"../modalImagemQr\";\r\n\r\nexport default function ModalEnvioBolWhats({ exibirModalEnvioBolWhats, parametrosWhats, fecharModalEnvioBolWhats }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [listaWhats, setListaWhats] = useState([]);\r\n const [form] = Form.useForm();\r\n const [modeloDoc, setModeloDoc] = useState();\r\n const [base64Image, setBase64Image] = useState('');\r\n const [conectado, setConectado] = useState(false);\r\n const [exibirQr, setExibirQR] = useState(false);\r\n const [temporizador, setTemporizador] = useState(60);\r\n\r\n useEffect(() => {\r\n if (parametrosWhats && isObjetoDiffVazio(parametrosWhats)) {\r\n retornaDadosCliente(parametrosWhats.pes_id);\r\n setDadosNota(parametrosWhats);\r\n if (parametrosWhats.ntf_chavenfe?.length >= 22) {\r\n setModeloDoc(parametrosWhats.ntf_chavenfe.substring(20, 22));\r\n }\r\n conectar();\r\n }\r\n }, [parametrosWhats]);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaWhats(null);\r\n form.resetFields();\r\n fecharModalEnvioBolWhats();\r\n }\r\n });\r\n };\r\n\r\n const onCloseModalQr = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setExibirQR(false);\r\n setTemporizador(temporizador);\r\n\r\n }\r\n });\r\n };\r\n\r\n async function enviarWhats() {\r\n let dados = {};\r\n let numero = [];\r\n listaWhats.forEach((Whats) => {\r\n numero.push(Whats.dest);\r\n })\r\n dados.ntf_id = dadosNota.ntf_id;\r\n dados.chaveNFe = dadosNota.ntf_chavenfe;\r\n dados.numeroDestinatarios = numero;\r\n let whats = {\r\n Id: dadosNota.ntf_id,\r\n ChaveAcesso: dadosNota.ntf_chavenfe,\r\n numerosReceptor: numero,\r\n enviaBoleto: true,\r\n //extensao: 'pdf',\r\n mensagem: form.getFieldValue().mensagem\r\n };\r\n /// numero da empresa deve ser um numero com codigo de area mais numero de telefone com 8 digitos\r\n if (conectado === true && (!!!numero || numero.length > 0)) {\r\n enviarDados(whats);\r\n }\r\n else if (!numero || numero.length === 0 && conectado === false) {\r\n notification.Alert({ description: 'Adicione um ou mais numeros de remetente!', message: 'Aviso' });\r\n return;\r\n }\r\n else if (conectado === false && !!!numero || numero.length > 0) {\r\n gerarQRCode(whats);\r\n }\r\n }\r\n\r\n async function gerarQRCode(whats) {\r\n let base64 = (await api.get(`WhatsApp/GeraQrCodeWhats`)).data;\r\n setExibirQR(true);\r\n setBase64Image(base64);\r\n verificarConexao(whats);\r\n }\r\n\r\n async function conectar() {\r\n let conectar = (await api.get('WhatsApp/WhatsConectado')).data;\r\n setConectado(conectar);\r\n return conectar;\r\n }\r\n\r\n async function verificarConexao(whats) {\r\n const timeout = Date.now() + (temporizador * 1000);\r\n while (Date.now() < timeout) {\r\n let status = await conectar();\r\n if (status === true) {\r\n setExibirQR(false);\r\n console.log(\"Conectado!\");\r\n enviarDados(whats);\r\n notification.success({ description: 'Conectado!', message: 'Aviso' });\r\n return;\r\n }\r\n await new Promise((resolve) => setTimeout(resolve, 4500));\r\n }\r\n gerarQRCode();\r\n }\r\n\r\n async function enviarDados(whats) {\r\n var url = \"NotaFiscal/EnviarWhats\";\r\n api.post(url, whats).then(\r\n (res) => {\r\n notification.success({ description: 'Nota enviada com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModalEnvioBolWhats()\r\n }\r\n );\r\n form.resetFields();\r\n }\r\n\r\n async function retornaDadosCliente(dados) {\r\n if (!!dados) {\r\n let lista = [];\r\n let clienteTelefone = (await api.get(`PessoaTelefone/ListaTelefone?IdPessoa=` + dados)).data;\r\n if (!!clienteTelefone) {\r\n let telefoneWhats = clienteTelefone.filter(telefone => telefone.psc_whatsapp === true);\r\n telefoneWhats.forEach((telefone, index) => {\r\n if (telefone.psc_numero) {\r\n lista.push({ id: index, dest: telefone.psc_numero });\r\n }\r\n });\r\n }\r\n setListaWhats(lista);\r\n }\r\n }\r\n\r\n function adicionarWhats() {\r\n let numero = form.getFieldValue().numeroWhats;\r\n if (!!numero) {\r\n let lista = [...listaWhats];\r\n lista.push({ id: lista.length, dest: numero });\r\n setListaWhats(lista);\r\n form.setFieldsValue({ numeroWhats: null });\r\n }\r\n };\r\n\r\n function excluirWhats(record) {\r\n let listaE = [...listaWhats];\r\n let WhatsLista = listaE.filter((lista) => (lista.id !== record.id));\r\n setListaWhats(WhatsLista);\r\n };\r\n\r\n return (\r\n \r\n Enviar WhatsApp\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n {!!dadosNota.ntf_dataemissao ? moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.valortotalnota ? FormatNumber(dadosNota.valortotalnota, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_nomedest}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.bol_cpfcnpjsacado ? formatarCpf(dadosNota.bol_cpfcnpjsacado) : ''}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {FormatFone(dest)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n width={305} // Define a largura do modal (padrão é 520px)\r\n bodyStyle={{ height: \"320px\" }} // Define a altura do corpo do modal\r\n >\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Button, Modal, Table, notification, Divider } from \"antd\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment, { now } from 'moment';\r\n\r\nimport { FaWhatsapp } from 'react-icons/fa';\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { FormatNumber, FormatFone } from \"../../../ValueObjects\";\r\nimport { formatarCpf, isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport ModalImagemQr from \"../modalImagemQr\";\r\n\r\nexport default function ModalEnvioOrcamentoWhats({ exibirModalEnvioOrcamentoWhats, fecharModalEnvioOrcamentoWhats }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosOrcamento, setDadosOrcamento] = useState({});\r\n const [listaWhats, setListaWhats] = useState([]);\r\n const [form] = Form.useForm();\r\n const [base64Image, setBase64Image] = useState('');\r\n const [conectado, setConectado] = useState(false);\r\n const [exibirQr, setExibirQR] = useState(false);\r\n const [temporizador, setTemporizador] = useState(60);\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n retornaDadosCliente(manutencao.dados);\r\n setDadosOrcamento(manutencao.dados);\r\n conectar();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() =>\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaWhats(null);\r\n form.resetFields();\r\n fecharModalEnvioOrcamentoWhats();\r\n }\r\n });\r\n };\r\n\r\n const onCloseModalQr = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setExibirQR(false);\r\n setTemporizador(temporizador);\r\n\r\n }\r\n });\r\n };\r\n\r\n async function enviarWhats() {\r\n let dados = {};\r\n let numero = [];\r\n listaWhats.forEach((Whats) => {\r\n numero.push(Whats.dest);\r\n })\r\n dados.orc_id = dadosOrcamento.orc_id;\r\n dados.numeroDestinatarios = numero;\r\n let whats = {\r\n Id: dadosOrcamento.orc_id,\r\n numerosReceptor: numero,\r\n //extensao: 'pdf', //podera ser utilizado no futuro para enviar o arquivo em formatos alem de pdf\r\n mensagem: form.getFieldValue().mensagem\r\n };\r\n /// numero da empresa deve ser um numero com codigo de area mais numero de telefone com 8 digitos\r\n if (conectado === true && (!!!numero || numero.length > 0)) {\r\n enviarDados(whats);\r\n }\r\n else if (!numero || numero.length === 0 && conectado === false) {\r\n notification.Alert({ description: 'Adicione um ou mais numeros de remetente!', message: 'Aviso' });\r\n return;\r\n }\r\n else if (conectado === false && !!!numero || numero.length > 0) {\r\n gerarQRCode(whats);\r\n }\r\n }\r\n\r\n async function gerarQRCode(whats) {\r\n let base64 = (await api.get(`WhatsApp/GeraQrCodeWhats`)).data; // Pode passar qualquer string aqui\r\n setExibirQR(true);\r\n setBase64Image(base64); // Atualiza o estado com o QR Code\r\n verificarConexao(whats);\r\n }\r\n\r\n async function conectar() {\r\n let conectar = (await api.get('WhatsApp/WhatsConectado')).data;\r\n setConectado(conectar);\r\n return conectar;\r\n }\r\n\r\n async function verificarConexao(whats) {\r\n const timeout = Date.now() + (temporizador * 1000); // Define o tempo limite em segundos\r\n while (Date.now() < timeout) {\r\n let status = await conectar();\r\n if (status === true) {\r\n setExibirQR(false);\r\n console.log(\"Conectado!\");\r\n enviarDados(whats);\r\n notification.success({ description: 'Conectado!', message: 'Aviso' });\r\n return;\r\n }\r\n await new Promise((resolve) => setTimeout(resolve, 4500)); // Aguarda 4,5s antes de tentar novamente\r\n }\r\n gerarQRCode(); // Chama a função para gerar um novo QR Code\r\n }\r\n\r\n\r\n async function enviarDados(whats) {\r\n var url = \"Orcamento/EnviarWhats\";\r\n api.post(url, whats).then(\r\n (res) => {\r\n notification.success({ description: 'Orçamento enviada com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharModalEnvioOrcamentoWhats()\r\n }\r\n );\r\n form.resetFields();\r\n }\r\n\r\n async function retornaDadosCliente(dados) {\r\n if (!!dados) {\r\n //let clienteTelefone = (await api.get(`PessoaTelefone/ListaTelefone?IdPessoa=` + dados)).data;\r\n //let telefoneWhats = clienteTelefone.find(telefone => telefone.psc_whatsapp === true);\r\n let lista = [];\r\n if (dados?.orc_numerotelefone !== null && dados?.orc_numerotelefone !== undefined) {\r\n lista.push({ id: lista.length, dest: dados?.orc_numerotelefone });\r\n }\r\n setListaWhats(lista);\r\n }\r\n }\r\n\r\n function adicionarWhats() {\r\n let numero = form.getFieldValue().numeroWhats;\r\n if (!!numero) {\r\n let lista = [...listaWhats];\r\n lista.push({ id: lista.length, dest: numero });\r\n setListaWhats(lista);\r\n form.setFieldsValue({ numeroWhats: null });\r\n }\r\n };\r\n\r\n function excluirWhats(record) {\r\n let listaE = [...listaWhats];\r\n let WhatsLista = listaE.filter((lista) => (lista.id !== record.id));\r\n setListaWhats(WhatsLista);\r\n };\r\n\r\n return (\r\n \r\n Enviar WhatsApp\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosOrcamento.orc_numero}\r\n \r\n \r\n \r\n \r\n {!!dadosOrcamento.orc_datainclusao ? moment(dadosOrcamento.orc_datainclusao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosOrcamento.orc_valortotal ? FormatNumber(dadosOrcamento.orc_valortotal, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosOrcamento.orc_nomecliente}\r\n \r\n \r\n \r\n \r\n {!!dadosOrcamento.pej_cnpj ? formatarCpf(dadosOrcamento.pej_cnpj) : ( !!dadosOrcamento.pej_cpf ? formatarCpf(dadosOrcamento.pej_cpf) : '')}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {FormatFone(dest)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n width={305} // Define a largura do modal (padrão é 520px)\r\n bodyStyle={{ height: \"320px\" }} // Define a altura do corpo do modal\r\n >\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Descriptions, Form, Input, Button, Modal, Table, notification, Divider } from \"antd\";\r\nimport { DeleteOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment, { now } from 'moment';\r\n\r\nimport { FaWhatsapp } from 'react-icons/fa';\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { FormatNumber, FormatFone } from \"../../../ValueObjects\";\r\nimport { formatarCpf, isObjetoDiffVazio, decodeBase64 } from \"../../../services/funcoes\";\r\nimport ModalImagemQr from \"../modalImagemQr\";\r\nimport { getEmpresa, getIdUsuario, getLocal } from \"../../../services/auth\";\r\n\r\nexport default function ModalEnvioPedidoWhats({ exibirPedidoWhats, fecharPedidoWhats }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosPedido, setDadosPedido] = useState({});\r\n const [listaWhats, setListaWhats] = useState([]);\r\n const [form] = Form.useForm();\r\n const [base64Image, setBase64Image] = useState('');\r\n const [conectado, setConectado] = useState(false);\r\n const [exibirQr, setExibirQR] = useState(false);\r\n const [temporizador, setTemporizador] = useState(60);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n retornaDadosCliente(manutencao.dados);\r\n setDadosPedido(manutencao.dados);\r\n conectar();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() =>\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaWhats(null);\r\n form.resetFields();\r\n fecharPedidoWhats();\r\n }\r\n });\r\n };\r\n\r\n const onCloseModalQr = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setExibirQR(false);\r\n setTemporizador(temporizador);\r\n\r\n }\r\n });\r\n };\r\n\r\n async function enviarWhats() {\r\n let dados = {};\r\n let numero = [];\r\n listaWhats.forEach((Whats) => {\r\n numero.push(Whats.dest);\r\n })\r\n dados.orc_id = dadosPedido.ped_id;\r\n dados.numeroDestinatarios = numero;\r\n let whats = {\r\n Id: dadosPedido.ped_id,\r\n numerosReceptor: numero,\r\n documento: null,\r\n //extensao: 'pdf', //podera ser utilizado no futuro para enviar o arquivo em formatos alem de pdf\r\n mensagem: form.getFieldValue().mensagem\r\n };\r\n /// numero da empresa deve ser um numero com codigo de area mais numero de telefone com 8 digitos\r\n if (conectado === true && (!!!numero || numero.length > 0)) {\r\n enviarDados(whats);\r\n }\r\n else if (!numero || numero.length === 0 && conectado === false) {\r\n notification.Alert({ description: 'Adicione um ou mais numeros de remetente!', message: 'Aviso' });\r\n return;\r\n }\r\n else if (conectado === false && !!!numero || numero.length > 0) {\r\n gerarQRCode(whats);\r\n }\r\n }\r\n\r\n async function gerarQRCode(whats) {\r\n let base64 = (await api.get(`WhatsApp/GeraQrCodeWhats`)).data; // Pode passar qualquer string aqui\r\n setExibirQR(true);\r\n setBase64Image(base64); // Atualiza o estado com o QR Code\r\n verificarConexao(whats);\r\n }\r\n\r\n async function conectar() {\r\n let conectar = (await api.get('WhatsApp/WhatsConectado')).data;\r\n setConectado(conectar);\r\n return conectar;\r\n }\r\n\r\n async function verificarConexao(whats) {\r\n const timeout = Date.now() + (temporizador * 1000); // Define o tempo limite em segundos\r\n while (Date.now() < timeout) {\r\n let status = await conectar();\r\n if (status === true) {\r\n setExibirQR(false);\r\n console.log(\"Conectado!\");\r\n enviarDados(whats);\r\n notification.success({ description: 'Conectado!', message: 'Aviso' });\r\n return;\r\n }\r\n await new Promise((resolve) => setTimeout(resolve, 4500)); // Aguarda 4,5s antes de tentar novamente\r\n }\r\n gerarQRCode(); // Chama a função para gerar um novo QR Code\r\n }\r\n\r\n\r\n async function enviarDados(whats) {\r\n var url = \"Pedido/EnviarWhats\";\r\n api.post(url, whats).then(\r\n (res) => {\r\n notification.success({ description: 'Orçamento enviado com sucesso!', message: 'Aviso' });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n fecharPedidoWhats()\r\n }\r\n );\r\n form.resetFields();\r\n }\r\n\r\n async function retornaDadosCliente(dados) {\r\n if (!!dados) {\r\n let lista = [];\r\n let clienteTelefone = (await api.get(`PessoaTelefone/ListaTelefone?IdPessoa=` + dados.pes_id)).data;\r\n if (!!clienteTelefone) {\r\n let telefoneWhats = clienteTelefone.filter(telefone => telefone.psc_whatsapp === true);\r\n // Adiciona todos os telefones filtrados à lista\r\n telefoneWhats.forEach((telefone, index) => {\r\n if (telefone.psc_numero) { // Verifica se o número não é null ou undefined\r\n lista.push({ id: index, dest: telefone.psc_numero });\r\n }\r\n });\r\n }\r\n setListaWhats(lista);\r\n }\r\n }\r\n\r\n function adicionarWhats() {\r\n let numero = form.getFieldValue().numeroWhats;\r\n if (!!numero) {\r\n let lista = [...listaWhats];\r\n lista.push({ id: lista.length, dest: numero });\r\n setListaWhats(lista);\r\n form.setFieldsValue({ numeroWhats: null });\r\n }\r\n };\r\n\r\n function excluirWhats(record) {\r\n let listaE = [...listaWhats];\r\n let WhatsLista = listaE.filter((lista) => (lista.id !== record.id));\r\n setListaWhats(WhatsLista);\r\n };\r\n\r\n return (\r\n \r\n Enviar WhatsApp\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosPedido.ped_numero}\r\n \r\n \r\n \r\n \r\n {!!dadosPedido.ped_datainclusao ? moment(dadosPedido.ped_datainclusao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosPedido.ped_valortotal ? FormatNumber(dadosPedido.ped_valortotal, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosPedido.pes_nome}\r\n \r\n \r\n \r\n \r\n {!!dadosPedido.pej_cnpj ? formatarCpf(dadosPedido.pej_cnpj) : (!!dadosPedido.pef_cpf ? formatarCpf(dadosPedido.pef_cpf) : '')}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {FormatFone(dest)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n ]}\r\n width={305} // Define a largura do modal (padrão é 520px)\r\n bodyStyle={{ height: \"320px\" }} // Define a altura do corpo do modal\r\n >\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Descriptions, Form, Modal, Table, notification, Tag } from \"antd\";\r\nimport { ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment, { now } from 'moment';\r\n\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatNumber } from \"../../../ValueObjects\";\r\nimport Data from \"../../data\";\r\nimport api from \"../../../services/api\";\r\nimport { InputPreco } from \"../../../components\";\r\nimport { isObjetoDiffVazio, formatarCpf } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalEditarBoleto({ exibirModalEditarBoleto, fecharModalEditarBoleto, forma }) {\r\n\r\n const [{ manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [form] = Form.useForm();\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [totalParcelas, setTotalParcelas] = useState(0);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n setTotalParcelas(manutencao.dados.length);\r\n setEditandoParcelas(true);\r\n setDadosNota(manutencao.dados[0]);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n const onCloseModal = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n form.resetFields();\r\n fecharModalEditarBoleto();\r\n }\r\n });\r\n };\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas, record) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(record.nfp_valor);\r\n let dados = form.getFieldValue();\r\n let boleto = manutencao.dados.find(item => item.bol_id === record.bol_id);\r\n boleto.bol_valor = parseFloat(dados[`bol_valor${numeroParc}`]);\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`bol_valor${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`bol_valor${i}`]: valorParcelas });\r\n manutencao.dados[i - 1].bol_valor = valorParcelas;\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`bol_valor${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n };\r\n\r\n function ajustarDataParcelas(numeroParc, record) {\r\n let dataAtual = new Date(form.getFieldValue([`bol_datavencimento${numeroParc}`]).toDate());\r\n let dias = moment(dataAtual, 'YYYY-MM-DD').diff(moment(record.bol_dataemissao, 'YYYY-MM-DD'), 'days');\r\n let boleto = manutencao.dados.find(item => item.bol_id === record.bol_id);\r\n boleto.bol_datavencimento = dataAtual;\r\n if (dias > 5) {\r\n manutencao.dados\r\n .filter(item => item.prc_numeroparcela >= numeroParc)\r\n .forEach((parcela, index) => {\r\n let dataVenc = moment(dataAtual).add(30 * index, 'days').toDate();\r\n form.setFieldsValue({ [`bol_datavencimento${parcela.prc_numeroparcela}`]: moment(dataVenc) });\r\n parcela.bol_datavencimento = dataVenc;\r\n });\r\n } else {\r\n notification.error({\r\n message: 'Data Inválida',\r\n description: 'A data de vencimento deve ser maior que a data de emissão em pelo menos 5 dias.',\r\n });\r\n form.setFieldsValue({ [`bol_datavencimento${numeroParc}`]: null });\r\n }\r\n }\r\n\r\n async function salvarParcelas() {\r\n let boleto = [];\r\n let dados = {};\r\n manutencao.dados.forEach(item => {\r\n\r\n boleto.unshift({\r\n bol_id: item.bol_id,\r\n bol_datavencimento: item.bol_datavencimento,\r\n bol_valor: item.bol_valor,\r\n ntf_id: item.ntf_id\r\n });\r\n });\r\n api.put(`Boleto/EditarBoleto`, boleto).then(\r\n res => {\r\n notification.success({ message: `Sucesso!`, description: `Boleto/Parcela alterada com Sucesso!` });\r\n fecharModalEditarBoleto();\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n \r\n Salvar\r\n \r\n }\r\n cancelText={\r\n <>\r\n Cancelar\r\n \r\n }\r\n maskClosable={false}\r\n >\r\n
\r\n
\r\n \r\n \r\n {dadosNota.ntf_numero}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.bol_dataemissao ? moment(dadosNota.bol_dataemissao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.nfp_valor ? FormatNumber(dadosNota.nfp_valor, true) : null}\r\n \r\n \r\n \r\n \r\n {dadosNota.pes_nome}\r\n \r\n \r\n \r\n \r\n {!!dadosNota.bol_cpfcnpjsacado ? formatarCpf(dadosNota.bol_cpfcnpjsacado) : ''}\r\n \r\n \r\n
\r\n
\r\n
\r\n
(\r\n {bol_numerodocumento}\r\n ),\r\n },\r\n {\r\n title: 'Data Pagamento',\r\n render: ({ bol_datavencimento, prc_numeroparcela }, record) => (\r\n
\r\n {editandoParcelas ? { ajustarDataParcelas(prc_numeroparcela, record) }} /> : {moment(bol_datavencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ bol_valor, prc_numeroparcela }, record) => (\r\n
\r\n { onChangeValorParc(prc_numeroparcela, totalParcelas, record) }}\r\n\r\n\r\n />\r\n
\r\n )\r\n }\r\n ]} \r\n //dataSource={manutencao.dados} \r\n dataSource={(manutencao.dados || []).sort((a, b) => a.prc_numeroparcela - b.prc_numeroparcela)} // 🔹 Garantindo ordenação inicial\r\n pagination={false}\r\n />\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Modal, Table, Divider, Button, Tooltip, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined, PrinterOutlined, CheckOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport { isObjetoDiffVazio } from \"../../../services/funcoes\";\r\nimport { imprimirRelatorioJasper } from \"../../../services/funcoes\";\r\n\r\nexport default function ModalSelecionaRelatorio({ exibirModal, fecharModal }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaRelatorio, setListaRelatorio] = useState([]);\r\n const [parametrosImpresao, setParametrosImpresao] = useState();\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && isObjetoDiffVazio(manutencao.dados)) {\r\n setParametrosImpresao(manutencao.dados.parametrosImpresao);\r\n retornaRelatorios(manutencao.dados);\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+dest' } }), []);\r\n\r\n function retornaRelatorios(dados) {\r\n let filtro = [];\r\n filtro = !!dados.grj_id ? `CodigoGrupo=${dados.grj_id}` : '';\r\n filtro += `&MostrarList=false`;\r\n api.get(`RelatorioJasper/Listar?${filtro}`).then((res) => {\r\n if (res.status === 200) {\r\n setListaRelatorio(res.data.items);\r\n }\r\n }).catch(err => {\r\n console.log(err);\r\n });\r\n }\r\n\r\n function imprimirPedido(record) {\r\n //chama o relatorio de pedido\r\n imprimirRelatorioJasper(record.rel_id, parametrosImpresao);\r\n //imprimirRelatorioJasper(29, { idPedido: record.ped_id });\r\n fecharModal();\r\n };\r\n\r\n function DefinirComoPadrão(record) {\r\n Modal.confirm({\r\n title: \"Confirmar ação\",\r\n content: \"Tem certeza de que deseja definir este relatório como padrão?\",\r\n okText: \"Sim\",\r\n cancelText: \"Não\",\r\n onOk: () => {\r\n let valores = { ...manutencao.dados.parametrosLocal };\r\n valores.par_relatorioPedido = record.rel_id;\r\n \r\n if (record.grj_id === 10) { // Corrigido o erro de atribuição\r\n let dados = { ...valores };\r\n \r\n api.put('ParametroLocal/Editar', dados)\r\n .then(() => {\r\n notification.success({\r\n message: 'Operação concluída',\r\n description: \"Parâmetros do Local salvos com sucesso!\"\r\n });\r\n imprimirPedido(record);\r\n fecharModal(); // Fecha a modal apenas se a operação for bem-sucedida\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n notification.error({\r\n message: \"Erro\",\r\n description: \"Ocorreu um erro ao salvar os parâmetros.\"\r\n });\r\n });\r\n }\r\n },\r\n onCancel: () => {\r\n console.log(\"Usuário cancelou a ação\");\r\n }\r\n });\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n
(\r\n
\r\n {rel_id}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Nome Relatório',\r\n width: '30%',\r\n render: ({ rel_nome }) => (\r\n
\r\n {rel_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n width: '50%',\r\n render: ({ rel_descricao }) => (\r\n
\r\n {rel_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: '9%',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {/* Tooltip faz aparecer titulo ao colcoar mouse em cima do icone */}\r\n \r\n }\r\n onClick={() => DefinirComoPadrão(record)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n }\r\n onClick={() => imprimirPedido(record)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ]} dataSource={listaRelatorio} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} />\r\n \r\n \r\n \r\n );\r\n}","import EventEmitter from 'eventemitter3';\r\n\r\nconst eventEmitter = new EventEmitter();\r\n\r\nconst Emitter = {\r\n on: (event, fn) => eventEmitter.on(event, fn),\r\n once: (event, fn) => eventEmitter.once(event, fn),\r\n off: (event, fn) => eventEmitter.off(event, fn),\r\n emit: (event, payload) => eventEmitter.emit(event, payload)\r\n}\r\n\r\nObject.freeze(Emitter);\r\n\r\nexport default Emitter;","export default __webpack_public_path__ + \"static/media/i-info.62c0263c.png\";","export default function maskFormat(data, text, cpfCnpj = false) {\r\n if (!data) {\r\n return;\r\n }\r\n\r\n // if (cpfCnpj) {\r\n // if (data.toString().length > 11) {\r\n // text = '00.000.000/0000-00';\r\n // } else {\r\n // text = '000.000.000-00';\r\n // }\r\n // }\r\n\r\n if (cpfCnpj) {\r\n if (data.length > 11) {\r\n text = '00.000.000/0000-00';\r\n } else {\r\n text = '000.000.000-00';\r\n }\r\n } \r\n\r\n let onlyNumbers = data.replace(/[^0-9]/g, '');\r\n if (onlyNumbers === '') {\r\n return;\r\n } else {\r\n let result = '';\r\n let format = text.split('');\r\n let numbers = onlyNumbers.split('');\r\n let item = '';\r\n let index = 0;\r\n for (var i in numbers) {\r\n let num = numbers[i];\r\n if (!!format[index]) {\r\n let caracter = format[index];\r\n while (caracter !== '0') {\r\n item = item + caracter;\r\n index++;\r\n caracter = format[index];\r\n }\r\n item = item + num;\r\n index++;\r\n } else {\r\n return;\r\n }\r\n result = item.replace('*', ' ');\r\n if (format.length === result.length) {\r\n return result;\r\n }\r\n }\r\n }\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport api from \"../../../services/api\";\r\nimport { getClienteCat } from \"../../../services/auth\";\r\nimport { Table, TableBody, TableCell, TableRow } from \"@material-ui/core\";\r\nimport { Button, Modal } from \"antd\";\r\nimport formatNumber from \"../../../ValueObjects/formatNumber\";\r\nimport { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, ShoppingOutlined } from \"@ant-design/icons\";\r\nimport { initDatabase, saveShoppingCart } from \"../../../services/CarrinhoDB\";\r\nimport { useHistory } from 'react-router-dom';\r\nimport { exibirMensagemException } from \"../../../services/funcoes\";\r\n\r\n\r\nexport default function ModalDadosPecas({ exibirModal, fecharModal, codigoPeca }) {\r\n const [dadosPeca, setDadosPeca] = useState({});\r\n const [dadosTabela, setDadosTabela] = useState([]);\r\n const [valorFinal, setValorFinal] = useState(\"\");\r\n const history = useHistory();\r\n const listaShoppingCart = [];\r\n\r\n useEffect(() => {\r\n initDatabase();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (exibirModal && !!codigoPeca) {\r\n buscarDados();\r\n }\r\n }, [exibirModal]);\r\n\r\n const onCloseModal = () => {\r\n fecharModal()\r\n };\r\n\r\n function buscarDados() {\r\n api.get(`Cat007/BuscarInfoPeca?empresa=1&codCliente=${getClienteCat()}&codPeca=${codigoPeca}`).then(\r\n res => {\r\n let dados = { ...res.data };\r\n let listaDadosTab = [\r\n createData(\"Preço Lista:\", \"R$ \" + formatNumber(!!dados.precoLista ? dados.precoLista : 0, true), \"\"),\r\n createData(\"(%) Desconto:\", formatNumber(!!dados.percDescCli ? dados.percDescCli : 0, true), \"\"),\r\n createData(\"Preço Líquido: \", \"R$ \" + formatNumber(!!dados.valorLiquido ? dados.valorLiquido : 0, true), \"\"),\r\n createData(\"(%) IPI: \", formatNumber(!!dados.percIpi ? dados.percIpi : 0, true) + \" (R$ \" + formatNumber(!!dados.valIpi ? dados.valIpi : 0, true) + \")\", \"\"),\r\n createData(\"% MVA: \", formatNumber(!!dados.perMva ? dados.perMva : 0, false), \"\"),\r\n createData(\"% ICMS: \", formatNumber(!!dados.percIcms ? dados.percIcms : 0, false) + \" (R$ \" + formatNumber(!!dados.valIcms ? dados.valIcms : 0, true) + \")\", \"\"),\r\n createData(\"% Red Base de Calculo ICMS: \", formatNumber(!!dados.percRedBaseCalcST ? dados.percRedBaseCalcST : 0, true), \"\"),\r\n createData(\"Base Cálculo ICMS ST: \", formatNumber(!!dados.baseCalcST ? dados.baseCalcST : 0, false), \"\"),\r\n createData(\"Valor do ICMS ST: \", \"R$ \" + formatNumber(!!dados.valST ? dados.valST : 0, true), \"\"),\r\n createData(\"Preço Final: \", \"R$ \" + formatNumber(!!dados.precoFinal ? dados.precoFinal : 0, true), \"\"),\r\n createData(\"Estoque: \", dados.estoque > 0 ? \"ITEM DISPONÍVEL\" : \"ITEM EM PRODUÇÃO\", dados.estoque > 0 ? \"txtEstoqueAzul\" : \"txtEstoqueVermelho\")\r\n ];\r\n setDadosTabela(listaDadosTab);\r\n setDadosPeca(dados);\r\n\r\n listaDadosTab.forEach(function (dado) {\r\n if (dado.name === \"Preço Final: \") {\r\n setValorFinal(dado.value);\r\n return;\r\n }\r\n });\r\n }\r\n ).catch(err => {\r\n exibirMensagemException(err);\r\n fecharModal();\r\n })\r\n };\r\n\r\n function createData(name, value, style) {\r\n return { name, value, style }\r\n };\r\n\r\n function addShoppingCart(codigoPeca, descricaoPeca, qtd, valorPeca) {\r\n valorPeca = valorPeca.replace(/[^\\d.,]/g, \"\");\r\n valorPeca = valorPeca.replace('.', '').replace(',', '.');\r\n const valor = parseFloat(valorPeca);\r\n\r\n saveShoppingCart(codigoPeca, descricaoPeca, qtd, valor)\r\n .then(() => {\r\n onCloseModal();\r\n Modal.confirm({\r\n title: 'Sucesso',\r\n icon: ,\r\n content: 'Item adicionado ao orçamento com sucesso.',\r\n okText: 'Orçamento',\r\n cancelText: 'Voltar',\r\n centered: true,\r\n onOk() {\r\n history.replace('/carrinhoCatalogo')\r\n }\r\n });\r\n })\r\n .catch((error) => {\r\n onCloseModal();\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Erro ao adicionar item ao carrinho',\r\n okText: 'OK',\r\n centered: true\r\n })\r\n })\r\n }\r\n\r\n return (\r\n
\r\n

Código da peça: {dadosPeca.codPeca}

\r\n

Código Alternativo: {dadosPeca.codigoAlternativo}

\r\n

Descrição: {dadosPeca.descricao}

\r\n

Modelos/Inf Adicionais: {dadosPeca.infAdicional}

\r\n
\r\n
\r\n

Unidade de Medida: {dadosPeca.unidadeMedida}

\r\n

Qtde da Embalagem: {dadosPeca.quantidade}

\r\n

Peso: {formatNumber(!!dadosPeca.peso ? dadosPeca.peso : 0, true, 2)}

\r\n

NCM: {dadosPeca.ncm}

\r\n
\r\n
\r\n \r\n {dadosTabela.map((row) => (\r\n \r\n {row.name}\r\n {row.value}\r\n \r\n ))}\r\n \r\n\r\n
\r\n
\r\n

Informações Cliente: {dadosPeca.infoCliente}

\r\n

Cidade: {dadosPeca.clienteCidade}

\r\n

CEP: {dadosPeca.clienteCep} UF: {dadosPeca.clienteUF}

\r\n
\r\n
\r\n \r\n \r\n
\r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, InputNumber, Card, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { validarNumeros } from \"../../services/funcoes\";\r\nimport { FormasPagamento, InputPreco } from \"../../components\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport { isObjetoDiffVazio, calculaValorProporcional } from \"../../services/funcoes\";\r\n\r\nexport default function TabFaturamento({ form, dadosItens, dadosVendedor, dadosOperacao }) {\r\n\r\n const [valorNota, setValorNota] = useState(0);\r\n const [valorTotalSt, setvalorTotalSt] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState(!!manutencao.dados && !!manutencao.dados.faturamento && manutencao.dados.faturamento.length > 0 ? manutencao.dados.faturamento : [])\r\n const [controlModal, setControlModal] = useState(false);\r\n\r\n useEffect(() => {\r\n rateios();\r\n calcularFaturamento();\r\n }, [manutencao.dados])\r\n\r\n function calcularFaturamento() {\r\n let formulario = form.getFieldValue();\r\n let subTotal = 0;\r\n dadosItens.forEach((item) => {\r\n subTotal += item.total;\r\n });\r\n form.setFieldsValue({ subTotalNotaFiscal: subTotal });\r\n form.setFieldsValue({ valorFrete: validarNumeros(formulario.valorFrete) });\r\n form.setFieldsValue({ valorSeguro: validarNumeros(formulario.valorSeguro) });\r\n setvalorTotalSt(formulario.valorTotalSt)\r\n setValorNota(parseFloat(subTotal) + parseFloat(formulario.valorFrete) + parseFloat(formulario.valorSeguro) + parseFloat(formulario.valorOutrasDespesas));\r\n };\r\n\r\n useEffect(() => {\r\n recalcularTotal();\r\n }, [valorNota]);\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.percentualDesconto);\r\n let tot = parseFloat(valorNota);\r\n let result = 0;\r\n\r\n if (listaFormaPagamento.length > 0 && !!!controlModal) {\r\n setControlModal(true);\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: 'Tem certeza que deseja adicionar desconto? As formas de pagamento terão que ser incluídas novamente.',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setListaFormaPagamento([]);\r\n },\r\n onCancel() {\r\n form.setFieldsValue({ valorDesconto: 0, percentualDesconto: 0, valorTotal: listaFormaPagamento[0].pfp_valor });\r\n }\r\n });\r\n }\r\n\r\n\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualDesconto: result.toFixed(2) });\r\n }\r\n\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function calcularAcrescimo(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorAcrescimo);\r\n let perc = validarNumeros(formulario.percentualAcrescimo);\r\n let tot = (!!valorNota ? parseFloat(valorNota) : 0);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorAcrescimo: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percentualAcrescimo: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function recalcularTotal() {\r\n let formulario = form.getFieldValue();\r\n let valor = 0;\r\n if (!!formulario) {\r\n valor = valorNota - validarNumeros(formulario.valorDesconto) + validarNumeros(formulario.valorAcrescimo);\r\n form.setFieldsValue({ valorTotal: valor.toFixed(2) });\r\n let valorPago = 0;\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento) {\r\n manutencao.dados.faturamento.forEach((dadosFat) => {\r\n valorPago += parseFloat(dadosFat.pfp_valor);\r\n if (listaFormaPagamento.length == 0 || form.getFieldValue().valorDesconto > 0);\r\n {\r\n valorPago = 0;\r\n }\r\n });\r\n }\r\n form.setFieldsValue({ pfp_valor: (valor - valorPago).toFixed(2) });\r\n }\r\n };\r\n\r\n async function rateios() {\r\n await reteioDesconto();\r\n await recalcularImpostos();\r\n }\r\n\r\n async function recalcularImpostos() {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n let possuiIe = !!form.getFieldValue().pej_inscricaoestadual ? true : false;\r\n //let fisicaJuridica = form.getFieldValue().ntf_cpfcnpj.length === 14 ? 2 : form.getFieldValue().ntf_cpfcnpj.length == 11 ? 1 : 3;\r\n for (const p of dadosItens) {\r\n try {\r\n let _valorTotalDescontoItem = (!!p.nfi_valordescontorateado ? p.nfi_valordescontorateado : p.nfi_valordescontorateado) + p.nfi_valordesconto;\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, p.nfi_qtde, p.nfi_valorunitario, p.nfi_valorfrete, p.nfi_valoroutros,\r\n _valorTotalDescontoItem, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_percReducaoIcms,\r\n p.impostos.retornoICMSST.ret_aliquotaIcmsSt, p.impostos.retornoICMSST.ret_percMva, p.impostos.retornoICMSST.ret_percReducaoIcmsST, null,\r\n p.impostos.retornoICMSST.ncm_percentual, form.getFieldValue().fisicaJuridica, form.getFieldValue().ntf_consumidorfinal, possuiIe, form.getFieldValue().ntf_indicadorpresenca);\r\n\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.nfi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.nfi_valoripi = impostos.retornoIPI.ret_valorIpi;\r\n p.total = (p.nfi_qtde * p.nfi_valorunitario) - p.nfi_valordesconto + p.nfi_valoroutros + p.nfi_valoripi + p.nfi_valoricmsst;\r\n p.impostos = impostos;\r\n }\r\n totalSt += parseFloat(p.nfi_valoricmsst);\r\n total += parseFloat(p.total + p.nfi_valorfrete);\r\n } catch (error) {\r\n // Handle any potential errors here\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n form.setFieldsValue({ valorTotalSt: totalSt });\r\n\r\n calcularFaturamento();\r\n }\r\n }\r\n function reteioDesconto() {\r\n let formulario = form.getFieldsValue();\r\n let _numeroItem = 1;\r\n let _totalDesconto = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorDesconto = parseFloat(formulario.valorDesconto);\r\n if (_valorDesconto > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.nfi_valorunitario * item.nfi_qtde;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.nfi_valorunitario * item.nfi_qtde);\r\n item.nfi_valordescontorateado = calculaValorProporcional(valorTotalItem, _valorDesconto, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.nfi_valordescontorateado = parseFloat((_valorDesconto - _totalDesconto).toFixed(2))\r\n }\r\n _totalDesconto += item.nfi_valordescontorateado;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n\r\n function vendedorDescMaxFinal() {\r\n let totalDesconto = 0;\r\n let totalValorDescontoItens = 0;\r\n dadosItens.forEach((itens) => {\r\n totalValorDescontoItens += parseFloat(itens.nfi_valordesconto);\r\n });\r\n let percentualDescontoConcedido = parseFloat(((totalValorDescontoItens * 100) / parseFloat(form.getFieldsValue().subTotalNotaFiscal)).toFixed(2));\r\n totalDesconto = percentualDescontoConcedido + parseFloat(form.getFieldValue().percentualDesconto);\r\n if (!!dadosVendedor && JSON.stringify(dadosVendedor) !== '{}' && !!dadosVendedor.ven_maximodesconto) {\r\n if (totalDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: `O desconto máximo para este vendedor não pode exceder ${dadosVendedor.ven_maximodesconto * 100}% !`, message: 'Aviso' });\r\n form.setFieldsValue({ percentualDesconto: (dadosVendedor.ven_maximodesconto * 100) - parseFloat(percentualDescontoConcedido) });\r\n calcularDesconto('PERC');\r\n }\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Totais da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { vendedorDescMaxFinal(); rateios(); }}\r\n onChange={() => { calcularDesconto('PERC'); }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { vendedorDescMaxFinal(); rateios(); }} onChange={() => { calcularDesconto('VALOR'); }} />\r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onChange={() => { calcularAcrescimo('PERC') }}\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n { calcularAcrescimo('VALOR') }} />\r\n \r\n \r\n \r\n \r\n IPI (R$): 0,00\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): {FormatNumber(valorTotalSt, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota (R$)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","import React, {useEffect } from 'react';\r\nimport { Row, Col, Card, Form, Typography, Input, Divider, InputNumber } from \"antd\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabResumo({ form, itensNota }) {\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Resumo da Nota Fiscal\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n disabled\r\n />\r\n \r\n \r\n \r\n ou \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n IPI: R$ 0,00\r\n \r\n \r\n \r\n \r\n Substituição Tributária (R$): {FormatNumber(form.getFieldValue().valorTotalSt)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Total de Itens da Nota: {itensNota.length}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total da Nota\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Typography, Row, Col, Form, Divider, Input, Select, Steps, Button, Modal, notification, Spin } from \"antd\";\r\nimport { CalendarOutlined, ExclamationCircleOutlined, ExclamationOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { TabFaturamento, TabResumo } from './tabPage';\r\nimport { Data, DrawerCliente, FormGW, InputCep, InputCpfCnpj, SelectIncluir, SelectPaginacao } from '../../components';\r\nimport { TabItens, TabTransporte } from '../tabNotaFiscal/index';\r\nimport { drawerActions, manutencaoActions, selectPaginadoActions } from '../../actions';\r\nimport { ModalAliquotaSimplesNacional, ModalEndereco, ModalTelefone } from \"../../components/modals\";\r\nimport { validaForm, validarNumeros, isObjetoDiffVazio, novaAbaNavegador, calculaValorProporcional, openPdfNewTab, HasValue, imprimirRelatorioJasper, retornaCep } from '../../services/funcoes';\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\nimport SelectPaginado from '../../components/selectPaginado';\r\nimport { MaskFormat } from '../../ValueObjects/index';\r\nimport { getCnpjEmpresa, getDadosIntegra, setDadosIntegra } from '../../services/auth';\r\nimport apiPayer from '../../services/apiPayer';\r\nimport FormaDePagamento from '../../components/enuns/formaDePagamento';\r\n\r\nexport default function ManutencaoNotaFiscal({ form, carregando, aoSalvar, pages, proximaPag, salvarRascunho, showDrawerExtra, fecharDrawerNotaFiscal }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [isSubmitting, setIsSubmitting] = useState(false);\r\n const [vendedores, setVendedores] = useState([]);\r\n const [clientes, setClientes] = useState([]);\r\n const [serie, setSerie] = useState([]);\r\n const [dadosEndereco, setDadosEndereco] = useState([]);\r\n const [telefone, setTelefone] = useState([]);\r\n const [email, setEmail] = useState([]);\r\n const [pessoaFisica, setPessoaFisica] = useState(1);\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [formularioTelefone] = Form.useForm();\r\n const [dadosTelefone, setDadosTelefone] = useState([]);\r\n const [abreModalTelefone, setAbreModalTelefone] = useState(false);\r\n const [dadosItens, setDadosItens] = useState([]);\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState([]);\r\n const [listaVeiculos, setListaVeiculos] = useState([]);\r\n const [abreModalSimplesNac, setAbreModalSimplesNac] = useState(false)\r\n const [dadosTransp, setDadosTransp] = useState({});\r\n const [dadosVendedor, setDadosVendedor] = useState({});\r\n const [openModalEndereco, setOpenModalEndereco] = useState(false);\r\n const [formEndereco] = Form.useForm();\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const [openDrawerCliente, setOpenDrawerCliente] = useState(false);\r\n const [openValidaIE, setOpenValidaIE] = useState(true);\r\n const [codigoCliente, setCodigoCliente] = useState(null);\r\n const [editando, setEditando] = useState(false);\r\n const [operacaoFiscal, setOperacaoFiscal] = useState({});\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [listaIndicadorPresenca, setListaIndicadorPresenca] = useState([]);\r\n const [consumidorFinal, setconsumidorFinal] = useState([]);\r\n const [listaSubjacente, setListaSubjacente] = useState([]);\r\n const listaValidacoesDest = [\r\n { nome: 'ope_id', obrigatorio: true, label: 'Operação' },\r\n { nome: 'ntf_indicadorpresenca', obrigatorio: true, label: 'Indicador de Presença' },\r\n { nome: 'pes_id', obrigatorio: true, label: 'Destinatário' },\r\n { nome: 'cep_cep', obrigatorio: true, label: 'Cep' },\r\n { nome: 'ntf_endereco', obrigatorio: true, label: 'Endereço' },\r\n { nome: 'pee_numero', obrigatorio: true, label: 'Número' },\r\n { nome: 'ntf_consumidorfinal', obrigatorio: true, label: 'Destinatario é consumidor final?' }\r\n ];\r\n\r\n const statusPagamentoIntegraPagto = {\r\n Aprovada: 1,\r\n Rejeitada: 2,\r\n Pendente: 3,\r\n Cancelada: 4,\r\n Abortada: 5,\r\n Finalizada: 6,\r\n NaoAutorizada: 7,\r\n }\r\n\r\n var modalInstance = null;\r\n\r\n const listaValidacoesTransp = [\r\n { nome: 'ntf_modalidadefrete', obrigatorio: true, label: 'Modalidade do Frete' }\r\n ];\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer) {\r\n carregarDados();\r\n if (!!manutencao.dados && !!manutencao.dados.ntf_id) {\r\n form.setFieldsValue(manutencao.dados);\r\n setEditando(true);\r\n } else {\r\n setEditando(false);\r\n }\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n useEffect(() => {\r\n if (!!showDrawerExtra) {\r\n carregarDados();\r\n form.setFieldsValue(manutencao.dados);\r\n if (!!!form.getFieldValue().ntf_dataemissao) {\r\n form.setFieldsValue({ ntf_dataemissao: moment(new Date()) });\r\n }\r\n }\r\n if (!!showDrawerExtra && !!form.getFieldValue().pes_id) {\r\n let lista = [];\r\n if (!!form.getFieldValue().pes_id) {\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: form.getFieldValue().pes_id });\r\n buscarDadosCliente(form.getFieldValue().pes_id);\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n }, [showDrawerExtra]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.faturamento) {\r\n setListaFormaPagamento(manutencao.dados.faturamento);\r\n }\r\n if (!!manutencao.dados.formaPgto && !!!manutencao.dados.antecipacao) {\r\n manutencao.dados.formaPgto.forEach((forma) => {\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && forma.fpg_quitacaoantecipacao) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ antecipacao: [{ valorAntecipacao: forma.nfp_valor }] } } } });\r\n }\r\n });\r\n }\r\n if (!!manutencao.dados.formaPgto && !!!manutencao.dados.faturamento) {\r\n manutencao.dados.formaPgto.forEach((formas) => {\r\n formas.pfp_valor = parseFloat(formas.nfp_valor);\r\n });\r\n let dadosFormaPgto = [...manutencao.dados.formaPgto];\r\n dadosFormaPgto = manutencao.dados.formaPgto.filter((dados) => dados.fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && !dados.fpg_quitacaoantecipacao);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: dadosFormaPgto } } } });\r\n }\r\n if (!!manutencao.dados.pes_id && (!!!manutencao.dados.destinatario || (manutencao.dados.destinatario.pes_id !== manutencao.dados.pes_id))) {\r\n let lista = [];\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: manutencao.dados.pes_id });\r\n lista.push({ name: \"ope_id\", campo: \"CodigoOperacao\", value: manutencao.dados.ope_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n buscarDadosCliente(manutencao.dados.pes_id);\r\n popularOperacaoFiscal(manutencao.dados.ope_id);\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.itensNf) {\r\n if (!!manutencao.dados.itensNf[0].ped_id || !!manutencao.dados.itensNf[0].ntf_id) {\r\n calcularFrete(manutencao.dados.itensNf);\r\n }\r\n if (dadosItens.length === 0) {\r\n setDadosItens(manutencao.dados.itensNf);\r\n }\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!clientes && clientes.length > 0 && (!!manutencao.dados || !!form.getFieldValue().pes_id)) {\r\n let cliente = !!manutencao.dados ? manutencao.dados.pes_id : form.getFieldValue().pes_id;\r\n buscarDadosCliente(cliente);\r\n }\r\n }, [clientes]);\r\n\r\n useEffect(() => {\r\n if ((!!proximaPag.proximaPag || proximaPag.proximaPag === 0) && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag]);\r\n\r\n useEffect(() => {\r\n if (dadosTelefone.length > 0) {\r\n dadosTelefone[0].pes_id = form.getFieldValue().pes_id;\r\n api.post(`PessoaTelefone/Incluir`, dadosTelefone[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n buscarDadosCliente(form.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setDadosTelefone([]);\r\n }\r\n )\r\n }\r\n }, [dadosTelefone]);\r\n\r\n function incluirEndereco(endereco) {\r\n if (endereco.length > 0) {\r\n var IdPessoa = form.getFieldValue().pes_id;\r\n api.post(`PessoaEndereco/Incluir?IdPessoa=${IdPessoa}`, endereco[0]).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n buscarDadosCliente(form.getFieldValue().pes_id);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n }\r\n\r\n function calcularFrete() {\r\n let valorFrete = 0;\r\n manutencao.dados.itensNf.forEach((item) => {\r\n if (!!item.ped_id) {\r\n valorFrete += parseFloat(!!item.pdi_valorfrete ? item.pdi_valorfrete : 0);\r\n } else {\r\n valorFrete += parseFloat(!!item.nfi_valorfrete ? item.nfi_valorfrete : 0);\r\n }\r\n });\r\n form.setFieldsValue({ valorFrete: valorFrete });\r\n };\r\n\r\n async function carregarDados() {\r\n setCarregarPagina(true);\r\n let listaIndicadorPresenca = await api.get('Enum/Listar?nome=IndicadorPresenca');\r\n if (listaIndicadorPresenca.status === 200) {\r\n setListaIndicadorPresenca(listaIndicadorPresenca.data);\r\n }\r\n let consumidorFinal = await api.get('Enum/Listar?nome=ConsumidorFinal');\r\n if (consumidorFinal.status === 200) {\r\n setconsumidorFinal(consumidorFinal.data);\r\n }\r\n let listaVendedor = await api.get('Vendedor/ListarVendedor');\r\n if (listaVendedor.status === 200) {\r\n setVendedores(listaVendedor.data.items);\r\n }\r\n let listaSerie = await api.get('SerieFiscal/Listar?EmitenteDocumento=0&CodigoModeloDocFiscal=55&SomenteAtivos=true');\r\n let serie = [];\r\n if (listaSerie.status === 200) {\r\n serie = listaSerie.data.items;//.filter(item => (item.mdf_id === '55' && item.ser_emitentedocumento === 0));\r\n setSerie(serie);\r\n if (serie.length > 0) {\r\n form.setFieldsValue({ ser_id: serie[0].ser_id });\r\n }\r\n }\r\n\r\n let listaDadosContribuinte = await api.get('dadosContribuinte/Buscar');\r\n setCarregarPagina(false);\r\n if (listaDadosContribuinte.status === 200) {\r\n if (!!listaDadosContribuinte.data) {\r\n setDadosContribuinte(listaDadosContribuinte.data);\r\n if (listaDadosContribuinte.data.emp_regimetributario === 1) {\r\n popularDadosSimples();\r\n }\r\n } else {\r\n Modal.warning({\r\n title: 'Dados Contribuinte não parâmetrizados!',\r\n content: 'Favor parametrizar os dados do contribuinte'\r\n });\r\n aoSalvar();\r\n }\r\n }\r\n };\r\n\r\n function setarAdjacentes(adjacentes) {\r\n let key = 1;\r\n adjacentes.forEach((item) => {\r\n item.key = key++;\r\n });\r\n setListaSubjacente(adjacentes);\r\n }\r\n\r\n function tratarDadosSubjacente(id) {\r\n let value = listaSubjacente.find(x => x.pop_id === id);\r\n if (HasValue(value.pop_cep)) {\r\n fetch(`https://viacep.com.br/ws/${value.pop_cep.replace(`-`, ``)}/json/`).then(\r\n res => res.json()\r\n ).then(\r\n result => {\r\n let dadosEndereco = {\r\n pee_id: id,\r\n ntf_endereco: id,\r\n bai_nome: value.pop_bairro,\r\n bairro: value.pop_bairro,\r\n cep_cep: value.pop_cep,\r\n cid_nome: result.localidade,\r\n complemento: value.pop_complemento,\r\n pee_complemento: value.pop_complemento,\r\n log_logradouro: value.pop_endereco,\r\n pee_numero: value.pop_numero,\r\n numero: value.pop_numero,\r\n est_sigla: result.uf\r\n };\r\n setDadosEndereco([dadosEndereco]);\r\n form.setFieldsValue(\r\n dadosEndereco);\r\n },\r\n erro => {\r\n notification.warning({ message: 'Aviso', description: 'Cep não encontrado!' })\r\n }\r\n );\r\n }\r\n }\r\n\r\n function setarEnderecos(enderecos) {\r\n if (enderecos != null && enderecos.length > 0) {\r\n setDadosEndereco(enderecos);\r\n let end = enderecos[0];\r\n buscarCep(end.cep_cep);\r\n form.setFieldsValue({\r\n ntf_endereco: end.pee_id,\r\n cep_cep: end.cep_cep,\r\n pse_id: end.pse_id,\r\n bai_nome: end.bai_nome,\r\n pee_numero: end.pee_numero,\r\n pee_complemento: end.pee_complemento\r\n });\r\n if (end.cep_cep == null) {\r\n if (HasValue(end.cid_descricao))\r\n end.cid_descricao = \"EXTERIOR\"\r\n\r\n form.setFieldsValue({\r\n cep_cep: '9999999',\r\n cidade: `${end.cid_descricao} / ${end.est_sigla}`\r\n })\r\n }\r\n let lista = [];\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: end.pse_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n } else {\r\n setDadosEndereco([]);\r\n if (!!form.getFieldValue().pes_id) {\r\n Modal.confirm({\r\n title: 'Endereço não encontrado',\r\n icon: ,\r\n content: 'Deseja incluir um endereço para este destinatário?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n setOpenModalEndereco(true);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n function setarTelefones(telefones) {\r\n setTelefone(telefones);\r\n if (telefones != null && telefones.length > 0) {\r\n let telefone;\r\n if (telefones.length > 1) {\r\n let telefonePrincipal = telefones.filter(f => f.psc_principal == true)\r\n if (telefonePrincipal.length > 0) {\r\n telefone = telefonePrincipal[0].psc_id;\r\n }\r\n else {\r\n telefone = telefones[0].psc_id;\r\n }\r\n } else {\r\n telefone = telefones[0].psc_id;\r\n }\r\n form.setFieldsValue({ telefoneDestinatario: telefone });\r\n }\r\n };\r\n\r\n function setarEmails(emails) {\r\n setEmail(emails);\r\n if (emails != null && emails.length > 0) {\r\n let email;\r\n if (emails.length > 1) {\r\n let emailPricipal = emails.filter(f => f.pem_emailprincipal == true);\r\n if (emailPricipal.length > 0) {\r\n email = emailPricipal[0].pem_id;\r\n }\r\n else {\r\n email = emails[0].pem_id;\r\n }\r\n } else {\r\n email = emails[0].pem_id;\r\n }\r\n form.setFieldsValue({ ntf_emaildestinatario: email });\r\n }\r\n };\r\n\r\n function popularDadosSimples() {\r\n let data = new Date();\r\n let dados = {};\r\n dados.asn_ano = data.getFullYear();\r\n dados.asn_mes = data.getMonth() + 1;\r\n api.get(`AliquotaSimplesNacional/Listar?Ano=${dados.asn_ano}&Mes=${dados.asn_mes}`).then(\r\n res => {\r\n if (!isObjetoDiffVazio(res.data?.items[0])) {\r\n setAbreModalSimplesNac(true);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!!erro) {\r\n setAbreModalSimplesNac(true);\r\n } else {\r\n console.log(erro);\r\n }\r\n }\r\n )\r\n };\r\n async function modalVerificaIEdestinatario(pagina) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalInstance = Modal.confirm({\r\n title: 'Atenção',\r\n content: 'Destinatário sem Inscrição Estadual, deseja seguir com emissão da Nota Fiscal?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk: () => {\r\n setOpenValidaIE(false);\r\n //validarTrocaPg(pagina)\r\n },\r\n onCancel: () => {\r\n setOpenValidaIE(true);\r\n }\r\n });\r\n };\r\n\r\n async function validarOperacao() {\r\n let retorno;\r\n let end = dadosEndereco.filter((end) => (end.pee_id === form.getFieldValue().ntf_endereco))[0];\r\n let destinoOperacao = 2;\r\n if (end?.est_sigla === dadosContribuinte.est_sigla) {\r\n destinoOperacao = 1;\r\n }\r\n if (end?.est_sigla === \"EX\") {\r\n destinoOperacao = 3;\r\n }\r\n form.setFieldsValue({ destinoOperacao: destinoOperacao });\r\n if (!!end && form.getFieldValue().pej_inscricaoestadual === null\r\n && form.getFieldValue().ntf_indicadorpresenca === 0 && end.est_sigla !== dadosContribuinte.est_sigla) {\r\n Modal.warning({\r\n title: \"Verifique a Operação Fiscal Informada\",\r\n content: \"Nota Fiscal emitida para destinatário interestadual não contribuinte, deve ter uma operação que configure o tipo de indicador de presença do destinatário. Esta operação esta cadastrada com o indicador de presença 0-Não se Aplica - Verifique a Situação!\",\r\n });\r\n retorno = false;\r\n } else {\r\n retorno = true;\r\n }\r\n return retorno;\r\n };\r\n\r\n async function buscarDadosCliente(registro) {\r\n if (!!registro) {\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${registro}`)).data;\r\n if (!!cliente) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: cliente } } } });\r\n form.setFieldsValue({ 'pej_inscricaoestadual': cliente.pej_inscricaoestadual });\r\n form.setFieldsValue({ 'pes_nome': cliente.pes_nome });\r\n form.setFieldsValue({ 'cli_id': cliente.cli_id });\r\n setarCpfCnpj(cliente);\r\n setarEnderecos(cliente.enderecos);\r\n setarTelefones(cliente.telefones);\r\n setarEmails(cliente.emails);\r\n if (cliente.pes_fisicajuridica === 1) // Pessoa Fisica\r\n {\r\n if (cliente.pef_produtorrural) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': cliente.enderecos[0].pie_inscricaoestadual });\r\n }\r\n if (form.getFieldValue().pej_inscricaoestadual != null && form.getFieldValue().pej_inscricaoestadual != undefined) {\r\n form.setFieldsValue({ 'ntf_consumidorfinal': 1 });\r\n }\r\n else {\r\n form.setFieldsValue({ 'ntf_consumidorfinal': 0 });\r\n }\r\n }\r\n else if (cliente.pes_fisicajuridica === 3) {\r\n form.setFieldsValue({ 'ntf_consumidorfinal': 0 });\r\n }\r\n else {\r\n form.setFieldsValue({ 'ntf_consumidorfinal': null }); // Usuario deve definir, pois pode ou não ser consumidor final\r\n }\r\n if (cliente?.pessoaorgaospublicos?.length > 0) {\r\n setarAdjacentes(cliente.pessoaorgaospublicos);\r\n } else {\r\n setListaSubjacente([]);\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n } else {\r\n limparCliente();\r\n }\r\n };\r\n\r\n function limparCliente() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ destinatario: null } } } });\r\n form.setFieldsValue({ 'pej_inscricaoestadual': null });\r\n form.setFieldsValue({ 'pes_nome': null });\r\n form.setFieldsValue({ 'ntf_cpfcnpj': null });\r\n setarEnderecos([]);\r\n setarTelefones([]);\r\n setarEmails([]);\r\n }\r\n\r\n function setarCpfCnpj(cliente) {\r\n let cpfCnpj = '';\r\n if (cliente.pes_fisicajuridica > 0) {\r\n if (cliente.pes_fisicajuridica === 1) {\r\n cpfCnpj = cliente.pef_cpf;\r\n setPessoaFisica(1);\r\n } else if (cliente.pes_fisicajuridica === 2) {\r\n cpfCnpj = cliente.pej_cnpj;\r\n setPessoaFisica(2);\r\n } else if (cliente.pes_fisicajuridica === 3) {\r\n cpfCnpj = cliente.pes_idestrangeiro;\r\n setPessoaFisica(3);\r\n }\r\n form.setFieldsValue({ ntf_cpfcnpj: cpfCnpj, fisicaJuridica: cliente.pes_fisicajuridica });\r\n } else {\r\n notification.warn(\"Cliente informado com cadastro de pessoa física/jurídica/estrangeira incorreto!\");\r\n form.setFieldsValue({ pes_id: null });\r\n return false;\r\n }\r\n };\r\n function buscarDadosEndereco(pee_id) {\r\n let end = null;\r\n if (dadosEndereco.length === 1) {\r\n end = dadosEndereco[0];\r\n } else {\r\n end = dadosEndereco.filter((end) => (end.pee_id === pee_id))[0];\r\n }\r\n if (!!end) {\r\n form.setFieldsValue({ pse_id: end.pse_id });\r\n if (end.pse_id) {\r\n let lista = [];\r\n lista.push({ name: \"pse_id\", campo: \"pse_id\", value: end.pse_id });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n if (end.pie_inscricaoestadual) {\r\n form.setFieldsValue({ 'pej_inscricaoestadual': end.pie_inscricaoestadual });\r\n }\r\n form.setFieldsValue({ ntf_endereco: end.log_logradouro + ', ' + end.cid_descricao + ' - ' + end.est_sigla })\r\n form.setFieldsValue({ cep_cep: end.cep_cep });\r\n buscarCep(end.cep_cep);\r\n form.setFieldsValue({ bai_nome: end.bai_nome });\r\n form.setFieldsValue({ pee_numero: end.pee_numero });\r\n form.setFieldsValue({ pee_complemento: end.pee_complemento });\r\n }\r\n };\r\n async function validarTrocaPg(pagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesDest;\r\n if (openValidaIE === true && pessoaFisica == 2) {\r\n let ie = form.getFieldValue().pej_inscricaoestadual;\r\n if (ie == null || ie == \"\") {\r\n await modalVerificaIEdestinatario(pagina)\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n if (!validarOperacao()) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n break;\r\n case 1:\r\n if (paginaAtual < pagina) {\r\n if (!!dadosItens && dadosItens.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Nota Fiscal deve ter ao menos 1 item!' });\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case 2:\r\n listaValidacoes = listaValidacoesTransp;\r\n await validarTransporte();\r\n break;\r\n case 3:\r\n if (paginaAtual < pagina) {\r\n listaValidacoes = [];\r\n let validaFaturamento = await validarFaturamento();\r\n if (validaFaturamento === false || listaFormaPagamento.length === 0) {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n break;\r\n case 4:\r\n listaValidacoes = [];\r\n break;\r\n }\r\n if (validaForm(form, listaValidacoes)) {\r\n pages.setTagPages(pagina);\r\n } else {\r\n setPermiteValidar(false);\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n };\r\n async function validarTransporte() {\r\n await reteioFrete();\r\n await recalcularImpostos();\r\n }\r\n async function recalcularImpostos() {\r\n if (dadosItens.length > 0) {\r\n let total = 0;\r\n let totalSt = 0;\r\n let possuiIe = !!form.getFieldValue().pej_inscricaoestadual ? true : false;\r\n //let fisicaJuridica = form.getFieldValue().ntf_cpfcnpj.length === 14 ? 2 : form.getFieldValue().ntf_cpfcnpj.length == 11 ? 1 : 3;\r\n for (const p of dadosItens) {\r\n try {\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, p.nfi_qtde, p.nfi_valorunitario, p.nfi_valorfrete, p.nfi_valoroutros,\r\n p.nfi_valordesconto, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_percReducaoIcms,\r\n p.impostos.retornoICMSST.ret_aliquotaIcmsSt, p.impostos.retornoICMSST.ret_percMva, p.impostos.retornoICMSST.ret_percReducaoIcmsST, null,\r\n p.impostos.retornoICMSST.ncm_percentual, form.getFieldValue().fisicaJuridica, form.getFieldValue().ntf_consumidorfinal, possuiIe, form.getFieldValue().ntf_indicadorpresenca);\r\n\r\n if (isObjetoDiffVazio(impostos)) {\r\n p.nfi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n p.nfi_valoripi = impostos.retornoIPI.ret_valorIpi;\r\n p.total = (p.nfi_qtde * p.nfi_valorunitario) - p.nfi_valordesconto + p.nfi_valoroutros + p.nfi_valoripi + p.nfi_valoricmsst;\r\n p.impostos = impostos;\r\n }\r\n totalSt += parseFloat(p.nfi_valoricmsst);\r\n total += parseFloat(p.total);\r\n } catch (error) {\r\n // Handle any potential errors here\r\n console.error(\"Error item:\", error);\r\n }\r\n }\r\n form.setFieldsValue({ valorTotalSt: totalSt });\r\n // form.setFieldsValue({ valorTotal: total });\r\n }\r\n }\r\n\r\n\r\n\r\n // async function recalcularImpostos() {\r\n // if (dadosItens.length > 0) {\r\n // dadosItens.forEach(p => {\r\n // let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, p.nfi_qtde, p.nfi_valorunitario, p.nfi_valorfrete, p.nfi_valoroutros,\r\n // p.nfi_valordesconto, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_aliquotaIcms, p.impostos.retornoICMS.ret_percReducaoIcms,\r\n // p.impostos.retornoICMSST.ret_aliquotaIcmsSt, p.impostos.retornoICMSST.ret_percMva, p.impostos.retornoICMSST.ret_percReducaoIcmsST, null,\r\n // p.impostos.retornoICMSST.ncm_percentual, 2, 0, true);\r\n\r\n // if (isObjetoDiffVazio(impostos)) {\r\n // p.nfi_valoricmsst = impostos.retornoICMSST.ret_valorIcmsSt;\r\n // p.nfi_valoripi = impostos.retornoIPI.ret_valorIpi;\r\n // p.impostos = impostos;\r\n // }\r\n // });\r\n // }\r\n // console.log(\"Recalculo de Imposto\", dadosItens)\r\n // }\r\n\r\n function reteioFrete() {\r\n let formulario = form.getFieldsValue();\r\n let _numeroItem = 1;\r\n let _totalFrete = 0;\r\n if (dadosItens.length > 0) {\r\n let _valorFrete = parseFloat(formulario.valorFrete);\r\n if (_valorFrete > 0) {\r\n // Ordena os itens em ordem de maior valor crescente\r\n var itens = dadosItens.sort((a, b) => a.total - b.total);\r\n // Calcular a soma da multiplicação dos campos\r\n let somaTotal = dadosItens.reduce((total, item) => {\r\n let resultadoMultiplicacao = item.nfi_valorunitario * item.nfi_qtde;\r\n return total + resultadoMultiplicacao;\r\n }, 0);\r\n\r\n itens.forEach(item => {\r\n let valorTotalItem = parseFloat(item.nfi_valorunitario * item.nfi_qtde);\r\n item.nfi_valorfrete = calculaValorProporcional(valorTotalItem, _valorFrete, somaTotal);\r\n if (_numeroItem == dadosItens.length) {\r\n item.nfi_valorfrete = parseFloat((_valorFrete - _totalFrete).toFixed(2))\r\n }\r\n _totalFrete += item.nfi_valorfrete;\r\n _numeroItem++;\r\n });\r\n }\r\n }\r\n }\r\n async function validarFaturamento() {\r\n let formulario = form.getFieldsValue();\r\n let retorno = true;\r\n let valorTotal = 0;\r\n let operacao = operacaoFiscal;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach(forma => {\r\n valorTotal += parseFloat(forma.pfp_valor);\r\n if (forma.editando == true) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor salvar as alterações em andamento nas parcelas(forma pagamento) para continuar!' });\r\n }\r\n // Testa se `forma.antecipacao` existe e é uma lista vazia\r\n if (forma.fpg_quitacaoantecipacao && Array.isArray(forma.antecipacoes) && forma.antecipacoes.length === 0) {\r\n notification.info({\r\n message: 'Informação',\r\n description: 'A forma de pagamento possui antecipação, mas a lista está vazia.'\r\n });\r\n }\r\n });\r\n if (parseFloat(formulario.valorTotal) === 0) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso!', description: 'Valor da Nota Inválido!' });\r\n } else {\r\n if ((validarNumeros(formulario.valorTotal) !== parseFloat(valorTotal.toFixed(2))) || operacao.tip_id == !5) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Valor informado nas formas de pagamento é menor que o valor total da nota!' });\r\n }\r\n }\r\n\r\n } else {\r\n if (!!formulario.fpg_id) {\r\n let formaPagamento = (await api.get(`FormaPagamento/Get?id=${formulario.fpg_id}`)).data;\r\n if (!listaFormaPagamento.cpg_id) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n else if (formaPagamento.fpg_tipoavistaaprazo === 1) {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n } else {\r\n retorno = false;\r\n notification.warning({ message: 'Aviso', description: 'Favor preencher as formas de pagamento!' });\r\n }\r\n }\r\n return retorno;\r\n };\r\n function adicionarTelefone() {\r\n if (!!form.getFieldValue().pes_id) {\r\n setAbreModalTelefone(true);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: \"Favor informar um cliente!\" })\r\n }\r\n };\r\n function onCloseModalTelefone() {\r\n setAbreModalTelefone(false);\r\n };\r\n function onCloseModalAliquotaSimplesNacional() {\r\n setAbreModalSimplesNac(false);\r\n form.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n };\r\n async function validarDadosNota(dados) {\r\n dados = await popularDados();\r\n dados.gerarBoleto = false;\r\n dados.ntf_ufdest = dados.notaFiscalDestinatario?.ntf_ufdest;\r\n dados.notaFiscalFaturamento.forEach((formasPgto) => {\r\n if (formasPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n dados.gerarBoleto = true;\r\n }\r\n });\r\n salvarNota(dados);\r\n };\r\n\r\n async function modalAutorizarSefaz(dados) {\r\n Modal.confirm({\r\n title: 'Atenção!',\r\n content: (\r\n
\r\n

\r\n A operação fiscal está configurada para gerar um rascunho antes de autorizar a nota no SEFAZ.\r\n
\r\n
\r\n O que você deseja fazer com a Nota Nº {dados.ntf_numero} - Modelo: {dados.ntf_modelo} Data: {moment(dados.ntf_dataemissao).format('DD/MM/YYYY HH:mm')}?\r\n

\r\n
\r\n ),\r\n okText: 'Autorizar Agora',\r\n cancelText: 'Autorizar Depois',\r\n onOk() {\r\n realizarReenvioSefaz(dados);\r\n },\r\n onCancel() {\r\n\r\n }\r\n })\r\n }\r\n\r\n async function realizarReenvioSefaz(dadosNota) {\r\n let _link = `NotaFiscal/ReenviarNotaSefaz/${dadosNota.ntf_id}`;\r\n if (dadosNota.ntf_finalidade === 3)// Nota ajuste\r\n _link = `NotaFiscalDebitoCredito/ReenviarNotaSefaz/${dadosNota.ntf_id}`;\r\n\r\n api.post(_link).then(\r\n (retornoNF) => {\r\n if (retornoNF.status === 200) {\r\n if (retornoNF.data.ntf_status === 1 && !!retornoNF.data.ntf_chavenfe) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${retornoNF.data.ntf_chavenfe}`);\r\n\r\n imprimirComprovantePagamentoIntegrado(retornoNF.data);\r\n }\r\n }\r\n notification.success({ message: 'Sucesso', description: `NF-e Autorizada com sucesso!` });\r\n }\r\n\r\n ).catch(\r\n (erro) => {\r\n if (!!erro.response && !!erro.response.data) {\r\n notification.error({ description: erro.response.data, message: `Aviso` });\r\n } else {\r\n notification.error({ description: 'Não foi possível Autorizar a Nota Fiscal!', message: `Aviso` });\r\n }\r\n }\r\n ).finally(() => {\r\n aoSalvar();\r\n });\r\n console.log(dadosNota)\r\n }\r\n\r\n async function salvarNota(dados) {\r\n if (dados.notaFiscalDestinatario.pes_fisicajuridica === 1 || dados.notaFiscalDestinatario.pes_fisicajuridica === 3) {\r\n dados.ntf_consumidorfinal = 1;\r\n } else {\r\n if (dados.ntf_consumidorfinal !== 0 && dados.ntf_consumidorfinal !== 1) {\r\n notification.warning({ message: 'Aviso', description: 'Não foi selecionado o destino da mercadoria!' });\r\n return;\r\n }\r\n }\r\n\r\n await analisaFormaPagamento(dados);\r\n };\r\n\r\n async function analisaFormaPagamento(dados) {\r\n let pagamentoMaquininha = false;\r\n let dadosIntegracaoPos = {};\r\n let cnpjEmpresa = getCnpjEmpresa();\r\n let listaIdsIntegracao = [];\r\n for (const item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null) {\r\n if (item.fpg_tipointegracao == 1) {// vero\r\n let tipopgto = 0;\r\n let metodopgto = 0;\r\n let submetodopgto = 0;\r\n\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n tipopgto = 2;\r\n metodopgto = 1;\r\n submetodopgto = 4;\r\n if (item.parcelas?.length == 1) {\r\n submetodopgto = 1\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n tipopgto = 3;\r\n metodopgto = 1;\r\n submetodopgto = 3;\r\n if (item.parcelas?.length == 1) {\r\n submetodopgto = 1\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n tipopgto = 1;\r\n metodopgto = 3;\r\n submetodopgto = 1\r\n }\r\n dadosIntegracaoPos = {\r\n imp_cnpjlocal: cnpjEmpresa,\r\n imp_valor: item.pfp_valor,\r\n imp_tipopgto: tipopgto,\r\n imp_metodopgto: metodopgto,\r\n imp_submetodopgto: submetodopgto,\r\n imp_qtdeparcelas: item.parcelas?.length,\r\n }\r\n if (!isObjetoDiffVazio(item.integrapgto)) {\r\n item.integrapgtook = false;\r\n item.integrapgto = await criaRegistroIntegraPagto(dadosIntegracaoPos);\r\n listaIdsIntegracao.push(item.integrapgto);\r\n }\r\n item.imp_id = item.integrapgto.imp_id;\r\n } else if (item.fpg_tipointegracao == 2) {//payer localhost\r\n await pagamentoPayer(item);\r\n pagamentoMaquininha = true;\r\n break;\r\n }\r\n else if (item.fpg_tipointegracao == 4) {//payer Gateway\r\n await pagamentoPayer(item);\r\n pagamentoMaquininha = true;\r\n break;\r\n }\r\n pagamentoMaquininha = true;\r\n } else {\r\n pagamentoMaquininha = false;\r\n }\r\n }\r\n }\r\n if (pagamentoMaquininha) {\r\n setDadosIntegra(dados);\r\n modalAguardandoPagamento(dados);\r\n } else {\r\n concluirVenda(dados);\r\n }\r\n }\r\n\r\n async function pagamentoPayer(item) {\r\n let dadosIntegracaoPos = {};\r\n let _paymentType = \"\";\r\n let _paymentMethodSubType = \"\";\r\n let _installments = \"\";\r\n let _paymentMethod = \"\";\r\n let _command = \"payment\"\r\n\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Credit\";\r\n _paymentMethodSubType = \"Financed_no_Fees\";\r\n\r\n if (item.parcelas?.length == 1) {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n } else {\r\n _installments = (item.parcelas?.length).toString();\r\n }\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n if (item.parcelas?.length > 1) {\r\n _paymentMethodSubType = \"Financed_Debit\";\r\n _installments = (item.parcelas?.length).toString();\r\n } else {\r\n _paymentMethodSubType = \"Full_Payment\";\r\n }\r\n _paymentMethod = \"Card\";\r\n _paymentType = \"Debit\"\r\n }\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n _paymentType = \"Cash\";\r\n _paymentMethod = \"Pix\";\r\n }\r\n\r\n dadosIntegracaoPos = {\r\n command: _command,\r\n value: parseFloat(item.pfp_valor),\r\n paymentMethod: _paymentMethod,\r\n paymentType: _paymentType,\r\n paymentMethodSubType: _paymentMethodSubType,\r\n installments: _installments\r\n };\r\n if (!isObjetoDiffVazio(item.integrapgto)) {\r\n if (item.fpg_tipointegracao == 2) {//payer localhost\r\n try {\r\n let retorno = await apiPayer.post('Client/Request', dadosIntegracaoPos);\r\n item.integrapgtook = false;\r\n } catch (error) {\r\n notification.warning({ description: 'Verifique se o checkout Payer esteja iniciado, caso contrário inicie o mesmo para continuar !', message: 'AVISO!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao == 4) {//payer Gateway\r\n try {\r\n dadosIntegracaoPos.installments = parseInt(dadosIntegracaoPos.installments);\r\n let retorno = (await api.post(`Payer/IncluirPayerRequest`, dadosIntegracaoPos)).data;\r\n item.integrapgtook = false;\r\n item.integrapgto = retorno;\r\n } catch (error) {\r\n if (!!error.response && !!error.response.data)\r\n notification.warning({ description: error.response.data, message: 'AVISO!' });\r\n else\r\n notification.warning({ description: 'Erro ao mandar o pagamento para API Payer!', message: 'AVISO!' });\r\n }\r\n }\r\n }\r\n }\r\n\r\n async function criaRegistroIntegraPagto(dadosIntegracaoPos) {\r\n let retorno;\r\n try {\r\n retorno = (await api.post(`IntegraPagto/Incluir`, dadosIntegracaoPos)).data;\r\n } catch (error) {\r\n notification.warning({ description: 'Erro ao mandar o pagamento para a máquina!', message: 'AVISO!' });\r\n console.log(error);\r\n return false;\r\n }\r\n return retorno;\r\n }\r\n\r\n\r\n function modalAguardandoPagamento(dados) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalInstance = Modal.confirm({\r\n title: 'Aviso',\r\n content: 'Aguardando Pagamento!',\r\n okText: 'Pagamento Efetuado',\r\n cancelText: 'Cancelar Pagamento',\r\n onOk: () => {\r\n verificarPagamentos(dados);\r\n },\r\n onCancel: () => {\r\n cancelarPagamentoMaquina(dados);\r\n }\r\n });\r\n }\r\n\r\n async function cancelarPagamentoMaquina(dados) {\r\n for (var item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (isObjetoDiffVazio(item.integrapgto)) {\r\n let retorno = (await api.put(`IntegraPagto/CancelarPagamento?Id=${item.integrapgto?.imp_id}`)).data;\r\n if (retorno) {\r\n item.integrapgtook = false;\r\n item.integrapgto = null;\r\n } else {\r\n notification.warning({ description: 'Erro ao efetuar o cancelamento!', message: 'Aviso!' });\r\n modalAguardandoPagamento(dados)\r\n break;\r\n }\r\n } else {\r\n item.integrapgtook = false;\r\n item.integrapgto = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n async function verificarPagamentos(dados) {\r\n for (var item of dados.notaFiscalFaturamento) {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false || item.integrapgtook == null || item.integrapgtook == undefined) && item.fpg_tipointegracao == 1) {// Vero\r\n let retorno = (await api.get(`IntegraPagto/Buscar/${item.integrapgto.imp_id}`)).data;\r\n if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Pendente) {\r\n if (modalInstance !== null) {\r\n modalInstance.destroy();\r\n }\r\n modalAguardandoPagamento(dados);\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Aprovada) {\r\n item.integrapgtook = true;\r\n item.integrapgto = retorno;\r\n item.rcc_nsu = retorno.imp_autorizacao;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.NaoAutorizada) {\r\n notification.warning({ description: 'Pagamento não Autorizado!', message: 'Aviso!' });\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Cancelada) {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false) && item.fpg_tipointegracao == 2) {// Payer localhost\r\n let retorno;\r\n try {\r\n retorno = (await apiPayer.get('Client/Response')).data;\r\n\r\n } catch (error) {\r\n notification.warning({ description: 'Verifique se o checkout Payer esteja iniciado, caso contrário inicie o mesmo para continuar !', message: 'AVISO!' });\r\n await pagamentoPayer(item);\r\n break\r\n }\r\n if (retorno.statusTransaction == \"PENDING\") {\r\n break\r\n } else if (retorno.statusTransaction == \"APPROVED\") {\r\n let ret = (await api.post(`IntegraPagto/IncluirPayer`, retorno)).data;\r\n item.integrapgtook = true;\r\n item.integrapgto = ret;\r\n item.rcc_nsu = ret.authorizerId;\r\n item.imp_id = ret.imp_id;\r\n } else if (retorno.statusTransaction == \"UNAUTHORIZED\") {\r\n notification.warning({ description: 'Pagamento não Autorizado, verifique no Checkout Payer e tente novamente!', message: 'Aviso!' });\r\n return;\r\n } else if (retorno.statusTransaction == \"ABORTED\") {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false) && item.fpg_tipointegracao == 4) {// Payer Gateway\r\n try {\r\n let retorno = (await api.get(`Payer/BuscarOrdemPagamento/${item.integrapgto.imp_id}`)).data;\r\n\r\n if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Pendente) {\r\n break\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Aprovada) {\r\n item.integrapgtook = true;\r\n item.integrapgto = retorno;\r\n item.rcc_nsu = retorno.imp_autorizacao;\r\n item.imp_id = retorno.imp_id;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.NaoAutorizada) {\r\n notification.warning({ description: 'Pagamento não Autorizado, verifique no Checkout Payer e tente novamente!', message: 'Aviso!' });\r\n return;\r\n } else if (retorno.imp_statuspgto == statusPagamentoIntegraPagto.Abortada) {\r\n notification.warning({ description: 'Pagamento Cancelado!', message: 'Aviso!' });\r\n }\r\n } catch (error) {\r\n notification.warning({ description: 'Erro ao consultar o pagamento na API!', message: 'AVISO!' });\r\n }\r\n\r\n\r\n }\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == null || item.integrapgtook == undefined) && (item.fpg_tipointegracao == 2 || item.fpg_tipointegracao == 4)) {\r\n await pagamentoPayer(item);\r\n }\r\n }\r\n }\r\n await verificaTodosPagamentos(dados);\r\n }\r\n\r\n async function verificaTodosPagamentos(dados) {\r\n let finalizarVenda = true;\r\n let listaFaturamento = dados.notaFiscalFaturamento;\r\n listaFaturamento.forEach(item => {\r\n if (item.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || item.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || item.fpg_tipopagamento === FormaDePagamento.fpPixDinamico) {\r\n if (item.fpg_tipointegracao != null && (item.integrapgtook == false || item.integrapgtook == null || item.integrapgtook == undefined)) {\r\n finalizarVenda = false;\r\n }\r\n }\r\n });\r\n if (finalizarVenda == true) {\r\n concluirVenda(dados);\r\n } else {\r\n modalAguardandoPagamento(dados);\r\n }\r\n }\r\n\r\n function concluirVenda(dados) {\r\n console.log(dados)\r\n\r\n if (!!form.getFieldValue().ntf_id) {\r\n dados.ntf_id = form.getFieldValue().ntf_id;\r\n editarNota(dados);\r\n } else {\r\n incluirNota(dados);\r\n }\r\n }\r\n\r\n function incluirNota(dados) {\r\n if (isSubmitting) return; // Evita chamadas concorrentes\r\n setIsSubmitting(true);\r\n carregando(true);\r\n api.post(`NotaFiscal/Incluir`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota incluída com sucesso!` });\r\n if (HasValue(dados.ser_id)) {\r\n if (dados.ope_gerarespelho === true) {\r\n modalAutorizarSefaz(res.data);\r\n openPdfNewTab(`NotaFiscal/GerarEspelhoDanfeNFe?IdNotaFiscal=${res.data.ntf_id}`)\r\n } else {\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && res.data.ntf_docfiscal == true) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }\r\n } else {\r\n imprimirDAVLS(res.data)\r\n }\r\n if (dados.gerarBoleto && !!res.data.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${res.data.ntf_id}`);\r\n }\r\n imprimirComprovantePagamentoIntegrado(res.data);\r\n\r\n if (res.status === 200 && !!dados.vnc_id) {\r\n AlterarSituacaoCondicional(dados.vnc_id);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n setIsSubmitting(false); // Permite novos envios após conclusão\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n function imprimirDAVLS(registro) {\r\n Modal.confirm({\r\n title: 'Qual modelo de impressão deseja?',\r\n icon: ,\r\n okText: 'Não Fiscal',\r\n cancelText: 'Modelo A4',\r\n centered: true,\r\n onOk() {\r\n novaAbaNavegador(`NotaFiscal/Imprimir?id=${registro.ntf_id}`);\r\n },\r\n onCancel() {\r\n imprimirRelatorioJasper(20, { idNotaFiscal: registro.ntf_id });\r\n }\r\n });\r\n };\r\n\r\n function imprimirComprovantePagamentoIntegrado(dados) {\r\n if (dados.ntf_status == 1) {\r\n let formaPagItegrado = dados.notafiscalformapgtos.filter((item) => (HasValue(item.imp_id)))\r\n if (formaPagItegrado.length > 0) {\r\n novaAbaNavegador(`Danfe/GerarComprovantePagamentoViaLoja?IdNotaFiscal=${dados.ntf_id}`);\r\n }\r\n }\r\n }\r\n\r\n function editarNota(dados) {\r\n carregando(true);\r\n api.put(`NotaFiscal/Editar`, dados).then(\r\n res => {\r\n notification.success({ message: 'Sucesso', description: `Nota editada com sucesso!` });\r\n if (HasValue(dados.ser_id)) {\r\n if (dados.ope_gerarespelho === true) {\r\n modalAutorizarSefaz(res.data);\r\n openPdfNewTab(`NotaFiscal/GerarEspelhoDanfeNFe?IdNotaFiscal=${res.data.ntf_id}`)\r\n } else {\r\n if (res.data.ntf_status === 1 && !!res.data.ntf_chavenfe && res.data.ntf_docfiscal == true) {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${res.data.ntf_chavenfe}`);\r\n }\r\n }\r\n } else {\r\n imprimirDAVLS(res.data)\r\n }\r\n if (dados.gerarBoleto && !!res.data.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${res.data.ntf_id}`);\r\n }\r\n\r\n imprimirComprovantePagamentoIntegrado(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data) {\r\n Modal.warning({\r\n content: erro.response.data,\r\n title: 'Aviso',\r\n onOk: () => {\r\n aoSalvar();\r\n }\r\n })\r\n }\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n async function tratarPedidoFaturado(id) {\r\n api.put(`Pedido/TratarHistoricoPedidoFaturado/${id}`).then(\r\n ok => {\r\n console.log(ok);\r\n }).catch(\r\n error => {\r\n console.log(error)\r\n }).finally(() => {\r\n aoSalvar();\r\n });\r\n }\r\n\r\n async function AlterarSituacaoCondicional(id) {\r\n api.put(`VendaCondicional/AlterarSituacaoCondicional?IdCondicional=${id}&SituacaoCondicional=2`).then(\r\n ok => {\r\n console.log(ok);\r\n }).catch(\r\n error => {\r\n console.log(error)\r\n }).finally(() => {\r\n aoSalvar();\r\n });\r\n }\r\n\r\n async function popularDados() {\r\n let valores = form.getFieldsValue();\r\n let dados = form.getFieldValue();\r\n valores.ntf_docfiscal = !!dados.ser_id;\r\n valores.notafiscalitens = popularDadosItens(dados);\r\n valores.notafiscalexportacao = await preencherDadosExportacao(dados);\r\n valores.notaFiscalFaturamento = preencherDadosFaturamento(dados);\r\n valores.notaFiscalDestinatario = await preencherDadosDestinatario(dados);\r\n valores.notaFiscalTransportadora = preencherDadosTransportadores(dados);\r\n valores.tipooperacao = operacaoFiscal;\r\n valores.ope_gerarespelho = operacaoFiscal.ope_gerarespelho;\r\n valores.serieFiscal = preencherDadosSerieFiscal(dados);\r\n\r\n valores.ntf_modalidadefrete = !!valores.notaFiscalTransportadora ? valores.notaFiscalTransportadora.ntf_modalidadefrete : 9;\r\n valores.ntf_dhsaient = HasValue(valores.notaFiscalTransportadora.ntf_dhsaient) ? moment(valores.notaFiscalTransportadora.ntf_dhsaient): null;\r\n return valores;\r\n };\r\n\r\n function popularDadosItens(dados) {\r\n let valorFrete = dados.valorFrete;\r\n let valorSeguro = dados.valorSeguro;\r\n let qtdTotalItens = 0;\r\n let freteUn = 0;\r\n let seguroUn = 0;\r\n dadosItens.forEach((itens) => {\r\n qtdTotalItens += itens.nfi_qtde;\r\n itens.nfi_numeropedidocompra = !!itens.nfi_numeropedidocompra ? itens.nfi_numeropedidocompra.toString() : '';\r\n if (itens.pdi_id) {\r\n itens.itempedidonota = [{ pdi_id: itens.pdi_id }]\r\n }\r\n //itens.nfi_cfop = itens.nfi_cfop.toString();\r\n });\r\n freteUn = valorFrete / qtdTotalItens;\r\n seguroUn = valorSeguro / qtdTotalItens;\r\n dadosItens.forEach((itens) => {\r\n itens.nfi_valorfrete = freteUn * dados.nfi_qtde;\r\n itens.nfi_valorseguro = seguroUn * dados.nfi_qtde;\r\n });\r\n return dadosItens;\r\n };\r\n\r\n function preencherDadosFaturamento() {\r\n let dadosForma = [];\r\n let recebimentoCartao = !!manutencao.dados.recebimentoCartao ? manutencao.dados.recebimentoCartao[0] : null;\r\n listaFormaPagamento.forEach(forma => {\r\n let aux = { ...forma };\r\n aux.fpg_id = forma.fpg_id;\r\n aux.cpg_id = forma.cpg_id;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCheque && !!manutencao.dados.dadosModalCheque) {\r\n aux.ctc_id = manutencao.dados.dadosModalCheque.contaCorrente;\r\n aux.cheques = manutencao.dados.dadosModalCheque.cheques;\r\n }\r\n aux.nfp_valor = parseFloat(forma.pfp_valor);\r\n aux.bce_id = !!recebimentoCartao ? recebimentoCartao.bce_id : null;\r\n aux.rcc_nsu = !!recebimentoCartao ? recebimentoCartao.rcc_nsu : null;\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpValePresente || forma.fpg_tipopagamento === FormaDePagamento.fpCreditoEmLoja) {\r\n aux.antecipacoes = forma.antecipacoes;\r\n } else {\r\n aux.antecipacoes = [];\r\n }\r\n //aux.cheques = [{chq_valor: 0, pes_id: null, chq_dataemissao: null}];\r\n dadosForma.push(aux);\r\n });\r\n return dadosForma;\r\n };\r\n\r\n async function preencherDadosExportacao(dados) {\r\n if (dados.destinoOperacao !== 3)\r\n return null;\r\n\r\n let dadosExp = {};\r\n dadosExp.nte_ufsaidapais = dados.nte_ufsaidapais;\r\n dadosExp.nte_localexporta = dados.nte_localexporta;\r\n dadosExp.nte_localdespacho = dados.nte_localdespacho;\r\n\r\n return dadosExp;\r\n }\r\n\r\n async function preencherDadosDestinatario(form) {\r\n let dadosDestinatario = {};\r\n let subjacente = listaSubjacente?.filter(sub => sub.pop_id === form.ntf_subjacente)[0];\r\n let cliente = (await api.get(`Cliente/BuscarByIdPessoa/${form.pes_id}`)).data;\r\n let enderecoDest = dadosEndereco?.filter(pe => pe.pee_id === form.ntf_endereco)[0];\r\n let telefoneDest = cliente.telefones?.filter(pt => pt.psc_id === form.telefoneDestinatario)[0];\r\n let emailDest = cliente.emails?.filter(pem => pem.pem_id === form.ntf_emaildestinatario)[0];\r\n dadosDestinatario.pes_id = form.pes_id;\r\n dadosDestinatario.pes_fisicajuridica = cliente.pes_fisicajuridica;\r\n dadosDestinatario.ntf_nomedest = subjacente?.pop_nome ?? cliente.pes_nome;\r\n dadosDestinatario.ntf_cnpjcpfdest = (!!cliente.pej_cnpj ? cliente.pej_cnpj : cliente.pef_cpf);\r\n dadosDestinatario.ntf_iedest = form.pej_inscricaoestadual;\r\n dadosDestinatario.ntf_idestrangeirodest = cliente.pes_idestrangeiro;\r\n dadosDestinatario.ntf_logradourodest = enderecoDest?.log_logradouro;\r\n dadosDestinatario.ntf_numeroenderecodest = enderecoDest?.pee_numero ?? form.pee_numero;\r\n dadosDestinatario.ntf_complementodest = enderecoDest?.complemento ?? form.pee_complemento;\r\n dadosDestinatario.ntf_bairrodest = enderecoDest?.bai_nome;\r\n dadosDestinatario.ntf_cepdest = enderecoDest?.cep_cep;\r\n dadosDestinatario.ntf_ufdest = enderecoDest?.est_sigla;\r\n dadosDestinatario.cid_id = enderecoDest?.cid_id;\r\n dadosDestinatario.ntf_telefonedest = telefoneDest?.psc_numero ?? '';\r\n dadosDestinatario.ntf_emaildest = emailDest?.pem_email ?? null;\r\n return dadosDestinatario;\r\n };\r\n\r\n function preencherDadosTransportadores(form) {\r\n let dadosTransportador = {};\r\n let veiculoTransp = listaVeiculos.filter((veiculo) => (veiculo.trv_id = form.trv_id))[0];\r\n dadosTransportador.ntf_modalidadefrete = form.ntf_modalidadefrete;\r\n dadosTransportador.ntf_dhsaient = form.ntf_dhsaient;\r\n dadosTransportador.trn_id = !!dadosTransp && !!dadosTransp.trn_id ? dadosTransp.trn_id : null;\r\n dadosTransportador.trv_id = !!veiculoTransp ? veiculoTransp.trv_id : null;\r\n dadosTransportador.trv_observacao = !!veiculoTransp ? veiculoTransp.trv_observacao : null;\r\n dadosTransportador.trv_placa = !!veiculoTransp ? veiculoTransp.trv_placa : null;\r\n dadosTransportador.trv_uf = !!veiculoTransp ? veiculoTransp.trv_uf : null;\r\n dadosTransportador.trv_marca = !!veiculoTransp ? veiculoTransp.trv_marca : null;\r\n dadosTransportador.trv_modelo = !!veiculoTransp ? veiculoTransp.trv_modelo : null;\r\n dadosTransportador.trv_rntc = !!veiculoTransp ? veiculoTransp.trv_rntc : null;\r\n dadosTransportador.nvl_pesoliquido = form.nvl_pesoliquido;\r\n dadosTransportador.nvl_qtdevolumes = form.nvl_qtdevolumes;\r\n dadosTransportador.nvl_pesobruto = form.nvl_pesobruto;\r\n dadosTransportador.nvl_especievolume = form.nvl_especievolume;\r\n dadosTransportador.nvl_marcavolume = form.nvl_marcavolume;\r\n dadosTransportador.nvl_numeracaovolume = form.nvl_numeracaovolume?.toString();\r\n return dadosTransportador;\r\n };\r\n function preencherDadosSerieFiscal(dados) {\r\n let dadosSerieFiscal = serie.filter((item) => (item.ser_id === dados.ser_id))[0];\r\n return dadosSerieFiscal;\r\n }\r\n function alterarVendedor() {\r\n let dadosVen = vendedores.filter((ven) => (ven.ven_id === parseInt(form.getFieldValue().ven_id)))[0];\r\n setDadosVendedor(dadosVen);\r\n };\r\n function onSuccessAliquotaSimplesNacional() {\r\n setAbreModalSimplesNac(false);\r\n };\r\n\r\n async function buscarCep(cep) {\r\n let retornoCep = await retornaCep(cep);\r\n if (retornoCep !== null) {\r\n form.setFieldsValue({ cidade: `${retornoCep.cid_descricao} / ${retornoCep.est_sigla}` });\r\n }\r\n };\r\n\r\n function oncloseModalEndereco() {\r\n setOpenModalEndereco(false)\r\n };\r\n\r\n useEffect(() => {\r\n if (!!codigoCliente) {\r\n api.get(`Cliente/ListarClientesAtivos?filtro=&ordem=%2Bpes_nome`).then(listaCliente => {\r\n setClientes(listaCliente.data);\r\n }).finally(() => {\r\n form.setFieldsValue({ pes_id: codigoCliente });\r\n let lista = [];\r\n lista.push({ name: \"pes_id\", campo: \"Filtro\", value: codigoCliente });\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n });\r\n }\r\n }, [codigoCliente]);\r\n\r\n useEffect(() => {\r\n if (!!codigoCliente) {\r\n buscarDadosCliente(codigoCliente);\r\n }\r\n }, [clientes]);\r\n\r\n async function popularOperacaoFiscal(id) {\r\n if (!!id) {\r\n api.get(`OperacaoFiscal/Buscar/${id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setOperacaoFiscal(res.data);\r\n form.setFieldsValue({ ntf_indicadorpresenca: res.data.ope_indicadorpresenca });\r\n }\r\n }\r\n ).catch(\r\n error => { console.log(error); }\r\n )\r\n }\r\n };\r\n function verificarConsumidorFinal(ie) {\r\n if (ie != null && ie != undefined)\r\n form.setFieldsValue({ 'ntf_consumidorfinal': 1 });\r\n else\r\n form.setFieldsValue({ 'ntf_consumidorfinal': null });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {!!editando && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n popularOperacaoFiscal(idOperacao)} conteudo={\r\n op => ({op.ope_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {editando && \r\n \r\n \r\n \r\n }\r\n {!editando && pessoaFisica === 2 && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {\r\n proximaPag.setProximaPag(e);\r\n }} current={pages.tagPages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n
\r\n \r\n \r\n \r\n setOpenDrawerCliente(true)}\r\n nameValue=\"pes_id\" allowClear={true} onChangeFunction={(dados) => {\r\n buscarDadosCliente(dados)\r\n }} conteudo={\r\n pc => ({pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n } />\r\n
\r\n \r\n \r\n \r\n {pessoaFisica === 1 &&\r\n \r\n }\r\n {pessoaFisica === 2 &&\r\n \r\n }\r\n {pessoaFisica === 3 &&\r\n \r\n }\r\n \r\n \r\n \r\n { verificarConsumidorFinal(event.currentTarget.value) }}>\r\n \r\n \r\n \r\n { adicionarTelefone() }}\r\n campoDescricao={'psc_numero'}\r\n campoValue={'psc_id'}\r\n campokey={'psc_id'}\r\n placeHolder={'Selecione o Telefone'}\r\n labelFormItem={'Telefone'}\r\n nameFormItem={'telefoneDestinatario'} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \"Endereço\" Endereço\r\n \r\n \r\n \r\n \r\n \r\n {\r\n listaSubjacente.length > 0 &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n\r\n \r\n \r\n \r\n \r\n \r\n {pessoaFisica === 3 && \r\n \r\n ({pse.pse_nome})\r\n } />\r\n \r\n }\r\n {pessoaFisica !== 3 &&\r\n \r\n \r\n ({pse.pse_nome})\r\n } />\r\n \r\n }\r\n {pessoaFisica !== 3 && \r\n { buscarCep(event.currentTarget.value) }} />\r\n }\r\n {pessoaFisica !== 3 && \r\n \r\n \r\n Não sei o CEP\r\n \r\n \r\n }\r\n\r\n \r\n {\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pessoaFisica === 3 && \r\n \r\n \r\n \"Exportação\" Exportação\r\n \r\n \r\n \r\n \r\n \r\n (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n
\r\n }\r\n {pages.tagPages === 1 &&\r\n (end.pee_id === form.getFieldValue().ntf_endereco))[0]}\r\n dadosOperacao={operacaoFiscal}\r\n dadosContribuinte={dadosContribuinte}\r\n dadosVendedor={dadosVendedor}\r\n carregarPagina={setCarregarPagina} />\r\n }\r\n {pages.tagPages === 2 &&\r\n \r\n }\r\n {pages.tagPages === 3 &&\r\n \r\n }\r\n {pages.tagPages === 4 &&\r\n \r\n }\r\n \r\n
\r\n \r\n incluirEndereco(lista)} />\r\n { onCloseModalTelefone() }} />\r\n \r\n
\r\n
\r\n
\r\n );\r\n}","export default __webpack_public_path__ + \"static/media/i-car.ab57d7de.png\";","export default __webpack_public_path__ + \"static/media/i-boleto.3ebe0f30.png\";","import { Button, Col, Divider, Form, Input, Row, Select, Table, Typography, Modal, notification } from 'antd';\r\nimport React, { useState, useEffect } from 'react';\r\nimport { DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport { ModalManutencaoPecasCat } from '../../components/modals';\r\nimport { SelectPaginacao } from '../../components';\r\n\r\n\r\nexport default function GrupoCatalogo({ formulario, formCatalog, listaGrupos, editandoGrp, sequenciaGrp, openDrawer, aoSalvarGrupos }) {\r\n const [listaPecas, setListaPecas] = useState([]);\r\n const [exibirModalPecas, setExibirModalPecas] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [sequencial, setSequencial] = useState(0);\r\n const [subgrupoSelect, setSubgrupoSelect] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!editandoGrp) {\r\n let listaTempGrp = listaGrupos.listaGrupos.find(x => x.Sequencia == sequenciaGrp);\r\n\r\n formulario.setFieldsValue({\r\n codCatalogo: formCatalog.getFieldValue().Codigo,\r\n sequenciaGrp: listaTempGrp.Sequencia,\r\n codigoGrp: listaTempGrp.Codigo,\r\n descricaoGrp: listaTempGrp.Descricao,\r\n codSubGrupo: listaTempGrp.SubGrupo.Codigo,\r\n });\r\n\r\n if (listaTempGrp.Pecas) {\r\n setListaPecas(listaTempGrp.Pecas);\r\n }\r\n\r\n }\r\n\r\n if (!!openDrawer && !editandoGrp) {\r\n formulario.setFieldsValue({ codCatalogo: formCatalog.getFieldValue().Codigo });\r\n formulario.setFieldsValue({ sequenciaGrp: listaGrupos.listaGrupos?.length + 1 });\r\n }\r\n }, [editandoGrp, openDrawer]);\r\n\r\n const editarPecas = (sequencia) => {\r\n setSequencial(sequencia);\r\n setEditando(true);\r\n setExibirModalPecas(true);\r\n }\r\n\r\n const aoSalvar = () => {\r\n setExibirModalPecas(false);\r\n setEditando(false);\r\n }\r\n //VERIFICAR LOGICA EXCLUIR COM SEQUENCIAL\r\n const modalExcluir = (record) => {\r\n const index = listaPecas.findIndex(item => item.Sequencia === record.Sequencia);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: 'Deseja realmente excluir a peça?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerPecas(index);\r\n }\r\n });\r\n }\r\n\r\n const removerPecas = (index) => {\r\n const novaListaPecas = [...listaPecas];\r\n novaListaPecas.splice(index, 1);\r\n\r\n novaListaPecas.forEach((item, index) => {\r\n item.Sequencia = index + 1;\r\n });\r\n\r\n setListaPecas(novaListaPecas);\r\n\r\n }\r\n\r\n function salvar() {\r\n let dados = {};\r\n let subGrupo = subgrupoSelect.find(x => x.key == formulario.getFieldValue().codSubGrupo);\r\n dados.Codigo = formulario.getFieldValue().codigoGrp;\r\n dados.Descricao = formulario.getFieldValue().descricaoGrp;\r\n dados.Sequencia = formulario.getFieldValue().sequenciaGrp;\r\n dados.CaminhoImg = 'null';\r\n dados.SubGrupo = {\r\n Codigo: subGrupo.codSubGrupo,\r\n Descricao: subGrupo.descricao\r\n }\r\n dados.Pecas = [];\r\n dados.Pecas = listaPecas.map(item => {\r\n return { ...item };\r\n });\r\n let lista = [...listaGrupos.listaGrupos];\r\n\r\n if (editandoGrp) {\r\n const index = lista.findIndex(item => item.Sequencia === sequenciaGrp);\r\n if (index !== -1) {\r\n lista[index] = dados;\r\n listaGrupos.setListaGrupos(lista);\r\n }\r\n } else {\r\n lista.push(dados);\r\n listaGrupos.setListaGrupos(lista);\r\n }\r\n\r\n aoSalvarGrupos();\r\n setListaPecas([]);\r\n formulario.resetFields();\r\n }\r\n\r\n const validarCodGrupo = (rules, value, callback) => {\r\n if (value && listaGrupos.listaGrupos.some(grupo => grupo.Codigo === value && grupo.Sequencia !== sequenciaGrp)) {\r\n notification.warning({ description: 'Este código de grupo já existe!', message: 'Aviso!' });\r\n } else if (value && value.length > 9) {\r\n notification.warning({ description: 'Código do grupo deve ser menor que 9 digitos!', message: 'Aviso!' });\r\n formulario.setFieldsValue({ \"codigoGrp\": value.substring(0, 9) });\r\n } else {\r\n callback();\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n (\r\n {est.codSubGrupo} - {est.descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n Peças\r\n \r\n Adicione a(s) peça(s) do Catálogo aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n (\r\n {NumeroItem}\r\n )\r\n },\r\n {\r\n title: \"Cód. Peça\",\r\n align: \"center\",\r\n render: ({ CodPeca }) => (\r\n {CodPeca}\r\n )\r\n }, {\r\n title: \"Descrição\",\r\n align: \"center\",\r\n render: ({ descpeca }) => (\r\n {descpeca}\r\n ),\r\n }, {\r\n title: \"Sequencia\",\r\n align: \"center\",\r\n render: ({ Sequencia }) => (\r\n {Sequencia}\r\n ),\r\n }, {\r\n title: \"Quantidade\",\r\n align: \"center\",\r\n render: ({ Quantidade }) => (\r\n {Quantidade}\r\n ),\r\n }, {\r\n title: \"Observação\",\r\n align: \"center\",\r\n render: ({ Observacoes }) => (\r\n {Observacoes}\r\n ),\r\n }, {\r\n title: 'Ações',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 95,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Input } from 'antd';\r\nimport { MaskedInput } from 'antd-mask-input';\r\n\r\nexport default function InputCpfCnpj(props) {\r\n\r\n const mask = !!props.mask ? props.mask : (props.cpf ? '000.000.000-00' : '00.000.000/0000-00');\r\n\r\n class NovoValor extends React.Component {\r\n\r\n onChange = (e, a) => {\r\n const { value } = e.target;\r\n let data = value;\r\n\r\n this.props.onChange(data.replace(/\\D/g, \"\"));\r\n };\r\n\r\n onBlur = (e) => {\r\n if (!!props.onBlur) {\r\n props.onBlur(e);\r\n }\r\n }\r\n\r\n onKeyUp = e => {\r\n if (!!props.onKeyUp) {\r\n props.onKeyUp(e);\r\n }\r\n }\r\n\r\n onPressEnter = (e) => {\r\n if (!!props.onPressEnter) {\r\n props.onPressEnter(e);\r\n }\r\n };\r\n\r\n onFocus = (e) => {\r\n if (!!props.onFocus) {\r\n props.onFocus(e);\r\n }\r\n };\r\n\r\n onKeyPress = (e) => {\r\n if (!!props.onKeyPress) {\r\n props.onKeyPress(e);\r\n }\r\n };\r\n\r\n render() {\r\n const { value } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n class InputCpfCnpj extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: '' };\r\n }\r\n\r\n onChange = value => {\r\n this.setState({ value });\r\n if (!!props.onChange) {\r\n props.onChange();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useEffect, useRef, useState } from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Form, Select, Button, Switch, Table, Tag, notification, Modal, Input } from \"antd\";\r\nimport { UndoOutlined, EditOutlined, DeleteOutlined, CheckCircleOutlined } from \"@ant-design/icons\";\r\nimport { FormGW, Editar, Excluir, Data } from \"../../components\";\r\nimport api from \"../../services/api\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { ModalDevolucaoCondicional } from \"../../components/modals\";\r\nimport DrawerNFExtra from \"./drawerNFExtra\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function DevolucaoCondicional({ formulario, aoSalvar, dadosItens, exibirDrawerDevolucao, setCarregando, setExibirDrawerNota }) {\r\n\r\n const [formItemCondicional, setFormItemCondicional] = useState([]);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModal, setOpenModal] = useState(false);\r\n const [riscarCampos, setRiscarCampos] = useState(false);\r\n const [checkedSwitch, setCheckedSwitch] = useState(false);\r\n const [dadosDevolucao, setDadosDevolucao] = useState({});\r\n const [quantidadeTot, setQuantidadeTot] = useState(0);\r\n const [valorTot, setValorTot] = useState(0.00);\r\n const codBarras = useRef();\r\n\r\n useEffect(() => {\r\n let dadosTemp = dadosItens.dadosItens;\r\n if (checkedSwitch) {\r\n setRiscarCampos(true);\r\n dadosTemp.forEach((item) => {\r\n item.vci_devolvido = item.vci_quantidade;\r\n item.devolvidoTotal = true;\r\n })\r\n }\r\n else {\r\n setRiscarCampos(false);\r\n dadosTemp.forEach(\r\n (item) => {\r\n item.vci_devolvido = 0;\r\n item.devolvidoTotal = false;\r\n }\r\n )\r\n }\r\n dadosItens.setDadosItens(dadosTemp);\r\n }, [checkedSwitch])\r\n\r\n useEffect(() => {\r\n if (!!!dadosItens.dadosItens || dadosItens.dadosItens.length === 0) {\r\n carregarDados();\r\n }\r\n }, [dadosDevolucao]);\r\n\r\n useEffect(() => {\r\n let dadosTemp = dadosItens.dadosItens;\r\n dadosTemp.forEach((item) => {\r\n if (item.vci_devolvido === item.vci_quantidade) {\r\n item.devolvidoTotal = true;\r\n }\r\n })\r\n }, [dadosItens.dadosItens])\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.length && manutencao.dados.length > 0) {\r\n let key = 0;\r\n manutencao.dados.forEach((item) => {\r\n item.key = key++;\r\n })\r\n dadosItens.setDadosItens(manutencao.dados);\r\n } else {\r\n setDadosDevolucao(manutencao.dados);\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function recalcularTotais(dados) {\r\n let qtd = 0;\r\n let valor = 0;\r\n dados.forEach((dado) => {\r\n qtd += (dado.vci_quantidade - dado.vci_devolvido);\r\n valor += dado.vci_valorun * (dado.vci_quantidade - dado.vci_devolvido);\r\n });\r\n setValorTot(valor);\r\n setQuantidadeTot(qtd);\r\n };\r\n\r\n useEffect(() => {\r\n recalcularTotais(dadosItens.dadosItens);\r\n }, [dadosItens.dadosItens]);\r\n\r\n function desfazerDevolucao(record) {\r\n let dadosTemp = dadosItens.dadosItens;\r\n dadosTemp.filter((item) => { return item.vci_id === record.vci_id })[0].vci_devolvido = 0;\r\n dadosTemp.filter((item) => { return item.vci_id === record.vci_id })[0].devolvidoTotal = false;\r\n dadosItens.setDadosItens(dadosTemp);\r\n recalcularTotais(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosTemp } });\r\n };\r\n\r\n const salvar = (record) => {\r\n let dadosCondicional = {\r\n vnc_id: record.vnc_id,\r\n vendacondicionalitens: dadosItens.dadosItens\r\n }\r\n\r\n let dadosNota = {\r\n vnc_id: record.vnc_id,\r\n pes_id: record.pes_id,\r\n itensNf: dadosItens.dadosItens.filter(item => (item.vci_devolvido !== item.vci_quantidade))\r\n };\r\n setCarregando(true)\r\n api.put(`VendaCondicional/Devolver`, dadosCondicional).then(\r\n (res) => {\r\n if (dadosNota.itensNf.lenght > 0) {\r\n notification.success({ message: 'Operação concluída', description: \"Condicional modificado com sucesso!\" });\r\n dadosNota.vnc_id = res.data.vnc_id;\r\n } else {\r\n notification.success({ message: 'Operação concluída', description: \"Itens da condicional devolvidos com sucesso!\" });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n if (!!dadosNota && dadosNota.itensNf.length > 0) {\r\n dadosNota.pes_id = dadosNota.pes_id;\r\n dadosNota.itensNf.forEach((itens) => {\r\n itens.nfi_qtde = itens.vci_quantidade - itens.vci_devolvido;\r\n itens.nfi_valorunitario = itens.vci_valorun;\r\n itens.percdes = 0;\r\n itens.nfi_valordesconto = 0;\r\n itens.percacresc = 0;\r\n itens.nfi_valoroutros = 0;\r\n itens.nfi_ean = !!itens.prg_ean ? itens.prg_ean : itens.pro_ean;\r\n itens.total = itens.vci_valorun * itens.nfi_qtde;\r\n });\r\n Modal.confirm({\r\n title: 'Sucesso',\r\n icon: ,\r\n content: 'Condicional modificado com sucesso!',\r\n okText: 'Emitir NFE',\r\n cancelText: 'Ok',\r\n okType: 'success',\r\n centered: true,\r\n onOk() {\r\n setExibirDrawerNota(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dadosNota } });\r\n exibirDrawerDevolucao.setExibirDrawerDevolucao(false);\r\n },\r\n onCancel() {\r\n aoSalvar();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n exibirDrawerDevolucao.setExibirDrawerDevolucao(false);\r\n }\r\n });\r\n } else {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n exibirDrawerDevolucao.setExibirDrawerDevolucao(false);\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n setCarregando(false);\r\n\r\n }\r\n );\r\n }\r\n\r\n function excluirItens(record) {\r\n let listaTemp = [...dadosItens.dadosItens];\r\n let itemTemp = listaTemp.filter((item) => (item.key === record.key))[0];\r\n itemTemp.devolvidoTotal = true;\r\n itemTemp.vci_devolvido = itemTemp.vci_quantidade;\r\n dadosItens.setDadosItens(listaTemp);\r\n }\r\n\r\n function carregarDados() {\r\n if (!!dadosDevolucao.vnc_id) {\r\n api.get(`VendaCondicionalItem/Listar?IdVendaCondicional=${dadosDevolucao.vnc_id}`).then(\r\n (res) => {\r\n let key = 0;\r\n res.data.forEach((item) => {\r\n item.key = key++;\r\n if (item.vci_devolvido == item.vci_quantidade)\r\n item.devolvidoTotal = true;\r\n })\r\n dadosItens.setDadosItens(res.data);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function editarQuantidadeDev(record) {\r\n setFormItemCondicional(record);\r\n };\r\n\r\n async function onPressEnterProCodigo(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let listaTemp = [...dadosItens.dadosItens];\r\n let itemEncontrado = false;\r\n let todosItensDevolvidos = true;\r\n for (let i = 0; i < listaTemp.length; i++) {\r\n if (listaTemp[i].pro_ean === codigoEan || listaTemp[i].prg_ean === codigoEan) {\r\n itemEncontrado = true;\r\n if (listaTemp[i].vci_quantidade - listaTemp[i].vci_devolvido > 0) {\r\n todosItensDevolvidos = false;\r\n listaTemp[i].vci_devolvido++;\r\n if (listaTemp[i].vci_quantidade - listaTemp[i].vci_devolvido === 0) {\r\n listaTemp[i].devolvidoTotal = true;\r\n }\r\n dadosItens.setDadosItens(listaTemp);\r\n break;\r\n }\r\n }\r\n };\r\n if (itemEncontrado == false) {\r\n return (\r\n notification.warning({\r\n message: \"Aviso\",\r\n description: \"Item não encontrado!\",\r\n })\r\n )\r\n }\r\n if (todosItensDevolvidos == true) {\r\n return (\r\n notification.warning({\r\n message: \"Aviso\",\r\n description: \"Quantidade totalmente devolvida para este produto!\",\r\n })\r\n )\r\n }\r\n formulario.setFieldsValue({ pro_codigo: null });\r\n\r\n setarFocoProduto();\r\n };\r\n\r\n function setarFocoProduto() {\r\n setTimeout(() => {\r\n if (codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }, 300);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setCheckedSwitch(!checkedSwitch)} /> Devolver Todos os Itens?\r\n \r\n \r\n \r\n \r\n {\r\n onPressEnterProCodigo(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n \r\n
\r\n
(\r\n \r\n {(!!riscarCampos || devolvidoTotal ? ( #{pro_codigo} ) : (#{pro_codigo}))}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Itens',\r\n width: '35%',\r\n render: ({ pro_descricao, pro_ean, prg_ean, descricaograde, devolvidoTotal }) => (\r\n
\r\n \r\n
\r\n {(!!riscarCampos || devolvidoTotal ? ( {pro_descricao} ) : (pro_descricao))}\r\n \r\n \r\n \r\n \r\n {(!!riscarCampos || devolvidoTotal ? ( EAN: {pro_ean || prg_ean} ) : (EAN: {pro_ean || prg_ean}))}\r\n \r\n \r\n {(!!descricaograde ? (!!riscarCampos || devolvidoTotal ? ( Grade: {descricaograde} ) : (Grade: {descricaograde})) : '')}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Nº',\r\n width: '2%',\r\n render: ({ vci_sequencia }) => (\r\n
\r\n {vci_sequencia}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: '8%',\r\n render: ({ vci_quantidade, devolvidoTotal, vci_devolvido }) => (\r\n
\r\n {(!!riscarCampos || devolvidoTotal ? (Ficou com: {vci_quantidade - vci_devolvido}) : (Ficou com: {vci_quantidade - vci_devolvido} ))}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: '12%',\r\n editable: true,\r\n render: ({ devolvidoTotal, vci_devolvido }, record) => (\r\n
\r\n \r\n
\r\n {(!!riscarCampos || devolvidoTotal ? ( Devolveu: {vci_devolvido} ) : (vci_devolvido > 0) ? Devolveu: {vci_devolvido} : )}\r\n \r\n \r\n {(!!riscarCampos || devolvidoTotal ? ((Todos)) : )}\r\n \r\n \r\n {(!!riscarCampos || vci_devolvido > 0 ? \r\n {\r\n editarQuantidadeDev(record);\r\n }} icon={} />\r\n */}\r\n \r\n excluirItens(record)} icon={} />\r\n \r\n \r\n \r\n },\r\n },\r\n ]} dataSource={dadosItens.dadosItens} />\r\n \r\n \r\n setOpenModal(false)} dados={formItemCondicional} dadosItens={dadosItens.dadosItens} formularioDados={formulario} />\r\n \r\n \r\n \r\n Quantidade Total de Itens: {quantidadeTot}\r\n \r\n \r\n Valor Total dos Itens (R$): {FormatNumber(valorTot, true)}\r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\nimport { Row, Col, Button, Drawer, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport DevolucaoCondicional from './devolucao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\nimport { useStateValue } from '../../state';\r\nimport api from '../../services/api';\r\n\r\n\r\nexport default function DrawerDevolucao({ exibirDrawerDevolucao, dataPesquisa,setExibirDrawerNota }) {\r\n\r\n const [formManutencao] = Form.useForm()\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [dadosItens, setDadosItens] = useState([]);\r\n\r\n if (!!manutencao.dados) {\r\n manutencao.dados.vnc_datalancamento = moment(manutencao.dados.vnc_datalancamento);\r\n manutencao.dados.vnc_prazoretorno = moment(manutencao.dados.vnc_prazoretorno);\r\n formManutencao.setFieldsValue(manutencao.dados);\r\n dadosItens.sort((a, b) => b.vci_sequencia - a.vci_sequencia);\r\n } else {\r\n // formManutencao.resetFields();\r\n formManutencao.setFieldsValue({ icm_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n formManutencao.resetFields();\r\n setDadosItens([]);\r\n exibirDrawerDevolucao.setExibirDrawerDevolucao(false);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer()\r\n }\r\n });\r\n };\r\n\r\n return (\r\n\r\n { fecharDrawer() }}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n\r\n \r\n\r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Form, Select, notification } from 'antd';\r\n\r\nimport api from '../../services/api';\r\nimport { getEmpresa, getNomeEmpresa, getTelaAnterior, login, setCnpjEmpresa, setEmpresa, setLocal, setNomeEmpresa, setNomeLocal, setRegimeTributario, setStatusFilial } from '../../services/auth';\r\nimport { selectPaginadoActions } from '../../actions';\r\nimport { useStateValue } from '../../state';\r\nimport { SelectPaginacao } from '../../components';\r\n\r\nexport default function SelecoesEmpresa({ veioDaHome = false, exibirModal = false }) {\r\n const [codigoEmpresa, setCodigoEmpresa] = useState(null);\r\n const [codigoLocal, setCodigoLocal] = useState(null);\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n\r\n const [formLogin] = Form.useForm();\r\n const acessar = values => {\r\n buscarTela();\r\n };\r\n\r\n useEffect(() => {\r\n if (!!formLogin.getFieldValue()?.emp_id) {\r\n carregarLocais(formLogin.getFieldValue()?.emp_id);\r\n setCodigoEmpresa(formLogin.getFieldValue()?.emp_id);\r\n }\r\n\r\n }, [formLogin.getFieldValue().emp_id]);\r\n\r\n // useEffect(() => {\r\n // if (!!listaSelectPaginacao?.itens && !veioDaHome) {\r\n // validaLocalUnico();\r\n // }\r\n // }, [listaSelectPaginacao]);\r\n\r\n useEffect(() => {\r\n setCodigoLocal(formLogin.getFieldValue().filial);\r\n }, [formLogin.getFieldValue().filial]);\r\n\r\n useEffect(() => {\r\n if (!!codigoLocal) {\r\n carregarDadosEmpresa();\r\n }\r\n }, [codigoLocal]);\r\n\r\n useEffect(() => {\r\n if (!!veioDaHome) {\r\n buscarEmpresaUnica();\r\n }\r\n }, [exibirModal]);\r\n\r\n function buscarEmpresaUnica() {\r\n let lista = [];\r\n let codigo = getEmpresa();\r\n lista.push({ name: \"emp_id\", campo: \"idEmpresa\", value: codigo });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n setCodigoEmpresa(codigo);\r\n }\r\n async function carregarDadosEmpresa() {\r\n let values = {};\r\n values.emp_id = codigoEmpresa;\r\n values.loc_id = codigoLocal;\r\n const listaEmpresa = (await api.get(`Empresa/Buscar/${codigoEmpresa}`)).data;\r\n await api.post('Local/GerarTokenLogin', values).then(res => {\r\n if (res.status === 200) {\r\n login(res.data);\r\n setEmpresa(codigoEmpresa);\r\n setLocal(codigoLocal);\r\n setNomeEmpresa(listaEmpresa.emp_razaosocial);\r\n setRegimeTributario(listaEmpresa.emp_regimetributario);\r\n api.get(`Local/GetLocalById/${codigoLocal}`).then(\r\n res => {\r\n if (!!res.data) {\r\n let listaLocal = res.data;\r\n setNomeLocal(listaLocal.loc_descricao);\r\n setCnpjEmpresa(listaLocal.loc_cnpj?.numero);\r\n setStatusFilial(listaLocal.loc_ativo);\r\n buscarTela();\r\n }\r\n }\r\n )\r\n }\r\n }).catch(err => {\r\n if (!!err && !!err.response && !!err.response.data) {\r\n notification.error({ message: err.response.data || 'Falha ao efetuar o login' });\r\n } else {\r\n notification.error({ message: 'Falha ao efetuar o login', description: 'Verifique os dados informados e tente novamente.' });\r\n }\r\n });\r\n }\r\n\r\n function carregarLocais(codEmpresa) {\r\n let lista = [];\r\n lista.push({ name: \"filial\", campo: \"codigoEmpresa\", value: codEmpresa });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n function buscarTela() {\r\n if (!!getTelaAnterior()) {\r\n if (window.location.hash.replace('#', '') === getTelaAnterior()) {\r\n window.location.reload();\r\n } else {\r\n window.location = `/Home#${getTelaAnterior()}`;\r\n if (window.location.hash !== '' && window.location.hash !== '#/') {\r\n window.location.reload();\r\n }\r\n }\r\n } else {\r\n window.location = \"/Home\";\r\n }\r\n };\r\n\r\n function validaLocalUnico() {\r\n if (listaSelectPaginacao?.itens?.length === 1 && !!listaSelectPaginacao?.itens[0].loc_id) {\r\n setCodigoLocal(listaSelectPaginacao?.itens[0].loc_id);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n {\r\n setCodigoEmpresa(value);\r\n }} order=\"emp_razaosocial\"\r\n conteudo={\r\n e => ({e.emp_nomefantasia}
Razao Social: {e.emp_razaosocial}
)\r\n } />\r\n
\r\n \r\n \r\n {formLogin.getFieldValue()?.emp_id && \r\n \r\n \r\n \r\n setCodigoLocal(valor)} \r\n conteudo={\r\n Local => ({Local.loc_descricao}{!Local.loc_ativo ? ' (INATIVO)' : ''})\r\n } />\r\n \r\n \r\n }\r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Form, Input, Button, notification } from 'antd';\r\nimport { MailOutlined, ArrowLeftOutlined, SendOutlined } from '@ant-design/icons';\r\nimport api from '../../services/api';\r\n\r\nexport default function EsqueciSenha({ onAcessar, formulario }) {\r\n\r\n\r\n function enviarEmailRecuperarSenha() {\r\n let emailUsuario = formulario.getFieldValue().email;\r\n if (!!emailUsuario) {\r\n api.put(`Usuario/EnviarEmailRecuperarSenha/${emailUsuario}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Enviamos um E-mail para você com as instruções para recuperar sua senha!\" })\r\n }\r\n ).catch(\r\n error => {\r\n notification.warning({ message: `AVISO!`, description: `Usuário não encontrado!` });\r\n }\r\n )\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Select } from 'antd';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { selectPaginadoActions } from '../../actions';\r\n\r\nexport default function SelectPaginado({\r\n url, name, hidden = false, form, allowClear = true, order = \"\", placeholder = \"Selecione um registro\", onChangeFunction, onBlurFunction, onClearFunction, conteudo, campoFiltro = \"filtro\", multiple = false, setarPrimeiroReg = false, disabled = false\r\n}) {\r\n const [{ manutencao, selectPaginado }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [lista, setLista] = useState([]);\r\n const [filtro, setFiltro] = useState('');\r\n const [pagina, setPagina] = useState(1);\r\n const [registrosPorPagina, setRegistrosPorPagina] = useState(50);\r\n const [alterouPag, setAlterouPag] = useState(false);\r\n const [campoDescricao, setCampoDescricao] = useState(null);\r\n const [valor, setValor] = useState(null);\r\n const [primeiroReg, setPrimeiroReg] = useState(setarPrimeiroReg);\r\n\r\n useEffect(() => {\r\n if (pagina === 1) {\r\n carregarDados();\r\n } else {\r\n setPagina(1);\r\n setAlterouPag(true);\r\n }\r\n }, [filtro]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, [pagina]);\r\n\r\n useEffect(() => {\r\n if (!!lista && selectPaginado?.length > 0) {\r\n let lista = [...selectPaginado];\r\n let item = selectPaginado.find(s => { return s.name === name });\r\n if (!!item && !!item.value) {\r\n if (!!item.campo) {\r\n setCampoDescricao(item.campo);\r\n }\r\n setPagina(1);\r\n setFiltro(item.value);\r\n let idx = lista.indexOf(item);\r\n lista.splice(idx, 1);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } })\r\n }\r\n }\r\n }, [selectPaginado]);\r\n\r\n useEffect(() => {\r\n setValor(form.getFieldValue([name]));\r\n }, [form.getFieldValue([name])]);\r\n\r\n async function carregarDados() {\r\n let parametrosUrl = \"\";\r\n !!filtro ? parametrosUrl = `&${!!campoDescricao ? campoDescricao : campoFiltro}=${filtro}` : parametrosUrl = \"\";\r\n if (!!campoDescricao) {\r\n setCampoDescricao(null);\r\n }\r\n\r\n if (!!order) {\r\n parametrosUrl += `&order=${order}`;\r\n }\r\n parametrosUrl += `&PageNumber=${pagina}&PageSize=${registrosPorPagina}`;\r\n if (url.search(/[?]/g) === -1) {\r\n parametrosUrl = parametrosUrl.replace('&', '?');\r\n }\r\n setCarregando(true);\r\n let res = await api.get(`${url}${parametrosUrl}`);\r\n setCarregando(false);\r\n if (res.status == 200) {\r\n let indice = 0;\r\n let dados = [];\r\n\r\n if (filtro !== '' || alterouPag) {\r\n if (pagina > 1) {\r\n indice = lista.length;\r\n let l = [...lista];\r\n l.forEach(i => {\r\n dados.push(i);\r\n });\r\n res.data?.items?.map((item, idx) => {\r\n item.key = indice;\r\n dados.push(item);\r\n indice++;\r\n });\r\n setLista(dados);\r\n } else {\r\n res.data?.items?.map((item, idx) => {\r\n item.key = indice;\r\n dados.push(item);\r\n indice++;\r\n });\r\n setLista(dados);\r\n }\r\n setAlterouPag(false);\r\n } else {\r\n setPagina(1);\r\n res.data?.items?.map((item, idx) => {\r\n item.key = indice;\r\n dados.push(item);\r\n indice++;\r\n });\r\n setLista(dados);\r\n }\r\n if (primeiroReg && !!filtro && !!selectPaginado && !!selectPaginado.find(s => { return s.name === name })) {\r\n onChange(!!dados[0]?.id ? dados[0].id : null);\r\n }\r\n }\r\n };\r\n\r\n function onPopUpScroll(e) {\r\n const { target } = e;\r\n if (parseFloat(Math.round(target.scrollTop + target.offsetHeight).toFixed(2)) === target.scrollHeight || parseFloat(Math.round(target.scrollTop + target.offsetHeight).toFixed(2)) === target.scrollHeight - 1) {\r\n setPagina(pagina + 1);\r\n setAlterouPag(true);\r\n }\r\n };\r\n\r\n function onChange(valor) {\r\n if (!form) {\r\n console.log(\"Form não definido para o componente de select!\");\r\n } else {\r\n if (!valor) {\r\n setFiltro('');\r\n }\r\n setValor(valor);\r\n form.setFieldsValue({ [name]: valor });\r\n }\r\n if (!!onChangeFunction && (!!valor || valor == 0)) {\r\n onChangeFunction(valor);\r\n }\r\n };\r\n\r\n function onBlur(valor) {\r\n if (!!onBlurFunction) {\r\n onBlurFunction(valor);\r\n }\r\n };\r\n\r\n function onClear(valor) {\r\n if (!!onClearFunction) {\r\n onClearFunction(valor);\r\n }\r\n };\r\n\r\n return (\r\n
{\r\n return expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n );\r\n }}\r\n\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }}\r\n rowSelection={selecionarItem ? { type: tipo, ...configSelecionarItem, ...configSelecionarRadio } : null}\r\n scroll={{ x: 920 }} footer={footerTabela} showHeader={headerTabela} columnWidth={30} \r\n />\r\n )\r\n}\r\n\r\nTabelaDados.propTypes = {\r\n colunas: PropTypes.array.isRequired,\r\n url: PropTypes.string.isRequired,\r\n paginacao: PropTypes.bool\r\n}\r\n\r\nexport default TabelaDados;","export default __webpack_public_path__ + \"static/media/i-saida.8a117db2.png\";","export default __webpack_public_path__ + \"static/media/i-bill.b0a3eb23.png\";","import React, { useState } from \"react\";\r\nimport { Input, Form } from \"antd\";\r\n\r\n/*\r\n Ao utilizar o componente não setar valor para constantes como por exemplo setValorPedido(valor), pois isso fará com que o focus saia do input\r\n*/\r\n\r\nexport default function InputQuantidade(props) {\r\n\r\n /* props.percent ou props.cifrao removido, pois ao tentar utilizar o backspace não funciona */\r\n function formatNumber(value) {\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n if (!(!!value) || isNaN(value)) {\r\n value = !!props.initialValue ? props.initialValue : '0.00';\r\n }\r\n value = parseFloat(value).toFixed(precisao);\r\n value += '';\r\n const list = value.split('.');\r\n const prefix = list[0].charAt(0) === '-' ? '-' : '';\r\n let num = prefix ? list[0].slice(1) : list[0];\r\n let result = '';\r\n while (num.length > 3) {\r\n result = `.${num.slice(-3)}${result}`;\r\n num = num.slice(0, num.length - 3);\r\n }\r\n if (num) {\r\n result = num + result;\r\n }\r\n\r\n let aposVirgula = '';\r\n while (aposVirgula.length < precisao) aposVirgula = \"0\" + aposVirgula;\r\n let resultado = precisao == 0 ? '' : ',' + aposVirgula;\r\n\r\n return `${prefix}${result}${list[1] ? `,${list[1]}` : resultado}`;\r\n }\r\n\r\n class InputValor extends React.Component {\r\n onChange = e => {\r\n const { value } = e.target;\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n let valorTemp = value;\r\n valorTemp = valorTemp.replace('', '');\r\n valorTemp = valorTemp.replaceAll(',', '').replaceAll('.', '');\r\n if (parseFloat(valorTemp).toString().length <= precisao) {\r\n let zeros = '0'.repeat(precisao);\r\n let valDivisao = 1 + zeros;\r\n valorTemp = parseFloat(valorTemp / valDivisao).toFixed(precisao);\r\n } else {\r\n valorTemp = valorTemp.slice(0, valorTemp.length - precisao) + '.' + valorTemp.slice(valorTemp.length - precisao);\r\n }\r\n valorTemp = valorTemp.toString();\r\n const reg = /^-?\\d*(\\.\\d*)?$/;\r\n if ((!isNaN(valorTemp) && reg.test(valorTemp)) || valorTemp === '' || valorTemp === '-') {\r\n this.props.onChange(valorTemp);\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n const { value, onBlur, onChange } = this.props;\r\n if (!!value) {\r\n let valueTemp = value.toString();\r\n if (valueTemp.charAt(valueTemp.length - 1) === '.' || valueTemp === '-') {\r\n valueTemp = valueTemp.slice(0, -1);\r\n }\r\n onChange(valueTemp.replace(/0*(\\d+)/, '$1'));\r\n if (onBlur) {\r\n onBlur();\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const { value } = this.props;\r\n let valor = value;\r\n if (props.somenteValorPositivo !== null && props.somenteValorPositivo !== undefined) {\r\n valor = parseFloat(value);\r\n if (!!props.somenteValorPositivo) {\r\n if (valor < 0) {\r\n valor = valor * -1;\r\n }\r\n }\r\n valor = valor.toString();\r\n if (valor.indexOf('.') > -1 && valor.split('.')[1].length < 2) {\r\n valor += '0';\r\n }\r\n }\r\n return (\r\n (this.myInputRef = c)}\r\n {...this.props}\r\n value={formatNumber(valor)}\r\n disabled={!!props.disabled}\r\n onChange={this.onChange}\r\n onBlur={this.onBlur}\r\n style={!!props.style ? props.style : {}}\r\n onFocus={this.onFocus}\r\n precision={!!props.precision ? props.precision : 2}\r\n placeholder={!!props.placeholder ? props.placeholder : ''}\r\n maxLength={18}\r\n className='text-right'\r\n />\r\n );\r\n }\r\n };\r\n\r\n class NumericInputDemo extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: 0 };\r\n }\r\n\r\n onChange = value => {\r\n this.setState({ value });\r\n if (!!props.onChange) {\r\n props.onChange();\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n if (!!props.onBlur) {\r\n props.onBlur();\r\n }\r\n };\r\n\r\n onPressEnter = () => {\r\n if (!!props.onPressEnter) {\r\n props.onPressEnter();\r\n }\r\n };\r\n\r\n onFocus = () => {\r\n if (!!props.onFocus) {\r\n props.onFocus();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n \r\n\r\n );\r\n}","import React, { Children, useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Card, Modal, Spin } from \"antd\";\r\nimport { CheckOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function ModalProcessoLento(props) {\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n O Processo pode demorar um pouco!\r\n \r\n
\r\n
\r\n {props.children}\r\n
\r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Col, Form, Input, InputNumber, Row, Select, Modal, Divider, Typography, notification } from 'antd';\r\nimport { CheckCircleOutlined } from '@material-ui/icons';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { info } from '../../services/funcoes';\r\nimport { Data, FormGW, InputPreco } from \"../../components\";\r\nimport { getEmpresa } from '../../services/auth';\r\n\r\nexport default function LancamentoTransferencia({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaFiliais, setListaFiliais] = useState([]);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [listaContaCorrenteDestino, setListaContaCorrenteDestino] = useState([]);\r\n const [listaContaGerencialOrigem, setListaContaGerencialOrigem] = useState([]);\r\n const [listaContaGerencialAgrupadorOrigem, setListaContaGerencialAgrupadorOrigem] = useState([]);\r\n const [listaContaGerencialDestino, setListaContaGerencialDestino] = useState([]);\r\n const [listaContaGerencialAgrupadorDestino, setListaContaGerencialAgrupadorDestino] = useState([]);\r\n\r\n\r\n useEffect(() => {\r\n api.get(`Local/Listar?Ativo=true&CodigoEmpresa=${getEmpresa()}&PageSize=500&PageNumber=1`).then(\r\n res => {\r\n setListaFiliais(res.data.items);\r\n });\r\n api.get(`contaCorrente/ListarContasParaTransferencia?filtro=&codigoContaCorrente=&ordem=+ctc_descricao`).then(res => {\r\n setListaContaCorrente(res.data);\r\n });\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&CodReceitaDespesa=1`).then(res => {\r\n setListaContaGerencialAgrupadorOrigem(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencialOrigem(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&CodReceitaDespesa=2`).then(res => {\r\n setListaContaGerencialAgrupadorDestino(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencialDestino(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n listarContaDestino(null);\r\n formulario.setFieldsValue({ mcc_datahora: moment(new Date()) });\r\n }, []);\r\n\r\n function listarContaDestino(filial) {\r\n filial = !!filial ? `&IdLocalTransferencia=${filial}` : '';\r\n api.get(`contaCorrente/ListarContasParaTransferencia?filtro=&codigoContaCorrente=&ordem=+ctc_descricao${filial}`).then(res => {\r\n setListaContaCorrenteDestino(res.data);\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.ctc_id) {\r\n manutencao.dados.ctc_id_origem = manutencao.dados.ctc_id;\r\n formulario.setFieldsValue(manutencao.dados);\r\n } else {\r\n formulario.setFieldsValue({ ctc_id: null, mcc_datahora: moment(new Date()) });\r\n }\r\n }, [ui.showDrawerTransferencia]);\r\n\r\n const salvarManutencao = (values) => {\r\n values.pes_id = null;\r\n values.mcc_id = null;\r\n values.mcc_entradasaida = 3;\r\n values.ctgorigem = { ctg_id: values.ctg_id_origem };\r\n values.ctgdestino = { ctg_id: values.ctg_id_destino };\r\n values.ctcorigem = { ctc_id: values.ctc_id_origem };\r\n values.ctcdestino = { ctc_id: values.ctc_id_destino };\r\n values.localdestino = { loc_id: formulario.getFieldsValue().loc_id };\r\n values.mcc_numerodocumento = !!values.mcc_numerodocumento ? values.mcc_numerodocumento.toString() : '';\r\n values.mcc_valor = parseFloat(values.mcc_valor);\r\n if(values.ctcorigem.ctc_id == values.ctcdestino.ctc_id){\r\n notification.warning({ message: `Aviso!`, description: `Conta corrente ORIGEM não pode ser a mesma que a Conta corrente DESTINO, Verifique!` });\r\n return;\r\n }\r\n carregando(true);\r\n api.post('/MovimentoContaCorrente/IncluirLancamentoCaixa', values).then(res => {\r\n if (res.status === 200) {\r\n Modal.confirm({\r\n title: 'Lançamento de Transferência incluído com sucesso!',\r\n icon: ,\r\n content: '',\r\n okText: 'Incluir mais um',\r\n cancelText: 'OK',\r\n centered: true,\r\n onOk() {\r\n carregando(false);\r\n formulario.resetFields();\r\n formulario.setFieldsValue({ mcc_datahora: moment(new Date()) });\r\n },\r\n onCancel() {\r\n aoSalvar();\r\n carregando(false);\r\n }\r\n });\r\n }\r\n }).catch(err => {\r\n info(\"Não foi possível realizar o lançamento!\");\r\n }).finally(() => {\r\n carregando(false);\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \"Transferência\" De\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaContaGerencialAgrupadorOrigem.map(item => (\r\n \r\n {listaContaGerencialOrigem.filter((conta) => { return conta.ctc_id === item.ctc_id }).map(conta => (\r\n {conta.ctg_descricao}\r\n ))}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Para\" Para\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n return { label: item.ctc_descricao, value: item.ctc_id, key: item.ctc_id }\r\n })} filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} placeholder=\"Selecione uma Conta Corrente Destino\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Radio, Form, Col, Row, Select, Input, InputNumber, Button, Switch, Collapse, Modal, Table, notification, RadioChangeEvent } from 'antd';\r\nimport { ArrowUpOutlined, ArrowDownOutlined, SearchOutlined, CheckCircleOutlined } from '@ant-design/icons';\r\nimport moment from 'moment';\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { Data, FormGW, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { FormatNumber, FormatDate } from '../../ValueObjects/';\r\nimport SelectPaginado from '../../components/selectPaginado';\r\nimport { MaskFormat } from '../../ValueObjects/index';\r\nimport { HasValue } from '../../services/funcoes';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function LancamentoCaixaManutencao({ formulario, carregando, aoSalvar, initialValues }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [acompanharLancamentos, setAcompanharLancamentos] = useState(false);\r\n const [openPesquisaAvancada, setOpenPesquisaAvancada] = useState(false);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [listaContaGerencial, setListaContaGerencial] = useState([]);\r\n const [listaContaGerencialAgrupador, setListaContaGerencialAgrupador] = useState([]);\r\n const [listaContaGerencialPesquisa, setListaContaGerencialPesquisa] = useState([]);\r\n const [listaContaGerencialAgrupadorPesquisa, setListaContaGerencialAgrupadorPesquisa] = useState([]);\r\n const [listaCaixa, setListaCaixa] = useState([]);\r\n const [saldoAtualConta, setSaldoAtualConta] = useState(null);\r\n const [saldoAnteriorConta, setSaldoAnteriorConta] = useState(null);\r\n const togglePesquisa = () => {\r\n setOpenPesquisaAvancada(!openPesquisaAvancada);\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`contaCorrente/ListarContasParaTransferencia?filtro=&codigoContaCorrente=&ordem=+ctc_descricao`).then(res => {\r\n setListaContaCorrente(res.data);\r\n });\r\n buscarDadosContaGerencial(manutencao.dados.operacao);\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=`).then(res => {\r\n setListaContaGerencialAgrupadorPesquisa(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencialPesquisa(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n manutencao.dados.mcc_datahora = moment(new Date());\r\n manutencao.dados.mcc_entradasaida = manutencao.dados.operacao;\r\n manutencao.dados.dataInicial = moment(new Date());\r\n manutencao.dados.dataFinal = moment(new Date());\r\n formulario.setFieldsValue(manutencao.dados);\r\n buscarSaldoConta();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function reverse(lista) {\r\n let retorno = [];\r\n\r\n for (let i = lista.length - 1; i >= 0; i--) {\r\n retorno.push(lista[i])\r\n }\r\n return retorno;\r\n };\r\n\r\n function buscarDadosContaGerencial(value) {\r\n api.get(`ContaGerencial/ListarAtivosEstruturadoPelaCategoria?filtro=&CodReceitaDespesa=${value}`).then(res => {\r\n setListaContaGerencialAgrupador(res.data.filter((item) => { return item.podeSelecionar === false }));\r\n setListaContaGerencial(res.data.filter((item) => { return item.podeSelecionar === true }));\r\n });\r\n };\r\n\r\n\r\n\r\n function listarCaixa() {\r\n let saldoAnterior = 0;\r\n let lista = [];\r\n if (HasValue(formulario.getFieldValue().ctc_id)) {\r\n if (!!formulario.getFieldValue().dataInicial && !!formulario.getFieldValue().dataFinal && !!formulario.getFieldValue().ctc_id) {\r\n api.get(`ContaCorrente/BuscarSaldoAnteriorContaCorrente?idContaCorrente=${formulario.getFieldValue().ctc_id}&dataBase=${FormatDate(formulario.getFieldValue().dataInicial.toDate().toLocaleDateString())}`).then(res => {\r\n setSaldoAnteriorConta(res.data);\r\n saldoAnterior = res.data;\r\n });\r\n let url = `MovimentoContaCorrente/ListarCaixa?IdContaCorrente=${formulario.getFieldValue().ctc_id}\r\n &dataInicial=${FormatDate(formulario.getFieldValue().dataInicial.toDate().toLocaleDateString())}\r\n &dataFinal=${FormatDate(formulario.getFieldValue().dataFinal.toDate().toLocaleDateString())}&ordem=-mcc_dataHora`;\r\n\r\n if (!!formulario.getFieldValue().ctg_id_consulta) {\r\n url += `&IdContaGerencial=${formulario.getFieldValue().ctg_id_consulta}`;\r\n }\r\n if (!!formulario.getFieldValue().valor_consulta && formulario.getFieldValue().valor_consulta > 0) {\r\n url += `&FiltroValor=${parseFloat(formulario.getFieldValue().valor_consulta)}`;\r\n }\r\n\r\n api.get(url).then(res => {\r\n lista = res.data;\r\n lista = reverse(lista);\r\n lista.forEach((caixa) => {\r\n if (caixa.mcc_entradasaida === 1) {\r\n saldoAnterior -= parseFloat(caixa.mcc_valor);\r\n } else if (caixa.mcc_entradasaida === 2) {\r\n saldoAnterior += parseFloat(caixa.mcc_valor);\r\n }\r\n caixa.saldoAnterior = saldoAnterior;\r\n });\r\n lista = reverse(lista);\r\n setListaCaixa(lista);\r\n });\r\n }\r\n }else{\r\n notification.warning({ message: `Aviso!`, description: `Favor informar a Conta Corrente para a pesquisa!` });\r\n }\r\n };\r\n\r\n function salvarManutencao(values) {\r\n values.mcc_id = null;\r\n values.mcc_valor = parseFloat(values.mcc_valor);\r\n values.mcc_entradasaida = parseInt(values.mcc_entradasaida);\r\n values.mcc_numerodocumento = !!values.mcc_numerodocumento ? values.mcc_numerodocumento.toString() : '';\r\n carregando(true);\r\n api.post('/MovimentoContaCorrente/IncluirLancamentoCaixa', values).then(\r\n res => {\r\n Modal.confirm({\r\n title: 'Lançamento adicionado com sucesso!',\r\n icon: ,\r\n content: '',\r\n okText: 'Incluir mais um',\r\n cancelText: 'OK',\r\n centered: true,\r\n onOk() {\r\n // carregando(false);\r\n formulario.resetFields();\r\n formulario.setFieldsValue({ mcc_datahora: moment(new Date()), mcc_entradasaida: manutencao.dados });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: manutencao.dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerManutencaoCaixa: true } });\r\n },\r\n onCancel() {\r\n aoSalvar();\r\n carregando(false);\r\n }\r\n });\r\n }).catch(\r\n err => {\r\n notification.warning({ message: `Aviso!`, description: `Não foi possivel realizar o lançamento!` });\r\n }\r\n ).finally(() => {\r\n carregando(false)\r\n aoSalvar();;\r\n });;\r\n };\r\n\r\n async function buscarSaldoConta() {\r\n let saldoAnterior = 0;\r\n if (!!formulario.getFieldValue().ctc_id) {\r\n await api.get(`ContaCorrente/ListarSaldoContaCorrente?tipoLancamento=1`).then(\r\n res => {\r\n saldoAnterior = res.data.filter(item => (item.ctc_id === formulario.getFieldValue().ctc_id))[0].saldo;\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n setSaldoAtualConta(saldoAnterior);\r\n\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n buscarDadosContaGerencial(e.target.value)} buttonStyle=\"solid\" optionType=\"button\" size=\"middle\">\r\n Entrada\r\n Saída\r\n \r\n \r\n \r\n \r\n
\r\n Saldo Atual da Conta (R$)\r\n
\r\n \r\n {FormatNumber(saldoAtualConta, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaContaGerencialAgrupador.map(item => (\r\n \r\n {listaContaGerencial.filter((conta) => { return conta.ctc_id === item.ctc_id }).map(conta => (\r\n {conta.ctg_descricao}\r\n ))}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n ({pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n } />\r\n
\r\n \r\n \r\n \r\n ({h.his_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setAcompanharLancamentos(checked)} /> Desejo acompanhar os lançamentos realizados na conta corrente selecionada\r\n \r\n \r\n \r\n {acompanharLancamentos &&\r\n
\r\n \r\n
\r\n \r\n \r\n {openPesquisaAvancada ? : } Filtrar os Lançamentos Registrados\r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCaixa.length > 0 &&\r\n
(\r\n
\r\n {moment(mcc_dataHora).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Conta Gerencial',\r\n render: ({ ctg_descricao }) => (\r\n
\r\n {ctg_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Entrada (R$)',\r\n align: 'right',\r\n render: ({ mcc_valor, mcc_entradasaida }) => (\r\n
\r\n \r\n {(mcc_entradasaida === 2) ? FormatNumber(!!mcc_valor ? mcc_valor : 0, true, false) : ''}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Saída (R$)',\r\n align: 'right',\r\n render: ({ mcc_valor, mcc_entradasaida }) => (\r\n
\r\n \r\n {(mcc_entradasaida === 1) ? FormatNumber(!!mcc_valor ? mcc_valor : 0, true, false) : ''}\r\n \r\n
\r\n ),\r\n }, {\r\n title: 'Saldo (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n render: ({ saldoAnterior }) => (\r\n
\r\n {(saldoAnterior < 0) ? {FormatNumber(saldoAnterior, true, false)} : {FormatNumber(saldoAnterior, true, false)}}\r\n
\r\n ),\r\n }\r\n ]\r\n } footer={() =>\r\n \r\n \r\n
\r\n Saldo Anterior a Data Inicial(R$): {FormatNumber(!!saldoAnteriorConta ? saldoAnteriorConta : 0, true, false)}\r\n
\r\n \r\n \r\n } scroll={{ x: 900 }} />\r\n }\r\n \r\n }\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState, useRef } from 'react';\r\nimport { Form, Input, notification } from 'antd';\r\nimport { HasValue } from '../../services/funcoes';\r\n\r\nexport default function InputEmail(props) {\r\n\r\n const [value, setValue] = useState('');\r\n const [isValid, setIsValid] = useState(true);\r\n const inputRef = useRef(null);\r\n\r\n const validateEmail = (email) => {\r\n const re = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\r\n return re.test(String(email).toLowerCase());\r\n };\r\n\r\n const handleBlur = (e) => {\r\n if (HasValue(value)) {\r\n if (!validateEmail(value)) {\r\n setIsValid(false);\r\n notification.warning({ message: `Aviso!`, description: `E-mail invalido` });\r\n setTimeout(() => inputRef.current.focus(), 0); // Retorna o foco ao campo\r\n } else {\r\n setIsValid(true);\r\n }\r\n }\r\n if (!!props.onBlur) {\r\n props.onBlur(e);\r\n }\r\n };\r\n\r\n const handleChange = (e) => {\r\n setValue(e.target.value);\r\n if (!!props.onChange) {\r\n props.onChange(e.target.value);\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Marca Ativa\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoGrupoProduto({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarManutencao = (values) => {\r\n\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'GrupoProduto/';\r\n\r\n if (values.gru_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Grupo foram salvos com sucesso!\" });\r\n retorno = res.data.gru_id;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n\r\n } else {\r\n enderecoUrl += \"Incluir\"\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Grupo foram salvos com sucesso!\" });\r\n retorno = res.data.gru_id;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n };\r\n }\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && manutencao.dados.duplicar) {\r\n formulario.setFieldsValue({ gru_id: null });\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+gru_nome' } });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Select, notification } from \"antd\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW, SelectPaginacao } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function ManutencaoSubGrupo({ formulario, carregando, aoSalvar, editando, openDrawer, gruId }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [filtroAdd, setFiltroAdd] = useState(null);\r\n var lista = [];\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.sgp_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.gru_id) {\r\n lista.push({ name: \"gru_id\", campo: \"CodigoGrupo\", value: manutencao.dados.gru_id });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: {itens: lista} });\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n } else {\r\n formulario.setFieldsValue({ sgp_id: null });\r\n setFiltroAdd(` &ApenasAtivos=true`);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n const salvarManutencao = (values) => {\r\n carregando(true);\r\n let retorno;\r\n let enderecoUrl = 'SubGrupo/';\r\n\r\n if (values.sgp_id) {\r\n enderecoUrl += `Editar`;\r\n api.put(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Subgrupo foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n } else {\r\n enderecoUrl += `Incluir`;\r\n api.post(enderecoUrl, values).then(res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Subgrupo foram salvos com sucesso!\" });\r\n retorno = res.data;\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar(retorno);\r\n }\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if(!!openDrawer){\r\n lista.push({ name: \"gru_id\", campo: \"CodigoGrupo\", value: gruId.gru_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n }, [openDrawer]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n ({gru.gru_id} - {gru.gru_nome})\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, Select, Radio, Checkbox, notification, Modal, Typography, Divider, InputNumber } from \"antd\";\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { FormGW, Data, FormularioDinamico, InputCpfCnpj, SelectPaginacao } from \"../../components\";\r\nimport { Endereco, Email, Telefone, Ocupacao, OutrosContatos } from '../pessoas/pages';\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico, HasValue, validaForm, validarCpf, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function ManutencaoVendedor({ formulario, salvandoDados, aoSalvar, editando, pagina }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [opcoesCriarUsuario, setOpcoesCriarUsuario] = useState(0);\r\n const [listaUsuarios, setListaUsuarios] = useState([]);\r\n const [listaEstadoCivil, setListaEstadoCivil] = useState([]);\r\n const [listaUsuariosLocal, setListaUsuariosLocal] = useState([]);\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [exibirOpcoes, setExibirOpcoes] = useState(true);\r\n const [listaCidades, setListaCidades] = useState(false);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n\r\n useEffect(() => {\r\n formulario.setFieldsValue({ criarUsuario: opcoesCriarUsuario })\r\n }, [opcoesCriarUsuario]);\r\n\r\n useEffect(() => {\r\n if (!!pagina.pagina && pagina.pagina > parseInt(abaSelecionada)) {\r\n validarAbas(pagina.pagina.toString());\r\n }\r\n }, [pagina]);\r\n\r\n useEffect(() => {\r\n if (!!abaSelecionada && pagina.pagina !== parseInt(abaSelecionada)) {\r\n pagina.setPagina(parseInt(abaSelecionada));\r\n }\r\n }, [abaSelecionada]);\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.ven_id && editando.editando) {\r\n listaVendedor(manutencao.dados.ven_id);\r\n let lista = [];\r\n if (!!manutencao.dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: manutencao.dados.pef_rguf });\r\n }\r\n if (!!manutencao.dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: manutencao.dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n if (manutencao.dados.key === undefined) {\r\n editando.setEditando(false);\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n\r\n if (manutencao.dados.vendedorcampopersonalizados?.length > 0) {\r\n carregaDadosCamposAdicionais();\r\n }\r\n\r\n if (manutencao.dados?.usu_id > 0) {\r\n setOpcoesCriarUsuario(2)\r\n setExibirOpcoes(false);\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n carregaCamposPersonalizados();\r\n }, []);\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let _cpfCnpj = formulario.getFieldValue().pef_cpf ? formulario.getFieldValue().pef_cpf : manutencao.dados.pef_cpf;\r\n _cpfCnpj = _cpfCnpj.replace(/[^\\d]+/g, '');\r\n if (HasValue(_cpfCnpj)) {\r\n if (_cpfCnpj.length === 11) {\r\n if (validarCpf(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n }\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length > 0) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n\r\n function setFocusCpfCnpj() {\r\n setTimeout(\r\n () => {\r\n try {\r\n let element = document.getElementById(\"pef_cpf\");\r\n if (element) {\r\n element.focus();\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 300);\r\n }\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(` &UfEstado=${UfEstado}`);\r\n }\r\n else {\r\n setListaCidades(false);\r\n }\r\n }\r\n const salvarManutencao = values => {\r\n let usu = {}\r\n if (values.criarUsuario === 1) {\r\n usu = { operacao: values.criarUsuario, email: values.emailUsuario };\r\n } else if (values.criarUsuario === 2) {\r\n usu = { operacao: values.criarUsuario, usu_id: values.usu_id, email: listaUsuarios.find(item => item.usu_id === values.usu_id).usu_email };\r\n } else {\r\n usu = { operacao: 0, email: '' };\r\n }\r\n values.usuarioVinculado = usu;\r\n values.pessoaemails = !!manutencao.dados.emails && manutencao.dados.emails.length > 0 ? manutencao.dados.emails : [];\r\n values.pessoasocupacoes = !!manutencao.dados.ocupacoes && manutencao.dados.ocupacoes.length > 0 ? manutencao.dados.ocupacoes : [];\r\n values.regioesVenda = !!manutencao.dados.regioes && manutencao.dados.regioes.length > 0 ? manutencao.dados.regioes : [];\r\n values.nacionalidades = !!manutencao.dados.nacionalidades && manutencao.dados.nacionalidades.length > 0 ? manutencao.dados.nacionalidades : [];\r\n values.pessoaoutrocontatos = !!manutencao.dados.pessoaoutrocontatos && manutencao.dados.pessoaoutrocontatos.length > 0 ? manutencao.dados.pessoaoutrocontatos : [];\r\n values.pessoatelefones = manutencao.dados.telefones;\r\n values.enderecos = !!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0 ? manutencao.dados.enderecos : [];\r\n values.pef_dataalteracao = moment(new Date());\r\n values.vendedorcampopersonalizados = salvarCamposAdicionais(values);\r\n\r\n salvandoDados(true);\r\n if (!!values.ven_id) {\r\n api.put(`Vendedor/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: `Vendedor editado com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n notification.error({ message: 'Erro ao Gravar dados do Vendedor.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n salvandoDados(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post(`Vendedor/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Sucesso!', description: `Vendedor incluido com sucesso!` });\r\n let cpfFuncionario = values.pef_cpf.replaceAll('.', '').replaceAll('/', '').replaceAll('-', '');\r\n listarVendedorCpf(cpfFuncionario, (dadosVendedor) => {\r\n modalAdicionarFuncionarioVendedor(dadosVendedor);\r\n });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n notification.error({ message: 'Erro ao Gravar dados do Vendedor.', description: JSON.stringify(erro.response) });\r\n }\r\n ).finally(\r\n () => {\r\n salvandoDados(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n };\r\n\r\n const salvarCamposAdicionais = (values) => {\r\n var camposAdicionais = [];\r\n elementosFormulario?.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let vendedorcampopersonalizados = { ...manutencao.dados };\r\n let forDados = vendedorcampopersonalizados.vendedorcampopersonalizados?.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if ((!!forDados ? forDados.vcp_valor : \"\") !== (!!values[elemento.cap_nomeelemento] ? values[elemento.cap_nomeelemento] : \"\")) {\r\n camposAdicionais.push({ vcp_id: !!forDados ? forDados.vcp_id : null, ven_id: values.ven_id, cap_id: elemento.cap_id, vcp_valor: values[elemento.cap_nomeelemento] });\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n\r\n const listaValidacoesVen = [\r\n { nome: 'pef_cpf', obrigatorio: true, label: 'CPF' },\r\n { nome: 'pes_nome', obrigatorio: true, label: 'Nome' },\r\n ];\r\n\r\n function validarAbas(tab) {\r\n let listaValidacoes = [];\r\n let valida = false;\r\n switch (abaSelecionada) {\r\n case '1':\r\n listaValidacoes = [...listaValidacoesVen];\r\n if (formulario.getFieldValue().criarUsuario === 1) {\r\n listaValidacoes.push({ nome: 'emailUsuario', obrigatorio: true, label: 'E-mail Principal do Vendedor' });\r\n } else if (formulario.getFieldValue().criarUsuario === 2) {\r\n listaValidacoes.push({ nome: 'usu_id', obrigatorio: true, label: 'Usuário para vincular ao Vendedor' });\r\n }\r\n valida = true;\r\n break;\r\n case '3':\r\n if (!(!!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0)) {\r\n notification.warning({ description: 'Favor informar ao menos um endereço!', message: 'Aviso' });\r\n pagina.setPagina(parseInt(abaSelecionada));\r\n return;\r\n }\r\n break;\r\n }\r\n if (validaForm(formulario, listaValidacoes) && valida) {\r\n setAbaSelecionada(tab);\r\n } else if (!valida) {\r\n setAbaSelecionada(tab);\r\n } else {\r\n pagina.setPagina(parseInt(abaSelecionada));\r\n }\r\n };\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?TipoEntidade=6&PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n let camposPersonalizados = { ...manutencao.dados };\r\n camposPersonalizados?.vendedorcampopersonalizados?.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n if (!!elemento)\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.vcp_valor);\r\n })\r\n }\r\n\r\n function carregarDados() {\r\n salvandoDados(false);\r\n let parametro = !!formulario.getFieldValue().ven_id ? `?codigoVendedor=${formulario.getFieldValue().ven_id}` : '';\r\n api.get(`Vendedor/ListarUsuariosNaoVinculadosVendedor${parametro}`).then(\r\n res => {\r\n setListaUsuarios(res.data);\r\n }).catch(\r\n erro =>\r\n console.error(erro)\r\n );\r\n api.get(`Usuario/RetornaUsuariosLocal?filtro=`).then(\r\n res => {\r\n setListaUsuariosLocal(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n\r\n api.get(`EstadoCivil/Listar`).then(\r\n res => {\r\n setListaEstadoCivil(res.data.items);\r\n }).catch(\r\n erro =>\r\n console.error(erro)\r\n );\r\n }\r\n\r\n function validarEmail(email) {\r\n email = email.target.value;\r\n if (!!email) {\r\n let emailUsuarioExistente = false;\r\n listaUsuarios.forEach((usuario) => {\r\n if (usuario.usu_email.endereco == email) {\r\n emailUsuarioExistente = true;\r\n }\r\n });\r\n\r\n let emailUsuarioDisponivel = false;\r\n if (!!emailUsuarioExistente) {\r\n listaUsuariosLocal.forEach((usuario) => {\r\n if (usuario.usu_email.endereco == email) {\r\n emailUsuarioDisponivel = true;\r\n }\r\n });\r\n } else {\r\n emailUsuarioDisponivel = true;\r\n }\r\n\r\n if (!!!emailUsuarioDisponivel) {\r\n notification.warning({ description: `Endereço de e-mail informado ${email} já está vinculado a outro vendedor! Informe outro e-mail e tende novamente.`, message: `Aviso!` })\r\n } else {\r\n api.get(`Usuario/RetornaUsuarioEmail?email=${email}`).then(\r\n res => {\r\n if (!!res.data) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `O E-mail ${email} já pertence a um usuário no sistema, ao continuar este usuário terá acesso a esta empresa vinculado a este novo vendedor.`,\r\n okText: `Continuar com o usuário existente`,\r\n cancelText: `Informar outro e-mail`,\r\n centered: true,\r\n onOk() {\r\n adicionaEmail(email)\r\n },\r\n onCancel() {\r\n formulario.setFieldsValue({ emailUsuario: null });\r\n }\r\n });\r\n } else {\r\n adicionaEmail(email);\r\n }\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n }\r\n };\r\n\r\n function adicionaEmail(email) {\r\n let principal = true;\r\n let verifica = true;\r\n if (!!manutencao.dados.emails) {\r\n if (!!manutencao.dados.emails.length > 0) {\r\n principal = false;\r\n }\r\n manutencao.dados.emails.forEach((email) => {\r\n if (email.pem_email === email) {\r\n verifica = false;\r\n }\r\n })\r\n }\r\n if (verifica) {\r\n let listaEmails = [...!!manutencao.dados.emails ? manutencao.dados.emails : []];\r\n let dadosEmail = {};\r\n dadosEmail.pem_email = email;\r\n dadosEmail.pem_ativo = true;\r\n dadosEmail.pem_emailprincipal = principal;\r\n dadosEmail.pem_enviarboleto = false;\r\n dadosEmail.pem_enviarcartacobranca = false;\r\n dadosEmail.pem_enviarnfe = false;\r\n dadosEmail.pem_enviarpromocao = false;\r\n dadosEmail.pem_enviarvencparcela = false;\r\n listaEmails.push(dadosEmail);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ emails: listaEmails } } } });\r\n } else {\r\n notification.warning({ description: `Este E-mail já foi adicionado na lista de e-mails`, message: `Atenção!` });\r\n }\r\n };\r\n\r\n function verificarCpfValido(dado) {\r\n let valorCampo;\r\n if (!!dado.currentTarget) {\r\n valorCampo = dado.currentTarget.value.replace(/\\D/g, '');\r\n } else {\r\n valorCampo = dado;\r\n }\r\n if (HasValue(valorCampo)) {\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n formulario.setFieldsValue({ pef_cpf: null });\r\n setFocusCpfCnpj();\r\n } else {\r\n verificaCpf(valorCampo)\r\n }\r\n }\r\n }\r\n\r\n function verificaCpf(pef_cpf) {\r\n api.get(`PessoaFisica/VerificarCpfExistente?cpf=${pef_cpf}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_vendedor) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CPF informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarVendedorCpf(pef_cpf);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarVendedorCpf(pef_cpf);\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n function listaVendedor(ven_id) {\r\n if (!!!ven_id) {\r\n return;\r\n }\r\n api.get(`Vendedor/BuscarVendedor/${ven_id}`).then(\r\n (res) => {\r\n let valores = res.data;\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n valores.pef_rguf = res.data.pef_rguf == \"\" ? null : res.data.pef_rguf;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarVendedorCpf(pef_cpf, callback) {\r\n api.get(`Vendedor/BuscarVendedorCpf/${pef_cpf}`).then(\r\n res => {\r\n let valores = res.data;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.ven_ativo = true;\r\n let lista = [];\r\n if (!!valores.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: valores.pef_rguf });\r\n }\r\n if (!!valores.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: valores.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n if (!!callback) {\r\n callback(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function modalAdicionarFuncionarioVendedor(dadosVendedor) {\r\n\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Deseja cadastrar esse vendedor como Funcionário da empresa?`,\r\n cancelText: 'Não',\r\n okText: 'Sim',\r\n okType: 'sucess',\r\n centered: true,\r\n onOk() {\r\n adicionarFuncionarioVendedor(dadosVendedor);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n }\r\n });\r\n }\r\n\r\n function adicionarFuncionarioVendedor(dadosVendedor) {\r\n dadosVendedor.fun_ativo = true;\r\n api.post(`Funcionario/Incluir`, dadosVendedor).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Vendedor cadastrado como Funcionário com sucesso!\" });\r\n }).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n salvandoDados(false);\r\n aoSalvar();\r\n })\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n validarAbas(tab)}>\r\n \r\n
\r\n \r\n
\r\n { verificarCpfValido(pef_cpf) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Feminino\r\n Masculino\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!editando.editando || (editando.editando && exibirOpcoes)) && setOpcoesCriarUsuario(0)} value={0}>Não criar Usuário para este Vendedor}\r\n setOpcoesCriarUsuario(1)} value={1}>Criar um Usuário Automaticamente\r\n setOpcoesCriarUsuario(2)} value={2}>Vincular usuário existente\r\n \r\n \r\n \r\n prevValues.criarUsuario !== currentValues.criarUsuario}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue('criarUsuario') === 1) return (\r\n \r\n \r\n { validarEmail(valor) }} />\r\n \r\n \r\n );\r\n if (getFieldValue('criarUsuario') === 2) return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Vendedor Ativo? \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n placeholder=\"(%) Comissão à Vista\" />\r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n placeholder=\"(%) Comissão à Prazo\" />\r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n placeholder=\"(%) Máximo de Desconto\" />\r\n \r\n \r\n \r\n \r\n ({est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n Vendedor Externo? \r\n \r\n \r\n \r\n \r\n Considerar Desconto? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Campos Campos Adicionais\r\n \r\n \r\n Adicione abaixo as informações adicionais.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Drawer, Modal, Form } from \"antd\";\r\nimport ManutencaoTransportador from '../../pages/transportadores/manutencao';\r\nimport { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport { useForm } from 'antd/lib/form/Form';\r\n\r\nexport default function DrawerTransportadores({ form, exibirDrawerTransportadores, fecharDrawerTransportadores }) {\r\n\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n\r\n function fecharDrawer() {\r\n form.setFieldsValue(formulario.getFieldsValue());\r\n fecharDrawerTransportadores();\r\n formulario.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n { fecharDrawer() }}\r\n onOk={() => formulario.submit()}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n\r\n )\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Tabs, Row, Col, Form, Input, Radio, Switch, Tooltip, Checkbox, Select, InputNumber, notification, Modal, Typography, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { validarIE } from \"../../services/funcoesIE\";\r\nimport { Data, FormGW, FormularioDinamico, InputPreco, SelectPaginacao } from \"../../components\";\r\nimport { isObjetoDiffVazio, validarCnpj, validarCpf, consultaCNPJ, retornaSoNumeros, HasValue, validarTelefone, validarEmail } from \"../../services/funcoes\";\r\nimport { Endereco, Email, Telefone, OutrosContatos, Veiculos, Nacionalidade } from '../pessoas/pages';\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoTransportador({ formulario, carregando, aoSalvar, editando }) {\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [dadosEstrangeiro, setDadosEstrangeiro] = useState(false);\r\n const [fretePorConta, setFretePorConta] = useState([]);\r\n const [tipoTransporte, setTipoTransporte] = useState([]);\r\n const [cpfCnpj, setCpfCnpj] = useState(\"\");\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [pessoaJuridica, setPessoaJuridica] = useState(false);\r\n const [baixadoRec, setBaixadoRec] = useState(false);\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const [listaCidades, setListaCidades] = useState(false);\r\n\r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.trn_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: manutencao.dados.pef_rguf });\r\n carregarCidades(manutencao.dados.pef_rguf);\r\n }\r\n if (!!manutencao.dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: manutencao.dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n\r\n formulario.setFieldsValue(manutencao.dados);\r\n\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.trn_id) {\r\n listaTransportador(manutencao.dados.trn_id);\r\n }\r\n //formulario.setFieldsValue(manutencao.dados);\r\n }, []);\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length > 0) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n useEffect(() => {\r\n if (manutencao?.dados?.transportadorcampopersonalizados?.length > 0)\r\n carregaDadosCamposAdicionais();\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n listarFretePorConta();\r\n listarTipoTransporte();\r\n carregaCamposPersonalizados();\r\n }, []);\r\n\r\n const switchEstrangeiro = () => {\r\n setDadosEstrangeiro(!dadosEstrangeiro)\r\n };\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let _cpfCnpj = formulario.getFieldValue().cpfCnpj ? formulario.getFieldValue().cpfCnpj : manutencao.dados.cpfCnpj;\r\n _cpfCnpj = _cpfCnpj?.replace(/[^\\d]+/g, '');\r\n if (HasValue(_cpfCnpj)) {\r\n if (_cpfCnpj.length === 11) {\r\n if (validarCpf(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n }\r\n else if (_cpfCnpj.length === 14) {\r\n if (validarCnpj(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n } else {\r\n setDesabilitarCpfCnpj(false);\r\n }\r\n }\r\n if (!!manutencao.dados.cpfCnpj) {\r\n if (manutencao.dados.cpfCnpj.length > 11) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function setFocusCpfCnpj() {\r\n setTimeout(\r\n () => {\r\n try {\r\n let element = document.getElementById(\"cpf\");\r\n if (element) {\r\n element.focus();\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 300);\r\n }\r\n\r\n const salvarManutencao = valores => {\r\n valores.pes_fisicajuridica = pessoaJuridica ? 2 : (dadosEstrangeiro ? 3 : 1);\r\n valores.listaPessoasAutorizadas = manutencao.dados.pessoaAutorizada;\r\n valores.enderecos = !!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0 ? manutencao.dados.enderecos : [];\r\n valores.pessoaemails = !!manutencao.dados.emails && manutencao.dados.emails.length > 0 ? manutencao.dados.emails : [];\r\n valores.pessoatelefones = !!manutencao.dados.telefones && manutencao.dados.telefones.length > 0 ? manutencao.dados.telefones : [];\r\n valores.pessoaoutrocontatos = !!manutencao.dados.pessoaoutrocontatos && manutencao.dados.pessoaoutrocontatos.length > 0 ? manutencao.dados.pessoaoutrocontatos : [];\r\n valores.pessoanacionalidades = !!manutencao.dados.nacionalidades && manutencao.dados.nacionalidades.length > 0 ? manutencao.dados.nacionalidades : [];\r\n valores.transportadorveiculos = !!manutencao.dados.veiculos && manutencao.dados.veiculos.length > 0 ? manutencao.dados.veiculos : [];\r\n\r\n valores.pef_produtorrural = false;\r\n valores.pej_databaixasefaz = !!valores.pej_databaixasefaz ? valores.pej_databaixasefaz : null;\r\n valores.pej_baixadoreceita = !!valores.pej_baixadoreceita ? valores.pej_baixadoreceita : false;\r\n valores.trn_valorfretefixo = !!valores.trn_valorfretefixo ? parseFloat(valores.trn_valorfretefixo) : parseFloat(0);\r\n valores.trn_percentualfrete = !!valores.trn_percentualfrete ? parseFloat(valores.trn_percentualfrete) : parseFloat(0);\r\n valores.transportadorcampopersonalizados = salvarCamposAdicionais(valores);\r\n\r\n valores.cpfCnpj = valores.cpfCnpj.replaceAll('.', '').replaceAll('/', '').replaceAll('-', '');\r\n if (!!valores.idEstrangeiro && dadosEstrangeiro) {\r\n valores.isEstrangeiro = true;\r\n valores.pes_estrangeiro = true;\r\n } else {\r\n valores.isEstrangeiro = false;\r\n valores.pes_estrangeiro = false;\r\n\r\n if (valores.cpfCnpj.length === 11) {\r\n valores.pes_fisicajuridica = 1;\r\n valores.pef_cpf = valores.cpfCnpj;\r\n if (!validarCpf(valores.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n return false;\r\n }\r\n } else if (valores.cpfCnpj.length === 14) {\r\n valores.pes_fisicajuridica = 2;\r\n valores.pej_cnpj = valores.cpfCnpj;\r\n if (!validarCnpj(valores.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'CPF/CNPJ informado é inválido' });\r\n return false;\r\n }\r\n }\r\n\r\n if (!!valores.pej_inscricaoestadual && !validarIE(valores.pej_inscricaoestadual, valores.pej_inscuf)) {\r\n notification.warning({ message: 'Aviso', description: 'Inscrição Estadual informada é inválida' });\r\n return false;\r\n } else if (!!!valores.pej_inscricaoestadual) {\r\n valores.pej_inscricaoestadual = \"\";\r\n }\r\n\r\n carregando(true);\r\n if (!!valores.trn_id) {\r\n api.put(`Transportador/Editar`, valores).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Transportador editado com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post(`Transportador/Incluir`, valores).then(\r\n res => {\r\n notification.success({ message: 'Aviso', description: `Transportador incluído com sucesso!` });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n }\r\n\r\n };\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(` &UfEstado=${UfEstado}`);\r\n }\r\n else {\r\n setListaCidades(false);\r\n }\r\n }\r\n\r\n const salvarCamposAdicionais = (values) => {\r\n var camposAdicionais = [];\r\n elementosFormulario?.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let transportadorcampopersonalizados = { ...manutencao.dados };\r\n let forDados = transportadorcampopersonalizados.transportadorcampopersonalizados?.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if ((!!forDados ? forDados.fcp_valor : \"\") !== (!!values[elemento.cap_nomeelemento] ? values[elemento.cap_nomeelemento] : \"\")) {\r\n camposAdicionais.push({ tcp_id: !!forDados ? forDados.tcp_id : null, trn_id: values.trn_id, cap_id: elemento.cap_id, tcp_valor: values[elemento.cap_nomeelemento] });\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?entidade=5&PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n let camposPersonalizados = { ...manutencao.dados };\r\n camposPersonalizados?.transportadorcampopersonalizados?.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n if (!!elemento)\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.tcp_valor);\r\n })\r\n }\r\n\r\n\r\n\r\n function listarFretePorConta() {\r\n api.get(`Enum/Listar?nome=FretePorConta`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setFretePorConta(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function listarTipoTransporte() {\r\n api.get(`Enum/Listar?nome=TipoTransporteInternacional`).then(\r\n res => {\r\n if (res.status === 200) {\r\n setTipoTransporte(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarFisicoJuridico(event) {\r\n let valorCampo = event.currentTarget.value.replace(/\\D/g, '');\r\n if (valorCampo.length === 11) {\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n } else if (valorCampo.length === 14) {\r\n if (!validarCnpj(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n }\r\n setPessoaJuridica(valorCampo.length === 14);\r\n };\r\n\r\n function validarCpfCnpjExistente(cpfCnpj) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length === 14) {\r\n validarCnpjExiste(cpfCnpj);\r\n } else if (cpfCnpj.length === 11) {\r\n validarCpfExiste(cpfCnpj);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ não foi informado' });\r\n }\r\n };\r\n\r\n function validarCpfExiste(cpfCnpj) {\r\n api.get(`PessoaFisica/VerificarCpfExistente?cpf=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_transportador) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CPF informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarTransportadorCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarTransportadorCpfCnpj(cpfCnpj);\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarCnpjExiste(cpfCnpj) {\r\n api.get(`PessoaJuridica/VerificarCnpjExistente?cnpj=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_transportador) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CNPJ informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarTransportadorCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarTransportadorCpfCnpj(cpfCnpj);\r\n }\r\n } else {\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function listaTransportador(trn_id) {\r\n if (!!!trn_id) {\r\n return;\r\n }\r\n api.get(`Transportador/BuscarTransportador/${trn_id}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n let valores = res.data;\r\n valores.pej_datafundacao = !!valores.pej_datafundacao ? moment(valores.pej_datafundacao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n const receitaWS = (cpfCnpj) => {\r\n if (!HasValue(formulario.getFieldsValue().pes_nome)) {\r\n consultaCNPJ(cpfCnpj).then((retorno) => {\r\n let dados = retorno;\r\n if (dados.status === \"OK\" && dados.situacao === \"ATIVA\") {\r\n let dadosForm = {};\r\n\r\n if (dados.efr !== \"\") {\r\n dadosForm.pes_orgaopublico = true;\r\n }\r\n dadosForm.pes_nome = dados.nome;\r\n if (!!dados.abertura) {\r\n let dia = dados.abertura.substring(0, 2);\r\n let mes = dados.abertura.substring(3, 5);\r\n let ano = dados.abertura.substring(6, 10);\r\n dadosForm.pej_datafundacao = moment(new Date(ano, mes, dia));\r\n }\r\n dadosForm.pej_nomefantasia = dados.fantasia;\r\n\r\n\r\n let listaEnderecos = [];\r\n let tipoEndereco = {};\r\n tipoEndereco.pais = \"BRASIL\";\r\n tipoEndereco.pse_id = 33;\r\n tipoEndereco.tpe_id = 4;\r\n tipoEndereco.tpe_descricao = \"COMERCIAL\";\r\n tipoEndereco.pee_numero = dados.numero;\r\n tipoEndereco.pee_ativo = true;\r\n tipoEndereco.pee_enderecoprincipal = true;\r\n tipoEndereco.cep_cep = retornaSoNumeros(dados.cep);\r\n tipoEndereco.pee_complemento = dados.complemento;\r\n tipoEndereco.bai_nome = dados.bairro;\r\n tipoEndereco.log_logradouro = dados.logradouro;\r\n tipoEndereco.cid_descricao = dados.municipio;\r\n tipoEndereco.est_sigla = dados.uf;\r\n tipoEndereco.enderecoCompleto = tipoEndereco.log_logradouro + ', ' + tipoEndereco.pee_numero + ' - ' + tipoEndereco.bai_nome + ' - ' + tipoEndereco.pee_complemento + ' - ' + tipoEndereco.cep_cep + ' - ' + tipoEndereco.cid_descricao + ' - ' + tipoEndereco.uf;\r\n listaEnderecos.push(tipoEndereco);\r\n\r\n let listaTelefones = [];\r\n if (dados.telefone !== \"\" && validarTelefone(retornaSoNumeros(dados.telefone).substring(0, 10))) {\r\n let tpt = {};\r\n tpt.tpt_id = 1;\r\n tpt.tpt_descricao = \"COMERCIAL\";\r\n tpt.psc_ativo = true;\r\n tpt.psc_numero = retornaSoNumeros(dados.telefone).substring(0, 10);\r\n tpt.psc_principal = true;\r\n listaTelefones.push(tpt);\r\n }\r\n\r\n let listaEmails = [];\r\n if (dados.email !== \"\" && validarEmail(dados.email)) {\r\n let email = {};\r\n email.pem_email = dados.email;\r\n email.pem_emailprincipal = true;\r\n email.pem_enviarboleto = false;\r\n email.pem_enviarcartacobranca = false;\r\n email.pem_enviarnfe = false;\r\n email.pem_enviarpromocao = false;\r\n email.pem_enviarvencparcela = false;\r\n email.pem_ativo = true;\r\n listaEmails.push(email);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ telefones: listaTelefones }, ...{ emails: listaEmails }, ...{ enderecos: listaEnderecos } } } });\r\n formulario.setFieldsValue(dadosForm);\r\n\r\n }\r\n if (dados.status === \"OK\" && dados.situacao === \"BAIXADA\") {\r\n notification.warning({ message: 'Aviso', description: 'Empresa/CNPJ ' + dados.situacao + ' na receita!' });\r\n }\r\n }, (erro) => {\r\n console.log('ERRO:', erro);\r\n });\r\n }\r\n }\r\n function listarTransportadorCpfCnpj(cpfCnpj) {\r\n cpfCnpj = cpfCnpj.replaceAll('-', '').replaceAll('/', '').replaceAll('.', '');\r\n if (cpfCnpj === null || cpfCnpj === \"\") {\r\n return false;\r\n }\r\n api.get(`Transportador/BuscarTransportardorCpfCnpj/${cpfCnpj}`).then(\r\n (res) => {\r\n let valores = res.data;\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n valores.trn_ativo = true;\r\n valores.pej_datafundacao = !!valores.pej_datafundacao ? moment(valores.pej_datafundacao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n valores.pef_dataalteracao = !!valores.pef_dataalteracao ? moment(valores.pef_dataalteracao) : null;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n } else {\r\n if (cpfCnpj.length === 14) {\r\n setPessoaJuridica(true);\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n if (cpfCnpj.length === 14) {\r\n setPessoaJuridica(true);\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n );\r\n }\r\n function alteraBaixadoRec(record) {\r\n setBaixadoRec(record);\r\n };\r\n\r\n\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n
\r\n {!desabilitarCfpCnpj && \r\n Transportador Estrangeiro\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!dadosEstrangeiro === false &&\r\n \r\n \r\n { validarFisicoJuridico(valor); validarCpfCnpjExistente(valor.currentTarget.value.replace(/\\D/g, '')) }}\r\n onChange={(event, type) => {\r\n setCpfCnpj(event.target.value);\r\n }} />\r\n \r\n \r\n }\r\n {!!dadosEstrangeiro &&\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {pessoaJuridica && <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {pessoaJuridica && <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!pessoaJuridica && <>\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Transportador Ativo? \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pessoaJuridica &&\r\n \r\n \r\n \r\n { alteraBaixadoRec(value) }}>Baixado da Receita?\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!pessoaJuridica && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Campos Campos Adicionais\r\n \r\n \r\n Adicione abaixo as informações adicionais.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Tabs, Typography, Row, Col, Form, Divider, Input, Select, Button, Radio, Checkbox, Switch, Tooltip, Modal, notification } from \"antd\";\r\nimport { CalculatorFilled, ExclamationCircleOutlined, QuestionCircleOutlined } from \"@ant-design/icons\";\r\nimport CpfCnpj from \"@react-br-forms/cpf-cnpj-mask\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { ModalCalcularLimite } from \"../../components/modals/\";\r\nimport { drawerActions, listagemActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { FormGW, InputPreco, FormularioDinamico, Data, SelectPaginacao, InputPercentual } from \"../../components\";\r\nimport { compararDatas, consultaCNPJ, isObjetoDiffVazio, retornaSoNumeros, validarCnpj, validarCpf, HasValue, validarEmail, validarTelefone } from \"../../services/funcoes\";\r\nimport { OrgaoSubjacente, Endereco, Email, Telefone, Ocupacao, Nacionalidade, OutrosContatos, PessoasAutorizadas } from '../pessoas/pages';\r\nimport moment from \"moment\";\r\nimport { validarIE } from \"../../services/funcoesIE\";\r\nimport { trataRetornoFormularioDinamico, trataSetaDadosFormularioDinamico } from \"../../services/funcoes\";\r\nimport { func } from \"prop-types\";\r\nimport InputEmail from \"../../components/inputEmail\";\r\n\r\n\r\nexport default function ManutencaoClientes({ carregando, aoSalvar, editando, formulario, dadosOrcamento }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [pessoaJuridica, setPessoaJuridica] = useState(false);\r\n const [orgaoPublico, setOrgaoPublico] = useState(false);\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [isEstrangeiro, setIsEstrangeiro] = useState(false);\r\n const [openModalCalcular, setOpenModalCalcular] = useState(false);\r\n const [cpfCnpj, setCpfCnpj] = useState(null);\r\n const [mask, setMask] = useState(\"\");\r\n const [listaCidades, setListaCidades] = useState(false);\r\n const [dadosRegimeTrib, setDadosRegimeTrib] = useState([]);\r\n const [elementosFormulario, setElementosFormulario] = useState([]);\r\n const [desabilitarCfpCnpj, setDesabilitarCpfCnpj] = useState(false);\r\n const [produtorRural, setProdutorRural] = useState(false);\r\n const [filtroCdd, setFiltroCdd] = useState(null);\r\n const switchEstrangeiro = (checked) => {\r\n setIsEstrangeiro(checked);\r\n };\r\n\r\n useEffect(() => {\r\n const valorPesIdestrangeiro = manutencao?.dados?.pes_fisicajuridica;\r\n if (valorPesIdestrangeiro === 3) {\r\n setIsEstrangeiro(true); // Ativa o switch\r\n } else {\r\n setIsEstrangeiro(false); // Desativa o switch\r\n }\r\n }, [manutencao?.dados?.pes_fisicajuridica]); // Reexecuta sempre que pes_idestrangeiro mudar \r\n\r\n useEffect(() => {\r\n if (ui.showDrawer && !!manutencao.dados && !!manutencao.dados.cli_id && editando.editando) {\r\n let lista = [];\r\n if (!!manutencao.dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: manutencao.dados.pef_rguf });\r\n }\r\n if (!!manutencao.dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: manutencao.dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n editando.setEditando(false);\r\n }\r\n formulario.setFieldsValue(manutencao.dados);\r\n }\r\n }, [ui.showDrawer, manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.cli_id) {\r\n listaCliente(manutencao.dados.cli_id);\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.cpfCnpj) {\r\n if (manutencao.dados.cpfCnpj.length > 11) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n }\r\n if (dadosOrcamento) {\r\n formulario.setFieldsValue({ pes_nome: dadosOrcamento.orc_nomecliente })\r\n }\r\n buscarRegimeTributario();\r\n carregaCamposPersonalizados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n let _cpfCnpj = formulario.getFieldValue().cpfCnpj ? formulario.getFieldValue().cpfCnpj : manutencao.dados.cpfCnpj;\r\n _cpfCnpj = _cpfCnpj?.replace(/[^\\d]+/g, '');\r\n if (HasValue(_cpfCnpj)) {\r\n if (_cpfCnpj.length === 11) {\r\n if (validarCpf(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n }\r\n else if (_cpfCnpj.length === 14) {\r\n if (validarCnpj(_cpfCnpj)) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n } else {\r\n setDesabilitarCpfCnpj(false);\r\n }\r\n }\r\n if (manutencao.dados.pes_fisicajuridica == 3) {\r\n setDesabilitarCpfCnpj(true);\r\n }\r\n if (!!manutencao.dados.cpfCnpj) {\r\n if (manutencao.dados.cpfCnpj.length > 11) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n }\r\n } else {\r\n setFocusCpfCnpj();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => { if (!!elementosFormulario && elementosFormulario.length > 0) carregaDadosCamposAdicionais(); }, [elementosFormulario]);\r\n useEffect(() => {\r\n if (manutencao?.dados?.clientecampopersonalizados?.length > 0)\r\n carregaDadosCamposAdicionais();\r\n }, [manutencao.dados]);\r\n const switchPublico = () => {\r\n setOrgaoPublico(!orgaoPublico);\r\n };\r\n\r\n function carregarCidades(UfEstado) {\r\n if (!!UfEstado) {\r\n setListaCidades(true);\r\n setFiltroCdd(` &UfEstado=${UfEstado}`);\r\n }\r\n else {\r\n setListaCidades(false);\r\n }\r\n }\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?TipoEntidade=1&PageNumber=1&PageSize=1000&Order=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n setElementosFormulario(res.data.items);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n function setFocusCpfCnpj() {\r\n setTimeout(\r\n () => {\r\n try {\r\n let element = document.getElementById(\"cpf\");\r\n if (element) {\r\n element.focus();\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 300);\r\n }\r\n\r\n function carregaDadosCamposAdicionais() { //Campos Adicionais\r\n let camposPersonalizados = { ...manutencao.dados };\r\n camposPersonalizados?.clientecampopersonalizados?.map(d => {\r\n let elemento = elementosFormulario.filter(f => f.cap_id === d.cap_id)[0];\r\n if (!!elemento)\r\n trataSetaDadosFormularioDinamico(formulario, elemento, d.ccp_valor);\r\n })\r\n }\r\n\r\n const salvarCamposAdicionais = (values) => {\r\n var camposAdicionais = [];\r\n elementosFormulario?.map((elemento) => {\r\n values = trataRetornoFormularioDinamico(values, elemento);\r\n let clientecampopersonalizados = { ...manutencao.dados };\r\n let forDados = clientecampopersonalizados.clientecampopersonalizados?.filter(f => f.cap_id == elemento.cap_id)[0];\r\n if (!!values[elemento.cap_nomeelemento]) {\r\n camposAdicionais.push({ ccp_id: !!forDados ? forDados.ccp_id : null, cli_id: values.cli_id, cap_id: elemento.cap_id, ccp_valor: String(values[elemento.cap_nomeelemento]) });\r\n }\r\n });\r\n return camposAdicionais;\r\n }\r\n\r\n const receitaWS = (cpfCnpj) => {\r\n if (!HasValue(formulario.getFieldsValue().pes_nome)) {\r\n consultaCNPJ(cpfCnpj).then((retorno) => {\r\n let dados = retorno;\r\n if (dados.status === \"OK\" && dados.situacao === \"ATIVA\") {\r\n let dadosForm = {};\r\n if (dados.efr !== \"\") {\r\n dadosForm.pes_orgaopublico = true;\r\n }\r\n dadosForm.pes_nome = dados.nome;\r\n if (!!dados.abertura) {\r\n let dia = dados.abertura.substring(0, 2);\r\n let mes = dados.abertura.substring(3, 5);\r\n let ano = dados.abertura.substring(6, 10);\r\n dadosForm.pej_datafundacao = moment(new Date(ano, mes, dia));\r\n }\r\n dadosForm.pej_nomefantasia = dados.fantasia;\r\n let listaEnderecos = [];\r\n let tipoEndereco = {};\r\n tipoEndereco.pais = \"BRASIL\";\r\n tipoEndereco.pse_id = 33;\r\n tipoEndereco.tpe_id = 4;\r\n tipoEndereco.tpe_descricao = \"COMERCIAL\";\r\n tipoEndereco.pee_numero = dados.numero;\r\n tipoEndereco.pee_ativo = true;\r\n tipoEndereco.pee_enderecoprincipal = true;\r\n tipoEndereco.cep_cep = retornaSoNumeros(dados.cep);\r\n tipoEndereco.pee_complemento = dados.complemento;\r\n tipoEndereco.bai_nome = dados.bairro;\r\n tipoEndereco.log_logradouro = dados.logradouro;\r\n tipoEndereco.cid_descricao = dados.municipio;\r\n tipoEndereco.est_sigla = dados.uf;\r\n tipoEndereco.enderecoCompleto = tipoEndereco.log_logradouro + ', ' + tipoEndereco.pee_numero + ' - ' + tipoEndereco.bai_nome + ' - ' + tipoEndereco.pee_complemento + ' - ' + tipoEndereco.cep_cep + ' - ' + tipoEndereco.cid_descricao + ' - ' + tipoEndereco.uf;\r\n listaEnderecos.push(tipoEndereco);\r\n\r\n let listaTelefones = [];\r\n if (dados.telefone !== \"\" && validarTelefone(retornaSoNumeros(dados.telefone).substring(0, 10)) && !!!isEstrangeiro) {\r\n let tpt = {};\r\n tpt.tpt_id = 1;\r\n tpt.tpt_descricao = \"COMERCIAL\";\r\n tpt.psc_ativo = true;\r\n tpt.psc_numero = retornaSoNumeros(dados.telefone).substring(0, 10);\r\n tpt.psc_principal = true;\r\n listaTelefones.push(tpt);\r\n }\r\n else {\r\n let tpt = {};\r\n tpt.tpt_id = 1;\r\n tpt.tpt_descricao = \"COMERCIAL\";\r\n tpt.psc_ativo = true;\r\n tpt.psc_numero = retornaSoNumeros((dados.telefone).substring(0, 15));\r\n tpt.psc_principal = true;\r\n listaTelefones.push(tpt);\r\n }\r\n let listaEmails = [];\r\n\r\n if (dados.email !== \"\" && validarEmail(dados.email)) {\r\n let email = {};\r\n email.pem_email = dados.email;\r\n email.pem_emailprincipal = true;\r\n email.pem_enviarboleto = false;\r\n email.pem_enviarcartacobranca = false;\r\n email.pem_enviarnfe = false;\r\n email.pem_enviarpromocao = false;\r\n email.pem_enviarvencparcela = false;\r\n email.pem_ativo = true;\r\n listaEmails.push(email);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ telefones: listaTelefones }, ...{ emails: listaEmails }, ...{ enderecos: listaEnderecos } } } });\r\n formulario.setFieldsValue(dadosForm);\r\n }\r\n if (dados.status === \"OK\" && dados.situacao === \"BAIXADA\") {\r\n notification.warning({ message: 'Aviso', description: 'Empresa/CNPJ ' + dados.situacao + ' na receita!' });\r\n }\r\n }, (erro) => {\r\n console.log('ERRO:', erro);\r\n });\r\n }\r\n }\r\n\r\n function listaCliente(cli_id) {\r\n if (!!!cli_id) {\r\n return;\r\n }\r\n api.get(`Cliente/BuscarCliente/${cli_id}`).then(\r\n (res) => {\r\n let valores = res.data;\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n if (!!res.data && isObjetoDiffVazio(res.data)) {\r\n res.data.pef_rguf = res.data.pef_rguf == \"\" ? null : res.data.pef_rguf;\r\n valores.pef_datanascimento = !!valores.pef_datanascimento ? moment(valores.pef_datanascimento) : null;\r\n valores.cli_datainiciallimitecred = !!valores.cli_datainiciallimitecred ? moment(valores.cli_datainiciallimitecred) : null;\r\n valores.cli_datafinallimitecred = !!valores.cli_datafinallimitecred ? moment(valores.cli_datafinallimitecred) : null;\r\n valores.pef_rgdataexpedicao = !!valores.pef_rgdataexpedicao ? moment(valores.pef_rgdataexpedicao) : null;\r\n valores.cli_dataalteracao = !!valores.cli_dataalteracao ? moment(valores.cli_dataalteracao) : null;\r\n valores.cli_datainclusao = !!valores.cli_datainclusao ? moment(valores.cli_datainclusao) : null;\r\n valores.pes_dataalteracao = !!valores.pes_dataalteracao ? moment(valores.pes_dataalteracao) : null;\r\n valores.pes_datainclusao = !!valores.pes_datainclusao ? moment(valores.pes_datainclusao) : null;\r\n if (!!valores.pes_fisicajuridica == 3) {\r\n switchEstrangeiro(true);\r\n }\r\n setProdutorRural(!!valores.pef_produtorrural);\r\n setOrgaoPublico(valores.pes_orgaopublico);\r\n if (!!valores.pessoaorgaospublicos && valores.pessoaorgaospublicos.length > 0) {\r\n valores.listaOrgaoPublico = valores.pessoaorgaospublicos;\r\n }\r\n formulario.setFieldsValue(valores);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: valores } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function salvarManutencao(values) {\r\n values = { ...values, ...formulario.getFieldValue() };\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.telefones && manutencao.dados.telefones.length > 0) {\r\n values.pessoatelefones = manutencao.dados.telefones;\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor informar o telefone' });\r\n return false;\r\n }\r\n if (!!manutencao.dados.enderecos && manutencao.dados.enderecos.length > 0) {\r\n if (manutencao.dados.enderecos.filter(end => (end.pee_ativo)).length > 0) {\r\n values.enderecos = manutencao.dados.enderecos;\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor informar um endereço ativo!' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor informar o endereço' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Favor informar o endereço e telefone' });\r\n return false;\r\n }\r\n if (!!values.cli_datainiciallimitecred && !!values.cli_datafinallimitecred) {\r\n if (compararDatas(values.cli_datafinallimitecred, values.cli_datainiciallimitecred, '<')) {\r\n notification.warning({ message: `Aviso!`, description: `Data Final de Crédito não pode ser menor que a Data Inicial de Crédito` });\r\n return false;\r\n }\r\n }\r\n if (!!values.pej_inscricaoestadual) {\r\n values.pej_inscuf = manutencao.dados.enderecos.filter((endereco) => { return endereco.pee_enderecoprincipal === true })[0].est_sigla;\r\n }\r\n if (!!values.pej_inscricaoestadual && !validarIE(values.pej_inscricaoestadual, values.pej_inscuf)) {\r\n notification.warning({ message: 'Aviso', description: 'Inscrição Estadual informada é inválida' });\r\n return false;\r\n }\r\n if (HasValue(values.pej_emailpessoacontato) && !validarEmail(values.pej_emailpessoacontato)) {\r\n notification.warning({ message: `Aviso!`, description: `E-mail invalido` });\r\n return false;\r\n }\r\n values.pes_orgaopublico = orgaoPublico;\r\n if (orgaoPublico) {\r\n values.pessoaorgaospublicos = !!manutencao.dados.listaOrgaoPublico && manutencao.dados.listaOrgaoPublico.length > 0 ? manutencao.dados.listaOrgaoPublico : [];\r\n }\r\n values.pef_datanascimento = !!values.pef_datanascimento ? moment(values.pef_datanascimento) : null;\r\n values.pes_idestrangeiro = !!values.pes_idestrangeiro ? values.pes_idestrangeiro : null;\r\n values.pessoaautorizada = !!manutencao.dados.pessoaautorizada && manutencao.dados.pessoaautorizada.length > 0 ? manutencao.dados.pessoaautorizada : [];\r\n values.pessoaemails = !!manutencao.dados.emails && manutencao.dados.emails.length > 0 ? manutencao.dados.emails : [];\r\n values.pessoasocupacoes = !!manutencao.dados.ocupacoes && manutencao.dados.ocupacoes.length > 0 ? manutencao.dados.ocupacoes : [];\r\n values.pessoaoutrocontatos = !!manutencao.dados.pessoaoutrocontatos && manutencao.dados.pessoaoutrocontatos.length > 0 ? manutencao.dados.pessoaoutrocontatos : [];\r\n values.pessoanacionalidades = !!manutencao.dados.nacionalidades && manutencao.dados.nacionalidades.length > 0 ? manutencao.dados.nacionalidades : [];\r\n if (!!isEstrangeiro) {\r\n values.pes_fisicajuridica = 3;\r\n } else {\r\n values.cpfCnpj = values.cpfCnpj.replaceAll('.', '').replaceAll('/', '').replaceAll('-', '');\r\n if (values.cpfCnpj.length === 11) {\r\n values.pes_fisicajuridica = 1;\r\n values.pef_cpf = values.cpfCnpj;\r\n if (!validarCpf(values.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n return false;\r\n }\r\n } else if (values.cpfCnpj.length === 14) {\r\n values.pes_fisicajuridica = 2;\r\n values.pej_cnpj = values.cpfCnpj;\r\n if (!validarCnpj(values.cpfCnpj)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n return false;\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'CPF/CNPJ informado é inválido' });\r\n return false;\r\n }\r\n }\r\n values.regimeTributario = values.cli_regimetributariofiscal ? dadosRegimeTrib.filter((item) => (item.key === values.cli_regimetributariofiscal))[0] : null;\r\n values.clientecampopersonalizados = salvarCamposAdicionais(values);\r\n carregando(true);\r\n if (!!values.cli_id) {\r\n api.put(`Cliente/Editar`, values).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: `Cliente editado com sucesso!` });\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.error({ message: 'Erro ao salvar dados do Cliente.', description: JSON.stringify(erro.response) });\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n aoSalvar();\r\n }\r\n );\r\n } else {\r\n api.post(`Cliente/Incluir`, values).then(\r\n (res) => {\r\n notification.success({ message: 'Aviso', description: `Cliente incluído com sucesso!` });\r\n let idRetorno = res.data.pes_id;\r\n aoSalvar(idRetorno);\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.error({ message: 'Erro ao salvar dados do Cliente.', description: JSON.stringify(erro.response) });\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n );\r\n }\r\n };\r\n\r\n function validarFisicoJuridico(event) {\r\n let valorCampo = event.currentTarget.value.replace(/\\D/g, '');\r\n if (valorCampo.length === 11) {\r\n if (!validarCpf(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CPF informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n } else if (valorCampo.length === 14) {\r\n if (!validarCnpj(valorCampo)) {\r\n notification.warning({ message: 'Aviso', description: 'CNPJ informado é inválido' });\r\n formulario.setFieldsValue({ cpfCnpj: \"\" })\r\n setFocusCpfCnpj();\r\n return false;\r\n }\r\n }\r\n setPessoaJuridica(valorCampo.length === 14);\r\n };\r\n\r\n function validarCpfCnpjExistente(cpfCnpj) {\r\n if (!isEstrangeiro) {\r\n if (cpfCnpj) {\r\n if (cpfCnpj.length === 14) {\r\n validarCnpjExiste(cpfCnpj);\r\n } else if (cpfCnpj.length === 11) {\r\n validarCpfExiste(cpfCnpj);\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ informado é inválido. Deve conter 11 ou 14 dígitos' });\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'O CFP/CNPJ não foi informado' });\r\n }\r\n }\r\n };\r\n\r\n function validarCpfExiste(cpfCnpj) {\r\n api.get(`PessoaFisica/VerificarCpfExistente?cpf=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_cliente) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CPF informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarClienteCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarClienteCpfCnpj(cpfCnpj);\r\n }\r\n } else {\r\n console.log(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ message: 'Aviso', description: erro.response });\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function validarCnpjExiste(cpfCnpj) {\r\n api.get(`PessoaJuridica/VerificarCnpjExistente?cnpj=${cpfCnpj}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n if (res.data.pes_cliente) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"O CNPJ informado já esta cadastrado no sistema!\\n Deseja atualizar seus dados?\",\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n listarClienteCpfCnpj(cpfCnpj);\r\n },\r\n onCancel() {\r\n formulario.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n });\r\n } else {\r\n listarClienteCpfCnpj(cpfCnpj);\r\n }\r\n } else {\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ message: 'Aviso', description: erro.response });\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function listarClienteCpfCnpj(cpfCnpj) {\r\n let dados = {};\r\n if (!!!cpfCnpj) {\r\n return false;\r\n }\r\n api.get(`Cliente/BuscarClienteCpfCnpj/${cpfCnpj}`).then(\r\n async res => {\r\n dados = res.data;\r\n if (!!dados && isObjetoDiffVazio(dados)) {\r\n setOrgaoPublico(dados.pes_orgaopublico);\r\n if (!!dados.orgaoPublico && dados.orgaoPublico.length > 0) {\r\n dados.listaOrgaoPublico = dados.orgaoPublico;\r\n }\r\n if (res.data.pes_fisicajuridica === 2) {\r\n setPessoaJuridica(true);\r\n } else {\r\n setPessoaJuridica(false);\r\n }\r\n dados.cli_ativo = true;\r\n dados.cli_clientecontribuinteicms = !!dados.pej_inscricaoestadual ? true : false;\r\n dados.cli_dataalteracao = !!dados.cli_dataalteracao ? moment(dados.cli_dataalteracao) : null;\r\n dados.cli_datainclusao = !!dados.cli_datainclusao ? moment(dados.cli_datainclusao) : null;\r\n dados.pef_dataalteracao = !!dados.pef_dataalteracao ? moment(dados.pef_dataalteracao) : null;\r\n dados.pef_datanascimento = !!dados.pef_datanascimento ? moment(dados.pef_datanascimento) : null;\r\n dados.pef_rgdataexpedicao = !!dados.pef_rgdataexpedicao ? moment(dados.pef_rgdataexpedicao) : null;\r\n dados.pes_dataalteracao = !!dados.pes_dataalteracao ? moment(dados.pes_dataalteracao) : null;\r\n dados.pes_datainclusao = !!dados.pes_datainclusao ? moment(dados.pes_datainclusao) : null;\r\n dados.pej_datafundacao = !!dados.pej_datafundacao ? moment(dados.pej_datafundacao) : null;\r\n dados.cli_datainiciallimitecred = !!dados.cli_datainiciallimitecred ? moment(dados.cli_datainiciallimitecred) : null;\r\n dados.cli_datafinallimitecred = !!dados.cli_datafinallimitecred ? moment(dados.cli_datafinallimitecred) : null;\r\n setProdutorRural(!!dados.pef_produtorrural);\r\n setOrgaoPublico(!!dados.pej_orgaop);\r\n let lista = [];\r\n if (!!dados.pef_rguf) {\r\n lista.push({ name: \"pef_rguf\", campo: \"Uf\", value: dados.pef_rguf });\r\n }\r\n if (!!dados.pef_codigocidadenascimento) {\r\n lista.push({ name: \"pef_codigocidadenascimento\", campo: \"IdCidade\", value: dados.pef_codigocidadenascimento });\r\n }\r\n if (lista.length > 0) {\r\n editando.setEditando(false);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n formulario.setFieldsValue(dados);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n if (cpfCnpj.length === 14) {\r\n setPessoaJuridica(true);\r\n receitaWS(cpfCnpj);\r\n }\r\n }\r\n );\r\n };\r\n\r\n function buscarRegimeTributario() {\r\n api.get(`Enum/Listar?nome=RegimeTributarioFiscal`).then(\r\n res => {\r\n setDadosRegimeTrib(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n setAbaSelecionada(tab)}>\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!desabilitarCfpCnpj &&\r\n
\r\n \r\n Cliente Estrangeiro\r\n \r\n \r\n }\r\n \r\n \r\n {!!!isEstrangeiro &&\r\n \r\n \r\n {\r\n const valorCpfCnpj = valor.currentTarget.value.replace(/\\D/g, '');\r\n validarFisicoJuridico(valor);\r\n validarCpfCnpjExistente(valorCpfCnpj); // Passe o valor atualizado\r\n }}\r\n onChange={(event, type) => {\r\n setCpfCnpj(event.target.value);\r\n setMask(type === \"CPF\");\r\n }} />\r\n \r\n \r\n }\r\n {!!isEstrangeiro &&\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n {!pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n Feminino\r\n Masculino\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n carregarCidades(UfEstado)} onSelectFunction={(UfEstado) => carregarCidades(UfEstado)}\r\n conteudo={\r\n est => (\r\n {est.est_sigla} - {est.est_descricao})\r\n } />\r\n \r\n \r\n\r\n \r\n \r\n ({cid.cid_id} - {cid.cid_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n }\r\n {/* colocado no endereço quando produtor Rural \r\n {produtorRural && !pessoaJuridica &&\r\n \r\n \r\n {\r\n !!campo.currentTarget.value ? formulario.setFieldsValue({ cli_clientecontribuinteicms: true }) : formulario.setFieldsValue({ cli_clientecontribuinteicms: false })\r\n }} />\r\n \r\n \r\n } */}\r\n {pessoaJuridica &&\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n !!campo.currentTarget.value ? formulario.setFieldsValue({ cli_clientecontribuinteicms: true }) : formulario.setFieldsValue({ cli_clientecontribuinteicms: false })\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n É Órgão Público?\r\n \r\n \r\n \r\n \r\n Cliente Ativo? \r\n \r\n \r\n \r\n \r\n Contribuinte ICMS? \r\n \r\n \r\n \r\n \r\n Calcula Retenção? \r\n \r\n \r\n \r\n \r\n { setProdutorRural(!produtorRural) }}> Produtor Rural \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Informações Informações Financeiras\r\n \r\n \r\n Adicione as informações financeiras aqui.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Não protestar? \r\n \r\n \r\n \r\n \r\n Venda somente a vista? \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n Percentual de Desconto (%)\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pessoaJuridica &&\r\n \r\n \r\n Baixado da Receita? \r\n \r\n \r\n }\r\n \r\n \r\n \r\n {!!orgaoPublico &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!isEstrangeiro &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Campos Campos Adicionais\r\n \r\n \r\n Adicione abaixo as informações adicionais.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Table, Modal } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { FiltroProdutoOrcamento } from \"../../components\";\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabItens({ form, dadosItens }) {\r\n\r\n const [quantidadeItens, setQuantidadeItens] = useState(0);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosEditando, setDadosEditando] = useState({});\r\n\r\n useEffect(() => {\r\n if (dadosItens.listaProduto.length > 0) {\r\n let total = 0;\r\n setQuantidadeItens(dadosItens.listaProduto.length);\r\n dadosItens.listaProduto.forEach((item) => {\r\n total += parseFloat(item.oit_qtde * item.oit_valorunitario);\r\n });\r\n setValorTotal(total);\r\n } else {\r\n setQuantidadeItens(0);\r\n setValorTotal(0);\r\n }\r\n }, [dadosItens.listaProduto]);\r\n\r\n function editarItem(registro) {\r\n setDadosEditando(registro);\r\n setEditando(true);\r\n };\r\n\r\n function removerItem(record) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: 'Deseja remover o item da nota?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n let dadosTemp = [...dadosItens.listaProduto];\r\n let dadosRet = dadosTemp.filter((item => item !== record));\r\n dadosItens.setListaProduto(dadosRet);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {!!dadosItens.listaProduto && dadosItens.listaProduto.length > 0 &&
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n {pro_descricao}\r\n \r\n \r\n \r\n \r\n EAN: {!!pro_ean ? pro_ean : prg_ean}\r\n \r\n \r\n Grade: {grade}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 40,\r\n align: 'center',\r\n render: ({ oit_qtde }) => (\r\n
\r\n {oit_qtde}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 50,\r\n render: ({ oit_valorunitario }) => (\r\n
\r\n {FormatNumber(oit_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 60,\r\n render: ({ total, oit_qtde, oit_valorunitario }) => (\r\n
\r\n {FormatNumber((oit_qtde * oit_valorunitario), true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 40,\r\n fixed: 'right',\r\n render: (record, e, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Quantidade Itens:\r\n \r\n \r\n {quantidadeItens}\r\n \r\n \r\n \r\n \r\n Valor Total dos Itens (R$):\r\n \r\n \r\n {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Typography, Row, Col, Form, Divider, InputNumber, Card, notification, Button, Select, Table, Input } from \"antd\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { validarNumeros } from \"../../services/funcoes\";\r\nimport { InputPreco, } from \"../../components\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\n\r\nexport default function TabFaturamentoNovo({ form, dadosItens, dadosVendedor, orcamento }) {\r\n\r\n const [valorOrcamento, setValorOrcamento] = useState(0);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [dadosItemEditando, setDadosItemEditando] = useState({})\r\n\r\n useEffect(() => {\r\n calcularFaturamento();\r\n if (orcamento != null) {\r\n setExibirDetalhes(true);\r\n } else {\r\n setExibirDetalhes(false);\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n recalcularTotal();\r\n formasPagamento();\r\n }, [valorOrcamento]);\r\n\r\n function formasPagamento() {\r\n let pagamento = [...orcamento.orcamentoFormaPagamento];\r\n let dados = pagamento;\r\n let formulario = form.getFieldValue();\r\n dados.forEach((itens) => {\r\n let total = validarNumeros(formulario.valorTotal);\r\n let acrescimo = (itens.orf_percentualacrescimo * total) / 100;\r\n let desconto = (itens.orf_percentualdesconto * total) / 100;\r\n\r\n itens.total = total;\r\n itens.valoracrescimo = acrescimo;\r\n itens.valordesconto = desconto;\r\n itens.valorPagamento = (total + acrescimo) - desconto;\r\n })\r\n orcamento.setOrcamentoFormaPagamento(dados);\r\n };\r\n\r\n function desconto() {\r\n let formulario = form.getFieldValue();\r\n let valorTotal = parseFloat(formulario.valorTotal);\r\n let totalItens = parseFloat(formulario.totalItens);\r\n let desconto = 0;\r\n let acrescimo = 0;\r\n if (valorTotal < totalItens) {\r\n desconto = (formulario.totalItens - formulario.valorTotal);\r\n form.setFieldsValue({ valorDesconto: desconto.toFixed(2) });\r\n form.setFieldsValue({ valorAcrescimo: 0 });\r\n calcularAcrescimo(\"VALOR\");\r\n calcularDesconto(\"VALOR\");\r\n }\r\n if (valorTotal > totalItens) {\r\n acrescimo = (formulario.valorTotal - formulario.totalItens);\r\n form.setFieldsValue({ valorAcrescimo: acrescimo.toFixed(2) });\r\n form.setFieldsValue({ valorDesconto: 0 });\r\n calcularAcrescimo(\"VALOR\");\r\n calcularDesconto(\"VALOR\");\r\n }\r\n if (valorTotal === totalItens) {\r\n form.setFieldsValue({\r\n valorDesconto: 0, valorAcrescimo: 0, orf_percentualacrescimo: 0, orf_percentualdesconto: 0 \r\n })\r\n }\r\n }\r\n\r\n function calcularFaturamento() {\r\n let formulario = form.getFieldValue();\r\n let totalItens = 0;\r\n dadosItens.forEach((item) => {\r\n totalItens += item.oit_qtde * item.oit_valorunitario;\r\n });\r\n form.setFieldsValue({ totalItens: totalItens.toFixed(2) });\r\n form.setFieldsValue({ orc_valorfrete: validarNumeros(formulario.orc_valorfrete) });\r\n form.setFieldsValue({ valorSeguro: validarNumeros(formulario.valorSeguro) });\r\n form.setFieldsValue({ orc_valoroutros: validarNumeros(formulario.orc_valoroutros) })\r\n setValorOrcamento(parseFloat(totalItens));\r\n };\r\n\r\n function calcularDesconto(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorDesconto);\r\n let perc = validarNumeros(formulario.orf_percentualdesconto);\r\n let tot = parseFloat(valorOrcamento);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorDesconto: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ orf_percentualdesconto: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function calcularAcrescimo(campo) {\r\n let formulario = form.getFieldValue();\r\n let valor = validarNumeros(formulario.valorAcrescimo);\r\n let perc = validarNumeros(formulario.orf_percentualacrescimo);\r\n let tot = (!!valorOrcamento ? parseFloat(valorOrcamento) : 0);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ valorAcrescimo: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ orf_percentualacrescimo: result.toFixed(2) });\r\n }\r\n }\r\n recalcularTotal();\r\n };\r\n\r\n function recalcularTotal() {\r\n let formulario = form.getFieldValue();\r\n \r\n const percDesconto = formulario.orf_percentualdesconto ? parseFloat(formulario.orf_percentualdesconto) /100 : 0;\r\n const percAcresc = formulario.orf_percentualacrescimo ? parseFloat(formulario.orf_percentualacrescimo) /100 : 0;\r\n\r\n const valorFrete = validarNumeros(formulario.orc_valorfrete);\r\n const valorSeguro = validarNumeros(formulario.valorSeguro);\r\n const valorOutros = validarNumeros(formulario.orc_valoroutros);\r\n //Calcular valor com frete e outros\r\n const valorCFreteEOutros = valorOrcamento + valorFrete + valorSeguro + valorOutros;\r\n //Calcular descontos e acrescimos\r\n const calcuPercDesc = valorCFreteEOutros * percDesconto;\r\n const calcuPercAcresc = valorCFreteEOutros * percAcresc;\r\n //Calcular valor total e subtotal\r\n const valorTotal = valorCFreteEOutros - calcuPercDesc + calcuPercAcresc;\r\n const subTotal = valorOrcamento + valorFrete + valorSeguro + valorOutros;\r\n\r\n form.setFieldsValue({\r\n valorTotal: valorTotal.toFixed(2),\r\n subTotal: subTotal.toFixed(2)\r\n })\r\n\r\n setValorTotal(subTotal);\r\n form.setFieldsValue({ pfp_valor: valorTotal.toFixed(2) });\r\n };\r\n\r\n function vendedorDescMaxFinal() {\r\n let totalDesconto = 0;\r\n let totalValorDescontoItens = 0;\r\n dadosItens.forEach((itens) => {\r\n totalValorDescontoItens += parseFloat(itens.nfi_valordesconto);\r\n });\r\n let percentualDescontoConcedido = parseFloat(((totalValorDescontoItens * 100) / parseFloat(form.getFieldsValue().totalItens)).toFixed(2));\r\n totalDesconto = percentualDescontoConcedido + parseFloat(form.getFieldValue().orf_percentualdesconto);\r\n if (!!dadosVendedor && JSON.stringify(dadosVendedor) !== '{}' && !!dadosVendedor.ven_maximodesconto) {\r\n if (totalDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: `O desconto máximo para este vendedor não pode exceder ${dadosVendedor.ven_maximodesconto * 100}% !`, message: 'Aviso' });\r\n form.setFieldsValue({ orf_percentualdesconto: (dadosVendedor.ven_maximodesconto * 100) - parseFloat(percentualDescontoConcedido) });\r\n calcularDesconto('PERC');\r\n }\r\n }\r\n };\r\n\r\n async function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null })\r\n }\r\n api.get(`CondicaoPagamento/Listar?codigoFormaPagamento=${fpg_id}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n //não mecher daqui pra cima realiza os calculos que ja estão certos\r\n\r\n async function adicionarLista() {\r\n let valorPgmto = parseFloat(form.getFieldValue().valorTotal);\r\n let pagamento = [...orcamento.orcamentoFormaPagamento]\r\n const fpgIncluida = pagamento.some(item => \r\n item.fpg_id === form.getFieldValue().fpg_id &&\r\n item.cpg_id === form.getFieldValue().cpg_id &&\r\n item.valorPagamento === valorPgmto\r\n );\r\n\r\n if (fpgIncluida) {\r\n notification.warning({ message: 'Aviso', description: 'Forma de Pagamento ja incluída!' });\r\n } else {\r\n if (editando) {\r\n if (!form.getFieldValue().fpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma de pagamento!' });\r\n } else if (condicaoPagamento.length > 0 && !form.getFieldValue().cpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe uma condição de pagamento!' });\r\n } else {\r\n let novaFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n let novaCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n let dadosTemp = [...orcamento.orcamentoFormaPagamento]\r\n let dadosItem = dadosItemEditando;\r\n\r\n let pagamentoTemp = {\r\n key: dadosItem.key,\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: novaFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!novaCondicoesPagamento && novaCondicoesPagamento.cpg_descricao ? novaCondicoesPagamento.cpg_descricao: '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n valorPagamento: parseFloat(form.getFieldValue().valorTotal),\r\n valoracrescimo: form.getFieldValue().valorAcrescimo,\r\n valordesconto: form.getFieldValue().valorDesconto,\r\n orf_observacao: form.getFieldValue().orf_observacao,\r\n orf_percentualacrescimo: form.getFieldValue().orf_percentualacrescimo,\r\n orf_percentualdesconto: form.getFieldValue().orf_percentualdesconto,\r\n valoritens: form.getFieldValue().totalItens\r\n }\r\n\r\n dadosTemp = dadosTemp.map(item => item.key === dadosItem.key ? pagamentoTemp : item);\r\n orcamento.setOrcamentoFormaPagamento(dadosTemp)\r\n notification.success({ message: 'Aviso', description: 'Forma de Pagamento editada com sucesso!' });\r\n }\r\n setEditando(false);\r\n } else {\r\n let dadosTemp = [...orcamento.orcamentoFormaPagamento];\r\n let dados = {};\r\n let campo = form.getFieldsValue();\r\n if (!campo.fpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe uma forma de pagamento!' });\r\n } if (condicaoPagamento.length > 0 && !campo.cpg_id) {\r\n notification.warning({ message: 'Aviso', description: 'Informe uma condição de pagamento!' });\r\n } else {\r\n var condicao = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n //var condicao = await api.get(`CondicaoPagamneto/Listar?codigoCondicaoPagamento=${form.getFieldValue().cpg_id}`);\r\n var forma = await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`);\r\n dados.key = dadosTemp.length + 1;\r\n dados.orc_id = form.getFieldValue().orc_id;\r\n dados.fpg_id = form.getFieldValue().fpg_id;\r\n dados.fpg_descricao = forma.data.fpg_descricao;\r\n dados.cpg_id = !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id: null;\r\n dados.cpg_descricao = !!condicao && condicao.cpg_descricao ? condicao.cpg_descricao: '';\r\n dados.orf_percentualacrescimo = form.getFieldValue().orf_percentualacrescimo;\r\n dados.orf_percentualdesconto = form.getFieldValue().orf_percentualdesconto;\r\n dados.orf_observacao = form.getFieldValue().orf_observacao;\r\n dados.valoritens = form.getFieldValue().totalItens;\r\n dados.valordesconto = parseFloat(form.getFieldValue().valorDesconto);\r\n dados.valoracrescimo = parseFloat(form.getFieldValue().valorAcrescimo);\r\n dados.valorPagamento = parseFloat(form.getFieldValue().valorTotal);\r\n\r\n dadosTemp.push(dados); //adiciona os dados do novo orcamento a um array\r\n //dados.key = retornaSequencial(dadosTemp); //seta o key no orcamento cadastrado\r\n orcamento.setOrcamentoFormaPagamento(dadosTemp); //adiciona os dados temporarios a lista de orcamentos\r\n notification.success({ message: 'Aviso', description: 'Forma de Pagametno incluída com sucesso!' });\r\n }\r\n }\r\n }\r\n setExibirDetalhes(true);\r\n limparCampos();\r\n recalcularTotal();\r\n setEditando(false)\r\n };\r\n\r\n function cancelar() {\r\n limparCampos();\r\n recalcularTotal();\r\n setEditando(false);\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({\r\n fpg_id: null, cpg_id: null, orf_percentualdesconto: 0, orf_percentualacrescimo: 0,// orc_valorfrete: 0, orc_valoroutros: 0, \r\n valorAcrescimo: 0, valorDesconto: 0, orf_observacao: ''\r\n });\r\n };\r\n\r\n async function editarItem(registro) {\r\n setPagamentoTotal(false);\r\n setEditando(true);\r\n setDadosItemEditando(registro);\r\n\r\n await listarCondicao(registro.fpg_id, true)\r\n form.setFieldsValue({ fpg_id: registro.fpg_id });\r\n form.setFieldsValue({ cpg_id: registro.cpg_id });\r\n form.setFieldsValue({ valorTotal: registro.valorPagamento });\r\n form.setFieldsValue({ orf_observacao: registro.orf_observacao });\r\n form.setFieldsValue({ valorDesconto: registro.valordesconto });\r\n form.setFieldsValue({ valorAcrescimo: registro.valoracrescimo });\r\n form.setFieldsValue({ orf_percentualacrescimo: registro.orf_percentualacrescimo });\r\n form.setFieldsValue({ orf_percentualdesconto: registro.orf_percentualdesconto });\r\n };\r\n\r\n function removerItem(item) {\r\n let dadosTemp = [...orcamento.orcamentoFormaPagamento];\r\n dadosTemp = dadosTemp.filter((dados) => dados !== item);\r\n orcamento.setOrcamentoFormaPagamento(dadosTemp);\r\n setEditando(false)\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Resumo do Orçamento\r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n { recalcularTotal(); }}\r\n />\r\n \r\n \r\n { recalcularTotal(); }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Total do Orçamento (R$) {FormatNumber(valorTotal, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!pagamentoTotal && \r\n \r\n \r\n \r\n { listarCondicao(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n \r\n {condicaoPagamento.length > 0 && \r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { vendedorDescMaxFinal(); }}\r\n onChange={() => { calcularDesconto('PERC'); }}\r\n />\r\n \r\n \r\n \r\n { vendedorDescMaxFinal(); }} onChange={() => { calcularDesconto('VALOR'); }} />\r\n \r\n \r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n onBlur={() => { calcularAcrescimo('PERC') }}\r\n />\r\n \r\n \r\n \r\n { calcularAcrescimo('VALOR') }}\r\n />\r\n \r\n \r\n { desconto() }}\r\n defaultValue={\"valorTotal\"} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n\r\n \r\n \r\n
\r\n {!!orcamento.orcamentoFormaPagamento && orcamento.orcamentoFormaPagamento.length > 0 &&\r\n
(\r\n
\r\n {fpg_descricao} {!!cpg_descricao ? `/ ${cpg_descricao}` : ''}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Desconto (R$)',\r\n width: 90,\r\n align: 'right',\r\n render: ({ valordesconto }) => (\r\n
\r\n {FormatNumber(valordesconto, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acréscimo (R$)',\r\n width: 90,\r\n align: 'right',\r\n render: ({ valoracrescimo }) => (\r\n
\r\n {FormatNumber(valoracrescimo, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n width: 90,\r\n align: 'right',\r\n render: ({ valorPagamento }) => (\r\n
\r\n {FormatNumber(valorPagamento, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n width: 60,\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n Obs.: { !!orf_observacao ? orf_observacao : \"Não Informado\" } \r\n \r\n \r\n \r\n ),\r\n }} dataSource={orcamento.orcamentoFormaPagamento} scroll={{ x: 900 }} />}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Select, Input, Steps, notification, Button, Tooltip } from \"antd\";\r\nimport { UserAddOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport moment from \"moment\";\r\nimport { useStateValue } from \"../../state\";\r\nimport SelectPaginado from \"../../components/selectPaginado\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport { Data, InputCpfCnpj, InputPhone } from \"../../components\";\r\nimport { TabItens, TabFaturamento } from \"./tabPage\";\r\nimport { validaForm } from \"../../services/funcoes\";\r\n\r\nexport default function ManutencaoOrcamento({ formulario, aoSalvar, vendedor, pages, proximaPag }) {\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const [pessoaFisica, setPessoaFisica] = useState(true);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n const [orcamentoFormaPagamento, setOrcamentoFormaPagamento] = useState([])\r\n const [permiteValidar, setPermiteValidar] = useState(true);\r\n const [clienteSemCadastro, setClienteSemCadastro] = useState(false);\r\n const [dadosCliente, setDadosCliente] = useState({});\r\n const listaValidacoesDest = []\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.orcamentoFormaPagamento) {\r\n setOrcamentoFormaPagamento(manutencao.dados.orcamentoFormaPagamento);\r\n carregarDados();\r\n }\r\n manutencao.dados.orc_datainclusao = moment(manutencao.dados.orc_datainclusao);\r\n manutencao.dados.orc_datavalidade = moment(manutencao.dados.orc_datavalidade);\r\n let record = manutencao.dados;\r\n if (!!manutencao.dados.orc_id && listaProduto.length === 0) {\r\n carregarDados(record);\r\n buscarDadosOrcamento(record);\r\n }\r\n if (!!manutencao.dados.pef_cpf) {\r\n setPessoaFisica(true);\r\n }\r\n else if (!!manutencao.dados.pej_cnpj) {\r\n setPessoaFisica(false);\r\n }\r\n if (manutencao.dados.cli_id === null) {\r\n setClienteSemCadastro(true)\r\n }\r\n setDadosCliente(manutencao.dados);\r\n formulario.setFieldsValue(manutencao.dados);\r\n formulario.setFieldsValue({ pes_id: manutencao.dados.pes_nome })\r\n formulario.setFieldsValue({ cpf: manutencao.dados.pef_cpf })\r\n formulario.setFieldsValue({ cnpj: manutencao.dados.pej_cnpj })\r\n formulario.setFieldsValue({ orc_numerotelefone: manutencao.dados.pes_telefone})\r\n }\r\n if (!!manutencao.dados && !!manutencao.dados.orc_datainclusao) {\r\n formulario.setFieldsValue({ orc_datainclusao: (manutencao.dados.orc_datainclusao) });\r\n } else if (!!!formulario.getFieldsValue().orc_datainclusao) {\r\n formulario.setFieldsValue({ orc_datainclusao: moment(new Date()) });\r\n formulario.setFieldsValue({ orc_datavalidade: moment(new Date()).add(1, 'days') });\r\n }\r\n }, [manutencao.dados])\r\n\r\n useEffect(() => {\r\n if ((!!proximaPag.proximaPag || proximaPag.proximaPag === 0) && permiteValidar) {\r\n validarTrocaPg(proximaPag.proximaPag);\r\n } else {\r\n setPermiteValidar(true);\r\n }\r\n }, [proximaPag.proximaPag])\r\n\r\n const informarCliente = () => {\r\n setClienteSemCadastro(!clienteSemCadastro);\r\n if (!clienteSemCadastro) {\r\n formulario.setFieldsValue({ cpf: null, cnpj: null, pes_nome: null, pes_id: null })\r\n } \r\n };\r\n\r\n function carregarDados(record) {\r\n api.get(`OrcamentoItem/DadosItem?orcamento=${record.orc_id}`).then(\r\n (res) => {\r\n let itens = res.data;\r\n setListaProduto(itens);\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function buscarDadosOrcamento(record) {\r\n api.get(`OrcamentoFormaPagamento/Listar?orcamento=${record.orc_id}`).then(\r\n res => {\r\n let key = 1;\r\n res.data.forEach((itens) => {\r\n itens.key = key++;\r\n })\r\n setOrcamentoFormaPagamento(res.data);\r\n }\r\n ).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n async function retornaDadosCliente(dados) {\r\n if (!!dados) {\r\n let clienteSelecionado = (await api.get(`Cliente/BuscarByIdPessoa/${dados}`)).data;\r\n if (!!clienteSelecionado.pef_cpf) {\r\n setPessoaFisica(true);\r\n formulario.setFieldsValue({ cpf: clienteSelecionado.pef_cpf, cli_id: clienteSelecionado.cli_id });\r\n } else if (!!clienteSelecionado.pej_cnpj) {\r\n setPessoaFisica(false);\r\n formulario.setFieldsValue({ cnpj: clienteSelecionado.pej_cnpj, cli_id: clienteSelecionado.cli_id });\r\n }\r\n await api.get(`PessoaTelefone/ListaTelefone?IdPessoa=` + dados).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n const telefonePrincipal = res.data.find(telefone => telefone.psc_principal === true);\r\n if (telefonePrincipal) {\r\n formulario.setFieldsValue({ orc_numerotelefone: telefonePrincipal.psc_numero });\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n }\r\n\r\n function validarTrocaPg(proxPagina) {\r\n let paginaAtual = pages.tagPages;\r\n let listaValidacoes = [];\r\n\r\n if (paginaAtual < proxPagina) {\r\n switch (paginaAtual) {\r\n case 0:\r\n listaValidacoes = listaValidacoesDest;\r\n if (!!listaProduto && listaProduto.length === 0) {\r\n notification.warning({ message: 'Aviso', description: 'Orçamento deve ter ao menos 1 item!' });\r\n proximaPag.setProximaPag(paginaAtual);\r\n return false;\r\n }\r\n }\r\n formulario.validateFields(['']).then(() => {\r\n if (validaForm(formulario, listaValidacoes)) {\r\n pages.setTagPages(proxPagina);\r\n } else {\r\n proximaPag.setProximaPag(paginaAtual);\r\n }\r\n }).catch(() => {\r\n notification.warning({ message: 'Aviso', description: 'Preencha os campos obrigatórios!'});\r\n proximaPag.setProximaPag(paginaAtual);\r\n });\r\n } else {\r\n pages.setTagPages(proxPagina);\r\n }\r\n }\r\n\r\n function preencherDadosOrcamento() {\r\n let dadosForma = [];\r\n orcamentoFormaPagamento.forEach(forma => {\r\n let aux = { ...forma };\r\n aux.valorTotal = formulario.getFieldValue().valorTotal;\r\n aux.orc_id = formulario.getFieldValue().orc_id;\r\n aux.orc_numero = formulario.getFieldValue().orc_numero;\r\n aux.fpg_id = forma.fpg_id;\r\n aux.fpg_descricao = forma.fpg_descricao;\r\n aux.cpg_id = forma.cpg_id;\r\n aux.cpg_descricao = forma.cpg_descricao;\r\n aux.data_sincro = new Date();\r\n aux.orf_id = forma.orf_id;\r\n aux.cpg_descricao = forma.cpg_descricao;\r\n aux.orf_percentualdesconto = !!forma.orf_percentualdesconto ? forma.orf_percentualdesconto : 0;\r\n aux.orf_percentualacrescimo = !!forma.orf_percentualacrescimo ? forma.orf_percentualacrescimo : 0;\r\n dadosForma.push(aux);\r\n });\r\n return dadosForma;\r\n };\r\n\r\n function popularDadosItens() {\r\n let produtos = [];\r\n listaProduto.forEach(itens => {\r\n let aux = { ...itens };\r\n aux.orc_id = itens.orc_id;\r\n aux.pro_id = itens.pro_id;\r\n aux.oit_qtde = itens.oit_qtde;\r\n aux.data_sincro = new Date();\r\n aux.oit_valorunitario = itens.oit_valorunitario;\r\n aux.prg_id = itens.prg_id;\r\n aux.oit_desconto = itens.oit_desconto;\r\n aux.oit_id = itens.oit_id;\r\n produtos.push(aux);\r\n })\r\n return produtos;\r\n };\r\n\r\n async function salvarManutencao(values) {\r\n if (listaProduto.length > 0) {\r\n let dados = {};\r\n if (dadosCliente.cli_id !== undefined && dadosCliente.cli_id !== null) {\r\n var cliente = (await api.get(`Cliente/BuscarCliente/${dadosCliente.cli_id}`)).data;\r\n }\r\n else if (values.pes_id){\r\n var cliente = (await api.get(`Cliente/BuscarByIdPessoa/${values.pes_id}`)).data;\r\n }\r\n dados = { ...values };\r\n dados.orc_id = formulario.getFieldValue().orc_id;\r\n dados.ven_id = formulario.getFieldValue().ven_id;\r\n dados.cli_id = formulario.getFieldValue().cli_id;\r\n dados.orc_observacao = formulario.getFieldValue().orc_observacao;\r\n dados.orc_valorfrete = parseFloat(values.orc_valorfrete);\r\n dados.orc_numero = formulario.getFieldValue().orc_numero;\r\n dados.orc_valordesconto = values.valorDesconto;\r\n dados.orc_valoroutros = parseFloat(values.orc_valoroutros);\r\n dados.orc_datainclusao = formulario.getFieldValue().orc_datainclusao;\r\n dados.orc_datavalidade = formulario.getFieldValue().orc_datavalidade;\r\n dados.orc_responsavelorcamento = formulario.getFieldValue().orc_responsavelorcamento;\r\n dados.orc_numerotelefone = formulario.getFieldValue().orc_numerotelefone;\r\n dados.orcamentoformapagamento = preencherDadosOrcamento(orcamentoFormaPagamento);\r\n dados.orcamentoitem = popularDadosItens(listaProduto);\r\n dados.orc_nomecliente = values.pes_nome || cliente.pes_nome\r\n if (orcamentoFormaPagamento.length === 0) {\r\n notification.warning({ success: 'Aviso', description: 'Selecione uma Forma de Pagamento' })\r\n } else {\r\n if (moment(dados.orc_datavalidade).isBefore(moment(dados.orc_datainclusao))) {\r\n notification.warning({ message: 'Aviso', description: 'Data de validade não pode ser menor que a data de emissão!' });\r\n } else {\r\n try {\r\n var res = dados.orc_id ? await api.put('Orcamento/Editar', dados) : await api.post('Orcamento/Incluir', dados);\r\n if (res.status == 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do Orçamento foram salvos com sucesso!\" });\r\n }\r\n } catch (error) {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(error.response) });\r\n } finally {\r\n carregarDados(true);\r\n aoSalvar();\r\n }\r\n }\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'É necessário informar pelo menos um item!' });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n retornaDadosCliente(dados)}\r\n conteudo={\r\n pc => ( {pc.cli_codigo} - {pc.pes_nome}
\r\n {(!!pc.pej_cnpj ? `CNPJ.: ${MaskFormat(pc.pej_cnpj, '', true)}` : !!pc.pef_cpf ? `CPF.: ${MaskFormat(pc.pef_cpf, '', true)}` : '')}\r\n
)\r\n } />\r\n
\r\n }\r\n {clienteSemCadastro && \r\n \r\n \r\n \r\n }\r\n {pessoaFisica && \r\n \r\n }\r\n {!pessoaFisica && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ({v.pes_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.tagPages === 0 &&\r\n \r\n }\r\n {pages.tagPages === 1 &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n )\r\n}","import React,{ useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined, LeftOutlined, RightOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\nimport ManutencaoOrcamento from './manutencaoOrc';\r\nimport { useEffect } from 'react';\r\n\r\nexport default function Drawer({ carregarDados, vendedor }) {\r\n\r\n const [ formOrcamento ] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [ carregando, setCarregando ] = useState(false);\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [tagPages, setTagPages] = useState(null);\r\n \r\n useEffect(() => {\r\n if (manutencao.dados !== null) {\r\n formOrcamento.setFieldsValue(manutencao.dados);\r\n } else {\r\n formOrcamento.resetFields();\r\n }\r\n }, [manutencao.dados])\r\n \r\n\r\n function fecharDrawer() {\r\n formOrcamento.resetFields();\r\n setTagPages(0);\r\n setProximaPag(null);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null}});\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false}});\r\n setCarregando(false);\r\n carregarDados();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n formOrcamento.resetFields();\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n destroyOnClose={true}\r\n fecharDrawer={() => {fecharDrawer()}}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Select, InputNumber, Modal } from \"antd\";\r\nimport { InputPercentual } from '../../components';\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabEntrada({ formulario }) {\r\n\r\n const [listaCstPisCofins, setListaCSTPisCofins] = useState([]);\r\n const [cstpispj, setcstpispj] = useState(null);\r\n const [cstcofinspj, setcstcofinspj] = useState(null);\r\n const [cstpispf, setcstpispf] = useState(null);\r\n const [cstcofinspf, setcstcofinspf] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!!formulario.getFieldValue(['cpc_entradacstpispj', 'cpc_id'])) {\r\n setcstpispj(formulario.getFieldValue(['cpc_entradacstpispj', 'cpc_id']));\r\n }\r\n\r\n if (!!formulario.getFieldValue(['cpc_entradacstcofinspj', 'cpc_id'])) {\r\n setcstcofinspj(formulario.getFieldValue(['cpc_entradacstcofinspj', 'cpc_id']));\r\n }\r\n\r\n if (!!formulario.getFieldValue(['cpc_entradacstpispf', 'cpc_id'])) {\r\n setcstpispf(formulario.getFieldValue(['cpc_entradacstpispf', 'cpc_id']));\r\n }\r\n\r\n if (!!formulario.getFieldValue(['cpc_entradacstcofinspf', 'cpc_id'])) {\r\n setcstcofinspf(formulario.getFieldValue(['cpc_entradacstcofinspf', 'cpc_id']));\r\n }\r\n api.get(`CstPisCofins/ListarEntradaSaida?tipo=E`).then(\r\n res => {\r\n setListaCSTPisCofins(res.data);\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (cstpispj && cstcofinspj)\r\n if (cstpispj !== cstcofinspj)\r\n Modal.warning({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Os CST estão diferentes, normalmente o CST PIS e COFINS devem ser iguais - Verifique a situação!',\r\n okText: 'Ok',\r\n });\r\n }, [cstpispj, cstcofinspj]);\r\n\r\n useEffect(() => {\r\n if (cstpispf && cstcofinspf)\r\n if (cstpispf !== cstcofinspf)\r\n Modal.warning({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Os CST estão diferentes, normalmente o CST PIS e COFINS devem ser iguais - Verifique a situação!',\r\n okText: 'Ok',\r\n });\r\n }, [cstpispf, cstcofinspf]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Entradas\" Entradas\r\n \r\n \r\n Defina a configuração do PIS e da COFINS para as entradas.\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n setcstpispj(valor);\r\n if (formulario.getFieldValue(['cpc_entradacstpispj', 'cpc_id']) > 69 && formulario.getFieldValue(['cpc_entradacstpispj', 'cpc_id']) < 76)\r\n formulario.setFieldsValue({ pis_entradapercredbcpispj: 0, pis_entradapercpispj: 0 })\r\n }}>\r\n {listaCstPisCofins.map((item) => (\r\n {item.cpc_id} - {item.cpc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n 69 && cstpispj < 76}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_entradapercredbcpispj\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 69 && cstpispj < 76}\r\n label=\"% Alíquota do PIS\"\r\n name=\"pis_entradapercpispj\"\r\n rules={[{ required: (cstpispj < 70 && cstpispj != null) ? true : false, message: 'Informe o % alíquota do PIS' }]}\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 0, message: 'Selecione um CST da COFINS' }]}>\r\n {\r\n setcstcofinspj(valor);\r\n if (formulario.getFieldValue(['cpc_entradacstcofinspj', 'cpc_id']) > 69 && formulario.getFieldValue(['cpc_entradacstcofinspj', 'cpc_id']) < 76)\r\n formulario.setFieldsValue({ pis_entradapercredbccofinspj: 0, pis_entradaperccofinspj: 0 })\r\n }}>\r\n {listaCstPisCofins.map((item) => (\r\n {item.cpc_id} - {item.cpc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n 69 && cstcofinspj < 76}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_entradapercredbccofinspj\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 69 && cstcofinspj < 76}\r\n label=\"% Alíquota da COFINS\"\r\n rules={[{ required: (cstcofinspj < 70 && cstcofinspj != null) ? true : false, message: 'Informe o % alíquota do COFINS' }]}\r\n name=\"pis_entradaperccofinspj\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n \r\n {\r\n setcstpispf(valor);\r\n if (formulario.getFieldValue(['cpc_entradacstpispf', 'cpc_id']) > 69 && formulario.getFieldValue(['cpc_entradacstpispf', 'cpc_id']) < 76) formulario.setFieldsValue({ pis_entradapercredbcpispf: 0, pis_entradapercpispf: 0 })\r\n }}>\r\n {listaCstPisCofins.map((item) => (\r\n {item.cpc_id} - {item.cpc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n 69 && cstpispf < 76}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_entradapercredbcpispf\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 69 && cstpispf < 76}\r\n label=\"% Alíquota do PIS\"\r\n name=\"pis_entradapercpispf\"\r\n rules={[{ required: (cstpispf < 70 && cstpispf != null) ? true : false, message: 'Informe o % alíquota do PIS' }]}\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 0, message: 'Selecione um CST da COFINS' }]}>\r\n {\r\n setcstcofinspf(valor);\r\n if (formulario.getFieldValue(['cpc_entradacstcofinspf', 'cpc_id']) > 69 && formulario.getFieldValue(['cpc_entradacstcofinspf', 'cpc_id']) < 76) formulario.setFieldsValue({ pis_entradapercredbccofinspf: 0, pis_entradaperccofinspf: 0 })\r\n }}>\r\n {listaCstPisCofins.map((item) => (\r\n {item.cpc_id} - {item.cpc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n 69 && cstcofinspf < 76}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_entradapercredbccofinspf\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 69 && cstcofinspj < 76}\r\n label=\"% Alíquota do COFINS\"\r\n rules={[{ required: (cstcofinspf < 70 && cstcofinspf != null) ? true : false, message: 'Informe o % alíquota do COFINS' }]}\r\n name=\"pis_entradaperccofinspf\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Form, Row, Col, Typography, Divider, Select, InputNumber, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\nimport { InputPercentual } from '../../components';\r\n\r\nimport api from \"../../services/api\";\r\n\r\nexport default function TabSaida({ formulario }) {\r\n\r\n const [listaCstPisCofins, setListaCSTPisCofins] = useState([]);\r\n const [listaNaturezaEfd, setListaNaturezaEfd] = useState([]);\r\n const [naturezaReceita, setNaturezaReceita] = useState(null);\r\n const [cstcofins, setcofins] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!!formulario.getFieldValue(['cpc_saidacstpis', 'cpc_id']))\r\n setNaturezaReceita(formulario.getFieldValue(['cpc_saidacstpis', 'cpc_id']));\r\n\r\n if (!!formulario.getFieldValue(['cpc_saidacstcofins', 'cpc_id']))\r\n setcofins(formulario.getFieldValue(['cpc_saidacstcofins', 'cpc_id']));\r\n\r\n api.get(`CstPisCofins/ListarEntradaSaida?tipo=S`).then(\r\n res => {\r\n setListaCSTPisCofins(res.data);\r\n })\r\n }, [])\r\n\r\n useEffect(() => {\r\n api.get(`NaturezaReceitaEfd/Listar?cstPis=${naturezaReceita}&cstCofins=${naturezaReceita}`).then(\r\n res => {\r\n setListaNaturezaEfd(res.data.items);\r\n })\r\n }, [naturezaReceita]);\r\n\r\n useEffect(() => {\r\n if (cstcofins && naturezaReceita)\r\n if (cstcofins !== naturezaReceita)\r\n Modal.warning({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Os CST estão diferentes, normalmente o CST PIS e COFINS devem ser iguais - Verifique a situação!',\r\n okText: 'Ok',\r\n });\r\n }, [cstcofins, naturezaReceita]);\r\n\r\n return (\r\n\r\n
\r\n \r\n
\r\n \r\n \"Saídas\" Saídas\r\n \r\n \r\n Defina a configuração do PIS e da COFINS para as saídas.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 3}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_saidapercredbcpis\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 3}\r\n label=\"% Alíquota do PIS\"\r\n rules={[{ required: (naturezaReceita <= 3) ? true : false, message: 'Informe o % alíquota do PIS' }]}\r\n name=\"pis_saidapercpis\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 0), message: 'Informe o CST da COFINS' }]}>\r\n {\r\n setcofins(valor);\r\n if (formulario.getFieldValue(['cpc_saidacstcofins', 'cpc_id']) > 3) formulario.setFieldsValue({ pis_saidapercredbccofins: 0, pis_saidaperccofins: 0 })\r\n }}>\r\n {listaCstPisCofins.map((item) => (\r\n {item.cpc_id} - {item.cpc_descricao}\r\n ))}\r\n \r\n \r\n \r\n \r\n 3}\r\n label=\"% Redução Base de Cálculo\"\r\n name=\"pis_saidapercredbccofins\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n 3}\r\n label=\"% Alíquota do COFINS\"\r\n rules={[{ required: (naturezaReceita <= 3) ? true : false, message: 'Informe o % alíquota do COFINS' }]}\r\n name=\"pis_saidaperccofins\"\r\n defaultValue={0}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n \r\n prevValues.cpc_saidacstpis !== currentValues.cpc_saidacstpis}>\r\n {({ getFieldValue }) => {\r\n if (getFieldValue(['cpc_saidacstpis', 'cpc_id']) > 3 && getFieldValue(['cpc_saidacstpis', 'cpc_id']) < 49)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, notification, Modal } from \"antd\";\r\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from \"../../actions\";\r\nimport { TabEntrada, TabSaida } from \"./tabPage\";\r\n\r\nexport default function ManutencaoTributacaoPisCofins({ formulario, carregando, aoSalvar }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const salvarTributacaoPisCofins = (values) => {\r\n\r\n\r\n if (!!values.pis_id && !!values.nat_id) {\r\n if (values.cpc_saidacstpis.cpc_id > 3) {\r\n values.nat_id = values.nat_id;//.map((x) => ({ nat_id: x }));\r\n }\r\n }\r\n\r\n if (!!!values.cpc_saidacstpis.cpc_id && !!!values.cpc_saidacstcofins.cpc_id && // não é permitido informar somente a descrição da tributação \r\n !!!values.cpc_entradacstcofinspf.cpc_id && !!!values.cpc_entradacstpispf.cpc_id\r\n && !!!values.cpc_entradacstpispj.cpc_id && !!!values.cpc_entradacstcofinspj.cpc_id) {\r\n carregando(false);\r\n Modal.warning({\r\n title: 'Atenção!',\r\n icon: ,\r\n content: 'Você deve informar ao menos uma configuração do PIS e da COFINS!',\r\n okText: 'Ok',\r\n });\r\n } else {\r\n values.cpc_entradacstcofinspf = !!values.cpc_entradacstcofinspf.cpc_id ? values.cpc_entradacstcofinspf.cpc_id : null;\r\n values.cpc_entradacstcofinspj = !!values.cpc_entradacstcofinspj.cpc_id ? values.cpc_entradacstcofinspj.cpc_id : null;\r\n values.cpc_entradacstpispf = !!values.cpc_entradacstpispf.cpc_id ? values.cpc_entradacstpispf.cpc_id : null;\r\n values.cpc_entradacstpispj = !!values.cpc_entradacstpispj.cpc_id ? values.cpc_entradacstpispj.cpc_id : null;\r\n values.cpc_saidacstcofins = !!values.cpc_saidacstcofins.cpc_id ? values.cpc_saidacstcofins.cpc_id : null;\r\n values.cpc_saidacstpis = !!values.cpc_saidacstpis.cpc_id ? values.cpc_saidacstpis.cpc_id : null;\r\n carregando(true);\r\n if (!!values.pis_id) {\r\n api.put(`TributacaoPisCofins/Editar`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: `Os dados da Tributação foram editados com sucesso!` });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(() => {\r\n carregando(false);\r\n aoSalvar();\r\n formulario.resetFields();\r\n });\r\n } else {\r\n api.post(`TributacaoPisCofins/Incluir`, values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: `Os dados da Tributação foram adicionados com sucesso!` });\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }).finally(() => {\r\n carregando(false);\r\n aoSalvar();\r\n formulario.resetFields();\r\n });\r\n }\r\n\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoTributacaoPisCofins from './manutencao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerTributacaoPisCofins() {\r\n\r\n const [formTributacaoPisCofins] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formTributacaoPisCofins.setFieldsValue(manutencao.dados);\r\n }\r\n else {\r\n formTributacaoPisCofins.setFieldsValue({ pis_ativo: true });\r\n }\r\n\r\n function fecharDrawer() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pis_descricao'}})\r\n formTributacaoPisCofins.resetFields();\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n destroyOnClose={true}\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Row, Col, Input, Checkbox, Typography, Divider, Button, Table, Modal, notification } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { FormGW } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { ModalTributacaoIcms } from \"../../components/modals/\";\r\n\r\nexport default function ManutencaoTributacaoIcms({ formulario, carregando, aoSalvar }) {\r\n\r\n const [formModal] = Form.useForm();\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModal, setOpenModal] = useState(false);\r\n const [listaOrigemDestino, setListaOrigemDestino] = useState([]);\r\n const [dadosOrigemDestino, setDadosOrigemDestino] = useState([]);\r\n\r\n const modalExcluir = (item) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerRegistro(item);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => carregaDados(), [])\r\n\r\n useEffect(() => {\r\n if (!!dadosOrigemDestino && dadosOrigemDestino.length > 0) {\r\n let list = [...listaOrigemDestino];\r\n let index = null;\r\n dadosOrigemDestino.forEach((item) => {\r\n if (!!item.iod_id) {\r\n index = list.findIndex(x => x.iod_id === item.iod_id);\r\n list[index] = item;\r\n } else {\r\n if (!!item.iod_novo) {\r\n index = list.findIndex(x => x.iod_novo === item.iod_novo);\r\n list[index] = item;\r\n } else {\r\n let possuiRegistro = list.find(x => x.iod_ufdestino === item.iod_ufdestino);\r\n if (possuiRegistro) {\r\n notification.error({ message: 'Já possui registro com a UF destino ' + item.iod_ufdestino });\r\n } else {\r\n item.iod_novo = item.key;\r\n list.push(item);\r\n }\r\n }\r\n }\r\n });\r\n setListaOrigemDestino(list);\r\n }\r\n }, [dadosOrigemDestino])\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && manutencao.dados.duplicar) {\r\n formulario.setFieldsValue({ icm_id: null });\r\n }\r\n }, [manutencao.dados]);\r\n\r\n function atualizarPagina() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } });\r\n };\r\n\r\n\r\n function carregaDados() {\r\n if (!!formulario.getFieldValue().icm_id) {\r\n api.get(`TributacaoIcms/BuscarPorLocal/${formulario.getFieldValue().icm_id}`).then(\r\n res => {\r\n setListaOrigemDestino(res.data.icmsorigemdestinos);\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n carregando(false)\r\n }\r\n );\r\n }\r\n }\r\n\r\n function removerRegistro(registro) {\r\n if (!!registro.iod_id) {\r\n api.delete(`icmsOrigemDestino/Excluir/${registro.iod_id}`).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados da Origem Destino foram excluídos com sucesso!\" });\r\n let lista = [...listaOrigemDestino];\r\n let index = lista.findIndex(i => i.iod_id === registro.iod_id);\r\n lista.splice(index, 1);\r\n setListaOrigemDestino(lista);\r\n }).catch(\r\n erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => carregando(false)\r\n );\r\n } else if (registro.iod_novo !== undefined) {\r\n let list = [...listaOrigemDestino];\r\n let listaTemp = list.filter((item) => (item.iod_novo !== registro.iod_novo));\r\n let iod = 0;\r\n listaTemp.forEach((item) => {\r\n item.iod_novo = iod++;\r\n item.key = iod++;\r\n });\r\n setListaOrigemDestino(listaTemp);\r\n }\r\n }\r\n\r\n function salvarManutencao(values) {\r\n values.icmsorigemdestinos = listaOrigemDestino;\r\n carregando(true);\r\n if (values.icm_id) {\r\n editarManutencao(values);\r\n } else {\r\n incluirManutencao(values)\r\n }\r\n };\r\n\r\n function editarManutencao(values) {\r\n api.put('TributacaoICMS/Editar', values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do ICMS foram salvos com sucesso!\" });\r\n aoSalvar();\r\n atualizarPagina();\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n function incluirManutencao(values) {\r\n api.post('TributacaoIcms/Incluir', values).then(\r\n res => {\r\n notification.success({ message: 'Operação concluída', description: \"Os dados do ICMS foram salvos com sucesso!\" });\r\n aoSalvar();\r\n atualizarPagina();\r\n }).catch(\r\n err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n atualizarPagina();\r\n carregando(false);\r\n aoSalvar();\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n Tributação Ativa\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \"Dados Dados de Origem e Destino\r\n \r\n \r\n Defina as Informações de Origem e Destino aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n {iod_uforigem}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'UF Destino',\r\n align: 'center',\r\n render: ({ iod_ufdestino }) => (\r\n
\r\n {iod_ufdestino}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CSOSN/CST',\r\n align: 'center',\r\n render: ({ cso_id, cst_id }) => (\r\n
\r\n {!!cso_id ? cso_id : cst_id}\r\n
\r\n ),\r\n },\r\n {\r\n title: '% ICMS',\r\n align: 'center',\r\n render: ({ iod_percicms }) => (\r\n
\r\n \r\n
\r\n {iod_percicms}%\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '% Diferimento',\r\n align: 'center',\r\n render: ({ iod_percdiferimentoicms }) => (\r\n
\r\n {iod_percdiferimentoicms}%\r\n
\r\n ),\r\n },\r\n {\r\n title: '% Redução BC',\r\n align: 'center',\r\n render: ({ iod_percicmsreducaobc }) => (\r\n
\r\n {iod_percicmsreducaobc}%\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n render: (item) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />\r\n \r\n setOpenModal(false)} dados={dadosOrigemDestino} setDados={setDadosOrigemDestino} formulario={formModal} listaOrigemDestino={listaOrigemDestino} /> \r\n \r\n \r\n );\r\n\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Modal, Form } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { DrawerNav } from '../../components';\r\nimport ManutencaoTributacaoIcms from './manutencao';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nexport default function DrawerTributacaoIcms() {\r\n\r\n const [formTributacaoIcms] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n if (manutencao.dados !== null) {\r\n formTributacaoIcms.setFieldsValue(manutencao.dados);\r\n } else {\r\n formTributacaoIcms.setFieldsValue({ icm_ativo: true });\r\n }\r\n\r\n\r\n function fecharDrawer() {\r\n formTributacaoIcms.resetFields();\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false } });\r\n }\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Form, Select, Input, Button, Table, Tag, Modal, Switch, InputNumber, Checkbox, Radio } from \"antd\";\r\nimport { CloseOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined, PrinterOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormGW, SelectPaginacao, SelectProduto } from \"../../components\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { drawerActions, manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { ModalGradeProduto } from \"../../components/modals\";\r\nimport { substituirCaracterEspecial } from \"../../services/funcoes\";\r\nimport { imprimirRawBase64 } from \"../../services/servidorImpressora\";\r\n\r\nexport default function ImprimirImpEtiqueta({ config }) {\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [formulario] = Form.useForm();\r\n const [listaPreco, setListaPreco] = useState([]);\r\n const [listaProduto, setListaProduto] = useState([]);\r\n const [listaModelo, setListaModelo] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const [dadosGrade, setDadosGrade] = useState([]);\r\n const [abrirModalGrade, setAbrirModalGrade] = useState(false);\r\n const [dadosAdicionais, setDadosAdicionais] = useState(false);\r\n\r\n const modalExcluirItem = (record) => {\r\n Modal.confirm({\r\n title: 'Remover?',\r\n icon: ,\r\n content: `Deseja realmente remover o item selecionado?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n removerItem(record);\r\n }\r\n });\r\n };\r\n\r\n const modalImprimir = (record) => {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Confirma a Impressão das Etiquetas?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n montarEtiqueta(record);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n // buscarProdutos();\r\n buscarModelo();\r\n formulario.setFieldsValue({ modelo: config.modeloEtiqueta.met_id });\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.dadosGrade) {\r\n buscarDadosGradeModal();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!listaSelectPaginacao?.itens) {\r\n setListaProduto(listaSelectPaginacao?.itens);\r\n }\r\n\r\n }, [listaSelectPaginacao?.itens])\r\n\r\n function buscarModelo() {\r\n api.get(`ModeloEtiqueta/Listar?filtro=&ordem=%2Bmet_descricao`).then(\r\n res => {\r\n let dados = res.data.items;\r\n setListaModelo(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularDadosProduto(keyProd) {\r\n let listaItens = [...listaSelectPaginacao?.itens];\r\n //let produto = listaProduto.filter((prod) => (prod.pro_id === pro_id))[0];\r\n let produto = listaItens.find((prod) => prod.key === keyProd);\r\n if (!!produto.prg_id) {\r\n buscarGrade(produto.pro_id)\r\n }\r\n };\r\n\r\n async function buscarGrade(produto) {\r\n let grade = await api.get(`ProdutoGrade/ListarGradesProdutos?codigoProduto=${produto}`);\r\n\r\n if (!!grade.data && grade.data.length > 0) {\r\n setAbrirModalGrade(true);\r\n setDadosGrade(grade.data);\r\n }\r\n };\r\n\r\n function buscarDadosGradeModal() {\r\n let produtoGrade = manutencao.dados.dadosGrade.filter((produto) => (produto.quantidade > 0));\r\n let produtosIncluir = [...listaItens];\r\n produtoGrade.forEach(prodGrade => {\r\n let produto = listaProduto.filter((prod) => (prod.prg_id === prodGrade.prg_id))[0];\r\n produto.lpi_valorvenda = prodGrade.valorVenda;\r\n produto.quantidade = prodGrade.quantidade;\r\n produto.sequencia = !!produtosIncluir.length > 0 ? produtosIncluir[produtosIncluir.length - 1].sequencia + 1 : 1;\r\n produto.observacao = '';\r\n produto.prg_ean = prodGrade.ean;\r\n produtosIncluir.push(produto);\r\n });\r\n setListaItens(produtosIncluir);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, dadosGrade: null } } })\r\n limparCampos();\r\n };\r\n\r\n function adicionarItem() {\r\n let dados = [...listaItens];\r\n let obj = {};\r\n let editando = true;\r\n let prod = {};\r\n if (listaProduto.length == 1) {\r\n prod = listaProduto[0];\r\n } else {\r\n prod = listaProduto.find((produto) => (produto.key === formulario.getFieldValue().pro_id));\r\n }\r\n obj = dados.find((item) => (item.pro_id === prod.pro_id && item.prg_id === prod.prg_id))\r\n if (!!!obj) {\r\n obj = prod;\r\n obj.sequencia = !!dados.length > 0 ? dados[dados.length - 1].sequencia + 1 : 1;\r\n editando = false;\r\n }\r\n obj.quantidade = parseInt(formulario.getFieldValue().quantidade);\r\n obj.observacao = '';\r\n if (!editando) {\r\n dados.push(obj);\r\n }\r\n setListaItens(dados);\r\n limparCampos();\r\n\r\n };\r\n\r\n function editarItem(record) {\r\n let lista = [];\r\n if (!!record) {\r\n if (!!record.prg_id) {\r\n lista.push({ name: \"pro_id\", campo: \"IdGrade\", value: record.prg_id });\r\n } else {\r\n lista.push({ name: \"pro_id\", campo: \"IdProduto\", value: record.pro_id });\r\n }\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n formulario.setFieldsValue({ pro_id: 0, quantidade: record.quantidade, observacao: record.observacao });\r\n }\r\n };\r\n\r\n function removerItem(record) {\r\n let dados = listaItens.filter((item) => item.pro_id !== record.pro_id || (item.pro_id === record.pro_id && item.prg_id !== record.prg_id));\r\n setListaItens(dados)\r\n };\r\n\r\n function limparCampos() {\r\n formulario.setFieldsValue({ pro_id: null, quantidade: null, observacao: '' });\r\n };\r\n\r\n function montarEtiqueta(dadosRel) {\r\n let listaEtiqueta = [];\r\n let modelo = listaModelo.filter((modelo) => modelo.met_id === formulario.getFieldValue().modelo)[0];\r\n let comandosEnviarImp = [];\r\n listaItens.forEach((item) => {\r\n let indice = 0;\r\n let ean = null;\r\n if(item.pro_ean !== \"\" && item.pro_ean !== \"undefined\" && item.pro_ean !== null){\r\n ean = item.pro_ean;\r\n }else{\r\n ean = item.prg_ean;\r\n }\r\n while (indice < item.quantidade) {\r\n let etiqueta = {\r\n pro_codigo: item.pro_codigo,\r\n pro_codigoetiqueta: item.pro_codigoetiqueta,\r\n prg_codigoetiqueta: item.prg_codigoetiqueta,\r\n pro_referencia: item.pro_referencia,\r\n descricaograde: !!item.grade ? item.grade : item.descricaograde,\r\n pro_ean: ean,\r\n lpi_valorvenda: item.lpi_valorvenda,\r\n pro_descricao: item.pro_descricao\r\n }\r\n listaEtiqueta.push(etiqueta);\r\n indice++;\r\n }\r\n });\r\n\r\n let qtdComandos = parseInt(listaEtiqueta.length / modelo.met_colunas);\r\n for (let x = 0; x < qtdComandos; x++) {\r\n let comando = modelo.met_comando;\r\n for (let i = 1; i <= modelo.met_colunas; i++) {\r\n let indiceEtiqueta = i + (x * modelo.met_colunas);\r\n if (indiceEtiqueta <= listaEtiqueta.length) {\r\n let indice = indiceEtiqueta - 1;\r\n let configCodBarra = formulario.getFieldValue().persCodBarra;\r\n if (configCodBarra === 1) {\r\n comando = comando.replaceAll('@codigoBarras' + i, listaEtiqueta[indice].pro_codigo);\r\n } else if (configCodBarra === 2) {\r\n comando = comando.replaceAll('@codigoBarras' + i, !!listaEtiqueta[indice].pro_codigoetiqueta ? listaEtiqueta[indice].pro_codigoetiqueta : listaEtiqueta[indice].prg_codigoetiqueta);\r\n } else {\r\n comando = comando.replaceAll('@codigoBarras' + i, listaEtiqueta[indice].pro_ean);\r\n }\r\n comando = comando.replaceAll('@precoProduto' + i, 'R$ ' + parseFloat(listaEtiqueta[indice].lpi_valorvenda).toFixed(2).replace('.', ','));\r\n if (dadosAdicionais) {\r\n let entrada = 1;\r\n let qtdParc = formulario.getFieldValue().numeroParcelas\r\n if (formulario.getFieldsValue().possuiEntrada) {\r\n comando = comando.replaceAll('@formaPagamento' + i, `${qtdParc}x(${entrada}+${qtdParc - entrada})`);\r\n } else {\r\n comando = comando.replaceAll('@formaPagamento' + i, `${qtdParc}x`);\r\n }\r\n comando = comando.replaceAll('@valorPagamento' + i, FormatNumber(listaEtiqueta[indice].lpi_valorvenda / qtdParc, true));\r\n } else {\r\n comando = comando.replaceAll('@formaPagamento' + i, ' ');\r\n comando = comando.replaceAll('@valorPagamento' + i, ' ');\r\n }\r\n\r\n comando = comando.replaceAll('@codigoProduto' + i, !!listaEtiqueta[indice].pro_codigo ? listaEtiqueta[indice].pro_codigo : ' ');\r\n comando = comando.replaceAll('@codigoEtiqueta' + i, !!listaEtiqueta[indice].pro_codigoetiqueta ? listaEtiqueta[indice].pro_codigoetiqueta : ' ');\r\n comando = comando.replaceAll('@referenciaProduto' + i, !!listaEtiqueta[indice].pro_referencia ? listaEtiqueta[indice].pro_referencia : ' ');\r\n if (!!listaEtiqueta[indice].descricaograde) {\r\n comando = comando.replaceAll('@gradeProduto' + i , listaEtiqueta[indice].descricaograde.substr(0, parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n if (listaEtiqueta[indice].descricaograde.length > parseInt(modelo.met_quantidadecaracteresdescricaoproduto)) {\r\n comando = comando.replaceAll('@gradeProduto' + i , listaEtiqueta[indice].descricaograde.substr(parseInt(modelo.met_quantidadecaracteresdescricaoproduto), parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n } else {\r\n comando = comando.replaceAll('@gradeProduto' + i + listaEtiqueta[indice].descricaograde);\r\n }\r\n } else {\r\n comando = comando.replaceAll('@gradeProduto' + i, ' ');\r\n comando = comando.replaceAll('@gradeProduto' + i, ' ');\r\n }\r\n\r\n comando = comando.replaceAll('@descricaoProduto' + i + 'Linha1', listaEtiqueta[indice].pro_descricao.substr(0, parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n\r\n if (listaEtiqueta[indice].pro_descricao.length > parseInt(modelo.met_quantidadecaracteresdescricaoproduto)) {\r\n comando = comando.replaceAll('@descricaoProduto' + i + 'Linha2', listaEtiqueta[indice].pro_descricao.substr(parseInt(modelo.met_quantidadecaracteresdescricaoproduto), parseInt(modelo.met_quantidadecaracteresdescricaoproduto)));\r\n } else {\r\n comando = comando.replaceAll('@descricaoProduto' + i + 'Linha2', ' ');\r\n }\r\n\r\n comando = substituirCaracterEspecial(comando);\r\n\r\n } else {\r\n comando = comando.replaceAll('@codigoProduto' + i, ' ');\r\n comando = comando.replaceAll('@codigoEtiqueta' + i, ' ');\r\n comando = comando.replaceAll('@referenciaProduto' + i, ' ');\r\n comando = comando.replaceAll('@codigoBarras' + i, ' ');\r\n comando = comando.replaceAll('@precoProduto' + i, ' ');\r\n comando = comando.replaceAll('@formaPagamento' + i, ' ');\r\n comando = comando.replaceAll('@valorPagamento' + i, ' ');\r\n comando = comando.replaceAll('@gradeProduto' + i , ' ');\r\n comando = comando.replaceAll('@gradeProduto' + i ,' ');\r\n comando = comando.replaceAll('@descricaoProduto' + i + 'Linha1', ' ');\r\n comando = comando.replaceAll('@descricaoProduto' + i + 'Linha2', ' ');\r\n }\r\n }\r\n comandosEnviarImp.push(comando);\r\n }\r\n\r\n comandosEnviarImp.reduce(function (p, val) {\r\n return p.then(function () {\r\n\r\n return imprimirRawBase64(config.impressoraEtiqueta.name, val);\r\n });\r\n }, Promise.resolve()).then(\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: 'A impressão das etiquetas ocorreu corretamente?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n Modal.confirm({\r\n title: 'Atenção',\r\n icon: ,\r\n content: 'Você deseja Limpar a Lista de Dados Temporarios de Impressão de Etiquetas?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirDadosTemporarios();\r\n }\r\n });\r\n }\r\n })\r\n );\r\n };\r\n\r\n function limparItens() {\r\n setListaItens([]);\r\n };\r\n\r\n function excluirDadosTemporarios() {\r\n api.delete(`Etiqueta/ExcluirDadosTemporarios`).then(\r\n res => {\r\n limparItens();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EAN\r\n Código do Produto\r\n Código Etiqueta\r\n \r\n \r\n \r\n \r\n \r\n ({modelo.met_descricao})\r\n } />\r\n\r\n \r\n \r\n \r\n \r\n { popularDadosProduto(dados) }} ordem={'pro_id'} detalhes={true} selecionarRegUnico={\"key\"} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {listaItens.length > 0 &&
(\r\n
\r\n \r\n
\r\n \r\n {sequencia}\r\n \r\n \r\n \r\n {pro_codigo} - {pro_descricao}\r\n \r\n \r\n \r\n \r\n \r\n EAN: {!!pro_ean ? pro_ean : prg_ean}\r\n \r\n \r\n {!!descricaograde && \r\n \r\n Grade: {descricaograde}\r\n \r\n }\r\n \r\n \r\n )\r\n }, {\r\n title: 'Valor Unit. (R$)',\r\n align: 'right',\r\n render: ({ lpi_valorvenda }) => (\r\n
\r\n {FormatNumber(lpi_valorvenda, true)}\r\n
\r\n )\r\n }, {\r\n title: 'Quant. Etiqueta',\r\n align: 'center',\r\n width: 100,\r\n render: ({ quantidade }) => (\r\n
\r\n {quantidade}\r\n
\r\n )\r\n }, {\r\n title: 'Ações',\r\n fixed: 'right',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n { setDadosAdicionais(!dadosAdicionais) }} /> Informações Adicionais\r\n \r\n \r\n {dadosAdicionais &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Possui Entrada?\r\n \r\n \r\n \r\n \r\n }\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n { setAbrirModalGrade(false); }} dados={dadosGrade} acrescimoDesconto={false} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Typography, Divider, notification, Spin, Form, Select, Card } from \"antd\";\r\nimport { DownloadOutlined, LoadingOutlined, MehOutlined, SyncOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport ImprimirImpEtiqueta from \"./manutencaoEtiqueta\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { carregarConfiguracoes, impressorasInstaladas, ServidorImpressoraOnline } from \"../../services/servidorImpressora\";\r\n\r\nexport default function ServidorImpressao({ formulario, carregando, aoSalvar, servidor, menuConfig = false }) {\r\n const [carregandoServer, setCarregandoServer] = useState(false);\r\n const [listaImpressoras, setListaImpressoras] = useState([]);\r\n const [listaModeloEtiqueta, setListaModeloEtiqueta] = useState([]);\r\n const [abrirManutencao, setAbrirManutencao] = useState(false);\r\n const [config, setConfig] = useState({});\r\n const [dadosConfiguracoes, setDadosConfiguracoes] = useState([]);\r\n const [form] = Form.useForm();\r\n useEffect(() => {\r\n verificarConfiguracao();\r\n listarImpressoras();\r\n listarModeloEtiqueta();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!config && isObjetoDiffVazio(config)) {\r\n let modelo = listaModeloEtiqueta.length > 0 ? listaModeloEtiqueta.filter((modelo) => modelo.met_id === config.modeloEtiqueta.met_id)[0] : { key: null };\r\n if (!!modelo) {\r\n form.setFieldsValue({ modeloEtiquetaImp: modelo.met_id });\r\n } else {\r\n form.setFieldsValue({ modeloEtiquetaImp: null });\r\n }\r\n }\r\n }, [listaModeloEtiqueta]);\r\n\r\n useEffect(() => {\r\n if (!!config && isObjetoDiffVazio(config)) {\r\n let impressoraEtiqueta = listaImpressoras.length > 0 ? listaImpressoras.filter((impressora) => impressora.name === config.impressoraEtiqueta.name)[0] : { key: null };\r\n let impressoraNFiscal = listaImpressoras.length > 0 ? listaImpressoras.filter((impressora) => impressora.name === config.impressoraNaoFiscal.name)[0] : { key: null };\r\n impressoraEtiqueta = !!impressoraEtiqueta ? impressoraEtiqueta :{key: null};\r\n impressoraNFiscal = !!impressoraNFiscal ? impressoraNFiscal :{key: null};\r\n form.setFieldsValue({ impEtiquetaUtilizar: impressoraEtiqueta.key, impressoraNaoFiscal: impressoraNFiscal.key })\r\n }\r\n }, [listaImpressoras]);\r\n\r\n async function verificarConfiguracao() {\r\n let ret = await carregarConfiguracoes();\r\n if (!!ret && !!ret.impressoraEtiqueta && !!ret.impressoraNaoFiscal && !!ret.modeloEtiqueta) {\r\n setConfig(ret);\r\n listarImpressoras();\r\n listarModeloEtiqueta();\r\n if (!menuConfig) {\r\n setAbrirManutencao(true);\r\n }\r\n\r\n }\r\n };\r\n\r\n function downloadServidor() {\r\n let link = document.createElement(\"a\");\r\n link.download = \"new-erp.print-server_0.0.1-x86_64.exe\";\r\n link.href = \"http://update.newerp.com.br/ServidorImpressao/new-erp.print-server_0.0.1-x86_64.exe\";\r\n link.click();\r\n };\r\n\r\n async function verificarServidorNovamente() {\r\n setCarregandoServer(true);\r\n let ret = await ServidorImpressoraOnline();\r\n servidor.setServidorOn(ret.online);\r\n setCarregandoServer(false);\r\n };\r\n\r\n async function listarImpressoras() {\r\n let retImp = await impressorasInstaladas();\r\n let key = 0;\r\n if (!!retImp) {\r\n retImp.forEach((impressora) => {\r\n impressora.key = key;\r\n key++;\r\n });\r\n setListaImpressoras(retImp);\r\n }\r\n };\r\n\r\n function listarModeloEtiqueta() {\r\n api.get(`ModeloEtiqueta/Listar?PageSize=200&PageNumber=1&ordem=met_descricao`).then(\r\n res => {\r\n setListaModeloEtiqueta(res.data.items);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function salvarConfiguracoes() {\r\n let dados = {\r\n impressoraEtiqueta: listaImpressoras.filter((imp) => (imp.key === form.getFieldValue().impEtiquetaUtilizar))[0],\r\n modeloEtiqueta: listaModeloEtiqueta.filter((imp) => (imp.met_id === form.getFieldValue().modeloEtiquetaImp))[0],\r\n impressoraNaoFiscal: listaImpressoras.filter((imp) => (imp.key === form.getFieldValue().impressoraNaoFiscal))[0],\r\n padraoDYMO: null\r\n };\r\n api.post(`http://localhost:3001/configuracao`, JSON.stringify(dados), { headers: { 'Content-type': 'application/json;charset=utf-8' } }).then(\r\n res => {\r\n notification.success({ description: 'Suas definições para o servidor de impressão do GestorWeb neste computador foram salvas com sucesso!', message: 'Servidor de Impressão Configurado' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n if (!!aoSalvar) {\r\n aoSalvar();\r\n }\r\n verificarConfiguracao();\r\n }\r\n );\r\n\r\n };\r\n\r\n return (\r\n
\r\n {!abrirManutencao &&
\r\n
\r\n \r\n
\r\n \r\n \"Servidor Servidor de Impressão Gestor Web\r\n \r\n \r\n O servidor de impressão do Gestor Web, é um software que deve ser instalado no computador para possibilitar a comunicação do Gestor Web em seu navegador de internet com as impressoras instaladas em seu computador.\r\n Desta forma, através do servidor de impressão, é possível realizar impressões como etiquetas de produtos e comprovantes não fiscais diretamente do Gestor Web.\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {carregandoServer &&
\r\n \r\n
\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n Verificando Servidor de Impressão do Gestor Web. Aguarde...\r\n \r\n \r\n \r\n }\r\n {servidor.servidorOn &&
\r\n \r\n \r\n Configurações do Servidor de Impressão do Gestor Web para este computador\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n {!servidor.servidorOn && !carregandoServer &&
\r\n \r\n
\r\n \r\n OPS!
Parece que o servidor de impressão não está em execução no seu computador.\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Servidor\r\n \r\n \r\n \r\n O que posso fazer nesse caso?\r\n \r\n \r\n Verifique se o servidor de impressão esta instalado em seu computador e o inicie:

\r\n 1. Abra o menu iniciar em seu computador;
\r\n 2. Procure por: \"new-erp.print-server\";
\r\n 3. Abra o servidor de impressão (new-erp.print-server);
\r\n 4. Após abrir o programa, minimize a tela do servidor de impressão (new-erp.print-server), para que ele permaneça em execução em seu computador.\r\n
\r\n \r\n O servidor de impressão do Gestor Web não está instalado em seu computador?
\r\n
\r\n
\r\n \r\n 1. Realize o download do instalador do servidor de impressão CLICANDO AQUI;
\r\n 2. Após concluir o download, abra o instalador;
\r\n 3. Siga as instruções do assistente de instalação até concluir o processo;
\r\n 4. Ao concluir o processo de instalação, o servidor de impressão é iniciado automaticamente. Ao abrir, minimize a tela do servidor de impressão, para que ele permaneça em execução em seu computador;
\r\n 5. Não se preocupe, após instalado o servidor de impressão se configura para iniciar automaticamente quando você ligar seu computador.\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n }\r\n {abrirManutencao && }\r\n \r\n );\r\n\r\n}","export default __webpack_public_path__ + \"static/media/i-telefone.322b548c.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUh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U9QhacYpeDUu1/r41WSMEZ4k2LubD9c8Ojfd2fAOaUyVdx5DK5Qv2wT1sileHKWjHirmuB7W7LY+xnIruN2/Abd9irZVY5xxuthf+QyBap4ENiUVokwDhIAvTcNJkcfVHReUgJ7RCJ+vKSXzTWVYILar4uvf0sUzT1VGR8mMNZFM9NHUMgaspUebX8Gg3zHiPfckngSGwSsqEUX6E8lRKBaiVQB4Dp8WFE+LVq8p8RdMs0vawv69be/ryZNrp3LDWDEHI/FZiLT/jNC73+lI/Z6UvRAcF+WyEl+WoPhEORFcUfo4WoFFpwpJVTzuoMFEpWb8/lnW1sYuaXp6b11zqgdlVsR74IQKnPgNodtYbgmagYSB3PBWMyGdhGbG4gEBPD6t/4itJkn51wn/2yPxf/MS/WsAXIvl91CC918AAAAASUVORK5CYII=\"","export default __webpack_public_path__ + \"static/media/i-dados.e9451d99.png\";","export default __webpack_public_path__ + \"static/media/i-cartao.42a596bd.png\";","import { DownloadOutlined } from \"@ant-design/icons\";\r\nimport { Upload, Row, Col, Button, message, Modal } from \"antd\";\r\nimport React, { useState } from \"react\";\r\n\r\nexport default function UploadFoto({ listaImagens, setListaImagens }) {\r\n const [previewImage, setPreviewImage] = useState('');\r\n const [previewVisible, setPreviewVisible] = useState(false);\r\n\r\n const onChange = ({ fileList: newFileList }) => {\r\n setListaImagens(newFileList);\r\n };\r\n\r\n const onPreview = async file => {\r\n if (!file.url && !file.preview) {\r\n file.preview = await getBase64(file.originFileObj);\r\n }\r\n setPreviewImage(file.url || file.preview);\r\n setPreviewVisible(true);\r\n };\r\n \r\n function getBase64(file) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n }\r\n\r\n function beforeUpload(file) {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n message.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n const isLt2M = file.size / 1024 / 1024 < 2;\r\n if (!isLt2M) {\r\n message.error('A imagem deve ter menos de 2 MB!');\r\n }\r\n return isJpgOrPng && isLt2M;\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n Arraste a Imagem ou\r\n
\r\n \r\n \r\n \r\n \r\n setPreviewVisible(false)}\r\n >\r\n \"Imagem\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","export default __webpack_public_path__ + \"static/media/i-contato.2e8da8be.png\";","import React from \"react\";\r\nimport { Card, Descriptions, Tooltip, Button, Row, Col, Tag, Popconfirm } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined } from '@ant-design/icons';\r\n\r\nimport { TiposElementosFormulario } from './pages';\r\n\r\nexport default function ItemFormulario({ elemento, fnEditar = () => {}, fnExcluir = () => {} }) {\r\n\r\n function RetornaDescricaoElementoFormulario(tipo) {\r\n let retorno = TiposElementosFormulario.filter(el => el.tipo === tipo);\r\n return (retorno.length > 0 ? retorno[0].descricao : \"\");\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {RetornaDescricaoElementoFormulario(elemento.widget)}\r\n \r\n \r\n {elemento.key}\r\n \r\n \r\n \r\n {elemento.required ? \"SIM\" : \"NÃO\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n fnExcluir()} okText=\"Sim\" cancelText=\"Não\">\r\n \r\n \r\n \r\n Estrutura do Formulário\r\n \r\n \r\n \r\n \r\n \r\n
\r\n (e.target.tagName.toLowerCase() === \"path\" || e.target.tagName.toLowerCase() === \"svg\" || e.target.tagName.toLowerCase() === \"button\")}>\r\n {elementosFormulario.map((elemento, indice) => \r\n \r\n
\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {elementosFormulario.length === 0 && }\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Adicionar Elementos ao Formulário\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Obrigatório\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n return !!value.match(/[a-zA-Z0-9_.]/gm) ? value.match(/[a-zA-Z0-9_.]/gm).join('') : '';\r\n }}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.widget !== currentValues.widget}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('widget') === 'radio-group' || getFieldValue('widget') === 'checkbox-group' || getFieldValue('widget') === 'select') ? (\r\n \">\r\n ;\r\n if (elemento === 'textarea') return ;\r\n if (elemento === 'number') return ;\r\n if (elemento === 'checkbox') return ;\r\n if (elemento === 'switch') return ;\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {elementoEdicao.indice !== null && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenModalPersonalizacao(false)} elementosFormulario={elementosFormulario} setElementosFormulario={setElementosFormulario}/>\r\n \r\n );\r\n\r\n}","export default __webpack_public_path__ + \"static/media/i-formas.6d3408f3.png\";","export default __webpack_public_path__ + \"static/media/i-alfinete.ffbe43fa.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEdWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSfvu78nIGlkPSdXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQnPz4KPHg6eG1wbWV0YSB4bWxuczp4PSdhZG9iZTpuczptZXRhLyc+CjxyZGY6UkRGIHhtbG5zOnJkZj0naHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyc+CgogPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9JycKICB4bWxuczpBdHRyaWI9J2h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OfWcK87evyrLBVn++AG1Gh85DKb4CXgrmOfcODT1518jIO1KoX1n1Dr0dbugHskNPQb4+Bfm/XJ9lC1r9+QC0MTt0HoltRx3Vc8/IyPEpwP85BfoX7dDL7dBXdXRcPDZp0gvXZVlvq59roCJ06JQlHxycsWv+/NG7Bwefu3No6L9SkF9qh/6wO/SvpPPSFVk20Ir/4iAQgB06h1rxle+2Dw6OpFA/OQX62SnMv5aC/N6oHfr+dujpn69JYX7W2o6Op9yYZbNa/fwAQejQaZXiJlqE/bbBwQVb589/wrb581+ewvzs7fPmXZzOugA79FvSuSCd16Vvf1IR3m7fwCFjh047SwE4ZefwcN/W2bOPTedJKbz/IYX5u2+dM+fC9Lj6tr6+7S3doU+f/pP1nZ0fTYH+hg3Tpj1rw5Qpx67p6+sR3MBhp0MngmJyl87kNVk2dcvg4Ix085+f/gAwdFNf34IU4AtTmI9umT37mC29vY9Pgf2kzd3df3tTd/dTt8ya9bTi7fRtT7yxt/f49Paj07eNbJ4+fTiF9sANnZ39a7u65t3S39+5PsumFT9++nk6Wv3+AuzBDh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAB6NABIAA7dAAIQIcOAAHYoQNAADp0AAjADh0AAtChA0AAdugAEIAOHQACsEMHgAB06AAQgB06AASgQweAAOzQASAAHToABGCHDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfH/zsz2+Jhk75gAAAAASUVORK5CYII=\"","export default __webpack_public_path__ + \"static/media/i-code.096c1a79.png\";","export default __webpack_public_path__ + \"static/media/i-storage.e6a00b8a.png\";","export default __webpack_public_path__ + \"static/media/i-banco.6f49a172.png\";","import React, { useEffect, useMemo, useState } from \"react\";\r\nimport { useStateValue } from '../../state';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col, Layout, Avatar, Form, Dropdown, Menu, Tooltip, Button, Drawer, Input, Typography, Badge, notification } from \"antd\";\r\nimport {\r\n SearchOutlined, UserOutlined, SettingFilled, DeleteOutlined, LogoutOutlined, AppstoreOutlined, BellFilled, SaveFilled, InfoCircleTwoTone,\r\n CheckOutlined, ExpandOutlined, WechatFilled, PrinterFilled, CloseOutlined, UnorderedListOutlined, RedoOutlined, ShoppingOutlined\r\n} from '@ant-design/icons';\r\nimport { useFullScreen } from 'react-browser-hooks';\r\nimport Circle from '@uiw/react-color-circle';\r\nimport \"./index.less\";\r\nimport { ModalEmpresaFilial, ModalSelecaoClientesCat } from \"../../components/modals/\";\r\nimport { logout, getNomeEmpresa, getNomeLocal, getEmailUsuario, getNomeUsuario, getStatusFilial, getNomeClienteCat } from '../../services/auth';\r\nimport { ModulosPage, PesquisaGlobal, Perfil, DrawerPaginasAbertas, SincronizarCatalogo, BotaoAbrirChamado } from \"../../components\";\r\nimport ServidorImpressao from \"../../pages/etiqueta/servidorImpressao\";\r\nimport { ServidorImpressoraOnline } from \"../../services/servidorImpressora\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\nimport { loadShoppingCartItems } from \"../../services/CarrinhoDB\";\r\n\r\nexport default function HeaderPage() {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [openPerfil, setOpenPerfil] = useState(false);\r\n const [openBuscaGlobal, setOpenBuscaGlobal] = useState(false);\r\n const [openPaginaAbertas, setOpenPaginaAbertas] = useState(false);\r\n const [openModalModulos, setOpenModalModulos] = useState(false);\r\n const [openModalPesquisaGlobal, setOpenModalPesquisaGlobal] = useState(false);\r\n const [openModalEmpresaFilial, setOpenModalEmpresaFilial] = useState(false);\r\n const [paginasAbertas, setPaginasAbertas] = useState([]);\r\n const [formularioPerfil] = Form.useForm();\r\n const [listaNotificacoes, setListaNotificacoes] = useState([]);\r\n const [contador, setContador] = useState(0);\r\n const [image, setImage] = useState(false);\r\n const [openServidor, setOpenServidor] = useState(false);\r\n const [dadosBusca, setDadosBusca] = useState({});\r\n const [formularioServImp] = Form.useForm();\r\n const [openModalCliente, setOpenModalCliente] = useState(false);\r\n const [catalogo, setCatalogo] = useState(false);\r\n const [openDrawerSinc, setOpenDrawerSinc] = useState(false);\r\n const [clienteCatalogo, setClienteCatalogo] = useState(\"\");\r\n const [openCart, setOpenCart] = useState(false);\r\n const [countItemCart, setCountItemCart] = useState(0);\r\n const [carrinhoItens, setCarrinhoItens] = useState([]);\r\n const { toggle } = useFullScreen()\r\n\r\n const showDrawerBusca = () => {\r\n setOpenBuscaGlobal(true);\r\n };\r\n\r\n const onCloseBuscaGlobal = () => {\r\n setOpenBuscaGlobal(false)\r\n };\r\n\r\n\r\n const showDrawerModulos = () => {\r\n setOpenModalModulos(true);\r\n };\r\n\r\n const onCloseModulos = () => {\r\n setOpenModalModulos(false)\r\n };\r\n\r\n const onClosePesquisaGlobal = () => {\r\n setOpenModalPesquisaGlobal(false);\r\n setOpenBuscaGlobal(false);\r\n localStorage.removeItem('@GestorWeb-PesquisaGlobal');\r\n };\r\n\r\n const showDrawerPerfil = async () => {\r\n await carregarAvatar();\r\n setOpenPerfil(true);\r\n };\r\n\r\n const openModalCart = () => {\r\n loadShoppingCartItems(setCarrinhoItens);\r\n setOpenCart(true);\r\n }\r\n\r\n const onCloseCart = () => {\r\n setOpenCart(false);\r\n }\r\n const onClosePerfil = async () => {\r\n setOpenPerfil(false);\r\n };\r\n\r\n const showDrawerServidor = () => {\r\n verificarServidor();\r\n };\r\n\r\n const showDrawerSincronizarCat = () => {\r\n setOpenDrawerSinc(true);\r\n };\r\n\r\n async function verificarServidor() {\r\n let servidorOn = await ServidorImpressoraOnline();\r\n if (servidorOn.online) {\r\n setOpenServidor(true)\r\n } else {\r\n notification.warn({ description: 'O Servidor de impressão não esta em execução nesse computador, para utilizar impressoras de etiquetas verifique as configurações!', message: 'Aviso' });\r\n setOpenServidor(false);\r\n }\r\n };\r\n\r\n const onCloseServidor = () => {\r\n setOpenServidor(false);\r\n };\r\n\r\n const avatar = useMemo(() => {\r\n return ();\r\n }, [image]);\r\n\r\n const menuUsuario = (\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n );\r\n\r\n const notificacoes = (\r\n \r\n \r\n \r\n \r\n \r\n Notificações\r\n\r\n \r\n \"PDV\r\n \r\n \r\n PDV Web\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n const infoCliCatalogo = (\r\n \r\n \r\n
\r\n \r\n \r\n Cliente:  \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n );\r\n\r\n\r\n const [color, setColor] = useState({\r\n primaryColor: '#0053a6',\r\n });\r\n\r\n function onColorChange(nextColor) {\r\n const mergedNextColor = {\r\n ...color,\r\n ...nextColor,\r\n };\r\n setColor(mergedNextColor);\r\n }\r\n\r\n const teste = (teste) => {\r\n setClienteCatalogo(teste)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Gestor\r\n \r\n \r\n \r\n
\r\n \r\n Usuário: {getNomeUsuario()} \r\n \r\n
\r\n
\r\n \r\n \r\n Você está acessado a empresa:  \r\n \r\n \r\n {!getStatusFilial() && LOCAL INATIVO (SOMENTE CONSULTA)}\r\n \r\n
\r\n \r\n {catalogo && infoCliCatalogo}\r\n \r\n \r\n {!catalogo && \r\n \r\n \r\n \r\n {\r\n onColorChange({\r\n primaryColor: hex,\r\n });\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {avatar}\r\n \r\n \r\n }\r\n \r\n setOpenPaginaAbertas(false)} />\r\n setOpenModalEmpresaFilial(false)} />\r\n setOpenModalCliente(false)} teste={true} />\r\n \r\n { efetuarBuscaGlobal(value) }} size=\"middle\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n
\r\n
\r\n {carrinhoItens.map(item => (\r\n
\r\n
{item.codigo}
\r\n {item.descricao}\r\n Valor: R$ {item.valor}\r\n
\r\n Quantidade:\r\n

{item.Qtd}

\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n
*/}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n setOpenDrawerSinc(false)}\r\n >\r\n \r\n \r\n \r\n\r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Icon } from '@ant-design/compatible';\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { setTelaAnterior } from \"../../services/auth\";\r\n\r\nexport default function LinkNav(props) {\r\n \r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const functionClick = () => {\r\n if (!!props.onClick) {\r\n props.onClick();\r\n }\r\n setTelaAnterior(props.patch);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {props.label}\r\n \r\n \r\n );\r\n};","import React, { useState, useEffect } from \"react\";\r\nimport { Form, Layout, Menu, Row, Col, Input } from \"antd\";\r\nimport { Icon } from '@ant-design/compatible';\r\n\r\nimport \"./index.less\";\r\nimport LinkNav from \"../linkNav\";\r\nimport api from \"../../services/api\";\r\nimport { validarPermissaoMenu } from \"../../services/permissoes\";\r\nimport { listagemActions } from \"../../actions\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { getTelaAnterior } from \"../../services/auth\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\n\r\nexport default function MenuPage({ incollapsed, catalogo = false }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaMenu, setListaMenu] = useState([]);\r\n const [openKeys, setOpenKeys] = useState([]);\r\n const rootKeys = [\"sub0\", \"sub1\", \"sub2\", \"sub3\", \"sub4\", \"sub5\", \"sub6\", \"sub7\", \"sub8\", \"sub9\", \"sub10\", \"sub11\", \"sub12\", \"sub13\", \"sub14\", \"sub15\", \"sub16\", \"sub17\", \"sub18\", \"sub19\", \"sub21\"];\r\n\r\n const onOpenChange = (items) => {\r\n const latestOpenKey = items.find((key) => openKeys.indexOf(key) === -1);\r\n if (rootKeys.indexOf(latestOpenKey) === -1) {\r\n setOpenKeys(items);\r\n } else {\r\n setOpenKeys(latestOpenKey ? [latestOpenKey] : openKeys);\r\n }\r\n };\r\n\r\n function CarregaMenu() {\r\n apiWeb.get(`GrupoMenu/RetornaMenu?filtro&IdModulo=${catalogo ? '3' : '2'}`).then((res) => {\r\n if (res.status === 200) {\r\n setListaMenu(res.data);\r\n }\r\n }).catch((erro) => console.error(erro));\r\n }\r\n\r\n function AtzBreadcrumb(item) {\r\n let elemento = item.item.props.elementRef.current;\r\n let elementoPai = elemento.parentNode.parentNode.firstChild;\r\n if (elemento.innerText !== \"Home\") {\r\n localStorage.setItem('@GestorWeb-Breadcrumb', '|' + elementoPai.innerText + '|' + elemento.innerText);\r\n } else {\r\n localStorage.setItem('@GestorWeb-Breadcrumb', '|' + elemento.innerText);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n CarregaMenu()\r\n /*if (catalogo) {\r\n let keys = openKeys;\r\n keys.push(\"sub18\");\r\n setOpenKeys(keys);\r\n }*/\r\n }, []);\r\n useEffect(() => {\r\n if (!incollapsed) {\r\n setOpenKeys(openKeys);\r\n }\r\n }, [openKeys, incollapsed]);\r\n\r\n function pesquisarMenu(e) {\r\n if (!!!e.target.value) {\r\n CarregaMenu();\r\n } else {\r\n api.get(`GrupoMenu/RetornaMenu?filtro=${e.target.value}&IdModulo=${catalogo ? '3' : '2'}`).then(\r\n res => {\r\n let dados = [...res.data];\r\n dados.forEach((menu) => {\r\n menu.subMenu = menu.subMenu.filter((subMenu) => (subMenu.titulo.toLowerCase().indexOf(e.target.value.toLowerCase().trim()) > -1));\r\n });\r\n dados = dados.filter((menu) => (menu.subMenu.length > 0));\r\n setListaMenu(dados);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n <>\r\n \r\n \r\n \r\n {\r\n if (!e.target.value) {\r\n CarregaMenu(); // Chama CarregaMenu() diretamente quando o campo for apagado\r\n }\r\n }}\r\n allowClear\r\n />\r\n \r\n {/* \r\n { pesquisarMenu(valor) }} onBlur={(valor) => { pesquisarMenu(valor) }} allowClear />\r\n */}\r\n \r\n \r\n AtzBreadcrumb(item)}>\r\n {\r\n if (catalogo) {\r\n window.location = \"/catalogo#/\"\r\n } else {\r\n window.location = \"/Home#/\"\r\n }\r\n }}\r\n title={\r\n \r\n \r\n Home \r\n \r\n } className=\"home\">\r\n \r\n {listaMenu.map(menu => (\r\n \r\n \r\n {menu.titulo} \r\n \r\n }>\r\n {menu.subMenu.map(itemMenu => {\r\n return itemMenu.pagina.substring(0, 4) !== 'http' ?\r\n (\r\n \r\n {\r\n if (itemMenu.pagina !== getTelaAnterior()) {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: ``, filtro: '', ordem: '' } });\r\n }\r\n }} />\r\n \r\n ) :\r\n (\r\n \r\n )\r\n })\r\n }\r\n \r\n ))}\r\n\r\n \r\n \r\n \r\n\r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Breadcrumb } from \"antd\";\r\nimport { Link, useLocation } from \"react-router-dom\";\r\nimport { HomeOutlined } from \"@ant-design/icons\";\r\n\r\n\r\nexport default function BreadcrumbPage({listaTitulo}) {\r\n const [breadcrumb] = useState((localStorage.getItem('@GestorWeb-Breadcrumb') !== null)? localStorage.getItem('@GestorWeb-Breadcrumb') : '');\r\n const [htmlBreadcrumb, setHtmlBreadcrumb] = useState('');\r\n let location = useLocation();\r\n \r\n function MontaBreadcrumb() {\r\n let arrBreadcrumb = breadcrumb.substring(1).split(['|']);\r\n if (location.pathname === \"/\"){\r\n arrBreadcrumb = ['Home']\r\n }\r\n\r\n setHtmlBreadcrumb(\r\n arrBreadcrumb.map((pathname,index) => (\r\n \r\n {arrBreadcrumb.length==index+1? {pathname}:pathname}\r\n \r\n ))\r\n );\r\n };\r\n\r\n useEffect(()=> {MontaBreadcrumb()},[breadcrumb]);\r\n useEffect(()=> {MontaBreadcrumb()},[]);\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {htmlBreadcrumb}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Form, Input, Tabs, Row, Col, Typography, Card } from 'antd';\r\n\r\nimport \"./modulos.less\";\r\n\r\nexport default function ModulosPage() {\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Varejo \r\n \r\n \r\n Vendas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Compras\"\r\n \r\n \r\n Compras\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"PDV\"\r\n \r\n \r\n PDV\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Cotação\r\n \r\n \r\n Cotação de Vendas\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Faturamento\r\n \r\n \r\n Faturamento Contratos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Indústria\"\r\n \r\n \r\n Indústria\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Catálogo\r\n \r\n \r\n Catálogo eletrônico\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Pedidos/O.S.\"\r\n \r\n \r\n Pedidos/O.S\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"A\r\n \r\n \r\n A Receber\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"A\r\n \r\n \r\n A Pagar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Conta\r\n \r\n \r\n Conta Corrente\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Caixa\r\n \r\n \r\n Caixa e Bancos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Contábil\"\r\n \r\n \r\n Contábil\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Fiscal\"\r\n \r\n \r\n Fiscal\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Impostos\"\r\n \r\n \r\n Impostos\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"SPED\"\r\n \r\n \r\n SPED\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Indicadores\"\r\n \r\n \r\n Indicadores\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Conta\r\n \r\n \r\n MDF-e\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Selecione abaixo o módulo que deseja acessar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"Conta\r\n \r\n \r\n Utilitários\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Input, Upload, message, Modal, Image } from 'antd';\r\nimport { LoadingOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport ImgCrop from \"antd-img-crop\";\r\nimport api from \"../../services/api\";\r\nimport { getEmailUsuario, linkApi } from \"../../services/auth\";\r\nimport { getBase64 } from \"../../services/funcoes\";\r\n\r\nexport default function Perfil({ formulario, aoSalvar, imagemAlterada }) {\r\n\r\n const [loading, setLoading] = useState(false);\r\n const [dadosUsuario, setDadosUsuario] = useState({});\r\n const [fileList, setFileList] = useState([]);\r\n const [imageUrl, setImageUrl] = useState(null);\r\n const [previewVisible, setPreviewVisible] = useState(false);\r\n const [previewImage, setPreviewImage] = useState('');\r\n\r\n const handleChange = (info) => {\r\n if (info.file.status === 'uploading') {\r\n setLoading(true);\r\n }\r\n if (info.file.status !== 'removed') {\r\n let originFileObj = info.file.originFileObj;\r\n if (typeof originFileObj === 'undefined') {\r\n originFileObj = info.fileList[0].originFileObj;\r\n }\r\n getBase64(originFileObj).then(\r\n base64 => {\r\n setLoading(false);\r\n setImageUrl(base64);\r\n }\r\n );\r\n }\r\n if (info.file.status === 'removed') {\r\n setImageUrl(null);\r\n }\r\n\r\n setFileList(info.fileList);\r\n };\r\n\r\n const handlePreview = async (file) => {\r\n if (!file.url && !file.preview) {\r\n file.preview = await getBase64(file);\r\n }\r\n setPreviewImage(file.url || file.preview);\r\n setPreviewVisible(true);\r\n };\r\n\r\n function beforeUpload(file) {\r\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\r\n if (!isJpgOrPng) {\r\n message.error('Você só pode fazer upload de arquivos JPG/PNG!');\r\n }\r\n return isJpgOrPng;\r\n }\r\n\r\n const uploadButton = (\r\n
\r\n {loading ? : }\r\n
Enviar Imagem
\r\n
\r\n );\r\n\r\n useEffect(() => {\r\n carregarAvatar()\r\n api.get(`Usuario/RetornaUsuarioPerfilEmail?email=${getEmailUsuario()}`).then(\r\n (res) => {\r\n setDadosUsuario(res.data);\r\n formulario.setFieldsValue({ usu_nome: res.data.usu_nome, usu_email: res.data.usu_email });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n }, []);\r\n\r\n const carregarAvatar = async () => {\r\n await api.get(`Usuario/AvatarBase64/${getEmailUsuario()}`).then(\r\n res => {\r\n if (res.status == 200) {\r\n setImageComponent(res.data);\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro)\r\n }\r\n )\r\n };\r\n\r\n const setImageComponent = (dadosImg) => {\r\n var caminho_avatar = `data:${dadosImg.mimiType};base64,${dadosImg.imagem}`;\r\n let img = [\r\n {\r\n uid: '-1',\r\n name: 'image.png',\r\n status: 'done',\r\n url: caminho_avatar,\r\n },\r\n ];\r\n if (dadosImg.padrao) {\r\n img[0].type = dadosImg.mimiType\r\n }\r\n setImageUrl(caminho_avatar);\r\n setFileList(img);\r\n };\r\n\r\n function salvarDadosPerfil(values) {\r\n let dadosEnviar = { ...dadosUsuario };\r\n dadosEnviar.usu_nome = values.usu_nome;\r\n if (fileList.length > 0) {\r\n dadosEnviar.usu_avatar = { data: imageUrl, type: fileList[0].type };\r\n } else {\r\n dadosEnviar.usu_avatar = { data: null, type: null };\r\n }\r\n\r\n api.post(`Usuario/EditarProfile`, JSON.stringify(dadosEnviar), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n (retorno) => {\r\n if (retorno) {\r\n Modal.success({\r\n content: 'Dados atualizados com sucesso!',\r\n });\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n Modal.error({\r\n title: 'Não foi possível atualizar os dados!',\r\n content: (\r\n
\r\n

{erro.response.data.Message}

\r\n
\r\n )\r\n });\r\n }\r\n ).finally(() => {\r\n aoSalvar();\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n setImageUrl(null)}\r\n beforeUpload={beforeUpload}\r\n maxCount={1}\r\n >\r\n {fileList.length === 0 && uploadButton}\r\n \r\n \r\n {previewImage && (\r\n setPreviewVisible(visible),\r\n afterOpenChange: (visible) => !visible && setPreviewImage(''),\r\n }}\r\n src={previewImage}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Form, Input } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\n\r\nexport default function FiltroSearch({ labelInput, placeholderInput, nameInput = \"\", form = null, ordem = null, filtroFixo = \"\" }) {\r\n\r\n const [{ listagem }, dispatch] = useStateValue();\r\n\r\n useEffect(() => { dispatch({ type: listagemActions.CHANGE, data: { filtro: null, pagina: 1, ordem: ordem } }) }, []);\r\n\r\n return (\r\n \r\n {\r\n if (!filtroFixo) {\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: valor, pagina: 1 } })\r\n } else {\r\n dispatch({ type: listagemActions.CHANGE, data: { filtro: valor, pagina: 1, outrosFiltros: filtroFixo } })\r\n }\r\n\r\n }\r\n } onBlur={valor => {\r\n if (!!form && !!nameInput) {\r\n form.setFieldsValue({ [nameInput]: valor.target.value });\r\n }\r\n }} />\r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Form } from \"antd\";\r\nimport { Radio } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\nimport { useEffect } from \"react\";\r\n\r\nexport default function FiltroAtivo({ labelInput, nameInput = \"\"}) {\r\n\r\n const [{ listagem }, dispatch] = useStateValue();\r\n\r\n return (\r\n \r\n {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: \"&\" + [nameInput] + \"=\" + valor.target.value } })\r\n }}>\r\n Todos\r\n Ativo\r\n Inativo\r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Form, Select } from \"antd\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions } from '../../actions';\r\n\r\nexport default function FiltroOrdenacao({ opcoesOrdenacao }) {\r\n\r\n const [{ listagem }, dispatch] = useStateValue();\r\n\r\n return (\r\n \r\n
(\r\n
\r\n {prl_numerolote}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Qtde',\r\n align: 'center',\r\n width: 75,\r\n render: ({ prl_qtde }) => (\r\n
\r\n {prl_qtde}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Data Entrada',\r\n align: 'left',\r\n width: 160,\r\n render: ({ prl_dataentrada }) => (\r\n
\r\n {moment(prl_dataentrada).format('DD/MM/YYYY')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Data Fabricação',\r\n align: 'left',\r\n width: 160,\r\n render: ({ prl_datafabricacao }) => (\r\n
\r\n {moment(prl_datafabricacao).format('DD/MM/YYYY')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Data Vencimento',\r\n align: 'left',\r\n width: 160,\r\n render: ({ prl_datavencimento }) => (\r\n
\r\n {moment(prl_datavencimento).format('DD/MM/YYYY')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Informação Adicional',\r\n align: 'left',\r\n render: ({ prl_infoadicional}) => (\r\n
\r\n {prl_infoadicional}\r\n
\r\n )\r\n }\r\n ]}\r\n dataSource={item.itemLote}\r\n pagination={false}\r\n />\r\n \r\n \r\n )\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Tag, Table, Button, Tooltip, Dropdown, Menu } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport { FileSearchOutlined, MoreOutlined } from '@ant-design/icons';\r\nimport ModalDetalheLoteNfi from '../modals/modalDetalhesLoteNfi';\r\n\r\nexport default function TabDetalheItens({ itensNF }) {\r\n\r\n const [percentualDesc, setPercentualDesc] = useState(true);\r\n const [exibirModalLote, setExibirModalLote] = useState(false);\r\n const [dadosItem, setDadosItem] = useState([]);\r\n\r\n function retornarPercentual(perc_desconto, nfi_valordesconto) {\r\n if (percentualDesc) {\r\n return (\r\n
\r\n {perc_desconto}%\r\n
\r\n )\r\n } else {\r\n return (\r\n
\r\n {FormatNumber(nfi_valordesconto, true)}\r\n
\r\n )\r\n }\r\n };\r\n\r\n function menuTable(record) {\r\n const itemLote = record.itemLote && record.itemLote.length > 0;\r\n const tooltip = itemLote ? '' : 'Lotes do Produto não disponível';\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n fixed: 'left',\r\n width: '20%',\r\n render: ({ pro_codigo, pro_descricao, atributos, descricaoGrade }) => (\r\n
\r\n \r\n
\r\n {(!!pro_descricao ? pro_descricao : 'Débito/Crédito de imposto')}\r\n \r\n {!!atributos &&\r\n \r\n \r\n {atributos.mgp_descricao}\r\n \r\n \r\n }\r\n {!!descricaoGrade &&\r\n \r\n \r\n {descricaoGrade}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'N°',\r\n width: '1.5%',\r\n align: 'center',\r\n fixed: 'left',\r\n render: ({ nfi_numeroitem }) => (\r\n
\r\n \r\n
\r\n {(nfi_numeroitem)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: `${!!itensNF && !!itensNF[0].nis_csosn ? 'CSOSN' : 'CST'}`,\r\n width: '2.5%',\r\n align: 'center',\r\n render: ({ nis_origemmercadoria, nis_csosn, nig_cst, nig_origemmercadoria }) => (\r\n
\r\n \r\n
\r\n {(!!nis_csosn ? nis_origemmercadoria + nis_csosn : nig_origemmercadoria + nig_cst)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CFOP',\r\n width: '2%',\r\n align: 'center',\r\n render: ({ nfi_cfop }) => (\r\n
\r\n \r\n
\r\n {nfi_cfop}\r\n \r\n \r\n \r\n ),\r\n }, {\r\n title: 'NCM',\r\n width: '3%',\r\n align: 'center',\r\n render: ({ nfi_ncm }) => (\r\n
\r\n \r\n
\r\n {nfi_ncm}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CEST',\r\n width: '2.8%',\r\n align: 'center',\r\n render: ({ cet_id }) => (\r\n
\r\n \r\n
\r\n {cet_id}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'C.Benef',\r\n width: '3%',\r\n align: 'center',\r\n render: ({ cbf_codigo }) => (\r\n
\r\n \r\n
\r\n {cbf_codigo}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'UM.',\r\n width: '2%',\r\n align: 'center',\r\n render: ({ nfi_unidademedida }) => (\r\n
\r\n \r\n
\r\n {nfi_unidademedida}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n \r\n
\r\n {nfi_qtde}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unit.(R$)',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Frete.(R$)',\r\n align: 'right',\r\n width: '3%',\r\n render: ({ nfi_valorfrete }) => (\r\n
\r\n \r\n {FormatNumber(nfi_valorfrete, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acrés.(R$)',\r\n align: 'right',\r\n width: '3%',\r\n render: ({ nfi_valoroutros }) => (\r\n
\r\n \r\n {FormatNumber(nfi_valoroutros, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desc.\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: '3%',\r\n align: 'right',\r\n render: ({ perc_desconto, nfi_valordesconto }) => (\r\n retornarPercentual(perc_desconto, nfi_valordesconto)\r\n ),\r\n },\r\n {\r\n title: 'BC Icms',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nig_valorbc }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nig_valorbc, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '% Icms',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nig_percicms }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nig_percicms, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nig_valoricms }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nig_valoricms, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'BC Icms St',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nis_valorbcst, nig_valorbcst }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nis_valorbcst?? nig_valorbcst, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '% Icms St',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nis_percicmsst,nig_percicmsst }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nis_percicmsst?? nig_percicmsst, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Icms St',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nis_valoricmsst, nig_valoricmsst }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nis_valoricmsst ?? nig_valoricmsst, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '% MVA',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nis_percmvast, nig_percmvast }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nis_percmvast ?? nig_percmvast, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'BC IPI',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ npi_valorbcipi }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(npi_valorbcipi, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '% IPI',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ npi_percaliquotaipi }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(npi_percaliquotaipi, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr IPI',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ npi_valoripi }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(npi_valoripi, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n width: '5%',\r\n render: ({ nfi_valorunitario, nfi_qtde }) => (\r\n
\r\n \r\n {FormatNumber(nfi_qtde * nfi_valorunitario, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: '3%',\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n Nº: {prc_numeroparcela}\r\n \r\n \r\n Vencimento: {!!prc_datavencimento ? moment(prc_datavencimento).format('DD/MM/YYYY') : null}\r\n \r\n \r\n Valor (R$): {FormatNumber(!!prc_valor ? prc_valor : 0, true)}\r\n \r\n \r\n \r\n );\r\n } else if (record.fpg_tipopagamento === 3 || record.fpg_tipopagamento === 4) {\r\n dataSource = record.parcelasCartao;\r\n renderFunction = ({ bce_nomecredenciadora, rcc_conciliado, rcc_parcelarecebimento, rcc_previsaorecebimento, rcc_valor }) => (\r\n
\r\n \r\n
\r\n Bandeira: {bce_nomecredenciadora}\r\n \r\n \r\n Conciliado: {rcc_conciliado == true ? 'Sim' : 'Não'}\r\n \r\n \r\n Nº: {rcc_parcelarecebimento}\r\n \r\n \r\n Previsão recebimento: {!!rcc_previsaorecebimento ? moment(rcc_previsaorecebimento).format('DD/MM/YYYY') : null}\r\n \r\n \r\n Valor (R$): {FormatNumber(!!rcc_valor ? rcc_valor : 0, true)}\r\n \r\n \r\n \r\n );\r\n }\r\n return (\r\n \r\n );\r\n };\r\n\r\n const rowExpandable = record => {\r\n return (record.fpg_tipopagamento === 3 || record.fpg_tipopagamento === 4 || record.fpg_tipopagamento === 5);\r\n };\r\n\r\n\r\n const abrirEnvioWhats = (nota) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: nota } })\r\n setOpenModalEnvioBolWhats(true);\r\n }\r\n\r\n function imprimirBoleto(record) {\r\n if (!!record.ntf_id) {\r\n novaAbaNavegador(`Boleto/ImprimirBoletos/${record.ntf_id}`);\r\n }\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n {record.fpg_emiteboleto === true &&\r\n \r\n \r\n \r\n }\r\n {record.fpg_emiteboleto === true &&\r\n \r\n \r\n \r\n }\r\n {/* \r\n \r\n */}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n (\r\n
\r\n \r\n
\r\n {fpg_descricao + (!!cpg_descricao ? '/ ' + cpg_descricao : '')}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'NSU / Id Integração',\r\n render: ({ imp_autorizacao, imp_idintegracao }) => (\r\n
\r\n \r\n {!!imp_autorizacao &&
\r\n {imp_autorizacao + ' / ' + imp_idintegracao}\r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Cód. Vale Presente',\r\n render: ({ nfp_codigovalepresente }) => (\r\n
\r\n \r\n {!!nfp_codigovalepresente &&
\r\n {nfp_codigovalepresente}\r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Valor Troco',\r\n align: 'right',\r\n render: ({ nfp_valortroco }) => (\r\n
\r\n \r\n
\r\n R$ {FormatNumber(!!nfp_valortroco ? nfp_valortroco : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Valor Líquido',\r\n align: 'right',\r\n render: ({ nfp_valor, nfp_valortroco }) => (\r\n
\r\n \r\n
\r\n R$ {FormatNumber(!!nfp_valor ? (nfp_valor - nfp_valortroco) : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => {\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalprodutos,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalbcicms,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalbcicmsst,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalbcipi,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalfrete,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalicms,true)}\r\n {/* pode ser utilizado tambem o campo valototalicmsst */}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalicmsst,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalipi,true)}\r\n {/* pode ser utilizado tambem o campo totalvaloripi */}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotaldesconto, true)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotaloutros,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valorbcpis,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valorbccofins,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalbcissqn,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalnota,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalpis,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalcofins,true)}\r\n \r\n \r\n {FormatNumber(detalheNotaFiscal.valortotalissqn,true)}\r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Tag, Table, Button } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport moment from 'moment';\r\n\r\nexport default function TabNotaReferenciada({ docsreferenciados }) {\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {!!ntf_numero ? ntf_numero : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 30,\r\n align: 'center',\r\n render: ({ datadoc }) => (\r\n
\r\n \r\n
\r\n {!!datadoc ? moment(datadoc).format('DD/MM/YYYY') : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Chave',\r\n width: 140,\r\n align: 'center',\r\n render: ({ dfr_chave }) => (\r\n
\r\n \r\n
\r\n {!!dfr_chave ? dfr_chave : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Valor Total',\r\n width: 30,\r\n align: 'center',\r\n render: ({ totaldoc }) => (\r\n
\r\n \r\n
\r\n {!!FormatNumber(totaldoc, true) ? FormatNumber(totaldoc, true) : '0,00'}\r\n \r\n \r\n \r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Tag, Table, Button } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\nimport moment from 'moment';\r\n\r\nexport default function TabNotaAntecipacaoDevolucao({ antecipacaoDevolucao }) { \r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {!!tipoMovimento ? tipoMovimento : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n width: 30,\r\n align: 'center',\r\n render: ({ datadoc }) => (\r\n
\r\n \r\n
\r\n {!!datadoc ? moment(datadoc).format('DD/MM/YYYY') : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Informações',\r\n width: 140,\r\n align: 'center',\r\n render: ({ informacoes }) => (\r\n
\r\n \r\n
\r\n {!!informacoes ? informacoes : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Valor Total',\r\n width: 30,\r\n align: 'center',\r\n render: ({ valor }) => (\r\n
\r\n \r\n
\r\n {!!FormatNumber(valor, true) ? FormatNumber(valor, true) : '0,00'}\r\n \r\n \r\n \r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport moment from \"moment\";\r\nimport { FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\n\r\nexport default function TabDetalheRelacaoPedido({ dadosPedido }) {\r\n const [listaPedidos, setListaPedidos] = useState([]);\r\n\r\n useEffect(() => {\r\n if (dadosPedido) {\r\n let listaTemp = dadosPedido.map((item, index) => ({\r\n ...item,\r\n key: index\r\n }));\r\n\r\n setListaPedidos(listaTemp);\r\n }\r\n })\r\n\r\n return (\r\n
\r\n \r\n
\r\n {listaPedidos.length > 0 ? Nota emitida a partir dos Pedidos: : Nota emitida a partir do Pedido:}\r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {stp_descricao}\r\n \r\n
\r\n )\r\n },\r\n {\r\n title: 'Número',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ped_numero }) => (\r\n \r\n {ped_numero}\r\n \r\n )\r\n },\r\n {\r\n title: 'Data Emissão',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ped_datainclusao }) => (\r\n
\r\n {moment(ped_datainclusao).format('DD/MM/YYYY')}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Operação',\r\n align: 'center',\r\n width: 100,\r\n render: ({ ope_descricao }) => (\r\n
\r\n {ope_descricao}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 400,\r\n render: ({ pes_nome }) => (\r\n
\r\n {pes_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 160,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Vendedor',\r\n width: 400,\r\n render: ({ ven_nome }) => (\r\n
\r\n {ven_nome || \"Não Informado\"}\r\n
\r\n )\r\n },\r\n {\r\n title: \"Total (R$)\",\r\n align: 'right',\r\n width: 100,\r\n render: ({ ped_valortotal }) => (\r\n
\r\n {FormatNumber(ped_valortotal, true)}\r\n
\r\n )\r\n },\r\n ]\r\n }\r\n expandable={{\r\n expandedRowRender: (record) => (\r\n
\r\n \r\n
Endereço do Cliente: \r\n {record.pes_endereco}, {record.pes_nroestabelecimento}, {record.pes_bairro}\r\n | \r\n {record.pes_cep}, {record.pes_cidade} - {record.pes_uf}\r\n \r\n \r\n ),\r\n }} \r\n />\r\n \r\n \r\n )\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nexport default function TabDetalheServico({ itensNF }) {\r\n const [percentualDesc, setPercentualDesc] = useState(true);\r\n\r\n function retornarPercentual(perc_desconto, nfi_valordesconto) {\r\n if (percentualDesc) {\r\n return (\r\n
\r\n {perc_desconto}%\r\n
\r\n )\r\n } else {\r\n return (\r\n
\r\n {FormatNumber(nfi_valordesconto, true)}\r\n
\r\n )\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: '',\r\n fixed: 'left',\r\n width: '20%',\r\n render: ({ pro_descricao }) => (\r\n
\r\n \r\n
\r\n {(pro_descricao)}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'N°',\r\n width: '1.5%',\r\n align: 'center',\r\n fixed: 'left',\r\n render: ({ nfi_numeroitem }) => (\r\n
\r\n \r\n
\r\n {(nfi_numeroitem)}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'CFOP',\r\n width: '2%',\r\n align: 'center',\r\n render: ({ nfi_cfop }) => (\r\n
\r\n \r\n
\r\n {nfi_cfop}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'UM.',\r\n width: '2%',\r\n align: 'center',\r\n render: ({ nfi_unidademedida }) => (\r\n
\r\n \r\n
\r\n {nfi_unidademedida}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nfi_qtde }) => (\r\n
\r\n \r\n
\r\n {nfi_qtde}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unit.(R$)',\r\n align: 'right',\r\n width: '4%',\r\n render: ({ nfi_valorunitario }) => (\r\n
\r\n {FormatNumber(nfi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Acrés.(R$)',\r\n align: 'right',\r\n width: '3%',\r\n render: ({ nfi_valoroutros }) => (\r\n
\r\n \r\n {FormatNumber(nfi_valoroutros, true)}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desc.\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: '3%',\r\n align: 'right',\r\n render: ({ perc_desconto, nfi_valordesconto }) => (\r\n retornarPercentual(perc_desconto, nfi_valordesconto)\r\n ),\r\n },\r\n {\r\n title: 'BC Issqn',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nfs_valorbc }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nfs_valorbc, true)}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: '% Issqn',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nfs_percissqn }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nfs_percissqn, true)}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Vlr Issqn',\r\n width: '3%',\r\n align: 'right',\r\n render: ({ nfs_valorissqn }) => (\r\n
\r\n \r\n
\r\n {FormatNumber(nfs_valorissqn, true)}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n width: '5%',\r\n render: ({ nfi_valorunitario, nfi_qtde }) => (\r\n
\r\n \r\n {FormatNumber(nfi_qtde * nfi_valorunitario, true)}\r\n \r\n
\r\n ),\r\n },\r\n ]\r\n } dataSource={itensNF}\r\n scroll={{\r\n x: 1000,\r\n y: 300,\r\n }} \r\n />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Card, Col, Descriptions, Divider, Row } from \"antd\";\r\n\r\nexport default function TabDetalheTransporte({ transporteNF }) {\r\n const [transporte, setTransporte] = useState({});\r\n\r\n useEffect(() => {\r\n if (transporteNF) {\r\n setTransporte(transporteNF[0]);\r\n }\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n \r\n Veículo\r\n }>\r\n \r\n \r\n \r\n \r\n {transporte?.trv_modelo || 'Não Informado'}\r\n \r\n \r\n {transporte?.trv_marca || 'Não Informado'}\r\n \r\n \r\n {transporte?.trv_placa || 'Não Informado'}\r\n \r\n \r\n {transporte?.trv_rntc || 'Não Informado'}\r\n \r\n \r\n {transporte?.trv_uf || 'Não Informado'}\r\n \r\n \r\n {transporte?.trv_observacao || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Volumes\r\n }>\r\n \r\n \r\n \r\n \r\n {transporte?.nvl_numeracaovolume || 'Não Informado'}\r\n \r\n \r\n {transporte?.nvl_marcavolume || 'Não Informado'}\r\n \r\n \r\n {transporte?.nvl_especievolume || 'Não Informado'}\r\n \r\n \r\n {transporte?.nvl_qtdevolumes || 'Não Informado'}\r\n \r\n \r\n {transporte?.nvl_pesoliquido || 'Não Informado'}\r\n \r\n \r\n {transporte?.nvl_pesobruto || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Tabs } from \"antd\";\r\n\r\nimport { TabDetalheItens, TabDetalheIFormaPagamento, TabDetalheTotalizadores, TabNotaReferenciada, TabNotaAntecipacaoDevolucao, TabDetalheRelacaoPedido } from './tabPage';\r\nimport { useStateValue } from '../../state';\r\nimport moment from 'moment';\r\nimport { FormatFone, MaskFormat } from '../../ValueObjects/index';\r\nimport TabDetalheServico from './tabDetalheServico';\r\nimport TabDetalheTransporte from './tabDetalheTransporte';\r\nimport api from '../../services/api';\r\n\r\nexport default function DetalheNotaFiscal({ dadosModal }) {\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [detalheNotaFiscal, setDetalheNotaFiscal] = useState({});\r\n const [arrFinalidade] = useState([\"NF-E NORMAL\", \"NF-E COMPLEMENTAR\", \"NF-E DE AJUSTE\", \"DEVOLUÇÃO\"]);\r\n const [arrStatus] = useState([\"EM DIGITAÇÃO\", \"AUTORIZADA\", \"CANCELADA\", \"DENEGADA\", \"REJEITADA\", \"CONTINGÊNCIA\"]);\r\n const [arrAmbiente] = useState([\"PRODUÇÃO\", \"HOMOLOGAÇÃO\"]);\r\n const [verificadevolucao, setverificadevolucao] = useState(false);\r\n const [modelo, setModelo] = useState('');\r\n const [abaRelacionamento, setAbaRelacionamento] = useState(false);\r\n const [dadosPedido, setDadosPedido] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dadosModal) {\r\n setDetalheNotaFiscal(dadosModal);\r\n setverificadevolucao(dadosModal.verificadevolucao);\r\n setModelo(dadosModal.ntf_modelo);\r\n\r\n buscarRelacionamento();\r\n }\r\n }, [dadosModal]);\r\n\r\n async function buscarRelacionamento() {\r\n let retorno = await api.get(`NotaFiscal/ListarRelacionamento?IdNota=${dadosModal.ntf_id}`);\r\n if (retorno.status === 200) {\r\n if (retorno.data.length > 0) {\r\n setDadosPedido(retorno.data);\r\n setAbaRelacionamento(true);\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_nomedest ? detalheNotaFiscal.ntf_nomedest : 'NÃO INFORMADO')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_cnpjcpfdest ? MaskFormat(detalheNotaFiscal.ntf_cnpjcpfdest, '', true) : (!!detalheNotaFiscal.ntf_cnpjcpfdest ? MaskFormat(detalheNotaFiscal.ntf_cnpjcpfdest, '', true) : 'NÃO INFORMADO'))}\r\n \r\n \r\n {arrStatus[detalheNotaFiscal.ntf_status]}\r\n \r\n \r\n {detalheNotaFiscal.ntf_numero}\r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_iedest ? detalheNotaFiscal.ntf_iedest : 'NÃO INFORMADO')}\r\n \r\n \r\n {(!!detalheNotaFiscal.nomeVendedor ? detalheNotaFiscal.nomeVendedor : 'NÃO INFORMADO')}\r\n \r\n \r\n {!!detalheNotaFiscal.ntf_dataemissao ? moment(detalheNotaFiscal.ntf_dataemissao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_emaildest ? detalheNotaFiscal.ntf_emaildest : 'NÃO INFORMADO')}\r\n \r\n \r\n {arrFinalidade[detalheNotaFiscal.ntf_finalidade - 1]}\r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_chavenfe ? detalheNotaFiscal.ntf_chavenfe : 'NÃO DISPONÍVEL')}\r\n \r\n \r\n {!!detalheNotaFiscal.ntf_telefonedest ? FormatFone(detalheNotaFiscal.ntf_telefonedest) : 'NÃO INFORMADO'}\r\n \r\n \r\n {arrAmbiente[detalheNotaFiscal.ntf_ambiente - 1]}\r\n \r\n \r\n {detalheNotaFiscal.ope_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {detalheNotaFiscal.mdf_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_logradourodest ? detalheNotaFiscal.ntf_logradourodest : ' NÃO INFORMADO ')},\r\n {(!!detalheNotaFiscal.ntf_bairrodest ? detalheNotaFiscal.ntf_bairrodest : ' NÃO INFORMADO ')},\r\n {(!!detalheNotaFiscal.ntf_municipiodest ? detalheNotaFiscal.ntf_municipiodest : ' NÃO INFORMADO ')},\r\n {(!!detalheNotaFiscal.ntf_cepdest ? MaskFormat(detalheNotaFiscal.ntf_cepdest, '00000-000') : ' NÃO INFORMADO')}.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!!detalheNotaFiscal.ntf_infcomplementar ? detalheNotaFiscal.ntf_infcomplementar : '')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n {modelo === '98' ? : }\r\n \r\n \r\n \r\n \r\n {modelo !== '98' && \r\n \r\n }\r\n \r\n \r\n \r\n {abaRelacionamento && \r\n \r\n }\r\n {(detalheNotaFiscal.ntf_tiponota == 4 || detalheNotaFiscal.ntf_tiponota == 5) && \r\n \r\n }\r\n {(detalheNotaFiscal.ntf_tiponota == 4 || detalheNotaFiscal.ntf_tiponota == 5) && \r\n \r\n }\r\n \r\n \r\n
\r\n \r\n );\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Tag, Table, Button } from \"antd\";\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabDetalheItens({ itensNF }) {\r\n\r\n const [percentualDesc, setPercentualDesc] = useState(false);\r\n\r\n function retornarPercentual(perc_desconto, nfi_valordesconto) {\r\n if (percentualDesc) {\r\n return (\r\n
\r\n {perc_desconto}%\r\n
\r\n )\r\n } else {\r\n return (\r\n
\r\n {FormatNumber(nfi_valordesconto, true)}\r\n
\r\n )\r\n }\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {pro_codigo}\r\n \r\n \r\n \r\n {pro_descricao}\r\n \r\n {!!descricaograde &&\r\n \r\n \r\n {descricaograde}\r\n \r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Faturado',\r\n align: 'right',\r\n width: 60,\r\n render: ({ pdi_qtdeentregue }) => (\r\n
\r\n \r\n
\r\n {!!pdi_qtdeentregue ? {pdi_qtdeentregue} : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Devolvido',\r\n align: 'right',\r\n width: 60,\r\n render: ({ pdi_qtdedevolvido }) => (\r\n
\r\n \r\n
\r\n {!!pdi_qtdedevolvido ? {pdi_qtdedevolvido} : 0}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Qtde.',\r\n width: 50,\r\n align: 'right',\r\n render: ({ pdi_quantidade }) => (\r\n
\r\n \r\n
\r\n {pdi_quantidade}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Vlr Unt.(R$)',\r\n align: 'right',\r\n width: 80,\r\n render: ({ pdi_valorunitario }) => (\r\n
\r\n {FormatNumber(pdi_valorunitario, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: () => {\r\n return (\r\n
\r\n \r\n
\r\n Desc.\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n width: 75,\r\n align: 'right',\r\n render: ({ perc_desconto, pdi_valordesconto }) => (\r\n retornarPercentual(perc_desconto, pdi_valordesconto)\r\n ),\r\n },\r\n {\r\n title: 'Vlr Total (R$)',\r\n align: 'right',\r\n width: 100,\r\n render: ({ pdi_valortotal }) => (\r\n
\r\n {FormatNumber(pdi_valortotal, true)}\r\n
\r\n ),\r\n }\r\n ]\r\n } />\r\n \r\n );\r\n}","import React from 'react';\r\nimport { Row, Col, Table } from \"antd\";\r\n\r\nimport moment from 'moment';\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function TabDetalheIFormaPagamento({ formaPagamento }) {\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n
\r\n \r\n
\r\n Nº: {prc_numeroparcela}\r\n \r\n \r\n Vencimento: {!!prc_datavencimento ? moment(prc_datavencimento).format('DD/MM/YYYY') : null}\r\n \r\n \r\n Valor (R$): {FormatNumber(!!prc_valor ? prc_valor : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } pagination={false} />\r\n };\r\n\r\n const rowExpandable = record => { return (record.fpg_tipopagamento === 5 || record.fpg_tipopagamento === 15 )};\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {fpg_descricao + (!!cpg_descricao ? '/ ' + cpg_descricao : '')}\r\n \r\n \r\n R$ {FormatNumber(!!pfp_valor ? pfp_valor : 0, true)}\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n } pagination={false} expandable={{ expandedRowRender, rowExpandable }} />\r\n\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport moment from \"moment\";\r\nimport { FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\n\r\nexport default function TabDetalheRelacaoNota({ dadosNota, listaStatusNota }) {\r\n const [listaNotas, setListaNotas] = useState([]);\r\n\r\n useEffect(() => {\r\n if (dadosNota) {\r\n let listaTemp = dadosNota.map((item, index) => ({\r\n ...item,\r\n key: index\r\n }));\r\n\r\n setListaNotas(listaTemp);\r\n }\r\n }, [])\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n if (!!listaStatusNota) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n {listaNotas.length > 0 ? Notas emitidas pelo pedido atual: : Nota emitida pelo pedido atual:}\r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {ntf_numero}\r\n \r\n
\r\n )\r\n },\r\n {\r\n title: 'Status',\r\n width: 130,\r\n align: 'center',\r\n render: ({ ntf_status, tip_descricao }) => (\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n {tip_descricao}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 100,\r\n render: ({ ntf_cnpjcpfdest }) => (\r\n
\r\n {MaskFormat(ntf_cnpjcpfdest, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Cliente',\r\n width: 250,\r\n render: ({ ntf_nomedest }) => (\r\n
\r\n {ntf_nomedest}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 100,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Modelo',\r\n width: 50,\r\n align: 'center',\r\n render: ({ ntf_modelo, ser_serie }) => (\r\n
\r\n \r\n
\r\n {ntf_modelo}\r\n \r\n \r\n -\r\n \r\n \r\n {ser_serie}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total (R$)\",\r\n width: 70,\r\n align: 'right',\r\n render: ({ valortotalnota }) => (\r\n
\r\n {FormatNumber(valortotalnota, true)}\r\n
\r\n )\r\n },\r\n ]\r\n } />\r\n \r\n \r\n )\r\n}","import React from \"react\";\r\nimport { Col, Row, Table, Tag } from \"antd\";\r\n\r\nimport moment from \"moment\";\r\n\r\nexport default function TabDetalheHistorico ({ historico }) {\r\n \r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Data de Alteração',\r\n width: 100,\r\n render: ({ peh_datahora }) => (\r\n
\r\n {moment(peh_datahora).format('DD/MM/YYYY HH:mm')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Usuário',\r\n width: 200,\r\n render: ({usu_nome}) => (\r\n
\r\n {usu_nome}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Observação',\r\n width: 200,\r\n render: ({peh_observacao}) => (\r\n
\r\n {peh_observacao ?? '-'}\r\n
\r\n )\r\n },\r\n ]\r\n }/>\r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Tabs } from \"antd\";\r\n\r\nimport { TabDetalheItens, TabDetalheIFormaPagamento, TabDetalheRelacaoNota, TabDetalheHistorico } from './tabPage';\r\nimport moment from 'moment';\r\nimport { FormatFone, MaskFormat } from '../../ValueObjects/index';\r\nimport api from '../../services/api';\r\n\r\nexport default function DetalhePedido({ dadosModal }) {\r\n\r\n const [abaSelecionada, setAbaSelecionada] = useState(\"1\");\r\n const [pedido, setPedido] = useState({});\r\n const [dadosNota, setDadosNota] = useState([]);\r\n const [abaRelacionamento, setAbaRelacionamento] = useState(false);\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!dadosModal) {\r\n setPedido(dadosModal);\r\n retornaStatusNF();\r\n buscarRelacionamento();\r\n }\r\n }, [dadosModal]);\r\n\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n async function buscarRelacionamento() {\r\n let retorno = await api.get(`Pedido/ListarRelacionamento?IdPed=${dadosModal.ped_id}`);\r\n if (retorno.status === 200) {\r\n if (retorno.data.length > 0) {\r\n setDadosNota(retorno.data);\r\n setAbaRelacionamento(true);\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {(!!pedido.pes_nome ? pedido.pes_nome : 'NÃO INFORMADO')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!!pedido.pef_cpf ? MaskFormat(pedido.pef_cpf, '', true) : (!!pedido.pej_cnpj ? MaskFormat(pedido.pej_cnpj, '', true) : 'NÃO INFORMADO'))}\r\n \r\n \r\n {pedido.ped_numero}\r\n \r\n \r\n {(!!pedido.ped_iedest ? pedido.ntf_iedest : 'NÃO INFORMADO')}\r\n \r\n \r\n {(!!pedido.ven_nome ? pedido.ven_nome : 'NÃO INFORMADO')}\r\n \r\n \r\n {!!pedido.ped_datainclusao ? moment(pedido.ped_datainclusao).format('DD/MM/YYYY') : null}\r\n \r\n \r\n {(!!pedido.pem_email ? pedido.pem_email : 'NÃO INFORMADO')}\r\n \r\n \r\n {!!pedido.pes_telefone ? FormatFone(pedido.pes_telefone) : 'NÃO INFORMADO'}\r\n \r\n \r\n {pedido.ope_descricao}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {(!!pedido.pes_endereco ? pedido.pes_endereco : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_bairro ? pedido.pes_bairro : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_cidade ? pedido.pes_cidade : ' NÃO INFORMADO ')+'-'+(!!pedido.pes_uf ? pedido.pes_uf : ' NÃO INFORMADO ')},\r\n {(!!pedido.pes_cep ? MaskFormat(pedido.pes_cep, '00000-000') : ' NÃO INFORMADO')}.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!pedido.ped_observacao ? pedido.ped_observacao : ''}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n setAbaSelecionada(tab)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {abaRelacionamento && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form } from \"antd\";\r\nimport { setTela } from \"../../services/auth\"\r\nimport { useStateValue } from '../../state';\r\n\r\nfunction FormGW({ initialValues, layout, form, name, onFinish, campoId, children }) {\r\n\r\n const [{ manutencao, ui }, dispatch] = useStateValue();\r\n const gravaLocalStorage = allValues => {\r\n //localStorage.setItem(name, JSON.stringify(allValues));\r\n let dados = {};\r\n let url = window.document.location.href;\r\n dados = form.getFieldValue();\r\n dados.formulario = url.substring(url.lastIndexOf('/'), url.length);\r\n dados.editar = false;\r\n setTela(JSON.stringify(dados));\r\n }\r\n const listaInputHidden = [];\r\n\r\n function autoTab(event) {\r\n if ((event.keyCode === 13 || event.keyCode === 9) || (!!event.which && (event.which === 13 || event.which === 9))) {\r\n if (!!event.target.form) {\r\n for (let key in event.target.form.elements) {\r\n if (!!event.target.form.elements[key].setAttribute && parseInt(key) >= 0) {\r\n event.target.form.elements[key].setAttribute('index', key);\r\n }\r\n }\r\n let index = parseInt(event.target.getAttribute('index'));\r\n if (!!event.target.form.elements[index + 1]) {\r\n if (event.target.form.elements[index + 1].disabled || event.target.form.elements[index + 1].hidden) {\r\n let posicao = validarCampoValido(event, index, 2);\r\n event.target.form.elements[index + posicao].focus();\r\n } else {\r\n event.target.form.elements[index + 1].focus();\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n function validarCampoValido(event, index, aux) {\r\n if (!!event.target.form.elements[index + aux]) {\r\n if (event.target.form.elements[index + aux].disabled) {\r\n aux += 1;\r\n validarCampoValido(event, index, aux);\r\n } else {\r\n return aux;\r\n }\r\n } else {\r\n return aux - 1;\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldsValue() && ui.showDrawer) {\r\n for (let campo in form.getFieldsValue()) {\r\n listaInputHidden.push({ campo: campo, hidden: false });\r\n }\r\n popularListaInputHidden();\r\n if (!verificarJaPossuiFocus()) {\r\n listaInputHidden.forEach((inputHidden, index, array) => {\r\n if (!inputHidden.hidden && !!inputHidden.campo) {\r\n let input = form.getFieldInstance(inputHidden.campo);\r\n if (!!input && !!input.props && !input.props.disabled) {\r\n setTimeout(() => {\r\n try {\r\n input.focus();\r\n } catch {\r\n return;\r\n }\r\n }, 500);\r\n array.length = index + 1;//break the loop\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }, [ui.showDrawer]);\r\n\r\n function popularListaInputHidden() {\r\n let formItemHidden = !!document.querySelector('.ant-drawer') ? document.querySelector('.ant-drawer').querySelectorAll('.ant-form-item-hidden') : null;\r\n if (!!formItemHidden) {\r\n listaInputHidden.forEach((inputHidden, index, array) => {\r\n formItemHidden.forEach(itemHidden => {\r\n if (!!itemHidden.querySelector('input') && itemHidden.querySelector('input').id.indexOf(inputHidden.campo) > -1) {\r\n listaInputHidden[index].hidden = true;\r\n }\r\n });\r\n });\r\n }\r\n };\r\n\r\n function verificarJaPossuiFocus() {\r\n let retorno = false;\r\n listaInputHidden.forEach((inputHidden, index, array) => {\r\n let elementos = document.querySelector('.ant-drawer').querySelectorAll('input');\r\n let input = Array.prototype.filter.call(elementos, (test) => { return test.id.indexOf(inputHidden.campo) > -1 })[0]\r\n if (input === document.activeElement) {\r\n retorno = true;\r\n }\r\n });\r\n return retorno;\r\n };\r\n\r\n /*let dadosForm = localStorage.getItem(name);\r\n if (dadosForm) {\r\n if (dadosForm.includes(campoId)) {\r\n dadosForm = JSON.parse(dadosForm)\r\n if (dadosForm[campoId] === form.getFieldValue(campoId) ) form.setFieldsValue(dadosForm);\r\n } else {\r\n form.setFieldsValue(JSON.parse(dadosForm));\r\n }\r\n }*/\r\n return (\r\n gravaLocalStorage(allValues)}>\r\n {/*children?children.props.children.map(child => child):''*/}\r\n {children}\r\n \r\n )\r\n\r\n}\r\nexport default FormGW;","import React, { useEffect, useState } from 'react';\r\nimport { Select} from 'antd';\r\nimport api from '../../../services/api';\r\nimport { isNotNullOrEmpty } from '../../../services/funcoes';\r\n\r\nexport default function SelectAll({ url, idValue, nameValue, nameLabel, onChangeFunction, onBlurFunction, onClearFunction, campoFiltro = \"filtro\", placeholder,\r\n form, atualizaComponente = false, mostrarCodigoLabel = false, multiple = false, allowClear = false, conteudo = null, filtroPesq = null, filtroExtra,\r\n disabled = false, returnObject = false, onSelectFunction }) {\r\n const [carregando, setCarregando] = useState(false);\r\n const [lista, setLista] = useState([]);\r\n const [filtro, setFiltro] = useState('');\r\n const [usouFiltro, setUsouFiltro] = useState(false);\r\n const [valor, setValor] = useState(null);\r\n const [campoDescricao, setCampoDescricao] = useState(null);\r\n const [filtroAnt, setFiltroAnt] = useState(\"\");\r\n const [multiplosFiltros, setMultiplosFiltros] = useState(false);\r\n const [listaFiltros, setListaFiltros] = useState([]);\r\n const _nameValue = idValue ? idValue : nameValue;\r\n\r\n useEffect(() => carregarDados(), [filtro, atualizaComponente]);\r\n\r\n useEffect(() => {\r\n setFiltro(filtroPesq);\r\n }, [filtroPesq, atualizaComponente]);\r\n\r\n useEffect(() => {\r\n if (!isNotNullOrEmpty(form.getFieldValue([_nameValue]))) {\r\n setFiltro('');\r\n }\r\n setValor(form.getFieldValue([_nameValue]));\r\n }, [form.getFieldValue([_nameValue])]);\r\n\r\n function carregarDados() {\r\n setCarregando(true);\r\n let parametrosUrl = '';\r\n if (atualizaComponente !== null) {\r\n if (!multiplosFiltros) {\r\n !!filtro ? parametrosUrl = `&${!!campoDescricao ? campoDescricao : campoFiltro}=${filtro}` : parametrosUrl = \"\";\r\n } else {\r\n !!listaFiltros && listaFiltros.length > 0 ? listaFiltros.forEach(lf => parametrosUrl += `&${!!lf.campoDescricao ? lf.campoDescricao : lf.campoFiltro}=${lf.filtro}`) : parametrosUrl = \"\";\r\n }\r\n if (!!campoDescricao) {\r\n setCampoDescricao(null);\r\n }\r\n if (mostrarCodigoLabel) {\r\n parametrosUrl += `&Order=%2B${nameValue}`;\r\n }\r\n else {\r\n parametrosUrl += (nameLabel.search('[/+/g]') > 0 ? `&Order=%2B${nameLabel.split('+')[0]}` : `&Order=%2B${nameLabel}`);\r\n }\r\n if (url.search(/[?]/g) === -1) {\r\n parametrosUrl = parametrosUrl.replace('&', '?');\r\n }\r\n !!filtroExtra ? parametrosUrl += filtroExtra : naoFazNada();\r\n api.get(url + parametrosUrl).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dados = [];\r\n\r\n let indice = !!atualizaComponente ? 0 : lista.length > 0 ? lista[lista.length - 1].key + 1 : 0;\r\n res.data.map((item, idx) => {\r\n item.key = indice;\r\n dados.push(item);\r\n indice++;\r\n });\r\n\r\n if (!isNotNullOrEmpty(filtro)) {//filtro em branco\r\n if (usouFiltro === true || atualizaComponente !== false) {\r\n atualizaComponente = false\r\n setUsouFiltro(false);\r\n setLista(dados);\r\n } else {\r\n setLista([...lista, ...dados]);\r\n }\r\n } else {\r\n if (filtro === filtroAnt) {\r\n setLista(dados);\r\n } else {\r\n setUsouFiltro(true);\r\n setFiltroAnt(filtro);\r\n setLista(dados);\r\n }\r\n }\r\n }\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false)\r\n }\r\n );\r\n }\r\n }\r\n\r\n function naoFazNada() { }\r\n\r\n return (\r\n {\r\n if (option.props.value) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }}\r\n onSearch={(valor) => { setFiltro(valor); }}\r\n onChange={(valor) => {\r\n setValor(valor);\r\n form.setFieldsValue({ [_nameValue]: valor });\r\n !!onChangeFunction ? onChangeFunction(valor) : naoFazNada();\r\n }}\r\n onBlur={(valor) => {\r\n\r\n !!onBlurFunction ? onBlurFunction(valor) : naoFazNada();\r\n }}\r\n onClear={(valor) => {\r\n !!onClearFunction ? onClearFunction(valor) : naoFazNada();\r\n }}\r\n // onSelect={(valor) => {\r\n // setValor(valor);\r\n // form.setFieldsValue({ [_nameValue]: valor });\r\n // !!onSelectFunction ? onSelectFunction(valor) : naoFazNada();\r\n // console.log(valor);\r\n // }}\r\n >\r\n {lista.map(item =>\r\n !!conteudo ? conteudo(item) :\r\n {mostrarCodigoLabel ? item[nameValue] + \" - \" : \"\"} {(nameLabel.search(/[+]/g) > 0 ? (item[nameLabel.split('+')[0]] + \" - \" + item[nameLabel.split('+')[1]]) : item[nameLabel])} \r\n )}\r\n \r\n )\r\n}\r\n","import React from \"react\";\r\nimport { Row, Col, Select, Divider, Form, Button } from \"antd\";\r\n\r\nimport { PlusOutlined } from \"@ant-design/icons\";\r\n\r\nexport default function SelectIncluir({\r\n dadosSelect = [],\r\n funcaoBotao = (() => { console.log('selectIncluir') }),\r\n campoDescricao = '',\r\n campoValue = '',\r\n placeHolder = '',\r\n campoKey = '',\r\n labelFormItem = '',\r\n nameFormItem = '',\r\n rulesFormItem = [],\r\n onChange = (() => { }),\r\n onBlur = (() => { }),\r\n onClear = (() => { }),\r\n onDeselect = (() => { }),\r\n onDropdownVisibleChange = (() => { }),\r\n onFocus = (() => { }),\r\n onInputKeyDown = (() => { }),\r\n onMouseEnter = (() => { }),\r\n onMouseLeave = (() => { }),\r\n onPopupScroll = (() => { }),\r\n onSearch = (() => { }),\r\n onSelect = (() => { }),\r\n}) {\r\n function retornarDadosArray(dado) {\r\n let retorno = '';\r\n campoDescricao.map((campo) => { retorno += dado[campo] + ','; });\r\n retorno = retorno.substring(0, retorno.lastIndexOf(','));\r\n return retorno;\r\n };\r\n\r\n return (\r\n\r\n \r\n (\r\n
\r\n \r\n
\r\n {menu}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n >\r\n {dadosSelect.map((dado) => (\r\n {(Array.isArray(campoDescricao) ? retornarDadosArray(dado) : dado[campoDescricao])}\r\n ))}\r\n \r\n \r\n\r\n );\r\n};","import React from \"react\";\r\nimport { Card, Descriptions, Tooltip, Button, Row, Col, Tag, Popconfirm } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined } from '@ant-design/icons';\r\n\r\nimport { TiposElementosFormulario } from './pages';\r\n\r\nexport default function ItemFormulario({ elemento, fnEditar = () => {}, fnExcluir = () => {}, status}) {\r\n function RetornaDescricaoElementoFormulario(tipo) {\r\n let retorno = TiposElementosFormulario.filter(el => el.value === tipo);\r\n return (retorno.length > 0 ? retorno[0].label : \"\");\r\n }\r\n\r\n //if (status !== 3 ){\r\n return (\r\n \r\n \r\n \r\n {elemento.rpj_linha}\r\n \r\n \r\n {elemento.rpj_coluna}\r\n \r\n \r\n {RetornaDescricaoElementoFormulario(elemento.rpj_tipoelemento)}\r\n \r\n \r\n {elemento.rpj_nomeelemento}\r\n \r\n \r\n \r\n {elemento.rpj_obrigatorio ? \"SIM\" : \"NÃO\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n fnExcluir()} okText=\"Sim\" cancelText=\"Não\">\r\n \r\n Estrutura do Formulário\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (e.target.tagName.toLowerCase() === \"path\" || e.target.tagName.toLowerCase() === \"svg\" || e.target.tagName.toLowerCase() === \"button\")}>\r\n {elementosFormulario.map((elemento, indice) =>\r\n \r\n
\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {elementosFormulario.length === 0 && }\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Adicionar Elementos ao Formulário\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n return !!value.match(/[a-zA-Z0-9_.]/gm) ? value.match(/[a-zA-Z0-9_.]/gm).join('') : '';\r\n }}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'select') ? (\r\n \r\n \r\n Informe o texto da opção e pressione [ENTER]\r\n \r\n \r\n Para retornar valor informe Valor \"-\" Descrição\r\n \r\n \r\n }>\r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n \r\n Para retornar 2 campos na Label informe campos Codigo\"+\"Descrição\r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n Mostrar Codigo na Label?\r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'selectPaginacao' || getFieldValue('rpj_tipoelemento') === 'selectAll') ? (\r\n \r\n Permitir Multi-seleção?\r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_tipoelemento') === 'dataPicker') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_tipoelemento !== currentValues.rpj_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n let elemento = getFieldValue('rpj_tipoelemento');\r\n //if (elemento === 'input') return ;\r\n if (elemento === 'textarea') return ;\r\n if (elemento === 'inputNumber') return ;\r\n if (elemento === 'checkbox') return ;\r\n if (elemento === 'switch') return ;\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n prevValues.rpj_obrigatorio !== currentValues.rpj_obrigatorio} >\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('rpj_obrigatorio') === true) ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n \r\n Obrigatorio\r\n \r\n \r\n \r\n \r\n \r\n {elementoEdicao.indice !== null &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenModalPersonalizacao(false)} elementosFormulario={elementosFormulario} setElementosFormulario={setElementosFormulario} />\r\n setOpenModalImportarElemento(false)} elementosFormulario={elementosFormulario} setElementosFormulario={setElementosFormulario} />\r\n \r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Card, Descriptions, Tooltip, Button, Row, Col, Tag, Popconfirm } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined } from '@ant-design/icons';\r\n\r\nimport { TiposElementosFormulario } from './pages';\r\nimport { render } from \"react-dom\";\r\n\r\nexport default function ItemFormulario({ elemento, fnEditar = () => { }, fnExcluir = () => { }, status }) {\r\n function RetornaDescricaoElementoFormulario(tipo) {\r\n let retorno = TiposElementosFormulario.filter(el => el.value === tipo);\r\n return (retorno.length > 0 ? retorno[0].label : \"\");\r\n }\r\n return (\r\n \r\n \r\n \r\n {elemento.cap_linha}\r\n \r\n \r\n {elemento.cap_coluna}\r\n \r\n \r\n {RetornaDescricaoElementoFormulario(elemento.cap_tipoelemento)}\r\n \r\n \r\n {elemento.cap_nomeelemento}\r\n \r\n \r\n \r\n {elemento.cap_obrigatorio ? \"SIM\" : \"NÃO\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n fnExcluir()} okText=\"Sim\" cancelText=\"Não\">\r\n \r\n \r\n \r\n Estrutura do Formulário\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (e.target.tagName.toLowerCase() === \"path\" || e.target.tagName.toLowerCase() === \"svg\" || e.target.tagName.toLowerCase() === \"button\")}>\r\n {!!elementosFormulario && elementosFormulario.map((elemento, indice) =>\r\n \r\n
\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {!!elementosFormulario && elementosFormulario.length === 0 && }\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Adicionar Elementos ao Formulário\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n return !!value.match(/[a-zA-Z0-9_.]/gm) ? value.match(/[a-zA-Z0-9_.]/gm).join('') : '';\r\n }}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'select') ? (\r\n \r\n \r\n Informe o texto da opção e pressione [ENTER]\r\n \r\n \r\n Para retornar valor informe Valor \"-\" Descrição\r\n \r\n \r\n }>\r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'selectPaginacao') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'selectPaginacao') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'selectPaginacao') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'selectPaginacao') ? (\r\n \r\n Mostrar Codigo na Label?\r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'selectPaginacao') ? (\r\n \r\n Permitir Multi-seleção?\r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_tipoelemento') === 'dataPicker') ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_tipoelemento !== currentValues.cap_tipoelemento}>\r\n {({ getFieldValue }) => {\r\n let elemento = getFieldValue('cap_tipoelemento');\r\n //if (elemento === 'input') return ;\r\n if (elemento === 'textarea') return ;\r\n if (elemento === 'inputNumber') return ;\r\n if (elemento === 'checkbox') return ;\r\n if (elemento === 'switch') return ;\r\n else return null;\r\n }}\r\n \r\n \r\n \r\n prevValues.cap_obrigatorio !== currentValues.cap_obrigatorio} >\r\n {({ getFieldValue }) => {\r\n return (getFieldValue('cap_obrigatorio') === true) ? (\r\n \r\n \r\n \r\n ) : null;\r\n }}\r\n \r\n \r\n \r\n \r\n Obrigatório\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {elementoEdicao.indice !== null &&\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n setOpenModalPersonalizacao(false)} elementosFormulario={elementosFormulario} setElementosFormulario={setElementosFormulario} />\r\n setOpenModalImportarElemento(false)} elementosFormulario={elementosFormulario} setElementosFormulario={setElementosFormulario} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Checkbox, DatePicker, Input, Select } from \"antd\";\r\nimport InputNumber from \"rc-input-number\";\r\n\r\nimport { InputPreco, SelectPaginacao, SelectAll } from \"../../components\";\r\n\r\nexport default function FormularioDinamico({ formulario, parametrosFiltros, retornarLinhas = true }) {\r\n const [elementosDinamicos, setElementosDinamicos] = useState([]);\r\n\r\n const retornaElementos = (elementos) => {\r\n var elementoConvert = JSON.stringify(elementos).replaceAll('cap_', 'rpj_');\r\n setElementosDinamicos(JSON.parse(elementoConvert));\r\n console.log({ elementoConvert });\r\n }\r\n\r\n useEffect(() => { if (!!parametrosFiltros) retornaElementos(parametrosFiltros); }, [parametrosFiltros]);\r\n useEffect(() => { if (!!elementosDinamicos && elementosDinamicos.length > 0) camposDinamicos(); }, [elementosDinamicos]);\r\n\r\n const camposDinamicos = () => {\r\n let linhas = []\r\n if (elementosDinamicos) {\r\n elementosDinamicos.forEach((reg, idx, array) => {\r\n if (linhas.filter((lin) => (lin.linha === reg.rpj_linha)).length > 0) {\r\n let dados = linhas.find((lin) => (lin.linha === reg.rpj_linha));\r\n dados.dados.push(reg);\r\n } else {\r\n linhas.push({ linha: reg.rpj_linha, dados: [reg] });\r\n }\r\n });\r\n }\r\n return linhas.map((linhasFiltro) => {\r\n if (retornarLinhas === true) {\r\n return (\r\n \r\n {componente(linhasFiltro.dados)}\r\n \r\n );\r\n\r\n } else {\r\n return (\r\n componente(linhasFiltro.dados)\r\n );\r\n }\r\n });\r\n }\r\n\r\n const componente = (linhasFiltro) => {\r\n return linhasFiltro.map((itemFiltro) => {\r\n\r\n switch (itemFiltro.rpj_tipoelemento) {\r\n case \"input\":\r\n return input(itemFiltro);\r\n case \"inputNumber\":\r\n return inputNumber(itemFiltro);\r\n case \"inputPreco\":\r\n return inputPreco(itemFiltro);\r\n case \"dataPicker\":\r\n return dataPicker(itemFiltro);\r\n case \"select\":\r\n return select(itemFiltro);\r\n case \"selectPaginacao\":\r\n return selectPaginacao(itemFiltro);\r\n case \"selectAll\":\r\n return selectAll(itemFiltro);\r\n case \"checkbox\":\r\n return checkbox(itemFiltro);\r\n default: return ''\r\n }\r\n });\r\n }\r\n\r\n const input = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const dataPicker = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const select = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n {JSON.parse(itemFiltro.rpj_options).options.map((select, idx, array) => (\r\n {select}\r\n ))}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const selectPaginacao = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const selectAll = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n const inputNumber = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const inputPreco = (itemFiltro) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const checkbox = (itemFiltro) => {\r\n return (\r\n \r\n \r\n {itemFiltro.rpj_label} \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n camposDinamicos()\r\n );\r\n\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Select, Card, notification, Tooltip, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { SelectProduto } from \"../../components\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"..\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport { ModalGradeProduto, ModalSenhaLiberacao } from \"../modals\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\n\r\n\r\nexport default function FiltroProduto({ form, dadosTabela, btnEditando, itemEditando }) {\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [abrirModalGrade, setAbrirModalGrade] = useState(false);\r\n const [produtos, setProdutos] = useState([]);\r\n const [dadosGrade, setDadosGrade] = useState([]);\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [consultaProduto, setConsultaProduto] = useState(null);\r\n const [{ manutencao, listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const codBarras = useRef();\r\n const togglePesquisa = () => {\r\n setConsultaProduto(!consultaProduto);\r\n };\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [liberacaoSenha, setLiberacaoSenha] = useState(null);\r\n\r\n useEffect(() => {\r\n setarFocoProduto();\r\n }, [consultaProduto]);\r\n\r\n function alterarValorTotal() {\r\n let total = 0;\r\n total = form.getFieldValue().quantidade * form.getFieldValue().valorUnitario;\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n };\r\n\r\n useEffect(() => {\r\n if (!!itemEditando) {\r\n let lista = [];\r\n if (!!itemEditando && itemEditando.pro_id) {\r\n if (!!itemEditando.prg_id) {\r\n lista.push({ name: \"pro_id\", campo: \"IdGrade\", value: itemEditando.prg_id });\r\n } else {\r\n lista.push({ name: \"pro_id\", campo: \"IdProduto\", value: itemEditando.pro_id });\r\n }\r\n }\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue(manutencao.dados);\r\n }\r\n }, [itemEditando]);\r\n\r\n // useEffect(() => {\r\n // if (!!manutencao.dados) {\r\n // if (!!manutencao.dados.dadosGrade) {\r\n // buscarDadosGradeModal();\r\n // }\r\n // form.setFieldsValue({ pro_id: manutencao.dados.pro_id });\r\n // }\r\n // }, [manutencao]);\r\n\r\n\r\n function onCloseModalGrade() {\r\n buscarDadosGradeModal();\r\n setAbrirModalGrade(false);\r\n };\r\n\r\n async function buscarProduto(pro_id) {\r\n let dadosSelect = [...listaSelectProd]\r\n let prod = dadosSelect.filter(pro => pro.key === pro_id)[0];\r\n setProdutos(prod);\r\n if (isObjetoDiffVazio(prod)) {\r\n if (!!prod.prg_id) {\r\n let grade = await api.get(`ProdutoGrade/ListarGradesProdutos?apenasAtivas=true&codigoProduto=${prod.pro_id}`);\r\n setAbrirModalGrade(true);\r\n setDadosGrade(grade.data);\r\n } else {\r\n popularProduto(prod);\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando])\r\n\r\n\r\n function editandoItem(dadosEditando) {\r\n form.setFieldsValue({ pro_id: dadosEditando.pro_id });\r\n form.setFieldsValue({ quantidade: dadosEditando.vci_quantidade });\r\n form.setFieldsValue({ valorUnitario: dadosEditando.vci_valorun });\r\n }\r\n\r\n async function buscarDadosGradeModal() {\r\n let dadosTemp = [...dadosTabela.dadosItens]\r\n let lista = [...listaSelectProd];\r\n let produtosSelec = [...dadosTabela.dadosItens];\r\n let produtoGrade = dadosGrade.filter((produto) => { return produto.quantidade > 0; });\r\n for (let item of produtoGrade) {\r\n let dado = {}\r\n dado.pro_id = produtos.pro_id;\r\n dado.prg_id = item.prg_id;\r\n dado.pro_codigo = produtos.pro_codigo;\r\n dado.pro_descricao = produtos.pro_descricao;\r\n dado.vci_quantidade = item.quantidade;\r\n dado.prg_ean = item.ean;\r\n dado.pro_ean = item.ean;\r\n dado.vci_valorun = item.valorVenda;\r\n dado.valorTotal = item.valorTotal;\r\n dado.vci_devolvido = 0;\r\n dado.vci_sequencia = produtosSelec.length + 1;\r\n let i = 0;\r\n dado.descricaograde = \"\";\r\n item.atributos.map((grade) => {\r\n dado.descricaograde += grade.mgp_descricao;\r\n i++;\r\n if (i < item.atributos.length) {\r\n dado.descricaograde += \",\"\r\n }\r\n });\r\n await carregarParametrosLocal(dado, dadosTemp, lista);\r\n produtosSelec.push(dado);\r\n }\r\n dadosTabela.setDadosItens(produtosSelec);\r\n\r\n setarFocoProduto();\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n };\r\n\r\n function popularProduto(pro, prg_id = null, editar = false) {\r\n setExibirDetalhes(true);\r\n if (!editar) {\r\n form.setFieldsValue({ quantidade: 1 });\r\n form.setFieldsValue({ valorUnitario: (pro.lpi_valorvenda == null ? 0 : pro.lpi_valorvenda) });\r\n } else {\r\n let dados = manutencao.dados;\r\n form.setFieldsValue({ quantidade: dados.vci_quantidade });\r\n form.setFieldsValue({ valorUnitario: dados.vci_valorun });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n\r\n if (consultaProduto) {\r\n adicionarItem();\r\n }\r\n }\r\n\r\n async function carregarParametrosLocal(dados, dadosTemp, lista) {\r\n const codigo = dados.pro_id\r\n const codigoGrade = dados.prg_id\r\n const quantidade = dados.vci_quantidade\r\n\r\n let resParams = await api.get(`ParametroLocal/BuscarParametros`);\r\n if (resParams.status == 200) {\r\n let paramsEstoque = resParams.data.par_avisoestoqueinsuficiente;\r\n\r\n let dado = lista.filter(dados => dados.key === form.getFieldValue().pro_id || dados.pro_id === form.getFieldValue().pro_id)[0];\r\n let dadosIncluido = dadosTemp\r\n .filter((prod) => (prod.pro_id === dado.pro_id && (!!!dado.prg_id || dado.prg_id === prod.prg_id)))\r\n .reduce((total, prod) => total + prod.vci_quantidade, 0);\r\n\r\n if (paramsEstoque === null) {\r\n return;\r\n }\r\n\r\n let resEstoque = await api.get(`Estoque/BuscarEstoqueProduto?codigoProduto=${codigo}` + (codigoGrade ? `&codigoGrade=${codigoGrade}` : ''))\r\n let estoque = resEstoque.data.valorTotal;\r\n\r\n let valorEstoque = calcularValorEstoque(estoque, dadosIncluido, quantidade);\r\n\r\n return new Promise((resolve, reject) => {\r\n if (valorEstoque <= 0) {\r\n estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n }\r\n }\r\n\r\n function calcularValorEstoque(estoque, dadosIncluido, quantidade) {\r\n if (dadosIncluido !== 0) {\r\n var novosDadosIncluido = dadosIncluido + quantidade\r\n }\r\n if (novosDadosIncluido > estoque) {\r\n return estoque - novosDadosIncluido;\r\n } else if (quantidade > estoque) {\r\n return estoque - quantidade;\r\n } else {\r\n return estoque\r\n }\r\n }\r\n\r\n function estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject) {\r\n if (paramsEstoque === 0) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar?`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n resolve();\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 1) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar? Será solicitado uma senha Gerencial!`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n setLiberacaoSenha({ resolve, reject });\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 2) {\r\n Modal.warning({\r\n title: 'Atenção Sistema de Controle de Estoque!',\r\n icon: ,\r\n content: `Produto com estoque ${valorEstoque}, sistema está configurado para bloquear vendas de produtos sem estoque!`,\r\n centered: true,\r\n onOk() {\r\n reject();\r\n }\r\n });\r\n }\r\n }\r\n\r\n const onCloseModalLiberacao = (aprovado) => {\r\n setAbreModalLiberacao(false);\r\n if (aprovado && liberacaoSenha) {\r\n liberacaoSenha.resolve();\r\n } else if (liberacaoSenha) {\r\n liberacaoSenha.reject();\r\n }\r\n setLiberacaoSenha(null);\r\n };\r\n\r\n async function adicionarItem() {\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n let dados = {};\r\n let lista = [...listaSelectProd];\r\n if (form.getFieldValue().quantidade === 0 || parseFloat(form.getFieldValue().valorUnitario) === 0 || !!!form.getFieldValue().valorUnitario) {\r\n notification.warning({ message: 'Aviso!', description: `${!!form.getFieldValue().quantidade ? 'A Quantidade ' : 'O Valor '} do item não pode ser ZERO!` });\r\n return false;\r\n }\r\n if (!consultaProduto && dadosTemp.find(campo => campo.pro_id === form.getFieldValue().pro_id\r\n && ((!!form.getFieldValue().prg_id && form.getFieldValue().prg_id === campo.prg_id) || !form.getFieldValue().prg_id))) {\r\n adicionarItemCondicional(true, dadosTemp);\r\n } else {\r\n dados = adicionarItemCondicional(false, dadosTemp);\r\n }\r\n if (!btnEditando.editando) {\r\n try {\r\n await carregarParametrosLocal(dados, dadosTemp, lista);\r\n } catch (error) {\r\n return;\r\n }\r\n }\r\n dadosTemp.push(dados);\r\n dadosTemp.sort((a, b) => b.vci_sequencia - a.vci_sequencia);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n setarFocoProduto();\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n };\r\n\r\n function setarFocoProduto() {\r\n if (consultaProduto && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n };\r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, nfi_cfop: null, icm_id: null, pro_codigo: null, prg_id: null });\r\n };\r\n\r\n function adicionarItemCondicional(editar = false, dadosTemp) {\r\n let dados = {};\r\n let formulario = form.getFieldValue();\r\n if (editar) {\r\n dados = dadosTemp[itemEditando.indice];\r\n dados.vci_valorun = parseFloat(!!formulario.valorUnitario ? formulario.valorUnitario : 0);\r\n dados.vci_quantidade = formulario.quantidade;\r\n } else {\r\n // let produto;\r\n // if (!!formulario.prg_id) {\r\n // produto = produtos.filter((produto) => (produto.prg_id === formulario.prg_id))[0];\r\n // } else {\r\n // produto = produtos.filter((produto) => (produto.key === formulario.pro_id))[0];\r\n // }\r\n dados.pro_id = produtos.pro_id;\r\n dados.pro_codigo = produtos.pro_codigo;\r\n dados.vci_devolvido = 0;\r\n dados.pro_descricao = produtos.pro_descricao;\r\n dados.vci_quantidade = formulario.quantidade;\r\n dados.vci_sequencia = dadosTemp.length + 1;\r\n dados.pro_ean = !!produtos.pro_ean ? produtos.pro_ean : produtos.prg_ean;\r\n dados.prg_id = produtos.prg_id;\r\n dados.descricaograde = produtos.descricaograde;\r\n dados.vci_valorun = parseFloat(!!formulario.valorUnitario ? formulario.valorUnitario : 0);\r\n dados.valorTotal = parseFloat((dados.vci_valorun * dados.vci_quantidade).toFixed(2));\r\n }\r\n return dados;\r\n };\r\n\r\n async function buscarProdutoCodBarra(campo) {\r\n let dados = await api.get(`Produto/ListaProdutoCodigo?filtro=${campo.target.value.trim()}`);\r\n if (!!dados.data && dados.data.length > 0) {\r\n let produto = dados.data[0];\r\n form.setFieldsValue({ pro_id: produto.pro_id });\r\n if (!!dados.data[0].prg_id) {\r\n form.setFieldsValue({ prg_id: produto.prg_id });\r\n }\r\n let filtroGrade = dados.data[0].prg_id == null ? `` : `&codigoGrade=${produto.prg_id}`;\r\n let preco = await api.get(`ListaPrecoItem/BuscarPrecoPadraoItem?codigoProduto=${produto.pro_id}${filtroGrade}`);\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n let item = {};\r\n item.pro_id = produto.pro_id;\r\n item.pro_codigo = produto.pro_codigo;\r\n item.vci_devolvido = 0;\r\n item.pro_descricao = produto.pro_descricao;\r\n item.vci_quantidade = 1;\r\n item.vci_sequencia = dadosTemp.length + 1;\r\n item.pro_ean = !!produto.pro_ean ? produto.pro_ean : produto.prg_ean;\r\n item.prg_id = produto.prg_id;\r\n item.descricaograde = produto.descricaograde;\r\n item.vci_valorun = parseFloat(!!preco.data ? preco.data : 0);\r\n item.valorTotal = parseFloat((item.vci_valorun * item.vci_quantidade).toFixed(2));\r\n dadosTemp.push(item);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n\r\n } else {\r\n Modal.error({\r\n title: \"Atenção!\",\r\n content: (\r\n
\r\n

Produto não localizado!

\r\n
\r\n ),\r\n onOk() {\r\n setarFocoProduto();\r\n }\r\n });\r\n }\r\n setarFocoProduto();\r\n limparCampos();\r\n };\r\n\r\n return (\r\n
\r\n \r\n {!!consultaProduto === false &&\r\n
\r\n \r\n { buscarProduto(dados) }} ordem={\"pro_descricao\"} setListaDados={setListaSelectProd} />\r\n {/* { buscarProduto(dados) }} placeholder=\"Selecione o Produto\" name=\"pro_id\" detalhes={true}/> */}\r\n\r\n \r\n \r\n }\r\n {!!consultaProduto &&\r\n \r\n \r\n {\r\n buscarProdutoCodBarra(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { onCloseModalGrade() }} dados={dadosGrade} acrescimoDesconto={false} />\r\n \r\n \r\n );\r\n\r\n}","\r\nimport { manutencaoActions } from '../actions';\r\nimport { getNavegacao, getTela, setNavegacao } from '../services/auth';\r\n\r\nexport const gravarTela = (caminho, manutencao) => {\r\n let tela = JSON.parse(getNavegacao());\r\n if (!!tela.geral && !!tela.geral[caminho]) {\r\n let constante = {}\r\n constante = JSON.parse(getTela());\r\n if (!!constante.formulario && constante.formulario === caminho) {\r\n if (!!manutencao && !!manutencao.dados) {\r\n if (!!manutencao.dados.nomeTabela) {\r\n constante[manutencao.dados.nomeTabela] = manutencao.dados;\r\n }\r\n tela.geral[caminho].dados = JSON.stringify(constante);\r\n } else {\r\n tela.geral[caminho].dados = null;\r\n }\r\n }\r\n } else {\r\n incluirNovo(tela, caminho)\r\n }\r\n setNavegacao(tela);\r\n};\r\n\r\nexport const acrescDados = (caminho, name, dados, dispatch) => {\r\n buscarTela(caminho);\r\n let tela = JSON.parse(getNavegacao());\r\n let constante = {};\r\n if (!!tela.geral[caminho] && !!tela.geral[caminho].dados) {\r\n constante = JSON.parse(tela.geral[caminho].dados);\r\n constante[name] = dados;\r\n } else {\r\n incluirNovo(tela, caminho);\r\n if (!!tela.geral[caminho] && !!tela.geral[caminho].dados) {\r\n constante = JSON.parse(tela.geral[caminho].dados);\r\n constante[name] = dados;\r\n }\r\n }\r\n if (!!tela.geral[caminho]) {\r\n tela.geral[caminho].dados = JSON.stringify(constante);\r\n setNavegacao(tela);\r\n }\r\n dados.nomeTabela = name;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n};\r\n\r\nfunction incluirNovo(tela, caminho) {\r\n let dadosTela = getTela();\r\n if (!!dadosTela) {\r\n if (!!tela.geral) {\r\n tela.geral[caminho] = { 'Aberto': true };\r\n if (JSON.parse(dadosTela).formulario === caminho) {\r\n tela.geral[caminho].dados = dadosTela;\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const buscarTela = (caminho) => {\r\n var tela = JSON.parse(getNavegacao());\r\n if (!!tela.geral[caminho]) {\r\n return tela.geral[caminho].dados;\r\n } else {\r\n gravarTela(caminho);\r\n if (getTela()) {\r\n buscarTela(caminho);\r\n }\r\n }\r\n};\r\n\r\nexport const limparTela = (caminho, todos = false) => {\r\n var tela = JSON.parse(getNavegacao());\r\n if (todos) {\r\n setNavegacao({ geral: {} });\r\n } else {\r\n if (!!tela.geral[caminho]) {\r\n delete tela.geral[caminho].dados;\r\n setNavegacao(tela);\r\n\r\n }\r\n }\r\n};","import React, { useState, useEffect } from \"react\";\r\nimport { Drawer } from \"antd\";\r\nimport moment from \"moment\";\r\n\r\nimport { gravarTela, limparTela } from \"../../services/navigation\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { MinusOutlined } from \"@ant-design/icons\";\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { getNavegacao } from \"../../services/auth\";\r\nimport { isDate } from \"../../services/funcoes\";\r\n\r\nexport default function DrawerNav({ title, width = '70%', visible, className, form, limparAoEditar = false, fecharDrawer, fecharDrawerExtra, footer, afterVisibleChange, closeIcon, closable = true, destroyOnClose = false, children, extra }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n function minimizarDrawer() {\r\n let url = window.document.location.href;\r\n let nomeForm = url.substring(url.lastIndexOf('/'), url.length);\r\n /*setTimeout(() => {\r\n gravarTela(nomeForm, manutencao);\r\n }, 500);*/\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: false, showDrawerExtra: false } });\r\n };\r\n\r\n useEffect(() => {\r\n let jsonGeral = JSON.parse(getNavegacao()).geral;\r\n let dadosCaminho = {};\r\n let url = window.document.location.href;\r\n let nomeForm = url.substring(url.lastIndexOf('/'), url.length);\r\n if (!!jsonGeral) {\r\n dadosCaminho = jsonGeral[nomeForm];\r\n }\r\n if (!visible) {\r\n if (!!dadosCaminho && !!dadosCaminho.dados && (JSON.parse(dadosCaminho.dados).editar || !!!manutencao.dados)) {\r\n limparTela(nomeForm);\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n if (ui.showDrawerExtra) {\r\n if (!!fecharDrawerExtra) {\r\n fecharDrawerExtra();\r\n }\r\n } else {\r\n if (!!fecharDrawer) {\r\n fecharDrawer();\r\n\r\n }\r\n }\r\n } else if (visible && !!dadosCaminho && !!dadosCaminho.dados && !!!manutencao.dados) {\r\n let dados = JSON.parse(dadosCaminho.dados);\r\n for (let key in dados) {\r\n if (isDate(dados[key])) {\r\n dados[key] = moment(dados[key]);\r\n }\r\n }\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n }\r\n }, [visible]);\r\n\r\n return (\r\n }\r\n closable={closable}\r\n className={className}\r\n extra={extra}\r\n >\r\n {children}\r\n \r\n );\r\n};","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Form, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from '@ant-design/icons';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nimport LancamentoTransferencia from '../../pages/lancamentoCaixa/lancamentoTransferencia';\r\nimport DrawerNav from '../drawerNav';\r\n\r\nexport default function DrawerLancamentoTransferencia({aoFechar = null}) {\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n const [formulario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n function fecharDrawer() {\r\n if (!!aoFechar) {\r\n aoFechar();\r\n }\r\n formulario.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerTransferencia: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n};","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Form, Modal } from \"antd\";\r\nimport { CloseOutlined, SaveOutlined, ExclamationCircleOutlined, MinusOutlined } from '@ant-design/icons';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from '../../actions';\r\n\r\nimport ManutencaoCaixa from '../../pages/lancamentoCaixa/manutencao';\r\nimport DrawerNav from '../drawerNav';\r\n\r\nexport default function DrawerManutencaoCaixa({aoFechar = null}) {\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n const [formulario] = Form.useForm();\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n function fecharDrawer() {\r\n if (!!aoFechar) {\r\n aoFechar();\r\n }\r\n formulario.resetFields();\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawerManutencaoCaixa: false } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n }\r\n footer={\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n};","import React, { useEffect } from 'react';\r\nimport { Row, Col, Drawer, Button, Divider } from \"antd\";\r\nimport { CloseOutlined } from '@ant-design/icons';\r\n\r\nimport LinkNav from \"../linkNav\";\r\nimport { getNavegacao } from '../../services/auth';\r\nimport { limparTela } from '../../services/navigation';\r\n\r\nexport default function DrawerPaginasAbertas({ exibirPagina, paginas, fecharPagina }) {\r\n\r\n const listaPag = [\r\n { patch: \"/\", label: \"Home\" },\r\n\r\n /*** Pessoas ***/\r\n { patch: \"/cliente\", label: \"Clientes\" },\r\n { patch: \"/fornecedor\", label: \"Fornecedores\" },\r\n { patch: \"/transportador\", label: \"Transportadores\" },\r\n { patch: \"/funcionario\", label: \"Funcionários\" },\r\n { patch: \"/vendedor\", label: \"Vendedores\" },\r\n\r\n /*** Tributações ***/\r\n { patch: \"/tributacaoIcms\", label: \"Tributação ICMS\" },\r\n { patch: \"/tributacaoPisCofins\", label: \"Tributação PIS/COFINS\" },\r\n { patch: \"/ncm\", label: \"NCM - Substituição Tributária\" },\r\n { patch: \"/aliquotaSimplesNacional\", label: \"Alíquota Simples Nacional\" },\r\n\r\n /*** Produto ***/\r\n { patch: \"/marca\", label: \"Marca\" },\r\n { patch: \"/grupoProduto\", label: \"Grupo de Produtos\" },\r\n { patch: \"/subGrupo\", label: \"Subgrupo de Produtos\" },\r\n { patch: \"/produto\", label: \"Cadastro de Produtos\" },\r\n { patch: \"/gradeProduto\", label: \"Modalidade Grade\" },\r\n { patch: \"/preco\", label: \"Preços\" },\r\n { patch: \"/etiqueta\", label: \"Gerar Etiquetas\" },\r\n { patch: \"/relacionamentoFornecedorProduto\", label: \"Relacionamento Produto x Fornecedor\" },\r\n { patch: \"/servico\", label: \"Cadastro de Serviço\" },\r\n { patch: \"/frete\", label: \"Cadastro de Frete\" },\r\n\r\n /*** Cadastro Gerais ***/\r\n { patch: \"/contaCorrente\", label: \"Conta Corrente\" },\r\n { patch: \"/contaGerencial\", label: \"Conta Gerencial\" },\r\n { patch: \"/operacaoFiscal\", label: \"Operações Fiscais\" },\r\n { patch: \"/operacaoDebitoCredito\", label: \"Operação Débito e Crédito\" },\r\n { patch: \"/formaPagamento\", label: \"Forma de Pagamento\" },\r\n { patch: \"/condicaoPagamento\", label: \"Condição de Pagamento\" },\r\n { patch: \"/serieFiscal\", label: \"Série Fiscal\" },\r\n { patch: \"/historico\", label: \"Históricos\" },\r\n { patch: \"/correlacaoCfop\", label: \"Correlação CFOP\" },\r\n\r\n /*** Nota Fiscal ***/\r\n { patch: \"/notaFiscal\", label: \"Emissão de Nota Fiscal\" },\r\n { patch: \"/monitoramentoNfe\", label: \"Monitoramento NF-e\" },\r\n { patch: \"/notaFiscalTransferencia\", label: \"Notas Fiscais de Transferência\" },\r\n { patch: \"/cartaCorrecaoNotaFiscal\", label: \"Carta de Correção\" },\r\n { patch: \"/inutilizacaoNfe\", label: \"Inutilizar Nº de NF-e/NFC-e\" },\r\n { patch: \"/ordemCompra\", label: \"Ordem de Compra\" },\r\n\r\n /*** Orçamento ***/\r\n { patch: \"/orcamento\", label: \"Orçamento\" },\r\n\r\n /*** Pedidos Cliente ***/\r\n { patch: \"/pedidos\", label: \"Pedidos\" },\r\n { patch: \"/statusPedido\", label: \"Status Pedido\" },\r\n\r\n /*** Ordem de Serviço ***/\r\n { patch: \"/ordemServico\", label: \"Ordem de Serviço\" },\r\n { patch: \"/tipoServico\", label: \"Tipo de Serviço\" },\r\n { patch: \"/tipoEquipamento\", label: \"Tipo de Equipamento\" },\r\n { patch: \"/tipoUrgencia\", label: \"Tipo de Urgencia OS\" },\r\n { patch: \"/modeloEquipamento\", label: \"Modelo do Equipamento\" },\r\n\r\n /*** Vendas ***/\r\n { patch: \"/condicional\", label: \"Condicional\" },\r\n { patch: \"/valePresente\", label: \"Vale Presente\" },\r\n { patch: \"/metas\", label: \"Metas de Vendas\" },\r\n { patch: \"/comissao\", label: \"Comissão\" },\r\n { patch: \"/consultaComissao\", label: \"Consulta Comissão\" },\r\n { patch: \"/antecipacao\", label: \"Antecipação Cliente/Fornecedor\" },\r\n\r\n /*** Financeiro ***/\r\n { patch: \"/contaReceber\", label: \"Contas a Receber\" },\r\n { patch: \"/recebimentoParcela\", label: \"Recebimento de Parcelas\" },\r\n { patch: \"/contaPagar\", label: \"Contas a Pagar\" },\r\n { patch: \"/pagamentoParcela\", label: \"Pagamento de Parcelas\" },\r\n { patch: \"/lancamentoCaixa\", label: \"Lançamentos de Caixa/Bancos\" },\r\n { patch: \"/fluxoCaixa\", label: \"Fluxo de Caixa\" },\r\n { patch: \"/conciliacaoCartoes\", label: \"Conciliação de Cartões\" },\r\n { patch: \"/cheque\", label: \"Controle de Cheques\" },\r\n\r\n /*** Boletos ***/\r\n { patch: \"/boleto\", label: \"Boleto\" },\r\n { patch: \"/remessa\", label: \"Gerar Remessa Bancária\" },\r\n { patch: \"/retornoBancario\", label: \"Processar Retorno Bancário\" },\r\n\r\n /*** Estoque ***/\r\n { patch: \"/armazemEstoque\", label: \"Armazém de Estoque\" },\r\n { patch: \"/estoque\", label: \"Consulta Estoque\" },\r\n { patch: \"/estoqueManutencao\", label: \"Manutenção de Estoque\" },\r\n { patch: \"/inventario\", label: \"Inventário\" },\r\n\r\n /*** Gerencial ***/\r\n { patch: \"/matrizFilial\", label: \"Matriz Filial\" },\r\n { patch: \"/configuracaoDFe\", label: \"Configuração de DF-e\" },\r\n { patch: \"/cidade\", label: \"Configurações Nfse\" },\r\n { patch: \"/gerenciarPdv\", label: \"Gerenciar PDVs\" },\r\n { patch: \"/limiteCreditoCliente\", label: \"Definição de Limite de Crédito\" },\r\n { patch: \"/contador\", label: \"Dados Contador\" },\r\n { patch: \"/plano\", label: \"Plano Contratado\" },\r\n { patch: \"/bandeiraCartaoEmpresa\", label: \"Cartão Crédito/Débito\" },\r\n { patch: \"/centroDistribuicao\", label: \"Centro de Distribuição\" },\r\n { patch: \"/acaoUsuario\", label: \"Ações Usuário\" },\r\n \r\n\r\n /*** Relatórios ***/\r\n { patch: \"/relatorios\", label: \"Relatórios\" },\r\n { patch: \"/analiseInadimplencia\", label: \"Análise de Inadimplência\" },\r\n\r\n /*** Personalização ***/\r\n { patch: \"/personalizacao\", label: \"Formulário\" },\r\n { patch: \"/camposPersonalizados\", label: \"Campos Personalizados\" },\r\n\r\n /*** Usuários e Grupos ***/\r\n { patch: \"/usuario\", label: \"Usuários\" },\r\n { patch: \"/grupoUsuario\", label: \"Grupo Usuários\" },\r\n\r\n /*** Arquivos Fiscais ***/\r\n { patch: \"/efdIcmsIpi\", label: \"EFDICMS/IPI\" },\r\n { patch: \"/efdPisCofins\", label: \"EFDPIS/COFINS\" },\r\n\r\n /*** Emissão de CT-e ***/\r\n { patch: \"/componentesFrete\", label: \"Cadastro Componentes Frete\" }\r\n ]\r\n\r\n const onClosePaginaAbertas = () => {\r\n fecharPagina()\r\n };\r\n\r\n useEffect(() => {\r\n let dados = JSON.parse(getNavegacao());\r\n let paginasAbertas = [];\r\n if (!!dados && !!dados.geral) {\r\n let dadosGeral = dados.geral;\r\n for (let key in dadosGeral) {\r\n paginasAbertas.push(key);\r\n }\r\n paginas.setPaginasAbertas(listaPag.filter(pag => paginasAbertas.includes(pag.patch)))\r\n }\r\n }, [getNavegacao()])\r\n\r\n function limparTelas() {\r\n limparTela('', true);\r\n paginas.setPaginasAbertas([]);\r\n onClosePaginaAbertas();\r\n };\r\n\r\n function excluirPagina(pagSelec) {\r\n let pagAbertas = [...paginas.paginasAbertas];\r\n pagAbertas = pagAbertas.filter((pag) => (pag.patch !== pagSelec.patch));\r\n paginas.setPaginasAbertas(pagAbertas);\r\n }\r\n\r\n function AtzBreadcrumb(item) {\r\n localStorage.setItem('@GestorWeb-Breadcrumb', '|' + listaPag.filter(pag => pag.patch === item.currentTarget.getAttribute('href').replace('#', ''))[0].label);\r\n };\r\n\r\n return (\r\n \r\n \r\n {\r\n paginas.paginasAbertas.map((pag) => (\r\n \r\n \r\n \r\n { AtzBreadcrumb(item); onClosePaginaAbertas(); }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))\r\n }\r\n {paginas.paginasAbertas.length > 0 &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n\r\n )\r\n};","import React, { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Table, Row, Col, Divider } from 'antd';\r\nimport { ArrowUpOutlined, ArrowDownOutlined, ExclamationCircleOutlined } from '@ant-design/icons';\r\n\r\nimport { acrescDados } from '../../services/navigation';\r\nimport { useStateValue } from '../../state';\r\n\r\nfunction Tabela({ colunas, dados = [], paginacao = true, expandir, footerTabela, parametrosSelecionarItens, selecionarItem = false, nomeId = 'itens' }) {\r\n\r\n const [pagina, setPagina] = useState(1);\r\n const [registrosPorPagina, setRegistrosPorPagina] = useState(20);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n const configPaginacao = paginacao ? {\r\n current: pagina,\r\n pageSize: registrosPorPagina,\r\n showSizeChanger: true,\r\n onChange: (pg) => setPagina(pg),\r\n onShowSizeChange: (atual, porPagina) => setRegistrosPorPagina(porPagina)\r\n } : null;\r\n\r\n const configSelecionarItem = selecionarItem ?\r\n setCondicaoSelecionarItem()\r\n : null;\r\n\r\n useEffect(() => {\r\n if (!!dados && dados.length > 0) {\r\n let url = window.document.location.href;\r\n acrescDados(url.substring(url.lastIndexOf('/'), url.length), nomeId, dados, dispatch);\r\n }\r\n }, [dados]);\r\n\r\n function setCondicaoSelecionarItem() {\r\n if (!!parametrosSelecionarItens && !!parametrosSelecionarItens.tipo) {\r\n if (parametrosSelecionarItens.tipo === \"change\") {\r\n return {\r\n onChange: (selectedRowKeys, selectedRows) => {\r\n parametrosSelecionarItens.funcao(selectedRowKeys, selectedRows);\r\n }\r\n }\r\n } else if (parametrosSelecionarItens.tipo === \"select\") {\r\n return {\r\n onSelect: (record, selected, selectedRows) => {\r\n parametrosSelecionarItens.funcao(record, selected, selectedRows);\r\n }\r\n }\r\n } else if (parametrosSelecionarItens.tipo === \"selectall\") {\r\n return {\r\n onSelectAll: (selected, selectedRows, changeRows) => {\r\n parametrosSelecionarItens.funcao(selected, selectedRows, changeRows);\r\n }\r\n }\r\n }\r\n }\r\n return \"\";\r\n\r\n };\r\n\r\n return (\r\n
{\r\n return expanded ? (\r\n onExpand(record, e)} />\r\n ) : (\r\n onExpand(record, e)} />\r\n );\r\n }}\r\n locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n )\r\n }}\r\n rowSelection={configSelecionarItem} scroll={{ x: 900 }} footer={footerTabela} columnWidth={15}\r\n />\r\n )\r\n}\r\n\r\nTabela.propTypes = {\r\n colunas: PropTypes.array.isRequired,\r\n paginacao: PropTypes.bool\r\n}\r\n\r\nexport default Tabela;","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Table, InputNumber, Select, notification, Tag, Modal, Descriptions, Input } from \"antd\";\r\nimport { CheckOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport Data from \"../data\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { getTela } from \"../../services/auth\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { manutencaoActions, selectPaginadoActions } from \"../../actions\";\r\nimport DrawerVendedores from \"../drawerVendedores\";\r\nimport { isObjetoDiffVazio, validarNumeros } from \"../../services/funcoes\";\r\nimport { ModalAntecipacaoClienteFornecedor, ModalBandeiraCartao, ModalContaCorrente, ModalParcelasPendentes, ModalSenhaLiberacao, ModalCheque } from \"../modals\";\r\nimport SelectPaginado from \"../selectPaginado\";\r\nimport FormaDePagamento from \"../enuns/formaDePagamento\";\r\n\r\nexport default function FormasPagamento({ form, dadosOperacao, listaFormaPagamento, setListaFormaPagamento, idTomador, totalComp }) {\r\n\r\n const [{ manutencao, parametrosEmpresa }, dispatch] = useStateValue();\r\n const [formaPagamento, setFormaPagamento] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [valorJaPago, setValorJaPago] = useState(false);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [multiplasFormasPagamento, setMultiplasFormasPagamento] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [abrirDrawerVendedores, setAbrirDrawerVendedores] = useState(false);\r\n const [formVendedores] = Form.useForm();\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [semCondicao, setSemCondicao] = useState(false);\r\n const [ehCheque, setEhCheque] = useState(false);\r\n const [ehValePresente, setEhValePresente] = useState(false);\r\n const [dadosTela] = useState(getTela());\r\n const [isNota, setIsNota] = useState(false);\r\n const [isCTe, setIsCTe] = useState(false);\r\n const [openModalCartao, setOpenModalCartao] = useState(false);\r\n const [dadosParcelas, setDadosParcelas] = useState([]);\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [abreModalParcPendentes, setAbreModalParcPendentes] = useState(false);\r\n const [parcelasPessoasAtraso, setParcelasPessoasAtraso] = useState([]);\r\n const [executarParcelas, setExecutarParcelas] = useState(false);\r\n const [formaPagamentoAntecipacao, setFormaPagamentoAntecipacao] = useState({});\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [exibirModalCheque, setExibirModalCheque] = useState(false);\r\n const [dadosCheque, setDadosCheque] = useState([]);\r\n const [abreModalContaCorrente, setAbreModalContaCorrente] = useState(false);\r\n const [contaCorrente, setContaCorrente] = useState({});\r\n const [tipoContaCorrente, setTipoContaCorrente] = useState(\"1\");\r\n const [abreModalAntecipacao, setAbreModalAntecipacao] = useState(false);\r\n const [dadosAntecipacao, setDadosAntecipacao] = useState([]);\r\n const [valorRestante, setValorRestante] = useState(0);\r\n const [desabilitaBtn, setDesabilitaBtn] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [semPagamento, setSemPagamento] = useState(false);\r\n\r\n const fecharModalOK = () => {\r\n setOpenModalCartao(false);\r\n };\r\n\r\n const fecharModalCartao = () => {\r\n let dados = [...listaFormaPagamento];\r\n let index = listaFormaPagamento.length - 1;\r\n removerFormaPagamento(dados[index]);\r\n setOpenModalCartao(false);\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n if (validarNumeros(valorTotal) === 0) {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (validarNumeros(valorTotal) !== 0) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [valorTotal]);\r\n\r\n useEffect(() => {\r\n debugger\r\n if (!!dadosTela) {\r\n let tela = JSON.parse(dadosTela).formulario.replaceAll('/', '');\r\n if (tela === `notaFiscal` || tela === `ordemServico`) {\r\n setIsNota(true);\r\n } else if (tela === `conhecimentoTransporte`) {\r\n setIsCTe(true);\r\n }\r\n }\r\n }, [dadosTela]);\r\n\r\n useEffect(() => {\r\n if (isNota || isCTe) {\r\n setMultiplasFormasPagamento(true);\r\n }\r\n }, [isNota, isCTe]);\r\n\r\n useEffect(() => {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n let dadosFpg = [...listaFormaPagamento]\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (!!form.getFieldValue().fpg_id) {\r\n listarCondicao(form.getFieldValue().fpg_id, true);\r\n }\r\n if (valor >= valorTotal && valor >= form.getFieldValue().valorTotal ? parseFloat(form.getFieldValue().valorTotal) : totalComp) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n setExecutarParcelas(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: listaFormaPagamento } } } });\r\n if (dadosFpg.some(dado => dado.parcelas && dado.parcelas.length > 0)) {\r\n dadosFpg.forEach(dado => {\r\n if (dado.parcelas && dado.parcelas.length > 0) {\r\n dado.parcelas.forEach(parcela => {\r\n parcela.pcl_numeroparcela = parcela.prc_numeroparcela;\r\n parcela.dataVencimento = parcela.prc_datavencimento;\r\n parcela.valorParcela = parcela.prc_valor;\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n if (!!listaFormaPagamento[listaFormaPagamento.length - 1] && !!!listaFormaPagamento[listaFormaPagamento.length - 1].ctc_id &&\r\n (listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpDepositoBancario\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpPixDinamico)) {\r\n setAbreModalContaCorrente(true);\r\n setTipoContaCorrente(\"2\")\r\n }\r\n if (!!listaFormaPagamento[listaFormaPagamento.length - 1] && !!!listaFormaPagamento[listaFormaPagamento.length - 1].ctc_id &&\r\n (listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpCheque\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpDinheiro)) {\r\n setTipoContaCorrente(\"1\");\r\n setAbreModalContaCorrente(true);\r\n }\r\n\r\n setEhValePresente(false);\r\n setValorJaPago(valor);\r\n }, [listaFormaPagamento]);\r\n\r\n useEffect(() => {\r\n if (form.getFieldValue().valorTotal ? parseFloat(form.getFieldValue().valorTotal) : totalComp > 0 && !editando) {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (valor >= valorTotal && valor >= form.getFieldValue().valorTotal ? parseFloat(form.getFieldValue().valorTotal) : totalComp) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }\r\n }\r\n\r\n }, [form.getFieldValue()]);\r\n\r\n useEffect(() => {\r\n if (parseFloat(valorRestante) > 0 && !!manutencao.dados && !!!manutencao.dados.antecipacao) {\r\n verificarAntecipacoes();\r\n }\r\n }, [valorRestante]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento && executarParcelas) {\r\n let dados = manutencao.dados.faturamento;\r\n let index = dados.length - 1;\r\n setExecutarParcelas(false);\r\n if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n validarJaPossuiCrediario(() => {\r\n popularParcelas();\r\n });\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n validarJaPossuiBoleto(() => {\r\n popularParcelas();\r\n });\r\n } else if ((((dados[index].fpg_tipopagamento === FormaDePagamento.fpCartaoCredito && dadosParcelas.length === 0)\r\n || dados[index].fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) && !!!manutencao.dados.credito) && !openModalCartao) {\r\n abrirModalCartao(dados[index]);\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n abrirModalCheque(dados[index]);\r\n }\r\n } else if (!!manutencao.dados && !!manutencao.dados.antecipacao) {\r\n retornaFormaPagamentoAntecipacao();\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (isCTe) {\r\n setValorTotal(totalComp);\r\n } else {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n }\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n if (multiplasFormasPagamento && (!!dadosFormaPagamento && dadosFormaPagamento.fpg_tipopagamento !== FormaDePagamento.fpValePresente)) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [multiplasFormasPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().fpg_id) {\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ formaPagamento: dadosFormaPagamento } } } });\r\n }\r\n }, [form.getFieldValue().fpg_id]);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(formaPagamentoAntecipacao)) {\r\n adicionarFormaPagamento(false, true);\r\n\r\n }\r\n }, [formaPagamentoAntecipacao]);\r\n\r\n useEffect(() => {\r\n\r\n if (semCondicao && !!form.getFieldValue().fpg_id) {\r\n adicionarFormaPagamento();\r\n }\r\n }, [semCondicao]);\r\n\r\n useEffect(() => {\r\n if (semPagamento) {\r\n\r\n }\r\n }, [semPagamento]);\r\n\r\n\r\n function onCloseModalLiberacao() {\r\n setAbreModalLiberacao(false);\r\n };\r\n\r\n function onCloseModalParcPendentes() {\r\n setAbreModalParcPendentes(false);\r\n };\r\n\r\n function onCloseModalParcPendentesOk() {\r\n setAbreModalParcPendentes(false);\r\n adicionarFormaPagamento(true);\r\n };\r\n\r\n function onCloseModalCheque() {\r\n setExibirModalCheque(false);\r\n };\r\n\r\n function carregarDados() {\r\n api.get('FormaPagamento/Listar?Ativo=true').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dados = res.data.items;\r\n if (!!dadosOperacao && isObjetoDiffVazio(dadosOperacao)) {\r\n if (dadosOperacao.tip_id === 5) {\r\n setFormaPagamento(dados);\r\n } else {\r\n setFormaPagamento(dados.filter((fpg) => (fpg.fpg_tipopagamento !== 90)));\r\n }\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function valorRestantePgto(dadosTemp) {\r\n let restante = 0;\r\n let valorPago = 0;\r\n if (!editando) {\r\n dadosTemp.forEach((dados) => {\r\n valorPago += parseFloat(dados.pfp_valor);\r\n });\r\n restante = parseFloat(valorTotal) - valorPago;\r\n form.setFieldsValue({ pfp_valor: restante.toFixed(2) });\r\n setValorRestante(parseFloat(restante.toFixed(2)));\r\n } else {\r\n setEditando(false);\r\n }\r\n };\r\n\r\n function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null });\r\n }\r\n api.get(`CondicaoPagamento/Listar?Ativo=true&CodigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function retornaFormaPagamentoAntecipacao() {\r\n api.get(`FormaPagamento/RetornaFormaPagamentoAntecipacao?Ativo=true&FormasPagtoQuitaAntecipacao=true`).then(\r\n res => {\r\n setFormaPagamentoAntecipacao(res.data.items[0]);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarJaPossuiCrediario(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n };\r\n\r\n function validarJaPossuiBoleto(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n async function adicionarFormaPagamento(liberadoCredito = false, antecipacao = false) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n let pagamentoCartao = false;\r\n if (parseFloat(form.getFieldValue().pfp_valor) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de Pagamento Inválido!' });\r\n return false;\r\n }\r\n if (ehValePresente && !!!form.getFieldValue().codigoValePresente) {\r\n notification.warning({ description: 'Favor informar um vale presente válido!', message: 'Aviso' });\r\n return;\r\n }\r\n if (isCTe) {\r\n setValorTotal(totalComp);\r\n } else {\r\n //Utilizado para atualizar a constante de valor total da nota de acordo com o formulario que é o valor exibido em tela.\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n }\r\n if (antecipacao) {\r\n if (!dadosTemp.find(formasPgto => formasPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoEmLoja && formasPgto.fpg_quitacaoantecipacao)) {\r\n dadosTemp.push({\r\n fpg_id: formaPagamentoAntecipacao.fpg_id,\r\n fpg_descricao: formaPagamentoAntecipacao.fpg_descricao,\r\n cpg_descricao: '',\r\n cpg_id: null,\r\n condicaoPagamento: {},\r\n formaPagamento: formaPagamentoAntecipacao,\r\n pfp_valor: manutencao.dados.antecipacao[0].valorAntecipacao,\r\n parcelas: [],\r\n antecipacoes: manutencao.dados.antecipacao,\r\n descontoPadrao: {},\r\n ctc_id: formaPagamentoAntecipacao.ctc_id,\r\n fpg_tipopagamento: FormaDePagamento.fpCreditoEmLoja,\r\n fpg_quitacaoantecipacao: formaPagamentoAntecipacao.fpg_quitacaoantecipacao,\r\n });\r\n setListaFormaPagamento(dadosTemp);\r\n setFormaPagamentoAntecipacao({});\r\n valorRestantePgto(dadosTemp);\r\n }\r\n } else {\r\n if (!!form.getFieldValue().fpg_id && (semCondicao || (condicaoPagamento.length === 0 || !!form.getFieldValue().cpg_id))) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n if (listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ))) {\r\n let dados = listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ));\r\n dados.pfp_valor = parseFloat(form.getFieldValue().pfp_valor);\r\n validarContaCorrente(dadosTemp, () => {\r\n if (!pagamentoCartao) {\r\n valorRestantePgto(dadosTemp);\r\n }\r\n });\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n form.setFieldsValue({ numeroCheques: null });\r\n } else {\r\n verificarRestricoesCredito(dadosFormaPagamento, liberadoCredito, () => {\r\n incluirNovaFormaPagamento(dadosTemp);\r\n });\r\n }\r\n }\r\n else if (form.getFieldValue().cpg_id === null) {\r\n notification.warning({ message: 'Aviso', description: 'Informe a condição de pagamento!' });\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condição de pagamento!' });\r\n }\r\n }\r\n };\r\n\r\n async function incluirNovaFormaPagamento(listaForma) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n\r\n if (semCondicao) {\r\n let valor = 0;\r\n if (!semPagamento) {\r\n valor = form.getFieldValue().pfp_valor;\r\n }\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: '',\r\n cpg_id: null,\r\n condicaoPagamento: {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n numeroCheques: null,\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento,\r\n fpg_tipointegracao: dadosFormaPagamento.fpg_tipointegracao,\r\n });\r\n\r\n validarContaCorrente(listaForma, () => {\r\n if (!semPagamento) {\r\n valorRestantePgto(listaForma);\r\n } else {\r\n setValorRestante(0);\r\n }\r\n });\r\n\r\n } else {\r\n if (parseFloat(valorTotal) < parseFloat(parseFloat(form.getFieldValue().pfp_valor) + parseFloat(valorJaPago)).toFixed(2)) {\r\n notification.warning({ message: 'Aviso', description: 'Valor de pagamento maior que o total do pedido!' });\r\n } else {\r\n let dadosCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!dadosCondicoesPagamento && dadosCondicoesPagamento.cpg_descricao ? dadosCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n condicaoPagamento: !!dadosCondicoesPagamento && JSON.stringify(dadosCondicoesPagamento) !== '{}' ? dadosCondicoesPagamento : {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: form.getFieldValue().pfp_valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n numeroCheques: form.getFieldValue().numeroCheques,\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento,\r\n fpg_tipointegracao: dadosFormaPagamento.fpg_tipointegracao,\r\n });\r\n validarContaCorrente(listaForma, () => {\r\n valorRestantePgto(listaForma);\r\n });\r\n }\r\n }\r\n\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n form.setFieldsValue({ numeroCheques: null });\r\n };\r\n\r\n function validarContaCorrente(dados, callback) {\r\n let ultimaForma = dados[dados.length - 1];\r\n if (!!!ultimaForma.ctc_id && (ultimaForma.fpg_tipopagamento === FormaDePagamento.fpCheque || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDinheiro\r\n || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDepositoBancario || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpPixDinamico\r\n || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria)) {\r\n setAbreModalContaCorrente(true);\r\n }\r\n setListaFormaPagamento(dados);\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function onCloseModalContaCorrente() {\r\n let ultimaForma = listaFormaPagamento[listaFormaPagamento.length - 1];\r\n ultimaForma.ctc_id = contaCorrente.ctc_id;\r\n ultimaForma.ctc_descricao = contaCorrente.ctc_descricao;\r\n setListaFormaPagamento(listaFormaPagamento);\r\n setAbreModalContaCorrente(false);\r\n };\r\n\r\n function verificarRestricoesCredito(dadosFormaPagamento, liberado, callback) {\r\n let parcelasAtraso = [];\r\n let limiteCreditoDisp = {};\r\n if (liberado) {\r\n callback();\r\n } else if (parseInt(dadosFormaPagamento.fpg_tipopagamento) === FormaDePagamento.fpCreditoLoja || parseInt(dadosFormaPagamento.fpg_tipopagamento) === FormaDePagamento.fpBoletoBancario) {\r\n api.get(`Parcela/ListarParcelasClientesEmAtrazo?IdPessoa=${form.getFieldValue().pes_id || idTomador}&PageSize=500`).then(\r\n parcelasPessoa => {\r\n let dados = [...parcelasPessoa.data.items];\r\n api.get(`Cliente/LimiteCreditoDisponivel/${form.getFieldValue().pes_id || idTomador}`).then(\r\n limiteCredito => {\r\n debugger;\r\n parcelasAtraso = parcelasPessoa.data.items;\r\n let diasPermitidoVencimento = parametrosEmpresa.par_diastolparcelavencida;\r\n limiteCreditoDisp = limiteCredito.data;\r\n dados.forEach((parcelas) => { parcelas.limiteCredito = limiteCreditoDisp.valorTotal });\r\n setParcelasPessoasAtraso(dados);\r\n\r\n let todasParcelasValidas = parcelasAtraso.every(parcela => parcela.diasAtraso <= diasPermitidoVencimento)\r\n //verificar quando cliente tem limite zerado\r\n // if (todasParcelasValidas === false && parametrosEmpresa.par_acaoparcelavencida != 3) {\r\n\r\n // debugger;\r\n // if (parametrosEmpresa.par_acaoparcelavencida === 1) {//ação avisar\r\n // notification.warning({ description: \"Cliente Inadimplente, Parcelas em atraso!\", message: \"Aviso!\" })\r\n // } else if (parametrosEmpresa.par_acaoparcelavencida === 2) {//ação avisar e pedir senha\r\n // setAbreModalParcPendentes(true);\r\n // } else {\r\n // callback();\r\n // }\r\n // } else if (parametrosEmpresa.par_acaoparcelavencida === 3) {\r\n\r\n // debugger;\r\n // notification.warning({ description: \"Cliente Inadimplente, Venda a prazo não permitida!\", message: \"Aviso!\" });\r\n // form.setFieldsValue({ fpg_id: null, cpg_id: null });\r\n // return; // interrompe a execução\r\n\r\n // } else if (parametrosEmpresa.par_acaoparcelavencida === 2 && todasParcelasValidas === true) {\r\n // if (!!!limiteCreditoDisp) {\r\n // notification.warning({ description: 'Não foi possível verificar o limite de crédito disponível para realizar a venda no crediário. É recomendável que você fale com seu supervisor/gerente antes de prosseguir com a venda!', message: 'Aviso' });\r\n // } else {\r\n // callback();\r\n // }\r\n // }\r\n\r\n ////////////////////////////////////\r\n \r\n //original a baixo\r\n //else if (parametrosEmpresa.par_acaoparcelavencida === null || parametrosEmpresa.par_acaoparcelavencida === 0) {\r\n\r\n debugger;\r\n if (!!!parcelasAtraso) {\r\n notification.warning({ description: 'Não foi possível verificar as parcelas em atraso deste cliente. É recomendável que você fale com seu supervisor/gerente antes de prosseguir com a venda!', message: 'Aviso' });\r\n } else if (parcelasAtraso.length > 0) {\r\n setAbreModalParcPendentes(true);\r\n } else if (!!!limiteCreditoDisp) {\r\n notification.warning({ description: 'Não foi possível verificar o limite de crédito disponível para realizar a venda no crediário. É recomendável que você fale com seu supervisor/gerente antes de prosseguir com a venda!', message: 'Aviso' });\r\n } else if (limiteCreditoDisp.valorTotal !== 0 && limiteCreditoDisp.valorTotal < parseFloat(valorJaPago)) {\r\n Modal.confirm({\r\n title: `Aviso`,\r\n icon: ,\r\n content: `O limite de crédito ainda disponível para compras à prazo deste cliente é: ${parseFloat(limiteCreditoDisp.valorTotal).toFixed(2).toString()}. ${} Para continuar com a venda à prazo você deve solicitar autorização da operação com seu supervisor/gerente.`,\r\n okText: 'Solicitar Autorização',\r\n cancelText: 'OK',\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n }\r\n });\r\n } else {\r\n callback();\r\n }\r\n //}\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n } else {\r\n callback();\r\n }\r\n };\r\n\r\n function abrirModalCartao(dados) {\r\n if (!!!dados.parcelas || dados.parcelas <= 0) {\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito) {\r\n popularParcelas(() => {\r\n if (dados.fpg_tipointegracao == null) {\r\n setOpenModalCartao(true);\r\n }\r\n });\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n popularParcelasDebito(() => {\r\n if (dados.fpg_tipointegracao == null) {\r\n setOpenModalCartao(true);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n function abrirModalCheque(dados) {\r\n setDadosCheque(dados);\r\n setExibirModalCheque(!exibirModalCheque);\r\n };\r\n\r\n function popularParcelas(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${manutencao.dados.faturamento[index].cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(manutencao.dados.faturamento[index].pfp_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados[index].parcelas = listaParcelas;\r\n manutencao.dados.faturamento[indexPosicao].editando = false;\r\n if (manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpBoletoBancario) {\r\n let creditoDebito = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento === FormaDePagamento.fpCartaoCredito;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: creditoDebito } } } });\r\n }\r\n setListaFormaPagamento(dados);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function popularParcelasDebito(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n let parc = {};\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_percparcela = 100;\r\n parc.pcl_numeroparcela = 1;\r\n parc.prc_numeroparcela = 1;\r\n let valorParcela = ((parc.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n listaParcelas.push(parc);\r\n dados[index].parcelas = listaParcelas;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: false } } } });\r\n setListaFormaPagamento(dados);\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function pagamentoCartao(dados, dadosCartao) {\r\n let dataAtual = new Date();\r\n let listaFormasPagamento = [...manutencao.dados.faturamento];\r\n let indexPosicao = listaFormasPagamento.length - 1;\r\n let recebimentoCartao = [];\r\n let retorno = {};\r\n if (dadosCartao.tipoParcelamento === 0) {//Estabelecimento\r\n let numeroDias = !!dados.credito ? dadosCartao.bandeira.bce_nrodiasrecebimentocredito : dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n listaFormasPagamento[indexPosicao].parcelas.forEach((parcela) => {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = parcela.pcl_numeroparcela;\r\n retorno.rcc_valor = parcela.prc_valor;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + numeroDias));\r\n recebimentoCartao.push(retorno);\r\n });\r\n } else {\r\n retorno.tipoParcelamento = dadosCartao.tipoParcelamento;\r\n retorno.bce_id = dadosCartao.bandeira.bce_id;\r\n retorno.rcc_parcelarecebimento = 1;\r\n retorno.rcc_valor = listaFormasPagamento[indexPosicao].valorPago;\r\n retorno.rcc_nsu = dadosCartao.nsu;\r\n retorno.rcc_previsaorecebimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(dadosCartao.bandeira.bce_nrodiasrecebimentocredito)));\r\n recebimentoCartao.push(retorno);\r\n }\r\n if (listaFormasPagamento[indexPosicao].fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n let formaPagamento = listaFormaPagamento[indexPosicao];\r\n formaPagamento.parcelas.forEach(parcela => {\r\n parcela.pcl_numerodias = dadosCartao.bandeira.bce_nrodiasrecebimentodebito;\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parseInt(parcela.pcl_numerodias)));\r\n parcela.dataPagamento = dataVencimento;\r\n parcela.prc_datavencimento = moment(dataVencimento);\r\n parcela.dataVencimento = moment(dataVencimento);\r\n });\r\n setListaFormaPagamento(listaFormaPagamento);\r\n }\r\n\r\n listaFormaPagamento[indexPosicao].recebimentoCartao = recebimentoCartao;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ recebimentoCartao: recebimentoCartao } } } });\r\n };\r\n\r\n function cancelarAlteracoesFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.editando = false;\r\n setEditandoParcelas(false);\r\n setEditando(false);\r\n };\r\n\r\n function salvarFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.parcelas.forEach((item, i) => {\r\n i++;\r\n item.prc_datavencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.dataVencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.valorParcela = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n item.prc_valor = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n });\r\n formaPgto.editando = false;\r\n setListaFormaPagamento(formasPgto);\r\n setEditandoParcelas(false);\r\n };\r\n\r\n function editarFormasPagamento(forma) {\r\n let dados = forma;\r\n setPagamentoTotal(false);\r\n setMultiplasFormasPagamento(true);\r\n setEditando(true);\r\n let lista = [];\r\n lista.push({ name: \"fpg_id\", campo: \"Filtro\", value: forma.fpg_id });\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n form.setFieldsValue({ fpg_id: forma.fpg_id });\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpDinheiro || dados.fpg_tipopagamento === FormaDePagamento.fpCheque || dados.fpg_tipopagamento === FormaDePagamento.fpValePresente ||\r\n dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n setSemCondicao(true);\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n setEhCheque(true);\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpValePresente) {\r\n setEhValePresente(true);\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n forma.editando = true;\r\n setEditandoParcelas(true);\r\n }\r\n } else {\r\n form.setFieldsValue({ cpg_id: forma.cpg_id });\r\n }\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n };\r\n\r\n function removerFormaPagamento(forma) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n if (forma.fpg_tipopagamento === FormaDePagamento.fpCreditoEmLoja) {\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento), antecipacao: null\r\n }\r\n }\r\n }\r\n });\r\n setDadosAntecipacao({});\r\n } else if (forma.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || forma.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito) {\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento), credito: null\r\n }\r\n }\r\n }\r\n });\r\n } else {\r\n setDadosParcelas([]);\r\n dispatch({\r\n type: manutencaoActions.CHANGE, data: {\r\n dados: {\r\n ...manutencao.dados, ...{\r\n faturamento: manutencao.dados.faturamento.filter((dadosFat) =>\r\n dadosFat.fpg_tipopagamento !== forma.fpg_tipopagamento),\r\n }\r\n }\r\n }\r\n });\r\n }\r\n dadosTemp = dadosTemp.filter((dados) => dados !== forma);\r\n valorRestantePgto(dadosTemp);\r\n setListaFormaPagamento(dadosTemp);\r\n };\r\n\r\n function fecharDrawerVendedores() {\r\n setAbrirDrawerVendedores(false);\r\n };\r\n\r\n async function validacaoFormasPagamento(registro) {\r\n let dados = (await api.get(`FormaPagamento/Get?id=${registro}`)).data;\r\n setSemCondicao(false);\r\n setEhCheque(false);\r\n setEhValePresente(false);\r\n setSemPagamento(false);\r\n switch (dados.fpg_tipopagamento) {\r\n case FormaDePagamento.fpDinheiro:\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpCheque:\r\n setEhCheque(true)\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpValePresente:\r\n setEhValePresente(true);\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpBoletoBancario:\r\n case FormaDePagamento.fpCreditoLoja:\r\n let cliente = !!manutencao.dados && manutencao.dados.destinatario ? manutencao.dados.destinatario : null;\r\n if (!!cliente && cliente.cli_vendasomenteavista) {\r\n form.setFieldsValue({ fpg_id: null });\r\n notification.warn({ description: 'Venda a prazo não autorizada!', message: 'Aviso' });\r\n }\r\n break;\r\n case FormaDePagamento.fpSemPagamento:\r\n setSemCondicao(true);\r\n setSemPagamento(true);\r\n break;\r\n }\r\n };\r\n\r\n function buscarValePresente(codVale) {\r\n setDesabilitaBtn(true);\r\n api.get(`AntecipacaoClienteFornecedor/BuscarValePresente?codigoVale=${codVale.currentTarget.value}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let saldoVale = res.data;\r\n let valorTotal = parseFloat(form.getFieldValue().valorTotal);\r\n setMultiplasFormasPagamento(true);\r\n if (saldoVale === 0) {\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setMultiplasFormasPagamento(false);\r\n notification.warning(\"Não existe saldo para o vale presente informado!\");\r\n } else {\r\n if (valorTotal > saldoVale) {\r\n form.setFieldsValue({ pfp_valor: saldoVale });\r\n } else {\r\n form.setFieldsValue({ pfp_valor: valorTotal });\r\n }\r\n }\r\n setDesabilitaBtn(false);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: \"Aviso\", description: \"Vale presente não encontrado!\" });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setDesabilitaBtn(false);\r\n }\r\n );\r\n };\r\n\r\n async function verificarAntecipacoes() {\r\n let retorno = await api.get(`AntecipacaoClienteFornecedor/ListaAntecipacaoCliente?pessoaId=${form.getFieldValue().pes_id}`);\r\n if (retorno.status === 200) {\r\n if (!!retorno.data && retorno.data.length > 0 && !!dadosAntecipacao && dadosAntecipacao.length === 0) {\r\n let seq = 0;\r\n retorno.data.forEach((ant) => {\r\n ant.key = seq;\r\n seq++;\r\n });\r\n\r\n setDadosAntecipacao(retorno.data);\r\n Modal.confirm({\r\n title: 'O Cliente possui créditos/antecipações',\r\n icon: ,\r\n content: `Este cliente possui créditos/antecipações, deseja utilizar elas para esta venda?`,\r\n okText: 'Utilizar Crédito/antecipação',\r\n cancelText: 'Não utilizar',\r\n onOk() {\r\n setAbreModalAntecipacao(true);\r\n }, onCancel() {\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n form.setFieldsValue({ numeroCheques: null });\r\n\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n function onCloseModalAntecipacao() {\r\n setDadosAntecipacao([]);\r\n setAbreModalAntecipacao(false);\r\n };\r\n\r\n function cancelaContaCorrente() {\r\n setAbreModalContaCorrente(false);\r\n let listaTemp = [...listaFormaPagamento];\r\n listaTemp.splice((listaFormaPagamento.length - 1), 1);\r\n valorRestantePgto(listaTemp);\r\n setListaFormaPagamento(listaTemp);\r\n }\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(form.getFieldValue().pfp_valor);\r\n let dados = form.getFieldValue();\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n };\r\n\r\n function ajustarDataParcelas(numeroParc, qtdTotParcelas) {\r\n let dataAtual = new Date(form.getFieldValue([`dataVencimento${numeroParc}`]).toDate());\r\n for (let i = numeroParc + 1; i <= qtdTotParcelas; i++) {\r\n let dataVenc = new Date(dataAtual.setDate(new Date(dataAtual).getDate() + 30));\r\n form.setFieldsValue({ [`dataVencimento${i}`]: moment(dataVenc) });\r\n }\r\n }\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { ajustarDataParcelas(pcl_numeroparcela, record.parcelas.length) }} /> : {moment(dataVencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { onChangeValorParc(pcl_numeroparcela, record.parcelas.length) }} /> : {FormatNumber(valorParcela, true)}}\r\n
\r\n ),\r\n }\r\n ]} dataSource={record.parcelas} pagination={false} />\r\n };\r\n\r\n const rowExpandable = record => { return (record.fpg_tipopagamento === FormaDePagamento.fpCartaoDebito || record.fpg_tipopagamento === FormaDePagamento.fpCartaoCredito || record.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || record.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) && !record.fpg_quitacaoantecipacao };\r\n\r\n return (\r\n
\r\n {!pagamentoTotal && \r\n
\r\n \r\n { validacaoFormasPagamento(registro); listarCondicao(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n \r\n {!semCondicao && \r\n \r\n \r\n \r\n }\r\n {ehCheque && \r\n \r\n \r\n \r\n }\r\n {ehValePresente && \r\n \r\n { buscarValePresente(codVale) }}\r\n />\r\n \r\n }\r\n \r\n {!pagamentoTotal && multiplasFormasPagamento &&\r\n //multiplasFormasPagamento &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n {!!manutencao.dados && !!manutencao.dados.antecipacao && \r\n \r\n \r\n \r\n Valor antecipação utilizada (R$): {FormatNumber(manutencao.dados.antecipacao[0].valorAntecipacao)}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n
\r\n {listaFormaPagamento.length > 0 &&
(\r\n
\r\n \r\n {!!cpg_descricao ? fpg_descricao + ' / ' + cpg_descricao : fpg_descricao}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ pfp_valor }) => (\r\n
\r\n {FormatNumber(pfp_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n {record.fpg_tipopagamento !== FormaDePagamento.fpCreditoEmLoja && !record.fpg_quitacaoantecipacao &&
\r\n {!editandoParcelas &&\r\n \r\n {!editandoParcelas &&\r\n \r\n \r\n \r\n Total dos Pagamentos (R$): \r\n \r\n \r\n \r\n {FormatNumber(totalPagamento, true)}\r\n \r\n \r\n \r\n \r\n )\r\n }} dataSource={listaFormaPagamento}\r\n />}\r\n \r\n \r\n \r\n \r\n \r\n \r\n { onCloseModalContaCorrente() }} fecharModalContaCorrente={() => { cancelaContaCorrente(); }} contaCorrente={{ contaCorrente, setContaCorrente }} listaContaCorrente={{ listaContaCorrente, setListaContaCorrente }} tipoConta={tipoContaCorrente} />\r\n \r\n \r\n \r\n \r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Table, Select, notification, Tag, Input } from \"antd\";\r\nimport { CheckOutlined, DeleteOutlined, EditOutlined, PlusOutlined, ExclamationCircleOutlined, CloseOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport Data from \"../data\";\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { getTela } from \"../../services/auth\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport DrawerVendedores from \"../drawerVendedores\";\r\nimport { isObjetoDiffVazio, validarNumeros } from \"../../services/funcoes\";\r\nimport { ModalContaCorrente, ModalSenhaLiberacao } from \"../modals\";\r\nimport SelectPaginado from \"../selectPaginado\";\r\nimport FormaDePagamento from \"../enuns/formaDePagamento\";\r\n\r\nexport default function FormasPagamentoRecebimento({ form, dadosOperacao }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaFormaPagamento, setListaFormaPagamento] = useState(!!manutencao.dados && !!manutencao.dados.faturamento && manutencao.dados.faturamento.length > 0 ? manutencao.dados.faturamento : [])\r\n const [formaPagamento, setFormaPagamento] = useState([]);\r\n const [condicaoPagamento, setCondicaoPagamento] = useState([]);\r\n const [valorJaPago, setValorJaPago] = useState(false);\r\n const [pagamentoTotal, setPagamentoTotal] = useState(false);\r\n const [multiplasFormasPagamento, setMultiplasFormasPagamento] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n const [abrirDrawerVendedores, setAbrirDrawerVendedores] = useState(false);\r\n const [formVendedores] = Form.useForm();\r\n const [valorTotal, setValorTotal] = useState(0);\r\n const [semCondicao, setSemCondicao] = useState(false);\r\n const [ehValePresente, setEhValePresente] = useState(false);\r\n const [dadosTela] = useState(getTela());\r\n const [isNota, setIsNota] = useState(false);\r\n const [dadosParcelas, setDadosParcelas] = useState([]);\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [executarParcelas, setExecutarParcelas] = useState(false);\r\n const [listaContaCorrente, setListaContaCorrente] = useState([]);\r\n const [abreModalContaCorrente, setAbreModalContaCorrente] = useState(false);\r\n const [contaCorrente, setContaCorrente] = useState({});\r\n const [valorRestante, setValorRestante] = useState(0);\r\n const [desabilitaBtn, setDesabilitaBtn] = useState(false);\r\n const [editandoParcelas, setEditandoParcelas] = useState(false);\r\n const [semPagamento, setSemPagamento] = useState(false);\r\n const [tipoContaCorrente, setTipoContaCorrente] = useState(\"1\");\r\n const rowExpandable = record => { return (record.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || record.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n if (validarNumeros(valorTotal) === 0) {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (validarNumeros(valorTotal) !== 0) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [valorTotal]);\r\n\r\n useEffect(() => {\r\n if (!!dadosTela) {\r\n let tela = JSON.parse(dadosTela).formulario.replaceAll('/', '');\r\n if (tela === `ordemCompra`) {\r\n setIsNota(true);\r\n }\r\n }\r\n }, [dadosTela]);\r\n\r\n useEffect(() => {\r\n if (isNota) {\r\n setMultiplasFormasPagamento(true);\r\n }\r\n }, [isNota]);\r\n\r\n useEffect(() => {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (!!form.getFieldValue().fpg_id) {\r\n listarCondicao(form.getFieldValue().fpg_id, true);\r\n }\r\n if (valor >= valorTotal && valor >= parseFloat(form.getFieldValue().valorTotal)) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n setExecutarParcelas(true);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ faturamento: listaFormaPagamento } } } });\r\n } else {\r\n setPagamentoTotal(false);\r\n }\r\n // if (!!listaFormaPagamento[listaFormaPagamento.length - 1] && !!listaFormaPagamento[listaFormaPagamento.length - 1].parcelas &&\r\n // !!listaFormaPagamento[listaFormaPagamento.length - 1].parcelas[0] && listaFormaPagamento[listaFormaPagamento.length - 1].parcelas[0].pcl_numerodias === 0) {\r\n // setAbreModalContaCorrente(true);\r\n // }\r\n if (!!listaFormaPagamento[listaFormaPagamento.length - 1] &&\r\n (listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpDinheiro\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpCheque\r\n || listaFormaPagamento[listaFormaPagamento.length - 1].fpg_tipopagamento === FormaDePagamento.fpPixDinamico)) {\r\n setAbreModalContaCorrente(true);\r\n }\r\n setEhValePresente(false);\r\n setValorJaPago(valor);\r\n }, [listaFormaPagamento]);\r\n\r\n useEffect(() => {\r\n if (parseFloat(form.getFieldValue().valorTotal) > 0 && !editando) {\r\n let valor = 0;\r\n if (listaFormaPagamento.length > 0) {\r\n listaFormaPagamento.forEach((lista) => {\r\n valor += parseFloat(lista.pfp_valor);\r\n });\r\n if (valor >= valorTotal && valor >= parseFloat(form.getFieldValue().valorTotal)) {\r\n setPagamentoTotal(true);\r\n } else {\r\n setPagamentoTotal(false);\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }\r\n }\r\n }, [form.getFieldValue()]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.faturamento && executarParcelas) {\r\n let dados = manutencao.dados.faturamento;\r\n let index = dados.length - 1;\r\n setExecutarParcelas(false);\r\n if (dados[index].fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n validarJaPossuiCrediario(() => {\r\n popularParcelas();\r\n });\r\n } else if (dados[index].fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n validarJaPossuiBoleto(() => {\r\n popularParcelas();\r\n });\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n if (multiplasFormasPagamento && (!!dadosFormaPagamento && dadosFormaPagamento.fpg_tipopagamento !== FormaDePagamento.fpValePresente)) {\r\n valorRestantePgto([...listaFormaPagamento]);\r\n }\r\n }, [multiplasFormasPagamento]);\r\n\r\n useEffect(() => {\r\n if (!!form.getFieldValue().fpg_id) {\r\n let dadosFormaPagamento = formaPagamento.filter((forma) => { return forma.fpg_id === form.getFieldValue().fpg_id; })[0];\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ formaPagamento: dadosFormaPagamento } } } });\r\n }\r\n }, [form.getFieldValue().fpg_id]);\r\n\r\n useEffect(() => {\r\n if (semCondicao && !!form.getFieldValue().fpg_id) {\r\n adicionarFormaPagamento();\r\n }\r\n }, [semCondicao]);\r\n\r\n useEffect(() => {\r\n if (semPagamento) {\r\n }\r\n }, [semPagamento]);\r\n\r\n function onCloseModalLiberacao() {\r\n setAbreModalLiberacao(false);\r\n };\r\n\r\n function carregarDados() {\r\n api.get('FormaPagamento/Listar?Ativo=true').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dados = res.data.items;\r\n if (!!dadosOperacao && isObjetoDiffVazio(dadosOperacao)) {\r\n if (dadosOperacao.tip_id === 5) {\r\n setFormaPagamento(dados);\r\n } else {\r\n setFormaPagamento(dados.filter((fpg) => (fpg.fpg_tipopagamento !== 90)));\r\n }\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function valorRestantePgto(dadosTemp) {\r\n let restante = 0;\r\n let valorPago = 0;\r\n if (!editando) {\r\n dadosTemp.forEach((dados) => {\r\n valorPago += parseFloat(dados.pfp_valor);\r\n });\r\n restante = parseFloat(valorTotal) - valorPago;\r\n form.setFieldsValue({ pfp_valor: restante.toFixed(2) });\r\n setValorRestante(parseFloat(restante.toFixed(2)));\r\n } else {\r\n setEditando(false);\r\n }\r\n };\r\n\r\n function listarCondicao(fpg_id, dadosIniciais = false) {\r\n if (!dadosIniciais) {\r\n form.setFieldsValue({ cpg_id: null });\r\n }\r\n api.get(`CondicaoPagamento/Listar?Ativo=true&CodigoFormaPagamento=${fpg_id}&PageSize=500`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setCondicaoPagamento(res.data.items);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function validarJaPossuiCrediario(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n };\r\n\r\n function validarJaPossuiBoleto(callback) {\r\n let dados = [...listaFormaPagamento];\r\n if (!dados.find((formaPgto => (formaPgto.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario && !!formaPgto.parcelas && formaPgto.parcelas.length > 0)))) {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n async function adicionarFormaPagamento(liberadoCredito = false) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n let pagamentoCartao = false;\r\n if (parseFloat(form.getFieldValue().pfp_valor) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de Pagamento Inválido!' });\r\n return false;\r\n }\r\n if (ehValePresente && !!!form.getFieldValue().codigoValePresente) {\r\n notification.warning({ description: 'Favor informar um vale presente válido!', message: 'Aviso' });\r\n return;\r\n }\r\n\r\n //Utilizado para atualizar a constante de valor total da nota de acordo com o formulario que é o valor exibido em tela.\r\n setValorTotal(validarNumeros(form.getFieldValue().valorTotal));\r\n if (!!form.getFieldValue().fpg_id && (semCondicao || (condicaoPagamento.length === 0 || !!form.getFieldValue().cpg_id))) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n if (listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ))) {\r\n let dados = listaFormaPagamento.find((formas) => (\r\n formas.fpg_id === form.getFieldValue().fpg_id && (!semCondicao ? formas.cpg_id === form.getFieldValue().cpg_id : true)\r\n ));\r\n //dados.pfp_valor = parseFloat(form.getFieldValue().pfp_valor);\r\n dados.pfp_valor = parseFloat(form.getFieldValue().valorTotal);\r\n validarContaCorrente(dadosTemp, () => {\r\n if (!pagamentoCartao) {\r\n valorRestantePgto(dadosTemp);\r\n }\r\n });\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n } else {\r\n incluirNovaFormaPagamento(dadosTemp);\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Informe a forma e a condicao de pagamento!' });\r\n }\r\n };\r\n\r\n async function incluirNovaFormaPagamento(listaForma) {\r\n let dadosFormaPagamento = (await api.get(`FormaPagamento/Get?id=${form.getFieldValue().fpg_id}`)).data;\r\n\r\n if (semCondicao) {\r\n let valor = 0;\r\n if (!semPagamento) {\r\n valor = form.getFieldValue().pfp_valor;\r\n }\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: '',\r\n cpg_id: null,\r\n condicaoPagamento: {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento\r\n });\r\n validarContaCorrente(listaForma, () => {\r\n if (!semPagamento) {\r\n valorRestantePgto(listaForma);\r\n } else {\r\n setValorRestante(0);\r\n }\r\n });\r\n\r\n\r\n } else {\r\n let dadosCondicoesPagamento = condicaoPagamento.filter((condicao) => { return condicao.cpg_id === form.getFieldValue().cpg_id; })[0];\r\n listaForma.push({\r\n fpg_id: form.getFieldValue().fpg_id,\r\n fpg_descricao: dadosFormaPagamento.fpg_descricao,\r\n cpg_descricao: !!dadosCondicoesPagamento && dadosCondicoesPagamento.cpg_descricao ? dadosCondicoesPagamento.cpg_descricao : '',\r\n cpg_id: !!form.getFieldValue().cpg_id ? form.getFieldValue().cpg_id : null,\r\n condicaoPagamento: !!dadosCondicoesPagamento && JSON.stringify(dadosCondicoesPagamento) !== '{}' ? dadosCondicoesPagamento : {},\r\n formaPagamento: !!dadosFormaPagamento && JSON.stringify(dadosFormaPagamento) !== '{}' ? dadosFormaPagamento : {},\r\n pfp_valor: form.getFieldValue().pfp_valor,\r\n nfp_codigovalepresente: form.getFieldValue().codigoValePresente,\r\n parcelas: [],\r\n descontoPadrao: {},\r\n ctc_id: dadosFormaPagamento.ctc_id,\r\n fpg_tipopagamento: dadosFormaPagamento.fpg_tipopagamento\r\n });\r\n validarContaCorrente(listaForma, () => {\r\n valorRestantePgto(listaForma);\r\n });\r\n }\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ fpg_tipopagamento: null });\r\n form.setFieldsValue({ ctc_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n };\r\n\r\n function validarContaCorrente(dados, callback) {\r\n let ultimaForma = dados[dados.length - 1];\r\n if (!!!ultimaForma.ctc_id)\r\n if (ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDinheiro || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpCheque) {\r\n setTipoContaCorrente(\"1\")\r\n setAbreModalContaCorrente(true);\r\n }\r\n if (ultimaForma.fpg_tipopagamento === FormaDePagamento.fpDepositoBancario || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpPixDinamico\r\n || ultimaForma.fpg_tipopagamento === FormaDePagamento.fpTransferenciaBancaria) {\r\n setTipoContaCorrente(\"2\")\r\n setAbreModalContaCorrente(true);\r\n }\r\n setListaFormaPagamento(dados);\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function onCloseModalContaCorrente() {\r\n let ultimaForma = listaFormaPagamento[listaFormaPagamento.length - 1];\r\n ultimaForma.ctc_id = contaCorrente.ctc_id;\r\n ultimaForma.ctc_descricao = contaCorrente.ctc_descricao;\r\n setListaFormaPagamento(listaFormaPagamento);\r\n setAbreModalContaCorrente(false);\r\n };\r\n\r\n function popularParcelas(callback) {\r\n let dados = [...listaFormaPagamento];\r\n let index = manutencao.dados.faturamento.length - 1;\r\n api.get(`CondicaoPagamento/ListarParcelamento?codigoCondicaoPagamento=${manutencao.dados.faturamento[index].cpg_id}`).then(\r\n res => {\r\n if (!!res.data && res.data.length > 0) {\r\n let resto = 0;\r\n let somaParcelas = 0;\r\n let listaParcelas = [];\r\n let indexPosicao = manutencao.dados.faturamento.length - 1;\r\n res.data.forEach((parcela) => {\r\n let dataAtual = new Date();\r\n let parc = {};\r\n let dataVencimento = new Date(dataAtual.setDate(dataAtual.getDate() + parcela.pcl_numerodias));\r\n parc.fpg_id = manutencao.dados.faturamento[indexPosicao].fpg_id;\r\n parc.fpg_descricao = manutencao.dados.faturamento[indexPosicao].fpg_descricao;\r\n parc.fpg_tipopagamento = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento;\r\n parc.cpg_id = manutencao.dados.faturamento[indexPosicao].cpg_id;\r\n parc.pcl_numerodias = parcela.pcl_numerodias;\r\n parc.pcl_percparcela = parcela.pcl_percparcela;\r\n parc.pcl_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.prc_numeroparcela = parcela.pcl_numeroparcela;\r\n parc.dataPagamento = dataVencimento;\r\n parc.prc_datavencimento = moment(dataVencimento);\r\n parc.dataVencimento = moment(dataVencimento);\r\n let valorParcela = ((parcela.pcl_percparcela / 100) * parseFloat(manutencao.dados.faturamento[index].pfp_valor)).toFixed(2);\r\n parc.valorParcela = parseFloat(valorParcela);\r\n parc.prc_valor = parseFloat(valorParcela);\r\n somaParcelas += parc.valorParcela;\r\n listaParcelas.push(parc);\r\n });\r\n somaParcelas = somaParcelas.toFixed(2);\r\n somaParcelas = parseFloat(somaParcelas);\r\n resto = parseFloat(manutencao.dados.faturamento[index].pfp_valor) - somaParcelas;\r\n if (resto != 0) {\r\n let numeroUltimaParcela = res.data.length - 1;\r\n let valParcela = listaParcelas[numeroUltimaParcela].valorParcela;\r\n let totalParcela = (valParcela + resto).toFixed(2);\r\n totalParcela = parseFloat(totalParcela);\r\n listaParcelas[numeroUltimaParcela].prc_valor = totalParcela;\r\n listaParcelas[numeroUltimaParcela].valorParcela = totalParcela;\r\n }\r\n dados[index].parcelas = listaParcelas;\r\n manutencao.dados.faturamento[indexPosicao].editando = false;\r\n if (manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpCreditoLoja && manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento !== FormaDePagamento.fpBoletoBancario) {\r\n let creditoDebito = manutencao.dados.faturamento[indexPosicao].fpg_tipopagamento === FormaDePagamento.fpCartaoCredito;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ... { credito: creditoDebito } } } });\r\n }\r\n setListaFormaPagamento(dados);\r\n }\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function cancelarAlteracoesFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.editando = false;\r\n setEditandoParcelas(false);\r\n };\r\n\r\n function salvarFormaPagamento(record) {\r\n let formasPgto = [...listaFormaPagamento];\r\n let formaPgto = formasPgto.find((forma) => (forma.fpg_id === record.fpg_id));\r\n formaPgto.parcelas.forEach((item, i) => {\r\n i++;\r\n item.prc_datavencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.dataVencimento = form.getFieldValue(`dataVencimento${i}`);\r\n item.valorParcela = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n item.prc_valor = parseFloat(form.getFieldValue(`valorParcela${i}`));\r\n });\r\n formaPgto.editando = false;\r\n setListaFormaPagamento(formasPgto);\r\n setEditandoParcelas(false);\r\n };\r\n\r\n function editarFormasPagamento(forma) {\r\n let dados = forma.formaPagamento;\r\n setPagamentoTotal(false);\r\n setMultiplasFormasPagamento(true);\r\n setEditando(true);\r\n form.setFieldsValue({ fpg_id: forma.fpg_id });\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpDinheiro || dados.fpg_tipopagamento === FormaDePagamento.fpValePresente || dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja) {\r\n setSemCondicao(true);\r\n // if (dados.fpg_tipopagamento === pagamentosCodigos.cheque) {\r\n // setEhCheque(true);\r\n // }\r\n if (dados.fpg_tipopagamento === FormaDePagamento.fpValePresente) {\r\n setEhValePresente(true);\r\n } else if (dados.fpg_tipopagamento === FormaDePagamento.fpCreditoLoja || dados.fpg_tipopagamento === FormaDePagamento.fpBoletoBancario) {\r\n forma.editando = true;\r\n setEditandoParcelas(true);\r\n }\r\n } else {\r\n form.setFieldsValue({ cpg_id: forma.cpg_id });\r\n }\r\n form.setFieldsValue({ pfp_valor: forma.pfp_valor });\r\n };\r\n\r\n function removerFormaPagamento(forma) {\r\n let dadosTemp = [...listaFormaPagamento];\r\n if (dadosParcelas.length > 0 && forma.fpg_tipopagamento === dadosParcelas[0].fpg_tipopagamento) {\r\n setDadosParcelas([]);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n dadosTemp = dadosTemp.filter((dados) => dados !== forma);\r\n valorRestantePgto(dadosTemp);\r\n setListaFormaPagamento(dadosTemp);\r\n };\r\n\r\n function fecharDrawerVendedores() {\r\n setAbrirDrawerVendedores(false);\r\n };\r\n\r\n async function validacaoFormasPagamento(registro) {\r\n let dados = (await api.get(`FormaPagamento/Get?id=${registro}`)).data;\r\n setSemCondicao(false);\r\n setEhValePresente(false);\r\n setSemPagamento(false);\r\n switch (dados.fpg_tipopagamento) {\r\n case FormaDePagamento.fpDinheiro:\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpPixDinamico:\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpValePresente:\r\n setEhValePresente(true);\r\n setSemCondicao(true);\r\n break;\r\n case FormaDePagamento.fpBoletoBancario:\r\n case FormaDePagamento.fpCreditoLoja:\r\n let cliente = !!manutencao.dados && manutencao.dados.destinatario ? manutencao.dados.destinatario : null;\r\n if (!!cliente && cliente.cli_vendasomenteavista) {\r\n form.setFieldsValue({ fpg_id: null });\r\n notification.warn({ description: 'Venda a prazo não autorizada!', message: 'Aviso' });\r\n }\r\n break;\r\n case FormaDePagamento.fpSemPagamento:\r\n setSemCondicao(true);\r\n setSemPagamento(true);\r\n break;\r\n }\r\n };\r\n\r\n function buscarValePresente(codVale) {\r\n setDesabilitaBtn(true);\r\n api.get(`AntecipacaoClienteFornecedor/BuscarValePresente?codigoVale=${codVale.currentTarget.value}`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let saldoVale = res.data;\r\n let valorTotal = parseFloat(form.getFieldValue().valorTotal);\r\n setMultiplasFormasPagamento(true);\r\n if (saldoVale === 0) {\r\n form.setFieldsValue({ fpg_id: null });\r\n form.setFieldsValue({ cpg_id: null });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setMultiplasFormasPagamento(false);\r\n notification.warning(\"Não existe saldo para o vale presente informado!\");\r\n } else {\r\n if (valorTotal > saldoVale) {\r\n form.setFieldsValue({ pfp_valor: saldoVale });\r\n } else {\r\n form.setFieldsValue({ pfp_valor: valorTotal });\r\n }\r\n }\r\n setDesabilitaBtn(false);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n notification.warning({ message: \"Aviso\", description: \"Vale presente não encontrado!\" });\r\n form.setFieldsValue({ codigoValePresente: null });\r\n setDesabilitaBtn(false);\r\n }\r\n );\r\n };\r\n\r\n function cancelaContaCorrente() {\r\n setAbreModalContaCorrente(false);\r\n let listaTemp = [...listaFormaPagamento];\r\n listaTemp.splice((listaFormaPagamento.length - 1), 1);\r\n valorRestantePgto(listaTemp);\r\n setListaFormaPagamento(listaTemp);\r\n }\r\n\r\n function onChangeValorParc(numeroParc, qtdTotParcelas) {\r\n let valorJaUtilizado = 0;\r\n let valorRestante = 0;\r\n let valorRestanteTot = 0;\r\n let valorParcelas = 0;\r\n let valorTotal = parseFloat(form.getFieldValue().valorTotal);\r\n let dados = form.getFieldValue();\r\n if (numeroParc === qtdTotParcelas) {\r\n return;\r\n }\r\n for (let i = 1; i <= numeroParc; i++) {\r\n valorJaUtilizado += parseFloat(dados[`valorParcela${i}`]);\r\n }\r\n valorRestante = valorTotal - valorJaUtilizado;\r\n valorParcelas = parseFloat((valorRestante / (qtdTotParcelas - numeroParc)).toFixed(2));\r\n for (let i = qtdTotParcelas; i > numeroParc; i--) {\r\n valorRestanteTot += valorParcelas;\r\n form.setFieldsValue({ [`valorParcela${i}`]: valorParcelas });\r\n }\r\n let valorSobra = valorTotal - (valorJaUtilizado + valorRestanteTot);\r\n form.setFieldsValue({ [`valorParcela${qtdTotParcelas}`]: parseFloat((valorParcelas + valorSobra).toFixed(2)) });\r\n };\r\n\r\n function ajustarDataParcelas(numeroParc, qtdTotParcelas) {\r\n let dataAtual = new Date(form.getFieldValue([`dataVencimento${numeroParc}`]).toDate());\r\n for (let i = numeroParc + 1; i <= qtdTotParcelas; i++) {\r\n let dataVenc = new Date(dataAtual.setDate(new Date(dataAtual).getDate() + 30));\r\n form.setFieldsValue({ [`dataVencimento${i}`]: moment(dataVenc) });\r\n }\r\n }\r\n\r\n const expandedRowRender = record => {\r\n return
(\r\n {pcl_numeroparcela}\r\n ),\r\n }, {\r\n title: 'Data Pagamento',\r\n render: ({ dataVencimento, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { ajustarDataParcelas(pcl_numeroparcela, record.parcelas.length) }} /> : {moment(dataVencimento).format('DD/MM/YYYY')}\r\n }\r\n
\r\n\r\n ),\r\n }, {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ valorParcela, pcl_numeroparcela }) => (\r\n
\r\n {editandoParcelas ? { onChangeValorParc(pcl_numeroparcela, record.parcelas.length) }} /> : {FormatNumber(valorParcela, true)}\r\n }\r\n
\r\n ),\r\n }\r\n ]} dataSource={record.parcelas} pagination={false} />\r\n };\r\n\r\n return (\r\n
\r\n {!pagamentoTotal && \r\n
\r\n \r\n { listarCondicao(registro); validacaoFormasPagamento(registro) }} conteudo={\r\n fp => ({fp.fpg_descricao})\r\n } />\r\n \r\n \r\n {!semCondicao && \r\n \r\n \r\n \r\n }\r\n {ehValePresente && \r\n \r\n { buscarValePresente(codVale) }}\r\n />\r\n \r\n }\r\n \r\n {!pagamentoTotal && multiplasFormasPagamento &&\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n }\r\n \r\n \r\n
\r\n {listaFormaPagamento.length > 0 &&
(\r\n
\r\n \r\n {!!cpg_descricao ? fpg_descricao + ' / ' + cpg_descricao : fpg_descricao}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor (R$)',\r\n align: 'right',\r\n render: ({ pfp_valor }) => (\r\n
\r\n {FormatNumber(pfp_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n {!editandoParcelas &&\r\n \r\n {!editandoParcelas &&\r\n \r\n \r\n \r\n Total dos Pagamentos (R$): \r\n \r\n \r\n \r\n {FormatNumber(totalPagamento, true)}\r\n \r\n \r\n \r\n \r\n )\r\n }} dataSource={listaFormaPagamento}\r\n />}\r\n \r\n \r\n \r\n { onCloseModalContaCorrente() }} fecharModalContaCorrente={() => { cancelaContaCorrente(); }} contaCorrente={{ contaCorrente, setContaCorrente }} listaContaCorrente={{ listaContaCorrente, setListaContaCorrente }} tipoConta={tipoContaCorrente} />\r\n \r\n \r\n \r\n );\r\n};","import React from \"react\";\r\nimport { Row, Col, Descriptions } from \"antd\";\r\nimport moment from 'moment';\r\n\r\nimport { FormatNumber } from \"../../ValueObjects/\";\r\n\r\nexport default function InfoNotaNFe({ dadosNota }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {dadosNota.ntf_chavenfe} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.pes_nome} \r\n \r\n \r\n {dadosNota.ntf_cnpjcpfdest} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dadosNota.ntf_numero} \r\n \r\n \r\n {dadosNota.ser_serie} \r\n \r\n \r\n {dadosNota.nfd_modelodocumento} \r\n \r\n \r\n {moment(dadosNota.ntf_dataemissao).format('DD/MM/YYYY HH:mm:ss')} \r\n \r\n \r\n {dadosNota.tip_descricao} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {FormatNumber(dadosNota.valor_total, true)} \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Descriptions } from \"antd\";\r\n\r\nexport default function InfoProdutoGrade() {\r\n return (\r\n \r\n \r\n \r\n \r\n pro_codigo - pro_descricao\r\n \r\n \r\n \r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Form, Tag, Button, Table, InputNumber, Switch } from \"antd\";\r\nimport { EditOutlined, } from \"@ant-design/icons\";\r\nimport CurrencyInput from 'react-currency-input';\r\n\r\nexport default function PageGrade({ grades, setGrades }) {\r\n\r\n const [form] = Form.useForm();\r\n\r\n const onAlterAllLList = (values) => {\r\n if (values) {\r\n const { lpi_perccomissao, lpi_valorvenda, lpi_naocalculacomissao } = values;\r\n let array = [...grades];\r\n array = array.map((x) => ({ ...x, lpi_perccomissao: parseFloat(lpi_perccomissao ? lpi_perccomissao : x.lpi_perccomissao), lpi_valorvenda: parseFloat(lpi_valorvenda ? lpi_valorvenda : x.lpi_valorvenda), lpi_naocalculacomissao: lpi_naocalculacomissao }));\r\n setGrades(array);\r\n form.resetFields();\r\n }\r\n }\r\n\r\n const updateValue = (ean, property, value) => {\r\n const array = [...grades];\r\n const index = array.findIndex(x => x.prg_ean == ean);\r\n if (index !== -1) {\r\n array[index][property] = value;\r\n setGrades(array);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n (\r\n \r\n {prg_ean}\r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ descricaoGrade }) => (\r\n
\r\n {descricaoGrade}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Percentual Desconto',\r\n align: 'right',\r\n width: '25%',\r\n render: ({ lpi_naocalculacomissao, prg_ean }) => (\r\n updateValue(prg_ean, 'lpi_naocalculacomissao', checked)} />\r\n )\r\n },\r\n {\r\n title: 'Comissão',\r\n align: 'right',\r\n width: '25%',\r\n render: ({ prg_ean, lpi_perccomissao }) => (\r\n updateValue(prg_ean, 'lpi_perccomissao', value)}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')} />\r\n )\r\n },\r\n {\r\n title: 'Valor Item',\r\n width: '25%',\r\n align: 'right',\r\n render: ({ prg_ean, lpi_valorvenda }) => ( \r\n updateValue(prg_ean, 'lpi_valorvenda', value)}\r\n inputType=\"text\"\r\n className=\"CurrencyInput\"\r\n decimalSeparator=\",\" thousandSeparator=\".\"\r\n />\r\n )\r\n },\r\n ]} scroll={{ x: 900 }}/>\r\n
\r\n \r\n );\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatFone, MaskFormat } from \"../../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function TabTodas({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } }), []);\r\n\r\n function excluirRegistro(cliente) {\r\n api.post(`cliente/excluir?codigoCliente=${cliente.cli_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(cliente);\r\n })\r\n };\r\n\r\n function inativarRegistro(cliente) {\r\n api.post(`cliente/InativarCliente?clienteId=${cliente.cli_id}`).then(\r\n (res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n }\r\n )\r\n };\r\n\r\n const modalExcluirRegistro = (cliente) => {\r\n console.log('cliente', cliente);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o cliente ${cliente.cli_codigo}-${cliente.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (cliente) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o cliente!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o cliente ${cliente.cli_codigo}-${cliente.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n \r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 130,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatFone, MaskFormat } from \"../../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function TabCliente({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } }), []);\r\n\r\n function excluirRegistro(cliente) {\r\n api.post(`cliente/excluir?codigoCliente=${cliente.cli_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(cliente);\r\n })\r\n };\r\n\r\n function inativarRegistro(cliente) {\r\n api.post(`cliente/InativarCliente?clienteId=${cliente.cli_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (cliente) => {\r\n console.log('cliente', cliente);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o cliente ${cliente.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (cliente) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o cliente!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o cliente ${cliente.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(cliente);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n \r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 130,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatFone, MaskFormat } from \"../../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function TabVendedor({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } }), []);\r\n\r\n function excluirRegistro(vendedor) {\r\n api.post(`vendedor/excluir?codigoVendedor=${vendedor.ven_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(vendedor);\r\n })\r\n };\r\n\r\n function inativarRegistro(vendedor) {\r\n api.post(`vendedor/InativarVendedor?vendedorId=${vendedor.ven_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (vendedor) => {\r\n console.log('vendedor', vendedor);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o vendedor ${vendedor.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(vendedor);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (vendedor) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o vendedor!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o vendedor ${vendedor.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(vendedor);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n \r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 130,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatFone, MaskFormat } from \"../../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function TabFornecedor({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } }), []);\r\n\r\n function excluirRegistro(fornecedor) {\r\n api.post(`fornecedor/excluir?codigoFornecedor=${fornecedor.for_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(fornecedor);\r\n })\r\n };\r\n\r\n function inativarRegistro(fornecedor) {\r\n api.post(`fornecedor/InativarFornecedor?fornecedorId=${fornecedor.for_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (fornecedor) => {\r\n console.log('fornecedor', fornecedor);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o fornecedor ${fornecedor.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(fornecedor);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (fornecedor) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o fornecedor!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o fornecedor ${fornecedor.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(fornecedor);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n \r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 130,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Modal, Table, Divider } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../../services/api';\r\nimport { useStateValue } from '../../../state';\r\nimport { FormatFone, MaskFormat } from \"../../../ValueObjects\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\n\r\nexport default function TabFuncionario({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } }), []);\r\n\r\n function excluirRegistro(funcionario) {\r\n api.post(`funcionario/excluir?codigoFuncionario=${funcionario.for_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarRegistro(funcionario);\r\n })\r\n };\r\n\r\n function inativarRegistro(funcionario) {\r\n api.post(`funcionario/InativarFunionario?funcionarioId=${funcionario.for_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n })\r\n };\r\n\r\n const modalExcluirRegistro = (funcionario) => {\r\n console.log('funcionario', funcionario);\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o funcionario ${funcionario.pes_nome} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(funcionario);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarRegistro = (funcionario) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o funcionario!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o funcionario ${funcionario.pes_nome} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarRegistro(funcionario);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n {!!pej_inscricaoestadual && \r\n IE: {pej_inscricaoestadual || 'Não Informado'}\r\n }\r\n {!!pef_rg && \r\n RG: {pef_rg || 'Não Informado'}\r\n }\r\n \r\n \r\n \r\n E-mail: {pem_email || 'Não Informado'}\r\n \r\n \r\n Endereço: {log_logradouro || 'Não Informado'}{(!!pee_numero) ? (', ' + pee_numero) : ''}{!!(bai_nome) ? (', ' + bai_nome) : ''} {!!(cep_cep) ? ('- ' + cep_cep) : ''} {!!(cid_descricao) ? ('- ' + cid_descricao) : ''} {!!(est_sigla) ? ('- ' + est_sigla) : ''}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'CPF/CNPJ',\r\n width: 130,\r\n render: ({ pef_cpf, pej_cnpj }) => (\r\n
\r\n {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Telefone',\r\n width: 120,\r\n render: ({ psc_numero }) => (\r\n
\r\n {FormatFone(psc_numero) || 'Não Informado'}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect } from \"react\";\r\nimport { Row, Col, Button, Modal, Table, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function Produto({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pro_descricao' } });\r\n }, [])\r\n\r\n function excluirRegistro(produto) {\r\n api.post(`produto/excluir?idProduto=${produto.pro_id}`).then((res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, (erro) => {\r\n console.error(erro);\r\n modalInativarProduto(produto);\r\n })\r\n };\r\n\r\n function inativarProduto(produto) {\r\n api.post(`produto/inativarProduto?idProduto=${produto.pro_id}`).then((res) => {\r\n if (res.status === 200)\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pro_descricao' } });\r\n });\r\n };\r\n\r\n const modalExcluirProduto = (produto) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir o produto ${produto.pro_descricao} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(produto);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarProduto = (produto) => {\r\n Modal.confirm({\r\n title: 'Não foi possível excluir o produto!',\r\n icon: ,\r\n content: `Deve conter referências com outros registros,\r\n Deseja inativar o produto ${produto.pro_descricao} ?`,\r\n okText: 'Inativar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n inativarProduto(produto);\r\n }\r\n });\r\n };\r\n\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n {pro_descricao}\r\n \r\n \r\n \r\n {gru_nome !== null &&\r\n \r\n Grupo: {gru_nome || 'Não Informado'}\r\n \r\n }\r\n {sgp_nome !== null &&\r\n \r\n Subgrupo: {sgp_nome || 'Não Informado'}\r\n \r\n }\r\n \r\n CST Origem: {orm_id} - {orm_descricao}\r\n \r\n \r\n NCM: {ncm_codigo}\r\n \r\n \r\n FCI: {pro_fci || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Unidade de Medida: {ump_descricao}\r\n \r\n \r\n Tipo de Produto para SPED: {tpi_descricao}\r\n \r\n {pis_descricao !== null &&\r\n \r\n Tributação Pis/Cofins: {pis_descricao}\r\n \r\n }\r\n {nat_descricao !== null &&\r\n \r\n Natureza da Receita Pis/Cofins: {nat_descricao}\r\n \r\n }\r\n {mar_nome !== null &&\r\n \r\n Marca: {mar_nome}\r\n \r\n }\r\n \r\n {pro_observacao !== null &&\r\n \r\n \r\n Observações: {{ pro_observacao }}\r\n \r\n \r\n }\r\n \r\n ),\r\n }/*,\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (produto) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Popover, Modal, Menu, Dropdown, notification, Table, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, PrinterOutlined, FileTextOutlined, UndoOutlined, MoreOutlined, EyeOutlined, CloudUploadOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport moment from 'moment';\r\nimport api from '../../services/api';\r\nimport { useStateValue } from '../../state';\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { novaAbaNavegador } from \"../../services/funcoes\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { ModalImprimirEtiquetas, ModalDevolucao, ModalAjudaRejeicaoNfe, ModalCancelamentoNfe, ModalCartaCorrecaoNotaFiscal, ModalEstornoNfe } from \"../../components/modals/\";\r\n\r\nexport default function NotaFiscal({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaStatusNota, setListaStatusNota] = useState([]);\r\n const [openModalCartaCorrecao, setOpenModalCartaCorrecao] = useState(false);\r\n const [openModalExcluir, setOpenModalExcluir] = useState(false);\r\n const [openModalDevolucao, setOpenModalDevolucao] = useState(false);\r\n const [openModalAjudaRejeicaoNfe, setOpenModalAjudaRejeicaoNfe] = useState(false);\r\n const [openModalCancelarEstornar, setOpenModalCancelarEstornar] = useState(false);\r\n const [openModalImprimirEtiquetas, setOpenModalImprimirEtiquetas] = useState(false);\r\n const [dadosNota, setDadosNota] = useState({});\r\n const [openModalEstorno, setOpenModalEstorno] = useState(false);\r\n\r\n function retornaDescricaoStatus(ntf_status) {\r\n let status = listaStatusNota.filter((statusNota) => (statusNota.key === ntf_status))[0];\r\n return !!status ? status.value : \"\";\r\n };\r\n\r\n useEffect(() => {\r\n retornaStatusNF();\r\n }, []);\r\n\r\n function retornaStatusNF() {\r\n api.get('Enum/Listar?nome=StatusNFe').then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setListaStatusNota(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function abrirCartaCorrecao(record) {\r\n setDadosNota(record);\r\n setOpenModalCartaCorrecao(true);\r\n\r\n };\r\n\r\n function abrirCancelarNota(record) {\r\n\r\n api.get(`NotaFiscal/VerificarTempoEmissao?codigoNotaFiscal=${record.ntf_id}`).then(\r\n res => {\r\n if (record.ntf_docfiscal) {\r\n if (!!res.data.terminouPrazoCancelamento) {\r\n record.horas = res.data.horas;\r\n record.dias = res.data.dias;\r\n setDadosNota(record);\r\n setOpenModalEstorno(true);\r\n } else {\r\n setDadosNota(record);\r\n setOpenModalCancelarEstornar(true);\r\n }\r\n } else {\r\n setDadosNota(record);\r\n setOpenModalCancelarEstornar(true);\r\n }\r\n }\r\n )\r\n };\r\n\r\n function abrirExcluirNota(record) {\r\n setDadosNota(record);\r\n setOpenModalExcluir(true);\r\n };\r\n\r\n function recarregarLista() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n }\r\n\r\n function imprimirDanfe(dados) {\r\n if (dados.ntf_status == 1 && !!dados.ntf_chavenfe && !!dados.ntf_docfiscal) {\r\n if (dados.mdf_id == \"55\") {\r\n novaAbaNavegador(`Danfe/GerarDanfe?chaveNFe=${dados.ntf_chavenfe}`)\r\n } else if (dados.mdf_id == \"65\") {\r\n notification.warning({ description: `Para reimprimir um cupom eletrônico acesso o módulo de PDV, va até a listagem de vendas e solicite a reimpressão do mesmo`, message: `\"Não é possível gerar um DANFe a partir de uma NFC-e (Cupom Fiscal Eletrônico)` })\r\n } else if (dados.ntf_status == 1 && !!dados.ntf_chavenfe && !(!!dados.ntf_docfiscal)) {\r\n //n implementado\r\n /*\r\n RelatorioService.exibirRelatorioPDF(idRelatorioNf69, [\r\n {\r\n 'nome': 'ntf_numero',\r\n 'valor': notaFiscal.ntf_numero\r\n },\r\n {\r\n 'nome': 'ntf_dataemissao',\r\n 'valor': new Date(notaFiscal.ntf_dataemissao)\r\n }\r\n ], [\r\n {\r\n 'nome': 'dataemissaoFinal',\r\n 'valor': new Date(notaFiscal.ntf_dataemissao)\r\n }\r\n ]);\r\n */\r\n }\r\n }\r\n };\r\n\r\n function abrirExcluirNota(record) {\r\n setDadosNota(record);\r\n setOpenModalExcluir(true);\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n {((record.ntf_status == 0 || record.ntf_status == 4) && record.ntf_finalidade != 4 && record.ntf_nroinutilizadosefaz == false) && \r\n \r\n }\r\n {record.ntf_status == 0 && \r\n \r\n }\r\n {(record.ntf_status == 1 && (record.ser_emitentedocumento == 0 || !!!record.ntf_docfiscal)) && \r\n \r\n }\r\n {record.ntf_status == 1 && record.ntf_modelo == '55' && record.ntf_tiponota == 1 && \r\n \r\n }\r\n {(record.ntf_status == 1 && (record.ser_emitentedocumento == 0 || record.ser_serie != null)) && \r\n \r\n }\r\n {(record.ntf_status == 1 && record.ntf_finalidade != 4 && record.ntf_modelo == '55' && record.dfr_id == null) && \r\n \r\n }\r\n \r\n )\r\n };\r\n\r\n function excluirNota(record) {\r\n api.post(`NotaFiscal/Excluir?notaFiscalId=${record.ntf_id}`).then(\r\n res => {\r\n notification.success({ message: 'Nota Fiscal Excluida Com Sucesso!' });\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n }\r\n )\r\n };\r\n\r\n function menuTableOutros(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function removerNotaDigitacao(record) {\r\n Modal.confirm({\r\n title: 'Aviso',\r\n icon: ,\r\n content: `Excluir a Nota Fiscal ${record.ntf_numero}?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n onOk() {\r\n excluirNota(record);\r\n },\r\n onCancel() {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '-ntf_numero' } });\r\n },\r\n })\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n \r\n {retornaDescricaoStatus(ntf_status)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {ntf_numero}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n render: ({ tip_descricao, ntf_nomedest, ntf_serie, ntf_docfiscal, ntf_dataemissao, mdf_id, ntf_finalidade, vendedor, ntf_chavenfe, ntf_cstat, ntf_xmotivo, formasPgto }) => (\r\n
\r\n \r\n {!!tip_descricao &&
\r\n \r\n {tip_descricao}\r\n \r\n }\r\n \r\n {ntf_nomedest}\r\n \r\n {!!ntf_nomedest === false && \r\n Consumidor Final\r\n }\r\n \r\n \r\n \r\n Série: {(!!ntf_serie > 0 ? ntf_serie : '')}\r\n \r\n \r\n {!ntf_docfiscal && DAV-LS}\r\n {!mdf_id == '65' && CUPOM ELETRÔNICO}\r\n \r\n {!!ntf_chavenfe === false && \r\n NF-e não gerada\r\n }\r\n {!!ntf_chavenfe && \r\n \r\n NF-e: {ntf_chavenfe}\r\n \r\n }\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Emissão',\r\n width: 85,\r\n render: ({ ntf_dataemissao }) => (\r\n
\r\n {moment(ntf_dataemissao).format('DD/MM/YYYY')}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Finalidade',\r\n width: 75,\r\n render: ({ ntf_finalidade }) => (\r\n
\r\n {ntf_finalidade}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n fixed: 'right',\r\n width: 200,\r\n render: ({ valor_total }) => (\r\n
\r\n {FormatNumber(valor_total, true)}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n fixed: 'right',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n {/* { setOpenModalImprimirEtiquetas(false); recarregarLista(); }} />\r\n { setOpenModalAjudaRejeicaoNfe(false); recarregarLista(); }} />\r\n { setOpenModalCartaCorrecao(false); recarregarLista() }} />\r\n\r\n { setOpenModalDevolucao(false); recarregarLista(); }} />\r\n { setOpenModalEstorno(false); recarregarLista(); }} />\r\n { setOpenModalExcluir(false); recarregarLista(); }} />\r\n { setOpenModalCancelarEstornar(false); recarregarLista() }} />\r\n */}\r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Form, Button, Tag, Dropdown, Menu, notification, Table, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CloseOutlined, PrinterOutlined, MoreOutlined, EyeOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport DrawerPedidos from '../../pages/pedidos/drawer';\r\nimport { ModalDetalhePedido } from \"../../components/modals/\";\r\nimport { getIdUsuario, setIdUsuario } from \"../../services/auth\";\r\nimport { FormatNumber, MaskFormat, FormatDate } from \"../../ValueObjects\";\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\n\r\nexport default function PesquisaPedidos({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [clientes, setClientes] = useState([]);\r\n const [openModalDetalhePedido, setOpenModalDetalhePedido] = useState(false);\r\n const [dataPesquisa, setDataPesquisa] = useState(new Date().toLocaleDateString());\r\n const [formPedidos] = Form.useForm();\r\n const [idPedido, setIdPedido] = useState(0);\r\n\r\n useEffect(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } })\r\n dispatch({\r\n type: listagemActions.CHANGE, data: {\r\n outrosFiltros:\r\n `&ativoPedido=1&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${FormatDate(dataPesquisa)}&filtro=&status=60,61,62`\r\n }\r\n })\r\n formPedidos.setFieldsValue({ status: [\"60\", \"61\", \"62\"] });\r\n formPedidos.setFieldsValue({ ativoPedido: [\"1\"] });\r\n carregarClientes()\r\n }, []);\r\n\r\n useEffect(() => {\r\n let filtro = '';\r\n filtro += (!!formPedidos.getFieldValue().status ? `&status=${formPedidos.getFieldValue().status}` : '');\r\n filtro += (!!formPedidos.getFieldValue().ativoPedido ? `&ativoPedido=${formPedidos.getFieldValue().ativoPedido}` : '');\r\n\r\n dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: `&dataFinal=${moment(new Date).format('YYYY-MM-DD')}&dataInicial=${FormatDate(dataPesquisa)}&filtro=&status=${formPedidos.getFieldValue().status}` + filtro } })\r\n }, [dataPesquisa]);\r\n\r\n function carregarClientes() {\r\n api.get(`Cliente/Listar?filtro=`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setClientes(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function editarPedido(record) {\r\n record.ped_datainclusao = moment(record.ped_datainclusao);\r\n record.ped_dataprevisaoentrega = moment(record.ped_dataprevisaoentrega);\r\n record.ped_datavalidade = moment(record.ped_datavalidade);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function cancelarPedido(record) {\r\n record.usu_id = parseInt(getIdUsuario());\r\n record.ped_ativo = false;\r\n api.post(`Pedido/CancelarPedido?`, record).then(\r\n res => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Pedido cancelado com sucesso!\" });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+ped_datainclusao' } });\r\n }\r\n );\r\n };\r\n\r\n function emitirNf(record) {\r\n };\r\n\r\n function visualizarPedido(record) {\r\n setIdPedido(record.ped_id);\r\n setOpenModalDetalhePedido(true)\r\n };\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n {record.ped_ativo !== false && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n function duplicarPedido(dados) {\r\n dados.ped_datainclusao = moment(dados.ped_datainclusao);\r\n dados.ped_dataprevisaoentrega = moment(dados.ped_dataprevisaoentrega);\r\n dados.ped_datavalidade = moment(dados.ped_datavalidade);\r\n dados.ped_id_duplicar = dados.ped_id;\r\n dados.ped_id = null;\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: dados } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {stp_descricao}\r\n \r\n \r\n \r\n {ped_numero}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Pedidos\",\r\n render: ({ pes_nome, pef_cpf, pej_cnpj, pes_telefone, pes_endereco, pes_nroestabelecimento, pes_bairro, pes_cep, pes_cidade, pes_uf, ped_datainclusao, ped_dataprevisaoentrega, pdi_qtditem, ped_ativo }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n CPF/CNPJ: {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n \r\n \r\n Telefone: {pes_telefone || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Endereço: {pes_endereco}, {pes_nroestabelecimento}, {pes_bairro}, {pes_cep}, {pes_cidade}-{pes_uf}\r\n \r\n \r\n \r\n {!ped_ativo && \r\n Cancelado\r\n }\r\n \r\n Emissão: {moment(ped_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Entrega: {moment(ped_dataprevisaoentrega).format('DD/MM/YYYY')}\r\n \r\n \r\n Quantidade de Itens: {pdi_qtditem}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total do Pedido (R$)\",\r\n align: 'right',\r\n render: ({ ped_valortotal }) => (\r\n
\r\n {FormatNumber(ped_valortotal, true)}\r\n
\r\n )\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n setOpenModalDetalhePedido(false)} ped_id={idPedido} />\r\n \r\n );\r\n\r\n}","import React, { useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Dropdown, Menu, Table, Divider } from \"antd\";\r\nimport { EditOutlined, DeleteOutlined, CloseOutlined, PrinterOutlined, MoreOutlined, EyeOutlined, CopyOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions, manutencaoActions } from \"../../actions\";\r\nimport { FormatFone, FormatNumber, MaskFormat } from \"../../ValueObjects\";\r\nimport { ModalDetalheOrcamento } from \"../../components/modals/\";\r\nimport DrawerOrcamento from '../../pages/orcamento/drawer';\r\n\r\nexport default function PesquisaOrcamento({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [openModalDetalheOrcamento, setOpenModalDetalheOrcamento] = useState(false);\r\n\r\n function menuTable(record) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n function editar(record) {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: record } });\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n };\r\n\r\n function cancelar(record) {\r\n\r\n };\r\n\r\n function duplicar(record) {\r\n\r\n };\r\n\r\n function emitirNf(record) {\r\n\r\n };\r\n\r\n function visualizar(record) {\r\n setOpenModalDetalheOrcamento(true);\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {orc_numero}\r\n \r\n \r\n \r\n {pes_nome}\r\n \r\n \r\n CPF/CNPJ: {!!pef_cpf ? MaskFormat(pef_cpf, 'Não Informado', true) : MaskFormat(pej_cnpj, 'Não Informado', true)}\r\n \r\n \r\n Telefone: {FormatFone(pes_telefone) || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n Emissão: {moment(orc_datainclusao).format('DD/MM/YYYY')}\r\n \r\n \r\n Entrega: {moment(orc_datavalidade).format('DD/MM/YYYY')}\r\n \r\n \r\n Quant.: {oit_qtditem}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Total do Orçamento (R$)\",\r\n align: 'right',\r\n render: ({ orc_valortotal }) => (\r\n
\r\n {FormatNumber(orc_valortotal, true)}\r\n
\r\n )\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n setOpenModalDetalheOrcamento(false)} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button, Tag, Menu, Modal, Table, Divider } from \"antd\";\r\nimport { DeleteOutlined, PhoneOutlined, PrinterOutlined, EditOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from '../../state';\r\nimport { FormatFone, FormatNumber } from \"../../ValueObjects\";\r\nimport DrawerCondicional from '../../pages/condicional/drawer';\r\nimport DrawerDevolucao from '../../pages/condicional/drawerDevolucao';\r\nimport { drawerActions, listagemActions, manutencaoActions } from \"../../actions\";\r\nimport { ModalProdutoCondicional, ModalContatoCliente } from \"../../components/modals/\";\r\n\r\nexport default function PesquisaCondicional({ dados, dataPesquisa }) {\r\n\r\n const [carregando, setCarregando] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [registroDevolucao, setRegistroDevolucao] = useState({});\r\n const [openRegistroDevolucao, setOpenRegistroDevolucao] = useState(false);\r\n const [situacaoVenda, setSituacaoVenda] = useState([]);\r\n const [openModalContatoCliente, setOpenModalContatoCliente] = useState(false);\r\n const [openModalProdutoCondicional, setOpenModalProdutoCondicional] = useState(false);\r\n\r\n function menuTable(registro) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n\r\n\r\n function descricaoSituacao(codigo) {\r\n if (codigo >= 0 && !!situacaoVenda && !!situacaoVenda[codigo]) {\r\n return situacaoVenda[codigo].value;\r\n }\r\n return '';\r\n };\r\n\r\n function deletarCondicional(registro) {\r\n api.post(`VendaCondicional/Excluir`, JSON.stringify(registro.vnc_id), { headers: { 'Content-Type': 'application/json;charset=utf-8' } }).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('erro ao excluir condicional!');\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n });\r\n };\r\n\r\n async function editarCondicional(registro) {\r\n registro.vnc_datalancamento = moment(registro.vnc_datalancamento);\r\n registro.vnc_prazoretorno = moment(registro.vnc_prazoretorno);\r\n registro.vnc_entregaagendada = moment(registro.vnc_entregaagendada);\r\n let dadosTemp = await api.get(`VendaCondicional/ListarItens?listarTodos=true&vendaCondicionalId=${registro.vnc_id}`);\r\n if (dadosTemp.status === 200) {\r\n registro.itens = dadosTemp.data;\r\n }\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: registro } });\r\n }\r\n\r\n const modalExcluirCondicional = (condicional) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir a condicional do cliente ${condicional.cli_nome} contendo ${condicional.vnc_totalitens} itens com valor total de R$ ${!!condicional.vnc_valortotal ? condicional.vnc_valortotal : '0,00'} ?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n deletarCondicional(condicional);\r\n }\r\n });\r\n };\r\n\r\n function retornaCorSituacao(codigo) {\r\n let cor = \"\";\r\n switch (codigo) {\r\n case 0:\r\n cor = \"processing\";\r\n break;\r\n case 1:\r\n cor = \"green\";\r\n break;\r\n case 2:\r\n cor = \"#87d068\";\r\n break;\r\n case 3:\r\n cor = \"orange\";\r\n break;\r\n case 4:\r\n cor = \"red\";\r\n break;\r\n default:\r\n cor = \"processing\";\r\n break;\r\n }\r\n return cor;\r\n };\r\n\r\n useEffect(() => {\r\n carregarDados();\r\n }, []);\r\n\r\n function carregarDados() {\r\n api.get(`Enum/Listar?nome=SituacaoVendaCondicional`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setSituacaoVenda(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function alterarCondicionalEntregue(dados, valor) {\r\n let situacao = dados.vnc_situacao;\r\n if (valor === true) {\r\n situacao = 1;\r\n } else {\r\n situacao = 0;\r\n }\r\n api.post('VendaCondicional/EditarSituacaoCondicional',\r\n JSON.stringify({ vnc_id: dados.vnc_id, vnc_situacao: situacao }),\r\n { headers: { 'Content-Type': 'application/json;charset=utf-8' } }\r\n ).then(\r\n (res) => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('erro ao alterar status da condicional!');\r\n }\r\n ).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+vnc_datalancamento' } });\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {(descricaoSituacao(vnc_situacao))}\r\n \r\n \r\n \r\n {vnc_numero}\r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ cli_nome, vnc_telefonecliente }) => (\r\n
\r\n \r\n
\r\n {cli_nome}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Data',\r\n align: 'center',\r\n children: [\r\n {\r\n title: 'Lançamento',\r\n width: 140,\r\n render: ({ vnc_datalancamento }) => (\r\n
\r\n {moment(vnc_datalancamento).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Retorno',\r\n align: 'right',\r\n width: 140,\r\n render: ({ vnc_prazoretorno }) => (\r\n
\r\n {moment(vnc_prazoretorno).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n ],\r\n },\r\n {\r\n title: 'Itens',\r\n align: 'center',\r\n width: 100,\r\n render: ({ vnc_totalitens }) => (\r\n
\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Total (R$)',\r\n align: 'right',\r\n width: 150,\r\n render: ({ vnc_valortotal }) => (\r\n
\r\n {FormatNumber(vnc_valortotal, true)}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n {/* setOpenRegistroDevolucao(false)} dataPesquisa={dataPesquisa} />\r\n \r\n setOpenModalProdutoCondicional(false)} />\r\n setOpenModalContatoCliente(false)} />\r\n */}\r\n \r\n\r\n );\r\n\r\n}","import React from \"react\";\r\nimport { Row, Col, Button, Tag, Dropdown, Menu, Table, Divider } from \"antd\";\r\nimport { DeleteOutlined, MoreOutlined, DollarOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function PesquisaContaReceber({ dados }) {\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {!!saldo ? 'Recebido' : 'Em Aberto'}\r\n \r\n \r\n \r\n \r\n \r\n {prc_numeroparcela}/{cpr_numeroparcelas}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Contas a Receber\",\r\n render: ({ pes_nome, ctg_descricao, mcc_datahora, prc_datavencimento }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n \r\n \r\n Conta Gerencial: {ctg_descricao}\r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Recebido em:{moment(mcc_datahora).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Atrasado:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n A Receber:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Receber Hoje:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Número\",\r\n width: 100,\r\n render: ({ cpr_numerodocumento }) => (\r\n
\r\n {cpr_numerodocumento || 'Não Informado'}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Valor da Parcela (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Saldo Devedor (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Row, Col, Button, Tag, Dropdown, Menu, Table, Divider } from \"antd\";\r\nimport { DeleteOutlined, MoreOutlined, DollarOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\nimport moment from 'moment';\r\n\r\nimport { FormatNumber } from '../../ValueObjects';\r\n\r\nexport default function PesquisaContaPagar({ dados }) {\r\n\r\n function menuTable(dados) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n };\r\n\r\n return (\r\n
\r\n
(\r\n
\r\n \r\n
\r\n \r\n {!!saldo ? 'Quitada' : 'Em Aberto'}\r\n \r\n \r\n \r\n \r\n \r\n {prc_numeroparcela}/{cpr_numeroparcelas}\r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: \"Contas a Receber\",\r\n render: ({ pes_nome, cpr_numerodocumento, ctg_descricao, mcc_datahora, prc_datavencimento }) => (\r\n
\r\n \r\n
\r\n {pes_nome}\r\n \r\n \r\n \r\n \r\n Número: {cpr_numerodocumento}\r\n \r\n \r\n Conta Gerencial: {ctg_descricao}\r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Quitada em:{moment(mcc_datahora).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Atrasado:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n A Pagar:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $\r\n \r\n \r\n \r\n Pagar Hoje:{moment(prc_datavencimento).format('DD/MM/YYYY')}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n {\r\n title: 'Valor da Parcela (R$)',\r\n align: 'right',\r\n width: 180,\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Saldo Devedor (R$)',\r\n align: 'right',\r\n width: 180,\r\n fixed: 'right',\r\n render: ({ prc_valor }) => (\r\n
\r\n {FormatNumber(prc_valor, true)}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }}/>\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Tag, Popover, notification, Modal, Table, Divider } from \"antd\";\r\nimport { CloseCircleOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { listagemActions } from \"../../../actions\";\r\nimport DrawerTributacaoIcms from '../../../pages/tributacaoIcms/drawer';\r\n\r\nexport default function PesquisaTributacaoIcms({ dados }) {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } }), []);\r\n\r\n function excluirRegistro(item) {\r\n setCarregando(true);\r\n api.delete(`tributacaoIcms/Excluir?icm_id=${item.icm_id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Os dados do ICMS foram excluídos com sucesso!\" });\r\n dispatch({ type: listagemActions.CHANGE, data: { label: \"Nome Z - A\", ordem: '+icm_descricao' } })\r\n }, err => {\r\n modalInativarConta(item);\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(record);\r\n }\r\n });\r\n };\r\n\r\n const modalInativarConta = (record) => {\r\n Modal.confirm({\r\n title: `Não foi possível excluir a Tributação ICMS ${record.icm_descricao}!`,\r\n icon: ,\r\n content: `Deve conter referências com outros registros!`,\r\n okText: 'Inativar Registro',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n record.inativar = 1;\r\n record.icm_ativo = false;\r\n api.post(`tributacaoIcms/editar`, record).then((res) => {\r\n if (res.status === 200) {\r\n notification.success({ message: 'Operação concluída', description: \"Tributação inativada com sucesso!\" });\r\n }\r\n dispatch({ type: listagemActions.CHANGE, data: { label: \"Nome Z - A\", ordem: '+icm_descricao' } })\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(() => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+icm_descricao' } });\r\n });\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
(\r\n \r\n \r\n {icm_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tributações do ICMS',\r\n render: ({ icm_descricao }) => (\r\n
\r\n {icm_descricao}\r\n
\r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n align: 'center',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Tag, Popover, Divider, Modal, notification } from \"antd\";\r\nimport { ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../../services/api\";\r\nimport { useStateValue } from '../../../state';\r\nimport { TabelaDados } from \"../../../components\";\r\nimport { listagemActions, manutencaoActions } from \"../../../actions\";\r\nimport DrawerTributacaoPisCofins from '../../../pages/tributacaoPisCofins/drawer';\r\n\r\nexport default function PesquisaTributacaoPisCofins() {\r\n\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n useEffect(() => dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pis_descricao' } }), []);\r\n\r\n function excluirRegistro(id) {\r\n setCarregando(true);\r\n api.post(`TributacaoPisCofins/Excluir?codigoPisCofins=${id}`).then((res) => {\r\n if (res.status === 200) notification.success({ message: 'Operação concluída', description: \"Registro excluído com sucesso!\" });\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n }, erro => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(erro.response) });\r\n }).finally(\r\n () => {\r\n dispatch({ type: listagemActions.CHANGE, data: { ordem: '+pis_descricao' } });\r\n });\r\n }\r\n\r\n const modalExcluir = (dados) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja realmente excluir este registro?`,\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n excluirRegistro(dados);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n (\r\n \r\n \r\n {pis_id}\r\n \r\n \r\n ),\r\n },\r\n {\r\n title: 'Tributação do PIS e COFINS',\r\n render: ({ pis_descricao, nat_descricao }) => (\r\n
\r\n \r\n
\r\n {pis_descricao}\r\n \r\n \r\n \r\n \r\n {nat_descricao}\r\n \r\n \r\n \r\n ),\r\n },/*\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n key: 'x',\r\n fixed: 'right',\r\n align: 'center',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Tributação PIS\r\n \r\n \r\n \r\n \r\n CST Saída: {record.cpc_saidacstpis || 'Não Informado'} \r\n \r\n \r\n Perc.Redução BC: {record.pis_saidapercredbcpis || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_saidapercpis || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Física: {record.cpc_entradacstpispf || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbcpispf || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradapercpispf || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Jurídica: {record.cpc_entradacstpispj || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbcpispj || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_entradapercpispj || 'Não Informado'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Tributação COFINS\r\n \r\n \r\n \r\n \r\n CST Saída: {record.cpc_saidacstcofins || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_saidapercredbccofins || 'Não Informado'}\r\n \r\n \r\n Alíquota: {record.pis_saidaperccofins || 'Não Informado'}\r\n \r\n \r\n \r\n CST Entrada Pessoa Física: {record.cpc_entradacstcofinspf || 'Não Informado'}\r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbccofinspf || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradaperccofinspf || 'Não Informado'} \r\n \r\n \r\n \r\n CST Entrada Pessoa Jurídica: {record.cpc_entradacstcofinspj || 'Não Informado'} \r\n \r\n \r\n Perc.Redução BC: {record.pis_entradapercredbccofinspj || 'Não Informado'} \r\n \r\n \r\n Alíquota: {record.pis_entradaperccofinspj || 'Não Informado'} \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }} locale={{\r\n emptyText: (\r\n \r\n \r\n \r\n Nenhum Registro Encontrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 900 }} columnWidth={30} />\r\n \r\n \r\n \r\n \r\n \r\n );\r\n \r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Input, Tabs, Row, Col, Badge, Card } from 'antd';\r\nimport { Icon } from '@ant-design/compatible';\r\nimport Slider from 'react-slick';\r\nimport 'slick-carousel/slick/slick.less';\r\nimport 'slick-carousel/slick/slick-theme.less';\r\n\r\nimport './index.less';\r\nimport {\r\n TabTodas, TabCliente, TabFuncionario, TabFornecedor, TabVendedor, PesquisaProduto, PesquisaNotaFiscal, PesquisaPedidos,\r\n PesquisaOrcamento, PesquisaCondicional, PesquisaContaReceber, PesquisaContaPagar, TabTributacaoIcms, TabTributacaoPisCofins\r\n}\r\n from './pages';\r\nimport api from '../../services/api';\r\nimport { isObjetoDiffVazio } from '../../services/funcoes';\r\n\r\nexport default function PesquisaGlobal({ dadosBusca, openPesquisaGlobal }) {\r\n const [form] = Form.useForm();\r\n const pesquisaTipo = {\r\n pessoas: 1,\r\n produtos: 2,\r\n notasFiscais: 3,\r\n pedidos: 4,\r\n orcamentos: 5,\r\n condicional: 6,\r\n tributacao: 7,\r\n contasPagar: 8,\r\n contasReceber: 9,\r\n }\r\n const [conteudoExibir, setConteudoExibir] = useState(pesquisaTipo.pessoas);\r\n const settings = {\r\n speed: 500,\r\n dots: false,\r\n slidesToShow: 5,\r\n slidesToScroll: 1\r\n };\r\n const [listaPessoas, setListaPessoas] = useState([]);\r\n const [listaNota, setListaNota] = useState([]);\r\n const [listaProdutos, setListaProdutos] = useState([]);\r\n const [listaPedido, setListaPedido] = useState([]);\r\n const [listaOrcamento, setListaOrcamento] = useState([]);\r\n const [listaCondicional, setListaCondicional] = useState([]);\r\n const [listaTributacaoIcms, setListaTributacaoIcms] = useState([]);\r\n const [listaContasPagar, setListaContasPagar] = useState([]);\r\n const [listaContasReceber, setListaContasReceber] = useState([]);\r\n const [listaTributacaoPisCofins, setListaTributacaoPisCofins] = useState([]);\r\n const [totalRegistros, setTotalRegistros] = useState(0);\r\n\r\n useEffect(() => {\r\n if (!!dadosBusca && isObjetoDiffVazio(dadosBusca)) {\r\n montarTelas(dadosBusca);\r\n }\r\n }, [dadosBusca]);\r\n\r\n useEffect(() => {\r\n if (openPesquisaGlobal) {\r\n form.setFieldsValue({ busca: localStorage.getItem('@GestorWeb-PesquisaGlobal') })\r\n }\r\n }, [openPesquisaGlobal]);\r\n\r\n function efetuarBusca(value) {\r\n api.get(`BuscaGlobal/buscar?pesquisa=${value}&rota=`).then(\r\n res => {\r\n montarTelas(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function montarTelas(dados) {\r\n telaPessoas(dados.pessoas);\r\n telaNota(dados.notafiscal);\r\n telaPedidos(dados.pedidos);\r\n telaCondicional(dados.vendacondicional);\r\n telaContasReceber(dados.contasareceber);\r\n telaContasPagar(dados.contasapagar);\r\n telaOrcamentos(dados.orcamentos);\r\n telaProdutos(dados.produtos);\r\n telaTributacaoIcms(dados.tributacaoicms);\r\n telaTributacaoPisCofins(dados.tributacaopiscofins)\r\n setTotalRegistros(dados.pessoas.length + dados.notafiscal.length + dados.pedidos.length + dados.vendacondicional.length + dados.contasareceber.length +\r\n dados.contasapagar.length + dados.orcamentos.length + dados.produtos.length + dados.tributacaoicms.length + dados.tributacaopiscofins.length)\r\n };\r\n\r\n function telaPessoas(dados) {\r\n setListaPessoas(!!dados ? dados : []);\r\n };\r\n\r\n function telaNota(dados) {\r\n setListaNota(!!dados ? dados : []);\r\n };\r\n\r\n function telaPedidos(dados) {\r\n setListaPedido(!!dados ? dados : []);\r\n };\r\n\r\n function telaCondicional(dados) {\r\n setListaCondicional(!!dados ? dados : []);\r\n };\r\n\r\n function telaContasReceber(dados) {\r\n setListaContasReceber(!!dados ? dados : []);\r\n };\r\n\r\n function telaContasPagar(dados) {\r\n setListaContasPagar(!!dados ? dados : []);\r\n };\r\n\r\n function telaOrcamentos(dados) {\r\n setListaOrcamento(!!dados ? dados : []);\r\n };\r\n\r\n function telaProdutos(dados) {\r\n setListaProdutos(!!dados ? dados : []);\r\n };\r\n\r\n function telaTributacaoIcms(dados) {\r\n setListaTributacaoIcms(!!dados ? dados : []);\r\n };\r\n\r\n function telaTributacaoPisCofins(dados) {\r\n setListaTributacaoPisCofins(!!dados ? dados : []);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n Resultado da Busca: {totalRegistros} Itens \r\n \r\n \r\n \r\n { efetuarBusca(value) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
setConteudoExibir(pesquisaTipo.pessoas)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Pessoas\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.produtos)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Produtos\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.notasFiscais)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Notas Fiscais\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.pedidos)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Pedidos\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.orcamentos)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Orçamentos\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.condicional)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Condicional\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.tributacao)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Tributação\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.contasPagar)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Contas a Pagar\r\n \r\n \r\n \r\n \r\n
setConteudoExibir(pesquisaTipo.contasReceber)}>\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n Contas a Receber\r\n \r\n \r\n \r\n \r\n \r\n \r\n {conteudoExibir === pesquisaTipo.pessoas &&\r\n \r\n \r\n \r\n Todas\r\n \r\n } key=\"1\">\r\n \r\n \r\n !!cli.cli_id).length} className=\"text-uppercase\">\r\n Cliente\r\n \r\n } key=\"2\">\r\n !!cli.cli_id)} />\r\n \r\n !!cli.ven_id).length} className=\"text-uppercase\">\r\n Vendedor\r\n \r\n } key=\"3\">\r\n !!cli.ven_id)} />\r\n \r\n !!cli.for_id).length} className=\"text-uppercase\">\r\n Fornecedor\r\n \r\n } key=\"4\">\r\n !!cli.for_id)} />\r\n \r\n !!cli.fun_id).length} className=\"text-uppercase\">\r\n Funcionário\r\n \r\n } key=\"5\">\r\n !!cli.fun_id)} />\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.tributacao &&\r\n \r\n \r\n \r\n Tributação ICMS\r\n \r\n } key=\"1\">\r\n \r\n \r\n \r\n Tributação Pis/Cofins\r\n \r\n } key=\"2\">\r\n \r\n \r\n \r\n \r\n }\r\n \r\n
\r\n \r\n {conteudoExibir === pesquisaTipo.produtos &&\r\n
\r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.notasFiscais &&\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.pedidos &&\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.orcamentos &&\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.condicional &&\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.contasReceber &&\r\n \r\n \r\n \r\n }\r\n {conteudoExibir === pesquisaTipo.contasPagar &&\r\n \r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Select, Card, notification, Tooltip, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { ModalManutencaoNota, ModalSelectLote, ModalSenhaLiberacao } from \"../modals\";\r\nimport { HasValue, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { InputPreco, SelectProduto, SelectPaginacao } from \"../../components\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function FiltroProdutoNfi({ form, dadosTabela, dadosEndereco = {}, dadosOperacao = {}, dadosVendedor = {}, btnEditando, itemEditando, carregarPagina }) {\r\n\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [buscarProdutosCodBarra, setBuscarProdutosCodBarra] = useState(null);\r\n const [dadosCfop, setDadosCfop] = useState([]);\r\n const [abrirModalManutencaoNota, setAbrirModalManutencaoNota] = useState(false);\r\n const [dadosProdutoImpostos, setDadosProdutoImpostos] = useState({});\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [dadosNcm, setDadosNcm] = useState([]);\r\n const [listaPreco, setListaPreco] = useState([]);\r\n const [ocultaListaPreco, setOcultaListaPreco] = useState(false);\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const codBarras = useRef();\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [liberacaoSenha, setLiberacaoSenha] = useState(null);\r\n const [controleLote, setControleLote] = useState(false);\r\n const [abrirModalLote, setAbrirModalLote] = useState(false);\r\n const [dadosLote, setDadosLote] = useState([]);\r\n const [dadosItem, setDadosItem] = useState([]);\r\n const [nfSaida, setNfSaida] = useState(false);\r\n const [numeroPedido, setNumeroPedido] = useState(null);\r\n const [retImposto, setRetImposto] = useState({});\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando.editando])\r\n\r\n useEffect(() => {\r\n popularDadosContribuintes();\r\n carregaDados();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (dadosOperacao.tipooperacao !== undefined) {\r\n if (dadosOperacao.tipooperacao.tip_entradasaida === 1) {\r\n setNfSaida(true);\r\n } else if (dadosOperacao.tipooperacao.tip_entradasaida === 0) {\r\n setNfSaida(false);\r\n }\r\n }\r\n }, [dadosOperacao])\r\n\r\n useEffect(() => {\r\n if (buscarProdutosCodBarra && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }, [buscarProdutosCodBarra]);\r\n\r\n useEffect(() => {\r\n if (isObjetoDiffVazio(dadosContribuinte)) {\r\n if (!!manutencao.dados && (!!form.getFieldsValue().vnc_id || !!form.getFieldsValue().ped_id)) {\r\n incluirItemPedidoCondicional();\r\n }\r\n }\r\n }, [dadosContribuinte]);\r\n\r\n //#region dados impostos produtos \r\n\r\n async function buscarDadosProdImpostos(produto, listapreco) {\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : dadosEndereco.est_sigla === 'EX' ? '3' : '2');\r\n let codigoProd = !!produto ? produto : form.getFieldValue().pro_id;\r\n let ufDest = !!dadosEndereco.est_sigla ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla;\r\n let indicadorPresenca = !!form.getFieldsValue().ntf_indicadorpresenca ? `&indicadorPresenca=${form.getFieldsValue().ntf_indicadorpresenca}` : '';\r\n let listaPreco = !!listapreco ? `&ListaPreco=${listapreco}` : '';\r\n let inscEstadual = !!form.getFieldValue().pej_inscricaoestadual ? `&inscEstadual=${form.getFieldValue().pej_inscricaoestadual}` : '';\r\n let listaPrecoPar = !!listapreco ? `&ListaPreco=${listapreco}` : '';\r\n let objProd = (await api.get(`Produto/BuscarDadosProduto?IdProduto=${codigoProd}&ufDestino=${ufDest}`\r\n + `&operacaoCodigo=${dadosOperacao.ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}${indicadorPresenca}${inscEstadual}${listaPrecoPar}`\r\n )).data[0];\r\n setDadosProdutoImpostos(objProd);\r\n form.setFieldsValue({\r\n pis_id: objProd.pis_id,\r\n cbf_id: !!dadosOperacao.cbf_id ? dadosOperacao.cbf_id : objProd.cbf_id, // se tem fixo na operação \r\n ncm_id: objProd.ncm_id,\r\n icm_id: !!form.getFieldValue().icm_id ? form.getFieldValue().icm_id : objProd.icm_id,\r\n nfi_cfop: objProd.cfo_cfop,\r\n informacaoAdicional: !!form.getFieldValue().informacaoAdicional ? form.getFieldValue().informacaoAdicional : objProd.pro_observacao\r\n });\r\n return objProd;\r\n };\r\n\r\n useEffect(() => {\r\n if (!!dadosProdutoImpostos && JSON.stringify(dadosProdutoImpostos) !== '{}') {\r\n abrirModalManutencaoProd();\r\n }\r\n }, [dadosProdutoImpostos]);\r\n\r\n\r\n function abrirModalManutencaoProd() {\r\n if (dadosContribuinte.emp_regimetributario === 3 && (!!!dadosProdutoImpostos.icm_id || !!!dadosProdutoImpostos.ncm_id || !!!dadosProdutoImpostos.ump_id ||\r\n !!!dadosProdutoImpostos.pro_descricao || !!!dadosProdutoImpostos.pis_id || !!!dadosProdutoImpostos.iod_ufdestino)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (dadosContribuinte.emp_regimetributario !== 3 && (!!!dadosProdutoImpostos.icm_id || !!!dadosProdutoImpostos.ncm_id || !!!dadosProdutoImpostos.ump_id)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (!!dadosProdutoImpostos.cst_id && !!!dadosProdutoImpostos.mva_ufdestino && (dadosProdutoImpostos.cst_id === '10' || dadosProdutoImpostos.cst_id === '30' || dadosProdutoImpostos.cst_id === '70')) {\r\n setAbrirModalManutencaoNota(true);\r\n }\r\n };\r\n\r\n async function carregarNcm(id) {\r\n api.get(`Ncm/Buscar/${id}`).then(res => {\r\n setDadosNcm(res.data);\r\n dadosProdutoImpostos.ncm_ativo = res.data.ncm_ativo;\r\n }).catch(\r\n error => {\r\n console.log(error);\r\n }\r\n )\r\n }\r\n\r\n function carregarSelectPaginados() {\r\n let lista = [];\r\n if (!!form.getFieldValue().ltp_id)\r\n lista.push({ name: \"ltp_id\", campo: \"idLista\", value: form.getFieldValue().ltp_id });\r\n\r\n if (!!form.getFieldsValue().icm_id)\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: form.getFieldsValue().icm_id })\r\n\r\n if (!!form.getFieldsValue().pis_id)\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: form.getFieldsValue().pis_id })\r\n\r\n if (!!form.getFieldValue().ncm_id)\r\n lista.push({ name: \"ncm_id\", campo: \"IdNcm\", value: form.getFieldValue().ncm_id });\r\n\r\n if (dadosContribuinte.emp_regimetributario === 3 && (!!form.getFieldValue().cbf_id || !!dadosOperacao.cbf_id))\r\n lista.push({ name: \"cbf_id\", campo: \"Id\", value: !!dadosOperacao.cbf_id ? dadosOperacao.cbf_id : form.getFieldValue().cbf_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } });\r\n }\r\n\r\n //#endregion\r\n\r\n //#region Buscar dados banco \r\n\r\n function carregaDados() {\r\n buscarDadosCfop();\r\n };\r\n\r\n async function popularDadosContribuintes(callback) {\r\n await api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarDadosCfop() {\r\n api.get(`Cfop/ListarCfopTipo?tipoCfopFim=8000&tipoCfopIni=1000`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosCfop(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n //#endregion\r\n\r\n //#region Funções de campos do formulario \r\n\r\n async function onChangeProID(pro_id) {\r\n let listaItens = [...listaSelectProd]\r\n let produto = listaItens.filter(pro => pro.key === pro_id)[0];\r\n let filtros = !!produto.pro_id ? `idProduto=${produto.pro_id}` : '';\r\n filtros += !!produto.prg_id ? `&idProdutoGrade=${produto.prg_id}` : '';\r\n filtros += !!dadosOperacao.ope_id ? `&idOperacaoFiscal=${dadosOperacao.ope_id}` : '';\r\n filtros += !!form.getFieldValue().cli_id ? `&idCliente=${form.getFieldValue().cli_id}` : '';\r\n let listaPrecoTemp = (await api.get(`ListaPreco/ListaPrecoPadraoProduto?${filtros}`)).data;\r\n let listaPrecoCliente = (await api.get(`ListaPrecoCliente/ListarListaPrecoCliente?${filtros}`)).data;\r\n let listapreco = (!!!listaPrecoCliente || listaPrecoCliente.length > 0) ? listaPrecoCliente[0].ltp_id : listaPrecoTemp[0].ltp_id;\r\n setControleLote(produto.pro_controlelote)\r\n if (!!listaPrecoCliente && listaPrecoCliente.length > 0) {\r\n form.setFieldsValue({ ltp_id: listaPrecoCliente[0].ltp_id });\r\n produto.lpi_valorvenda = listaPrecoCliente[0].ltp_id;\r\n setListaPreco(listaPrecoCliente);\r\n } else {\r\n form.setFieldsValue({ ltp_id: listaPrecoTemp[0].ltp_id });\r\n produto.lpi_valorvenda = listaPrecoTemp[0].lpi_valorvenda;\r\n setListaPreco(listaPrecoTemp);\r\n }\r\n let valorCusto = 0;\r\n if ([1, 2, 3, 4, 5].includes(dadosOperacao?.ope_tipoprecoutilizar)) {\r\n setOcultaListaPreco(true);\r\n let url = `Produto/BuscarCustoProduto?IdProduto=${produto.pro_id}&tipoCusto=${dadosOperacao?.ope_tipoprecoutilizar}`;\r\n if (produto.prg_id !== null && produto.prg_id !== undefined) {\r\n url += `&codigoProdutoGrade=${produto.prg_id}`;\r\n }\r\n valorCusto = (await api.get(url)).data;\r\n } else {\r\n setOcultaListaPreco(false);\r\n }\r\n\r\n form.setFieldsValue({ nfi_numeropedidocompra: numeroPedido });\r\n\r\n let produtoImposto = await buscarDadosProdImpostos(produto.pro_id, listapreco);\r\n produtoImposto.prg_id = produto.prg_id;\r\n produtoImposto.prg_ean = produto.prg_ean;\r\n produtoImposto.descricaograde = produto.descricaograde;\r\n await popularFormProduto(produtoImposto, valorCusto);\r\n setarCampoQtde();\r\n carregarSelectPaginados();\r\n };\r\n\r\n async function onPressEnterProCodigo(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let dadosRequisicao = await api.get(`Produto/ListaProdutoFiltro?filtro=${codigoEan}`);\r\n if (!!dadosRequisicao.data && dadosRequisicao.data.items.length > 0) {\r\n let dadosProduto = dadosRequisicao.data.items[0];\r\n //let produtoImposto = await buscarDadosProdImpostos(dadosProduto.pro_id, form.getFieldValue().ltp_id);\r\n let produtoImposto = await buscarDadosProdImpostos(dadosProduto.pro_id, dadosProduto.ltp_id);\r\n produtoImposto.prg_id = dadosProduto.prg_id;\r\n produtoImposto.descricaograde = dadosProduto.descricaograde;\r\n await popularFormProduto(produtoImposto);\r\n await adicionarItem(produtoImposto);\r\n if (!!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso!', description: 'Item não encontrado!' });\r\n }\r\n };\r\n\r\n function setarCampoQtde() {\r\n setTimeout(() => {\r\n try {\r\n let element = document.getElementById(\"qtde\");\r\n if (element) {\r\n element.focus();\r\n element.select(); // Seleciona todo o texto dentro do campo\r\n }\r\n } catch (error) {\r\n console.log('error :>> ', error);\r\n }\r\n }, 200);\r\n }\r\n\r\n const togglePesquisa = () => {\r\n setBuscarProdutosCodBarra(!buscarProdutosCodBarra);\r\n };\r\n\r\n function onChangeQuantidade() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onChangeValorUnitario() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onChangePercDesc() {\r\n calculaDesconto('PERC');\r\n };\r\n\r\n function onChangeDesconto() {\r\n calculaDesconto('VALOR');\r\n };\r\n\r\n function onChangePercAcresc() {\r\n calculaAcrescimo('PERC');\r\n };\r\n\r\n function onChangeAcrescimo() {\r\n calculaAcrescimo('VALOR');\r\n };\r\n\r\n function onClickBtnCancelar() {\r\n cancelar();\r\n };\r\n\r\n function onClickBtnAdicionar() {\r\n adicionarItem();\r\n }\r\n\r\n //#endregion\r\n\r\n //#region calculos do item \r\n\r\n function recalcularValorTotal() {\r\n let total = 0;\r\n total = parseFloat(parseFloat(form.getFieldValue().quantidade) * parseFloat(form.getFieldValue().valorUnitario));\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n calculaDesconto('ATT');\r\n calculaAcrescimo('ATT');\r\n };\r\n\r\n function calculaDesconto(campo) {\r\n let valor = parseFloat((!!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0));\r\n let perc = parseFloat((!!form.getFieldValue().percdesc ? form.getFieldValue().percdesc : 0));\r\n let tot = parseFloat(form.getFieldValue().valorTotalItem);\r\n let result = 0;\r\n if (validarDescontoMaximoVendedor(perc)) {\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n valor = (!!form.getFieldValue().desconto ? parseFloat(form.getFieldValue().desconto) : 0);\r\n result = (!!tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n } else {\r\n if (valor > tot) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor de desconto maior do que valor total do item!' });\r\n form.setFieldsValue({ desconto: tot });\r\n }\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n } else {\r\n form.setFieldsValue({ desconto: 0 });\r\n form.setFieldsValue({ percdesc: 0 });\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n function calculaAcrescimo(campo) {\r\n let valor = (!!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0);\r\n let perc = (!!form.getFieldValue().percacresc ? form.getFieldValue().percacresc : 0);\r\n let tot = (!!form.getFieldValue().valorTotalItem ? parseFloat(form.getFieldValue().valorTotalItem) : 0);\r\n let result = 0;\r\n\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ acrescimo: result.toFixed(2) });\r\n valor = !!form.getFieldValue().acrescimo ? parseFloat(form.getFieldValue().acrescimo) : 0;\r\n result = (tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percacresc: result.toFixed(2) });\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n function calculaTotalItemDescAcr() {\r\n let valorTot = 0;\r\n let valorItens = !!form.getFieldValue().valorTotalItem ? form.getFieldValue().valorTotalItem : 0;\r\n let valorAcrescimo = !!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0;\r\n let valorDesc = !!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0;\r\n\r\n valorTot = parseFloat(valorItens) + parseFloat(valorAcrescimo) - parseFloat(valorDesc);\r\n form.setFieldsValue({ valorItemDesconto: valorTot.toFixed(2) });\r\n };\r\n\r\n //#endregion\r\n\r\n //#region processos itens \r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n async function popularFormProduto(produto, custo) {\r\n let valorVenda = 0;\r\n if ([1, 2, 3, 4, 5].includes(dadosOperacao?.ope_tipoprecoutilizar)) {\r\n valorVenda = custo;\r\n } else {\r\n valorVenda = (!!produto.lpi_valorvenda ? produto.lpi_valorvenda : 0);\r\n }\r\n setExibirDetalhes(true);\r\n form.setFieldsValue({\r\n quantidade: 1,\r\n valorUnitario: valorVenda,\r\n valorTotalItem: valorVenda,\r\n valorItemDesconto: valorVenda,\r\n nfi_itempedidocompra: null\r\n });\r\n\r\n // if (buscarProdutosCodBarra) {\r\n // form.setFieldsValue({\r\n // pro_id: produto.pro_id,\r\n // prg_id: produto.prg_id\r\n // });\r\n // }\r\n\r\n setDadosDetalhes(produto);\r\n return produto;\r\n };\r\n\r\n async function carregarParametrosLocal(item, listaItens, lista) {\r\n const codigo = item.pro_id\r\n const codigoGrade = item.prg_id\r\n const quantidade = item.quantidade\r\n\r\n let resParams = await api.get(`ParametroLocal/BuscarParametros`);\r\n if (resParams.status == 200) {\r\n let paramsEstoque = resParams.data.par_avisoestoqueinsuficiente;\r\n\r\n //let dados = lista.filter(item => item.key === form.getFieldValue().pro_id || item.pro_id === form.getFieldValue().pro_id)[0];\r\n let dados = lista.filter(item => item.key === codigo || item.prg_id === codigoGrade)[0];\r\n var dadosIncluido = listaItens\r\n .filter((prod) => (prod.pro_id === dados.pro_id && (!!!dados.prg_id || dados.prg_id === prod.prg_id)))\r\n .reduce((total, prod) => total + prod.nfi_qtde, 0);\r\n\r\n if (paramsEstoque === null) {\r\n return;\r\n }\r\n\r\n let resEstoque = await api.get(`Estoque/BuscarEstoqueProduto?codigoProduto=${codigo}` + (codigoGrade ? `&codigoGrade=${codigoGrade}` : ''))\r\n let estoque = resEstoque.data.valorTotal;\r\n\r\n let valorEstoque = calcularValorEstoque(estoque, dadosIncluido, quantidade);\r\n\r\n return new Promise((resolve, reject) => {\r\n if (valorEstoque <= 0) {\r\n estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n }\r\n }\r\n\r\n function calcularValorEstoque(estoque, dadosIncluido, quantidade) {\r\n if (dadosIncluido !== 0) {\r\n var novosDadosIncluido = dadosIncluido + quantidade\r\n }\r\n if (novosDadosIncluido > estoque) {\r\n return estoque - novosDadosIncluido;\r\n } else if (quantidade > estoque) {\r\n return estoque - quantidade;\r\n } else {\r\n return estoque\r\n }\r\n }\r\n\r\n function estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject) {\r\n if (paramsEstoque === 0) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar?`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n resolve();\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 1) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar? Será solicitado uma senha Gerencial`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n setLiberacaoSenha({ resolve, reject });\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 2) {\r\n Modal.warning({\r\n title: 'Atenção Sistema de Controle de Estoque!',\r\n icon: ,\r\n content: `Produto com estoque ${valorEstoque}, sistema está configurado para bloquear vendas de produtos sem estoque!`,\r\n centered: true,\r\n onOk() {\r\n reject();\r\n }\r\n });\r\n }\r\n }\r\n\r\n const onCloseModalLiberacao = (aprovado) => {\r\n setAbreModalLiberacao(false);\r\n if (aprovado && liberacaoSenha) {\r\n liberacaoSenha.resolve();\r\n } else if (liberacaoSenha) {\r\n liberacaoSenha.reject();\r\n }\r\n setLiberacaoSenha(null);\r\n }\r\n\r\n async function adicionarItem(item = {}) {\r\n console.log(item)\r\n let possuiIe = !!form.getFieldValue().pej_inscricaoestadual ? true : false;\r\n //let fisicaJuridica = form.getFieldValue().ntf_cpfcnpj.length === 14 ? 2 : form.getFieldValue().ntf_cpfcnpj.length == 11 ? 1 : 3;\r\n let p = { ...dadosProdutoImpostos, ...item };\r\n console.log(item)\r\n console.log(p)\r\n //let p = dadosProdutoImpostos;\r\n p.icms_id = !!form.getFieldValue().icm_id ? form.getFieldValue().icm_id : dadosProdutoImpostos.icm_id;\r\n if (p.ncm_ativo == false) {\r\n notification.warning({ message: 'Aviso!', description: 'NCM do produto está invativo na base de dados do SEFAZ, altere o NCM no cadastro do produto para seguir com operação!' });\r\n return;\r\n }\r\n if (!!!p.iod_ufdestino) {\r\n notification.warning({ message: 'Aviso!', description: 'Não encontrado Dados de Origem e Destino no cadastro de tributação para o UF destino, Verifique no cadastro de tributação do produto!' });\r\n return\r\n }\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, form.getFieldValue().quantidade, form.getFieldValue().valorUnitario,\r\n form.getFieldValue().nfi_valorfrete, form.getFieldValue().acrescimo, form.getFieldValue().desconto, p.iod_percicms, p.iod_percdiferimentoicms, p.iod_percicmsreducaobc,\r\n p.mva_percaliquotaicms, p.mva_percmva, p.mva_percaliquotaicmsreducao, p.mva_ajustado, p.ncm_percentual, form.getFieldValue().fisicaJuridica, form.getFieldValue().ntf_consumidorfinal, possuiIe,\r\n form.getFieldValue().ntf_indicadorpresenca);\r\n\r\n let listaItens = [...dadosTabela.dadosItens];\r\n let lista = [...listaSelectProd]\r\n let dadosFormulario = form.getFieldValue();\r\n setNumeroPedido(dadosFormulario.nfi_numeropedidocompra);\r\n if (!buscarProdutosCodBarra) {\r\n if (btnEditando.editando) {\r\n item = listaItens.filter((prod) => (prod.nfi_numeroitem === dadosFormulario.nfi_numeroitem))[0];\r\n } else {\r\n item = { ...item, ...dadosFormulario, ...dadosDetalhes };\r\n }\r\n }\r\n if (dadosOperacao.tipooperacao.tip_entradasaida === 1 && !btnEditando.editando) {\r\n try {\r\n await carregarParametrosLocal(item, listaItens, lista);\r\n } catch (error) {\r\n return;\r\n }\r\n }\r\n let dados = {};\r\n if (!!validarItem(dadosFormulario)) {\r\n let dadosEditando = listaItens.filter((prod) => (prod.pro_id === item.pro_id && (!!!item.prg_id || item.prg_id === prod.prg_id)))[0];\r\n if (!!dadosEditando) {\r\n dadosEditando.impostos = impostos;\r\n dados = popularItemNota(true, item, dadosEditando);\r\n if (!!btnEditando && btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n alterarItem(dados, listaItens, dadosEditando)\r\n } else {\r\n if (buscarProdutosCodBarra) {\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens);\r\n } else {\r\n Modal.confirm({\r\n title: 'Atualizar?',\r\n icon: ,\r\n content: 'Item já cadastrado na nota, deseja atualiazar suas informações?',\r\n okText: 'Atualizar',\r\n cancelText: 'Incluir',\r\n centered: true,\r\n onOk() {\r\n alterarItem(dados, listaItens, dadosEditando)\r\n },\r\n onCancel() {\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n if (!!controleLote) {\r\n verificarItemLote(dados, listaItens)\r\n } else {\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n });\r\n }\r\n }\r\n } else {\r\n item.impostos = impostos;\r\n dados = popularItemNota(false, item);\r\n dados.nfi_numeroitem = listaItens.length + 1;\r\n if (!!controleLote) {\r\n verificarItemLote(dados, listaItens)\r\n } else {\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n }\r\n };\r\n\r\n function buscarDadosIcms(value) {\r\n let pro_id = form.getFieldValue().pro_id\r\n let listaItens = [...listaSelectProd]\r\n let produto = listaItens.filter(pro => pro.key === pro_id)[0];\r\n\r\n let codigoProd = btnEditando.editando ? form.getFieldValue().pro_id : produto.pro_id\r\n let ufDest = !!dadosEndereco.est_sigla ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let indicadorPresenca = !!form.getFieldsValue().ntf_indicadorpresenca ? `&indicadorPresenca=${form.getFieldsValue().ntf_indicadorpresenca}` : '';\r\n let inscEstadual = !!form.getFieldValue().pej_inscricaoestadual ? `&inscEstadual=${form.getFieldValue().pej_inscricaoestadual}` : '';\r\n let listaPrecoPar = !!listaPreco ? `&ListaPreco=${listaPreco[0].ltp_id}` : '';\r\n\r\n api.get(`Produto/BuscarDadosProduto?IdProduto=${codigoProd}&ufDestino=${ufDest}&IcmsId=${value}`\r\n + `&operacaoCodigo=${dadosOperacao.ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}${indicadorPresenca}${inscEstadual}${listaPrecoPar}`\r\n ).then(\r\n res => {\r\n setRetImposto(res.data[0]);\r\n }\r\n )\r\n }\r\n\r\n function validarItem(dados) {\r\n if (dados.quantidade === 0 || !!!dados.quantidade) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade do Item Inválida!' });\r\n return false;\r\n }\r\n if (parseFloat(dados.valorItemDesconto) === 0 || parseFloat(dados.valorUnitario) === 0) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor do Item Inválido!' });\r\n return false\r\n }\r\n if (!!!dados.nfi_cfop) {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP é obrigatório!' });\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n async function verificarItemLote(dados, listaItens) {\r\n let listaLote = (await api.get(`ProdutoLote/ListarLotesSaldo?IdProduto=${dados.pro_id}&ComSaldo=true`));\r\n if (listaLote.data.length > 0) {\r\n let seq = 0;\r\n listaLote.data.forEach((lote) => {\r\n lote.key = seq;\r\n seq++;\r\n });\r\n setDadosLote(listaLote.data);\r\n setDadosItem(dados);\r\n setAbrirModalLote(true);\r\n } else {\r\n //incluirItem(dados, listaItens)\r\n notification.warning({ message: 'Aviso', description: 'Nenhum lote encontrado para o produto selecionado!' });\r\n return false;\r\n }\r\n }\r\n\r\n function salvarLotes(itemCLote, listaTemp) {\r\n setAbrirModalLote(false);\r\n if (itemCLote !== undefined && listaTemp !== undefined) {\r\n let dados = itemCLote;\r\n let listaItens = [...dadosTabela.dadosItens];\r\n if (listaTemp.length > 0) {\r\n dados.nfitemlotes = listaTemp;\r\n incluirItem(dados, listaItens)\r\n }\r\n }\r\n }\r\n\r\n function incluirItem(dados, listaItens) {\r\n listaItens.push(dados);\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item incluído com sucesso!' });\r\n }\r\n\r\n function alterarItem(dados, listaItens, dadosEditando) {\r\n let indice = listaItens.findIndex((item) => (item === dadosEditando));\r\n listaItens.splice(indice, 1, { ...dados });\r\n dadosTabela.setDadosItens(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item editado com sucesso!' });\r\n }\r\n\r\n function popularItemNota(editando, item, dadosEditando) {\r\n let itemNota = {};\r\n let formulario = form.getFieldValue();\r\n let valorIpi = 0;\r\n let valorSt = 0;\r\n\r\n if (editando) {\r\n if (isObjetoDiffVazio(dadosEditando.impostos)) {\r\n valorSt = dadosEditando.impostos.retornoICMSST.ret_valorIcmsSt;\r\n valorIpi = dadosEditando.impostos.retornoIPI.ret_valorIpi;\r\n }\r\n itemNota = {\r\n ...dadosEditando,\r\n impostos: dadosEditando.impostos,\r\n iod_uforigem: dadosEditando.iod_uforigem,\r\n iod_ufdestino: dadosEditando.iod_ufdestino,\r\n orm_id: dadosEditando.orm_id,\r\n ltp_id: dadosEditando.ltp_id,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_numeropedidocompra: formulario.nfi_numeropedidocompra,\r\n nfi_itempedidocompra: formulario.nfi_itempedidocompra,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario),\r\n percdesc: parseFloat(formulario.percdesc),\r\n nfi_valorfrete: dadosEditando.nfi_valorfrete,\r\n nfi_valoroutros: parseFloat(formulario.acrescimo),\r\n nfi_valordesconto: parseFloat(formulario.desconto),\r\n percacresc: parseFloat(formulario.percacresc),\r\n nfi_valoricmsst: parseFloat(valorSt),\r\n nfi_valoripi: parseFloat(valorIpi),\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n nfi_cfop: formulario.nfi_cfop,\r\n total: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt)),\r\n icm_id: formulario.icm_id,\r\n cso_id: retImposto.cso_id ? retImposto.cso_id : item.cso_id ?? dadosProdutoImpostos.cso_id,\r\n cst_id: retImposto.cst_id ? retImposto.cst_id : item.cst_id ?? dadosProdutoImpostos.cst_id\r\n };\r\n } else {\r\n let cfop = dadosCfop.filter((cfop) => (cfop.cfo_cfop === formulario.nfi_cfop))[0];\r\n if (isObjetoDiffVazio(item.impostos)) {\r\n valorSt = item.impostos.retornoICMSST.ret_valorIcmsSt;\r\n valorIpi = item.impostos.retornoIPI.ret_valorIpi;\r\n }\r\n itemNota = {\r\n impostos: item.impostos,\r\n iod_uforigem: item.iod_uforigem,\r\n iod_ufdestino: item.iod_ufdestino,\r\n orm_id: item.orm_id,\r\n ltp_id: item.ltp_id,\r\n pro_id: item.pro_id,\r\n prg_id: item.prg_id,\r\n nfi_cfop: cfop.cfo_cfop,\r\n nfi_qtde: formulario.quantidade,\r\n nfi_numeroitem: !!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 ? dadosTabela.dadosItens.length + 1 : 1,\r\n nfi_valorunitario: parseFloat(formulario.valorUnitario ?? 0),\r\n total: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt)),\r\n percdesc: parseFloat(formulario.percdesc ?? 0),\r\n nfi_valordesconto: parseFloat(formulario.desconto ?? 0),\r\n percacresc: parseFloat(formulario.percacresc ?? 0),\r\n nfi_valoroutros: parseFloat(formulario.acrescimo ?? 0),\r\n nfi_valoricmsst: parseFloat(valorSt),\r\n nfi_valoripi: parseFloat(valorIpi),\r\n nfi_valorfrete: 0,\r\n nfi_informacaoadicional: formulario.informacaoAdicional,\r\n cfo_cfop: cfop.cfo_cfop,\r\n cfo_descricao: cfop.cfo_descricao,\r\n cfo_id: cfop.cfo_id,\r\n nfi_ean: HasValue(item.prg_ean) ? item.prg_ean : item.pro_ean,\r\n nfi_unidademedida: item.ump_id,\r\n pro_codigo: item.pro_codigo,\r\n pro_descricao: item.pro_descricao,\r\n pro_ean: item.pro_ean,\r\n ump_id: item.ump_id,\r\n nfi_numeropedidocompra: item.nfi_numeropedidocompra,\r\n nfi_itempedidocompra: item.nfi_itempedidocompra,\r\n grade: item.descricaograde,\r\n nfi_ncm: item.ncm_codigo ?? dadosProdutoImpostos.ncm_codigo,\r\n cbf_id: formulario.cbf_id,\r\n icm_id: formulario.icm_id ?? item.icm_id ?? dadosProdutoImpostos.icm_id,\r\n ncm_id: item.ncm_id ?? dadosProdutoImpostos.ncm_id,\r\n pis_id: item.pis_id ?? dadosProdutoImpostos.pis_id,\r\n cso_id: retImposto.cso_id ? retImposto.cso_id : item.cso_id ?? dadosProdutoImpostos.cso_id,//\r\n cst_id: retImposto.cst_id ? retImposto.cst_id : item.cst_id ?? dadosProdutoImpostos.cst_id,\r\n };\r\n }\r\n return itemNota;\r\n };\r\n\r\n async function incluirItemPedidoCondicional() {\r\n let listaItens = [];\r\n let indice = 0;\r\n carregarPagina(true);\r\n for (let [idx, itens] of dadosTabela.dadosItens.entries()) {\r\n let prodNota = await buscarDadosProdImpostos(itens.pro_id)\r\n let obj = { ...prodNota, ...itens };\r\n obj.nfi_cfop = obj.cfo_cfop;\r\n obj.grade = obj.descricaograde;\r\n obj.nfi_ncm = obj.ncm_codigo.toString();\r\n listaItens.push(obj)\r\n if (indice === dadosTabela.dadosItens.length - 1) {\r\n dadosTabela.setDadosItens(listaItens);\r\n carregarPagina(false);\r\n }\r\n indice = indice + 1;;\r\n };\r\n };\r\n\r\n async function buscaPrecoListaPrecoSelecionada() {\r\n let dadosPreco = await api.get(`ListaPrecoItem/BuscaPrecoItem?CodigoListaPreco=${form.getFieldValue().ltp_id}&CodigoProduto=${dadosDetalhes.pro_id}&CodigoGrade=${!!dadosDetalhes.prg_id ? dadosDetalhes.prg_id : \"\"}`);\r\n if (dadosPreco.data) {\r\n form.setFieldsValue({\r\n valorUnitario: dadosPreco.data.lpi_valorvenda,\r\n valorTotalItem: form.getFieldValue().quantidade * dadosPreco.data.lpi_valorvenda,\r\n });\r\n onChangeValorUnitario();\r\n } else (console.log(\"Item não encontrado na lista de preço selecionada\"))\r\n }\r\n\r\n function validarDescontoMaximoVendedor(perDesconto) {\r\n let retorno = true;\r\n if (!!dadosVendedor && !!dadosVendedor.ven_maximodesconto) {\r\n if (perDesconto > (dadosVendedor.ven_maximodesconto * 100)) {\r\n notification.warning({ description: \"O desconto máximo para este vendedor não pode exceder \" + dadosVendedor.ven_maximodesconto * 100 + \"% !\", message: \"Aviso\" });\r\n form.setFieldsValue({\r\n desconto: null,\r\n percdesc: null\r\n });\r\n retorno = false;\r\n }\r\n }\r\n return retorno;\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, nfi_cfop: null, icm_id: null, informacaoAdicional: '' });\r\n };\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n prg_id: dados.prg_id,\r\n quantidade: dados.nfi_qtde,\r\n valorUnitario: dados.nfi_valorunitario,\r\n nfi_numeroitem: dados.nfi_numeroitem,\r\n valorTotalItem: dados.nfi_qtde * dados.nfi_valorunitario,\r\n valorItemDesconto: (dados.nfi_qtde * dados.nfi_valorunitario) - dados.nfi_valordesconto + dados.nfi_valoroutros,\r\n desconto: dados.nfi_valordesconto,\r\n nfi_valorfrete: dados.nfi_valorfrete,\r\n percacresc: dados.percacresc,\r\n percdesc: dados.percdesc,\r\n nfi_cfop: dados.nfi_cfop,\r\n acrescimo: dados.nfi_valoroutros,\r\n informacaoAdicional: dados.nfi_informacaoadicional,\r\n icm_id: (!!dados.icm_id ? dados.icm_id : null), ncm_id: (!!dados.ncm_id ? dados.ncm_id : null), pis_id: (!!dados.pis_id ? dados.pis_id : null),\r\n nfi_itempedidocompra: dados.nfi_itempedidocompra,\r\n nfi_numeropedidocompra: dados.nfi_numeropedidocompra\r\n });\r\n dadosTemp = {\r\n prg_id: dadosEditando.prg_id,\r\n pro_descricao: dadosEditando.pro_descricao,\r\n pro_codigo: dadosEditando.pro_codigo,\r\n pro_ean: dadosEditando.pro_ean,\r\n ncm_codigo: dadosEditando.ncm_codigo,\r\n ncm_id: dadosEditando.ncm_id,\r\n ncm_porcentagem: dadosEditando.ncm_porcentagem,\r\n ump_id: dadosEditando.ump_id,\r\n informacaoAdicional: dadosEditando.nfi_informacaoadicional,\r\n };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n //#endregion\r\n\r\n return (\r\n
\r\n \r\n {!!!buscarProdutosCodBarra &&\r\n
\r\n \r\n { onChangeProID(dados) }}\r\n setListaDados={setListaSelectProd} />\r\n \r\n \r\n }\r\n {!!buscarProdutosCodBarra &&\r\n \r\n \r\n {\r\n onPressEnterProCodigo(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao} {!!dadosDetalhes.descricaograde ? dadosDetalhes.descricaograde : ''}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {!!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean}\r\n \r\n \r\n NCM: {dadosDetalhes.ncm_codigo}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n buscaPrecoListaPrecoSelecionada(valor)} conteudo={\r\n lp => ({lp.ltp_id} - {lp.ltp_nome})\r\n } />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n buscarDadosIcms(value)} conteudo={\r\n icm => ({icm.icm_id} - {icm.icm_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n carregarNcm(valor)} conteudo={\r\n ncm => ({ncm.ncm_codigo.codigoNcm} - {ncm.ncm_descricao})\r\n } />\r\n \r\n \r\n \r\n \r\n { onChangeQuantidade() }} />\r\n \r\n \r\n \r\n onChangeValorUnitario()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n (onChangePercDesc())}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n onChangeDesconto()} />\r\n \r\n \r\n \r\n { onChangePercAcresc() }}\r\n precision={2}\r\n min={0}\r\n max={100}\r\n formatter={value => `${value}%`}\r\n parser={value => value.replace('%', '')}\r\n />\r\n \r\n \r\n \r\n { onChangeAcrescimo() }} />\r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n ({pis.pis_id} - {pis.pis_descricao})\r\n } />\r\n \r\n */}\r\n {dadosContribuinte.emp_regimetributario === 3 && \r\n \r\n ({v.cbf_codigo} - {v.cbf_descricao} )\r\n } />\r\n \r\n }\r\n {nfSaida === true && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { setAbrirModalManutencaoNota(false); }} dadosContribuinte={dadosContribuinte} dadosOperacao={dadosOperacao} dadosEndereco={dadosEndereco} dadosProduto={dadosProdutoImpostos} aoSalvar={(value) => buscarDadosProdImpostos(value)} />\r\n \r\n salvarLotes(itemCLote, listaTemp)} dadosLote={dadosLote} setDadosLote={setDadosLote} formulario={form} dadosItem={dadosItem} />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Descriptions, Card, notification, Tooltip, Select, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco, InputPercentual, SelectProduto, SelectPaginacao } from \"../../components\";\r\nimport { ModalListaProduto, ModalManutencaoNota, ModalSenhaLiberacao } from \"../modals\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function FiltroProdutoPdi({ form, dadosTabela, dadosEndereco = {}, custo = {}, dadosOperacao = {}, btnEditando, itemEditando }) {\r\n\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [consultaProduto, setConsultaProduto] = useState(null);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [aux, setAux] = useState(false);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n const [abrirModalListaProd, setAbrirModalListaProd] = useState(false);\r\n const [listaDadosProdModal, setListaDadosProdModal] = useState([]);\r\n const [abrirModalManutencaoNota, setAbrirModalManutencaoNota] = useState(false);\r\n const [liberadoParaIncluir, setLiberadoParaIncluir] = useState(false);\r\n const [produtoBuscaEan, setProdutoBuscaEan] = useState({});\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [buscarProdutosCodBarra, setBuscarProdutosCodBarra] = useState(null);\r\n const togglePesquisa = () => {\r\n setConsultaProduto(!consultaProduto);\r\n };\r\n const [abreModalLiberacao, setAbreModalLiberacao] = useState(false);\r\n const [liberacaoSenha, setLiberacaoSenha] = useState(null);\r\n const [dadosProdutoImpostos, setDadosProdutoImpostos] = useState({});\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setDadosDetalhes(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando])\r\n\r\n useEffect(() => {\r\n if (!!dadosProduto && isObjetoDiffVazio(dadosProduto)) {\r\n if (dadosProduto.pro_produto){\r\n abrirModalManutencaoProd();\r\n }\r\n }\r\n }, [dadosProduto]);\r\n\r\n useEffect(() => {\r\n popularDadosContribuintes();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!dadosDetalhes && !!liberadoParaIncluir && !!form.getFieldValue().pro_codigo) {\r\n adicionarItemCodBarras();\r\n setLiberadoParaIncluir(false);\r\n form.setFieldsValue({ pro_codigo: null });\r\n }\r\n }, [dadosDetalhes, liberadoParaIncluir]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n popularDadosContribuintes();\r\n setAux(true);//criado para carregar os dadosContribuintes antes de entrar no popularProduto\r\n }\r\n }, [manutencao.dados]);\r\n\r\n useEffect(() => {\r\n if (!!listaSelectProd && manutencao.dados?.editando) {\r\n let dados = { ...manutencao.dados };\r\n popularProduto(dados.pro_id, true, dados.prg_id);\r\n dados.pro_id = form.getFieldValue().pro_id;\r\n form.setFieldsValue(dados);\r\n }\r\n }, [listaSelectProd]);\r\n\r\n useEffect(() => {\r\n if (!!dadosContribuinte && dadosContribuinte.length > 0 && aux && !!manutencao.dados && !!manutencao.dados.pro_id) {\r\n popularProduto(manutencao.dados.pro_id, true, manutencao.dados.prg_id);\r\n }\r\n }, [dadosContribuinte]);\r\n\r\n function abrirModalManutencaoProd() {\r\n if (isObjetoDiffVazio(custo)) {//validacao da nota de transferencia\r\n if (!!!dadosProduto.icm_id || !!!dadosProduto.ncm_id || !!!dadosProduto.ump_id || !!!dadosProduto.pro_descricao) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (!!!dadosProduto.iod_ufdestino) {\r\n setAbrirModalManutencaoNota(true);\r\n }\r\n } else {\r\n if (dadosContribuinte.emp_regimetributario === 3 && (!!!dadosProduto.icm_id || !!!dadosProduto.ncm_id || !!!dadosProduto.ump_id ||\r\n !!!dadosProduto.pro_descricao || !!!dadosProduto.pis_id || !!!dadosProduto.iod_ufdestino)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (dadosContribuinte.emp_regimetributario !== 3 && (!!!dadosProduto.icm_id || !!!dadosProduto.ncm_id || !!!dadosProduto.ump_id)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if (!!dadosProduto.cst_id && !!!dadosProduto.mva_ufdestino && (dadosProduto.cst_id === '10' || dadosProduto.cst_id === '30' || dadosProduto.cst_id === '70')) {\r\n setAbrirModalManutencaoNota(true);\r\n }\r\n }\r\n };\r\n\r\n function popularDadosContribuintes(callback) {\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function alterarValorTotal() {\r\n let total = 0;\r\n total = form.getFieldValue().pdi_quantidade * form.getFieldValue().pdi_valorunitario;\r\n form.setFieldsValue({ pdi_valortotal: total.toFixed(2) });\r\n calculaDesconto('ATT');\r\n };\r\n\r\n function calculaTotalItemDescAcr() {\r\n let valorTot = 0;\r\n let valorItens = !!form.getFieldValue().pdi_valortotal ? form.getFieldValue().pdi_valortotal : 0;\r\n let valorAcrescimo = !!form.getFieldValue().acrescimo ? form.getFieldValue().acrescimo : 0;\r\n let valorDesc = !!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0;\r\n valorTot = parseFloat(valorItens) + parseFloat(valorAcrescimo) - parseFloat(valorDesc);\r\n form.setFieldsValue({ valorItemDesconto: valorTot.toFixed(2) });\r\n };\r\n\r\n function calculaDesconto(campo) {\r\n let valor = (!!form.getFieldValue().desconto ? form.getFieldValue().desconto : 0);\r\n let perc = (!!form.getFieldValue().percdesc ? form.getFieldValue().percdesc : 0);\r\n let tot = parseFloat(form.getFieldValue().pdi_valortotal);\r\n let result = 0;\r\n if (!!campo) {\r\n if (campo === 'PERC') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n } else if (campo === 'ATT') {\r\n result = (tot * perc) / 100;\r\n form.setFieldsValue({ desconto: result.toFixed(2) });\r\n valor = (!!form.getFieldValue().desconto ? parseFloat(form.getFieldValue().desconto) : 0)\r\n result = (!!tot > 0 ? (valor * 100) / tot : 0);\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n } else {\r\n if (valor > tot) {\r\n form.setFieldsValue({ desconto: tot });\r\n form.setFieldsValue({ percdesc: 100 });\r\n } else {\r\n result = (valor * 100) / tot;\r\n form.setFieldsValue({ percdesc: result.toFixed(2) });\r\n }\r\n }\r\n calculaTotalItemDescAcr();\r\n }\r\n };\r\n\r\n async function buscarProduto(produto) {\r\n let listaItens = [...listaSelectProd];\r\n let prod = listaItens.filter((item) => item.key === produto)[0];\r\n let buscaOK = await popularProduto(prod.pro_id, false, prod.prg_id ? prod.prg_id : null);\r\n if (buscaOK) {\r\n await buscarDadosProdutoPedido(prod.pro_id);\r\n } else {\r\n cancelar();\r\n }\r\n };\r\n\r\n async function buscarDadosProdutoPedido(produto) {\r\n let prod = !!produto ? produto : form.getFieldValue().pro_id;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let res = await api.get(`Produto/BuscarDadosProduto?IdProduto=${prod}&ufDestino=${!!dadosEndereco ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla}`\r\n + `&operacaoCodigo=${form.getFieldValue().ope_id}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}&indicadorPresenca=0`\r\n );\r\n if (res.status == 200) {\r\n let dados = res.data[0];\r\n setDadosProdutoImpostos(dados);\r\n setDadosDetalhes(dados);\r\n dados.pro_id = prod;\r\n let filtros = !!produto ? `idProduto=${produto}` : '';\r\n filtros += !!dados.prg_id ? `&idProdutoGrade=${dados.prg_id}` : '';\r\n filtros += !!form.getFieldValue().cli_id ? `&idCliente=${form.getFieldValue().cli_id}` : '';\r\n let listaPrecoTemp = (await api.get(`ListaPreco/ListaPrecoPadraoProduto?${filtros}`)).data;\r\n dados.ltp_id = listaPrecoTemp[0].ltp_id;\r\n let listaPrecoCliente = (await api.get(`ListaPrecoCliente/ListarListaPrecoCliente?${filtros}`)).data;\r\n if (!!listaPrecoCliente && listaPrecoCliente.length > 0) {\r\n let grade = !!dados.prg_id ? `&CodigoGrade=${dados.prg_id}` : \"\";\r\n let dadosPreco = await api.get(`ListaPrecoItem/BuscaPrecoItem?CodigoListaPreco=${listaPrecoCliente[0].ltp_id}&CodigoProduto=${produto}${grade}`);\r\n if (dadosPreco.data) {\r\n form.setFieldsValue({\r\n ltp_id: !!dadosPreco.ltp_id ? dados.ltp_id : listaPrecoCliente[0].ltp_id,\r\n lpi_valorvenda: dadosPreco.data.lpi_valorvenda,\r\n pdi_valorunitario: dadosPreco.data.lpi_valorvenda,\r\n pdi_valortotal: form.getFieldValue().pdi_quantidade * dadosPreco.data.lpi_valorvenda,\r\n });\r\n }\r\n } else {\r\n form.setFieldsValue({ ltp_id: (!!listaPrecoTemp[0].ltp_id ? listaPrecoTemp[0].ltp_id : '') });\r\n }\r\n setDadosProduto(dados);\r\n buscaPrecoListaPrecoSelecionada(dados);\r\n }\r\n };\r\n\r\n async function popularProduto(prod_id, editar = false, prg_id = null) {\r\n setExibirDetalhes(true);\r\n let dadosTemp = {};\r\n let listaprecoItem = null;\r\n let total = 0;\r\n let dados = manutencao.dados;\r\n let custoProd = isObjetoDiffVazio(custo) && !!custo.key ? \"&custoTransferencia=\" + custo.key : \"\";\r\n let produtoGrade = !!prg_id ? `&IdGrade=${prg_id}` : (\"\");\r\n let produto = !!prod_id ? prod_id : (\"\");\r\n let grade = !!prg_id ? `&CodigoGrade=${prg_id}` : (\"\");\r\n let filtros = `idProduto=${produto}`;\r\n if (form.getFieldValue().cli_id !== null && form.getFieldValue().cli_id !== undefined && form.getFieldValue().cli_id !== '') {\r\n filtros += `&idCliente=${form.getFieldValue().cli_id}`;\r\n } if (dados !== null && (dados.cli_id !== null && dados.cli_id !== undefined && dados.cli_id !== '')) {\r\n filtros += dados.cli_id;\r\n }\r\n let lpc = (await api.get(`ListaPrecoCliente/ListarListaPrecoCliente?${filtros}`)).data;\r\n if (lpc != null && lpc != 0) {\r\n listaprecoItem = (await api.get(`ListaPrecoItem/BuscaPrecoItem?CodigoListaPreco=${lpc[0].ltp_id}&CodigoProduto=${produto}${grade}`)).data;\r\n }\r\n let res = await api.get(`Produto/BuscaProdutoPedido?IdProduto=${(!!prod_id ? prod_id : (!!dados.pro_id ? dados.pro_id : \"\"))}\r\n &ufDestino=${(!!dadosEndereco ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla)}&ufOrigem=${dadosContribuinte.est_sigla}${custoProd}${produtoGrade}`);\r\n if (lpc != null && listaprecoItem != null) {\r\n form.setFieldsValue({ ltp_id: lpc[0].ltp_id, ltp_nome: lpc[0].ltp_nome });\r\n res.data[0].dpr_precovenda = listaprecoItem.lpi_valorvenda;\r\n res.data[0].lpi_valorvenda = listaprecoItem.lpi_valorvenda;\r\n }\r\n if (res.status === 200) {\r\n let valorUnitario = 0;\r\n if (isObjetoDiffVazio(custo)) {\r\n valorUnitario = res.data[0].dpr_precovenda;\r\n } else {\r\n valorUnitario = res.data[0].lpi_valorvenda > 0 ? res.data[0].lpi_valorvenda : res.data[0].dpr_precovenda;\r\n }\r\n if (!editar) {\r\n form.setFieldsValue({ pdi_quantidade: 1 });\r\n form.setFieldsValue({ pdi_valorunitario: valorUnitario });\r\n form.setFieldsValue({ pdi_valortotal: valorUnitario });\r\n form.setFieldsValue({ valorItemDesconto: valorUnitario });\r\n form.setFieldsValue({ pro_descricao: res.pro_descricao });\r\n } else {\r\n valorUnitario = dados.pdi_valorunitario;\r\n total = valorUnitario * dados.pdi_quantidade;\r\n form.setFieldsValue({ pdi_quantidade: dados.pdi_quantidade });\r\n form.setFieldsValue({ pdi_valorunitario: valorUnitario });\r\n form.setFieldsValue({ pdi_valortotal: total });\r\n form.setFieldsValue({ valorItemDesconto: total - dados.pdi_valordesconto });\r\n form.setFieldsValue({ pdi_valorfrete: dados.pdi_valorfrete });\r\n form.setFieldsValue({ pdi_valoracrescimo: dados.pdi_valoracrescimo });\r\n form.setFieldsValue({ desconto: dados.pdi_valordesconto });\r\n form.setFieldsValue({ percdesc: dados.percdesc });\r\n form.setFieldsValue({ pro_descricao: res.pro_descricao });\r\n }\r\n form.setFieldsValue({ prg_id: prg_id });\r\n dadosTemp.prg_id = prg_id;\r\n dadosTemp.pro_descricao = res.data[0].pro_descricao;\r\n dadosTemp.pro_codigo = res.data[0].pro_codigo;\r\n if (res.data[0].pro_ean) {\r\n dadosTemp.pro_ean = res.data[0].pro_ean;\r\n } else {\r\n dadosTemp.pro_ean = res.data[0].prg_ean;\r\n }\r\n dadosTemp.ncm_codigo = res.data[0].ncm_codigo;\r\n dadosTemp.ump_id = res.data[0].ump_id;\r\n dadosTemp.pro_id = res.data[0].pro_id;\r\n dadosTemp.pdi_valorunitario = valorUnitario;\r\n setDadosDetalhes(dadosTemp);\r\n return true;\r\n }\r\n else {\r\n console.log(res.data);\r\n }\r\n };\r\n\r\n async function carregarParametrosLocal(item, listaItens, lista) {\r\n const codigo = item.pro_id\r\n const codigoGrade = item.prg_id\r\n const quantidade = item.pdi_quantidade\r\n let resParams = await api.get(`ParametroLocal/BuscarParametros`);\r\n if (resParams.status == 200) {\r\n let paramsEstoque = resParams.data.par_avisoestoqueinsuficiente;\r\n let dados = lista.filter(item => item.key === form.getFieldValue().pro_id || item.pro_id === form.getFieldValue().pro_id)[0];\r\n var dadosIncluido = listaItens\r\n .filter((prod) => (prod.pro_id === dados.pro_id && (!!!dados.prg_id || dados.prg_id === prod.prg_id)))\r\n .reduce((total, prod) => total + prod.pdi_quantidade, 0);\r\n\r\n if (paramsEstoque === null) {\r\n return;\r\n }\r\n\r\n let resEstoque = await api.get(`Estoque/BuscarEstoqueProduto?codigoProduto=${codigo}` + (codigoGrade ? `&codigoGrade=${codigoGrade}` : ''))\r\n let estoque = resEstoque.data.valorTotal;\r\n\r\n let valorEstoque = calcularValorEstoque(estoque, dadosIncluido, quantidade);\r\n\r\n return new Promise((resolve, reject) => {\r\n if (valorEstoque <= 0) {\r\n estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n }\r\n }\r\n\r\n function calcularValorEstoque(estoque, dadosIncluido, quantidade) {\r\n if (dadosIncluido !== 0) {\r\n var novosDadosIncluido = dadosIncluido + quantidade\r\n }\r\n if (novosDadosIncluido > estoque) {\r\n return estoque - novosDadosIncluido;\r\n } else if (quantidade > estoque) {\r\n return estoque - quantidade;\r\n } else {\r\n return estoque\r\n }\r\n }\r\n\r\n function estoqueInsuficiente(paramsEstoque, valorEstoque, resolve, reject) {\r\n if (paramsEstoque === 0) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar?`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n resolve();\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 1) {\r\n Modal.confirm({\r\n title: 'Aviso!',\r\n icon: ,\r\n content: `Este produto está sem estoque disponível (Estoque: ${valorEstoque}). Deseja continuar? Será solicitado uma senha Gerencial!`,\r\n okText: 'Continuar',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n setAbreModalLiberacao(true);\r\n setLiberacaoSenha({ resolve, reject });\r\n },\r\n onCancel() {\r\n reject();\r\n }\r\n });\r\n } else if (paramsEstoque === 2) {\r\n Modal.warning({\r\n title: 'Atenção Sistema de Controle de Estoque!',\r\n icon: ,\r\n content: `Produto com estoque ${valorEstoque}, sistema está configurado para bloquear vendas de produtos sem estoque!`,\r\n centered: true,\r\n onOk() {\r\n reject();\r\n }\r\n });\r\n }\r\n }\r\n\r\n const onCloseModalLiberacao = (aprovado) => {\r\n setAbreModalLiberacao(false);\r\n if (aprovado && liberacaoSenha) {\r\n liberacaoSenha.resolve();\r\n } else if (liberacaoSenha) {\r\n liberacaoSenha.reject();\r\n }\r\n setLiberacaoSenha(null);\r\n };\r\n\r\n async function adicionarItem(item = {}) {\r\n let dadosFormulario = form.getFieldValue();\r\n let possuiIe = dadosFormulario.pej_inscricaoestadual ? true : false;\r\n let cnpj = dadosFormulario?.cnpj || '';\r\n let cpf = dadosFormulario?.cpf || '';\r\n let fisicaJuridica = cnpj.length === 14 ? 2 : cpf.length === 11 ? 1 : 3;\r\n let p = dadosProdutoImpostos;\r\n let aliquota = !!p.aliquotaIssqn ? p.aliquotaIssqn : 0;\r\n\r\n if (p.pro_produto) {\r\n if (p.ncm_ativo == false) {\r\n notification.warning({ message: 'Aviso!', description: 'NCM do produto está inativo na base de dados do SEFAZ, altere o NCM no cadastro do produto para seguir com a operação!' });\r\n return;\r\n }\r\n if (!!!p.iod_ufdestino) {\r\n notification.warning({ message: 'Aviso!', description: 'Não encontrado Dados de Origem e Destino no cadastro de tributação para o UF destino, verifique no cadastro de tributação do produto' });\r\n return;\r\n }\r\n }\r\n let impostos = await CalcularImpostoItem(p.orm_id, p.cst_id, p.cso_id, p.iod_uforigem, p.iod_ufdestino, form.getFieldValue().pdi_quantidade, form.getFieldValue().pdi_valorunitario, 0, 0,\r\n 0, p.iod_percicms, p.iod_percdiferimentoicms, p.iod_percicmsreducaobc, p.mva_percaliquotaicms, p.mva_percmva, p.mva_percaliquotaicmsreducao, p.mva_ajustado, p.ncm_percentual, fisicaJuridica,\r\n 0, possuiIe, dadosFormulario.ped_indicadorpresenca, false, false, p.pro_servico, aliquota)\r\n let dadosItens = [...dadosTabela.dadosItens];\r\n let lista = [...listaSelectProd];\r\n if (!buscarProdutosCodBarra) {\r\n if (btnEditando.editando) {\r\n item = dadosItens.filter((prod) => (prod.pdi_numeroitem === dadosFormulario.pdi_numeroitem))[0];\r\n } else {\r\n item = { ...item, ...dadosFormulario, ...dadosDetalhes };\r\n }\r\n }\r\n if (!btnEditando.editando) {\r\n try {\r\n await carregarParametrosLocal(item, dadosItens, lista);\r\n } catch (error) {\r\n return;\r\n }\r\n }\r\n if (!!validarItem(dadosFormulario)) {\r\n let dados = lista.filter(item => item.key === form.getFieldValue().pro_id || item.pro_id === form.getFieldValue().pro_id)[0];\r\n if (dadosFormulario.pdi_numeroitem !== undefined && btnEditando.editando) {\r\n var dadosEditando = dadosItens.filter((prod) => (prod.pdi_numeroitem === dadosFormulario.pdi_numeroitem))[0];\r\n } else {\r\n var dadosEditando = dadosItens.filter((prod) => (prod.pro_id === dados.pro_id && (!!!dados.prg_id || dados.prg_id === prod.prg_id)))[0];\r\n }\r\n if (!!dadosEditando) {\r\n dadosEditando.impostos = impostos;\r\n dados = adicionarItemPedido(false, item, dadosEditando);\r\n if (!!btnEditando && btnEditando.editando) {\r\n dados = adicionarItemPedido(true, item, dadosEditando);\r\n btnEditando.setEditando(false);\r\n if (dados.pdi_numeroitem === undefined) {\r\n dados.pdi_numeroitem = dadosItens.length;\r\n }\r\n alterarItem(dados, dadosItens, dadosEditando)\r\n } else {\r\n if (buscarProdutosCodBarra) {\r\n dados.pdi_numeroitem = dadosItens.length + 1;\r\n incluirItem(dados, dadosItens);\r\n } else {\r\n Modal.confirm({\r\n title: 'Atualizar?',\r\n icon: ,\r\n content: 'Item já cadastrado na nota, deseja atualizar suas informações?',\r\n okText: 'Atualizar',\r\n cancelText: 'Incluir',\r\n centered: true,\r\n onOk() {\r\n dados = adicionarItemPedido(true, item, dadosEditando);\r\n alterarItem(dados, dadosItens, dadosEditando);\r\n },\r\n onCancel() {\r\n dados.pdi_numeroitem = dadosItens.length + 1;\r\n incluirItem(dados, dadosItens)\r\n }\r\n })\r\n };\r\n }\r\n } else {\r\n item.impostos = impostos;\r\n dados = adicionarItemPedido(false, item, dados);\r\n dados.pdi_numeroitem = dadosItens.length + 1;\r\n incluirItem(dados, dadosItens)\r\n }\r\n setDesabilitarProd_id(false);\r\n setDadosDetalhes({});\r\n setExibirDetalhes(false);\r\n limparCampos();\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n\r\n function validarItem(dados) {\r\n if (parseFloat(form.getFieldValue().pdi_quantidade) === 0) {\r\n notification.warning({ description: 'Quantidade de itens deve ser maior que zero!', message: 'Aviso' });\r\n return false;\r\n }\r\n if (parseFloat(dados.valorItemDesconto) === 0 || parseFloat(dados.valorUnitario) === 0) {\r\n notification.warning({ description: 'Valor do item deve ser maior que zero!', message: 'Aviso' });\r\n return false\r\n }\r\n return true;\r\n };\r\n\r\n function incluirItem(dados, dadosItens) {\r\n dadosItens.push(dados);\r\n dadosItens.sort((a, b) => b.pdi_numeroitem - a.pdi_numeroitem)\r\n dadosTabela.setDadosItens(dadosItens);\r\n notification.success({ message: 'Aviso', description: 'Item incluído com sucesso!' });\r\n }\r\n\r\n function alterarItem(dados, dadosItens, dadosEditando) {\r\n let indice = dadosItens.findIndex((item) => (item === dadosEditando));\r\n dadosItens.splice(indice, 1, { ...dados });\r\n dadosTabela.setDadosItens(dadosItens);\r\n notification.success({ message: 'Aviso', description: 'Item editado com sucesso!' });\r\n };\r\n\r\n function adicionarItemCodBarras() {\r\n let listaItens = [...dadosTabela.dadosItens];\r\n let codigoProduto = form.getFieldValue().pro_codigo;\r\n let dados = listaItens.find((item) => item.pro_ean == codigoProduto);\r\n if (!!dados) {\r\n dados.pdi_quantidade += 1;\r\n let valorTotal = dados.pdi_quantidade * dados.pdi_valorunitario;\r\n let valorDesc = valorTotal * (dados.percdesc / 100);\r\n dados.valorItemDesconto = valorTotal - valorDesc;\r\n } else {\r\n dados = produtoBuscaEan;\r\n let listaDados = adicionarItemPedido(false, dados);\r\n listaDados.emp_id = dados.emp_id;\r\n listaDados.prg_ean = dados.prg_ean;\r\n listaItens.push(listaDados);\r\n dadosTabela.setDadosItens(listaItens)\r\n }\r\n cancelar();\r\n };\r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, icm_id: null });\r\n };\r\n\r\n function adicionarItemPedido(editando = false, item, dadosEditando) {\r\n let itemPedido = {};\r\n let formulario = form.getFieldValue();\r\n let valorSt = 0;\r\n if (editando) {\r\n if (isObjetoDiffVazio(dadosEditando.impostos)) {\r\n valorSt = dadosEditando.impostos.retornoICMSST.ret_valorIcmsSt;\r\n }\r\n itemPedido = {\r\n ...dadosEditando,\r\n impostos: dadosEditando.impostos,\r\n iod_uforigem: dadosEditando.iod_uforigem,\r\n iod_ufdestino: dadosEditando.iod_ufdestino,\r\n orm_id: dadosEditando.orm_id,\r\n ltp_id: dadosEditando.ltp_id,\r\n pdi_quantidade: parseFloat(!!formulario.pdi_quantidade ? formulario.pdi_quantidade : (!!item.pdi_quantidade ? item.pdi_quantidade : 1)),\r\n pdi_valorunitario: parseFloat(formulario.pdi_valorunitario),\r\n percdesc: parseFloat(!!formulario.percdesc ? formulario.percdesc : 0),\r\n pdi_valordesconto: parseFloat(!!formulario.desconto ? formulario.desconto : 0),\r\n pdi_valoracrescimo: parseFloat(!!formulario.acrescimo ? formulario.acrescimo : 0),\r\n valorItemDesconto: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt)),\r\n pdi_valortotal: parseFloat(formulario.pdi_valortotal),\r\n pdi_valorfrete: parseFloat(formulario.pdi_valorfrete ?? 0),\r\n pro_codigo: item.pro_codigo,\r\n pro_id: item.pro_id,\r\n pro_descricao: item.pro_descricao,\r\n pro_ean: item.pro_ean,\r\n prg_id: item.prg_id,\r\n pdi_basecalculoicms: 0,\r\n pdi_basecalculoicmsst: 0,\r\n pdi_basecalculoipi: 0,\r\n pdi_percentualicms: 0,\r\n pdi_percentualicmsst: 0,\r\n pdi_percentualipi: 0,\r\n descricaograde: dadosEditando.descricaograde\r\n }\r\n } else {\r\n if (isObjetoDiffVazio(item.impostos)) {\r\n valorSt = item.impostos.retornoICMSST.ret_valorIcmsSt;\r\n }\r\n itemPedido = {\r\n impostos: item.impostos,\r\n iod_ufdestino: item.iod_ufdestino,\r\n iod_uforigem: item.iod_uforigem,\r\n orm_id: item.orm_id,\r\n ltp_id: item.ltp_id,\r\n pdi_quantidade: parseFloat(!!formulario.pdi_quantidade ? formulario.pdi_quantidade : (!!item.pdi_quantidade ? item.pdi_quantidade : 1)),\r\n pdi_valorunitario: parseFloat(formulario.pdi_valorunitario),\r\n percdesc: parseFloat(!!formulario.percdesc ? formulario.percdesc : 0),\r\n pdi_valordesconto: parseFloat(formulario.desconto),\r\n valorItemDesconto: parseFloat(parseFloat(formulario.valorItemDesconto) + parseFloat(valorSt) ?? 0),\r\n pdi_valorfrete: parseFloat(formulario.pdi_valorfrete ?? 0),\r\n pdi_valoracrescimo: parseFloat(formulario.acrescimo ?? 0),\r\n pdi_valortotal: parseFloat(formulario.pdi_valortotal),\r\n pro_codigo: !!item.pro_codigo ? item.pro_codigo : item.pro_codigo,\r\n pro_id: !!item.pro_id ? item.pro_id : dadosProduto.pro_id,\r\n pro_descricao: item.pro_descricao,\r\n pro_ean: item.pro_ean,\r\n prg_id: item.prg_id,\r\n pdi_basecalculoicms: 0,\r\n pdi_basecalculoicmsst: 0,\r\n pdi_basecalculoipi: 0,\r\n pdi_percentualicms: 0,\r\n pdi_percentualicmsst: 0,\r\n pdi_percentualipi: 0,\r\n pdi_numeroitem: !!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 ? dadosTabela.dadosItens.length + 1 : 1,\r\n descricaograde: item.descricaograde,\r\n ncm_percentual: item.ncm_percentual,\r\n cso_id: item.cso_id ?? dadosProdutoImpostos.cso_id,\r\n cst_id: item.cst_id ?? dadosProdutoImpostos.cst_id,\r\n }\r\n }\r\n setProdutoBuscaEan(itemPedido);\r\n return itemPedido;\r\n };\r\n\r\n async function buscarProdutoCodBarra(campo) {\r\n let dados = await api.get(`Produto/ListaProdutoCodigo?filtro=${campo.target.value.trim()}`);\r\n if (dados.data?.length > 1) {\r\n setListaDadosProdModal(dados.data);\r\n setAbrirModalListaProd(true);\r\n } else {\r\n buscarDadosProdutoPedido(dados.data[0].pro_id);\r\n form.setFieldsValue({ pro_id: dados.data[0].pro_id });\r\n let retOk = await popularProduto(dados.data[0].pro_id, false, dados.data[0].prg_id);\r\n if (retOk) {\r\n setProdutoBuscaEan(dados.data[0]);\r\n setLiberadoParaIncluir(true);\r\n } else {\r\n cancelar();\r\n }\r\n }\r\n };\r\n\r\n async function buscaPrecoListaPrecoSelecionada(dados) {\r\n let proId = null\r\n let prg = null;\r\n if (dados === undefined || dados.pro_id == null || isNaN(dados.pro_id)) {\r\n proId = dadosProduto.pro_id;\r\n prg = dadosProduto.prg_id;\r\n } else {\r\n proId = dados.pro_id;\r\n prg = dados.prg_id;\r\n }\r\n let filtros = `&CodigoProduto=${proId}`;\r\n filtros += !!prg ? `&CodigoGrade=${prg}` : \"\";\r\n let listaPreco = !!form.getFieldValue().ltp_id ? form.getFieldValue().ltp_id : (dados.ltp_id ? dados.ltp_id : \"\");\r\n let dadosPreco = await api.get(`ListaPrecoItem/BuscaPrecoItem?CodigoListaPreco=${listaPreco}${filtros}`);\r\n if (dadosPreco.data) {\r\n // Verificar se dadosPreco.data.lpi_valorvenda é um número\r\n let valorUnitario = parseFloat(dadosPreco.data.lpi_valorvenda);\r\n let quantidade = parseFloat(form.getFieldValue().pdi_quantidade);\r\n if (isNaN(valorUnitario) || isNaN(quantidade)) {\r\n console.error('Valor unitário ou quantidade não são números válidos:', {\r\n valorUnitario,\r\n quantidade\r\n });\r\n return;\r\n }\r\n // Definir os valores no formulário\r\n form.setFieldsValue({\r\n pdi_valorunitario: valorUnitario,\r\n pdi_valortotal: quantidade * valorUnitario,\r\n });\r\n alterarValorTotal();\r\n } else {\r\n notification.warning({ description: 'Item não encontrado na lista de preço selecionada!', message: 'Aviso' });\r\n }\r\n }\r\n\r\n async function buscarDadosProdImpostos(produto) {\r\n let prod = !!produto.pro_id ? produto.pro_id : form.getFieldValue().pro_id;\r\n let ope = form.getFieldValue().ope_id;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let res = await api.get(`Produto/BuscarDadosProduto?IdProduto=${prod}&ufDestino=${!!dadosEndereco ? dadosEndereco.est_sigla : dadosContribuinte.est_sigla}`\r\n + `&operacaoCodigo=${ope}&ufOrigem=${dadosContribuinte.est_sigla}&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}`\r\n + `&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}&destinoOperacao=${destinoOperacao}&indicadorPresenca=0`\r\n );\r\n if (res.status == 200) {\r\n let dados = res.data[0];\r\n setDadosProdutoImpostos(dados);\r\n setDadosDetalhes(dados);\r\n\r\n let filtros = !!prod ? `idProduto=${prod}` : '';\r\n filtros += !!produto.prg_id ? `&idProdutoGrade=${produto.prg_id}` : '';\r\n filtros += !!form.getFieldValue().cli_id ? `&idCliente=${form.getFieldValue().cli_id}` : '';\r\n let listaPrecoTemp = (await api.get(`ListaPreco/ListaPrecoPadraoProduto?${filtros}`)).data;\r\n form.setFieldsValue({ ltp_id: listaPrecoTemp[0]?.ltp_id });\r\n }\r\n };\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n buscarDadosProdImpostos(dados);\r\n\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n prg_id: dados.prg_id,\r\n descricaograde: dados.descricaograde,\r\n key: dados.key,\r\n lpi_id: dados.lpi_id,\r\n lpi_valorvenda: dados.lpi_valorvenda,\r\n pdi_numeroitem: dados.pdi_numeroitem,\r\n pdi_quantidade: dados.pdi_quantidade,\r\n pdi_valordesconto: dados.pdi_valordesconto,\r\n pdi_valorfrete: dados.pdi_valorfrete,\r\n pdi_valoracrescimo: dados.pdi_valoracrescimo,\r\n pdi_valortotal: dados.pdi_valortotal,\r\n pdi_valorunitario: dados.pdi_valorunitario,\r\n percdesc: dados.percdesc,\r\n prg_codigoetiqueta: dados.prg_codigoetiqueta,\r\n prg_ean: dados.prg_ean,\r\n pro_codigo: dados.pro_codigo,\r\n pro_codigoetiqueta: dados.pro_codigoetiqueta,\r\n pro_descricao: dados.pro_descricao,\r\n pro_ean: dados.pro_ean,\r\n pro_kitcomposicao: dados.pro_kitcomposicao,\r\n pro_referencia: dados.pro_referencia,\r\n pro_usabalanca: dados.pro_usabalanca,\r\n pro_usagrade: dados.pro_usagrade,\r\n ump_casasdecimais: dados.ump_casasdecimais,\r\n ump_id: dados.ump_id,\r\n valorItemDesconto: dados.valorItemDesconto\r\n });\r\n dadosTemp = { dados };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n {!!consultaProduto === false &&\r\n
\r\n \r\n { buscarProduto(dados) }}\r\n ordem={\"pro_descricao\"}\r\n setListaDados={setListaSelectProd} />\r\n \r\n \r\n }\r\n {!!consultaProduto &&\r\n \r\n \r\n {\r\n buscarProdutoCodBarra(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao} {!!dadosDetalhes.descricaograde ? dadosDetalhes.descricaograde : ''}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {!!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean}\r\n \r\n \r\n NCM: {dadosDetalhes.ncm_codigo}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n buscaPrecoListaPrecoSelecionada(valor.ltp_id)} conteudo={\r\n lp => ({lp.ltp_id} - {lp.ltp_nome})\r\n } allowClear />\r\n \r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n \r\n {!isObjetoDiffVazio(custo) && \r\n (calculaDesconto('PERC'))}\r\n />\r\n }\r\n {!isObjetoDiffVazio(custo) && \r\n (calculaDesconto('VALOR'))} />\r\n }\r\n {!isObjetoDiffVazio(custo) && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { cancelar(); setAbrirModalManutencaoNota(false); }} dadosContribuinte={dadosContribuinte} dadosOperacao={dadosOperacao} dadosEndereco={dadosEndereco} dadosProduto={dadosProduto} />\r\n { setAbrirModalListaProd(false); }} dadosItens={listaDadosProdModal} />\r\n \r\n \r\n );\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Select, Card, notification, Tooltip, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { InputPreco } from \"../../components\";\r\nimport { ModalGradeProduto, ModalManutencaoNota } from \"../modals\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { info, isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport SelectProduto from \"../selects/selectProduto\";\r\nimport { CalcularImpostoItem } from \"../../services/calculaImposto\";\r\n\r\nexport default function FiltroProdutoNtf({ form, dadosTabela, dadosEndereco = {}, dadosOperacao = {}, dadosNfeTransferencia, validarTransporte }) {\r\n\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [abrirModalGrade, setAbrirModalGrade] = useState(false);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [dadosGrade, setDadosGrade] = useState([]);\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [consultaProduto, setConsultaProduto] = useState(null);\r\n const [dadosCfop, setDadosCfop] = useState([]);\r\n const [abrirModalManutencaoNota, setAbrirModalManutencaoNota] = useState(false);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [dadosContribuinte, setDadosContribuinte] = useState({});\r\n const [tributacaoIcms, setTributacaoIcms] = useState([]);\r\n const [listaItens, setListaItens] = useState([]);\r\n const codBarras = useRef();\r\n const togglePesquisa = () => {\r\n setConsultaProduto(!consultaProduto);\r\n };\r\n\r\n useEffect(() => {\r\n popularDadosContribuintes();\r\n buscarDadosCfop();\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!!dadosContribuinte && isObjetoDiffVazio(dadosContribuinte)) {\r\n if (!!manutencao.dados && !!manutencao.dados.ped_id) {\r\n incluirProdutoExterno();\r\n }\r\n }\r\n }, [dadosContribuinte]);\r\n\r\n useEffect(() => {\r\n if (consultaProduto && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }, [consultaProduto]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!dadosContribuinte && isObjetoDiffVazio(dadosContribuinte) && !!manutencao.dados.pro_id) {\r\n let prod = listaItens.find(p => p.pro_id == manutencao.dados.pro_id && (manutencao.dados.prg_id == null || manutencao.dados.prg_id == p.prg_id));\r\n form.setFieldsValue({ pro_id: prod.key });\r\n abrirEditarItem(prod);\r\n }\r\n }, [manutencao]);\r\n\r\n async function incluirProdutoExterno() {\r\n let listaItens = [];\r\n let custo = !!dadosNfeTransferencia.dadosNfeTransferencia && !!dadosNfeTransferencia.dadosNfeTransferencia.custo ? dadosNfeTransferencia.dadosNfeTransferencia.custo.key : 1;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n for (let [idx, itens] of dadosTabela.dadosItens.entries()) {\r\n let dadosItem = await api.get(`Produto/BuscarDadosProdutoTransferencia?codigoProduto=${itens.pro_id}&destinoOperacao=${destinoOperacao}®imeTributarioEmpresa=${dadosContribuinte.emp_regimetributario}`\r\n + `&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}&tipoCusto=${custo}&ufDestino=${dadosEndereco.est_sigla}&codigoProdutoGrade=${itens.prg_id}`\r\n + `&ufOrigem=${dadosContribuinte.est_sigla}`);\r\n let icm_id = null;\r\n let tributacaoIcms = await api.get(`TributacaoIcms/ListarTributacaoIcmsOrigemDestinoProduto?codigoProduto=${itens.pro_id}&ufDestino=${dadosEndereco.est_sigla}&ufOrigem=${dadosContribuinte.est_sigla}`);\r\n if (tributacaoIcms.status === 200) {\r\n tributacaoIcms.data.forEach((icm) => {\r\n if (!!icm.classeProduto) {\r\n icm_id = icm;\r\n }\r\n });\r\n }\r\n if (dadosItem.status === 200) {\r\n dadosItem = dadosItem.data;\r\n let prodNota = {};\r\n if (!!icm_id && JSON.stringify(icm_id) !== '{}' && !!icm_id.icm_id) {\r\n prodNota.icm_id = icm_id;\r\n prodNota.cso_id = icm_id.cso_id;\r\n prodNota.cst_id = icm_id.cst_id;\r\n prodNota.icm_descricao = icm_id.icm_descricao;\r\n prodNota.iod_id = icm_id.iod_id;\r\n prodNota.iod_percdiferimentoicms = icm_id.iod_percdiferimentoicms;\r\n prodNota.iod_percicms = icm_id.iod_percicms;\r\n prodNota.iod_percicmsreducaobc = icm_id.iod_percicmsreducaobc;\r\n prodNota.iod_ufdestino = icm_id.iod_ufdestino;\r\n prodNota.iod_uforigem = icm_id.iod_uforigem;\r\n }\r\n prodNota.pro_id = itens.pro_id;\r\n prodNota.prg_id = !!itens.prg_id ? itens.prg_id : null;\r\n prodNota.nfi_cfop = dadosItem.cfo_cfop;\r\n prodNota.nfi_qtde = itens.nfi_qtde;\r\n prodNota.nfi_numeroitem = dadosTabela.dadosItens.length + 1;\r\n prodNota.nfi_valorunitario = parseFloat(itens.nfi_valorunitario);\r\n prodNota.total = parseFloat(itens.nfi_valorunitario) * parseFloat(itens.nfi_qtde);\r\n prodNota.percdesc = parseFloat(!!itens.percdesc ? itens.percdesc : 0);\r\n prodNota.nfi_valordesconto = parseFloat(!!itens.nfi_valordesconto ? itens.nfi_valordesconto : 0);\r\n prodNota.percacresc = parseFloat(!!itens.percacresc ? itens.percacresc : 0);\r\n prodNota.nfi_valoroutros = parseFloat(!!itens.nfi_valoroutros ? itens.nfi_valoroutros : 0);\r\n prodNota.nfi_informacaoadicional = '';\r\n prodNota.cfo_cfop = dadosItem.cfo_cfop;\r\n prodNota.cfo_descricao = dadosItem.cfo_descricao;\r\n prodNota.cfo_id = dadosItem.cfo_id;\r\n prodNota.nfi_ean = itens.nfi_ean;\r\n prodNota.nfi_unidademedida = dadosItem.ump_id;\r\n prodNota.pro_codigo = itens.pro_codigo;\r\n prodNota.pro_descricao = itens.pro_descricao;\r\n prodNota.pro_ean = dadosItem.pro_ean;\r\n prodNota.ump_id = dadosItem.ump_id;\r\n prodNota.nfi_numeropedidocompra = !!itens.nfi_numeropedidocompra ? itens.nfi_numeropedidocompra : null;\r\n prodNota.nfi_ncm = dadosItem.ncm_codigo;\r\n prodNota.ncm_id = dadosItem.ncm_id;\r\n listaItens.push(prodNota)\r\n if (idx === dadosTabela.dadosItens.length - 1) {\r\n dadosTabela.setDadosItens(listaItens);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function buscarDadosCfop() {\r\n api.get(`Cfop/ListarCfopTipo?tipoCfopFim=8000&tipoCfopIni=1000`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosCfop(res.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n async function buscarDadosProdutoNotaTransf(incluir = false, possuiGrade = false) {\r\n let listaProdutos = [...listaItens];\r\n let produto = listaProdutos.filter(pro => pro.key === form.getFieldValue().pro_id)[0];\r\n let custo = !!dadosNfeTransferencia.dadosNfeTransferencia && !!dadosNfeTransferencia.dadosNfeTransferencia.custo ? dadosNfeTransferencia.dadosNfeTransferencia.custo.key : 1;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let parametros = `IdProduto=${produto.pro_id}&destinoOperacao=${destinoOperacao}&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}`;\r\n parametros += `&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}&tipoCusto=${custo}&ufDestino=${dadosEndereco.est_sigla}&ufOrigem=${dadosContribuinte.est_sigla}`;\r\n parametros += !!produto.prg_id ? `&codigoProdutoGrade=${produto.prg_id}` : '';\r\n api.get(`Produto/BuscarDadosProdutoTransferencia?${parametros}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n let dadosProduto = res.data;\r\n let icm_id = null;\r\n api.get(`TributacaoIcms/ListarTributacaoIcmsOrigemDestinoProduto?codigoProduto=${dadosProduto.pro_id}&ufDestino=${dadosEndereco.est_sigla}&ufOrigem=${dadosContribuinte.est_sigla}`).then(\r\n tributacaoIcms => {\r\n if (tributacaoIcms.status === 200) {\r\n tributacaoIcms.data.forEach((icm) => {\r\n if (!!icm.icm_id) {\r\n icm_id = icm;\r\n }\r\n });\r\n setTributacaoIcms(tributacaoIcms.data);\r\n }\r\n form.setFieldsValue({ nfi_cfop: dadosProduto.cfo_cfop });\r\n if (!!icm_id && JSON.stringify(icm_id) !== '{}' && !!icm_id.icm_id) {\r\n dadosProduto.icm_id = icm_id.icm_id;\r\n dadosProduto.cso_id = icm_id.cso_id;\r\n dadosProduto.cst_id = icm_id.cst_id;\r\n dadosProduto.icm_descricao = icm_id.icm_descricao;\r\n dadosProduto.iod_id = icm_id.iod_id;\r\n dadosProduto.iod_percdiferimentoicms = icm_id.iod_percdiferimentoicms;\r\n dadosProduto.iod_percicms = icm_id.iod_percicms;\r\n dadosProduto.iod_percicmsreducaobc = icm_id.iod_percicmsreducaobc;\r\n dadosProduto.iod_ufdestino = icm_id.iod_ufdestino;\r\n dadosProduto.iod_uforigem = icm_id.iod_uforigem;\r\n\r\n form.setFieldsValue({ icm_id: icm_id.icm_id });\r\n }\r\n\r\n setDadosProduto(dadosProduto);\r\n\r\n if ((!!dadosProduto.icm_id === false) || (!!dadosProduto.ncm_id === false) || (!!dadosProduto.ump_id === false) || (!!dadosProduto.pro_descricao === false)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if ((!!dadosProduto.iod_ufdestino) === false) {\r\n setAbrirModalManutencaoNota(true);\r\n } else {\r\n setarCfopCorrespondenteTributacaoICMS(dadosProduto);\r\n }\r\n\r\n if (dadosProduto.pre_custoultimacompra === 0 && !possuiGrade) { //validação é feita na grade quando possuir\r\n info(\"Não foi possivel localizar o \" + dadosNfeTransferencia.dadosNfeTransferencia.custo.value + \" do item \" + dadosProduto.pro_descricao + \", selecione OUTRO CUSTO e informe o produto novamente!\");\r\n return;\r\n }\r\n\r\n form.setFieldsValue({ quantidade: 1, valorUnitario: dadosProduto.pre_custoultimacompra, valorTotalItem: dadosProduto.pre_custoultimacompra });\r\n\r\n if (incluir) {\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n adicionarItemNotaTransferencia(false, dadosProduto, null, dadosProduto.prg_id, () => {\r\n dadosTemp.push(dadosProduto);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n limparCampos();\r\n if (consultaProduto && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n });\r\n } else {\r\n setExibirDetalhes(true);\r\n let dadosTemp = {};\r\n dadosTemp.prg_id = dadosProduto.prg_id;\r\n dadosTemp.pro_descricao = dadosProduto.pro_descricao;\r\n dadosTemp.pro_codigo = dadosProduto.pro_codigo;\r\n dadosTemp.pro_ean = dadosProduto.pro_ean;\r\n dadosTemp.prg_ean = dadosProduto.prg_ean;\r\n dadosTemp.ncm_codigo = dadosProduto.ncm_codigo;\r\n dadosTemp.ump_id = dadosProduto.ump_id;\r\n dadosTemp.descricaograde = dadosProduto.descricaograde;\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n }\r\n )\r\n }\r\n }\r\n ).catch(error => console.log(error));\r\n };\r\n\r\n function setarCfopCorrespondenteTributacaoICMS(dadosProduto) {\r\n var cfoCfop = \"\";\r\n if (dadosContribuinte.emp_regimetributario === 3) {\r\n if (dadosProduto.cst_id === \"00\" || dadosProduto.cst_id === \"20\" || dadosProduto.cst_id === \"40\" || dadosProduto.cst_id === \"41\" || dadosProduto.cst_id === \"50\" || dadosProduto.cst_id === \"51\" || dadosProduto.cst_id === \"90\") {\r\n if (dadosContribuinte.loc_tipocontribuinte === 1 || dadosContribuinte.loc_tipocontribuinte === 4) {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5152\";\r\n } else {\r\n cfoCfop = \"6152\";\r\n }\r\n } else {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5151\";\r\n }\r\n else {\r\n cfoCfop = \"6151\";\r\n }\r\n }\r\n } else if (dadosProduto.cst_id === \"10\" || dadosProduto.cst_id === \"30\" || dadosProduto.cst_id === \"60\" || dadosProduto.cst_id === \"70\") {\r\n if (dadosContribuinte.loc_tipocontribuinte === 1 || dadosContribuinte.loc_tipocontribuinte === 4) {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5409\";\r\n } else {\r\n cfoCfop = \"6409\";\r\n }\r\n } else {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5408\";\r\n }\r\n else {\r\n cfoCfop = \"6408\";\r\n }\r\n }\r\n }\r\n } else {\r\n if (dadosProduto.cso_id === \"101\" || dadosProduto.cso_id === \"102\" || dadosProduto.cso_id === \"103\" || dadosProduto.cso_id === \"300\" || dadosProduto.cso_id === \"400\" || dadosProduto.cso_id === \"900\") {\r\n if (dadosContribuinte.loc_tipocontribuinte === 1 || dadosContribuinte.loc_tipocontribuinte === 4) {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5152\";\r\n }\r\n else {\r\n cfoCfop = \"6152\";\r\n }\r\n }\r\n else {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5151\";\r\n }\r\n else {\r\n cfoCfop = \"6151\";\r\n }\r\n }\r\n } else if (dadosProduto.cso_id === \"201\" || dadosProduto.cso_id === \"202\" || dadosProduto.cso_id === \"203\" || dadosProduto.cso_id === \"500\") {\r\n if (dadosContribuinte.loc_tipocontribuinte === 1 || dadosContribuinte.loc_tipocontribuinte === 4) {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5409\";\r\n }\r\n else {\r\n cfoCfop = \"6409\";\r\n }\r\n }\r\n else {\r\n if (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) {\r\n cfoCfop = \"5408\";\r\n }\r\n else {\r\n cfoCfop = \"6408\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n dadosCfop.map((cfop) => {\r\n if (cfoCfop === cfop.cfo_cfop) {\r\n form.setFieldsValue({ nfi_cfop: cfop.cfo_cfop });\r\n }\r\n });\r\n };\r\n\r\n function popularDadosContribuintes(callback) {\r\n api.get(`dadosContribuinte/Buscar`).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n setDadosContribuinte(res.data);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function alterarValorTotal() {\r\n let total = 0;\r\n total = form.getFieldValue().quantidade * form.getFieldValue().valorUnitario;\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n };\r\n\r\n async function buscarProduto(key) {\r\n let produtos = [...listaItens];\r\n let produto = produtos.filter((produto) => (produto.key === key))[0];\r\n let custo = !!dadosNfeTransferencia.dadosNfeTransferencia && !!dadosNfeTransferencia.dadosNfeTransferencia.custo ? dadosNfeTransferencia.dadosNfeTransferencia.custo.key : 1;\r\n let params = `&apenasAtivas=true&tipoCusto=${custo}`;\r\n let grade = await api.get(`ProdutoGrade/ListarGradesProdutos?codigoProduto=${produto.pro_id}${params}`);\r\n buscarDadosProdutoNotaTransf(false);\r\n\r\n };\r\n\r\n function salvarDadosGradeModal() {\r\n let produtosSelec = [...dadosTabela.dadosItens];\r\n let produtoGrade = dadosGrade.filter((produto) => { return produto.quantidade > 0; });\r\n produtoGrade.map((item) => {\r\n let dados = { ...dadosProduto };\r\n adicionarItemNotaTransferencia(false, dados, item, null, () => { produtosSelec.push(dados) });\r\n });\r\n dadosTabela.setDadosItens(produtosSelec);\r\n cancelar();\r\n };\r\n\r\n function abrirEditarItem(prodSelecionado) {\r\n setExibirDetalhes(true);\r\n let itemDaLista = [...dadosTabela.dadosItens].find(p => p.pro_id == prodSelecionado.pro_id && (prodSelecionado.prg_id == null || prodSelecionado.prg_id == p.prg_id))\r\n form.setFieldsValue({ quantidade: itemDaLista.nfi_qtde });\r\n form.setFieldsValue({ valorUnitario: itemDaLista.nfi_valorunitario });\r\n form.setFieldsValue({ valorTotalItem: itemDaLista.total });\r\n form.setFieldsValue({ nfi_cfop: itemDaLista.nfi_cfop });\r\n form.setFieldsValue({ icm_id: itemDaLista.icm_id });\r\n form.setFieldsValue({ prg_id: itemDaLista.prg_id });\r\n form.setFieldsValue({ informacaoAdicional: itemDaLista.nfi_informacaoadicional });\r\n api.get(`TributacaoIcms/ListarTributacaoIcmsOrigemDestinoProduto?codigoProduto=${prodSelecionado.pro_id}&ufDestino=${dadosEndereco.est_sigla}&ufOrigem=${dadosContribuinte.est_sigla}`).then(\r\n (tributacaoIcms) => {\r\n if (tributacaoIcms.status === 200) {\r\n setTributacaoIcms(tributacaoIcms.data);\r\n }\r\n }\r\n ).catch(\r\n (erro) => {\r\n console.log(erro);\r\n }\r\n );\r\n let dadosTemp = {};\r\n dadosTemp.prg_id = prodSelecionado.prg_id;\r\n dadosTemp.pro_descricao = prodSelecionado.pro_descricao;\r\n dadosTemp.pro_codigo = prodSelecionado.pro_codigo;\r\n dadosTemp.pro_ean = prodSelecionado.pro_ean;\r\n dadosTemp.prg_ean = prodSelecionado.prg_ean;\r\n dadosTemp.ncm_codigo = prodSelecionado.ncm_codigo;\r\n dadosTemp.prg_ean = prodSelecionado.prg_ean;\r\n dadosTemp.descricaograde = prodSelecionado.descricaograde;\r\n dadosTemp.ump_id = prodSelecionado.ump_id;\r\n setDadosDetalhes(dadosTemp);\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: null } });\r\n return;\r\n };\r\n\r\n function adicionarItem() {\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n let dados = {};\r\n if (dadosTemp.find(campo => (campo.pro_id === form.getFieldValue().pro_id || campo.pro_codigo === form.getFieldValue().pro_codigo)\r\n && ((!!form.getFieldValue().prg_id && form.getFieldValue().prg_id === campo.prg_id) || !form.getFieldValue().prg_id))) {\r\n if (!!form.getFieldValue().nfi_cfop && !!form.getFieldValue().icm_id) {\r\n if (!!form.getFieldValue().prg_id) {\r\n dados = dadosTemp.find(campo => campo.prg_id === form.getFieldValue().prg_id);\r\n } else {\r\n dados = dadosTemp.find(campo => campo.pro_id === form.getFieldValue().pro_id || campo.pro_codigo === form.getFieldValue().pro_codigo);\r\n }\r\n adicionarItemNotaTransferencia(true, dados);\r\n if (!dadosTemp[0].nfi_valorfrete || !dadosTemp[0].nfi_valoroutros) {\r\n validarTransporte(dadosTemp);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n }\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP e Tributação ICMS são obrigatórios!' });\r\n return;\r\n }\r\n } else {\r\n if (!!form.getFieldValue().nfi_cfop && !!form.getFieldValue().icm_id) {\r\n dados = { ...dadosProduto };\r\n adicionarItemNotaTransferencia(false, dados, null, dados.prg_id, () => {\r\n dadosTemp.push(dados);\r\n if (!dadosTemp[0].nfi_valorfrete || !dadosTemp[0].nfi_valoroutros) {\r\n validarTransporte(dadosTemp);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n }\r\n });\r\n } else {\r\n notification.warning({ message: 'Aviso', description: 'Campo CFOP e Tributação ICMS são obrigatórios!' });\r\n return;\r\n }\r\n }\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n };\r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_codigo: null, pro_id: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, nfi_cfop: null, icm_id: null });\r\n };\r\n\r\n async function adicionarItemNotaTransferencia(editar = false, prodNota, dadosGrade, prg_id, callback) {\r\n let formulario = form.getFieldValue();\r\n if (!editar) {\r\n let produtos = [...listaItens];\r\n let produto = produtos.filter((produto) => (produto.key === formulario.pro_id))[0];\r\n prodNota.nfi_ean = !!produto.prg_ean ? produto.prg_ean : produto.pro_ean;\r\n prodNota.nfi_unidademedida = produto.ump_id;\r\n prodNota.pro_codigo = produto.pro_codigo;\r\n prodNota.pro_descricao = produto.pro_descricao;\r\n prodNota.pro_ean = produto.pro_ean;\r\n prodNota.grade = produto.descricaograde;\r\n prodNota.ump_id = produto.ump_id;\r\n prodNota.ump_casasdecimais = produto.ump_casasdecimais;\r\n prodNota.prg_id = produto.prg_id;\r\n }\r\n if (!(!!prodNota.icm_id) || prodNota.icm_id !== formulario.icm_id) {\r\n let icms = tributacaoIcms.filter((icms) => (icms.icm_id === formulario.icm_id))[0];\r\n prodNota.icm_id = icms.icm_id;\r\n prodNota.icm_descricao = icms.icm_descricao;\r\n prodNota.cst_id = icms.cst_id;\r\n prodNota.cso_id = icms.cso_id;\r\n }\r\n if (!(!!prodNota.cfo_cfop) || prodNota.nfi_cfop !== formulario.nfi_cfop) {\r\n let cfop = dadosCfop.filter((cfop) => (cfop.cfo_cfop === formulario.nfi_cfop))[0];\r\n prodNota.nfi_cfop = cfop.cfo_cfop;\r\n prodNota.cfo_cfop = cfop.cfo_cfop;\r\n prodNota.cfo_descricao = cfop.cfo_descricao;\r\n prodNota.cfo_id = cfop.cfo_id;\r\n }\r\n prodNota.nfi_qtde = formulario.quantidade;\r\n prodNota.nfi_valorunitario = parseFloat(!!formulario.valorUnitario ? formulario.valorUnitario : 0);\r\n prodNota.quantidade = formulario.quantidade;\r\n prodNota.vlr_valorunitario = parseFloat(!!formulario.valorUnitario ? formulario.valorUnitario : 0);\r\n prodNota.total = parseFloat(prodNota.nfi_qtde * prodNota.nfi_valorunitario).toFixed(2);\r\n prodNota.percdesc = parseFloat(!!formulario.percdesc ? formulario.percdesc : 0);\r\n prodNota.nfi_valordesconto = parseFloat(!!formulario.desconto ? formulario.desconto : 0);\r\n prodNota.percacresc = parseFloat(!!formulario.percacresc ? formulario.percacresc : 0);\r\n prodNota.nfi_valoroutros = parseFloat(!!formulario.acrescimo ? formulario.acrescimo : 0);\r\n prodNota.nfi_numeroitem = !!prodNota.nfi_numeroitem ? prodNota.nfi_numeroitem : dadosTabela.dadosItens.length + 1;\r\n prodNota.nfi_valorfrete = 0;\r\n prodNota.nfi_valorseguro = 0;\r\n let valorCalculadoIPI = 0;\r\n let valorCalculadoIMS = 0;\r\n let ipi = null;\r\n let icms = null;\r\n let diferimento = null;\r\n let icmst = null;\r\n let possuiIe = !!formulario.pej_inscricaoestadual ? true : false;\r\n let impostos = await CalcularImpostoItem(\r\n prodNota.orm_id, prodNota.cst_id, prodNota.cso_id, prodNota.iod_uforigem, prodNota.iod_ufdestino,\r\n prodNota.quantidade, prodNota.vlr_valorunitario, prodNota.nfi_valorfrete, prodNota.nfi_valoroutros, prodNota.nfi_valordesconto, prodNota.iod_percicms,\r\n prodNota.iod_percdiferimentoicms, prodNota.iod_percicmsreducaobc, prodNota.mva_percaliquotaicms, prodNota.mva_percmva, prodNota.mva_percaliquotaicmsreducao,\r\n prodNota.mva_ajustado, prodNota.ncm_percentual,\r\n 2, //pessoa juridica transferencia\r\n 0, // não é consumidor final\r\n possuiIe,\r\n prodNota.ope_indicadorpresenca\r\n );\r\n\r\n ipi = impostos.retornoIPI;\r\n icms = impostos.retornoICMS;\r\n diferimento = impostos.retornoDiferimento;\r\n icmst = impostos.retornoICMSST;\r\n prodNota.npi_valorbcipi = !!ipi ? ipi.baseIPI : 0;\r\n //prodNota.npi_percaliquotaipi = prodNota.ncm_percentual * 100;\r\n prodNota.npi_percaliquotaipi = prodNota.ncm_percentual;\r\n prodNota.npi_valoripi = !!ipi ? ipi.valorIPI : 0;\r\n prodNota.nig_valorbc = !!icms ? icms.baseICMS : 0;\r\n\r\n prodNota.nig_valorIcms = !!icms ? icms.ret_valorIcms : 0;\r\n\r\n prodNota.nig_percicms = prodNota.iod_percicms;\r\n prodNota.nig_percreducaobc = prodNota.iod_percicmsreducaobc;\r\n prodNota.nig_percmvast = prodNota.mva_percmva;\r\n prodNota.nig_percreducaobcst = prodNota.mva_percaliquotaicmsreducao;\r\n prodNota.nig_valorbcst = !!icmst ? icmst.baseICMSST : 0;\r\n prodNota.nig_percicmsst = prodNota.mva_percaliquotaicms;\r\n prodNota.nig_valoricmsst = !!icmst ? icmst.ICMSST : 0;\r\n prodNota.nig_valoricmsoperacao = !!icms ? icms.ICMS : 0;\r\n prodNota.nig_percicmsdiferimento = prodNota.iod_percdiferimentoicms;\r\n prodNota.nig_valoricmsdiferimento = !!diferimento ? diferimento.valorICMSDiferido : 0;\r\n if (editar) {\r\n prodNota.nfi_informacaoadicional = prodNota.informacaoAdicional;\r\n } else {\r\n prodNota.nfi_informacaoadicional = !!prodNota.grade ? prodNota.grade : \"\" + \" \" + (!!prodNota.nfi_informacaoadicional ? prodNota.nfi_informacaoadicional : \"\");\r\n }\r\n if (!!callback) {\r\n callback();\r\n }\r\n };\r\n\r\n function error(mensagem, title = 'Atenção!') {\r\n Modal.error({\r\n title: title,\r\n content: (\r\n
\r\n

{mensagem}

\r\n
\r\n )\r\n });\r\n }\r\n\r\n async function buscarProdutoCodBarra(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let dados = await api.get(`Produto/ListaProdutoFiltro?filtro=${codigoEan}`);\r\n if (!!dados.data && dados.data.items.length > 0) {\r\n form.setFieldsValue({ pro_id: dados.data.items[0].pro_id });\r\n adicionarItemLeitorCodBarras(dados.data.items[0]);\r\n }\r\n if (!!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n };\r\n\r\n async function adicionarItemLeitorCodBarras(dadosProduto) {\r\n let formulario = form.getFieldValue();\r\n let dados = {};\r\n let dadosGrade = {};\r\n let dadosTemp = [...dadosTabela.dadosItens];\r\n let custo = !!dadosNfeTransferencia.dadosNfeTransferencia && !!dadosNfeTransferencia.dadosNfeTransferencia.custo ? dadosNfeTransferencia.dadosNfeTransferencia.custo.key : 1;\r\n let destinoOperacao = (!!dadosEndereco.est_sigla && !!dadosContribuinte.est_sigla && (dadosEndereco.est_sigla === dadosContribuinte.est_sigla) ? '1' : '2');\r\n let parametros = `IdProduto=${dadosProduto.pro_id}&destinoOperacao=${destinoOperacao}&empresaEnquadramento=${dadosContribuinte.emp_regimetributario}`;\r\n parametros += `&tipoContribuinte=${dadosContribuinte.loc_tipocontribuinte}&tipoCusto=${custo}&ufDestino=${dadosEndereco.est_sigla}&ufOrigem=${dadosContribuinte.est_sigla}`;\r\n parametros += !!dadosProduto.prg_id ? `&codigoProdutoGrade=${dadosProduto.prg_id}` : '';\r\n await api.get(`Produto/BuscarDadosProdutoTransferencia?${parametros}`).then(\r\n res => {\r\n if (res.status === 200) {\r\n let dadostributacao = res.data;\r\n if ((!!dadostributacao.icm_id === false) || (!!dadostributacao.ncm_id === false) || (!!dadostributacao.ump_id === false) || (!!dadosProduto.pro_descricao === false)) {\r\n setAbrirModalManutencaoNota(true);\r\n } else if ((!!dadostributacao.iod_ufdestino) === false) {\r\n setAbrirModalManutencaoNota(true);\r\n } else {\r\n setarCfopCorrespondenteTributacaoICMS(dadostributacao);\r\n }\r\n if (!!dadosProduto.prg_id) {\r\n api.get(`ProdutoGrade/ListarGradesProdutos?apenasAtivas=true&codigoProduto=${dadosProduto.pro_id}&produtoGradeId=${dadosProduto.prg_id}&tipoCusto=${custo}`).then(\r\n resGrade => {\r\n if (resGrade.status === 200) {\r\n dadosGrade = resGrade.data;\r\n }\r\n }\r\n ).catch(error => console.log(error));\r\n }\r\n\r\n dados = dadosProduto;\r\n dados.orm_id = dadostributacao.orm_id;\r\n dados.iod_uforigem = dadosContribuinte.est_sigla;\r\n dados.iod_ufdestino = dadosEndereco.est_sigla;\r\n dados.icm_id = dadostributacao.icm_id;\r\n dados.icm_descricao = dadostributacao.icm_descricao;\r\n dados.cst_id = dadostributacao.cst_id;\r\n dados.ncm_id = dadostributacao.ncm_id;\r\n dados.ncm_codigo = dadostributacao.ncm_codigo;\r\n dados.cso_id = dadostributacao.cso_id;\r\n dados.nfi_cfop = dadostributacao.cfo_cfop;\r\n dados.cfo_cfop = dadostributacao.cfo_cfop;\r\n dados.cfo_descricao = dadostributacao.cfo_descricao;\r\n dados.cfo_id = dadostributacao.cfo_id;\r\n dados.nfi_ean = dadosProduto.pro_ean == null ? dadosProduto.prg_ean : dadosProduto.pro_ean;\r\n dados.pro_ean = dadosProduto.pro_ean == null ? \"\" : dadosProduto.pro_ean;\r\n dados.nfi_unidademedida = dadosProduto.ump_id;\r\n dados.nfi_qtde = 1;\r\n dados.nfi_valorunitario = dadostributacao.pre_custoultimacompra;\r\n\r\n dados.total = parseFloat(dados.nfi_qtde * dados.nfi_valorunitario).toFixed(2);\r\n dados.percdesc = parseFloat(!!formulario.percdesc ? formulario.percdesc : 0);\r\n dados.nfi_valordesconto = parseFloat(!!formulario.desconto ? formulario.desconto : 0);\r\n dados.percacresc = parseFloat(!!formulario.percacresc ? formulario.percacresc : 0);\r\n dados.nfi_valoroutros = parseFloat(!!formulario.acrescimo ? formulario.acrescimo : 0);\r\n dados.nfi_numeroitem = !!dadosTemp.nfi_numeroitem ? dadosTemp.nfi_numeroitem : dadosTemp.length + 1;\r\n dados.nfi_valorfrete = 0;\r\n dados.nfi_valorseguro = 0;\r\n dados.nfi_informacaoadicional = dadosProduto.descricaograde == null ? \"\" : dadosProduto.descricaograde;\r\n dados.grade = dadosProduto.descricaograde;\r\n dadosTemp.push(dados);\r\n\r\n setExibirDetalhes(false);\r\n dadosTabela.setDadosItens(dadosTemp);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n }\r\n }\r\n ).catch(error => console.log(error));\r\n }\r\n\r\n function aoSalvarModalManutencaoNota() {\r\n buscarDadosProdutoNotaTransf(false);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n {!!consultaProduto === false &&\r\n
\r\n \r\n { buscarProduto(dados) }}\r\n ordem={\"pro_descricao\"} setListaDados={setListaItens} />\r\n \r\n \r\n }\r\n {!!consultaProduto &&\r\n \r\n \r\n {\r\n buscarProdutoCodBarra(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao} {!!dadosDetalhes.descricaograde ? ' - ' + dadosDetalhes.descricaograde : ''}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {!!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean}\r\n \r\n \r\n NCM: {dadosDetalhes.ncm_codigo}\r\n \r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n { alterarValorTotal() }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { setAbrirModalGrade(false); salvarDadosGradeModal() }} dados={dadosGrade} dadosValidacao={dadosNfeTransferencia} />\r\n setAbrirModalManutencaoNota(false)} dadosContribuinte={dadosContribuinte} dadosOperacao={dadosOperacao} dadosEndereco={dadosEndereco} dadosProduto={dadosProduto} aoSalvar={aoSalvarModalManutencaoNota} />\r\n \r\n );\r\n\r\n}","import React, { useEffect, useRef, useState } from \"react\";\r\nimport { Col, Form, Row, Button, Input, InputNumber, Card, notification, Tooltip, Modal } from \"antd\";\r\nimport { SearchOutlined, BarcodeOutlined, PlusOutlined, CloseOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { ModalManutencaoNota } from \"../modals\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport { InputPreco, SelectProduto } from \"../../components\";\r\nimport { selectPaginadoActions } from \"../../actions\";\r\n\r\nexport default function FiltroProdutoOrcamento({ form, dadosTabela, dadosEndereco = {}, dadosOperacao = {}, btnEditando, itemEditando }) {\r\n\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [dadosDetalhes, setDadosDetalhes] = useState({});\r\n const [desabilitarProd_id, setDesabilitarProd_id] = useState(false);\r\n const [buscarProdutosCodBarra, setBuscarProdutosCodBarra] = useState(null);\r\n const [abrirModalManutencaoNota, setAbrirModalManutencaoNota] = useState(false);\r\n const [{ manutencao }, dispatch] = useStateValue();\r\n const [listaSelectProd, setListaSelectProd] = useState([]);\r\n const codBarras = useRef();\r\n\r\n useEffect(() => {\r\n if (btnEditando.editando && isObjetoDiffVazio(itemEditando)) {\r\n editandoItem(itemEditando);\r\n setExibirDetalhes(true);\r\n }\r\n }, [btnEditando]);\r\n\r\n useEffect(() => {\r\n if (buscarProdutosCodBarra && !!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }, [buscarProdutosCodBarra]);\r\n\r\n function carregarSelectPaginados() {\r\n let lista = [];\r\n if (!!form.getFieldValue().ltp_id)\r\n lista.push({ name: \"ltp_id\", campo: \"idLista\", value: form.getFieldValue().ltp_id });\r\n\r\n if (!!form.getFieldsValue().icm_id)\r\n lista.push({ name: \"icm_id\", campo: \"Codigo\", value: form.getFieldsValue().icm_id })\r\n\r\n if (!!form.getFieldsValue().pis_id)\r\n lista.push({ name: \"pis_id\", campo: \"Id\", value: form.getFieldsValue().pis_id })\r\n\r\n if (!!form.getFieldValue().ncm_id)\r\n lista.push({ name: \"ncm_id\", campo: \"IdNcm\", value: form.getFieldValue().ncm_id });\r\n\r\n if (lista.length > 0) dispatch({ type: selectPaginadoActions.CHANGE, data: lista });\r\n }\r\n\r\n async function onChangeProID(pro_id) {\r\n let listaItens = [...listaSelectProd]\r\n let produto = listaItens.filter(pro => pro.key === pro_id)[0];\r\n let filtros = !!produto.pro_id ? `idProduto=${produto.pro_id}` : '';\r\n filtros += !!produto.prg_id ? `&idProdutoGrade=${produto.prg_id}` : '';\r\n let listaPrecoTemp = (await api.get(`ListaPreco/ListaPrecoPadraoProduto?${filtros}`)).data;\r\n form.setFieldsValue({ ltp_id: listaPrecoTemp[0].ltp_id });\r\n produto.lpi_valorvenda = listaPrecoTemp[0].lpi_valorvenda;\r\n await popularFormProduto(produto);\r\n carregarSelectPaginados();\r\n };\r\n\r\n async function onPressEnterProCodigo(campo) {\r\n let codigoEan = campo.target.value.trim();\r\n let dadosRequisicao = await api.get(`Produto/ListaProdutoFiltro?filtro=${codigoEan}`);\r\n if (!!dadosRequisicao.data && dadosRequisicao.data.items.length > 0) {\r\n let dadosProduto = dadosRequisicao.data.items[0];\r\n await popularFormProduto(dadosProduto);\r\n adicionarItem(dadosProduto);\r\n if (!!codBarras && !!codBarras.current) {\r\n codBarras.current.focus();\r\n }\r\n }\r\n };\r\n\r\n const togglePesquisa = () => {\r\n setBuscarProdutosCodBarra(!buscarProdutosCodBarra);\r\n };\r\n\r\n function onChangeQuantidade() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onChangeValorUnitario() {\r\n recalcularValorTotal();\r\n };\r\n\r\n function onClickBtnCancelar() {\r\n cancelar();\r\n };\r\n\r\n function onClickBtnAdicionar() {\r\n adicionarItem();\r\n }\r\n\r\n function recalcularValorTotal() {\r\n let total = 0;\r\n total = parseFloat(parseFloat(form.getFieldValue().oit_qtde) * parseFloat(form.getFieldValue().oit_valorunitario));\r\n form.setFieldsValue({ valorTotalItem: total.toFixed(2) });\r\n };\r\n\r\n function cancelar() {\r\n setExibirDetalhes(false);\r\n setDadosDetalhes({});\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n if (btnEditando.editando) {\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n async function popularFormProduto(produto) {\r\n let valorVenda = (!!produto.lpi_valorvenda ? produto.lpi_valorvenda : 0);\r\n setExibirDetalhes(true);\r\n form.setFieldsValue({\r\n oit_qtde: 1,\r\n oit_valorunitario: valorVenda,\r\n valorTotalItem: valorVenda\r\n });\r\n setDadosDetalhes(produto);\r\n return produto;\r\n };\r\n\r\n function adicionarItem(item = {}) {\r\n let listaItens = [...dadosTabela.listaProduto];\r\n let dadosFormulario = form.getFieldValue();\r\n if (!buscarProdutosCodBarra) {\r\n if (btnEditando.editando) {\r\n item = listaItens.filter((prod) => (prod.numeroitem === dadosFormulario.numeroitem))[0];\r\n } else {\r\n item = { ...item, ...dadosFormulario, ...dadosDetalhes };\r\n }\r\n }\r\n let dados = {};\r\n if (!!validarItem(dadosFormulario)) {\r\n if (dadosFormulario.numeroitem !== undefined) {\r\n var dadosEditando = listaItens.filter((prod) => (prod.numeroitem === dadosFormulario.numeroitem))[0];\r\n } else {\r\n var dadosEditando = listaItens.filter((prod) => (prod.pro_id === item.pro_id && (!!!item.prg_id || item.prg_id === prod.prg_id)))[0];\r\n }\r\n if (!!dadosEditando) {\r\n dados = popularItemNota(false, item, dadosEditando, dados);\r\n if (!!btnEditando && btnEditando.editando) {\r\n dados = popularItemNota(true, item, dadosEditando, dados);\r\n btnEditando.setEditando(false);\r\n alterarItem(dados, listaItens, dadosEditando)\r\n } else {\r\n if (buscarProdutosCodBarra) {\r\n dados.numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens);\r\n } else {\r\n Modal.confirm({\r\n title: 'Atualizar?',\r\n icon: ,\r\n content: 'Item já cadastrado na nota, deseja atualizar suas informações?',\r\n okText: 'Atualizar',\r\n cancelText: 'Incluir',\r\n centered: true,\r\n onOk() {\r\n dados = popularItemNota(true, item, dadosEditando, dados);\r\n alterarItem(dados, listaItens, dadosEditando)\r\n },\r\n onCancel() {\r\n dados.numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens)\r\n }\r\n });\r\n }\r\n }\r\n } else {\r\n dados = popularItemNota(false, item, dados);\r\n dados.numeroitem = listaItens.length + 1;\r\n incluirItem(dados, listaItens)\r\n }\r\n setExibirDetalhes(false);\r\n setDesabilitarProd_id(false);\r\n limparCampos();\r\n btnEditando.setEditando(false);\r\n }\r\n };\r\n\r\n function validarItem(dados) {\r\n if (dados.quantidade === 0 || !!!dados.oit_qtde) {\r\n notification.warning({ message: 'Aviso!', description: 'Quantidade do Item Inválida!' });\r\n return false;\r\n }\r\n if (parseFloat(dados.oit_valorunitario) === 0 || dados.oit_valorunitario === null) {\r\n notification.warning({ message: 'Aviso!', description: 'Valor do Item Inválido!' });\r\n return false\r\n }\r\n return true;\r\n }\r\n\r\n function incluirItem(dados, listaItens) {\r\n listaItens.push(dados);\r\n dadosTabela.setListaProduto(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item incluído com sucesso!' });\r\n }\r\n\r\n function alterarItem(dados, listaItens, dadosEditando) {\r\n let indice = listaItens.findIndex((item) => (item === dadosEditando));\r\n listaItens.splice(indice, 1, { ...dados });\r\n dadosTabela.setListaProduto(listaItens);\r\n notification.success({ message: 'Aviso', description: 'Item editado com sucesso!' });\r\n }\r\n\r\n function popularItemNota(editando = false, item, dadosEditando) {\r\n let itemNota = {};\r\n let formulario = form.getFieldValue();\r\n if (editando) {\r\n itemNota = {\r\n ...dadosEditando,\r\n oit_qtde: parseFloat(!!formulario.oit_qtde ? formulario.oit_qtde : item.oit_qtde),\r\n oit_valorunitario: parseFloat(formulario.oit_valorunitario),\r\n };\r\n } else {\r\n itemNota = {\r\n pro_id: item.pro_id,\r\n prg_id: item.prg_id,\r\n oit_qtde: formulario.oit_qtde,\r\n numeroitem: !!dadosTabela.dadosItens && dadosTabela.dadosItens.length > 0 ? dadosTabela.dadosItens.length + 1 : 1,\r\n oit_valorunitario: parseFloat(formulario.oit_valorunitario ?? 0),\r\n prg_ean: item.prg_ean,\r\n pro_ean: item.pro_ean,\r\n ump_id: item.ump_id,\r\n pro_codigo: item.pro_codigo,\r\n pro_descricao: item.pro_descricao,\r\n pro_ean: item.pro_ean,\r\n ump_id: item.ump_id,\r\n grade: item.descricaograde,\r\n };\r\n }\r\n return itemNota;\r\n };\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ pro_id: null, pro_codigo: null, percdesc: 0, desconto: 0, percacresc: 0, acrescimo: 0, oit_qtde: 0 });\r\n };\r\n\r\n function editandoItem(dadosEditando) {\r\n let dadosTemp = {};\r\n let dados = dadosEditando;\r\n form.setFieldsValue({\r\n pro_id: dados.pro_id,\r\n prg_id: dados.prg_id,\r\n oit_qtde: dados.oit_qtde,\r\n oit_valorunitario: dados.oit_valorunitario,\r\n numeroitem: dados.numeroitem,\r\n valorTotalItem: dados.oit_qtde * dados.oit_valorunitario\r\n });\r\n dadosTemp = {\r\n prg_id: dadosEditando.prg_id,\r\n pro_descricao: dadosEditando.pro_descricao,\r\n pro_codigo: dadosEditando.pro_codigo,\r\n pro_ean: dadosEditando.pro_ean,\r\n prg_ean: dadosEditando.prg_ean,\r\n ump_id: dados.ump_id\r\n };\r\n setDadosDetalhes(dadosTemp);\r\n }\r\n\r\n return (\r\n
\r\n \r\n {!!!buscarProdutosCodBarra &&\r\n
\r\n \r\n { onChangeProID(dados) }} ordem={\"pro_descricao\"} setListaDados={setListaSelectProd} />\r\n \r\n \r\n }\r\n {!!buscarProdutosCodBarra &&\r\n \r\n \r\n {\r\n onPressEnterProCodigo(value)\r\n }} placeholder=\"Informe o Produto/Mercadoria\" />\r\n \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {exibirDetalhes &&\r\n
\r\n \r\n
\r\n Produto: {dadosDetalhes.pro_descricao} {!!dadosDetalhes.descricaograde ? dadosDetalhes.descricaograde : ''}\r\n \r\n \r\n Código Interno: {dadosDetalhes.pro_codigo}\r\n \r\n \r\n Código de Barras: {!!dadosDetalhes.prg_ean ? dadosDetalhes.prg_ean : dadosDetalhes.pro_ean}\r\n \r\n {/* \r\n NCM: {dadosDetalhes.ncm_codigo}\r\n */}\r\n \r\n }>\r\n \r\n \r\n \r\n \r\n { onChangeQuantidade() }} />\r\n \r\n \r\n \r\n onChangeValorUnitario()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { setAbrirModalManutencaoNota(false); }}dadosOperacao={dadosOperacao} dadosEndereco={dadosEndereco}\r\n />\r\n \r\n );\r\n}","import React from \"react\";\r\nimport { Button } from \"antd\";\r\nimport { EditOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from '../../state';\r\nimport { drawerActions } from \"../../actions\";\r\nimport { setTela } from \"../../services/auth\";\r\nimport { gravarTela } from \"../../services/navigation\";\r\n\r\nexport default function EditarTabela(props) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n\r\n function editarRegistroTab() {\r\n props.onClick();\r\n setTimeout(() => {\r\n let dados = {};\r\n let url = window.document.location.href;\r\n let nomeForm = url.substring(url.lastIndexOf('/'), url.length);\r\n dados = props.registro;\r\n dados.formulario = nomeForm;\r\n dados.editar = true;\r\n setTela(JSON.stringify(dados));\r\n setTimeout(() => {\r\n gravarTela(nomeForm, manutencao);\r\n }, 300);\r\n dispatch({ type: drawerActions.CHANGE, data: { showDrawer: true } });\r\n }, 200);\r\n };\r\n\r\n return (\r\n \r\n \r\n { setEmissor(event.target.value) }} />\r\n \r\n \r\n }\r\n {emissor === 0 &&\r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n {emissor === 1 &&\r\n \r\n prevValues.radioemissocheque !== currentValues.radioemissocheque}>\r\n \r\n \r\n { buscaDadosEmissorCheque(e.target.value) }}\r\n onChange={(event, type) => {\r\n atualizaDetalhes();\r\n setCpfCnpj(event.target.value);\r\n }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n { atualizaDetalhes() }} label=\"Conta Desde\" name=\"emissorclientedesde\" />\r\n \r\n \r\n \r\n }\r\n {(listaCheques.length === 0 && cliente.pes_id !== null) &&\r\n \r\n *Preencha os campos de quantidade e valor para apresentar os cheques\r\n \r\n }\r\n {cliente.pes_id !== null &&\r\n \r\n \r\n \r\n { popularCheque() }} />\r\n \r\n \r\n \r\n { popularCheque() }} />\r\n \r\n \r\n \r\n ({cta.ctc_id} - {cta.ctc_descricao})\r\n }\r\n />\r\n \r\n \r\n \r\n }\r\n {listaCheques.map(cheque => (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Cheque {cheque.sequencia} de {listaCheques.length}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n buscarBanco(valor)} id={`ban_id${cheque.sequencia}`} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n validarDigito(valor)} id={`chq_c1${cheque.sequencia}`} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n validarDigito(valor)} id={`chq_c2${cheque.sequencia}`} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n validarDigito(valor)} id={`chq_c3${cheque.sequencia}`} />\r\n \r\n \r\n \r\n { valorPorExtenso(`chq_valor${cheque.sequencia}`, `valorExtenso${cheque.sequencia}`) }} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!form.getFieldValue(`ban_id${cheque.sequencia}`) &&\r\n
\r\n Gestor Web\r\n
\r\n }\r\n {!!form.getFieldValue(`ban_id${cheque.sequencia}`) &&\r\n
\r\n \r\n {JSON.stringify(infoBanco) !== '{}' && !!infoBanco.ban_descricao ? infoBanco.ban_descricao : 'Banco Desconhecido'}\r\n
\r\n }\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!detalhesCheque.nomeemissor &&\r\n \r\n {detalhesCheque.nomeemissor}\r\n \r\n }\r\n {!!detalhesCheque.emissorclientedesde &&\r\n \r\n Cliente desde: {moment(detalhesCheque.emissorclientedesde).format('MM/YYYY')}\r\n \r\n }\r\n \r\n \r\n {!!detalhesCheque.cpfcnpjemissor &&\r\n \r\n CPF/CNPJ: {detalhesCheque.cpfcnpjemissor}\r\n \r\n }\r\n {!!detalhesCheque.rgieemissor &&\r\n \r\n RG/IE: {detalhesCheque.rgieemissor}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n}","import React from 'react';\r\nimport { Row, Col, Typography, Carousel } from 'antd';\r\nimport { EnvironmentOutlined, PhoneOutlined, DesktopOutlined } from '@ant-design/icons';\r\n\r\nimport \"./index.less\";\r\n\r\nexport default function SlideLogin() {\r\n\r\n return (\r\n
\r\n {/*
\r\n \r\n
\r\n \r\n \r\n \r\n www.gestorweb.com.br | (55) 3535-4900\r\n \r\n \r\n | Três de Maio - RS - 98910-000\r\n \r\n \r\n \r\n \r\n \r\n \r\n Copyright © Gestor Web 2022 - Todos os direitos reservados.\r\n \r\n \r\n \r\n \r\n */}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Card, Row, Col, Form, Input, Button, message, notification } from \"antd\";\r\nimport { DesktopOutlined, SendOutlined, CloudUploadOutlined, CloseOutlined } from '@ant-design/icons';\r\nimport Dragger from 'antd/lib/upload/Dragger';\r\nimport html2canvas from 'html2canvas';\r\n\r\nimport api from \"../../services/api\";\r\n\r\nexport default function AberturaChamado({ activeOpen, setActiveOpen }) {\r\n const [file, setFile] = useState([]);\r\n const [activeIndex, setActiveIndex] = useState(true);\r\n const [form] = Form.useForm();\r\n\r\n const props = {\r\n name: \"file\",\r\n multiple: true,\r\n onchange(info) {\r\n let { status } = info.file;\r\n if (status !== 'uploading') {\r\n console.log(info.file, info.fileList);\r\n }\r\n if (status === 'done') {\r\n message.success(`${info.file.name} file uploaded successfully.`);\r\n } else if (status === 'error') {\r\n message.error(`${info.file.name} file upload failed.`);\r\n }\r\n },\r\n beforeUpload(arquivo) {\r\n let arquivos = [...file];\r\n let reader = new FileReader();\r\n reader.readAsDataURL(arquivo);\r\n reader.onload = function () {\r\n let dados = {\r\n uid: file.length,\r\n status: 'done',\r\n data: reader.result,\r\n name: `Anexo${file.length}.jpeg`\r\n }\r\n arquivos.push(dados);\r\n setFile(arquivos);\r\n }\r\n }, before(e) {\r\n console.log('Dropped files', e.dataTransfer.files)\r\n }, onRemove(arquivo) {\r\n let listaArq = [...file];\r\n setFile(listaArq.filter((arq) => arq !== arquivo));\r\n\r\n }\r\n };\r\n\r\n const handleOnClickMinus = () => {\r\n setActiveIndex(!activeIndex);\r\n };\r\n\r\n const handleOnClickClose = () => {\r\n setActiveOpen(false);\r\n setActiveIndex(true);\r\n setFile([]);\r\n form.resetFields();\r\n };\r\n\r\n const abrirChamado = (value) => {\r\n let helpDesk = {};\r\n let dadosTicket = {};\r\n helpDesk.etapaChamado = 2;\r\n dadosTicket.origem_ticket = \"Gestor Web\";\r\n dadosTicket.ambiente = `Resolução da Tela: ${window.screen.availWidth} x ${window.screen.availHeight} \\n Sistema Operacional: ${getOS()}\\n Navegador: ${browser()}`;\r\n dadosTicket.url = '';\r\n dadosTicket.dados_console = console.error;\r\n dadosTicket.descricao = value.descricao;\r\n dadosTicket.anexos = popularAnexos();\r\n api.post(`HelpDesk/AbrirChamadoSoftDesk`, dadosTicket).then(\r\n res => {\r\n let dados = res.data;\r\n if (!!dados.chamadoAberto) {\r\n notification.success({ description: `Chamado aberto com sucesso, protocolo: ${dados.numeroProtocolo}`, message: 'Aviso' });\r\n }\r\n }\r\n ).catch(\r\n erro => {\r\n if (!!erro.response && !!erro.response.data && !!erro.response.data.message) {\r\n notification({ description: erro.response.data.message, message: 'Aviso' });\r\n }\r\n }\r\n ).finally(\r\n () => {\r\n handleOnClickClose();\r\n }\r\n )\r\n };\r\n\r\n function snapshoot() {\r\n setActiveIndex(false);\r\n setTimeout(() => {\r\n html2canvas(document.body).then((canvas) => {\r\n let arquivo = canvas.toDataURL('image/jpeg', 70 / 100);\r\n let anexos = [...file];\r\n anexos.push({ uid: file.length, status: 'done', data: arquivo, name: `Anexo${file.length}.jpeg` });\r\n setFile(anexos);\r\n setActiveIndex(true);\r\n });\r\n }, 500);\r\n };\r\n\r\n\r\n function getOS() {\r\n var userAgent = window.navigator.userAgent,\r\n platform = window.navigator.platform,\r\n macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],\r\n windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],\r\n iosPlatforms = ['iPhone', 'iPad', 'iPod'],\r\n os = null;\r\n\r\n if (macosPlatforms.indexOf(platform) !== -1) {\r\n os = 'Mac OS';\r\n } else if (iosPlatforms.indexOf(platform) !== -1) {\r\n os = 'iOS';\r\n } else if (windowsPlatforms.indexOf(platform) !== -1) {\r\n os = 'Windows';\r\n } else if (/Android/.test(userAgent)) {\r\n os = 'Android';\r\n } else if (!os && /Linux/.test(platform)) {\r\n os = 'Linux';\r\n }\r\n\r\n return os;\r\n };\r\n\r\n const browser = () => {\r\n\r\n let isOpera = (navigator.userAgent.indexOf(\"Opera\") != -1 || navigator.userAgent.indexOf('OPR') != -1);\r\n\r\n let isFirefox = navigator.userAgent.indexOf(\"Firefox\") != -1;\r\n\r\n let isSafari = navigator.userAgent.indexOf(\"Safari\") != -1;\r\n\r\n let isIE = (navigator.userAgent.indexOf(\"MSIE\") != -1) || (!!document.documentMode == true);\r\n\r\n let isEdge = !isIE && !!window.StyleMedia;\r\n\r\n let isChrome = navigator.userAgent.indexOf(\"Chrome\") != -1;\r\n\r\n return isOpera ? 'Opera' :\r\n isChrome ? 'Chrome' :\r\n isSafari ? 'Safari' :\r\n isFirefox ? 'Firefox' :\r\n isIE ? 'IE' :\r\n isEdge ? 'Edge' :\r\n \"Desconhecido\";\r\n };\r\n\r\n function popularAnexos() {\r\n let arquivos = [...file];\r\n let anexos = [];\r\n arquivos.forEach(arq => {\r\n let obj = {\r\n base64: arq.data,\r\n tipoArquivo: arq.data.split('data:')[1].split(';')[0],\r\n nome: arq.name\r\n }\r\n anexos.push(obj);\r\n });\r\n return anexos;\r\n };\r\n\r\n\r\n return (\r\n \r\n
\r\n \"Abrir ABERTURA DE CHAMADO\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n

\r\n \r\n

\r\n

\r\n Arraste seu Arquivo aqui...\r\n

\r\n
\r\n
\r\n \r\n {/* original */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Editar(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(1));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Excluir(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(2));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Duplicar(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(5));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Adicionar(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(21));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Imprimir(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(3));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Explorar(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(4));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Inutilizar(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(12));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function ImportarXML(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(6));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from \"antd\";\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function ConhecimentoDeTransporteButton(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(22));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function NotaFiscalButton(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(9));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function ManifestoEletronicoButton(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(22));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function EmitirNotaFiscal(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(10));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function CancelarEstorno(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(7));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function EmitirNotaFiscalTransferencia(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(11));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function LancamentoEntrada(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(13));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function LancamentoSaida(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(14));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function LancamentoSaida(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(15));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function Download(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(19));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function GerarEfdIcmsIpi(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(17));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function GerarEfdPisCofins(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(17));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Card, Button, Form, Input, notification, Alert } from \"antd\";\r\nimport { ArrowLeftOutlined, CheckOutlined, EyeOutlined, ShoppingOutlined, CloudUploadOutlined } from \"@ant-design/icons\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\nimport { getEmailUsuario, getStatusPlano, setStatusPlano } from \"../../services/auth\";\r\nimport { ModalPlano } from \"../../components/modals/\";\r\n\r\nexport default function Planos() {\r\n\r\n const [openModal, setOpenModal] = useState(false);\r\n const [recursosPlano, setRecursosPlano] = useState([]);\r\n const [alterarPlano, setAlterarPlano] = useState(false);\r\n const [listaPlanos, setListaPlanos] = useState([]);\r\n const [planoAtual, setPlanoAtual] = useState({});\r\n const [planoSelecionado, setPlanoSelecionado] = useState({});\r\n const [formAlterarPlano] = Form.useForm();\r\n const [status, setStatus] = useState(0);\r\n const enumStatus = {\r\n 'vencido': 0,\r\n 'semStatus': 1\r\n }\r\n\r\n useEffect(() => {\r\n listarPlanos();\r\n buscarStatus();\r\n }, []);\r\n\r\n function listarPlanos() {\r\n let lista = [];\r\n api.get(`LocalPlano/VerificarStatusPlano`).then(\r\n planoUsuario => {\r\n setPlanoAtual({ pla_nome: planoUsuario.data.plano.pla_nome, pla_valor: planoUsuario.data.plano.pla_valor, pla_id: planoUsuario.data.plano.pla_id, loc_id: planoUsuario.data.loc_id, lcp_id: planoUsuario.data.lcp_id });\r\n api.get(`Plano/ListarPlanosAtivos`).then(\r\n retornoPlanos => {\r\n retornoPlanos.data.items.forEach((listaPlano) => {\r\n let plano = listaPlano;\r\n plano.planoUsuario = false;\r\n if (plano.pla_id === planoUsuario.data.plano.pla_id) {\r\n plano.planoUsuario = true;\r\n };\r\n if (plano.pla_nivel >= planoUsuario.data.plano.pla_nivel) {\r\n lista.push(plano);\r\n }\r\n });\r\n lista.forEach((item) => {\r\n item.diferenciais = JSON.parse(item.pla_diferenciais);\r\n });\r\n lista = lista.reverse();\r\n setListaPlanos(lista);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n listarPlanoLocal();\r\n }\r\n );\r\n };\r\n\r\n function listarPlanoLocal() {\r\n let lista = [];\r\n api.get(`LocalPlano/RetornaPlanoLocal`).then(\r\n planoUsuario => {\r\n setPlanoAtual({ pla_nome: planoUsuario.data.plano.pla_nome, pla_valor: planoUsuario.data.plano.pla_valor, pla_id: planoUsuario.data.plano.pla_id, loc_id: planoUsuario.data.loc_id, lcp_id: planoUsuario.data.lcp_id });\r\n\r\n api.get(`Plano/ListarPlanosAtivos`).then(\r\n retornoPlanos => {\r\n retornoPlanos.data.items.forEach((listaPlano) => {\r\n let plano = listaPlano;\r\n plano.planoUsuario = false;\r\n if (plano.pla_id === planoUsuario.data.plano.pla_id) {\r\n plano.planoUsuario = true;\r\n };\r\n if (plano.pla_nivel >= planoUsuario.data.plano.pla_nivel) {\r\n lista.push(plano);\r\n }\r\n });\r\n lista.forEach((item) => {\r\n item.diferenciais = JSON.parse(item.pla_diferenciais);\r\n });\r\n lista = lista.reverse();\r\n setListaPlanos(lista);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n );\r\n };\r\n\r\n function buscarStatus() {\r\n let status = getStatusPlano();\r\n if (status === 'VENCIDO') {\r\n setStatusPlano(enumStatus.vencido);\r\n }\r\n }\r\n\r\n function confirmarMudancaPlano(values) {\r\n api.get(`Usuario/validaSenhaAtual?email=${getEmailUsuario()}&senhaAtual=${btoa(values.senhaUsuario)}`).then(senhaValida => {\r\n if (senhaValida.data) {\r\n api.post(`LocalPlano/mudarLocalPlanoUsuario?codigoLocalPlano=${planoAtual.lcp_id}&novoPlano=${planoSelecionado.pla_id}`).then(\r\n retornoMudancaPlano => {\r\n notification.success({ message: 'Seu plano foi alterado com sucesso', description: `Bem-vindo ao plano ${planoSelecionado.pla_nome}` });\r\n setAlterarPlano(false);\r\n listarPlanos();\r\n formAlterarPlano.resetFields();\r\n }\r\n ).catch(\r\n erro => {\r\n notification.warning({ message: 'Não foi possível mudar o plano', description: 'Tente mais tarde. Se o problema persistir contate o suporte do Gestor Web.' });\r\n }\r\n )\r\n } else {\r\n notification.error({ message: 'Senha inválida!', description: 'Verifique a senha informada.' });\r\n }\r\n }).catch(erro => {\r\n notification.error({ message: 'Senha inválida!', description: 'Verifique a senha informada.' });\r\n });\r\n };\r\n\r\n function realizarUpgrade(record) {\r\n api.put(`LocalPlano/MudarLocalPlanoUsuario?codigoLocalPlano=${planoAtual.lcp_id}&novoPlano=${record.pla_id}`).then(\r\n res => {\r\n notification.success({ description: 'Plano alterado com sucesso!', message: 'Aviso' });\r\n voltarHome();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function renovarPlano() {\r\n let plano = { ...planoAtual };\r\n api.put(`Plano/AlteraDataValidadePlano?codigoLocal=${plano.loc_id}`).then(\r\n res => {\r\n notification.success({ description: 'Plano renovado com sucesso!', message: 'Aviso' });\r\n voltarHome();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n function voltarHome() {\r\n window.location = '/Home#';\r\n };\r\n\r\n return (\r\n\r\n
\r\n {!!!alterarPlano &&\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Você possui o Plano:\r\n \r\n \r\n \r\n
\r\n \r\n {planoAtual.pla_nome}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {FormatNumber(planoAtual.pla_valor, true, false)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {listaPlanos.map((plano) => (\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {plano.pla_nome}\r\n \r\n
\r\n \r\n \r\n \r\n {/*
\r\n \r\n R$\r\n \r\n \r\n \r\n \r\n {FormatNumber(plano.pla_valor, true, false)}\r\n \r\n */}\r\n \r\n \r\n \r\n \r\n Por CNPJ\r\n \r\n \r\n {status === enumStatus.vencido && planoAtual.pla_id !== plano.pla_id && \r\n \r\n }\r\n {planoAtual.pla_id === plano.pla_id && }\r\n {status === enumStatus.semStatus && \r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n setOpenModal(false)} recursosPlano={recursosPlano} />\r\n \r\n }\r\n {!!alterarPlano &&\r\n
\r\n
\r\n \r\n
\r\n \r\n Para confirmar a mudança de plano é necessário informar sua senha.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n \r\n\r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button, Tooltip } from \"antd\";\r\n\r\nimport { AberturaChamado } from \"../../components\";\r\nimport { MdSupportAgent } from \"react-icons/md\";\r\n\r\nexport default function BotaoAbrirChamado() {\r\n\r\n const [activeOpen, setActiveOpen] = useState(false);\r\n\r\n const handleOnClickOpen = () => {\r\n setActiveOpen(true);\r\n }\r\n\r\n return (\r\n <>\r\n \r\n handleOnClickOpen()}\r\n style={{ color: \"white\", fontSize: '20px', verticalAlign: 'middle' }}\r\n title=\"Suporte\" // Adiciona o tooltip com a mensagem\r\n >\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import React, { createRef } from 'react';\r\nimport moment from 'moment';\r\nimport { Form, Input, message } from 'antd';\r\n\r\nexport default function DataHora(props) {\r\n function subtrairSomarDias(data, dias, soma) {\r\n if (soma) {\r\n return new Date(data.getTime() + (dias * 24 * 60 * 60 * 1000));\r\n } else {\r\n return new Date(data.getTime() - (dias * 24 * 60 * 60 * 1000));\r\n }\r\n }\r\n\r\n class NovaDataHora extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.inputRef = createRef();\r\n }\r\n\r\n // Função de validação para garantir que a data não seja menor que a atual\r\n validarData = (data) => {\r\n const { minDate, errorMessage } = this.props;\r\n const dataAtual = moment();\r\n \r\n if (data.isBefore(minDate)) {\r\n message.error(errorMessage || `A data não pode ser anterior a ${minDate.format('DD/MM/YYYY HH:mm')}`);\r\n return false; // Se a data for menor que a mínima, retorna falso\r\n }\r\n return true;\r\n };\r\n\r\n onChange = (e) => {\r\n const { value } = e.target;\r\n let data = moment(value, \"YYYY-MM-DDTHH:mm\", true); // Formato com data e hora\r\n\r\n if (data.isValid() && this.validarData(data)) {\r\n this.props.onChange(data);\r\n } else {\r\n this.props.onChange(null); // Ou você pode retornar uma mensagem de erro aqui\r\n }\r\n };\r\n\r\n onKeyUp = (e) => {\r\n let key = e.which || e.keyCode;\r\n let data = null;\r\n\r\n if (key === 68) { // Tecla 'D' - data atual\r\n data = new Date();\r\n }\r\n if (key === 79) { // Tecla 'O' - data anterior\r\n data = subtrairSomarDias(new Date(), 1, false);\r\n }\r\n if (key === 65) { // Tecla 'A' - data posterior\r\n data = subtrairSomarDias(new Date(), 1, true);\r\n }\r\n if (key === 73) { // Tecla 'I' - data inicial do mês\r\n let date = new Date();\r\n data = new Date(date.getFullYear(), date.getMonth(), 1);\r\n }\r\n if (key === 70) { // Tecla 'F' - data final do mês\r\n let date = new Date();\r\n data = new Date(date.getFullYear(), date.getMonth() + 1, 0);\r\n }\r\n\r\n if (!!data && this.validarData(moment(data))) {\r\n this.props.onChange(moment(data));\r\n }\r\n\r\n if (this.props.onKeyUp) {\r\n this.props.onKeyUp();\r\n }\r\n };\r\n\r\n onPressEnter = () => {\r\n const inputElement = this.inputRef.current.input;\r\n const form = inputElement.closest('form');\r\n if (form) {\r\n const inputs = Array.from(form.querySelectorAll('input'));\r\n const currentIndex = inputs.indexOf(inputElement);\r\n const nextInput = inputs[currentIndex + 1];\r\n if (nextInput) {\r\n nextInput.focus();\r\n }\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n if (this.props.onBlur) {\r\n this.props.onBlur();\r\n }\r\n };\r\n \r\n\r\n render() {\r\n const { value, disabled, format } = this.props;\r\n let data = value ? moment(value, format) : null;\r\n\r\n // Corrigindo para aceitar a hora corretamente no formato\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n class DataHoraInput extends React.Component {\r\n onChange = () => {\r\n if (this.props.onChange) {\r\n this.props.onChange();\r\n }\r\n };\r\n\r\n render() {\r\n const { name, label, initialValue, style, className, hidden, rules, minDate, errorMessage } = this.props;\r\n\r\n return (\r\n
\r\n
\r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n}\r\n","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Form, Modal, Drawer } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from '@ant-design/icons';\r\n\r\nimport ManutencaoClientes from '../../pages/clientes/manutencao';\r\n\r\nexport default function DrawerCliente({ openDrawer, setOpenDrawer, setCodigoCliente, dadosOrcamento }) {\r\n\r\n const [formulario] = Form.useForm();\r\n const nameForm = \"manutencaoCliente\"\r\n const [carregando, setCarregando] = useState(false);\r\n const [editando, setEditando] = useState(false);\r\n\r\n formulario.setFieldsValue({ cli_ativo: true });\r\n\r\n function fecharDrawer(idRetorno) {\r\n if (!!idRetorno) {\r\n setCodigoCliente(idRetorno);\r\n }\r\n formulario.resetFields();\r\n setOpenDrawer(false);\r\n };\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação e ignorar o que foi realizado até o momento?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n fecharDrawer();\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n )\r\n};","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Form, Select, Input } from \"antd\";\r\nimport { FormularioDinamico } from \"../../components\";\r\nimport api from \"../../services/api\";\r\n\r\nexport default function PesquisaCamposPersonalizados({formPesquisaAvancada, campoPerSelecionado, setCampoPerSelecionado, tipoFiltroPersonalizado, setTipoFiltroPersonalizado, tipoEntidade}) {\r\n const [condicao, setCondicao] = useState([]);\r\n const [camposPer, setCamposPer] = useState([]);\r\n\r\n function carregaCamposPersonalizados() {\r\n api.get(`CamposPersonalizados/ListarTodos?entidade=${tipoEntidade}&pagina=1&nroRegistros=1000&ordem=+cap_ordem`).then(res => {\r\n if (res.status === 200) {\r\n let key=0;\r\n res.data.dados.forEach((item) => (\r\n item.key = key++\r\n ))\r\n setCamposPer(res.data.dados);\r\n }\r\n }).catch(\r\n (erro) => {\r\n console.log(erro);\r\n alert('Erro ao carregar Campos personalizados!');\r\n }\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n api.get(`Enum/Listar?filtro=&nome=CondicaoFiltroCampoAdicional`).then(\r\n res => {\r\n setCondicao(res.data);\r\n }\r\n );\r\n carregaCamposPersonalizados();\r\n }, []);\r\n return (\r\n \r\n \r\n \r\n {\r\n return { label: `${item.cap_id} - ${item.cap_label}`, value: item.cap_id }\r\n })\r\n }\r\n onChange = {(valor) => {\r\n let campoPer = camposPer.filter(campo => campo.cap_id === valor)[0]\r\n if (!!campoPer){\r\n if (campoPer.cap_tipoelemento === 'select' || campoPer.cap_tipoelemento === 'dataPicker' || campoPer.cap_tipoelemento === 'checkbox'){\r\n setTipoFiltroPersonalizado(2);\r\n } else {\r\n setTipoFiltroPersonalizado(1); \r\n };\r\n setCampoPerSelecionado([campoPer]); \r\n } else\r\n setTipoFiltroPersonalizado(0);\r\n }}\r\n filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} />\r\n \r\n \r\n \r\n \r\n {\r\n return { label: `${item.value}`, value: item.key }\r\n })\r\n }\r\n filterOption={(input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0} />\r\n \r\n \r\n { tipoFiltroPersonalizado==1 && \r\n \r\n \r\n \r\n \r\n \r\n }\r\n { tipoFiltroPersonalizado==2 && \r\n \r\n }\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Button, Col, Form, Input, notification, Row, Select, Table } from \"antd\";\r\nimport { CloseOutlined, DeleteOutlined, PlusOutlined, SearchOutlined } from \"@ant-design/icons\";\r\nimport moment from \"moment\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { Data } from \"../../components\";\r\nimport { isNotNullOrEmpty } from \"../../services/funcoes\";\r\nimport apiWeb from \"../../services/apiWeb\";\r\n\r\n/**\r\n * Função de pesquisa avançada\r\n *\r\n * @param {Form} form Formulario onde serao setados \r\n * @param {function} funcaoRetorno Função onde será devolvida a expressao para enviar\r\n * @param {function} funcaoLimpar Função que sera executada ao limpar os filtros\r\n * @param {integer} telaFiltro Informe a tela a qual pertence a pesquisa (1-Cliente, 2-Produto, 3-Fornecedores, 4-Funcionarios, 5-Transportadores, 6-Vendedores, 7-Notas, 8-Condicionais, 9-Pedidos, 10-Peças Catalogo)\r\n * @param {boolean} retornarSempre Retorna sempre pelo funcaoRetorno mesmo não tendo expressão\r\n*/\r\n\r\nexport default function PesquisaAvancada({ form, funcaoRetorno, funcaoLimpar, telaFiltro, retornarSempre = false }) {\r\n const [listaCondicao, setListaCondicao] = useState([]);\r\n const [listaCondicaoReq, setListaCondicaoReq] = useState([]);\r\n const [listaCampos, setListaCampos] = useState([]);\r\n const [listaFiltros, setListaFiltros] = useState([]);\r\n const [ehBooleano, setEhBooleano] = useState(false);\r\n const [ehData, setEhData] = useState(false);\r\n\r\n //#region definições das contantes das listas de campos \r\n\r\n const listaCamposBooleano = [\r\n { key: 0 },\r\n { key: 5 },\r\n ];\r\n const listaCamposString = [\r\n { key: 0 },\r\n { key: 5 },\r\n { key: 6 },\r\n { key: 7 },\r\n { key: 8 }\r\n ];\r\n const listaCamposData = [\r\n { key: 0 },\r\n { key: 1 },\r\n { key: 2 },\r\n { key: 3 },\r\n { key: 4 },\r\n { key: 5 },\r\n { key: 8 }\r\n ]\r\n\r\n\r\n //#endregion\r\n\r\n useEffect(() => {\r\n popularListaCondicao();\r\n popularListaCampos();\r\n }, []);\r\n\r\n //#region funções para popular as constantes \r\n\r\n function popularListaCondicao() {\r\n apiWeb.get(`Enum/Listar?filtro=&nome=CondicaoFiltroCampoAdicional`).then(\r\n res => {\r\n setListaCondicaoReq(res.data);\r\n }\r\n );\r\n };\r\n\r\n function popularListaCampos() {\r\n apiWeb.get(`Enum/ListarFiltros?type=${telaFiltro}`).then(\r\n (res) => {\r\n let key = 0;\r\n res.data.forEach((campo) => {\r\n campo.key = key;\r\n key++;\r\n });\r\n setListaCampos(res.data);\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n )\r\n };\r\n\r\n //#endregion\r\n\r\n function adicionarFiltro() {\r\n let lista = [...listaFiltros];\r\n let dados = form.getFieldValue();\r\n if (validarFiltrosPreenchidos()) {\r\n let tipo = listaCampos.filter((campo) => campo.name === dados.campo)[0].type;\r\n let filtro = dados.filtro;\r\n if (tipo === 'DateTime') {\r\n filtro = moment(dados.filtro).format('YYYY-MM-DD');\r\n }\r\n \r\n let expressao = {\r\n key: lista.length,\r\n labelCampo: listaCampos.filter((campo) => campo.name === dados.campo)[0].label,\r\n campo: dados.campo,\r\n labelCondicao: listaCondicao.filter((condicao) => condicao.key === dados.condicao)[0].value,\r\n tipo: tipo,\r\n condicao: dados.condicao,\r\n filtro: filtro\r\n };\r\n lista.push(expressao);\r\n setListaFiltros(lista);\r\n limparCampos();\r\n }\r\n };\r\n\r\n function validarFiltrosPreenchidos() {\r\n let dados = form.getFieldValue();\r\n let retorno = false;\r\n if (!!dados.campo && isNotNullOrEmpty(dados.condicao) && !!dados.filtro) {\r\n retorno = true;\r\n } else {\r\n notification.warn({ description: \"Favor informe os dados para o filtro\", message: \"Aviso\" });\r\n }\r\n return retorno;\r\n };\r\n\r\n function aplicarFiltros() {\r\n let expressao = \"\";\r\n if (validarFiltrar()) {\r\n if (listaFiltros.length > 0) {\r\n expressao = JSON.stringify({ filtros: listaFiltros });\r\n } else {\r\n let dados = form.getFieldValue();\r\n expressao = JSON.stringify({ filtros: [{ campo: dados.campo, condicao: dados.condicao, filtro: dados.filtro, tipo: listaCampos.filter((campo) => campo.name === dados.campo)[0].type }] })\r\n }\r\n funcaoRetorno(expressao);\r\n } else {\r\n if (retornarSempre) {\r\n funcaoRetorno(null);\r\n } else {\r\n notification.warn({ description: 'Favor informar o filtro da pesquisa!', message: 'Aviso' });\r\n funcaoLimpar();\r\n }\r\n }\r\n };\r\n\r\n function validarFiltrar() {\r\n let dados = form.getFieldValue();\r\n let retorno = false;\r\n if (listaFiltros.length > 0 || !!dados.campo && !!dados.condicao && !!dados.filtro) {\r\n retorno = true;\r\n }\r\n return retorno;\r\n }\r\n\r\n function limparCampos() {\r\n form.setFieldsValue({ campo: null, condicao: null, filtro: null });\r\n };\r\n\r\n function removerFiltros() {\r\n setListaFiltros([]);\r\n funcaoLimpar();\r\n //dispatch({ type: listagemActions.CHANGE, data: { outrosFiltros: '', filtro: '', ordem: '+pes_nome' } });\r\n };\r\n\r\n function removerFiltroLista(record) {\r\n let lista = [...listaFiltros];\r\n let retorno = lista.filter((dados) => dados.key !== record.key);\r\n setListaFiltros(retorno);\r\n };\r\n\r\n function buscarCondicao(dados) {\r\n let lista = [...listaCondicaoReq];\r\n let campo = listaCampos.filter((campo) => campo.name == dados)[0];\r\n let booleano = false;\r\n let data = false;\r\n if (campo.type === \"Boolean\") {\r\n lista = lista.filter((condicao) => listaCamposBooleano.find(camposKey => camposKey.key === condicao.key));\r\n booleano = true;\r\n setListaCondicao(lista);\r\n } else if (campo.type === \"String\") {\r\n lista = lista.filter((condicao) => listaCamposString.find(camposKey => camposKey.key === condicao.key));\r\n setListaCondicao(lista);\r\n } else if (campo.type === \"DateTime\") {\r\n lista = lista.filter((condicao) => listaCamposData.find(camposKey => camposKey.key === condicao.key));\r\n data = true;\r\n setListaCondicao(lista);\r\n } else {\r\n setListaCondicao(listaCondicaoReq);\r\n }\r\n setEhData(data);\r\n setEhBooleano(booleano);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n { buscarCondicao(dados) }}\r\n >\r\n {listaCampos.map(\r\n (campo) => (\r\n {campo.label}\r\n )\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaCondicao.map(\r\n (condicao) => (\r\n {condicao.value}\r\n )\r\n )}\r\n \r\n \r\n \r\n \r\n {ehData ?\r\n :\r\n \r\n {ehBooleano ?\r\n :\r\n \r\n }\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {listaFiltros.length > 0 &&\r\n \r\n
\r\n
(\r\n
{labelCampo}
\r\n ),\r\n }, {\r\n title: \"Condição\",\r\n render: ({ labelCondicao }) => (\r\n
{labelCondicao}
\r\n ),\r\n }, {\r\n title: \"Filtro\",\r\n render: ({ filtro, tipo }) => (\r\n
{tipo === \"DateTime\" ? moment(filtro).format(\"DD/MM/YYYY\") : filtro}
\r\n ),\r\n }, {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n render: (record) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n );\r\n \r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Form, Input } from 'antd';\r\nimport { MaskedInput } from 'antd-mask-input';\r\n\r\nexport default function InputCep(props) {\r\n\r\n const mask = '00000-000';\r\n\r\n class NovoValor extends React.Component {\r\n\r\n onChange = (e, a) => {\r\n const { value } = e.target;\r\n let data = value;\r\n\r\n this.props.onChange(data.replace(/\\D/g, \"\"));\r\n };\r\n\r\n onBlur = (e) => {\r\n if (!!props.onBlur) {\r\n props.onBlur(e);\r\n }\r\n }\r\n\r\n onKeyUp = e => {\r\n if (!!props.onKeyUp) {\r\n props.onKeyUp(e);\r\n }\r\n }\r\n\r\n onPressEnter = (e) => {\r\n if (!!props.onPressEnter) {\r\n props.onPressEnter(e);\r\n }\r\n };\r\n\r\n onFocus = (e) => {\r\n if (!!props.onFocus) {\r\n props.onFocus(e);\r\n }\r\n };\r\n\r\n onKeyPress = (e) => {\r\n if (!!props.onKeyPress) {\r\n props.onKeyPress(e);\r\n }\r\n };\r\n\r\n render() {\r\n const { value } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n class InputCep extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: '' };\r\n }\r\n\r\n onChange = value => {\r\n this.setState({ value });\r\n if (!!props.onChange) {\r\n props.onChange();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};","import React, { useState } from \"react\";\r\nimport { Input, Form } from \"antd\";\r\n\r\n/*\r\n Ao utilizar o componente não setar valor para constantes como por exemplo setValorPedido(valor), pois isso fará com que o focus saia do input\r\n*/\r\n\r\nexport default function InputPercentual(props) {\r\n\r\n /* props.percent ou props.cifrao removido, pois ao tentar utilizar o backspace não funciona */\r\n function formatNumber(value) {\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n if (!(!!value) || isNaN(value)) {\r\n value = !!props.initialValue ? props.initialValue : '0.00';\r\n }\r\n value = parseFloat(value).toFixed(precisao);\r\n value += '';\r\n const list = value.split('.');\r\n const prefix = list[0].charAt(0) === '-' ? '-' : '';\r\n let num = prefix ? list[0].slice(1) : list[0];\r\n let result = '';\r\n while (num.length > 3) {\r\n result = `.${num.slice(-3)}${result}`;\r\n num = num.slice(0, num.length - 3);\r\n }\r\n if (num) {\r\n result = num + result;\r\n }\r\n return `${prefix}${result}${list[1] ? `,${list[1]}` : ',00'}`;\r\n }\r\n\r\n class InputPercentual extends React.Component {\r\n onChange = e => {\r\n const { value } = e.target;\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n let valorTemp = value;\r\n valorTemp = valorTemp.replace('%', '');\r\n valorTemp = valorTemp.replaceAll(',', '').replaceAll('.', '');\r\n if (parseFloat(valorTemp).toString().length <= precisao) {\r\n let zeros = '0'.repeat(precisao);\r\n let valDivisao = 1 + zeros;\r\n valorTemp = parseFloat(valorTemp / valDivisao).toFixed(precisao);\r\n } else {\r\n valorTemp = valorTemp.slice(0, valorTemp.length - precisao) + '.' + valorTemp.slice(valorTemp.length - precisao);\r\n }\r\n if (valorTemp > props.max) {\r\n valorTemp = parseFloat(props.max);\r\n }\r\n if (valorTemp < props.min) {\r\n valorTemp = parseFloat(props.min);\r\n }\r\n valorTemp = valorTemp.toString();\r\n const reg = /^-?\\d*(\\.\\d*)?$/;\r\n if ((!isNaN(valorTemp) && reg.test(valorTemp)) || valorTemp === '' || valorTemp === '-') {\r\n this.props.onChange(valorTemp);\r\n }\r\n\r\n };\r\n\r\n onBlur = () => {\r\n const { value, onBlur, onChange } = this.props;\r\n if (!!value) {\r\n let valueTemp = value.toString();\r\n valueTemp = valueTemp.replace('%', '');\r\n\r\n if (valueTemp.charAt(valueTemp.length - 1) === '.' || valueTemp === '-') {\r\n valueTemp = valueTemp.slice(0, -1);\r\n }\r\n if (valueTemp > props.max) {\r\n valueTemp = parseFloat(props.max);\r\n }\r\n if (valueTemp < props.min) {\r\n valueTemp = parseFloat(props.min);\r\n }\r\n onChange(valueTemp.replace(/0*(\\d+)/, '$1'));\r\n if (onBlur) {\r\n onBlur();\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const { value } = this.props;\r\n\r\n let valor = value;\r\n if (props.somenteValorPositivo !== null && props.somenteValorPositivo !== undefined) {\r\n valor = parseFloat(value);\r\n if (!!props.somenteValorPositivo) {\r\n if (valor < 0) {\r\n valor = valor * -1;\r\n }\r\n }\r\n valor = valor.toString();\r\n if (valor.indexOf('.') > -1 && valor.split('.')[1].length < 2) {\r\n valor += '0';\r\n }\r\n }\r\n\r\n return (\r\n (this.myInputRef = c)}\r\n {...this.props}\r\n value={formatNumber(valor)}\r\n disabled={!!props.disabled}\r\n onChange={this.onChange}\r\n onBlur={this.onBlur}\r\n style={!!props.style ? props.style : {}}\r\n onFocus={this.onFocus}\r\n precision={!!props.precision ? props.precision : 2}\r\n placeholder={!!props.placeholder ? props.placeholder : ''}\r\n maxLength={18}\r\n className='text-right'\r\n />\r\n );\r\n }\r\n };\r\n\r\n class NumericInputDemo extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: 0 };\r\n }\r\n\r\n onChange = value => {\r\n this.setState({ value });\r\n if (!!props.onChange) {\r\n props.onChange();\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n if (!!props.onBlur) {\r\n props.onBlur();\r\n }\r\n };\r\n\r\n onPressEnter = () => {\r\n if (!!props.onPressEnter) {\r\n props.onPressEnter();\r\n }\r\n };\r\n\r\n onFocus = () => {\r\n if (!!props.onFocus) {\r\n props.onFocus();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n \r\n\r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button } from 'antd';\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\n\r\nexport default function NotaFiscalEntradaButton(props) {\r\n\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(9));\r\n }, []);\r\n\r\n return (\r\n \r\n );\r\n};","import { Button, Col, Progress, Row, Spin, notification } from \"antd\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport api from \"../../services/api\";\r\nimport { Paper, Table, TableBody, TableCell, TableHead, TableRow } from \"@material-ui/core\";\r\nimport { CheckOutlined, CloseOutlined, LoadingOutlined } from \"@ant-design/icons\";\r\n\r\n\r\nexport default function SincronizarCatalogo() {\r\n const [progresso, setProgresso] = useState(0);\r\n const [exibeProg, setExibeProg] = useState(false);\r\n const [clienteOk, setClienteOk] = useState(false);\r\n const [produtoOk, setProdutoOk] = useState(false);\r\n const [deuErro, setDeuErro] = useState(false);\r\n const [listaErros, setListaErros] = useState([]);\r\n\r\n async function iniciarSincronização() {\r\n let lista = [];\r\n try {\r\n setExibeProg(true);\r\n setProgresso(0);\r\n let resCli = await api.post(\"Siger/SincClientes\");\r\n if (resCli.status == 200) {\r\n if (resCli.data.length > 0) {\r\n lista = resCli.data;\r\n }\r\n setClienteOk(true);\r\n setProgresso(50);\r\n }\r\n let resProd = await api.post(\"Siger/SincProdutos\");\r\n if (resProd.status == 200) {\r\n if (resProd.data.length > 0) {\r\n lista = resProd.data;\r\n }\r\n setProgresso(100);\r\n setProdutoOk(true);\r\n }\r\n } catch (ex) {\r\n setDeuErro(true);\r\n setListaErros(lista);\r\n }\r\n }\r\n\r\n return (
\r\n \r\n {!exibeProg &&
\r\n \r\n }\r\n {exibeProg && <>\r\n {!deuErro && }\r\n {deuErro && }\r\n
\r\n \r\n \r\n Modulo\r\n Status\r\n \r\n \r\n \r\n \r\n Clientes\r\n {(!clienteOk && deuErro) && }{!clienteOk && !deuErro && } />}{clienteOk && }\r\n \r\n \r\n Produtos\r\n {(!produtoOk && deuErro) && }{(!produtoOk && !deuErro) && } />} {produtoOk && }\r\n \r\n \r\n
\r\n {deuErro &&

Não foi possível sincronizar os dados do catalogo! Favor tente novamente mais tarde, ou entre em contato com nossa central de suporte!

}\r\n {(progresso == 100 && listaErros.length > 0) &&

Clientes/Produtos não importados!

\r\n \r\n \r\n {listaErros.map((err, idx) => (\r\n \r\n {err.mensagem}\r\n \r\n ))}\r\n \r\n
}\r\n }\r\n \r\n
);\r\n}","import { Button, Col, Form, Row, notification } from \"antd\";\r\nimport SelectProduto from \"../selects/selectProduto\";\r\nimport { PlusOutlined } from \"@ant-design/icons\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { useState } from \"react\";\r\nimport api from \"../../services/api\";\r\nimport { isObjetoDiffVazio } from \"../../services/funcoes\";\r\nimport InputNumber from \"rc-input-number\";\r\nimport InputPreco from \"../inputPreco\";\r\n\r\nexport default function FiltroProdutoKit({ formulario, setListaItems, listaItems }) {\r\n\r\n const [{ listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [exibirDetalhes, setExibirDetalhes] = useState(false);\r\n const [dadosProduto, setDadosProduto] = useState({});\r\n\r\n function adicionarItem() {\r\n let valores = formulario.getFieldsValue();\r\n let itemJaAdd = false;\r\n if (valores.produto_id !== undefined && valores.produto_id !== null) {\r\n\r\n if (valores?.valor_unitario == 0) {\r\n notification.warning({ description: 'Aviso!', description: 'Não é possivel adicionar item com valor 0' });\r\n return;\r\n }\r\n let produtoTemp = { ...dadosProduto };\r\n if (listaItems.length > 0) {\r\n if (produtoTemp.prg_id) {\r\n itemJaAdd = listaItems.find(i => i.prg_id == produtoTemp.prg_id)\r\n } else {\r\n itemJaAdd = listaItems.find(i => i.pro_id == produtoTemp.pro_id)\r\n }\r\n if (itemJaAdd) {\r\n notification.warning({ description: 'Aviso!', description: 'Item já Adicionado' });\r\n return;\r\n }\r\n }\r\n\r\n let listaTemp = [...listaItems];\r\n produtoTemp.qtde_item = valores.qtde_item;\r\n produtoTemp.pkc_valorunitario = valores.valor_unitario;\r\n produtoTemp.pkc_ativo = true;\r\n listaTemp.push(produtoTemp);\r\n setListaItems(listaTemp);\r\n setDadosProduto({});\r\n formulario.setFieldsValue({\r\n produto_id: null,\r\n qtde_item: null,\r\n valor_unitario: null,\r\n })\r\n } else {\r\n notification.warning({ description: 'Aviso!', description: 'Selecione um produto!' });\r\n return;\r\n }\r\n }\r\n\r\n async function buscarProduto(key) {\r\n let listaItensTemp = [...listaSelectPaginacao.itens];\r\n let produtoTemp = listaItensTemp.find(pro => pro.key == key);\r\n if (isObjetoDiffVazio(produtoTemp)) {\r\n produtoTemp.pkc_valorunitario = produtoTemp.lpi_valorvenda;\r\n setDadosProduto(produtoTemp);\r\n setExibirDetalhes(true);\r\n formulario.setFieldsValue({ qtde_item: 1, valor_unitario: produtoTemp.lpi_valorvenda ?? 0 });\r\n }\r\n }\r\n return (\r\n
\r\n \r\n \r\n \r\n { buscarProduto(dados) }} ordem={\"pro_descricao\"} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","import { Table } from \"antd\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport formatNumber from \"../../ValueObjects/formatNumber\";\r\n\r\nexport default function ItensPedidoCat({ formulario, dados }) {\r\n\r\n\r\n return (\r\n
\r\n (\r\n
\r\n {codProduto}\r\n
\r\n ),\r\n }, {\r\n title: 'Descrição',\r\n render: ({ descricao }) => (\r\n
\r\n {descricao}\r\n
\r\n )\r\n }, {\r\n title: 'Quantidade',\r\n render: ({ quantidade }) => (\r\n
\r\n {quantidade}\r\n
\r\n )\r\n }, {\r\n title: 'Valor Unitário',\r\n render: ({ valorUnitario }) => (\r\n
\r\n {formatNumber(valorUnitario, true, true, 3)}\r\n
\r\n )\r\n }, {\r\n title: 'Valor Total',\r\n render: ({ quantidade, valorUnitario }) => (\r\n
\r\n {formatNumber(valorUnitario * quantidade, true, true, 3)}\r\n
\r\n )\r\n }\r\n ]} />\r\n \r\n )\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Tabs, Typography, Row, Col, Form, Divider, Input, Select, Button, Radio, Checkbox, Switch, Tooltip, Modal, notification, Spin, Descriptions, Steps } from \"antd\";\r\n\r\nimport api from \"../../services/api\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormGW, InputPreco, FormularioDinamico, Data, SelectPaginacao } from \"../../components\";\r\nimport { getClienteCat, getEmailUsuario } from \"../../services/auth\";\r\nimport ItensPedidoCat from \"./itensPedidoCat\";\r\nimport FaturamentoPedidoCat from \"./faturamentoPedido\";\r\nimport { loadShoppingCartItems } from \"../../services/CarrinhoDB\";\r\nimport { GerarChavePedido } from \"../../services/funcoesGestor\";\r\n\r\nexport default function FecharPedidoCatalogo({ carregando, pages, aoSalvar, editando, formulario }) {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosPedidos, setDadosPedidos] = useState({});\r\n const [carregarPagina, setCarregarPagina] = useState(false);\r\n const [itensCarrinho, setItensCarrinho] = useState([]);\r\n\r\n useEffect(() => {\r\n buscarDados();\r\n }, []);\r\n\r\n async function buscarDados() {\r\n let dataAtual = new Date();\r\n let codCliente = getClienteCat();\r\n let dadosCliente = await buscarDadosCliente(codCliente);\r\n let obj = {\r\n codigoLocal: 1,\r\n chave: \"\",\r\n emailUsuario: getEmailUsuario(),\r\n nome: dadosCliente.nome,\r\n cliCpfCnpj: dadosCliente.cpfCnpj,\r\n endereco: dadosCliente.endereco,\r\n cidade: dadosCliente.nomeCidade,\r\n cep: dadosCliente.cep,\r\n estado: dadosCliente.codUF,\r\n observacao: \"\",\r\n itens: [],\r\n };\r\n loadShoppingCartItems(setItensCarrinho, (itens) => {\r\n itens.forEach(item => {\r\n let dado = {\r\n codProduto: item.codigo,\r\n descricao: item.descricao,\r\n quantidade: item.Qtd,\r\n valorUnitario: item.valor,\r\n }\r\n obj.itens.push(dado);\r\n });\r\n setDadosPedidos(obj);\r\n });\r\n }\r\n\r\n async function buscarDadosCliente(codigo) {\r\n let retorno =\r\n await api.get(`Ges040/BuscarClienteCodigo?codigo=${codigo}`);\r\n if (!!retorno.data) {\r\n return retorno.data;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n function salvarDados() {\r\n let dadosForm = formulario.getFieldValue();\r\n /*if (dadosForm.cpg_id == null) {\r\n notification.warn({ description: \"Favor preencher os dados de faturamento!\", message: \"Aviso\" });\r\n if (pages.pages != 1) {\r\n pages.setPages(1);\r\n }\r\n return;\r\n }*/\r\n let pedido = { ...dadosPedidos };\r\n let codCliente = getClienteCat();\r\n /* pedido.tipoCobranca = dadosForm.Codigo;\r\n pedido.condPagamento = dadosForm.cpg_id;\r\n */\r\n pedido.chave = GerarChavePedido(codCliente);\r\n carregando(true);\r\n api.post(\"Pedido/SalvarOrcamentoCat\", pedido).then(\r\n res => {\r\n notification.success({ message: \"Sucesso\", description: \"Pedido Incluído com Sucesso!\" });\r\n let dados = res.data;\r\n aoSalvar();\r\n }\r\n ).catch(\r\n erro => {\r\n console.log(erro);\r\n }\r\n ).finally(\r\n () => {\r\n carregando(false);\r\n }\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {dadosPedidos?.nome}\r\n \r\n \r\n {dadosPedidos?.cliCpfCnpj}\r\n \r\n \r\n {dadosPedidos?.endereco}\r\n \r\n \r\n {dadosPedidos?.cidade}\r\n \r\n \r\n {dadosPedidos?.cep}\r\n \r\n \r\n {dadosPedidos?.estado}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/*\r\n \r\n {\r\n pages.setPages(e);\r\n }} current={pages.pages}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {pages.pages === 0 &&\r\n }\r\n {pages.pages === 1 &&\r\n }\r\n \r\n */}\r\n \r\n \r\n \r\n );\r\n}","\r\nexport function GerarChavePedido(codCliente) {\r\n let data = new Date().getTime();\r\n let valor = data.toString().substring(4, data.length);\r\n let aleatorio = (Math.random() * 10).toString();\r\n let aux = aleatorio.replace(\".\", \"\").substring(0, 11);\r\n let chave = codCliente + valor + aux;\r\n chave = chave.substring(0, 13);\r\n return chave;\r\n}","import React, { useState } from 'react';\r\nimport { Row, Col, Button, Form, Modal, Drawer } from \"antd\";\r\nimport { CloseOutlined, ExclamationCircleOutlined, MinusOutlined, SaveOutlined } from '@ant-design/icons';\r\n\r\nimport FecharPedidoCatalogo from '../../pages/fecharPedidoCatalogo';\r\n\r\n\r\nexport default function DrawerPedidoCat({ openDrawer, setOpenDrawer }) {\r\n const [proximaPag, setProximaPag] = useState(0);\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n const [pages, setPages] = useState(0);\r\n\r\n function onClose() {\r\n setOpenDrawer(false);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n \r\n );\r\n}\r\n","import { CloseOutlined, ExclamationCircleOutlined, SaveOutlined } from '@ant-design/icons';\r\nimport { Button, Col, Drawer, Form, Row, Modal } from 'antd';\r\nimport React, { useState } from 'react';\r\nimport GrupoCatalogo from '../../pages/grupoCatalogo';\r\n\r\n\r\nexport default function DrawerGrupoCat({ openDrawer, setOpenDrawer, formCatalogo, listaGrupos, editandoGrp, sequenciaGrp, aoSalvarGrupos }) {\r\n const [formulario] = Form.useForm();\r\n const [carregando, setCarregando] = useState(false);\r\n\r\n const onClose = () => {\r\n Modal.confirm({\r\n title: 'Cancelar?',\r\n icon: ,\r\n content: 'Deseja cancelar a operação?',\r\n okText: 'Sim',\r\n cancelText: 'Não',\r\n centered: true,\r\n onOk() {\r\n onCloseDrawer();\r\n }\r\n })\r\n }\r\n\r\n const onCloseDrawer = () => {\r\n aoSalvarGrupos();\r\n formulario.resetFields();\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Button } from \"antd\";\r\n\r\nimport { validarPermissaoTela } from \"../../services/permissoes\";\r\n\r\nexport default function NotaFiscalServicoButton(props) {\r\n const [desabilita, setDesabilita] = useState(false);\r\n\r\n useState(() => {\r\n setDesabilita(validarPermissaoTela(9));\r\n }, []);\r\n\r\n return (\r\n \r\n )\r\n}","import React, { useState, useEffect } from 'react';\r\nimport { Row, Col, Descriptions, Table } from \"antd\";\r\nimport { FormatNumber } from \"../../ValueObjects\";\r\n\r\nimport moment from 'moment';\r\n\r\nexport default function DetalheRemessa({ dadosModal }) {\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n {(!!dadosModal[0].rem_nomearquivoremessa ? dadosModal[0].rem_nomearquivoremessa : 'NÃO INFORMADO')}\r\n \r\n \r\n {(!!dadosModal[0].rem_id ? dadosModal[0].rem_id : 'NÃO INFORMADO')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
(\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'N°. Parcela',\r\n align: 'center',\r\n \r\n width: '8%',\r\n render: ({ prc_numeroparcela }) => (\r\n
\r\n {prc_numeroparcela}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'N° Doc.',\r\n align: 'center',\r\n width: '8%',\r\n render: ({ bol_numerodocumento }) => (\r\n
\r\n {bol_numerodocumento}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Valor',\r\n align: 'center',\r\n width: '8%',\r\n render: ({ bol_valor }) => (\r\n
\r\n {FormatNumber(bol_valor,true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Doc.',\r\n align: 'center',\r\n width: '8%',\r\n render: ({ bol_dataemissao }) => (\r\n
\r\n {!!bol_dataemissao ? moment(bol_dataemissao).format('DD/MM/YYYY') : null}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data Vencimento',\r\n align: 'center',\r\n width: '10%',\r\n render: ({ bol_datavencimento }) => (\r\n
\r\n {!!bol_datavencimento ? moment(bol_datavencimento).format('DD/MM/YYYY') : null}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Carteira/Nosso Número',\r\n align: 'center',\r\n width: '10%',\r\n render: ({ crt_carteira, bol_nossonumero }) => (\r\n
\r\n {(!!crt_carteira ? (crt_carteira + \"/\") : null)+ (!!bol_nossonumero ? bol_nossonumero : null)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Instrução Remessa',\r\n align: 'center',\r\n width: '10%',\r\n render: ({ isp_descricao }) => (\r\n
\r\n {!!isp_descricao ? isp_descricao : null}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Chave Nfe',\r\n align: 'center',\r\n width: '10%',\r\n render: ({ ntf_chavenfe }) => (\r\n
\r\n {ntf_chavenfe}\r\n
\r\n ),\r\n },\r\n ]} dataSource={dadosModal} \r\n scroll={{ x: 'max-content'}} //Permite rolagem horizontal\r\n />\r\n \r\n \r\n\r\n \r\n );\r\n}","import React, { useState } from \"react\";\r\nimport { Input, Form } from \"antd\";\r\n\r\n/*\r\n Ao utilizar o componente não setar valor para constantes como por exemplo setValorPedido(valor), pois isso fará com que o focus saia do input\r\n*/\r\n\r\nexport default function InputPreco(props) {\r\n\r\n /* props.percent ou props.cifrao removido, pois ao tentar utilizar o backspace não funciona */\r\n function formatNumber(value) {\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n if (!(!!value) || isNaN(value)) {\r\n value = !!props.initialValue ? props.initialValue : '0.00';\r\n }\r\n value = parseFloat(value).toFixed(precisao);\r\n value += '';\r\n const list = value.split('.');\r\n const prefix = list[0].charAt(0) === '-' ? '-' : '';\r\n let num = prefix ? list[0].slice(1) : list[0];\r\n let result = '';\r\n while (num.length > 3) {\r\n result = `.${num.slice(-3)}${result}`;\r\n num = num.slice(0, num.length - 3);\r\n }\r\n if (num) {\r\n result = num + result;\r\n }\r\n\r\n let aposVirgula = '';\r\n while (aposVirgula.length < precisao) aposVirgula = \"0\" + aposVirgula;\r\n let resultado = precisao == 0 ? '' :','+ aposVirgula;\r\n\r\n return `${prefix}${result}${list[1] ? `,${list[1]}` : resultado}`;\r\n }\r\n\r\n class InputValor extends React.Component {\r\n onChange = e => {\r\n const { value } = e.target;\r\n let precisao = !!props.precision ? props.precision : props.precision == 0 ? 0 : 2;\r\n let valorTemp = value;\r\n valorTemp = valorTemp.replace('', '');\r\n valorTemp = valorTemp.replaceAll(',', '').replaceAll('.', '');\r\n if (parseFloat(valorTemp).toString().length <= precisao) {\r\n let zeros = '0'.repeat(precisao);\r\n let valDivisao = 1 + zeros;\r\n valorTemp = parseFloat(valorTemp / valDivisao).toFixed(precisao);\r\n } else {\r\n valorTemp = valorTemp.slice(0, valorTemp.length - precisao) + '.' + valorTemp.slice(valorTemp.length - precisao);\r\n }\r\n valorTemp = valorTemp.toString();\r\n const reg = /^-?\\d*(\\.\\d*)?$/;\r\n if ((!isNaN(valorTemp) && reg.test(valorTemp)) || valorTemp === '' || valorTemp === '-') {\r\n this.props.onChange(valorTemp);\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n const { value, onBlur, onChange } = this.props;\r\n if (!!value) {\r\n let valueTemp = value.toString();\r\n if (valueTemp.charAt(valueTemp.length - 1) === '.' || valueTemp === '-') {\r\n valueTemp = valueTemp.slice(0, -1);\r\n }\r\n onChange(valueTemp.replace(/0*(\\d+)/, '$1'));\r\n if (onBlur) {\r\n onBlur();\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const { value } = this.props;\r\n let valor = value;\r\n if (props.somenteValorPositivo !== null && props.somenteValorPositivo !== undefined) {\r\n valor = parseFloat(value);\r\n if (!!props.somenteValorPositivo) {\r\n if (valor < 0) {\r\n valor = valor * -1;\r\n }\r\n }\r\n valor = valor.toString();\r\n if (valor.indexOf('.') > -1 && valor.split('.')[1].length < 2) {\r\n valor += '0';\r\n }\r\n }\r\n return (\r\n (this.myInputRef = c)}\r\n {...this.props}\r\n value={formatNumber(valor)}\r\n disabled={!!props.disabled}\r\n onChange={this.onChange}\r\n onBlur={this.onBlur}\r\n style={!!props.style ? props.style : {}}\r\n onFocus={this.onFocus}\r\n precision={!!props.precision ? props.precision : 2}\r\n placeholder={!!props.placeholder ? props.placeholder : ''}\r\n maxLength={18}\r\n className='text-right'\r\n />\r\n );\r\n }\r\n };\r\n\r\n class NumericInputDemo extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: 0 };\r\n }\r\n\r\n onChange = value => {\r\n this.setState({ value });\r\n if (!!props.onChange) {\r\n props.onChange();\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n if (!!props.onBlur) {\r\n props.onBlur();\r\n }\r\n };\r\n\r\n onPressEnter = () => {\r\n if (!!props.onPressEnter) {\r\n props.onPressEnter();\r\n }\r\n };\r\n\r\n onFocus = () => {\r\n if (!!props.onFocus) {\r\n props.onFocus();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n \r\n\r\n );\r\n}","import React, { useEffect, useState } from 'react';\r\nimport { Select, Divider, Pagination, Button, Row, Col } from 'antd';\r\nimport api from '../../../services/api';\r\nimport { PlusOutlined } from '@ant-design/icons';\r\nimport { manutencaoActions, selectPaginadoActions } from '../../../actions';\r\nimport { useStateValue } from '../../../state';\r\nimport { isNotNullOrEmpty } from '../../../services/funcoes';\r\n\r\nexport default function SelectPaginacao({ url, idValue, nameValue, nameLabel, onChangeFunction, onBlurFunction, onClearFunction, campoFiltro = \"filtro\", placeholder,\r\n form, atualizaComponente = false, mostrarCodigoLabel = false, multiple = false, funcaoIncluir = null, allowClear = false, conteudo = null, filtroPesq = null, filtroExtra,\r\n disabled = false, returnObject = false, selecionarRegUnico = null, setListaDados = null, onSelectFunction, usaDados = true, registrosPorPagina = 50, retornaUnico = null }) {\r\n const [{ listaSelectPaginacao }, dispatch] = useStateValue();\r\n const [carregando, setCarregando] = useState(false);\r\n const [lista, setLista] = useState([]);\r\n const [filtro, setFiltro] = useState('');\r\n const [pagina, setPagina] = useState(1);\r\n const [totalReg, setTotalReg] = useState(0);\r\n const [totalRegIni, setTotalRegIni] = useState(0);\r\n const [usouFiltro, setUsouFiltro] = useState(false);\r\n const [valor, setValor] = useState(null);\r\n const [campoDescricao, setCampoDescricao] = useState(null);\r\n const [filtroAnt, setFiltroAnt] = useState(\"\");\r\n const [multiplosFiltros, setMultiplosFiltros] = useState(false);\r\n const [listaFiltros, setListaFiltros] = useState([]);\r\n const _nameValue = idValue ? idValue : nameValue;\r\n const [listLista, setListLista] = useState([]);\r\n\r\n useEffect(() => {\r\n if (!!lista && lista.length > 0) {\r\n if (lista.length == 1 && !!selecionarRegUnico) {\r\n let dados = lista.find(l => l.key == lista[0].key);\r\n if (!!selecionarRegUnico) {\r\n let val = dados ? dados[selecionarRegUnico] : null\r\n setValor(val);\r\n form.setFieldsValue({ [_nameValue]: val });\r\n }\r\n }\r\n //Feito para selecionar somente se usuario tem acesso a uma unica empresa\r\n if (lista.length == 1 && !!retornaUnico && totalRegIni==1) {\r\n let dados = lista.find(l => l.key == lista[0].key);\r\n if (!!retornaUnico) {\r\n let val = dados ? dados[retornaUnico] : null\r\n setValor(val);\r\n form.setFieldsValue({ [_nameValue]: val });\r\n !!onChangeFunction ? onChangeFunction(valor) : naoFazNada();\r\n }\r\n }\r\n if (usaDados) {\r\n if (!!setListaDados) {\r\n setListaDados(lista);\r\n } else {\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: [...lista] } });\r\n }\r\n }\r\n }\r\n }, [lista]);\r\n\r\n useEffect(() => {\r\n setFiltro(filtroPesq);\r\n }, [filtroPesq, atualizaComponente]);\r\n\r\n useEffect(() => {\r\n if (!isNotNullOrEmpty(form.getFieldValue([_nameValue]))) {\r\n setFiltro('');\r\n }\r\n setValor(form.getFieldValue([_nameValue]));\r\n }, [form.getFieldValue([_nameValue])]);\r\n\r\n useEffect(() => {\r\n if (!!lista && listaSelectPaginacao?.itens?.length > 0) {\r\n let lista = [...listaSelectPaginacao.itens];\r\n let listaFil = lista.filter(s => s.name === _nameValue);\r\n //if (listaFil.length == 1) {\r\n let item = listaFil[0];\r\n if (!!item && !!item.value) {\r\n if (!!item.campo) {\r\n setCampoDescricao(item.campo);\r\n }\r\n setPagina(1);\r\n setFiltro(item.value);\r\n let idx = lista.indexOf(item);\r\n lista.splice(idx, 1);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: { itens: lista } })\r\n }\r\n /*} else {\r\n setMultiplosFiltros(true);\r\n setListaFiltros(listaFil);\r\n }*/\r\n }\r\n }, [listaSelectPaginacao]);\r\n\r\n /*useEffect(() => {\r\n if (multiplosFiltros && listaFiltros?.length > 0) {\r\n let listaSelect = [...selectPaginado];\r\n listaSelect = listaSelect.filter(s => listaFiltros.indexOf(s) === -1);\r\n setPagina(1);\r\n dispatch({ type: selectPaginadoActions.CHANGE, data: listaSelect })\r\n }\r\n }, [multiplosFiltros]);\r\n*/\r\n function carregarDados() {\r\n setCarregando(true);\r\n let parametrosUrl = '';\r\n if (atualizaComponente !== null) {\r\n if (!multiplosFiltros) {\r\n !!filtro ? parametrosUrl = `&${!!campoDescricao ? campoDescricao : campoFiltro}=${filtro}` : parametrosUrl = \"\";\r\n } else {\r\n !!listaFiltros && listaFiltros.length > 0 ? listaFiltros.forEach(lf => parametrosUrl += `&${!!lf.campoDescricao ? lf.campoDescricao : lf.campoFiltro}=${lf.filtro}`) : parametrosUrl = \"\";\r\n }\r\n if (!!campoDescricao) {\r\n setCampoDescricao(null);\r\n }\r\n if (mostrarCodigoLabel) {\r\n parametrosUrl += `&Order=%2B${nameValue}`;\r\n }\r\n else {\r\n parametrosUrl += (nameLabel.search('[/+/g]') > 0 ? `&Order=%2B${nameLabel.split('+')[0]}` : `&Order=%2B${nameLabel}`);\r\n }\r\n parametrosUrl += `&pageNumber=${pagina}&pageSize=${registrosPorPagina}`;\r\n if (url.search(/[?]/g) === -1) {\r\n parametrosUrl = parametrosUrl.replace('&', '?');\r\n }\r\n !!filtroExtra ? parametrosUrl += filtroExtra : naoFazNada();\r\n api.get(url + parametrosUrl).then(\r\n (res) => {\r\n if (res.status === 200) {\r\n let dados = [];\r\n\r\n let indice = !!atualizaComponente ? 0 : lista.length > 0 ? lista[lista.length - 1].key + 1 : 0;\r\n res.data?.items?.map((item, idx) => {\r\n item.key = indice;\r\n dados.push(item);\r\n indice++;\r\n });\r\n\r\n setTotalReg(res.data.totalItems)\r\n if (totalRegIni == 0) {\r\n setTotalRegIni(res.data.totalItems)\r\n }\r\n \r\n if (!isNotNullOrEmpty(filtro)) {//filtro em branco\r\n if (usouFiltro === true || atualizaComponente !== false) {\r\n atualizaComponente = false\r\n setUsouFiltro(false);\r\n setLista(dados);\r\n } else {\r\n setLista([...lista, ...dados]);\r\n }\r\n } else {\r\n if (filtro === filtroAnt) {\r\n if (pagina > 1) {\r\n setLista([...lista, ...dados]);\r\n } else {\r\n setLista(dados);\r\n }\r\n } else {\r\n setUsouFiltro(true);\r\n setFiltroAnt(filtro);\r\n setLista(dados);\r\n setPagina(1);\r\n }\r\n }\r\n }\r\n }\r\n ).finally(\r\n () => {\r\n setCarregando(false)\r\n }\r\n );\r\n }\r\n }\r\n\r\n function naoFazNada() { }\r\n\r\n function recarregaDados() {\r\n let totalPag = Math.trunc(totalReg / registrosPorPagina) + 1\r\n if (totalPag > pagina) {\r\n setPagina(pagina + 1)\r\n }\r\n }\r\n\r\n useEffect(() => carregarDados(), [filtro, pagina, atualizaComponente]);\r\n\r\n return (\r\n {\r\n if (option.props.value) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }}\r\n onSearch={(valor) => { setFiltro(valor); }}\r\n onPopupScroll={e => {\r\n const { target } = e;\r\n if (target.scrollTop + target.offsetHeight === target.scrollHeight) {\r\n recarregaDados();\r\n }\r\n }}\r\n dropdownRender={!!funcaoIncluir ? menu => (\r\n
\r\n \r\n
\r\n {menu}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n\r\n onChange={(valor) => {\r\n setValor(valor);\r\n form.setFieldsValue({ [_nameValue]: valor });\r\n !!onChangeFunction ? onChangeFunction(valor) : naoFazNada();\r\n }}\r\n\r\n onBlur={(valor) => {\r\n\r\n !!onBlurFunction ? onBlurFunction(valor) : naoFazNada();\r\n }}\r\n\r\n onClear={(valor) => {\r\n !!onClearFunction ? onClearFunction(valor) : naoFazNada();\r\n }}\r\n\r\n onSelect={(valor) => {\r\n if(multiple == true){\r\n listLista.push(valor);\r\n form.setFieldsValue({ [_nameValue]: listLista });\r\n }\r\n else{\r\n setValor(valor);\r\n form.setFieldsValue({ [_nameValue]: valor });\r\n }\r\n !!onSelectFunction ? onSelectFunction(valor) : naoFazNada();\r\n }}\r\n // ajustado onSelect para que fosse possivel selecionar mais de um item, codigo original comentado abaixo\r\n // onSelect={(valor) => {\r\n // listTemp.push(valor);\r\n\r\n // form.setFieldsValue({ [_nameValue]: listTemp });\r\n // // form.setFieldsValue({ [_nameValue]: valor });\r\n // !!onSelectFunction ? onSelectFunction(valor) : naoFazNada();\r\n // }}\r\n >\r\n {lista.map(item =>\r\n !!conteudo ? conteudo(item) :\r\n {mostrarCodigoLabel ? item[nameValue] + \" - \" : \"\"} {(nameLabel.search(/[+]/g) > 0 ? (item[nameLabel.split('+')[0]] + \" - \" + item[nameLabel.split('+')[1]]) : item[nameLabel])} \r\n )}\r\n \r\n )\r\n}\r\n","import React, { createRef } from 'react';\r\nimport moment from 'moment';\r\nimport { Form, Input } from 'antd';\r\n\r\nexport default function Data(props) {\r\n function subtrairSomarDias(data, dias, soma) {\r\n if (soma) {\r\n return new Date(data.getTime() + (dias * 24 * 60 * 60 * 1000));\r\n } else {\r\n return new Date(data.getTime() - (dias * 24 * 60 * 60 * 1000));\r\n }\r\n }\r\n\r\n class NovaData extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.inputRef = createRef();\r\n }\r\n\r\n onChange = e => {\r\n const { value } = e.target;\r\n let data = moment(value, \"YYYY-MM-DD\", true);\r\n\r\n if (data.isValid()) {\r\n this.props.onChange(data);\r\n } else {\r\n this.props.onChange(null);\r\n }\r\n };\r\n\r\n onKeyUp = e => {\r\n let key = e.which || e.keyCode;\r\n let data = null;\r\n\r\n if (key === 68) { // Tecla 'D' - data atual\r\n data = new Date();\r\n }\r\n if (key === 79) { // Tecla 'O' - data anterior\r\n data = subtrairSomarDias(new Date(), 1, false);\r\n }\r\n if (key === 65) { // Tecla 'A' - data posterior\r\n data = subtrairSomarDias(new Date(), 1, true);\r\n }\r\n if (key === 73) { // Tecla 'I' - data inicial do mês\r\n let date = new Date();\r\n data = new Date(date.getFullYear(), date.getMonth(), 1);\r\n }\r\n if (key === 70) { // Tecla 'F' - data final do mês\r\n let date = new Date();\r\n data = new Date(date.getFullYear(), date.getMonth() + 1, 0);\r\n }\r\n\r\n if (!!data) {\r\n this.props.onChange(moment(data));\r\n }\r\n\r\n if (!!this.props.onKeyUp) {\r\n this.props.onKeyUp();\r\n }\r\n };\r\n\r\n onPressEnter = () => {\r\n const inputElement = this.inputRef.current.input;\r\n const form = inputElement.closest('form');\r\n if (form) {\r\n const inputs = Array.from(form.querySelectorAll('input'));\r\n const currentIndex = inputs.indexOf(inputElement);\r\n const nextInput = inputs[currentIndex + 1];\r\n if (nextInput) {\r\n nextInput.focus();\r\n }\r\n }\r\n };\r\n\r\n onBlur = () => {\r\n if (this.props.onBlur) {\r\n this.props.onBlur();\r\n }\r\n };\r\n\r\n render() {\r\n const { value, month, disabled } = this.props;\r\n let data = value ? moment(value) : null;\r\n\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n class DataInput extends React.Component {\r\n onChange = () => {\r\n if (this.props.onChange) {\r\n this.props.onChange();\r\n }\r\n };\r\n\r\n render() {\r\n const { name, label, initialValue, style, className, hidden, rules } = this.props;\r\n\r\n return (\r\n
\r\n
\r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Form, Tag, Modal, notification } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalEndereco } from \"../../components/modals/\";\r\nimport { isObjetoDiffVazio, validarDadosObj } from \"../../services/funcoes\";\r\n\r\nexport default function Endereco({produtorRural = false, isEstrangeiro, setIsEstrangeiro }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosEndereco, setDadosEndereco] = useState(!!manutencao.dados && !!manutencao.dados.enderecos ? manutencao.dados.enderecos : []);\r\n const [form] = Form.useForm();\r\n const [openModalEndereco, setOpenModalEndereco] = useState(false);\r\n const [exibirPais, setExibirPais] = useState(true);\r\n\r\n const alterarPropriedadeEndereco = (key, coluna, checked) => {\r\n let newData = [...dadosEndereco];\r\n if (coluna === 'pee_enderecoprincipal' && checked) {\r\n let indexPrincipal = newData.findIndex((item) => true === item.pee_enderecoprincipal);\r\n if (indexPrincipal !== -1) {\r\n newData[indexPrincipal][coluna] = false;\r\n }\r\n newData[key][coluna] = checked;\r\n } else {\r\n let count = 0;\r\n newData.forEach(dados => {\r\n if (dados[coluna]) {\r\n count++;\r\n }\r\n });\r\n if (count > 1 || (checked && coluna === 'pee_ativo')) {\r\n newData[key][coluna] = checked;\r\n }\r\n }\r\n setDadosEndereco(newData);\r\n };\r\n\r\n const editEndereco = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalEndereco(true);\r\n };\r\n\r\n const removerEndereco = (record, indice) => {\r\n let dadosTemp = [...dadosEndereco];\r\n if (dadosTemp.length > 1) {\r\n dadosTemp = dadosTemp.filter((dados) => dados !== record);\r\n setDadosEndereco(dadosTemp);\r\n } else {\r\n Modal.warning({\r\n title: 'Aviso',\r\n icon: ,\r\n content: \"Deve se manter ao menos um endereço cadastrado!\",\r\n okText: 'Ok',\r\n centered: true\r\n\r\n });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ enderecos: dadosEndereco } } } });\r\n }, [dadosEndereco]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados) {\r\n if (!!manutencao.dados.enderecos) {\r\n setDadosEndereco(manutencao.dados.enderecos);\r\n }\r\n }\r\n }, [manutencao.dados]);\r\n\r\n return (\r\n\r\n
\r\n \r\n
\r\n \r\n \"Endereço(s)\" Endereço(s)\r\n \r\n Adicione o(s) endereço(s) do cliente aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n \r\n {record.log_logradouro}\r\n {(record.pee_numero !== '' && !!record.pee_numero) ? ', ' + record.pee_numero : ''}\r\n {(record.bai_nome !== '' && !!record.bai_nome) ? ', ' + record.bai_nome : ''}\r\n {(record.pee_complemento !== '' && !!record.pee_complemento) ? ', ' + record.pee_complemento : ''}\r\n {(record.cep !== '' && !!record.cep) ? ' - ' + record.cep :\r\n (record.cep_cep !== '' && !!record.cep_cep) ? ' - ' + record.cep_cep : ''}\r\n {(record.cid_descricao !== '' && !!record.cid_descricao) ? ' - ' + record.cid_descricao : ''}\r\n\r\n {(record.est_sigla !== '' && !!record.est_sigla) ? ' - ' + record.est_sigla : ''}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Tipo de Endereço',\r\n width: 80,\r\n render: ({ tpe_descricao }) => (\r\n
\r\n {tpe_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 80,\r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEndereco(indice, \"pee_enderecoprincipal\", checked)}\r\n >\r\n Principal\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 80,\r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEndereco(indice, \"pee_ativo\", checked)}\r\n >\r\n Ativo\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Endereço Cadastrado\r\n \r\n \r\n \r\n )\r\n }} dataSource={dadosEndereco} scroll={{ x: 960 }} />\r\n \r\n setOpenModalEndereco(false)} \r\n exibirPais={exibirPais} produtorRural={produtorRural} isEstrangeiro={isEstrangeiro} setIsEstrangeiro={setIsEstrangeiro} />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Form, Modal, Tag } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { ModalOrgaoSubjacente } from \"../../components/modals\";\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\n\r\nexport default function OrgaoSubjacente() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [openModalOrgaoSubjacente, setOpenModalOrgaoSubjacente] = useState(false);\r\n const [listaOrgaoSubjacente, setListaOrgaoSubjacente] = useState(!!manutencao.dados && !!manutencao.dados.listaOrgaoPublico ? manutencao.dados.listaOrgaoPublico : []);\r\n const [form] = Form.useForm();\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ listaOrgaoPublico: listaOrgaoSubjacente } } } });\r\n }, [listaOrgaoSubjacente]);\r\n\r\n function editar(record, indice) {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalOrgaoSubjacente(true);\r\n };\r\n\r\n function excluir(id) {\r\n const lista = [...listaOrgaoSubjacente];\r\n const index = lista.findIndex((item) => id === item.pse_id);\r\n lista.splice(index, 1)\r\n setListaOrgaoSubjacente(lista);\r\n };\r\n\r\n const modalConfirmaExclusao = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o registro?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n excluir(record);\r\n }\r\n });\r\n };\r\n\r\n const alterarPropriedade = (key, coluna, checked) => {\r\n let newData = [...listaOrgaoSubjacente];\r\n newData[key][coluna] = checked;\r\n setListaOrgaoSubjacente(newData);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Órgãos Órgãos Subjacentes\r\n \r\n Adicione o(s) órgão(s) público(s) Aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n alterarPropriedade(indice, \"pop_ativo\", checked)}\r\n >\r\n Ativo\r\n \r\n ),\r\n },\r\n {\r\n title: 'Nome',\r\n width: 150,\r\n render: ({ pop_nome }) => (\r\n
\r\n {pop_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Endereço',\r\n render: ({ pop_endereco, pop_numero, pop_bairro, pop_complemento, pop_cep, cep }) => (\r\n
\r\n \r\n {!!pop_endereco ? pop_endereco : \"\"}{!!pop_numero ? (', ' + pop_numero) : ''}\r\n {!!pop_bairro ? (', ' + pop_bairro) : ''}\r\n {!!pop_complemento ? (', ' + pop_complemento) : ''}\r\n {!!pop_cep ? (' - ' + pop_cep) : !!cep ? cep : ''}\r\n \r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n );\r\n}\r\n\r\nexport default function Email() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosEmail, setDadosEmail] = useState(!!manutencao.dados && manutencao.dados.emails ? manutencao.dados.emails : []);\r\n const [form] = Form.useForm();\r\n const [openModalEmail, setOpenModalEmail] = useState(false);\r\n\r\n const alterarPropriedadeEmail = (key, coluna, checked) => {\r\n const newData = [...dadosEmail];\r\n if (coluna === 'pem_emailprincipal' && checked === true) {\r\n const indexPrincipal = newData.findIndex((item) => true === item.pem_emailprincipal);\r\n if (indexPrincipal !== -1) newData[indexPrincipal][coluna] = false;\r\n }\r\n newData[key][coluna] = checked;\r\n setDadosEmail(newData);\r\n }\r\n\r\n const editEmail = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalEmail(true);\r\n };\r\n\r\n const removeEmail = (id) => {\r\n const newData = [...dadosEmail];\r\n const index = newData.findIndex((item) => id === item.pem_id);\r\n newData.splice(index, 1)\r\n setDadosEmail(newData);\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ emails: dadosEmail } } } });\r\n }, [dadosEmail]);\r\n\r\n const modalConfirmaExclusao = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o email ${record.pem_email} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeEmail(record.pem_id);\r\n }\r\n });\r\n };\r\n\r\n function adicionarEmail() {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ emails: dadosEmail } } } });\r\n setOpenModalEmail(false);\r\n }\r\n\r\n return (\r\n\r\n
\r\n \r\n
\r\n \r\n \"E-mail(s)\" E-mail(s) - (OPCIONAL)\r\n \r\n Adicione o(s) e-mail(s) do cliente aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n (\r\n
\r\n {pem_email}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 68,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_emailprincipal\", checked)}\r\n >\r\n Principal\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 52,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_ativo\", checked)}\r\n >\r\n Ativo\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 92,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_enviarboleto\", checked)}\r\n >\r\n Enviar Boleto\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 140,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_enviarcobranca\", checked)}\r\n >\r\n Enviar Carta Cobrança\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 85,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_enviarnfe\", checked)}\r\n >\r\n Enviar NF-e\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n align: 'center',\r\n width: 114,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_enviarpromocao\", checked)}\r\n >\r\n Enviar Promoção\r\n \r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 132,\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeEmail(indice, \"pem_enviarvencparcela\", checked)}\r\n >\r\n Enviar Venc. Parcela\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n fixed: 'right',\r\n key: 'x',\r\n width: 65,\r\n render: (record, obj, indice) => {\r\n return
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui E-mail Cadastrado\r\n \r\n \r\n \r\n )\r\n }} components={{\r\n body: {\r\n cell: EditableCell,\r\n },\r\n }} scroll={{ x: 960 }} dataSource={dadosEmail}\r\n />\r\n \r\n \r\n adicionarEmail()} />\r\n \r\n\r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Form, Tag, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { FormatFone } from \"../../ValueObjects\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalTelefone } from \"../../components/modals/\";\r\n\r\nexport default function Telefone({ isEstrangeiro = false }) {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosTelefone, setDadosTelefone] = useState(!!manutencao.dados && !!manutencao.dados.telefones ? manutencao.dados.telefones : []);\r\n const [form] = Form.useForm();\r\n const [openModalTelefone, setOpenModalTelefone] = useState(false);\r\n const tagPrincipal = ['Principal'];\r\n const tagsAtivo = ['Ativo'];\r\n const [editingKey, setEditingKey] = useState('');\r\n const isEditing = record => record.key === editingKey;\r\n\r\n const alterarPropriedadeTelefone = (key, coluna, checked) => {\r\n const newData = [...dadosTelefone];\r\n if (coluna === 'psc_principal' && checked) {\r\n const indexPrincipal = newData.findIndex((item) => true === item.psc_principal);\r\n if (indexPrincipal !== -1) {\r\n newData[indexPrincipal][coluna] = false;\r\n }\r\n newData[key][coluna] = checked;\r\n } else {\r\n let count = 0;\r\n newData.forEach(dados => {\r\n if (dados[coluna]) {\r\n count++;\r\n }\r\n });\r\n if (count > 1 || (checked && coluna === 'psc_ativo')) {\r\n newData[key][coluna] = checked;\r\n }\r\n }\r\n setDadosTelefone(newData);\r\n };\r\n\r\n const editaTelefone = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalTelefone(true);\r\n };\r\n\r\n const removeTelefone = (record, indice) => {\r\n const newData = [...dadosTelefone];\r\n const index = newData.findIndex((item) => record.psc_numero === item.psc_numero);\r\n newData.splice(index, 1)\r\n setDadosTelefone(newData);\r\n };\r\n\r\n const modalExcluirTelefone = (record, indice) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o Telefone ${record.psc_numero} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeTelefone(record, indice);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ telefones: dadosTelefone } } } });\r\n }, [dadosTelefone]);\r\n\r\n useEffect(() => {\r\n if (!!manutencao.dados && !!manutencao.dados.telefones) {\r\n setDadosTelefone(manutencao.dados.telefones)\r\n }\r\n }, [manutencao.dados]);\r\n\r\n const columns = [\r\n {\r\n title: 'Telefone',\r\n render: ({ psc_numero }) => (\r\n
\r\n {(!isEstrangeiro ? FormatFone(psc_numero) : (psc_numero))}\r\n
\r\n )\r\n },\r\n {\r\n title: 'Tipo de Telefone',\r\n dataIndex: 'tpt_descricao',\r\n Key: 'tpt_descricao',\r\n editable: true,\r\n },\r\n {\r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n tagPrincipal.map(tag => (\r\n alterarPropriedadeTelefone(indice, \"psc_principal\", checked)}\r\n >\r\n {tag}\r\n \r\n ))\r\n ),\r\n },\r\n {\r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n tagsAtivo.map(tag => (\r\n alterarPropriedadeTelefone(indice, \"psc_ativo\", checked)}\r\n >\r\n {tag}\r\n \r\n ))\r\n ),\r\n },\r\n {\r\n title: 'WhatsApp?',\r\n editable: true,\r\n render: ({ psc_whatsapp }) => (\r\n
\r\n {psc_whatsapp ? 'Sim' : 'Não'}\r\n
\r\n\r\n ),\r\n },\r\n {\r\n title: 'Ramal',\r\n editable: true,\r\n render: ({ psc_ramal }) => (\r\n
\r\n {psc_ramal || 'Não Informado'}\r\n
\r\n\r\n ),\r\n },\r\n {\r\n title: 'Observação',\r\n editable: true,\r\n render: ({ psc_observacao }) => (\r\n
\r\n {psc_observacao || 'Não Informado'}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \"Telefone(s)\" Telefone(s)\r\n \r\n \r\n Adicione o(s) telefone(s) do cliente aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n {editing ? (\r\n \r\n {inputNode}\r\n \r\n ) : (\r\n children\r\n )}\r\n
\r\n \r\n \r\n Ainda não possui Telefone Cadastrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 960 }} dataSource={dadosTelefone}\r\n />\r\n \r\n \r\n setOpenModalTelefone(false)} isEstrangeiro={isEstrangeiro} />\r\n \r\n );\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Form, Tag, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalOcupacao } from \"../../components/modals/\";\r\n\r\nexport default function Ocupacao() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosOcupacoes, setDadosOcupacoes] = useState(!!manutencao.dados && !!manutencao.dados.ocupacoes ? manutencao.dados.ocupacoes : []);\r\n const [form] = Form.useForm();\r\n const [openModalOcupacao, setOpenModalOcupacao] = useState(false);\r\n\r\n\r\n const alterarPropriedadeOcupacao = (key, coluna, checked) => {\r\n const newData = [...dadosOcupacoes];\r\n if (coluna === 'poc_principal' && checked) {\r\n const indexPrincipal = newData.findIndex((item) => true === item.poc_principal);\r\n if (indexPrincipal !== -1) {\r\n newData[indexPrincipal][coluna] = false;\r\n }\r\n }\r\n newData[key][coluna] = checked;\r\n setDadosOcupacoes(newData);\r\n };\r\n\r\n const editaOcupacao = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalOcupacao(true);\r\n };\r\n\r\n const removeOcupacao = (id) => {\r\n const newData = [...dadosOcupacoes];\r\n const index = newData.findIndex((item) => id === item.poc_id);\r\n newData.splice(index, 1)\r\n setDadosOcupacoes(newData);\r\n };\r\n\r\n const modalExcluirOcupacao = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir a ocupação ${record.cbo_descricao} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeOcupacao(record.poc_id);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ ocupacoes: dadosOcupacoes } } } });\r\n }, [dadosOcupacoes]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Ocupações\" Ocupações - (OPCIONAL)\r\n \r\n Adicione a(s) ocupação(ões) do cliente aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
(\r\n
\r\n {cbo_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: '', \r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n alterarPropriedadeOcupacao(indice, \"poc_principal\", checked)}\r\n >\r\n Principal\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Ocupação Cadastrada\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 960 }} dataSource={dadosOcupacoes}\r\n />\r\n \r\n \r\n setOpenModalOcupacao(false)} />\r\n \r\n );\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport moment from 'moment';\r\nimport { Row, Col, Typography, Divider, Button, Tag, Table, Form, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalNacionalidade } from \"../../components/modals/\";\r\n\r\nexport default function Nacionalidade() {\r\n\r\n const tagsData = ['Principal'];\r\n const [selectedTags, setSelectedTags] = useState(['Principal']);\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [listaNacionalidade, setListaNacionalidade] = useState(!!manutencao.dados && !!manutencao.dados.nacionalidades ? manutencao.dados.nacionalidades : []);\r\n const [openModalNacionalidade, setOpenModalNacionalidade] = useState(false);\r\n const [form] = Form.useForm();\r\n\r\n const selecionarOpcao = (tag, checked) => {\r\n const nextSelectedTags = checked ? [...selectedTags, tag] : selectedTags.filter(t => t !== tag);\r\n setSelectedTags(nextSelectedTags);\r\n }\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ nacionalidades: listaNacionalidade } } } });\r\n }, [listaNacionalidade]);\r\n\r\n function editarNacionalidade(record, indice) {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalNacionalidade(true);\r\n };\r\n\r\n function excluirNacionalidade(id) {\r\n const lista = [...listaNacionalidade];\r\n const index = lista.findIndex((item) => id === item.pse_id);\r\n lista.splice(index, 1)\r\n setListaNacionalidade(lista);\r\n };\r\n\r\n const modalConfirmaExclusao = (record) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir a nacionalidade ${record.pais.pse_nacionalidade} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n excluirNacionalidade(record.pais.pse_id);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Nacionalidade\" Nacionalidade - (OPCIONAL)\r\n \r\n Adicione a(s) nacionalidade(s) do cliente aqui. \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n { pse_nome }\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Data de Entrada no País',\r\n render: ({ pen_dataentradapais }) => (\r\n
\r\n {moment(pen_dataentradapais).format(\"DD/MM/YYYY HH:mm:ss\")}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Observação',\r\n render: ({ pen_observacao }) => (\r\n
\r\n {pen_observacao}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n dataIndex: 'pen_naturalizadobrasil',\r\n Key: 'pen_naturalizadobrasil',\r\n render: (record) => (\r\n tagsData.map(tag => (\r\n -1}\r\n onChange={checked => selecionarOpcao(tag, checked)}\r\n >\r\n {tag}\r\n \r\n ))\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Endereço Cadastrado\r\n \r\n \r\n \r\n )\r\n }} dataSource={listaNacionalidade} scroll={{ x: 960 }} />\r\n \r\n setOpenModalNacionalidade(false)} />\r\n \r\n\r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Tag, Form, Modal } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalOutroContato } from \"../../components/modals/\";\r\n\r\nexport default function OutrosContatos() {\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosOutrosContatos, setDadosOutrosContatos] = useState(!!manutencao.dados && !!manutencao.dados.pessoaoutrocontatos ? manutencao.dados.pessoaoutrocontatos : []);\r\n const [form] = Form.useForm();\r\n const tagsData = ['Ativo'];\r\n const [openModalOutroContato, setOpenModalOutroContato] = useState(false);\r\n\r\n const editaOutroContato = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalOutroContato(true);\r\n };\r\n\r\n const alterarPropriedadeOutrosContatos = (indice, coluna, checked) => {\r\n const newData = [...dadosOutrosContatos];\r\n newData[indice][coluna] = checked;\r\n setDadosOutrosContatos(newData);\r\n };\r\n\r\n const removeOutroContato = (record, indice) => {\r\n const newData = [...dadosOutrosContatos];\r\n record.indice = indice;\r\n const index = newData.findIndex((item) => indice === item.indice);\r\n newData.splice(index, 1)\r\n setDadosOutrosContatos(newData);\r\n };\r\n\r\n const modalExcluirOutroContato = (record, indice) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir o Contato ${record.out_descricao} - ${record.toc_descricao} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removeOutroContato(record, indice);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ pessoaoutrocontatos: dadosOutrosContatos } } } });\r\n\r\n }, [dadosOutrosContatos]);\r\n\r\n return (\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n \"Outros Outros Contatos - (OPCIONAL)\r\n \r\n \r\n Adicione o(s) outro(s) contato(s) do cliente aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
(\r\n
\r\n {toc_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Descrição',\r\n render: ({ out_descricao }) => (\r\n
\r\n {out_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n\r\n render: (record, obj, indice) => (\r\n tagsData.map(tag => (\r\n alterarPropriedadeOutrosContatos(indice, \"out_ativo\", checked)}\r\n >\r\n {tag}\r\n \r\n ))\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Outro Contato Cadastrado\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 960 }} dataSource={dadosOutrosContatos}\r\n />\r\n \r\n \r\n setOpenModalOutroContato(false)} />\r\n \r\n\r\n );\r\n\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Table, Tag, Modal, Form } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { MaskFormat } from \"../../ValueObjects\";\r\nimport { ModalPessoaAutorizada } from \"../../components/modals/\";\r\n\r\nexport default function PessoasAutorizadas() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [dadosPessoasAutorizadas, setDadosPessoasAutorizadas] = useState(!!manutencao.dados && !!manutencao.dados.pessoaautorizada ? manutencao.dados.pessoaautorizada : []);\r\n const [form] = Form.useForm();\r\n const [openModalPessoaAutorizada, setOpenModalPessoaAutorizada] = useState(false);\r\n\r\n const editaPessoaAutorizada = (record) => {\r\n form.setFieldsValue(record);\r\n setOpenModalPessoaAutorizada(true);\r\n };\r\n\r\n const alterarPropriedadePessoaAutorizada = (key, coluna, checked, idx) => {\r\n const newData = [...dadosPessoasAutorizadas];\r\n newData[idx][coluna] = checked;\r\n setDadosPessoasAutorizadas(newData);\r\n };\r\n\r\n const removePessoaAutorizada = (record, indice) => {\r\n const newData = [...dadosPessoasAutorizadas];\r\n record.indice = indice;\r\n const index = newData.findIndex((item) => indice === item.indice);\r\n newData.splice(index, 1)\r\n setDadosPessoasAutorizadas(newData);\r\n };\r\n\r\n const modalConfirmaExclusao = (record, indice) => {\r\n Modal.confirm({\r\n title: 'Excluir?',\r\n icon: ,\r\n content: `Deseja excluir a pessoa autorizada ${record.pes_nome} - ${record.grp_descricao} ?`,\r\n okText: 'Excluir',\r\n cancelText: 'Cancelar',\r\n centered: true,\r\n onOk() {\r\n removePessoaAutorizada(record, indice);\r\n }\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ pessoaautorizada: dadosPessoasAutorizadas } } } });\r\n }, [dadosPessoasAutorizadas]);\r\n\r\n return (\r\n\r\n
\r\n \r\n
\r\n \r\n \"Pessoas Pessoas Autorizadas - (OPCIONAL)\r\n \r\n \r\n Adicione a(s) pessoa(s) autorizada(s) aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n {pes_nome}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'CPF',\r\n render: ({ pef_cpf }) => (\r\n
\r\n {MaskFormat(!!pef_cpf ? pef_cpf.replaceAll('.', '').replaceAll('-', '') : '', 'Não Informado', true)}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Grau de Parentesco',\r\n render: ({ grp_descricao }) => (\r\n
\r\n {grp_descricao}\r\n
\r\n ),\r\n },\r\n {\r\n title: 'Autorizado(a)',\r\n Key: 'pea_ativo',\r\n render: (record, indice, idx) => (\r\n alterarPropriedadePessoaAutorizada(indice, \"pea_ativo\", checked, idx)}\r\n >\r\n Autorizado(a)?\r\n \r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n fixed: 'right',\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Pessoa Autorizada Cadastrada\r\n \r\n \r\n \r\n )\r\n }} scroll={{ x: 960 }} dataSource={dadosPessoasAutorizadas}\r\n />\r\n \r\n setOpenModalPessoaAutorizada(false)} />\r\n \r\n\r\n );\r\n\r\n}","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Typography, Divider, Button, Tag, Form, Table } from \"antd\";\r\nimport { PlusOutlined, EditOutlined, DeleteOutlined, ExclamationCircleOutlined } from \"@ant-design/icons\";\r\n\r\nimport { useStateValue } from \"../../state\";\r\nimport { manutencaoActions } from \"../../actions\";\r\nimport { ModalVeiculo } from \"../../components/modals/\";\r\n\r\nexport default function Veiculos() {\r\n\r\n const [{ ui, manutencao }, dispatch] = useStateValue();\r\n const [openModalVeiculo, setOpenModalVeiculo] = useState(false);\r\n const [dadosVeiculos, setDadosVeiculos] = useState(!!manutencao.dados && !!manutencao.dados.veiculos ? manutencao.dados.veiculos : []);\r\n const [form] = Form.useForm();\r\n const tagsAtivo = ['Ativo'];\r\n\r\n const editaTelefone = (record, indice) => {\r\n record.indice = indice;\r\n form.setFieldsValue(record);\r\n setOpenModalVeiculo(true);\r\n };\r\n\r\n const excluir = (record) => {\r\n let dadosTemp = [...dadosVeiculos];\r\n dadosTemp = dadosTemp.filter((dados) => dados !== record);\r\n setDadosVeiculos(dadosTemp);\r\n };\r\n\r\n const alterarPropriedadeVeiculo = (key, coluna, checked) => {\r\n const newData = [...dadosVeiculos];\r\n newData[key][coluna] = checked;\r\n setDadosVeiculos(newData);\r\n };\r\n\r\n useEffect(() => {\r\n dispatch({ type: manutencaoActions.CHANGE, data: { dados: { ...manutencao.dados, ...{ veiculos: dadosVeiculos } } } });\r\n }, [dadosVeiculos]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \"Veículo(s)\" Veículo(s) - (OPCIONAL)\r\n \r\n \r\n Adicione o(s) veículo(s) do transportador aqui.\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
(\r\n
\r\n {trv_placa}-{trv_uf} {trv_marca} {trv_modelo}\r\n
\r\n ),\r\n },\r\n {\r\n title: '',\r\n width: 75,\r\n align: 'center',\r\n render: (record, obj, indice) => (\r\n tagsAtivo.map(tag => (\r\n alterarPropriedadeVeiculo(indice, \"trv_ativo\", checked)}\r\n >\r\n {tag}\r\n \r\n ))\r\n ),\r\n },\r\n {\r\n title: 'Ações',\r\n dataIndex: '',\r\n align: 'center',\r\n key: 'x',\r\n width: 65,\r\n render: (record, obj, indice) => (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n Ainda não possui Outro Contato Cadastrado\r\n \r\n \r\n \r\n )\r\n }} dataSource={dadosVeiculos} />\r\n \r\n setOpenModalVeiculo(false)} listaVeiculos={{ dadosVeiculos, setDadosVeiculos }} />\r\n \r\n\r\n );\r\n\r\n}","const drawerActions = {\r\n CHANGE: 'changeDrawer'\r\n}\r\n\r\nconst manutencaoActions = {\r\n CHANGE: 'changeManutencao'\r\n}\r\n\r\nconst listagemActions = {\r\n CHANGE: 'changeListagem'\r\n}\r\n\r\nconst tributacaoActions = {\r\n CHANGE: 'changeTributacao'\r\n}\r\n\r\nconst listaTabelaDadosActions = {\r\n CHANGE: 'changeListaTabelaDados'\r\n}\r\n\r\nconst parametrosEmpresaActions = {\r\n CHANGE: 'changeParametrosEmpresa'\r\n}\r\n\r\nconst selectPaginadoActions = {\r\n CHANGE: 'changeSelectPaginadoActions'\r\n}\r\n\r\n\r\nexport {\r\n drawerActions, manutencaoActions, listagemActions, tributacaoActions, listaTabelaDadosActions, parametrosEmpresaActions, selectPaginadoActions\r\n}","export default __webpack_public_path__ + \"static/media/Contrato_NewERP.ab6ad1e4.pdf\";","export default __webpack_public_path__ + \"static/media/i-subjacentes.4dd45421.png\";","export default __webpack_public_path__ + \"static/media/i-email.7dbd9933.png\";","export default __webpack_public_path__ + \"static/media/i-ocupacoes.2f1064ca.png\";","export default __webpack_public_path__ + \"static/media/i-nacionalidade.471ad975.png\";","export default __webpack_public_path__ + \"static/media/i-pessoas-autorizadas.97d039b7.png\";","export default __webpack_public_path__ + \"static/media/i-print.f02b12f8.png\";","export default __webpack_public_path__ + \"static/media/i-servidor.1e5b5a82.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAAAyCAYAAAADQbYqAAAACXBIWXMAADFeAAAxXgHTZC64AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCm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UiX1xSk5f4gG3/nMbLnz2EYxtp9qbLtOe/s4B2grhSCdJkZvCoQdF1fsxO6lAe07G+Heq3G7t271+RqUBSFaqWy8gimabJnzx6EWP6/fFxXABczTkKWLw3ZNE2mVxphcfMfce3W8nNn10nnXgMuZnKCbM/DuOryYyer2sqvhGaw+9KyKlxEuZeAlf//9/AnsGJDCElZ+6/XlvWE3BaaVbioGGnWIrLbxlGuIoSBzPPIdh3LalxUHIRo0T+5F0fVmez73dWBcPYKTMTbMXoIHoKH4CF4CB6Ch+AhrFB9NQAOmQpsA9Fv7AAAAABJRU5ErkJggg==\"","export default __webpack_public_path__ + \"static/media/vendas.9c6e90cd.png\";","export default __webpack_public_path__ + \"static/media/compra.056d5699.png\";","export default __webpack_public_path__ + \"static/media/pdv.f3e6acb7.png\";","export default __webpack_public_path__ + \"static/media/financeiro.da436854.png\";","export default __webpack_public_path__ + \"static/media/contabilidade.ea1a8b80.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiYAAAH0CAYAAAAJ0Ob/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKB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ECAAgTAIAx+f8BAFwjENZ90dDnAAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/catalogoEletronico.98c431d0.png\";","export default __webpack_public_path__ + \"static/media/pedidosOs.c0f1184a.png\";","export default __webpack_public_path__ + \"static/media/aReceber.073bcc17.png\";","export default __webpack_public_path__ + \"static/media/aPagar.a70a06d4.png\";","export default __webpack_public_path__ + \"static/media/contaCorrente.89b4a8bb.png\";","export default __webpack_public_path__ + \"static/media/caixaBanco.4fd821e4.png\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiYAAAH0CAYAAAAJ0Ob/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUii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dK5sleWiSlUk2NhHYoDVJft7dtyzh/XbLJH+XZDc3BwtgdZJ9u/tSoxAmAHONk12TXJTk4abBPL2uuz9tDOvnPSYA69HdV2Xm1BK/Mg3muhkleYcoGfDJgFdMAAZ4sKzaLTOHdndCPIZxR5KjuvskoxiMV0wABnnK231lkqcmOSEz73+BDbkkyTNEiTABWKw4ub2735DkGUnOiNPWs25XZub8Tnt39z8Zx3DsygGY6wNo1e8keXlmzqvzjDgM/LRak5lzFH0zyalJvtP+uAoTgCWOlIck2SnJ9kk2j+MWLXed5O4ktyT5Z8clESYAwDLkPSYAgDABAHig/zcAy4qEL7ZTLUEAAAAASUVORK5CYII=\"","export default __webpack_public_path__ + \"static/media/fiscal.8c9d7c46.png\";","export default __webpack_public_path__ + \"static/media/impostos.3838058b.png\";","export default __webpack_public_path__ + \"static/media/sped.314bcb54.png\";","export default __webpack_public_path__ + \"static/media/indicadores.cdfa1938.png\";","export default __webpack_public_path__ + \"static/media/mdfe.d4d72119.png\";","export default __webpack_public_path__ + \"static/media/utilitarios.d0b228df.png\";","export default function formatNumber(valor, lista = false, cifrao = true,casasDecimais = 2) {\r\n if (!!valor) {\r\n let negativo = false;\r\n if (lista) {\r\n valor = valor.toString().replaceAll(',', '.');\r\n valor = parseFloat(valor).toFixed(casasDecimais);\r\n }\r\n if (valor < 0) {\r\n negativo = true;\r\n }\r\n valor = valor.toString().replace(/\\D/g, \"\");\r\n valor = valor.toString().replace(new RegExp(`(\\\\d)(\\\\d{${casasDecimais+6}})$`), \"$1.$2\");\r\n valor = valor.toString().replace(new RegExp(`(\\\\d)(\\\\d{${casasDecimais+3}})$`), \"$1.$2\");\r\n valor = valor.toString().replace(new RegExp(`(\\\\d)(\\\\d{${casasDecimais}})$`), \"$1,$2\");\r\n if (negativo) {\r\n valor = '-' + valor;\r\n }\r\n if (cifrao) {\r\n return `${valor}`;\r\n } else {\r\n return valor;\r\n }\r\n } else {\r\n //console.log('problema no formatNumber, valor não é valido');\r\n if (cifrao) {\r\n return '0,00';\r\n } else {\r\n return '0,00';\r\n }\r\n\r\n }\r\n}","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAGHaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pg0KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyI+PHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj48cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0idXVpZDpmYWY1YmRkNS1iYTNkLTExZGEtYWQzMS1kMzNkNzUxODJmMWIiIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIj48dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPjwvcmRmOkRlc2NyaXB0aW9uPjwvcmRmOlJERj48L3g6eG1wbWV0YT4NCjw/eHBhY2tldCBlbmQ9J3cnPz4slJgLAAAHHklEQVRIS52We1DUxx3AP787OI674zgR7sQXYESIBlAUo60mosWoyWjTGI3tpINpxFdVYqqdcdrEVmJscEwttXFsKWOT8xGDSklMsXEQAwaL+EBeGhBB4Dy84+COe3O3/YP6IGP+6ee/3e/ufna/O/tAPIHS0lKhCA0V58rPfzf0fyEJIQT/Y/u2bfS23qLpTgf3BtyM02lIGDOaMVNSycvLe9DsIVarlV5bL4kTE78bGobs8cKFivMY+sxEegeIGR+PztmHtucuVy5VA9DR0UFTUxNtbW14PB7M90w0NDRSUlJCe3v740MNY9hKbre1caGyig/2vE9aWjp1N66Tu+M3TJw9lwuXr1N8/BgBmYyWfx5lYlo60xInsDo7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cPH6DgZ69SXFLCqdMl2Gy2IcnGjRs5deo0s5Mn0n25kuCgG5+jD2+fHbkilEG3C6fZjH/Ajlwh0XHjGqrTe8mValjSepKmoweRKSUcvTY6jxawJnMSS6do8d67TWtrGyF1dXVUVFTg9XpZm5PDj19fyai06fhd7of5tzRe58uNywlVq8nKP4zdZmOsXk9G2tNIQsJntuK1D+ByuUnQa1n/8g/RaFTUNHagVquRGhoahCRJ5Ofn80JWFieKi3FnrSJh/mJc1l6UkWrKclczcfErJL70IpaWLsqzF5AyPgaZJEMmk+jssRK25A2kUeOx7tvM5hWZyGQy/v55NVve/eDRxjc2NpKdnU1RYSHL31zLrA+NRCclIIJwMX833n4bL+zPp6miGd+ulXzxp1y8bh9hESpKy6pZ+u7HzHt2OmnT0ul3OAGJ8DAFn504Bo8/k/v37xdLly4V165dE4nTZoifHDsntvcLsbrqjjCkzhA51+6JpFffELExI8TyzKni5efTxIoF08WsZxJE6pQpwtLbL4JCCI9/aLxus1XMnTt3+PMLsG3bNlpaWvjtjh3k7d5Nq8ZASvY62ivOMWHxcso3vcbet3OJGhtPIBDA6/EgggEmJ0/CYBgFgCRJRKgUvP2r7Tw1IW743fWAgoICUlJSCPj9uN1uPjEaabJ7GD8nkwiZnNGmb/nFmrW0324lOSWN+AlxAHR1man9phK1Wk1tXR1VF6soLi5+sgSgu9vE+fPlREVFMcqgZ2zsaDxOJ1a7nQVZWYycPR/VuHEMNjcwLymBKJ2Os/+pZWDcJAgGuHnKyB9/v5MNb239fskDmpub0UZEMHrMGACOVl/lRKcZ+90e3N1taJOmYusxMejxMGJcHN6OViS5nKgpacQM2Di0+pXhv5UnkZyc/FAAYG9t5s5H+5jf38quhT9A//VJrGeOY/3qNPLSw+QmG1ifqKe3cC+mii8B+C82ALjMyWRIFwAAAABJRU5ErkJggg==\"","export default function formatDate(data) {\r\n if (data === '' || data === undefined)\r\n return;\r\n\r\n return data.split('/').reverse().join('-');;\r\n}","export default function formatFone(valor) {\r\n let retorno = '';\r\n if (!!valor) {\r\n valor = valor.toString();\r\n if (valor.length >= 8) {\r\n switch (valor.length) {\r\n case 8:\r\n retorno = valor.slice(0, 4) + '-' + valor.slice(4, 8);\r\n break;\r\n case 9:\r\n retorno = valor.slice(0, 1) + ' ' + valor.slice(1, 5) + '-' + valor.slice(5, 9);\r\n break;\r\n case 10:\r\n retorno = '(' + valor.slice(0, 2) + ') ' + valor.slice(2, 6) + '-' + valor.slice(6, 10);\r\n break;\r\n case 11:\r\n retorno = '(' + valor.slice(0, 2) + ') ' + valor.slice(2, 3) + ' ' + valor.slice(3, 7) + '-' + valor.slice(7, 11);\r\n break;\r\n }\r\n }\r\n }\r\n return retorno;\r\n}","import { HasValue } from \"../services/funcoes\";\r\n\r\nexport default function formatarQuantidade(valor, casasDecimais = 0) {\r\n if (!HasValue(valor)) {\r\n valor = 0;\r\n }\r\n\r\n // Convertendo valores com vírgula corretamente\r\n let numero = typeof valor === \"string\" ? parseFloat(valor.replace(',', '.')) : parseFloat(valor);\r\n\r\n // Se o número for NaN após a conversão, define como 0\r\n if (isNaN(numero)) {\r\n numero = 0;\r\n }\r\n\r\n return numero.toFixed(casasDecimais).replace('.', ',');\r\n}\r\n","export default function FormatarCPF(cpf) {\r\n let valor = '';\r\n if (!!cpf && cpf !== '') {\r\n valor = cpf.slice(0, 3) + '.' + cpf.slice(3, 6) + '.' + cpf.slice(6, 9) + '-' + cpf.slice(9, 11);\r\n }\r\n return valor;\r\n}","import axios from 'axios';\r\nimport { getToken, logout, getEmpresa, getLocal, linkApi, linkApiGestor } from './auth';\r\nconst apiWeb = axios.create({ baseURL: linkApi });\r\n\r\napiWeb.interceptors.request.use(async config => {\r\n const token = getToken();\r\n const empresa = getEmpresa();\r\n const local = getLocal();\r\n //config.headers.ApiKey =\"as123\";\r\n if (token) config.headers.Authorization = `Bearer ${token}`;\r\n if (empresa) config.headers.codigoempresa = empresa;\r\n if (local) config.headers.codigolocal = local;\r\n\r\n return config;\r\n});\r\n\r\napiWeb.interceptors.response.use(function (response) {\r\n return response;\r\n}, function (error) {\r\n if (error.response.status === 401) {\r\n logout();\r\n }\r\n return Promise.reject(error);\r\n});\r\n\r\nexport default apiWeb;\r\n\r\n","import api from '../services/api';\r\nimport { notification } from \"antd\";\r\nimport { getRegimeTributario } from \"../services/auth\";\r\n\r\nexport const calculoIPI = (baseIPI, aliquotaIPI, valorFrete, valorOutrasDespesas) => {\r\n return new Promise(resolve => {\r\n if (!!baseIPI && !!aliquotaIPI) {\r\n if (valorFrete < 0) {\r\n resolve({ error: \"Valor do frete não pode ser negativo\" });\r\n }\r\n if (valorOutrasDespesas < 0) {\r\n resolve({ error: \"Valor do outras despesas acessórias não pode ser negativo\" });\r\n }\r\n\r\n let baseCalculo = (baseIPI + valorFrete + valorOutrasDespesas).toFixed(2);\r\n let valorIpi = ((baseCalculo * aliquotaIPI) / 100).toFixed(2);\r\n\r\n resolve({ baseIPI: parseFloat(baseCalculo), valorIPI: parseFloat(valorIpi) });\r\n } else {\r\n if (!(!!baseIPI)) {\r\n resolve({ error: \"A base de cálculo do IPI não foi informada!\" });\r\n }\r\n if (!(!!aliquotaIPI)) {\r\n resolve({ error: \"A alíquota do IPI não foi informada!\" });\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport const calculoICMSST = (valorItem, quantidade, valorFrete, valorDespesas, valorIPI, valorDesconto, valorAcrescimo, reducaoICMS, aliquotaICMS, reducaoICMSST, mva, aliquotaICMSST, ufDestino, ufOrigem, regimeTributario, mvaAjustado, retornoCalcIcms) => {\r\n return new Promise(resolve => {\r\n let valorICMS = 0;\r\n let resultadoBaseICMSST = 0;\r\n let resultadoICMSST = 0;\r\n if (!!valorItem && !!mva && !!aliquotaICMSST && !!quantidade) {\r\n if (valorFrete < 0) {\r\n resolve({ error: \"Valor do frete não pode ser negativo\" });\r\n }\r\n if (valorDespesas < 0) {\r\n resolve({ error: \"Valor das despesas não pode ser negativo\" });\r\n }\r\n if (valorIPI < 0) {\r\n resolve({ error: \"Valor do IPI não pode ser negativo\" });\r\n }\r\n if (valorDesconto < 0) {\r\n resolve({ error: \"Valor do desconto não pode ser negativo\" });\r\n }\r\n if (reducaoICMS < 0) {\r\n resolve({ error: \"Valor do desconto não pode ser negativo\" });\r\n }\r\n if (valorItem < 0) {\r\n resolve({ error: \"Valor do item não pode ser negativo\" });\r\n }\r\n if (aliquotaICMS < 0) {\r\n resolve({ error: \"A alíquota do ICMS não pode ser negativa\" });\r\n }\r\n if (aliquotaICMSST < 0) {\r\n resolve({ error: \"A alíquota do ICMS ST não pode ser negativa\" });\r\n }\r\n if (mva < 0) {\r\n resolve({ error: \"O MVA não pode ser negativo\" });\r\n }\r\n if (reducaoICMSST < 0) {\r\n resolve({ error: \"O percentual de redução do MVA não pode ser negativo\" });\r\n }\r\n\r\n if (!!retornoCalcIcms) {\r\n if (!(!!retornoCalcIcms.ICMS)) {\r\n valorICMS = 0;\r\n } else {\r\n valorICMS = retornoCalcIcms.ICMS;\r\n }\r\n if (aliquotaICMSST > aliquotaICMS && ufOrigem !== ufDestino && regimeTributario === 3) {\r\n if (mvaAjustado === 0) {\r\n mvaAjustado = ((((1 + (mva / 100)) * ((100 - aliquotaICMS) / 100)) / ((100 - aliquotaICMSST) / 100) - 1) * 100);\r\n }\r\n resultadoBaseICMSST = ((((valorItem * quantidade) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI)) * (1 + (mvaAjustado / 100))) - ((valorItem + valorFrete + valorDespesas + parseFloat(valorIPI)) * reducaoICMSST / 100)).toFixed(2);\r\n resultadoICMSST = ((((resultadoBaseICMSST * aliquotaICMSST / 100) - valorICMS))).toFixed(2);\r\n\r\n } else {\r\n resultadoBaseICMSST = ((((valorItem * quantidade) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI)) * (1 + (mva / 100))) - ((valorItem + valorFrete + valorDespesas + parseFloat(valorIPI)) * reducaoICMSST / 100)).toFixed(2);\r\n resultadoICMSST = ((((resultadoBaseICMSST * aliquotaICMSST / 100) - valorICMS))).toFixed(2);\r\n\r\n }\r\n resolve({ baseICMSST: parseFloat(resultadoBaseICMSST), ICMSST: parseFloat(resultadoICMSST) });\r\n } else {\r\n calculoICMS(valorItem, quantidade, valorFrete, valorDespesas, valorIPI, valorDesconto, valorAcrescimo, reducaoICMS, aliquotaICMS).then(function (icms) {\r\n if (!(!!icms.ICMS)) {\r\n valorICMS = 0;\r\n } else {\r\n valorICMS = icms.ICMS;\r\n }\r\n if (aliquotaICMSST > aliquotaICMS && ufOrigem !== ufDestino && regimeTributario === 3) {\r\n if (mvaAjustado === 0) {\r\n mvaAjustado = ((((1 + (mva / 100)) * ((100 - aliquotaICMS) / 100)) / ((100 - aliquotaICMSST) / 100) - 1) * 100);\r\n }\r\n resultadoBaseICMSST = ((((valorItem * quantidade) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI)) * (1 + (mvaAjustado / 100))) - ((valorItem + valorFrete + valorDespesas + parseFloat(valorIPI)) * reducaoICMSST / 100)).toFixed(2);\r\n resultadoICMSST = ((((resultadoBaseICMSST * aliquotaICMSST / 100) - valorICMS))).toFixed(2);\r\n\r\n } else {\r\n resultadoBaseICMSST = ((((valorItem * quantidade) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI)) * (1 + (mva / 100))) - ((valorItem + valorFrete + valorDespesas + parseFloat(valorIPI)) * reducaoICMSST / 100)).toFixed(2);\r\n resultadoICMSST = ((((resultadoBaseICMSST * aliquotaICMSST / 100) - valorICMS))).toFixed(2);\r\n\r\n }\r\n resolve({ baseICMSST: parseFloat(resultadoBaseICMSST), ICMSST: parseFloat(resultadoICMSST) });\r\n });\r\n }\r\n } else {\r\n if (!(!!valorItem)) {\r\n resolve({ error: \"O valor do item não foi informado\" });\r\n }\r\n if (!(!!quantidade)) {\r\n resolve({ error: \"A quantidade do item não foi informado\" });\r\n }\r\n\r\n if (!(!!aliquotaICMSST)) {\r\n resolve({ error: \"A alíquota do ICMS não foi informada\" });\r\n }\r\n\r\n if (!(!!mva)) {\r\n resolve({ error: \"O MVA não foi informado\" });\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport const calculoICMS = (valorItem, quantidadeItem, valorFrete, valorDespesas, valorIPI, valorDesconto, valorAcrescimo, reducaoICMS, aliquotaICMS) => {\r\n return new Promise(resolve => {\r\n if (!!valorItem && !!aliquotaICMS) {\r\n if (valorFrete < 0) {\r\n resolve({ error: \"Valor do frete não pode ser negativo\" });\r\n }\r\n if (valorDespesas < 0) {\r\n resolve({ error: \"Valor das despesas não pode ser negativo\" });\r\n }\r\n if (valorIPI < 0) {\r\n resolve({ error: \"Valor do IPI não pode ser negativo\" });\r\n }\r\n if (valorDesconto < 0) {\r\n resolve({ error: \"Valor do desconto não pode ser negativo\" });\r\n }\r\n if (reducaoICMS < 0) {\r\n resolve({ error: \"Valor do desconto não pode ser negativo\" });\r\n }\r\n if (valorItem < 0) {\r\n resolve({ error: \"Valor do item não pode ser negativo\" });\r\n }\r\n if (quantidadeItem <= 0) {\r\n resolve({ error: \"A quantidade do item não pode ser igual a zero\" });\r\n }\r\n if (aliquotaICMS < 0) {\r\n resolve({ error: \"A alíquota não pode ser negativa\" });\r\n }\r\n\r\n let resultadoBaseICMS = ((((valorItem * quantidadeItem) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI) - valorDesconto) * parseFloat(100 - reducaoICMS)) / 100).toFixed(2);\r\n let resultadoICMS = (((((valorItem * quantidadeItem) + valorFrete + valorDespesas + valorAcrescimo + parseFloat(valorIPI) - valorDesconto) * (100 - reducaoICMS) / 100) * aliquotaICMS) / 100).toFixed(2);\r\n\r\n resolve({ baseICMS: parseFloat(resultadoBaseICMS), ICMS: parseFloat(resultadoICMS) });\r\n } else {\r\n if (!(!!valorItem)) {\r\n resolve({ error: \"O valor do item não foi informado\" });\r\n }\r\n\r\n if (quantidadeItem == 0) {\r\n resolve({ error: \"A quantidade do item não foi informada\" });\r\n }\r\n\r\n if (!(!!aliquotaICMS)) {\r\n resolve({ error: \"A alíquota do ICMS não foi informada\" });\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport const calculoICMSDiferido = (valorICMSOperacao, percentualICMSDiferido) => {\r\n return new Promise(resolve => {\r\n if (!!valorICMSOperacao && !!percentualICMSDiferido) {\r\n if (valorICMSOperacao < 0) {\r\n resolve({ error: \"Valor do ICMS operação não pode ser negativo\" });\r\n }\r\n if (percentualICMSDiferido < 0) {\r\n resolve({ error: \"Valor do percentual do diferimento não pode ser negativo\" });\r\n }\r\n\r\n var resultadoICMSDiferido = ((valorICMSOperacao * parseFloat(percentualICMSDiferido)) / 100).toFixed(2);\r\n var resultadoICMSDevido = (valorICMSOperacao - resultadoICMSDiferido).toFixed(2);\r\n\r\n resolve({ valorICMSDiferido: parseFloat(resultadoICMSDiferido), ICMSDevido: parseFloat(resultadoICMSDevido) });\r\n } else {\r\n if (!(!!valorICMSOperacao)) {\r\n resolve({ error: \"O valor do ICMS operação não foi informado\" });\r\n }\r\n\r\n if (!(!!percentualICMSDiferido)) {\r\n resolve({ error: \"O percentual do ICMS diferido não foi informado\" });\r\n }\r\n }\r\n });\r\n}\r\n// tratar campos numericos....\r\nexport const CalcularImpostoItem = (origemProduto, cst, csosn, ufOrigem, ufDestino, quantidadeItem, valorUnitario, valorFrete, valorOutros, valorDesconto, aliquotaIcms, percDiferimento,\r\n percReducaoIcms, aliquotaIcmsSt, percMva, percReducaoIcmsST, percMvaAjustado, aliquotaIpi, tipoPessoa, eConsumidorFinal, destinatarioTemIE,\r\n indicadorPresenca = 0, eProdutorRural = false, eOrgaoPublico = false, eServico = false, aliquotaIssqn) => {\r\n return new Promise(resolve => {\r\n var values = {\r\n orm_id: origemProduto,\r\n cso_id: csosn,\r\n cst_id: cst,\r\n uf_origem: ufOrigem,\r\n uf_destino: ufDestino,\r\n quantidade: quantidadeItem,\r\n vlr_unitario: parseFloat(valorUnitario),\r\n vlr_frete: parseFloat(valorFrete),\r\n vlr_outros: parseFloat(valorOutros),\r\n vlr_descontos: parseFloat(valorDesconto),\r\n aliquotaIcms: aliquotaIcms,\r\n percDiferimento: percDiferimento,\r\n percReducaoIcms: percReducaoIcms,\r\n aliquotaIcmsSt: aliquotaIcmsSt,\r\n percReducaoIcmsST: percReducaoIcmsST,\r\n percMva: percMva,\r\n percMvaAjustado: percMvaAjustado,\r\n aliquotaIpi: aliquotaIpi,\r\n emp_regimetributario: parseInt(getRegimeTributario()),\r\n ope_indicadorpresenca: indicadorPresenca,\r\n tipoPessoa: tipoPessoa,\r\n eConsumidorFinal: eConsumidorFinal,\r\n eOrgaoPublico: eOrgaoPublico,\r\n eProdutorRural: eProdutorRural,\r\n destinatarioTemIE: destinatarioTemIE,\r\n eServico: eServico,\r\n aliquotaIssqn: aliquotaIssqn,\r\n identificadorDestino: ufDestino==='EX'? 3 : ufOrigem == ufDestino ? 1 : 2,\r\n };\r\n\r\n api.post(`CalculaImpostos/CalcularImpostoItem`, values).then(res => {\r\n if (res.status === 200) {\r\n resolve(res.data);\r\n }\r\n }, err => {\r\n notification.error({ message: 'Erro ao processar a requisição.', description: JSON.stringify(err.response) });\r\n }).finally(\r\n () => {\r\n\r\n }\r\n );\r\n });\r\n}","export default __webpack_public_path__ + \"static/media/img-home.d331a346.jpg\";","export default __webpack_public_path__ + \"static/media/img-home-01.4c36f3ae.jpg\";","export default __webpack_public_path__ + \"static/media/img-home-02.90e7cf34.jpg\";","export default __webpack_public_path__ + \"static/media/img-home-03.ee856c7c.jpg\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SM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OaS/3seHcP1NUbxX0uz9oAAcKBUJMRnTnGfAXipir5pijTAcKVkJSU0IYdwDI4Zbbt9LCIE4SajKaqtHSuUhzcbIFiDzxjtRARRPgiVjWhbp6i5NyxgfKroDoSgNN0w4AuMPgqrS7DQREcqiwlqDMQZbQT4q6A0NRQXrubCn7StXuernJsj0e45MmbEzvjAT35psio6NrrzTZ+OyoaqU/ycigmqgqjz7Z5T5CcVbmEvC9/83AJorZVfTWuP0AAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/i-sem-acesso.3ad53de4.png\";"],"sourceRoot":""}