Alteração ADIF
fixes bug 6769 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@49402 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
39f59d61fb
commit
83b0aff316
|
@ -20,6 +20,7 @@ import org.zkoss.zul.Comboitem;
|
|||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.ConstantesTipoValidaVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Aidf;
|
||||
import com.rjconsultores.ventaboletos.entidad.AidfEspecie;
|
||||
import com.rjconsultores.ventaboletos.entidad.AidfTipo;
|
||||
|
@ -91,9 +92,97 @@ public class EditarAidfController extends MyGenericForwardComposer {
|
|||
|
||||
private Datebox dtbFecadquisicion;
|
||||
private Datebox dtbFecvencimiento;
|
||||
private Combobox cmbTipoValidaVenta;
|
||||
|
||||
private static Logger log = Logger.getLogger(EditarAidfController.class);
|
||||
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
aidf = (Aidf) Executions.getCurrent().getArg().get("aidf");
|
||||
aidfList = (MyListbox) Executions.getCurrent().getArg().get("aidfList");
|
||||
|
||||
lsAidfTipo = aidfService.obtenerTodosAdifTipo();
|
||||
lsAidfEspecie = aidfService.obtenerTodosAdifEspecie();
|
||||
lsEstado = estadoService.obtenerTodos();
|
||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsInscestadual = new ArrayList<InscricaoEstadual>();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
if (aidf.getAidfId() == null) {
|
||||
btnApagar.setVisible(Boolean.FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
|
||||
cmbAidfEspecie.getValue();
|
||||
cmbAidfTipo.getValue();
|
||||
cmbEmpresa.getValue();
|
||||
cmbEstado.getValue();
|
||||
cmbInscestadual.getValue();
|
||||
|
||||
Comboitem inscEstadualSeleccionada = cmbInscestadual.getSelectedItem();
|
||||
String _inscestadual = inscEstadualSeleccionada != null ? inscEstadualSeleccionada.getValue().toString() : "";
|
||||
aidf.setInscestadual(_inscestadual);
|
||||
|
||||
aidf.setActivo(true);
|
||||
aidf.setFecmodif(Calendar.getInstance().getTime());
|
||||
aidf.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
if(aidf.getAidfId() == null){
|
||||
aidfService.suscribir(aidf);
|
||||
aidfList.addItemNovo(aidf);
|
||||
} else {
|
||||
aidfService.actualizacion(aidf);
|
||||
aidfList.updateItem(aidf);
|
||||
}
|
||||
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarAidfController.MSG.suscribirOK"),
|
||||
Labels.getLabel("editarAidfController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public void onChange$cmbEmpresa(Event ev) {
|
||||
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (cbiEmpresa != null) {
|
||||
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||
|
||||
lsInscestadual = new ArrayList<InscricaoEstadual>();
|
||||
lsInscestadual.addAll(empresaService.buscaInscricoesEstaduais(empresa));
|
||||
cmbInscestadual.setModel(new BindingListModelList(lsInscestadual, true));
|
||||
}
|
||||
}
|
||||
|
||||
public Combobox getCmbInscestadual() {
|
||||
return cmbInscestadual;
|
||||
}
|
||||
|
||||
public void setCmbInscestadual(Combobox cmbInscestadual) {
|
||||
this.cmbInscestadual = cmbInscestadual;
|
||||
}
|
||||
|
||||
public List<InscricaoEstadual> getLsInscestadual() {
|
||||
return lsInscestadual;
|
||||
}
|
||||
|
||||
public void setLsInscestadual(List<InscricaoEstadual> lsInscestadual) {
|
||||
this.lsInscestadual = lsInscestadual;
|
||||
}
|
||||
|
||||
public Combobox getCmbTipoValidaVenta() {
|
||||
return cmbTipoValidaVenta;
|
||||
}
|
||||
|
||||
public void setCmbTipoValidaVenta(Combobox cmbTipoValidaVenta) {
|
||||
this.cmbTipoValidaVenta = cmbTipoValidaVenta;
|
||||
}
|
||||
|
||||
public Button getBtnApagar() {
|
||||
return btnApagar;
|
||||
}
|
||||
|
@ -246,62 +335,6 @@ public class EditarAidfController extends MyGenericForwardComposer {
|
|||
this.aidf = aidf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsAidfTipo = aidfService.obtenerTodosAdifTipo();
|
||||
lsAidfEspecie = aidfService.obtenerTodosAdifEspecie();
|
||||
lsEstado = estadoService.obtenerTodos();
|
||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsInscestadual = new ArrayList<InscricaoEstadual>();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
aidf = (Aidf) Executions.getCurrent().getArg().get("aidf");
|
||||
aidfList = (MyListbox) Executions.getCurrent().getArg().get("aidfList");
|
||||
|
||||
if (aidf.getAidfId() == null)
|
||||
btnApagar.setVisible(Boolean.FALSE);
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
|
||||
cmbAidfEspecie.getValue();
|
||||
cmbAidfTipo.getValue();
|
||||
cmbEmpresa.getValue();
|
||||
cmbEstado.getValue();
|
||||
cmbInscestadual.getValue();
|
||||
|
||||
|
||||
|
||||
Comboitem inscEstadualSeleccionada = cmbInscestadual.getSelectedItem();
|
||||
String _inscestadual = inscEstadualSeleccionada != null ? inscEstadualSeleccionada.getValue().toString() : "";
|
||||
aidf.setInscestadual(_inscestadual);
|
||||
|
||||
aidf.setActivo(true);
|
||||
aidf.setFecmodif(Calendar.getInstance().getTime());
|
||||
aidf.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
if(aidf.getAidfId() == null){
|
||||
aidfService.suscribir(aidf);
|
||||
aidfList.addItemNovo(aidf);
|
||||
} else {
|
||||
aidfService.actualizacion(aidf);
|
||||
aidfList.updateItem(aidf);
|
||||
}
|
||||
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarAidfController.MSG.suscribirOK"),
|
||||
Labels.getLabel("editarAidfController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
closeWindow();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Datebox getDtbFecadquisicion() {
|
||||
return dtbFecadquisicion;
|
||||
}
|
||||
|
@ -332,34 +365,5 @@ public class EditarAidfController extends MyGenericForwardComposer {
|
|||
|
||||
public void setTxtFormfinal(Textbox txtFormfinal) {
|
||||
this.txtFormfinal = txtFormfinal;
|
||||
}
|
||||
|
||||
public void onChange$cmbEmpresa(Event ev) {
|
||||
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (cbiEmpresa != null) {
|
||||
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||
|
||||
lsInscestadual = new ArrayList<InscricaoEstadual>();
|
||||
lsInscestadual.addAll(empresaService.buscaInscricoesEstaduais(empresa));
|
||||
cmbInscestadual.setModel(new BindingListModelList(lsInscestadual, true));
|
||||
}
|
||||
}
|
||||
|
||||
public Combobox getCmbInscestadual() {
|
||||
return cmbInscestadual;
|
||||
}
|
||||
|
||||
public void setCmbInscestadual(Combobox cmbInscestadual) {
|
||||
this.cmbInscestadual = cmbInscestadual;
|
||||
}
|
||||
|
||||
public List<InscricaoEstadual> getLsInscestadual() {
|
||||
return lsInscestadual;
|
||||
}
|
||||
|
||||
public void setLsInscestadual(List<InscricaoEstadual> lsInscestadual) {
|
||||
this.lsInscestadual = lsInscestadual;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5431,6 +5431,7 @@ busquedaAidfController.btnCerrar.tooltiptext=Fechar
|
|||
busquedaAidfController.btnPesquisa.label=Consultar
|
||||
busquedaAidfController.aidfEspecie.label=Espécie
|
||||
busquedaAidfController.aidfTipo.label=Tipo
|
||||
busquedaAidfController.lbTipoValidaAIDF.value=Tipo Venda
|
||||
|
||||
busquedaAidfController.docfiscal.label=Doc.Fiscal
|
||||
busquedaAidfController.acfiscal.label=AC.Fiscal
|
||||
|
|
|
@ -5501,6 +5501,7 @@ busquedaAidfController.btnCerrar.tooltiptext=Fechar
|
|||
busquedaAidfController.btnPesquisa.label=Pesquisar
|
||||
busquedaAidfController.aidfEspecie.label=Espécie
|
||||
busquedaAidfController.aidfTipo.label=Tipo
|
||||
busquedaAidfController.lbTipoValidaAIDF.value=Tipo Venda
|
||||
|
||||
busquedaAidfController.docfiscal.label=Doc.Fiscal
|
||||
busquedaAidfController.acfiscal.label=AC.Fiscal
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarAidf"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk>
|
||||
<window id="winEditarAidf" title="${c:l('editarAidfController.window.title')}"
|
||||
apply="${editarAidfController}" contentStyle="overflow:auto"
|
||||
height="500px" width="450px" border="normal" >
|
||||
|
||||
<toolbar>
|
||||
<window id="winEditarAidf"
|
||||
title="${c:l('editarAidfController.window.title')}"
|
||||
apply="${editarAidfController}" contentStyle="overflow:auto"
|
||||
height="500px" width="450px" border="normal">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnApagar" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
|
@ -23,122 +22,134 @@
|
|||
tooltiptext="${c:l('editarAidfController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.aidfEspecie.label')}"/>
|
||||
<combobox id="cmbAidfEspecie" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsAidfEspecie}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.aidfEspecie}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.aidfTipo.label')}"/>
|
||||
<combobox id="cmbAidfTipo" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsAidfTipo}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.aidfTipo}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.aidfEspecie.label')}" />
|
||||
<combobox id="cmbAidfEspecie"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsAidfEspecie}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.aidfEspecie}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.aidfTipo.label')}" />
|
||||
<combobox id="cmbAidfTipo"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsAidfTipo}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.aidfTipo}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.estado.label')}" />
|
||||
<combobox id="cmbEstado"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsEstado}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.estado}"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.docfiscal.label')}" />
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
model="@{winEditarAidf$composer.lsEstado}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.estado}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.docfiscal.label')}" />
|
||||
<textbox id="txtDocFiscal" width="100px"
|
||||
maxlength="20"
|
||||
value="@{winEditarAidf$composer.aidf.docfiscal}"
|
||||
maxlength="20" value="@{winEditarAidf$composer.aidf.docfiscal}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.acfiscal.label')}" />
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.acfiscal.label')}" />
|
||||
<textbox id="txtAcFiscal" width="100px"
|
||||
maxlength="20"
|
||||
value="@{winEditarAidf$composer.aidf.acfiscal}"
|
||||
maxlength="20" value="@{winEditarAidf$composer.aidf.acfiscal}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.serie.label')}" />
|
||||
<textbox id="txtSerie" width="80px"
|
||||
maxlength="8"
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.serie.label')}" />
|
||||
<textbox id="txtSerie" width="80px" maxlength="8"
|
||||
value="@{winEditarAidf$composer.aidf.serie}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.subserie.label')}" />
|
||||
<textbox id="txtSubserie" width="30px"
|
||||
maxlength="3"
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.subserie.label')}" />
|
||||
<textbox id="txtSubserie" width="30px" maxlength="3"
|
||||
value="@{winEditarAidf$composer.aidf.subserie}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.forminicial.label')}" />
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.forminicial.label')}" />
|
||||
<textbox id="txtForminicial" width="100px"
|
||||
maxlength="20"
|
||||
value="@{winEditarAidf$composer.aidf.forminicial}"
|
||||
maxlength="20" value="@{winEditarAidf$composer.aidf.forminicial}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.formfinal.label')}" />
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.formfinal.label')}" />
|
||||
<textbox id="txtFormfinal" width="100px"
|
||||
maxlength="20"
|
||||
value="@{winEditarAidf$composer.aidf.formfinal}"
|
||||
maxlength="20" value="@{winEditarAidf$composer.aidf.formfinal}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
|
||||
<row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.empresa.label')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
model="@{winEditarAidf$composer.lsEmpresas}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.empresa}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.inscestadual.label')}" />
|
||||
model="@{winEditarAidf$composer.lsEmpresas}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.empresa}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.inscestadual.label')}" />
|
||||
<combobox id="cmbInscestadual"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
model="@{winEditarAidf$composer.lsInscestadual}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.getInscestadual()}"/>
|
||||
|
||||
model="@{winEditarAidf$composer.lsInscestadual}"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.getInscestadual()}" />
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.fecadquisicion.label')}" />
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.fecadquisicion.label')}" />
|
||||
<datebox id="fecadquisicion" width="90%"
|
||||
format="dd/MM/yyyy" lenient="false" maxlength="10"
|
||||
value="@{winEditarAidf$composer.aidf.fecadquisicion}" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.fecvencimiento.label')}" />
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.fecvencimiento.label')}" />
|
||||
<datebox id="fecvencimiento" width="90%"
|
||||
format="dd/MM/yyyy" lenient="false" maxlength="10"
|
||||
value="@{winEditarAidf$composer.aidf.fecvencimiento}" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.cnpj.label')}" />
|
||||
<textbox id="txtCnpj" width="80px"
|
||||
maxlength="20"
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaAidfController.cnpj.label')}" />
|
||||
<textbox id="txtCnpj" width="80px" maxlength="20"
|
||||
value="@{winEditarAidf$composer.aidf.cnpj}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
|
||||
</window>
|
||||
<row>
|
||||
<label value="${c:l('busquedaAidfController.lbTipoValidaAIDF.value')}" />
|
||||
<combobox id="cmbTipoValidaVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="70%"
|
||||
selectedItem="@{winEditarAidf$composer.aidf.tipoValidaVenta}">
|
||||
<comboitem value=" " label=" " />
|
||||
<comboitem value="A" label="AGENCIA" />
|
||||
<comboitem value="M" label="MOTORISTA" />
|
||||
</combobox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue