diff --git a/sei/web/modulos/peticionamento/PeticionamentoIntegracao.php b/sei/web/modulos/peticionamento/PeticionamentoIntegracao.php index 000724f..e361f05 100644 --- a/sei/web/modulos/peticionamento/PeticionamentoIntegracao.php +++ b/sei/web/modulos/peticionamento/PeticionamentoIntegracao.php @@ -32,7 +32,7 @@ public function getNome() public function getVersao() { - return '4.2.5'; + return '4.2.6'; } public function getInstituicao() diff --git a/sei/web/modulos/peticionamento/int/MdPetVincUsuarioExternoINT.php b/sei/web/modulos/peticionamento/int/MdPetVincUsuarioExternoINT.php index 7c775d8..2b5c6fb 100644 --- a/sei/web/modulos/peticionamento/int/MdPetVincUsuarioExternoINT.php +++ b/sei/web/modulos/peticionamento/int/MdPetVincUsuarioExternoINT.php @@ -18,152 +18,150 @@ class MdPetVincUsuarioExternoINT extends InfraINT public static function validarExistenciaProcuracao($dados) { - if ($dados['tipoProc'] == "S") { - - $poderes = explode('-', $dados['poderes']); - - //Validação para Procuração Especial + if ( $dados['tipoProc'] == 'S' ) { + + // DEFININDO AS VARIAVEIS DA NOVA PROCURACAO + $dados['validade'] = ($dados['validade'] != 'Indeterminada') ? $dados['validade'] . ' 23:59:59' : null; + $poderesNova = explode('-', $dados['poderes']); + $abrangenciaNova = []; + + if ( !empty($dados['processos']) ) { + $tpProcesso = PaginaSEIExterna::getInstance()->getArrItensTabelaDinamica($dados['processos']); + foreach ($tpProcesso as $value) { + $abrangenciaNova[] = $value[0]; + } + } + + $abrangenciaSimplesNova = !empty($abrangenciaNova) ? 'E' : 'Q'; + + // BUSCA POR PROCURACOES ESPECIAIS EXISTENTES $objMdPetVincRepresentantDTO = new MdPetVincRepresentantDTO(); - $objMdPetVincRepresentantRN = new MdPetVincRepresentantRN(); $objMdPetVincRepresentantDTO->setStrStaEstado(MdPetVincRepresentantRN::$RP_ATIVO); $objMdPetVincRepresentantDTO->adicionarCriterio( array('IdContato', 'IdContatoVinc', 'TipoRepresentante'), array(InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL), - array($dados['idOutorgado'], $dados['idOutorgante'], 'E'), + array($dados['idOutorgado'], $dados['idOutorgante'], MdPetVincRepresentantRN::$PE_PROCURADOR_ESPECIAL), array(InfraDTO::$OPER_LOGICO_AND, InfraDTO::$OPER_LOGICO_AND)); $objMdPetVincRepresentantDTO->retNumIdContato(); $objMdPetVincRepresentantDTO->retNumIdMdPetVinculoRepresent(); - $objMdPetVincRepresentantDTO = $objMdPetVincRepresentantRN->listar($objMdPetVincRepresentantDTO); - $objMdPetVincRepresentantDTO = InfraArray::converterArrInfraDTO($objMdPetVincRepresentantDTO, 'IdMdPetVinculoRepresent'); - - //Validação para Procuração Simples + $arrObjMdPetVincRepresentantDTO = (new MdPetVincRepresentantRN())->listar($objMdPetVincRepresentantDTO); + + // SE JA EXISTIR PROCURACAO ESPECIAL MOSTRA MODAL DE CONFLITO + if( !empty($arrObjMdPetVincRepresentantDTO) ){ + $arrIdVinculosEspeciaisExistente = implode('-', InfraArray::converterArrInfraDTO($arrObjMdPetVincRepresentantDTO, 'IdMdPetVinculoRepresent')); + return ''; + } + + $gerarProcuracao = true; + $arrIdMdPetVinculoRepresentSimplesFinal = []; + $arrPoderesConflitantesFinal = []; + $arrProcessosConflitantesFinal = []; + $conflito_processos_poderes = false; + + // BUSCA POR PROCURACOES SIMPLES EXISTENTES $objMdPetVincRepresentantSimplesDTO = new MdPetVincRepresentantDTO(); - $objMdPetVincRepresentantSimplesRN = new MdPetVincRepresentantRN(); - $objMdPetVincRepresentantSimplesDTO->setStrStaEstado(MdPetVincRepresentantRN::$RP_ATIVO); - $objMdPetVincRepresentantSimplesDTO->retNumIdMdPetRelPoder(); + $objMdPetVincRepresentantSimplesDTO->retStrStaEstado(); $objMdPetVincRepresentantSimplesDTO->retDthDataCadastro(); $objMdPetVincRepresentantSimplesDTO->retDthDataLimite(); $objMdPetVincRepresentantSimplesDTO->retStrStaAbrangencia(); + $objMdPetVincRepresentantSimplesDTO->retNumIdContato(); + $objMdPetVincRepresentantSimplesDTO->retNumIdMdPetVinculoRepresent(); + // $objMdPetVincRepresentantSimplesDTO->retNumIdMdPetRelPoder(); + $objMdPetVincRepresentantSimplesDTO->setStrStaEstado(MdPetVincRepresentantRN::$RP_ATIVO); $objMdPetVincRepresentantSimplesDTO->adicionarCriterio( array('IdContato', 'IdContatoVinc', 'TipoRepresentante'), array(InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL), array($dados['idOutorgado'], $dados['idOutorgante'], MdPetVincRepresentantRN::$PE_PROCURADOR_SIMPLES), array(InfraDTO::$OPER_LOGICO_AND, InfraDTO::$OPER_LOGICO_AND)); - $objMdPetVincRepresentantSimplesDTO->retNumIdContato(); - $objMdPetVincRepresentantSimplesDTO->retNumIdMdPetVinculoRepresent(); - $arrObjMdPetVincRepresentantSimplesDTO = $objMdPetVincRepresentantSimplesRN->listar($objMdPetVincRepresentantSimplesDTO); - $arrObjMdPetVincRepresentantSimplesDTO = InfraArray::converterArrInfraDTO($arrObjMdPetVincRepresentantSimplesDTO, 'IdMdPetVinculoRepresent'); - - if($validarPoderes = false){ - - $arrObjMdPetVincRepresentantSimplesFinal = array(); - foreach($arrObjMdPetVincRepresentantSimplesDTO as $objMdPetVincRepresentantSimples){ - $gerarProcuracao = true; - - $objMdPetRelVincRepTpPoderRN = new MdPetRelVincRepTpPoderRN(); - $objMdPetRelVincRepTpPoderDTO = new MdPetRelVincRepTpPoderDTO(); - $objMdPetRelVincRepTpPoderDTO->retNumIdTipoPoderLegal(); - $objMdPetRelVincRepTpPoderDTO->setNumIdVinculoRepresent($objMdPetVincRepresentantSimples->getNumIdMdPetVinculoRepresent()); - - $arrObjMdPetRelVincRepTpPoderDTO = $objMdPetRelVincRepTpPoderRN->listar($objMdPetRelVincRepTpPoderDTO); - $arrObjMdPetRelVincRepTpPoderDTO = InfraArray::converterArrInfraDTO($arrObjMdPetRelVincRepTpPoderDTO, 'IdTipoPoderLegal'); - - $objMdPetRelVincRepProtocRN = new MdPetRelVincRepProtocRN(); - $objMdPetRelVincRepProtocDTO = new MdPetRelVincRepProtocDTO(); - $objMdPetRelVincRepProtocDTO->retNumIdProtocolo(); - $objMdPetRelVincRepProtocDTO->setNumIdVincRepresent($objMdPetVincRepresentantSimples->getNumIdMdPetVinculoRepresent()); - - $arrMdPetRelVincRepProtocDTO = $objMdPetRelVincRepProtocRN->listar($objMdPetRelVincRepProtocDTO); - $arrMdPetRelVincRepProtocDTO = InfraArray::converterArrInfraDTO($arrMdPetRelVincRepProtocDTO, 'IdProtocolo'); - - if ($dados['validade'] != "Indeterminada") { - $data = explode('/', $dados['validade']); - $dados['validade'] = $data[0] . '/' . $data[1] . '/' . $data[2] . " 23:59:59"; - } else { - $dados['validade'] = null; - } - - if ($dados['processos'] != "") { - $processos = array(); - $tpProcesso = PaginaSEIExterna::getInstance()->getArrItensTabelaDinamica($dados['processos']); - foreach ($tpProcesso as $value) { - $processos[] = $value[0]; - } - } else { - $processos = "Q"; - } - - $poderesIguais = array_intersect($poderes, $arrObjMdPetRelVincRepTpPoderDTO); - - if($objMdPetVincRepresentantSimples->getStrStaAbrangencia() == 'Q'){ - if(is_array($processos) && $poderesIguais){ - $gerarProcuracao = false; - } else { - if($poderesIguais){ - $gerarProcuracao = false; - } - } - } else { - if($processos == 'Q' && $objMdPetVincRepresentantSimples->getStrStaAbrangencia() == 'E'){ - if($poderesIguais){ - $gerarProcuracao = false; - } - } else { - $processosIguais = array_intersect($processos, $arrMdPetRelVincRepProtocDTO); - if ($processosIguais || $poderesIguais) { - $gerarProcuracao = false; - } - } - } - - if(!$gerarProcuracao) { - $arrObjMdPetVincRepresentantSimplesFinal[] = $objMdPetVincRepresentantSimples->getNumIdMdPetVinculoRepresent(); - } + $arrObjMdPetVincRepresentantSimplesDTO = (new MdPetVincRepresentantRN())->listar($objMdPetVincRepresentantSimplesDTO); + + if( !empty($arrObjMdPetVincRepresentantSimplesDTO) ){ + + foreach( $arrObjMdPetVincRepresentantSimplesDTO as $objMdPetVincRepresentantSimplesExistente ){ + + $abrangenciaSimplesExistente = $objMdPetVincRepresentantSimplesExistente->getStrStaAbrangencia(); + $idMdPetVincRepresentantSimplesExistente = $objMdPetVincRepresentantSimplesExistente->getNumIdMdPetVinculoRepresent(); + + if($abrangenciaSimplesExistente == 'E'){ + // BUSCA PROCESSOS ESPECIFICOS CASO HAJAM + $objMdPetRelVincRepProtocDTO = new MdPetRelVincRepProtocDTO(); + $objMdPetRelVincRepProtocDTO->retNumIdProtocolo(); + $objMdPetRelVincRepProtocDTO->setNumIdVincRepresent($idMdPetVincRepresentantSimplesExistente); + $arrMdPetRelVincRepProtocDTO = (new MdPetRelVincRepProtocRN())->listar($objMdPetRelVincRepProtocDTO); + $arrIdProtocoloSimplesExistente = InfraArray::converterArrInfraDTO($arrMdPetRelVincRepProtocDTO, 'IdProtocolo'); + } + + // BUSCA OS PODERES LEGAIS DA EXISTENTE + $objMdPetRelVincRepTpPoderDTO = new MdPetRelVincRepTpPoderDTO(); + $objMdPetRelVincRepTpPoderDTO->retNumIdTipoPoderLegal(); + $objMdPetRelVincRepTpPoderDTO->setNumIdVinculoRepresent($idMdPetVincRepresentantSimplesExistente); + $arrObjMdPetRelVincRepTpPoderDTO = (new MdPetRelVincRepTpPoderRN())->listar($objMdPetRelVincRepTpPoderDTO); + $arrIdTipoPoderLegalSimplesExistente = InfraArray::converterArrInfraDTO($arrObjMdPetRelVincRepTpPoderDTO, 'IdTipoPoderLegal'); + + $possuiProcessoComum = array_intersect((array) $abrangenciaNova, (array) $arrIdProtocoloSimplesExistente); + $possuiPoderComum = array_intersect((array) $poderesNova, (array) $arrIdTipoPoderLegalSimplesExistente); + + if( $abrangenciaSimplesExistente == 'E' && $abrangenciaSimplesNova == 'E' && !empty($possuiProcessoComum) && !empty($possuiPoderComum) ){ + $gerarProcuracao = false; + $conflito_processos_poderes = true; + $arrProcessosConflitantesFinal = array_unique(array_merge($possuiProcessoComum, $arrProcessosConflitantesFinal)); + } + + if( $abrangenciaSimplesExistente == 'Q' && $abrangenciaSimplesNova == 'E' && !empty($possuiPoderComum) ){ + $gerarProcuracao = false; + } + + if( $abrangenciaSimplesExistente == 'Q' && $abrangenciaSimplesNova == 'Q' && !empty($possuiPoderComum) ){ + $gerarProcuracao = false; + } + + if( !$gerarProcuracao ) { + $arrIdMdPetVinculoRepresentSimplesFinal = array_unique(array_merge([$idMdPetVincRepresentantSimplesExistente], $arrIdMdPetVinculoRepresentSimplesFinal)); + $arrPoderesConflitantesFinal = array_unique(array_merge($possuiPoderComum, $arrPoderesConflitantesFinal)); + } + } - - } - - if (count($arrObjMdPetVincRepresentantSimplesDTO) > 0 || count($objMdPetVincRepresentantDTO) > 0) { - - $objMdPetVincRepresentantDTO = array_unique(array_merge($objMdPetVincRepresentantDTO, $arrObjMdPetVincRepresentantSimplesDTO)); - $arrImplode = implode("-", $objMdPetVincRepresentantDTO); - $xml = ''; - $xml .= ''; - $xml .= ''; - - return $xml; - - } else { - - return ''; - + + } + + if( !empty($arrIdMdPetVinculoRepresentSimplesFinal) ){ + + $conflitoRepresentacao = implode('-', $arrIdMdPetVinculoRepresentSimplesFinal); + $conflitoPoderes = implode('-', $arrPoderesConflitantesFinal); + $conflitoProcessos = implode('-', $arrProcessosConflitantesFinal); + + $msg_conflito = $conflito_processos_poderes ? 'processos_e_poderes' : 'poderes'; + + return ''; + + }else{ + + return ''; + } + } - if($dados['tipoProc'] == 'E'){ + if( $dados['tipoProc'] == 'E' ){ $objMdPetVincRepresentantDTO = new MdPetVincRepresentantDTO(); - $objMdPetVincRepresentantDTO->setStrStaEstado('A'); + $objMdPetVincRepresentantDTO->setStrStaEstado(MdPetVincRepresentantRN::$RP_ATIVO); $objMdPetVincRepresentantDTO->adicionarCriterio( array('IdContato', 'IdContatoVinc', 'TipoRepresentante'), - array(InfraDTO::$OPER_IN, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL), - array(explode('#', $dados['idOutorgado']), $dados['idOutorgante'], 'E'), + array(InfraDTO::$OPER_IN, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IN), + array(explode('#', $dados['idOutorgado']), $dados['idOutorgante'], [MdPetVincRepresentantRN::$PE_PROCURADOR_ESPECIAL, MdPetVincRepresentantRN::$PE_PROCURADOR, MdPetVincRepresentantRN::$PE_PROCURADOR_SIMPLES]), array(InfraDTO::$OPER_LOGICO_AND, InfraDTO::$OPER_LOGICO_AND)); $objMdPetVincRepresentantDTO->retNumIdContato(); $objMdPetVincRepresentantDTO->retNumIdMdPetVinculoRepresent(); $objMdPetVincRepresentantDTO = (new MdPetVincRepresentantRN())->listar($objMdPetVincRepresentantDTO); - $objMdPetVincRepresentantDTO = InfraArray::converterArrInfraDTO($objMdPetVincRepresentantDTO, 'IdMdPetVinculoRepresent'); - if(count($objMdPetVincRepresentantDTO) > 0){ - - $arrImplode = implode("-", $objMdPetVincRepresentantDTO); - $xml = ''; - $xml .= ''; - $xml .= ''; + }else{ return ''; @@ -180,11 +178,11 @@ public static function verificarUsuarioValido($dados) $usuarioDTO = new UsuarioDTO(); $usuarioDTO->setNumIdContato($dados['idContato']); $usuarioDTO->retStrStaTipo(); - $usuarioRN = new UsuarioRN(); - $objUsuarioRN = $usuarioRN->consultarRN0489($usuarioDTO); - - // Igual a 2 é Pendente - return ''.($objUsuarioRN->getStrStaTipo() == "2" ? 0 : 1).''; + $objUsuarioDTO = (new UsuarioRN())->consultarRN0489($usuarioDTO); + + if(!empty($objUsuarioDTO)){ + return ''.($objUsuarioDTO->getStrStaTipo() == UsuarioRN::$TU_EXTERNO_PENDENTE ? 0 : 1).''; + } } diff --git a/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_bloco_processos.php b/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_bloco_processos.php index 16265a7..bf8d70f 100644 --- a/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_bloco_processos.php +++ b/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_bloco_processos.php @@ -1,11 +1,11 @@ -
+
  Processo  
+ class="infraTeclaAtalho">Número:
Validar Processo Tipo Peticionamento Intercorrente - Data de Autuação - Ações + Data de Autuação + Ações diff --git a/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_js.php b/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_js.php index 34fde01..540541e 100644 --- a/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_js.php +++ b/sei/web/modulos/peticionamento/md_pet_intercorrente_usu_ext_cadastro_js.php @@ -1,6 +1,6 @@ assinarLink('controlador_externo.php?acao=md_pet_processo_validar_numero'); @@ -34,7 +34,7 @@ function inicializar() { } /** - * Inicia Grid Dinâmica do Processo + * Inicia Grid Dinâmica do Processo */ function iniciarGridDinamicaProcesso() { objTabelaDinamicaProcesso = new infraTabelaDinamica('tbProcesso', 'hdnTbProcesso', false, true); @@ -45,7 +45,7 @@ function iniciarGridDinamicaProcesso() { } /** - * Add um processo na Grid Dinâmica + * Add um processo na Grid Dinâmica */ function adicionarProcesso() { iniciarGridDinamicaProcesso(); @@ -98,7 +98,7 @@ function abrirPeticionar() { /** - * Validar Campos obrigataórios + * Validar Campos obrigataórios */ function validarCamposObrigatorios() { var linhasTbProcesso = document.getElementById('tbProcesso').rows.length; @@ -117,13 +117,13 @@ function validarCamposObrigatorios() { } /** - * Funções responsáveis pela validação do processo + * Funções responsáveis pela validação do processo */ function validarNumeroProcesso() { var numeroProcessoPreenchido = document.getElementById('txtNumeroProcesso').value != ''; if (!numeroProcessoPreenchido) { - alert('Informe o Número.'); + alert('Informe o Número.'); return false; } @@ -171,7 +171,7 @@ function inicializarCamposPadroesProcesso() { //===============================================================================================================// /** - * Funções responsáveis pelo controle do fieldset Documentos + * Funções responsáveis pelo controle do fieldset Documentos */ var NATO_DIGITAL = 'N'; var DIGITAL = 'D'; @@ -276,7 +276,7 @@ function inicializarDocumento() { iniciarObjAjaxSelectTipoDocumento(); //=======================================================// - //------ Validação para Browse com suporte a HTML5 ------// + //------ Validação para Browse com suporte a HTML5 ------// //=======================================================// if (window.FileReader && window.File && window.FileList && window.Blob) { var input = document.getElementById('fileArquivo'); @@ -285,7 +285,7 @@ function inicializarDocumento() { }); } //=======================================================// - //------------------ Fim da Validação -------------------// + //------------------ Fim da Validação -------------------// //=======================================================// } @@ -445,7 +445,7 @@ function exibirTipoConferencia() { } } - //Ajusta a posição quando o browser é o IE; + //Ajusta a posição quando o browser é o IE; if (isInternetExplorer()) { selTipoConferencia.style.marginTop = '-3px'; selTipoConferencia.style.display = 'inline-block'; @@ -503,7 +503,7 @@ function iniciarTabelaDinamicaDocumento() { }; } - //Essa validação só é executada em browsers com suport ao HTML5 + //Essa validação só é executada em browsers com suport ao HTML5 function validarArquivo(input) { if (input.value != '') { var tamanhoArquivo = input.files[0].size; @@ -511,7 +511,7 @@ function validarArquivo(input) { var tamanhoConfigurado = parseInt(TAMANHO_MAXIMO) > 0; if (!tamanhoConfigurado) { - alert('Limite não configurado na Administração do Sistema.'); + alert('Limite não configurado na Administração do Sistema.'); input.value = ''; input.focus(); return false; @@ -519,7 +519,7 @@ function validarArquivo(input) { var extensaoConfigurada = arrExtensoesPermitidas.length > 0; if (!extensaoConfigurada) { - alert('Extensão de Arquivos Permitidos não foi configurado na Administração do Sistema.'); + alert('Extensão de Arquivos Permitidos não foi configurado na Administração do Sistema.'); input.value = ''; input.focus(); return false; @@ -528,15 +528,15 @@ function validarArquivo(input) { var arquivoPermitido = arrExtensoesPermitidas.indexOf(ext) != -1; var tamanhoArquivo = (tamanhoArquivo / 1024 / 1024).toFixed(2); if (tamanhoArquivo > parseInt(TAMANHO_MAXIMO)) { - alert('Tamanho máximo para o arquivo é de ' + TAMANHO_MAXIMO + 'Mb'); + alert('Tamanho máximo para o arquivo é de ' + TAMANHO_MAXIMO + 'Mb'); input.value = ''; input.focus(); return false; } if (!arquivoPermitido) { - alert("O arquivo selecionado não é permitido.\n" + - "Somente são permitidos arquivos com as extensões:\n" + + alert("O arquivo selecionado não é permitido.\n" + + "Somente são permitidos arquivos com as extensões:\n" + arrExtensoesPermitidas.join().replace(/,/g, ' ')); input.value = ''; input.focus(); @@ -560,7 +560,7 @@ function validarDocumento() { } var complementoTipoDocumento = document.getElementById('txtComplementoTipoDocumento').value.trim(); if (complementoTipoDocumento == '') { - alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); document.getElementById('txtComplementoTipoDocumento').focus(); return false; } @@ -568,7 +568,7 @@ function validarDocumento() { if (nivelAcesso) { if (nivelAcesso == null || nivelAcesso.value == '') { - alert('Informe o Nível de Acesso.'); + alert('Informe o Nível de Acesso.'); document.getElementById('selNivelAcesso').focus(); return false; } @@ -580,7 +580,7 @@ function validarDocumento() { if (nivelAcesso.value == RESTRITO) { if (selHipoteseLegal && selHipoteseLegal.value == '') { - alert('Informe a Hipótese Legal'); + alert('Informe a Hipótese Legal'); selHipoteseLegal.focus(); return false; } else { @@ -606,7 +606,7 @@ function validarDocumento() { var selTipoConferencia = document.getElementById('selTipoConferencia'); if (selTipoConferencia.offsetHeight > 0) { if (selTipoConferencia == null || selTipoConferencia.value == 'null') { - alert('Informe a Conferência com o documento digitalizado.'); + alert('Informe a Conferência com o documento digitalizado.'); selTipoConferencia.focus(); return false; } @@ -740,7 +740,7 @@ function validarRemoverProcesso() { var tbDocumento = document.getElementById('tbDocumento'); if (tbDocumento.rows.length > 1) { - remover = confirm('Ao remover este processo os documentos abaixo carregados serão desconsiderados e somente poderão ser carregados novamente após adicionar novo número de processo.\n\n Deseja continuar?'); + remover = confirm('Ao remover este processo os documentos abaixo carregados serão desconsiderados e somente poderão ser carregados novamente após adicionar novo número de processo.\n\n Deseja continuar?'); } if (remover) { @@ -791,24 +791,24 @@ function iniciarObjUploadArquivo() { objUploadArquivo = new infraUpload('frmPeticionamentoIntercorrente', ''); objUploadArquivo.finalizou = function (arr) { //===========================================// - //--------- Validações pós-upload ----------// + //--------- Validações pós-upload ----------// //===========================================// //Tamanho do Arquivo var fileArquivo = document.getElementById('fileArquivo'); var tamanhoArquivo = (arr['tamanho'] / 1024 / 1024).toFixed(2); if (tamanhoArquivo > parseInt(TAMANHO_MAXIMO)) { - alert('Tamanho máximo para o arquivo é de ' + TAMANHO_MAXIMO + 'Mb'); + alert('Tamanho máximo para o arquivo é de ' + TAMANHO_MAXIMO + 'Mb'); fileArquivo.value = ''; fileArquivo.focus(); verificarTabelaVazia(1); return false; } - //Arquivo com o mesmo nome já adicionado + //Arquivo com o mesmo nome já adicionado for (var i = 1; i < tbDocumento.rows.length; i++) { var tr = tbDocumento.getElementsByTagName('tr')[i]; if (arr['nome'].toLowerCase().trim() == tr.cells[9].innerText.toLowerCase().trim()) { - alert('Não é permitido adicionar documento com o mesmo nome de arquivo.'); + alert('Não é permitido adicionar documento com o mesmo nome de arquivo.'); fileArquivo.value = ''; fileArquivo.focus(); verificarTabelaVazia(1); @@ -817,7 +817,7 @@ function iniciarObjUploadArquivo() { } //===========================================// - //------------- Fim Validações --------------// + //------------- Fim Validações --------------// //===========================================// criarRegistroTabelaDocumento(arr); @@ -831,14 +831,14 @@ function iniciarObjUploadArquivo() { var extensaoConfigurada = arrExtensoesPermitidas.length > 0; var tamanhoConfigurado = parseInt(TAMANHO_MAXIMO) > 0; if (!tamanhoConfigurado) { - alert('Limite não configurado na Administração do Sistema.'); + alert('Limite não configurado na Administração do Sistema.'); fileArquivo.value = ''; fileArquivo.focus(); return false; } if (!extensaoConfigurada) { - alert('Extensão de Arquivos Permitidos não foi configurado na Administração do Sistema.'); + alert('Extensão de Arquivos Permitidos não foi configurado na Administração do Sistema.'); fileArquivo.value = ''; fileArquivo.focus(); return false; @@ -846,7 +846,7 @@ function iniciarObjUploadArquivo() { var arquivoPermitido = arrExtensoesPermitidas.indexOf(ext) != -1; if (!arquivoPermitido) { - alert("O arquivo selecionado não é permitido.\n Somente são permitidos arquivos com as extensões:\n" + arrExtensoesPermitidas.join().replace(/,/g, ' ')); + alert("O arquivo selecionado não é permitido.\n Somente são permitidos arquivos com as extensões:\n" + arrExtensoesPermitidas.join().replace(/,/g, ' ')); fileArquivo.value = ''; fileArquivo.focus(); return false; @@ -918,7 +918,7 @@ function returnElementFocus() { selectHipoteseLegal.val('').prop('disabled', false); selectHipoteseLegal.closest('div').find('input[id="'+selectHipoteseLegal.attr('id')+'"]').remove(); - self.closest('form').find('div[id^="divBlcHipoteseLegal"]').hide(); + // self.closest('form').find('div[id^="divBlcHipoteseLegal"]').hide(); if(self.closest('form').find('input[id^="txtComplementoTipoDocumento"]').val() == ''){ self.closest('form').find('input[id^="txtComplementoTipoDocumento"]').focus(); }else{ diff --git a/sei/web/modulos/peticionamento/md_pet_pessoa_fisica.php b/sei/web/modulos/peticionamento/md_pet_pessoa_fisica.php index a0a07a9..acdde6d 100644 --- a/sei/web/modulos/peticionamento/md_pet_pessoa_fisica.php +++ b/sei/web/modulos/peticionamento/md_pet_pessoa_fisica.php @@ -503,6 +503,10 @@ function validarCPFs() { let toTransport = $('#foundCpfs').val().split('\n'); let contextChanges = window.top.document.getElementById('ifrVisualizacao').contentWindow.document; + if(contextChanges == null){ + contextChanges = window.top.document.getElementById('ifrConteudoVisualizacao').contentWindow.document.getElementById('ifrVisualizacao').contentWindow.document; + } + while (i < toTransport.length) { let valuesTransport = toTransport[i].split("|"); diff --git a/sei/web/modulos/peticionamento/md_pet_pessoa_juridica.php b/sei/web/modulos/peticionamento/md_pet_pessoa_juridica.php index f28264a..2d8d55a 100644 --- a/sei/web/modulos/peticionamento/md_pet_pessoa_juridica.php +++ b/sei/web/modulos/peticionamento/md_pet_pessoa_juridica.php @@ -461,6 +461,10 @@ function validarCNPJs() { let toTransport = $('#foundCnpjs').val().split('\n'); let contextChanges = window.top.document.getElementById('ifrVisualizacao').contentWindow.document; + if(contextChanges == null){ + contextChanges = window.top.document.getElementById('ifrConteudoVisualizacao').contentWindow.document.getElementById('ifrVisualizacao').contentWindow.document; + } + while (i < toTransport.length) { let valuesTransport = toTransport[i].split("|"); diff --git a/sei/web/modulos/peticionamento/md_pet_vinc_pe_usu_externo_existencia_proc.php b/sei/web/modulos/peticionamento/md_pet_vinc_pe_usu_externo_existencia_proc.php index 6cb6957..6b7e7f4 100644 --- a/sei/web/modulos/peticionamento/md_pet_vinc_pe_usu_externo_existencia_proc.php +++ b/sei/web/modulos/peticionamento/md_pet_vinc_pe_usu_externo_existencia_proc.php @@ -27,12 +27,12 @@ case 'peticionamento_usuario_externo_vinc_validacao_procuracao': $objMdPetProcessoRN = new MdPetProcessoRN(); - $strTitulo = 'Conflito de Procuração Eletrônica Existente'; + $strTitulo = 'Conflito de Procuração Eletrônica Existente'; break; default: - throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); + throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); } } catch (Exception $e) { @@ -63,14 +63,16 @@ PaginaSEIExterna::getInstance()->abrirBody($strTitulo); $arrComandos = array(); +$formAction = SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=' . $_GET['acao'] . '&id_represent='.$_GET['id_represent'].'&acao_origem=' . $_GET['acao']); + ?> -
+ + montarBarraComandosSuperior($arrComandos); PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); ?> - + '."\n"; - $strResultado .= ''.PaginaSEI::getInstance()->gerarCaptionTabela("Procurações Eletrônicas",$numRegistros).''; + $strResultado .= ''."\n"; + $strResultado .= ''; $strResultado .= ''; $strResultado .= ''."\n"; - $strResultado .= ''."\n"; + $strResultado .= ''."\n"; $strResultado .= ''."\n"; $strResultado .= ''."\n"; $strResultado .= ''."\n"; $strResultado .= ''."\n"; - $strResultado .= ''."\n"; + $strResultado .= ''."\n"; $strResultado .= ''."\n"; $strResultado .= ''."\n"; @@ -119,14 +121,13 @@ $strCssTr = ($strCssTr=='')?'':''; $strResultado .= $strCssTr; - //Recuperando Processo $objMdPetVinculoDTO = new MdPetVinculoDTO(); $objMdPetVinculoDTO->retStrProtocoloFormatado(); $objMdPetVinculoDTO->setNumIdMdPetVinculo($arrObjMdPetVincRepresentantDTO[$i]->getNumIdMdPetVinculo()); - $objMdPetVinculoRN = new MdPetVinculoRN(); - $objMdPetVinculoRN = $objMdPetVinculoRN->consultar($objMdPetVinculoDTO); + $objMdPetVinculoRN = (new MdPetVinculoRN())->consultar($objMdPetVinculoDTO); + if(!empty($objMdPetVinculoRN)){ $strResultado .= ''; } @@ -136,23 +137,17 @@ $objMdPetVincDocumentoDTO->setNumIdMdPetVinculoRepresent($arrObjMdPetVincRepresentantDTO[$i]->getNumIdMdPetVinculoRepresent()); $objMdPetVincDocumentoDTO->retStrProtocoloFormatadoProtocolo(); $objMdPetVincDocumentoDTO->setStrTipoDocumento("E"); - $objMdPetVincDocumentoRN = new MdPetVincDocumentoRN(); - $arrObjMdPetVincDocumentoRN = $objMdPetVincDocumentoRN->consultar($objMdPetVincDocumentoDTO); - $strResultado .= ''; - + $arrObjMdPetVincDocumentoRN = (new MdPetVincDocumentoRN())->consultar($objMdPetVincDocumentoDTO); + $strResultado .= ''; $strResultado .= ''; $strResultado .= ''; $strResultado .= ''; $strResultado .= ''; - - //Detectando Abrangência e Tratando - if($arrObjMdPetVincRepresentantDTO[$i]->getStrStaAbrangencia() == "Q" || $arrObjMdPetVincRepresentantDTO[$i]->getStrStaAbrangencia() == null){ - $strResultado .= ''; - }else{ - $strResultado .= ''; - } + //Detectando Abrangência e Tratando + $abrangencia = (in_array($arrObjMdPetVincRepresentantDTO[$i]->getStrStaAbrangencia(), ['Q', null])) ? 'Qualquer Processo em Nome do Outorgante' : 'Processos Específicos'; + $strResultado .= ''; $strResultado .= ''; $strResultado .= ''."\n"; @@ -179,7 +174,6 @@
'.PaginaSEI::getInstance()->gerarCaptionTabela("Procurações Eletrônicas",$numRegistros).'
'.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Processo','TipoRepresentante',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Procuração','TipoRepresentante',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Procuração','TipoRepresentante',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Tipo','RazaoSocialNomeVinc',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Outorgante','RazaoSocialNomeVinc',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Outorgado','TipoRepresentante',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Poderes Legais','StaAbrangencia',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Abrangência','StaAbrangencia',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Abrangência','StaAbrangencia',$arrObjMdPetVincRepresentantDTO).''.PaginaSEI::getInstance()->getThOrdenacao($objMdPetVincRepresentantDTO,'Validade','TipoRepresentante',$arrObjMdPetVincRepresentantDTO).'
'.$objMdPetVinculoRN->getStrProtocoloFormatado().''.$arrObjMdPetVincDocumentoRN->getStrProtocoloFormatadoProtocolo().''.$arrObjMdPetVincDocumentoRN->getStrProtocoloFormatadoProtocolo().''.$arrObjMdPetVincRepresentantDTO[$i]->getStrNomeTipoRepresentante().''.$arrObjMdPetVincRepresentantDTO[$i]->getStrRazaoSocialNomeVinc().''.$arrObjMdPetVincRepresentantDTO[$i]->getStrNomeOutorgado().''.$arrObjMdPetVincRepresentantDTO[$i]->getStrTipoPoderes().'Qualquer Processo em Nome do OutorganteProcessos Específicos'.$abrangencia.''.$arrObjMdPetVincRepresentantDTO[$i]->getDthDataLimiteValidade().'