bug#10938
qua:marcelo dev:thiago git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@81657 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
989f28246c
commit
308e7fb498
|
@ -1,6 +1,7 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -13,6 +14,7 @@ import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Combobox;
|
import org.zkoss.zul.Combobox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
|
import org.zkoss.zul.ListModelArray;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
@ -32,7 +34,6 @@ import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AidfService aidfService;
|
private AidfService aidfService;
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
private MyListbox bilheteList;
|
private MyListbox bilheteList;
|
||||||
|
|
||||||
private Combobox cmbAidf;
|
private Combobox cmbAidf;
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
private List<Aidf> lsAidf;
|
private List<Aidf> lsAidf;
|
||||||
|
|
||||||
private Textbox txtForminicial;
|
private Textbox txtForminicial;
|
||||||
|
@ -51,8 +53,10 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
private List<PuntoVenta> lsPuntoVenta;
|
private List<PuntoVenta> lsPuntoVenta;
|
||||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||||
|
|
||||||
|
private List<Empresa> lsEmpresas;
|
||||||
|
|
||||||
public BusquedaBilhetesController() {
|
public BusquedaBilhetesController() {
|
||||||
// TODO Auto-generated constructor stub
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MyListbox getBilheteList() {
|
public MyListbox getBilheteList() {
|
||||||
|
@ -71,19 +75,12 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
this.cmbAidf = cmbAidf;
|
this.cmbAidf = cmbAidf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Aidf> getLsAidf() {
|
|
||||||
return lsAidf;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsAidf(List<Aidf> lsAidf) {
|
|
||||||
this.lsAidf = lsAidf;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
|
||||||
List<Empresa> lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||||
lsAidf = aidfService.buscaAidfsPorEmpresas(lsEmpresas);
|
lsEmpresas.add(new Empresa(-1, "TODAS"));
|
||||||
|
|
||||||
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
@ -93,6 +90,15 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
actualizaBilheteList();
|
actualizaBilheteList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onChange$cmbEmpresa(Event evt) throws InterruptedException {
|
||||||
|
Comboitem empresaSelecionada = cmbEmpresa.getSelectedItem();
|
||||||
|
Empresa empresa = (Empresa) empresaSelecionada.getValue();
|
||||||
|
|
||||||
|
lsAidf = aidfService.buscaAidfsPorEmpresas(empresa.getEmpresaId().equals(-1) ? UsuarioLogado.getUsuarioLogado().getEmpresa() : Arrays.asList(empresa));
|
||||||
|
cmbAidf.setModel(new ListModelArray(lsAidf));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||||
actualizaBilheteList();
|
actualizaBilheteList();
|
||||||
}
|
}
|
||||||
|
@ -108,13 +114,23 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
bilheteBusqueda.addFilterEqual("activo", true);
|
bilheteBusqueda.addFilterEqual("activo", true);
|
||||||
bilheteBusqueda.addSortDesc("fecmodif");
|
bilheteBusqueda.addSortDesc("fecmodif");
|
||||||
|
|
||||||
|
|
||||||
Comboitem aidfSeleccionada = cmbAidf.getSelectedItem();
|
Comboitem aidfSeleccionada = cmbAidf.getSelectedItem();
|
||||||
|
if(cmbEmpresa.getSelectedItem() != null && aidfSeleccionada == null){
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaBilhetesController.MSG.filtroEmpresaInvalido"),
|
||||||
|
Labels.getLabel("busquedaBilhetesController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(aidfSeleccionada != null){
|
if(aidfSeleccionada != null){
|
||||||
Aidf aidf = (Aidf) aidfSeleccionada.getValue();
|
Aidf aidf = (Aidf) aidfSeleccionada.getValue();
|
||||||
bilheteBusqueda.addFilterEqual("aidf", aidf);
|
bilheteBusqueda.addFilterEqual("aidf", aidf);
|
||||||
}
|
}
|
||||||
|
|
||||||
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
|
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
|
||||||
|
|
||||||
if(puntoVentaSeleccionada != null){
|
if(puntoVentaSeleccionada != null){
|
||||||
|
@ -165,7 +181,6 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
return lsPuntoVenta;
|
return lsPuntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
||||||
this.lsPuntoVenta = lsPuntoVenta;
|
this.lsPuntoVenta = lsPuntoVenta;
|
||||||
}
|
}
|
||||||
|
@ -178,4 +193,20 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
this.cmbPuntoVenta = cmbPuntoVenta;
|
this.cmbPuntoVenta = cmbPuntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresas() {
|
||||||
|
return lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||||
|
this.lsEmpresas = lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbEmpresa() {
|
||||||
|
return cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||||
|
this.cmbEmpresa = cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,11 +69,13 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private Label aidfEstado, aidfSerie, aidfSubserie;
|
private Label aidfEstado, aidfSerie, aidfSubserie;
|
||||||
|
|
||||||
List<Empresa> lsEmpresas;
|
private List<Empresa> lsEmpresas;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||||
|
lsEmpresas.add(new Empresa(-1, "TODAS"));
|
||||||
|
|
||||||
lsTipoMovimentacion = movimentacionBilhetesService.obtenerTiposMovimetacion();
|
lsTipoMovimentacion = movimentacionBilhetesService.obtenerTiposMovimetacion();
|
||||||
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||||
fecmovimentacion = new Date();
|
fecmovimentacion = new Date();
|
||||||
|
@ -120,7 +122,6 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
||||||
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||||
this.cmbEmpresa = cmbEmpresa;
|
this.cmbEmpresa = cmbEmpresa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresas() {
|
public List<Empresa> getLsEmpresas() {
|
||||||
return lsEmpresas;
|
return lsEmpresas;
|
||||||
|
@ -205,7 +206,7 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
||||||
Comboitem empresaSelecionada = cmbEmpresa.getSelectedItem();
|
Comboitem empresaSelecionada = cmbEmpresa.getSelectedItem();
|
||||||
Empresa empresa = (Empresa) empresaSelecionada.getValue();
|
Empresa empresa = (Empresa) empresaSelecionada.getValue();
|
||||||
|
|
||||||
lsAidf = aidfService.buscaAidfsPorEmpresas(Arrays.asList(empresa));
|
lsAidf = aidfService.buscaAidfsPorEmpresas(empresa.getEmpresaId().equals(-1) ? UsuarioLogado.getUsuarioLogado().getEmpresa() : Arrays.asList(empresa));
|
||||||
cmbAidf.setModel(new ListModelArray(lsAidf));
|
cmbAidf.setModel(new ListModelArray(lsAidf));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6431,6 +6431,7 @@ busquedaBilhetesController.numsubseriepreimpreso.label=Subserie
|
||||||
busquedaBilhetesController.puntoventa.label=Agencia
|
busquedaBilhetesController.puntoventa.label=Agencia
|
||||||
busquedaBilhetesController.fecmodif.label=Ult.Actual.
|
busquedaBilhetesController.fecmodif.label=Ult.Actual.
|
||||||
busquedaBilhetesController.estacion.label=Estacion
|
busquedaBilhetesController.estacion.label=Estacion
|
||||||
|
busquedaBilhetesController.MSG.filtroEmpresaInvalido=Para o filtro de empresa ser aplicado é necessário informar AIDF
|
||||||
|
|
||||||
movimentacionBilhetesPuntoVentaController.window.title=Movimentación de estoque - agencia
|
movimentacionBilhetesPuntoVentaController.window.title=Movimentación de estoque - agencia
|
||||||
movimentacionBilhetesPuntoVentaController.MSG.suscribirOK=Movimentación se guardó exitosamente!
|
movimentacionBilhetesPuntoVentaController.MSG.suscribirOK=Movimentación se guardó exitosamente!
|
||||||
|
|
|
@ -6698,6 +6698,7 @@ busquedaBilhetesController.numsubseriepreimpreso.label=Subsérie
|
||||||
busquedaBilhetesController.puntoventa.label=Agência
|
busquedaBilhetesController.puntoventa.label=Agência
|
||||||
busquedaBilhetesController.fecmodif.label=Ult.Atual.
|
busquedaBilhetesController.fecmodif.label=Ult.Atual.
|
||||||
busquedaBilhetesController.estacion.label=Estação
|
busquedaBilhetesController.estacion.label=Estação
|
||||||
|
busquedaBilhetesController.MSG.filtroEmpresaInvalido=Para o filtro de empresa ser aplicado é necessário informar AIDF
|
||||||
|
|
||||||
movimentacionBilhetesPuntoVentaController.window.title=Movimentação de Estoque - Agência
|
movimentacionBilhetesPuntoVentaController.window.title=Movimentação de Estoque - Agência
|
||||||
movimentacionBilhetesPuntoVentaController.MSG.suscribirOK=Movimentação gravada com sucesso!
|
movimentacionBilhetesPuntoVentaController.MSG.suscribirOK=Movimentação gravada com sucesso!
|
||||||
|
|
|
@ -19,6 +19,16 @@
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<rows>
|
<rows>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('winMovimentacionBilhetes.empresa.label')}" />
|
||||||
|
<combobox id="cmbEmpresa"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
width="70%" mold="rounded" buttonVisible="true"
|
||||||
|
model="@{winBusquedaBilhetes$composer.lsEmpresas}" />
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<cell width="10%">
|
<cell width="10%">
|
||||||
<label
|
<label
|
||||||
|
@ -26,8 +36,7 @@
|
||||||
</cell>
|
</cell>
|
||||||
<combobox id="cmbAidf"
|
<combobox id="cmbAidf"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
width="50%" mold="rounded" buttonVisible="true"
|
width="50%" mold="rounded" buttonVisible="true" />
|
||||||
model="@{winBusquedaBilhetes$composer.lsAidf}" />
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue