rodrigo 2013-05-02 14:21:54 +00:00
parent f1e46601ea
commit 82d1329c39
17 changed files with 515 additions and 345 deletions

View File

@ -4,16 +4,9 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl;
import com.rjconsultores.ventaboletos.entidad.Empresa;
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;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoriaDescuento;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
@ -25,6 +18,14 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl;
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;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoriaDescuento;
/**
*
* @author rodrigo

View File

@ -135,11 +135,14 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
private Radio radioImp;
private Radio radioImprimePassagem;
private Radio rdCuotaSi;
private Radio radioNaoImprimePassagem;
private Radio rdVendaAntecipadaSi;
private Radio rdVendaAntecipadaNo;
private Radio rdVendeAbertoSim;
private Row rowTrecho;;
private Row rowTiempo;;
private Radio rdTrecho;
private Timebox timeTempoPermitir;
private Radio radioNaoImprimePassagem;
private Tab tabEmpresa;
private Tab tabDesconto;
private Tab tabMarca;
@ -152,9 +155,6 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
private Label lblMsgTiempo;
private Spinner spnHora;
private Spinner spnMinuto;
private Radio rdVendaAntecipadaSi;
private Radio rdVendaAntecipadaNo;
public List<Categoria> getLsCategorias() {
return lsCategorias;
@ -433,8 +433,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
}
/*
* Nao deixa editar periodos para novos tipo de pasajero Desa forma nao
* traslapa os periodos.
* Nao deixa editar periodos para novos tipo de pasajero Desa forma nao traslapa os periodos.
*/
if (categoriaCtrl.getCategoriactrlId() == null) {
Messagebox.show(Labels.getLabel("editarConfiguracionCategoriaController.MSG.editarPeriodo"),
@ -601,18 +600,18 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
cmbCategorias.focus();
return;
}
if (rdVendaAntecipadaSi.isChecked()){
int hora = (spnHora.getValue() == null)?0:spnHora.getValue();
int minuto = (spnMinuto.getValue() == null)?0:spnMinuto.getValue();
if ( (hora + minuto) == 0){
if (rdVendaAntecipadaSi.isChecked()) {
int hora = (spnHora.getValue() == null) ? 0 : spnHora.getValue();
int minuto = (spnMinuto.getValue() == null) ? 0 : spnMinuto.getValue();
if ((hora + minuto) == 0) {
Messagebox.show(
Labels.getLabel("editarConfiguracionCategoriaController.msg.validacaoVentaAntecipada"),
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
spnHora.focus();
return;
}
}
@ -643,13 +642,14 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
cDescuento.setIndImportePedagio(chkPrecoPedagio.isChecked());
cDescuento.setIndImporteSeguro(chkPrecoSeguro.isChecked());
cDescuento.setIndImporteTxEmbarque(chkPrecoTxEmbarque.isChecked());
cDescuento.setIndVentaAbierto(rdVendeAbertoSim.isSelected());
if (rdVendaAntecipadaSi.isChecked()){
if (rdVendaAntecipadaSi.isChecked()) {
cDescuento.setTiempoDesactivar(spnHora.getValue(), spnMinuto.getValue());
}else{
} else {
cDescuento.setTiempoActivar(spnHora.getValue(), spnMinuto.getValue());
}
if (cmbIndGeneraFeriado.getSelectedItem() != null) {
cDescuento.setIndAplicaFeriado((String) cmbIndGeneraFeriado.getSelectedItem().getValue());
}
@ -1204,11 +1204,13 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
spnMinuto.setValue(0);
lblMsgTiempo.setValue(Labels.getLabel("editarConfiguracionCategoriaController.lblVentaAntecipadaTempoDesactivar.value"));
}
public void onClick$rdVendaAntecipadaNo(Event ev) {
spnHora.setValue(0);
spnMinuto.setValue(0);
lblMsgTiempo.setValue(Labels.getLabel("editarConfiguracionCategoriaController.lblVentaAntecipadaTempoActivar.value"));
}
public void onClick$rdCuotaSi(Event ev) {
mudarCamposCuota(true);
}

View File

@ -30,154 +30,155 @@ import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
/**
*
*
* @author rodrigo
*/
@Controller("busquedaMenuController")
@Scope("prototype")
public class BusquedaMenuController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<FuncionSistema> plwMenu;
@Autowired
private SistemaService sistemaService;
private MyListbox menuList;
private Paging pagingMenu;
private Textbox txtNombFuncion;
private Textbox txtDescRuta;
private Combobox cmbSistema;
private Intbox txtID;
private List<Sistema> lsSistema;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<FuncionSistema> plwMenu;
@Autowired
private SistemaService sistemaService;
private MyListbox menuList;
private Paging pagingMenu;
private Textbox txtNombFuncion;
private Textbox txtDescRuta;
private Combobox cmbSistema;
private Intbox txtID;
private List<Sistema> lsSistema;
public Combobox getCmbSistema() {
return cmbSistema;
}
public Combobox getCmbSistema() {
return cmbSistema;
}
public void setCmbSistema(Combobox cmbSistema) {
this.cmbSistema = cmbSistema;
}
public void setCmbSistema(Combobox cmbSistema) {
this.cmbSistema = cmbSistema;
}
public MyListbox getMenuList() {
return menuList;
}
public MyListbox getMenuList() {
return menuList;
}
public void setMenuList(MyListbox menuList) {
this.menuList = menuList;
}
public void setMenuList(MyListbox menuList) {
this.menuList = menuList;
}
public Textbox getTxtDescRuta() {
return txtDescRuta;
}
public Textbox getTxtDescRuta() {
return txtDescRuta;
}
public void setTxtDescRuta(Textbox txtDescRuta) {
this.txtDescRuta = txtDescRuta;
}
public void setTxtDescRuta(Textbox txtDescRuta) {
this.txtDescRuta = txtDescRuta;
}
public Intbox getTxtID() {
return txtID;
}
public Intbox getTxtID() {
return txtID;
}
public void setTxtID(Intbox txtID) {
this.txtID = txtID;
}
public void setTxtID(Intbox txtID) {
this.txtID = txtID;
}
public Textbox getTxtNombFuncion() {
return txtNombFuncion;
}
public Textbox getTxtNombFuncion() {
return txtNombFuncion;
}
public void setTxtNombFuncion(Textbox txtNombFuncion) {
this.txtNombFuncion = txtNombFuncion;
}
public void setTxtNombFuncion(Textbox txtNombFuncion) {
this.txtNombFuncion = txtNombFuncion;
}
public List<Sistema> getLsSistema() {
return lsSistema;
}
public List<Sistema> getLsSistema() {
return lsSistema;
}
public void setLsSistema(List<Sistema> lsSistema) {
this.lsSistema = lsSistema;
}
public void setLsSistema(List<Sistema> lsSistema) {
this.lsSistema = lsSistema;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lsSistema = sistemaService.obtenerTodos();
lsSistema = sistemaService.obtenerTodos();
menuList.setItemRenderer(new RenderMenu());
menuList.addEventListener("onDoubleClick", new EventListener() {
menuList.setItemRenderer(new RenderMenu());
menuList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
FuncionSistema s = (FuncionSistema) menuList.getSelected();
verMenu(s);
}
});
@Override
public void onEvent(Event event) throws Exception {
FuncionSistema s = (FuncionSistema) menuList.getSelected();
verMenu(s);
}
});
refreshLista();
refreshLista();
txtNombFuncion.focus();
}
txtNombFuncion.focus();
}
private void verMenu(FuncionSistema fs) {
if (fs == null) {
return;
}
private void verMenu(FuncionSistema fs) {
if (fs == null) {
return;
}
Map args = new HashMap();
args.put("menu", fs);
args.put("menuList", menuList);
Map args = new HashMap();
args.put("menu", fs);
args.put("menuList", menuList);
openWindow("/gui/seguridad/editarMenu.zul",
Labels.getLabel("editarMenuController.window.title"), args, MODAL);
}
openWindow("/gui/seguridad/editarMenu.zul",
Labels.getLabel("editarMenuController.window.title"), args, MODAL);
}
private void refreshLista() {
HibernateSearchObject<FuncionSistema> menuBusqueda =
new HibernateSearchObject<FuncionSistema>(FuncionSistema.class,
pagingMenu.getPageSize());
private void refreshLista() {
HibernateSearchObject<FuncionSistema> menuBusqueda =
new HibernateSearchObject<FuncionSistema>(FuncionSistema.class,
pagingMenu.getPageSize());
String nombFuncion = txtNombFuncion.getText();
if (nombFuncion != null) {
menuBusqueda.addFilterLike("nombfuncion", "%" + nombFuncion.trim().concat("%"));
}
String nombFuncion = txtNombFuncion.getText();
if (nombFuncion != null) {
menuBusqueda.addFilterLike("nombfuncion", "%" + nombFuncion.trim().concat("%"));
}
String descRuta = txtDescRuta.getText();
if (descRuta != null) {
menuBusqueda.addFilterLike("descruta", "%" + descRuta.trim().concat("%"));
}
String descRuta = txtDescRuta.getText();
if (descRuta != null) {
menuBusqueda.addFilterLike("descruta", "%" + descRuta.trim().concat("%"));
}
Comboitem itemSistema = cmbSistema.getSelectedItem();
if (itemSistema != null) {
Sistema sistema = (Sistema) itemSistema.getValue();
menuBusqueda.addFilterEqual("sistema", sistema);
}
Comboitem itemSistema = cmbSistema.getSelectedItem();
if (itemSistema != null) {
Sistema sistema = (Sistema) itemSistema.getValue();
menuBusqueda.addFilterEqual("sistema", sistema);
}
menuBusqueda.addFilterEqual("funcionsistemaId", txtID.getValue());
menuBusqueda.addFilterEqual("funcionsistemaId", txtID.getValue());
menuBusqueda.addSortAsc("nombfuncion");
menuBusqueda.addFilterEqual("activo", Boolean.TRUE);
menuBusqueda.addSortAsc("nombfuncion");
menuBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwMenu.init(menuBusqueda, menuList, pagingMenu);
plwMenu.init(menuBusqueda, menuList, pagingMenu);
if (menuList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaMenuController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
if (menuList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaMenuController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verMenu(new FuncionSistema());
}
public void onClick$btnNovo(Event ev) {
verMenu(new FuncionSistema());
}
}

View File

@ -24,9 +24,11 @@ import org.zkoss.zul.Combobox;
import org.zkoss.zul.Intbox;
import org.zkoss.zul.Longbox;
import org.zkoss.zul.Textbox;
import org.zkoss.zul.api.Comboitem;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estacion;
import com.rjconsultores.ventaboletos.entidad.EstacionImpresora;
import com.rjconsultores.ventaboletos.entidad.EstacionSitef;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.EstacionService;
@ -35,6 +37,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.EstacionSitefRender;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacionImpresora;
/**
*
@ -49,7 +52,9 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private EstacionService estacionService;
private MyListbox estacionList;
private MyListbox estacionSitefList;
private MyListbox estacionImpresoraList;
private Combobox cmbEmpresa;
private Combobox cmbEmpresaImpressora;
private Button btnApagar;
private Textbox txtDescEstacion;
private Textbox txtDescMac;
@ -62,7 +67,10 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private Intbox txtNumPdv;
private List<Empresa> lsEmpresa;
private List<EstacionSitef> lsEstacionSitef;
private List<EstacionImpresora> lsEstacionImpresora;
private static Logger log = Logger.getLogger(EditarEstacionController.class);
private Textbox txtNomImpressoara;
private Textbox txtNomeArquivoLayout;
public Estacion getEstacion() {
return estacion;
@ -85,6 +93,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacion = (Estacion) Executions.getCurrent().getArg().get("estacion");
estacionList = (MyListbox) Executions.getCurrent().getArg().get("estacionList");
estacionSitefList.setItemRenderer(new EstacionSitefRender());
estacionImpresoraList.setItemRenderer(new RenderEstacionImpresora());
if (estacion.getEstacionId() == null) {
btnApagar.setVisible(Boolean.FALSE);
@ -103,14 +112,19 @@ public class EditarEstacionController extends MyGenericForwardComposer {
txtDescMac.setText(descMac.toUpperCase());
}
estacion = estacionService.obtenerID(estacion.getEstacionId());
lsEstacionSitef = estacion.getEstacionSitefList();
estacionSitefList.setData(lsEstacionSitef);
lsEstacionImpresora = estacion.getLsEstacionImpresora();
estacionImpresoraList.setData(lsEstacionImpresora);
}
txtDescEstacion.focus();
}
@SuppressWarnings("unchecked")
public void onClick$btnSalvar(Event ev) throws InterruptedException {
cmbPuntoVenta.getValue(true);
txtNumEmpresa.getValue();
@ -128,6 +142,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
try {
estacion.setEstacionSitefList(estacionSitefList.getListData());
estacion.setLsEstacionImpresora(estacionImpresoraList.getListData());
estacionService.suscribirActualizar(estacion);
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
Labels.getLabel("editarEstacionController.window.title"),
@ -168,7 +184,6 @@ public class EditarEstacionController extends MyGenericForwardComposer {
}
public void onClick$btnAddConfSitef(Event e) {
if ((cmbEmpresa.getSelectedItem() == null) || (txtNumEmpresa.getValue() == null) || (txtNumFilial.getValue() == null) || (txtNumPdv.getValue() == null) || (txtIpServidor.getValue() == null)) {
Clients.alert(Labels.getLabel("editarEstacionController.MSG.sitef"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
@ -206,11 +221,10 @@ public class EditarEstacionController extends MyGenericForwardComposer {
es.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
es.setIpServidor(txtIpServidor.getValue());
estacionSitefList.addItem(es);
estacionSitefList.addItemNovo(es);
}
public void onClick$btnRemConfSitef(Event e) {
if (estacionSitefList.getSelected() == null) {
return;
}
@ -226,6 +240,67 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionSitefList.addItemNovo(es);
}
}
public void onClick$btnAddEstacionImpresora(Event ev) {
Comboitem cbiEmpresa = cmbEmpresaImpressora.getSelectedItem();
if (cbiEmpresa != null) {
Empresa empresa = (Empresa) cbiEmpresa.getValue();
final Integer empresaId = empresa.getEmpresaId();
boolean empresaExiste = CollectionUtils.exists(estacionImpresoraList.getListData(), new Predicate() {
@Override
public boolean evaluate(Object obj) {
EstacionImpresora e = (EstacionImpresora) obj;
return (e.getActivo() && e.getEmpresa().getEmpresaId().equals(empresaId));
}
});
if (empresaExiste) {
Clients.alert(Labels.getLabel("editarEstacionController.MSG.empresaYaExiste"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
return;
}
String nomeImpresora = txtNomImpressoara.getValue();
String nomeArquivoLayout = txtNomeArquivoLayout.getValue();
EstacionImpresora estacionImpresora = new EstacionImpresora();
estacionImpresora.setEmpresa(empresa);
estacionImpresora.setEstacion(estacion);
estacionImpresora.setNombImpresora(nomeImpresora);
estacionImpresora.setNombArchivoLayout(nomeArquivoLayout);
estacionImpresora.setActivo(Boolean.TRUE);
estacionImpresora.setFecmodif(Calendar.getInstance().getTime());
estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacionImpresoraList.addItemNovo(estacionImpresora);
}
}
public void onClick$btnRemEstacionImpresora(Event ev) {
if (estacionImpresoraList.getSelected() == null) {
return;
}
EstacionImpresora ei = (EstacionImpresora) estacionImpresoraList.getSelected();
estacionImpresoraList.removeSelectedItem();
if (ei.getEstacionImpresoraId() != null) {
ei.setFecmodif(Calendar.getInstance().getTime());
ei.setActivo(Boolean.FALSE);
ei.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacionImpresoraList.addItemNovo(ei);
}
}
}

View File

@ -9,32 +9,28 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Combobox;
/**
*
*
* @author gleimar
*/
public class MyComboboxEstandar extends Combobox {
public MyComboboxEstandar() {
super();
private static final long serialVersionUID = 1L;
this.setAutodrop(true);
this.setAutocomplete(true);
this.setReadonly(true);
this.setCtrlKeys("#del");
public MyComboboxEstandar() {
super();
this.addEventListener("onCtrlKey", new EventListener() {
this.setAutodrop(true);
this.setAutocomplete(true);
this.setReadonly(true);
this.setCtrlKeys("#del");
@Override
public void onEvent(Event event) throws Exception {
MyComboboxEstandar.this.setSelectedItem(null);
MyComboboxEstandar.this.close();
}
});
}
this.addEventListener("onCtrlKey", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
MyComboboxEstandar.this.setSelectedItem(null);
MyComboboxEstandar.this.close();
}
});
}
}

