fixes bug#AL-2431
parent
cd4b07f771
commit
43966fa0e1
6
pom.xml
6
pom.xml
|
@ -256,6 +256,12 @@
|
|||
<version>2.6.12</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>colorbox</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,42 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
public class PricingColorVO {
|
||||
|
||||
private String id;
|
||||
private String idBanco;
|
||||
private String color;
|
||||
private String backgroundColor;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getBackgroundColor() {
|
||||
return backgroundColor;
|
||||
}
|
||||
|
||||
public void setBackgroundColor(String backgroundColor) {
|
||||
this.backgroundColor = backgroundColor;
|
||||
}
|
||||
|
||||
public String getIdBanco() {
|
||||
return idBanco;
|
||||
}
|
||||
|
||||
public void setIdBanco(String idBanco) {
|
||||
this.idBanco = idBanco;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class PricingGestaoAlteradoVO {
|
||||
|
||||
private String pricing;
|
||||
private String servico;
|
||||
private String id;
|
||||
private Date data;
|
||||
|
||||
public String getPricing() {
|
||||
return pricing;
|
||||
}
|
||||
|
||||
public void setPricing(String pricing) {
|
||||
this.pricing = pricing;
|
||||
}
|
||||
|
||||
public Date getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Date data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getServico() {
|
||||
return servico;
|
||||
}
|
||||
|
||||
public void setServico(String servico) {
|
||||
this.servico = servico;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
public class PricingGestaoVO {
|
||||
|
||||
private String servico;
|
||||
private String domingo;
|
||||
private String segunda;
|
||||
private String terca;
|
||||
private String quarta;
|
||||
private String quinta;
|
||||
private String sexta;
|
||||
private String sabado;
|
||||
|
||||
public String getServico() {
|
||||
return servico;
|
||||
}
|
||||
|
||||
public void setServico(String servico) {
|
||||
this.servico = servico;
|
||||
}
|
||||
|
||||
public String getDomingo() {
|
||||
return domingo;
|
||||
}
|
||||
|
||||
public void setDomingo(String domingo) {
|
||||
this.domingo = domingo;
|
||||
}
|
||||
|
||||
public String getSegunda() {
|
||||
return segunda;
|
||||
}
|
||||
|
||||
public void setSegunda(String segunda) {
|
||||
this.segunda = segunda;
|
||||
}
|
||||
|
||||
public String getTerca() {
|
||||
return terca;
|
||||
}
|
||||
|
||||
public void setTerca(String terca) {
|
||||
this.terca = terca;
|
||||
}
|
||||
|
||||
public String getQuarta() {
|
||||
return quarta;
|
||||
}
|
||||
|
||||
public void setQuarta(String quarta) {
|
||||
this.quarta = quarta;
|
||||
}
|
||||
|
||||
public String getQuinta() {
|
||||
return quinta;
|
||||
}
|
||||
|
||||
public void setQuinta(String quinta) {
|
||||
this.quinta = quinta;
|
||||
}
|
||||
|
||||
public String getSexta() {
|
||||
return sexta;
|
||||
}
|
||||
|
||||
public void setSexta(String sexta) {
|
||||
this.sexta = sexta;
|
||||
}
|
||||
|
||||
public String getSabado() {
|
||||
return sabado;
|
||||
}
|
||||
|
||||
public void setSabado(String sabado) {
|
||||
this.sabado = sabado;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,371 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.zkplus.databind.BindingListModelList;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
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.RenderPricing;
|
||||
|
||||
@Controller("busquedaGP_PricingController")
|
||||
@Scope("prototype")
|
||||
public class BusquedaGP_PricingController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private transient PagedListWrapper<GP_Pricing> plwPricingPunto;
|
||||
@Autowired
|
||||
private GP_PricingService pricingService;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
private MyListbox pricingList;
|
||||
private Paging pagingPricing;
|
||||
private List<GP_Pricing> lsPricing;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private List<Ruta> lsRuta;
|
||||
private Combobox cmbEmpresa;
|
||||
private Textbox txtNome;
|
||||
private Datebox fechaInicio;
|
||||
private Datebox fechaFin;
|
||||
private Checkbox chkBuscarInativos;
|
||||
private Combobox cmbRuta;
|
||||
private Combobox cmbOrigen;
|
||||
private Combobox cmbDestino;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
|
||||
private static Logger log = Logger.getLogger(BusquedaGP_PricingController.class);
|
||||
|
||||
public List<GP_Pricing> getLsPricing() {
|
||||
return lsPricing;
|
||||
}
|
||||
|
||||
public void setLsPricing(List<GP_Pricing> lsPricing) {
|
||||
this.lsPricing = lsPricing;
|
||||
}
|
||||
|
||||
public Paging getPagingPricing() {
|
||||
return pagingPricing;
|
||||
}
|
||||
|
||||
public void setPagingPricing(Paging pagingPricing) {
|
||||
this.pagingPricing = pagingPricing;
|
||||
}
|
||||
|
||||
public MyListbox getPricingList() {
|
||||
return pricingList;
|
||||
}
|
||||
|
||||
public void setPricingList(MyListbox pricingList) {
|
||||
this.pricingList = pricingList;
|
||||
}
|
||||
|
||||
public GP_PricingService getPricingService() {
|
||||
return pricingService;
|
||||
}
|
||||
|
||||
public void setPricingService(GP_PricingService pricingService) {
|
||||
this.pricingService = pricingService;
|
||||
}
|
||||
|
||||
public EmpresaService getEmpresaService() {
|
||||
return empresaService;
|
||||
}
|
||||
|
||||
public void setEmpresaService(EmpresaService empresaService) {
|
||||
this.empresaService = empresaService;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public Textbox getTxtNome() {
|
||||
return txtNome;
|
||||
}
|
||||
|
||||
public void setTxtNome(Textbox txtNome) {
|
||||
this.txtNome = txtNome;
|
||||
}
|
||||
|
||||
public Datebox getFechaInicio() {
|
||||
return fechaInicio;
|
||||
}
|
||||
|
||||
public void setFechaInicio(Datebox fechaInicio) {
|
||||
this.fechaInicio = fechaInicio;
|
||||
}
|
||||
|
||||
public Datebox getFechaFin() {
|
||||
return fechaFin;
|
||||
}
|
||||
|
||||
public void setFechaFin(Datebox fechaFin) {
|
||||
this.fechaFin = fechaFin;
|
||||
}
|
||||
|
||||
public RutaService getRutaService() {
|
||||
return rutaService;
|
||||
}
|
||||
|
||||
public void setRutaService(RutaService rutaService) {
|
||||
this.rutaService = rutaService;
|
||||
}
|
||||
|
||||
public List<Ruta> getLsRuta() {
|
||||
return lsRuta;
|
||||
}
|
||||
|
||||
public void setLsRuta(List<Ruta> lsRuta) {
|
||||
this.lsRuta = lsRuta;
|
||||
}
|
||||
|
||||
public Combobox getCmbRuta() {
|
||||
return cmbRuta;
|
||||
}
|
||||
|
||||
public void setCmbRuta(Combobox cmbRuta) {
|
||||
this.cmbRuta = cmbRuta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsEmpresa = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
pricingList.setItemRenderer(new RenderPricing());
|
||||
pricingList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
GP_Pricing pricing = (GP_Pricing) pricingList.getSelected();
|
||||
verPricing(pricing);
|
||||
}
|
||||
});
|
||||
|
||||
lsPricing = new ArrayList<GP_Pricing>();
|
||||
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onChange$cmbEmpresa(Event ev) throws InterruptedException {
|
||||
|
||||
Empresa empresa = (Empresa) (cmbEmpresa.getSelectedItem() != null ? cmbEmpresa.getSelectedItem().getValue() : null);
|
||||
|
||||
if (empresa != null) {
|
||||
lsRuta = rutaService.obtenerPorEmpresa(empresa);
|
||||
lsRuta.add(rutaService.obtenerID(-1));
|
||||
BindingListModelList l = new BindingListModelList(lsRuta, true);
|
||||
cmbRuta.setModel(l);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnRefresh(Event ev) {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnNovo(Event ev) {
|
||||
verPricing(new GP_Pricing());
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
|
||||
Empresa empresa = (Empresa) (cmbEmpresa.getSelectedItem() != null ? cmbEmpresa.getSelectedItem().getValue() : null);
|
||||
Ruta ruta = (Ruta) (cmbRuta.getSelectedItem() != null ? cmbRuta.getSelectedItem().getValue() : null);
|
||||
Parada origen = null;
|
||||
|
||||
if (cmbOrigen.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbOrigen.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
origen = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
origen = (Parada) cmbOrigen.getSelectedItem().getValue();
|
||||
}
|
||||
Parada destino = null;
|
||||
if (cmbDestino.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbDestino.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
destino = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
destino = (Parada) cmbDestino.getSelectedItem().getValue();
|
||||
}
|
||||
|
||||
HibernateSearchObject<GP_Pricing> pricingSearch = new HibernateSearchObject<GP_Pricing>(
|
||||
GP_Pricing.class, pagingPricing.getPageSize());
|
||||
|
||||
if (empresa != null) {
|
||||
pricingSearch.addFilterEqual("empresa", empresa);
|
||||
} else {
|
||||
pricingSearch.addFilterIn("empresa", lsEmpresa);
|
||||
}
|
||||
|
||||
if (ruta != null && ruta.getRutaId() != -1) {
|
||||
pricingSearch.addFilterIn("pricingRutaList.ruta", ruta);
|
||||
}
|
||||
|
||||
if (origen != null) {
|
||||
pricingSearch.addFilterIn("pricingMercadoList.origen", origen);
|
||||
}
|
||||
|
||||
if (destino != null) {
|
||||
pricingSearch.addFilterIn("pricingMercadoList.destino", destino);
|
||||
}
|
||||
|
||||
if (!txtNome.getValue().isEmpty()) {
|
||||
pricingSearch.addFilterILike("nombPricing", txtNome.getValue() + "%");
|
||||
}
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
Calendar calendar1 = Calendar.getInstance();
|
||||
if ((fechaInicio.getValue() != null) && (fechaFin.getValue() != null)) {
|
||||
calendar.setTime(fechaInicio.getValue());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
calendar1.setTime(fechaFin.getValue());
|
||||
calendar1.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar1.set(Calendar.MINUTE, 59);
|
||||
calendar1.set(Calendar.SECOND, 59);
|
||||
calendar1.set(Calendar.MILLISECOND, 999);
|
||||
|
||||
pricingSearch.addFilterGreaterOrEqual("pricingVigenciaList.fecinicioviaje", calendar.getTime());
|
||||
pricingSearch.addFilterLessOrEqual("pricingVigenciaList.fecfinviaje", calendar1.getTime());
|
||||
} else {
|
||||
if (fechaInicio.getValue() != null) {
|
||||
calendar.setTime(fechaInicio.getValue());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
|
||||
calendar1.setTime(fechaInicio.getValue());
|
||||
calendar1.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar1.set(Calendar.MINUTE, 59);
|
||||
calendar1.set(Calendar.SECOND, 59);
|
||||
|
||||
pricingSearch.addFilterGreaterThan("pricingVigenciaList.fecinicioviaje", calendar.getTime()).addFilterLessThan("pricingVigenciaList.fecinicioviaje", calendar1.getTime());
|
||||
} else if (fechaFin.getValue() != null) {
|
||||
calendar.setTime(fechaFin.getValue());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
|
||||
calendar1.setTime(fechaFin.getValue());
|
||||
calendar1.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar1.set(Calendar.MINUTE, 59);
|
||||
calendar1.set(Calendar.SECOND, 59);
|
||||
pricingSearch.addFilterGreaterThan("pricingVigenciaList.fecfinviaje", calendar.getTime()).addFilterLessThan("pricingVigenciaList.fecfinviaje", calendar1.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
Boolean buscarInativos = chkBuscarInativos.isChecked();
|
||||
if (buscarInativos) {
|
||||
pricingSearch.addFilterEqual("activo", GP_Pricing.INATIVO);
|
||||
} else {
|
||||
pricingSearch.addFilterEqual("activo", GP_Pricing.ATIVO);
|
||||
}
|
||||
|
||||
pricingSearch.addSortAsc("nombPricing");
|
||||
|
||||
pricingSearch.addFetch("pricingVigenciaList");
|
||||
|
||||
plwPricingPunto.init(pricingSearch, pricingList, pagingPricing);
|
||||
|
||||
if (pricingList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels
|
||||
.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void verPricing(GP_Pricing pricing) {
|
||||
if (pricing == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("pricing", pricing);
|
||||
args.put("gravarNovo", pricing.getPricingId() == null);
|
||||
args.put("pricingList", pricingList);
|
||||
args.put("buscarPricingInativosAtivos", chkBuscarInativos.isChecked() ? GP_Pricing.INATIVO : GP_Pricing.ATIVO);
|
||||
|
||||
openWindow("/gui/gestao_pricing/editarGP_Pricing.zul",
|
||||
Labels.getLabel("busquedaGPPricingController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
public void onClick$btnApagar(Event ev) {
|
||||
try {
|
||||
GP_Pricing p = (GP_Pricing) pricingList.getSelected();
|
||||
if (p != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPergunta"),
|
||||
Labels.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.YES | Messagebox.NO,
|
||||
Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingService.borrar(p);
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarOK"),
|
||||
Labels.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
pricingList.removeItem(p);
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Erro ao eliminar Pricing: " + ex);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,548 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoAgencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCanalVendas;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Moneda;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.MonedaService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
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.RenderPricingEspecifico;
|
||||
|
||||
@Controller("busquedaGP_PricingEspecificoController")
|
||||
@Scope("prototype")
|
||||
public class BusquedaGP_PricingEspecificoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private MarcaService marcaService;
|
||||
@Autowired
|
||||
private MonedaService monedaService;
|
||||
@Autowired
|
||||
private CategoriaService categoriaService;
|
||||
@Autowired
|
||||
private ClaseServicioService claseServicioService;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
@Autowired
|
||||
private TipoPuntoVentaService puntoVentaService;
|
||||
private List<Marca> lsMarca;
|
||||
private List<Moneda> lsMoneda;
|
||||
private List<Categoria> lsCategoria;
|
||||
private List<ClaseServicio> lsClaseServicio;
|
||||
private List<TipoPuntoVenta> lsPtovata;
|
||||
private MyListbox pricingList;
|
||||
private Paging pagingPricing;
|
||||
@Autowired
|
||||
private transient PagedListWrapper<GP_PricingEspecifico> plwPricingEspecifico;
|
||||
private Combobox cmbMarca;
|
||||
private Combobox cmbMoneda;
|
||||
private Combobox cmbTipoPassageiro;
|
||||
private Combobox cmbTipoServicio;
|
||||
private Combobox cmbPtovta;
|
||||
private Combobox cmbOrigem;
|
||||
private Combobox cmbDestino;
|
||||
private Datebox fechaInicio;
|
||||
private Datebox fechaFin;
|
||||
private Textbox txtNombrePricing;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado().getEmpresa());
|
||||
lsMoneda = monedaService.obtenerTodos();
|
||||
lsCategoria = categoriaService.obtenerTodos();
|
||||
lsClaseServicio = claseServicioService.obtenerTodos();
|
||||
lsPtovata = puntoVentaService.obtenerTodos();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
pricingList.setItemRenderer(new RenderPricingEspecifico());
|
||||
pricingList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
GP_PricingEspecifico pricingEspecifico = (GP_PricingEspecifico) pricingList.getSelected();
|
||||
verPricing(pricingEspecifico);
|
||||
}
|
||||
});
|
||||
|
||||
txtNombrePricing.focus();
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnRefresh(Event ev) {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnNovo(Event ev) {
|
||||
|
||||
GP_PricingEspecifico pricingEspecifico = new GP_PricingEspecifico();
|
||||
pricingEspecifico.setPricingEspecificoAgenciasList(new ArrayList<GP_PricingEspecificoAgencia>());
|
||||
pricingEspecifico.setPricingEspecificoCanalVendasList(new ArrayList<GP_PricingEspecificoCanalVendas>());
|
||||
pricingEspecifico.setPricingEspecificoOcupacionsList(new ArrayList<GP_PricingEspecificoOcupacion>());
|
||||
|
||||
verPricing(pricingEspecifico);
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
HibernateSearchObject<GP_PricingEspecifico> pricingSearch =
|
||||
new HibernateSearchObject<GP_PricingEspecifico>(GP_PricingEspecifico.class, pagingPricing.getPageSize());
|
||||
pricingSearch.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
||||
Moneda moneda = (Moneda) (cmbMoneda.getSelectedItem() != null ? cmbMoneda.getSelectedItem().getValue() : null);
|
||||
Categoria categoria = (Categoria) (cmbTipoPassageiro.getSelectedItem() != null ? cmbTipoPassageiro.getSelectedItem().getValue() : null);
|
||||
ClaseServicio claseServicio = (ClaseServicio) (cmbTipoServicio.getSelectedItem() != null ? cmbTipoServicio.getSelectedItem().getValue() : null);
|
||||
TipoPuntoVenta tipoPuntoVenta = (TipoPuntoVenta) (cmbPtovta.getSelectedItem() != null ? cmbPtovta.getSelectedItem().getValue() : null);
|
||||
Parada parada = (Parada) (cmbOrigem.getSelectedItem() != null ? cmbOrigem.getSelectedItem().getValue() : null);
|
||||
Parada parada1 = (Parada) (cmbDestino.getSelectedItem() != null ? cmbDestino.getSelectedItem().getValue() : null);
|
||||
|
||||
if (fechaInicio.getValue() != null) {
|
||||
pricingSearch.addFilterGreaterOrEqual("fechorinicio", fechaInicio.getValue());
|
||||
}
|
||||
|
||||
if (fechaFin.getValue() != null) {
|
||||
pricingSearch.addFilterLessOrEqual("fechorfin", fechaFin.getValue());
|
||||
}
|
||||
|
||||
if (parada != null) {
|
||||
pricingSearch.addFilterEqual("parada", parada);
|
||||
}
|
||||
|
||||
if (parada1 != null) {
|
||||
pricingSearch.addFilterEqual("parada1", parada1);
|
||||
}
|
||||
|
||||
if (tipoPuntoVenta != null) {
|
||||
pricingSearch.addFilterEqual("tipoPtovta", tipoPuntoVenta);
|
||||
}
|
||||
|
||||
if (marca != null) {
|
||||
pricingSearch.addFilterEqual("marca", marca);
|
||||
} else {
|
||||
pricingSearch.addFilterIn("marca", lsMarca);
|
||||
}
|
||||
if (moneda != null) {
|
||||
pricingSearch.addFilterEqual("moneda", moneda);
|
||||
}
|
||||
if (categoria != null) {
|
||||
pricingSearch.addFilterEqual("categoria", categoria);
|
||||
}
|
||||
if (claseServicio != null) {
|
||||
pricingSearch.addFilterEqual("claseServicio", claseServicio);
|
||||
}
|
||||
|
||||
String nomePricing = txtNombrePricing.getText().trim();
|
||||
if (!nomePricing.isEmpty()) {
|
||||
pricingSearch.addFilterILike("nombPricing", "%" + nomePricing + "%");
|
||||
}
|
||||
|
||||
pricingSearch.addSortAsc("nombPricing");
|
||||
|
||||
plwPricingEspecifico.init(pricingSearch, pricingList, pagingPricing);
|
||||
|
||||
if (pricingList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("busquedaPricingEspecificoController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void verPricing(GP_PricingEspecifico pricingEspecifico) {
|
||||
if (pricingEspecifico == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("pricingEspecifico", pricingEspecifico);
|
||||
args.put("pricingList", pricingList);
|
||||
|
||||
openWindow("/gui/gestao_pricing/editarGP_PricingEspecifico.zul",
|
||||
Labels.getLabel("busqueDaGPPricingEspecifico.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lsMarca
|
||||
*/
|
||||
public List<Marca> getLsMarca() {
|
||||
return lsMarca;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lsMarca
|
||||
* the lsMarca to set
|
||||
*/
|
||||
public void setLsMarca(List<Marca> lsMarca) {
|
||||
this.lsMarca = lsMarca;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lsMoneda
|
||||
*/
|
||||
public List<Moneda> getLsMoneda() {
|
||||
return lsMoneda;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lsMoneda
|
||||
* the lsMoneda to set
|
||||
*/
|
||||
public void setLsMoneda(List<Moneda> lsMoneda) {
|
||||
this.lsMoneda = lsMoneda;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pricingList
|
||||
*/
|
||||
public MyListbox getPricingList() {
|
||||
return pricingList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pricingList
|
||||
* the pricingList to set
|
||||
*/
|
||||
public void setPricingList(MyListbox pricingList) {
|
||||
this.pricingList = pricingList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pagingPricing
|
||||
*/
|
||||
public Paging getPagingPricing() {
|
||||
return pagingPricing;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pagingPricing
|
||||
* the pagingPricing to set
|
||||
*/
|
||||
public void setPagingPricing(Paging pagingPricing) {
|
||||
this.pagingPricing = pagingPricing;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the marcaService
|
||||
*/
|
||||
public MarcaService getMarcaService() {
|
||||
return marcaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param marcaService
|
||||
* the marcaService to set
|
||||
*/
|
||||
public void setMarcaService(MarcaService marcaService) {
|
||||
this.marcaService = marcaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the monedaService
|
||||
*/
|
||||
public MonedaService getMonedaService() {
|
||||
return monedaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param monedaService
|
||||
* the monedaService to set
|
||||
*/
|
||||
public void setMonedaService(MonedaService monedaService) {
|
||||
this.monedaService = monedaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the plwPricingEspecifico
|
||||
*/
|
||||
public PagedListWrapper<GP_PricingEspecifico> getPlwPricingEspecifico() {
|
||||
return plwPricingEspecifico;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param plwPricingEspecifico
|
||||
* the plwPricingEspecifico to set
|
||||
*/
|
||||
public void setPlwPricingEspecifico(PagedListWrapper<GP_PricingEspecifico> plwPricingEspecifico) {
|
||||
this.plwPricingEspecifico = plwPricingEspecifico;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lsCategoria
|
||||
*/
|
||||
public List<Categoria> getLsCategoria() {
|
||||
return lsCategoria;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lsCategoria
|
||||
* the lsCategoria to set
|
||||
*/
|
||||
public void setLsCategoria(List<Categoria> lsCategoria) {
|
||||
this.lsCategoria = lsCategoria;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lsClaseServicio
|
||||
*/
|
||||
public List<ClaseServicio> getLsClaseServicio() {
|
||||
return lsClaseServicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lsClaseServicio
|
||||
* the lsClaseServicio to set
|
||||
*/
|
||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||
this.lsClaseServicio = lsClaseServicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the categoriaService
|
||||
*/
|
||||
public CategoriaService getCategoriaService() {
|
||||
return categoriaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param categoriaService
|
||||
* the categoriaService to set
|
||||
*/
|
||||
public void setCategoriaService(CategoriaService categoriaService) {
|
||||
this.categoriaService = categoriaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the claseServicioService
|
||||
*/
|
||||
public ClaseServicioService getClaseServicioService() {
|
||||
return claseServicioService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param claseServicioService
|
||||
* the claseServicioService to set
|
||||
*/
|
||||
public void setClaseServicioService(ClaseServicioService claseServicioService) {
|
||||
this.claseServicioService = claseServicioService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbMarca
|
||||
*/
|
||||
public Combobox getCmbMarca() {
|
||||
return cmbMarca;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbMarca
|
||||
* the cmbMarca to set
|
||||
*/
|
||||
public void setCmbMarca(Combobox cmbMarca) {
|
||||
this.cmbMarca = cmbMarca;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbMoneda
|
||||
*/
|
||||
public Combobox getCmbMoneda() {
|
||||
return cmbMoneda;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbMoneda
|
||||
* the cmbMoneda to set
|
||||
*/
|
||||
public void setCmbMoneda(Combobox cmbMoneda) {
|
||||
this.cmbMoneda = cmbMoneda;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbTipoPassageiro
|
||||
*/
|
||||
public Combobox getCmbTipoPassageiro() {
|
||||
return cmbTipoPassageiro;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbTipoPassageiro
|
||||
* the cmbTipoPassageiro to set
|
||||
*/
|
||||
public void setCmbTipoPassageiro(Combobox cmbTipoPassageiro) {
|
||||
this.cmbTipoPassageiro = cmbTipoPassageiro;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbTipoServicio
|
||||
*/
|
||||
public Combobox getCmbTipoServicio() {
|
||||
return cmbTipoServicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbTipoServicio
|
||||
* the cmbTipoServicio to set
|
||||
*/
|
||||
public void setCmbTipoServicio(Combobox cmbTipoServicio) {
|
||||
this.cmbTipoServicio = cmbTipoServicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the paradaService
|
||||
*/
|
||||
public ParadaService getParadaService() {
|
||||
return paradaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param paradaService
|
||||
* the paradaService to set
|
||||
*/
|
||||
public void setParadaService(ParadaService paradaService) {
|
||||
this.paradaService = paradaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lsPtovata
|
||||
*/
|
||||
public List<TipoPuntoVenta> getLsPtovata() {
|
||||
return lsPtovata;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lsPtovata
|
||||
* the lsPtovata to set
|
||||
*/
|
||||
public void setLsPtovata(List<TipoPuntoVenta> lsPtovata) {
|
||||
this.lsPtovata = lsPtovata;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the puntoVentaService
|
||||
*/
|
||||
public TipoPuntoVentaService getPuntoVentaService() {
|
||||
return puntoVentaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param puntoVentaService
|
||||
* the puntoVentaService to set
|
||||
*/
|
||||
public void setPuntoVentaService(TipoPuntoVentaService puntoVentaService) {
|
||||
this.puntoVentaService = puntoVentaService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbPtovta
|
||||
*/
|
||||
public Combobox getCmbPtovta() {
|
||||
return cmbPtovta;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbPtovta
|
||||
* the cmbPtovta to set
|
||||
*/
|
||||
public void setCmbPtovta(Combobox cmbPtovta) {
|
||||
this.cmbPtovta = cmbPtovta;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbOrigem
|
||||
*/
|
||||
public Combobox getCmbOrigem() {
|
||||
return cmbOrigem;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbOrigem
|
||||
* the cmbOrigem to set
|
||||
*/
|
||||
public void setCmbOrigem(Combobox cmbOrigem) {
|
||||
this.cmbOrigem = cmbOrigem;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cmbDestino
|
||||
*/
|
||||
public Combobox getCmbDestino() {
|
||||
return cmbDestino;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmbDestino
|
||||
* the cmbDestino to set
|
||||
*/
|
||||
public void setCmbDestino(Combobox cmbDestino) {
|
||||
this.cmbDestino = cmbDestino;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fechaInicio
|
||||
*/
|
||||
public Datebox getFechaInicio() {
|
||||
return fechaInicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fechaInicio
|
||||
* the fechaInicio to set
|
||||
*/
|
||||
public void setFechaInicio(Datebox fechaInicio) {
|
||||
this.fechaInicio = fechaInicio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fechaFin
|
||||
*/
|
||||
public Datebox getFechaFin() {
|
||||
return fechaFin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fechaFin
|
||||
* the fechaFin to set
|
||||
*/
|
||||
public void setFechaFin(Datebox fechaFin) {
|
||||
this.fechaFin = fechaFin;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MensagensUtils;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("copiarGP_PricingController")
|
||||
@Scope("prototype")
|
||||
public class CopiarGP_PricingController extends MyGenericForwardComposer {
|
||||
|
||||
private static final String CONTROLLER_WINDOW_TITLE = "copiarPricingController.window.title";
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingService pricingService;
|
||||
|
||||
private Textbox nombrePricing;
|
||||
private GP_Pricing pricing;
|
||||
private MyListbox pricingList;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
pricing = (GP_Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnSalvarCopia(Event ev) throws InterruptedException {
|
||||
if (StringUtils.isBlank(nombrePricing.getText())) {
|
||||
MensagensUtils.showMessageExclamation("copiarPricingController.MSG.sem.nome",CONTROLLER_WINDOW_TITLE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (existePricingComMesmoNome()) {
|
||||
MensagensUtils.showMessageExclamation("copiarPricingController.MSG.Registro.Existe", CONTROLLER_WINDOW_TITLE);
|
||||
return;
|
||||
}
|
||||
|
||||
Boolean clonou = pricingService.clonarPricing(pricing.getPricingId(), nombrePricing.getText(),
|
||||
ApplicationProperties.getInstance().isCustomHabilitado(CustomEnum.USA_PADRAO_PRICING_TIPO_PASSAGEM_PET.getDescricao()));
|
||||
|
||||
if (clonou) {
|
||||
closeWindow();
|
||||
MensagensUtils.showMessageInformation("copiarPricingController.MSG.suscribirOK", CONTROLLER_WINDOW_TITLE);
|
||||
} else {
|
||||
MensagensUtils.showMessageInformation("copiarPricingController.MSG.ERRO", CONTROLLER_WINDOW_TITLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected boolean existePricingComMesmoNome() {
|
||||
return pricingService.buscarPorNombre(nombrePricing.getText()).size() > 0;
|
||||
}
|
||||
|
||||
public void onClose$winCopiarPricing(Event ev) {
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public MyListbox getPricingList() {
|
||||
return pricingList;
|
||||
}
|
||||
|
||||
public void setPricingList(MyListbox pricingList) {
|
||||
this.pricingList = pricingList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingEspecificoService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingHistoricoService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("copiarGP_PricingEspecificoController")
|
||||
@Scope("prototype")
|
||||
public class CopiarGP_PricingEspecificoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingEspecificoService pricingEspecificoService;
|
||||
@Autowired
|
||||
private GP_PricingHistoricoService pricingHistoricoService;
|
||||
|
||||
private Textbox nombrePricing;
|
||||
private GP_PricingEspecifico pricingEspecifico;
|
||||
private List<GP_PricingEspecificoCategoria> pricingCategoriaList;
|
||||
private MyListbox pricingList;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
pricingEspecifico = (GP_PricingEspecifico) Executions.getCurrent().getArg().get("pricingEspecifico");
|
||||
pricingCategoriaList = (List<GP_PricingEspecificoCategoria>) Executions.getCurrent().getArg().get("pricingCategoriaList");
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnSalvarCopia(Event ev) throws InterruptedException {
|
||||
if (!nombrePricing.getText().equals("") && nombrePricing.getText() != null) {
|
||||
|
||||
List<GP_PricingEspecifico> lsPricing = pricingEspecificoService.buscarPorNome(nombrePricing.getValue());
|
||||
|
||||
if (lsPricing == null ||
|
||||
lsPricing.isEmpty()) {
|
||||
|
||||
GP_PricingEspecifico clone = pricingEspecificoService.clonarPricing(pricingEspecifico.getPricingespecificoId(), nombrePricing.getText(), pricingCategoriaList);
|
||||
|
||||
if (clone != null) {
|
||||
|
||||
pricingHistoricoService.compararESalvar(null, clone);
|
||||
|
||||
closeWindow();
|
||||
Messagebox.show(
|
||||
Labels.getLabel("copiarPricingController.MSG.suscribirOK"),
|
||||
Labels.getLabel("copiarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("copiarPricingController.MSG.ERRO"),
|
||||
Labels.getLabel("copiarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("copiarPricingController.MSG.Registro.Existe"),
|
||||
Labels.getLabel("copiarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("copiarPricingController.MSG.sem.nome"),
|
||||
Labels.getLabel("copiarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClose$winCopiarPricing(Event ev) {
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public MyListbox getPricingList() {
|
||||
return pricingList;
|
||||
}
|
||||
|
||||
public void setPricingList(MyListbox pricingList) {
|
||||
this.pricingList = pricingList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingAsiento;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingAsientoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
|
||||
@Controller("editarGP_PricingAsientoController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingAsientoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingAsientoService pricingAsientoService;
|
||||
private GP_PricingAsiento pricingAsiento;
|
||||
private MyListbox pricingAsientoList;
|
||||
private MyTextboxDecimal porcentaje;
|
||||
private Intbox numeasiento;
|
||||
private ConstraintPorcentagem ct;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingAsientoController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
ct = new ConstraintPorcentagem();
|
||||
pricingAsiento = (GP_PricingAsiento) Executions.getCurrent().getArg().get("pricingAsiento");
|
||||
pricingAsientoList = (MyListbox) Executions.getCurrent().getArg().get("pricingAsientoList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarAsiento(Event ev) throws Exception {
|
||||
numeasiento.getValue();
|
||||
porcentaje.getValue();
|
||||
|
||||
List<GP_PricingAsiento> lsAsientos = pricingAsientoService.obtenerPricingCategoria(pricingAsiento.getPricing(), numeasiento.getValue());
|
||||
|
||||
try {
|
||||
boolean exite = true;
|
||||
|
||||
if (lsAsientos.isEmpty()) {
|
||||
exite = false;
|
||||
} else {
|
||||
for (GP_PricingAsiento a : lsAsientos) {
|
||||
if (a.getPricingasientoId().equals(pricingAsiento.getPricingasientoId())) {
|
||||
exite = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!exite) {
|
||||
if (pricingAsiento.getPricingasientoId() != null) {
|
||||
pricingAsientoService.actualizacion(pricingAsiento);
|
||||
pricingAsientoList.updateItem(pricingAsiento);
|
||||
} else {
|
||||
pricingAsientoService.suscribir(pricingAsiento);
|
||||
pricingAsientoList.addItemNovo(pricingAsiento);
|
||||
}
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverAsiento(Event ev) {
|
||||
try {
|
||||
GP_PricingAsiento pAsiento = (GP_PricingAsiento) pricingAsientoList.getSelected();
|
||||
if (pAsiento != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaAsiento"),
|
||||
Labels.getLabel("editarPricingController.windowAsiento.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingAsiento.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingAsiento.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingAsiento.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingAsientoList.removeItem(pricingAsiento);
|
||||
pricingAsientoService.borrar(pricingAsiento);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowAsiento.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingAsiento getPricingAsiento() {
|
||||
return pricingAsiento;
|
||||
}
|
||||
|
||||
public void setPricingAsiento(GP_PricingAsiento pricingAsiento) {
|
||||
this.pricingAsiento = pricingAsiento;
|
||||
}
|
||||
|
||||
public MyListbox getPricingAsientoList() {
|
||||
return pricingAsientoList;
|
||||
}
|
||||
|
||||
public void setPricingAsientoList(MyListbox pricingAsientoList) {
|
||||
this.pricingAsientoList = pricingAsientoList;
|
||||
}
|
||||
|
||||
public GP_PricingAsientoService getPricingAsientoService() {
|
||||
return pricingAsientoService;
|
||||
}
|
||||
|
||||
public void setPricingAsientoService(GP_PricingAsientoService pricingAsientoService) {
|
||||
this.pricingAsientoService = pricingAsientoService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ct
|
||||
*/
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ct
|
||||
* the ct to set
|
||||
*/
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingCategoria;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingCategoriaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingCategoriaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingCategoriaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingCategoriaService pricingCategoriaService;
|
||||
@Autowired
|
||||
private CategoriaService categoriaService;
|
||||
private List<Categoria> lsCategoria;
|
||||
private GP_PricingCategoria pricingCategoria;
|
||||
private MyListbox pricingCategoriaList;
|
||||
private Combobox cmbCategoria;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingCategoriaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsCategoria = categoriaService.obtenerTodos();
|
||||
|
||||
pricingCategoria = (GP_PricingCategoria) Executions.getCurrent().getArg().get("pricingCategoria");
|
||||
pricingCategoriaList = (MyListbox) Executions.getCurrent().getArg().get("pricingCategoriaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbCategoria.focus();
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarCategoria(Event ev) throws Exception {
|
||||
cmbCategoria.getValue();
|
||||
try {
|
||||
if (pricingCategoria.getCategoria() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
Boolean existe = pricingCategoriaService.obtenerPricingCategoria(pricingCategoria.getPricing(), (Categoria) cmbCategoria.getSelectedItem().getValue());
|
||||
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingCategoria.getPricingcategoriaId() != null) {
|
||||
pricingCategoriaService.actualizacion(pricingCategoria);
|
||||
pricingCategoriaList.updateItem(pricingCategoria);
|
||||
} else {
|
||||
pricingCategoriaService.suscribir(pricingCategoria);
|
||||
pricingCategoriaList.addItem(pricingCategoria);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Erro ao adicionar categoria: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverCategoria(Event ev) {
|
||||
try {
|
||||
GP_PricingCategoria pCategoria = (GP_PricingCategoria) pricingCategoriaList.getSelected();
|
||||
if (pCategoria != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaCategoria"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingCategoria.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingCategoria.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingCategoria.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingCategoriaList.removeItem(pricingCategoria);
|
||||
pricingCategoriaService.borrar(pricingCategoria);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Erro ao remover categoria: " + ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingCategoria getPricingCategoria() {
|
||||
return pricingCategoria;
|
||||
}
|
||||
|
||||
public void setPricingCategoria(GP_PricingCategoria pricingCategoria) {
|
||||
this.pricingCategoria = pricingCategoria;
|
||||
}
|
||||
|
||||
public MyListbox getPricingCategoriaList() {
|
||||
return pricingCategoriaList;
|
||||
}
|
||||
|
||||
public void setPricingCategoriaList(MyListbox pricingCategoriaList) {
|
||||
this.pricingCategoriaList = pricingCategoriaList;
|
||||
}
|
||||
|
||||
public GP_PricingCategoriaService getPricingCategoriaService() {
|
||||
return pricingCategoriaService;
|
||||
}
|
||||
|
||||
public void setPricingCategoriaService(GP_PricingCategoriaService pricingCategoriaService) {
|
||||
this.pricingCategoriaService = pricingCategoriaService;
|
||||
}
|
||||
|
||||
public List<Categoria> getLsCategoria() {
|
||||
return lsCategoria;
|
||||
}
|
||||
|
||||
public void setLsCategoria(List<Categoria> lsCategoria) {
|
||||
this.lsCategoria = lsCategoria;
|
||||
}
|
||||
|
||||
public CategoriaService getCategoriaService() {
|
||||
return categoriaService;
|
||||
}
|
||||
|
||||
public void setCategoriaService(CategoriaService categoriaService) {
|
||||
this.categoriaService = categoriaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingClase;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingClaseService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingClaseController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingClaseController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingClaseService pricingClaseService;
|
||||
@Autowired
|
||||
private ClaseServicioService claseServicioService;
|
||||
private List<ClaseServicio> lsClase;
|
||||
private GP_PricingClase pricingClase;
|
||||
private MyListbox pricingClaseList;
|
||||
private Combobox cmbClase;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingClaseController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsClase = claseServicioService.obtenerTodos();
|
||||
|
||||
pricingClase = (GP_PricingClase) Executions.getCurrent().getArg().get("pricingClase");
|
||||
pricingClaseList = (MyListbox) Executions.getCurrent().getArg().get("pricingClaseList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbClase.focus();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarClase(Event ev) throws Exception {
|
||||
cmbClase.getValue();
|
||||
|
||||
if (pricingClase.getClaseServicio() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
Boolean existe = pricingClaseService.obtenerPricingClase(pricingClase.getPricing(), (ClaseServicio) cmbClase.getSelectedItem().getValue());
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingClase.getPricingclaseId() != null) {
|
||||
pricingClaseService.actualizacion(pricingClase);
|
||||
pricingClaseList.updateItem(pricingClase);
|
||||
} else {
|
||||
pricingClaseService.suscribir(pricingClase);
|
||||
pricingClaseList.addItem(pricingClase);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverClase(Event ev) throws InterruptedException {
|
||||
GP_PricingClase pClase = (GP_PricingClase) pricingClaseList.getSelected();
|
||||
if (pClase != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaClase"),
|
||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingClase.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingClase.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingClase.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingClaseList.removeItem(pricingClase);
|
||||
pricingClaseService.borrar(pricingClase);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public GP_PricingClase getPricingClase() {
|
||||
return pricingClase;
|
||||
}
|
||||
|
||||
public void setPricingClase(GP_PricingClase pricingClase) {
|
||||
this.pricingClase = pricingClase;
|
||||
}
|
||||
|
||||
public MyListbox getPricingClaseList() {
|
||||
return pricingClaseList;
|
||||
}
|
||||
|
||||
public void setPricingClaseList(MyListbox pricingClaseList) {
|
||||
this.pricingClaseList = pricingClaseList;
|
||||
}
|
||||
|
||||
public GP_PricingClaseService getPricingClaseService() {
|
||||
return pricingClaseService;
|
||||
}
|
||||
|
||||
public void setPricingClaseService(GP_PricingClaseService pricingClaseService) {
|
||||
this.pricingClaseService = pricingClaseService;
|
||||
}
|
||||
|
||||
public ClaseServicioService getClaseServicioService() {
|
||||
return claseServicioService;
|
||||
}
|
||||
|
||||
public void setClaseServicioService(ClaseServicioService claseServicioService) {
|
||||
this.claseServicioService = claseServicioService;
|
||||
}
|
||||
|
||||
public static Logger getLog() {
|
||||
return log;
|
||||
}
|
||||
|
||||
public static void setLog(Logger log) {
|
||||
EditarGP_PricingClaseController.log = log;
|
||||
}
|
||||
|
||||
public List<ClaseServicio> getLsClase() {
|
||||
return lsClase;
|
||||
}
|
||||
|
||||
public void setLsClase(List<ClaseServicio> lsClase) {
|
||||
this.lsClase = lsClase;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,253 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Corrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.CorridaCtrl;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.CorridaCtrlService;
|
||||
import com.rjconsultores.ventaboletos.service.CorridaService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingCorridaService;
|
||||
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.render.RenderEditarPricingCorrida;
|
||||
|
||||
@Controller("editarGP_PricingCorridaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingCorridaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingCorridaService pricingCorridaService;
|
||||
@Autowired
|
||||
private CorridaCtrlService corridaCtrlService;
|
||||
@Autowired
|
||||
private CorridaService corridaService;
|
||||
@Autowired
|
||||
private ClaseServicioService claseServicioService;
|
||||
private List<ClaseServicio> lsClaseServicio;
|
||||
private GP_Pricing pricing;
|
||||
private MyListbox pricingCorridaList;
|
||||
private MyListbox corridaList;
|
||||
private Intbox idCorrida;
|
||||
private Combobox cmbParadaOrigem;
|
||||
private Combobox cmbParadaDestino;
|
||||
private Combobox cmbTipoServicio;
|
||||
private Timebox timeInicio;
|
||||
private Timebox timeFin;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingCorridaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsClaseServicio = claseServicioService.buscarTodosExceto(-1);
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
pricing = (GP_Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
pricing.setPricingCorridaList((List<GP_PricingCorrida>) Executions.getCurrent().getArg().get("lsCorridas"));
|
||||
try{
|
||||
pricing.getPricingCorridaList();
|
||||
}catch(Exception e){
|
||||
pricing.setPricingCorridaList(new ArrayList<GP_PricingCorrida>());
|
||||
}
|
||||
pricingCorridaList = (MyListbox) Executions.getCurrent().getArg().get("pricingCorridaList");
|
||||
|
||||
corridaList.setItemRenderer(new RenderEditarPricingCorrida());
|
||||
}
|
||||
|
||||
private void refreshLista() throws InterruptedException {
|
||||
|
||||
Comboitem cbiOrigem = cmbParadaOrigem.getSelectedItem();
|
||||
Parada origem = null;
|
||||
if (cbiOrigem != null) {
|
||||
origem = (Parada) cbiOrigem.getValue();
|
||||
}
|
||||
|
||||
Comboitem cbiDestino = cmbParadaDestino.getSelectedItem();
|
||||
Parada destino = null;
|
||||
if (cbiDestino != null) {
|
||||
destino = (Parada) cbiDestino.getValue();
|
||||
}
|
||||
|
||||
Comboitem cbiTipoServicio = cmbTipoServicio.getSelectedItem();
|
||||
ClaseServicio claseServicio = null;
|
||||
if (cbiTipoServicio != null) {
|
||||
claseServicio = (ClaseServicio) cbiTipoServicio.getValue();
|
||||
}
|
||||
|
||||
corridaList.setData(corridaService.buscarDistinct(origem, destino, timeInicio.getValue(), timeFin.getValue(), claseServicio, idCorrida.getValue()));
|
||||
|
||||
if (corridaList.getData().length == 0) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels.getLabel("busquedaPricingController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
cmbParadaOrigem.clearErrorMessage();
|
||||
cmbParadaDestino.clearErrorMessage();
|
||||
cmbTipoServicio.clearErrorMessage();
|
||||
|
||||
if (idCorrida.getValue() == null) {
|
||||
cmbParadaOrigem.setConstraint("no empty");
|
||||
cmbParadaDestino.setConstraint("no empty");
|
||||
cmbTipoServicio.setConstraint("no empty");
|
||||
|
||||
cmbParadaOrigem.getValue();
|
||||
cmbParadaDestino.getValue();
|
||||
cmbTipoServicio.getValue();
|
||||
}
|
||||
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarCorrida(Event ev) throws Exception {
|
||||
List<GP_PricingCorrida> lsPricingViagem = (pricing.getPricingCorridaList() == null) ? new ArrayList<GP_PricingCorrida>() : pricing.getPricingCorridaList();
|
||||
List<Object> ls = corridaList.getSelectedsItens();
|
||||
if (!ls.isEmpty()) {
|
||||
for (Object o : ls) {
|
||||
Boolean achou = Boolean.FALSE;
|
||||
Corrida corrida = (Corrida) o;
|
||||
if (corrida.getCorridaCtrl() == null) {
|
||||
CorridaCtrl cc = corridaCtrlService.obtenerID(corrida.getId().getCorridaId());
|
||||
if (cc != null) {
|
||||
corrida.setCorridaCtrl(cc);
|
||||
}
|
||||
}
|
||||
for (GP_PricingCorrida pc : lsPricingViagem) {
|
||||
if (pc.getCorridaCtrl().getCorridaId().equals(corrida.getCorridaCtrl().getCorridaId())) {
|
||||
achou = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!achou) {
|
||||
GP_PricingCorrida p = new GP_PricingCorrida();
|
||||
p.setActivo(GP_Pricing.ATIVO);
|
||||
|
||||
p.setCorridaCtrl(corrida.getCorridaCtrl());
|
||||
|
||||
p.setFecmodif(Calendar.getInstance().getTime());
|
||||
p.setPricing(pricing);
|
||||
p.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
lsPricingViagem.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
pricing.setPricingCorridaList(lsPricingViagem);
|
||||
pricingCorridaList.setData(pricing.getPricingCorridaList());
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
public MyListbox getPricingCorridaList() {
|
||||
return pricingCorridaList;
|
||||
}
|
||||
|
||||
public void setPricingCorridaList(MyListbox pricingCorridaList) {
|
||||
this.pricingCorridaList = pricingCorridaList;
|
||||
}
|
||||
|
||||
public GP_PricingCorridaService getPricingCorridaService() {
|
||||
return pricingCorridaService;
|
||||
}
|
||||
|
||||
public void setPricingCorridaService(GP_PricingCorridaService pricingCorridaService) {
|
||||
this.pricingCorridaService = pricingCorridaService;
|
||||
}
|
||||
|
||||
public CorridaCtrlService getCorridaCtrlService() {
|
||||
return corridaCtrlService;
|
||||
}
|
||||
|
||||
public void setCorridaCtrlService(CorridaCtrlService corridaCtrlService) {
|
||||
this.corridaCtrlService = corridaCtrlService;
|
||||
}
|
||||
|
||||
public Intbox getIdCorrida() {
|
||||
return idCorrida;
|
||||
}
|
||||
|
||||
public void setIdCorrida(Intbox idCorrida) {
|
||||
this.idCorrida = idCorrida;
|
||||
}
|
||||
|
||||
public Combobox getCmbParadaDestino() {
|
||||
return cmbParadaDestino;
|
||||
}
|
||||
|
||||
public void setCmbParadaDestino(Combobox cmbParadaDestino) {
|
||||
this.cmbParadaDestino = cmbParadaDestino;
|
||||
}
|
||||
|
||||
public Combobox getCmbParadaOrigem() {
|
||||
return cmbParadaOrigem;
|
||||
}
|
||||
|
||||
public void setCmbParadaOrigem(Combobox cmbParadaOrigem) {
|
||||
this.cmbParadaOrigem = cmbParadaOrigem;
|
||||
}
|
||||
|
||||
public MyListbox getCorridaList() {
|
||||
return corridaList;
|
||||
}
|
||||
|
||||
public void setCorridaList(MyListbox corridaList) {
|
||||
this.corridaList = corridaList;
|
||||
}
|
||||
|
||||
public List<ClaseServicio> getLsClaseServicio() {
|
||||
return lsClaseServicio;
|
||||
}
|
||||
|
||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||
this.lsClaseServicio = lsClaseServicio;
|
||||
}
|
||||
|
||||
public Combobox getCmbTipoServicio() {
|
||||
return cmbTipoServicio;
|
||||
}
|
||||
|
||||
public void setCmbTipoServicio(Combobox cmbTipoServicio) {
|
||||
this.cmbTipoServicio = cmbTipoServicio;
|
||||
}
|
||||
|
||||
public Timebox getTimeFin() {
|
||||
return timeFin;
|
||||
}
|
||||
|
||||
public void setTimeFin(Timebox timeFin) {
|
||||
this.timeFin = timeFin;
|
||||
}
|
||||
|
||||
public Timebox getTimeInicio() {
|
||||
return timeInicio;
|
||||
}
|
||||
|
||||
public void setTimeInicio(Timebox timeInicio) {
|
||||
this.timeInicio = timeInicio;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,296 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Radio;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingDia;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingDiaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingDiaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingDiaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingDiaController.class);
|
||||
|
||||
@Autowired
|
||||
private GP_PricingDiaService pricingDiaService;
|
||||
private GP_PricingDia pricingDia;
|
||||
private MyListbox pricingDiaList;
|
||||
|
||||
private Checkbox rdLun;
|
||||
private Checkbox rdMar;
|
||||
private Checkbox rdMie;
|
||||
private Checkbox rdJue;
|
||||
private Checkbox rdVie;
|
||||
private Checkbox rdSab;
|
||||
private Checkbox rdDom;
|
||||
private Timebox horarioinicio;
|
||||
private Timebox horariofin;
|
||||
|
||||
private Radio rdFecViaje;
|
||||
private Radio rdFecVenta;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
pricingDia = (GP_PricingDia) Executions.getCurrent().getArg().get("pricingDia");
|
||||
pricingDiaList = (MyListbox) Executions.getCurrent().getArg().get("pricingDiaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (pricingDia.getPricingdiaId() != null) {
|
||||
if (pricingDia.getIndlunes() == Boolean.TRUE) {
|
||||
rdLun.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndmartes() == Boolean.TRUE) {
|
||||
rdMar.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndmiercoles() == Boolean.TRUE) {
|
||||
rdMie.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndjueves() == Boolean.TRUE) {
|
||||
rdJue.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndviernes() == Boolean.TRUE) {
|
||||
rdVie.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndsabado() == Boolean.TRUE) {
|
||||
rdSab.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getInddomingo() == Boolean.TRUE) {
|
||||
rdDom.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndfecventa() == Boolean.TRUE) {
|
||||
rdFecVenta.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndfecviaje() == Boolean.TRUE) {
|
||||
rdFecViaje.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean noTraslapa() {
|
||||
List<GP_PricingDia> lsVT1 = pricingDiaService.buscarTraslapa(pricingDia);
|
||||
|
||||
// Nao Traslapen
|
||||
Boolean podeSalvar = false;
|
||||
Boolean[] podeTodos = new Boolean[lsVT1.isEmpty() ? 1 : lsVT1.size()];
|
||||
boolean podeMesmo = true;
|
||||
|
||||
// Se a lista for nula / Salva
|
||||
if (lsVT1.isEmpty()) {
|
||||
podeMesmo = true;
|
||||
podeTodos[0] = true;
|
||||
// Se a lista não for nula e for algo novo... não pode salvar
|
||||
} else {
|
||||
int i = 0;
|
||||
for (GP_PricingDia p : lsVT1) {
|
||||
if (p.getPricingdiaId().equals(pricingDia.getPricingdiaId())) {
|
||||
podeTodos[i] = true;
|
||||
continue;
|
||||
}
|
||||
podeSalvar = true;
|
||||
if (pricingDia.getIndlunes()) {
|
||||
if (p.getIndlunes() == pricingDia.getIndlunes()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndmartes()) {
|
||||
if (p.getIndmartes() == pricingDia.getIndmartes()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndmiercoles()) {
|
||||
if (p.getIndmiercoles() == pricingDia.getIndmiercoles()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndjueves()) {
|
||||
if (p.getIndjueves() == pricingDia.getIndjueves()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndviernes()) {
|
||||
if (p.getIndviernes() == pricingDia.getIndviernes()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndsabado()) {
|
||||
if (p.getIndsabado() == pricingDia.getIndsabado()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getInddomingo()) {
|
||||
if (p.getInddomingo() == pricingDia.getInddomingo()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndfecventa()) {
|
||||
if (p.getIndfecventa() == pricingDia.getIndfecventa()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
if (pricingDia.getIndfecviaje()) {
|
||||
if (p.getIndfecviaje() == pricingDia.getIndfecviaje()) {
|
||||
podeSalvar = false;
|
||||
}
|
||||
}
|
||||
podeTodos[i] = podeSalvar;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < podeTodos.length; i++) {
|
||||
if (podeTodos[i] != null) {
|
||||
if (!podeTodos[i]) {
|
||||
podeMesmo = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return podeMesmo;
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarDia(Event ev) throws Exception {
|
||||
|
||||
horarioinicio.getValue();
|
||||
horariofin.getValue();
|
||||
|
||||
horarioinicio.setValue(DateUtil.getFecInicio(horarioinicio.getValue()).getTime());
|
||||
horariofin.setValue(DateUtil.getFecInicio(horariofin.getValue()).getTime());
|
||||
|
||||
if (horarioinicio.getValue().after(horariofin.getValue())) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.datas"), Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rdFecViaje.isChecked() && !rdFecVenta.isChecked()) {
|
||||
Clients.alert(Labels.getLabel("EditarPricingDiaController.MSG.obligatorioData"),
|
||||
Labels.getLabel("editarPricingController.windowDia.title"),
|
||||
Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rdLun.isChecked() && !rdMar.isChecked() && !rdMie.isChecked() && !rdJue.isChecked() && !rdVie.isChecked() && !rdSab.isChecked() && !rdDom.isChecked()) {
|
||||
Clients.alert(Labels.getLabel("EditarPricingDiaController.MSG.obligatorioDia"), Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
pricingDia.setIndlunes(rdLun.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndmartes(rdMar.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndmiercoles(rdMie.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndjueves(rdJue.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndviernes(rdVie.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndsabado(rdSab.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setInddomingo(rdDom.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
pricingDia.setIndfecventa(rdFecVenta == null ? Boolean.FALSE :
|
||||
rdFecVenta.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndfecviaje(rdFecViaje == null ? Boolean.FALSE :
|
||||
rdFecViaje.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
pricingDia.setHorarioinicio(DateUtil.getFecInicio(horarioinicio.getValue()).getTime());
|
||||
pricingDia.setHorariofin(DateUtil.getFecInicio(horariofin.getValue()).getTime());
|
||||
|
||||
if (noTraslapa()) {
|
||||
if (pricingDia.getPricingdiaId() != null) {
|
||||
pricingDiaService.actualizacion(pricingDia);
|
||||
pricingDiaList.updateItem(pricingDia);
|
||||
} else {
|
||||
pricingDiaService.suscribir(pricingDia);
|
||||
pricingDiaList.addItem(pricingDia);
|
||||
}
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.traslapa"),
|
||||
Labels.getLabel("editarPricingController.windowDia.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("",ex);
|
||||
Clients.alert(Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverDia(Event ev) throws InterruptedException {
|
||||
GP_PricingDia pDia = (GP_PricingDia) pricingDiaList.getSelected();
|
||||
if (pDia != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaDia"), Labels.getLabel("editarPricingController.windowDia.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingDia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingDia.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingDia.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingDiaList.removeItem(pricingDia);
|
||||
pricingDiaService.borrar(pricingDia);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.OK,
|
||||
Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public GP_PricingDia getPricingDia() {
|
||||
return pricingDia;
|
||||
}
|
||||
|
||||
public void setPricingDia(GP_PricingDia pricingDia) {
|
||||
this.pricingDia = pricingDia;
|
||||
}
|
||||
|
||||
public MyListbox getPricingDiaList() {
|
||||
return pricingDiaList;
|
||||
}
|
||||
|
||||
public void setPricingDiaList(MyListbox pricingDiaList) {
|
||||
this.pricingDiaList = pricingDiaList;
|
||||
}
|
||||
|
||||
public GP_PricingDiaService getPricingDiaService() {
|
||||
return pricingDiaService;
|
||||
}
|
||||
|
||||
public void setPricingDiaService(GP_PricingDiaService pricingDiaService) {
|
||||
this.pricingDiaService = pricingDiaService;
|
||||
}
|
||||
|
||||
public Timebox getHorariofin() {
|
||||
return horariofin;
|
||||
}
|
||||
|
||||
public void setHorariofin(Timebox horariofin) {
|
||||
this.horariofin = horariofin;
|
||||
}
|
||||
|
||||
public Timebox getHorarioinicio() {
|
||||
return horarioinicio;
|
||||
}
|
||||
|
||||
public void setHorarioinicio(Timebox horarioinicio) {
|
||||
this.horarioinicio = horarioinicio;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,165 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.hibernate.Hibernate;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingEspecificoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
|
||||
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.MyTextboxDecimal;
|
||||
|
||||
@Controller("editarGP_PricingEspecificoOcupacionController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingEspecificoOcupacionController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingEspecificoOcupacionController.class);
|
||||
|
||||
private GP_PricingEspecifico pricingEspecifico;
|
||||
private GP_PricingEspecificoOcupacion pricingEspecificoOcupacion;
|
||||
private MyListbox pricingListEspOcupacion;
|
||||
|
||||
private MyTextboxDecimal tarifa;
|
||||
private MyTextboxDecimal desconto;
|
||||
private MyTextboxDecimal ocupacioninicial;
|
||||
private MyTextboxDecimal ocupacionfinal;
|
||||
|
||||
private Boolean isEdicao;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingEspecificoService pricingEspecificoService;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
pricingEspecifico = (GP_PricingEspecifico) Executions.getCurrent().getArg().get("pricingEspecifico");
|
||||
pricingEspecificoOcupacion = (GP_PricingEspecificoOcupacion) Executions.getCurrent().getArg().get("pricingEspecificoOcupacion");
|
||||
pricingListEspOcupacion = (MyListbox) Executions.getCurrent().getArg().get("pricingListEspOcupacion");
|
||||
isEdicao = (Boolean) Executions.getCurrent().getArg().get("isEdicao");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
Locale locale = new Locale("pt", "BR");
|
||||
|
||||
if (pricingEspecificoOcupacion.getTarifa() != null || pricingEspecificoOcupacion.getDescuento() != null) {
|
||||
tarifa.setValue(pricingEspecificoOcupacion.getTarifa() == null ? StringUtils.EMPTY : BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(pricingEspecificoOcupacion.getTarifa(), locale));
|
||||
ocupacioninicial.setValue(pricingEspecificoOcupacion.getOcupacioninicial() == null ? StringUtils.EMPTY : BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(pricingEspecificoOcupacion.getOcupacioninicial(), locale));
|
||||
ocupacionfinal.setValue(pricingEspecificoOcupacion.getOcupacionfinal() == null ? StringUtils.EMPTY : BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(pricingEspecificoOcupacion.getOcupacionfinal(), locale));
|
||||
desconto.setValue(pricingEspecificoOcupacion.getDescuento() == null ? StringUtils.EMPTY : BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(pricingEspecificoOcupacion.getDescuento(), locale));
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarPricingEspOcup(Event ev) throws Exception {
|
||||
tarifa.getValue();
|
||||
ocupacioninicial.getValue();
|
||||
ocupacionfinal.getValue();
|
||||
desconto.getValue();
|
||||
if(desconto.getValue().equals("") && tarifa.getValue().equals("") ){
|
||||
Messagebox.show(
|
||||
"Não é possivel salvar pricing.\n O campo desconto ou Tarifa deve ser preenchido!",
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
}else if(!desconto.getValue().equals("") && !tarifa.getValue().equals("") ){
|
||||
Messagebox.show(
|
||||
"Não é possivel salvar pricing.\n Os campos Desconto e Tarifa não devem ser preenchido ao mesmo tempo!",
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
}else{
|
||||
|
||||
try {
|
||||
if (pricingEspecificoOcupacion.getPricingEspecificoOcupacionId() == null) {
|
||||
pricingEspecificoOcupacion = new GP_PricingEspecificoOcupacion();
|
||||
}
|
||||
|
||||
pricingEspecificoOcupacion.setTarifa(tarifa.getValueDecimal());
|
||||
pricingEspecificoOcupacion.setOcupacioninicial(ocupacioninicial.getValueDecimal());
|
||||
pricingEspecificoOcupacion.setOcupacionfinal(ocupacionfinal.getValueDecimal());
|
||||
pricingEspecificoOcupacion.setPricingEspecifico(pricingEspecifico);
|
||||
pricingEspecificoOcupacion.setDescuento(desconto.getValueDecimal());
|
||||
|
||||
pricingEspecificoOcupacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingEspecificoOcupacion.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingEspecificoOcupacion.setActivo(true);
|
||||
|
||||
if (pricingEspecifico != null && pricingEspecifico.getPricingespecificoId() != null) {
|
||||
pricingEspecifico = pricingEspecificoService.obtenerID(pricingEspecifico.getPricingespecificoId().longValue());
|
||||
}
|
||||
Hibernate.initialize(pricingEspecifico);
|
||||
Hibernate.initialize(pricingEspecificoOcupacion);
|
||||
|
||||
List<GP_PricingEspecificoOcupacion> peoList = null;
|
||||
if (pricingEspecifico.getPricingEspecificoOcupacionsList() == null || pricingEspecifico.getPricingEspecificoOcupacionsList().isEmpty()) {
|
||||
peoList = new ArrayList<GP_PricingEspecificoOcupacion>();
|
||||
} else {
|
||||
peoList = pricingEspecifico.getPricingEspecificoOcupacionsList();
|
||||
}
|
||||
|
||||
if (pricingEspecificoOcupacion.getPricingEspecificoOcupacionId() != null && peoList.contains(pricingEspecificoOcupacion)) {
|
||||
int index = peoList.indexOf(pricingEspecificoOcupacion);
|
||||
if(index >= 0) {
|
||||
peoList.set(index, pricingEspecificoOcupacion);
|
||||
}
|
||||
} else {
|
||||
if(!peoList.contains(pricingEspecificoOcupacion)){
|
||||
peoList.add(pricingEspecificoOcupacion);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pricingEspecifico.setPricingEspecificoOcupacionsList(peoList);
|
||||
|
||||
if(isEdicao){
|
||||
pricingListEspOcupacion.updateItem(pricingEspecificoOcupacion);
|
||||
} else {
|
||||
pricingListEspOcupacion.addItemNovo(pricingEspecificoOcupacion);
|
||||
}
|
||||
|
||||
closeWindow();
|
||||
|
||||
} catch (Exception ex) {
|
||||
log.error("Erro ao adicionar pricing Pricing Especifico Ocupacion: ", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MyTextboxDecimal getTarifa() {
|
||||
return tarifa;
|
||||
}
|
||||
|
||||
public void setTarifa(MyTextboxDecimal tarifa) {
|
||||
this.tarifa = tarifa;
|
||||
}
|
||||
|
||||
public MyTextboxDecimal getOcupacioninicial() {
|
||||
return ocupacioninicial;
|
||||
}
|
||||
|
||||
public void setOcupacioninicial(MyTextboxDecimal ocupacioninicial) {
|
||||
this.ocupacioninicial = ocupacioninicial;
|
||||
}
|
||||
|
||||
public MyTextboxDecimal getOcupacionfinal() {
|
||||
return ocupacionfinal;
|
||||
}
|
||||
|
||||
public void setOcupacionfinal(MyTextboxDecimal ocupacionfinal) {
|
||||
this.ocupacionfinal = ocupacionfinal;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingFormapago;
|
||||
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingFormapagoService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingFormapagoController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingFormapagoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingFormapagoController.class);
|
||||
|
||||
@Autowired
|
||||
private FormaPagoService formaPagoService;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingFormapagoService pricingFormapagoService;
|
||||
|
||||
private List<FormaPago> lsFormaPago;
|
||||
private GP_PricingFormapago pricingFormapago;
|
||||
private MyListbox pricingFormapagoList;
|
||||
|
||||
private Radio si;
|
||||
private Radio no;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
this.setPricingFormapago((GP_PricingFormapago) Executions.getCurrent().getArg().get("pricingFormapago"));
|
||||
this.setPricingFormapagoList((MyListbox) Executions.getCurrent().getArg().get("pricingFormapagoList"));
|
||||
this.setLsFormaPago(formaPagoService.obtenerTodos());
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (pricingFormapago.getPricingformapagoId() != null) {
|
||||
if (pricingFormapago.getIndexcepcion()) {
|
||||
si.setChecked(true);
|
||||
} else {
|
||||
no.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
no.setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarFormaPago(Event ev) throws InterruptedException {
|
||||
try {
|
||||
if (pricingFormapago.getFormaPago() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowFormaPago.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
if (no.isChecked()) {
|
||||
pricingFormapago.setIndexcepcion(Boolean.FALSE);
|
||||
} else if (si.isChecked()) {
|
||||
pricingFormapago.setIndexcepcion(Boolean.TRUE);
|
||||
}
|
||||
|
||||
if (pricingFormapago.getPricingformapagoId() != null) {
|
||||
pricingFormapagoService.actualizacion(pricingFormapago);
|
||||
pricingFormapagoList.updateItem(pricingFormapago);
|
||||
|
||||
pricingFormapagoList.setData(pricingFormapago.getPricing().getPricingFormapagoList());
|
||||
|
||||
} else {
|
||||
pricingFormapagoService.suscribir(pricingFormapago);
|
||||
pricingFormapagoList.addItem(pricingFormapago);
|
||||
}
|
||||
closeWindow();
|
||||
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public List<FormaPago> getLsFormaPago() {
|
||||
return lsFormaPago;
|
||||
}
|
||||
|
||||
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
|
||||
this.lsFormaPago = lsFormaPago;
|
||||
}
|
||||
|
||||
public GP_PricingFormapago getPricingFormapago() {
|
||||
return pricingFormapago;
|
||||
}
|
||||
|
||||
public void setPricingFormapago(GP_PricingFormapago pricingFormapago) {
|
||||
this.pricingFormapago = pricingFormapago;
|
||||
}
|
||||
|
||||
public MyListbox getPricingFormapagoList() {
|
||||
return pricingFormapagoList;
|
||||
}
|
||||
|
||||
public void setPricingFormapagoList(MyListbox pricingFormapagoList) {
|
||||
this.pricingFormapagoList = pricingFormapagoList;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingImporte;
|
||||
import com.rjconsultores.ventaboletos.entidad.Moneda;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingImporteService;
|
||||
import com.rjconsultores.ventaboletos.service.MonedaService;
|
||||
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.MyTextboxDecimal;
|
||||
|
||||
@Controller("editarGP_PricingImporteController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingImporteController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingImporteService pricingImporteService;
|
||||
@Autowired
|
||||
private MonedaService monedaService;
|
||||
private List<Moneda> lsMoneda;
|
||||
private GP_PricingImporte pricingImporte;
|
||||
private MyListbox pricingImporteList;
|
||||
private Combobox cmbMoneda;
|
||||
private MyTextboxDecimal importe;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingImporteController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsMoneda = monedaService.obtenerTodos();
|
||||
|
||||
pricingImporte = (GP_PricingImporte) Executions.getCurrent().getArg().get("pricingImporte");
|
||||
pricingImporteList = (MyListbox) Executions.getCurrent().getArg().get("pricingImporteList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarImporte(Event ev) throws Exception {
|
||||
importe.getValue();
|
||||
cmbMoneda.getValue();
|
||||
|
||||
try {
|
||||
if (pricingImporte.getMoneda() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
List<GP_PricingImporte> lsPi = pricingImporteService.buscarMoneda(pricingImporte, pricingImporte.getMoneda());
|
||||
|
||||
if (lsPi.isEmpty()) {
|
||||
if (pricingImporte.getPricingimporteId() != null) {
|
||||
pricingImporteService.actualizacion(pricingImporte);
|
||||
pricingImporteList.updateItem(pricingImporte);
|
||||
} else {
|
||||
pricingImporteService.suscribir(pricingImporte);
|
||||
pricingImporteList.addItemNovo(pricingImporte);
|
||||
}
|
||||
|
||||
closeWindow();
|
||||
} else if (lsPi.size() == 1) {
|
||||
if (lsPi.get(0).getPricingimporteId().equals(pricingImporte.getPricingimporteId())) {
|
||||
pricingImporteService.actualizacion(pricingImporte);
|
||||
pricingImporteList.updateItem(pricingImporte);
|
||||
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("",ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverImporte(Event ev) {
|
||||
try {
|
||||
GP_PricingImporte pImporte = (GP_PricingImporte) pricingImporteList.getSelected();
|
||||
if (pImporte != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaImporte"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingImporte.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingImporte.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingImporte.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingImporteList.removeItem(pricingImporte);
|
||||
pricingImporteService.borrar(pricingImporte);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
Clients.alert(
|
||||
Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||
Messagebox.EXCLAMATION);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingImporte getPricingImporte() {
|
||||
return pricingImporte;
|
||||
}
|
||||
|
||||
public void setPricingImporte(GP_PricingImporte pricingImporte) {
|
||||
this.pricingImporte = pricingImporte;
|
||||
}
|
||||
|
||||
public MyListbox getPricingImporteList() {
|
||||
return pricingImporteList;
|
||||
}
|
||||
|
||||
public void setPricingImporteList(MyListbox pricingImporteList) {
|
||||
this.pricingImporteList = pricingImporteList;
|
||||
}
|
||||
|
||||
public GP_PricingImporteService getPricingImporteService() {
|
||||
return pricingImporteService;
|
||||
}
|
||||
|
||||
public void setPricingImporteService(GP_PricingImporteService pricingImporteService) {
|
||||
this.pricingImporteService = pricingImporteService;
|
||||
}
|
||||
|
||||
public List<Moneda> getLsMoneda() {
|
||||
return lsMoneda;
|
||||
}
|
||||
|
||||
public void setLsMoneda(List<Moneda> lsMoneda) {
|
||||
this.lsMoneda = lsMoneda;
|
||||
}
|
||||
|
||||
public MonedaService getMonedaService() {
|
||||
return monedaService;
|
||||
}
|
||||
|
||||
public void setMonedaService(MonedaService monedaService) {
|
||||
this.monedaService = monedaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingMarca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingMarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingMarcaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingMarcaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingMarcaService pricingMarcaService;
|
||||
@Autowired
|
||||
private MarcaService marcaService;
|
||||
private List<Marca> lsMarca;
|
||||
private GP_PricingMarca pricingMarca;
|
||||
private MyListbox pricingMarcaList;
|
||||
private Combobox cmbMarca;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingMarcaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado().getEmpresa());
|
||||
|
||||
GP_PricingMarca pm = (GP_PricingMarca) Executions.getCurrent().getArg().get("pricingMarca");
|
||||
pricingMarca = (pm.getUsuarioId() == null) ? pm : pricingMarcaService.obtenerID(pm.getUsuarioId());
|
||||
pricingMarcaList = (MyListbox) Executions.getCurrent().getArg().get("pricingMarcaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbMarca.focus();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarMarca(Event ev) throws Exception {
|
||||
cmbMarca.getValue();
|
||||
|
||||
try {
|
||||
if (pricingMarca.getMarca() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowMarca.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
Boolean existe = pricingMarcaService.obtenerPricingMarca(pricingMarca.getPricing(), (Marca) cmbMarca.getSelectedItem().getValue());
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowMarca.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingMarca.getPricingmarcaId() != null) {
|
||||
pricingMarcaService.actualizacion(pricingMarca);
|
||||
pricingMarcaList.updateItem(pricingMarca);
|
||||
} else {
|
||||
pricingMarcaService.suscribir(pricingMarca);
|
||||
pricingMarcaList.addItemNovo(pricingMarca);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverMarca(Event ev) {
|
||||
try {
|
||||
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaMarca"),
|
||||
Labels.getLabel("editarPricingController.windowMarca.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingMarca.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingMarca.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingMarca.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingMarcaList.removeItem(pricingMarca);
|
||||
pricingMarcaService.borrar(pricingMarca);
|
||||
closeWindow();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingMarca getPricingMarca() {
|
||||
return pricingMarca;
|
||||
}
|
||||
|
||||
public void setPricingMarca(GP_PricingMarca pricingMarca) {
|
||||
this.pricingMarca = pricingMarca;
|
||||
}
|
||||
|
||||
public MyListbox getPricingMarcaList() {
|
||||
return pricingMarcaList;
|
||||
}
|
||||
|
||||
public void setPricingMarcaList(MyListbox pricingMarcaList) {
|
||||
this.pricingMarcaList = pricingMarcaList;
|
||||
}
|
||||
|
||||
public GP_PricingMarcaService getPricingMarcaService() {
|
||||
return pricingMarcaService;
|
||||
}
|
||||
|
||||
public void setPricingMarcaService(GP_PricingMarcaService pricingMarcaService) {
|
||||
this.pricingMarcaService = pricingMarcaService;
|
||||
}
|
||||
|
||||
public List<Marca> getLsMarca() {
|
||||
return lsMarca;
|
||||
}
|
||||
|
||||
public void setLsMarca(List<Marca> lsMarca) {
|
||||
this.lsMarca = lsMarca;
|
||||
}
|
||||
|
||||
public MarcaService getMarcaService() {
|
||||
return marcaService;
|
||||
}
|
||||
|
||||
public void setMarcaService(MarcaService marcaService) {
|
||||
this.marcaService = marcaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,227 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingMercado;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingMercadoService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingMercadoController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingMercadoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingMercadoService pricingMercadoService;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
private GP_PricingMercado pricingMercado;
|
||||
private MyListbox pricingMercadoList;
|
||||
private Combobox cmbOrigen;
|
||||
private Combobox cmbDestino;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingMercadoController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
pricingMercado = (GP_PricingMercado) Executions.getCurrent().getArg().get("pricingMercado");
|
||||
pricingMercadoList = (MyListbox) Executions.getCurrent().getArg().get("pricingMercadoList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (pricingMercado.getPricingparadaId() != null) {
|
||||
Parada origem = pricingMercado.getOrigen();
|
||||
if (origem != null) {
|
||||
cmbOrigen.setText(origem.getDescparada());
|
||||
}
|
||||
|
||||
Parada destino = pricingMercado.getDestino();
|
||||
if (destino != null) {
|
||||
cmbDestino.setText(destino.getDescparada());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarMercado(Event ev) throws Exception {
|
||||
cmbOrigen.getValue();
|
||||
cmbDestino.getValue();
|
||||
|
||||
try {
|
||||
Parada origen = null;
|
||||
if (cmbOrigen.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbOrigen.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
origen = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
origen = (Parada) cmbOrigen.getSelectedItem().getValue();
|
||||
}
|
||||
Parada destino = null;
|
||||
if (cmbDestino.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbDestino.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
destino = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
destino = (Parada) cmbDestino.getSelectedItem().getValue();
|
||||
}
|
||||
|
||||
try {
|
||||
if (origen == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox.origen"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (destino == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox.destino"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
Boolean existe =
|
||||
pricingMercadoService.obtenerPricingMercado(pricingMercado.getPricing(),
|
||||
origen, destino);
|
||||
|
||||
pricingMercado.setOrigen(origen);
|
||||
pricingMercado.setDestino(destino);
|
||||
|
||||
// id -1 identifica que é todas origens ou todos os destinos:
|
||||
if (origen.getParadaId().equals(-1) && destino.getParadaId().equals(-1)) {
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
if (pricingMercado.getPricingparadaId() != null) {
|
||||
pricingMercadoService.actualizacion(pricingMercado);
|
||||
pricingMercadoList.updateItem(pricingMercado);
|
||||
} else {
|
||||
pricingMercadoService.suscribir(pricingMercado);
|
||||
pricingMercadoList.addItemNovo(pricingMercado);
|
||||
}
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
if (origen.equals(destino)) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.mercadoIguais"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.mercadoExiste"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingMercado.getPricingparadaId() != null) {
|
||||
pricingMercadoService.actualizacion(pricingMercado);
|
||||
pricingMercadoList.updateItem(pricingMercado);
|
||||
} else {
|
||||
pricingMercadoService.suscribir(pricingMercado);
|
||||
pricingMercadoList.addItemNovo(pricingMercado);
|
||||
}
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("editarPricingController mercado:" + ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Combobox PARADA " + ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverMercado(Event ev) {
|
||||
try {
|
||||
GP_PricingMercado pMercado = (GP_PricingMercado) pricingMercadoList.getSelected();
|
||||
if (pMercado != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaMercado"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingMercado.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingMercado.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingMercado.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingMercadoList.removeItem(pricingMercado);
|
||||
pricingMercadoService.borrar(pricingMercado);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingMercado getPricingMercado() {
|
||||
return pricingMercado;
|
||||
}
|
||||
|
||||
public void setPricingMercado(GP_PricingMercado pricingMercado) {
|
||||
this.pricingMercado = pricingMercado;
|
||||
}
|
||||
|
||||
public MyListbox getPricingMercadoList() {
|
||||
return pricingMercadoList;
|
||||
}
|
||||
|
||||
public void setPricingMercadoList(MyListbox pricingMercadoList) {
|
||||
this.pricingMercadoList = pricingMercadoList;
|
||||
}
|
||||
|
||||
public GP_PricingMercadoService getPricingMercadoService() {
|
||||
return pricingMercadoService;
|
||||
}
|
||||
|
||||
public void setPricingMercadoService(GP_PricingMercadoService pricingMercadoService) {
|
||||
this.pricingMercadoService = pricingMercadoService;
|
||||
}
|
||||
|
||||
public ParadaService getParadaService() {
|
||||
return paradaService;
|
||||
}
|
||||
|
||||
public void setParadaService(ParadaService paradaService) {
|
||||
this.paradaService = paradaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,402 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingOcupaAntecipaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaLegendaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaPoltronasVO;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MensagensUtils;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingOcupaAntecipaLegenda;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingOcupacao;
|
||||
|
||||
import ch.stfo.zk.component.Colorbox;
|
||||
|
||||
@Controller("editarGP_PricingOcupaAntecipaAutomaticoController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingOcupaAntecipaAutomaticoController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final int CANTDIASMAXDEFAULT = 365;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingOcupaAntecipaService pricingOcupaAntecipaService;
|
||||
private GP_PricingOcupaAntecipa pricingOcupaAntecipa;
|
||||
private MyListbox pricingOcupaAntecipaList;
|
||||
private MyListbox parentPricingOcupaAntecipaList;
|
||||
private MyListbox parentPricingOcupaAntecipaLegendaList;
|
||||
|
||||
private Colorbox colorChoose;
|
||||
private MyListbox pricingOcupaAntecipaLegendaList;
|
||||
|
||||
private Intbox ocupacioninicial;
|
||||
private Intbox ocupacionfinal;
|
||||
private Intbox cantdiasmin;
|
||||
|
||||
private MyTextboxDecimal porcentaje;
|
||||
|
||||
private List<GP_PricingOcupaAntecipa> lsPricingOcupaAntecipa;
|
||||
|
||||
private Radio rdOcupacao;
|
||||
private Boolean hasNoElements;
|
||||
|
||||
private List<GP_PricingOcupaAntecipa> argList;
|
||||
private GP_Pricing pricing;
|
||||
|
||||
private ConstraintPorcentagem ct;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingOcupaAntecipaAutomaticoController.class);
|
||||
|
||||
private List<String> columns;
|
||||
private List<GP_PricingOcupaAntecipaVO> lsPricingOcupacaoAntecipaVO;
|
||||
private List<GP_PricingOcupaAntecipaLegendaVO> lsPricingOcupaAntecipaLegendas;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
/*
|
||||
* Transformar a tabela (valores de exemplo) :
|
||||
*
|
||||
* Qtd. Dias Qtd. Dias Ocup. Min. Ocup. Máx. Porcentagem
|
||||
* Minimo Máximo
|
||||
*
|
||||
* 12 * 0% 20% -30%
|
||||
* 12 * 21% 80% -15%
|
||||
* 12 * 81% 90% -10%
|
||||
* 8 11 0% 80% -15%
|
||||
* 8 11 81% 90% -10%
|
||||
* 4 7 0% 90% -10%
|
||||
*
|
||||
* Na forma:
|
||||
*
|
||||
* 12 dias ----> 30% (ocupação de 0% -> 20%)
|
||||
* 08 dias ----> 15% (ocupação de 21% -> 80%)
|
||||
* 04 dias ----> 10% (ocupação de 81% -> 90%)
|
||||
*
|
||||
*/
|
||||
|
||||
argList = (List<GP_PricingOcupaAntecipa>) Executions.getCurrent().getArg().get("clasePricingOcupaAntecipaList");
|
||||
parentPricingOcupaAntecipaList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupaAntecipaList");
|
||||
parentPricingOcupaAntecipaLegendaList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupaAntecipaLegendasList");
|
||||
pricing = (GP_Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
|
||||
lsPricingOcupaAntecipa = new ArrayList<GP_PricingOcupaAntecipa>();
|
||||
lsPricingOcupaAntecipaLegendas = new ArrayList<GP_PricingOcupaAntecipaLegendaVO>();
|
||||
lsPricingOcupacaoAntecipaVO = new ArrayList<GP_PricingOcupaAntecipaVO>();
|
||||
|
||||
pricingOcupaAntecipaList.setItemRenderer(new RenderPricingOcupacao());
|
||||
pricingOcupaAntecipaLegendaList.setItemRenderer(new RenderPricingOcupaAntecipaLegenda());
|
||||
|
||||
try {
|
||||
Collections.sort(argList, new PricingOcupaAntecipaComparator());
|
||||
} catch (Exception e) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingOcupaAntecipaAutomaticoController.MSG.FormatoDados"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int diaMin = -1;
|
||||
for (GP_PricingOcupaAntecipa p : argList) {
|
||||
if (p.getCantdiasmin() != null || diaMin != p.getCantdiasmin()) {
|
||||
lsPricingOcupaAntecipa.add(p);
|
||||
diaMin = p.getCantdiasmin();
|
||||
}
|
||||
}
|
||||
|
||||
// se TabelaMaior.size mod TabelaMenor.size = 0, então há possibilidade de transformar a maior na menor.
|
||||
if ((lsPricingOcupaAntecipa.size() > 0) && (argList.size() % lsPricingOcupaAntecipa.size() == 0)) {
|
||||
|
||||
for (int j = 0; j < lsPricingOcupaAntecipa.size(); j++) {
|
||||
lsPricingOcupaAntecipa.get(j).setOcupacionfinal(argList.get(j).getOcupacionfinal());
|
||||
lsPricingOcupaAntecipa.get(j).setOcupacioninicial(argList.get(j).getOcupacioninicial());
|
||||
lsPricingOcupaAntecipa.get(j).setCantasientosmax(argList.get(j).getCantasientosmax());
|
||||
lsPricingOcupaAntecipa.get(j).setCantasientosmin(argList.get(j).getCantasientosmin());
|
||||
}
|
||||
|
||||
carregarPricingOcupaAntecipaVO(lsPricingOcupaAntecipa);
|
||||
} else if (lsPricingOcupaAntecipa.size() > 0) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingOcupaAntecipaAutomaticoController.MSG.FormatoDados"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void apagarRegistros() throws BusinessException {
|
||||
for (GP_PricingOcupaAntecipa poa : argList) {
|
||||
if ((poa.getOcupacioninicial() != null && poa.getOcupacioninicial().doubleValue() > 0) || (poa.getCantasientosmin() != null && poa.getCantasientosmin().intValue() > 0)) {
|
||||
pricingOcupaAntecipaService.borrar(poa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
|
||||
List<GP_PricingOcupaAntecipa> parentList = new ArrayList<GP_PricingOcupaAntecipa>();
|
||||
Collections.sort(lsPricingOcupaAntecipa, new PricingOcupaAntecipaComparator());
|
||||
Integer cantDiasMin = lsPricingOcupaAntecipa.isEmpty() || lsPricingOcupaAntecipa.get(0).getCantdiasmin() == null ? 0 : lsPricingOcupaAntecipa.get(0).getCantdiasmin();
|
||||
if(cantDiasMin > 0){
|
||||
calculaCantDiasMax();
|
||||
}
|
||||
try {
|
||||
apagarRegistros();
|
||||
for (int i = 0; i < lsPricingOcupaAntecipa.size(); i++) {
|
||||
GP_PricingOcupaAntecipa pricingOcupaAntecipa = lsPricingOcupaAntecipa.get(i);
|
||||
if(!cantDiasMin.equals(pricingOcupaAntecipa.getCantdiasmin())){
|
||||
if(rdOcupacao.isChecked()){
|
||||
pricingOcupaAntecipa.setCantasientosmin(0);
|
||||
}else{
|
||||
pricingOcupaAntecipa.setOcupacioninicial(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
}
|
||||
if(pricingOcupaAntecipa.getOcupacioninicial() == null){
|
||||
pricingOcupaAntecipa.setOcupacioninicial(BigDecimal.ZERO);
|
||||
}
|
||||
if (pricingOcupaAntecipa.getPricingocupaantecipaId() == null) {
|
||||
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
|
||||
} else {
|
||||
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
parentList.add(pricingOcupaAntecipa);
|
||||
|
||||
cantDiasMin = pricingOcupaAntecipa.getCantdiasmin();
|
||||
if(validaPricingOcupa(i)){
|
||||
continue;
|
||||
}
|
||||
for (int j = i + 1; j < lsPricingOcupaAntecipa.size(); j++) {
|
||||
GP_PricingOcupaAntecipa p = new GP_PricingOcupaAntecipa();
|
||||
p.setPricingocupaantecipaId(lsPricingOcupaAntecipa.get(j).getPricingocupaantecipaId());
|
||||
p.setCantasientosmax(lsPricingOcupaAntecipa.get(j).getCantasientosmax());
|
||||
p.setCantasientosmin(lsPricingOcupaAntecipa.get(j).getCantasientosmin());
|
||||
p.setCantdiasmax(pricingOcupaAntecipa.getCantdiasmax());
|
||||
p.setCantdiasmin(pricingOcupaAntecipa.getCantdiasmin());
|
||||
p.setOcupacionfinal(lsPricingOcupaAntecipa.get(j).getOcupacionfinal());
|
||||
p.setOcupacioninicial(lsPricingOcupaAntecipa.get(j).getOcupacioninicial());
|
||||
p.setPorcentaje(lsPricingOcupaAntecipa.get(j).getPorcentaje());
|
||||
p.setPricing(pricing);
|
||||
p.setCor(lsPricingOcupaAntecipa.get(j).getCor());
|
||||
pricingOcupaAntecipaService.suscribir(p);
|
||||
parentList.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
//parentPricingOcupaAntecipaList.setData(parentList);
|
||||
carregarPricingOcupaAntecipaVO(parentList);
|
||||
parentPricingOcupaAntecipaList.setData(lsPricingOcupacaoAntecipaVO);
|
||||
parentPricingOcupaAntecipaLegendaList.setData(lsPricingOcupaAntecipaLegendas);
|
||||
closeWindow();
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
Messagebox.show(e.getLocalizedMessage(),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean validaPricingOcupa(int i) {
|
||||
return (i+1) < lsPricingOcupaAntecipa.size() && lsPricingOcupaAntecipa.get(i).getCantdiasmin().equals(lsPricingOcupaAntecipa.get(i + 1).getCantdiasmin());
|
||||
}
|
||||
|
||||
private class PricingOcupaAntecipaComparator implements Comparator<GP_PricingOcupaAntecipa> {
|
||||
public int compare(GP_PricingOcupaAntecipa pricing, GP_PricingOcupaAntecipa outroPricing) {
|
||||
Integer cantDiasMinComp = outroPricing.getCantdiasmin() != null ? outroPricing.getCantdiasmin().compareTo(pricing.getCantdiasmin()) : 0;
|
||||
Integer ocupaMinComp = outroPricing.getCantasientosmin() != null ? pricing.getCantasientosmin().compareTo(outroPricing.getCantasientosmin()) : 0;
|
||||
if (cantDiasMinComp != 0) {
|
||||
return cantDiasMinComp;
|
||||
}
|
||||
if(ocupaMinComp != 0){
|
||||
return pricing.getCantasientosmin().compareTo(outroPricing.getCantasientosmin());
|
||||
}else{
|
||||
return ocupaMinComp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void calculaCantDiasMax() {
|
||||
GP_PricingOcupaAntecipa poa;
|
||||
int cantDiasMinAnterior;
|
||||
if (lsPricingOcupaAntecipa.get(0).getCantdiasmin() == null){
|
||||
cantDiasMinAnterior = 0;
|
||||
}else{
|
||||
cantDiasMinAnterior = lsPricingOcupaAntecipa.get(0).getCantdiasmin();
|
||||
int cantDiasMaxAnterior = CANTDIASMAXDEFAULT;
|
||||
for (int i = 0; i < lsPricingOcupaAntecipa.size(); i++) {
|
||||
poa = lsPricingOcupaAntecipa.get(i);
|
||||
if (i == 0) {
|
||||
poa.setCantdiasmax(CANTDIASMAXDEFAULT);
|
||||
} else {
|
||||
if(poa.getCantdiasmin().intValue() == cantDiasMinAnterior){
|
||||
poa.setCantdiasmax(cantDiasMaxAnterior);
|
||||
}else{
|
||||
poa.setCantdiasmax(cantDiasMinAnterior - 1);
|
||||
cantDiasMinAnterior = poa.getCantdiasmin();
|
||||
cantDiasMaxAnterior = poa.getCantdiasmax();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnlancar(Event ev) throws Exception {
|
||||
try{
|
||||
colorChoose.getValue();
|
||||
|
||||
GP_PricingOcupaAntecipa poa = new GP_PricingOcupaAntecipa();
|
||||
poa.setPricing(pricing);
|
||||
poa.setCantdiasmin(cantdiasmin.getValue());
|
||||
poa.setCor(colorChoose.getValue());
|
||||
if(!porcentaje.getValue().isEmpty()){
|
||||
poa.setPorcentaje(porcentaje.getValueDecimal());
|
||||
if( cantdiasmin.getValue() == null || (cantdiasmin.getValue() <= 365 && cantdiasmin.getValue() >= 0)){
|
||||
if ((ocupacionfinal.getValue() >= ocupacioninicial.getValue()) && ocupacionfinal.getValue() > 0 && ocupacioninicial.getValue() >= 0){
|
||||
if (rdOcupacao.isChecked()) {
|
||||
poa.setOcupacioninicial(new BigDecimal(ocupacioninicial.getValue()));
|
||||
poa.setOcupacionfinal(new BigDecimal(ocupacionfinal.getValue()));
|
||||
}else{
|
||||
poa.setCantasientosmin(ocupacioninicial.getValue());
|
||||
poa.setCantasientosmax(ocupacionfinal.getValue());
|
||||
}
|
||||
lsPricingOcupaAntecipa.add(poa);
|
||||
|
||||
carregarPricingOcupaAntecipaVO(lsPricingOcupaAntecipa);
|
||||
}else if(ocupacionfinal.getValue() == 0){
|
||||
MensagensUtils.showMessageExclamation("editarPricingEspecificoOcupacionController.MSG.opucMaxAut","editarPricingController.windowOcupacion.title");
|
||||
ocupacionfinal.focus();
|
||||
}else if(ocupacioninicial.getValue() == null || ocupacionfinal.getValue() == null){
|
||||
MensagensUtils.showMessageExclamation("editarPricingEspecificoOcupacionController.MSG.ocupMinOpucMaxVazio","editarPricingController.windowOcupacion.title");
|
||||
ocupacioninicial.focus();
|
||||
}
|
||||
if(ocupacionfinal.getValue() < ocupacioninicial.getValue()) {
|
||||
MensagensUtils.showMessageExclamation("editarPricingEspecificoOcupacionController.MSG.ocupMinOpucMax","editarPricingController.windowOcupacion.title");
|
||||
ocupacioninicial.focus();
|
||||
}
|
||||
}else{
|
||||
MensagensUtils.showMessageExclamation("editarPricingEspecificoOcupacionController.MSG.quantDiasOcup","editarPricingController.windowOcupacion.title");
|
||||
}
|
||||
}else{
|
||||
MensagensUtils.showMessageExclamation("editarPricingEspecificoOcupacionController.MSG.porcOcupaAutVazio", "editarPricingController.windowOcupacion.title");
|
||||
porcentaje.focus();
|
||||
}
|
||||
}catch(Exception ex) {
|
||||
log.error("Ocupação mínimo ou máxima = null",ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void carregarPricingOcupaAntecipaVO(List<GP_PricingOcupaAntecipa> lsPricingOcupaAntecipa) {
|
||||
lsPricingOcupacaoAntecipaVO = pricingOcupaAntecipaService.carregarPricingOcupaAntecipaVO(lsPricingOcupaAntecipa);
|
||||
lsPricingOcupaAntecipaLegendas = pricingOcupaAntecipaService.carregarPricingOcupaAntecipaLegenda(lsPricingOcupaAntecipa);
|
||||
|
||||
pricingOcupaAntecipaList.setData(lsPricingOcupacaoAntecipaVO);
|
||||
pricingOcupaAntecipaLegendaList.setData(lsPricingOcupaAntecipaLegendas);
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverOcupaAntecipa(Event ev) {
|
||||
|
||||
try {
|
||||
GP_PricingOcupaAntecipa pOcupacion = (GP_PricingOcupaAntecipa) pricingOcupaAntecipaList.getSelected();
|
||||
if (pOcupacion != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaOcupacion"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.YES | Messagebox.NO,
|
||||
Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingOcupaAntecipa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingOcupaAntecipa.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingOcupaAntecipa.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingOcupaAntecipaList.removeItem(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaService.borrar(pricingOcupaAntecipa);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingOcupaAntecipa getPricingOcupaAntecipa() {
|
||||
return pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public void setPricingOcupacion(GP_PricingOcupaAntecipa pricingOcupaAntecipa) {
|
||||
this.pricingOcupaAntecipa = pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public MyListbox getPricingOcupacionList() {
|
||||
return pricingOcupaAntecipaList;
|
||||
}
|
||||
|
||||
public void setPricingOcupacionList(MyListbox pricingOcupacionList) {
|
||||
this.pricingOcupaAntecipaList = pricingOcupacionList;
|
||||
}
|
||||
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
|
||||
public Boolean getHasNoElements() {
|
||||
return hasNoElements;
|
||||
}
|
||||
|
||||
public void setHasNoElements(Boolean hasNoElements) {
|
||||
this.hasNoElements = hasNoElements;
|
||||
}
|
||||
|
||||
public List<String> getColumns() {
|
||||
if (columns == null) {
|
||||
carregarColunas();
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
private void carregarColunas() {
|
||||
columns = new ArrayList<String>();
|
||||
for (int i = 1; i <= GP_PricingOcupaAntecipaPoltronasVO.MAXPOLTRONAS; i++) {
|
||||
columns.add(i+"");
|
||||
}
|
||||
}
|
||||
|
||||
public void onChange$colorChoose(Event ev) throws InterruptedException {
|
||||
colorChoose.setStyle(" background: #FFFFFF; font-style: oblique;");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,307 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.api.Comboitem;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingClasseTarifaria;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingClasseTarifariaService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingHistoricoService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingOcupaAntecipaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaLegendaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
|
||||
import ch.stfo.zk.component.Colorbox;
|
||||
|
||||
@Controller("editarGP_PricingOcupaAntecipaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingOcupaAntecipaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingOcupaAntecipaController.class);
|
||||
@Autowired
|
||||
private GP_PricingOcupaAntecipaService pricingOcupaAntecipaService;
|
||||
|
||||
private GP_PricingOcupaAntecipa pricingOcupaAntecipa;
|
||||
private MyListbox pricingOcupaAntecipaList;
|
||||
private MyListbox pricingOcupaAntecipaLegendaList;
|
||||
private Intbox ocupacioninicial;
|
||||
private Intbox ocupacionfinal;
|
||||
private Intbox cantdiasmin;
|
||||
private Intbox cantdiasmax;
|
||||
private Intbox cantasientosmin;
|
||||
private Intbox cantasientosmax;
|
||||
private MyTextboxDecimal porcentaje;
|
||||
private MyTextboxDecimal importe;
|
||||
private List<GP_PricingOcupaAntecipa> lsPricingOcupaAntecipa;
|
||||
private List<GP_PricingOcupaAntecipaVO> lsPricingOcupaAntecipaVO;
|
||||
private List<GP_PricingOcupaAntecipaLegendaVO> lsPricingOcupaAntecipaLegenda;
|
||||
private ConstraintPorcentagem ct;
|
||||
private Colorbox colorChoose;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingClasseTarifariaService pricingClasseTarifariaService;
|
||||
private List<GP_PricingClasseTarifaria> lsClasseTarifarias;
|
||||
private Combobox cmbPricingClasseTarifaria;
|
||||
private MyGenericForwardComposer parentWindow;
|
||||
private Map argParentWindow;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingHistoricoService pricingHistoricoService;
|
||||
|
||||
private GP_Pricing pricing;
|
||||
private GP_Pricing pricingOriginal;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
ct = new ConstraintPorcentagem();
|
||||
|
||||
updateEntidad();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
parentWindow = (MyGenericForwardComposer) Executions.getCurrent().getArg().get("parentWindow");
|
||||
argParentWindow = (Map) Executions.getCurrent().getArg().get("argParentWindow");
|
||||
|
||||
lsClasseTarifarias = pricingClasseTarifariaService.obtenerTodos();
|
||||
|
||||
if (pricingOcupaAntecipa.getPricingClasseTarifaria() != null) {
|
||||
org.zkoss.zul.Comboitem ci = new org.zkoss.zul.Comboitem(pricingOcupaAntecipa.getPricingClasseTarifaria().toString());
|
||||
ci.setAttribute("value", pricingOcupaAntecipa.getPricingClasseTarifaria());
|
||||
ci.setValue(pricingOcupaAntecipa.getPricingClasseTarifaria());
|
||||
ci.setParent(cmbPricingClasseTarifaria);
|
||||
cmbPricingClasseTarifaria.setSelectedItem(ci);
|
||||
}
|
||||
|
||||
if(pricingOcupaAntecipa != null) {
|
||||
pricing = pricingOcupaAntecipa.getPricing();
|
||||
pricingOriginal = pricing.clonar();
|
||||
}
|
||||
|
||||
if (pricingOcupaAntecipa.getCor() != null) {
|
||||
colorChoose.setStyle(" background: #FFFFFF; font-style: oblique;");
|
||||
colorChoose.setValue(pricingOcupaAntecipa.getCor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void updateEntidad() {
|
||||
|
||||
if (pricingOcupaAntecipa == null) {
|
||||
pricingOcupaAntecipa = (GP_PricingOcupaAntecipa) Executions.getCurrent().getArg().get("pricingOcupaAntecipa");
|
||||
pricingOcupaAntecipaList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupaAntecipaListVO");
|
||||
pricingOcupaAntecipaLegendaList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupaAntecipaLegendaList");
|
||||
}
|
||||
|
||||
lsPricingOcupaAntecipa = (List<GP_PricingOcupaAntecipa>) Executions.getCurrent().getArg().get("lsPricingOcupaAntecipa");
|
||||
|
||||
if (lsPricingOcupaAntecipa != null && lsPricingOcupaAntecipa.contains(pricingOcupaAntecipa)) {
|
||||
pricingOcupaAntecipa = lsPricingOcupaAntecipa.get(lsPricingOcupaAntecipa.indexOf(pricingOcupaAntecipa));
|
||||
}
|
||||
|
||||
carregarDadosGraficoPricing(lsPricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
public void onClose$winEditarPricingOcupaAntecipa(Event e) {
|
||||
updateEntidad();
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public void onClick$btnCerrar(Event ev) throws Exception {
|
||||
updateEntidad();
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
|
||||
|
||||
if ((cantasientosmin.getValue() != null || cantasientosmax.getValue() != null)
|
||||
&& (ocupacioninicial.getValue() != null || ocupacionfinal.getValue() != null)) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoPorCant"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() == null)
|
||||
&& (cantasientosmin.getValue() == null && cantasientosmax.getValue() == null)
|
||||
&& (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() == null)
|
||||
&& (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() == null)
|
||||
&& (cantdiasmin.getValue() == null && cantdiasmax.getValue() == null)
|
||||
&& (cantdiasmin.getValue() == null && cantdiasmax.getValue() == null)) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.ocAnt"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() != null)
|
||||
|| (cantasientosmin.getValue() != null && cantasientosmax.getValue() == null)
|
||||
|| (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() != null)
|
||||
|| (ocupacioninicial.getValue() != null && ocupacionfinal.getValue() == null)
|
||||
|| (cantdiasmin.getValue() == null && cantdiasmax.getValue() != null)
|
||||
|| (cantdiasmin.getValue() != null && cantdiasmax.getValue() == null)) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.MinMax"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Comboitem cbiClasseTarifaria = cmbPricingClasseTarifaria.getSelectedItem();
|
||||
if (cbiClasseTarifaria != null) {
|
||||
GP_PricingClasseTarifaria pct = (GP_PricingClasseTarifaria) cbiClasseTarifaria.getValue();
|
||||
pricingOcupaAntecipa.setPricingClasseTarifaria(pct);
|
||||
}
|
||||
|
||||
if (porcentaje.getValueDecimal() != null && importe.getValueDecimal() != null) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (porcentaje.getValueDecimal() == null && importe.getValueDecimal() == null) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
try {
|
||||
colorChoose.getValue();
|
||||
if (colorChoose.getValue() != null) {
|
||||
pricingOcupaAntecipa.setCor(colorChoose.getValue());
|
||||
ajustarCorMesmoPercentual(pricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
|
||||
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
||||
lsPricingOcupaAntecipa.set(lsPricingOcupaAntecipa.indexOf(pricingOcupaAntecipa), pricingOcupaAntecipa);
|
||||
} else {
|
||||
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
|
||||
lsPricingOcupaAntecipa.add(pricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
carregarDadosGraficoPricing(lsPricingOcupaAntecipa);
|
||||
|
||||
compararAlteracoesESalvarHistorico();
|
||||
|
||||
closeWindow();
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
Messagebox.show(e.getLocalizedMessage(),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void compararAlteracoesESalvarHistorico() {
|
||||
try {
|
||||
// Busca todas as listas novamente pq nao encontrava novos registros
|
||||
pricing.setPricingOcupaAntecipaList(pricingOcupaAntecipaService.obtenerTodoPorPricing(pricing));
|
||||
pricingHistoricoService.compararESalvar(pricingOriginal, pricing);
|
||||
} catch (Exception e) {
|
||||
log.error("Erro ao salvar historico do Pricing Rapido: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void ajustarCorMesmoPercentual(GP_PricingOcupaAntecipa pricingOcupaAntecipa) throws BusinessException {
|
||||
for (GP_PricingOcupaAntecipa prOA2 : lsPricingOcupaAntecipa) {
|
||||
if(!prOA2.getPricingocupaantecipaId().equals(pricingOcupaAntecipa.getPricingocupaantecipaId()) &&
|
||||
MoneyHelper.isIgual(prOA2.getPorcentaje(), pricingOcupaAntecipa.getPorcentaje())) {
|
||||
prOA2.setCor(pricingOcupaAntecipa.getCor());
|
||||
pricingOcupaAntecipaService.actualizacion(prOA2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void carregarDadosGraficoPricing(List<GP_PricingOcupaAntecipa> lsPricingOcupaAntecipa) {
|
||||
if(lsPricingOcupaAntecipa != null) {
|
||||
lsPricingOcupaAntecipaVO = pricingOcupaAntecipaService.carregarPricingOcupaAntecipaVO(lsPricingOcupaAntecipa);
|
||||
lsPricingOcupaAntecipaLegenda = pricingOcupaAntecipaService.carregarPricingOcupaAntecipaLegenda(lsPricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.setData(lsPricingOcupaAntecipaVO);
|
||||
pricingOcupaAntecipaLegendaList.setData(lsPricingOcupaAntecipaLegenda);
|
||||
}
|
||||
}
|
||||
|
||||
public GP_PricingOcupaAntecipa getPricingOcupaAntecipa() {
|
||||
return pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public void setPricingOcupacion(GP_PricingOcupaAntecipa pricingOcupaAntecipa) {
|
||||
this.pricingOcupaAntecipa = pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public MyListbox getPricingOcupacionList() {
|
||||
return pricingOcupaAntecipaList;
|
||||
}
|
||||
|
||||
public void setPricingOcupacionList(MyListbox pricingOcupacionList) {
|
||||
this.pricingOcupaAntecipaList = pricingOcupacionList;
|
||||
}
|
||||
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
|
||||
public List<GP_PricingClasseTarifaria> getLsClasseTarifarias() {
|
||||
return lsClasseTarifarias;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
argParentWindow.put("gravarNovo", pricingOcupaAntecipa.getPricing() == null || pricingOcupaAntecipa.getPricing().getPricingId() == null);
|
||||
argParentWindow.put("isSelecionarTabOcupaAntecipa", true);
|
||||
parentWindow.closeWindow();
|
||||
parentWindow.openWindow("/gui/gestao_pricing/editarGP_Pricing.zul", Labels.getLabel("editarPricingController.windowOcupacion.title"), argParentWindow);
|
||||
super.closeWindow();
|
||||
}
|
||||
|
||||
public void onClick$btnApagarOcupaAntecipa(Event ev) throws Exception {
|
||||
if (pricingOcupaAntecipa != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaOcupacion"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
if (resp == Messagebox.YES) {
|
||||
lsPricingOcupaAntecipa.remove(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaService.borrar(pricingOcupaAntecipa);
|
||||
carregarDadosGraficoPricing(lsPricingOcupaAntecipa);
|
||||
|
||||
compararAlteracoesESalvarHistorico();
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingPuntoVentaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingPuntoVentaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingPuntoVentaService pricingPuntoVentaService;
|
||||
@Autowired
|
||||
private PuntoVentaService puntoVentaService;
|
||||
private GP_PricingPuntoVenta pricingPuntoVenta;
|
||||
private MyListbox pricingPuntoVentaList;
|
||||
private Combobox cmbPuntoVenta;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingPuntoVentaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
pricingPuntoVenta = (GP_PricingPuntoVenta) Executions.getCurrent().getArg().get("pricingPuntoVenta");
|
||||
pricingPuntoVentaList = (MyListbox) Executions.getCurrent().getArg().get("pricingPuntoVentaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (pricingPuntoVenta.getPuntoVenta() != null) {
|
||||
cmbPuntoVenta.setText(pricingPuntoVenta.getPuntoVenta().getNombpuntoventa());
|
||||
}
|
||||
|
||||
cmbPuntoVenta.focus();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarPuntoVenta(Event ev) throws Exception {
|
||||
cmbPuntoVenta.getValue();
|
||||
|
||||
try {
|
||||
PuntoVenta pv = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue();
|
||||
try {
|
||||
Boolean existe = pricingPuntoVentaService.obtenerPricingPuntoVenta(pricingPuntoVenta.getPricing(), pv);
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowPuntoVenta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
pricingPuntoVenta.setPuntoVenta(pv);
|
||||
if (pricingPuntoVenta.getPricingptovtaId() != null) {
|
||||
pricingPuntoVentaService.actualizacion(pricingPuntoVenta);
|
||||
pricingPuntoVentaList.updateItem(pricingPuntoVenta);
|
||||
} else {
|
||||
pricingPuntoVentaService.suscribir(pricingPuntoVenta);
|
||||
pricingPuntoVentaList.addItemNovo(pricingPuntoVenta);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("editarPricingController PuntoVenta: " + ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarPricingController.windowPuntoVenta.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Combobox PuntoVenta" + ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowPuntoVenta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverPuntoVenta(Event ev) {
|
||||
try {
|
||||
GP_PricingPuntoVenta pPuntoVenta = (GP_PricingPuntoVenta) pricingPuntoVentaList.getSelected();
|
||||
if (pPuntoVenta != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaPuntoVenta"),
|
||||
Labels.getLabel("editarPricingController.windowPuntoVenta.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingPuntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingPuntoVenta.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingPuntoVenta.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingPuntoVentaList.removeItem(pricingPuntoVenta);
|
||||
pricingPuntoVentaService.borrar(pricingPuntoVenta);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowPuntoVenta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingPuntoVenta getPricingPuntoVenta() {
|
||||
return pricingPuntoVenta;
|
||||
}
|
||||
|
||||
public void setPricingPuntoVenta(GP_PricingPuntoVenta pricingPuntoVenta) {
|
||||
this.pricingPuntoVenta = pricingPuntoVenta;
|
||||
}
|
||||
|
||||
public MyListbox getPricingPuntoVentaList() {
|
||||
return pricingPuntoVentaList;
|
||||
}
|
||||
|
||||
public void setPricingPuntoVentaList(MyListbox pricingPuntoVentaList) {
|
||||
this.pricingPuntoVentaList = pricingPuntoVentaList;
|
||||
}
|
||||
|
||||
public GP_PricingPuntoVentaService getPricingPuntoVentaService() {
|
||||
return pricingPuntoVentaService;
|
||||
}
|
||||
|
||||
public void setPricingPuntoVentaService(GP_PricingPuntoVentaService pricingPuntoVentaService) {
|
||||
this.pricingPuntoVentaService = pricingPuntoVentaService;
|
||||
}
|
||||
|
||||
public PuntoVentaService getPuntoVentaService() {
|
||||
return puntoVentaService;
|
||||
}
|
||||
|
||||
public void setPuntoVentaService(PuntoVentaService puntoVentaService) {
|
||||
this.puntoVentaService = puntoVentaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingRuta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingRutaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
|
||||
@Controller("editarGP_PricingRutaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingRutaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingRutaService pricingRutaService;
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
private List<Ruta> lsRuta;
|
||||
private GP_PricingRuta pricingRuta;
|
||||
private MyListbox pricingRutaList;
|
||||
private Combobox cmbRuta;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingRutaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
pricingRuta = (GP_PricingRuta) Executions.getCurrent().getArg().get("pricingRuta");
|
||||
pricingRutaList = (MyListbox) Executions.getCurrent().getArg().get("pricingRutaList");
|
||||
|
||||
lsRuta = new ArrayList<Ruta>();
|
||||
lsRuta.add(rutaService.obtenerID(-1));
|
||||
lsRuta.addAll(rutaService.obtenerPorEmpresa(pricingRuta.getPricing().getEmpresa())) ;
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbRuta.focus();
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarRuta(Event ev) throws Exception {
|
||||
cmbRuta.getValue();
|
||||
|
||||
try {
|
||||
|
||||
if (pricingRuta.getRuta() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowRuta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
Boolean existe = pricingRutaService.obtenerPricingRuta(pricingRuta.getPricing(), (Ruta) cmbRuta.getSelectedItem().getValue());
|
||||
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowRuta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingRuta.getPricingrutaId() != null) {
|
||||
pricingRutaService.actualizacion(pricingRuta);
|
||||
pricingRutaList.updateItem(pricingRuta);
|
||||
} else {
|
||||
pricingRutaService.suscribir(pricingRuta);
|
||||
pricingRutaList.addItemNovo(pricingRuta);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverRuta(Event ev) {
|
||||
try {
|
||||
GP_PricingRuta pRuta = (GP_PricingRuta) pricingRutaList.getSelected();
|
||||
if (pRuta != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaRuta"),
|
||||
Labels.getLabel("editarPricingController.windowRuta.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingRuta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingRuta.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingRuta.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingRutaList.removeItem(pricingRuta);
|
||||
pricingRutaService.borrar(pricingRuta);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowRuta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingRuta getPricingRuta() {
|
||||
return pricingRuta;
|
||||
}
|
||||
|
||||
public void setPricingRuta(GP_PricingRuta pricingRuta) {
|
||||
this.pricingRuta = pricingRuta;
|
||||
}
|
||||
|
||||
public MyListbox getPricingRutaList() {
|
||||
return pricingRutaList;
|
||||
}
|
||||
|
||||
public void setPricingRutaList(MyListbox pricingRutaList) {
|
||||
this.pricingRutaList = pricingRutaList;
|
||||
}
|
||||
|
||||
public GP_PricingRutaService getPricingRutaService() {
|
||||
return pricingRutaService;
|
||||
}
|
||||
|
||||
public void setPricingRutaService(GP_PricingRutaService pricingRutaService) {
|
||||
this.pricingRutaService = pricingRutaService;
|
||||
}
|
||||
|
||||
public List<Ruta> getLsRuta() {
|
||||
return lsRuta;
|
||||
}
|
||||
|
||||
public void setLsRuta(List<Ruta> lsRuta) {
|
||||
this.lsRuta = lsRuta;
|
||||
}
|
||||
|
||||
public RutaService getRutaService() {
|
||||
return rutaService;
|
||||
}
|
||||
|
||||
public void setRutaService(RutaService rutaService) {
|
||||
this.rutaService = rutaService;
|
||||
}
|
||||
|
||||
public Combobox getCmbRuta() {
|
||||
return cmbRuta;
|
||||
}
|
||||
|
||||
public void setCmbRuta(Combobox cmbRuta) {
|
||||
this.cmbRuta = cmbRuta;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoPtoVta;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingTipoPtoVtaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingTipoPtoVtaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingTipoPtoVtaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingTipoPtoVtaService pricingTipoPtoVtaService;
|
||||
@Autowired
|
||||
private TipoPuntoVentaService tipoPtoVtaService;
|
||||
private List<TipoPuntoVenta> lsTipoPtoVta;
|
||||
private GP_PricingTipoPtoVta pricingTipoPtoVta;
|
||||
private MyListbox pricingTipoPtoVtaList;
|
||||
private Combobox cmbTipoPtoVta;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingTipoPtoVtaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsTipoPtoVta = tipoPtoVtaService.obtenerTodos();
|
||||
|
||||
pricingTipoPtoVta = (GP_PricingTipoPtoVta) Executions.getCurrent().getArg().get("pricingTipoPtoVta");
|
||||
pricingTipoPtoVtaList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoPtoVtaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbTipoPtoVta.focus();
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarTipoPtoVta(Event ev) throws Exception {
|
||||
cmbTipoPtoVta.getValue();
|
||||
|
||||
try {
|
||||
if (pricingTipoPtoVta.getTipoPtovta() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowTipoPtoVta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
Boolean existe = pricingTipoPtoVtaService.obtenerPricingTipoPuntoVenta(pricingTipoPtoVta.getPricing(), (TipoPuntoVenta) cmbTipoPtoVta.getSelectedItem().getValue());
|
||||
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowTipoPtoVta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingTipoPtoVta.getPricingtipoptovtaId() != null) {
|
||||
pricingTipoPtoVtaService.actualizacion(pricingTipoPtoVta);
|
||||
pricingTipoPtoVtaList.updateItem(pricingTipoPtoVta);
|
||||
} else {
|
||||
pricingTipoPtoVtaService.suscribir(pricingTipoPtoVta);
|
||||
pricingTipoPtoVtaList.addItemNovo(pricingTipoPtoVta);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverTipoPtoVta(Event ev) {
|
||||
try {
|
||||
GP_PricingTipoPtoVta pTipoPtoVta = (GP_PricingTipoPtoVta) pricingTipoPtoVtaList.getSelected();
|
||||
if (pTipoPtoVta != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoPtoVta"),
|
||||
Labels.getLabel("editarPricingController.windowTipoPtoVta.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingTipoPtoVta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingTipoPtoVta.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingTipoPtoVta.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingTipoPtoVtaList.removeItem(pricingTipoPtoVta);
|
||||
pricingTipoPtoVtaService.borrar(pricingTipoPtoVta);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowTipoPtoVta.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingTipoPtoVta getPricingTipoPtoVta() {
|
||||
return pricingTipoPtoVta;
|
||||
}
|
||||
|
||||
public void setPricingTipoPtoVta(GP_PricingTipoPtoVta pricingTipoPtoVta) {
|
||||
this.pricingTipoPtoVta = pricingTipoPtoVta;
|
||||
}
|
||||
|
||||
public MyListbox getPricingTipoPtoVtaList() {
|
||||
return pricingTipoPtoVtaList;
|
||||
}
|
||||
|
||||
public void setPricingTipoPtoVtaList(MyListbox pricingTipoPtoVtaList) {
|
||||
this.pricingTipoPtoVtaList = pricingTipoPtoVtaList;
|
||||
}
|
||||
|
||||
public GP_PricingTipoPtoVtaService getPricingTipoPtoVtaService() {
|
||||
return pricingTipoPtoVtaService;
|
||||
}
|
||||
|
||||
public void setPricingTipoPtoVtaService(GP_PricingTipoPtoVtaService pricingTipoPtoVtaService) {
|
||||
this.pricingTipoPtoVtaService = pricingTipoPtoVtaService;
|
||||
}
|
||||
|
||||
public List<TipoPuntoVenta> getLsTipoPtoVta() {
|
||||
return lsTipoPtoVta;
|
||||
}
|
||||
|
||||
public void setLsTipoPtoVta(List<TipoPuntoVenta> lsTipoPtoVta) {
|
||||
this.lsTipoPtoVta = lsTipoPtoVta;
|
||||
}
|
||||
|
||||
public TipoPuntoVentaService getTipoPtoVtaService() {
|
||||
return tipoPtoVtaService;
|
||||
}
|
||||
|
||||
public void setTipoPtoVtaService(TipoPuntoVentaService tipoPtoVtaService) {
|
||||
this.tipoPtoVtaService = tipoPtoVtaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingTipoServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoServicioService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingTipoServicioController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingTipoServicioController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private GP_PricingTipoServicioService pricingTipoServicioService;
|
||||
@Autowired
|
||||
private TipoServicioService tipoServicioService;
|
||||
private List<TipoServicio> lsTipoServicio;
|
||||
private GP_PricingTipoServicio pricingTipoServicio;
|
||||
private MyListbox pricingTipoServicioList;
|
||||
private Combobox cmbTipoServicio;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingTipoServicioController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsTipoServicio = tipoServicioService.obtenerTodos();
|
||||
|
||||
pricingTipoServicio = (GP_PricingTipoServicio) Executions.getCurrent().getArg().get("pricingTipoServicio");
|
||||
pricingTipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoServicioList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
cmbTipoServicio.focus();
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarTipoServicio(Event ev) throws Exception {
|
||||
cmbTipoServicio.getValue();
|
||||
|
||||
try {
|
||||
|
||||
if (pricingTipoServicio.getTipoServicio() == null) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error.combobox"),
|
||||
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
Boolean existe = pricingTipoServicioService.obtenerPricingTipoServicio(pricingTipoServicio.getPricing(), (TipoServicio) cmbTipoServicio.getSelectedItem().getValue());
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (pricingTipoServicio.getPricingtiposervicioId() != null) {
|
||||
pricingTipoServicioService.actualizacion(pricingTipoServicio);
|
||||
pricingTipoServicioList.updateItem(pricingTipoServicio);
|
||||
} else {
|
||||
pricingTipoServicioService.suscribir(pricingTipoServicio);
|
||||
pricingTipoServicioList.addItem(pricingTipoServicio);
|
||||
}
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverTipoServicio(Event ev) {
|
||||
try {
|
||||
GP_PricingTipoServicio pTipoServicio = (GP_PricingTipoServicio) pricingTipoServicioList.getSelected();
|
||||
if (pTipoServicio != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoServicio"),
|
||||
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingTipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingTipoServicio.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingTipoServicio.setActivo(GP_Pricing.EXCLUIDO);
|
||||
|
||||
pricingTipoServicioList.removeItem(pricingTipoServicio);
|
||||
pricingTipoServicioService.borrar(pricingTipoServicio);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GP_PricingTipoServicio getPricingTipoServicio() {
|
||||
return pricingTipoServicio;
|
||||
}
|
||||
|
||||
public void setPricingTipoServicio(GP_PricingTipoServicio pricingTipoServicio) {
|
||||
this.pricingTipoServicio = pricingTipoServicio;
|
||||
}
|
||||
|
||||
public MyListbox getPricingTipoServicioList() {
|
||||
return pricingTipoServicioList;
|
||||
}
|
||||
|
||||
public void setPricingTipoServicioList(MyListbox pricingTipoServicioList) {
|
||||
this.pricingTipoServicioList = pricingTipoServicioList;
|
||||
}
|
||||
|
||||
public GP_PricingTipoServicioService getPricingTipoServicioService() {
|
||||
return pricingTipoServicioService;
|
||||
}
|
||||
|
||||
public void setPricingTipoServicioService(GP_PricingTipoServicioService pricingTipoServicioService) {
|
||||
this.pricingTipoServicioService = pricingTipoServicioService;
|
||||
}
|
||||
|
||||
public TipoServicioService getTipoServicioService() {
|
||||
return tipoServicioService;
|
||||
}
|
||||
|
||||
public void setTipoServicioService(TipoServicioService tipoServicioService) {
|
||||
this.tipoServicioService = tipoServicioService;
|
||||
}
|
||||
|
||||
public static Logger getLog() {
|
||||
return log;
|
||||
}
|
||||
|
||||
public static void setLog(Logger log) {
|
||||
EditarGP_PricingTipoServicioController.log = log;
|
||||
}
|
||||
|
||||
public List<TipoServicio> getLsTipoServicio() {
|
||||
return lsTipoServicio;
|
||||
}
|
||||
|
||||
public void setLsTipoServicio(List<TipoServicio> lsTipoServicio) {
|
||||
this.lsTipoServicio = lsTipoServicio;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingVigenciaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarGP_PricingVigenciaController")
|
||||
@Scope("prototype")
|
||||
public class EditarGP_PricingVigenciaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingVigenciaService pricingVigenciaService;
|
||||
private GP_PricingVigencia pricingVigencia;
|
||||
private MyListbox pricingVigenciaList;
|
||||
private static Logger log = Logger.getLogger(EditarGP_PricingVigenciaController.class);
|
||||
private Datebox fecinicioviaje;
|
||||
private Datebox fecfinviaje;
|
||||
private Datebox fecinicioventa;
|
||||
private Datebox fecfinventa;
|
||||
|
||||
private GP_Pricing pricing;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
pricingVigencia = (GP_PricingVigencia) Executions.getCurrent().getArg().get("pricingVigencia");
|
||||
pricing = (GP_Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
pricingVigenciaList = (MyListbox) Executions.getCurrent().getArg().get("pricingVigenciaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (pricingVigencia.getPricingvigenciaId() != null) {
|
||||
fecinicioviaje.setValue(pricingVigencia.getFecinicioviaje());
|
||||
fecfinviaje.setValue(pricingVigencia.getFecfinviaje());
|
||||
fecinicioventa.setValue(pricingVigencia.getFecinicioventa());
|
||||
fecfinventa.setValue(pricingVigencia.getFecfinventa());
|
||||
}
|
||||
}
|
||||
|
||||
public void onChange$fecfinviaje(Event ev) throws Exception {
|
||||
fecfinventa.setValue(fecfinviaje.getValue());
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarVigencia(Event ev) throws Exception {
|
||||
fecinicioviaje.getValue();
|
||||
fecfinviaje.getValue();
|
||||
fecinicioventa.getValue();
|
||||
fecfinventa.getValue();
|
||||
|
||||
if (fecinicioviaje.getValue().after(fecfinviaje.getValue())) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.fechaViaje"),
|
||||
Labels.getLabel("editarPricingController.windowVigencia.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (fecinicioventa.getValue().after(fecfinventa.getValue())) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.fechaVenta"),
|
||||
Labels.getLabel("editarPricingController.windowVigencia.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (fecfinventa.getValue().after(fecfinviaje.getValue())) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.datas2"),
|
||||
Labels.getLabel("editarPricingController.windowVigencia.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
try {
|
||||
pricingVigencia.setFecinicioviaje(fecinicioviaje.getValue());
|
||||
pricingVigencia.setFecfinviaje(fecfinviaje.getValue());
|
||||
pricingVigencia.setFecinicioventa(fecinicioventa.getValue());
|
||||
pricingVigencia.setFecfinventa(fecfinventa.getValue());
|
||||
|
||||
pricingVigencia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingVigencia.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingVigencia.setActivo(GP_Pricing.ATIVO);
|
||||
|
||||
Date inicio = pricingVigencia.getFecinicioviaje();
|
||||
Date fim = pricingVigencia.getFecfinviaje();
|
||||
|
||||
Boolean podeSalvar = pricingVigenciaService.podeSalvar(pricing, pricingVigencia, inicio, fim);
|
||||
if (pricingVigencia.getPricingvigenciaId() != null) {
|
||||
if (podeSalvar) {
|
||||
pricingVigenciaService.actualizacion(pricingVigencia);
|
||||
pricingVigenciaList.updateItem(pricingVigencia);
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Registro.Existe"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} else {
|
||||
if (podeSalvar) {
|
||||
pricingVigenciaService.suscribir(pricingVigencia);
|
||||
pricingVigenciaList.addItemNovo(pricingVigencia);
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.vigenciaExiste"),
|
||||
Labels.getLabel("editarPricingController.windowCategoria.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("Erro ao adicionar pricing vigencia: " + ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverVigencia(Event ev) {
|
||||
try {
|
||||
GP_PricingVigencia pVigencia = (GP_PricingVigencia) pricingVigenciaList.getSelected();
|
||||
if (pVigencia != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaVigencia"),
|
||||
Labels.getLabel("editarPricingController.windowVigencia.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingVigencia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingVigencia.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingVigencia.setActivo(GP_Pricing.INATIVO);
|
||||
|
||||
pricingVigenciaList.removeItem(pricingVigencia);
|
||||
pricingVigenciaService.borrar(pricingVigencia);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowVigencia.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public Datebox getFecfinventa() {
|
||||
return fecfinventa;
|
||||
}
|
||||
|
||||
public void setFecfinventa(Datebox fecfinventa) {
|
||||
this.fecfinventa = fecfinventa;
|
||||
}
|
||||
|
||||
public Datebox getFecfinviaje() {
|
||||
return fecfinviaje;
|
||||
}
|
||||
|
||||
public void setFecfinviaje(Datebox fecfinviaje) {
|
||||
this.fecfinviaje = fecfinviaje;
|
||||
}
|
||||
|
||||
public Datebox getFecinicioventa() {
|
||||
return fecinicioventa;
|
||||
}
|
||||
|
||||
public void setFecinicioventa(Datebox fecinicioventa) {
|
||||
this.fecinicioventa = fecinicioventa;
|
||||
}
|
||||
|
||||
public Datebox getFecinicioviaje() {
|
||||
return fecinicioviaje;
|
||||
}
|
||||
|
||||
public void setFecinicioviaje(Datebox fecinicioviaje) {
|
||||
this.fecinicioviaje = fecinicioviaje;
|
||||
}
|
||||
|
||||
public GP_PricingVigencia getPricingVigencia() {
|
||||
return pricingVigencia;
|
||||
}
|
||||
|
||||
public void setPricingVigencia(GP_PricingVigencia pricingVigencia) {
|
||||
this.pricingVigencia = pricingVigencia;
|
||||
}
|
||||
|
||||
public MyListbox getPricingVigenciaList() {
|
||||
return pricingVigenciaList;
|
||||
}
|
||||
|
||||
public void setPricingVigenciaList(MyListbox pricingVigenciaList) {
|
||||
this.pricingVigenciaList = pricingVigenciaList;
|
||||
}
|
||||
|
||||
public GP_PricingVigenciaService getPricingVigenciaService() {
|
||||
return pricingVigenciaService;
|
||||
}
|
||||
|
||||
public void setPricingVigenciaService(GP_PricingVigenciaService pricingVigenciaService) {
|
||||
this.pricingVigenciaService = pricingVigenciaService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,781 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gestaopricing;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
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.zkplus.databind.BindingListModelList;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Window;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Constante;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingGestao;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PricingColorVO;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PricingGestaoAlteradoVO;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PricingGestaoVO;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingGestaoService;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.service.impl.GP_GestaoPricingService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
|
||||
@Controller("gestaoPricingController")
|
||||
@Scope("prototype")
|
||||
public class GestaoPricingController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private GP_PricingService pricingService;
|
||||
@Autowired
|
||||
private GP_PricingGestaoService pricingGestaoService;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
|
||||
private Paging pagingPricing;
|
||||
private List<GP_Pricing> lsPricing;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private List<Ruta> lsRuta;
|
||||
private Combobox cmbEmpresa;
|
||||
private Datebox fechaInicio;
|
||||
private Datebox fechaFin;
|
||||
private Datebox fechaSemana;
|
||||
private Intbox numeroSemana;
|
||||
private Combobox cmbRuta;
|
||||
private Combobox cmbOrigen;
|
||||
private Combobox cmbDestino;
|
||||
private Combobox cmbTipoServicio;
|
||||
private List<ClaseServicio> lsClaseServicio;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
@Autowired
|
||||
private ClaseServicioService claseServicioService;
|
||||
@Autowired
|
||||
private GP_GestaoPricingService gestaoService;
|
||||
@Autowired
|
||||
private ConstanteService constanteService;
|
||||
|
||||
private Parada origem;
|
||||
private Parada destino;
|
||||
private Empresa empresa;
|
||||
private ClaseServicio classe;
|
||||
private Ruta ruta;
|
||||
|
||||
private static Logger log = Logger.getLogger(GestaoPricingController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsEmpresa = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsClaseServicio = claseServicioService.obtenerTodos();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (arg.get("color") == null) {
|
||||
arg.put("color", "{}");
|
||||
}
|
||||
|
||||
if (arg.get("origem") != null) {
|
||||
Comboitem co = (Comboitem) arg.get("origem");
|
||||
cmbOrigen.appendChild(co);
|
||||
cmbOrigen.setSelectedItem(co);
|
||||
cmbOrigen.setSelectedIndex(0);
|
||||
}
|
||||
if (arg.get("cmbDestino") != null) {
|
||||
Comboitem co = (Comboitem) arg.get("cmbDestino");
|
||||
cmbDestino.appendChild(co);
|
||||
cmbDestino.setSelectedItem(co);
|
||||
cmbDestino.setSelectedIndex(0);
|
||||
}
|
||||
if (arg.get("cmbEmpresa") != null) {
|
||||
Comboitem co = (Comboitem) arg.get("cmbEmpresa");
|
||||
cmbEmpresa.appendChild(co);
|
||||
cmbEmpresa.setSelectedItem(co);
|
||||
cmbEmpresa.setSelectedIndex(0);
|
||||
}
|
||||
if (arg.get("cmbTipoServicio") != null) {
|
||||
Comboitem co = (Comboitem) arg.get("cmbTipoServicio");
|
||||
cmbTipoServicio.appendChild(co);
|
||||
cmbTipoServicio.setSelectedItem(co);
|
||||
cmbTipoServicio.setSelectedIndex(0);
|
||||
}
|
||||
if (arg.get("cmbRuta") != null) {
|
||||
Comboitem co = (Comboitem) arg.get("cmbRuta");
|
||||
cmbRuta.appendChild(co);
|
||||
cmbRuta.setSelectedItem(co);
|
||||
cmbRuta.setSelectedIndex(0);
|
||||
}
|
||||
if (arg.get("numeroSemana") != null) {
|
||||
numeroSemana.setValue((Integer) arg.get("numeroSemana"));
|
||||
onChange$numeroSemana(null);
|
||||
}
|
||||
|
||||
lsPricing = new ArrayList<GP_Pricing>();
|
||||
|
||||
}
|
||||
|
||||
public void onChange$fechaSemana(Event ev) throws InterruptedException {
|
||||
if (fechaSemana.getValue() != null) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(fechaSemana.getValue());
|
||||
|
||||
numeroSemana.setValue(calendar.get(Calendar.WEEK_OF_YEAR));
|
||||
onChange$numeroSemana(ev);
|
||||
onClick$btnReturn(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void onChange$cmbRuta(Event ev) throws InterruptedException {
|
||||
Ruta ruta = (Ruta) (cmbRuta.getSelectedItem() != null ? cmbRuta.getSelectedItem().getValue() : null);
|
||||
if (ruta != null) {
|
||||
ClaseServicio cs = claseServicioService.obtenerID(ruta.getClaseServicio().getClaseservicioId());
|
||||
lsClaseServicio.clear();
|
||||
lsClaseServicio.add(cs);
|
||||
BindingListModelList l = new BindingListModelList(lsClaseServicio, true);
|
||||
cmbTipoServicio.setModel(l);
|
||||
cmbTipoServicio.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onChange$numeroSemana(Event ev) throws InterruptedException {
|
||||
if (numeroSemana.getValue() != null) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
calendar.setFirstDayOfWeek(Calendar.SUNDAY);
|
||||
calendar.set(Calendar.WEEK_OF_YEAR, numeroSemana.getValue());
|
||||
calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
|
||||
|
||||
fechaInicio.setValue(calendar.getTime());
|
||||
fechaSemana.setValue(calendar.getTime());
|
||||
|
||||
calendar.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
|
||||
|
||||
fechaFin.setValue(calendar.getTime());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onChange$cmbEmpresa(Event ev) throws InterruptedException {
|
||||
|
||||
Empresa empresa = (Empresa) (cmbEmpresa.getSelectedItem() != null ? cmbEmpresa.getSelectedItem().getValue() : null);
|
||||
|
||||
if (empresa != null) {
|
||||
lsRuta = rutaService.obtenerPorEmpresa(empresa);
|
||||
lsRuta.add(rutaService.obtenerID(-1));
|
||||
BindingListModelList l = new BindingListModelList(lsRuta, true);
|
||||
cmbRuta.setModel(l);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
refreshLista();
|
||||
arg.put("tmpJs", arg.get("json"));
|
||||
}
|
||||
|
||||
public void onClick$btnReturn(Event ev) {
|
||||
|
||||
this.closeWindow();
|
||||
|
||||
|
||||
arg.put("origem", cmbOrigen.getSelectedItem());
|
||||
arg.put("cmbDestino", cmbDestino.getSelectedItem());
|
||||
arg.put("cmbEmpresa", cmbEmpresa.getSelectedItem());
|
||||
arg.put("cmbTipoServicio", cmbTipoServicio.getSelectedItem());
|
||||
arg.put("cmbRuta", cmbRuta.getSelectedItem());
|
||||
arg.put("numeroSemana", numeroSemana.getValue());
|
||||
|
||||
if (ev != null) {
|
||||
if (arg.get("tmpJs") != null) {
|
||||
arg.put("json", arg.get("tmpJs"));
|
||||
}
|
||||
|
||||
if (arg.get("color") != null) {
|
||||
arg.put("color", arg.get("color"));
|
||||
}
|
||||
}
|
||||
|
||||
PantallaUtileria.openWindow("/gui/gestao_pricing/gestaoPricing.zul",
|
||||
Labels.getLabel("indexController.mniGestaoPricing.label"), arg, desktop);
|
||||
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
|
||||
Empresa empresa = (Empresa) (cmbEmpresa.getSelectedItem() != null ? cmbEmpresa.getSelectedItem().getValue() : null);
|
||||
Ruta ruta = (Ruta) (cmbRuta.getSelectedItem() != null ? cmbRuta.getSelectedItem().getValue() : null);
|
||||
Parada origen = null;
|
||||
|
||||
if (cmbOrigen.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbOrigen.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
origen = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
origen = (Parada) cmbOrigen.getSelectedItem().getValue();
|
||||
}
|
||||
Parada destino = null;
|
||||
if (cmbDestino.getSelectedItem() == null) {
|
||||
List<Parada> lsParadaOri = paradaService.buscar(cmbDestino.getText().toUpperCase());
|
||||
if (!lsParadaOri.isEmpty()) {
|
||||
destino = lsParadaOri.get(0);
|
||||
}
|
||||
} else {
|
||||
destino = (Parada) cmbDestino.getSelectedItem().getValue();
|
||||
}
|
||||
|
||||
if (origen == null || destino == null) {
|
||||
try {
|
||||
Messagebox.show("É necessário preencher origem e destino.", Labels
|
||||
.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
ClaseServicio claseServicio = (ClaseServicio) (cmbTipoServicio.getSelectedItem() != null ? cmbTipoServicio.getSelectedItem().getValue() : null);
|
||||
|
||||
Calendar dataInicio = Calendar.getInstance();
|
||||
Calendar dataFinal = Calendar.getInstance();
|
||||
if ((fechaInicio.getValue() != null) && (fechaFin.getValue() != null)) {
|
||||
dataInicio.setTime(fechaInicio.getValue());
|
||||
dataInicio.set(Calendar.HOUR_OF_DAY, 0);
|
||||
dataInicio.set(Calendar.MINUTE, 0);
|
||||
dataInicio.set(Calendar.SECOND, 0);
|
||||
dataInicio.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
dataFinal.setTime(fechaFin.getValue());
|
||||
dataFinal.set(Calendar.HOUR_OF_DAY, 23);
|
||||
dataFinal.set(Calendar.MINUTE, 59);
|
||||
dataFinal.set(Calendar.SECOND, 59);
|
||||
dataFinal.set(Calendar.MILLISECOND, 999);
|
||||
} else {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("gestaoPricing.SelecionarDatas.msg"), Labels
|
||||
.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
List<String> empresas = new ArrayList<String>();
|
||||
for (Empresa emp : UsuarioLogado.getUsuarioLogado().getEmpresa()) {
|
||||
empresas.add(emp.getEmpresaId().toString());
|
||||
}
|
||||
|
||||
Map<String, Object> params = new LinkedHashMap<String, Object>();
|
||||
params.put("listEmpresaId", empresas.toString().replace(" ","").replace("[","").replace("]","") +",");
|
||||
params.put("unaFecCorrida", DateUtil.getStringDate(dataInicio.getTime()));
|
||||
params.put("embarcada", false);
|
||||
params.put("funcion", false);
|
||||
params.put("verificaBPe", false);
|
||||
params.put("esViajeRedondo", false);
|
||||
params.put("unPuntoVenta_id", UsuarioLogado.getUsuarioLogado().getUsuarioUbicacionActivoList().iterator().next().getPuntoVenta().getPuntoventaId());
|
||||
params.put("usuarioId", UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
params.put("unTipoVenta_id", "1");
|
||||
params.put("unaHoraCorrida", "00:01");
|
||||
params.put("origemId", origen.getParadaId());
|
||||
params.put("unOrigen_id", origen.getParadaId());
|
||||
params.put("destinoId", destino.getParadaId());
|
||||
params.put("unDestino_id", destino.getParadaId());
|
||||
|
||||
if (empresa != null) {
|
||||
params.put("listEmpresaId", empresa.getEmpresaId());
|
||||
}
|
||||
|
||||
if (claseServicio != null) {
|
||||
params.put("unaClaseServicio_id", claseServicio.getClaseservicioId());
|
||||
}
|
||||
if (ruta != null) {
|
||||
params.put("rutaId", ruta.getRutaId());
|
||||
}
|
||||
if (claseServicio != null) {
|
||||
params.put("classeId", claseServicio.getClaseservicioId());
|
||||
}
|
||||
|
||||
params.put("dtInicio", dataInicio.getTimeInMillis());
|
||||
params.put("dtFim", dataFinal.getTimeInMillis());
|
||||
|
||||
Constante constante = constanteService.buscarPorNomeConstante("URL_TOTALBUS_SERVIDOR");
|
||||
|
||||
if(constante == null){
|
||||
try {
|
||||
Messagebox.show("É necessário configurar a URL do servidor.", Labels
|
||||
.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String json = retornaJs(constante.getValorconstante() + "/VentaBoletosServidor/Boleto/VerificarPricing.do?", params);
|
||||
|
||||
log.info(json);
|
||||
|
||||
try {
|
||||
JsonParser parser = new JsonParser();
|
||||
parser.parse(json);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels
|
||||
.getLabel("busquedaPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException e1) {
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Gson gson = new Gson();
|
||||
List<PricingGestaoVO> listPricingGestaoVO = new ArrayList<PricingGestaoVO>();
|
||||
List<PricingColorVO> listPricingColorVO = new ArrayList<PricingColorVO>();
|
||||
|
||||
List<GP_Pricing> pricings = pricingService.obtenerTodos();
|
||||
|
||||
for (GP_Pricing gp_Pricing : pricings) {
|
||||
if (gp_Pricing.getIndSobreposicao() != null && !gp_Pricing.getIndSobreposicao() && StringUtils.isNotBlank(gp_Pricing.getNombPricing())) {
|
||||
PricingColorVO vo = new PricingColorVO();
|
||||
vo.setId(gp_Pricing.getNombPricing());
|
||||
vo.setIdBanco(gp_Pricing.getPricingId().toString());
|
||||
vo.setColor("white");
|
||||
vo.setBackgroundColor(gp_Pricing.getColor());
|
||||
listPricingColorVO.add(vo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
do {
|
||||
PricingColorVO vo = new PricingColorVO();
|
||||
vo.setId("Vazio");
|
||||
vo.setColor("white");
|
||||
vo.setBackgroundColor("white");
|
||||
listPricingColorVO.add(vo);
|
||||
} while (listPricingColorVO.size() < 15);
|
||||
|
||||
if (json.equals("[]")) {
|
||||
do {
|
||||
PricingGestaoVO servico = new PricingGestaoVO();
|
||||
servico.setServico("");
|
||||
servico.setDomingo("");
|
||||
servico.setSegunda("");
|
||||
servico.setTerca("");
|
||||
servico.setQuarta("");
|
||||
servico.setQuinta("");
|
||||
servico.setSexta("");
|
||||
servico.setSabado("");
|
||||
listPricingGestaoVO.add(servico);
|
||||
} while (listPricingGestaoVO.size() < 15);
|
||||
|
||||
json = gson.toJson(listPricingGestaoVO);
|
||||
}
|
||||
|
||||
String color = gson.toJson(listPricingColorVO);
|
||||
|
||||
arg.put("origem", cmbOrigen.getSelectedItem());
|
||||
arg.put("cmbDestino", cmbDestino.getSelectedItem());
|
||||
arg.put("cmbEmpresa", cmbEmpresa.getSelectedItem());
|
||||
arg.put("cmbTipoServicio", cmbTipoServicio.getSelectedItem());
|
||||
arg.put("cmbRuta", cmbRuta.getSelectedItem());
|
||||
arg.put("numeroSemana", numeroSemana.getValue());
|
||||
|
||||
this.closeWindow();
|
||||
|
||||
arg.put("json", json);
|
||||
arg.put("color", color);
|
||||
|
||||
PantallaUtileria.openWindow("/gui/gestao_pricing/gestaoPricing.zul",
|
||||
Labels.getLabel("indexController.mniGestaoPricing.label"), arg, desktop);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void onCreateWindow(Event evt) {
|
||||
|
||||
Window window = (Window) evt.getTarget();
|
||||
|
||||
if (window.getId().equals("winGestaoPricing")) {
|
||||
window.addEventListener("onNotifyServer", this);
|
||||
window.addEventListener("onLoad", this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(Event evt) throws Exception {
|
||||
super.onEvent(evt);
|
||||
if (evt.getName().equals("onNotifyServer")) {
|
||||
serverNotified(evt);
|
||||
}
|
||||
}
|
||||
|
||||
private void serverNotified(Event evt) {
|
||||
|
||||
try {
|
||||
int resp = Messagebox.show(
|
||||
"Salvar os cenários inseridos ?",
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
|
||||
Gson gson = new Gson();
|
||||
Type typePricingGestaoVO = new TypeToken<ArrayList<PricingGestaoVO>>() {
|
||||
}.getType();
|
||||
Type typePricingColorVO = new TypeToken<ArrayList<PricingColorVO>>() {
|
||||
}.getType();
|
||||
|
||||
String json = (String) arg.get("json");
|
||||
String cores = (String) arg.get("color");
|
||||
List<PricingGestaoVO> pricingGestaoVOOld = gson.fromJson(json, typePricingGestaoVO);
|
||||
List<PricingColorVO> pricingCores = gson.fromJson(cores, typePricingColorVO);
|
||||
Object[] data = (Object[]) evt.getData();
|
||||
List<PricingGestaoAlteradoVO> listPricingGestaoVO = new ArrayList<PricingGestaoAlteradoVO>();
|
||||
Date inicio = DateUtil.normalizar(fechaInicio.getValue());
|
||||
for (int i = 1; i < data.length; i++) {
|
||||
PricingGestaoVO pricingOld = pricingGestaoVOOld.get(i);
|
||||
PricingGestaoVO pricingGestaoVO = gson.fromJson(data[i].toString(), PricingGestaoVO.class);
|
||||
|
||||
if (!pricingOld.getDomingo().equals(pricingGestaoVO.getDomingo())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getDomingo());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(inicio);
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getSegunda().equals(pricingGestaoVO.getSegunda())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getSegunda());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 1));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getTerca().equals(pricingGestaoVO.getTerca())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getTerca());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 2));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getQuarta().equals(pricingGestaoVO.getQuarta())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getQuarta());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 3));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getQuinta().equals(pricingGestaoVO.getQuinta())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getQuinta());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 4));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getSexta().equals(pricingGestaoVO.getSexta())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getSexta());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 5));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
if (!pricingOld.getSabado().equals(pricingGestaoVO.getSabado())) {
|
||||
PricingGestaoAlteradoVO alterado = new PricingGestaoAlteradoVO();
|
||||
alterado.setPricing(pricingGestaoVO.getSabado());
|
||||
alterado.setServico(pricingGestaoVO.getServico());
|
||||
alterado.setData(DateUtil.somarDias(inicio, 6));
|
||||
listPricingGestaoVO.add(alterado);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (PricingGestaoAlteradoVO pricingGestaoAlteradoVO : listPricingGestaoVO) {
|
||||
|
||||
for (PricingColorVO cor : pricingCores) {
|
||||
if (cor != null && cor.getId() != null && cor.getId().equals(pricingGestaoAlteradoVO.getPricing())) {
|
||||
pricingGestaoAlteradoVO.setId(cor.getIdBanco());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (PricingGestaoAlteradoVO pricingGestaoAlteradoVO : listPricingGestaoVO) {
|
||||
|
||||
boolean isPricingAtivo = true;
|
||||
|
||||
GP_Pricing pricingOld = pricingService.obtenerID(Integer.valueOf(pricingGestaoAlteradoVO.getId()));
|
||||
GP_Pricing pricingNew = pricingService.clonarGP_Pricing(Integer.valueOf(pricingGestaoAlteradoVO.getId()), pricingOld.getNombPricing() , ApplicationProperties.getInstance().isCustomHabilitado(CustomEnum.USA_PADRAO_PRICING_TIPO_PASSAGEM_PET.getDescricao()), isPricingAtivo);
|
||||
pricingNew.setColor(pricingOld.getColor());
|
||||
pricingNew.setIndGestao(true);
|
||||
|
||||
GP_PricingGestao gestao = new GP_PricingGestao();
|
||||
gestao.setCorridaId(Integer.valueOf(pricingGestaoAlteradoVO.getServico()));
|
||||
gestao.setFeccorrida(DateUtil.normalizarToFecha(pricingGestaoAlteradoVO.getData()));
|
||||
gestao.setFecmodif(Calendar.getInstance().getTime());
|
||||
gestao.setPricing(pricingNew);
|
||||
gestao.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
pricingGestaoService.suscribir(gestao);
|
||||
|
||||
pricingService.actualizacion(pricingNew);
|
||||
}
|
||||
|
||||
Messagebox.show(
|
||||
"Os cenários foram adicionados com sucesso.",
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
arg.put("tmpJs", null);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String retornaJs(String URL, Map<String, Object> params) {
|
||||
try {
|
||||
|
||||
StringBuilder postData = new StringBuilder();
|
||||
for (Map.Entry<String, Object> param : params.entrySet()) {
|
||||
if (postData.length() != 0)
|
||||
postData.append('&');
|
||||
postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
|
||||
postData.append('=');
|
||||
postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));
|
||||
}
|
||||
|
||||
URL url = new URL(URL + postData.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setRequestProperty("Accept", "application/json");
|
||||
|
||||
if (conn.getResponseCode() != 200) {
|
||||
throw new RuntimeException("Failed : HTTP error code : "
|
||||
+ conn.getResponseCode());
|
||||
}
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(
|
||||
(conn.getInputStream())));
|
||||
|
||||
String output;
|
||||
StringBuilder retorno = new StringBuilder();
|
||||
while ((output = br.readLine()) != null) {
|
||||
retorno.append(output);
|
||||
log.info(output);
|
||||
}
|
||||
|
||||
conn.disconnect();
|
||||
|
||||
return retorno.toString();
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
|
||||
log.error("", e);
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
log.error("", e);
|
||||
|
||||
}
|
||||
return "{}";
|
||||
}
|
||||
|
||||
public List<ClaseServicio> getLsClaseServicio() {
|
||||
return lsClaseServicio;
|
||||
}
|
||||
|
||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||
this.lsClaseServicio = lsClaseServicio;
|
||||
}
|
||||
|
||||
public ClaseServicioService getClaseServicioService() {
|
||||
return claseServicioService;
|
||||
}
|
||||
|
||||
public void setClaseServicioService(ClaseServicioService claseServicioService) {
|
||||
this.claseServicioService = claseServicioService;
|
||||
}
|
||||
|
||||
public List<GP_Pricing> getLsPricing() {
|
||||
return lsPricing;
|
||||
}
|
||||
|
||||
public void setLsPricing(List<GP_Pricing> lsPricing) {
|
||||
this.lsPricing = lsPricing;
|
||||
}
|
||||
|
||||
public Paging getPagingPricing() {
|
||||
return pagingPricing;
|
||||
}
|
||||
|
||||
public void setPagingPricing(Paging pagingPricing) {
|
||||
this.pagingPricing = pagingPricing;
|
||||
}
|
||||
|
||||
public GP_PricingService getPricingService() {
|
||||
return pricingService;
|
||||
}
|
||||
|
||||
public void setPricingService(GP_PricingService pricingService) {
|
||||
this.pricingService = pricingService;
|
||||
}
|
||||
|
||||
public EmpresaService getEmpresaService() {
|
||||
return empresaService;
|
||||
}
|
||||
|
||||
public void setEmpresaService(EmpresaService empresaService) {
|
||||
this.empresaService = empresaService;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public Datebox getFechaInicio() {
|
||||
return fechaInicio;
|
||||
}
|
||||
|
||||
public void setFechaInicio(Datebox fechaInicio) {
|
||||
this.fechaInicio = fechaInicio;
|
||||
}
|
||||
|
||||
public Datebox getFechaFin() {
|
||||
return fechaFin;
|
||||
}
|
||||
|
||||
public void setFechaFin(Datebox fechaFin) {
|
||||
this.fechaFin = fechaFin;
|
||||
}
|
||||
|
||||
public RutaService getRutaService() {
|
||||
return rutaService;
|
||||
}
|
||||
|
||||
public void setRutaService(RutaService rutaService) {
|
||||
this.rutaService = rutaService;
|
||||
}
|
||||
|
||||
public List<Ruta> getLsRuta() {
|
||||
return lsRuta;
|
||||
}
|
||||
|
||||
public void setLsRuta(List<Ruta> lsRuta) {
|
||||
this.lsRuta = lsRuta;
|
||||
}
|
||||
|
||||
public Combobox getCmbRuta() {
|
||||
return cmbRuta;
|
||||
}
|
||||
|
||||
public void setCmbRuta(Combobox cmbRuta) {
|
||||
this.cmbRuta = cmbRuta;
|
||||
}
|
||||
|
||||
public Datebox getFechaSemana() {
|
||||
return fechaSemana;
|
||||
}
|
||||
|
||||
public void setFechaSemana(Datebox fechaSemana) {
|
||||
this.fechaSemana = fechaSemana;
|
||||
}
|
||||
|
||||
public Intbox getNumeroSemana() {
|
||||
return numeroSemana;
|
||||
}
|
||||
|
||||
public void setNumeroSemana(Intbox numeroSemana) {
|
||||
this.numeroSemana = numeroSemana;
|
||||
}
|
||||
|
||||
public Parada getOrigem() {
|
||||
return origem;
|
||||
}
|
||||
|
||||
public void setOrigem(Parada origem) {
|
||||
this.origem = origem;
|
||||
}
|
||||
|
||||
public Parada getDestino() {
|
||||
return destino;
|
||||
}
|
||||
|
||||
public void setDestino(Parada destino) {
|
||||
this.destino = destino;
|
||||
}
|
||||
|
||||
public Empresa getEmpresa() {
|
||||
return empresa;
|
||||
}
|
||||
|
||||
public void setEmpresa(Empresa empresa) {
|
||||
this.empresa = empresa;
|
||||
}
|
||||
|
||||
public ClaseServicio getClasse() {
|
||||
return classe;
|
||||
}
|
||||
|
||||
public void setClasse(ClaseServicio classe) {
|
||||
this.classe = classe;
|
||||
}
|
||||
|
||||
public Ruta getRuta() {
|
||||
return ruta;
|
||||
}
|
||||
|
||||
public void setRuta(Ruta ruta) {
|
||||
this.ruta = ruta;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuPricing2 extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuPricing2() {
|
||||
super("indexController.mniPricing2.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return ConstantesFuncionSistema.CLAVE_GESTAO_PRICING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/gestao_pricing/busquedaGP_Pricing.zul",
|
||||
Labels.getLabel("busquedaGPPricingController.window.title"), getArgs(), desktop);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuPricingEspecifico2 extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuPricingEspecifico2() {
|
||||
super("indexController.mniPricingEspecifico2.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return ConstantesFuncionSistema.CLAVE_GESTAO_PRICING_ESPECIFICO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/gestao_pricing/busquedaGP_PricingEspecifico.zul",
|
||||
Labels.getLabel("busqueDaGPPricingEspecifico.window.title"), getArgs(), desktop);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zk.ui.UiException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PricingGestaoVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuPricingGestao extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuPricingGestao() {
|
||||
super("indexController.mniGestaoPricing.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return ConstantesFuncionSistema.CLAVE_TELA_GESTAO_PRICING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
|
||||
try {
|
||||
Map map = getArgs();
|
||||
|
||||
List<PricingGestaoVO> tmpGestao = new ArrayList<PricingGestaoVO>();
|
||||
PricingGestaoVO servico1 = new PricingGestaoVO();
|
||||
servico1.setServico("");
|
||||
servico1.setDomingo("");
|
||||
servico1.setSegunda("");
|
||||
servico1.setTerca("");
|
||||
servico1.setQuarta("");
|
||||
servico1.setQuinta("");
|
||||
servico1.setSexta("");
|
||||
servico1.setSabado("");
|
||||
tmpGestao.add(servico1);
|
||||
|
||||
Gson gson = new Gson();
|
||||
|
||||
String dados = gson.toJson(tmpGestao);
|
||||
|
||||
map.put("json", dados);
|
||||
map.put("color", "{}");
|
||||
|
||||
PantallaUtileria.openWindow("/gui/gestao_pricing/gestaoPricing.zul",
|
||||
Labels.getLabel("indexController.mniGestaoPricing.label"), map, desktop);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw UiException.Aide.wrap(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class MenuGestaoDePricing extends DefaultItemMenuSistema {
|
||||
|
||||
public MenuGestaoDePricing() {
|
||||
super("indexController.mnGestaoDePricing.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return ConstantesFuncionSistema.CLAVE_MENU_GESTAO_PRICING;
|
||||
}
|
||||
|
||||
}
|
|
@ -143,6 +143,10 @@ pricing.especifico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.pricin
|
|||
pricing.modificacionMassivaEspecifico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.pricing.ItemMenuModificacionMassivaPricingEspecifico
|
||||
pricing.classeTarifaria=com.rjconsultores.ventaboletos.web.utilerias.menu.item.pricing.ItemMenuPricingClasseTarifaria
|
||||
pricing.relatorioEspecifico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.pricing.ItemMenuRelatorioPricingEspecifico
|
||||
pricing.gestaoDePricing=com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing.MenuGestaoDePricing
|
||||
pricing.gestaoDePricing.especifico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing.ItemMenuPricingEspecifico2
|
||||
pricing.gestaoDePricing.pricing=com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing.ItemMenuPricing2
|
||||
pricing.gestaoDePricing.gestaoPricing=com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing.ItemMenuPricingGestao
|
||||
ingresosExtras=com.rjconsultores.ventaboletos.web.utilerias.menu.item.ingreso.MenuIngreso
|
||||
ingresosExtras.ingreso=com.rjconsultores.ventaboletos.web.utilerias.menu.item.ingreso.ItemMenuIngreso
|
||||
analitico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.MenuAnalitico
|
||||
|
|
|
@ -11,8 +11,11 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingVigencia;
|
||||
import com.rjconsultores.ventaboletos.service.GP_PricingService;
|
||||
import com.rjconsultores.ventaboletos.service.PricingService;
|
||||
|
||||
/**
|
||||
|
@ -22,50 +25,98 @@ import com.rjconsultores.ventaboletos.service.PricingService;
|
|||
public class RenderPricing implements ListitemRenderer {
|
||||
|
||||
private PricingService pricingService = (PricingService) SpringUtil.getBean("pricingService");
|
||||
private GP_PricingService gp_pricingService = (GP_PricingService) SpringUtil.getBean("gp_pricingService");
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
Pricing p = (Pricing) o;
|
||||
p = pricingService.obtenerID(p.getPricingId());
|
||||
if(o instanceof Pricing ) {
|
||||
Pricing p = (Pricing) o;
|
||||
p = pricingService.obtenerID(p.getPricingId());
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (p.getNombPricing() != null) {
|
||||
|
||||
if (p.getPricingId() != null) {
|
||||
lc = new Listcell(p.getPricingId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (p.getNombPricing() != null) {
|
||||
lc = new Listcell(p.getNombPricing());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (p.getEmpresa() != null) {
|
||||
lc = new Listcell(p.getEmpresa().getNombempresa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Integer pricingInativoAtivo = p.getActivo();
|
||||
SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
if (!p.getPricingVigenciaList().isEmpty()) {
|
||||
String data = "";
|
||||
for (PricingVigencia pv : p.getPricingVigenciaList()) {
|
||||
data = data + dt.format(pv.getFecinicioviaje()) + " a " + dt.format(pv.getFecfinviaje()) + " ou ";
|
||||
if (p.getPricingId() != null) {
|
||||
lc = new Listcell(p.getPricingId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
data = data.substring(0, data.length() - 3);
|
||||
lc = new Listcell(data);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (p.getNombPricing() != null) {
|
||||
lc = new Listcell(p.getNombPricing());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (p.getEmpresa() != null) {
|
||||
lc = new Listcell(p.getEmpresa().getNombempresa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Integer pricingInativoAtivo = p.getActivo();
|
||||
SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
if (!p.getPricingVigenciaList().isEmpty()) {
|
||||
String data = "";
|
||||
for (PricingVigencia pv : p.getPricingVigenciaList()) {
|
||||
data = data + dt.format(pv.getFecinicioviaje()) + " a " + dt.format(pv.getFecfinviaje()) + " ou ";
|
||||
}
|
||||
data = data.substring(0, data.length() - 3);
|
||||
lc = new Listcell(data);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
lstm.setAttribute("data", p);
|
||||
} else {
|
||||
GP_Pricing p = (GP_Pricing) o;
|
||||
p = gp_pricingService.obtenerID(p.getPricingId());
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (p.getNombPricing() != null) {
|
||||
|
||||
if (p.getPricingId() != null) {
|
||||
lc = new Listcell(p.getPricingId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (p.getNombPricing() != null) {
|
||||
lc = new Listcell(p.getNombPricing());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (p.getEmpresa() != null) {
|
||||
lc = new Listcell(p.getEmpresa().getNombempresa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Integer pricingInativoAtivo = p.getActivo();
|
||||
SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
if (!p.getPricingVigenciaList().isEmpty()) {
|
||||
String data = "";
|
||||
for (GP_PricingVigencia pv : p.getPricingVigenciaList()) {
|
||||
data = data + dt.format(pv.getFecinicioviaje()) + " a " + dt.format(pv.getFecfinviaje()) + " ou ";
|
||||
}
|
||||
data = data.substring(0, data.length() - 3);
|
||||
lc = new Listcell(data);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
lstm.setAttribute("data", p);
|
||||
}
|
||||
lstm.setAttribute("data", p);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,25 +4,39 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoAgencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoAgencia;
|
||||
|
||||
public class RenderPricingAgencia implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingEspecificoAgencia pea = (PricingEspecificoAgencia) o;
|
||||
if(o instanceof PricingEspecificoAgencia) {
|
||||
PricingEspecificoAgencia pea = (PricingEspecificoAgencia) o;
|
||||
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getPuntoVenta().getPuntoventaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getPuntoVenta().getNombpuntoventa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
} else {
|
||||
GP_PricingEspecificoAgencia pea = (GP_PricingEspecificoAgencia) o;
|
||||
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getPuntoVenta().getPuntoventaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getPuntoVenta().getNombpuntoventa().toString());
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getPuntoVenta().getPuntoventaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getPuntoVenta().getNombpuntoventa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAsiento;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingAsiento;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAsiento;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -16,16 +18,30 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingAsiento implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingAsiento pa = (PricingAsiento) o;
|
||||
if(o instanceof PricingAsiento) {
|
||||
PricingAsiento pa = (PricingAsiento) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pa.getNumeasiento());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pa.getNumeasiento());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pa.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pa.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pa);
|
||||
lstm.setAttribute("data", pa);
|
||||
} else {
|
||||
GP_PricingAsiento pa = (GP_PricingAsiento) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pa.getNumeasiento());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pa.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,24 +4,38 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCanalVendas;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoCanalVendas;
|
||||
|
||||
public class RenderPricingCanal implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingEspecificoCanalVendas pea = (PricingEspecificoCanalVendas) o;
|
||||
if(o instanceof PricingEspecificoCanalVendas) {
|
||||
PricingEspecificoCanalVendas pea = (PricingEspecificoCanalVendas) o;
|
||||
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getTipoPtovta().getTipoptovtaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getTipoPtovta().getDesctipo().toString());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
GP_PricingEspecificoCanalVendas pea = (GP_PricingEspecificoCanalVendas) o;
|
||||
|
||||
if (!pea.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getTipoPtovta().getTipoptovtaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getTipoPtovta().getDesctipo().toString());
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pea.getTipoPtovta().getTipoptovtaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pea.getTipoPtovta().getDesctipo().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingCategoria;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingCategoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingCategoria;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -16,17 +18,32 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingCategoria implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingCategoria pc = (PricingCategoria) o;
|
||||
if(o instanceof PricingCategoria) {
|
||||
PricingCategoria pc = (PricingCategoria) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getCategoria() != null) {
|
||||
lc = new Listcell(pc.getCategoria().getDesccategoria());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pc.getCategoria() != null) {
|
||||
lc = new Listcell(pc.getCategoria().getDesccategoria());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
GP_PricingCategoria pc = (GP_PricingCategoria) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getCategoria() != null) {
|
||||
lc = new Listcell(pc.getCategoria().getDesccategoria());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingClase;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingClase;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingClase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -16,17 +18,32 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingClase implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingClase pc = (PricingClase) o;
|
||||
if( o instanceof PricingClase) {
|
||||
PricingClase pc = (PricingClase) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getClaseServicio() != null) {
|
||||
lc = new Listcell(pc.getClaseServicio().getDescclase());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pc.getClaseServicio() != null) {
|
||||
lc = new Listcell(pc.getClaseServicio().getDescclase());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
GP_PricingClase pc = (GP_PricingClase) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getClaseServicio() != null) {
|
||||
lc = new Listcell(pc.getClaseServicio().getDescclase());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,23 +4,39 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingClasseTarifaria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingClasseTarifaria;
|
||||
|
||||
public class RenderPricingClasseTarifaria implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingClasseTarifaria pct = (PricingClasseTarifaria) o;
|
||||
if( o instanceof PricingClasseTarifaria) {
|
||||
PricingClasseTarifaria pct = (PricingClasseTarifaria) o;
|
||||
|
||||
Listcell lc = new Listcell(pct.getPricingClasseTarifariaId() == null ? "" : pct.getPricingClasseTarifariaId().toString());
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell(pct.getPricingClasseTarifariaId() == null ? "" : pct.getPricingClasseTarifariaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pct.getDescClasseTarifaria() == null ? "" : pct.getDescClasseTarifaria());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pct.getDescClasseTarifaria() == null ? "" : pct.getDescClasseTarifaria());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pct.getSigla() == null ? "" : pct.getSigla());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pct.getSigla() == null ? "" : pct.getSigla());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pct);
|
||||
lstm.setAttribute("data", pct);
|
||||
} else {
|
||||
GP_PricingClasseTarifaria pct = (GP_PricingClasseTarifaria) o;
|
||||
|
||||
Listcell lc = new Listcell(pct.getPricingClasseTarifariaId() == null ? "" : pct.getPricingClasseTarifariaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pct.getDescClasseTarifaria() == null ? "" : pct.getDescClasseTarifaria());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pct.getSigla() == null ? "" : pct.getSigla());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pct);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
|
||||
|
@ -25,46 +26,90 @@ import com.rjconsultores.ventaboletos.service.RutaSecuenciaService;
|
|||
public class RenderPricingCorrida implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingCorrida pc = (PricingCorrida) o;
|
||||
if(o instanceof PricingCorrida) {
|
||||
PricingCorrida pc = (PricingCorrida) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell(pc.getCorridaCtrl().getCorridaId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell(pc.getCorridaCtrl().getCorridaId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell((pc.getCorridaCtrl().getHorario() == null) ? "-" : sf.format(pc.getCorridaCtrl().getHorario()));
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell((pc.getCorridaCtrl().getHorario() == null) ? "-" : sf.format(pc.getCorridaCtrl().getHorario()));
|
||||
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Ruta r = pc.getCorridaCtrl().getRuta();
|
||||
Ruta r = pc.getCorridaCtrl().getRuta();
|
||||
|
||||
RutaSecuenciaService rutaSecuenciaService = (RutaSecuenciaService) SpringUtil.getBean("rutaSecuenciaService");
|
||||
List<RutaSecuencia> rs = rutaSecuenciaService.buscarSecuenciaOrdenado(r);
|
||||
if (rs.size() > 0) {
|
||||
Tramo origem = rs.get(0).getTramo();
|
||||
Tramo destino = rs.get(rs.size() - 1).getTramo();
|
||||
RutaSecuenciaService rutaSecuenciaService = (RutaSecuenciaService) SpringUtil.getBean("rutaSecuenciaService");
|
||||
List<RutaSecuencia> rs = rutaSecuenciaService.buscarSecuenciaOrdenado(r);
|
||||
if (rs.size() > 0) {
|
||||
Tramo origem = rs.get(0).getTramo();
|
||||
Tramo destino = rs.get(rs.size() - 1).getTramo();
|
||||
|
||||
lc = new Listcell(origem.getOrigem().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(destino.getDestino().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
lc = new Listcell(origem.getOrigem().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(destino.getDestino().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
GP_PricingCorrida pc = (GP_PricingCorrida) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell(pc.getCorridaCtrl().getCorridaId().toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getCorridaCtrl() != null) {
|
||||
lc = new Listcell((pc.getCorridaCtrl().getHorario() == null) ? "-" : sf.format(pc.getCorridaCtrl().getHorario()));
|
||||
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Ruta r = pc.getCorridaCtrl().getRuta();
|
||||
|
||||
RutaSecuenciaService rutaSecuenciaService = (RutaSecuenciaService) SpringUtil.getBean("rutaSecuenciaService");
|
||||
List<RutaSecuencia> rs = rutaSecuenciaService.buscarSecuenciaOrdenado(r);
|
||||
if (rs.size() > 0) {
|
||||
Tramo origem = rs.get(0).getTramo();
|
||||
Tramo destino = rs.get(rs.size() - 1).getTramo();
|
||||
|
||||
lc = new Listcell(origem.getOrigem().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(destino.getDestino().getDescparada());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell("");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,16 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingDia;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingDia;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingDia;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -18,125 +21,248 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingDia implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingDia pc = (PricingDia) o;
|
||||
if(o instanceof PricingDia) {
|
||||
PricingDia pc = (PricingDia) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorarioinicio()));
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorarioinicio()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorariofin()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
// Lunes
|
||||
Checkbox ckbLun = new Checkbox();
|
||||
if (pc.getIndlunes() == Boolean.TRUE) {
|
||||
ckbLun.setChecked(true);
|
||||
} else {
|
||||
ckbLun.setChecked(false);
|
||||
}
|
||||
ckbLun.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbLun.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbMar = new Checkbox();
|
||||
if (pc.getIndmartes() == Boolean.TRUE) {
|
||||
ckbMar.setChecked(true);
|
||||
} else {
|
||||
ckbMar.setChecked(false);
|
||||
}
|
||||
ckbMar.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMar.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbMie = new Checkbox();
|
||||
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
||||
ckbMie.setChecked(true);
|
||||
} else {
|
||||
ckbMie.setChecked(false);
|
||||
}
|
||||
ckbMie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbJue = new Checkbox();
|
||||
if (pc.getIndjueves() == Boolean.TRUE) {
|
||||
ckbJue.setChecked(true);
|
||||
} else {
|
||||
ckbJue.setChecked(false);
|
||||
}
|
||||
ckbJue.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbJue.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbVie = new Checkbox();
|
||||
if (pc.getIndviernes() == Boolean.TRUE) {
|
||||
ckbVie.setChecked(true);
|
||||
} else {
|
||||
ckbVie.setChecked(false);
|
||||
}
|
||||
ckbVie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbVie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbSab = new Checkbox();
|
||||
if (pc.getIndsabado() == Boolean.TRUE) {
|
||||
ckbSab.setChecked(true);
|
||||
} else {
|
||||
ckbSab.setChecked(false);
|
||||
}
|
||||
ckbSab.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbSab.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbDom = new Checkbox();
|
||||
if (pc.getInddomingo() == Boolean.TRUE) {
|
||||
ckbDom.setChecked(true);
|
||||
} else {
|
||||
ckbDom.setChecked(false);
|
||||
}
|
||||
ckbDom.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbDom.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbFecventa = new Checkbox();
|
||||
if (pc.getIndfecventa() == Boolean.TRUE) {
|
||||
ckbFecventa.setChecked(true);
|
||||
} else {
|
||||
ckbFecventa.setChecked(false);
|
||||
}
|
||||
ckbFecventa.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecventa.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbFecviaje = new Checkbox();
|
||||
if (pc.getIndfecviaje() == Boolean.TRUE) {
|
||||
ckbFecviaje.setChecked(true);
|
||||
} else {
|
||||
ckbFecviaje.setChecked(false);
|
||||
}
|
||||
ckbFecviaje.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecviaje.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
GP_PricingDia pc = (GP_PricingDia) o;
|
||||
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorariofin()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
// Lunes
|
||||
Checkbox ckbLun = new Checkbox();
|
||||
if (pc.getIndlunes() == Boolean.TRUE) {
|
||||
ckbLun.setChecked(true);
|
||||
} else {
|
||||
ckbLun.setChecked(false);
|
||||
}
|
||||
ckbLun.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbLun.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorarioinicio()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbMar = new Checkbox();
|
||||
if (pc.getIndmartes() == Boolean.TRUE) {
|
||||
ckbMar.setChecked(true);
|
||||
} else {
|
||||
ckbMar.setChecked(false);
|
||||
}
|
||||
ckbMar.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMar.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
if (pc.getPricingdiaId() != null) {
|
||||
lc = new Listcell(sf.format(pc.getHorariofin()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbMie = new Checkbox();
|
||||
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
||||
ckbMie.setChecked(true);
|
||||
} else {
|
||||
ckbMie.setChecked(false);
|
||||
}
|
||||
ckbMie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
// Lunes
|
||||
Checkbox ckbLun = new Checkbox();
|
||||
if (pc.getIndlunes() == Boolean.TRUE) {
|
||||
ckbLun.setChecked(true);
|
||||
} else {
|
||||
ckbLun.setChecked(false);
|
||||
}
|
||||
ckbLun.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbLun.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbJue = new Checkbox();
|
||||
if (pc.getIndjueves() == Boolean.TRUE) {
|
||||
ckbJue.setChecked(true);
|
||||
} else {
|
||||
ckbJue.setChecked(false);
|
||||
}
|
||||
ckbJue.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbJue.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbMar = new Checkbox();
|
||||
if (pc.getIndmartes() == Boolean.TRUE) {
|
||||
ckbMar.setChecked(true);
|
||||
} else {
|
||||
ckbMar.setChecked(false);
|
||||
}
|
||||
ckbMar.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMar.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbVie = new Checkbox();
|
||||
if (pc.getIndviernes() == Boolean.TRUE) {
|
||||
ckbVie.setChecked(true);
|
||||
} else {
|
||||
ckbVie.setChecked(false);
|
||||
}
|
||||
ckbVie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbVie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbMie = new Checkbox();
|
||||
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
||||
ckbMie.setChecked(true);
|
||||
} else {
|
||||
ckbMie.setChecked(false);
|
||||
}
|
||||
ckbMie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbMie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbSab = new Checkbox();
|
||||
if (pc.getIndsabado() == Boolean.TRUE) {
|
||||
ckbSab.setChecked(true);
|
||||
} else {
|
||||
ckbSab.setChecked(false);
|
||||
}
|
||||
ckbSab.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbSab.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbJue = new Checkbox();
|
||||
if (pc.getIndjueves() == Boolean.TRUE) {
|
||||
ckbJue.setChecked(true);
|
||||
} else {
|
||||
ckbJue.setChecked(false);
|
||||
}
|
||||
ckbJue.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbJue.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbDom = new Checkbox();
|
||||
if (pc.getInddomingo() == Boolean.TRUE) {
|
||||
ckbDom.setChecked(true);
|
||||
} else {
|
||||
ckbDom.setChecked(false);
|
||||
}
|
||||
ckbDom.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbDom.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbVie = new Checkbox();
|
||||
if (pc.getIndviernes() == Boolean.TRUE) {
|
||||
ckbVie.setChecked(true);
|
||||
} else {
|
||||
ckbVie.setChecked(false);
|
||||
}
|
||||
ckbVie.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbVie.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbFecventa = new Checkbox();
|
||||
if (pc.getIndfecventa() == Boolean.TRUE) {
|
||||
ckbFecventa.setChecked(true);
|
||||
} else {
|
||||
ckbFecventa.setChecked(false);
|
||||
}
|
||||
ckbFecventa.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecventa.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbSab = new Checkbox();
|
||||
if (pc.getIndsabado() == Boolean.TRUE) {
|
||||
ckbSab.setChecked(true);
|
||||
} else {
|
||||
ckbSab.setChecked(false);
|
||||
}
|
||||
ckbSab.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbSab.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbFecviaje = new Checkbox();
|
||||
if (pc.getIndfecviaje() == Boolean.TRUE) {
|
||||
ckbFecviaje.setChecked(true);
|
||||
} else {
|
||||
ckbFecviaje.setChecked(false);
|
||||
}
|
||||
ckbFecviaje.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecviaje.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
Checkbox ckbDom = new Checkbox();
|
||||
if (pc.getInddomingo() == Boolean.TRUE) {
|
||||
ckbDom.setChecked(true);
|
||||
} else {
|
||||
ckbDom.setChecked(false);
|
||||
}
|
||||
ckbDom.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbDom.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
Checkbox ckbFecventa = new Checkbox();
|
||||
if (pc.getIndfecventa() == Boolean.TRUE) {
|
||||
ckbFecventa.setChecked(true);
|
||||
} else {
|
||||
ckbFecventa.setChecked(false);
|
||||
}
|
||||
ckbFecventa.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecventa.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbFecviaje = new Checkbox();
|
||||
if (pc.getIndfecviaje() == Boolean.TRUE) {
|
||||
ckbFecviaje.setChecked(true);
|
||||
} else {
|
||||
ckbFecviaje.setChecked(false);
|
||||
}
|
||||
ckbFecviaje.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbFecviaje.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,16 +4,17 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoCategoria;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecifico;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoCategoria;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -22,41 +23,79 @@ import org.zkoss.zul.Listcell;
|
|||
public class RenderPricingEspecifico implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingEspecifico pe = (PricingEspecifico) o;
|
||||
if(o instanceof PricingEspecifico ) {
|
||||
PricingEspecifico pe = (PricingEspecifico) o;
|
||||
|
||||
Listcell lc = new Listcell(pe.getPricingespecificoId().toString());
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell(pe.getPricingespecificoId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getNombPricing() == null ? "" : pe.getNombPricing());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pe.getNombPricing() == null ? "" : pe.getNombPricing());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getMarca().getDescmarca());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pe.getMarca().getDescmarca());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getMoneda().getDescmoneda());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pe.getMoneda().getDescmoneda());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(categoriasToString(pe.getPricingEspecificoCategoriaList()));
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(categoriasToString(pe.getPricingEspecificoCategoriaList()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getClaseServicio().getDescclase());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pe.getClaseServicio().getDescclase());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorinicio(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorinicio(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorfin(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorfin(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
Integer corridaId = pe.getCorridaId();
|
||||
if (corridaId != null) {
|
||||
lc = new Listcell(corridaId.toString());
|
||||
Integer corridaId = pe.getCorridaId();
|
||||
if (corridaId != null) {
|
||||
lc = new Listcell(corridaId.toString());
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pe);
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
GP_PricingEspecifico pe = (GP_PricingEspecifico) o;
|
||||
|
||||
lstm.setAttribute("data", pe);
|
||||
Listcell lc = new Listcell(pe.getPricingespecificoId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getNombPricing() == null ? "" : pe.getNombPricing());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getMarca().getDescmarca());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getMoneda().getDescmoneda());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(categoriasToStringGP(pe.getPricingEspecificoCategoriaList()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pe.getClaseServicio().getDescclase());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorinicio(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(DateUtil.getStringDate(pe.getFechorfin(), "dd/MM/yyyy HH:mm"));
|
||||
lc.setParent(lstm);
|
||||
|
||||
Integer corridaId = pe.getCorridaId();
|
||||
if (corridaId != null) {
|
||||
lc = new Listcell(corridaId.toString());
|
||||
} else {
|
||||
lc = new Listcell("");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pe);
|
||||
}
|
||||
}
|
||||
|
||||
private String categoriasToString(List<PricingEspecificoCategoria> pricingEspecificoCategoriaList) {
|
||||
|
@ -67,4 +106,13 @@ public class RenderPricingEspecifico implements ListitemRenderer {
|
|||
}
|
||||
return result.isEmpty() ? "" : result.substring(0, result.length() - 1);
|
||||
}
|
||||
|
||||
private String categoriasToStringGP(List<GP_PricingEspecificoCategoria> pricingEspecificoCategoriaList) {
|
||||
String result = "";
|
||||
|
||||
for (GP_PricingEspecificoCategoria p : pricingEspecificoCategoriaList) {
|
||||
result += p.getCategoria().getDesccategoria() + "-";
|
||||
}
|
||||
return result.isEmpty() ? "" : result.substring(0, result.length() - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,23 +4,38 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoCategoria;
|
||||
|
||||
public class RenderPricingEspecificoCategoria implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingEspecificoCategoria pec = (PricingEspecificoCategoria) o;
|
||||
if(o instanceof PricingEspecificoCategoria) {
|
||||
PricingEspecificoCategoria pec = (PricingEspecificoCategoria) o;
|
||||
|
||||
if (!pec.getActivo()) {
|
||||
return;
|
||||
if (!pec.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pec.getCategoria().getCategoriaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pec.getCategoria().getDesccategoria());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
GP_PricingEspecificoCategoria pec = (GP_PricingEspecificoCategoria) o;
|
||||
|
||||
if (!pec.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pec.getCategoria().getCategoriaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pec.getCategoria().getDesccategoria());
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(pec.getCategoria().getCategoriaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pec.getCategoria().getDesccategoria());
|
||||
lc.setParent(lstm);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,29 +4,50 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoOcupacion;
|
||||
|
||||
public class RenderPricingEspecificoOcupacion implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingEspecificoOcupacion peo = (PricingEspecificoOcupacion) o;
|
||||
if(o instanceof PricingEspecificoOcupacion) {
|
||||
PricingEspecificoOcupacion peo = (PricingEspecificoOcupacion) o;
|
||||
|
||||
if (!peo.getActivo()) {
|
||||
return;
|
||||
if (!peo.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(peo.getTarifa() == null ? "" : peo.getTarifa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getDescuento() == null ?"":peo.getDescuento().toString());
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
GP_PricingEspecificoOcupacion peo = (GP_PricingEspecificoOcupacion) o;
|
||||
|
||||
if (!peo.getActivo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(peo.getTarifa() == null ? "" : peo.getTarifa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getDescuento() == null ?"":peo.getDescuento().toString());
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(peo.getTarifa() == null ? "" : peo.getTarifa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(peo.getDescuento() == null ?"":peo.getDescuento().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,30 +5,52 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingFormapago;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
|
||||
|
||||
public class RenderPricingFormaPago implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingFormapago ppg = (PricingFormapago) o;
|
||||
if(o instanceof PricingFormapago) {
|
||||
PricingFormapago ppg = (PricingFormapago) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
lc = new Listcell(ppg.getFormaPago().getDescpago());
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell();
|
||||
lc = new Listcell(ppg.getFormaPago().getDescpago());
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbIndexcepcion = new Checkbox();
|
||||
if (ppg.getIndexcepcion()) {
|
||||
ckbIndexcepcion.setChecked(true);
|
||||
Checkbox ckbIndexcepcion = new Checkbox();
|
||||
if (ppg.getIndexcepcion()) {
|
||||
ckbIndexcepcion.setChecked(true);
|
||||
} else {
|
||||
ckbIndexcepcion.setChecked(false);
|
||||
}
|
||||
ckbIndexcepcion.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbIndexcepcion.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", ppg);
|
||||
} else {
|
||||
ckbIndexcepcion.setChecked(false);
|
||||
}
|
||||
ckbIndexcepcion.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbIndexcepcion.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
GP_PricingFormapago ppg = (GP_PricingFormapago) o;
|
||||
|
||||
lstm.setAttribute("data", ppg);
|
||||
Listcell lc = new Listcell();
|
||||
lc = new Listcell(ppg.getFormaPago().getDescpago());
|
||||
lc.setParent(lstm);
|
||||
|
||||
Checkbox ckbIndexcepcion = new Checkbox();
|
||||
if (ppg.getIndexcepcion()) {
|
||||
ckbIndexcepcion.setChecked(true);
|
||||
} else {
|
||||
ckbIndexcepcion.setChecked(false);
|
||||
}
|
||||
ckbIndexcepcion.setDisabled(true);
|
||||
lc = new Listcell();
|
||||
ckbIndexcepcion.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", ppg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingImporte;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingImporte;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingImporte;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -17,24 +20,46 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingImporte implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingImporte pi = (PricingImporte) o;
|
||||
if(o instanceof PricingImporte ) {
|
||||
PricingImporte pi = (PricingImporte) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pi.getImporte() != null) {
|
||||
lc = new Listcell(pi.getImporte().setScale(2, RoundingMode.HALF_UP).toString());
|
||||
if (pi.getImporte() != null) {
|
||||
lc = new Listcell(pi.getImporte().setScale(2, RoundingMode.HALF_UP).toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pi.getMoneda() != null) {
|
||||
lc = new Listcell(pi.getMoneda().getDescmoneda());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pi);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
GP_PricingImporte pi = (GP_PricingImporte) o;
|
||||
|
||||
if (pi.getMoneda() != null) {
|
||||
lc = new Listcell(pi.getMoneda().getDescmoneda());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lstm.setAttribute("data", pi);
|
||||
if (pi.getImporte() != null) {
|
||||
lc = new Listcell(pi.getImporte().setScale(2, RoundingMode.HALF_UP).toString());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pi.getMoneda() != null) {
|
||||
lc = new Listcell(pi.getMoneda().getDescmoneda());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMarca;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingMarca;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMarca;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -16,17 +18,32 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingMarca implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingMarca pm = (PricingMarca) o;
|
||||
if(o instanceof PricingMarca) {
|
||||
PricingMarca pm = (PricingMarca) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getMarca() != null) {
|
||||
lc = new Listcell(pm.getMarca().getDescmarca());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pm.getMarca() != null) {
|
||||
lc = new Listcell(pm.getMarca().getDescmarca());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
lstm.setAttribute("data", pm);
|
||||
} else {
|
||||
GP_PricingMarca pm = (GP_PricingMarca) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getMarca() != null) {
|
||||
lc = new Listcell(pm.getMarca().getDescmarca());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMercado;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingMercado;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMercado;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -16,38 +18,74 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingMercado implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingMercado pm = (PricingMercado) o;
|
||||
if(o instanceof PricingMercado) {
|
||||
PricingMercado pm = (PricingMercado) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
|
||||
lc.setParent(lstm);
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
lc.setParent(lstm);
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
lstm.setAttribute("data", pm);
|
||||
} else {
|
||||
GP_PricingMercado pm = (GP_PricingMercado) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pm.getOrigen() != null) {
|
||||
lc = new Listcell(pm.getOrigen().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getCveparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
|
||||
lc.setParent(lstm);
|
||||
if (pm.getDestino() != null) {
|
||||
lc = new Listcell(pm.getDestino().getDescparada());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,42 +4,78 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||
|
||||
public class RenderPricingOcupaAntecipa implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingOcupaAntecipa pm = (PricingOcupaAntecipa) o;
|
||||
if(o instanceof PricingOcupaAntecipa) {
|
||||
PricingOcupaAntecipa pm = (PricingOcupaAntecipa) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pm.getOcupacioninicial() == null ? "" : pm.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getOcupacioninicial() == null ? "" : pm.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getOcupacionfinal() == null ? "" : pm.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getOcupacionfinal() == null ? "" : pm.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmin() == null ? "" : pm.getCantasientosmin().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getCantasientosmin() == null ? "" : pm.getCantasientosmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmax() == null ? "" : pm.getCantasientosmax().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getCantasientosmax() == null ? "" : pm.getCantasientosmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPorcentaje() == null ? "" : pm.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getPorcentaje() == null ? "" : pm.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getImporte() == null ? "" : pm.getImporte().toString());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getImporte() == null ? "" : pm.getImporte().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPricingClasseTarifaria() == null ? "" : pm.getPricingClasseTarifaria().getSigla());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(pm.getPricingClasseTarifaria() == null ? "" : pm.getPricingClasseTarifaria().getSigla());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
lstm.setAttribute("data", pm);
|
||||
} else {
|
||||
GP_PricingOcupaAntecipa pm = (GP_PricingOcupaAntecipa) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pm.getOcupacioninicial() == null ? "" : pm.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getOcupacionfinal() == null ? "" : pm.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmin() == null ? "" : pm.getCantasientosmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmax() == null ? "" : pm.getCantasientosmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPorcentaje() == null ? "" : pm.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getImporte() == null ? "" : pm.getImporte().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPricingClasseTarifaria() == null ? "" : pm.getPricingClasseTarifaria().getSigla());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
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.vo.pricing.GP_PricingOcupaAntecipaLegendaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaLegendaVO.GP_PricingOcupaAtencipaLegendaItemVO;
|
||||
|
||||
public class RenderPricingOcupaAntecipaLegenda implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
GP_PricingOcupaAntecipaLegendaVO legenda = (GP_PricingOcupaAntecipaLegendaVO) o;
|
||||
|
||||
Listcell lc = new Listcell(legenda.getLegenda());
|
||||
lc.setParent(lstm);
|
||||
|
||||
for (GP_PricingOcupaAtencipaLegendaItemVO poltrona: legenda.getItens()) {
|
||||
lc = new Listcell(poltrona.getDescricao());
|
||||
String style = "text-align:center; font-weight:bold; background-color:" + poltrona.getCor();
|
||||
lc.setStyle(style);
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
lstm.setAttribute("data", legenda);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
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.vo.pricing.GP_PricingOcupaAntecipaPoltronasVO;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingOcupaAntecipaVO;
|
||||
|
||||
public class RenderPricingOcupacao implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
|
||||
GP_PricingOcupaAntecipaVO ocupacao = (GP_PricingOcupaAntecipaVO) o;
|
||||
|
||||
boolean isFirstLine = ocupacao.getDiaMin().equals(ocupacao.getAntecipacao());
|
||||
|
||||
Listcell lc = new Listcell(isFirstLine ? ocupacao.getDias() : "");
|
||||
lc.setParent(lstm);
|
||||
lc.setSpan(3);
|
||||
|
||||
lc = new Listcell(ocupacao.getAuxDesc());
|
||||
lc.setParent(lstm);
|
||||
lc.setSpan(4);
|
||||
|
||||
for (GP_PricingOcupaAntecipaPoltronasVO poltrona: ocupacao.getPoltronas()) {
|
||||
lc = new Listcell("");
|
||||
|
||||
String style = "background-color: " + poltrona.getCor();
|
||||
lc.setStyle(style);
|
||||
|
||||
if(poltrona.isAdicionar()) {
|
||||
lc.setId(poltrona.getPricingocupaantecipaId() + "-" + ocupacao.getAntecipacao() + "-" + poltrona.getPoltrona());
|
||||
lc.addForward("onDoubleClick", lstm.getParent(), "onDoubleClick");
|
||||
}
|
||||
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
lstm.setAttribute("data", ocupacao);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -5,11 +5,13 @@
|
|||
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingPuntoVenta;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingPuntoVenta;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -17,17 +19,32 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingPuntoVenta implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingPuntoVenta ppv = (PricingPuntoVenta) o;
|
||||
if(o instanceof PricingPuntoVenta) {
|
||||
PricingPuntoVenta ppv = (PricingPuntoVenta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (ppv.getPuntoVenta() != null) {
|
||||
lc = new Listcell(ppv.getPuntoVenta().getNombpuntoventa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (ppv.getPuntoVenta() != null) {
|
||||
lc = new Listcell(ppv.getPuntoVenta().getNombpuntoventa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", ppv);
|
||||
lstm.setAttribute("data", ppv);
|
||||
} else {
|
||||
GP_PricingPuntoVenta ppv = (GP_PricingPuntoVenta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (ppv.getPuntoVenta() != null) {
|
||||
lc = new Listcell(ppv.getPuntoVenta().getNombpuntoventa());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", ppv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||
import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingRevisaoValoresVO;
|
||||
|
||||
public class RenderPricingRevisaoValores implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
GP_PricingRevisaoValoresVO pricingRevisaoValores = (GP_PricingRevisaoValoresVO) data;
|
||||
|
||||
setListCellString(item, pricingRevisaoValores.getOrigem());
|
||||
setListCellString(item, pricingRevisaoValores.getDestino());
|
||||
setListCellString(item, pricingRevisaoValores.getClasseServico());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getPrecioAtual());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getTarifaAtual());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getTaxaEmbarque());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getPedagio());
|
||||
setListCellString(item, pricingRevisaoValores.getOcupacao());
|
||||
setListCellString(item, pricingRevisaoValores.getAntecipacao());
|
||||
setListCellString(item, pricingRevisaoValores.getDesconto());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getPrecoComPricing());
|
||||
setListCellBigDecimal(item, pricingRevisaoValores.getTarifaComPricing());
|
||||
|
||||
item.setAttribute("data", pricingRevisaoValores);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* @param number
|
||||
*/
|
||||
private void setListCellBigDecimal(Listitem item, BigDecimal number) {
|
||||
Listcell lc = new Listcell(number != null ? MoneyHelper.getValor(number) : " - ");
|
||||
lc.setParent(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* @param string
|
||||
*/
|
||||
private void setListCellString(Listitem item, String string) {
|
||||
Listcell lc = new Listcell(StringUtils.isNotBlank(string) ? string : " - ");
|
||||
lc.setParent(item);
|
||||
}
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@ import org.zkoss.zul.Listcell;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingRuta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingRuta;
|
||||
|
||||
/**
|
||||
|
@ -18,26 +19,50 @@ public class RenderPricingRuta implements ListitemRenderer {
|
|||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingRuta pc = (PricingRuta) o;
|
||||
if(o instanceof PricingRuta) {
|
||||
PricingRuta pc = (PricingRuta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getRuta() != null && pc.getRuta().getRutaId() != null) {
|
||||
String descLinha = "";
|
||||
if (pc.getRuta().getRutaId() != -1) {
|
||||
String sentido = pc.getRuta().getIndSentidoIda() == null || Boolean.TRUE.equals(pc.getRuta().getIndSentidoIda()) ? "IDA" : "VOLTA";
|
||||
String descClasse = pc.getRuta().getClaseServicio() != null ? pc.getRuta().getClaseServicio().getDescclase() : "null";
|
||||
descLinha = pc.getRuta().getNumRuta() + " - " + pc.getRuta().getDescruta() + " - "
|
||||
+ pc.getRuta().getRutaId().toString() + " - " + descClasse + " - " + sentido;
|
||||
} else {
|
||||
descLinha = pc.getRuta().getDescruta();
|
||||
}
|
||||
lc = new Listcell(descLinha);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pc.getRuta() != null && pc.getRuta().getRutaId() != null) {
|
||||
String descLinha = "";
|
||||
if (pc.getRuta().getRutaId() != -1) {
|
||||
String sentido = pc.getRuta().getIndSentidoIda() == null || Boolean.TRUE.equals(pc.getRuta().getIndSentidoIda()) ? "IDA" : "VOLTA";
|
||||
String descClasse = pc.getRuta().getClaseServicio() != null ? pc.getRuta().getClaseServicio().getDescclase() : "null";
|
||||
descLinha = pc.getRuta().getNumRuta() + " - " + pc.getRuta().getDescruta() + " - "
|
||||
+ pc.getRuta().getRutaId().toString() + " - " + descClasse + " - " + sentido;
|
||||
} else {
|
||||
descLinha = pc.getRuta().getDescruta();
|
||||
}
|
||||
lc = new Listcell(descLinha);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
GP_PricingRuta pc = (GP_PricingRuta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getRuta() != null && pc.getRuta().getRutaId() != null) {
|
||||
String descLinha = "";
|
||||
if (pc.getRuta().getRutaId() != -1) {
|
||||
String sentido = pc.getRuta().getIndSentidoIda() == null || Boolean.TRUE.equals(pc.getRuta().getIndSentidoIda()) ? "IDA" : "VOLTA";
|
||||
String descClasse = pc.getRuta().getClaseServicio() != null ? pc.getRuta().getClaseServicio().getDescclase() : "null";
|
||||
descLinha = pc.getRuta().getNumRuta() + " - " + pc.getRuta().getDescruta() + " - "
|
||||
+ pc.getRuta().getRutaId().toString() + " - " + descClasse + " - " + sentido;
|
||||
} else {
|
||||
descLinha = pc.getRuta().getDescruta();
|
||||
}
|
||||
lc = new Listcell(descLinha);
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingTipoPtoVta;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoPtoVta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingTipoPtoVta;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -17,17 +19,33 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingTipoPtoVta implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingTipoPtoVta pc = (PricingTipoPtoVta) o;
|
||||
if(o instanceof PricingTipoPtoVta) {
|
||||
PricingTipoPtoVta pc = (PricingTipoPtoVta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getTipoPtovta() != null) {
|
||||
lc = new Listcell(pc.getTipoPtovta().getDesctipo());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pc.getTipoPtovta() != null) {
|
||||
lc = new Listcell(pc.getTipoPtovta().getDesctipo());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
lstm.setAttribute("data", pc);
|
||||
} else {
|
||||
GP_PricingTipoPtoVta pc = (GP_PricingTipoPtoVta) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pc.getTipoPtovta() != null) {
|
||||
lc = new Listcell(pc.getTipoPtovta().getDesctipo());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pc);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
|
@ -16,17 +18,32 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingTipoServicio implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingTipoServicio pm = (PricingTipoServicio) o;
|
||||
if(o instanceof PricingTipoServicio) {
|
||||
PricingTipoServicio pm = (PricingTipoServicio) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getTipoServicio() != null) {
|
||||
lc = new Listcell(pm.getTipoServicio().getDescservicio());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pm.getTipoServicio() != null) {
|
||||
lc = new Listcell(pm.getTipoServicio().getDescservicio());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
lstm.setAttribute("data", pm);
|
||||
} else {
|
||||
GP_PricingTipoServicio pm = (GP_PricingTipoServicio) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pm.getTipoServicio() != null) {
|
||||
lc = new Listcell(pm.getTipoServicio().getDescservicio());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingVigencia;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingVigencia;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -17,39 +20,76 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
public class RenderPricingVigencia implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingVigencia pv = (PricingVigencia) o;
|
||||
if(o instanceof PricingVigencia) {
|
||||
PricingVigencia pv = (PricingVigencia) o;
|
||||
|
||||
SimpleDateFormat sf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
Listcell lc = new Listcell();
|
||||
SimpleDateFormat sf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pv.getFecinicioviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pv.getFecinicioviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecfinviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pv.getFecfinviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecinicioventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pv.getFecinicioventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecfinventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (pv.getFecfinventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pv);
|
||||
lstm.setAttribute("data", pv);
|
||||
} else {
|
||||
GP_PricingVigencia pv = (GP_PricingVigencia) o;
|
||||
|
||||
SimpleDateFormat sf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
if (pv.getFecinicioviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecfinviaje() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinviaje()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecinicioventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecinicioventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (pv.getFecfinventa() != null) {
|
||||
lc = new Listcell(sf.format(pv.getFecfinventa()));
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -422,6 +422,31 @@
|
|||
<value>com.rjconsultores.ventaboletos.entidad.EmpresaAdyenConfig</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.EmpresaCieloLinkConfig</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.EmpresaMercadoPagoConfig</value>
|
||||
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoAgencia</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCanalVendas</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_Pricing</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingAsiento</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingCategoria</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingClase</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingClasseTarifaria</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingCorrida</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingDia</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingFormapago</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingImporte</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingMarca</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingMercado</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingPuntoVenta</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingRuta</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingTipoPtoVta</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingTipoServicio</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingGestao</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaGP_Pricing"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winBusquedaGP_Pricing"
|
||||
title="${c:l('busquedaPricingController.window.title')}"
|
||||
apply="${busquedaGP_PricingController}" contentStyle="overflow:auto"
|
||||
height="520px" width="720px" border="normal">
|
||||
<toolbar>
|
||||
<button id="btnRefresh" image="/gui/img/refresh.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnRefresh.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnApagar" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnNovo.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnCerrar" onClick="winBusquedaGP_Pricing.detach()"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnCerrar.tooltiptext')}" />
|
||||
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('busquedaPricingController.lhNome.label')}" />
|
||||
<textbox id="txtNome" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row spans="1,2,1">
|
||||
<label
|
||||
value="${c:l('busquedaPricingController.lhEmpresa.label')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_Pricing$composer.lsEmpresa}">
|
||||
</combobox>
|
||||
|
||||
<checkbox id="chkBuscarInativos" checked="false"
|
||||
label="${c:l('busquedaPricingController.lhBuscarInativos.label')}" />
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('editarPricingController.ruta.value')}" />
|
||||
<combobox id="cmbRuta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_Pricing$composer.lsRuta}"
|
||||
>
|
||||
</combobox>
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label value="${c:l('editarPricingController.mercadoOrigen.value')}"/>
|
||||
<combobox id="cmbOrigen" autodrop="false" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
/>
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label value="${c:l('editarPricingController.mercadoDestino.value')}"/>
|
||||
<combobox id="cmbDestino" autodrop="false" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigHoraInicioViaje.value')}" />
|
||||
<datebox width="90%" id="fechaInicio" mold="rounded"
|
||||
/>
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigHoraFinViaje.value')}" />
|
||||
<datebox width="90%" id="fechaFin" mold="rounded"
|
||||
/>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('busquedaPricingController.btnPesquisa.label')}" />
|
||||
</toolbar>
|
||||
|
||||
<paging id="pagingPricing" pageSize="15" />
|
||||
<listbox id="pricingList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="60%" vflex="false">
|
||||
<listhead sizable="true">
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('lb.id')}" width="70px" sort="auto(pricingId)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaPricingController.lhNome.label')}"
|
||||
sort="auto(nombPricing)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaPricingController.lhEmpresa.label')}"
|
||||
sort="auto(empresa.nombempresa)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
width="230px"
|
||||
label="${c:l('busquedaPricingController.lhDataInicioFimViagem.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaGP_PricingEspecifico"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winBusquedaGP_PricingEspecifico" border="normal"
|
||||
apply="${busquedaGP_PricingEspecificoController}"
|
||||
height="450px" width="950px" contentStyle="overflow:auto"
|
||||
title="${c:l('busqueDaGPPricingEspecifico.window.title')}"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<toolbar>
|
||||
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnRefresh.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnNovo.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnCerrar" onClick="winBusquedaGP_PricingEspecifico.detach()" image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnCerrar.tooltiptext')}"/>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<label value="${c:l('editarPricingController.nombrePricingEsp.label')}"/>
|
||||
<textbox id="txtNombrePricing" maxlength="20"
|
||||
width="99%" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.marca.value')}"/>
|
||||
<combobox id="cmbMarca" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_PricingEspecifico$composer.lsMarca}"/>
|
||||
|
||||
<label value="${c:l('editarPricingController.ptovta.value')}"/>
|
||||
<combobox id="cmbPtovta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_PricingEspecifico$composer.lsPtovata}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.origem.label')}"/>
|
||||
<combobox id="cmbOrigem" mold="rounded" buttonVisible="true" width="90%" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
||||
|
||||
<label value="${c:l('editarPricingController.destino.label')}"/>
|
||||
<combobox id="cmbDestino" mold="rounded" buttonVisible="true" width="90%" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.lhFechaHoraInicio.label')}"/>
|
||||
<datebox width="125px" id="fechaInicio" format="dd/MM/yyyy HH:mm" mold="rounded" />
|
||||
<label value="${c:l('editarPricingController.lhFechaHoraFin.label')}"/>
|
||||
<datebox width="125px" id="fechaFin" format="dd/MM/yyyy HH:mm" mold="rounded" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.windowCategoria.title')}"/>
|
||||
<combobox id="cmbTipoPassageiro" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_PricingEspecifico$composer.lsCategoria}"/>
|
||||
<label value="${c:l('editarPricingController.impMon.value')}"/>
|
||||
<combobox id="cmbMoneda" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_PricingEspecifico$composer.lsMoneda}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.windowTipoServicio.title')}"/>
|
||||
<combobox id="cmbTipoServicio" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winBusquedaGP_PricingEspecifico$composer.lsClaseServicio}"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('busquedaPricingController.btnPesquisa.label')}"/>
|
||||
</toolbar>
|
||||
|
||||
<paging id="pagingPricing" pageSize="20"/>
|
||||
<listbox id="pricingList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(pricingespecificoId)"
|
||||
label="${c:l('lb.id')}" width="50px"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(nombPricing)"
|
||||
label="${c:l('editarPricingController.nombrePricingEsp.label')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(marca.descmarca)"
|
||||
label="${c:l('editarPricingController.marca.value')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(moneda.descmoneda)"
|
||||
label="${c:l('editarPricingController.impMon.value')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(categoria.desccategoria)"
|
||||
label="${c:l('editarPricingController.windowCategoria.title')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(claseServicio.descclase)"
|
||||
label="${c:l('editarPricingController.windowTipoServicio.title')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(categoria.desccategoria)"
|
||||
label="${c:l('editarPricingController.lhFechaHoraInicioLH.label')}"/>
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(claseServicio.descclase)"
|
||||
label="${c:l('editarPricingController.lhFechaHoraFin.labelLH')}"/>
|
||||
|
||||
<listheader image="/gui/img/create_doc.gif" sort="auto(corridaId)"
|
||||
label="${c:l('editarPricingController.lhCorridaId.labelLH')}"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winCopiarGP_Pricing"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk>
|
||||
<window id="winCopiarGP_Pricing" border="normal" width="460px"
|
||||
apply="${copiarGP_PricingController}" closable="true"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('copiarPricingController.window.title')}">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="30%" />
|
||||
<column width="70%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
|
||||
<label value="Novo Nome: " />
|
||||
<textbox id="nombrePricing" constraint="no empty"
|
||||
maxlength="20" width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnSalvarCopia" image="/gui/img/save.png"
|
||||
label="Salvar" />
|
||||
</toolbar>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winCopiarGP_PricingEspecifico"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk>
|
||||
<window id="winCopiarGP_PricingEspecifico" border="normal" width="460px"
|
||||
apply="${copiarGP_PricingEspecificoController}" closable="true"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('copiarPricingEspecificoController.window.title')}">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="30%" />
|
||||
<column width="70%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
|
||||
<label value="Novo Nome: " />
|
||||
<textbox id="nombrePricing" constraint="no empty"
|
||||
maxlength="20" width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnSalvarCopia" image="/gui/img/save.png"
|
||||
label="Salvar" />
|
||||
</toolbar>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,951 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_Pricing"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk>
|
||||
<window id="winEditarGP_Pricing" border="normal"
|
||||
apply="${editarGP_PricingController}"
|
||||
height="98%" width="100%"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.window.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnApagar" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button id="btnSalvar" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnSalvar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnCopiar" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/copiar.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnCopiar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnInativar" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/close_icon_inactive.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnInativar.tooltiptext')}" />
|
||||
<button id="btnAtivar" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/icon-active.gif" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnAtivar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnFechar" height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnFechar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
<separator orient="vertical" />
|
||||
<label value="${c:l('editarPricingController.label.cor')}" />
|
||||
<colorbox id="colorChoose"
|
||||
style="color: red; font-style: oblique;"
|
||||
hash="true"
|
||||
pickerClosable="false"
|
||||
pickerPosition="right"
|
||||
width="55px"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<tabbox id="tb" renderdefer="1000">
|
||||
<tabs id="tabs">
|
||||
<tab id="A"
|
||||
label="${c:l('editarPricingController.tabGen.label')}" />
|
||||
<tab id="B"
|
||||
label="${c:l('editarPricingController.tabApl.label')}" />
|
||||
<tab id="C"
|
||||
label="${c:l('editarPricingController.tabMer.label')}" />
|
||||
<tab id="D"
|
||||
label="${c:l('editarPricingController.tabCor.label')}" />
|
||||
<tab id="tabOcupaAntecipa"
|
||||
label="${c:l('editarPricingController.tabAsi.label')}" />
|
||||
<tab id="F"
|
||||
label="${c:l('editarPricingController.tabOcu.label')}" />
|
||||
<tab id="H"
|
||||
label="${c:l('editarPricingController.tabTipo.label')}" />
|
||||
<tab id="tabRevisaoValor"
|
||||
label="${c:l('editarPricingController.tabRevisao.label')}" />
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<!-- General -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('editarPricingController.nombrePricing.label')}" />
|
||||
<textbox id="nombrePricing"
|
||||
constraint="no empty" maxlength="20"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.nombPricing}"
|
||||
width="50%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.cmbIndGeneraFeriadoFechaViaje.value')}" />
|
||||
<combobox
|
||||
id="cmbIndGeneraFeriadoFechaViaje"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
constraint="no empty" mold="rounded" width="90%" />
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.cmbIndGeneraFeriadoFechaVenta.value')}" />
|
||||
<combobox
|
||||
id="cmbIndGeneraFeriadoFechaVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
constraint="no empty" mold="rounded" width="90%" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhEmpresa.label')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
constraint="no empty" mold="rounded" buttonVisible="true"
|
||||
width="90%" model="@{winEditarGP_Pricing$composer.lsEmpresa}"
|
||||
selectedItem="@{winEditarGP_Pricing$composer.pricing.empresa}" />
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.trans.label')}" />
|
||||
<radiogroup Id="radioTrans">
|
||||
<hbox align="center">
|
||||
<radio Id="rdTransSi"
|
||||
label="${c:l('editarPricingController.si.label')}"
|
||||
checked="true" />
|
||||
<radio Id="rdTransNo"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhCantidad.label')}" />
|
||||
<!-- Elvia 28/03/2011: Aceitara branco ou zero -->
|
||||
<intbox constraint="no negative"
|
||||
id="itxCantboleto"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.cantboleto}"
|
||||
maxlength="3" />
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.cance.label')}" />
|
||||
<radiogroup Id="radioCance">
|
||||
<hbox align="center">
|
||||
<radio Id="rdCanceSi"
|
||||
label="${c:l('editarPricingController.si.label')}"
|
||||
checked="true" />
|
||||
<radio Id="rdCanceNo"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.lblDescuento.value')}" />
|
||||
<radiogroup>
|
||||
<radio id="radioPor"
|
||||
label="${c:l('editarConfiguracionCategoriaController.lblDescuentoPorc.value')}" />
|
||||
<radio id="radioImp"
|
||||
label="${c:l('editarConfiguracionCategoriaController.lblDescuentoImporte.value')}" />
|
||||
</radiogroup>
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.reser.label')}" />
|
||||
<radiogroup Id="radioReser">
|
||||
<hbox align="center">
|
||||
<radio Id="rdReserSi"
|
||||
label="${c:l('editarPricingController.si.label')}"
|
||||
checked="true" />
|
||||
<radio Id="rdReserNo"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhPorcSen.label')}" />
|
||||
<textbox id="descuentoporcsen"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="7" scale="2" allowNegative="true"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.descuentoporcentaje,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhCantDias.label')}" />
|
||||
<!-- Elvia 28/03/2011: Aceitara branco ou zero -->
|
||||
<intbox id="cantdiasanticipacion"
|
||||
constraint="no negative" maxlength="2"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.cantdiasanticipacion}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhPorcRed.label')}" />
|
||||
<textbox id="descuentoporcredondo"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="5" scale="2" allowNegative="true"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.descuentoporcredondo,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.exibirVenda.label')}" />
|
||||
<radiogroup Id="radioExibirVenda">
|
||||
<hbox align="center">
|
||||
<radio Id="rdExibirVendaSi"
|
||||
label="${c:l('editarPricingController.si.label')}"
|
||||
checked="true" />
|
||||
<radio Id="rdExibirVendaNo"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%"/>
|
||||
<column width="30%"/>
|
||||
<column width="10%"/>
|
||||
<column width="10%"/>
|
||||
<column width="9%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
<column width="3%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="12">
|
||||
<label value="${c:l('editarPricingController.label.regrasEstadiaMinima')}"
|
||||
style="font-weight:bold;"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.label.estadiaMinima')}" />
|
||||
<radiogroup>
|
||||
<hbox align="center">
|
||||
<radio Id="rdEstadiaMinimaSi"
|
||||
label="${c:l('editarPricingController.si.label')}" />
|
||||
<radio Id="rdEstadiaMinimaNo"
|
||||
label="${c:l('editarPricingController.no.label')}"
|
||||
checked="true"/>
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
<label
|
||||
value="${c:l('editarPricingController.label.qtdeDias')}" />
|
||||
<intbox id="cantdiasEstadiaminima"
|
||||
constraint="no negative" maxlength="3"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.cantdiasEstadiaminima}"/>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lbDias.value')}" />
|
||||
<checkbox id="chkIndLunEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indLunEstadiaminima}"/>
|
||||
<checkbox id="chkIndMarEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indMarEstadiaminima}"/>
|
||||
<checkbox id="chkIndMieEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbMieM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indMieEstadiaminima}"/>
|
||||
<checkbox id="chkIndJueEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbJueM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indJueEstadiaminima}"/>
|
||||
<checkbox id="chkIndVieEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbVieM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indVieEstadiaminima}"/>
|
||||
<checkbox id="chkIndSabEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbSabM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indSabEstadiaminima}"/>
|
||||
<checkbox id="chkIndDomEstadiaminima"
|
||||
label="${c:l('editarPricingController.lbDomM.value')}"
|
||||
value="@{winEditarGP_Pricing$composer.pricing.indDomEstadiaminima}"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="60%" />
|
||||
<column width="40%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="100%" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigencia.value')}:" />
|
||||
<button id="btnNovoVigencia" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoVigencia.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarVigencia" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarVigencia"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingVigenciaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader width="25%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(fecinicioviaje)"
|
||||
label="${c:l('editarPricingController.vigInicioViaje.value')}" />
|
||||
<listheader width="25%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(fecfinviaje)"
|
||||
label="${c:l('editarPricingController.vigFinViaje.value')}" />
|
||||
<listheader width="25%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(fecinicioventa)"
|
||||
label="${c:l('editarPricingController.vigInicioVenta.value')}" />
|
||||
<listheader width="25%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(fecfinventa)"
|
||||
label="${c:l('editarPricingController.vigFinVenta.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
<vbox height="100%" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.importe.value')}:" />
|
||||
<button id="btnNovoImporte" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoImporte.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarImporte" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarImporte"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingImporteList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(importe)"
|
||||
label="${c:l('editarPricingController.impImp.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(moneda.descmoneda)"
|
||||
label="${c:l('editarPricingController.impMon.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- Aplicación -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="33%" />
|
||||
<column width="33%" />
|
||||
<column width="33%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.marca.value')}:" />
|
||||
<button id="btnNovoMarca" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoMarca.tooltiptext')}" />
|
||||
<button id="btnApagarMarca" disabled="${arg.isReadOnly}"
|
||||
height="6" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarMarca"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingMarcaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.marca.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(marca.descmarca)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.clase.value')}:" />
|
||||
<button id="btnNovoClase" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoClasse.tooltiptext')}" />
|
||||
<button id="btnApagarClase" disabled="${arg.isReadOnly}"
|
||||
height="6" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarClase"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingClaseList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.clase.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(claseServicio.descclase)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.punto.value')}:" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoPuntoVenta" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoPuntoVenta.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarPuntoVenta" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarPuntoVenta"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingPuntoVentaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.punto.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(puntoVenta.nombpuntoventa)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.ruta.value')}:" />
|
||||
<button id="btnNovoRuta" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoRuta.tooltiptext')}" />
|
||||
<button id="btnApagarRuta" disabled="${arg.isReadOnly}"
|
||||
height="6" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarRuta"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingRutaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="true" height="170px" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.ruta.value')}"
|
||||
image="/gui/img/create_doc.gif" sort="auto(ruta.descruta)" />
|
||||
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.ptovta.value')}:" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoTipoPtoVta" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoTipoPtoVta.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarTipoPtoVta" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarTipoPtoVta"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingTipoPtoVtaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.ptovta.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(tipoPtovta.desctipo)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.categoria.value')}:" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoCategoria" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoCategoria.tooltiptext')}"
|
||||
/>
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarCategoria" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}"
|
||||
/>
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarCategoria"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}"
|
||||
/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingCategoriaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="170px" multiple="true" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.categoria.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(categoria.desccategoria)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</tabpanel>
|
||||
<!-- Mercado -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="430px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.mercado.value')}:" />
|
||||
<button id="btnNovoMercado" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoMercado.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarMercado" height="6" image="/gui/img/remove.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarMercado"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingMercadoList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="170px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.mercadoOrigen.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(origen.cveparada)" />
|
||||
<listheader
|
||||
label="${c:l('lb.dec')}" image="/gui/img/create_doc.gif"
|
||||
sort="auto(origen.descparada)" />
|
||||
<listheader
|
||||
label="${c:l('editarPricingController.mercadoDestino.value')}"
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(destino.cveparada)" />
|
||||
<listheader
|
||||
label="${c:l('lb.dec')}" image="/gui/img/create_doc.gif"
|
||||
sort="auto(destino.descparada)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</tabpanel>
|
||||
<!-- Corridas -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.porDia.value')}:" />
|
||||
<button id="btnNovoDia" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoDia.tooltiptext')}" />
|
||||
<button id="btnApagarDia" disabled="${arg.isReadOnly}"
|
||||
height="6" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<checkbox
|
||||
id="chkAgruparDia" value="@{winEditarGP_Pricing$composer.pricing.indAgrupadoDia}"
|
||||
label="Agrupar" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingDiaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="170px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(horarioinicio)"
|
||||
label="${c:l('editarPricingController.hIni.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(horariofin)"
|
||||
label="${c:l('editarPricingController.hFim.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||
sort="auto(indlunes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||
sort="auto(indmartes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbMieM.value')}"
|
||||
sort="auto(indmiercoles)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbJueM.value')}"
|
||||
sort="auto(indjueves)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbVieM.value')}"
|
||||
sort="auto(indviernes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbSabM.value')}"
|
||||
sort="auto(indsabado)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="7%"
|
||||
label="${c:l('editarPricingController.lbDomM.value')}"
|
||||
sort="auto(inddomingo)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" width="12%"
|
||||
label="${c:l('editarPricingController.lbFecVenta.value')}"
|
||||
sort="auto(indfecventa)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
label="${c:l('editarPricingController.lbFecViaje.value')}"
|
||||
sort="auto(indfecviaje)" />
|
||||
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.porCorrida.value')}:" />
|
||||
<button id="btnNovoCorrida" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoCorrida.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarCorrida" height="6" image="/gui/img/remove.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<!--button id="btnModificarCorrida" disabled="${arg.isReadOnly}"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}"/-->
|
||||
<checkbox id="chkAgruparServico" value="@{winEditarGP_Pricing$composer.pricing.indAgrupadoServico}"
|
||||
label="Agrupar" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingCorridaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="170px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(corridaCtrl.corridaId)"
|
||||
label="${c:l('editarPricingController.corridaId.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(corridaCtrl.horario)"
|
||||
label="${c:l('editarPricingController.corridaHora.value')}" />
|
||||
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
label="${c:l('editarPricingController.origem.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
label="${c:l('editarPricingController.destino.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- Asientos -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row height="100%" width="100%">
|
||||
<vbox height="100%" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.asiento.value')}:" />
|
||||
<button id="btnNovoAsiento" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoAsiento.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarAsiento" height="6" image="/gui/img/remove.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarAsiento"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingAsientoList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="380px" width="880px">
|
||||
<listhead width="15px"
|
||||
sizable="true">
|
||||
<listheader width="40%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(numeasiento)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.asiento.value')}" />
|
||||
<listheader width="60%"
|
||||
image="/gui/img/create_doc.gif" sort="auto(porcentaje)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- Ocupación Antecipacion -->
|
||||
<tabpanel id="tabPanelOcupaAntecipa" height="500px">
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacion.value')}:" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoOcupaAntecipa" image="/gui/img/add.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoOcupacion.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnOcupaAntecipaAutomatico"
|
||||
label="${c:l('editarPricingController.btnAutomatico.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingOcupaAntecipaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="820px"
|
||||
width="500px"
|
||||
hflex="true">
|
||||
<auxhead>
|
||||
<auxheader label="${c:l('editarPricingController.dias.label')}" rowspan="2" colspan="3" align="center"/>
|
||||
<auxheader label="${c:l('editarPricingController.antecipacao.label')}" rowspan="2" colspan="4" align="center"/>
|
||||
<auxheader label="${c:l('editarPricingController.poltronas.label')}" colspan="107"/>
|
||||
</auxhead>
|
||||
<frozen columns="7" />
|
||||
<listhead width="500px">
|
||||
<listheader id="${each}"
|
||||
forEach="${winEditarGP_Pricing$composer.columns}"
|
||||
label="${each}"
|
||||
width="20px"
|
||||
align="center">
|
||||
</listheader>
|
||||
</listhead>
|
||||
</listbox>
|
||||
<listbox id="pricingOcupaAntecipaLegendaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox">
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
|
||||
<!-- TipoServicio Formapago -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.tipoServicio.value')}:" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoTipoServicio" image="/gui/img/add.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoTipoServicio.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarTipoServicio" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarTipoServicio"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox
|
||||
id="pricingTipoServicioList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="170px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(tipoServicio)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.tipoServicio.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
||||
</row>
|
||||
|
||||
<row valign="top" visible="@{!winEditarGP_Pricing$composer.formaPagoPricingInativo}" >
|
||||
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="Forma de Pagamento: " />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnNovoFormaPago" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoTipoServicio.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarFormaPago" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnModificarFormaPago"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<listbox id="pricingFormapagoList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="170px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(formaPago)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.formaPago.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(indexcepcion)"
|
||||
label="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<tabpanel>
|
||||
<listbox
|
||||
id="pricingRevisaoValores"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(origem)" align="left" width="7%"
|
||||
label="${c:l('editarPricingController.origen.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(destino)" align="left" width="7%"
|
||||
label="${c:l('editarPricingController.destino.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(classeServico)" align="left" width="7%"
|
||||
label="${c:l('editarPricingController.classe.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(precioAtual)" align="right" width="8%"
|
||||
label="${c:l('editarPricingController.precoAtual.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(tarifaAtual)" align="right" width="8%"
|
||||
label="${c:l('editarPricingController.tarifaAtual.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(taxaEmbarque)" align="right" width="10%"
|
||||
label="${c:l('editarPricingController.taxaEmbarque.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(pedagio)" align="right" width="7%"
|
||||
label="${c:l('editarPricingController.pedagio.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(antecipacao)" align="center" width="11%"
|
||||
label="${c:l('editarPricingController.antecipacao.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(ocupacao)" align="center" width="7%"
|
||||
label="${c:l('editarPricingController.ocupacao.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(desconto)" align="center" width="7%"
|
||||
label="${c:l('editarPricingController.desconto.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(precoComPrincing)" align="right" width="11%"
|
||||
label="${c:l('editarPricingController.precoComPricing.value')}" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
sort="auto(tarifaComPricing)" align="right" width="11%"
|
||||
label="${c:l('editarPricingController.tarifaComPricing.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingAsiento"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingAsiento" border="normal"
|
||||
apply="${editarGP_PricingAsientoController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowAsiento.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverAsiento" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingAsientoController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarAsiento" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingAsientoController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingAsiento.detach()"
|
||||
tooltiptext="${c:l('editarPricingAsientoController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.asiento.value')}"/>
|
||||
<intbox id="numeasiento" constraint="no negative,no zero, no empty"
|
||||
value="@{winEditarGP_PricingAsiento$composer.pricingAsiento.numeasiento}" maxlength="2"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.porcentaje.value')}"/>
|
||||
<textbox id="porcentaje"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" maxValue="100" allowNegative="true" obligatorio="true"
|
||||
value="@{winEditarGP_PricingAsiento$composer.pricingAsiento.porcentaje,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"/>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.nombAsiento.value')}"/>
|
||||
<textbox id="nombImagen" constraint="no empty"
|
||||
value="@{winEditarGP_PricingAsiento$composer.pricingAsiento.nombImagen}" maxlength="20"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingCategoria"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingCategoria" border="normal"
|
||||
apply="${editarGP_PricingCategoriaController}"
|
||||
width="500px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowCategoria.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverCategoria" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingCategoriaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarCategoria" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('tooltiptext.btnAgregar')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingCategoria.detach()"
|
||||
tooltiptext="${c:l('tooltiptext.btnFechar')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.categoria.value')}"/>
|
||||
<combobox id="cmbCategoria" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingCategoria$composer.lsCategoria}"
|
||||
selectedItem="@{winEditarGP_PricingCategoria$composer.pricingCategoria.categoria}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingClase"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingClase" border="normal"
|
||||
apply="${editarGP_PricingClaseController}"
|
||||
width="500px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowClase.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverClase" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingClaseController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarClase" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingClaseController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingClase.detach()"
|
||||
tooltiptext="${c:l('editarPricingClaseController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.clase.value')}"/>
|
||||
<combobox id="cmbClase" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarGP_PricingClase$composer.lsClase}"
|
||||
selectedItem="@{winEditarGP_PricingClase$composer.pricingClase.claseServicio}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingCorrida"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingCorrida" border="normal"
|
||||
apply="${editarGP_PricingCorridaController}"
|
||||
width="850px" height="460px" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowCorrida.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarCorrida" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingCorridaController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingCorrida.detach()"
|
||||
tooltiptext="${c:l('editarPricingCorridaController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="15%"/>
|
||||
<column width="30%"/>
|
||||
<column width="15%"/>
|
||||
<column width="30%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.corridaId.value')}"/>
|
||||
<intbox id="idCorrida" maxlength="7"/>
|
||||
<label value="${c:l('editarPricingController.windowTipoServicio.title')}"/>
|
||||
<combobox id="cmbTipoServicio" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="95%"
|
||||
model="@{winEditarGP_PricingCorrida$composer.lsClaseServicio}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingCorridaController.labelOrigen.value')}"/>
|
||||
<combobox id="cmbParadaOrigem" autodrop="false" mold="rounded"
|
||||
buttonVisible="true" width="95%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
||||
<label value="${c:l('editarPricingCorridaController.labelDestino.value')}"/>
|
||||
<combobox id="cmbParadaDestino" autodrop="false" mold="rounded"
|
||||
buttonVisible="true" width="95%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingCorridaController.lblInicio.value')}"/>
|
||||
<timebox id="timeInicio" format="HH:mm" mold="rounded"/>
|
||||
<label value="${c:l('editarPricingCorridaController.lblFin.value')}"/>
|
||||
<timebox id="timeFin" format="HH:mm" mold="rounded"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('editarPricingCorridaController.btnPesquisa.label')}"/>
|
||||
</toolbar>
|
||||
|
||||
<listbox id="corridaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" mold="paging" pageSize="15"
|
||||
multiple="true" height="60%" checkmark="true">
|
||||
<listhead sizable="true">
|
||||
<listheader width="80px" image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.lhId.label')}"
|
||||
sort="auto(id.corridaId)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.fechorsalida.label')}"
|
||||
sort="auto(fechorsalida)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.labelOrigen.value')}"
|
||||
sort="auto(origem.descparada)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.labelDestino.value')}"
|
||||
sort="auto(destino.descparada)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.claseServicio.label')}"
|
||||
sort="auto(claseServicio.descclase)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarPricingCorridaController.marca.label')}"
|
||||
sort="auto(marca.descmarca)"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingDia"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingDia" border="normal"
|
||||
apply="${editarGP_PricingDiaController}" width="400px" height="457x"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowDia.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarDia" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarGP_PricingDia.detach()"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lbDatas.value')}" />
|
||||
<radiogroup Id="rdDatas">
|
||||
<hbox>
|
||||
<radio id="rdFecViaje"
|
||||
label="${c:l('editarPricingController.ckFecViagem.value')}"
|
||||
checked="true" />
|
||||
<radio id="rdFecVenta"
|
||||
label="${c:l('editarPricingController.ckFecCompra.value')}"
|
||||
checked="false" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.hIni.value')}" />
|
||||
<timebox id="horarioinicio" format="HH:mm"
|
||||
mold="rounded" constraint="no empty"
|
||||
value="@{winEditarGP_PricingDia$composer.pricingDia.horarioinicio}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.hFim.value')}" />
|
||||
<timebox id="horariofin" format="HH:mm"
|
||||
mold="rounded" constraint="no empty"
|
||||
value="@{winEditarGP_PricingDia$composer.pricingDia.horariofin}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lbDias.value')}" />
|
||||
<hbox>
|
||||
<checkbox id="rdLun"
|
||||
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdMar"
|
||||
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdMie"
|
||||
label="${c:l('editarPricingController.lbMieM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdJue"
|
||||
label="${c:l('editarPricingController.lbJueM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdVie"
|
||||
label="${c:l('editarPricingController.lbVieM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdSab"
|
||||
label="${c:l('editarPricingController.lbSabM.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="rdDom"
|
||||
label="${c:l('editarPricingController.lbDomM.value')}"
|
||||
checked="false" />
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,346 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingEspecifico"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
|
||||
<window id="winEditarGP_PricingEspecifico" border="normal"
|
||||
apply="${editarGP_PricingEspecificoController}" width="600px"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('busqueDaGPPricingEspecifico.window.title')}">
|
||||
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnApagar" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button id="btnSalvar" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnSalvar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnCopiar" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/copiar.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnCopiar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
|
||||
<button id="btnFechar"
|
||||
onClick="winEditarGP_PricingEspecifico.detach()" height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnFechar.tooltiptext')}" />
|
||||
|
||||
<separator orient="vertical" />
|
||||
|
||||
|
||||
<colorbox id="colorChoose"
|
||||
style="color: red; font-style: oblique;" hash="true"
|
||||
pickerClosable="false" pickerPosition="right" width="55px" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<tabbox id="tb">
|
||||
<tabs id="tabs">
|
||||
<tab id="A"
|
||||
label="${c:l('editarPricingEspecificoController.tabGen.label')}" />
|
||||
<tab id="B"
|
||||
label="${c:l('editarPricingEspecificoController.tabCat.label')}" />
|
||||
<tab id="C"
|
||||
label="${c:l('editarPricingEspecificoController.tabAge.label')}" />
|
||||
<tab id="D"
|
||||
label="${c:l('editarPricingController.ptovta.value')}" />
|
||||
</tabs>
|
||||
|
||||
<tabpanels>
|
||||
<!-- General -->
|
||||
<tabpanel>
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.nombrePricingEsp.label')}" />
|
||||
<textbox id="nombrePricing"
|
||||
constraint="no empty" maxlength="20"
|
||||
value="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.nombPricing}"
|
||||
width="50%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhFechaHoraInicio.label')}" />
|
||||
<datebox width="200px" id="fechaInicio"
|
||||
value="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.fechorinicio}"
|
||||
format="dd/MM/yyyy HH:mm" mold="rounded" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhFechaHoraFin.label')}" />
|
||||
<datebox width="200px" id="fechaFin"
|
||||
value="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.fechorfin}"
|
||||
format="dd/MM/yyyy HH:mm" mold="rounded" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lhCorridaId.labelLH')}" />
|
||||
<intbox id="txtCorridaId" mold="rounded"
|
||||
value="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.corridaId}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.windowTipoServicio.title')}" />
|
||||
<combobox id="cmbServicio"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingEspecifico$composer.lsclaseServicio}"
|
||||
selectedItem="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.claseServicio}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.marca.value')}" />
|
||||
<combobox id="cmbMarca"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingEspecifico$composer.lsMarca}"
|
||||
selectedItem="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.marca}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.origem.label')}" />
|
||||
<combobox id="cmbOrigem"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
selectedItem="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.parada}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.destino.label')}" />
|
||||
<combobox id="cmbDestino"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
selectedItem="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.parada1}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.impMon.value')}" />
|
||||
<combobox id="cmbMoneda"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingEspecifico$composer.lsMoneda}"
|
||||
selectedItem="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.moneda}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.tarifiaredondoabierto.label')}" />
|
||||
<textbox id="tarifaAbierto"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="7" scale="2" constraint="no empty"
|
||||
value="@{winEditarGP_PricingEspecifico$composer.pricingEspecifico.tarifaredabierto,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.exibirVenda.label')}" />
|
||||
<radiogroup Id="radioExibirVenda">
|
||||
<hbox align="center">
|
||||
<radio Id="rdExibirVendaSi"
|
||||
label="${c:l('editarPricingController.si.label')}"
|
||||
checked="true" />
|
||||
<radio Id="rdExibirVendaNo"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="Permite Sobreposição" />
|
||||
<radiogroup Id="radioSobreposicao">
|
||||
<hbox align="center">
|
||||
<radio Id="rdSobreposicaoSim"
|
||||
label="${c:l('editarPricingController.si.label')}" />
|
||||
<radio Id="rdSobreposicaoNao"
|
||||
label="${c:l('editarPricingController.no.label')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<grid>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="100%" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoOcupacionController.ocupacao.label')}:" />
|
||||
<button
|
||||
id="btnNovoPricingEspOcup" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoVigencia.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarPricingEspOcup" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button
|
||||
id="btnModificarPricingEspOcup" disabled="${arg.isReadOnly}"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox
|
||||
id="pricingListEspOcupacion"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(tarifa)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.tarifa.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(ocupacioninicial)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.ocupacionInicial.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(ocupacionfinal)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.ocupacionFinal.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(desconto)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.desconto.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- CATEGORIA -->
|
||||
<tabpanel>
|
||||
<grid>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="100%" width="100%">
|
||||
<hbox>
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoController.categoria.label')}" />
|
||||
<combobox id="cmbCategoria"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarGP_PricingEspecifico$composer.lsCategoria}"
|
||||
mold="rounded" buttonVisible="true" width="90%"/>
|
||||
<button
|
||||
id="btnNovoPricingCategoria" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnAgencia.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarPricingEspCategoria" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarAgencia.tooltiptext')}" />
|
||||
</hbox>
|
||||
<listbox id="pricingListEspCategoria" height="300px"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(categoria.categoriaId)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.agenciaId.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(categoria.desccategoria)"
|
||||
label="${c:l('editarPricingEspecificoController.categoria.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
|
||||
<!-- AGENCIA -->
|
||||
<tabpanel>
|
||||
<grid>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="100%" width="100%">
|
||||
<hbox>
|
||||
<label
|
||||
value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}" />
|
||||
<combobox id="cmbPuntoVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
mold="rounded" buttonVisible="true" width="90%" />
|
||||
<button
|
||||
id="btnNovoPricingAgencia" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnAgencia.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarPricingEspAgencia" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarAgencia.tooltiptext')}" />
|
||||
</hbox>
|
||||
<listbox id="pricingListEspAgencia" height="300px"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(tarifa)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.agenciaId.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(ocupacioninicial)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.agencia.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- CANAL DE VENDA -->
|
||||
<tabpanel>
|
||||
<grid>
|
||||
<rows>
|
||||
<row>
|
||||
<vbox height="100%" width="100%">
|
||||
<hbox>
|
||||
<label
|
||||
value="${c:l('editarPricingController.ptovta.value')}" />
|
||||
<combobox id="cmbPtovta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingEspecifico$composer.lsPtovata}"/>
|
||||
<button
|
||||
id="btnNovoPricingCanal" disabled="${arg.isReadOnly}"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnAgencia.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarPricingEspCanal" disabled="${arg.isReadOnly}"
|
||||
height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarAgencia.tooltiptext')}" />
|
||||
</hbox>
|
||||
<listbox id="pricingListEspCanal" height="300px"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(tarifa)"
|
||||
label="${c:l('editarPricingEspecificoOcupacionController.agenciaId.label')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(ocupacioninicial)"
|
||||
label="${c:l('editarPricingController.ptovta.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</window>
|
||||
|
||||
</zk>
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingEspecificoOcupacion"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
|
||||
<window id="winEditarGP_PricingEspecificoOcupacion" border="normal"
|
||||
apply="${editarGP_PricingEspecificoOcupacionController}" width="600px"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.window.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarPricingEspOcup" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingVigenciaController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarGP_PricingEspecificoOcupacion.detach()"
|
||||
tooltiptext="${c:l('editarPricingVigenciaController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoOcupacionController.tarifa.label')}" />
|
||||
<textbox id="tarifa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="7" scale="2" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoOcupacionController.ocupacionInicial.label')}" />
|
||||
<textbox id="ocupacioninicial"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="7" scale="2" constraint="no empty" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoOcupacionController.ocupacionFinal.label')}" />
|
||||
<textbox id="ocupacionfinal"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="7" scale="2" constraint="no empty" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingEspecificoOcupacionController.desconto.label')}" />
|
||||
<textbox id="desconto"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
precision="5" scale="2" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingFormapago"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingFormapago" border="normal" width="550px"
|
||||
contentStyle="overflow:auto"
|
||||
apply="${editarGP_PricingFormapagoController}">
|
||||
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarFormaPago" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarGP_PricingFormapago.detach()"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="50%" />
|
||||
<column width="50%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label id="lblIndexcepcion"
|
||||
value="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
|
||||
|
||||
<radiogroup id="radioIndexcepcion">
|
||||
<hbox>
|
||||
<radio id="si"
|
||||
label="${c:l('editarConfiguracionGeneralController.RadSi.value')}" />
|
||||
<radio id="no"
|
||||
label="${c:l('editarConfiguracionGeneralController.RadNo.value')}" />
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row>
|
||||
<label id="lblFormaPago"
|
||||
value="${c:l('busquedaRestriccionFormaPagoController.FormaPago')}" />
|
||||
<combobox id="cmbFormaPago" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
constraint="no empty" mold="rounded" buttonVisible="true"
|
||||
model="@{winEditarGP_PricingFormapago$composer.lsFormaPago}"
|
||||
selectedItem="@{winEditarGP_PricingFormapago$composer.pricingFormapago.formaPago}" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingImporte"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingImporte" border="normal"
|
||||
apply="${editarGP_PricingImporteController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowImporte.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverImporte" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingImporteController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarImporte" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingImporteController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingImporte.detach()"
|
||||
tooltiptext="${c:l('editarPricingImporteController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.importe.value')}"/>
|
||||
<textbox id="importe" constraint="${c:new('com.rjconsultores.ventaboletos.web.utilerias.ConstraintDecimalBoxNumberValid')}" precision="7" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarGP_PricingImporte$composer.pricingImporte.importe,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.moneda.value')}"/>
|
||||
<combobox id="cmbMoneda" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingImporte$composer.lsMoneda}"
|
||||
selectedItem="@{winEditarGP_PricingImporte$composer.pricingImporte.moneda}" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingMarca"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingMarca" border="normal"
|
||||
apply="${editarGP_PricingMarcaController}"
|
||||
width="500px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowMarca.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverMarca" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingMarcaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarMarca" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingMarcaController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingMarca.detach()"
|
||||
tooltiptext="${c:l('editarPricingMarcaController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.marca.value')}"/>
|
||||
<combobox id="cmbMarca" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarGP_PricingMarca$composer.lsMarca}"
|
||||
selectedItem="@{winEditarGP_PricingMarca$composer.pricingMarca.marca}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingMercado"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingMercado" border="normal"
|
||||
apply="${editarGP_PricingMercadoController}" position=""
|
||||
width="600px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowMercado.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverMercado" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingMercadoController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarMercado" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingMercadoController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingMercado.detach()"
|
||||
tooltiptext="${c:l('editarPricingMercadoController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="30%" />
|
||||
<column width="70%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.mercadoOrigen.value')}"/>
|
||||
<combobox id="cmbOrigen" autodrop="false" constraint="no empty" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
/>
|
||||
<!-- selectedItem="@{winEditarGP_PricingMercado$composer.pricingMercado.origen}" -->
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.mercadoDestino.value')}"/>
|
||||
<combobox id="cmbDestino" autodrop="false" constraint="no empty" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
/>
|
||||
<!-- selectedItem="@{winEditarGP_PricingMercado$composer.pricingMercado.destino}" -->
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingOcupaAntecipa"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingOcupaAntecipa" border="normal"
|
||||
apply="${editarGP_PricingOcupaAntecipaController}" width="450px"
|
||||
height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowOcupacion.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarOcupaAntecipa" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnSalvar.tooltiptext')}" />
|
||||
|
||||
<button disabled="${arg.isReadOnly}"
|
||||
id="btnApagarOcupaAntecipa" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
|
||||
<button id="btnCerrar" height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingOcupaAntecipa.detach()"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true" renderdefer="800">
|
||||
<columns>
|
||||
<column width="45%" />
|
||||
<column width="55%" />
|
||||
<column width="45%" />
|
||||
<column width="55%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionIni.value')}" />
|
||||
<intbox id="ocupacioninicial" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.ocupacioninicial}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionFin.value')}" />
|
||||
<intbox id="ocupacionfinal" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.ocupacionfinal}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionMin.value')}" />
|
||||
<intbox id="cantasientosmin" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantasientosmin}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionMax.value')}" />
|
||||
<intbox id="cantasientosmax" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantasientosmax}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.anticipacionMin.value')}" />
|
||||
<intbox id="cantdiasmin" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantdiasmin}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.anticipacionMax.value')}" />
|
||||
<intbox id="cantdiasmax" maxlength="3"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantdiasmax}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
|
||||
<textbox id="porcentaje" precision="7" scale="2"
|
||||
width="80%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.importe.value')}" />
|
||||
<textbox id="importe" precision="7" scale="2"
|
||||
width="80%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarGP_PricingOcupaAntecipa$composer.pricingOcupaAntecipa.importe,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
</row>
|
||||
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('editarPricingController.label.cor')}" />
|
||||
<colorbox id="colorChoose"
|
||||
style="color: red; font-style: oblique;"
|
||||
hash="true"
|
||||
pickerClosable="false"
|
||||
pickerPosition="right"
|
||||
width="55px"/>
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('editarPricingClasseTarifariaController.label.title')}" />
|
||||
<combobox id="cmbPricingClasseTarifaria" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true"
|
||||
model="@{winEditarGP_PricingOcupaAntecipa$composer.lsClasseTarifarias}" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingOcupaAntecipaAutomatico"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingOcupaAntecipaAutomatico" border="normal"
|
||||
apply="${editarGP_PricingOcupaAntecipaAutomaticoController}"
|
||||
height="90%" width="100%" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingAutomaticoController.windowOcupacion.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarOcupaAntecipa" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnSalvar.tooltiptext')}"
|
||||
disabled="@load{winwinEditarPricingOcupaAntecipa$composer.hasNoElements }"/>
|
||||
<button id="btnCerrar" height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingOcupaAntecipaAutomatico.detach()"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<radiogroup id="selectPoltronasOuOcupacao" />
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="10%">
|
||||
<label value="${c:l('editarPricingAutomaticoController.columnaDia.label')}"/>
|
||||
</column>
|
||||
<column width="15%">
|
||||
<label value="${c:l('editarPricingAutomaticoController.columnaPorcentaje.label')}"/>
|
||||
</column>
|
||||
<column width="15%">
|
||||
<label value="${c:l('editarPricingAutomaticoController.columnaOcupacionMin.label')}"/>
|
||||
</column>
|
||||
<column width="20%">
|
||||
<label value="${c:l('editarPricingAutomaticoController.columnaOcupacionMax.label')}"/>
|
||||
</column>
|
||||
<column width="20%"/>
|
||||
<column width="15%">
|
||||
<label value="${c:l('editarPricingController.label.cor')}" />
|
||||
</column>
|
||||
<column width="5%" align="center"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<intbox id="cantdiasmin"/>
|
||||
<textbox id="porcentaje" precision="7" scale="2" width="80%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
<intbox id="ocupacioninicial"/>
|
||||
<intbox id="ocupacionfinal"/>
|
||||
<hbox>
|
||||
<radio id="rdPoltronas" label="Poltronas" radiogroup="selectPoltronasOuOcupacao"/>
|
||||
<radio id="rdOcupacao" label="Ocupacao" radiogroup="selectPoltronasOuOcupacao"/>
|
||||
</hbox>
|
||||
<colorbox id="colorChoose"
|
||||
style="color: red; font-style: oblique;"
|
||||
hash="true"
|
||||
pickerClosable="false"
|
||||
pickerPosition="right"
|
||||
width="55px"/>
|
||||
<button id="btnlancar" height="20"
|
||||
image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnSalvar.tooltiptext')}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<listbox id="pricingOcupaAntecipaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
height="90%"
|
||||
width="100%"
|
||||
hflex="true">
|
||||
<auxhead>
|
||||
<auxheader label="${c:l('editarPricingController.dias.label')}" rowspan="2" colspan="3" align="center"/>
|
||||
<auxheader label="${c:l('editarPricingController.antecipacao.label')}" rowspan="2" colspan="4" align="center"/>
|
||||
<auxheader label="${c:l('editarPricingController.poltronas.label')}" colspan="107"/>
|
||||
</auxhead>
|
||||
<frozen columns="7" />
|
||||
<listhead hflex="true"
|
||||
width="100%">
|
||||
<listheader id="${each}"
|
||||
forEach="${winEditarGP_PricingOcupaAntecipaAutomatico$composer.columns}"
|
||||
label="${each}"
|
||||
width="20px"
|
||||
align="center">
|
||||
</listheader>
|
||||
</listhead>
|
||||
</listbox>
|
||||
<listbox id="pricingOcupaAntecipaLegendaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox">
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingPuntoVenta"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingPuntoVenta" border="normal"
|
||||
apply="${editarGP_PricingPuntoVentaController}"
|
||||
width="600px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowPuntoVenta.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverPuntoVenta" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingPuntoVentaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarPuntoVenta" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingPuntoVentaController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingPuntoVenta.detach()"
|
||||
tooltiptext="${c:l('editarPricingPuntoVentaController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.punto.value')}"/>
|
||||
<combobox id="cmbPuntoVenta" autodrop="false" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"/>
|
||||
</row>
|
||||
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingRuta"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingRuta" border="normal"
|
||||
apply="${editarGP_PricingRutaController}"
|
||||
width="600px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowRuta.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverRuta" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingRutaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarRuta" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingRutaController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingRuta.detach()"
|
||||
tooltiptext="${c:l('editarPricingRutaController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.ruta.value')}"/>
|
||||
<combobox id="cmbRuta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="99%"
|
||||
model="@{winEditarGP_PricingRuta$composer.lsRuta}"
|
||||
selectedItem="@{winEditarGP_PricingRuta$composer.pricingRuta.ruta}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingTipoPtoVta"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingTipoPtoVta" border="normal"
|
||||
apply="${editarGP_PricingTipoPtoVtaController}"
|
||||
width="500px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowTipoPtoVta.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverTipoPtoVta" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingTipoPtoVtaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarTipoPtoVta" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingTipoPtoVtaController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingTipoPtoVta.detach()"
|
||||
tooltiptext="${c:l('editarPricingTipoPtoVtaController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.ptovta.value')}"/>
|
||||
<combobox id="cmbTipoPtoVta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarGP_PricingTipoPtoVta$composer.lsTipoPtoVta}"
|
||||
selectedItem="@{winEditarGP_PricingTipoPtoVta$composer.pricingTipoPtoVta.tipoPtovta}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingTipoServicio"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingTipoServicio" border="normal"
|
||||
apply="${editarGP_PricingTipoServicioController}"
|
||||
width="500px" height="557x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowTipoServicio.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverTipoServicio" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingTipoServicioController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarTipoServicio" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingTipoServicioController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarGP_PricingTipoServicio.detach()"
|
||||
tooltiptext="${c:l('editarPricingTipoServicioController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.tipoServicio.value')}"/>
|
||||
<combobox id="cmbTipoServicio" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winEditarGP_PricingTipoServicio$composer.lsTipoServicio}"
|
||||
selectedItem="@{winEditarGP_PricingTipoServicio$composer.pricingTipoServicio.tipoServicio}" />
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGP_PricingVigencia"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarGP_PricingVigencia" border="normal"
|
||||
apply="${editarGP_PricingVigenciaController}" width="500px"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowVigencia.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarVigencia" disabled="${arg.isReadOnly}" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingVigenciaController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarGP_PricingVigencia.detach()"
|
||||
tooltiptext="${c:l('editarPricingVigenciaController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigInicioViaje.value')}" />
|
||||
<datebox id="fecinicioviaje" width="80%"
|
||||
mold="rounded" format="dd/MM/yyyy HH:mm" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigFinViaje.value')}" />
|
||||
<datebox id="fecfinviaje" constraint="no empty"
|
||||
width="80%" mold="rounded"
|
||||
format="dd/MM/yyyy HH:mm" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigInicioVenta.value')}" />
|
||||
<datebox id="fecinicioventa" constraint="no empty"
|
||||
width="80%" mold="rounded"
|
||||
format="dd/MM/yyyy HH:mm" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.vigFinVenta.value')}" />
|
||||
<datebox id="fecfinventa" constraint="no empty"
|
||||
width="80%" mold="rounded"
|
||||
format="dd/MM/yyyy HH:mm" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,392 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winGestaoPricing"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winGestaoPricing"
|
||||
title="${c:l('busquedaPricingController.window.title')}"
|
||||
apply="${gestaoPricingController}" contentStyle="overflow:auto"
|
||||
width="1200px" height="570px" forward="onCreate=onCreateWindow" border="normal" sizable="true">
|
||||
<toolbar>
|
||||
|
||||
|
||||
<button id="btnCerrar" onClick="winGestaoPricing.detach()"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaPricingController.btnCerrar.tooltiptext')}" />
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row >
|
||||
<label value="${c:l('editarPricingController.mercadoOrigen.value')}"/>
|
||||
<combobox id="cmbOrigen" autodrop="false" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="96%"
|
||||
/>
|
||||
<label value="${c:l('editarPricingController.mercadoDestino.value')}"/>
|
||||
<combobox id="cmbDestino" autodrop="false" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="96%"
|
||||
/>
|
||||
</row>
|
||||
|
||||
<row >
|
||||
<label
|
||||
value="${c:l('busquedaPricingController.lhEmpresa.label')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="96%"
|
||||
model="@{winGestaoPricing$composer.lsEmpresa}">
|
||||
</combobox>
|
||||
|
||||
<label value="${c:l('editarPricingController.windowTipoServicio.title')}"/>
|
||||
<combobox id="cmbTipoServicio" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="96%"
|
||||
model="@{winGestaoPricing$composer.lsClaseServicio}"/>
|
||||
</row>
|
||||
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('editarPricingController.ruta.value')}" />
|
||||
<combobox id="cmbRuta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="98.5%"
|
||||
model="@{winGestaoPricing$composer.lsRuta}"
|
||||
>
|
||||
</combobox>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="${c:l('gestaoPricing.dataSemana.label')}" />
|
||||
<datebox width="96%" id="fechaSemana" mold="rounded" format="dd/MM/yyyy" />
|
||||
|
||||
<label value="${c:l('gestaoPricing.numeroSemana.label')}" />
|
||||
<intbox width="96%" id="numeroSemana" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.vigHoraInicioViaje.value')}" />
|
||||
<datebox width="96%" id="fechaInicio" mold="rounded" format="dd/MM/yyyy" disabled="true" />
|
||||
|
||||
<label value="${c:l('editarPricingController.vigHoraFinViaje.value')}" />
|
||||
<datebox width="96%" id="fechaFin" mold="rounded" format="dd/MM/yyyy" disabled="true"/>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('busquedaPricingController.btnPesquisa.label')}" />
|
||||
|
||||
<button id="btnReturn" image="/gui/img/return.gif"
|
||||
width="35px" height="20"
|
||||
tooltiptext="Voltar ao estado da pesquisa antes de adicionar e salvar." />
|
||||
|
||||
<button id="btnSalvar" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnSalvar.tooltiptext')}" />
|
||||
|
||||
|
||||
</toolbar>
|
||||
|
||||
<html><![CDATA[
|
||||
<head>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
div.container {
|
||||
display: grid;
|
||||
grid-template-columns: 150px 20px auto;
|
||||
grid-template-rows: auto;
|
||||
|
||||
}
|
||||
|
||||
div.left {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 2;
|
||||
grid-row-start: row1-start
|
||||
grid-row-end: 3;
|
||||
padding-left: 29px;
|
||||
|
||||
}
|
||||
|
||||
div.right {
|
||||
grid-column-start: 3;
|
||||
grid-column-end: 4;
|
||||
grid-row-start: 1;
|
||||
grid-row-end; 1;
|
||||
}
|
||||
|
||||
div.below {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 4;
|
||||
grid-row-start: 2;
|
||||
grid-row-end; 2;
|
||||
}
|
||||
|
||||
|
||||
.btn-group .button {
|
||||
font-size: 14px;
|
||||
border: 1px solid black;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
width: 120px;
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
.btn-group .button:not(:last-child) {
|
||||
border-bottom: none; /* Prevent double borders */
|
||||
}
|
||||
|
||||
.btn-group .button:hover {
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="gui/js/handsontable.full.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="gui/js/main.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/handsontable-pro@6.2.0/dist/handsontable.full.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="left">
|
||||
<div id="buttons" class="btn-group" style="width: 140px; height: 300px; overflow-y: scroll;">
|
||||
<label class="one">Cenários</label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabela" class="right hot head-gap handsontable htRowHeaders htColumnHeaders" style="height: 150px; overflow: hidden; width: 900px;" data-originalstyle="height: 150px; width: 900px;">
|
||||
</div>
|
||||
<div class="below"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" defer="true">
|
||||
$(document).ready(function loading() {
|
||||
|
||||
|
||||
var tabela = document.getElementById('tabela');
|
||||
var buttons = document.getElementById('buttons');
|
||||
var divPricings = document.getElementById('divPricings');
|
||||
var btnSalvar = document.getElementById("${btnSalvar.uuid}");
|
||||
|
||||
var data = ${arg.color};
|
||||
|
||||
var jsonParameter = JSON.stringify(data);
|
||||
|
||||
var json = JSON.parse(jsonParameter);
|
||||
|
||||
json.forEach(function(item){
|
||||
|
||||
var id = item.id;
|
||||
var cor = item.color;
|
||||
var corBack = item.backgroundColor;
|
||||
|
||||
var btn = document.createElement("BUTTON");
|
||||
btn.innerHTML = item.id;
|
||||
var div = document.getElementById('buttons');
|
||||
|
||||
btn.name = "button";
|
||||
btn.id = id;
|
||||
btn.setAttribute('type', 'button');
|
||||
btn.setAttribute('class', 'button');
|
||||
|
||||
btn.style.color = cor;
|
||||
btn.style.backgroundColor = corBack;
|
||||
|
||||
div.appendChild(btn);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var json = ${arg.json}
|
||||
var
|
||||
container,
|
||||
hot3;
|
||||
var settings3 = {
|
||||
data: json,
|
||||
readOnly: true,
|
||||
width: 1000,
|
||||
height: 300,
|
||||
colWidths: 125,
|
||||
rowHeights: 23,
|
||||
rowHeaders: false,
|
||||
colHeaders: true,
|
||||
className: "htCenter",
|
||||
outsideClickDeselects: false,
|
||||
colHeaders: ['Serviço', 'Domingo', 'Segunda', 'Terça', 'Quarta','Quinta','Sexta', 'Sábado'],
|
||||
licenseKey: 'non-commercial-and-evaluation',
|
||||
selectionMode: 'multiple',
|
||||
};
|
||||
hot3 = new Handsontable(tabela, settings3);
|
||||
|
||||
hot3.updateSettings({
|
||||
|
||||
renderer: loadRenderer
|
||||
|
||||
// cells: function(row, col, prop, target, source) {
|
||||
// var cellProperties = {};
|
||||
|
||||
// cellProperties.renderer = loadRenderer;
|
||||
|
||||
// if (hot3.getDataAtCell(hot3.toVisualRow(row), 0) == 'CA') {
|
||||
// cellProperties.className = 'myClass';
|
||||
// }
|
||||
|
||||
// var valor = hot3.getDataAtCell(row, col);
|
||||
// if (valor === 'CA' ) {
|
||||
// cellProperties.className = 'vermelho';
|
||||
// cellProperties.renderer = 'myClass';
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// return cellProperties;
|
||||
// },
|
||||
})
|
||||
|
||||
|
||||
function loadRenderer(instance, td, row, col, prop, value, cellProperties) {
|
||||
Handsontable.renderers.TextRenderer.apply(this, arguments);
|
||||
|
||||
td.style.color = 'black';
|
||||
td.style.backgroundColor = 'white';
|
||||
|
||||
var valor = hot3.getDataAtCell(row, col);
|
||||
|
||||
if (valor === 'CA' ) {
|
||||
td.style.color = 'black';
|
||||
td.style.backgroundColor = 'red';
|
||||
}
|
||||
|
||||
if (valor === 'TP' ) {
|
||||
td.style.color = 'white';
|
||||
td.style.backgroundColor = 'black';
|
||||
}
|
||||
|
||||
|
||||
|
||||
var data = ${arg.color};
|
||||
|
||||
var jsonParameter = JSON.stringify(data);
|
||||
|
||||
var json = JSON.parse(jsonParameter);
|
||||
|
||||
json.forEach(function(item){
|
||||
|
||||
var id = item.id;
|
||||
var cor = item.color;
|
||||
var corBack = item.backgroundColor;
|
||||
|
||||
if (valor === id ) {
|
||||
td.style.color = cor;
|
||||
td.style.backgroundColor = corBack;
|
||||
}
|
||||
|
||||
// console.log(item.id + ' ' + item.color + ' ' + item.backgroundColor );
|
||||
});
|
||||
|
||||
// var color = ${arg.color}
|
||||
// console.log(color);
|
||||
//
|
||||
// alert(color)
|
||||
return td;
|
||||
|
||||
}
|
||||
|
||||
function firstRenderer(instance, td, row, col, prop, value, cellProperties) {
|
||||
Handsontable.renderers.TextRenderer.apply(this, arguments);
|
||||
|
||||
// get reference to data
|
||||
var data = instance.getData();
|
||||
// grab the value of the current row at the column we want to compare to
|
||||
var valueAtC = data[row][2];
|
||||
// alert(value)
|
||||
var button = document.getElementById(value);
|
||||
|
||||
var style = getComputedStyle(button);
|
||||
|
||||
// alert(style.backgroundColor);
|
||||
td.style.color = style['color'];
|
||||
td.style.backgroundColor = style['background-color'];
|
||||
// console.log(style['background-color']);
|
||||
|
||||
// if (valueAtC > value) {
|
||||
// td.style.backgroundColor = value;
|
||||
// } else {
|
||||
// td.style.backgroundColor = value;
|
||||
// }
|
||||
|
||||
return td;
|
||||
|
||||
}
|
||||
|
||||
btnSalvar.addEventListener('click', function(event) {
|
||||
|
||||
zAu.send(new zk.Event(zk.Widget.$('$winGestaoPricing'),
|
||||
'onNotifyServer',hot3.getSourceData()));
|
||||
});
|
||||
|
||||
buttons.addEventListener('click', function(event) {
|
||||
|
||||
var selected = hot3.getSelected();
|
||||
var target = event.target.id;
|
||||
|
||||
if (target == 'one' || target == 'buttons' || target == '' || selected == ''){
|
||||
return
|
||||
}
|
||||
|
||||
for (var index = 0; index < selected.length; index += 1) {
|
||||
|
||||
var item = selected[index];
|
||||
var startRow = Math.min(item[0], item[2]);
|
||||
var endRow = Math.max(item[0], item[2]);
|
||||
var startCol = Math.min(item[1], item[3]);
|
||||
var endCol = Math.max(item[1], item[3]);
|
||||
|
||||
for (var rowIndex = startRow; rowIndex <= endRow; rowIndex += 1) {
|
||||
for (var columnIndex = startCol; columnIndex <= endCol; columnIndex += 1) {
|
||||
var selectedCell = hot3.getDataAtCell(rowIndex,columnIndex);
|
||||
if (target !== 'salvar' && target !== 'carregar' && columnIndex > 0 && target !== 'Vazio' && target !== 'buttons' && target !== 'one' && selectedCell !== '' ) {
|
||||
hot3.setDataAtCell(rowIndex, columnIndex, target);
|
||||
hot3.setCellMeta(rowIndex, columnIndex, 'renderer', firstRenderer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (target === 'salvar') {
|
||||
zAu.send(new zk.Event(zk.Widget.$('$winGestaoPricing'),
|
||||
'onNotifyServer',hot3.getSourceData()));
|
||||
}
|
||||
|
||||
if (target === 'carregar') {
|
||||
zAu.send(new zk.Event(zk.Widget.$('$winGestaoPricing'),
|
||||
'onLoad',hot3.getSourceData()));
|
||||
}
|
||||
hot3.render();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
]]></html>
|
||||
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue