✏️ 正在编辑: BancoMeuLayout.php
路径:
/srv/systems_dir/yuppiecred/application/forms/BancoMeuLayout.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_BancoMeuLayout extends Core_Form { public function init() { $this->setName('f_layout_banco'); $this->addElement('text', 'numero_contrato', array( 'label' => 'Nº CONTRATO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'prazo', array( 'label' => 'PRAZO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'valor_liquido', array( 'label' => 'VALOR LÍQUIDO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'valor_bruto', array( 'label' => 'VALOR BRUTO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'data_emissao', array( 'label' => 'DATA EMISSÃO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'data_liberacao', array( 'label' => 'DATA LIBERAÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'numero_ade', array( 'label' => 'Nº ADE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'forma_liberacao', array( 'label' => 'FORMA LIBERACAO', 'class' => 'not_multiselect', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'convenio', array( 'label' => 'CONVENIO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'codigo_convenio', array( 'label' => 'CÓDIGO CONVÊNIO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'tabela', array( 'label' => 'TABELA', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'codigo_tabela', array( 'label' => 'CÓDIGO TABELA', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'nome_produto', array( 'label' => 'NOME PRODUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'produto', array( 'label' => 'CODIGO PRODUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'tipo_contrato', array( 'label' => 'TIPO PRODUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] )); $this->addElement('text', 'tipo_formalizacao', [ 'label' => 'TIPO FORMALIZAÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'nome_cliente', array( 'label' => 'NOME CLIENTE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'cpf_cliente', array( 'label' => 'CPF CLIENTE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'celular', array( 'label' => 'CELULAR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'fone', array( 'label' => 'TEL. FIXO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'data_nascimento', array( 'label' => 'DATA NASCIMENTO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'endereco', array( 'label' => 'ENDERECO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'numero', array( 'label' => 'NUMERO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'complemento', array( 'label' => 'COMPLEMENTO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'bairro', array( 'label' => 'BAIRRO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'cidade', array( 'label' => 'CIDADE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'uf', array( 'label' => 'UF', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'cep', array( 'label' => 'CEP', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'rg', array( 'label' => 'RG', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'orgao_expedidor', array( 'label' => 'ORGAO EXPEDIDOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'uf_expedidor', array( 'label' => 'UF EXPEDIDOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'data_expedicao', array( 'label' => 'DATA EXPEDIDOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'banco_beneficiado', array( 'label' => 'BANCO BENEFICIADO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'agencia_beneficiado', array( 'label' => 'AGÊNCIA BENEFICIADO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'conta_beneficiado', array( 'label' => 'CONTA BENEFICIADO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'corretor_id', array( 'label' => 'ID CORRETOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'digitador', array( 'label' => 'DIGITADOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'codigo_agente', array( 'label' => 'CÓDIGO AGENTE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'cpf_agente', array( 'label' => 'CPF AGENTE', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'status_proposta', array( 'label' => 'STATUS PROPOSTA', 'class' => 'not_multiselect', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'comissao_corretor', array( 'label' => 'COMISSÃO CORRETOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'bonus_corretor', array( 'label' => 'BÔNUS CORRETOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'comissao_empresa', array( 'label' => 'COMISSÃO EMPRESA', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'bonus_empresa', array( 'label' => 'BÔNUS EMPRESA', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'diferimento_corretor', array( 'label' => 'DIFERIMENTO CORRETOR', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'numero_beneficio', array( 'label' => 'NÚMERO BENEFÍCIO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'valor_prestacao', array( 'label' => 'VALOR PARCELA', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'banco', array( 'label' => 'BANCO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'obs', array( 'label' => 'OBS', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'data_recebimento_comissao', array( 'label' => 'DATA RECEB. COMISSÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => array( 'layout' => true ) )); $this->addElement('text', 'taxa_contrato', [ 'label' => 'TAXA CONTRATO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'srcc', [ 'label' => 'SRCC', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'midia_origem', [ 'label' => 'MÍDIA ORIGEM', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'especie', [ 'label' => 'ESPÉCIE', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); foreach ( $this->getElements() as $elementName => $element ) { $this->addElement('checkbox', "atualiza_{$elementName}", array( 'label' => 'Atualizar' )); $this->addDisplayGroup(array( $elementName, "atualiza_{$elementName}" ), "group_{$elementName}"); $this->getElement("atualiza_{$elementName}")->removeDecorator("Label"); $group = $this->getDisplayGroup("group_{$elementName}"); $group->setDecorators(array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'div', 'class' => 'layout_banco' ) ) )); } $this->addElement('text', 'descricao', array( 'label' => 'Descrição:', 'required' => true )); $listBancos = Model_Contrato::getBancos(); asort($listBancos); $bancos = [''] + $listBancos; $select = new Zend_Form_Element_Select('banco_id'); $select->setLabel('Banco:') ->setRequired(true) ->setAttrib('style', 'width: 200px;') ->addMultiOptions($bancos); $this->addElement($select); $this->addElement('select', 'produto_descricao', [ 'label' => 'Forçar Descrição Produto:', 'multiOptions' => Core_Combos::getSimNaoOptions() ]); $this->getElement('produto_descricao')->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('hidden', 'id'); $this->addDisplayGroup(array( 'descricao', 'banco_id', 'produto_descricao', 'id' ), 'layout_banco_nome', array( 'legend' => 'Nome do Layout' )); $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl('layout-banco') . "'" )); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save' )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl('layout-banco/save') . "'" )); $front = Zend_Controller_Front::getInstance(); //pega o id do cliente $layoutId = (int) $front->getRequest()->getParam('id'); if( $layoutId > 0 ){ $this->addElement('button', 'btn_copiar', array( 'label' => 'Copiar Layout', 'class' => 'bt_export', 'onclick' => "openWin('" . $this->getView()->baseUrl() . "/layout-banco/copiar-layout/id/" . $layoutId . "', 400, 200, 1)" )); } $this->addDisplayGroup(array( 'btn_back', 'btn_save', 'btn_new', 'btn_copiar' ), 'buttons'); foreach ( $this->getElements() as $elements ) { if( $elements->getAttrib('layout') ){ $elements->setBelongsTo('layout_banco'); //função para preencher só letras $elements->setAttrib('onKeypress', "return soLetras(event)"); } } foreach ( $this->getDisplayGroups() as $displayGroup ) { $displayGroup->removeDecorator('DtDdWrapper'); if( $displayGroup->getName() == "layout_banco_nome" ){ $displayGroup->removeDecorator('HtmlTag'); } if( $displayGroup->getName() == 'buttons' ){ foreach ( $displayGroup->getElements() as $element ) { $element->setDecorators(array( 'ViewHelper' )); } } } } }
💾 保存文件
← 返回文件管理器