✏️ 正在编辑: BancoMeuLayoutComissao.php
路径:
/srv/systems_dir/yuppiecred/application/forms/BancoMeuLayoutComissao.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_BancoMeuLayoutComissao extends Core_Form { public function init() { $this->setName('f_layout_banco'); $this->addElement('text', 'numero_contrato', [ 'label' => 'Nº CONTRATO', 'required' => true, 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'numero_ade', [ 'label' => 'Nº ADE', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'comissao_empresa', [ 'label' => 'COMISSÃO EMPRESA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('comissao_empresa') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'data_saldo', [ 'label' => 'DATA RECEB. COMISSÃO', 'size' => 2, 'maxLength' => 2, 'required' => true, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'data_liberacao', [ 'label' => 'DATA LIBERAÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('data_liberacao') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'parcelas', [ 'label' => 'Nº PARCELA RECEBIDA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'valor_base_comissao', [ 'label' => 'BASE COMISSÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('valor_base_comissao') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'valor_bruto', [ 'label' => 'VALOR BRUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'valor_liquido', [ 'label' => 'VALOR LÍQUIDO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('valor_liquido') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'valor_lancamento', [ 'label' => 'VALOR LANÇAMENTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'tipo_pagamento', [ 'label' => 'TIPO PAGAMENTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('tipo_pagamento') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'natureza', [ 'label' => 'NATUREZA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'tipo_remuneracao', [ 'label' => 'TIPO REMUNERAÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('tipo_remuneracao') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'banco', [ 'label' => 'BANCO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'data_recebimento_bonus', [ 'label' => 'DATA RECEBIMENTO BÔNUS', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('data_recebimento_bonus') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'bonus_recebido', [ 'label' => 'BÔNUS RECEBIDO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'descricao_comissao', [ 'label' => 'DESCRIÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('descricao_comissao') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'convenio', [ 'label' => 'CONVÊNIO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'codigo_convenio', [ 'label' => 'CÓDIGO CONVÊNIO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('codigo_convenio') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'tabela', [ 'label' => 'TABELA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'codigo_tabela', [ 'label' => 'CÓDIGO TABELA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('codigo_tabela') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'status_proposta', [ 'label' => 'STATUS PROPOSTA', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'prazo', [ 'label' => 'PRAZO CONTRATO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('prazo') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $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->getElement('srcc') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'rco', [ 'label' => 'RCO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'produto', [ 'label' => 'CÓDIGO PRODUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('produto') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'nome_produto', [ 'label' => 'PRODUTO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('text', 'tipo_contrato', [ 'label' => 'TIPO CONTRATO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->getElement('tipo_contrato') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('text', 'tipo_formalizacao', [ 'label' => 'TIPO FORMALIZAÇÃO', 'size' => 2, 'maxLength' => 2, 'attribs' => ['layout' => true] ]); $this->addElement('hidden', 'layout_comissao', ['value' => 1]); $this->addElement('text', 'descricao', [ 'label' => 'Descrição:', 'required' => true ]); $listBancos = Model_Contrato::getBancosRecebimento(); 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('hidden', 'id'); $this->addDisplayGroup(['descricao', 'banco_id', 'id'], 'layout_banco_nome', ['legend' => 'Nome do Layout']); $this->addElement('button', 'btn_back', [ 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl('layout-banco-comissao') . "'" ]); $this->addElement('submit', 'btn_save', [ 'label' => 'Salvar', 'class' => 'bt_save' ]); $this->addElement('button', 'btn_new', [ 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl('layout-banco-comissao/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', [ 'label' => 'Copiar Layout', 'class' => 'bt_export', 'onclick' => "openWin('" . $this->getView()->baseUrl() . "/layout-banco-comissao/copiar-layout/id/" . $layoutId . "', 400, 200, 1)" ]); } $this->addDisplayGroup(['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(['ViewHelper']); } } } } public function populateCampos($campos) { foreach ($campos as $values) { $data = [$values->campo => $values->letra]; $this->addElement('hidden', "id_campo_{$values->campo}", [ 'value' => $values->id ]); $data["atualiza_{$values->campo}"] = $values->atualizar_campo; $this->populate($data); } } }
💾 保存文件
← 返回文件管理器