0004800: Quilometragem - Mudar para decimal
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@33663 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0073ccfa19
commit
cce20f0326
|
@ -119,7 +119,7 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
private Combobox cmbCoeficiente3;
|
||||
private Combobox cmbOrgaoConcedente;
|
||||
private Combobox cmbClaseServicioCoeficiente;
|
||||
private Textbox txKmReal;
|
||||
private MyTextboxDecimal txKmReal;
|
||||
private Textbox txtNome;
|
||||
private Intbox itxCantkmpagoconductor;
|
||||
private MyTextboxDecimal txtKMCoeficiente1;
|
||||
|
@ -145,108 +145,6 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
|
||||
private boolean existeRutaOcupaTramo;
|
||||
|
||||
public Tramo getTramo() {
|
||||
return tramo;
|
||||
}
|
||||
|
||||
public void setTramo(Tramo tramo) {
|
||||
this.tramo = tramo;
|
||||
}
|
||||
|
||||
public List<Via> getLsVias() {
|
||||
return lsVias;
|
||||
}
|
||||
|
||||
public void setLsVias(List<Via> lsVias) {
|
||||
this.lsVias = lsVias;
|
||||
}
|
||||
|
||||
public List<ClaseServicio> getLsClaseServicio() {
|
||||
return lsClaseServicio;
|
||||
}
|
||||
|
||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||
this.lsClaseServicio = lsClaseServicio;
|
||||
}
|
||||
|
||||
public List<TramoServicio> getListaTramoServicio() {
|
||||
return listaTramoServicio;
|
||||
}
|
||||
|
||||
public void setListaTramoServicio(List<TramoServicio> listaTramoServicio) {
|
||||
this.listaTramoServicio = listaTramoServicio;
|
||||
}
|
||||
|
||||
public List<TramoTiempo> getListaTramosTiempo() {
|
||||
return listaTramosTiempo;
|
||||
}
|
||||
|
||||
public void setListaTramosTiempo(List<TramoTiempo> listaTramosTiempo) {
|
||||
this.listaTramosTiempo = listaTramosTiempo;
|
||||
}
|
||||
|
||||
public List<TramoKm> getListaTramosKm() {
|
||||
return listaTramosKm;
|
||||
}
|
||||
|
||||
public void setListaTramosKm(List<TramoKm> listaTramosKm) {
|
||||
this.listaTramosKm = listaTramosKm;
|
||||
}
|
||||
|
||||
public ConstraintNumberBD getConstraintTarifa() {
|
||||
return constraintTarifa;
|
||||
}
|
||||
|
||||
public void setConstraintTarifa(ConstraintNumberBD constraintTarifa) {
|
||||
this.constraintTarifa = constraintTarifa;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public List<CoeficienteTarifa> getLsCoeficienteTarifas() {
|
||||
return lsCoeficienteTarifas;
|
||||
}
|
||||
|
||||
public void setLsCoeficienteTarifas(List<CoeficienteTarifa> lsCoeficienteTarifas) {
|
||||
this.lsCoeficienteTarifas = lsCoeficienteTarifas;
|
||||
}
|
||||
|
||||
public List<OrgaoConcedente> getLsOrgaoConcedentes() {
|
||||
return lsOrgaoConcedentes;
|
||||
}
|
||||
|
||||
public void setLsOrgaoConcedentes(List<OrgaoConcedente> lsOrgaoConcedentes) {
|
||||
this.lsOrgaoConcedentes = lsOrgaoConcedentes;
|
||||
}
|
||||
|
||||
private void generarDescripcionTramo() {
|
||||
cmbParadaOrigem.getValue(true);
|
||||
cmbParadaDestino.getValue(true);
|
||||
cmbVia.getValue();
|
||||
|
||||
Via via = (Via) cmbVia.getSelectedItem().getValue();
|
||||
|
||||
txtNome.setText(tramoService.gerarDescripcionTramo(tramo.getOrigem(), tramo.getDestino(), via));
|
||||
}
|
||||
|
||||
public void onSelect$cmbParadaOrigem() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
public void onSelect$cmbParadaDestino() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
public void onSelect$cmbVia() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
existeRutaOcupaTramo = false;
|
||||
|
@ -306,12 +204,12 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
txKmReal.setConstraint(constraintTarifa);
|
||||
tabExcepcionesKm.setVisible(ApplicationProperties.getInstance().exhibirExcepcionesTramoKm());
|
||||
|
||||
aplicarMascaras();
|
||||
// aplicarMascaras();
|
||||
}
|
||||
|
||||
private void aplicarMascaras() {
|
||||
Clients.evalJavaScript("jQuery('#" + txKmReal.getUuid() + "').format({allow_negative:false,precision: 2,decimal:',',autofix:true});");
|
||||
}
|
||||
// private void aplicarMascaras() {
|
||||
// Clients.evalJavaScript("jQuery('#" + txKmReal.getUuid() + "').format({allow_negative:false,precision: 2,decimal:',',autofix:true});");
|
||||
// }
|
||||
|
||||
public void onClick$btnSalvarServicio(Event ev) throws InterruptedException {
|
||||
spHora.getValue();
|
||||
|
@ -538,7 +436,6 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
txKmReal.getValue();
|
||||
cmbParadaOrigem.getValue(true);
|
||||
cmbParadaDestino.getValue(true);
|
||||
|
||||
|
@ -552,6 +449,9 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
try {
|
||||
tramo.setVia((Via) cmbVia.getSelectedItem().getValue());
|
||||
|
||||
BigDecimal kmReal = txKmReal.getValueDecimal();
|
||||
tramo.setKmReal(kmReal);
|
||||
|
||||
tramo.setLsOrgaoTramo(lsOrgamoTramo);
|
||||
tramo.setLsTramoTiempo(listaTramosTiempo);
|
||||
tramo.setTramoServicioList(listaTramoServicio);
|
||||
|
@ -738,4 +638,106 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
|||
return existeRutaOcupaTramo;
|
||||
}
|
||||
|
||||
public Tramo getTramo() {
|
||||
return tramo;
|
||||
}
|
||||
|
||||
public void setTramo(Tramo tramo) {
|
||||
this.tramo = tramo;
|
||||
}
|
||||
|
||||
public List<Via> getLsVias() {
|
||||
return lsVias;
|
||||
}
|
||||
|
||||
public void setLsVias(List<Via> lsVias) {
|
||||
this.lsVias = lsVias;
|
||||
}
|
||||
|
||||
public List<ClaseServicio> getLsClaseServicio() {
|
||||
return lsClaseServicio;
|
||||
}
|
||||
|
||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||
this.lsClaseServicio = lsClaseServicio;
|
||||
}
|
||||
|
||||
public List<TramoServicio> getListaTramoServicio() {
|
||||
return listaTramoServicio;
|
||||
}
|
||||
|
||||
public void setListaTramoServicio(List<TramoServicio> listaTramoServicio) {
|
||||
this.listaTramoServicio = listaTramoServicio;
|
||||
}
|
||||
|
||||
public List<TramoTiempo> getListaTramosTiempo() {
|
||||
return listaTramosTiempo;
|
||||
}
|
||||
|
||||
public void setListaTramosTiempo(List<TramoTiempo> listaTramosTiempo) {
|
||||
this.listaTramosTiempo = listaTramosTiempo;
|
||||
}
|
||||
|
||||
public List<TramoKm> getListaTramosKm() {
|
||||
return listaTramosKm;
|
||||
}
|
||||
|
||||
public void setListaTramosKm(List<TramoKm> listaTramosKm) {
|
||||
this.listaTramosKm = listaTramosKm;
|
||||
}
|
||||
|
||||
public ConstraintNumberBD getConstraintTarifa() {
|
||||
return constraintTarifa;
|
||||
}
|
||||
|
||||
public void setConstraintTarifa(ConstraintNumberBD constraintTarifa) {
|
||||
this.constraintTarifa = constraintTarifa;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public List<CoeficienteTarifa> getLsCoeficienteTarifas() {
|
||||
return lsCoeficienteTarifas;
|
||||
}
|
||||
|
||||
public void setLsCoeficienteTarifas(List<CoeficienteTarifa> lsCoeficienteTarifas) {
|
||||
this.lsCoeficienteTarifas = lsCoeficienteTarifas;
|
||||
}
|
||||
|
||||
public List<OrgaoConcedente> getLsOrgaoConcedentes() {
|
||||
return lsOrgaoConcedentes;
|
||||
}
|
||||
|
||||
public void setLsOrgaoConcedentes(List<OrgaoConcedente> lsOrgaoConcedentes) {
|
||||
this.lsOrgaoConcedentes = lsOrgaoConcedentes;
|
||||
}
|
||||
|
||||
private void generarDescripcionTramo() {
|
||||
cmbParadaOrigem.getValue(true);
|
||||
cmbParadaDestino.getValue(true);
|
||||
cmbVia.getValue();
|
||||
|
||||
Via via = (Via) cmbVia.getSelectedItem().getValue();
|
||||
|
||||
txtNome.setText(tramoService.gerarDescripcionTramo(tramo.getOrigem(), tramo.getDestino(), via));
|
||||
}
|
||||
|
||||
public void onSelect$cmbParadaOrigem() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
public void onSelect$cmbParadaDestino() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
public void onSelect$cmbVia() {
|
||||
generarDescripcionTramo();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -88,22 +88,14 @@
|
|||
model="@{winEditarTramos$composer.lsVias}"
|
||||
selectedItem="@{winEditarTramos$composer.tramo.via}" />
|
||||
</row>
|
||||
<!--row>
|
||||
<label id="lbKmReal" value="${c:l('editarTramosController.lbKmReal.value')}"/>
|
||||
<intbox id="txKmReal" constraint="no empty, no negative" width="80%" maxlength="5"
|
||||
value="@{winEditarTramos$composer.tramo.kmReal}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label id="lbKmPagoConductor" value="${c:l('editarTramosController.lbKmPagoConductor.value')}"/>
|
||||
<intbox id="txtKmPagoConductor" constraint="no empty, no negative" format="#0.00" maxlength="7"
|
||||
value="@{winEditarTramos$composer.tramo.kmPagoConductor}"/>
|
||||
</row-->
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarTramosController.lbKmReal.value')}" />
|
||||
|
||||
<textbox id="txKmReal" width="80%"
|
||||
constraint="no empty" maxlength="11"
|
||||
value="@{winEditarTramos$composer.tramo.kmReal}" />
|
||||
precision="7" scale="2"
|
||||
constraint="no empty, no zero, no negative"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -348,8 +340,9 @@
|
|||
<label
|
||||
value="${c:l('editarTramosController.labelKMCoeficiente1.value')}" />
|
||||
<textbox id="txtKMCoeficiente1"
|
||||
maxlength="7"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
precision="7" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
|
||||
</row>
|
||||
<row spans="1,1,1,1">
|
||||
<label
|
||||
|
@ -362,8 +355,8 @@
|
|||
<label
|
||||
value="${c:l('editarTramosController.labelKMCoeficiente2.value')}" />
|
||||
<textbox id="txtKMCoeficiente2"
|
||||
maxlength="7"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
precision="7" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
</row>
|
||||
<row spans="1,1,1,1">
|
||||
<label
|
||||
|
@ -376,8 +369,8 @@
|
|||
<label
|
||||
value="${c:l('editarTramosController.labelKMCoeficiente3.value')}" />
|
||||
<textbox id="txtKMCoeficiente3"
|
||||
maxlength="7"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
precision="7" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
</row>
|
||||
<row spans="1,1,1,1">
|
||||
<label
|
||||
|
|
Loading…
Reference in New Issue