✏️ 正在编辑: PagarComissao.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/Filtro/PagarComissao.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_Filtro_PagarComissao extends Zend_Form { public function init() { $this->setMethod('post'); $this->setName('f_filtro_pagar_comissao'); $this->setAttrib('autocomplete', 'off'); $this->setAttrib('class', 'pagar-comissao-ajax'); $select = new Zend_Form_Element_Select('empresa_id'); $select->setLabel('Empresa:') ->setAttrib('class', 'corretores_pagar_comissao') ->addMultiOptions(Core_Combos::getEmpresasOptions()); $this->addElement($select); $selectCorretores = new Zend_Form_Element_Multiselect('corretores'); $selectCorretores->setLabel('Corretor: ') ->setAttrib('class', 'corretores_pagar_comissao') ->setRegisterInArrayValidator(false); $this->addElement($selectCorretores); $this->getElement('corretores')->addDecorator('Label', ['tag' => 'dt', 'tagClass' => 'clear']); $select = new Zend_Form_Element_Select('rota_id'); $select->setLabel('Rota:') ->setAttrib('onchange', "populateComboCorretoresByRota('rota_id', 'corretores')") ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Multiselect('banco_id'); $select->setLabel('Banco:') ->setAttrib('class', 'multiple_banco') ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Multiselect('convenio_id'); $select->setLabel('Convênio:') ->setAttrib('class', 'multiple_convenio') ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Select('subestabelecido_id'); $select->setLabel('Subestabelecido:') ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_MultiSelect('tipo_contrato'); $select->setLabel('Tipo Contrato:') ->setAttrib("id", "tipo_contrato") ->addDecorator('Label', array('tag' => 'dt', 'tagClass' => 'clear')) ->setRegisterInArrayValidator(false); $this->addElement($select); $this->addElement('text', 'numero_contrato', array( 'label' => 'Nº Contrato:', 'size' => 10, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('text', 'cpf_cliente', array( 'label' => 'CPF Cliente:', 'maxlength' => 14, 'onkeypress' => 'mascara(this, fcpf)', 'size' => 14 )); $select = new Zend_Form_Element_Multiselect('status_proposta'); $select->setLabel('Status:') ->addDecorator('Label', array('tag' => 'dt', 'tagClass' => 'clear')) ->setRegisterInArrayValidator(false); $this->addElement($select); $this->getElement('status_proposta')->setAttrib('class', 'status'); $select = new Zend_Form_Element_Select("banco_beneficiado"); $select->setLabel("Banco Beneficiado:") ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Select("banco", ['id' => 'banco_pagamento']); $select->setLabel("Banco Corretor:") ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Multiselect('forma_liberacao'); $select->setLabel('Forma Liberação:') ->setAttrib("class", "forma_liberacao-multiselect") ->setRegisterInArrayValidator(false); $this->addElement($select); $this->addElement('text', 'prazo', array( 'label' => 'Prazo:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 10 )); $select = new Zend_Form_Element_Select('uf_corretor'); $select->setLabel('UF:') ->setRegisterInArrayValidator(false); $this->addElement($select); $this->addElement('select', 'op_disponivel', array( 'label' => 'OP disponível:', 'multiOptions' => array( '' => '', 2 => 'Não', 1 => 'Sim' ) )); $this->getElement('op_disponivel')->addDecorator('Label', array('tag' => 'dt', 'tagClass' => 'clear')); $this->addElement(Form_DatePicker::getDatePicker('data_liberacao_de', 'Data Liberação de:')); $this->addElement(Form_DatePicker::getDatePicker('data_liberacao_a', 'a:')); $this->addElement('select', 'op_sacada', array( 'label' => 'OP sacada:', 'multiOptions' => Core_Combos::getSimNaoOptions() + array(2 => 'OP Sacada e Não OP') )); $this->addElement(Form_DatePicker::getDatePicker('data_emissao_de', 'Data Emissão de:')); $this->addElement(Form_DatePicker::getDatePicker('data_emissao_a', 'a:')); $select = new Zend_Form_Element_Select('comissao_recebida'); $select->setLabel('Comissão Recebida:') ->addMultiOptions(Core_Combos::getContratoPagoOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('comissao_empresa_setada'); $select->setLabel('Comissão Empresa:') ->addMultiOptions(Core_Combos::getSimNaoOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('comissao_corretor_setada'); $select->setLabel('Comissão Corretor:') ->addMultiOptions(array( '' => '', '1' => 'SIM', '-1' => 'NÃO' )); $this->addElement($select); $this->addElement('text', 'protocolo_recebimento_fisico', array( 'label' => 'Prot. Receb. Físico:', 'size' => 10, 'onkeypress' => 'mascara(this, soNumeros)' )); $select = new Zend_Form_Element_Multiselect('status_formalizacao'); $select->setLabel('Pendências:') ->setRegisterInArrayValidator(false); $this->addElement($select); $this->addElement('text', 'maximo_atraso', array( 'label' => 'Máximo de dias de atraso do corretor:', 'onkeypress' => 'mascara(this, soNumeros)', )); $this->addElement('checkbox', 'ocultar_comissao_negativa', array( 'label' => 'Ocultar comissão negativa', )); $this->getElement('ocultar_comissao_negativa') ->addDecorator('HtmlTag', array('tag' => 'dt', 'id' => 'ocultar_comissao_negativa-element', 'class' => 'dt-checkbox')) ->getDecorator('Label')->setOptions(array('placement' => 'append', 'tag' => 'dd')); $this->addElement('submit', 'btn_filtrar', array( 'label' => 'Buscar', 'class' => 'bt_find', )); $this->addElement('button', 'btn_resumo', [ 'label' => 'Exibir Resumo', 'onclick' => 'exibirResumoComissoes()' ]); $this->addElement('button', 'reset', array( 'label' => 'Limpar filtros', 'onclick' => 'resetElements(this.form)' )); $ns = new Zend_Session_Namespace(); if ($ns->acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, 'contrato', 'excluir-protocolo-pagamento')) { $this->addElement('button', 'btn_excluir', array( 'label' => 'Exclusão de Protocolos', 'class' => 'bt_delete', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/contrato/excluir-protocolo-pagamento'" )); } $this->addDisplayGroup(array( 'btn_excluir', 'btn_filtrar', 'btn_resumo', 'reset'), 'buttons'); $request = Zend_Controller_Front::getInstance()->getRequest(); if (!$request->isPost()) { $this->_populateOptions(); } } public function populate(array $values) { parent::populate($values); if (!empty($values['corretores'])) { $this->getElement('corretores')->setValue(explode(',', $values['corretores'])); } } protected function _populateOptions() { $this->getElement('corretores')->addMultiOptions(array_filter(Core_Combos::getCorretoresPagarComissaoOptions())); $this->getElement('rota_id')->addMultiOptions(Core_Combos::getRotasOptions()); $this->getElement('banco_id')->addMultiOptions(array_filter(Core_Combos::getBancosOptions())); $this->getElement('convenio_id')->addMultiOptions(array_filter(Core_Combos::getConveniosOptions())); $this->getElement('subestabelecido_id')->addMultiOptions(Core_Combos::getSubestabelecidosOptions()); $this->getElement('tipo_contrato')->addMultiOptions(array_filter(Core_Combos::getTiposProdutosOptions())); $this->getElement('status_proposta')->addMultiOptions(array_filter(Core_Combos::getStatusOptions())) ->setValue(43); $bancosFebraban = Core_Combos::getBancosFebrabanOptions(); $this->getElement('banco_beneficiado')->addMultiOptions($bancosFebraban); $this->getElement('banco')->addMultiOptions($bancosFebraban); $this->getElement('forma_liberacao')->addMultiOptions(array_filter(Core_Combos::getFormasLiberacaoOptions())); $this->getElement('uf_corretor')->addMultiOptions(Core_Combos::getUfOptions()); $statusFormalizacaoOptions = array_filter(Core_Combos::getStatusFormalizacaoOptions()); $this->getElement('status_formalizacao')->addMultiOptions($statusFormalizacaoOptions); // $this->getElement('empresa_id')->addMultiOptions(Core_Combos::getEmpresasOptions()); // $this->getElement('corretor_id')->addMultiOptions(Core_Combos::getCorretoresOptions(true)); // $this->getElement('gerente_id')->addMultiOptions(Core_Combos::getSupervisoresOptions()); } }
💾 保存文件
← 返回文件管理器