fixes bug#0011602
dev: lucas qua: renato Para que o Arquivo Layout Internacional apareça é necessário ativar a propriedade permiteLayoutInternacional=1. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@84229 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8002dd7c9f
commit
32f4864586
|
@ -116,9 +116,9 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
private Label lblLibercard;
|
private Label lblLibercard;
|
||||||
private Checkbox chkUtilizaCartaoLibercard;
|
private Checkbox chkUtilizaCartaoLibercard;
|
||||||
private Checkbox chkStockCentral;
|
private Checkbox chkStockCentral;
|
||||||
private Label lblTipoArquivoLayoutInternacional;
|
private Label lblNomeArquivoLayoutInternacional;
|
||||||
private Checkbox chkTipoArquivoLayoutInternacional;
|
private Textbox txtNomeArquivoLayoutInternacional;
|
||||||
private Listheader colunmTipoArquivoLayout;
|
private Listheader colunmNomeArquivoLayoutIternacional;
|
||||||
|
|
||||||
public Estacion getEstacion() {
|
public Estacion getEstacion() {
|
||||||
return estacion;
|
return estacion;
|
||||||
|
@ -215,7 +215,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
ApplicationProperties instance = ApplicationProperties.getInstance();
|
ApplicationProperties instance = ApplicationProperties.getInstance();
|
||||||
validaHabilitacaoCamposRioCard(instance)
|
validaHabilitacaoCamposRioCard(instance)
|
||||||
.validaHabilitacaoCamposCartaoLiberCard(instance)
|
.validaHabilitacaoCamposCartaoLiberCard(instance)
|
||||||
.validaHabilitacaoTipoArquivoInternacional(instance);
|
.validaHabilitacaoLayoutInternacional(instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EditarEstacionController validaHabilitacaoCamposRioCard(ApplicationProperties instance) {
|
private EditarEstacionController validaHabilitacaoCamposRioCard(ApplicationProperties instance) {
|
||||||
|
@ -233,11 +233,11 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validaHabilitacaoTipoArquivoInternacional(ApplicationProperties instance) {
|
private void validaHabilitacaoLayoutInternacional(ApplicationProperties instance) {
|
||||||
if (instance.isPermiteVariasImpressorasMesmaEmpresa()) {
|
if (instance.isPermiteLayoutInternacional()) {
|
||||||
lblTipoArquivoLayoutInternacional.setVisible(true);
|
lblNomeArquivoLayoutInternacional.setVisible(true);
|
||||||
chkTipoArquivoLayoutInternacional.setVisible(true);
|
txtNomeArquivoLayoutInternacional.setVisible(true);
|
||||||
colunmTipoArquivoLayout.setVisible(true);
|
colunmNomeArquivoLayoutIternacional.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,19 +541,17 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String nomeArquivoLayout = txtNomeArquivoLayout.getValue();
|
|
||||||
|
|
||||||
EstacionImpresora estacionImpresora = new EstacionImpresora();
|
EstacionImpresora estacionImpresora = new EstacionImpresora();
|
||||||
estacionImpresora.setEmpresa(empresa);
|
estacionImpresora.setEmpresa(empresa);
|
||||||
estacionImpresora.setEstacion(estacion);
|
estacionImpresora.setEstacion(estacion);
|
||||||
estacionImpresora.setNombImpresora(nomeImpresora);
|
estacionImpresora.setNombImpresora(nomeImpresora);
|
||||||
estacionImpresora.setNombArchivoLayout(nomeArquivoLayout);
|
estacionImpresora.setNombArchivoLayout(txtNomeArquivoLayout.getValue());
|
||||||
estacionImpresora.setActivo(Boolean.TRUE);
|
estacionImpresora.setActivo(Boolean.TRUE);
|
||||||
estacionImpresora.setFecmodif(Calendar.getInstance().getTime());
|
estacionImpresora.setFecmodif(Calendar.getInstance().getTime());
|
||||||
estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
estacionImpresora.setTipoImpressora(getTipoImpressora());
|
estacionImpresora.setTipoImpressora(getTipoImpressora());
|
||||||
estacionImpresora.setEstacionCentral(estacionCentral);
|
estacionImpresora.setEstacionCentral(estacionCentral);
|
||||||
estacionImpresora.setIndArchivolayoutInternacional(chkTipoArquivoLayoutInternacional.isChecked());
|
estacionImpresora.setNombArchivoLayoutIternacional(txtNomeArquivoLayoutInternacional.getValue());
|
||||||
|
|
||||||
estacionImpresoraList.addItemNovo(estacionImpresora);
|
estacionImpresoraList.addItemNovo(estacionImpresora);
|
||||||
|
|
||||||
|
@ -636,25 +634,21 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
cmbEstacion.setModel(dictModelVacio);
|
cmbEstacion.setModel(dictModelVacio);
|
||||||
|
|
||||||
if (valor.equals(BEMATECH_FISCAL) || valor.equals(BEMATECH_FISCAL_BLINDADA)) {
|
if (valor.equals(BEMATECH_FISCAL) || valor.equals(BEMATECH_FISCAL_BLINDADA)) {
|
||||||
txtNomImpressora.setText("BEMATECHFISCAL");
|
configurarTextBox(txtNomImpressora, Boolean.TRUE, "BEMATECHFISCAL");
|
||||||
txtNomeArquivoLayout.setText("");
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayout, Boolean.TRUE);
|
||||||
txtNomImpressora.setDisabled(Boolean.TRUE);
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayoutInternacional, Boolean.TRUE);
|
||||||
txtNomeArquivoLayout.setDisabled(Boolean.TRUE);
|
|
||||||
} else if (valor.equals(DARUMA_FISCAL)|| valor.equals(DARUMA_FISCAL_BLINDADA)) {
|
} else if (valor.equals(DARUMA_FISCAL)|| valor.equals(DARUMA_FISCAL_BLINDADA)) {
|
||||||
txtNomImpressora.setText(DARUMA_FISCAL);
|
configurarTextBox(txtNomImpressora, Boolean.TRUE, DARUMA_FISCAL);
|
||||||
txtNomeArquivoLayout.setText("");
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayout, Boolean.TRUE);
|
||||||
txtNomImpressora.setDisabled(Boolean.TRUE);
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayoutInternacional, Boolean.TRUE);
|
||||||
txtNomeArquivoLayout.setDisabled(Boolean.TRUE);
|
|
||||||
} else if (valor.equals(CENTRAL_EMISSAO)) {
|
} else if (valor.equals(CENTRAL_EMISSAO)) {
|
||||||
txtNomImpressora.setText(CENTRAL_EMISSAO);
|
configurarTextBox(txtNomImpressora, Boolean.TRUE, CENTRAL_EMISSAO);
|
||||||
txtNomeArquivoLayout.setText("");
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayout, Boolean.TRUE);
|
||||||
txtNomImpressora.setDisabled(Boolean.TRUE);
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayoutInternacional, Boolean.TRUE);
|
||||||
txtNomeArquivoLayout.setDisabled(Boolean.TRUE);
|
|
||||||
} else if (valor.equals(MATRICIAL)) {
|
} else if (valor.equals(MATRICIAL)) {
|
||||||
txtNomImpressora.setText("");
|
configurarTextBoxComValorLimpo(txtNomImpressora, Boolean.FALSE);
|
||||||
txtNomeArquivoLayout.setText("");
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayout, Boolean.FALSE);
|
||||||
txtNomImpressora.setDisabled(Boolean.FALSE);
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayoutInternacional, Boolean.FALSE);
|
||||||
txtNomeArquivoLayout.setDisabled(Boolean.FALSE);
|
|
||||||
} else if (valor.equals(STOCK_CENTRAL)) {
|
} else if (valor.equals(STOCK_CENTRAL)) {
|
||||||
if(estacion == null || estacion.getPuntoVenta() == null){
|
if(estacion == null || estacion.getPuntoVenta() == null){
|
||||||
Clients.alert(Labels.getLabel("editarEstacionController.MSG.sinPuntoVenta"),
|
Clients.alert(Labels.getLabel("editarEstacionController.MSG.sinPuntoVenta"),
|
||||||
|
@ -662,15 +656,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
cmbTipoImpressora.setSelectedItem(null);
|
cmbTipoImpressora.setSelectedItem(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
txtNomImpressora.setText("");
|
configurarTextBoxComValorLimpo(txtNomImpressora, Boolean.FALSE);
|
||||||
txtNomeArquivoLayout.setText("");
|
configurarTextBoxComValorLimpo(txtNomeArquivoLayout, Boolean.FALSE);
|
||||||
txtNomImpressora.setDisabled(Boolean.FALSE);
|
|
||||||
// boolean indStockCentral = chkStockCentral.isChecked();
|
|
||||||
// if(indStockCentral){
|
|
||||||
txtNomeArquivoLayout.setDisabled(Boolean.FALSE);
|
|
||||||
// }else{
|
|
||||||
// txtNomeArquivoLayout.setDisabled(Boolean.TRUE);
|
|
||||||
// }
|
|
||||||
cmbEstacion.setSelectedItem(null);
|
cmbEstacion.setSelectedItem(null);
|
||||||
List<Estacion> lsEstacion = estacionService.buscarEstacionesStockCentral(estacion.getPuntoVenta());
|
List<Estacion> lsEstacion = estacionService.buscarEstacionesStockCentral(estacion.getPuntoVenta());
|
||||||
BindingListModel dictModel = new BindingListModelList(lsEstacion, false);
|
BindingListModel dictModel = new BindingListModelList(lsEstacion, false);
|
||||||
|
@ -678,6 +665,20 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void configurarTextBox(Textbox textBox, Boolean desabilitado, String valor) {
|
||||||
|
configurarTextBoxComValorLimpo(textBox, desabilitado);
|
||||||
|
textBox.setText(valor);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configurarTextBoxComValorLimpo(Textbox textBox, Boolean desabilitado) {
|
||||||
|
limparTextBox(textBox);
|
||||||
|
textBox.setDisabled(desabilitado);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void limparTextBox(Textbox txtBox) {
|
||||||
|
txtBox.setText("");
|
||||||
|
}
|
||||||
|
|
||||||
public void onChange$cmbEstacion(Event ev) {
|
public void onChange$cmbEstacion(Event ev) {
|
||||||
Comboitem item = (Comboitem) cmbEstacion.getSelectedItem();
|
Comboitem item = (Comboitem) cmbEstacion.getSelectedItem();
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,14 @@
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
import org.zkoss.util.resource.Labels;
|
|
||||||
import org.zkoss.zul.Listcell;
|
import org.zkoss.zul.Listcell;
|
||||||
import org.zkoss.zul.Listitem;
|
import org.zkoss.zul.Listitem;
|
||||||
import org.zkoss.zul.ListitemRenderer;
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.EstacionImpresora;
|
import com.rjconsultores.ventaboletos.entidad.EstacionImpresora;
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TipoImpressora;
|
||||||
|
|
||||||
public class RenderEstacionImpresora implements ListitemRenderer {
|
public class RenderEstacionImpresora implements ListitemRenderer {
|
||||||
|
|
||||||
private static final String MATRICIAL = Labels.getLabel("editarEstacionController.tipoImpressora.matricial");
|
|
||||||
private static final String BEMATECH_FISCAL = Labels.getLabel("editarEstacionController.tipoImpressora.bematechFiscal");
|
|
||||||
private static final String BEMATECH_FISCAL_BLINDADA = Labels.getLabel("editarEstacionController.tipoImpressora.bematechFiscalBlindada");
|
|
||||||
private static final String DARUMA_FISCAL = Labels.getLabel("editarEstacionController.tipoImpressora.darumaFiscal");
|
|
||||||
private static final String DARUMA_FISCAL_BLINDADA = Labels.getLabel("editarEstacionController.tipoImpressora.darumaFiscalBlindada");
|
|
||||||
private static final String CENTRAL_EMISSAO = Labels.getLabel("editarEstacionController.tipoImpressora.centralEmissao");
|
|
||||||
private static final String STOCK_CENTRAL = Labels.getLabel("editarEstacionController.tipoImpressora.stockCentral");
|
|
||||||
private static final String BPE = Labels.getLabel("editarEstacionController.tipoImpressora.bpe");
|
|
||||||
|
|
||||||
public void render(Listitem lstm, Object o) throws Exception {
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
EstacionImpresora estacionImpresora = (EstacionImpresora) o;
|
EstacionImpresora estacionImpresora = (EstacionImpresora) o;
|
||||||
|
|
||||||
|
@ -25,12 +16,11 @@ public class RenderEstacionImpresora implements ListitemRenderer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Listcell lc = new Listcell();
|
Listcell lc = new Listcell(estacionImpresora.getEmpresa().getNombempresa());
|
||||||
|
|
||||||
lc = new Listcell(estacionImpresora.getEmpresa().getNombempresa());
|
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lc = new Listcell(estacionImpresora.getTipoImpressora() == null ? "" : getTipoImpressora(estacionImpresora));
|
TipoImpressora tipo = TipoImpressora.getTipoImpressora(estacionImpresora.getTipoImpressora());
|
||||||
|
lc = new Listcell(tipo == null ? "" : tipo.getNome());
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lc = new Listcell(estacionImpresora.getNombImpresora());
|
lc = new Listcell(estacionImpresora.getNombImpresora());
|
||||||
|
@ -39,31 +29,10 @@ public class RenderEstacionImpresora implements ListitemRenderer {
|
||||||
lc = new Listcell(estacionImpresora.getNombArchivoLayout());
|
lc = new Listcell(estacionImpresora.getNombArchivoLayout());
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lc = new Listcell(estacionImpresora.getIndArchivolayoutInternacional() ? "Sim" : "Não");
|
lc = new Listcell(estacionImpresora.getNombArchivoLayoutIternacional());
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
|
||||||
lstm.setAttribute("data", estacionImpresora);
|
lstm.setAttribute("data", estacionImpresora);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTipoImpressora(EstacionImpresora estacionImpresora) {
|
|
||||||
if (estacionImpresora.getTipoImpressora() == 0) {
|
|
||||||
return MATRICIAL;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 1) {
|
|
||||||
return BEMATECH_FISCAL;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 2) {
|
|
||||||
return BEMATECH_FISCAL_BLINDADA;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 4) {
|
|
||||||
return DARUMA_FISCAL;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 5) {
|
|
||||||
return DARUMA_FISCAL_BLINDADA;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 3) {
|
|
||||||
return CENTRAL_EMISSAO;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 6) {
|
|
||||||
return STOCK_CENTRAL;
|
|
||||||
} else if (estacionImpresora.getTipoImpressora() == 7) {
|
|
||||||
return BPE;
|
|
||||||
}
|
|
||||||
return MATRICIAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4115,7 +4115,7 @@ busquedaEstacionController.nomeArquivoLayout.label = Archivo Layout
|
||||||
busquedaEstacionController.lhUtilizaCartaoLibercard.label = Utiliza tarjeta Libercard
|
busquedaEstacionController.lhUtilizaCartaoLibercard.label = Utiliza tarjeta Libercard
|
||||||
busquedaEstacionController.lhStockCentral.label = Stock Central
|
busquedaEstacionController.lhStockCentral.label = Stock Central
|
||||||
msg.constraint.cajaObligatorio = Caja obligatoria
|
msg.constraint.cajaObligatorio = Caja obligatoria
|
||||||
busquedaEstacionController.lhTipoArquivoLayoutInternacional.label = Archivo Layout Internacional
|
busquedaEstacionController.nomeArquivoLayoutInternacional.label = Archivo Layout Internacional
|
||||||
|
|
||||||
# Editar Estacion
|
# Editar Estacion
|
||||||
editarEstacionController.window.title = Estación
|
editarEstacionController.window.title = Estación
|
||||||
|
|
|
@ -4323,7 +4323,7 @@ busquedaEstacionController.nomeImpressoraBPe.label = Impressora BPe
|
||||||
busquedaEstacionController.nomeImpressoraSeguro.label = Impressora Seguro
|
busquedaEstacionController.nomeImpressoraSeguro.label = Impressora Seguro
|
||||||
busquedaEstacionController.nomeArquivoLayout.label = Arquivo Layout
|
busquedaEstacionController.nomeArquivoLayout.label = Arquivo Layout
|
||||||
msg.constraint.cajaObligatorio = Caixa obligatória
|
msg.constraint.cajaObligatorio = Caixa obligatória
|
||||||
busquedaEstacionController.lhTipoArquivoLayoutInternacional.label = Arquivo Layout Internacional
|
busquedaEstacionController.nomeArquivoLayoutInternacional.label = Arquivo Layout Internacional
|
||||||
|
|
||||||
# Editar Estacion
|
# Editar Estacion
|
||||||
editarEstacionController.window.title = Estação
|
editarEstacionController.window.title = Estação
|
||||||
|
|
|
@ -331,11 +331,11 @@
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label
|
<label
|
||||||
id="lblTipoArquivoLayoutInternacional"
|
id="lblNomeArquivoLayoutInternacional"
|
||||||
visible="false"
|
visible="false"
|
||||||
value="${c:l('busquedaEstacionController.lhTipoArquivoLayoutInternacional.label')}" />
|
value="${c:l('busquedaEstacionController.nomeArquivoLayoutInternacional.label')}" />
|
||||||
<checkbox id="chkTipoArquivoLayoutInternacional"
|
<textbox id="txtNomeArquivoLayoutInternacional"
|
||||||
visible="false"/>
|
width="90%" maxlength="20" visible="false"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -362,8 +362,8 @@
|
||||||
label="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
|
label="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
|
||||||
<listheader image="/gui/img/create_doc.gif"
|
<listheader image="/gui/img/create_doc.gif"
|
||||||
label="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
|
label="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
|
||||||
<listheader id="colunmTipoArquivoLayout" image="/gui/img/create_doc.gif" visible="false"
|
<listheader id="colunmNomeArquivoLayoutIternacional" image="/gui/img/create_doc.gif" visible="false"
|
||||||
label="${c:l('busquedaEstacionController.lhTipoArquivoLayoutInternacional.label')}" />
|
label="${c:l('busquedaEstacionController.nomeArquivoLayoutInternacional.label')}" />
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
|
Loading…
Reference in New Issue