Pricing - Customizar Aba de Serviço
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@31007 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
93b9d4ab2d
commit
0d4e23d02b
|
@ -4,15 +4,9 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingDia;
|
||||
import com.rjconsultores.ventaboletos.service.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;
|
||||
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;
|
||||
|
@ -26,6 +20,14 @@ import org.zkoss.zk.ui.util.Clients;
|
|||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingDia;
|
||||
import com.rjconsultores.ventaboletos.service.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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -34,11 +36,14 @@ import org.zkoss.zul.Timebox;
|
|||
@Scope("prototype")
|
||||
public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(EditarPricingDiaController.class);
|
||||
|
||||
@Autowired
|
||||
private PricingDiaService pricingDiaService;
|
||||
private PricingDia pricingDia;
|
||||
private MyListbox pricingDiaList;
|
||||
private static Logger log = Logger.getLogger(EditarPricingDiaController.class);
|
||||
|
||||
private Checkbox rdLun;
|
||||
private Checkbox rdMar;
|
||||
private Checkbox rdMie;
|
||||
|
@ -49,6 +54,9 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
|||
private Timebox horarioinicio;
|
||||
private Timebox horariofin;
|
||||
|
||||
private Checkbox ckFecViaje;
|
||||
private Checkbox ckFecVenta;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
|
@ -76,9 +84,16 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
|||
if (pricingDia.getIndsabado() == Boolean.TRUE) {
|
||||
rdSab.setChecked(true);
|
||||
}
|
||||
|
||||
if (pricingDia.getInddomingo() == Boolean.TRUE) {
|
||||
rdDom.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndfecventa() == Boolean.TRUE) {
|
||||
ckFecVenta.setChecked(true);
|
||||
}
|
||||
if (pricingDia.getIndfecviaje() == Boolean.TRUE) {
|
||||
ckFecViaje.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,6 +153,16 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
|||
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++;
|
||||
}
|
||||
|
@ -181,6 +206,9 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
|||
pricingDia.setIndsabado(rdSab.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setInddomingo(rdDom.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
pricingDia.setIndfecventa(ckFecVenta.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
pricingDia.setIndfecviaje(ckFecViaje.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||
|
||||
pricingDia.setHorarioinicio(DateUtil.getFecInicio(horarioinicio.getValue()).getTime());
|
||||
pricingDia.setHorariofin(DateUtil.getFecInicio(horariofin.getValue()).getTime());
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RenderPricingDia implements ListitemRenderer {
|
|||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
//Lunes
|
||||
// Lunes
|
||||
Checkbox ckbLun = new Checkbox();
|
||||
if (pc.getIndlunes() == Boolean.TRUE) {
|
||||
ckbLun.setChecked(true);
|
||||
|
@ -49,7 +49,6 @@ public class RenderPricingDia implements ListitemRenderer {
|
|||
ckbLun.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
|
||||
Checkbox ckbMar = new Checkbox();
|
||||
if (pc.getIndmartes() == Boolean.TRUE) {
|
||||
ckbMar.setChecked(true);
|
||||
|
@ -61,7 +60,6 @@ public class RenderPricingDia implements ListitemRenderer {
|
|||
ckbMar.setParent(lc);
|
||||
lc.setParent(lstm);
|
||||
|
||||
|
||||
Checkbox ckbMie = new Checkbox();
|
||||
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
||||
ckbMie.setChecked(true);
|
||||
|
@ -117,6 +115,28 @@ public class RenderPricingDia implements ListitemRenderer {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2139,8 +2139,9 @@ editarPricingController.lbJueM.value = Qui
|
|||
editarPricingController.lbVieM.value = Sex
|
||||
editarPricingController.lbSabM.value = Sáb
|
||||
editarPricingController.lbDomM.value = Dom
|
||||
editarPricingController.rdFechaViagem.value = Data da Viagem
|
||||
editarPricingController.rdFechaCompra.value = Data da Compra
|
||||
editarPricingController.lbDatas.value = Datas
|
||||
editarPricingController.ckFecViagem.value = Data da Viagem
|
||||
editarPricingController.ckFecCompra.value = Data da Compra
|
||||
editarPricingController.hIni.value = Horário Inicial
|
||||
editarPricingController.hFim.value = Horário Final
|
||||
editarPricingController.corridaId.value = Nº Serviço
|
||||
|
|
|
@ -552,33 +552,39 @@
|
|||
image="/gui/img/create_doc.gif" sort="auto(horariofin)"
|
||||
label="${c:l('editarPricingController.hFim.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||
sort="auto(indlunes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||
sort="auto(indmartes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbMieM.value')}"
|
||||
sort="auto(indmiercoles)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbJueM.value')}"
|
||||
sort="auto(indjueves)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbVieM.value')}"
|
||||
sort="auto(indviernes)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbSabM.value')}"
|
||||
sort="auto(indsabado)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
image="/gui/img/create_doc.gif" width="8%"
|
||||
label="${c:l('editarPricingController.lbDomM.value')}"
|
||||
sort="auto(inddomingo)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" label="Data Viagem"
|
||||
sort="auto(indfecviaje)" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" label="Data Venda"
|
||||
sort="auto(indfecventa)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarPricingDia" border="normal"
|
||||
apply="${editarPricingDiaController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
apply="${editarPricingDiaController}" width="400px" height="457x"
|
||||
contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowDia.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
|
@ -16,14 +16,14 @@
|
|||
tooltiptext="${c:l('editarPricingDiaController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarDia" 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="winEditarPricingDia.detach()"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}"/>
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarPricingDia.detach()"
|
||||
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
|
@ -31,25 +31,65 @@
|
|||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.hIni.value')}"/>
|
||||
<timebox id="horarioinicio" format="HH:mm" mold="rounded" constraint="no empty"
|
||||
value="@{winEditarPricingDia$composer.pricingDia.horarioinicio}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.hFim.value')}"/>
|
||||
<timebox id="horariofin" format="HH:mm" mold="rounded" constraint="no empty"
|
||||
value="@{winEditarPricingDia$composer.pricingDia.horariofin}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.lbDias.value')}"/>
|
||||
<label
|
||||
value="${c:l('editarPricingController.lbDatas.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"/>
|
||||
<checkbox id="ckFecViaje"
|
||||
label="${c:l('editarPricingController.ckFecViagem.value')}"
|
||||
checked="false" />
|
||||
<checkbox id="ckFecVenta"
|
||||
label="${c:l('editarPricingController.ckFecCompra.value')}"
|
||||
checked="false" />
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.hIni.value')}" />
|
||||
<timebox id="horarioinicio" format="HH:mm"
|
||||
mold="rounded" constraint="no empty"
|
||||
value="@{winEditarPricingDia$composer.pricingDia.horarioinicio}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.hFim.value')}" />
|
||||
<timebox id="horariofin" format="HH:mm"
|
||||
mold="rounded" constraint="no empty"
|
||||
value="@{winEditarPricingDia$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>
|
||||
|
|
Loading…
Reference in New Issue