✏️ 正在编辑: PropostaCliente.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/PropostaCliente.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_PropostaCliente extends Core_Form { public function init() { $this->setName('f_proposta_cliente'); $this->addElement('hidden', 'id'); $this->addElement('hidden', 'corretor_id'); $this->addElement('hidden', 'empresa_id'); $select = new Zend_Form_Element_Select('tipo_operacao'); $select->setLabel('Tipo Operação:') ->setRequired(true) ->addMultiOptions([ '', 'NOVO' => 'NOVO', 'REFINANCIAMENTO' => 'REFINANCIAMENTO', 'CARTÃO' => 'CARTÃO', 'PORTABILIDADE' => 'PORTABILIDADE' ]) ->setAttrib('class', "input-style-6") ->setAttrib('onchange', "exibirFormProposta()"); $this->addElement($select); $select = new Zend_Form_Element_Select('banco_id'); $select->setLabel('Escolha um Banco:') ->setRequired(true) ->addMultiOptions(Core_Combos::getBancosOptions()); $this->addElement($select); $this->addDisplayGroup([ 'tipo_operacao', 'banco_id', ], 'inicio', [ 'legend' => 'Informe para iniciar', 'class' => 'group-inputs' ]); $this->addElement('text', 'nome', [ 'label' => 'Nome Completo:', 'required' => true, 'size' => 80, 'class' => 'input-style-6' ]); $this->addElement('text', 'cpf', [ 'label' => 'CPF:', 'required' => true, 'onkeypress' => 'mascara(this, fcpf)', 'maxlength' => 14, 'validators' => [new Validators_Cpf()], 'class' => 'input-style-6' ]); $this->addElement('text', 'data_nascimento', [ 'label' => 'Data Nascimento:', 'required' => true, 'onkeypress' => 'mascara(this, data)', 'maxlength' => 10, 'validators' => [new Validators_DataNascimento()], 'size' => 11, 'class' => 'input-style-6' ]); $this->addElement('text', 'endereco', [ 'label' => 'Endereço:', 'required' => true, 'size' => 50, 'class' => 'input-style-6' ]); $this->addElement('text', 'bairro', [ 'label' => 'Bairro:', 'required' => true, 'size' => 20, 'class' => 'input-style-6' ]); $this->addElement('text', 'cidade', [ 'label' => 'Cidade:', 'required' => true, 'size' => 14, 'class' => 'input-style-6' ]); $select = new Zend_Form_Element_Select('uf'); $select->setLabel('UF:') ->setRequired(true) ->addMultiOptions(Core_Combos::getUfOptions()); $this->addElement($select); $this->addElement('text', 'cep', [ 'label' => 'CEP:', 'maxlength' => 8, 'size' => 8, 'class' => 'input-style-6' ]); $this->addElement('text', 'email', [ 'label' => 'E-mail:', 'size' => 38, 'validators' => array( 'EmailAddress' ), 'class' => 'input-style-6' ]); $this->addElement('text', 'celular', [ 'label' => 'Celular:', 'required' => true, 'onkeypress' => 'mascara(this, telefone)', 'maxlength' => 15, 'class' => 'input-style-6' ]); $this->addDisplayGroup([ 'nome', 'cpf', 'data_nascimento', 'cep', 'endereco', 'bairro', 'cidade', 'uf', 'celular', 'email', ], 'dados_tomador_cliente', [ 'legend' => 'DADOS DO BENEFICIÁRIO', 'class' => 'group-inputs hidden' ]); $this->addElement('text', 'prazo', [ 'label' => 'Nº Parcelas:', 'required' => true, 'size' => 4, 'onkeypress' => 'mascara(this, soNumeros)', 'class' => 'input-style-6' ]); $this->addElement('text', 'valor_bruto', [ 'label' => 'Valor Desejado:', 'onkeypress' => 'mascara(this, mvalor)', 'required' => true, 'size' => 9, 'class' => 'input-style-6' ]); $select = new Zend_Form_Element_Select('banco_beneficiado'); $select->setLabel('Banco que recebe benefício:') ->addMultiOptions(Core_Combos::getBancosFebrabanOptions()); $this->addElement($select); $this->addElement('text', 'agencia_beneficiado', [ 'label' => 'Agência:', 'size' => 4, 'class' => 'input-style-6' ]); $this->addElement('text', 'conta_beneficiado', [ 'label' => 'Conta:', 'size' => 9, 'class' => 'input-style-6' ]); $this->addDisplayGroup([ 'prazo', 'valor_bruto', 'banco_beneficiado', 'agencia_beneficiado', 'conta_beneficiado', ], 'dados_proposta_cliente', [ 'legend' => 'Dados da Proposta', 'class' => 'group-inputs hidden' ]); $this->addElement('text', 'data_agendamento_proposta', [ 'label' => 'Data Agendamento:', 'onkeypress' => 'mascara(this, data)', 'maxlength' => 10, 'size' => 11, 'class' => 'input-style-6' ]); $this->addElement('text', 'hora_agendada', array( 'label' => 'Hora Agendamento:', 'onkeypress' => 'mascara(this, hora)', 'maxlength' => 5, 'size' => 4, 'class' => 'input-style-6' )); $this->addDisplayGroup([ 'data_agendamento_proposta', 'hora_agendada', ], 'dados_agendamento_cliente', [ 'legend' => 'Agendamento para assinatura de contrato', 'class' => 'group-inputs hidden' ]); $select = new Zend_Form_Element_Select('anterior_banco'); $select->setLabel('Banco à portar:') ->addMultiOptions(Core_Combos::getBancosFebrabanOptions()); $this->addElement($select); $this->addElement('text', 'anterior_prazo', [ 'label' => 'Prazo do contrato à portar:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 2, 'class' => 'input-style-6' ]); $this->addElement('text', 'anterior_parcelas_restantes', [ 'label' => 'Parcelas restantes:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 2, 'class' => 'input-style-6' ]); $this->addElement('text', 'anterior_saldo_devedor', [ 'label' => 'Saldo devedor:', 'onkeypress' => 'mascara(this, mvalor)', 'size' => 8, 'class' => 'input-style-6' ]); $this->addElement('text', 'anterior_numero', [ 'label' => 'Nº Contrato à portar:', 'size' => 8, 'class' => 'input-style-6' ]); $this->addElement('text', 'anterior_valor_parcela', [ 'label' => 'Valor parcela anterior(R$):', 'onkeypress' => 'mascara(this, mvalor)', 'size' => 8, 'class' => 'input-style-6' ]); $this->addDisplayGroup([ 'anterior_banco', 'anterior_prazo', 'anterior_parcelas_restantes', 'anterior_saldo_devedor', 'anterior_numero', 'anterior_valor_parcela', ], 'dados_portabilidade_cliente', [ 'legend' => 'Para Portabilidade Informe', 'class' => 'group-inputs hidden' ]); $this->addElement('submit', 'btn_save_cliente', [ 'label' => 'Enviar Proposta', 'class' => 'btn btn-radius-2 btn--blue-2 hidden' ]); $this->addDisplayGroup(['btn_save_cliente'], 'buttons'); } public function populate(array $values) { if (!empty($values['data_nascimento'])) { $values['data_nascimento'] = date('d/m/Y', strtotime($values['data_nascimento'])); } return parent::populate($values); } public function ocutarCampo(string $campoId, string $valor = null) { $this->removeElement($campoId); $this->addElement('hidden', $campoId); $this->getElement($campoId)->setValue($valor); return $this; } }
💾 保存文件
← 返回文件管理器