✏️ 正在编辑: Corretor.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/Filtro/Corretor.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php use Modules\Pessoa\Enum\StatusCadastroCorretorEnum; class Form_Filtro_Corretor extends Core_Form { public function init() { $this->setMethod('post'); $this->setName('f_filtro_corretor'); $this->setAttrib('autocomplete', 'off'); $this->addElement('text', 'id', array( 'label' => 'ID:', 'size' => 5, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('text', 'nome', array( 'label' => 'Nome:', 'size' => 20 )); $this->addElement('text', 'login', array( 'label' => 'Login:', 'size' => 20 )); $select = new Zend_Form_Element_Select('supervisor_id'); $select->setLabel('Supervisor:') ->addMultiOptions(Core_Combos::getSupervisoresOptions()); $select->setAttrib('onchange', "populateComboRotas('supervisor_id', 'rota_id')"); $this->addElement($select); $select = new Zend_Form_Element_Select('usuario_id'); $select->setLabel('Assistente Com.:') ->addMultiOptions(Core_Combos::getUsuariosOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('rota_id'); $select->setLabel('Rota:') ->addMultiOptions(Core_Combos::getRotasOptions()); $this->addElement($select); $ns = new Zend_Session_Namespace(); if( $ns->acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, 'visualizar-corretores-filiais') ){ $select = new Zend_Form_Element_Select('empresa_id'); $select->setLabel('Empresa:') ->addMultiOptions(Core_Combos::getEmpresasOptions()); $this->addElement($select); } $select = new Zend_Form_Element_Select('acesso'); $select->setLabel('Com Acesso:') ->addMultiOptions($this->_getComAcessoOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('acesso_aplicativo'); $select->setLabel('Aplicativo:') ->addMultiOptions($this->_getComAcessoOptions()); $this->addElement($select); $this->addElement('text', 'senha', array( 'label' => 'Código Usuário:', 'size' => 10 )); $this->addElement('text', 'cpf', array( 'label' => 'CPF/CNPJ:', 'size' => 14, 'maxlength' => 14, 'onkeypress' => 'mascara(this, soNumeros)', 'filters' => array( 'StringTrim', 'Digits' ) )); $this->addElement('select', 'status_corretor', [ 'label' => 'Status Corretor: ', 'multiOptions' => [ 0 => '', 1 => 'Ativado', 2 => 'Desativado', 3 => 'Em análise', 4 => 'Bloqueado', ] ]); $this->addElement('text', 'cidade', array( 'label' => 'Cidade:', )); $this->addElement('text', 'uf', array( 'label' => 'UF:', 'size' => 3, 'maxlength' => 2 )); $select = new Zend_Form_Element_Select('grupo_comissao'); $select->setLabel('Grupo Comissão:') ->addMultiOptions(Core_Combos::getGruposComissaoOptions()); $this->addElement($select); $this->addElement('select', 'nivel_esteira', array( 'label' => 'Tipo de esteira: ', 'multiOptions' => array( '' => '', 0 => 'Esteira livre', 1 => 'Esteira aprovador', 2 => 'Esteira Padrão' ) )); $this->addElement("select", 'possui_codigo_usuario', array( 'label' => 'Cód. Usuário?', 'title' => 'Possui código de usuário?', 'multiOptions' => array( '' => '', 'SIM' => 'Sim', 'NAO' => 'Não' ) )); $select = new Zend_Form_Element_Select('tipo_venda'); $select->setLabel('Tipo de venda') ->addMultiOptions(Core_Combos::getTiposVendaOptions()); $this->addElement($select); $this->addElement(Form_DatePicker::getDatePicker('data_cadastro_de', 'Data de Cadastro de:')); $this->addElement(Form_DatePicker::getDatePicker('data_cadastro_a', 'a:')); $select = new Zend_Form_Element_Multiselect('banco_id'); $select->setLabel('Banco Usuário:') ->addMultiOptions(array_filter(Core_Combos::getBancosOptions())) ->setAttrib('class', 'multiple_banco'); $this->addElement($select); $this->addElement(Form_DatePicker::getDatePicker('validade_certificado_de', 'Validade do Certificado de:')); $this->addElement(Form_DatePicker::getDatePicker('validade_certificado_a', 'a:')); $this->addTwoOptionsElement('termo_assinado', 'Termo assinado:'); $this->addElement('submit', 'btn_filtrar', array( 'label' => 'Buscar', 'class' => 'bt_find', )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/corretor/save'" )); $this->addSelect('status_cadastro', 'Status Cadastro:', StatusCadastroCorretorEnum::OPTIONS); $this->addSelect('automatizacao_oportunidades_negocios', 'Oportunidades:', [ '', '1' => 'Habilitado', '-1' => 'Não habilitado' ]); $this->addDisplayGroup(array('btn_filtrar', 'btn_new'), 'buttons'); $this->_setDefaultDecorators(); } protected function _getComAcessoOptions() { return array( "" => "", 1 => "Com Acesso", -1 => "Sem Acesso", ); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'filtro_corretores' ) ), 'Form' )); } }
💾 保存文件
← 返回文件管理器