✏️ 正在编辑: Comissionamento.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/Filtro/Comissionamento.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_Filtro_Comissionamento extends Core_Form { public function init() { $this->setMethod('post'); $this->setName('f_filtro_comissionamento'); $this->setAttrib('autocomplete', 'off'); $select = new Zend_Form_Element_Select('banco_id'); $select->setLabel('Banco:') ->addMultiOptions(Core_Combos::getBancosOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('tipo_produto'); $select->setLabel('Tipo Produto:') ->addMultiOptions(Core_Combos::getTiposProdutosOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('convenio_id'); $select->setLabel('Convênio:') ->addMultiOptions(Core_Combos::getConveniosOptions()) ->setAttrib('onchange', "populateComboTabelas(this.id, 'tabela_id', 'banco_id')") ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement($select); $select = new Zend_Form_Element_Select('tabela_id'); $select->setLabel('Tabela:') ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Select('base_comissao_empresa'); $select->setLabel('Base comissão:') ->setMultiOptions(array("" => "") + Core_Combos::getTipoComissaoValorOptions()) ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement($select); $this->addElement('select', 'comissao_ativa', [ 'label' => 'Comissões Vigentes:', 'multiOptions' => [ 0 => 'Todos', 1 => 'Sim', 2 => 'Não' ] ]); $this->addElement('text', 'prazo_de', array( 'label' => 'Prazo de:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 10, 'maxlength' => 3 )); $this->addElement('text', 'prazo_a', array( 'label' => 'a:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 10, 'maxlength' => 3 )); $this->getElement('prazo_de') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->getElement('prazo_a') ->addDecorator('HtmlTag', array( 'tag' => 'dd', 'style' => 'margin-left: -100px')); $this->addElement('submit', 'btn_visualizar', array( 'label' => 'Buscar', 'class' => 'bt_find' )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/comissionamento/save'" )); $this->addElement('button', 'btn_export', array( 'label' => 'Exportar', 'class' => 'bt_export', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/comissionamento/exportar'" )); $this->addElement('button', 'btn_importar', array( 'label' => 'Importar', 'class' => 'bt_sincronizar', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/comissionamento/importar'" )); $this->addElement('button', 'btn_tabelas_sem_comissao', array( 'label' => 'Tabelas sem comissão', 'class' => 'bt_find', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/comissionamento/tabelas-sem-comissao'" )); $this->addDisplayGroup([ 'btn_visualizar', 'btn_new', 'btn_export', 'btn_importar', 'btn_tabelas_sem_comissao' ], 'buttons'); } public function populate(array $values) { if( !empty($values['convenio_id']) && !empty($values['banco_id']) ){ $tabela = $this->getElement('tabela_id'); $tabela->addMultiOptions( Core_Combos::getTabelasOptions($values['convenio_id'], $values['banco_id']) ); } return parent::populate($values); } public function search() { $request = Zend_Controller_Front::getInstance()->getRequest(); $id = get_class($this); $ns = new Zend_Session_Namespace($id); if ($request->isPost() && $this->isValid($request->getPost())) { $ns->unsetAll(); $ns->$id = $request->getPost(); } if(!empty($ns->$id)){ $this->populate($ns->$id); } $model = new Model_Comissionamento(); return $model->listarPercValido($ns->$id); } }
💾 保存文件
← 返回文件管理器