fixes bug #6669
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@50620 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bc1ebc05da
commit
105731bc5a
|
@ -1,10 +1,10 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.comissao;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.comissao;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.zkoss.util.resource.Labels;
|
import org.zkoss.util.resource.Labels;
|
||||||
|
@ -14,6 +14,7 @@ import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
|
@ -21,28 +22,33 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
public class BusquedaConferenciaComissaoController extends MyGenericForwardComposer {
|
public class BusquedaConferenciaComissaoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
// private static final Logger log = LoggerFactory.getLogger(BusquedaConferenciaComissaoController.class);
|
||||||
private static final Logger log = LoggerFactory.getLogger(BusquedaConferenciaComissaoController.class);
|
|
||||||
|
|
||||||
private Textbox txtCompetencia;
|
@Autowired
|
||||||
private PuntoVenta puntoVenta;
|
private EmpresaService empresaService;
|
||||||
private Empresa empresa;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
|
||||||
super.doAfterCompose(comp);
|
|
||||||
txtCompetencia.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onClick$btnPesquisa(Event ev) {
|
|
||||||
Map<String, Object> args = new HashMap<String, Object>();
|
|
||||||
args.put("competencia", txtCompetencia.getValue());
|
|
||||||
args.put("empresa", empresa);
|
|
||||||
args.put("puntoVenta", puntoVenta);
|
|
||||||
|
|
||||||
openWindow("/gui/comissao/conferenciaComissao.zul",
|
private Textbox txtCompetencia;
|
||||||
Labels.getLabel("conferenciaComissaoController.window.title"), args, MODAL);
|
private PuntoVenta puntoVenta;
|
||||||
}
|
private Empresa empresa;
|
||||||
|
private List<Empresa> lsEmpresas;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
lsEmpresas = empresaService.obtenerTodos();
|
||||||
|
txtCompetencia.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisa(Event ev) {
|
||||||
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
|
args.put("competencia", txtCompetencia.getValue());
|
||||||
|
args.put("empresa", empresa);
|
||||||
|
args.put("puntoVenta", puntoVenta);
|
||||||
|
|
||||||
|
openWindow("/gui/comissao/conferenciaComissao.zul",
|
||||||
|
Labels.getLabel("conferenciaComissaoController.window.title"), args, MODAL);
|
||||||
|
}
|
||||||
|
|
||||||
public PuntoVenta getPuntoVenta() {
|
public PuntoVenta getPuntoVenta() {
|
||||||
return puntoVenta;
|
return puntoVenta;
|
||||||
|
@ -60,4 +66,12 @@ public class BusquedaConferenciaComissaoController extends MyGenericForwardCompo
|
||||||
this.empresa = empresa;
|
this.empresa = empresa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresas() {
|
||||||
|
return lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||||
|
this.lsEmpresas = lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,62 +5,57 @@
|
||||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winBusquedaConferenciaComissao"
|
<window id="winBusquedaConferenciaComissao"
|
||||||
title="${c:l('busquedaConferenciaComissaoController.window.title')}"
|
title="${c:l('busquedaConferenciaComissaoController.window.title')}"
|
||||||
apply="${busquedaConferenciaComissaoController}"
|
apply="${busquedaConferenciaComissaoController}"
|
||||||
contentStyle="overflow:auto"
|
contentStyle="overflow:auto" height="190px" width="380px"
|
||||||
height="190px"
|
border="normal">
|
||||||
width="380px"
|
<toolbar>
|
||||||
border="normal" >
|
<button id="btnCerrar"
|
||||||
<toolbar>
|
onClick="winBusquedaConferenciaComissao.detach()"
|
||||||
<button id="btnCerrar"
|
image="/gui/img/exit.png" width="35px"
|
||||||
onClick="winBusquedaConferenciaComissao.detach()"
|
tooltiptext="${c:l('busquedaConferenciaComissaoController.btnCerrar.tooltiptext')}" />
|
||||||
image="/gui/img/exit.png"
|
</toolbar>
|
||||||
width="35px"
|
|
||||||
tooltiptext="${c:l('busquedaConferenciaComissaoController.btnCerrar.tooltiptext')}"/>
|
|
||||||
</toolbar>
|
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="30%" />
|
<column width="30%" />
|
||||||
<column width="70%" />
|
<column width="70%" />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
|
||||||
<label value="${c:l('busquedaConferenciaComissaoController.lbCompetencia.label')}"/>
|
|
||||||
<hbox>
|
|
||||||
<textbox id="txtCompetencia"
|
|
||||||
width="100px"
|
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
|
||||||
<label value="${c:l('busquedaConferenciaComissaoController.lbCompetenciaLayout.label')}"/>
|
|
||||||
</hbox>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaConferenciaComissaoController.lbEmpresa.value')}" />
|
<label
|
||||||
<combobox id="cmbEmpresa"
|
value="${c:l('busquedaConferenciaComissaoController.lbCompetencia.label')}" />
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa"
|
<hbox>
|
||||||
constraint="no empty"
|
<textbox id="txtCompetencia" width="100px"
|
||||||
mold="rounded"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
buttonVisible="true"
|
<label
|
||||||
width="90%"
|
value="${c:l('busquedaConferenciaComissaoController.lbCompetenciaLayout.label')}" />
|
||||||
selectedItem="@{winBusquedaConferenciaComissao$composer.empresa}" />
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaConferenciaComissaoController.lbPuntoVenta.value')}" />
|
<label
|
||||||
|
value="${c:l('busquedaConferenciaComissaoController.lbEmpresa.value')}" />
|
||||||
|
<combobox id="cmbEmpresa" constraint="no empty"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
width="100%" mold="rounded" buttonVisible="true"
|
||||||
|
model="@{winBusquedaConferenciaComissao$composer.lsEmpresas}"
|
||||||
|
selectedItem="@{winBusquedaConferenciaComissao$composer.empresa}" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('busquedaConferenciaComissaoController.lbPuntoVenta.value')}" />
|
||||||
<combobox id="cmbPuntoVenta"
|
<combobox id="cmbPuntoVenta"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
mold="rounded"
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
buttonVisible="true"
|
selectedItem="@{winBusquedaConferenciaComissao$composer.puntoVenta}" />
|
||||||
width="90%"
|
|
||||||
selectedItem="@{winBusquedaConferenciaComissao$composer.puntoVenta}" />
|
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<button id="btnPesquisa"
|
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||||
image="/gui/img/find.png"
|
label="${c:l('busquedaConferenciaComissaoController.btnPesquisa.label')}" />
|
||||||
label="${c:l('busquedaConferenciaComissaoController.btnPesquisa.label')}"/>
|
</toolbar>
|
||||||
</toolbar>
|
</window>
|
||||||
</window>
|
|
||||||
</zk>
|
</zk>
|
Loading…
Reference in New Issue