✏️ 正在编辑: ReprocessamentoForm.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/Modules/Callcenter/Form/ReprocessamentoForm.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php namespace Modules\Callcenter\Form; use Modules\Callcenter\Service\ReprocessamentoService as Service; use Modules\Callcenter\Enum\{UraReversaOptions, PercentualCampanhaOptions}; class ReprocessamentoForm extends \Core_Form { /** @var int */ private $campanha; /** @var Service */ private $service; /** @var string */ public const ACTION = '/callcenter-campanha/estrategia-reprocessamento-save'; /** * @param int|null $campanha * @param string $base * @throws \Zend_Form_Exception */ public function __construct(?int $campanha, string $base) { $this->campanha = $campanha; $this->service = new Service(); parent::__construct(); $this->setMethod('post'); $this->setName('estrategia_processamento'); $this->setAction($base . self::ACTION); } public function init() { $statusAtendimentos = array_filter(\Core_Combos::getCallcenterStatusOptions()); $this->addHidden('id') ->addMultiOptionElement('status_atendimento', 'Status:', 'multi_callcenter', $statusAtendimentos) ->initDiscador() ->addValueElement('valor_parcela_de', 'Parcela min') ->addValueElement('valor_parcela_a', 'Parcela max') ->addValueElement('margem_consignado_de', 'Margem consig. de') ->addValueElement('margem_consignado_a', 'a') ->addValueElement('margem_cartao_de', 'Margem cartão de') ->addValueElement('margem_cartao_a', 'a') ->addValueElement('margem_bens_duraveis_de', 'M. Bens Duráveis de') ->addValueElement('margem_bens_duraveis_a', 'a') ->addTwoOptionsElement('telefone', 'Possui Telefone:') ->addTwoOptionsElement('ativo', 'Cliente Ativo:') ->addSelect('usuario_carteirizacao', 'Carteirizado por:', \Core_Combos::getUsuariosCallcenterOptions()) ->addElementWith('uf', $this->getOptions('UF:', 2, 2, null, [new \Validators_Uf()])) ->addElementWith('cidade', $this->getOptions('Cidade:', 20)) ->addDateElement('data_final_atendimento', 'Atendido antes de:') ->addInt('validar_idade_de', 'Idade de:') ->addInt('validar_idade_a', 'Idade ate:') ->addDateElement('data_higienizacao_de', 'Data higienização de:') ->addDateElement('data_higienizacao_a', 'a:') ->addTwoOptionsElement('retirar_carteirizacao', 'Retirar Carteirização:') ->addSelect('opcao_ura_reversa', 'Opção Ura Reversa:', UraReversaOptions::OPTIONS) ->addSelect('percentual_campanha', 'Percentual Campanha:', PercentualCampanhaOptions::OPTIONS) ->addInt('numero_reprocessamentos', 'Numero Reprocessamentos:') ->addTwoOptionsElement('enviar_discador', 'Enviar Discador:', false) ->addTwoOptionsElement('automatizar', 'Reprocessar:', false) ->addHidden('campanha_id', $this->campanha) ->addElement('submit', 'salvar', $this->getOptions('Salvar', null, null, null, null, 'bt_save')) ->addDisplayGroup([ 'salvar' ], 'buttons'); $this->populate(); } /** * @return $this * @throws \Zend_Form_Exception */ private function initDiscador(): self { $discador = \Core_Discador_Factory::load(); if ($discador) { $this->addMultiOptionElement( 'status_discador', 'Status Discador:', 'multi_status_discador', $discador->getStatus() ); } return $this; } /** * @param array $values * @return ReprocessamentoForm|void */ public function populate(array $values = []) { if ($this->campanha) { $dto = $this->service->getByCampanhaId($this->campanha); $values = $dto->toArray(); $values['campanha_id'] = $dto->getCampanhaId()->getId(); } parent::populate($values); } }
💾 保存文件
← 返回文件管理器