View File

@ -16,6 +16,7 @@ import org.zkoss.zul.Listbox;
*/
public class MyListbox extends Listbox {
private static final long serialVersionUID = 1L;
private Object selected = null;
private ListModelList modelList = new ListModelList();

View File

@ -19,8 +19,6 @@ public class ItemMenuConfiguracionCategorias extends DefaultItemMenuSistema {
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul",
Labels.getLabel("busquedaConfiguracionCategoriaController.window.title"), null,desktop);
Labels.getLabel("busquedaConfiguracionCategoriaController.window.title"), null, desktop);
}
}

View File

@ -38,6 +38,9 @@ public class RenderConfiguracionCategoriaDecuento implements ListitemRenderer {
lc = new Listcell(categoria.getIndCuota() != null ? (categoria.getIndCuota() ? "Sim" : "Não") : "Não");
lc.setParent(lstm);
lc = new Listcell(categoria.getIndVentaAbierto() != null ? (categoria.getIndVentaAbierto() ? "Sim" : "Não") : "Não");
lc.setParent(lstm);
lc = new Listcell(categoria.getDescuentoporc() != null ? categoria.getDescuentoporc().toString() : "0");
lc.setParent(lstm);
@ -72,45 +75,41 @@ public class RenderConfiguracionCategoriaDecuento implements ListitemRenderer {
}
lc = new Listcell(aplicaFeriado);
lc.setParent(lstm);
StringBuilder sb = new StringBuilder(" ");
if (categoria.getIndImporteTxEmbarque()){
if (categoria.getIndImporteTxEmbarque()) {
sb.append("TX,");
}
if (categoria.getIndImportePedagio()){
if (categoria.getIndImportePedagio()) {
sb.append("P,");
}
if (categoria.getIndImporteSeguro()){
if (categoria.getIndImporteSeguro()) {
sb.append("S,");
}
if (categoria.getIndImporteOutros()){
if (categoria.getIndImporteOutros()) {
sb.append("O,");
}
lc = new Listcell(sb.substring(0, sb.length()-1));
lc = new Listcell(sb.substring(0, sb.length() - 1));
lc.setParent(lstm);
lc = new Listcell( (categoria.getTiempoDesactivar() != null)?"Sim":"Não" );
lc = new Listcell((categoria.getTiempoDesactivar() != null) ? "Sim" : "Não");
lc.setParent(lstm);
Integer tiempo = (categoria.getTiempoDesactivar() != null)?categoria.getTiempoDesactivar() :categoria.getTiempoActivar();
Integer tiempo = (categoria.getTiempoDesactivar() != null) ? categoria.getTiempoDesactivar() : categoria.getTiempoActivar();
String horaMinuto = "-";
if (tiempo != null){
int hora = tiempo/60;
int minuto = tiempo%60;
horaMinuto = hora +":" + minuto;
if (tiempo != null) {
int hora = tiempo / 60;
int minuto = tiempo % 60;
horaMinuto = hora + ":" + minuto;
}
lc = new Listcell( horaMinuto);
lc = new Listcell(horaMinuto);
lc.setParent(lstm);
lstm.setAttribute("data", categoria);
}
}

View File

@ -57,12 +57,6 @@ public class RenderEstacion implements ListitemRenderer {
lc = new Listcell(estacion.getNomeImpressora());
lc.setParent(lstm);
lc = new Listcell(estacion.getNomeArquivoLayout());
lc.setParent(lstm);
lc = new Listcell(estacion.getNomeImpressoraRelatorio());
lc.setParent(lstm);
PuntoVenta pv = estacion.getPuntoVenta();
if (pv != null) {
lc = new Listcell(pv.getNombpuntoventa());

View File

@ -0,0 +1,31 @@
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.EstacionImpresora;
public class RenderEstacionImpresora implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
EstacionImpresora estacionImpresora = (EstacionImpresora) o;
if (!estacionImpresora.getActivo()) {
return;
}
Listcell lc = new Listcell();
lc = new Listcell(estacionImpresora.getEmpresa().getNombempresa());
lc.setParent(lstm);
lc = new Listcell(estacionImpresora.getNombImpresora());
lc.setParent(lstm);
lc = new Listcell(estacionImpresora.getNombArchivoLayout());
lc.setParent(lstm);
lstm.setAttribute("data", estacionImpresora);
}
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="E:/scia_ventaboletos_transpais_senda/sco/AdmVenta/Web/trunk/ventaboletos/build/classes">
</dir>
<dir name="E:/scia_ventaboletos_transpais_senda/sco/AdmVenta/Model/trunk/modelWeb/bin">
</dir>
<dir name="E:/scia_ventaboletos_transpais_senda/sco_guana/AdmVenta/CustomAdmVenta/trunk/CustomAdmVenta/bin">
</dir>
</classpath>
<web>
<link target="/">
<dir name="E:/scia_ventaboletos_transpais_senda/sco/AdmVenta/Web/trunk/ventaboletos/web">
</dir>
</link>
</web>
</application>

View File

@ -22,6 +22,8 @@
<property name="annotatedClasses">
<list>
<value>com.rjconsultores.ventaboletos.entidad.EstacionImpresora
</value>
<value>com.rjconsultores.ventaboletos.entidad.AlertaCtrl</value>
<value>com.rjconsultores.ventaboletos.entidad.ConfRestricaoExcecao
</value>

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto:
versao = ADM_20130418_1RC144
versao = ADM_20130426_1RC145
# MSG Defaut:
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
@ -898,6 +898,7 @@ busquedaConfiguracionCategoriaController.lhTipoPassagem.label = Tipo de Passagem
# Pantalla Editar Configuração Categorí­a
editarConfiguracionCategoriaController.window.title = Tipo de Configuração de Passageiro
editarConfiguracionCategoriaController.lblImprimePassagem.value = Sim
editarConfiguracionCategoriaController.lblVendaAberto.value = Vende Aberto
editarConfiguracionCategoriaController.lblNaoImprimePassagem.value = Não
editarConfiguracionCategoriaController.MSG.noEsPermitidoTodosMarca = Para incluir a Marca TODAS, deve de Eliminar a(s) Marca(s) que já existe(n)
editarConfiguracionCategoriaController.MSG.noEsPermitidoMarcaTodosExiste = Para incluir a Marca deseada, deve de Eliminar a Marca TODAS
@ -2662,6 +2663,7 @@ editarEstacionController.MSG.empresaYaExiste= A empresa informada já está cada
editarEstacionController.lbNumEmpresa.value = Código da Empresa
editarEstacionController.lbNumFilial.value = Código da Filial
editarEstacionController.lbNumPdv.value = Númedo PDV
editarEstacionController.tab.label.impresora = Impressoras
# Pesquisa Exceção Ida e Volta
busquedaExceptionRedondoController.window.title = Exceção Viagem Ida e Volta

View File

@ -5,57 +5,63 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaConfiguracionCategoria"
title="${c:l('editarConfiguracionCategoriaController.window.title')}"
apply="${busquedaConfiguracionCategoriaController}"
height="500px" width="980px" border="normal" contentStyle="overflow:auto">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" onClick="winBusquedaConfiguracionCategoria.detach()" image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnCerrar.tooltiptext')}"/>
</toolbar>
<window id="winBusquedaConfiguracionCategoria"
title="${c:l('editarConfiguracionCategoriaController.window.title')}"
apply="${busquedaConfiguracionCategoriaController}" height="500px"
width="980px" border="normal" contentStyle="overflow:auto">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaConfiguracionCategoria.detach()"
image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCategoriaController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label value="${c:l('busquedaConfiguracionCategoriaController.txtNome.label')}"/>
<textbox id="txtNome" width="300px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaConfiguracionCategoriaController.btnPesquisa.label')}"/>
</toolbar>
<paging id="pagingCategoriaCtrl" pageSize="20"/>
<listbox id="categoriaCtrlList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false">
<listhead sizable="true">
<listheader id="lhId" image="/gui/img/create_doc.gif" width="65px"
label="${c:l('busquedaConfiguracionCategoriaController.lhId.label')}" sort="auto(categoriactrlId)"/>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label
value="${c:l('busquedaConfiguracionCategoriaController.txtNome.label')}" />
<textbox id="txtNome" width="300px"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
</rows>
</grid>
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaConfiguracionCategoriaController.lhDesc.label')}" sort="auto(empresa.nombempresa)"/>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaConfiguracionCategoriaController.btnPesquisa.label')}" />
</toolbar>
<listheader image="/gui/img/create_doc.gif" width="35%"
label="${c:l('busquedaConfiguracionCategoriaController.lhMarca.label')}"/>
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaConfiguracionCategoriaController.lhClase.label')}"/>
<listheader image="/gui/img/create_doc.gif" width="35%"
label="${c:l('busquedaConfiguracionCategoriaController.lhTipoPassagem.label')}"/>
</listhead>
</listbox>
</window>
<paging id="pagingCategoriaCtrl" pageSize="20" />
<listbox id="categoriaCtrlList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false">
<listhead sizable="true">
<listheader id="lhId" image="/gui/img/create_doc.gif"
width="65px"
label="${c:l('busquedaConfiguracionCategoriaController.lhId.label')}"
sort="auto(categoriactrlId)" />
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaConfiguracionCategoriaController.lhDesc.label')}"
sort="auto(empresa.nombempresa)" />
<listheader image="/gui/img/create_doc.gif" width="35%"
label="${c:l('busquedaConfiguracionCategoriaController.lhMarca.label')}" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaConfiguracionCategoriaController.lhClase.label')}" />
<listheader image="/gui/img/create_doc.gif" width="35%"
label="${c:l('busquedaConfiguracionCategoriaController.lhTipoPassagem.label')}" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -66,11 +66,13 @@
<!-- Desconto -->
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="30%" />
<column width="20%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row>
<row spans="1,3">
<label id="lblCategorias"
value="${c:l('editarConfiguracionCategoriaController.lblCategorias.value')}" />
<combobox id="cmbCategorias"
@ -78,31 +80,52 @@
mold="rounded" buttonVisible="true" width="50%"
model="@{winEditarConfiguracionCategoria$composer.lsCategorias}" />
</row>
<row>
<row spans="1,3">
<label id="lblCantAutorizada"
value="${c:l('editarConfiguracionCategoriaController.lblCantAutorizada.value')}" />
<intbox id="cantAutorizada" constraint="no empty, no zero" width="50%" maxlength="3" />
<intbox id="cantAutorizada"
constraint="no empty, no zero" width="50%" maxlength="3" />
</row>
<row spans="1,3">
<label id="lblDescuentoImporte"
value="${c:l('editarConfiguracionCategoriaController.lblDescuentoImporte.value')}" />
<decimalbox id="descuentoImporte"
constraint="no empty" width="50%" maxlength="9" />
</row>
<row spans="1,3">
<label id="lblDescuentoPorc"
value="${c:l('editarConfiguracionCategoriaController.lblDescuentoPorc.value')}" />
<decimalbox id="descuentoPorc"
constraint="no empty" width="50%" maxlength="9" />
</row>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCategoriaController.lblComponentesPreco.value')}" />
<hbox>
<checkbox id="chkPrecoTxEmbarque"
label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoTxEmbarque.value')}"
checked="true" />
<checkbox id="chkPrecoPedagio"
label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoPedagio.value')}"
checked="true" />
<checkbox id="chkPrecoSeguro"
label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoSeguro.value')}"
checked="true" />
<checkbox id="chkPrecoOutros"
label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoOutros.value')}"
checked="true" />
</hbox>
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblDescuento.value')}" />
<label
value="${c:l('editarConfiguracionCategoriaController.lblDescuento.value')}" />
<radiogroup Id="descuento">
<radio id="radioImp"
label="${c:l('editarConfiguracionCategoriaController.lblDescuentoImporte.value')}" />
<radio id="radioPor"
label="${c:l('editarConfiguracionCategoriaController.lblDescuentoPorc.value')}" />
</radiogroup>
</row>
<row>
<label id="lblDescuentoImporte"
value="${c:l('editarConfiguracionCategoriaController.lblDescuentoImporte.value')}" />
<decimalbox id="descuentoImporte" constraint="no empty" width="50%" maxlength="9" />
</row>
<row>
<label id="lblDescuentoPorc"
value="${c:l('editarConfiguracionCategoriaController.lblDescuentoPorc.value')}" />
<decimalbox id="descuentoPorc" constraint="no empty" width="50%" maxlength="9" />
</row>
<row>
<label
value="${c:l('editarConfiguracionCategoriaController.lblImprimirPassagem.value')}" />
<radiogroup Id="rdgImpressao">
@ -114,58 +137,73 @@
</radiogroup>
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblComponentesPreco.value')}" />
<hbox>
<checkbox id="chkPrecoTxEmbarque" label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoTxEmbarque.value')}" checked="true" />
<checkbox id="chkPrecoPedagio" label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoPedagio.value')}" checked="true"/>
<checkbox id="chkPrecoSeguro" label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoSeguro.value')}" checked="true"/>
<checkbox id="chkPrecoOutros" label="${c:l('editarConfiguracionCategoriaController.lblComponentesPrecoOutros.value')}" checked="true"/>
</hbox>
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipada.value')}" />
<label
value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipada.value')}" />
<radiogroup>
<radio id="rdVendaAntecipadaSi" label="Sim" />
<radio id="rdVendaAntecipadaNo" label="Nao" selected="true" />
<radio id="rdVendaAntecipadaSi"
label="Sim" />
<radio id="rdVendaAntecipadaNo"
label="Nao" selected="true" />
</radiogroup>
<label
value="${c:l('editarConfiguracionCategoriaController.lblCotaObli.value')}" />
<radiogroup>
<radio id="rdCuotaSi" label="Sim" />
<radio id="rdCuotaNo" label="Nao"
selected="true" />
</radiogroup>
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipadaTempo.value')}" />
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCategoriaController.lblVendaAberto.value')}" />
<radiogroup>
<radio id="rdVendeAbertoSim"
selected="true" label="Sim" />
<radio id="rdVendaAbertoNao"
label="Nao" />
</radiogroup>
</row>
<row spans="1,3" id="rowTrecho"
visible="false">
<label
value="${c:l('editarConfiguracionCategoriaController.lblTipoCota.value')}" />
<radiogroup>
<radio selected="true"
label="${c:l('editarConfiguracionCategoriaController.lblServico.value')}" />
<radio id="rdTrecho"
label="${c:l('editarConfiguracionCategoriaController.lblTrecho.value')}" />
</radiogroup>
</row>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipadaTempo.value')}" />
<hbox>
<spinner id="spnHora" value="00" width="50px" maxlength="4" constraint="max 9999,no negative"/>
<spinner id="spnHora" value="00"
width="50px" maxlength="4" constraint="max 9999,no negative" />
<label value=":" />
<spinner id="spnMinuto" value="00" width="50px" maxlength="2" constraint="max 99,no negative" />
<label id="lblMsgTiempo" value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipadaTempoActivar.value')}"/>
<spinner id="spnMinuto" value="00"
width="50px" maxlength="2" constraint="max 99,no negative" />
<label id="lblMsgTiempo"
value="${c:l('editarConfiguracionCategoriaController.lblVentaAntecipadaTempoActivar.value')}" />
</hbox>
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblFeriado.value')}" />
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCategoriaController.lblFeriado.value')}" />
<combobox id="cmbIndGeneraFeriado"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" width="50%" />
</row>
<row>
<label value="${c:l('editarConfiguracionCategoriaController.lblCotaObli.value')}" />
<radiogroup>
<radio id="rdCuotaSi" label="Sim" />
<radio id="rdCuotaNo" label="Nao" selected="true" />
</radiogroup>
<row spans="1,3" id="rowTiempo"
visible="false">
<label
value="${c:l('editarConfiguracionCategoriaController.lblTiempoValido.value')}" />
<timebox id="timeTempoPermitir"
width="70px" mold="rounded" format="HH:mm" />
</row>
<row id="rowTrecho" visible="false">
<label value="${c:l('editarConfiguracionCategoriaController.lblTipoCota.value')}" />
<radiogroup>
<radio selected="true" label="${c:l('editarConfiguracionCategoriaController.lblServico.value')}" />
<radio id="rdTrecho" label="${c:l('editarConfiguracionCategoriaController.lblTrecho.value')}" />
</radiogroup>
</row>
<row id="rowTiempo" visible="false">
<label value="${c:l('editarConfiguracionCategoriaController.lblTiempoValido.value')}" />
<timebox id="timeTempoPermitir" width="70px" mold="rounded" format="HH:mm" />
</row>
<row>
<label value=" " />
<row spans="4">
<hbox>
<button id="btnAdicionarDesconto"
height="20" image="/gui/img/add.png" width="35px"
@ -181,10 +219,13 @@
tooltiptext="${c:l('editarConfiguracionCategoriaController.btnAgregarPeriodo.tooltiptext')}" />
</hbox>
</row>
<row height="130px" spans="2">
<listbox id="categoriaDescuentoList" height="120px" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" multiple="false">
<row spans="4">
<listbox id="categoriaDescuentoList"
height="145px"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false">
<listhead sizable="true">
<listheader width="150px"
<listheader width="165px"
label="${c:l('editarConfiguracionCategoriaController.lblCategorias.value')}"
sort="auto(categoria.desccategoria)" />
<listheader width="60px"
@ -197,6 +238,8 @@
label="${c:l('editarConfiguracionCategoriaController.lblGridImprime.value')}" />
<listheader width="50px"
label="${c:l('editarConfiguracionCategoriaController.lblCota.value')}" />
<listheader width="85px"
label="${c:l('editarConfiguracionCategoriaController.lblVendaAberto.value')}" />
<listheader width="100px"
label="${c:l('editarConfiguracionCategoriaController.lblDescuentoPorc.value')}"
sort="auto(descuentoporc)" />
@ -215,7 +258,6 @@
</row>
</rows>
</grid>
</tabpanel>
<tabpanel height="485px">
<!-- Marca -->

View File

@ -75,17 +75,9 @@
<listheader image="/gui/img/create_doc.gif" width="10%"
label="${c:l('busquedaEstacionController.lhNumCaja.label')}"
sort="auto(numcaja)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.nomeImpressora.label')}"
sort="auto(nomeImpressora)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}"
sort="auto(nomeArquivoLayout)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.nomeImpressoraRelatorio.label')}"
sort="auto(nomeImpressoraRelatorio)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.lhPuntoVenta.label')}"
sort="auto(puntoVenta.nombpuntoventa)" />

View File

@ -29,8 +29,11 @@
label="${c:l('editarEstacionController.window.title')}" />
<tab
label="${c:l('editarEstacionController.tab.label.sitef')}" />
<tab
label="${c:l('editarEstacionController.tab.label.impresora')}" />
</tabs>
<tabpanels>
<!-- ESTACAO -->
<tabpanel>
<grid fixedLayout="true">
<columns>
@ -61,20 +64,6 @@
constraint="no empty" maxlength="10"
value="@{winEditarEstacion$composer.estacion.numcaja}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<textbox id="txtNomImpressoara"
width="90%" maxlength="20"
value="@{winEditarEstacion$composer.estacion.nomeImpressora}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
<textbox id="txtNomeArquivoLayout"
width="90%" maxlength="20"
value="@{winEditarEstacion$composer.estacion.nomeArquivoLayout}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeImpressoraRelatorio.label')}" />
@ -111,7 +100,9 @@
</rows>
</grid>
</tabpanel>
<tabpanel>
<!-- SITEF -->
<grid fixedLayout="true">
<columns>
<column width="30%" />
@ -180,6 +171,62 @@
</listhead>
</listbox>
</tabpanel>
<tabpanel>
<!-- IMPRESSORAS -->
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row>
<label
value="${c:l('editarEstacionController.empresa.label')}" />
<combobox id="cmbEmpresaImpressora"
width="90%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true"
model="@{winEditarEstacion$composer.lsEmpresa}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<textbox id="txtNomImpressoara"
width="90%" maxlength="20" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
<textbox id="txtNomeArquivoLayout"
width="90%" maxlength="20" />
</row>
</rows>
</grid>
<toolbar>
<hbox spacing="5px" style="padding:1px"
align="right">
<button id="btnAddEstacionImpresora"
height="20" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarEstacionController.btnAddSitef.tooltiptext')}" />
<button id="btnRemEstacionImpresora"
height="20" image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarEstacionController.btnBorrarSitef.tooltiptext')}" />
</hbox>
</toolbar>
<listbox id="estacionImpresoraList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false" height="100px">
<listhead sizable="true">
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEstacionController.empresa.label')}" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
</listhead>
</listbox>
</tabpanel>
</tabpanels>
</tabbox>
</window>