bug#10938
dev:veloso qua:wallysson git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@81553 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
27eef07faf
commit
f5982a7f47
|
@ -1,6 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -16,6 +17,7 @@ import org.zkoss.zul.Combobox;
|
|||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.ListModelArray;
|
||||
import org.zkoss.zul.Longbox;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
|
@ -48,6 +50,7 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
|||
private EstadoService estadoService;
|
||||
|
||||
private Combobox cmbAidf;
|
||||
private Combobox cmbEmpresa;
|
||||
private List<Aidf> lsAidf;
|
||||
|
||||
private Combobox cmbTipoMovimentacion;
|
||||
|
@ -66,13 +69,11 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
|||
|
||||
private Label aidfEstado, aidfSerie, aidfSubserie;
|
||||
|
||||
|
||||
List<Empresa> lsEmpresas;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
List<Empresa> lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsAidf = aidfService.buscaAidfsPorEmpresas(lsEmpresas);
|
||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsTipoMovimentacion = movimentacionBilhetesService.obtenerTiposMovimetacion();
|
||||
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||
fecmovimentacion = new Date();
|
||||
|
@ -112,12 +113,21 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
|||
this.cmbAidf = cmbAidf;
|
||||
}
|
||||
|
||||
public List<Aidf> getLsAidf() {
|
||||
return lsAidf;
|
||||
public Combobox getCmbEmpresa() {
|
||||
return cmbEmpresa;
|
||||
}
|
||||
|
||||
public void setLsAidf(List<Aidf> lsAidf) {
|
||||
this.lsAidf = lsAidf;
|
||||
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||
this.cmbEmpresa = cmbEmpresa;
|
||||
}
|
||||
|
||||
|
||||
public List<Empresa> getLsEmpresas() {
|
||||
return lsEmpresas;
|
||||
}
|
||||
|
||||
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||
this.lsEmpresas = lsEmpresas;
|
||||
}
|
||||
|
||||
public Datebox getDtbFecMovimentacion() {
|
||||
|
@ -191,6 +201,15 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
|
|||
getAidfSubserie().setValue(aidf.getSubserie());
|
||||
}
|
||||
|
||||
public void onChange$cmbEmpresa(Event evt) throws InterruptedException {
|
||||
Comboitem empresaSelecionada = cmbEmpresa.getSelectedItem();
|
||||
Empresa empresa = (Empresa) empresaSelecionada.getValue();
|
||||
|
||||
lsAidf = aidfService.buscaAidfsPorEmpresas(Arrays.asList(empresa));
|
||||
cmbAidf.setModel(new ListModelArray(lsAidf));
|
||||
|
||||
}
|
||||
|
||||
public List<TipoMovimentacion> getLsTipoMovimentacion() {
|
||||
return lsTipoMovimentacion;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<combobox id="cmbPuntoVentaOrigem"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
model="@{winMovimentacionBilhetes$composer.lsPuntoVenta}"/>
|
||||
model="@{winMovimentacionBilhetes$composer.lsPuntoVenta}" constraint="no empty"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
|
@ -57,7 +57,16 @@
|
|||
<combobox id="cmbPuntoVentaDestino"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
model="@{winMovimentacionBilhetes$composer.lsPuntoVenta}"/>
|
||||
model="@{winMovimentacionBilhetes$composer.lsPuntoVenta}" constraint="no empty"/>
|
||||
</row>
|
||||
|
||||
<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="@{winMovimentacionBilhetes$composer.lsEmpresas}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
@ -65,8 +74,7 @@
|
|||
value="${c:l('winMovimentacionBilhetes.aidf.label')}" />
|
||||
<combobox id="cmbAidf"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
model="@{winMovimentacionBilhetes$composer.lsAidf}" />
|
||||
width="70%" mold="rounded" buttonVisible="true" constraint="no empty" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
|
Loading…
Reference in New Issue