✏️ 正在编辑: PropostaCorretorEmprestimoPessoal.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/PropostaCorretorEmprestimoPessoal.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_PropostaCorretorEmprestimoPessoal extends Form_Proposta { public function init() { parent::init(); if(Yuppie_Auth::getIdentity()->grupo == 'Corretor'){ $this->_ajustarCampos(); } $this->getElement('btn_back')->setAttrib('onclick', "window.location='" . $this->getView()->baseUrl() . "/emprestimo-pessoal'"); $this->getElement('btn_new')->setAttrib('onclick', "window.location='" . $this->getView()->baseUrl() . "/emprestimo-pessoal/save'"); $this->getElement('corretor_id')->setValue(Yuppie_Auth::getIdentity()->id); $this->addElement('hidden', 'status_anexo', array('value' => "Aguardando")); $this->addElement('hidden', 'status_anexo_corretor', array('value' => "Aguardando")); } private function _ajustarCampos(){ $this->removeElement('conjuge'); $this->removeElement('email'); $this->removeElement('celular'); $this->removeElement('fax'); $this->removeElement('fone'); $this->removeElement('telefone_comercial'); $this->removeElement('senha_contracheque'); $this->removeElement('digitador'); $this->removeElement('numero_contrato'); $this->removeElement('valor_liquido'); $this->removeElement('produto'); $this->removeElement('subestabelecido_id'); $this->removeElement('codigo_especie'); $this->removeElement('banco_beneficiado'); $this->removeElement('especie'); $this->removeElement('empresa_id'); $this->removeElement('btn_efetivar'); $this->addElement('select', 'estado_civil', array( 'label' => 'Estado Cívil:', 'multiOptions' => Core_Combos::getEstadoCivilOptions() )); $this->addElement('text', 'numero_dependentes', array( 'label' => 'Nº Dependentes:', 'size' => 10, 'maxLength' => 10, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('select', 'compoe_renda', array( 'label' => 'Cônjuge Compõe Renda?', 'multiOptions' => Core_Combos::getSimNaoOptions() )); $this->addElement('select', 'tipo_moradia', array( 'label' => 'Tipo de Moradia', 'multiOptions' => Core_Combos::getTipoMoradiaOptions() )); $select = new Zend_Form_Element_Select('forma_liberacao'); $select->setLabel('Tipo da Conta:') ->addMultiOptions(Core_Combos::getFormasLiberacaoOptions()) ->setAttrib('class', 'not_multiselect'); $this->addElement($select); $this->getElement('valor_bruto')->setLabel('Valor Solicitado (R$):'); $this->getElement('btn_save')->setLabel("Enviar Proposta"); $this->getElement('btn_new')->setLabel("Digitar Nova Proposta"); //Dados Profissionais $this->addElement('text', 'empresa_beneficiado', array( 'label' => 'Empresa:' )); $this->addElement('text', 'profissao', array( 'label' => 'Profissão:' )); $this->addElement('text', 'renda', array( 'label' => 'Renda Líquida (R$):', 'size' => 10, 'onkeypress' => 'mascara(this, mvalor)' )); $this->addElement('text', 'anos_servicos', array( 'label' => 'Anos de Serviço:', 'size' => 10, 'maxLength' => 10, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('text', 'meses_servicos', array( 'label' => 'Meses de Serviço:', 'size' => 10, 'maxLength' => 10, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('select', 'tipo_comprovante', array( 'label' => 'Tipo de Comprovante:', 'multiOptions' => Core_Combos::getTipoDeComprovateOptions() )); $this->addElement('text', 'orgao_pagador', array( 'label' => 'Orgão Pagador:' )); $this->addDisplayGroup(array( 'nome', 'cpf', 'rg', 'orgao_expedidor', 'data_expedicao', 'data_nascimento', 'naturalidade', 'uf_expedidor', 'nome_pai', 'nome_mae', 'estado_civil', 'numero_dependentes', 'compoe_renda', 'endereco', 'complemento', 'bairro', 'cidade', 'uf', 'cep', 'tipo_moradia' ), 'dados_tomador', array( 'legend' => 'Dados do tomador' )); $this->addDisplayGroup(array( 'banco_id', 'convenio_id', 'tipo', 'tabela_id', 'data_emissao', 'valor_bruto', 'prazo', 'valor_prestacao', 'agencia_beneficiado', 'conta_beneficiado', 'operacao_beneficiado', 'forma_liberacao' ), 'dados_liberacao', array( 'legend' => 'Dados para liberação' )); $this->addDisplayGroup(array( 'empresa_beneficiado', 'profissao', 'renda', 'anos_servicos', 'meses_servicos', 'tipo_comprovante', 'orgao_pagador', 'numero_beneficio' ), 'dados_profissionais', array( 'legend' => 'Dados Profissionais' )); $this->_setTiposEmprestimoPessoal(); $this->addDisplayGroup(array( 'tipo_id', 'arquivo', 'adicionar', 'corretor_id', 'empresa_id', 'obs',), 'dados_agente', array( 'legend' => 'Anexos' )); $this->removeDisplayGroup('buttons'); $this->addDisplayGroup(array( 'btn_back', 'btn_save', 'btn_new', 'btn_analise_fraude', ), 'buttons'); $this->_setButtonDecoratoros(); } private function _setTiposEmprestimoPessoal(){ $comboTipoAnexo = $this->getElement('tipo_id'); foreach ($comboTipoAnexo->options as $key => $value){ if(in_array($value, array('Capa do contrato','Formulário digitalizado'))){ unset($comboTipoAnexo->options[$key]); } } } private function _setButtonDecoratoros() { foreach ( $this->getDisplayGroups() as $displayGroup ) { $displayGroup->removeDecorator('DtDdWrapper'); $displayGroup->removeDecorator('HtmlTag'); if( $displayGroup->getName() == 'buttons' ){ foreach ( $displayGroup->getElements() as $element ) { $element->setDecorators(array( 'ViewHelper' )); } } } } }
💾 保存文件
← 返回文件管理器