Fechamento de conta corrente - Cadastro de parametros gerais
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@39492 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6ff40317cf
commit
9d0ae8e50f
|
@ -0,0 +1,118 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Paging;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoParamgeral;
|
||||
import com.rjconsultores.ventaboletos.service.FechamentoParamgeralService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
|
||||
@Controller("busquedaFechamentoParamgeralController")
|
||||
@Scope("prototype")
|
||||
public class BusquedaFechamentoParamgeralController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private FechamentoParamgeralService fechamentoParamgeralService;
|
||||
|
||||
@Autowired
|
||||
private transient PagedListWrapper<FechamentoParamgeral> plwParams;
|
||||
private Paging pagingParams;
|
||||
|
||||
private MyListbox paramsList;
|
||||
|
||||
private Combobox cmbEmpresa;
|
||||
private List<Empresa> lsEmpresas;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
paramsList.setItemRenderer(new FechamentoParamgeralListItemRenderer());
|
||||
paramsList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
FechamentoParamgeral params = (FechamentoParamgeral) paramsList.getSelected();
|
||||
visualizaParams(params);
|
||||
}
|
||||
});
|
||||
|
||||
actualizaParamsList();
|
||||
}
|
||||
|
||||
|
||||
private void visualizaParams(FechamentoParamgeral _params){
|
||||
|
||||
if (_params == null)
|
||||
return;
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("params", _params);
|
||||
args.put("paramsList", paramsList);
|
||||
|
||||
openWindow("/gui/configuraciones_comerciales/editarFechamentoParamgeral.zul",
|
||||
Labels.getLabel("editarFechamentoParamgeralController.window.title"), args, MODAL);
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
actualizaParamsList();
|
||||
}
|
||||
|
||||
public void onClick$btnRefresh(Event ev) {
|
||||
actualizaParamsList();
|
||||
}
|
||||
|
||||
public void onClick$btnNovo(Event ev) {
|
||||
visualizaParams(new FechamentoParamgeral());
|
||||
}
|
||||
|
||||
private void actualizaParamsList() {
|
||||
HibernateSearchObject<FechamentoParamgeral> paramsBusqueda =
|
||||
new HibernateSearchObject<FechamentoParamgeral>(FechamentoParamgeral.class, pagingParams.getPageSize());
|
||||
|
||||
paramsBusqueda.addFilterEqual("activo", true);
|
||||
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
paramsBusqueda.addFilterEqual("empresa", empresa);
|
||||
} else {
|
||||
paramsBusqueda.addFilterIn("empresa", lsEmpresas);
|
||||
}
|
||||
|
||||
paramsBusqueda.addSortDesc("fechamentoparamgeralId");
|
||||
|
||||
plwParams.init(paramsBusqueda, paramsList, pagingParams);
|
||||
|
||||
if (paramsList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("busquedaFechamentoParamgeralController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoParamgeral;
|
||||
|
||||
public class FechamentoParamgeralListItemRenderer implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem listItem, Object arg1) throws Exception {
|
||||
|
||||
FechamentoParamgeral params = (FechamentoParamgeral)arg1;
|
||||
|
||||
// private Long fechamentoparamgeralId;
|
||||
Listcell idCell = new Listcell(params.getFechamentoparamgeralId().toString());
|
||||
idCell.setParent(listItem);
|
||||
|
||||
// private Empresa empresa;
|
||||
Listcell empresaCell = new Listcell(params.getEmpresa().getNombempresa());
|
||||
empresaCell.setParent(listItem);
|
||||
|
||||
// private String boletoBancoCod;
|
||||
Listcell boletoBancoCodCell = new Listcell(params.getBoletoBancoCod());
|
||||
boletoBancoCodCell.setParent(listItem);
|
||||
|
||||
// private String boletoBancoAgencia;
|
||||
Listcell boletoBancoAgenciaCell = new Listcell(params.getBoletoBancoAgencia());
|
||||
boletoBancoAgenciaCell.setParent(listItem);
|
||||
|
||||
// private String boletoBancoConta;
|
||||
Listcell boletoBancoContaCell = new Listcell(params.getBoletoBancoConta());
|
||||
boletoBancoContaCell.setParent(listItem);
|
||||
|
||||
// private String boletoBancoContaDigito;
|
||||
Listcell boletoBancoContaDigitoCell = new Listcell(params.getBoletoBancoContaDigito());
|
||||
boletoBancoContaDigitoCell.setParent(listItem);
|
||||
|
||||
// private String boletoBancoCarteira;
|
||||
Listcell boletoBancoCarteiraCell = new Listcell(params.getBoletoBancoCarteira());
|
||||
boletoBancoCarteiraCell.setParent(listItem);
|
||||
|
||||
// private Integer boletoDiasVenc;
|
||||
Listcell boletoDiasVencCell = new Listcell(params.getBoletoDiasVenc().toString());
|
||||
boletoDiasVencCell.setParent(listItem);
|
||||
|
||||
// private Date fecmodif;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
Listcell fecmodifCell = new Listcell(sdf.format(params.getFecmodif()));
|
||||
fecmodifCell.setParent(listItem);
|
||||
|
||||
listItem.setAttribute("data", params);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.confcomerciales;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuFechamentoParamgeral extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuFechamentoParamgeral() {
|
||||
super("indexController.mniFechamentoParamgeral.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.FECHAMENTOPARAMGERAL";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/configuraciones_comerciales/busquedaFechamentoParamgeral.zul",
|
||||
Labels.getLabel("busquedaFechamentoParamgeralController.window.title"), null, desktop);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page title="Fechamento Conta Corrente - Parametros" contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaFechamentoParamgeral"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk>
|
||||
<window id="winBusquedaFechamentoParamgeral" title="${c:l('busquedaFechamentoParamgeralController.window.title')}"
|
||||
apply="${busquedaFechamentoParamgeralController}" contentStyle="overflow:auto"
|
||||
height="500px" width="1300px" border="normal" >
|
||||
<toolbar>
|
||||
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaFechamentoParamgeralController.btnRefresh.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaFechamentoParamgeralController.btnNovo.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
<button id="btnCerrar" onClick="winBusquedaFechamentoParamgeral.detach()" image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaFechamentoParamgeralController.btnCerrar.tooltiptext')}"/>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<cell>
|
||||
<label value="${c:l('busquedaFechamentoParamgeralController.empresa.label')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
width="50%" mold="rounded" buttonVisible="true"
|
||||
model="@{winBusquedaFechamentoParamgeral$composer.lsEmpresas}" />
|
||||
</cell>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
|
||||
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.btnPesquisa.label')}"/>
|
||||
</toolbar>
|
||||
|
||||
<paging id="pagingParams" pageSize="10"/>
|
||||
<listbox id="paramsList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" fixedLayout="true" vflex="true" hflex="min"
|
||||
multiple="false" height="250px" width="1299px">
|
||||
<listhead sizable="true">
|
||||
<listheader width="3%" image="/gui/img/create_doc.gif"
|
||||
label="${c:l('lb.id')}" sort="auto(fechamentoparamgeralId)"/>
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.empresa.label')}" sort="auto(empresa)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoBancoCod.label')}" sort="auto(boletoBancoCod)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoBancoAgencia.label')}" sort="auto(boletoBancoAgencia)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoBancoConta.label')}" sort="auto(boletoBancoConta)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoBancoContaDigito.label')}" sort="auto(boletoBancoContaDigito)"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoBancoCarteira.label')}" sort="auto(boletoBancoCarteira)"/>
|
||||
|
||||
<listheader width="5%" image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.boletoDiasVenc.label')}" sort="auto(boletoDiasVenc)"/>
|
||||
|
||||
<listheader width="5%" image="/gui/img/create_doc.gif" align="right"
|
||||
label="${c:l('busquedaFechamentoParamgeralController.fecmodif.label')}" sort="auto(fecmodif)"/>
|
||||
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,6 @@
|
|||
<?page title="Fechamento Conta Corrente - Editar parametro geral" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
<window title="Fechamento Conta Corrente - Editar parametro geral" border="normal">
|
||||
New Content Here!
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue