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;
|
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.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
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.Checkbox;
|
||||||
import org.zkoss.zul.Timebox;
|
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
|
* @author Rafius
|
||||||
|
@ -34,11 +36,14 @@ import org.zkoss.zul.Timebox;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class EditarPricingDiaController extends MyGenericForwardComposer {
|
public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static Logger log = Logger.getLogger(EditarPricingDiaController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PricingDiaService pricingDiaService;
|
private PricingDiaService pricingDiaService;
|
||||||
private PricingDia pricingDia;
|
private PricingDia pricingDia;
|
||||||
private MyListbox pricingDiaList;
|
private MyListbox pricingDiaList;
|
||||||
private static Logger log = Logger.getLogger(EditarPricingDiaController.class);
|
|
||||||
private Checkbox rdLun;
|
private Checkbox rdLun;
|
||||||
private Checkbox rdMar;
|
private Checkbox rdMar;
|
||||||
private Checkbox rdMie;
|
private Checkbox rdMie;
|
||||||
|
@ -49,6 +54,9 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||||
private Timebox horarioinicio;
|
private Timebox horarioinicio;
|
||||||
private Timebox horariofin;
|
private Timebox horariofin;
|
||||||
|
|
||||||
|
private Checkbox ckFecViaje;
|
||||||
|
private Checkbox ckFecVenta;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
|
||||||
|
@ -76,9 +84,16 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||||
if (pricingDia.getIndsabado() == Boolean.TRUE) {
|
if (pricingDia.getIndsabado() == Boolean.TRUE) {
|
||||||
rdSab.setChecked(true);
|
rdSab.setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pricingDia.getInddomingo() == Boolean.TRUE) {
|
if (pricingDia.getInddomingo() == Boolean.TRUE) {
|
||||||
rdDom.setChecked(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;
|
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;
|
podeTodos[i] = podeSalvar;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -181,6 +206,9 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||||
pricingDia.setIndsabado(rdSab.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
pricingDia.setIndsabado(rdSab.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||||
pricingDia.setInddomingo(rdDom.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.setHorarioinicio(DateUtil.getFecInicio(horarioinicio.getValue()).getTime());
|
||||||
pricingDia.setHorariofin(DateUtil.getFecInicio(horariofin.getValue()).getTime());
|
pricingDia.setHorariofin(DateUtil.getFecInicio(horariofin.getValue()).getTime());
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class RenderPricingDia implements ListitemRenderer {
|
||||||
ckbLun.setParent(lc);
|
ckbLun.setParent(lc);
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
|
||||||
Checkbox ckbMar = new Checkbox();
|
Checkbox ckbMar = new Checkbox();
|
||||||
if (pc.getIndmartes() == Boolean.TRUE) {
|
if (pc.getIndmartes() == Boolean.TRUE) {
|
||||||
ckbMar.setChecked(true);
|
ckbMar.setChecked(true);
|
||||||
|
@ -61,7 +60,6 @@ public class RenderPricingDia implements ListitemRenderer {
|
||||||
ckbMar.setParent(lc);
|
ckbMar.setParent(lc);
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
|
||||||
Checkbox ckbMie = new Checkbox();
|
Checkbox ckbMie = new Checkbox();
|
||||||
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
if (pc.getIndmiercoles() == Boolean.TRUE) {
|
||||||
ckbMie.setChecked(true);
|
ckbMie.setChecked(true);
|
||||||
|
@ -117,6 +115,28 @@ public class RenderPricingDia implements ListitemRenderer {
|
||||||
ckbDom.setParent(lc);
|
ckbDom.setParent(lc);
|
||||||
lc.setParent(lstm);
|
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);
|
lstm.setAttribute("data", pc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2139,8 +2139,9 @@ editarPricingController.lbJueM.value = Qui
|
||||||
editarPricingController.lbVieM.value = Sex
|
editarPricingController.lbVieM.value = Sex
|
||||||
editarPricingController.lbSabM.value = Sáb
|
editarPricingController.lbSabM.value = Sáb
|
||||||
editarPricingController.lbDomM.value = Dom
|
editarPricingController.lbDomM.value = Dom
|
||||||
editarPricingController.rdFechaViagem.value = Data da Viagem
|
editarPricingController.lbDatas.value = Datas
|
||||||
editarPricingController.rdFechaCompra.value = Data da Compra
|
editarPricingController.ckFecViagem.value = Data da Viagem
|
||||||
|
editarPricingController.ckFecCompra.value = Data da Compra
|
||||||
editarPricingController.hIni.value = Horário Inicial
|
editarPricingController.hIni.value = Horário Inicial
|
||||||
editarPricingController.hFim.value = Horário Final
|
editarPricingController.hFim.value = Horário Final
|
||||||
editarPricingController.corridaId.value = Nº Serviço
|
editarPricingController.corridaId.value = Nº Serviço
|
||||||
|
|
|
@ -552,33 +552,39 @@
|
||||||
image="/gui/img/create_doc.gif" sort="auto(horariofin)"
|
image="/gui/img/create_doc.gif" sort="auto(horariofin)"
|
||||||
label="${c:l('editarPricingController.hFim.value')}" />
|
label="${c:l('editarPricingController.hFim.value')}" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbLunM.value')}"
|
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||||
sort="auto(indlunes)" />
|
sort="auto(indlunes)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbMarM.value')}"
|
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||||
sort="auto(indmartes)" />
|
sort="auto(indmartes)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbMieM.value')}"
|
label="${c:l('editarPricingController.lbMieM.value')}"
|
||||||
sort="auto(indmiercoles)" />
|
sort="auto(indmiercoles)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbJueM.value')}"
|
label="${c:l('editarPricingController.lbJueM.value')}"
|
||||||
sort="auto(indjueves)" />
|
sort="auto(indjueves)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbVieM.value')}"
|
label="${c:l('editarPricingController.lbVieM.value')}"
|
||||||
sort="auto(indviernes)" />
|
sort="auto(indviernes)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbSabM.value')}"
|
label="${c:l('editarPricingController.lbSabM.value')}"
|
||||||
sort="auto(indsabado)" />
|
sort="auto(indsabado)" />
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif" width="8%"
|
||||||
label="${c:l('editarPricingController.lbDomM.value')}"
|
label="${c:l('editarPricingController.lbDomM.value')}"
|
||||||
sort="auto(inddomingo)" />
|
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>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winEditarPricingDia" border="normal"
|
<window id="winEditarPricingDia" border="normal"
|
||||||
apply="${editarPricingDiaController}"
|
apply="${editarPricingDiaController}" width="400px" height="457x"
|
||||||
width="400px" height="457x" contentStyle="overflow:auto"
|
contentStyle="overflow:auto"
|
||||||
title="${c:l('editarPricingController.windowDia.title')}">
|
title="${c:l('editarPricingController.windowDia.title')}">
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
@ -17,13 +17,13 @@
|
||||||
<button id="btnAdicionarDia" height="20"
|
<button id="btnAdicionarDia" height="20"
|
||||||
image="/gui/img/save.png" width="35px"
|
image="/gui/img/save.png" width="35px"
|
||||||
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
|
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
|
||||||
<button height="20"
|
<button height="20" image="/gui/img/exit.png"
|
||||||
image="/gui/img/exit.png" width="35px"
|
width="35px" onClick="winEditarPricingDia.detach()"
|
||||||
onClick="winEditarPricingDia.detach()"
|
|
||||||
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
|
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="40%" />
|
<column width="40%" />
|
||||||
|
@ -31,25 +31,65 @@
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarPricingController.hIni.value')}"/>
|
<label
|
||||||
<timebox id="horarioinicio" format="HH:mm" mold="rounded" constraint="no empty"
|
value="${c:l('editarPricingController.lbDatas.value')}" />
|
||||||
|
<hbox>
|
||||||
|
<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}" />
|
value="@{winEditarPricingDia$composer.pricingDia.horarioinicio}" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarPricingController.hFim.value')}"/>
|
<label
|
||||||
<timebox id="horariofin" format="HH:mm" mold="rounded" constraint="no empty"
|
value="${c:l('editarPricingController.hFim.value')}" />
|
||||||
|
<timebox id="horariofin" format="HH:mm"
|
||||||
|
mold="rounded" constraint="no empty"
|
||||||
value="@{winEditarPricingDia$composer.pricingDia.horariofin}" />
|
value="@{winEditarPricingDia$composer.pricingDia.horariofin}" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarPricingController.lbDias.value')}"/>
|
<label
|
||||||
|
value="${c:l('editarPricingController.lbDias.value')}" />
|
||||||
<hbox>
|
<hbox>
|
||||||
<checkbox id="rdLun" label="${c:l('editarPricingController.lbLunM.value')}" checked="false"/>
|
<checkbox id="rdLun"
|
||||||
<checkbox id="rdMar" label="${c:l('editarPricingController.lbMarM.value')}" checked="false"/>
|
label="${c:l('editarPricingController.lbLunM.value')}"
|
||||||
<checkbox id="rdMie" label="${c:l('editarPricingController.lbMieM.value')}" checked="false"/>
|
checked="false" />
|
||||||
<checkbox id="rdJue" label="${c:l('editarPricingController.lbJueM.value')}" checked="false"/>
|
<checkbox id="rdMar"
|
||||||
<checkbox id="rdVie" label="${c:l('editarPricingController.lbVieM.value')}" checked="false"/>
|
label="${c:l('editarPricingController.lbMarM.value')}"
|
||||||
<checkbox id="rdSab" label="${c:l('editarPricingController.lbSabM.value')}" checked="false"/>
|
checked="false" />
|
||||||
<checkbox id="rdDom" label="${c:l('editarPricingController.lbDomM.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>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
|
Loading…
Reference in New Issue