bug #7438
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@55771 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
61101a904d
commit
acd18c6f92
|
@ -22,11 +22,16 @@ import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraEmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.TipoEventoExtraService;
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
@ -42,14 +47,24 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TipoEventoExtraService tipoEventoExtraService;
|
private TipoEventoExtraService tipoEventoExtraService;
|
||||||
|
@Autowired
|
||||||
|
private TipoEventoExtraEmpresaService tipoEventoExtraEmpresaService;
|
||||||
|
@Autowired
|
||||||
|
private EmpresaService empresaService;
|
||||||
|
|
||||||
private TipoEventoExtra tipoEventoExtra;
|
private TipoEventoExtra tipoEventoExtra;
|
||||||
private MyListbox tipoEventoExtraList;
|
private MyListbox tipoEventoExtraList;
|
||||||
|
private MyListbox empresasList;
|
||||||
private MyTextbox txtNome;
|
private MyTextbox txtNome;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
private Textbox impMax;
|
private Textbox impMax;
|
||||||
private Checkbox cbValidaDocumento;
|
private Checkbox cbValidaDocumento;
|
||||||
private Radio raTipo11;
|
private Radio raTipo11;
|
||||||
private Radio raTipo22;
|
private Radio raTipo22;
|
||||||
|
private MyComboboxEstandar cmbEmpresa;
|
||||||
|
private List<Empresa> lsEmpresas;
|
||||||
|
private List<TipoEventoExtraEmpresa> lsTipoEventoExtraEmpresas;
|
||||||
|
|
||||||
private static Logger log = Logger.getLogger(EditarTipoEventoExtraController.class);
|
private static Logger log = Logger.getLogger(EditarTipoEventoExtraController.class);
|
||||||
|
|
||||||
public TipoEventoExtra getTipoEventoExtra() {
|
public TipoEventoExtra getTipoEventoExtra() {
|
||||||
|
@ -62,11 +77,16 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
lsEmpresas = empresaService.obtenerTodos();
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
tipoEventoExtra = (TipoEventoExtra) Executions.getCurrent().getArg().get("tipoEventoExtra");
|
tipoEventoExtra = (TipoEventoExtra) Executions.getCurrent().getArg().get("tipoEventoExtra");
|
||||||
tipoEventoExtraList = (MyListbox) Executions.getCurrent().getArg().get("tipoEventoExtraList");
|
tipoEventoExtraList = (MyListbox) Executions.getCurrent().getArg().get("tipoEventoExtraList");
|
||||||
|
|
||||||
|
lsTipoEventoExtraEmpresas = tipoEventoExtraEmpresaService.buscarPorTipoEventoExtra(tipoEventoExtra);
|
||||||
|
empresasList.setData(lsTipoEventoExtraEmpresas);
|
||||||
|
|
||||||
if (tipoEventoExtra.getTipoeventoextraId() != null) {
|
if (tipoEventoExtra.getTipoeventoextraId() != null) {
|
||||||
cbValidaDocumento.setChecked(tipoEventoExtra.getIndvalidadocumento());
|
cbValidaDocumento.setChecked(tipoEventoExtra.getIndvalidadocumento());
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,6 +106,33 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
txtNome.focus();
|
txtNome.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException {
|
||||||
|
if (empresasList.getSelectedItem() == null){
|
||||||
|
Messagebox.show(Labels.getLabel("editarTipoEventoExtraController.MSG.selecionarEmpresa"),
|
||||||
|
Labels.getLabel("editarTipoEventoExtraController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TipoEventoExtraEmpresa t = (TipoEventoExtraEmpresa)empresasList.getSelectedItem().getValue();
|
||||||
|
lsTipoEventoExtraEmpresas.remove(t);
|
||||||
|
tipoEventoExtra.removeTipoEventoExtraEmpresa(t);
|
||||||
|
empresasList.setData(lsTipoEventoExtraEmpresas);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException {
|
||||||
|
if (cmbEmpresa.getSelectedItem() == null){
|
||||||
|
Messagebox.show(Labels.getLabel("editarTipoEventoExtraController.MSG.selecionarEmpresa"),
|
||||||
|
Labels.getLabel("editarTipoEventoExtraController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TipoEventoExtraEmpresa t = new TipoEventoExtraEmpresa();
|
||||||
|
t.setEmpresa((Empresa)cmbEmpresa.getSelectedItem().getValue());
|
||||||
|
tipoEventoExtra.addTipoEventoExtraEmpresa(t);
|
||||||
|
lsTipoEventoExtraEmpresas.add(t);
|
||||||
|
empresasList.setData(lsTipoEventoExtraEmpresas);
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
txtNome.getValue();
|
txtNome.getValue();
|
||||||
impMax.getValue();
|
impMax.getValue();
|
||||||
|
@ -173,4 +220,13 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresas() {
|
||||||
|
return lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||||
|
this.lsEmpresas = lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa;
|
||||||
|
|
||||||
|
public class RenderTipoEventoExtraEmpresa implements ListitemRenderer {
|
||||||
|
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
TipoEventoExtraEmpresa tipo = (TipoEventoExtraEmpresa) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell(tipo.getEmpresa().getNombempresa());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", tipo);
|
||||||
|
}
|
||||||
|
}
|
|
@ -311,6 +311,7 @@
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoDocAutobus</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoDocAutobus</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoDomicilio</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoDomicilio</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoEmpleado</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEmpleado</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoMovimiento</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoMovimiento</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoOcupacion</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoOcupacion</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoParada</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoParada</value>
|
||||||
|
|
|
@ -1027,6 +1027,7 @@ editarPuntoVentaController.lbEstanSegOpcional.value = Estan seguro opcional
|
||||||
editarPuntoVentaController.label.tipoPassagem = Tipo de boletos
|
editarPuntoVentaController.label.tipoPassagem = Tipo de boletos
|
||||||
editarPuntoVentaController.label.lbIndEstanTasaEmbarque.value = Tasa de abordaje pre-seleccionada
|
editarPuntoVentaController.label.lbIndEstanTasaEmbarque.value = Tasa de abordaje pre-seleccionada
|
||||||
editarPuntoVentaController.label.lbIndPermisoTasaEmbarque.value = Permite deseleccionar Tasa de abordaje
|
editarPuntoVentaController.label.lbIndPermisoTasaEmbarque.value = Permite deseleccionar Tasa de abordaje
|
||||||
|
editarPuntoVentaController.tab.label.empresas = Empresas
|
||||||
|
|
||||||
editarPuntoVentaController.label.isento = ISENTO
|
editarPuntoVentaController.label.isento = ISENTO
|
||||||
editarPuntoVentaController.label.totvs = Integracion TOTVS
|
editarPuntoVentaController.label.totvs = Integracion TOTVS
|
||||||
|
@ -4704,6 +4705,7 @@ editarTipoEventoExtraController.rd3.label = CHEQUE
|
||||||
editarTipoEventoExtraController.MSG.contaContabil = Cuenta Contabilidad es obligatória
|
editarTipoEventoExtraController.MSG.contaContabil = Cuenta Contabilidad es obligatória
|
||||||
editarTipoEventoExtraController.MSG.natureza = Naturaleza es obligatória
|
editarTipoEventoExtraController.MSG.natureza = Naturaleza es obligatória
|
||||||
editarTipoEventoExtraController.lbIndconferenciafisicacomissao.value = Exigir Conferência Fisíca Comissão
|
editarTipoEventoExtraController.lbIndconferenciafisicacomissao.value = Exigir Conferência Fisíca Comissão
|
||||||
|
editarTipoEventoExtraController.MSG.selecionarEmpresa = Seleccione una empresa!
|
||||||
|
|
||||||
#Pago Motorista
|
#Pago Motorista
|
||||||
indexController.mniPagoConductor.label = Pago conductor
|
indexController.mniPagoConductor.label = Pago conductor
|
||||||
|
|
|
@ -1086,6 +1086,7 @@ editarPuntoVentaController.lbCheckTodosPuntoVenta.value=Todas as agências
|
||||||
editarPuntoVentaController.MSG.estacionVinculadaAgenciaOnDelete = Existem uma ou mais estações vinculadas à esta agência
|
editarPuntoVentaController.MSG.estacionVinculadaAgenciaOnDelete = Existem uma ou mais estações vinculadas à esta agência
|
||||||
editarPuntoVentaController.lbLocalidade.value = Localidade
|
editarPuntoVentaController.lbLocalidade.value = Localidade
|
||||||
editarPuntoVentaController.lbCidade.value = Cidade
|
editarPuntoVentaController.lbCidade.value = Cidade
|
||||||
|
editarPuntoVentaController.tab.label.empresas = Empresas
|
||||||
|
|
||||||
editarPuntoVentaController.lbCheckDinheiro.value=R$
|
editarPuntoVentaController.lbCheckDinheiro.value=R$
|
||||||
editarPuntoVentaController.lbCheckCredito.value=CC
|
editarPuntoVentaController.lbCheckCredito.value=CC
|
||||||
|
@ -4767,6 +4768,7 @@ editarTipoEventoExtraController.rd3.label = CHEQUE
|
||||||
editarTipoEventoExtraController.MSG.contaContabil = Conta Contábil é Obrigatória
|
editarTipoEventoExtraController.MSG.contaContabil = Conta Contábil é Obrigatória
|
||||||
editarTipoEventoExtraController.MSG.natureza = Natureza é Obrigatória
|
editarTipoEventoExtraController.MSG.natureza = Natureza é Obrigatória
|
||||||
editarTipoEventoExtraController.lbIndconferenciafisicacomissao.value = Exigir Conferência Fisíca Comissão
|
editarTipoEventoExtraController.lbIndconferenciafisicacomissao.value = Exigir Conferência Fisíca Comissão
|
||||||
|
editarTipoEventoExtraController.MSG.selecionarEmpresa = Selecione uma empresa!
|
||||||
|
|
||||||
#Pago Motorista
|
#Pago Motorista
|
||||||
indexController.mniPagoConductor.label = Pagamento Motorista
|
indexController.mniPagoConductor.label = Pagamento Motorista
|
||||||
|
|
|
@ -24,7 +24,17 @@
|
||||||
tooltiptext="${c:l('editarTipoEventoExtraController.btnFechar.tooltiptext')}" />
|
tooltiptext="${c:l('editarTipoEventoExtraController.btnFechar.tooltiptext')}" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
<tabbox id="tabboxTitle">
|
||||||
|
<tabs>
|
||||||
|
<tab
|
||||||
|
label="${c:l('editarPuntoVentaController.window.title')}" />
|
||||||
|
|
||||||
|
<tab
|
||||||
|
label="${c:l('editarPuntoVentaController.tab.label.empresas')}" />
|
||||||
|
|
||||||
|
</tabs>
|
||||||
|
<tabpanels>
|
||||||
|
<tabpanel style="overflow:auto;" >
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="30%" />
|
<column width="30%" />
|
||||||
|
@ -78,5 +88,47 @@
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
</tabpanel>
|
||||||
|
<tabpanel>
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="80%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarPuntoVentaController.lbEmpresa.value')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox id="cmbEmpresa"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true"
|
||||||
|
|
||||||
|
model="@{winEditarTipoEventoExtra$composer.lsEmpresas}" />
|
||||||
|
|
||||||
|
<button
|
||||||
|
id="btnAdicionarEmpresa" height="20"
|
||||||
|
image="/gui/img/add.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarConfiguracionReservacionController.btnAddClase.tooltiptext')}" />
|
||||||
|
<button
|
||||||
|
id="btnRemoverEmpresa" height="20"
|
||||||
|
image="/gui/img/remove.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarConfiguracionReservacionController.btnBorrarClase.tooltiptext')}" />
|
||||||
|
</hbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<listbox id="empresasList"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="false">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader id="lhEmpresa"
|
||||||
|
image="/gui/img/create_doc.gif"
|
||||||
|
label="${c:l('editarPuntoVentaController.lbEmpresa.value')}" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</tabpanel>
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
</window>
|
</window>
|
||||||
</zk>
|
</zk>
|
||||||
|
|
Loading…
Reference in New Issue