✏️ 正在编辑: PropostaCorretor.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/PropostaCorretor.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_PropostaCorretor extends Form_Proposta { public function init() { parent::init(); $this->removeElement('fax'); $this->removeElement('subestabelecido_id'); if ($this->getElement('valor_beneficio')) { $this->getElement('valor_beneficio') ->setLabel('Renda (R$)'); } $this->getElement('valor_bruto') ->setLabel('Valor Solicitado (R$):'); $this->getElement('valor_liquido') ->setRequired(false) ->setAttrib('class', ''); $this->getElement('btn_save') ->setLabel("Enviar Proposta"); $this->getElement('btn_new') ->setLabel("Digitar Nova Proposta"); $this->removeElement('btn_enviar_capa_email'); $this->removeElement('btn_enviar_capa_wp'); $this->addDisplayGroup(array( 'nome', 'cpf', 'rg', 'orgao_expedidor', 'data_expedicao', 'data_nascimento', 'naturalidade', 'uf_expedidor', 'nome_pai', 'nome_mae', 'conjuge', 'endereco', 'complemento', 'bairro', 'cidade', 'uf', 'cep', 'celular', 'fone', 'telefone_comercial', 'email', 'senha_contracheque', ), 'dados_tomador', array( 'legend' => 'Dados do tomador' )); $ns = new Zend_Session_Namespace(); if( Yuppie_Auth::getIdentity()->grupo == 'Callcenter' && !$ns->acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, "digitacao-simplificada-proposta")){ $tomador = $this->getDisplayGroup("dados_tomador"); $tomador->addElement($this->getElement("digitado_banco")); } $params = $this->_getParams(); $digitadoBanco = null; if (isset($params['id']) && $params['id'] > 0 && Yuppie_Auth::getIdentity()->grupo == 'Corretor') { $digitadoBanco = (new Model_DbTable_Proposta())->fetchRow(['id = ?' => $params['id']])->digitado_banco; $this->addElement('hidden', 'digitado_banco', ['value' => $digitadoBanco]); } if ($digitadoBanco == 7) { $this->addElement('button', "btn_aprovar", [ 'label' => 'Aprovar proposta', 'class' => 'btn_aprovar', 'onclick' => "aprovarPropostas()" ]); $this->removeElement('btn_save'); $this->removeElement('btn_efetivar'); $this->removeElement('btn_analise_fraude'); $this->removeElement('btn_link_anexos'); $this->removeElement('btn_enviar_link_anexos'); } $this->addDisplayGroup(array( 'numero_beneficio', 'valor_beneficio', 'especie', 'numero_contrato', 'banco_id', 'convenio_id', 'tipo', 'tabela_id', 'produto', 'data_emissao', 'valor_liquido', 'valor_bruto', 'prazo', 'valor_prestacao', 'forma_liberacao', 'banco_beneficiado', 'agencia_beneficiado', 'operacao_beneficiado', 'conta_beneficiado', 'midia_origem_id', 'tipo_formalizacao', 'captador_id', 'beneficiado_recebe_cartao' ), 'dados_liberacao', array( 'legend' => 'Dados para liberação' )); $this->addDisplayGroup(array( 'tipo_id', 'arquivo', 'adicionar', 'corretor_id', 'digitador', 'empresa_id', 'obs', ), 'dados_agente', array( 'legend' => 'Dados do agente' )); $this->removeDisplayGroup('buttons'); $this->addDisplayGroup(array( 'btn_back', 'btn_aprovar', 'btn_save', 'btn_new', 'btn_efetivar', 'btn_analise_fraude', 'btn_link_anexos', 'btn_enviar_link_anexos' ), 'buttons'); foreach ( $this->getDisplayGroups() as $displayGroup ) { $displayGroup->removeDecorator('DtDdWrapper'); $displayGroup->removeDecorator('HtmlTag'); if( $displayGroup->getName() == 'buttons' ){ foreach ( $displayGroup->getElements() as $element ) { $element->setDecorators(array( 'ViewHelper' )); } } } $idCorretor = isset(Yuppie_Auth::getIdentity()->corretor_id) && Yuppie_Auth::getIdentity()->corretor_id > 0 ? Yuppie_Auth::getIdentity()->corretor_id : Yuppie_Auth::getIdentity()->id; $this->getElement('corretor_id')->setValue($idCorretor); } }
💾 保存文件
← 返回文件管理器