fixbug #6970
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@51881 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0cf975ea2b
commit
a0de8a63e9
|
@ -80,9 +80,27 @@ public class EditarCombinacionTramoRutaController extends MyGenericForwardCompos
|
|||
}
|
||||
|
||||
public void onClick$btnSalvar(Event e) throws InterruptedException {
|
||||
|
||||
//Mantis 6970
|
||||
if (!validarRetorno()){
|
||||
return;
|
||||
}
|
||||
|
||||
//Mantis 6970
|
||||
if (txtNumRuta.getValue().isEmpty()){
|
||||
int resp = Messagebox.show(Labels.getLabel("editarCombinacionTramoRutaController.MSG.generarRutaRegreso"),
|
||||
Labels.getLabel("editarCombinacionTramoRutaController.window.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.NO){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rutaTramoIdaVO.setLsCombinacionRutaTramoVO(gridRutaSecuenciaIda.getLsSecuenciaRutaTramoCoeficienteVO());
|
||||
|
||||
try {
|
||||
|
||||
Ruta rutaIda = tramoRutaService.generarTramosRutas(rutaTramoIdaVO);
|
||||
|
||||
if (rutaIda != null) {
|
||||
|
@ -154,4 +172,18 @@ public class EditarCombinacionTramoRutaController extends MyGenericForwardCompos
|
|||
gridRutaSecuenciaVolta.agregarTodos(rutaTramoRegresoVO.getLsCombinacionRutaTramoVO());
|
||||
|
||||
}
|
||||
|
||||
private boolean validarRetorno() throws InterruptedException{
|
||||
|
||||
if (!txtNumRuta.getValue().isEmpty() && (gridRutaSecuenciaVolta.isEmpty())){
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarCatalogoDeRutaController.msg.combinacaoNaoRealizada"),
|
||||
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,6 +93,35 @@ public class EditarTramoRutaController extends MyGenericForwardComposer {
|
|||
|
||||
gridRutaSecuencia.setLsVias(viaService.obtenerTodos());
|
||||
}
|
||||
|
||||
public void onSelect$cmbClaseServicio(Event e)throws InterruptedException {
|
||||
if (!validarPreenchimentoEmpresa()){
|
||||
cmbClaseServicio.setSelectedItem(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void onSelect$cmbOrgaoConcedente(Event e)throws InterruptedException {
|
||||
|
||||
if (!validarPreenchimentoEmpresa()){
|
||||
cmbOrgaoConcedente.setSelectedItem(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean validarPreenchimentoEmpresa() throws InterruptedException{
|
||||
if (rutaEmpresaList.getSize() == 0){
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarTramoRutaController.msg.empresaObligatoria"),
|
||||
Labels.getLabel("editarTramoRutaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onClick$btnCombinacion(Event e) throws InterruptedException {
|
||||
|
||||
|
@ -147,8 +176,6 @@ public class EditarTramoRutaController extends MyGenericForwardComposer {
|
|||
rutaTramoVO.setDescRuta(txtDscRuta.getValue());
|
||||
rutaTramoVO.setNumRuta(txtNumRuta.getValue());
|
||||
|
||||
|
||||
|
||||
Map<String, Object> params = new LinkedHashMap<String, Object>();
|
||||
params.put("rutaTramoVO", rutaTramoVO);
|
||||
params.put("winEditarTramoRuta", winEditarTramoRuta);
|
||||
|
|
|
@ -1680,6 +1680,7 @@ editarCatalogoDeRutaController.lblCantAsientosZeroInvalido.value = Cantidad de A
|
|||
editarCatalogoDeRutaController.lblCantEixosZeroInvalido.value = Cantidad de tramos no puede ser igual a cero
|
||||
editarCatalogoDeRutaController.lblIndVentaRioCard.value = Vende Rio Card
|
||||
editarCatalogoDeRutaController.lbNumRioCard.value = Número Rio Card
|
||||
editarCatalogoDeRutaController.msg.combinacaoNaoRealizada = La combinación no se hizo
|
||||
|
||||
|
||||
# A través da pantalla de Búsqueda
|
||||
|
@ -4365,6 +4366,7 @@ gridRutaSecuencia.columnCoeficiente1.label = Indice 1
|
|||
gridRutaSecuencia.columnCoeficiente2.label = Indice 2
|
||||
gridRutaSecuencia.columnKmCoeficiente2.label = Km 2
|
||||
gridRutaSecuencia.columnKmCoeficiente1.label = Km 1
|
||||
gridRutaSecuencia.columnVenda.label = Venta
|
||||
#TramoRutaServiceImpl
|
||||
tramoRutaServiceImpl.msg.combinacionObligatorio=La combinación debe de ser informada
|
||||
tramoRutaServiceImpl.msg.secuenciaObligatorio=La secuencia debe de ser informada
|
||||
|
|
|
@ -1727,6 +1727,7 @@ editarCatalogoDeRutaController.lblCantAsientosZeroInvalido.value = Quantidade de
|
|||
editarCatalogoDeRutaController.lblCantEixosZeroInvalido.value = Quantidade de Eixos não pode ser igual à zero
|
||||
editarCatalogoDeRutaController.lblIndVentaRioCard.value = Vende Rio Card
|
||||
editarCatalogoDeRutaController.lbNumRioCard.value = Número Rio Card
|
||||
editarCatalogoDeRutaController.msg.combinacaoNaoRealizada = A combinação não foi feita
|
||||
|
||||
|
||||
# A través da pantalla de Pesquisa
|
||||
|
@ -4430,6 +4431,7 @@ gridRutaSecuencia.columnCoeficiente1.label = Coeficiente 1
|
|||
gridRutaSecuencia.columnCoeficiente2.label = Coeficiente 2
|
||||
gridRutaSecuencia.columnKmCoeficiente2.label = Km 2
|
||||
gridRutaSecuencia.columnKmCoeficiente1.label = Km 1
|
||||
gridRutaSecuencia.columnVenda.label = Venda
|
||||
#TramoRutaServiceImpl
|
||||
tramoRutaServiceImpl.msg.combinacionObligatorio=A combinação deve de ser informada
|
||||
tramoRutaServiceImpl.msg.secuenciaObligatorio=A sequência deve ser informada
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarTramoRutaController.lblNumRuta.value')}"/>
|
||||
<textbox id="txtNumRuta" maxlength="5" constraint="no empty" width="50%"
|
||||
<textbox id="txtNumRuta" maxlength="5" width="50%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
|
||||
|
|
Loading…
Reference in New Issue