Commit ba128eaee57f51c79e63ce5e2ccb0dcb56c57baf
1 parent
261d4336
Exists in
master
and in
1 other branch
Atualização da pré versão do módulo e criação do arquivo README.md.
Showing
21 changed files
with
1550 additions
and
1011 deletions
Show diff stats
@@ -0,0 +1,63 @@ | @@ -0,0 +1,63 @@ | ||
1 | +# Módulo Peticionamento e Intimação Eletrônicos do SEI | ||
2 | + | ||
3 | + Data de Criação: 30/09/2016 | ||
4 | + Desenvolvimento: Marcelo Bezerra (CAST) | ||
5 | + Versão: 1.0.0 | ||
6 | + | ||
7 | +## Requisitos: | ||
8 | +- SEI 2.6.0.A13 instalada (verificar valor da constante de versão do SEI no arquivo sei/SEI.php). | ||
9 | +- ANTES de executar os scripts de instalação (itens 5 e 6 abaixo), o usuário de acesso aos bancos de dados do SEI e SIP, constante nos arquivos ConfiguracaoSEI.php e ConfiguracaoSip.php, deverá ter permissão de acesso total ao banco de dados, permitindo, por exemplo, criação e exclusão de tabelas. | ||
10 | + | ||
11 | +## Procedimentos para Instalação: | ||
12 | + | ||
13 | +1. Fazer backup dos banco de dados do SEI e SIP. | ||
14 | +2. Carregar os arquivos do módulo localizados na pasta "/sei/institucional/peticionamento" e os scripts de instalação/atualização "/sei/sei_atualizar_versao_modulo_peticionamento.php" e "/sip/sip_atualizar_versao_modulo_peticionamento.php". | ||
15 | +3. Editar o arquivo "sei/ConfiguracaoSEI.php", tomando o cuidado de usar editor que não altere o charset do arquivo, para adicionar a referência ao módulo Peticionamento na chave 'Modulos' abaixo da chave 'SEI': | ||
16 | + | ||
17 | + 'SEI' => array( | ||
18 | + 'URL' => 'http://[Servidor_PHP]sei', | ||
19 | + 'Producao' => false, | ||
20 | + 'RepositorioArquivos' => '/var/sei/arquivos', | ||
21 | + 'Modulos' => array(), | ||
22 | + ), | ||
23 | + | ||
24 | + --Adicionar a referência ao módulo Peticionamento na array da chave 'Modulos' indicada acima: | ||
25 | + | ||
26 | + 'Modulos' => array('Peticionamento' => dirname(__FILE__).'/institucional/peticionamento'), | ||
27 | + | ||
28 | + 4) Logar no SEI e no SIP com Usuário com perfil "Administrador". | ||
29 | + | ||
30 | + 5) Rodar via navegador ou por linha de comando no servidor o script: http://[Servidor_PHP]/sei/sei_atualizar_versao_modulo_peticionamento.php | ||
31 | + | ||
32 | + 6) Rodar via navegador ou por linha de comando no servidor o script: http://[Servidor_PHP]/sip/sip_atualizar_versao_modulo_peticionamento.php | ||
33 | + | ||
34 | + --IMPORTANTE 1: Na execução dos dois scripts acima, ao final deve constar o termo "FIM". Do contrário, o script não foi executado até o final e algum dado não foi inserido/atualizado no banco de dados correspondente, devendo recuperar o backup e repetir o procedimento. | ||
35 | + | ||
36 | + --IMPORTANTE 2: Depois da execução com sucesso, fazer logoff no SEI e fazer login novamente utilizando Usuário com Perfil "Administrador" e tentar acessar os menus de Administração do módulo: Administração > Peticionamento Eletrônico. | ||
37 | + | ||
38 | + --IMPORTANTE 3: Depois da execução com sucesso, ainda, verificar no SEI e no SIP no menu Infra > Parâmetros se consta o parâmetro "VERSAO_MODULO_PETICIONAMENTO" com o valor da última versão do módulo. | ||
39 | + | ||
40 | + 7) Recomenda-se que, após a instalação/atualização do módulo, os scripts "/sei/sei_atualizar_versao_modulo_peticionamento.php" e "/sip/sip_atualizar_versao_modulo_peticionamento.php" sejam removidos do servidor. | ||
41 | + | ||
42 | + 8) Imediatamente após a instalação é necessário realizar as parametrizações do módulo em Administração > Peticionamento Eletrônico, para que o módulo seja utilizado adequadamente pelos Usuários Externos na tela de Acesso Externo do SEI: http://[Servidor_PHP]/sei/controlador_externo.php?acao=usuario_externo_logar&id_orgao_acesso_externo=0 | ||
43 | + | ||
44 | + 9) É imprescindível ativar no SIP para o Perfil "Administrador" do SEI os seguintes menus: | ||
45 | + - Para cadastrar "Cargos" que serão utilizados pelos Usuários Externos na seleção do "Cargo/Função" na assinatura de cada Peticionamento e na seleção de "Cargo" no cadastro de novos Interessados, ativar os menus: | ||
46 | + - "Contextos/Contatos / Cargos / Listar" (recurso "cargo_listar") | ||
47 | + - "Contextos/Contatos / Cargos / Reativar" (recurso "cargo_reativar") | ||
48 | + - Para cadastrar "Tratamentos" que serão utilizados pelos Usuários Externos na seleção de "Tratamento" no cadastro de novos Interessados, ativar os menus: | ||
49 | + - "Contextos/Contatos / Tratamentos / Listar" (recurso "tratamento_listar") | ||
50 | + - "Contextos/Contatos / Tratamentos / Reativar" (recurso "tratamento_reativar") | ||
51 | + - Para cadastrar "Vocativos" que serão utilizados pelos Usuários Externos na seleção de "Vocativo" no cadastro de novos Interessados, ativar os menus: | ||
52 | + - "Contextos/Contatos / Vocativos / Listar" (recurso "vocativo_listar") | ||
53 | + - "Contextos/Contatos / Vocativos / Reativar" (recurso "vocativo_reativar") | ||
54 | + - Para cadastrar "Tipos de Contexto" que serão utilizados na Administração > Peticionamento Eletrônico > Tipos de Contatos Permitidos e, consequentemente, pelos Usuários Externos no cadastro e seleção de Interessados, ativar os menus: | ||
55 | + - "Contextos/Contatos / Tipos de Contexto / Listar" (recurso "tipo_contexto_contato_listar") | ||
56 | + - "Contextos/Contatos / Tipos de Contexto / Reativar" (recurso "tipo_contexto_contato_reativar") | ||
57 | + | ||
58 | + 10) Não é aconselhável dar publicidade a registros de indisponibilidades do SEI até que o módulo possua funcionalidades afetas a Intimação Eletrônica, prevista para a versão 2.0. De qualquer forma, segue URL da página pública que lista os cadastrados realizados no menu Administração > Peticionamento Eletrônico > Indisponibilidades do SEI: http://[Servidor_PHP]/sei/institucional/peticionamento/indisponibilidade_peticionamento_usuario_externo_lista.php?acao_externa=indisponibilidade_peticionamento_usuario_externo_listar&id_orgao_acesso_externo=0 | ||
59 | + | ||
60 | + | ||
61 | +Em caso de erro durante a execução do script verificar (lendo as mensagens de erro e no SEI em Infra > Log e no SIP em Infra > Log) se a causa é algum problema na infra-estrutura local. Neste caso, após a correção, restaurar o backup do banco de dados e executar novamente os scripts indicados nos itens 4 e 5 acima. | ||
62 | + | ||
63 | +Caso não seja possível identificar, a causa entrar em contato com o desenvolvedor responsável por esta versão do módulo: Marcelo Bezerra - marcelo.bezerra@cast.com.br | ||
0 | \ No newline at end of file | 64 | \ No newline at end of file |
sei/institucional/peticionamento/Leia-me.txt
1 | ============================================= | 1 | ============================================= |
2 | -Módulo Peticionamento | ||
3 | -Data de criação: 01/09/2016 | 2 | +Módulo Peticionamento e Intimação Eletrônicos do SEI |
3 | +Data de Criação: 30/09/2016 | ||
4 | Desenvolvimento: Marcelo Bezerra (CAST) | 4 | Desenvolvimento: Marcelo Bezerra (CAST) |
5 | Versão: 1.0.0 | 5 | Versão: 1.0.0 |
6 | ============================================= | 6 | ============================================= |
7 | 7 | ||
8 | -================================== | ||
9 | -PROCEDIMENTOS PARA INSTALAÇÃO: | ||
10 | -================================== | ||
11 | - | ||
12 | -REQUISITOS PARA INSTALAÇÂO: | ||
13 | - - SEI 2.6.0.A12 instalada (verificar valor da constante de versão do SEI no arquivo sei/SEI.php). | ||
14 | - - ANTES de executar os scripts de instalação (itens 5 e 6 abaixo), o usuário de acesso ao banco de dados do SEI e SIP, constante nos arquivos ConfiguracaoSEI.php e ConfiguracaoSip.php, deverá ter permissão de acesso total ao banco de dados, permitindo, por exemplo, criação e exclusão de tabelas. | 8 | +REQUISITOS: |
9 | + - SEI 2.6.0.A13 instalada (verificar valor da constante de versão do SEI no arquivo sei/SEI.php). | ||
10 | + - ANTES de executar os scripts de instalação (itens 5 e 6 abaixo), o usuário de acesso aos bancos de dados do SEI e SIP, constante nos arquivos ConfiguracaoSEI.php e ConfiguracaoSip.php, deverá ter permissão de acesso total ao banco de dados, permitindo, por exemplo, criação e exclusão de tabelas. | ||
15 | 11 | ||
16 | PROCEDIMENTOS PARA INSTALAÇÂO: | 12 | PROCEDIMENTOS PARA INSTALAÇÂO: |
17 | 13 | ||
@@ -28,35 +24,43 @@ PROCEDIMENTOS PARA INSTALAÇÂO: | @@ -28,35 +24,43 @@ PROCEDIMENTOS PARA INSTALAÇÂO: | ||
28 | 'Modulos' => array(), | 24 | 'Modulos' => array(), |
29 | ), | 25 | ), |
30 | 26 | ||
31 | - Adicionar a referência ao módulo Peticionamento na array da chave 'Modulos' indicada acima: | 27 | + --Adicionar a referência ao módulo Peticionamento na array da chave 'Modulos' indicada acima: |
32 | 28 | ||
33 | 'Modulos' => array('Peticionamento' => dirname(__FILE__).'/institucional/peticionamento'), | 29 | 'Modulos' => array('Peticionamento' => dirname(__FILE__).'/institucional/peticionamento'), |
34 | 30 | ||
35 | 4) Logar no SEI e no SIP com Usuário com perfil "Administrador". | 31 | 4) Logar no SEI e no SIP com Usuário com perfil "Administrador". |
36 | 32 | ||
37 | - 5) Rodar via browser (não via linha de comando) o script: | ||
38 | - | ||
39 | - http://[Servidor_PHP]/sei/sei_atualizar_versao_modulo_peticionamento.php | ||
40 | - | ||
41 | - 6) Rodar via browser (não via linha de comando) o script: | ||
42 | - | ||
43 | - http://[Servidor_PHP]/sip/sip_atualizar_versao_modulo_peticionamento.php | ||
44 | - | ||
45 | - --IMPORTANTE 1: Na execução dos dois scripts acima, ao final deve constar o termo "FIM". Do contrário, o script não foi executado até o final e algum dado não foi inserido/atualizado no banco de dados correspondente, devendo recuperar o backup correspondente e repetir o procedimento. | 33 | + 5) Rodar via navegador ou por linha de comando no servidor o script: http://[Servidor_PHP]/sei/sei_atualizar_versao_modulo_peticionamento.php |
46 | 34 | ||
47 | - --IMPORTANTE 2: Depois da execução com sucesso, fazer logoff do SEI e fazer login novamente utilizando Usuário com Perfil "Administrador" e tentar acessar os menus de Administração do módulo: Administração > Peticionamento Eletrônico. | 35 | + 6) Rodar via navegador ou por linha de comando no servidor o script: http://[Servidor_PHP]/sip/sip_atualizar_versao_modulo_peticionamento.php |
48 | 36 | ||
49 | - 7) Após a instalação, verificar no SEI e SIP no menu Infra > Parâmetros se consta o parâmetro "VERSAO_MODULO_PETICIONAMENTO" com o valor da última versão do módulo. | ||
50 | - | ||
51 | - 8) Recomenda-se que, após a instalação/atualização do módulo, os scripts "/sei/sei_atualizar_versao_modulo_peticionamento.php" e "/sip/sip_atualizar_versao_modulo_peticionamento.php" sejam removidos do servidor. | 37 | + --IMPORTANTE 1: Na execução dos dois scripts acima, ao final deve constar o termo "FIM". Do contrário, o script não foi executado até o final e algum dado não foi inserido/atualizado no banco de dados correspondente, devendo recuperar o backup e repetir o procedimento. |
52 | 38 | ||
53 | - 9) Imediatamente após a instalação é necessário realizar as parametrizações do módulo em Administração > Peticionamento Eletrônico, para que o módulo seja utilizado adequadamente pelos Usuários Externos na tela de Acesso Externo do SEI: http://[Servidor_PHP]/sei/controlador_externo.php?acao=usuario_externo_logar&id_orgao_acesso_externo=0 | 39 | + --IMPORTANTE 2: Depois da execução com sucesso, fazer logoff no SEI e fazer login novamente utilizando Usuário com Perfil "Administrador" e tentar acessar os menus de Administração do módulo: Administração > Peticionamento Eletrônico. |
54 | 40 | ||
55 | - --IMPORTANTE: É impreterível ativar no SIP, para o Perfil "Administrador" do SEI, os menus "Contextos/Contatos / Cargos / Novo", "Contextos/Contatos / Cargos / Listar" e "Contextos/Contatos / Cargos / Reativar", pois será necessário cadastrar "Cargos" para que os Usuários Externos possam selecionar o Cargo pertinente no momento da assinatura de cada Peticionamento. | 41 | + --IMPORTANTE 3: Depois da execução com sucesso, ainda, verificar no SEI e no SIP no menu Infra > Parâmetros se consta o parâmetro "VERSAO_MODULO_PETICIONAMENTO" com o valor da última versão do módulo. |
42 | + | ||
43 | + 7) Recomenda-se que, após a instalação/atualização do módulo, os scripts "/sei/sei_atualizar_versao_modulo_peticionamento.php" e "/sip/sip_atualizar_versao_modulo_peticionamento.php" sejam removidos do servidor. | ||
56 | 44 | ||
57 | - 10) Não é aconselhável dar publicidade a registros de indisponibilidades do SEI até que o módulo possua funcionalidades afetas a Intimação Eletrônica, prevista para a versão 2.0. De qualquer forma, segue URL da página pública que lista os cadastrados realizados no menu Administração > Peticionamento Eletrônico > Indisponibilidades do SEI: | ||
58 | - http://[Servidor_PHP]/sei/institucional/peticionamento/indisponibilidade_peticionamento_usuario_externo_lista.php?acao_externa=indisponibilidade_peticionamento_usuario_externo_listar&id_orgao_acesso_externo=0 | 45 | + 8) Imediatamente após a instalação é necessário realizar as parametrizações do módulo em Administração > Peticionamento Eletrônico, para que o módulo seja utilizado adequadamente pelos Usuários Externos na tela de Acesso Externo do SEI: http://[Servidor_PHP]/sei/controlador_externo.php?acao=usuario_externo_logar&id_orgao_acesso_externo=0 |
46 | + | ||
47 | + 9) É imprescindível ativar no SIP para o Perfil "Administrador" do SEI os seguintes menus: | ||
48 | + - Para cadastrar "Cargos" que serão utilizados pelos Usuários Externos na seleção do "Cargo/Função" na assinatura de cada Peticionamento e na seleção de "Cargo" no cadastro de novos Interessados, ativar os menus: | ||
49 | + - "Contextos/Contatos / Cargos / Listar" (recurso "cargo_listar") | ||
50 | + - "Contextos/Contatos / Cargos / Reativar" (recurso "cargo_reativar") | ||
51 | + - Para cadastrar "Tratamentos" que serão utilizados pelos Usuários Externos na seleção de "Tratamento" no cadastro de novos Interessados, ativar os menus: | ||
52 | + - "Contextos/Contatos / Tratamentos / Listar" (recurso "tratamento_listar") | ||
53 | + - "Contextos/Contatos / Tratamentos / Reativar" (recurso "tratamento_reativar") | ||
54 | + - Para cadastrar "Vocativos" que serão utilizados pelos Usuários Externos na seleção de "Vocativo" no cadastro de novos Interessados, ativar os menus: | ||
55 | + - "Contextos/Contatos / Vocativos / Listar" (recurso "vocativo_listar") | ||
56 | + - "Contextos/Contatos / Vocativos / Reativar" (recurso "vocativo_reativar") | ||
57 | + - Para cadastrar "Tipos de Contexto" que serão utilizados na Administração > Peticionamento Eletrônico > Tipos de Contatos Permitidos e, consequentemente, pelos Usuários Externos no cadastro e seleção de Interessados, ativar os menus: | ||
58 | + - "Contextos/Contatos / Tipos de Contexto / Listar" (recurso "tipo_contexto_contato_listar") | ||
59 | + - "Contextos/Contatos / Tipos de Contexto / Reativar" (recurso "tipo_contexto_contato_reativar") | ||
60 | + | ||
61 | + 10) Não é aconselhável dar publicidade a registros de indisponibilidades do SEI até que o módulo possua funcionalidades afetas a Intimação Eletrônica, prevista para a versão 2.0. De qualquer forma, segue URL da página pública que lista os cadastrados realizados no menu Administração > Peticionamento Eletrônico > Indisponibilidades do SEI: http://[Servidor_PHP]/sei/institucional/peticionamento/indisponibilidade_peticionamento_usuario_externo_lista.php?acao_externa=indisponibilidade_peticionamento_usuario_externo_listar&id_orgao_acesso_externo=0 | ||
62 | + | ||
59 | 63 | ||
60 | -Em caso de erro durante a execução do script verificar (lendo as mensagens de erro e os logs no SEI em Infra > Log e no SIP em Infra > Log) se a causa é algum problema na infra-estrutura local. Neste caso, após a correção, restaurar o backup do banco de dados e executar novamente os scripts indicados nos itens 4 e 5 acima. | 64 | +Em caso de erro durante a execução do script verificar (lendo as mensagens de erro e no SEI em Infra > Log e no SIP em Infra > Log) se a causa é algum problema na infra-estrutura local. Neste caso, após a correção, restaurar o backup do banco de dados e executar novamente os scripts indicados nos itens 4 e 5 acima. |
61 | 65 | ||
62 | Caso não seja possível identificar, a causa entrar em contato com o desenvolvedor responsável por esta versão do módulo: Marcelo Bezerra - marcelo.bezerra@cast.com.br | 66 | Caso não seja possível identificar, a causa entrar em contato com o desenvolvedor responsável por esta versão do módulo: Marcelo Bezerra - marcelo.bezerra@cast.com.br |
63 | \ No newline at end of file | 67 | \ No newline at end of file |
sei/institucional/peticionamento/PeticionamentoControladorExterno.php
@@ -113,14 +113,25 @@ | @@ -113,14 +113,25 @@ | ||
113 | 113 | ||
114 | case 'contato_cpf_cnpj': | 114 | case 'contato_cpf_cnpj': |
115 | 115 | ||
116 | - $objContatoDTO = ContatoPeticionamentoINT::getContatoByCPFCNPJ( $_POST['cpfcnpj'] ); | 116 | + $cpfcnpj = $_POST['cpfcnpj']; |
117 | + $cpfcnpj = str_replace(".","", $cpfcnpj ); | ||
118 | + $cpfcnpj = str_replace("-","", $cpfcnpj ); | ||
119 | + $cpfcnpj = str_replace("/","", $cpfcnpj ); | ||
120 | + | ||
121 | + $total = ContatoPeticionamentoINT::getTotalContatoByCPFCNPJ( $cpfcnpj ); | ||
117 | $json = null; | 122 | $json = null; |
118 | 123 | ||
119 | - if( $objContatoDTO != null){ | ||
120 | - $objContato = new stdClass(); | ||
121 | - $objContato->nome = $objContatoDTO->getStrNome(); | ||
122 | - $objContato->id = $objContatoDTO->getNumIdContato(); | ||
123 | - $json = json_encode( $objContato , true ); | 124 | + if( $total == 1 ) { |
125 | + | ||
126 | + $objContatoDTO = ContatoPeticionamentoINT::getContatoByCPFCNPJ( $cpfcnpj ); | ||
127 | + | ||
128 | + if( $objContatoDTO != null){ | ||
129 | + $objContato = new stdClass(); | ||
130 | + $objContato->nome = $objContatoDTO->getStrNome(); | ||
131 | + $objContato->id = $objContatoDTO->getNumIdContato(); | ||
132 | + $json = json_encode( $objContato , true ); | ||
133 | + } | ||
134 | + | ||
124 | } | 135 | } |
125 | 136 | ||
126 | echo $json; | 137 | echo $json; |
sei/institucional/peticionamento/PeticionamentoIntegracao.php
@@ -181,7 +181,7 @@ class PeticionamentoIntegracao extends SeiIntegracao { | @@ -181,7 +181,7 @@ class PeticionamentoIntegracao extends SeiIntegracao { | ||
181 | $urlLink = $arrMenusNomes[ $key ]; | 181 | $urlLink = $arrMenusNomes[ $key ]; |
182 | $nomeMenu = $key; | 182 | $nomeMenu = $key; |
183 | if($nomeMenu=='Peticionamento'){ | 183 | if($nomeMenu=='Peticionamento'){ |
184 | - $arrLink[] = '-^^^' . $nomeMenu .'^'; | 184 | + $arrLink[] = '-^#^^' . $nomeMenu .'^'; |
185 | $arrLink[] = '--^' . $urlLink .'^^' . 'Processo Novo' .'^'; | 185 | $arrLink[] = '--^' . $urlLink .'^^' . 'Processo Novo' .'^'; |
186 | }else{ | 186 | }else{ |
187 | $arrLink[] = '-^' . $urlLink .'^^' . $nomeMenu .'^'; | 187 | $arrLink[] = '-^' . $urlLink .'^^' . $nomeMenu .'^'; |
sei/institucional/peticionamento/controlador_ajax_externo.php
@@ -14,6 +14,12 @@ try{ | @@ -14,6 +14,12 @@ try{ | ||
14 | 14 | ||
15 | switch($_GET['acao_ajax_externo']){ | 15 | switch($_GET['acao_ajax_externo']){ |
16 | 16 | ||
17 | + case 'contato_pj_vinculada': | ||
18 | + | ||
19 | + $objContatoDTO = ContatoINT::obterSugestoesRI0571($_POST['idContextoContato']); | ||
20 | + $xml = InfraAjax::gerarXMLComplementosArrInfraDTO($objContatoDTO,array('Telefone','Fax','Email','SitioInternet','Endereco','Bairro','SiglaEstado','NomeCidade','NomePais','Cep')); | ||
21 | + break; | ||
22 | + | ||
17 | case 'contato_auto_completar_contexto_pesquisa': | 23 | case 'contato_auto_completar_contexto_pesquisa': |
18 | //alterado para atender anatel exibir apenas nome contato | 24 | //alterado para atender anatel exibir apenas nome contato |
19 | $objContatoDTO = new ContatoDTO(); | 25 | $objContatoDTO = new ContatoDTO(); |
sei/institucional/peticionamento/indisponibilidade_peticionamento_cadastro.php
@@ -20,6 +20,30 @@ try { | @@ -20,6 +20,30 @@ try { | ||
20 | 20 | ||
21 | SessaoSEI::getInstance()->validarLink(); | 21 | SessaoSEI::getInstance()->validarLink(); |
22 | 22 | ||
23 | + //========================================= | ||
24 | + //INICIO - Funções de apoio ao download | ||
25 | + //========================================= | ||
26 | + | ||
27 | + function obterDiretorio(IndisponibilidadeAnexoPeticionamentoDTO $objAnexoDTO){ | ||
28 | + try{ | ||
29 | + return ConfiguracaoSEI::getInstance()->getValor('SEI','RepositorioArquivos').'/'.substr($objAnexoDTO->getDthInclusao(),6,4).'/'.substr($objAnexoDTO->getDthInclusao(),3,2) .'/' .substr($objAnexoDTO->getDthInclusao(),0,2); | ||
30 | + }catch(Exception $e){ | ||
31 | + throw new InfraException('Erro obtendo diretório do anexo.',$e); | ||
32 | + } | ||
33 | + } | ||
34 | + | ||
35 | + function obterLocalizacao(IndisponibilidadeAnexoPeticionamentoDTO $objAnexoDTO){ | ||
36 | + try{ | ||
37 | + return obterDiretorio($objAnexoDTO).'/'.$objAnexoDTO->getNumIdAnexoPeticionamento(); | ||
38 | + }catch(Exception $e){ | ||
39 | + throw new InfraException('Erro obtendo localização do anexo.',$e); | ||
40 | + } | ||
41 | + } | ||
42 | + | ||
43 | + //========================================= | ||
44 | + //FIM - Funções de apoio ao download | ||
45 | + //========================================= | ||
46 | + | ||
23 | if( $_GET['acao'] != "indisponibilidade_peticionamento_download"){ | 47 | if( $_GET['acao'] != "indisponibilidade_peticionamento_download"){ |
24 | PaginaSEI::getInstance()->verificarSelecao('indisponibilidade_peticionamento_alterar'); | 48 | PaginaSEI::getInstance()->verificarSelecao('indisponibilidade_peticionamento_alterar'); |
25 | } | 49 | } |
@@ -81,7 +105,6 @@ try { | @@ -81,7 +105,6 @@ try { | ||
81 | $objIndisponibilidadePeticionamentoDTO->setDthDataFim($dateFim); | 105 | $objIndisponibilidadePeticionamentoDTO->setDthDataFim($dateFim); |
82 | $objIndisponibilidadePeticionamentoDTO->setStrResumoIndisponibilidade($_POST['txtResumoIndisponibilidade']); | 106 | $objIndisponibilidadePeticionamentoDTO->setStrResumoIndisponibilidade($_POST['txtResumoIndisponibilidade']); |
83 | $objIndisponibilidadePeticionamentoDTO->setStrSinProrrogacao($_POST['hdnSinProrrogacao']); | 107 | $objIndisponibilidadePeticionamentoDTO->setStrSinProrrogacao($_POST['hdnSinProrrogacao']); |
84 | - //echo $_POST['hdnAnexos']; die; | ||
85 | $objIndisponibilidadePeticionamentoDTO->setArrObjAnexoDTO(IndisponibilidadeAnexoPeticionamentoINT::processarAnexo($_POST['hdnAnexos'])); | 108 | $objIndisponibilidadePeticionamentoDTO->setArrObjAnexoDTO(IndisponibilidadeAnexoPeticionamentoINT::processarAnexo($_POST['hdnAnexos'])); |
86 | 109 | ||
87 | //processarAnexo | 110 | //processarAnexo |
@@ -159,8 +182,7 @@ try { | @@ -159,8 +182,7 @@ try { | ||
159 | $objIndisponibilidadePeticionamentoRN->alterar($objIndisponibilidadePeticionamentoDTO); | 182 | $objIndisponibilidadePeticionamentoRN->alterar($objIndisponibilidadePeticionamentoDTO); |
160 | PaginaSEI::getInstance()->adicionarMensagem('Os dados foram alterados com sucesso.'); | 183 | PaginaSEI::getInstance()->adicionarMensagem('Os dados foram alterados com sucesso.'); |
161 | header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.PaginaSEI::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'].'&id_indisponibilidade_peticionamento='.$objIndisponibilidadePeticionamentoDTO->getNumIdIndisponibilidade().PaginaSEI::getInstance()->montarAncora($objIndisponibilidadePeticionamentoDTO->getNumIdIndisponibilidade()))); | 184 | header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.PaginaSEI::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'].'&id_indisponibilidade_peticionamento='.$objIndisponibilidadePeticionamentoDTO->getNumIdIndisponibilidade().PaginaSEI::getInstance()->montarAncora($objIndisponibilidadePeticionamentoDTO->getNumIdIndisponibilidade()))); |
162 | - //header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?id_tipo_processo_litigioso='. $_POST['hdnIdTipoProcessoLitigioso'] . '&acao='.PaginaSEI::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'].PaginaSEI::getInstance()->montarAncora($objFaseLitigiosoDTO->getNumIdFaseLitigioso()))); | ||
163 | - die; | 185 | + die; |
164 | 186 | ||
165 | } catch(Exception $e){ | 187 | } catch(Exception $e){ |
166 | PaginaSEI::getInstance()->setBolAutoRedimensionar(false); | 188 | PaginaSEI::getInstance()->setBolAutoRedimensionar(false); |
@@ -193,18 +215,45 @@ try { | @@ -193,18 +215,45 @@ try { | ||
193 | } | 215 | } |
194 | 216 | ||
195 | if (file_exists($file)) { | 217 | if (file_exists($file)) { |
196 | - header('Pragma: public'); | ||
197 | - header("Cache-Control: no-cache, no-store, post-check=0, pre-check=0, must-revalidate"); | ||
198 | - header('Pragma: no-cache'); | ||
199 | - header('Expires: 0'); | ||
200 | - header('Content-Description: File Transfer'); | ||
201 | - header('Content-Disposition: attachment; filename="' . $_POST['hdnNomeArquivoDownloadReal'] . '"'); | ||
202 | - header('Content-Length: ' . filesize($file)); | ||
203 | - readfile($file, true); | ||
204 | - exit; | 218 | + |
219 | + PaginaSEI::getInstance()->getObjInfraLog()->gravar($file); | ||
220 | + | ||
221 | + try { | ||
222 | + | ||
223 | + //implementaçao baseada na pagina "anexo_download.php" | ||
224 | + header("Pragma: public"); | ||
225 | + header("Cache-Control: private, no-cache, no-store, post-check=0, pre-check=0"); | ||
226 | + header("Expires: 0"); | ||
227 | + | ||
228 | + $strContentDisposition = 'inline'; | ||
229 | + | ||
230 | + if ((isset($_GET['download']) && $_GET['download']=='1')) { | ||
231 | + $strContentDisposition = 'attachment'; | ||
232 | + } | ||
233 | + | ||
234 | + PaginaSEI::montarHeaderDownload($_POST['hdnNomeArquivoDownloadReal'],$strContentDisposition); | ||
235 | + | ||
236 | + ob_implicit_flush(); | ||
237 | + ob_flush(); | ||
238 | + | ||
239 | + $fp = fopen(obterLocalizacao($objIndisponibilidadeAnexoPeticionamentoDTO), "rb"); | ||
240 | + while (!feof($fp)) { | ||
241 | + echo fread($fp, TAM_BLOCO_LEITURA_ARQUIVO); | ||
242 | + } | ||
243 | + fclose($fp); | ||
244 | + | ||
245 | + ob_flush(); | ||
246 | + break; | ||
247 | + | ||
248 | + }catch(Exception $e){ | ||
249 | + PaginaSEI::getInstance()->getObjInfraLog()->gravar($e->getTraceAsString()); | ||
250 | + echo 'InfraLog'; | ||
251 | + } | ||
252 | + //exit; | ||
205 | } | 253 | } |
206 | 254 | ||
207 | - die; | 255 | + break; |
256 | + //die; | ||
208 | 257 | ||
209 | case 'indisponibilidade_peticionamento_consultar': | 258 | case 'indisponibilidade_peticionamento_consultar': |
210 | $strTitulo = 'Consultar Indisponibilidade do SEI'; | 259 | $strTitulo = 'Consultar Indisponibilidade do SEI'; |
@@ -449,7 +498,7 @@ function inicializar(){ | @@ -449,7 +498,7 @@ function inicializar(){ | ||
449 | var strHash = document.getElementById('hdnAnexos').value; | 498 | var strHash = document.getElementById('hdnAnexos').value; |
450 | var arrHash = strHash.split('±'); | 499 | var arrHash = strHash.split('±'); |
451 | 500 | ||
452 | - var urlBase = "<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=indisponibilidade_peticionamento_download'))?>"; | 501 | + var urlBase = "<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?download=1&acao=indisponibilidade_peticionamento_download'))?>"; |
453 | document.getElementById('hdnNomeArquivoDownload').value = arrHash[0]; | 502 | document.getElementById('hdnNomeArquivoDownload').value = arrHash[0]; |
454 | document.getElementById('hdnNomeArquivoDownloadReal').value = arrHash[1]; | 503 | document.getElementById('hdnNomeArquivoDownloadReal').value = arrHash[1]; |
455 | 504 | ||
@@ -502,15 +551,14 @@ function inicializar(){ | @@ -502,15 +551,14 @@ function inicializar(){ | ||
502 | 551 | ||
503 | foreach(array_keys($arrAcoesRemover) as $id) { | 552 | foreach(array_keys($arrAcoesRemover) as $id) { |
504 | 553 | ||
505 | - $urlBase = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=indisponibilidade_peticionamento_download')); | 554 | + $urlBase = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?download=1&acao=indisponibilidade_peticionamento_download')); |
506 | 555 | ||
507 | ?> | 556 | ?> |
508 | var strHash = document.getElementById('hdnAnexos').value; | 557 | var strHash = document.getElementById('hdnAnexos').value; |
509 | var arrHash = strHash.split('±'); | 558 | var arrHash = strHash.split('±'); |
510 | 559 | ||
511 | //hash anexo / nome real do arquivo | 560 | //hash anexo / nome real do arquivo |
512 | - //alert('teste 1 <?=$idAnexo?>'); | ||
513 | - document.getElementById('hdnNomeArquivoDownload').value = '<?=$hashAnexo?>'; | 561 | + document.getElementById('hdnNomeArquivoDownload').value = '<?=$hashAnexo?>'; |
514 | document.getElementById('hdnNomeArquivoDownloadReal').value = arrHash[1]; | 562 | document.getElementById('hdnNomeArquivoDownloadReal').value = arrHash[1]; |
515 | 563 | ||
516 | <?php if( $_GET['acao'] == 'indisponibilidade_peticionamento_consultar' ){ ?> | 564 | <?php if( $_GET['acao'] == 'indisponibilidade_peticionamento_consultar' ){ ?> |
@@ -520,8 +568,6 @@ function inicializar(){ | @@ -520,8 +568,6 @@ function inicializar(){ | ||
520 | "<a href='#' onclick=\"downloadArquivo('<?= $urlBase ?>')\"><img title='Baixar anexo' alt='Baixar anexo' src='/infra_css/imagens/download.gif' class='infraImg' /></a>", | 568 | "<a href='#' onclick=\"downloadArquivo('<?= $urlBase ?>')\"><img title='Baixar anexo' alt='Baixar anexo' src='/infra_css/imagens/download.gif' class='infraImg' /></a>", |
521 | false, | 569 | false, |
522 | false); | 570 | false); |
523 | - | ||
524 | - //alert('teste 2'); | ||
525 | 571 | ||
526 | <?php } else { ?> | 572 | <?php } else { ?> |
527 | 573 | ||
@@ -530,8 +576,6 @@ function inicializar(){ | @@ -530,8 +576,6 @@ function inicializar(){ | ||
530 | "<a href='#' onclick=\"downloadArquivo('<?= $urlBase ?>')\"><img title='Baixar anexo' alt='Baixar anexo' src='/infra_css/imagens/download.gif' class='infraImg' /></a>", | 576 | "<a href='#' onclick=\"downloadArquivo('<?= $urlBase ?>')\"><img title='Baixar anexo' alt='Baixar anexo' src='/infra_css/imagens/download.gif' class='infraImg' /></a>", |
531 | false, | 577 | false, |
532 | true); | 578 | true); |
533 | - | ||
534 | - //alert('teste 3'); | ||
535 | 579 | ||
536 | <?php } ?> | 580 | <?php } ?> |
537 | 581 | ||
@@ -645,7 +689,6 @@ function validarCadastro(){ | @@ -645,7 +689,6 @@ function validarCadastro(){ | ||
645 | if(!prorrogacao) | 689 | if(!prorrogacao) |
646 | { | 690 | { |
647 | alert('Informe se a Indisponibilidade justifica prorrogação automática dos prazos'); | 691 | alert('Informe se a Indisponibilidade justifica prorrogação automática dos prazos'); |
648 | - //alert('Informe a Indisponibilidade justifica prorrogação automática dos prazos.'); | ||
649 | document.getElementById('rdProrrogacaoSim').focus(); | 692 | document.getElementById('rdProrrogacaoSim').focus(); |
650 | return false; | 693 | return false; |
651 | } | 694 | } |
sei/institucional/peticionamento/indisponibilidade_peticionamento_usuario_externo_cadastro.php
@@ -11,21 +11,29 @@ try { | @@ -11,21 +11,29 @@ try { | ||
11 | require_once dirname(__FILE__).'/../../SEI.php'; | 11 | require_once dirname(__FILE__).'/../../SEI.php'; |
12 | 12 | ||
13 | session_start(); | 13 | session_start(); |
14 | + | ||
15 | + //========================================= | ||
16 | + //INICIO - Funções de apoio ao download | ||
17 | + //========================================= | ||
18 | + function obterDiretorio(IndisponibilidadeAnexoPeticionamentoDTO $objAnexoDTO){ | ||
19 | + try{ | ||
20 | + return ConfiguracaoSEI::getInstance()->getValor('SEI','RepositorioArquivos').'/'.substr($objAnexoDTO->getDthInclusao(),6,4).'/'.substr($objAnexoDTO->getDthInclusao(),3,2) .'/' .substr($objAnexoDTO->getDthInclusao(),0,2); | ||
21 | + }catch(Exception $e){ | ||
22 | + throw new InfraException('Erro obtendo diretório do anexo.',$e); | ||
23 | + } | ||
24 | + } | ||
14 | 25 | ||
15 | - ////////////////////////////////////////////////////////////////////////////// | ||
16 | - //InfraDebug::getInstance()->setBolLigado(false); | ||
17 | - //InfraDebug::getInstance()->setBolDebugInfra(false); | ||
18 | - //InfraDebug::getInstance()->limpar(); | ||
19 | - ////////////////////////////////////////////////////////////////////////////// | ||
20 | - //PaginaPeticionamentoExterna::getInstance()->setBolXHTML(false); | ||
21 | - //SessaoSEIExterna::getInstance()->validarLink(); | ||
22 | - | ||
23 | - //if( isset( $_GET['acao_externa'] ) && $_GET['acao_externa'] != "indisponibilidade_peticionamento_usuario_externo_download" ){ | ||
24 | - //PaginaPeticionamentoExterna::getInstance()->verificarSelecao('indisponibilidade_peticionamento_usuario_externo_alterar'); | ||
25 | - //} | 26 | + function obterLocalizacao(IndisponibilidadeAnexoPeticionamentoDTO $objAnexoDTO){ |
27 | + try{ | ||
28 | + return obterDiretorio($objAnexoDTO).'/'.$objAnexoDTO->getNumIdAnexoPeticionamento(); | ||
29 | + }catch(Exception $e){ | ||
30 | + throw new InfraException('Erro obtendo localização do anexo.',$e); | ||
31 | + } | ||
32 | + } | ||
33 | + //========================================= | ||
34 | + //FIM - Funções de apoio ao download | ||
35 | + //========================================= | ||
26 | 36 | ||
27 | - //SessaoSEIExterna::getInstance()->validarPermissao($_GET['acao_externa']); | ||
28 | - | ||
29 | PaginaPeticionamentoExterna::getInstance()->setTipoPagina(PaginaPeticionamentoExterna::$TIPO_PAGINA_SEM_MENU); | 37 | PaginaPeticionamentoExterna::getInstance()->setTipoPagina(PaginaPeticionamentoExterna::$TIPO_PAGINA_SEM_MENU); |
30 | PaginaPeticionamentoExterna::getInstance()->getBolAutoRedimensionar(); | 38 | PaginaPeticionamentoExterna::getInstance()->getBolAutoRedimensionar(); |
31 | 39 | ||
@@ -41,7 +49,6 @@ try { | @@ -41,7 +49,6 @@ try { | ||
41 | $objArquivoExtensaoDTO->retStrExtensao(); | 49 | $objArquivoExtensaoDTO->retStrExtensao(); |
42 | $objArquivoExtensaoDTO->retStrSinAtivo(); | 50 | $objArquivoExtensaoDTO->retStrSinAtivo(); |
43 | $objArquivoExtensaoDTO->setStrSinAtivo('S'); | 51 | $objArquivoExtensaoDTO->setStrSinAtivo('S'); |
44 | - //$arrObjArquivoExtensaoDTO[] = $objArquivoExtensaoDTO; | ||
45 | $objArquivoExtensaoRN = new IndisponibilidadeAnexoPeticionamentoRN(); | 52 | $objArquivoExtensaoRN = new IndisponibilidadeAnexoPeticionamentoRN(); |
46 | $arrObjArquivoExtensaoDTO = $objArquivoExtensaoRN->listarAnexoPublico($objArquivoExtensaoDTO); | 53 | $arrObjArquivoExtensaoDTO = $objArquivoExtensaoRN->listarAnexoPublico($objArquivoExtensaoDTO); |
47 | $arrExtPermitidas = array(); | 54 | $arrExtPermitidas = array(); |
@@ -80,18 +87,32 @@ try { | @@ -80,18 +87,32 @@ try { | ||
80 | 87 | ||
81 | if (file_exists($file)) { | 88 | if (file_exists($file)) { |
82 | 89 | ||
83 | - header('Pragma: public'); | 90 | + //implementaçao baseada na pagina "anexo_download.php" |
91 | + header("Pragma: public"); | ||
84 | header("Cache-Control: private, no-cache, no-store, post-check=0, pre-check=0"); | 92 | header("Cache-Control: private, no-cache, no-store, post-check=0, pre-check=0"); |
85 | - header('Expires: 0'); | ||
86 | - header('Content-Description: File Transfer'); | ||
87 | - header('Content-Type: application/octet-stream'); | ||
88 | - header('Content-Disposition: attachment; filename="'. $_POST['hdnNomeArquivoDownloadReal'] .'"'); | ||
89 | - header('Content-Length: ' . filesize($file)); | ||
90 | - readfile($file, true); | ||
91 | - exit; | 93 | + header("Expires: 0"); |
94 | + $strContentDisposition = 'inline'; | ||
95 | + | ||
96 | + if ((isset($_GET['download']) && $_GET['download']=='1')) { | ||
97 | + $strContentDisposition = 'attachment'; | ||
98 | + } | ||
99 | + | ||
100 | + PaginaSEI::montarHeaderDownload($_POST['hdnNomeArquivoDownloadReal'],$strContentDisposition); | ||
101 | + | ||
102 | + ob_implicit_flush(); | ||
103 | + ob_flush(); | ||
104 | + | ||
105 | + $fp = fopen(obterLocalizacao($objIndisponibilidadeAnexoPeticionamentoDTO), "rb"); | ||
106 | + while (!feof($fp)) { | ||
107 | + echo fread($fp, TAM_BLOCO_LEITURA_ARQUIVO); | ||
108 | + } | ||
109 | + fclose($fp); | ||
110 | + | ||
111 | + ob_flush(); | ||
112 | + break; | ||
92 | } | 113 | } |
93 | 114 | ||
94 | - die; | 115 | + //die; |
95 | 116 | ||
96 | case 'indisponibilidade_peticionamento_usuario_externo_consultar': | 117 | case 'indisponibilidade_peticionamento_usuario_externo_consultar': |
97 | 118 | ||
@@ -194,7 +215,7 @@ if (count($arrAcoesRemover)>0 || $_POST['hdnAnexos'] != "" ){ | @@ -194,7 +215,7 @@ if (count($arrAcoesRemover)>0 || $_POST['hdnAnexos'] != "" ){ | ||
194 | foreach(array_keys($arrAcoesRemover) as $id) { | 215 | foreach(array_keys($arrAcoesRemover) as $id) { |
195 | //$urlBaseLink = ""; | 216 | //$urlBaseLink = ""; |
196 | $urlBase = ConfiguracaoSEI::getInstance()->getValor('SEI','URL') . "/institucional/peticionamento/"; | 217 | $urlBase = ConfiguracaoSEI::getInstance()->getValor('SEI','URL') . "/institucional/peticionamento/"; |
197 | - $urlBaseLink = $urlBase . "indisponibilidade_peticionamento_usuario_externo_cadastro.php?acao_externa=indisponibilidade_peticionamento_usuario_externo_download"; | 218 | + $urlBaseLink = $urlBase . "indisponibilidade_peticionamento_usuario_externo_cadastro.php?download=1&acao_externa=indisponibilidade_peticionamento_usuario_externo_download"; |
198 | //$urlBaseLink = PaginaPeticionamentoExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=indisponibilidade_peticionamento_usuario_externo_download')); | 219 | //$urlBaseLink = PaginaPeticionamentoExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=indisponibilidade_peticionamento_usuario_externo_download')); |
199 | } | 220 | } |
200 | } | 221 | } |
sei/institucional/peticionamento/int/ContatoPeticionamentoINT.php
@@ -12,26 +12,24 @@ class ContatoPeticionamentoINT extends ContatoINT { | @@ -12,26 +12,24 @@ class ContatoPeticionamentoINT extends ContatoINT { | ||
12 | public static function getContatoByCPFCNPJ( $cpfcnpj ){ | 12 | public static function getContatoByCPFCNPJ( $cpfcnpj ){ |
13 | 13 | ||
14 | $objContextoContatoDTO = new ContatoDTO(); | 14 | $objContextoContatoDTO = new ContatoDTO(); |
15 | - /* | ||
16 | - $objContextoContatoDTO->retStrTelefone(); | ||
17 | - $objContextoContatoDTO->retStrFax(); | ||
18 | - $objContextoContatoDTO->retStrEmail(); | ||
19 | - $objContextoContatoDTO->retStrSitioInternet(); | ||
20 | - $objContextoContatoDTO->retStrEndereco(); | ||
21 | - $objContextoContatoDTO->retStrBairro(); | ||
22 | - $objContextoContatoDTO->retStrSiglaEstado(); | ||
23 | - $objContextoContatoDTO->retStrNomeCidade(); | ||
24 | - $objContextoContatoDTO->retStrNomePais(); | ||
25 | - $objContextoContatoDTO->retStrCep(); | ||
26 | - */ | ||
27 | 15 | ||
28 | $objContextoContatoDTO->retStrNome(); | 16 | $objContextoContatoDTO->retStrNome(); |
29 | $objContextoContatoDTO->retNumIdContato(); | 17 | $objContextoContatoDTO->retNumIdContato(); |
30 | $objContextoContatoDTO->retStrSigla(); | 18 | $objContextoContatoDTO->retStrSigla(); |
31 | $objContextoContatoDTO->retStrSinAtivo(); | 19 | $objContextoContatoDTO->retStrSinAtivo(); |
32 | 20 | ||
33 | - $objContextoContatoDTO->setStrSigla( $cpfcnpj ); | ||
34 | - $objContextoContatoDTO->setStrSinAtivo('S'); | 21 | + $objContextoContatoDTO->adicionarCriterio(array('Cpf', 'Cnpj', 'SinAtivo'), |
22 | + | ||
23 | + array(InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL), | ||
24 | + | ||
25 | + array( $cpfcnpj, $cpfcnpj,'S'), | ||
26 | + | ||
27 | + array(InfraDTO::$OPER_LOGICO_OR, | ||
28 | + InfraDTO::$OPER_LOGICO_AND) | ||
29 | + ); | ||
30 | + | ||
31 | + //$objContextoContatoDTO->setStrSigla( $cpfcnpj ); | ||
32 | + //$objContextoContatoDTO->setStrSinAtivo('S'); | ||
35 | 33 | ||
36 | $objContatoRN = new ContatoRN(); | 34 | $objContatoRN = new ContatoRN(); |
37 | $objContextoContatoDTO = $objContatoRN->consultarRN0324($objContextoContatoDTO); | 35 | $objContextoContatoDTO = $objContatoRN->consultarRN0324($objContextoContatoDTO); |
@@ -39,5 +37,39 @@ class ContatoPeticionamentoINT extends ContatoINT { | @@ -39,5 +37,39 @@ class ContatoPeticionamentoINT extends ContatoINT { | ||
39 | return $objContextoContatoDTO; | 37 | return $objContextoContatoDTO; |
40 | } | 38 | } |
41 | 39 | ||
40 | + public static function getTotalContatoByCPFCNPJ( $cpfcnpj ){ | ||
41 | + | ||
42 | + $objContextoContatoDTO = new ContatoDTO(); | ||
43 | + | ||
44 | + $objContextoContatoDTO->retStrNome(); | ||
45 | + $objContextoContatoDTO->retNumIdContato(); | ||
46 | + $objContextoContatoDTO->retStrSigla(); | ||
47 | + $objContextoContatoDTO->retStrSinAtivo(); | ||
48 | + | ||
49 | + $objContextoContatoDTO->adicionarCriterio(array('Cpf', 'Cnpj', 'SinAtivo'), | ||
50 | + | ||
51 | + array(InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL, InfraDTO::$OPER_IGUAL), | ||
52 | + | ||
53 | + array( $cpfcnpj, $cpfcnpj,'S'), | ||
54 | + | ||
55 | + array(InfraDTO::$OPER_LOGICO_OR, | ||
56 | + InfraDTO::$OPER_LOGICO_AND) | ||
57 | + ); | ||
58 | + | ||
59 | + //$objContextoContatoDTO->setStrSigla( $cpfcnpj ); | ||
60 | + //$objContextoContatoDTO->setStrSinAtivo('S'); | ||
61 | + | ||
62 | + $objContatoRN = new ContatoRN(); | ||
63 | + $arrObjContextoContatoDTO = $objContatoRN->listarRN0325($objContextoContatoDTO); | ||
64 | + | ||
65 | + $total = 0; | ||
66 | + | ||
67 | + if( $arrObjContextoContatoDTO != null && count( $arrObjContextoContatoDTO ) > 0 ){ | ||
68 | + $total = count( $arrObjContextoContatoDTO ); | ||
69 | + } | ||
70 | + | ||
71 | + return $total; | ||
72 | + } | ||
73 | + | ||
42 | } | 74 | } |
43 | ?> | 75 | ?> |
44 | \ No newline at end of file | 76 | \ No newline at end of file |
sei/institucional/peticionamento/int/GerirTipoContextoPeticionamentoINT.php
@@ -28,7 +28,7 @@ class GerirTipoContextoPeticionamentoINT extends InfraINT { | @@ -28,7 +28,7 @@ class GerirTipoContextoPeticionamentoINT extends InfraINT { | ||
28 | $objTipoContextoContatoRN = new TipoContextoContatoRN(); | 28 | $objTipoContextoContatoRN = new TipoContextoContatoRN(); |
29 | $arrObjTipoContextoContatoDTO = $objTipoContextoContatoRN->listarRN0337($objTipoContextoContatoDTO); | 29 | $arrObjTipoContextoContatoDTO = $objTipoContextoContatoRN->listarRN0337($objTipoContextoContatoDTO); |
30 | return $arrObjTipoContextoContatoDTO; | 30 | return $arrObjTipoContextoContatoDTO; |
31 | - //return parent::montarSelectArrInfraDTO($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $arrObjTipoContextoContatoDTO, 'IdTipoContextoContato', 'Nome'); | 31 | + |
32 | } | 32 | } |
33 | 33 | ||
34 | public static function montarSelectTipoInteressado($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $strTipo){ | 34 | public static function montarSelectTipoInteressado($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $strTipo){ |
@@ -44,15 +44,6 @@ class GerirTipoContextoPeticionamentoINT extends InfraINT { | @@ -44,15 +44,6 @@ class GerirTipoContextoPeticionamentoINT extends InfraINT { | ||
44 | $objTipoContextoContatoDTO->setStrSinSelecaoInteressado('S'); | 44 | $objTipoContextoContatoDTO->setStrSinSelecaoInteressado('S'); |
45 | } | 45 | } |
46 | 46 | ||
47 | - if ($strValorItemSelecionado!=null){ | ||
48 | - | ||
49 | - $objTipoContextoContatoDTO->setBolExclusaoLogica(false); | ||
50 | - $objTipoContextoContatoDTO->adicionarCriterio(array('NomeTipoContexto'), | ||
51 | - array(InfraDTO::$OPER_IGUAL), | ||
52 | - array($strValorItemSelecionado), | ||
53 | - InfraDTO::$OPER_LOGICO_OR); | ||
54 | - } | ||
55 | - | ||
56 | $objRelTipoContextoContatoRN = new GerirTipoContextoPeticionamentoRN(); | 47 | $objRelTipoContextoContatoRN = new GerirTipoContextoPeticionamentoRN(); |
57 | $arrObjTipoContextoContatoDTO = $objRelTipoContextoContatoRN->listar($objTipoContextoContatoDTO); | 48 | $arrObjTipoContextoContatoDTO = $objRelTipoContextoContatoRN->listar($objTipoContextoContatoDTO); |
58 | return parent::montarSelectArrInfraDTO($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $arrObjTipoContextoContatoDTO , 'IdTipoContextoContato', 'NomeTipoContexto'); | 49 | return parent::montarSelectArrInfraDTO($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $arrObjTipoContextoContatoDTO , 'IdTipoContextoContato', 'NomeTipoContexto'); |
sei/institucional/peticionamento/peticionamento_contato_selecionar.php
@@ -110,10 +110,10 @@ try { | @@ -110,10 +110,10 @@ try { | ||
110 | 110 | ||
111 | $arrComandos = array(); | 111 | $arrComandos = array(); |
112 | 112 | ||
113 | - $arrComandos[] = '<button type="submit" accesskey="P" id="btnPesquisar" name="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; | 113 | + $arrComandos[] = '<button type="submit" accesskey="p" id="btnPesquisar" name="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; |
114 | 114 | ||
115 | if (PaginaSEIExterna::getInstance()->isBolPaginaSelecao()){ | 115 | if (PaginaSEIExterna::getInstance()->isBolPaginaSelecao()){ |
116 | - $arrComandos[] = '<button type="button" accesskey="T" id="btnTransportarSelecao" value="Transportar" onclick="infraTransportarSelecao();" class="infraButton"><span class="infraTeclaAtalho">T</span>ransportar</button>'; | 116 | + $arrComandos[] = '<button type="button" accesskey="t" id="btnTransportarSelecao" value="Transportar" onclick="infraTransportarSelecao();" class="infraButton"><span class="infraTeclaAtalho">T</span>ransportar</button>'; |
117 | } | 117 | } |
118 | 118 | ||
119 | if($_GET['acao']=='contexto_selecionar' || | 119 | if($_GET['acao']=='contexto_selecionar' || |
@@ -204,7 +204,7 @@ try { | @@ -204,7 +204,7 @@ try { | ||
204 | $strCaptionTabela = ''; | 204 | $strCaptionTabela = ''; |
205 | if ($_GET['acao'] == 'peticionamento_contato_listar'){ | 205 | if ($_GET['acao'] == 'peticionamento_contato_listar'){ |
206 | $strSumarioTabela = 'Tabela de Interessados.'; | 206 | $strSumarioTabela = 'Tabela de Interessados.'; |
207 | - $strCaptionTabela .= 'Interessadis'; | 207 | + $strCaptionTabela .= 'Interessados'; |
208 | }else{ | 208 | }else{ |
209 | $strSumarioTabela = 'Tabela de Interessados.'; | 209 | $strSumarioTabela = 'Tabela de Interessados.'; |
210 | $strCaptionTabela .= 'Interessados'; | 210 | $strCaptionTabela .= 'Interessados'; |
@@ -377,7 +377,7 @@ try { | @@ -377,7 +377,7 @@ try { | ||
377 | '</table>'."\n"; | 377 | '</table>'."\n"; |
378 | } | 378 | } |
379 | 379 | ||
380 | - $arrComandos[] = '<button type="button" accesskey="F" id="btnFechar" value="Fechar" onclick="window.close();" class="infraButton"><span class="infraTeclaAtalho">F</span>echar</button>'; | 380 | + $arrComandos[] = '<button type="button" accesskey="c" id="btnFechar" value="Fechar" onclick="window.close();" class="infraButton">Fe<span class="infraTeclaAtalho">c</span>har</button>'; |
381 | 381 | ||
382 | $strItensSelGrupoContato = GrupoContatoINT::ConjuntoPorUnidadeRI0515('null',' ',$numIdGrupoContato); | 382 | $strItensSelGrupoContato = GrupoContatoINT::ConjuntoPorUnidadeRI0515('null',' ',$numIdGrupoContato); |
383 | $strItensSelTipoContextoContato = TipoContextoContatoINT::montarSelectNomeRI0518('null',' ',$numTipoContextoContato); | 383 | $strItensSelTipoContextoContato = TipoContextoContatoINT::montarSelectNomeRI0518('null',' ',$numTipoContextoContato); |
@@ -467,10 +467,10 @@ PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"') | @@ -467,10 +467,10 @@ PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"') | ||
467 | PaginaSEIExterna::getInstance()->abrirAreaDados('6.5em'); | 467 | PaginaSEIExterna::getInstance()->abrirAreaDados('6.5em'); |
468 | ?> | 468 | ?> |
469 | 469 | ||
470 | - <label id="lblPalavrasPesquisaContatos" for="txtPalavrasPesquisaContatos" accesskey="" class="infraLabelOpcional">Palavras-chave para pesquisa:</label> | 470 | + <label id="lblPalavrasPesquisaContatos" for="txtPalavrasPesquisaContatos" class="infraLabelOpcional">Palavras-chave para pesquisa:</label> |
471 | <input type="text" id="txtPalavrasPesquisaContatos" name="txtPalavrasPesquisaContatos" class="infraText" value="<?=$strPalavrasPesquisa;?>" tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" /> | 471 | <input type="text" id="txtPalavrasPesquisaContatos" name="txtPalavrasPesquisaContatos" class="infraText" value="<?=$strPalavrasPesquisa;?>" tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" /> |
472 | 472 | ||
473 | - <label id="lblTipoContextoContato" for="selTipoContextoContato" accesskey="" class="infraLabelOpicional">Tipo de Interessado:</label> | 473 | + <label id="lblTipoContextoContato" for="selTipoContextoContato" class="infraLabelOpicional">Tipo de Interessado:</label> |
474 | <select id="selTipoContextoContato" name="selTipoContextoContato" class="infraSelect" | 474 | <select id="selTipoContextoContato" name="selTipoContextoContato" class="infraSelect" |
475 | onchange="selecionarTipoContato()" | 475 | onchange="selecionarTipoContato()" |
476 | tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" > | 476 | tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" > |
sei/institucional/peticionamento/peticionamento_interessado_cadastro.php
@@ -37,7 +37,12 @@ try { | @@ -37,7 +37,12 @@ try { | ||
37 | 37 | ||
38 | case 'peticionamento_interessado_cadastro': | 38 | case 'peticionamento_interessado_cadastro': |
39 | 39 | ||
40 | - $strTitulo = 'Cadastro de Interessado'; | 40 | + |
41 | + if( !isset( $_GET['edicao']) && !isset( $_POST['hdnIdEdicaoAuxiliar']) ){ | ||
42 | + $strTitulo = 'Cadastro de Interessado'; | ||
43 | + } else { | ||
44 | + $strTitulo = 'Alterar Interessado'; | ||
45 | + } | ||
41 | 46 | ||
42 | if( isset( $_GET['cpf']) ){ | 47 | if( isset( $_GET['cpf']) ){ |
43 | $strTitulo .= ' - Pessoa Física'; | 48 | $strTitulo .= ' - Pessoa Física'; |
@@ -52,104 +57,184 @@ try { | @@ -52,104 +57,184 @@ try { | ||
52 | $strValorItemSelecionado = null; | 57 | $strValorItemSelecionado = null; |
53 | $strTipo = 'Cadastro'; | 58 | $strTipo = 'Cadastro'; |
54 | 59 | ||
60 | + $strItensSelSiglaEstado = UfINT::montarSelectSiglaRI0892('null',' ',null); | ||
61 | + //$strItensSelCidade = CidadeINT::montarSelectNomeRI0506('null',' ','null',$objContatoDTO->getStrSiglaEstado()); | ||
62 | + $strItensSelCidade = CidadeINT::montarSelectNomeRI0506('null',' ','null', null); | ||
55 | $strItensSelTipoInteressado = GerirTipoContextoPeticionamentoINT::montarSelectTipoInteressado($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $strTipo); | 63 | $strItensSelTipoInteressado = GerirTipoContextoPeticionamentoINT::montarSelectTipoInteressado($strPrimeiroItemValor, $strPrimeiroItemDescricao, $strValorItemSelecionado, $strTipo); |
56 | $strItensSelTratamento = TratamentoINT::montarSelectExpressaoRI0467('null',' ', null ) ; | 64 | $strItensSelTratamento = TratamentoINT::montarSelectExpressaoRI0467('null',' ', null ) ; |
57 | $strItensSelCargo = CargoINT::montarSelectExpressaoRI0468('null',' ', null ); | 65 | $strItensSelCargo = CargoINT::montarSelectExpressaoRI0468('null',' ', null ); |
58 | $strItensSelVocativo = VocativoINT::montarSelectExpressaoRI0469('null',' ', null ); | 66 | $strItensSelVocativo = VocativoINT::montarSelectExpressaoRI0469('null',' ', null ); |
59 | 67 | ||
68 | + //setando dados no contato que esta sendo cadastrado ou editado | ||
60 | if( isset( $_POST['hdnCadastrar'] ) ){ | 69 | if( isset( $_POST['hdnCadastrar'] ) ){ |
61 | - | 70 | + |
62 | $objContatoDTO = new ContatoDTO(); | 71 | $objContatoDTO = new ContatoDTO(); |
63 | $objContatoDTO->retTodos(); | 72 | $objContatoDTO->retTodos(); |
64 | 73 | ||
65 | - $objContatoDTO->setNumIdContato(null); | ||
66 | - $objContatoDTO->setStrSinContexto($strSinContexto); | ||
67 | - | ||
68 | - if($strSinContexto=='S'){ | ||
69 | - $objContatoDTO->setNumIdTipoContextoContato($numIdTipoContextoContato); | ||
70 | - } else{ | ||
71 | - $objContatoDTO->setNumIdTipoContextoContato(null); | ||
72 | - $objContatoDTO->setNumIdContextoContato($numIdContextoContato); | 74 | + $numIdTipoContextoContato = $_POST['tipoInteressado']; |
75 | + | ||
76 | + if( !isset( $_POST['hdnIdEdicao'] ) || $_POST['hdnIdEdicao'] == "" ){ | ||
77 | + $objContatoDTO->setNumIdContato(null); | ||
78 | + } else { | ||
79 | + $objContatoDTO->setNumIdContato( $_POST['hdnIdEdicao'] ); | ||
73 | } | 80 | } |
74 | 81 | ||
82 | + $strSinContexto = 'S'; | ||
83 | + $objContatoDTO->setStrSinContexto($strSinContexto); | ||
84 | + //$objContatoDTO->setStrSinContexto('S'); | ||
85 | + $objContatoDTO->setNumIdTipoContextoContato($numIdTipoContextoContato); | ||
75 | $objContatoDTO->setNumIdTratamento($_POST['tratamento']); | 86 | $objContatoDTO->setNumIdTratamento($_POST['tratamento']); |
76 | $objContatoDTO->setNumIdVocativo($_POST['vocativo']); | 87 | $objContatoDTO->setNumIdVocativo($_POST['vocativo']); |
77 | $objContatoDTO->setNumIdCargo($_POST['cargo']); | 88 | $objContatoDTO->setNumIdCargo($_POST['cargo']); |
78 | $objContatoDTO->setNumIdTitulo(''); | 89 | $objContatoDTO->setNumIdTitulo(''); |
79 | - $objContatoDTO->setStrNome($_POST['nome']); | 90 | + |
91 | + if( isset($_POST['txtNome']) && $_POST['txtNome'] != "" ){ | ||
92 | + $objContatoDTO->setStrNome($_POST['txtNome']); | ||
93 | + } | ||
94 | + | ||
95 | + else if( isset($_POST['txtRazaoSocial']) && $_POST['txtRazaoSocial'] != "" ){ | ||
96 | + $objContatoDTO->setStrNome($_POST['txtRazaoSocial']); | ||
97 | + } | ||
98 | + | ||
80 | $objContatoDTO->setDtaNascimento(''); | 99 | $objContatoDTO->setDtaNascimento(''); |
81 | $objContatoDTO->setStrPalavrasChave(''); | 100 | $objContatoDTO->setStrPalavrasChave(''); |
82 | $objContatoDTO->setStrSigla(''); | 101 | $objContatoDTO->setStrSigla(''); |
83 | $objContatoDTO->setStrGenero(''); | 102 | $objContatoDTO->setStrGenero(''); |
84 | $objContatoDTO->setStrMatriculaOab($_POST['numeroOab']); | 103 | $objContatoDTO->setStrMatriculaOab($_POST['numeroOab']); |
85 | - $objContatoDTO->setDblCpf($_POST['cpf']); | 104 | + $objContatoDTO->setDblCpf($_POST['txtCPF']); |
86 | $objContatoDTO->setNumMatricula(''); | 105 | $objContatoDTO->setNumMatricula(''); |
87 | - $objContatoDTO->setDblCnpj($_POST['cnpj']); | 106 | + $objContatoDTO->setDblCnpj($_POST['txtCNPJ']); |
88 | $objContatoDTO->setDblRg($_POST['rg']); | 107 | $objContatoDTO->setDblRg($_POST['rg']); |
89 | $objContatoDTO->setStrOrgaoExpedidor($_POST['orgaoExpedidor']); | 108 | $objContatoDTO->setStrOrgaoExpedidor($_POST['orgaoExpedidor']); |
90 | $objContatoDTO->setStrTelefone($_POST['telefone']); | 109 | $objContatoDTO->setStrTelefone($_POST['telefone']); |
91 | $objContatoDTO->setStrFax(''); | 110 | $objContatoDTO->setStrFax(''); |
92 | - $objContatoDTO->setStrEmail($_POST['txtEmail']); | ||
93 | - $objContatoDTO->setStrSitioInternet($_POST['txtSitioInternet']); | 111 | + $objContatoDTO->setStrEmail($_POST['email']); |
112 | + $objContatoDTO->setStrSitioInternet($_POST['sitioInternet']); | ||
94 | $objContatoDTO->setStrEndereco($_POST['endereco']); | 113 | $objContatoDTO->setStrEndereco($_POST['endereco']); |
95 | - $objContatoDTO->setStrBairro($_POST['txtBairro']); | ||
96 | - $objContatoDTO->setStrSiglaEstado($_POST['estado']); | ||
97 | - $objContatoDTO->setStrNomeCidade($_POST['cidade']); | 114 | + $objContatoDTO->setStrBairro($_POST['bairro']); |
115 | + $objContatoDTO->setStrSiglaEstado($_POST['selEstado']); | ||
116 | + $objContatoDTO->setStrNomeCidade($_POST['selCidade']); | ||
98 | $objContatoDTO->setStrNomePais($_POST['pais']); | 117 | $objContatoDTO->setStrNomePais($_POST['pais']); |
99 | $objContatoDTO->setStrCep($_POST['cep']); | 118 | $objContatoDTO->setStrCep($_POST['cep']); |
100 | $objContatoDTO->setStrObservacao(''); | 119 | $objContatoDTO->setStrObservacao(''); |
101 | - $objContatoDTO->setStrSinEnderecoContexto('S'); | 120 | + $objContatoDTO->setStrSinEnderecoContexto('N'); |
102 | $objContatoDTO->setDblIdPessoaRh(null); | 121 | $objContatoDTO->setDblIdPessoaRh(null); |
103 | $objContatoDTO->setStrSinAtivo('S'); | 122 | $objContatoDTO->setStrSinAtivo('S'); |
104 | $objContatoDTO->setNumIdCarreira(null); | 123 | $objContatoDTO->setNumIdCarreira(null); |
105 | $objContatoDTO->setNumIdNivelFuncao(null); | 124 | $objContatoDTO->setNumIdNivelFuncao(null); |
106 | 125 | ||
107 | - $strUsuario = SessaoSEIExterna::getInstance()->getStrSiglaUsuario(); | ||
108 | - $strSiglaUnidade = SessaoSEIExterna::getInstance()->getStrSiglaUnidadeAtual(); | ||
109 | - $numIdUsuario = SessaoSEIExterna::getInstance()->getNumIdUsuario(); | ||
110 | - $numIdUnidade = SessaoSEIExterna::getInstance()->getNumIdUnidadeAtual(); | 126 | + //necessario para preencher o campo id_usuario_cadastro ao salvar o contato |
127 | + SessaoSEI::getInstance()->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | ||
111 | 128 | ||
112 | - $objUnidadeRN = new UnidadeRN(); | ||
113 | - $objUnidadeDTO = new UnidadeDTO(); | ||
114 | - $objUnidadeDTO->retTodos(true); | ||
115 | - $objUnidadeDTO->setNumIdUnidade( SessaoSEIExterna::getInstance()->getNumIdUnidadeAtual() ); | ||
116 | - $objUnidadeDTO = $objUnidadeRN->consultarRN0125( $objUnidadeDTO ); | 129 | + //chamando RN para finalizar o cadastro, fechar a janela setando parametros |
130 | + //na janela "pai" (caso o cadastro seja corretamente executado) | ||
131 | + $objContatoRN = new ContatoRN(); | ||
117 | 132 | ||
118 | - SessaoSEI::getInstance(false)->simularLogin(SessaoSEI::$USUARIO_INTERNET,SessaoSEI::$UNIDADE_TESTE); | ||
119 | - //SessaoSEI::getInstance()->simularLogin($strUsuario, $strSiglaUnidade, $numIdUsuario); | 133 | + //verificando se é cadastro ou ediçao de contato |
134 | + if( !isset( $_POST['hdnIdEdicao'] ) || $_POST['hdnIdEdicao'] == "" ){ | ||
135 | + | ||
136 | + $objContatoDTO = $objContatoRN->cadastrarRN0322($objContatoDTO); | ||
137 | + $idContatoCadastro = $objContatoDTO->getNumIdContato(); | ||
138 | + | ||
139 | + } else if( $_POST['hdnIdEdicao'] != "" ) { | ||
140 | + | ||
141 | + $idContatoCadastro = $objContatoDTO->getNumIdContato(); | ||
142 | + $objContatoRN->alterarRN0323($objContatoDTO); | ||
143 | + | ||
144 | + } | ||
120 | 145 | ||
121 | - //configura sessão | ||
122 | - SessaoSEI::getInstance()->setNumIdUnidadeAtual( $numIdUnidade ); | ||
123 | - SessaoSEI::getInstance()->setStrSiglaUnidadeAtual( $strSiglaUnidade ); | ||
124 | - SessaoSEI::getInstance()->setNumIdOrgaoUnidadeAtual($objUnidadeDTO->getNumIdOrgao()); | ||
125 | - SessaoSEI::getInstance()->setStrSiglaOrgaoUnidadeAtual($objUnidadeDTO->getStrSiglaOrgao()); | 146 | + //nome / razao social |
147 | + if( isset($_POST['txtNome']) && $_POST['txtNome'] != "" ){ | ||
148 | + $nome = $_POST['txtNome']; | ||
149 | + } | ||
150 | + | ||
151 | + else if( isset($_POST['txtRazaoSocial']) && $_POST['txtRazaoSocial'] != "" ){ | ||
152 | + $nome = $_POST['txtRazaoSocial']; | ||
153 | + } | ||
154 | + | ||
155 | + //cpf/cnpj | ||
156 | + if( isset($_POST['txtCPF']) && $_POST['txtCPF'] != "" ){ | ||
157 | + $cpfCnpjEditado = $_POST['txtCPF']; | ||
158 | + } | ||
159 | + | ||
160 | + else if( isset($_POST['txtCNPJ']) && $_POST['txtCNPJ'] != "" ){ | ||
161 | + $cpfCnpjEditado = $_POST['txtCNPJ']; | ||
162 | + } | ||
163 | + | ||
164 | + //após cadastrar o contato fechar janela modal e preencher campos necessarios | ||
165 | + if( !isset( $_POST['hdnIdEdicao'] ) || $_POST['hdnIdEdicao'] == "" ){ | ||
166 | + | ||
167 | + echo "<script>"; | ||
168 | + echo "window.opener.document.getElementById('txtNomeRazaoSocial').value = '" . $nome . "';"; | ||
169 | + echo "window.opener.document.getElementById('hdnCustomizado').value = 'true';"; | ||
170 | + echo "window.opener.document.getElementById('hdnIdInteressadoCadastrado').value = " . $objContatoDTO->getNumIdContato() . ";"; | ||
171 | + echo " window.close();"; | ||
172 | + echo "</script>"; | ||
173 | + die; | ||
174 | + | ||
175 | + } else { | ||
176 | + | ||
177 | + echo "<script>"; | ||
178 | + echo "window.opener.atualizarNomeRazaoSocial('". $cpfCnpjEditado ."', '". $nome ."');"; | ||
179 | + echo "window.close();"; | ||
180 | + echo "</script>"; | ||
181 | + die; | ||
182 | + } | ||
183 | + | ||
184 | + } | ||
185 | + | ||
186 | + //obtendo dados do contato que estiver sendo editado | ||
187 | + else if( isset( $_POST['hdnIdEdicaoAuxiliar'] ) ){ | ||
126 | 188 | ||
127 | $objContatoRN = new ContatoRN(); | 189 | $objContatoRN = new ContatoRN(); |
128 | - $objContatoDTO = $objContatoRN->cadastrarRN0322($objContatoDTO); | ||
129 | - $idContatoCadastro = $objContatoDTO->getNumIdContato(); | ||
130 | 190 | ||
131 | - //após cadastrar o contato fechar janela modal e preencher campos necessarios | ||
132 | - echo "<script>"; | ||
133 | - echo " window.close();"; | ||
134 | - echo "</script>"; | ||
135 | - die; | 191 | + $objContatoDTO = new ContatoDTO(); |
192 | + $objContatoDTO->retTodos(true); | ||
193 | + $objContatoDTO->setNumIdContato( $_POST['hdnIdEdicaoAuxiliar'] ); | ||
194 | + $objContatoDTO = $objContatoRN->consultarRN0324($objContatoDTO); | ||
195 | + | ||
196 | + $strItensSelSiglaEstado = UfINT::montarSelectSiglaRI0892('null',' ', $objContatoDTO->getStrSiglaEstado()); | ||
197 | + $strItensSelCidade = CidadeINT::montarSelectNomeRI0506('null',' ', $objContatoDTO->getStrNomeCidade() ,$objContatoDTO->getStrSiglaEstado()); | ||
198 | + | ||
199 | + if( isset( $_GET['cpf'] )) { | ||
200 | + $_POST['txtNome'] = $objContatoDTO->getStrNome(); | ||
201 | + } | ||
202 | + | ||
203 | + if( isset( $_GET['cnpj'] )) { | ||
204 | + $_POST['txtRazaoSocial'] = $objContatoDTO->getStrNome(); | ||
205 | + } | ||
206 | + | ||
207 | + $_POST['numeroOab'] = $objContatoDTO->getStrMatriculaOab(); | ||
208 | + $_POST['txtCPF'] = $objContatoDTO->getDblCpf(); | ||
209 | + $_POST['txtCNPJ'] = $objContatoDTO->getDblCnpj(); | ||
210 | + $_POST['rg'] = $objContatoDTO->getDblRg(); | ||
211 | + $_POST['orgaoExpedidor'] = $objContatoDTO->getStrOrgaoExpedidor(); | ||
212 | + $_POST['telefone'] = $objContatoDTO->getStrTelefone(); | ||
213 | + $_POST['email'] = $objContatoDTO->getStrEmail(); | ||
214 | + $_POST['sitioInternet'] = $objContatoDTO->getStrSitioInternet(); | ||
215 | + $_POST['endereco'] = $objContatoDTO->getStrEndereco(); | ||
216 | + $_POST['bairro'] = $objContatoDTO->getStrBairro(); | ||
217 | + $_POST['estado'] = $objContatoDTO->getStrSiglaEstado(); | ||
218 | + $_POST['cidade'] = $objContatoDTO->getStrNomeCidade(); | ||
219 | + $_POST['pais'] = $objContatoDTO->getStrNomePais(); | ||
220 | + $_POST['cep'] = $objContatoDTO->getStrCep(); | ||
136 | 221 | ||
222 | + $_POST['tratamento'] = $objContatoDTO->getNumIdTratamento(); | ||
223 | + $_POST['vocativo'] = $objContatoDTO->getNumIdVocativo(); | ||
224 | + $_POST['cargo'] = $objContatoDTO->getNumIdCargo(); | ||
225 | + $_POST['hdnIdEdicao'] = $_POST['hdnIdEdicaoAuxiliar']; | ||
226 | + | ||
227 | + $numIdTipoContextoContato = $objContatoDTO->getNumIdTipoContextoContato(); | ||
228 | + | ||
229 | + $strItensSelTipoInteressado = GerirTipoContextoPeticionamentoINT::montarSelectTipoInteressado($strPrimeiroItemValor, $strPrimeiroItemDescricao, $numIdTipoContextoContato, $strTipo); | ||
230 | + | ||
231 | + if( isset( $_GET['cpf'] )) { | ||
232 | + $strItensSelTratamento = TratamentoINT::montarSelectExpressaoRI0467('null',' ', $_POST['tratamento'] ) ; | ||
233 | + $strItensSelCargo = CargoINT::montarSelectExpressaoRI0468('null',' ', $_POST['cargo'] ); | ||
234 | + $strItensSelVocativo = VocativoINT::montarSelectExpressaoRI0469('null',' ', $_POST['vocativo'] ); | ||
235 | + } | ||
137 | } | 236 | } |
138 | 237 | ||
139 | - /* | ||
140 | - $strItensSelTratamento = TratamentoINT::montarSelectExpressaoRI0467('null',' ',$objContatoDTO->getNumIdTratamento()); | ||
141 | - $strItensSelCargo = CargoINT::montarSelectExpressaoRI0468('null',' ',$objContatoDTO->getNumIdCargo()); | ||
142 | - $strItensSelVocativo = VocativoINT::montarSelectExpressaoRI0469('null',' ',$objContatoDTO->getNumIdVocativo()); | ||
143 | - $strItensSelTitulo = TituloINT::montarSelectExpressaoMasculinaRI0470('null',' ',$objContatoDTO->getNumIdTitulo()); | ||
144 | - $strItensSelSiglaEstado = UfINT::montarSelectSiglaRI0892('null',' ',null); | ||
145 | - $strLinkAjaxNomeCidade = SessaoSEI::getInstance()->assinarLink('controlador_ajax.php?acao_ajax=cidade_montar_select_nome'); | ||
146 | - $strLinkAjaxContatoRI0571 = SessaoSEI::getInstance()->assinarLink('controlador_ajax.php?acao_ajax=contato_RI0571'); | ||
147 | - $strLinkAjaxContatoRI0466 = SessaoSEI::getInstance()->assinarLink('controlador_ajax.php?acao_ajax=contato_RI0466'); | ||
148 | - | ||
149 | - $strLinkAjaxContatos = SessaoSEI::getInstance()->assinarLink('controlador_ajax.php?acao_ajax=contato_auto_completar_contexto_pesquisa'); | ||
150 | - $strItensSelCidade = CidadeINT::montarSelectNomeRI0506('null',' ','null',$objContatoDTO->getStrSiglaEstado()); | ||
151 | - */ | ||
152 | - | ||
153 | break; | 238 | break; |
154 | 239 | ||
155 | default: | 240 | default: |
@@ -186,230 +271,330 @@ PaginaSEIExterna::getInstance()->fecharHead(); | @@ -186,230 +271,330 @@ PaginaSEIExterna::getInstance()->fecharHead(); | ||
186 | PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | 271 | PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); |
187 | $urlBaseLink = ""; | 272 | $urlBaseLink = ""; |
188 | $arrComandos = array(); | 273 | $arrComandos = array(); |
189 | -$arrComandos[] = '<button type="button" accesskey="S" name="Salvar" value="Salvar" onclick="salvar()" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | ||
190 | -$arrComandos[] = '<button type="button" accesskey="F" name="btnFechar" value="Fechar" onclick="location.href=\''.PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador.php?acao='.PaginaSEIExterna::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'].PaginaSEIExterna::getInstance()->montarAncora($_GET['id_indisponibilidade_peticionamento']))).'\';" class="infraButton"><span class="infraTeclaAtalho">F</span>echar</button>'; | 274 | +$arrComandos[] = '<button type="button" accesskey="s" name="Salvar" value="Salvar" onclick="salvar()" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; |
275 | +$arrComandos[] = '<button type="button" accesskey="c" name="btnFechar" value="Fechar" onclick="window.close();" class="infraButton">Fe<span class="infraTeclaAtalho">c</span>har</button>'; | ||
276 | + | ||
277 | +$strLinkBaseFormEdicao = 'controlador_externo.php?edicaoExibir=true&acao='.$_GET['acao']; | ||
278 | + | ||
279 | +if( isset( $_GET['cpf'] )) { | ||
280 | + $strLinkBaseFormEdicao .= '&cpf=true'; | ||
281 | +} else if( isset( $_GET['cnpj'] )) { | ||
282 | + $strLinkBaseFormEdicao .= '&cnpj=true'; | ||
283 | +} | ||
284 | + | ||
285 | +$strLinkEdicaHash = PaginaSEIExterna::getInstance()->formatarXHTML( | ||
286 | + SessaoSEIExterna::getInstance()->assinarLink( $strLinkBaseFormEdicao )); | ||
287 | + | ||
191 | ?> | 288 | ?> |
192 | -<form id="frmCadastro" name="frmCadastro" | ||
193 | - method="post" onsubmit="return OnSubmitForm();" | ||
194 | - action="<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | ||
195 | -<?php | ||
196 | -PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); | ||
197 | -PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
198 | -?> | ||
199 | 289 | ||
200 | - <fieldset id="field1" class="infraFieldset sizeFieldset"> | ||
201 | - | ||
202 | - <legend class="infraLegend"> Interessado </legend> | ||
203 | - | ||
204 | - <?php if( isset( $_GET['cpf'] )) { ?> | 290 | +<!-- Formulario usado para viabilizar fluxo de edição de contato --> |
291 | +<?php if( isset( $_GET['edicao'] )) { ?> | ||
292 | + | ||
293 | + <form id="frmEdicaoAuxiliar" | ||
294 | + name="frmEdicaoAuxiliar" | ||
295 | + method="post" | ||
296 | + action="<?= $strLinkEdicaHash ?>"> | ||
297 | + | ||
298 | + <input type="hidden" name="hdnIdEdicaoAuxiliar" id="hdnIdEdicaoAuxiliar" value="" /> | ||
205 | 299 | ||
206 | - <input type="radio" name="tipoPessoa" value="pf" id="rdPF" onclick="selecionarPF()" /> | ||
207 | - <label for="rdPF" class="infraLabelRadio">Pessoa física</label> <br/> | 300 | + </form> |
301 | + | ||
302 | +<?php } else { ?> | ||
303 | + | ||
304 | + <form id="frmCadastro" name="frmCadastro" | ||
305 | + method="post" onsubmit="return OnSubmitForm();" | ||
306 | + action="<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | ||
307 | + <?php | ||
308 | + PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); | ||
309 | + PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
310 | + ?> | ||
208 | 311 | ||
209 | - <input type="radio" name="tipoPessoaPF" value="0" id="rdPF1" | ||
210 | - style="display: none; margin-left: 20px;" onclick="selecionarPF1()" /> | ||
211 | - <label for="rdPF1" id="lblrdPF1" class="infraLabelRadio" style="display: none;"> | ||
212 | - Sem vínculo com qualquer Pessoa Jurídica <br/> | 312 | + <fieldset id="field1" class="infraFieldset sizeFieldset"> |
313 | + | ||
314 | + <legend class="infraLegend"> Interessado </legend> | ||
315 | + | ||
316 | + <?php if( isset( $_GET['cpf'] )) { ?> | ||
317 | + | ||
318 | + <input type="radio" name="tipoPessoa" value="pf" id="rdPF" | ||
319 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
320 | + onclick="selecionarPF()" /> | ||
321 | + <label for="rdPF" class="infraLabelRadio">Pessoa Física</label> <br/> | ||
322 | + | ||
323 | + <input type="radio" name="tipoPessoaPF" value="0" id="rdPF1" | ||
324 | + style="display: none; margin-left: 20px;" | ||
325 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
326 | + onclick="selecionarPF1()" /> | ||
327 | + <label for="rdPF1" id="lblrdPF1" class="infraLabelRadio" style="display: none;">Sem vínculo com Pessoa Jurídica<br/></label> | ||
328 | + | ||
329 | + <input type="radio" name="tipoPessoaPF" value="1" id="rdPF2" | ||
330 | + style="display: none; margin-left: 20px;" onclick="selecionarPF2()" /> | ||
331 | + <label for="rdPF2" id="lblrdPF2" class="infraLabelRadio" style="display: none;">Com vínculo com Pessoa Jurídica<br/></label> | ||
332 | + | ||
333 | + <?php } ?> | ||
334 | + | ||
335 | + <?php if( isset( $_GET['cnpj'] )) { ?> | ||
336 | + <input type="radio" name="tipoPessoa" value="pj" id="rdPJ" | ||
337 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
338 | + onclick="selecionarPJ()" /> | ||
339 | + <label for="rdPJ" class="infraLabelRadio">Pessoa Jurídica</label> | ||
340 | + <?php } ?> | ||
341 | + | ||
342 | + </fieldset> | ||
343 | + | ||
344 | + <fieldset id="field2" class="infraFieldset sizeFieldset"> | ||
345 | + | ||
346 | + <legend class="infraLegend"> Formulário de Cadastro </legend> | ||
347 | + | ||
348 | + <br/> | ||
349 | + <label class="infraLabelObrigatorio">Tipo de Interessado:</label><br/> | ||
350 | + <select class="infraSelect" width="380" id="tipoInteressado" | ||
351 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
352 | + name="tipoInteressado" style="width:380px;" > | ||
353 | + <?=$strItensSelTipoInteressado?> | ||
354 | + </select> <br/> | ||
355 | + | ||
356 | + <label id="lblNome" class="infraLabelObrigatorio" style="display:none;">Nome Completo:<br/> | ||
357 | + <input type="text" id="txtNome" name="txtNome" | ||
358 | + class="infraText" style="width: 580px;" | ||
359 | + value="<?php echo $_POST['txtNome']; ?>" | ||
360 | + onkeypress="return infraMascaraTexto(this,event,250);" maxlength="250" | ||
361 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" /> | ||
362 | + <br/><br/> | ||
213 | </label> | 363 | </label> |
214 | - | ||
215 | - <input type="radio" name="tipoPessoaPF" value="1" id="rdPF2" | ||
216 | - style="display: none; margin-left: 20px;" onclick="selecionarPF2()" /> | ||
217 | - <label for="rdPF2" id="lblrdPF2" class="infraLabelRadio" style="display: none;"> | ||
218 | - Com vínculo com Pessoa Jurídica <br/> | ||
219 | - </label> | ||
220 | - | ||
221 | - <?php } ?> | ||
222 | - | ||
223 | - <?php if( isset( $_GET['cnpj'] )) { ?> | ||
224 | - <input type="radio" name="tipoPessoa" value="pj" id="rdPJ" onclick="selecionarPJ()" /> | ||
225 | - <label for="rdPJ" class="infraLabelRadio">Pessoa jurídica</label> | ||
226 | - <?php } ?> | ||
227 | - | ||
228 | - </fieldset> | ||
229 | - | ||
230 | - <fieldset id="field2" class="infraFieldset sizeFieldset"> | ||
231 | - | ||
232 | - <legend class="infraLegend"> Formulário de Cadastro </legend> | ||
233 | - | ||
234 | - <label class="infraLabelObrigatorio"> Tipo de Interessado:</label><br/> | ||
235 | - <select class="infraSelect" width="380" id="tipoInteressado" | ||
236 | - name="tipoInteressado" style="width:380px;" > | ||
237 | - <?=$strItensSelTipoInteressado?> | ||
238 | - </select> <br/> | ||
239 | - | ||
240 | - <label id="lblNome" class="infraLabelObrigatorio" style="display:none;"> Nome:<br/> | ||
241 | - <input type="text" id="txtNome" name="txtNome" class="infraText" value="" | ||
242 | - onkeypress="return infraMascaraTexto(this,event,250);" maxlength="250" | ||
243 | - tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | ||
244 | - <br/><br/> | ||
245 | - </label> | ||
246 | - | ||
247 | - <label id="lblRazaoSocial" class="infraLabelObrigatorio" style="display:none;"> Razão Social:<br/> | ||
248 | - <input type="text" id="txtRazaoSocial" name="txtRazaoSocial" class="infraText" value="" | ||
249 | - onkeypress="return infraMascaraTexto(this,event,250);" maxlength="250" | ||
250 | - tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | ||
251 | - <br/><br/> | ||
252 | - </label> | ||
253 | - | ||
254 | - <label id="lblPjVinculada" style="display: none;" class="infraLabelObrigatorio"> | ||
255 | - Pessoa jurídica a qual o interessado é vinculado:<br/> | ||
256 | - <input type="text" class="infraText" name="txtPjVinculada" id="txtPjVinculada" style="width: 540px; display: none;" /> | ||
257 | - <br/><br/> | ||
258 | - </label> | ||
259 | - | ||
260 | - <label id="lblCPF" style="display: none;" class="infraLabelObrigatorio"> CPF:<br/> | ||
261 | - <input type="text" class="infraText" name="txtCPF" id="txtCPF" | ||
262 | - readonly="readonly" | ||
263 | - onkeypress="return infraMascaraCpf(this, event)" | ||
264 | - style="width: 540px;" /> | ||
265 | - <br/><br/> | ||
266 | - </label> | ||
267 | - | ||
268 | - <label id="lblCNPJ" style="display: none;" class="infraLabelObrigatorio"> CNPJ:<br/> | ||
269 | - <input type="text" class="infraText" name="txtCNPJ" id="txtCNPJ" | ||
270 | - readonly="readonly" onkeypress="return infraMascaraCnpj(this, event)" | ||
271 | - style="width: 540px;" /> | ||
272 | - <br/><br/> | ||
273 | - </label> | ||
274 | - | ||
275 | - <div id="div1" style="float:left; width: auto; display: none;"> | ||
276 | - | ||
277 | - <div id="div1_2" style="float:left; width: auto;"> | ||
278 | - <label class="infraLabelObrigatorio">RG:</label><br/> | ||
279 | - <input type="text" class="infraText" | ||
280 | - onkeypress="return infraMascaraNumero(this,event, 10);" | ||
281 | - name="rg" id="rg" /> | ||
282 | - </div> | ||
283 | - | ||
284 | - <div id="div1_3" style="float:left; margin-left:20px; width: auto;"> | ||
285 | - <label class="infraLabelObrigatorio">Órgão Expedidor do RG:</label><br/> | ||
286 | - <input type="text" class="infraText" name="orgaoExpedidor" | ||
287 | - onkeypress="return infraMascaraTexto(this,event, 50);" | ||
288 | - id="orgaoExpedidor" /> | ||
289 | - </div> | ||
290 | - | ||
291 | - <div id="div1_1" style="float:left; margin-left:20px; width: auto;"> | ||
292 | - <label class="infraLabel">Número da OAB:</label><br/> | ||
293 | - <input type="text" class="infraText" | ||
294 | - onkeypress="return infraMascaraTexto(this,event,10);" maxlength="10" | ||
295 | - name="numeroOab" id="numeroOab" /> | ||
296 | - </div> | ||
297 | - | ||
298 | - </div> | ||
299 | - | ||
300 | - <div style="clear: both;"></div> | ||
301 | - | ||
302 | - <label class="infraLabelObrigatorio" id="lblTratamento" style="display: none;"> | ||
303 | - <br/>Tratamento:<br/> | ||
304 | - <select class="infraSelect" width="380" id="tratamento" name="tratamento" style="width:380px;"> | ||
305 | - <?=$strItensSelTratamento?> | ||
306 | - </select> <br/> | ||
307 | - </label> | ||
308 | - | ||
309 | - <label class="infraLabelObrigatorio" id="lblCargo" style="display: none;"> Cargo:<br/> | ||
310 | - <select class="infraSelect" width="380" id="cargo" name="cargo" style="width:380px;" > | ||
311 | - <?=$strItensSelCargo?> | ||
312 | - </select> <br/> | ||
313 | - </label> | ||
314 | - | ||
315 | - <label class="infraLabelObrigatorio" id="lblVocativo" style="display: none;"> Vocativo:<br/> | ||
316 | - <select class="infraSelect" width="380" id="vocativo" name="vocativo" style="width:380px;" > | ||
317 | - <?=$strItensSelVocativo?> | ||
318 | - </select><br/> | ||
319 | - </label> | ||
320 | - | ||
321 | - <label class="infraLabelObrigatorio">Telefone:</label><br/> | ||
322 | - <input type="text" class="infraText" name="telefone" | ||
323 | - onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
324 | - id="telefone" /><br/> | ||
325 | - | ||
326 | - <div style="clear: both;"></div> | ||
327 | - | ||
328 | - <div class="div2" style="float:left; width: auto;"> | ||
329 | - | ||
330 | - <br/> | ||
331 | - <div id="div2_1" style="float:left; width: 280px;"> | ||
332 | - <label class="infraLabel">Email:</label><br/> | ||
333 | - <input type="text" class="infraText" | ||
334 | - onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
335 | - name="email" id="email" style="width: 280px;" /> | ||
336 | - </div> | ||
337 | - | ||
338 | - <div id="div2_2" style="float:left; margin-left:20px; width: 280px;"> | ||
339 | - <label class="infraLabel">Sítio na Internet:</label><br/> | ||
340 | - <input type="text" class="infraText" style="width: 280px;" | ||
341 | - onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
342 | - name="sitioInternet" id="sitioInternet" /> | ||
343 | - </div> | ||
344 | - | ||
345 | - </div> | ||
346 | - | ||
347 | - <div style="clear: both;"></div> | ||
348 | - | ||
349 | - <div class="div3" style="float:left; width: auto;"> | ||
350 | - | ||
351 | - <br/> | ||
352 | - | ||
353 | - <div id="div3_1" style="float:left; width: 280px;"> | ||
354 | - <label class="infraLabelObrigatorio">Endereço:</label><br/> | ||
355 | - <input type="text" class="infraText" style="width: 280px;" name="endereco" id="endereco" /> | ||
356 | - </div> | ||
357 | - | ||
358 | - <div id="div3_2" style="float:left; margin-left:20px; width: 280px;"> | ||
359 | - <label class="infraLabelObrigatorio">Bairro:</label><br/> | ||
360 | - <input type="text" class="infraText" style="width: 280px;" name="bairro" id="bairro" /> | ||
361 | - </div> | ||
362 | - | ||
363 | - </div> | ||
364 | - | ||
365 | - <div style="clear: both;"></div> | ||
366 | - | ||
367 | - <div class="div4" style="float:left; width: auto;"> | ||
368 | - | ||
369 | - <br/> | ||
370 | - | ||
371 | - <div id="div4_1" style="float:left; width: auto;"> | ||
372 | - <label class="infraLabelObrigatorio">País:</label><br/> | ||
373 | - <input type="text" class="infraText" | ||
374 | - onkeyup="paisEstadoCidade(this);" value="Brasil" | ||
375 | - onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
376 | - name="pais" id="pais" /> | ||
377 | - </div> | ||
378 | - | ||
379 | - <div id="div4_2" style="float:left; margin-left:20px; width: auto;"> | ||
380 | - <label class="infraLabelObrigatorio">Estado:</label><br/> | ||
381 | - <input type="text" class="infraText" name="estado" id="estado" /> | ||
382 | - </div> | ||
383 | - | ||
384 | - <div id="div4_2_combo" style="float:left; margin-left:20px; width: auto; display: none;"> | ||
385 | - <label class="infraLabelObrigatorio">Estado:</label><br/> | ||
386 | - <select class="infraSelect" name="cbEstado" id="cbEstado"> | ||
387 | - </select> | ||
388 | - </div> | ||
389 | - | ||
390 | - <div id="div4_3" style="float:left; margin-left:20px; width: auto;"> | ||
391 | - <label class="infraLabelObrigatorio">Cidade:</label><br/> | ||
392 | - <input type="text" class="infraText" name="cidade" id="cidade" /> | ||
393 | - </div> | ||
394 | - | ||
395 | - <div id="div4_3_combo" style="float:left; margin-left:20px; width: auto; display: none;"> | ||
396 | - <label class="infraLabelObrigatorio">Cidade:</label><br/> | ||
397 | - <select class="infraSelect" name="cbCidade" id="cbCidade"> | ||
398 | - </select> | ||
399 | - </div> | ||
400 | - | ||
401 | - <div id="div4_4" style="float:left; margin-left:20px; width: auto;"> | ||
402 | - <label class="infraLabelObrigatorio">CEP:</label><br/> | ||
403 | - <input type="text" class="infraText" name="cep" id="cep" /> | ||
404 | - </div> | ||
405 | - | ||
406 | - </div> | ||
407 | - | ||
408 | - <div style="clear: both;"></div> | ||
409 | - | ||
410 | - </fieldset> | ||
411 | - | ||
412 | -</form> | 364 | + |
365 | + <label id="lblRazaoSocial" class="infraLabelObrigatorio" style="display:none;">Razão Social:<br/> | ||
366 | + <input type="text" id="txtRazaoSocial" name="txtRazaoSocial" | ||
367 | + class="infraText" style="width: 580px;" | ||
368 | + value="<?php echo $_POST['txtRazaoSocial']; ?>" | ||
369 | + onkeypress="return infraMascaraTexto(this,event,250);" maxlength="250" | ||
370 | + tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | ||
371 | + <br/><br/> | ||
372 | + </label> | ||
373 | + | ||
374 | + <label id="lblPjVinculada" style="display: none;" class="infraLabelObrigatorio">Razão Social da Pessoa Jurídica vinculada:<br/> | ||
375 | + <input type="text" class="infraText" | ||
376 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
377 | + name="txtPjVinculada" id="txtPjVinculada" | ||
378 | + autocomplete="off" style="width: 580px; display: none;" /> | ||
379 | + <input type="hidden" name="hdnIdContextoContato" id="hdnIdContextoContato" value="" /> | ||
380 | + <br/><br/> | ||
381 | + </label> | ||
382 | + | ||
383 | + <label id="lblCPF" style="display: none;" class="infraLabelObrigatorio">CPF:<br/> | ||
384 | + <input type="text" class="infraText" name="txtCPF" id="txtCPF" | ||
385 | + value="<?php echo $_POST['txtCPF']; ?>" | ||
386 | + readonly="readonly" | ||
387 | + onkeypress="return infraMascaraCpf(this, event)" | ||
388 | + style="width: 280px;" /> | ||
389 | + <br/><br/> | ||
390 | + </label> | ||
391 | + | ||
392 | + <label id="lblCNPJ" style="display: none;" class="infraLabelObrigatorio">CNPJ:<br/> | ||
393 | + <input type="text" class="infraText" name="txtCNPJ" id="txtCNPJ" | ||
394 | + value="<?php echo $_POST['txtCNPJ']; ?>" | ||
395 | + readonly="readonly" onkeypress="return infraMascaraCnpj(this, event)" | ||
396 | + style="width: 280px;" /> | ||
397 | + <br/><br/> | ||
398 | + </label> | ||
399 | + | ||
400 | + <div id="div1" style="float:left; width: auto; display: none;"> | ||
401 | + | ||
402 | + <div id="div1_2" style="float:left; width: auto;"> | ||
403 | + <label class="infraLabelObrigatorio">RG:</label><br/> | ||
404 | + <input type="text" class="infraText" | ||
405 | + value="<?php echo $_POST['rg']; ?>" | ||
406 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
407 | + onkeypress="return infraMascaraNumero(this,event, 10);" | ||
408 | + name="rg" id="rg" /> | ||
409 | + </div> | ||
410 | + | ||
411 | + <div id="div1_3" style="float:left; margin-left:20px; width: auto;"> | ||
412 | + <label class="infraLabelObrigatorio">Órgão Expedidor do RG:</label><br/> | ||
413 | + <input type="text" class="infraText" name="orgaoExpedidor" | ||
414 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
415 | + value="<?php echo $_POST['orgaoExpedidor']; ?>" | ||
416 | + onkeypress="return infraMascaraTexto(this,event, 50);" | ||
417 | + id="orgaoExpedidor" /> | ||
418 | + </div> | ||
419 | + | ||
420 | + <div id="div1_1" style="float:left; margin-left:20px; width: auto;"> | ||
421 | + <label class="infraLabel">Número da OAB:</label><br/> | ||
422 | + <input type="text" class="infraText" | ||
423 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
424 | + value="<?php echo $_POST['numeroOab']; ?>" | ||
425 | + onkeypress="return infraMascaraTexto(this,event,10);" maxlength="10" | ||
426 | + name="numeroOab" id="numeroOab" /> | ||
427 | + </div> | ||
428 | + | ||
429 | + </div> | ||
430 | + | ||
431 | + <div style="clear: both;"></div> | ||
432 | + | ||
433 | + <label class="infraLabelObrigatorio" id="lblTratamento" style="display: none;"> | ||
434 | + <br/>Tratamento:<br/> | ||
435 | + <select class="infraSelect" width="380" id="tratamento" | ||
436 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
437 | + name="tratamento" style="width:380px;"> | ||
438 | + <?=$strItensSelTratamento?> | ||
439 | + </select> <br/> | ||
440 | + </label> | ||
441 | + | ||
442 | + <label class="infraLabelObrigatorio" id="lblCargo" style="display: none;"> Cargo:<br/> | ||
443 | + <select class="infraSelect" | ||
444 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
445 | + width="380" id="cargo" name="cargo" style="width:380px;" > | ||
446 | + <?=$strItensSelCargo?> | ||
447 | + </select> <br/> | ||
448 | + </label> | ||
449 | + | ||
450 | + <label class="infraLabelObrigatorio" id="lblVocativo" style="display: none;"> Vocativo:<br/> | ||
451 | + <select class="infraSelect" width="380" id="vocativo" | ||
452 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
453 | + name="vocativo" style="width:380px;" > | ||
454 | + <?=$strItensSelVocativo?> | ||
455 | + </select><br/> | ||
456 | + </label> | ||
457 | + | ||
458 | + <label class="infraLabelObrigatorio">Telefone:</label><br/> | ||
459 | + <input type="text" class="infraText" name="telefone" | ||
460 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
461 | + value="<?php echo $_POST['telefone']; ?>" | ||
462 | + onkeydown="return infraMascaraTelefone(this,event);" maxlength="25" | ||
463 | + id="telefone" /><br/> | ||
464 | + | ||
465 | + <div style="clear: both;"></div> | ||
466 | + | ||
467 | + <div class="div2" style="float:left; width: auto;"> | ||
468 | + | ||
469 | + <br/> | ||
470 | + <div id="div2_1" style="float:left; width: 280px;"> | ||
471 | + <label class="infraLabel">E-mail:</label><br/> | ||
472 | + <input type="text" class="infraText" | ||
473 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
474 | + value="<?php echo $_POST['email']; ?>" | ||
475 | + onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
476 | + name="email" id="email" style="width: 280px;" /> | ||
477 | + </div> | ||
478 | + | ||
479 | + <div id="div2_2" style="float:left; margin-left:20px; width: 280px;"> | ||
480 | + <label class="infraLabel">Sítio na Internet:</label><br/> | ||
481 | + <input type="text" class="infraText" style="width: 280px;" | ||
482 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
483 | + value="<?php echo $_POST['sitioInternet']; ?>" | ||
484 | + onkeypress="return infraMascaraTexto(this,event,50);" maxlength="50" | ||
485 | + name="sitioInternet" id="sitioInternet" /> | ||
486 | + </div> | ||
487 | + | ||
488 | + </div> | ||
489 | + | ||
490 | + <div style="clear: both;"></div> | ||
491 | + | ||
492 | + <div class="div3" style="float:left; width: auto;"> | ||
493 | + | ||
494 | + <br/> | ||
495 | + | ||
496 | + <div id="div3_1" style="float:left; width: 280px;"> | ||
497 | + <label class="infraLabelObrigatorio">Endereço:</label><br/> | ||
498 | + <input type="text" class="infraText" style="width: 280px;" | ||
499 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
500 | + value="<?php echo $_POST['endereco']; ?>" | ||
501 | + name="endereco" id="endereco" /> | ||
502 | + </div> | ||
503 | + | ||
504 | + <div id="div3_2" style="float:left; margin-left:20px; width: 280px;"> | ||
505 | + <label class="infraLabelObrigatorio">Bairro:</label><br/> | ||
506 | + <input type="text" class="infraText" style="width: 280px;" | ||
507 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
508 | + value="<?php echo $_POST['bairro']; ?>" | ||
509 | + name="bairro" id="bairro" /> | ||
510 | + </div> | ||
511 | + | ||
512 | + </div> | ||
513 | + | ||
514 | + <div style="clear: both;"></div> | ||
515 | + | ||
516 | + <div class="div4" style="float:left; width: auto;"> | ||
517 | + | ||
518 | + <br/> | ||
519 | + | ||
520 | + <div id="div4_1" style="float:left; width: auto; display: none;"> | ||
521 | + <label class="infraLabelObrigatorio">País:</label><br/> | ||
522 | + <input type="text" class="infraText" | ||
523 | + onkeyup="paisEstadoCidade(this);" value="Brasil" | ||
524 | + onkeypress="return infraMascaraTexto(this,event,50);" | ||
525 | + maxlength="50" name="pais" id="pais" /> | ||
526 | + </div> | ||
527 | + | ||
528 | + <div id="div4_2" style="float:left; width: auto;"> | ||
529 | + <label class="infraLabelObrigatorio">Estado:</label><br/> | ||
530 | + | ||
531 | + <!-- | ||
532 | + <input type="text" class="infraText" name="estado" | ||
533 | + value="<?php echo $_POST['estado']; ?>" | ||
534 | + id="estado" /> | ||
535 | + --> | ||
536 | + | ||
537 | + <select class="infraSelect" tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
538 | + name="selEstado" id="selEstado"> | ||
539 | + <?=$strItensSelSiglaEstado?> | ||
540 | + </select> | ||
541 | + | ||
542 | + </div> | ||
543 | + | ||
544 | + <!-- | ||
545 | + <div id="div4_2_combo" style="float:left; margin-left:20px; width: auto; display: none;"> | ||
546 | + <label class="infraLabelObrigatorio">Estado:</label><br/> | ||
547 | + <select class="infraSelect" name="cbEstado" id="cbEstado"> | ||
548 | + </select> | ||
549 | + </div> | ||
550 | + --> | ||
551 | + | ||
552 | + <div id="div4_3" style="float:left; margin-left:20px; width: auto;"> | ||
553 | + <label class="infraLabelObrigatorio">Cidade:</label><br/> | ||
554 | + | ||
555 | + <!-- | ||
556 | + <input type="text" class="infraText" name="cidade" | ||
557 | + value="<?php echo $_POST['cidade']; ?>" | ||
558 | + id="cidade" /> | ||
559 | + --> | ||
560 | + | ||
561 | + <select class="infraSelect" tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
562 | + name="selCidade" id="selCidade"> | ||
563 | + <?= $strItensSelCidade ?> | ||
564 | + </select> | ||
565 | + </div> | ||
566 | + | ||
567 | + <!-- | ||
568 | + <div id="div4_3_combo" style="float:left; margin-left:20px; width: auto; display: none;"> | ||
569 | + <label class="infraLabelObrigatorio">Cidade:</label><br/> | ||
570 | + <select class="infraSelect" name="cbCidade" id="cbCidade"> | ||
571 | + </select> | ||
572 | + </div> | ||
573 | + --> | ||
574 | + | ||
575 | + <div id="div4_4" style="float:left; margin-left:20px; width: auto;"> | ||
576 | + <label class="infraLabelObrigatorio">CEP:</label><br/> | ||
577 | + <input type="text" class="infraText" | ||
578 | + onkeypress="return infraMascaraCEP(this,event);" | ||
579 | + maxlength="15" | ||
580 | + tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" | ||
581 | + value="<?php echo $_POST['cep']; ?>" | ||
582 | + name="cep" id="cep" /> | ||
583 | + </div> | ||
584 | + | ||
585 | + </div> | ||
586 | + | ||
587 | + <div style="clear: both;"></div> | ||
588 | + | ||
589 | + </fieldset> | ||
590 | + | ||
591 | + <input type="hidden" name="hdnCadastrar" value="" /> | ||
592 | + <input type="hidden" name="hdnIdEdicao" id="hdnIdEdicao" | ||
593 | + value="<?php echo $_POST['hdnIdEdicao']; ?>" /> | ||
594 | + | ||
595 | + </form> | ||
596 | + | ||
597 | +<?php } ?> | ||
413 | 598 | ||
414 | <?php | 599 | <?php |
415 | //PaginaSEIExterna::getInstance()->montarBarraComandosInferior($arrComandos); | 600 | //PaginaSEIExterna::getInstance()->montarBarraComandosInferior($arrComandos); |
sei/institucional/peticionamento/peticionamento_interessado_cadastro_js.php
1 | +<?php | ||
2 | +//$strLinkAjaxContatos = SessaoSEIExterna::getInstance()->assinarLink('controlador_ajax_externo.php?acao_ajax_externo=contato_pj_vinculada'); | ||
3 | +$strLinkAjaxContatos = SessaoSEIExterna::getInstance()->assinarLink('/sei/institucional/peticionamento/controlador_ajax_externo.php?acao_ajax_externo=contato_pj_vinculada&id_orgao_acesso_externo=0'); | ||
4 | +//$strLinkAjaxContatoRI0571 = SessaoSEIExterna::getInstance()->assinarLink('controlador_ajax_externo.php?acao_ajax_externo=contato_pj_vinculada'); | ||
5 | +$strLinkAjaxCidade = SessaoSEIExterna::getInstance()->assinarLink('controlador_ajax_externo.php?acao_ajax=cidade_montar_select_nome'); | ||
6 | +?> | ||
1 | <script type="text/javascript"> | 7 | <script type="text/javascript"> |
2 | /** | 8 | /** |
3 | * ANATEL | 9 | * ANATEL |
@@ -6,6 +12,12 @@ | @@ -6,6 +12,12 @@ | ||
6 | * | 12 | * |
7 | */ | 13 | */ |
8 | 14 | ||
15 | +var objAjaxNomeCidade = null; | ||
16 | +var objSelectSiglaEstado = null; | ||
17 | +var objSelectNomeCidade = null; | ||
18 | +var objAjaxContatoRI0571 = null; | ||
19 | +var objAutoCompletarContexto = null; | ||
20 | + | ||
9 | function selecionarPF(){ | 21 | function selecionarPF(){ |
10 | mostrarCamposPF(); | 22 | mostrarCamposPF(); |
11 | } | 23 | } |
@@ -105,8 +117,6 @@ function mostrarCamposPJ(){ | @@ -105,8 +117,6 @@ function mostrarCamposPJ(){ | ||
105 | } | 117 | } |
106 | 118 | ||
107 | function enviarInteressado(){ | 119 | function enviarInteressado(){ |
108 | - | ||
109 | - //alert('Enviar interessados - INICIO'); | ||
110 | 120 | ||
111 | var arrDados = ["Banana1", "Orange1", "Apple1", "Mango1"]; | 121 | var arrDados = ["Banana1", "Orange1", "Apple1", "Mango1"]; |
112 | arrDados.push("Kiwi1"); | 122 | arrDados.push("Kiwi1"); |
@@ -115,8 +125,6 @@ function enviarInteressado(){ | @@ -115,8 +125,6 @@ function enviarInteressado(){ | ||
115 | var arrDados2 = ["Banana2", "Orange2", "Apple2", "Mango2"]; | 125 | var arrDados2 = ["Banana2", "Orange2", "Apple2", "Mango2"]; |
116 | arrDados2.push("Kiwi2"); | 126 | arrDados2.push("Kiwi2"); |
117 | opener.receberInteressado(arrDados2, false); | 127 | opener.receberInteressado(arrDados2, false); |
118 | - | ||
119 | - //alert('Enviar interessados - FIM'); | ||
120 | 128 | ||
121 | } | 129 | } |
122 | 130 | ||
@@ -136,20 +144,82 @@ function validarFormulario(){ | @@ -136,20 +144,82 @@ function validarFormulario(){ | ||
136 | 144 | ||
137 | function inicializar(){ | 145 | function inicializar(){ |
138 | 146 | ||
139 | - var txtcpf = window.opener.document.getElementById("txtCPF").value; | ||
140 | - var txtcnpj = window.opener.document.getElementById("txtCNPJ").value; | 147 | + <?php if( isset( $_GET['edicao'] ) ) { ?> |
148 | + | ||
149 | + var idEdicao = window.opener.document.getElementById("hdnIdEdicao").value; | ||
150 | + document.getElementById("hdnIdEdicaoAuxiliar").value = idEdicao; | ||
151 | + document.frmEdicaoAuxiliar.submit(); | ||
152 | + return; | ||
141 | 153 | ||
142 | - <?php if( isset( $_GET['cpf'] ) ) { ?> | ||
143 | - document.getElementById("rdPF").click(); | ||
144 | - document.getElementById("txtCPF").value = txtcpf; | ||
145 | - <?php } ?> | 154 | + <?php } else { ?> |
146 | 155 | ||
147 | - <?php if( isset( $_GET['cnpj'] ) ) { ?> | ||
148 | - document.getElementById("rdPJ").click(); | ||
149 | - document.getElementById("txtCNPJ").value = txtcnpj; | ||
150 | - <?php } ?> | 156 | + var txtcpf = window.opener.document.getElementById("txtCPF").value; |
157 | + var txtcnpj = window.opener.document.getElementById("txtCNPJ").value; | ||
158 | + | ||
159 | + <?php if( isset( $_GET['cpf'] ) ) { ?> | ||
160 | + document.getElementById("rdPF").click(); | ||
161 | + document.getElementById("txtCPF").value = txtcpf; | ||
162 | + <?php } ?> | ||
163 | + | ||
164 | + <?php if( isset( $_GET['cnpj'] ) ) { ?> | ||
165 | + document.getElementById("rdPJ").click(); | ||
166 | + document.getElementById("txtCNPJ").value = txtcnpj; | ||
167 | + <?php } ?> | ||
168 | + | ||
169 | + <?php if( isset( $_GET['edicaoExibir'] ) && isset( $_GET['cnpj'] ) ) { ?> | ||
170 | + document.getElementById("txtCNPJ").value = "<?= InfraUtil::formatarCnpj( $_POST['txtCNPJ'] ) ?>"; | ||
171 | + <?php } ?> | ||
172 | + | ||
173 | + <?php if( isset( $_GET['edicaoExibir'] ) && isset( $_GET['cpf'] ) ) { ?> | ||
174 | + document.getElementById("txtCPF").value = "<?= InfraUtil::formatarCpf( $_POST['txtCPF'] ) ?>"; | ||
175 | + <?php } ?> | ||
176 | + | ||
177 | + //Preenchimento com o endereço do contexto | ||
178 | + //objAutoCompletarInteressado = new infraAjaxAutoCompletar('hdnIdInteressado','txtInteressado','<?=$strLinkAjaxInteressado?>'); | ||
179 | + //objAjaxContatoRI0571 = new infraAjaxComplementar('hdnIdContextoContato','txtPjVinculada','<?=$strLinkAjaxContatoRI0571?>'); | ||
180 | + //objAjaxContatoRI0571.limparCampo = false; | ||
181 | + | ||
182 | + //objAjaxContatoRI0571.prepararExecucao = function(){ | ||
183 | + //return 'idContextoContato='+document.getElementById('hdnIdContextoContato').value; | ||
184 | + //} | ||
185 | + | ||
186 | + //objAjaxContatoRI0571.processarResultado = function(arr){ | ||
187 | + //alert(arr); | ||
188 | + //} | ||
189 | + | ||
190 | + debugger; | ||
191 | + objAutoCompletarContexto = new infraAjaxAutoCompletar('hdnIdContextoContato','txtPjVinculada','<?=$strLinkAjaxContatos?>'); | ||
192 | + objAutoCompletarContexto.limparCampo = false; | ||
193 | + | ||
194 | + objAutoCompletarContexto.prepararExecucao = function(){ | ||
195 | + debugger; | ||
196 | + return 'id_tipo_contexto_contato='+document.getElementById('tipoInteressado').value+'&palavras_pesquisa='+document.getElementById('txtPjVinculada').value; | ||
197 | + }; | ||
151 | 198 | ||
152 | - infraEfeitoTabelas(); | 199 | + objAutoCompletarContexto.processarResultado = function(id,descricao,complemento){ |
200 | + | ||
201 | + console.log("Resultado:" + id ); | ||
202 | + | ||
203 | + if (id!=''){ | ||
204 | + document.getElementById('hdnIdContextoContato').value = id; | ||
205 | + document.getElementById('txtPjVinculada').value = descricao; | ||
206 | + //objAjaxContatoRI0571.executar(); | ||
207 | + } | ||
208 | + | ||
209 | + } | ||
210 | + | ||
211 | + //Ajax para carregar as cidades na escolha do estado | ||
212 | + objAjaxCidade = new infraAjaxMontarSelectDependente('selEstado','selCidade','<?=$strLinkAjaxCidade?>'); | ||
213 | + objAjaxCidade.prepararExecucao = function(){ | ||
214 | + return infraAjaxMontarPostPadraoSelect('null','','null') + '&siglaUf='+document.getElementById('selEstado').value; | ||
215 | + } | ||
216 | + objAjaxCidade.processarResultado = function(){ | ||
217 | + //alert('terminou carregamento'); | ||
218 | + } | ||
219 | + | ||
220 | + infraEfeitoTabelas(); | ||
221 | + | ||
222 | + <?php } ?> | ||
153 | 223 | ||
154 | } | 224 | } |
155 | 225 | ||
@@ -176,53 +246,17 @@ function OnSubmitForm() { | @@ -176,53 +246,17 @@ function OnSubmitForm() { | ||
176 | return true; | 246 | return true; |
177 | } | 247 | } |
178 | 248 | ||
179 | -function paisEstadoCidade(objPais, txtPais){ | ||
180 | - | ||
181 | - /* | ||
182 | - var objTxtEstado = document.getElementById('txtSiglaEstado'); | ||
183 | - var objSelEstado = document.getElementById('selSiglaEstado'); | ||
184 | - var objTxtCidade = document.getElementById('txtNomeCidade'); | ||
185 | - var objSelCidade = document.getElementById('selNomeCidade'); | ||
186 | - | ||
187 | - var flagAlterando = false; | ||
188 | - if (txtPais != undefined){ | ||
189 | - objPais.value = txtPais; | ||
190 | - }else{ | ||
191 | - flagAlterando = true; | ||
192 | - txtPais = objPais.value; | ||
193 | - } | ||
194 | - | ||
195 | - if (infraTrim(txtPais).toLowerCase() == 'brasil'){ | ||
196 | - if (flagAlterando){ | ||
197 | - objTxtEstado.value=''; | ||
198 | - objTxtCidade.value=''; | ||
199 | - } | ||
200 | - | ||
201 | - infraSelectSelecionarItem(objSelEstado,document.getElementById('txtSiglaEstado').value); | ||
202 | - objAjaxNomeCidade.executar(); | ||
203 | - | ||
204 | - objTxtEstado.style.visibility = 'hidden'; | ||
205 | - objTxtCidade.style.visibility = 'hidden'; | ||
206 | - objSelEstado.style.visibility = 'visible'; | ||
207 | - objSelCidade.style.visibility = 'visible'; | ||
208 | - }else{ | ||
209 | - infraSelectSelecionarItem(objSelEstado, 'null'); | ||
210 | - infraSelectSelecionarItem(objSelCidade, 'null'); | ||
211 | - | ||
212 | - objTxtEstado.style.visibility = 'visible'; | ||
213 | - objTxtCidade.style.visibility = 'visible'; | ||
214 | - objSelEstado.style.visibility = 'hidden'; | ||
215 | - objSelCidade.style.visibility = 'hidden'; | ||
216 | - } | ||
217 | - */ | ||
218 | -} | ||
219 | - | ||
220 | function salvar(){ | 249 | function salvar(){ |
221 | 250 | ||
222 | //validar interessado | 251 | //validar interessado |
223 | var interessado1 = document.frmCadastro.tipoPessoa.value; | 252 | var interessado1 = document.frmCadastro.tipoPessoa.value; |
224 | - var interessado2 = document.frmCadastro.tipoPessoaPF.value; | ||
225 | - | 253 | + var interessado2 = ''; |
254 | + var tipoPessoaPF = document.frmCadastro.tipoPessoaPF; | ||
255 | + | ||
256 | + if( tipoPessoaPF != null && tipoPessoaPF != undefined ){ | ||
257 | + interessado2 = tipoPessoaPF.value; | ||
258 | + } | ||
259 | + | ||
226 | if( interessado1 == '' ){ | 260 | if( interessado1 == '' ){ |
227 | alert('Informe o Interessado.'); | 261 | alert('Informe o Interessado.'); |
228 | return; | 262 | return; |
@@ -334,6 +368,15 @@ function salvar(){ | @@ -334,6 +368,15 @@ function salvar(){ | ||
334 | document.getElementById('telefone').focus(); | 368 | document.getElementById('telefone').focus(); |
335 | return; | 369 | return; |
336 | } | 370 | } |
371 | + | ||
372 | |||
373 | + if (!infraValidarEmail(infraTrim(document.getElementById('email').value))){ | ||
374 | + | ||
375 | + alert('E-mail Inválido.'); | ||
376 | + document.getElementById('email').focus(); | ||
377 | + return false; | ||
378 | + | ||
379 | + } | ||
337 | 380 | ||
338 | //endereco | 381 | //endereco |
339 | var endereco = document.getElementById('endereco').value; | 382 | var endereco = document.getElementById('endereco').value; |
@@ -354,29 +397,28 @@ function salvar(){ | @@ -354,29 +397,28 @@ function salvar(){ | ||
354 | } | 397 | } |
355 | 398 | ||
356 | //pais | 399 | //pais |
400 | + /* | ||
357 | var pais = document.getElementById('pais').value; | 401 | var pais = document.getElementById('pais').value; |
358 | 402 | ||
359 | if( pais == ''){ | 403 | if( pais == ''){ |
360 | alert('Informe o país.'); | 404 | alert('Informe o país.'); |
361 | document.getElementById('pais').focus(); | 405 | document.getElementById('pais').focus(); |
362 | return; | 406 | return; |
363 | - } | 407 | + } */ |
364 | 408 | ||
365 | //estado | 409 | //estado |
366 | - var estado = document.getElementById('estado').value; | ||
367 | - var cbEstado = document.getElementById('cbEstado').value; | 410 | + var estado = document.getElementById('selEstado').value; |
368 | 411 | ||
369 | - if( estado == '' && cbEstado == ''){ | 412 | + if( estado == ''){ |
370 | alert('Informe o estado.'); | 413 | alert('Informe o estado.'); |
371 | document.getElementById('estado').focus(); | 414 | document.getElementById('estado').focus(); |
372 | return; | 415 | return; |
373 | } | 416 | } |
374 | 417 | ||
375 | //cidade | 418 | //cidade |
376 | - var cidade = document.getElementById('cidade').value; | ||
377 | - var cbCidade = document.getElementById('cbCidade').value; | 419 | + var cidade = document.getElementById('selCidade').value; |
378 | 420 | ||
379 | - if( cidade == '' && cbCidade == ''){ | 421 | + if( cidade == ''){ |
380 | alert('Informe a cidade.'); | 422 | alert('Informe a cidade.'); |
381 | document.getElementById('cidade').focus(); | 423 | document.getElementById('cidade').focus(); |
382 | return; | 424 | return; |
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro.php
@@ -88,38 +88,30 @@ PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); | @@ -88,38 +88,30 @@ PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); | ||
88 | PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | 88 | PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); |
89 | ?> | 89 | ?> |
90 | <p> | 90 | <p> |
91 | - <label style="font-weight: bold;">Tipo de Processo:</label> | 91 | + <label class="infraLabelObrigatorio">Tipo de Processo:</label> |
92 | <label><?= $txtTipoProcessoEscolhido ?></label> | 92 | <label><?= $txtTipoProcessoEscolhido ?></label> |
93 | </p> | 93 | </p> |
94 | <br/> | 94 | <br/> |
95 | 95 | ||
96 | <fieldset id="field1" class="infraFieldset sizeFieldset"> | 96 | <fieldset id="field1" class="infraFieldset sizeFieldset"> |
97 | <legend class="infraLegend"> Orientações sobre o Tipo de Processo </legend> | 97 | <legend class="infraLegend"> Orientações sobre o Tipo de Processo </legend> |
98 | - <label> | ||
99 | - <?= $txtOrientacoes ?> | ||
100 | - </label> | 98 | + <br /> |
99 | + <label> | ||
100 | + <?= $txtOrientacoes ?> | ||
101 | + </label> | ||
102 | + <br /><br /> | ||
101 | </fieldset> | 103 | </fieldset> |
102 | 104 | ||
103 | <fieldset id="field2" class="infraFieldset sizeFieldset"> | 105 | <fieldset id="field2" class="infraFieldset sizeFieldset"> |
104 | <legend class="infraLegend"> Formulário de Peticionamento </legend> | 106 | <legend class="infraLegend"> Formulário de Peticionamento </legend> |
105 | - | ||
106 | - <!-- $objTipoProcDTO | ||
107 | - [RN1] O sistema deve recuperar o que foi informado no campo “Indicação de Interessado” da funcionalidade “Gerir Tipo de Processo para Peticionamento”: | ||
108 | - a. Caso tenha sido marcada a opção “Próprio Usuário Externo”, não deve apresentar nenhum campo adicional, devendo vincular o novo peticionamento ao usuário externo logado no sistema. | ||
109 | - b. Caso tenha sido marcada a opção “Indicação Direta > Informando CPF ou CNPJ” deve apresentar os campos “CPF/CNPJ” e “Nome/Razão Social”; | ||
110 | - c. Caso tenha sido marcada a opção “Contatos já existentes com opção de incluir um novo” deve apresentar a lista de opções com o nome dos interessados. | ||
111 | - [RN2] O campo CPF somente será apresentado caso seja selecionado a opção “Pessoa Física” do campo “Interessado”. | ||
112 | - [RN3] O campo CNPJ somente será apresentado caso seja selecionado a opção “Pessoa Jurídica” do campo “Interessado”. | ||
113 | - --> | ||
114 | - | ||
115 | <br/> | 107 | <br/> |
116 | - <label style="font-weight: bold;"> Especificação (resumo limitado a 50 caracteres): </label> | 108 | + <label class="infraLabelObrigatorio">Especificação (resumo limitado a 50 caracteres):</label> |
117 | <br/> | 109 | <br/> |
118 | - <input type="text" name="txtEspecificacao" maxlength="50" id="txtEspecificacao" style="width:360px;" class="infraText" value="" /> <br/><br/> | 110 | + <input type="text" class="infraText" name="txtEspecificacao" id="txtEspecificacao" style="width: 360px;" maxlength="50" /> <br/><br/> |
119 | 111 | ||
120 | <? if( $arrUnidadeUFDTO != null && count( $arrUnidadeUFDTO ) > 1 ){ ?> | 112 | <? if( $arrUnidadeUFDTO != null && count( $arrUnidadeUFDTO ) > 1 ){ ?> |
121 | 113 | ||
122 | - <label style="font-weight: bold;"> UF em que o processo deve ser aberto: </label> | 114 | + <label class="infraLabelObrigatorio">UF em que o processo deve ser aberto:</label> |
123 | <br/> | 115 | <br/> |
124 | 116 | ||
125 | <select id="selUFAberturaProcesso" name="selUFAberturaProcesso"> | 117 | <select id="selUFAberturaProcesso" name="selUFAberturaProcesso"> |
@@ -144,7 +136,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -144,7 +136,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
144 | </span> | 136 | </span> |
145 | 137 | ||
146 | <span id="spnPublico"> | 138 | <span id="spnPublico"> |
147 | - <label id="lblPublico" class="infraLabelRadio"> | 139 | + <label id="lblPublico" class="infraLabel"> |
148 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso1()"/> | 140 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso1()"/> |
149 | </label> | 141 | </label> |
150 | </span> | 142 | </span> |
@@ -159,20 +151,20 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -159,20 +151,20 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
159 | <div id="divOptPublico" class="infraDivRadio"> | 151 | <div id="divOptPublico" class="infraDivRadio"> |
160 | 152 | ||
161 | <span id="spnPublico0"> | 153 | <span id="spnPublico0"> |
162 | - <label id="lblPublico" class="infraLabelObrigatorio">Interessado:</label> | 154 | + <label id="lblPublico" class="infraLabelObrigatorio">Interessados:</label> |
163 | </span> | 155 | </span> |
164 | 156 | ||
165 | <span id="spnPublico"> | 157 | <span id="spnPublico"> |
166 | - <label id="lblPublico" class="infraLabelRadio"> | 158 | + <label id="lblPublico" class="infraLabel"> |
167 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso2()"/> | 159 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso2()"/> |
168 | </label> | 160 | </label> |
169 | </span> | 161 | </span> |
170 | 162 | ||
171 | <input name="rdoTipoPessoa" id="optTipoPessoaFisica" onclick="selecionarPF()" name="tipoPessoa" value="pf" class="infraRadio" type="radio"/> | 163 | <input name="rdoTipoPessoa" id="optTipoPessoaFisica" onclick="selecionarPF()" name="tipoPessoa" value="pf" class="infraRadio" type="radio"/> |
172 | - <span id="spnPublico"><label id="lblPublico" for="optTipoPessoaFisica" class="infraLabelRadio">Pessoa física</label></span> | 164 | + <span id="spnPublico"><label id="lblPublico" for="optTipoPessoaFisica" class="infraLabelRadio">Pessoa Física</label></span> |
173 | 165 | ||
174 | <input name="rdoTipoPessoa" id="optTipoPessoaJuridica" onclick="selecionarPJ()" name="tipoPessoa" value="pj" class="infraRadio" type="radio"/> | 166 | <input name="rdoTipoPessoa" id="optTipoPessoaJuridica" onclick="selecionarPJ()" name="tipoPessoa" value="pj" class="infraRadio" type="radio"/> |
175 | - <span id="spnPublico"><label id="lblPublico2" for="optTipoPessoaJuridica" class="infraLabelRadio">Pessoa jurídica</label></span> | 167 | + <span id="spnPublico"><label id="lblPublico2" for="optTipoPessoaJuridica" class="infraLabelRadio">Pessoa Jurídica</label></span> |
176 | 168 | ||
177 | </div> | 169 | </div> |
178 | 170 | ||
@@ -182,61 +174,50 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -182,61 +174,50 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
182 | 174 | ||
183 | <div id="divSel1" style=" float: left; display: none;"> | 175 | <div id="divSel1" style=" float: left; display: none;"> |
184 | 176 | ||
185 | - <label id="descTipoPessoa" style="font-weight: bold;"> </label> <br/> | 177 | + <label id="descTipoPessoa" class="infraLabelObrigatorio"> </label> <br/> |
186 | 178 | ||
187 | - <input type="text" id="txtCPF" class="infraText" name="txtCPF" width="280" onkeypress="return infraMascaraCpf(this, event)" | ||
188 | - style="width:280px; display:none;"/> | 179 | + <input type="text" id="txtCPF" class="infraText" name="txtCPF" onkeypress="return infraMascaraCpf(this, event)" |
180 | + style="width:140px; display:none;"/> | ||
189 | 181 | ||
190 | - <input type="text" id="txtCNPJ" class="infraText" name="txtCNPJ" width="280" onkeypress="return infraMascaraCnpj(this, event)" | ||
191 | - style="width:280px; display:none;"/> | 182 | + <input type="text" id="txtCNPJ" class="infraText" name="txtCNPJ" onkeypress="return infraMascaraCnpj(this, event)" |
183 | + style="width:140px; display:none;"/> | ||
192 | 184 | ||
193 | - <input type="text" readonly="readonly" id="btValidarCPFCNPJ" class="infraText" value=" Validar " | ||
194 | - style="visibility: hidden; width: 45px; margin-left: 2px; " | 185 | + <input type="button" readonly="readonly" id="btValidarCPFCNPJ" class="infraText" value="Validar" |
186 | + style="visibility: hidden; margin-left: 2px; " | ||
195 | onclick="abrirCadastroInteressado()" /> | 187 | onclick="abrirCadastroInteressado()" /> |
196 | 188 | ||
197 | </div> | 189 | </div> |
198 | 190 | ||
199 | - <div id="divSel2" style=" float: left; margin-left: 10px; display: none;"> | 191 | + <div id="divSel2" style="float: left; margin-left: 15px; display: none;"> |
200 | 192 | ||
201 | - <label id="descNomePessoa" style="font-weight: bold;"> </label> <br/> | ||
202 | - <input type="text" name="txtNomeRazaoSocial" id="txtNomeRazaoSocial" | ||
203 | - readonly="readonly" maxlength="250" width="280" | ||
204 | - style="width:280px; display: none;"> | 193 | + <label id="descNomePessoa" class="infraLabelObrigatorio"> </label> <br/> |
194 | + <input type="text" name="txtNomeRazaoSocial" id="txtNomeRazaoSocial" readonly="readonly" maxlength="250" style="width: 300px; display: none;"> | ||
205 | 195 | ||
206 | - <input type="text" readonly="readonly" id="btAdicionarInteressado" class="infraText" value=" Adicionar " | ||
207 | - onclick="adicionarInteressadoValido()" style="width: 60px; margin-left: 2px; display: none;" /> | 196 | + <input type="button" readonly="readonly" id="btAdicionarInteressado" class="infraText" value="Adicionar" onclick="adicionarInteressadoValido()" style="margin-left: 2px; display: none;" /> |
208 | 197 | ||
209 | </div> | 198 | </div> |
210 | 199 | ||
211 | <div style="margin-left: 35px; width: auto;"> | 200 | <div style="margin-left: 35px; width: auto;"> |
212 | 201 | ||
213 | - <table id="tbInteressado" class="infraTable" width="95%" align="right" summary="Lista de Interessados" > | 202 | + <input type="hidden" name="hdnIdInteressadoCadastrado" id="hdnIdInteressadoCadastrado" value="" /> |
203 | + <input type="hidden" name="hdnListaInteressadosIndicados" id="hdnListaInteressadosIndicados" value="" /> | ||
204 | + <input type="hidden" name="hdnCustomizado" id="hdnCustomizado" value="" /> | ||
205 | + <input type="hidden" name="hdnIdEdicao" id="hdnIdEdicao" value="" /> | ||
206 | + | ||
207 | + <table id="tbInteressadosIndicados" class="infraTable" width="95%" align="right" summary="Lista de Interessados" > | ||
214 | 208 | ||
215 | <caption class="infraCaption">Lista de Interessados:</caption> | 209 | <caption class="infraCaption">Lista de Interessados:</caption> |
216 | 210 | ||
217 | <tr> | 211 | <tr> |
218 | - <th class="infraTh" id="tdDescTipoPessoa" > CPF/CNPJ </th> | ||
219 | - <th class="infraTh" id="tdDescNomePessoa" > Nome/Razão social </th> | ||
220 | - <th class="infraTh" style="display: none;" > ID Usuario </th> | ||
221 | <th class="infraTh" style="display: none;" > ID Contato </th> | 212 | <th class="infraTh" style="display: none;" > ID Contato </th> |
222 | - <th class="infraTh" style="display: none;" > ID Contexto </th> | ||
223 | - <th align="center" class="infraTh" style="width:70px;"> Ações </th> | 213 | + <th class="infraTh" width="100" id="tdDescTipoPessoaSelecao" > Tipo </th> |
214 | + <th class="infraTh" width="120" id="tdDescTipoPessoa" > CPF/CNPJ </th> | ||
215 | + <th class="infraTh" id="tdDescNomePessoa" > Nome/Razão social </th> | ||
216 | + <th align="center" class="infraTh" style="width:50px;"> Ações </th> | ||
224 | </tr> | 217 | </tr> |
225 | 218 | ||
226 | <tbody> | 219 | <tbody> |
227 | 220 | ||
228 | - <!-- | ||
229 | - <tr class="infraTrClara"> | ||
230 | - <td class="infraTdSetaOrdenacao"> CPF/CNPJ </td> | ||
231 | - <td class="infraTdSetaOrdenacao"> Razão social </td> | ||
232 | - | ||
233 | - <td align="center" class="infraTdSetaOrdenacao"> | ||
234 | - <img src="/infra_css/imagens/alterar.gif" title="Alterar" alt="Alterar" class="infraImg"/> | ||
235 | - <img src="/infra_css/imagens/remover.gif" alt="Remover" onclick="deleteRow(this)" title="Remover" class="infraImg"/> | ||
236 | - </td> | ||
237 | - </tr> | ||
238 | - --> | ||
239 | - | ||
240 | </tbody> | 221 | </tbody> |
241 | 222 | ||
242 | </table> | 223 | </table> |
@@ -257,11 +238,11 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -257,11 +238,11 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
257 | <div id="divOptPublico" class="infraDivRadio"> | 238 | <div id="divOptPublico" class="infraDivRadio"> |
258 | 239 | ||
259 | <span id="spnPublico0"> | 240 | <span id="spnPublico0"> |
260 | - <label id="lblPublico" class="infraLabelObrigatorio">Interessado:</label> | 241 | + <label id="lblPublico" class="infraLabelObrigatorio">Interessados:</label> |
261 | </span> | 242 | </span> |
262 | 243 | ||
263 | <span id="spnPublico"> | 244 | <span id="spnPublico"> |
264 | - <label id="lblPublico" class="infraLabelRadio"> | 245 | + <label id="lblPublico" class="infraLabel"> |
265 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso3()"/> | 246 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaCaso3()"/> |
266 | </label> | 247 | </label> |
267 | </span> | 248 | </span> |
@@ -270,7 +251,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -270,7 +251,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
270 | 251 | ||
271 | <div style="clear: both;"></div> | 252 | <div style="clear: both;"></div> |
272 | 253 | ||
273 | - <input type="text" name="txtInteressado" id="txtInteressado" maxlength="50" value="" style="width: 50%" class="infraText" autocomplete="off" /> <br/> | 254 | + <input type="text" name="txtInteressado" id="txtInteressado" maxlength="250" value="" style="width: 50%" class="infraText" autocomplete="off" /> <br/> |
274 | 255 | ||
275 | <div style="margin-top: 5px;"> | 256 | <div style="margin-top: 5px;"> |
276 | 257 |
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro_bloco_documentos.php
@@ -57,13 +57,12 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -57,13 +57,12 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
57 | 57 | ||
58 | } | 58 | } |
59 | 59 | ||
60 | - | ||
61 | //checando se Documento Principal está parametrizado para "Externo (Anexação de Arquivo) ou Gerador (editor do SEI) | 60 | //checando se Documento Principal está parametrizado para "Externo (Anexação de Arquivo) ou Gerador (editor do SEI) |
62 | $gerado = $ObjTipoProcessoPeticionamentoDTO->getStrSinDocGerado(); | 61 | $gerado = $ObjTipoProcessoPeticionamentoDTO->getStrSinDocGerado(); |
63 | $externo = $ObjTipoProcessoPeticionamentoDTO->getStrSinDocExterno(); | 62 | $externo = $ObjTipoProcessoPeticionamentoDTO->getStrSinDocExterno(); |
64 | 63 | ||
65 | if( $externo == 'S' ) { ?> | 64 | if( $externo == 'S' ) { ?> |
66 | - <label style="font-weight: bold;" for="fileArquivoPrincipal"> Documento Principal (<? | 65 | + <label class="infraLabelObrigatorio" for="fileArquivoPrincipal">Documento Principal (<? |
67 | echo $strTamanhoMaximoPrincipal; | 66 | echo $strTamanhoMaximoPrincipal; |
68 | echo "<input type=hidden name=hdnTamArquivoPrincipal id=hdnTamArquivoPrincipal value='" . $strTamanhoMaximoPrincipal . "'>"; | 67 | echo "<input type=hidden name=hdnTamArquivoPrincipal id=hdnTamArquivoPrincipal value='" . $strTamanhoMaximoPrincipal . "'>"; |
69 | ?>):</label><br/> | 68 | ?>):</label><br/> |
@@ -73,45 +72,55 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -73,45 +72,55 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
73 | <!-- Quando é EXTERNO exibir "Tipo" e "Complemento" --> | 72 | <!-- Quando é EXTERNO exibir "Tipo" e "Complemento" --> |
74 | <? if( $externo == 'S' ) { ?> | 73 | <? if( $externo == 'S' ) { ?> |
75 | 74 | ||
76 | - <div style=" float: left; width: 15%;"> | ||
77 | - <label style="font-weight: bold;" class="infraLabel"> Tipo: </label> <br/> | ||
78 | - | ||
79 | - <label class="infraLabel"> | ||
80 | - <?= $strTipoDocumentoPrincipal ?> | ||
81 | - </label> | 75 | + <div style="float: left; height: 42px; margin-right: 10px;"> |
76 | + <label class="infraLabelObrigatorio">Tipo de Documento:</label> | ||
77 | + <span id="spnPublico"> | ||
78 | + <label id="lblPublico" class="infraLabel"> | ||
79 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaTipoDocumentoPrincipal()"/> | ||
80 | + </label> | ||
81 | + </span> | ||
82 | + <br/> | ||
82 | 83 | ||
83 | - <select id="tipoDocumentoPrincipal" style="display:none;"> | ||
84 | - <option value="<?= $serieDTO->getNumIdSerie() ?>"><?= $strTipoDocumentoPrincipal ?></option> | ||
85 | - </select> | 84 | + <label class="infraLabel"> |
85 | + <?= $strTipoDocumentoPrincipal ?> | ||
86 | + </label> | ||
86 | 87 | ||
87 | - </div> | 88 | + <select id="tipoDocumentoPrincipal" style="display:none;"> |
89 | + <option value="<?= $serieDTO->getNumIdSerie() ?>"><?= $strTipoDocumentoPrincipal ?></option> | ||
90 | + </select> | ||
91 | + </div> | ||
88 | 92 | ||
89 | - <div style=" float: left; width: 250px;"> | ||
90 | - <label style="font-weight: bold;" class="infraLabel"> Complemento:</label> <br/> | ||
91 | - <input type="text" class="infraText" name="complementoPrincipal" id="complementoPrincipal" style="width:220px;" maxlength="30" /> | ||
92 | - </div> | 93 | + <div style="float: left; height: 42px;"> |
94 | + <label class="infraLabelObrigatorio">Complemento do Tipo de Documento:</label> | ||
95 | + <span id="spnPublico"> | ||
96 | + <label id="lblPublico" class="infraLabel"> | ||
97 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaComplementoTipo()"/> | ||
98 | + </label> | ||
99 | + </span> | ||
100 | + <br/> | ||
101 | + <input type="text" class="infraText" name="complementoPrincipal" id="complementoPrincipal" style="width: 240px;" maxlength="40" /> | ||
102 | + </div> | ||
93 | 103 | ||
94 | <? } ?> | 104 | <? } ?> |
95 | 105 | ||
96 | <? if( $gerado == 'S' ) { ?> | 106 | <? if( $gerado == 'S' ) { ?> |
97 | 107 | ||
98 | <!-- DOCUMENTO PRINCIPAL DO TIPO GERADO --> | 108 | <!-- DOCUMENTO PRINCIPAL DO TIPO GERADO --> |
99 | - <div style=" float: left; width: 90%;"> | ||
100 | - <label style="font-weight: bold;"> Documento Principal:</label> | ||
101 | - <label class="infraLabelRadio" onclick="abrirJanelaDocumento()"><?= $strTipoDocumentoPrincipal ?> (clique aqui para editar conteúdo) </label> | ||
102 | - </div> | 109 | + <br /> |
110 | + <div style="float: left; width: 90%;"> | ||
111 | + <label class="infraLabelObrigatorio">Documento Principal: </label> | ||
112 | + <label class="infraLabelRadio" onclick="abrirJanelaDocumento()"><?= $strTipoDocumentoPrincipal ?> (clique aqui para editar conteúdo)</label> | ||
113 | + </div> | ||
103 | 114 | ||
104 | <div style="clear: both;"> </div> | 115 | <div style="clear: both;"> </div> |
105 | 116 | ||
106 | - <div style=" float: left; width: 15%;"> | ||
107 | - <label style="font-weight: bold;" class="infraLabel"> Nível de Acesso:</label> <br/> | 117 | + <div style="float: left;"> |
118 | + <label class="infraLabelObrigatorio">Nível de Acesso:</label> <br/> | ||
108 | 119 | ||
109 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> | 120 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> |
110 | - <select class="infraSelect" width="140" id="nivelAcesso1" name="nivelAcesso1" onchange="selectNivelAcesso('nivelAcesso1', 'hipoteseLegal1')" style="width:140px;" > | ||
111 | - <option value=""></option> | ||
112 | - <option value="0">Público</option> | ||
113 | - <option value="1">Restrito</option> | ||
114 | - </select> | 121 | + <select class="infraSelect" id="nivelAcesso1" name="nivelAcesso1" onchange="selectNivelAcesso('nivelAcesso1', 'hipoteseLegal1')" style="width: 120px; margin-right: 10px;"> |
122 | + <?=$strItensSelNivelAcesso?> | ||
123 | + </select> | ||
115 | <? } else if( $isNivelAcessoPadrao == 'S' ) { ?> | 124 | <? } else if( $isNivelAcessoPadrao == 'S' ) { ?> |
116 | <label class="infraLabel"><?= $strNomeNivelAcessoPadrao ?></label> | 125 | <label class="infraLabel"><?= $strNomeNivelAcessoPadrao ?></label> |
117 | <input type="hidden" name="nivelAcesso1" id="nivelAcesso1" value="<?= $nivelAcessoPadrao ?>" /> | 126 | <input type="hidden" name="nivelAcesso1" id="nivelAcesso1" value="<?= $nivelAcessoPadrao ?>" /> |
@@ -119,19 +128,16 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -119,19 +128,16 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
119 | 128 | ||
120 | </div> | 129 | </div> |
121 | 130 | ||
122 | - <!-- DICA --> | ||
123 | - <!-- <div id="divhipoteseLegal1" style=" float: left; width: 38% ; display:none;"> --> | ||
124 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> | 131 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> |
125 | - <div id="divhipoteseLegal1" style="float: left; width: 38% ; display:block;"> | 132 | + <div id="divhipoteseLegal1" style="float: left; width: 70%; display:block;"> |
126 | <? } else { ?> | 133 | <? } else { ?> |
127 | - <div id="divhipoteseLegal1" style=" float: left; width: 38% ; display:none;"> | 134 | + <div id="divhipoteseLegal1" style="float: left; width: 70%; display:none;"> |
128 | <? } ?> | 135 | <? } ?> |
129 | 136 | ||
130 | - | ||
131 | <?if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S' ) { ?> | 137 | <?if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S' ) { ?> |
132 | 138 | ||
133 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | ||
134 | - <select class="infraSelect" id="hipoteseLegal1" name="hipoteseLegal1" width="285" style="width:285px; float: left; margin-right: 5px;"> | 139 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
140 | + <select class="infraSelect" id="hipoteseLegal1" name="hipoteseLegal1" style="width: 95%; float: left; margin-right: 5px;"> | ||
135 | <option value=""></option> | 141 | <option value=""></option> |
136 | <? //$isConfigHipoteseLegal $arrHipoteseLegal | 142 | <? //$isConfigHipoteseLegal $arrHipoteseLegal |
137 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { | 143 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { |
@@ -146,7 +152,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -146,7 +152,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
146 | 152 | ||
147 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> | 153 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> |
148 | 154 | ||
149 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 155 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
150 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> | 156 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> |
151 | <input type="hidden" name="hipoteseLegal1" id="hipoteseLegal1" value="<?= $idHipoteseLegalPadrao ?>" /> | 157 | <input type="hidden" name="hipoteseLegal1" id="hipoteseLegal1" value="<?= $idHipoteseLegalPadrao ?>" /> |
152 | 158 | ||
@@ -164,22 +170,13 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -164,22 +170,13 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
164 | <!-- DOCUMENTO PRINCIPAL DO TIPO EXTERNO --> | 170 | <!-- DOCUMENTO PRINCIPAL DO TIPO EXTERNO --> |
165 | <div style="clear: both;"> </div> | 171 | <div style="clear: both;"> </div> |
166 | 172 | ||
167 | - <div style=" float: left; width: 15%;"> | ||
168 | - | ||
169 | - <label style="font-weight: bold;" class="infraLabel"> Nível de Acesso:</label> <br/> | 173 | + <div style="float: left;"> |
174 | + <label class="infraLabelObrigatorio">Nível de Acesso:</label> <br/> | ||
170 | 175 | ||
171 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> | 176 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> |
172 | - | ||
173 | - <select class="infraSelect" width="140" id="nivelAcesso1" | ||
174 | - name="nivelAcesso1" style="width:140px;" | ||
175 | - onchange="selectNivelAcesso('nivelAcesso1', 'hipoteseLegal1')" > | ||
176 | - | ||
177 | - <option value=""></option> | ||
178 | - <option value="0">Público</option> | ||
179 | - <option value="1">Restrito</option> | ||
180 | - | 177 | + <select class="infraSelect" id="nivelAcesso1" name="nivelAcesso1" onchange="selectNivelAcesso('nivelAcesso1', 'hipoteseLegal1')" style="width: 120px; margin-right: 10px;"> |
178 | + <?=$strItensSelNivelAcesso?> | ||
181 | </select> | 179 | </select> |
182 | - | ||
183 | <? } else if( $isNivelAcessoPadrao == 'S' ) { ?> | 180 | <? } else if( $isNivelAcessoPadrao == 'S' ) { ?> |
184 | <label class="infraLabel"><?= $strNomeNivelAcessoPadrao ?></label> | 181 | <label class="infraLabel"><?= $strNomeNivelAcessoPadrao ?></label> |
185 | <input type="hidden" name="nivelAcesso1" id="nivelAcesso1" value="<?= $nivelAcessoPadrao ?>" /> | 182 | <input type="hidden" name="nivelAcesso1" id="nivelAcesso1" value="<?= $nivelAcessoPadrao ?>" /> |
@@ -188,15 +185,15 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -188,15 +185,15 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
188 | </div> | 185 | </div> |
189 | 186 | ||
190 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> | 187 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> |
191 | - <div id="divhipoteseLegal1" style="float: left; width: 38% ; display:block;"> | 188 | + <div id="divhipoteseLegal1" style="float: left; width: 70%; display:block;"> |
192 | <? } else { ?> | 189 | <? } else { ?> |
193 | - <div id="divhipoteseLegal1" style=" float: left; width: 38% ; display:none;"> | 190 | + <div id="divhipoteseLegal1" style="float: left; width: 70%; display:none;"> |
194 | <? } ?> | 191 | <? } ?> |
195 | 192 | ||
196 | <?if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S' ) { ?> | 193 | <?if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S' ) { ?> |
197 | 194 | ||
198 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | ||
199 | - <select class="infraSelect" id="hipoteseLegal1" name="hipoteseLegal1" width="285" style="width:285px; float: left; margin-right: 5px;"> | 195 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
196 | + <select class="infraSelect" id="hipoteseLegal1" name="hipoteseLegal1" style="width: 95%; float: left; margin-right: 5px;"> | ||
200 | <option value=""></option> | 197 | <option value=""></option> |
201 | <? //$isConfigHipoteseLegal $arrHipoteseLegal | 198 | <? //$isConfigHipoteseLegal $arrHipoteseLegal |
202 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { | 199 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { |
@@ -211,7 +208,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -211,7 +208,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
211 | 208 | ||
212 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> | 209 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ) { ?> |
213 | 210 | ||
214 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 211 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
215 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> | 212 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> |
216 | <input type="hidden" name="hipoteseLegal1" id="hipoteseLegal1" value="<?= $idHipoteseLegalPadrao ?>" /> | 213 | <input type="hidden" name="hipoteseLegal1" id="hipoteseLegal1" value="<?= $idHipoteseLegalPadrao ?>" /> |
217 | 214 | ||
@@ -221,10 +218,10 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -221,10 +218,10 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
221 | 218 | ||
222 | <div style="clear: both;"> </div> | 219 | <div style="clear: both;"> </div> |
223 | 220 | ||
224 | - <div style=" float: left; margin-right: 20px;"> | ||
225 | - <label style="font-weight: bold;" class="infraLabel">Formato:</label> | 221 | + <div style="float: left; margin-right: 20px;"> |
222 | + <label class="infraLabelObrigatorio">Formato:</label> | ||
226 | <span id="spnPublico"> | 223 | <span id="spnPublico"> |
227 | - <label id="lblPublico" class="infraLabelRadio"> | 224 | + <label id="lblPublico" class="infraLabel"> |
228 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> | 225 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> |
229 | </label> | 226 | </label> |
230 | </span> | 227 | </span> |
@@ -234,11 +231,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -234,11 +231,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
234 | <label for="rdDigitalizado1_2" class="infraLabelRadio">Digitalizado</label> | 231 | <label for="rdDigitalizado1_2" class="infraLabelRadio">Digitalizado</label> |
235 | </div> | 232 | </div> |
236 | 233 | ||
237 | - <div id="camposDigitalizadoPrincipal" style=" float: left; width: 50%; display: none;"> | 234 | + <div id="camposDigitalizadoPrincipal" style="float: left; width: 55%; display: none;"> |
238 | 235 | ||
239 | <div style="float: left; width: 100%;"> | 236 | <div style="float: left; width: 100%;"> |
240 | 237 | ||
241 | - <label style="font-weight: bold;" class="infraLabel"> Conferência com o documento digitalizado:</label> <br/> | 238 | + <label class="infraLabelObrigatorio">Conferência com o documento digitalizado:</label> <br/> |
242 | 239 | ||
243 | <select class="infraSelect" id="TipoConferenciaPrincipal" name="TipoConferenciaPrincipal" width="285" | 240 | <select class="infraSelect" id="TipoConferenciaPrincipal" name="TipoConferenciaPrincipal" width="285" |
244 | style="width: 285px; float:left; margin-right: 5px;"> | 241 | style="width: 285px; float:left; margin-right: 5px;"> |
@@ -256,7 +253,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -256,7 +253,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
256 | 253 | ||
257 | </div> | 254 | </div> |
258 | 255 | ||
259 | - <div id="camposDigitalizadoPrincipalBotao" style=" float: left; width: 50%;"> | 256 | + <div id="camposDigitalizadoPrincipalBotao" style="float: left; width: 15%;"> |
260 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('1')"> | 257 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('1')"> |
261 | </div> | 258 | </div> |
262 | 259 | ||
@@ -312,35 +309,34 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -312,35 +309,34 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
312 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ ?> | 309 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ ?> |
313 | 310 | ||
314 | <br/> | 311 | <br/> |
315 | - <label class="infraLabelObrigatorio" for="fileArquivoEssencial"> Documentos Essenciais (<? | 312 | + <label class="infraLabelObrigatorio" for="fileArquivoEssencial">Documentos Essenciais (<? |
316 | echo $strTamanhoMaximoComplementar; | 313 | echo $strTamanhoMaximoComplementar; |
317 | echo "<input type=hidden name=hdnTamArquivoEssencial id=hdnTamArquivoEssencial value='" . $strTamanhoMaximoComplementar . "'>"; | 314 | echo "<input type=hidden name=hdnTamArquivoEssencial id=hdnTamArquivoEssencial value='" . $strTamanhoMaximoComplementar . "'>"; |
318 | ?>):</label><br/> | 315 | ?>):</label><br/> |
319 | 316 | ||
320 | <input style="margin-top:0.3%" type="file" id="fileArquivoEssencial" name="fileArquivoEssencial" size="50" /> <br/><br/> | 317 | <input style="margin-top:0.3%" type="file" id="fileArquivoEssencial" name="fileArquivoEssencial" size="50" /> <br/><br/> |
321 | 318 | ||
322 | - <div style=" float: left; width: 15%;"> | ||
323 | - | ||
324 | - <label style="font-weight: bold;" class="infraLabel"> Tipo: </label> <br/> | ||
325 | - | ||
326 | - <? | ||
327 | - //print_r( $arrRelTipoProcessoSeriePeticionamentoDTO ); die(); | ||
328 | - ?> | 319 | + <div style="float: left; height: 42px;"> |
320 | + <label class="infraLabelObrigatorio">Tipo de Documento:</label> | ||
321 | + <span id="spnPublico"> | ||
322 | + <label id="lblPublico" class="infraLabel"> | ||
323 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaTipoDocumentoEssenciaisComplementares()"/> | ||
324 | + </label> | ||
325 | + </span> | ||
326 | + <br/> | ||
329 | 327 | ||
330 | - <select class="infraSelect" width="140" style="width:140px;" name="tipoDocumentoEssencial" id="tipoDocumentoEssencial" > | 328 | + <select class="infraSelect" style="width: 200px; margin-right: 10px;" name="tipoDocumentoEssencial" id="tipoDocumentoEssencial" > |
331 | <option value=""></option> | 329 | <option value=""></option> |
332 | <? | 330 | <? |
333 | 331 | ||
334 | - | ||
335 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ | 332 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ |
336 | 333 | ||
337 | foreach( $arrRelTipoProcessoSeriePeticionamentoDTO as $item ){ | 334 | foreach( $arrRelTipoProcessoSeriePeticionamentoDTO as $item ){ |
338 | 335 | ||
339 | - $serieDTO = new SerieDTO(); | ||
340 | - $serieDTO->retTodos(); | ||
341 | - $serieDTO->setNumIdSerie($item->getNumIdSerie()); | ||
342 | - $serieDTO = $serieRN->consultarRN0644( $serieDTO ); | ||
343 | - //print_r( $serieDTO ); die(); | 336 | + $serieDTO = new SerieDTO(); |
337 | + $serieDTO->retTodos(); | ||
338 | + $serieDTO->setNumIdSerie($item->getNumIdSerie()); | ||
339 | + $serieDTO = $serieRN->consultarRN0644( $serieDTO ); | ||
344 | 340 | ||
345 | ?> | 341 | ?> |
346 | <option value="<?= $item->getNumIdSerie() ?>"><?= $serieDTO->getStrNome() ?></option> | 342 | <option value="<?= $item->getNumIdSerie() ?>"><?= $serieDTO->getStrNome() ?></option> |
@@ -350,46 +346,49 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -350,46 +346,49 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
350 | 346 | ||
351 | </select> | 347 | </select> |
352 | 348 | ||
353 | - </div> | 349 | + </div> |
354 | 350 | ||
355 | - <div style=" float: left; width: 250px;"> | ||
356 | - <label style="font-weight: bold;" class="infraLabel"> Complemento:</label> <br/> | ||
357 | - <input type="text" class="infraText" name="complementoEssencial" id="complementoEssencial" style="width: 220px;" maxlength="30" /> | ||
358 | - </div> | 351 | + <div style="float: left; height: 42px;"> |
352 | + <label class="infraLabelObrigatorio">Complemento do Tipo de Documento:</label> | ||
353 | + <span id="spnPublico"> | ||
354 | + <label id="lblPublico" class="infraLabel"> | ||
355 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaComplementoTipo()"/> | ||
356 | + </label> | ||
357 | + </span> | ||
358 | + <br/> | ||
359 | + <input type="text" class="infraText" name="complementoEssencial" id="complementoEssencial" style="width: 240px;" maxlength="40" /> | ||
360 | + </div> | ||
359 | 361 | ||
360 | <div style="clear: both;"> </div> | 362 | <div style="clear: both;"> </div> |
361 | 363 | ||
362 | - <div style=" float: left; width: 15%;"> | ||
363 | - | ||
364 | - <label style="font-weight: bold;" class="infraLabel"> Nível de Acesso:</label> <br/> | 364 | + <div style="float: left;"> |
365 | + <label class="infraLabelObrigatorio">Nível de Acesso:</label> <br/> | ||
365 | 366 | ||
366 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> | 367 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> |
367 | - <select class="infraSelect" name="nivelAcesso2" id="nivelAcesso2" onchange="selectNivelAcesso('nivelAcesso2', 'hipoteseLegal2')" width="140" style="width:140px;"> | ||
368 | - <option value=""></option> | ||
369 | - <option value="0">Público</option> | ||
370 | - <option value="1">Restrito</option> | ||
371 | - </select> | 368 | + <select class="infraSelect" id="nivelAcesso2" name="nivelAcesso2" onchange="selectNivelAcesso('nivelAcesso2', 'hipoteseLegal2')" style="width: 120px; margin-right: 10px;"> |
369 | + <?=$strItensSelNivelAcesso?> | ||
370 | + </select> | ||
372 | <? } else {?> | 371 | <? } else {?> |
373 | - <label class="infraLabelRadio"> | 372 | + <label class="infraLabelRadio"> |
374 | <?= $strNomeNivelAcessoPadrao ?> | 373 | <?= $strNomeNivelAcessoPadrao ?> |
375 | - </label> | ||
376 | - <input type="hidden" value="<?= $nivelAcessoPadrao ?>" id="nivelAcesso2" name="nivelAcesso2" /> | 374 | + </label> |
375 | + <input type="hidden" value="<?= $nivelAcessoPadrao ?>" id="nivelAcesso2" name="nivelAcesso2" /> | ||
377 | <?} ?> | 376 | <?} ?> |
378 | 377 | ||
379 | 378 | ||
380 | </div> | 379 | </div> |
381 | 380 | ||
382 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == ProtocoloRN::$NA_RESTRITO ) { ?> | 381 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == ProtocoloRN::$NA_RESTRITO ) { ?> |
383 | - <div id="divhipoteseLegal2" style=" float: left; width: 38%; display:block;"> | 382 | + <div id="divhipoteseLegal2" style="float: left; width: 70%; display:block;"> |
384 | <? } else { ?> | 383 | <? } else { ?> |
385 | - <div id="divhipoteseLegal2" style=" float: left; width: 38%; display:none;"> | 384 | + <div id="divhipoteseLegal2" style="float: left; width: 70%; display:none;"> |
386 | <? } ?> | 385 | <? } ?> |
387 | 386 | ||
388 | <? if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S') { ?> | 387 | <? if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S') { ?> |
389 | 388 | ||
390 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 389 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
391 | 390 | ||
392 | - <select class="infraSelect" width="285" id="hipoteseLegal2" name="hipoteseLegal2" style="width:285px; float: left; margin-right: 5px;"> | 391 | + <select class="infraSelect" id="hipoteseLegal2" name="hipoteseLegal2" style="width: 95%; float: left; margin-right: 5px;"> |
393 | <option value=""></option> | 392 | <option value=""></option> |
394 | <? | 393 | <? |
395 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { | 394 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { |
@@ -404,7 +403,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -404,7 +403,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
404 | 403 | ||
405 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ){ ?> | 404 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ){ ?> |
406 | 405 | ||
407 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 406 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
408 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> | 407 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> |
409 | <input type="hidden" name="hipoteseLegal2" id="hipoteseLegal2" value="<?= $idHipoteseLegalPadrao ?>" /> | 408 | <input type="hidden" name="hipoteseLegal2" id="hipoteseLegal2" value="<?= $idHipoteseLegalPadrao ?>" /> |
410 | 409 | ||
@@ -418,10 +417,10 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -418,10 +417,10 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
418 | 417 | ||
419 | <div style="clear: both;"> </div> | 418 | <div style="clear: both;"> </div> |
420 | 419 | ||
421 | - <div style=" float: left; margin-right: 20px;"> | ||
422 | - <label style="font-weight: bold;" class="infraLabel">Formato:</label> | 420 | + <div style="float: left; margin-right: 20px;"> |
421 | + <label class="infraLabelObrigatorio">Formato:</label> | ||
423 | <span id="spnPublico"> | 422 | <span id="spnPublico"> |
424 | - <label id="lblPublico" class="infraLabelRadio"> | 423 | + <label id="lblPublico" class="infraLabel"> |
425 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> | 424 | <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> |
426 | </label> | 425 | </label> |
427 | </span> | 426 | </span> |
@@ -431,11 +430,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -431,11 +430,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
431 | <label for="rdDigitalizado2_2" class="infraLabelRadio">Digitalizado</label> | 430 | <label for="rdDigitalizado2_2" class="infraLabelRadio">Digitalizado</label> |
432 | </div> | 431 | </div> |
433 | 432 | ||
434 | - <div id="camposDigitalizadoEssencial" style=" float: left; width: 50%; display: none;"> | 433 | + <div id="camposDigitalizadoEssencial" style="float: left; width: 55%; display: none;"> |
435 | 434 | ||
436 | <div style="float: left; width: 100%;"> | 435 | <div style="float: left; width: 100%;"> |
437 | 436 | ||
438 | - <label style="font-weight: bold;" class="infraLabel"> Conferência com o documento digitalizado:</label> <br/> | 437 | + <label class="infraLabelObrigatorio">Conferência com o documento digitalizado:</label> <br/> |
439 | 438 | ||
440 | <select class="infraSelect" id="TipoConferenciaEssencial" name="TipoConferenciaEssencial" width="285" | 439 | <select class="infraSelect" id="TipoConferenciaEssencial" name="TipoConferenciaEssencial" width="285" |
441 | style="width: 285px; float:left; margin-right: 5px;"> | 440 | style="width: 285px; float:left; margin-right: 5px;"> |
@@ -453,7 +452,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -453,7 +452,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
453 | 452 | ||
454 | </div> | 453 | </div> |
455 | 454 | ||
456 | - <div id="camposDigitalizadoEssencialBotao" style=" float: left; width: 50%;"> | 455 | + <div id="camposDigitalizadoEssencialBotao" style="float: left; width: 15%;"> |
457 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('2')"> | 456 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('2')"> |
458 | </div> | 457 | </div> |
459 | 458 | ||
@@ -508,18 +507,23 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -508,18 +507,23 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
508 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ ?> | 507 | if( is_array( $arrRelTipoProcessoSeriePeticionamentoDTO ) && count( $arrRelTipoProcessoSeriePeticionamentoDTO ) > 0 ){ ?> |
509 | 508 | ||
510 | <br/> | 509 | <br/> |
511 | - <label class="infraLabel" for="fileArquivoComplementar"> Documentos Complementares (<? | 510 | + <label class="infraLabel" for="fileArquivoComplementar">Documentos Complementares (<? |
512 | echo $strTamanhoMaximoComplementar; | 511 | echo $strTamanhoMaximoComplementar; |
513 | echo "<input type=hidden name=hdnTamArquivoComplementar id=hdnTamArquivoComplementar value='" . $strTamanhoMaximoComplementar . "'>"; | 512 | echo "<input type=hidden name=hdnTamArquivoComplementar id=hdnTamArquivoComplementar value='" . $strTamanhoMaximoComplementar . "'>"; |
514 | ?>):</label><br/> | 513 | ?>):</label><br/> |
515 | 514 | ||
516 | <input style="margin-top:0.3%" type="file" id="fileArquivoComplementar" name="fileArquivoComplementar" size="50" /> <br/><br/> | 515 | <input style="margin-top:0.3%" type="file" id="fileArquivoComplementar" name="fileArquivoComplementar" size="50" /> <br/><br/> |
517 | 516 | ||
518 | - <div style=" float: left; width: 15%;"> | ||
519 | - | ||
520 | - <label style="font-weight: bold;" class="infraLabel"> Tipo: </label> <br/> | ||
521 | - | ||
522 | - <select class="infraSelect" width="140" style="width:140px;" name="tipoDocumentoComplementar" id="tipoDocumentoComplementar" > | 517 | + <div style="float: left; height: 42px;"> |
518 | + <label class="infraLabelObrigatorio">Tipo de Documento:</label> | ||
519 | + <span id="spnPublico"> | ||
520 | + <label id="lblPublico" class="infraLabel"> | ||
521 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaTipoDocumentoEssenciaisComplementares()"/> | ||
522 | + </label> | ||
523 | + </span> | ||
524 | + <br/> | ||
525 | + | ||
526 | + <select class="infraSelect" style="width: 200px; margin-right: 10px;" name="tipoDocumentoComplementar" id="tipoDocumentoComplementar" > | ||
523 | <option value=""></option> | 527 | <option value=""></option> |
524 | <? | 528 | <? |
525 | 529 | ||
@@ -540,45 +544,48 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -540,45 +544,48 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
540 | 544 | ||
541 | </select> | 545 | </select> |
542 | 546 | ||
543 | - </div> | 547 | + </div> |
544 | 548 | ||
545 | - <div style=" float: left; width: 250px;"> | ||
546 | - <label style="font-weight: bold;" class="infraLabel"> Complemento:</label> <br/> | ||
547 | - <input type="text" class="infraText" name="complementoComplementar" id="complementoComplementar" style="width: 220px;" maxlength="30" /> | ||
548 | - </div> | 549 | + <div style="float: left; height: 42px;"> |
550 | + <label class="infraLabelObrigatorio">Complemento do Tipo de Documento:</label> | ||
551 | + <span id="spnPublico"> | ||
552 | + <label id="lblPublico" class="infraLabel"> | ||
553 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaComplementoTipo()"/> | ||
554 | + </label> | ||
555 | + </span> | ||
556 | + <br/> | ||
557 | + <input type="text" class="infraText" name="complementoComplementar" id="complementoComplementar" style="width: 240px;" maxlength="40" /> | ||
558 | + </div> | ||
549 | 559 | ||
550 | <div style="clear: both;"> </div> | 560 | <div style="clear: both;"> </div> |
551 | 561 | ||
552 | - <div style=" float: left; width: 15%;"> | ||
553 | - | ||
554 | - <label style="font-weight: bold;" class="infraLabel"> Nível de Acesso:</label> <br/> | 562 | + <div style="float: left;"> |
563 | + <label class="infraLabelObrigatorio">Nível de Acesso:</label> <br/> | ||
555 | 564 | ||
556 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> | 565 | <? if( $isUsuarioExternoPodeIndicarNivelAcesso == 'S') { ?> |
557 | - <select class="infraSelect" name="nivelAcesso3" id="nivelAcesso3" onchange="selectNivelAcesso('nivelAcesso3', 'hipoteseLegal3')" width="140" style="width:140px;" > | ||
558 | - <option value=""></option> | ||
559 | - <option value="0">Público</option> | ||
560 | - <option value="1">Restrito</option> | ||
561 | - </select> | 566 | + <select class="infraSelect" id="nivelAcesso3" name="nivelAcesso3" onchange="selectNivelAcesso('nivelAcesso3', 'hipoteseLegal3')" style="width: 120px; margin-right: 10px;"> |
567 | + <?=$strItensSelNivelAcesso?> | ||
568 | + </select> | ||
562 | <? } else {?> | 569 | <? } else {?> |
563 | - <label class="infraLabelRadio"> | 570 | + <label class="infraLabelRadio"> |
564 | <?= $strNomeNivelAcessoPadrao ?> | 571 | <?= $strNomeNivelAcessoPadrao ?> |
565 | </label> | 572 | </label> |
566 | - <input type="hidden" value="<?= $nivelAcessoPadrao ?>" id="nivelAcesso3" name="nivelAcesso3" /> | 573 | + <input type="hidden" value="<?= $nivelAcessoPadrao ?>" id="nivelAcesso3" name="nivelAcesso3" /> |
567 | <?} ?> | 574 | <?} ?> |
568 | 575 | ||
569 | </div> | 576 | </div> |
570 | 577 | ||
571 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == ProtocoloRN::$NA_RESTRITO ) { ?> | 578 | <? if( $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == ProtocoloRN::$NA_RESTRITO ) { ?> |
572 | - <div id="divhipoteseLegal3" style=" float: left; width: 38%; display:block;"> | 579 | + <div id="divhipoteseLegal3" style="float: left; width: 70%; display:block;"> |
573 | <? } else { ?> | 580 | <? } else { ?> |
574 | - <div id="divhipoteseLegal3" style=" float: left; width: 38%; display:none;"> | 581 | + <div id="divhipoteseLegal3" style="float: left; width: 70%; display:none;"> |
575 | <? } ?> | 582 | <? } ?> |
576 | 583 | ||
577 | <? if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S') { ?> | 584 | <? if($isConfigHipoteseLegal && $isNivelAcessoPadrao != 'S') { ?> |
578 | 585 | ||
579 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 586 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
580 | 587 | ||
581 | - <select class="infraSelect" width="285" id="hipoteseLegal3" name="hipoteseLegal3" style="width:285px; float: left; margin-right: 5px;"> | 588 | + <select class="infraSelect" id="hipoteseLegal3" name="hipoteseLegal3" style="width: 95%; float: left; margin-right: 5px;"> |
582 | <option value=""></option> | 589 | <option value=""></option> |
583 | <? | 590 | <? |
584 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { | 591 | if( $isConfigHipoteseLegal && is_array( $arrHipoteseLegal ) && count( $arrHipoteseLegal ) > 0 ) { |
@@ -593,7 +600,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -593,7 +600,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
593 | 600 | ||
594 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ){ ?> | 601 | <? } else if($isConfigHipoteseLegal && $isNivelAcessoPadrao == 'S' && $nivelAcessoPadrao == "1" ){ ?> |
595 | 602 | ||
596 | - <label style="font-weight: bold;" class="infraLabel"> Hipótese Legal: </label> <br/> | 603 | + <label class="infraLabelObrigatorio">Hipótese Legal:</label> <br/> |
597 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> | 604 | <label class="infraLabel"> <?= $strHipoteseLegalPadrao ?> </label> |
598 | <input type="hidden" name="hipoteseLegal3" id="hipoteseLegal3" value="<?= $idHipoteseLegalPadrao ?>" /> | 605 | <input type="hidden" name="hipoteseLegal3" id="hipoteseLegal3" value="<?= $idHipoteseLegalPadrao ?>" /> |
599 | 606 | ||
@@ -603,12 +610,12 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -603,12 +610,12 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
603 | 610 | ||
604 | <div style="clear: both;"> </div> | 611 | <div style="clear: both;"> </div> |
605 | 612 | ||
606 | - <div style=" float: left; margin-right: 20px;"> | ||
607 | - <label style="font-weight: bold;" class="infraLabel">Formato:</label> | 613 | + <div style="float: left; margin-right: 20px;"> |
614 | + <label class="infraLabelObrigatorio">Formato:</label> | ||
608 | <span id="spnPublico"> | 615 | <span id="spnPublico"> |
609 | - <label id="lblPublico" class="infraLabelRadio"> | ||
610 | - <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> | ||
611 | - </label> | 616 | + <label id="lblPublico" class="infraLabel"> |
617 | + <img src="/infra_css/imagens/ajuda.gif" title="Ajuda" alt="Ajuda" class="infraImg" onclick="exibirAjudaFormatoDocumento()"/> | ||
618 | + </label> | ||
612 | </span> | 619 | </span> |
613 | <input type="radio" name="formatoDocumentoComplementar" value="nato" id="rdNato3_1" onclick="selecionarFormatoNatoDigitalComplementar()" /> | 620 | <input type="radio" name="formatoDocumentoComplementar" value="nato" id="rdNato3_1" onclick="selecionarFormatoNatoDigitalComplementar()" /> |
614 | <label for="rdNato3_1" class="infraLabelRadio">Nato-digital</label> | 621 | <label for="rdNato3_1" class="infraLabelRadio">Nato-digital</label> |
@@ -616,11 +623,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -616,11 +623,11 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
616 | <label for="rdDigitalizado3_2" class="infraLabelRadio">Digitalizado</label> | 623 | <label for="rdDigitalizado3_2" class="infraLabelRadio">Digitalizado</label> |
617 | </div> | 624 | </div> |
618 | 625 | ||
619 | - <div id="camposDigitalizadoComplementar" style=" float: left; width: 50%; display: none;"> | 626 | + <div id="camposDigitalizadoComplementar" style="float: left; width: 55%; display: none;"> |
620 | 627 | ||
621 | <div style="float: left; width: 100%;"> | 628 | <div style="float: left; width: 100%;"> |
622 | 629 | ||
623 | - <label style="font-weight: bold;" class="infraLabel"> Conferência com o documento digitalizado:</label> <br/> | 630 | + <label class="infraLabelObrigatorio">Conferência com o documento digitalizado:</label> <br/> |
624 | 631 | ||
625 | <select class="infraSelect" id="TipoConferenciaComplementar" name="TipoConferenciaComplementar" width="285" | 632 | <select class="infraSelect" id="TipoConferenciaComplementar" name="TipoConferenciaComplementar" width="285" |
626 | style="width: 285px; float:left; margin-right: 5px;"> | 633 | style="width: 285px; float:left; margin-right: 5px;"> |
@@ -638,7 +645,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -638,7 +645,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
638 | 645 | ||
639 | </div> | 646 | </div> |
640 | 647 | ||
641 | - <div id="camposDigitalizadoComplementarBotao" style=" float: left; width: 50%;"> | 648 | + <div id="camposDigitalizadoComplementarBotao" style="float: left; width: 15%;"> |
642 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('3')"> | 649 | <input type="button" class="infraButton" value="Adicionar" onclick="validarUploadArquivo('3')"> |
643 | </div> | 650 | </div> |
644 | 651 |
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro_inicializacao.php
@@ -230,6 +230,9 @@ $arrTipo = array(); | @@ -230,6 +230,9 @@ $arrTipo = array(); | ||
230 | //preenche a combo "Nivel de acesso" | 230 | //preenche a combo "Nivel de acesso" |
231 | $arrNivelAcesso = array(); | 231 | $arrNivelAcesso = array(); |
232 | 232 | ||
233 | +//monta combo "Nivel de acesso" | ||
234 | +$strItensSelNivelAcesso = TipoProcessoPeticionamentoINT::montarSelectNivelAcesso(null, null, null, $objTipoProcDTO->getNumIdProcedimento()); | ||
235 | + | ||
233 | //ler valor do parametro SEI_HABILITAR_HIPOTESE_LEGAL | 236 | //ler valor do parametro SEI_HABILITAR_HIPOTESE_LEGAL |
234 | //aplicar RA 5: Os campos “Hipótese Legal” somente serão apresentados se na funcionalidade Infra > Parâmetros | 237 | //aplicar RA 5: Os campos “Hipótese Legal” somente serão apresentados se na funcionalidade Infra > Parâmetros |
235 | //a opção SEI_HABILITAR_HIPOTESE_LEGAL estiver configurado como 1 ou 2 sendo assim obrigatório. | 238 | //a opção SEI_HABILITAR_HIPOTESE_LEGAL estiver configurado como 1 ou 2 sendo assim obrigatório. |
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro_js.php
@@ -98,6 +98,8 @@ var objTabelaDocEssencial = null; | @@ -98,6 +98,8 @@ var objTabelaDocEssencial = null; | ||
98 | var objComplementarUpload = null; | 98 | var objComplementarUpload = null; |
99 | var objTabelaDocComplementar = null; | 99 | var objTabelaDocComplementar = null; |
100 | 100 | ||
101 | +var objTabelaInteressado = null; | ||
102 | + | ||
101 | var objAutoCompletarInteressado = null; | 103 | var objAutoCompletarInteressado = null; |
102 | var objLupaInteressados = null; | 104 | var objLupaInteressados = null; |
103 | 105 | ||
@@ -135,6 +137,10 @@ function validarUploadArquivo(numero){ | @@ -135,6 +137,10 @@ function validarUploadArquivo(numero){ | ||
135 | hiddenCampoPrincipal.value != '' ){ | 137 | hiddenCampoPrincipal.value != '' ){ |
136 | 138 | ||
137 | alert('Somente pode ter um Documento Principal.'); | 139 | alert('Somente pode ter um Documento Principal.'); |
140 | + | ||
141 | + document.getElementById("fileArquivoPrincipal").value = ''; | ||
142 | + limparCampoUpload('1'); | ||
143 | + | ||
138 | isValido = false; | 144 | isValido = false; |
139 | return; | 145 | return; |
140 | 146 | ||
@@ -189,7 +195,7 @@ function validarUploadArquivo(numero){ | @@ -189,7 +195,7 @@ function validarUploadArquivo(numero){ | ||
189 | 195 | ||
190 | //validar campo/combo Tipo (apenas para Essencial ou Complementar) | 196 | //validar campo/combo Tipo (apenas para Essencial ou Complementar) |
191 | else if( ( numero == '2' || numero == '3' ) && ( cbTipo == undefined || cbTipo == null || cbTipo.value == '') ){ | 197 | else if( ( numero == '2' || numero == '3' ) && ( cbTipo == undefined || cbTipo == null || cbTipo.value == '') ){ |
192 | - alert('Informe o Tipo.'); | 198 | + alert('Informe o Tipo de Documento.'); |
193 | isValido = false; | 199 | isValido = false; |
194 | cbTipo.focus(); | 200 | cbTipo.focus(); |
195 | return; | 201 | return; |
@@ -201,7 +207,7 @@ function validarUploadArquivo(numero){ | @@ -201,7 +207,7 @@ function validarUploadArquivo(numero){ | ||
201 | 207 | ||
202 | //validar campo Complemento | 208 | //validar campo Complemento |
203 | if( strTxtComplemento == ""){ | 209 | if( strTxtComplemento == ""){ |
204 | - alert('Informe o Complemento.'); | 210 | + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); |
205 | isValido = false; | 211 | isValido = false; |
206 | document.getElementById('complemento' + complemento).focus(); | 212 | document.getElementById('complemento' + complemento).focus(); |
207 | return; | 213 | return; |
@@ -211,7 +217,7 @@ function validarUploadArquivo(numero){ | @@ -211,7 +217,7 @@ function validarUploadArquivo(numero){ | ||
211 | 217 | ||
212 | //validar campo Complemento | 218 | //validar campo Complemento |
213 | if( strTxtComplemento == ""){ | 219 | if( strTxtComplemento == ""){ |
214 | - alert('Informe o Complemento.'); | 220 | + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); |
215 | isValido = false; | 221 | isValido = false; |
216 | document.getElementById('complemento' + complemento).focus(); | 222 | document.getElementById('complemento' + complemento).focus(); |
217 | return; | 223 | return; |
@@ -313,7 +319,7 @@ function validarUploadArquivoEssencial(){ | @@ -313,7 +319,7 @@ function validarUploadArquivoEssencial(){ | ||
313 | 319 | ||
314 | //validar campo/combo Tipo (apenas para Essencial ou Complementar) | 320 | //validar campo/combo Tipo (apenas para Essencial ou Complementar) |
315 | else if( cbTipo == undefined || cbTipo == null || cbTipo.value == '' ){ | 321 | else if( cbTipo == undefined || cbTipo == null || cbTipo.value == '' ){ |
316 | - alert('Informe o Tipo.'); | 322 | + alert('Informe o Tipo de Documento.'); |
317 | isValido = false; | 323 | isValido = false; |
318 | cbTipo.focus(); | 324 | cbTipo.focus(); |
319 | return; | 325 | return; |
@@ -323,7 +329,7 @@ function validarUploadArquivoEssencial(){ | @@ -323,7 +329,7 @@ function validarUploadArquivoEssencial(){ | ||
323 | 329 | ||
324 | //validar campo Complemento | 330 | //validar campo Complemento |
325 | if( strTxtComplemento == ""){ | 331 | if( strTxtComplemento == ""){ |
326 | - alert('Informe o Complemento.'); | 332 | + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); |
327 | isValido = false; | 333 | isValido = false; |
328 | document.getElementById('complemento' + complemento).focus(); | 334 | document.getElementById('complemento' + complemento).focus(); |
329 | return; | 335 | return; |
@@ -331,7 +337,7 @@ function validarUploadArquivoEssencial(){ | @@ -331,7 +337,7 @@ function validarUploadArquivoEssencial(){ | ||
331 | 337 | ||
332 | //validar campo Complemento | 338 | //validar campo Complemento |
333 | if( strTxtComplemento == ""){ | 339 | if( strTxtComplemento == ""){ |
334 | - alert('Informe o Complemento.'); | 340 | + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); |
335 | isValido = false; | 341 | isValido = false; |
336 | document.getElementById('complemento' + complemento).focus(); | 342 | document.getElementById('complemento' + complemento).focus(); |
337 | return; | 343 | return; |
@@ -491,7 +497,6 @@ function validarQtdArquivos(){ | @@ -491,7 +497,6 @@ function validarQtdArquivos(){ | ||
491 | function validarQtdArquivosPrincipal(){ | 497 | function validarQtdArquivosPrincipal(){ |
492 | 498 | ||
493 | try { | 499 | try { |
494 | - //alert('teste principal'); | ||
495 | objPrincipalUpload.executar(); | 500 | objPrincipalUpload.executar(); |
496 | } catch(err) { | 501 | } catch(err) { |
497 | alert(" Erro: " + err); | 502 | alert(" Erro: " + err); |
@@ -501,50 +506,52 @@ function validarQtdArquivosPrincipal(){ | @@ -501,50 +506,52 @@ function validarQtdArquivosPrincipal(){ | ||
501 | 506 | ||
502 | function abrirJanelaDocumento( ){ | 507 | function abrirJanelaDocumento( ){ |
503 | 508 | ||
504 | - var windowFeatures = "location=1,status=1,resizable=1,scrollbars=1"; | 509 | + <?php |
510 | + $linkEditor = PaginaSEIExterna::getInstance()->formatarXHTML( | ||
511 | + SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=editor_peticionamento_montar&id_serie=' . $objTipoProcDTO->getNumIdSerie() )); | ||
512 | + ?> | ||
513 | + | ||
514 | + var janelaEditor = infraAbrirJanela('','janelaEditor_<?=SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno()?>',infraClientWidth(),infraClientHeight(),'location=0,status=0,resizable=1,scrollbars=1',false); | ||
505 | 515 | ||
506 | - infraAbrirJanela('<?=PaginaSEIExterna::getInstance()->formatarXHTML( | ||
507 | - SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=editor_peticionamento_montar&id_serie=' . $objTipoProcDTO->getNumIdSerie() ))?>', | ||
508 | - 'cadastrarInteressado', | ||
509 | - 780, | ||
510 | - 600, | ||
511 | - windowFeatures, //options | ||
512 | - true); //modal | 516 | + if (janelaEditor.location == 'about:blank'){ |
517 | + janelaEditor.location.href = '<?=$linkEditor?>'; | ||
518 | + } | ||
519 | + | ||
520 | + janelaEditor.focus(); | ||
521 | + | ||
513 | } | 522 | } |
514 | 523 | ||
515 | function receberInteressado( arrDadosInteressado, InteressadoCustomizado ){ | 524 | function receberInteressado( arrDadosInteressado, InteressadoCustomizado ){ |
525 | + | ||
526 | + objTabelaInteressado.adicionar([ arrDadosInteressado[0], | ||
527 | + arrDadosInteressado[1] , | ||
528 | + arrDadosInteressado[2] , | ||
529 | + arrDadosInteressado[3], | ||
530 | + '' ]); | ||
516 | 531 | ||
517 | - // Find a <table> element with id="myTable": | ||
518 | - var table = document.getElementById("tbInteressado"); | 532 | + if( InteressadoCustomizado != "") { |
519 | 533 | ||
520 | - // Create an empty <tr> element and add it to the 1st position of the table: | ||
521 | - var row = table.insertRow(-1); | ||
522 | - row.className = 'infraTrClara'; | ||
523 | - // Insert new cells (<td> elements) at the 1st and 2nd position of the "new" <tr> element: | ||
524 | - | ||
525 | - //CPF/CNPJ | ||
526 | - var cell1 = row.insertCell(0); | ||
527 | - cell1.className = 'infraTdSetaOrdenacao'; | ||
528 | - | ||
529 | - //Nome/Razão social | ||
530 | - var cell2 = row.insertCell(1); | ||
531 | - cell2.className = 'infraTdSetaOrdenacao'; | ||
532 | - | ||
533 | - //Ações | ||
534 | - var cell3 = row.insertCell(2); | ||
535 | - cell3.className = 'infraTdSetaOrdenacao'; | 534 | + objTabelaInteressado.adicionarAcoes( |
535 | + arrDadosInteressado[0] , | ||
536 | + "<a href='javascript:;' onclick=\"abrirCadastroInteressadoAlterar('" + arrDadosInteressado[0] +"', '" + arrDadosInteressado[1] +"', '"+ arrDadosInteressado[2] +"')\"><img title='Alterar interessado' alt='Alterar interessado' src='/infra_css/imagens/alterar.gif' class='infraImg' /></a>", | ||
537 | + false, | ||
538 | + true); | ||
539 | + | ||
540 | + } else { | ||
536 | 541 | ||
537 | - //infraTrClara | ||
538 | - //infraTdSetaOrdenacao | ||
539 | - cell1.innerHTML = "NEW CELL1"; | ||
540 | - cell2.innerHTML = "NEW CELL2"; | 542 | + objTabelaInteressado.adicionarAcoes( |
543 | + arrDadosInteressado[0] , | ||
544 | + "", | ||
545 | + false, | ||
546 | + true); | ||
547 | + } | ||
548 | + | ||
549 | + document.getElementById("txtCPF").value=''; | ||
550 | + document.getElementById("txtCNPJ").value=''; | ||
551 | + document.getElementById("hdnCustomizado").value=''; | ||
552 | + document.getElementById("txtNomeRazaoSocial").value=''; | ||
553 | + document.getElementById("hdnIdInteressadoCadastrado").value=''; | ||
541 | 554 | ||
542 | - if( InteressadoCustomizado != null && InteressadoCustomizado == true ){ | ||
543 | - cell3.innerHTML = " customizado "; | ||
544 | - } else { | ||
545 | - cell3.innerHTML = " selecionado "; | ||
546 | - } | ||
547 | - | ||
548 | infraEfeitoTabelas(); | 555 | infraEfeitoTabelas(); |
549 | 556 | ||
550 | } | 557 | } |
@@ -733,7 +740,8 @@ function validarFormulario(){ | @@ -733,7 +740,8 @@ function validarFormulario(){ | ||
733 | var textoEspecificacao = document.getElementById("txtEspecificacao").value; | 740 | var textoEspecificacao = document.getElementById("txtEspecificacao").value; |
734 | var cbUF = document.getElementById("selUFAberturaProcesso"); | 741 | var cbUF = document.getElementById("selUFAberturaProcesso"); |
735 | var ufSelecionada = ''; | 742 | var ufSelecionada = ''; |
736 | - | 743 | + var DocPrincipalValidado = false; |
744 | + | ||
737 | var selInteressados = document.getElementById("selInteressados"); | 745 | var selInteressados = document.getElementById("selInteressados"); |
738 | 746 | ||
739 | if( cbUF != undefined && cbUF != null ){ | 747 | if( cbUF != undefined && cbUF != null ){ |
@@ -780,7 +788,7 @@ function validarFormulario(){ | @@ -780,7 +788,7 @@ function validarFormulario(){ | ||
780 | return false; | 788 | return false; |
781 | 789 | ||
782 | } else if( hdnDocPrincipal == "" && complementoPrincipal.value == ''){ | 790 | } else if( hdnDocPrincipal == "" && complementoPrincipal.value == ''){ |
783 | - alert('Informe o Complemento.'); | 791 | + alert('Informe o Complemento do Tipo de Documento. Para mais informações, clique no ícone de Ajuda ao lado do nome do campo.'); |
784 | complementoPrincipal.focus(); | 792 | complementoPrincipal.focus(); |
785 | return false; | 793 | return false; |
786 | 794 | ||
@@ -821,12 +829,13 @@ function validarFormulario(){ | @@ -821,12 +829,13 @@ function validarFormulario(){ | ||
821 | tbDocumentoPrincipal != undefined ){ | 829 | tbDocumentoPrincipal != undefined ){ |
822 | 830 | ||
823 | var strHashPrincipal = document.getElementById('hdnDocPrincipal').value; | 831 | var strHashPrincipal = document.getElementById('hdnDocPrincipal').value; |
824 | - //alert( strHashPrincipal ); | ||
825 | - | 832 | + |
826 | if( strHashPrincipal == ''){ | 833 | if( strHashPrincipal == ''){ |
827 | alert('Informe o Documento Principal.'); | 834 | alert('Informe o Documento Principal.'); |
828 | document.getElementById('fileArquivoPrincipal').focus(); | 835 | document.getElementById('fileArquivoPrincipal').focus(); |
829 | return false; | 836 | return false; |
837 | + } else { | ||
838 | + DocPrincipalValidado = true; | ||
830 | } | 839 | } |
831 | } | 840 | } |
832 | 841 | ||
@@ -835,24 +844,28 @@ function validarFormulario(){ | @@ -835,24 +844,28 @@ function validarFormulario(){ | ||
835 | //caso nao tenha conteudo obrigar usuario a informar | 844 | //caso nao tenha conteudo obrigar usuario a informar |
836 | else { | 845 | else { |
837 | 846 | ||
838 | - /* | ||
839 | var conteudoDocumento = ""; | 847 | var conteudoDocumento = ""; |
840 | 848 | ||
841 | $( document ).ready(function() { | 849 | $( document ).ready(function() { |
842 | 850 | ||
843 | - var formData = ""; | 851 | + //var formData = ""; |
844 | 852 | ||
845 | $.ajax({ | 853 | $.ajax({ |
846 | - url : "", | 854 | + url : "<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=validar_documento_principal'))?>", |
847 | type: "POST", | 855 | type: "POST", |
848 | - data : formData, | 856 | + //data : formData, |
857 | + async: false, | ||
849 | success: function(data, textStatus, jqXHR) | 858 | success: function(data, textStatus, jqXHR) |
850 | { | 859 | { |
851 | - | ||
852 | conteudoDocumento = data; | 860 | conteudoDocumento = data; |
853 | - | 861 | + if (data==''){ |
862 | + alert("O documento principal deste tipo de peticionamento possui modelo previamente definido e deve ser editado diretamente no sistema. Para continuar o peticionamento, antes é necessário acessar o Editor do SEI no link clique aqui para editar conteúdo em frente ao campo Documento Principal, preencher apenas os campos pertinentes com os dados da demanda e clicar no botão Salvar no canto superior esquerdo do Editor."); | ||
863 | + return; | ||
864 | + }else{ | ||
865 | + DocPrincipalValidado=true; | ||
866 | + } | ||
867 | + | ||
854 | }, | 868 | }, |
855 | - | ||
856 | error: function (jqXHR, textStatus, errorThrown) | 869 | error: function (jqXHR, textStatus, errorThrown) |
857 | { | 870 | { |
858 | alert('Erro ao validar documento principal.'); | 871 | alert('Erro ao validar documento principal.'); |
@@ -861,78 +874,84 @@ function validarFormulario(){ | @@ -861,78 +874,84 @@ function validarFormulario(){ | ||
861 | } | 874 | } |
862 | }); | 875 | }); |
863 | }); | 876 | }); |
864 | - | ||
865 | - alert( conteudoDocumento ); | ||
866 | - */ | ||
867 | 877 | ||
868 | } | 878 | } |
879 | + | ||
880 | + if (DocPrincipalValidado==true){ | ||
881 | + | ||
882 | + //valida se todos os tipos essenciais contem na lista | ||
883 | + var comboTipoEssencial = document.getElementById('tipoDocumentoEssencial'); | ||
884 | + | ||
885 | + if(comboTipoEssencial!=null){ | ||
886 | + var retornoUploadEssencial = false; | ||
887 | + var validarTipoEssenc = true; | ||
888 | + var strHashEssencial = document.getElementById('hdnDocEssencial').value; | ||
889 | + | ||
890 | + //caractere de quebra de linha/registro | ||
891 | + var arrHashEssencial = strHashEssencial.split('¥'); | ||
892 | + var qtdX = arrHashEssencial.length; | ||
893 | + | ||
894 | + if( qtdX == 1 && arrHashEssencial[0] == "" ){ | ||
869 | 895 | ||
870 | - //valida se todos os tipos essenciais contem na lista | ||
871 | - | ||
872 | - var comboTipoEssencial = document.getElementById('tipoDocumentoEssencial'); | 896 | + arrHashEssencial = Array(); |
897 | + arrHashEssencial[0] = strHashEssencial; | ||
898 | + | ||
899 | + } | ||
900 | + | ||
901 | + var local = 9; | ||
902 | + var tiposIncluidos = Array(); | ||
873 | 903 | ||
874 | - if(comboTipoEssencial!=null){ | ||
875 | - var retornoUploadEssencial = false; | ||
876 | - var validarTipoEssenc = true; | ||
877 | - var strHashEssencial = document.getElementById('hdnDocEssencial').value; | ||
878 | - | ||
879 | - //caractere de quebra de linha/registro | ||
880 | - var arrHashEssencial = strHashEssencial.split('¥'); | ||
881 | - var qtdX = arrHashEssencial.length; | ||
882 | - | ||
883 | - if( qtdX == 1 && arrHashEssencial[0] == "" ){ | ||
884 | - | ||
885 | - arrHashEssencial = Array(); | ||
886 | - arrHashEssencial[0] = strHashEssencial; | 904 | + //so vai adicionar no array dos incluidos quando tem registros na grid |
905 | + if( strHashEssencial != "") { | ||
887 | 906 | ||
888 | - } | ||
889 | - | ||
890 | - var local = 9; | ||
891 | - var tiposIncluidos = Array(); | ||
892 | - | ||
893 | - //so vai adicionar no array dos incluidos quando tem registros na grid | ||
894 | - if( strHashEssencial != "") { | ||
895 | - | ||
896 | - for(var i = 0; i < qtdX ; i++ ){ | ||
897 | - | ||
898 | - //caractere de quebra de coluna/campo | ||
899 | - var arrLocal = arrHashEssencial[i].split('±'); | ||
900 | - var tipo = arrLocal[local]; | ||
901 | - | ||
902 | - if(tiposIncluidos.indexOf(tipo) <= -1){ | ||
903 | - tiposIncluidos.push(arrLocal[local]); | 907 | + for(var i = 0; i < qtdX ; i++ ){ |
908 | + | ||
909 | + //caractere de quebra de coluna/campo | ||
910 | + var arrLocal = arrHashEssencial[i].split('±'); | ||
911 | + var tipo = arrLocal[local]; | ||
912 | + | ||
913 | + if(tiposIncluidos.indexOf(tipo) <= -1){ | ||
914 | + tiposIncluidos.push(arrLocal[local]); | ||
915 | + } | ||
916 | + | ||
904 | } | 917 | } |
905 | - | 918 | + |
919 | + } else { | ||
920 | + //grid vazia e campos de upload de essencial nao preenchidos | ||
921 | + retornoUploadEssencial = validarUploadArquivoEssencial(); | ||
922 | + | ||
923 | + if( retornoUploadEssencial != true ){ | ||
924 | + return false; | ||
925 | + } | ||
926 | + } | ||
927 | + | ||
928 | + var tamnhoOptions = comboTipoEssencial.options.length-1; | ||
929 | + | ||
930 | + if(tiposIncluidos.length == 0 || tamnhoOptions != tiposIncluidos.length){ | ||
931 | + validarTipoEssenc = false; | ||
906 | } | 932 | } |
907 | - | ||
908 | - } else { | ||
909 | - //grid vazia e campos de upload de essencial nao preenchidos | ||
910 | - retornoUploadEssencial = validarUploadArquivoEssencial(); | 933 | + |
934 | + if(!validarTipoEssenc){ | ||
935 | + alert('Deve adicionar pelo menos um Documento Essencial para cada Tipo.'); | ||
936 | + document.getElementById('fileArquivoEssencial').focus(); | ||
937 | + return false; | ||
938 | + } | ||
939 | + } | ||
940 | + | ||
941 | + return true; | ||
942 | + | ||
943 | + }else{ | ||
944 | + | ||
945 | + return false; | ||
946 | + | ||
947 | + } | ||
911 | 948 | ||
912 | - if( retornoUploadEssencial != true ){ | ||
913 | - return false; | ||
914 | - } | ||
915 | - } | ||
916 | - | ||
917 | - var tamnhoOptions = comboTipoEssencial.options.length-1; | ||
918 | - | ||
919 | - if(tiposIncluidos.length == 0 || tamnhoOptions != tiposIncluidos.length){ | ||
920 | - validarTipoEssenc = false; | ||
921 | - } | ||
922 | - | ||
923 | - if(!validarTipoEssenc){ | ||
924 | - alert('Deve adicionar pelo menos um Documento Essencial para cada Tipo.'); | ||
925 | - document.getElementById('fileArquivoEssencial').focus(); | ||
926 | - return false; | ||
927 | - } | ||
928 | - } | ||
929 | 949 | ||
930 | - return true; | ||
931 | 950 | ||
932 | } | 951 | } |
933 | 952 | ||
934 | function abrirPeticionar(){ | 953 | function abrirPeticionar(){ |
935 | - | 954 | + |
936 | if( validarFormulario() ) { | 955 | if( validarFormulario() ) { |
937 | 956 | ||
938 | infraAbrirJanela('<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?id_tipo_procedimento=' . $_GET['id_tipo_procedimento'] .'&acao=peticionamento_usuario_externo_concluir&tipo_selecao=2'))?>', | 957 | infraAbrirJanela('<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?id_tipo_procedimento=' . $_GET['id_tipo_procedimento'] .'&acao=peticionamento_usuario_externo_concluir&tipo_selecao=2'))?>', |
@@ -944,6 +963,31 @@ function abrirPeticionar(){ | @@ -944,6 +963,31 @@ function abrirPeticionar(){ | ||
944 | } | 963 | } |
945 | } | 964 | } |
946 | 965 | ||
966 | +function abrirCadastroInteressadoAlterar( id, tipo, cpfcnpj){ | ||
967 | + | ||
968 | + //charmar janela para cadastrar um novo interessado | ||
969 | + $('#txtNomeRazaoSocial').val(''); | ||
970 | + $('#hdnCustomizado').val(''); | ||
971 | + $('#hdnIdEdicao').val( id ); | ||
972 | + | ||
973 | + <?php | ||
974 | + $strLinkEdicaoPF = SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?edicao=true&acao=peticionamento_interessado_cadastro&tipo_selecao=2&cpf=true&id_orgao_acesso_externo=0'); | ||
975 | + $strLinkEdicaoPJ = SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?edicao=true&acao=peticionamento_interessado_cadastro&tipo_selecao=2&cnpj=true&id_orgao_acesso_externo=0'); | ||
976 | + ?> | ||
977 | + | ||
978 | + if( tipo == 'Pessoa Física' ){ | ||
979 | + var str = '<?= $strLinkEdicaoPF ?>'; | ||
980 | + } | ||
981 | + | ||
982 | + else if( tipo == 'Pessoa Jurídica' ){ | ||
983 | + var str = '<?= $strLinkEdicaoPJ ?>'; | ||
984 | + } | ||
985 | + | ||
986 | + infraAbrirJanela( str, 'cadastrarInteressado', 900, 900, '', false); //modal | ||
987 | + return; | ||
988 | + | ||
989 | +} | ||
990 | + | ||
947 | function abrirCadastroInteressado(){ | 991 | function abrirCadastroInteressado(){ |
948 | 992 | ||
949 | //so abrir o CPF/CNPJ tiver sido informado e NAO pertencer a um contato cadastrado | 993 | //so abrir o CPF/CNPJ tiver sido informado e NAO pertencer a um contato cadastrado |
@@ -1018,8 +1062,11 @@ function abrirCadastroInteressado(){ | @@ -1018,8 +1062,11 @@ function abrirCadastroInteressado(){ | ||
1018 | //data - response from server | 1062 | //data - response from server |
1019 | 1063 | ||
1020 | if( data != null && data != undefined && data != ""){ | 1064 | if( data != null && data != undefined && data != ""){ |
1065 | + | ||
1021 | var obj = jQuery.parseJSON( data ); | 1066 | var obj = jQuery.parseJSON( data ); |
1067 | + $('#hdnIdInteressadoCadastrado').val(obj.id); | ||
1022 | $('#txtNomeRazaoSocial').val(obj.nome); | 1068 | $('#txtNomeRazaoSocial').val(obj.nome); |
1069 | + $('#hdnCustomizado').val(''); | ||
1023 | return; | 1070 | return; |
1024 | } | 1071 | } |
1025 | 1072 | ||
@@ -1027,6 +1074,7 @@ function abrirCadastroInteressado(){ | @@ -1027,6 +1074,7 @@ function abrirCadastroInteressado(){ | ||
1027 | 1074 | ||
1028 | //charmar janela para cadastrar um novo interessado | 1075 | //charmar janela para cadastrar um novo interessado |
1029 | $('#txtNomeRazaoSocial').val(''); | 1076 | $('#txtNomeRazaoSocial').val(''); |
1077 | + $('#hdnCustomizado').val(''); | ||
1030 | 1078 | ||
1031 | if( chkTipoPessoaFisica ){ | 1079 | if( chkTipoPessoaFisica ){ |
1032 | var str = '<?= SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=peticionamento_interessado_cadastro&tipo_selecao=2&cpf=true') ?>'; | 1080 | var str = '<?= SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?acao=peticionamento_interessado_cadastro&tipo_selecao=2&cpf=true') ?>'; |
@@ -1049,7 +1097,6 @@ function abrirCadastroInteressado(){ | @@ -1049,7 +1097,6 @@ function abrirCadastroInteressado(){ | ||
1049 | } | 1097 | } |
1050 | }); | 1098 | }); |
1051 | 1099 | ||
1052 | - //alert('Consultar CPF/CNPJ via AJAX 2'); | ||
1053 | return; | 1100 | return; |
1054 | 1101 | ||
1055 | } | 1102 | } |
@@ -1125,66 +1172,49 @@ function inicializar(){ | @@ -1125,66 +1172,49 @@ function inicializar(){ | ||
1125 | 1172 | ||
1126 | objAjaxContato.processarResultado = function(arr){ | 1173 | objAjaxContato.processarResultado = function(arr){ |
1127 | 1174 | ||
1128 | - //console.log( arr ); | ||
1129 | - //alert( arr ); | ||
1130 | - //inicio processo ajax | ||
1131 | - /* | ||
1132 | - document.getElementById('txtTelefone').value = ''; | ||
1133 | - document.getElementById('txtFax').value = ''; | ||
1134 | - document.getElementById('txtEmail').value = ''; | ||
1135 | - document.getElementById('txtSitioInternet').value = ''; | ||
1136 | - document.getElementById('txtEndereco').value = ''; | ||
1137 | - document.getElementById('txtBairro').value = ''; | ||
1138 | - document.getElementById('txtNomePais').value = ''; | ||
1139 | - document.getElementById('txtSiglaEstado').value = ''; | ||
1140 | - document.getElementById('txtNomeCidade').value = ''; | ||
1141 | - document.getElementById('txtCep').value = ''; | ||
1142 | - | ||
1143 | - if (arr!=null){ | ||
1144 | - if (arr['Telefone']!=undefined){ | ||
1145 | - document.getElementById('txtTelefone').value = arr['Telefone']; | ||
1146 | - } | ||
1147 | - if (arr['Fax']!=undefined){ | ||
1148 | - document.getElementById('txtFax').value = arr['Fax']; | ||
1149 | - } | ||
1150 | - if (arr['Email']!=undefined){ | ||
1151 | - document.getElementById('txtEmail').value = arr['Email']; | ||
1152 | - } | ||
1153 | - if (arr['SitioInternet']!=undefined){ | ||
1154 | - document.getElementById('txtSitioInternet').value = arr['SitioInternet']; | ||
1155 | - } | ||
1156 | - if (arr['Endereco']!=undefined){ | ||
1157 | - document.getElementById('txtEndereco').value = arr['Endereco']; | ||
1158 | - } | ||
1159 | - if (arr['Bairro']!=undefined){ | ||
1160 | - document.getElementById('txtBairro').value = arr['Bairro']; | ||
1161 | - } | ||
1162 | - | ||
1163 | - if (arr['SiglaEstado']!=undefined){ | ||
1164 | - document.getElementById('txtSiglaEstado').value = arr['SiglaEstado']; | ||
1165 | - } | ||
1166 | - | ||
1167 | - if (arr['NomeCidade']!=undefined){ | ||
1168 | - document.getElementById('txtNomeCidade').value = arr['NomeCidade']; | ||
1169 | - } | ||
1170 | - | ||
1171 | - if (arr['NomePais']!=undefined){ | ||
1172 | - document.getElementById('txtNomePais').value = arr['NomePais']; | ||
1173 | - paisEstadoCidadeRI0520(document.getElementById('txtNomePais'),arr['NomePais']); | ||
1174 | - } | ||
1175 | - | ||
1176 | - if (arr['Cep']!=undefined){ | ||
1177 | - document.getElementById('txtCep').value = arr['Cep']; | ||
1178 | - } | ||
1179 | - } */ | 1175 | + //inicio processo ajax |
1180 | 1176 | ||
1181 | //fim processo ajax | 1177 | //fim processo ajax |
1182 | } | 1178 | } |
1179 | + | ||
1180 | + //instanciar tabela dinamica de interessados caso os objetos existam na tela | ||
1181 | + var tabelaInteressadosIndicados = document.getElementById('tbInteressadosIndicados'); | ||
1182 | + var hdnTabelaInteressadosIndicados = document.getElementById('hdnListaInteressadosIndicados'); | ||
1183 | + | ||
1184 | + if( ( tabelaInteressadosIndicados != null && tabelaInteressadosIndicados != undefined) | ||
1185 | + && | ||
1186 | + ( hdnTabelaInteressadosIndicados != null && hdnTabelaInteressadosIndicados != undefined ) ){ | ||
1187 | + | ||
1188 | + objTabelaInteressado = new infraTabelaDinamica('tbInteressadosIndicados','hdnListaInteressadosIndicados',false,false); | ||
1189 | + objTabelaInteressado.gerarEfeitoTabela=true; | ||
1190 | + | ||
1191 | + document.getElementById("txtCPF").addEventListener("keyup", function(event) { | ||
1192 | + | ||
1193 | + event.preventDefault(); | ||
1194 | + | ||
1195 | + if (event.keyCode == 13) { | ||
1196 | + abrirCadastroInteressado(); | ||
1197 | + //document.getElementById("id_of_button").click(); | ||
1198 | + } | ||
1199 | + | ||
1200 | + }); | ||
1201 | + | ||
1202 | + document.getElementById("txtCNPJ").addEventListener("keyup", function(event) { | ||
1203 | + | ||
1204 | + event.preventDefault(); | ||
1205 | + | ||
1206 | + if (event.keyCode == 13) { | ||
1207 | + abrirCadastroInteressado(); | ||
1208 | + //document.getElementById("id_of_button").click(); | ||
1209 | + } | ||
1210 | + | ||
1211 | + }); | ||
1212 | + | ||
1213 | + } | ||
1214 | + | ||
1183 | } | 1215 | } |
1184 | 1216 | ||
1185 | function getStrNivelAcesso( nivel ){ | 1217 | function getStrNivelAcesso( nivel ){ |
1186 | - | ||
1187 | - //alert(nivel); | ||
1188 | 1218 | ||
1189 | if( nivel == '0'){ return 'Público'; } | 1219 | if( nivel == '0'){ return 'Público'; } |
1190 | else if( nivel == '1'){ return 'Restrito'; } | 1220 | else if( nivel == '1'){ return 'Restrito'; } |
@@ -1291,7 +1321,6 @@ function carregarCamposDocPrincipalUpload(){ | @@ -1291,7 +1321,6 @@ function carregarCamposDocPrincipalUpload(){ | ||
1291 | 1321 | ||
1292 | var extPermitida = false; | 1322 | var extPermitida = false; |
1293 | var extensoes = $('#hdnArquivosPermitidos').val(); | 1323 | var extensoes = $('#hdnArquivosPermitidos').val(); |
1294 | - //alert( 'Extensoes :: ' + extensoes ); | ||
1295 | var obj = JSON.parse($('#hdnArquivosPermitidos').val()); | 1324 | var obj = JSON.parse($('#hdnArquivosPermitidos').val()); |
1296 | 1325 | ||
1297 | for (var index in obj) { | 1326 | for (var index in obj) { |
@@ -1307,15 +1336,7 @@ function carregarCamposDocPrincipalUpload(){ | @@ -1307,15 +1336,7 @@ function carregarCamposDocPrincipalUpload(){ | ||
1307 | alert('A extensão do arquivo não é permitida.'); | 1336 | alert('A extensão do arquivo não é permitida.'); |
1308 | } | 1337 | } |
1309 | //FIM VALIDACAO EXTENSOES | 1338 | //FIM VALIDACAO EXTENSOES |
1310 | - | ||
1311 | - //validar tamanho maximo de arquivo | ||
1312 | - | ||
1313 | - //validar quantidade registros na tabela? | ||
1314 | - //if (document.getElementById('tblAnexos').rows.length>1){ | ||
1315 | - //alert('Apenas um anexo pode ser adicionado no cadastro.'); | ||
1316 | - //return false; | ||
1317 | - //} | ||
1318 | - | 1339 | + |
1319 | return extPermitida; | 1340 | return extPermitida; |
1320 | 1341 | ||
1321 | } | 1342 | } |
@@ -1326,7 +1347,6 @@ function carregarCamposDocPrincipalUpload(){ | @@ -1326,7 +1347,6 @@ function carregarCamposDocPrincipalUpload(){ | ||
1326 | 1347 | ||
1327 | } catch(err){ | 1348 | } catch(err){ |
1328 | alert(' ERRO ' + err); | 1349 | alert(' ERRO ' + err); |
1329 | - //console.log(err.stack); | ||
1330 | } | 1350 | } |
1331 | } | 1351 | } |
1332 | 1352 | ||
@@ -1360,30 +1380,8 @@ function carregarCamposDocEssencialUpload(){ | @@ -1360,30 +1380,8 @@ function carregarCamposDocEssencialUpload(){ | ||
1360 | 1380 | ||
1361 | for (var i = 1; i < linhas.length; i++) { | 1381 | for (var i = 1; i < linhas.length; i++) { |
1362 | //Nome igual | 1382 | //Nome igual |
1363 | - if (nome.toLowerCase()==linhas[i].cells[0].innerText.toLowerCase()){ | ||
1364 | - /* | ||
1365 | - //TAMANHO | ||
1366 | - tamanhoInserido = linhas[i].cells[2].innerText.toLowerCase().toLowerCase().replace(' Kb',''); | ||
1367 | - //arquivo em Kb | ||
1368 | - if (tamanhoInserido != linhas[i].cells[2].innerText){ | ||
1369 | - tamanhoVerificar = tamanho/1024; | ||
1370 | - tamanhoVerificar = parseFloat(tamanhoVerificar.toFixed(2)); | ||
1371 | - //arquivo em Mb | ||
1372 | - }else{ | ||
1373 | - tamanhoInserido = linhas[i].cells[2].innerText.toLowerCase().toLowerCase().replace(' mb',''); | ||
1374 | - if (tamanhoInserido != linhas[i].cells[2].innerText){ | ||
1375 | - tamanhoVerificar = tamanho/1024/1024; | ||
1376 | - tamanhoVerificar = parseFloat(tamanhoVerificar.toFixed(2)); | ||
1377 | - }else{ | ||
1378 | - tamanhoInserido=0; | ||
1379 | - } | ||
1380 | - } | ||
1381 | - if (tamanhoVerificar==tamanhoInserido){ | ||
1382 | - alert('Arquivo já inserido'); | ||
1383 | - return false; | ||
1384 | - } | ||
1385 | - */ | ||
1386 | - alert('Arquivo já inserido'); | 1383 | + if (nome.toLowerCase().trim()==linhas[i].cells[0].innerText.toLowerCase().trim()){ |
1384 | + alert('Não é permitido adicionar documento com o mesmo nome de arquivo.'); | ||
1387 | return false; | 1385 | return false; |
1388 | } | 1386 | } |
1389 | } | 1387 | } |
@@ -1523,30 +1521,8 @@ function carregarCamposDocComplementarUpload(){ | @@ -1523,30 +1521,8 @@ function carregarCamposDocComplementarUpload(){ | ||
1523 | 1521 | ||
1524 | for (var i = 1; i < linhas.length; i++) { | 1522 | for (var i = 1; i < linhas.length; i++) { |
1525 | //Nome igual | 1523 | //Nome igual |
1526 | - if (nome.toLowerCase()==linhas[i].cells[0].innerText.toLowerCase()){ | ||
1527 | - /* | ||
1528 | - //TAMANHO | ||
1529 | - tamanhoInserido = linhas[i].cells[2].innerText.toLowerCase().toLowerCase().replace(' Kb',''); | ||
1530 | - //arquivo em Kb | ||
1531 | - if (tamanhoInserido != linhas[i].cells[2].innerText){ | ||
1532 | - tamanhoVerificar = tamanho/1024; | ||
1533 | - tamanhoVerificar = parseFloat(tamanhoVerificar.toFixed(2)); | ||
1534 | - //arquivo em Mb | ||
1535 | - }else{ | ||
1536 | - tamanhoInserido = linhas[i].cells[2].innerText.toLowerCase().toLowerCase().replace(' mb',''); | ||
1537 | - if (tamanhoInserido != linhas[i].cells[2].innerText){ | ||
1538 | - tamanhoVerificar = tamanho/1024/1024; | ||
1539 | - tamanhoVerificar = parseFloat(tamanhoVerificar.toFixed(2)); | ||
1540 | - }else{ | ||
1541 | - tamanhoInserido=0; | ||
1542 | - } | ||
1543 | - } | ||
1544 | - if (tamanhoVerificar==tamanhoInserido){ | ||
1545 | - alert('Arquivo já inserido'); | ||
1546 | - return false; | ||
1547 | - } | ||
1548 | - */ | ||
1549 | - alert('Arquivo já inserido'); | 1524 | + if (nome.toLowerCase().trim()==linhas[i].cells[0].innerText.toLowerCase().trim()){ |
1525 | + alert('Não é permitido adicionar documento com o mesmo nome de arquivo.'); | ||
1550 | return false; | 1526 | return false; |
1551 | } | 1527 | } |
1552 | } | 1528 | } |
@@ -1623,9 +1599,6 @@ function carregarCamposDocComplementarUpload(){ | @@ -1623,9 +1599,6 @@ function carregarCamposDocComplementarUpload(){ | ||
1623 | 1599 | ||
1624 | var extPermitida = false; | 1600 | var extPermitida = false; |
1625 | var listaExtensoes = $('#hdnArquivosPermitidosEssencialComplementar').val(); | 1601 | var listaExtensoes = $('#hdnArquivosPermitidosEssencialComplementar').val(); |
1626 | - //alert( 'Extensao enviada: ' + ext ); | ||
1627 | - //alert( 'Extensoes permitidas: ' + listaExtensoes ); | ||
1628 | - | ||
1629 | var obj = JSON.parse( listaExtensoes ); | 1602 | var obj = JSON.parse( listaExtensoes ); |
1630 | 1603 | ||
1631 | for (var index in obj) { | 1604 | for (var index in obj) { |
@@ -1662,9 +1635,7 @@ function carregarComponenteLupaInteressados( tipoAcao ){ | @@ -1662,9 +1635,7 @@ function carregarComponenteLupaInteressados( tipoAcao ){ | ||
1662 | 1635 | ||
1663 | function mascaraTexto( elem, evento ){ | 1636 | function mascaraTexto( elem, evento ){ |
1664 | 1637 | ||
1665 | - //alert('entrou aqui'); | ||
1666 | var formPeticionamento = document.getElementById('frmPeticionamentoCadastro'); | 1638 | var formPeticionamento = document.getElementById('frmPeticionamentoCadastro'); |
1667 | - //alert(formPeticionamento.tipoPessoa.value); | ||
1668 | 1639 | ||
1669 | if(formPeticionamento.tipoPessoa.value == 'pf'){ | 1640 | if(formPeticionamento.tipoPessoa.value == 'pf'){ |
1670 | return infraMascaraCpf(elem, evento); | 1641 | return infraMascaraCpf(elem, evento); |
@@ -1682,12 +1653,13 @@ function selecionarPF(){ | @@ -1682,12 +1653,13 @@ function selecionarPF(){ | ||
1682 | 1653 | ||
1683 | document.getElementById('descTipoPessoa').innerHTML = 'CPF:'; | 1654 | document.getElementById('descTipoPessoa').innerHTML = 'CPF:'; |
1684 | document.getElementById('descNomePessoa').innerHTML = 'Nome:'; | 1655 | document.getElementById('descNomePessoa').innerHTML = 'Nome:'; |
1685 | - document.getElementById('tdDescTipoPessoa').innerHTML = 'CPF'; | ||
1686 | - document.getElementById('tdDescNomePessoa').innerHTML = 'Nome'; | 1656 | + //document.getElementById('tdDescTipoPessoa').innerHTML = 'CPF'; |
1657 | + //document.getElementById('tdDescNomePessoa').innerHTML = 'Nome'; | ||
1687 | 1658 | ||
1688 | document.getElementById('divSel1').style.display = 'inline'; | 1659 | document.getElementById('divSel1').style.display = 'inline'; |
1689 | document.getElementById('divSel2').style.display = 'inline'; | 1660 | document.getElementById('divSel2').style.display = 'inline'; |
1690 | 1661 | ||
1662 | + document.getElementById('txtNomeRazaoSocial').value = ''; | ||
1691 | document.getElementById('txtNomeRazaoSocial').style.display = 'inline'; | 1663 | document.getElementById('txtNomeRazaoSocial').style.display = 'inline'; |
1692 | document.getElementById('btAdicionarInteressado').style.display = 'inline'; | 1664 | document.getElementById('btAdicionarInteressado').style.display = 'inline'; |
1693 | 1665 | ||
@@ -1703,12 +1675,13 @@ function selecionarPJ(){ | @@ -1703,12 +1675,13 @@ function selecionarPJ(){ | ||
1703 | 1675 | ||
1704 | document.getElementById('descTipoPessoa').innerHTML = 'CNPJ:'; | 1676 | document.getElementById('descTipoPessoa').innerHTML = 'CNPJ:'; |
1705 | document.getElementById('descNomePessoa').innerHTML = 'Razão Social:'; | 1677 | document.getElementById('descNomePessoa').innerHTML = 'Razão Social:'; |
1706 | - document.getElementById('tdDescTipoPessoa').innerHTML = 'CNPJ'; | ||
1707 | - document.getElementById('tdDescNomePessoa').innerHTML = 'Razão Social'; | 1678 | + //document.getElementById('tdDescTipoPessoa').innerHTML = 'CNPJ'; |
1679 | + //document.getElementById('tdDescNomePessoa').innerHTML = 'Razão Social'; | ||
1708 | 1680 | ||
1709 | document.getElementById('divSel1').style.display = 'inline'; | 1681 | document.getElementById('divSel1').style.display = 'inline'; |
1710 | document.getElementById('divSel2').style.display = 'inline'; | 1682 | document.getElementById('divSel2').style.display = 'inline'; |
1711 | 1683 | ||
1684 | + document.getElementById('txtNomeRazaoSocial').value = ''; | ||
1712 | document.getElementById('txtNomeRazaoSocial').style.display = 'inline'; | 1685 | document.getElementById('txtNomeRazaoSocial').style.display = 'inline'; |
1713 | document.getElementById('btAdicionarInteressado').style.display = 'inline'; | 1686 | document.getElementById('btAdicionarInteressado').style.display = 'inline'; |
1714 | 1687 | ||
@@ -1797,6 +1770,19 @@ function exibirAjudaFormatoDocumento(){ | @@ -1797,6 +1770,19 @@ function exibirAjudaFormatoDocumento(){ | ||
1797 | 'Selecione a opção Digitalizado somente se o arquivo a ser carregado foi produzido da digitalização de um documento em papel.'); | 1770 | 'Selecione a opção Digitalizado somente se o arquivo a ser carregado foi produzido da digitalização de um documento em papel.'); |
1798 | } | 1771 | } |
1799 | 1772 | ||
1773 | +function exibirAjudaComplementoTipo(){ | ||
1774 | + alert('O Complemento do Tipo de Documento é o texto que completa a identificação do documento a ser carregado, adicionando ao nome do Tipo o texto que for digitado no referido campo (Tipo "Recurso" e Complemento "de 1ª Instância" identificará o documento como "Recurso de 1ª Instância").\n\n' + | ||
1775 | + 'Exemplos: O Complemento do Tipo "Nota" pode ser "Fiscal Eletrônica" ou "Fiscal nº 75/2016". O Complemento do Tipo "Comprovante" pode ser "de Pagamento" ou "de Endereço".'); | ||
1776 | +} | ||
1777 | + | ||
1778 | +function exibirAjudaTipoDocumentoPrincipal(){ | ||
1779 | + alert('Como somente pode ter um Documento Principal, o Tipo de Documento correspondente já é previamente definido. Deve, ainda, ser complementado no campo ao lado.'); | ||
1780 | +} | ||
1781 | + | ||
1782 | +function exibirAjudaTipoDocumentoEssenciaisComplementares(){ | ||
1783 | + alert('Selecione o Tipo de Documento que melhor identifique o documento a ser carregado e complemente o Tipo no campo ao lado.'); | ||
1784 | +} | ||
1785 | + | ||
1800 | function downloadArquivo( urlBaseDownload ){ | 1786 | function downloadArquivo( urlBaseDownload ){ |
1801 | 1787 | ||
1802 | var actionAnterior = document.getElementById("frmPeticionamentoCadastro").action; | 1788 | var actionAnterior = document.getElementById("frmPeticionamentoCadastro").action; |
@@ -1813,14 +1799,12 @@ function downloadArquivo( urlBaseDownload ){ | @@ -1813,14 +1799,12 @@ function downloadArquivo( urlBaseDownload ){ | ||
1813 | 1799 | ||
1814 | function concluirAssinarPeticionamento(){ | 1800 | function concluirAssinarPeticionamento(){ |
1815 | 1801 | ||
1816 | - //alert('Finalizar o processo'); | ||
1817 | var formCadastro = document.getElementById('frmPeticionamentoCadastro'); | 1802 | var formCadastro = document.getElementById('frmPeticionamentoCadastro'); |
1818 | formCadastro.target = "concluirPeticionamento"; | 1803 | formCadastro.target = "concluirPeticionamento"; |
1819 | formCadastro.submit(); | 1804 | formCadastro.submit(); |
1820 | } | 1805 | } |
1821 | 1806 | ||
1822 | window.CallParent = function() { | 1807 | window.CallParent = function() { |
1823 | - //alert(" Parent window Alert"); | ||
1824 | concluirAssinarPeticionamento(); | 1808 | concluirAssinarPeticionamento(); |
1825 | } | 1809 | } |
1826 | 1810 | ||
@@ -1844,7 +1828,21 @@ function selectNivelAcesso( idNivelAcesso, idHipoteseLegal ){ | @@ -1844,7 +1828,21 @@ function selectNivelAcesso( idNivelAcesso, idHipoteseLegal ){ | ||
1844 | 1828 | ||
1845 | function adicionarInteressadoValido(){ | 1829 | function adicionarInteressadoValido(){ |
1846 | 1830 | ||
1831 | + var txtCPF = document.getElementById("txtCPF").value; | ||
1832 | + var txtCNPJ = document.getElementById("txtCNPJ").value; | ||
1833 | + var txtCPFCNPJ = ''; | ||
1834 | + | ||
1835 | + if( txtCPF != ""){ | ||
1836 | + txtCPFCNPJ = txtCPF; | ||
1837 | + } | ||
1838 | + | ||
1839 | + else if( txtCNPJ != ""){ | ||
1840 | + txtCPFCNPJ = txtCNPJ; | ||
1841 | + } | ||
1842 | + | ||
1843 | + var hdnCustomizado = document.getElementById("hdnCustomizado").value; | ||
1847 | var txtNomeRazaoSocial = document.getElementById("txtNomeRazaoSocial").value; | 1844 | var txtNomeRazaoSocial = document.getElementById("txtNomeRazaoSocial").value; |
1845 | + var hdnIdInteressadoCadastrado = document.getElementById('hdnIdInteressadoCadastrado').value; | ||
1848 | var chkTipoPessoaFisica = document.getElementById("optTipoPessoaFisica").checked; | 1846 | var chkTipoPessoaFisica = document.getElementById("optTipoPessoaFisica").checked; |
1849 | var chkTipoPessoaJuridica = document.getElementById("optTipoPessoaJuridica").checked; | 1847 | var chkTipoPessoaJuridica = document.getElementById("optTipoPessoaJuridica").checked; |
1850 | 1848 | ||
@@ -1864,9 +1862,91 @@ function adicionarInteressadoValido(){ | @@ -1864,9 +1862,91 @@ function adicionarInteressadoValido(){ | ||
1864 | } | 1862 | } |
1865 | 1863 | ||
1866 | //adicionar o interessado na grid | 1864 | //adicionar o interessado na grid |
1867 | - var arrDadosInteressadoValido = []; | ||
1868 | - var bolInteressadoCustomizado = false; | 1865 | + var arrDadosInteressadoValido = []; |
1866 | + | ||
1867 | + if( txtCPF != ""){ | ||
1868 | + arrDadosInteressadoValido[1] = "Pessoa Física"; | ||
1869 | + } | ||
1870 | + | ||
1871 | + else if( txtCNPJ != ""){ | ||
1872 | + arrDadosInteressadoValido[1] = "Pessoa Jurídica"; | ||
1873 | + } | ||
1874 | + | ||
1875 | + arrDadosInteressadoValido[2] = txtCPFCNPJ; | ||
1876 | + arrDadosInteressadoValido[3] = txtNomeRazaoSocial; | ||
1877 | + arrDadosInteressadoValido[0] = hdnIdInteressadoCadastrado; | ||
1878 | + | ||
1879 | + var bolInteressadoCustomizado = hdnCustomizado; | ||
1880 | + | ||
1881 | + //checar se o cpf ou cnpj informado já existe na grid | ||
1882 | + var hdnListaInteressadosIndicados = document.getElementById('hdnListaInteressadosIndicados').value; | ||
1883 | + | ||
1884 | + if( hdnListaInteressadosIndicados != "") { | ||
1885 | + | ||
1886 | + //caractere de quebra de linha | ||
1887 | + var arrHash = hdnListaInteressadosIndicados.split('¥'); | ||
1888 | + var quantidadeRegistro = arrHash.length; | ||
1889 | + | ||
1890 | + if( quantidadeRegistro == 0){ | ||
1891 | + | ||
1892 | + var cpfInserido = arrDadosInteressadoValido[2]; | ||
1893 | + | ||
1894 | + //caractere de quebra de coluna | ||
1895 | + var arrLocal = hdnListaInteressadosIndicados.split('±'); | ||
1896 | + var cpfLocal = arrLocal[2]; | ||
1897 | + | ||
1898 | + if( cpfInserido == cpfLocal){ | ||
1899 | + alert('Não é permitido adicionar interessado com CPF ou CNPJ já adicionado.'); | ||
1900 | + return; | ||
1901 | + } | ||
1902 | + | ||
1903 | + } else if( quantidadeRegistro > 0 ){ | ||
1904 | + | ||
1905 | + var cpfInserido = arrDadosInteressadoValido[1]; | ||
1906 | + | ||
1907 | + for(var i = 0; i < quantidadeRegistro ; i++ ){ | ||
1908 | + | ||
1909 | + var arrLocal = arrHash[i].split('±'); | ||
1910 | + var cpfLocal = arrLocal[2]; | ||
1911 | + | ||
1912 | + if( cpfInserido == cpfLocal){ | ||
1913 | + alert('Não é permitido adicionar interessado com CPF ou CNPJ já adicionado.'); | ||
1914 | + return; | ||
1915 | + } | ||
1916 | + | ||
1917 | + } | ||
1918 | + | ||
1919 | + } | ||
1920 | + | ||
1921 | + } | ||
1922 | + | ||
1869 | receberInteressado( arrDadosInteressadoValido , bolInteressadoCustomizado ); | 1923 | receberInteressado( arrDadosInteressadoValido , bolInteressadoCustomizado ); |
1870 | 1924 | ||
1871 | } | 1925 | } |
1926 | + | ||
1927 | +function atualizarNomeRazaoSocial( cpfEditado , nomeEditado ){ | ||
1928 | + | ||
1929 | + var table = document.getElementById("tbInteressadosIndicados"); | ||
1930 | + var linhas = table.rows; | ||
1931 | + | ||
1932 | + for ( var i = 0; row = table.rows[i]; i++ ) { | ||
1933 | + | ||
1934 | + row = table.rows[i]; | ||
1935 | + | ||
1936 | + if( i > 0){ | ||
1937 | + | ||
1938 | + cpflinha = row.cells[2].innerHTML; | ||
1939 | + nomeRazaoSocialLinha = row.cells[3].innerHTML; | ||
1940 | + | ||
1941 | + cpfEditado = '<div>' + cpfEditado + '</div>'; | ||
1942 | + | ||
1943 | + if( cpflinha == cpfEditado){ | ||
1944 | + row.cells[3].innerHTML = '<div>' + nomeEditado + '</div>'; | ||
1945 | + } | ||
1946 | + | ||
1947 | + } | ||
1948 | + | ||
1949 | + } | ||
1950 | + | ||
1951 | +} | ||
1872 | </script> | 1952 | </script> |
1873 | \ No newline at end of file | 1953 | \ No newline at end of file |
sei/institucional/peticionamento/peticionamento_usuario_externo_concluir.php
@@ -224,6 +224,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -224,6 +224,7 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
224 | <input type="hidden" id="nivelAcessoDocPrincipal" name="nivelAcessoDocPrincipal" /> | 224 | <input type="hidden" id="nivelAcessoDocPrincipal" name="nivelAcessoDocPrincipal" /> |
225 | <input type="hidden" id="grauSigiloDocPrincipal" name="grauSigiloDocPrincipal" /> | 225 | <input type="hidden" id="grauSigiloDocPrincipal" name="grauSigiloDocPrincipal" /> |
226 | <input type="hidden" id="hdnListaInteressados" name="hdnListaInteressados" /> | 226 | <input type="hidden" id="hdnListaInteressados" name="hdnListaInteressados" /> |
227 | + <input type="hidden" id="hdnListaInteressadosIndicados" name="hdnListaInteressadosIndicados" /> | ||
227 | 228 | ||
228 | <input type="hidden" id="hipoteseLegalDocPrincipal" name="hipoteseLegalDocPrincipal" /> | 229 | <input type="hidden" id="hipoteseLegalDocPrincipal" name="hipoteseLegalDocPrincipal" /> |
229 | <input type="hidden" id="hipoteseLegalDocEssencial" name="hipoteseLegalDocEssencial" /> | 230 | <input type="hidden" id="hipoteseLegalDocEssencial" name="hipoteseLegalDocEssencial" /> |
@@ -282,8 +283,7 @@ function assinar(){ | @@ -282,8 +283,7 @@ function assinar(){ | ||
282 | 283 | ||
283 | var hipoteseLegal = null; | 284 | var hipoteseLegal = null; |
284 | var hipoteseLegal2 = null; | 285 | var hipoteseLegal2 = null; |
285 | - var hipoteseLegal3 = null; | ||
286 | - | 286 | + var hipoteseLegal3 = null; |
287 | 287 | ||
288 | if( campoHipLegal1 != null && campoHipLegal1 != undefined ){ | 288 | if( campoHipLegal1 != null && campoHipLegal1 != undefined ){ |
289 | hipoteseLegal = campoHipLegal1.value; | 289 | hipoteseLegal = campoHipLegal1.value; |
@@ -312,8 +312,8 @@ function assinar(){ | @@ -312,8 +312,8 @@ function assinar(){ | ||
312 | 312 | ||
313 | //verificar se esta vindo uma lista de interessados | 313 | //verificar se esta vindo uma lista de interessados |
314 | var selInteressados = window.opener.document.getElementById('selInteressados'); | 314 | var selInteressados = window.opener.document.getElementById('selInteressados'); |
315 | + var hdnSelInteressadosIndicados = window.opener.document.getElementById('hdnListaInteressadosIndicados'); | ||
315 | var selInteressadosSelecionadosTxt = ''; | 316 | var selInteressadosSelecionadosTxt = ''; |
316 | - //alert(selInteressadosSelecionados); | ||
317 | 317 | ||
318 | //verificar se esta a combo de UF (Unidades multiplas) | 318 | //verificar se esta a combo de UF (Unidades multiplas) |
319 | var selUFAberturaProcesso = window.opener.document.getElementById('selUFAberturaProcesso'); | 319 | var selUFAberturaProcesso = window.opener.document.getElementById('selUFAberturaProcesso'); |
@@ -338,11 +338,52 @@ function assinar(){ | @@ -338,11 +338,52 @@ function assinar(){ | ||
338 | 338 | ||
339 | } | 339 | } |
340 | 340 | ||
341 | - //alert( selInteressadosSelecionadosTxt ); | ||
342 | document.getElementById('hdnListaInteressados').value = selInteressadosSelecionadosTxt; | 341 | document.getElementById('hdnListaInteressados').value = selInteressadosSelecionadosTxt; |
343 | 342 | ||
344 | } | 343 | } |
345 | 344 | ||
345 | + //lista de interessados indicados por CPF/CNPJ | ||
346 | + if( hdnSelInteressadosIndicados != null && hdnSelInteressadosIndicados != "") { | ||
347 | + | ||
348 | + var hdnListaInteressadosIndicados = hdnSelInteressadosIndicados.value; | ||
349 | + | ||
350 | + //caractere de quebra de linha | ||
351 | + var arrHash = hdnListaInteressadosIndicados.split('¥'); | ||
352 | + var quantidadeRegistro = arrHash.length; | ||
353 | + | ||
354 | + if( quantidadeRegistro == 0){ | ||
355 | + | ||
356 | + //caractere de quebra de coluna | ||
357 | + var arrLocal = hdnListaInteressadosIndicados.split('±'); | ||
358 | + var idContato = arrLocal[0]; | ||
359 | + | ||
360 | + if( selInteressadosSelecionadosTxt != ''){ | ||
361 | + selInteressadosSelecionadosTxt += ','; | ||
362 | + } | ||
363 | + | ||
364 | + selInteressadosSelecionadosTxt += idContato; | ||
365 | + | ||
366 | + } else if( quantidadeRegistro > 0 ){ | ||
367 | + | ||
368 | + for(var i = 0; i < quantidadeRegistro ; i++ ){ | ||
369 | + | ||
370 | + var arrLocal = arrHash[i].split('±'); | ||
371 | + var idContato = arrLocal[0]; | ||
372 | + | ||
373 | + if( selInteressadosSelecionadosTxt != ''){ | ||
374 | + selInteressadosSelecionadosTxt += ','; | ||
375 | + } | ||
376 | + | ||
377 | + selInteressadosSelecionadosTxt += idContato; | ||
378 | + | ||
379 | + } | ||
380 | + | ||
381 | + } | ||
382 | + | ||
383 | + document.getElementById('hdnListaInteressados').value = selInteressadosSelecionadosTxt; | ||
384 | + | ||
385 | + } | ||
386 | + | ||
346 | //obtendo valores das grids de documentos principais, essenciais e complementares | 387 | //obtendo valores das grids de documentos principais, essenciais e complementares |
347 | var hdnDocPrincipal = window.opener.document.getElementById('hdnDocPrincipal'); | 388 | var hdnDocPrincipal = window.opener.document.getElementById('hdnDocPrincipal'); |
348 | var hdnDocEssencial = window.opener.document.getElementById('hdnDocEssencial'); | 389 | var hdnDocEssencial = window.opener.document.getElementById('hdnDocEssencial'); |
sei/institucional/peticionamento/rn/AcessoExternoPeticionamentoRN.php
@@ -473,7 +473,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | @@ -473,7 +473,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | ||
473 | 473 | ||
474 | $objAtividadeRN = new AtividadeRN(); | 474 | $objAtividadeRN = new AtividadeRN(); |
475 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); | 475 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); |
476 | - | 476 | + |
477 | $objAtividadeRN = new AtividadeRN(); | 477 | $objAtividadeRN = new AtividadeRN(); |
478 | //a pedido do cliente removendo do historico / andamento a atividade de "liberar para assinatura" | 478 | //a pedido do cliente removendo do historico / andamento a atividade de "liberar para assinatura" |
479 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); | 479 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); |
@@ -510,7 +510,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | @@ -510,7 +510,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | ||
510 | $objAtributoAndamentoDTO->setStrValor($objParticipanteDTO->getStrSiglaContato() . '¥' . $objParticipanteDTO->getStrNomeContato()); | 510 | $objAtributoAndamentoDTO->setStrValor($objParticipanteDTO->getStrSiglaContato() . '¥' . $objParticipanteDTO->getStrNomeContato()); |
511 | $objAtributoAndamentoDTO->setStrIdOrigem($objAcessoExternoDTO->getNumIdParticipante()); | 511 | $objAtributoAndamentoDTO->setStrIdOrigem($objAcessoExternoDTO->getNumIdParticipante()); |
512 | $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; | 512 | $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; |
513 | - | 513 | + |
514 | $objAtividadeDTO = new AtividadeDTO(); | 514 | $objAtividadeDTO = new AtividadeDTO(); |
515 | $objAtividadeDTO->setDblIdProtocolo($objParticipanteDTO->getDblIdProtocolo()); | 515 | $objAtividadeDTO->setDblIdProtocolo($objParticipanteDTO->getDblIdProtocolo()); |
516 | $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | 516 | $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); |
@@ -519,7 +519,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | @@ -519,7 +519,7 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | ||
519 | 519 | ||
520 | $objAtividadeRN = new AtividadeRN(); | 520 | $objAtividadeRN = new AtividadeRN(); |
521 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); | 521 | $objAtividadeDTO = $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); |
522 | - | 522 | + |
523 | $objAcessoExternoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | 523 | $objAcessoExternoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); |
524 | 524 | ||
525 | } | 525 | } |
@@ -531,7 +531,6 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | @@ -531,7 +531,6 @@ class AcessoExternoPeticionamentoRN extends InfraRN { | ||
531 | $objAcessoExternoBD = new AcessoExternoBD($this->getObjInfraIBanco()); | 531 | $objAcessoExternoBD = new AcessoExternoBD($this->getObjInfraIBanco()); |
532 | $ret = $objAcessoExternoBD->cadastrar($objAcessoExternoDTO); | 532 | $ret = $objAcessoExternoBD->cadastrar($objAcessoExternoDTO); |
533 | 533 | ||
534 | - | ||
535 | //ENVIAR EMAIL | 534 | //ENVIAR EMAIL |
536 | if ($objAcessoExternoDTO->getStrStaTipo() == self::$TA_INTERESSADO || $objAcessoExternoDTO->getStrStaTipo() == self::$TA_DESTINATARIO_ISOLADO) { | 535 | if ($objAcessoExternoDTO->getStrStaTipo() == self::$TA_INTERESSADO || $objAcessoExternoDTO->getStrStaTipo() == self::$TA_DESTINATARIO_ISOLADO) { |
537 | 536 |
sei/institucional/peticionamento/rn/AtualizadorModuloPeticionamentoRN.php
@@ -311,9 +311,9 @@ class AtualizadorModuloPeticionamentoRN extends InfraRN { | @@ -311,9 +311,9 @@ class AtualizadorModuloPeticionamentoRN extends InfraRN { | ||
311 | //Parametrizar Email de Alerta às Unidades | 311 | //Parametrizar Email de Alerta às Unidades |
312 | $conteudo1 = " :: Este é um e-mail automático :: | 312 | $conteudo1 = " :: Este é um e-mail automático :: |
313 | 313 | ||
314 | -O Usuário Externo @nome_usuario_externo@ (@email_usuario_externo@) efetivou o Peticionamento Eletrônico do tipo @tipo_peticionamento@, no âmbito do processo nº @processo@, conforme disposto no Recibo Eletrônico de Protocolo SEI nº @documento_recibo_eletronico_de_protocolo@. | 314 | +O Usuário Externo @nome_usuario_externo@ (@email_usuario_externo@) efetivou o Peticionamento Eletrônico do tipo @tipo_peticionamento@ (@tipo_processo@), no âmbito do processo nº @processo@, conforme disposto no Recibo Eletrônico de Protocolo SEI nº @documento_recibo_eletronico_de_protocolo@. |
315 | 315 | ||
316 | -O mencionado processo se encontra aberto em sua unidade (@sigla_unidade_abertura_do_processo@). Entre no SEI e confira! Caso não seja de competência de sua Unidade, verifique se já está aberto na Unidade correta e, do contrário, envie-o para a Unidade competente para que seja devidamente tratado. | 316 | +O mencionado processo se encontra aberto em sua Unidade (@sigla_unidade_abertura_do_processo@). Entre no SEI e confira! Caso não seja de competência de sua Unidade, verifique se já está aberto na Unidade correta e, do contrário, envie-o para a Unidade competente para que seja devidamente tratado. |
317 | 317 | ||
318 | 318 | ||
319 | @sigla_orgao@ | 319 | @sigla_orgao@ |
@@ -336,7 +336,7 @@ ATENÇÃO: As informações contidas neste e-mail, incluindo seus anexos, podem ser | @@ -336,7 +336,7 @@ ATENÇÃO: As informações contidas neste e-mail, incluindo seus anexos, podem ser | ||
336 | 'Peticionamento Eletrônico - Alerta às Unidades', | 336 | 'Peticionamento Eletrônico - Alerta às Unidades', |
337 | '@sigla_sistema@ <@email_sistema@>', | 337 | '@sigla_sistema@ <@email_sistema@>', |
338 | '@emails_unidade@', | 338 | '@emails_unidade@', |
339 | - 'SEI Peticionamento Eletrônico - Processo nº @processo@ nesta Unidade', | 339 | + 'SEI Peticionamento Eletrônico - Processo nº @processo@', |
340 | '" . $conteudo1 . "', | 340 | '" . $conteudo1 . "', |
341 | 'S' | 341 | 'S' |
342 | )"; | 342 | )"; |
@@ -595,8 +595,8 @@ $objTamanhoArquivoDTO = new TamanhoArquivoPermitidoPeticionamentoDTO(); | @@ -595,8 +595,8 @@ $objTamanhoArquivoDTO = new TamanhoArquivoPermitidoPeticionamentoDTO(); | ||
595 | $objTamanhoArquivoRN = new TamanhoArquivoPermitidoPeticionamentoRN(); | 595 | $objTamanhoArquivoRN = new TamanhoArquivoPermitidoPeticionamentoRN(); |
596 | 596 | ||
597 | $objTamanhoArquivoDTO->retTodos(); | 597 | $objTamanhoArquivoDTO->retTodos(); |
598 | -$objTamanhoArquivoDTO->setNumValorDocPrincipal('10'); | ||
599 | -$objTamanhoArquivoDTO->setNumValorDocComplementar('5'); | 598 | +$objTamanhoArquivoDTO->setNumValorDocPrincipal('5'); |
599 | +$objTamanhoArquivoDTO->setNumValorDocComplementar('10'); | ||
600 | $objTamanhoArquivoDTO->setNumIdTamanhoArquivo(TamanhoArquivoPermitidoPeticionamentoRN::$ID_FIXO_TAMANHO_ARQUIVO); | 600 | $objTamanhoArquivoDTO->setNumIdTamanhoArquivo(TamanhoArquivoPermitidoPeticionamentoRN::$ID_FIXO_TAMANHO_ARQUIVO); |
601 | $objTamanhoArquivoDTO->setStrSinAtivo('S'); | 601 | $objTamanhoArquivoDTO->setStrSinAtivo('S'); |
602 | 602 |
sei/institucional/peticionamento/rn/EmailNotificacaoPeticionamentoRN.php
@@ -33,11 +33,11 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -33,11 +33,11 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
33 | protected function notificaoPeticionamentoExternoConectado($arrParams ){ | 33 | protected function notificaoPeticionamentoExternoConectado($arrParams ){ |
34 | 34 | ||
35 | $objInfraParametro = new InfraParametro( $this->getObjInfraIBanco() ); | 35 | $objInfraParametro = new InfraParametro( $this->getObjInfraIBanco() ); |
36 | - | ||
37 | - $arrParametros = $arrParams[0]; //parametros adicionais fornecidos no formulario de peticionamento | ||
38 | - $objUnidadeDTO = $arrParams[1]; //UnidadeDTO da unidade geradora do processo | ||
39 | - $objProcedimentoDTO = $arrParams[2]; //ProcedimentoDTO para vincular o recibo ao processo correto | 36 | + $arrParametros = $arrParams[0]; //parametros adicionais fornecidos no formulario de peticionamento |
37 | + $objUnidadeDTO = $arrParams[1]; //UnidadeDTO da unidade geradora do processo | ||
38 | + $objProcedimentoDTO = $arrParams[2]; //ProcedimentoDTO para vincular o recibo ao processo correto | ||
40 | $arrParticipantesParametro = $arrParams[3]; //array de ParticipanteDTO | 39 | $arrParticipantesParametro = $arrParams[3]; //array de ParticipanteDTO |
40 | + $reciboDTOBasico = $arrParams[4]; //Recibo | ||
41 | 41 | ||
42 | //consultar email da unidade (orgao) | 42 | //consultar email da unidade (orgao) |
43 | $orgaoRN = new OrgaoRN(); | 43 | $orgaoRN = new OrgaoRN(); |
@@ -47,12 +47,12 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -47,12 +47,12 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
47 | $objOrgaoDTO->setStrSinAtivo('S'); | 47 | $objOrgaoDTO->setStrSinAtivo('S'); |
48 | $objOrgaoDTO = $orgaoRN->consultarRN1352( $objOrgaoDTO ); | 48 | $objOrgaoDTO = $orgaoRN->consultarRN1352( $objOrgaoDTO ); |
49 | 49 | ||
50 | - //pegar a lista de email da unidade, a unidade pode não ter, email unidade | ||
51 | - $objEmailUnidadeDTO = new EmailUnidadeDTO(); | ||
52 | - $emailUnidadeRN = new EmailUnidadeRN(); | ||
53 | - $objEmailUnidadeDTO->retStrEmail(); | ||
54 | - $objEmailUnidadeDTO->setNumIdUnidade($objUnidadeDTO->getNumIdUnidade()); | ||
55 | - $arrEmailUnidade = $emailUnidadeRN->listar($objEmailUnidadeDTO); | 50 | + //pegar a lista de email da unidade, a unidade pode não ter, email unidade |
51 | + $objEmailUnidadeDTO = new EmailUnidadeDTO(); | ||
52 | + $emailUnidadeRN = new EmailUnidadeRN(); | ||
53 | + $objEmailUnidadeDTO->retStrEmail(); | ||
54 | + $objEmailUnidadeDTO->setNumIdUnidade($objUnidadeDTO->getNumIdUnidade()); | ||
55 | + $arrEmailUnidade = $emailUnidadeRN->listar($objEmailUnidadeDTO); | ||
56 | 56 | ||
57 | //obtendo o tipo de procedimento | 57 | //obtendo o tipo de procedimento |
58 | $idTipoProc = $arrParametros['id_tipo_procedimento']; | 58 | $idTipoProc = $arrParametros['id_tipo_procedimento']; |
@@ -64,7 +64,9 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -64,7 +64,9 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
64 | $objTipoProcDTO = $objTipoProcRN->consultar( $objTipoProcDTO ); | 64 | $objTipoProcDTO = $objTipoProcRN->consultar( $objTipoProcDTO ); |
65 | 65 | ||
66 | //variaveis basicas em uso no email | 66 | //variaveis basicas em uso no email |
67 | - $linkLoginUsuarioExterno = $objOrgaoDTO->getStrSitioInternet(); | 67 | + //$linkLoginUsuarioExterno = $objOrgaoDTO->getStrSitioInternet(); |
68 | + //$linkLoginUsuarioExterno = $this->getObjInfraSessao()->getStrPaginaLogin() | ||
69 | + $linkLoginUsuarioExterno = SessaoSEIExterna::getInstance()->getStrPaginaLogin(); | ||
68 | $strNomeTipoProcedimento = $objProcedimentoDTO->getStrNomeTipoProcedimento(); | 70 | $strNomeTipoProcedimento = $objProcedimentoDTO->getStrNomeTipoProcedimento(); |
69 | $strProtocoloFormatado = $objProcedimentoDTO->getStrProtocoloProcedimentoFormatado(); | 71 | $strProtocoloFormatado = $objProcedimentoDTO->getStrProtocoloProcedimentoFormatado(); |
70 | $strSiglaUnidade = $objUnidadeDTO->getStrSigla(); | 72 | $strSiglaUnidade = $objUnidadeDTO->getStrSigla(); |
@@ -90,11 +92,20 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -90,11 +92,20 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
90 | $objUsuarioRN = new UsuarioRN(); | 92 | $objUsuarioRN = new UsuarioRN(); |
91 | $objUsuarioDTO = $objUsuarioRN->consultarRN0489( $objUsuarioDTO ); | 93 | $objUsuarioDTO = $objUsuarioRN->consultarRN0489( $objUsuarioDTO ); |
92 | 94 | ||
93 | - //print_r( $objUsuarioDTO ); die(); | ||
94 | - | ||
95 | $strNomeContato = $objUsuarioDTO->getStrNome(); | 95 | $strNomeContato = $objUsuarioDTO->getStrNome(); |
96 | $strEmailContato = $objUsuarioDTO->getStrSigla(); | 96 | $strEmailContato = $objUsuarioDTO->getStrSigla(); |
97 | 97 | ||
98 | + //RECIBO | ||
99 | + $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | ||
100 | + $idSerieParam = $objInfraParametro->getValor('ID_SERIE_RECIBO_MODULO_PETICIONAMENTO'); | ||
101 | + | ||
102 | + $documentoRN = new DocumentoRN(); | ||
103 | + $documentoDTO = new DocumentoDTO(); | ||
104 | + $documentoDTO->retStrProtocoloDocumentoFormatado(); | ||
105 | + $documentoDTO->setDblIdProcedimento( $reciboDTOBasico->getNumIdProtocolo() ); | ||
106 | + $documentoDTO->setNumIdSerie( $idSerieParam ); | ||
107 | + $documentoDTO = $documentoRN->consultarRN0005( $documentoDTO ); | ||
108 | + | ||
98 | //enviando email de sistema após cadastramento do processo de peticionamento pelo usuário externo | 109 | //enviando email de sistema após cadastramento do processo de peticionamento pelo usuário externo |
99 | //================================================================================================ | 110 | //================================================================================================ |
100 | //EMAIL PARA O USUARIO PETICIONANTE | 111 | //EMAIL PARA O USUARIO PETICIONANTE |
@@ -111,8 +122,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -111,8 +122,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
111 | $objEmailSistemaRN = new EmailSistemaRN(); | 122 | $objEmailSistemaRN = new EmailSistemaRN(); |
112 | $objEmailSistemaDTO = $objEmailSistemaRN->consultar($objEmailSistemaDTO); | 123 | $objEmailSistemaDTO = $objEmailSistemaRN->consultar($objEmailSistemaDTO); |
113 | 124 | ||
114 | - //print_r( $objEmailSistemaDTO ); die(); | ||
115 | - | ||
116 | if ($objEmailSistemaDTO!=null){ | 125 | if ($objEmailSistemaDTO!=null){ |
117 | 126 | ||
118 | $strDe = $objEmailSistemaDTO->getStrDe(); | 127 | $strDe = $objEmailSistemaDTO->getStrDe(); |
@@ -123,10 +132,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -123,10 +132,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
123 | $strDe = str_replace('@sigla_orgao_minusculas@',InfraString::transformarCaixaBaixa($objOrgaoDTO->getStrSigla()),$strDe); | 132 | $strDe = str_replace('@sigla_orgao_minusculas@',InfraString::transformarCaixaBaixa($objOrgaoDTO->getStrSigla()),$strDe); |
124 | $strDe = str_replace('@sufixo_email@',$objInfraParametro->getValor('SEI_SUFIXO_EMAIL'),$strDe); | 133 | $strDe = str_replace('@sufixo_email@',$objInfraParametro->getValor('SEI_SUFIXO_EMAIL'),$strDe); |
125 | 134 | ||
126 | - $strConteudo = str_replace('@nome_usuario_externo@', $strNomeContato ,$strConteudo); | ||
127 | - $strConteudo = str_replace('@email_usuario_externo@', $strEmailContato ,$strConteudo); | ||
128 | - $strConteudo = str_replace('@link_login_usuario_externo@',$objOrgaoDTO->getStrSigla(),$strConteudo); | ||
129 | - | ||
130 | $strPara = $objEmailSistemaDTO->getStrPara(); | 135 | $strPara = $objEmailSistemaDTO->getStrPara(); |
131 | $strPara = str_replace('@nome_contato@', $strNomeContato ,$strPara); | 136 | $strPara = str_replace('@nome_contato@', $strNomeContato ,$strPara); |
132 | $strPara = str_replace('@email_contato@', $strEmailContato ,$strPara); | 137 | $strPara = str_replace('@email_contato@', $strEmailContato ,$strPara); |
@@ -136,22 +141,67 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -136,22 +141,67 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
136 | $strAssunto = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strAssunto); | 141 | $strAssunto = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strAssunto); |
137 | $strAssunto = str_replace('@processo@',$strProtocoloFormatado ,$strAssunto); | 142 | $strAssunto = str_replace('@processo@',$strProtocoloFormatado ,$strAssunto); |
138 | 143 | ||
144 | + /* | ||
145 | + USUARIO - SCRIPT | ||
146 | + @processo@ | ||
147 | + | ||
148 | + @nome_usuario_externo@ | ||
149 | + | ||
150 | + @link_login_usuario_externo@ | ||
151 | + @tipo_peticionamento@ | ||
152 | + | ||
153 | + | ||
154 | + @documento_recibo_eletronico_de_protocolo@ | ||
155 | + @sigla_orgao@ | ||
156 | + @descricao_orgao@ | ||
157 | + @sitio_internet_orgao@ | ||
158 | + | ||
159 | + USUARIO - pagina | ||
160 | + processo = @processo@ | ||
161 | + tipo_processo = @tipo_processo@ | ||
162 | + nome_usuario_externo = @nome_usuario_externo@ | ||
163 | + email_usuario_externo = @email_usuario_externo@ | ||
164 | + link_login_usuario_externo = @link_login_usuario_externo@ | ||
165 | + tipo_peticionamento = @tipo_peticionamento@ | ||
166 | + nome_contato = @nome_contato@ | ||
167 | + email_contato = @email_contato@ | ||
168 | + documento_recibo_eletronico_de_protocolo = @documento_recibo_eletronico_de_protocolo@ | ||
169 | + sigla_orgao = @sigla_orgao@ | ||
170 | + descricao_orgao = @descricao_orgao@ | ||
171 | + sitio_internet_orgao = @sitio_internet_orgao@ | ||
172 | + */ | ||
173 | + | ||
139 | $strConteudo = $objEmailSistemaDTO->getStrConteudo(); | 174 | $strConteudo = $objEmailSistemaDTO->getStrConteudo(); |
175 | + | ||
140 | $strConteudo = str_replace('@processo@', $strProtocoloFormatado , $strConteudo); | 176 | $strConteudo = str_replace('@processo@', $strProtocoloFormatado , $strConteudo); |
141 | - $strConteudo = str_replace('@nome_usuario_externo@', $objUsuarioDTO->getStrNome() , $strConteudo); | 177 | + /// |
178 | + $strConteudo = str_replace('@tipo_processo@', $objTipoProcDTO->getStrNomeProcesso() , $strConteudo); | ||
179 | + $strConteudo = str_replace('@nome_usuario_externo@', $strNomeContato ,$strConteudo); | ||
180 | + /// | ||
181 | + $strConteudo = str_replace('@email_usuario_externo@', $strEmailContato ,$strConteudo); | ||
142 | $strConteudo = str_replace('@link_login_usuario_externo@', $linkLoginUsuarioExterno , $strConteudo); | 182 | $strConteudo = str_replace('@link_login_usuario_externo@', $linkLoginUsuarioExterno , $strConteudo); |
143 | - $strConteudo = str_replace('@tipo_processo@', $objTipoProcDTO->getStrNomeSerie() , $strConteudo); | ||
144 | - $strConteudo = str_replace('@nome_contato@', $strNomeContato ,$strConteudo); | ||
145 | - $strConteudo = str_replace('@email_contato@', $strEmailContato ,$strConteudo); | 183 | + |
184 | + if ($reciboDTOBasico->getStrStaTipoPeticionamento()=="N"){ | ||
185 | + $strConteudo = str_replace('@tipo_peticionamento@',"Processo Novo",$strConteudo); | ||
186 | + }else if ($reciboDTOBasico->getStrStaTipoPeticionamento()=="I"){ | ||
187 | + $strConteudo = str_replace('@tipo_peticionamento@',"Intercorrente",$strConteudo); | ||
188 | + } | ||
189 | + | ||
190 | + /// $strConteudo = str_replace('@nome_contato@', $strNomeContato ,$strConteudo); | ||
191 | + /// $strConteudo = str_replace('@email_contato@', $strEmailContato ,$strConteudo); | ||
192 | + | ||
193 | + $strConteudo = str_replace('@sigla_unidade_abertura_do_processo@', $strSiglaUnidade ,$strConteudo); | ||
194 | + $strConteudo = str_replace('@descricao_unidade_abertura_do_processo@',$objUnidadeDTO->getStrDescricao(),$strConteudo); | ||
195 | + /// $strConteudo = str_replace('@conteudo_recibo_eletronico_de_protocolo@','',$strConteudo); | ||
196 | + $strConteudo = str_replace('@documento_recibo_eletronico_de_protocolo@',$documentoDTO->getStrProtocoloDocumentoFormatado(),$strConteudo); | ||
146 | $strConteudo = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strConteudo); | 197 | $strConteudo = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strConteudo); |
147 | $strConteudo = str_replace('@descricao_orgao@',$objOrgaoDTO->getStrDescricao(),$strConteudo); | 198 | $strConteudo = str_replace('@descricao_orgao@',$objOrgaoDTO->getStrDescricao(),$strConteudo); |
148 | $strConteudo = str_replace('@sitio_internet_orgao@',$objOrgaoDTO->getStrSitioInternet(),$strConteudo); | 199 | $strConteudo = str_replace('@sitio_internet_orgao@',$objOrgaoDTO->getStrSitioInternet(),$strConteudo); |
149 | - | ||
150 | - //print_r ( $strConteudo ); die(); | 200 | + |
151 | InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strDe, $strPara, null, null, $strAssunto, $strConteudo); | 201 | InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strDe, $strPara, null, null, $strAssunto, $strConteudo); |
152 | 202 | ||
153 | } | 203 | } |
154 | - | 204 | + |
155 | //================================================================================================ | 205 | //================================================================================================ |
156 | //EMAIL PARA A UNIDADE DE ABERTURA DO PETICIONAMENTO | 206 | //EMAIL PARA A UNIDADE DE ABERTURA DO PETICIONAMENTO |
157 | //================================================================================================ | 207 | //================================================================================================ |
@@ -167,7 +217,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -167,7 +217,6 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
167 | $objEmailSistemaDTO = $objEmailSistemaRN->consultar($objEmailSistemaDTO); | 217 | $objEmailSistemaDTO = $objEmailSistemaRN->consultar($objEmailSistemaDTO); |
168 | 218 | ||
169 | if ($objEmailSistemaDTO!=null){ | 219 | if ($objEmailSistemaDTO!=null){ |
170 | - | ||
171 | $strDe = $objEmailSistemaDTO->getStrDe(); | 220 | $strDe = $objEmailSistemaDTO->getStrDe(); |
172 | $strDe = str_replace('@sigla_sistema@',SessaoSEIExterna::getInstance()->getStrSiglaSistema() ,$strDe); | 221 | $strDe = str_replace('@sigla_sistema@',SessaoSEIExterna::getInstance()->getStrSiglaSistema() ,$strDe); |
173 | $strDe = str_replace('@processo@',$strProtocoloFormatado ,$strDe); | 222 | $strDe = str_replace('@processo@',$strProtocoloFormatado ,$strDe); |
@@ -181,6 +230,7 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -181,6 +230,7 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
181 | $strAssunto = str_replace('@processo@', $strProtocoloFormatado , $strAssunto); | 230 | $strAssunto = str_replace('@processo@', $strProtocoloFormatado , $strAssunto); |
182 | 231 | ||
183 | /* | 232 | /* |
233 | + PLANILHA: | ||
184 | i. processo - número do processo. | 234 | i. processo - número do processo. |
185 | ii. tipo_processo - tipo do processo. | 235 | ii. tipo_processo - tipo do processo. |
186 | iii. nome_usuario_externo - nome do usuário externo. | 236 | iii. nome_usuario_externo - nome do usuário externo. |
@@ -193,51 +243,51 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | @@ -193,51 +243,51 @@ class EmailNotificacaoPeticionamentoRN extends InfraRN { | ||
193 | x. sigla_orgao - sigla do órgão. | 243 | x. sigla_orgao - sigla do órgão. |
194 | xi. descricao_orgao - descrição do órgão. | 244 | xi. descricao_orgao - descrição do órgão. |
195 | xii. sitio_internet_orgao - endereço do site do órgão. | 245 | xii. sitio_internet_orgao - endereço do site do órgão. |
246 | + | ||
247 | + UNIDADE - SCRIPT | ||
248 | + @processo@ | ||
249 | + | ||
250 | + @nome_usuario_externo@ | ||
251 | + @email_usuario_externo@ | ||
252 | + | ||
253 | + @tipo_peticionamento@ | ||
254 | + @sigla_unidade_abertura_do_processo@ | ||
255 | + @sigla_unidade_abertura_do_processo@ | ||
256 | + @documento_recibo_eletronico_de_protocolo@ | ||
257 | + @sigla_orgao@ | ||
258 | + @descricao_orgao@ | ||
259 | + @sitio_internet_orgao@ | ||
196 | */ | 260 | */ |
197 | - | ||
198 | $strConteudo = $objEmailSistemaDTO->getStrConteudo(); | 261 | $strConteudo = $objEmailSistemaDTO->getStrConteudo(); |
262 | + | ||
199 | $strConteudo = str_replace('@processo@',$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado(),$strConteudo); | 263 | $strConteudo = str_replace('@processo@',$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado(),$strConteudo); |
200 | - $strConteudo = str_replace('@tipo_processo@', $objTipoProcDTO->getStrNomeSerie() ,$strConteudo); | 264 | + $strConteudo = str_replace('@tipo_processo@', $objTipoProcDTO->getStrNomeProcesso() ,$strConteudo); |
201 | $strConteudo = str_replace('@nome_usuario_externo@', $strNomeContato ,$strConteudo); | 265 | $strConteudo = str_replace('@nome_usuario_externo@', $strNomeContato ,$strConteudo); |
202 | $strConteudo = str_replace('@email_usuario_externo@', $strEmailContato ,$strConteudo); | 266 | $strConteudo = str_replace('@email_usuario_externo@', $strEmailContato ,$strConteudo); |
203 | $strConteudo = str_replace('@link_login_usuario_externo@', $linkLoginUsuarioExterno ,$strConteudo); | 267 | $strConteudo = str_replace('@link_login_usuario_externo@', $linkLoginUsuarioExterno ,$strConteudo); |
204 | - $strConteudo = str_replace('@tipo_peticionamento@',$objOrgaoDTO->getStrDescricao(),$strConteudo); | 268 | + |
269 | + if ($reciboDTOBasico->getStrStaTipoPeticionamento()=="N"){ | ||
270 | + $strConteudo = str_replace('@tipo_peticionamento@',"Processo Novo",$strConteudo); | ||
271 | + }else if ($reciboDTOBasico->getStrStaTipoPeticionamento()=="I"){ | ||
272 | + $strConteudo = str_replace('@tipo_peticionamento@',"Intercorrente",$strConteudo); | ||
273 | + } | ||
274 | + | ||
205 | $strConteudo = str_replace('@sigla_unidade_abertura_do_processo@', $strSiglaUnidade ,$strConteudo); | 275 | $strConteudo = str_replace('@sigla_unidade_abertura_do_processo@', $strSiglaUnidade ,$strConteudo); |
206 | - $strConteudo = str_replace('@siglas_unidades_abertura_do_processo@', $strSiglaUnidade ,$strConteudo); | ||
207 | - | ||
208 | - $strConteudo = str_replace('@descrição_unidade_abertura_do_processo@',$objUnidadeDTO->getStrDescricao(),$strConteudo); | ||
209 | - //$strConteudo = str_replace('@conteudo_recibo_eletronico_de_protocolo@', '::: Conteudo do recibo :::' ,$strConteudo); | 276 | + $strConteudo = str_replace('@descricao_unidade_abertura_do_processo@',$objUnidadeDTO->getStrDescricao(),$strConteudo); |
277 | + ///$strConteudo = str_replace('@conteudo_recibo_eletronico_de_protocolo@','',$strConteudo); | ||
278 | + $strConteudo = str_replace('@documento_recibo_eletronico_de_protocolo@',$documentoDTO->getStrProtocoloDocumentoFormatado(),$strConteudo); | ||
210 | $strConteudo = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strConteudo); | 279 | $strConteudo = str_replace('@sigla_orgao@',$objOrgaoDTO->getStrSigla(),$strConteudo); |
211 | $strConteudo = str_replace('@descricao_orgao@',$objOrgaoDTO->getStrDescricao(),$strConteudo); | 280 | $strConteudo = str_replace('@descricao_orgao@',$objOrgaoDTO->getStrDescricao(),$strConteudo); |
212 | $strConteudo = str_replace('@sitio_internet_orgao@',$objOrgaoDTO->getStrSitioInternet(),$strConteudo); | 281 | $strConteudo = str_replace('@sitio_internet_orgao@',$objOrgaoDTO->getStrSitioInternet(),$strConteudo); |
213 | 282 | ||
214 | - /* | ||
215 | - $strConteudoFormulario = ''; | ||
216 | - $strConteudoFormulario .= 'Formulário de Ouvidoria'."\n"; | ||
217 | - $strConteudoFormulario .= DocumentoINT::formatarExibicaoConteudo(DocumentoINT::$TV_TEXTO, $strXmlFormulario); | ||
218 | - | ||
219 | - $arrConteudoFormulario = explode("\n",$strConteudoFormulario); | ||
220 | - $strConteudoFormulario = ''; | ||
221 | - | ||
222 | - foreach($arrConteudoFormulario as $linha){ | ||
223 | - $strConteudoFormulario .= '> '.$linha."\n"; | ||
224 | - } | ||
225 | - */ | ||
226 | - | ||
227 | - //$strConteudo = str_replace('@conteudo_formulario_ouvidoria@',$strConteudoFormulario,$strConteudo); | ||
228 | - //echo "segundo email :: Conteudo :: "; | ||
229 | - //echo $strConteudo; die(); | ||
230 | - | ||
231 | - | ||
232 | - | ||
233 | - $strPara = $objEmailSistemaDTO->getStrPara(); | ||
234 | - $strPara = str_replace('@processo@', $strProtocoloFormatado , $strPara); | ||
235 | - $strPara = str_replace('@email_usuario_externo@', $strEmailContato , $strPara); | ||
236 | - foreach($arrEmailUnidade as $mail){ | ||
237 | - $strPara = str_replace('@nome_contato@', $objUnidadeDTO->getStrDescricao() , $strPara); | ||
238 | - $strPara = str_replace('@email_contato@', $mail->getStrEmail() , $strPara); | ||
239 | - InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strDe, $strPara, null, null, $strAssunto, $strConteudo); | ||
240 | - } | 283 | + foreach($arrEmailUnidade as $mail){ |
284 | + $strPara = $objEmailSistemaDTO->getStrPara(); | ||
285 | + $strPara = str_replace('@processo@', $strProtocoloFormatado , $strPara); | ||
286 | + //$strPara = str_replace('@email_usuario_externo@', $strEmailContato , $strPara); | ||
287 | + //$strPara = str_replace('@nome_contato@', $objUnidadeDTO->getStrDescricao() , $strPara); | ||
288 | + $strPara = str_replace('@emails_unidade@', $mail->getStrEmail() , $strPara); | ||
289 | + InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strDe, $strPara, null, null, $strAssunto, $strConteudo); | ||
290 | + } | ||
241 | } | 291 | } |
242 | } | 292 | } |
243 | } | 293 | } |
sei/institucional/peticionamento/rn/ProcessoPeticionamentoRN.php
@@ -58,7 +58,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -58,7 +58,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
58 | protected function gerarProcedimentoControlado( $arrParametros ){ | 58 | protected function gerarProcedimentoControlado( $arrParametros ){ |
59 | 59 | ||
60 | try { | 60 | try { |
61 | - | 61 | + |
62 | $idTipoProc = $arrParametros['id_tipo_procedimento']; | 62 | $idTipoProc = $arrParametros['id_tipo_procedimento']; |
63 | $objTipoProcDTO = new TipoProcessoPeticionamentoDTO(); | 63 | $objTipoProcDTO = new TipoProcessoPeticionamentoDTO(); |
64 | $objTipoProcDTO->retTodos(true); | 64 | $objTipoProcDTO->retTodos(true); |
@@ -130,7 +130,8 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -130,7 +130,8 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
130 | } | 130 | } |
131 | 131 | ||
132 | //verificar se esta vindo o array de participantes | 132 | //verificar se esta vindo o array de participantes |
133 | - if( $objTipoProcDTO->getStrSinIIProprioUsuarioExterno() == 'N' && | 133 | + //participantes selecionados via pop up OU indicados diretamente por CPF/CNPJ |
134 | + else if( $objTipoProcDTO->getStrSinIIProprioUsuarioExterno() == 'N' && | ||
134 | isset( $arrParametros['hdnListaInteressados'] ) && | 135 | isset( $arrParametros['hdnListaInteressados'] ) && |
135 | $arrParametros['hdnListaInteressados'] != "" ){ | 136 | $arrParametros['hdnListaInteressados'] != "" ){ |
136 | 137 | ||
@@ -145,7 +146,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -145,7 +146,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
145 | 146 | ||
146 | $arrParticipantesParametro = $this->atribuirParticipantes($objProtocoloDTO, $this->montarArrContatosInteressados( $idsContatos ) ); | 147 | $arrParticipantesParametro = $this->atribuirParticipantes($objProtocoloDTO, $this->montarArrContatosInteressados( $idsContatos ) ); |
147 | 148 | ||
148 | - } | 149 | + } |
149 | 150 | ||
150 | $objProtocoloDTO->setArrObjObservacaoDTO( array() ); | 151 | $objProtocoloDTO->setArrObjObservacaoDTO( array() ); |
151 | 152 | ||
@@ -181,8 +182,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -181,8 +182,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
181 | 182 | ||
182 | $this->montarArrDocumentos( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, $arrParticipantesParametro, $reciboDTOBasico ); | 183 | $this->montarArrDocumentos( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, $arrParticipantesParametro, $reciboDTOBasico ); |
183 | 184 | ||
184 | - //$this->enviarProcedimentoUnidade($objProcedimentoDTO); | ||
185 | - | ||
186 | $arrParams = array(); | 185 | $arrParams = array(); |
187 | $arrParams[0] = $arrParametros; | 186 | $arrParams[0] = $arrParametros; |
188 | $arrParams[1] = $objUnidadeDTO; | 187 | $arrParams[1] = $objUnidadeDTO; |
@@ -206,11 +205,33 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -206,11 +205,33 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
206 | $emailNotificacaoPeticionamentoRN->notificaoPeticionamentoExterno( $arrParams ); | 205 | $emailNotificacaoPeticionamentoRN->notificaoPeticionamentoExterno( $arrParams ); |
207 | } catch( Exception $exEmail ){} | 206 | } catch( Exception $exEmail ){} |
208 | 207 | ||
209 | - // obtendo a ultima atividade informada para o processo, para marcar como nao visualizada, | ||
210 | - // deixando assim o processo marcado como "vermelho" (status de Nao Visualizado) na listagem da tela "Controle de processos" | 208 | + //obter todos os documentos deste processo |
209 | + $documentoRN = new DocumentoRN(); | ||
210 | + $documentoListaDTO = new DocumentoDTO(); | ||
211 | + $documentoListaDTO->retDblIdDocumento(); | ||
212 | + $documentoListaDTO->setDblIdProcedimento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
213 | + $arrDocsProcesso = $documentoRN->listarRN0008( $documentoListaDTO ); | ||
211 | 214 | ||
212 | $atividadeRN = new AtividadeRN(); | 215 | $atividadeRN = new AtividadeRN(); |
213 | $atividadeBD = new AtividadeBD( $this->getObjInfraIBanco() ); | 216 | $atividadeBD = new AtividadeBD( $this->getObjInfraIBanco() ); |
217 | + | ||
218 | + //removendo as tarefas do tipo "Disponibilizado acesso externo para @INTERESSADO@" | ||
219 | + foreach( $arrDocsProcesso as $DocumentoProcessoDTO ){ | ||
220 | + | ||
221 | + $objAtividadeDTOLiberacao = new AtividadeDTO(); | ||
222 | + $objAtividadeDTOLiberacao->retTodos(); | ||
223 | + $objAtividadeDTOLiberacao->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
224 | + //$objAtividadeDTOLiberacao->setNumIdUnidade( $idUnidade ); | ||
225 | + $objAtividadeDTOLiberacao->setNumIdTarefa(TarefaRN::$TI_ACESSO_EXTERNO_SISTEMA); | ||
226 | + | ||
227 | + $arrDTOAtividades = $atividadeRN->listarRN0036( $objAtividadeDTOLiberacao ); | ||
228 | + $atividadeRN->excluirRN0034( $arrDTOAtividades ); | ||
229 | + | ||
230 | + } | ||
231 | + | ||
232 | + // obtendo a ultima atividade informada para o processo, para marcar | ||
233 | + // como nao visualizada, deixando assim o processo marcado como "vermelho" | ||
234 | + // (status de Nao Visualizado) na listagem da tela "Controle de processos" | ||
214 | $atividadeDTO = new AtividadeDTO(); | 235 | $atividadeDTO = new AtividadeDTO(); |
215 | $atividadeDTO->retTodos(); | 236 | $atividadeDTO->retTodos(); |
216 | $atividadeDTO->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | 237 | $atividadeDTO->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); |
@@ -288,7 +309,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -288,7 +309,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
288 | $objTipoProcDTO = $objTipoProcRN->consultar( $objTipoProcDTO ); | 309 | $objTipoProcDTO = $objTipoProcRN->consultar( $objTipoProcDTO ); |
289 | 310 | ||
290 | $protocoloRN = new ProtocoloPeticionamentoRN(); | 311 | $protocoloRN = new ProtocoloPeticionamentoRN(); |
291 | - //$numeroDocumento = $protocoloRN->gerarNumeracaoDocumento(); | ||
292 | 312 | ||
293 | } | 313 | } |
294 | 314 | ||
@@ -319,7 +339,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -319,7 +339,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
319 | $arrAnexoPrincipalVinculacaoProcesso = array(); | 339 | $arrAnexoPrincipalVinculacaoProcesso = array(); |
320 | $arrLinhasAnexos = PaginaSEI::getInstance()->getArrItensTabelaDinamica( $arrParametros['hdnDocPrincipal'] ); | 340 | $arrLinhasAnexos = PaginaSEI::getInstance()->getArrItensTabelaDinamica( $arrParametros['hdnDocPrincipal'] ); |
321 | $contador = 0; | 341 | $contador = 0; |
322 | - //$objDocumentoRN = new DocumentoRN(); | ||
323 | 342 | ||
324 | foreach( $arrAnexoDocPrincipal as $itemAnexo ){ | 343 | foreach( $arrAnexoDocPrincipal as $itemAnexo ){ |
325 | 344 | ||
@@ -378,6 +397,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -378,6 +397,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
378 | $objDocumentoDTO->setNumVersaoLock(0); | 397 | $objDocumentoDTO->setNumVersaoLock(0); |
379 | 398 | ||
380 | $arrObjUnidadeDTOReabertura = array(); | 399 | $arrObjUnidadeDTOReabertura = array(); |
400 | + | ||
381 | //se setar array da unidade pode cair na regra: "Unidade <nome-Unidade> não está sinalizada como protocolo." | 401 | //se setar array da unidade pode cair na regra: "Unidade <nome-Unidade> não está sinalizada como protocolo." |
382 | //nao esta fazendo reabertura de processo - trata-se de processo novo | 402 | //nao esta fazendo reabertura de processo - trata-se de processo novo |
383 | //$arrObjUnidadeDTOReabertura[] = $objUnidadeDTO; | 403 | //$arrObjUnidadeDTOReabertura[] = $objUnidadeDTO; |
@@ -605,14 +625,12 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -605,14 +625,12 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
605 | 625 | ||
606 | //ANEXOS | 626 | //ANEXOS |
607 | $objProtocoloDTO->setArrObjAnexoDTO( array() ); | 627 | $objProtocoloDTO->setArrObjAnexoDTO( array() ); |
608 | - //$objProtocoloDTO->setArrObjAnexoDTO(AnexoINT::processarRI0872($_POST['hdnAnexos'])); | ||
609 | - | ||
610 | - $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); | ||
611 | 628 | ||
629 | + $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); | ||
612 | $objDocumentoDTO->setNumIdTextoPadraoInterno(''); | 630 | $objDocumentoDTO->setNumIdTextoPadraoInterno(''); |
613 | - $objDocumentoDTO->setStrProtocoloDocumentoTextoBase(''); | ||
614 | - | 631 | + $objDocumentoDTO->setStrProtocoloDocumentoTextoBase(''); |
615 | $objDocumentoDTO->setNumIdSerie( $idSerieAnexo ); | 632 | $objDocumentoDTO->setNumIdSerie( $idSerieAnexo ); |
633 | + | ||
616 | $objProtocoloDTO->setNumIdSerieDocumento( $idSerieAnexo ); | 634 | $objProtocoloDTO->setNumIdSerieDocumento( $idSerieAnexo ); |
617 | 635 | ||
618 | $objDocumentoDTO = $objDocumentoRN->receberRN0991($objDocumentoDTO); | 636 | $objDocumentoDTO = $objDocumentoRN->receberRN0991($objDocumentoDTO); |
@@ -628,7 +646,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -628,7 +646,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
628 | $itemAnexo->setNumTamanho( (int)$strTamanho ); | 646 | $itemAnexo->setNumTamanho( (int)$strTamanho ); |
629 | $itemAnexo->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | 647 | $itemAnexo->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); |
630 | $itemAnexo->setStrSinAtivo('S'); | 648 | $itemAnexo->setStrSinAtivo('S'); |
631 | - //print_r( $itemAnexo ); die(); | ||
632 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); | 649 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); |
633 | 650 | ||
634 | $this->assinarETravarDocumento( $objUnidadeDTO, $arrParametros, $objDocumentoDTO, $objProcedimentoDTO ); | 651 | $this->assinarETravarDocumento( $objUnidadeDTO, $arrParametros, $objDocumentoDTO, $objProcedimentoDTO ); |
@@ -818,7 +835,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -818,7 +835,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
818 | foreach( $arrAnexos as $anexoDTOVinculado){ | 835 | foreach( $arrAnexos as $anexoDTOVinculado){ |
819 | 836 | ||
820 | $anexoBD = new AnexoBD( $this->getObjInfraIBanco() ); | 837 | $anexoBD = new AnexoBD( $this->getObjInfraIBanco() ); |
821 | - //$anexoDTOVinculado->setDblIdProtocolo( $documentoReciboDTO->getDblIdDocumento() ); | ||
822 | $anexoBD->alterar( $anexoDTOVinculado ); | 838 | $anexoBD->alterar( $anexoDTOVinculado ); |
823 | 839 | ||
824 | $reciboAnexoDTO = new ReciboDocumentoAnexoPeticionamentoDTO(); | 840 | $reciboAnexoDTO = new ReciboDocumentoAnexoPeticionamentoDTO(); |
@@ -838,8 +854,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -838,8 +854,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
838 | $arrParticipantesParametro, | 854 | $arrParticipantesParametro, |
839 | $arrParametros ){ | 855 | $arrParametros ){ |
840 | 856 | ||
841 | - //print_r( $arrParticipantesParametro ); die; | ||
842 | - $protocoloRN = new ProtocoloPeticionamentoRN(); | 857 | + $protocoloRN = new ProtocoloPeticionamentoRN(); |
843 | $numeroDocumento = $protocoloRN->gerarNumeracaoDocumento(); | 858 | $numeroDocumento = $protocoloRN->gerarNumeracaoDocumento(); |
844 | 859 | ||
845 | $nivelAcessoDocPrincipal = $arrParametros['nivelAcessoDocPrincipal']; | 860 | $nivelAcessoDocPrincipal = $arrParametros['nivelAcessoDocPrincipal']; |
@@ -1100,41 +1115,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -1100,41 +1115,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
1100 | $objParticipanteDTO->setNumIdContato( $objInteressado->getNumIdContato() ); | 1115 | $objParticipanteDTO->setNumIdContato( $objInteressado->getNumIdContato() ); |
1101 | $arrObjParticipantesDTO[] = $objParticipanteDTO; | 1116 | $arrObjParticipantesDTO[] = $objParticipanteDTO; |
1102 | } | 1117 | } |
1103 | - | ||
1104 | - //TODO remover para evitar participante duplicado | ||
1105 | - //usuario logado NAO é participante por default exceto | ||
1106 | - //no caso da parametrizaçao "Proprio Usuario Externo" | ||
1107 | - //obter objeto Contato do usuario logado | ||
1108 | - /* | ||
1109 | - $idUsuarioExterno = SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno(); | ||
1110 | - | ||
1111 | - $objUsuarioDTO = new UsuarioDTO(); | ||
1112 | - $objUsuarioDTO->retTodos(); | ||
1113 | - $objUsuarioDTO->setNumIdUsuario( $idUsuarioExterno ); | ||
1114 | - $objUsuarioRN = new UsuarioRN(); | ||
1115 | - $objUsuarioDTO = $objUsuarioRN->consultarRN0489( $objUsuarioDTO ); | ||
1116 | - $idContatoUsuario = $objUsuarioDTO->getNumIdContato(); | ||
1117 | - | ||
1118 | - $contatoRN = new ContatoRN(); | ||
1119 | - $contatoDTO = new ContatoDTO(); | ||
1120 | - $contatoDTO->retTodos(); | ||
1121 | - $contatoDTO->setNumIdContato( $idContatoUsuario ); | ||
1122 | - $contatoDTO = $contatoRN->consultarRN0324( $contatoDTO ); | ||
1123 | - | ||
1124 | - $objParticipanteDTO = new ParticipanteDTO(); | ||
1125 | - $objParticipanteDTO->setStrSiglaContato($contatoDTO->getStrSigla()); | ||
1126 | - $objParticipanteDTO->setStrNomeContato($contatoDTO->getStrNome()); | ||
1127 | - $objParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_REMETENTE); | ||
1128 | - | ||
1129 | - if( $i == 0) { | ||
1130 | - $objParticipanteDTO->setNumSequencia($i); | ||
1131 | - } else if( $i > 0 ){ | ||
1132 | - $objParticipanteDTO->setNumSequencia($i++); | ||
1133 | - } | ||
1134 | - | ||
1135 | - $arrObjParticipantesDTO[] = $objParticipanteDTO; | ||
1136 | - */ | ||
1137 | - | 1118 | + |
1138 | $arrObjParticipanteDTO = $this->prepararParticipantes($arrObjParticipantesDTO); | 1119 | $arrObjParticipanteDTO = $this->prepararParticipantes($arrObjParticipantesDTO); |
1139 | $objProtocoloDTO->setArrObjParticipanteDTO($arrObjParticipantesDTO); | 1120 | $objProtocoloDTO->setArrObjParticipanteDTO($arrObjParticipantesDTO); |
1140 | return $arrObjParticipantesDTO; | 1121 | return $arrObjParticipantesDTO; |
@@ -1401,7 +1382,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -1401,7 +1382,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
1401 | $tamanhoDoAnexo = floatval($tamanhoDoAnexo*1024); | 1382 | $tamanhoDoAnexo = floatval($tamanhoDoAnexo*1024); |
1402 | } | 1383 | } |
1403 | 1384 | ||
1404 | - //echo $tamanhoDoAnexo; die; | ||
1405 | $objAnexoDTO = new AnexoDTO(); | 1385 | $objAnexoDTO = new AnexoDTO(); |
1406 | $objAnexoDTO->setNumIdAnexo( null ); | 1386 | $objAnexoDTO->setNumIdAnexo( null ); |
1407 | $objAnexoDTO->setStrSinAtivo('S'); | 1387 | $objAnexoDTO->setStrSinAtivo('S'); |