1566 - Operação
This commit is contained in:
@@ -99,7 +99,10 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
habilitaCampos(true);
|
habilitaCampos(true);
|
||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idDescricao').focus();
|
engine.getField('idDescricao').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,9 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idRazao').focus();
|
engine.getField('idRazao').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,10 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
habilitaCampos(true);
|
habilitaCampos(true);
|
||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
@@ -387,7 +390,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
</DBSearchField>
|
</DBSearchField>
|
||||||
<HorizontalLayout width="100%" spacing="true">
|
<HorizontalLayout width="100%" spacing="true">
|
||||||
<TextField id="idChave" type="number" caption="Código" width="100%" expandRatio="0.08" />
|
<TextField id="idChave" type="number" caption="Código" width="100%" expandRatio="0.08" />
|
||||||
<TextField id="idDescricao" type="string" caption="Nome" required="true" width="100%" expandRatio="1" />
|
<TextField id="idDescricao" type="string" text-transform="uppercase" caption="Nome" required="true" width="100%" expandRatio="1" />
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
<HorizontalLayout width="70%" spacing="true">
|
<HorizontalLayout width="70%" spacing="true">
|
||||||
<DateField id="idAdmissao" type="date" caption="Admissão" resolution="DAY" width="100%" expandRatio="0.3"/>
|
<DateField id="idAdmissao" type="date" caption="Admissão" resolution="DAY" width="100%" expandRatio="0.3"/>
|
||||||
@@ -430,7 +433,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
<onClickScript language="JavaScript">
|
<onClickScript language="JavaScript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
function run() {
|
function run() {
|
||||||
engine.setGlobalVariable('painelLista',0);
|
engine.setGlobalVariable('painelLista',0);
|
||||||
engine.getGlobalVariable('novoRegistro')();
|
engine.getGlobalVariable('novoRegistro')();
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
|
|||||||
@@ -100,6 +100,9 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
//engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
//engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
"nome" : "socios" ,
|
"nome" : "socios" ,
|
||||||
"sequence" : "socio_seq" ,
|
"sequence" : "socio_seq" ,
|
||||||
"idTabela" : "CODIGO",
|
"idTabela" : "CODIGO",
|
||||||
"campos" : ["CODIGO", "NOME", "PERCENTUAL_PARTICIPACAO" ],
|
"campos" : ["CODIGO", "NOME" ],
|
||||||
"camposTable" : ["CODIGO", "NOME", "PERCENTUAL_PARTICIPACAO" ]
|
"camposTable" : ["CODIGO", "NOME" ]
|
||||||
|
|
||||||
},
|
},
|
||||||
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
||||||
["NOME","idDescricao","String"],
|
["NOME","idDescricao","String"]
|
||||||
["PERCENTUAL_PARTICIPACAO","idPercentual","Number"]
|
|
||||||
] ,
|
] ,
|
||||||
"validacaoExclusao" : [ ["SELECT 0 AS CONTAR FROM SOCIOS WHERE CODIGO = ", "Existem registros ligados a esta tabela"],
|
"validacaoExclusao" : [ ["SELECT 0 AS CONTAR FROM SOCIOS WHERE CODIGO = ", "Existem registros ligados a esta tabela"],
|
||||||
["SELECT COUNT(CHAVE_RESPONSAVEL) AS CONTAR FROM CONTROLE_DESPESAS_PESSOAIS WHERE CHAVE_RESPONSAVEL = ", "Existem registros ligados a esta tabela."]
|
["SELECT COUNT(CHAVE_RESPONSAVEL) AS CONTAR FROM CONTROLE_DESPESAS_PESSOAIS WHERE CHAVE_RESPONSAVEL = ", "Existem registros ligados a esta tabela."]
|
||||||
@@ -99,6 +98,9 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
@@ -149,7 +151,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
@@ -210,12 +212,11 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
"nome" : "socios" ,
|
"nome" : "socios" ,
|
||||||
"sequence" : "socio_seq" ,
|
"sequence" : "socio_seq" ,
|
||||||
"idTabela" : "CODIGO",
|
"idTabela" : "CODIGO",
|
||||||
"campos" : ["CODIGO", "NOME", "PERCENTUAL_PARTICIPACAO" ],
|
"campos" : ["CODIGO", "NOME" ],
|
||||||
"camposTable" : ["CODIGO", "NOME", "PERCENTUAL_PARTICIPACAO" ]
|
"camposTable" : ["CODIGO", "NOME" ]
|
||||||
},
|
},
|
||||||
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
||||||
["NOME","idDescricao","String"],
|
["NOME","idDescricao","String"]
|
||||||
["PERCENTUAL_PARTICIPACAO","idPercentual","Number"],
|
|
||||||
] ,
|
] ,
|
||||||
|
|
||||||
"validacaoExclusao" :
|
"validacaoExclusao" :
|
||||||
@@ -379,7 +380,6 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
<HorizontalLayout spacing="true" width="100%">
|
<HorizontalLayout spacing="true" width="100%">
|
||||||
<TextField id="idChave" type="number" caption="Código" width="100%" expandRatio="0.08" />
|
<TextField id="idChave" type="number" caption="Código" width="100%" expandRatio="0.08" />
|
||||||
<TextField id="idDescricao" type="string" text-transform="uppercase" caption="Nome" required="true" width="100%" expandRatio="1" />
|
<TextField id="idDescricao" type="string" text-transform="uppercase" caption="Nome" required="true" width="100%" expandRatio="1" />
|
||||||
<DecimalField type="decimal" id="idPercentual" caption="Percentual" width="100%" expandRatio="0.1" />
|
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
</VerticalLayout>
|
</VerticalLayout>
|
||||||
</Tab>
|
</Tab>
|
||||||
@@ -394,11 +394,12 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
<onClickScript language="JavaScript">
|
<onClickScript language="JavaScript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
importClass(Packages.br.com.davinti.base.vaadin.components.layout.MessageBox);
|
importClass(Packages.br.com.davinti.base.vaadin.components.layout.MessageBox);
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
if (engine.isValid()) {
|
if (engine.isValid()) {
|
||||||
if ((engine.getGlobalVariable('validarDuplicidade')(engine.getField('idDescricao').getValue())) && (!engine.getField('idChave').getValue())) {
|
if ((engine.getGlobalVariable('validarDuplicidade')(engine.getField('idDescricao').getValue())) && (!engine.getField('idChave').getValue())) {
|
||||||
MessageBox.show(MessageBox.BoxType.INFO, 'Atenção', 'Já existe um sócio cadastrado com este nome.');
|
MessageBox.show(MessageBox.BoxType.INFO, 'Atenção', 'Já existe um sócio cadastrado com este nome.');
|
||||||
} else {
|
} else {
|
||||||
var config = engine.getGlobalVariable('config');
|
var config = engine.getGlobalVariable('config');
|
||||||
var id = engine.getField('idChave').getConvertedValue();
|
var id = engine.getField('idChave').getConvertedValue();
|
||||||
var lib = libService.loadScript('lib_cadastro_padrao');
|
var lib = libService.loadScript('lib_cadastro_padrao');
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
"nome" : "subcategoria" ,
|
"nome" : "subcategoria" ,
|
||||||
"sequence" : "subcategoria_seq" ,
|
"sequence" : "subcategoria_seq" ,
|
||||||
"idTabela" : "CODIGO",
|
"idTabela" : "CODIGO",
|
||||||
"campos" : ["CODIGO", "DESCRICAO" ],
|
"campos" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ],
|
||||||
"camposTable" : ["CODIGO", "DESCRICAO" ]
|
"camposTable" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ]
|
||||||
|
|
||||||
},
|
},
|
||||||
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
||||||
["DESCRICAO","idDescricao","String"]
|
["DESCRICAO","idDescricao","String"] ,
|
||||||
|
["CODIGO_CATEGORIA","idCategoria","Number"]
|
||||||
] ,
|
] ,
|
||||||
"validacaoExclusao" : [ ["SELECT 0 AS CONTAR FROM CATEGORIA WHERE CODIGO = ", "Existem registros ligados a esta tabela"],
|
"validacaoExclusao" : [ ["SELECT 0 AS CONTAR FROM CATEGORIA WHERE CODIGO = ", "Existem registros ligados a esta tabela"],
|
||||||
["SELECT count(chave_subcategoria) AS CONTAR FROM CONTROLE_DESPESAS_OPERACIONAIS WHERE CHAVE_SUBCATEGORIA = ", "Existem registros ligados a esta tabela"]
|
["SELECT count(chave_subcategoria) AS CONTAR FROM CONTROLE_DESPESAS_OPERACIONAIS WHERE CHAVE_SUBCATEGORIA = ", "Existem registros ligados a esta tabela"]
|
||||||
@@ -60,6 +61,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
var config = engine.getGlobalVariable('config');
|
var config = engine.getGlobalVariable('config');
|
||||||
var lib = libService.loadScript('lib_cadastro_padrao');
|
var lib = libService.loadScript('lib_cadastro_padrao');
|
||||||
var retorno = lib.fncLimpaCampos(config);
|
var retorno = lib.fncLimpaCampos(config);
|
||||||
|
engine.getField('idCategoria')['setValue(java.lang.Object)'](null);
|
||||||
};
|
};
|
||||||
|
|
||||||
var habilitaCampos = function(lHabilita){
|
var habilitaCampos = function(lHabilita){
|
||||||
@@ -97,7 +99,11 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
habilitaCampos(true);
|
habilitaCampos(true);
|
||||||
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
|
||||||
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
engine.getLayout('pnlInclusao').getRootComposition().setVisible(true);
|
||||||
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
engine.getWidgetController('btnVoltar').getButton().setVisible(true);
|
||||||
|
engine.getField('idPesquisaLista')['setValue(java.lang.String)'](null);
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idCategoria')['setValue(java.lang.Object)'](null);
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
@@ -209,11 +215,12 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
"nome" : "subcategoria" ,
|
"nome" : "subcategoria" ,
|
||||||
"sequence" : "subcategoria_seq" ,
|
"sequence" : "subcategoria_seq" ,
|
||||||
"idTabela" : "CODIGO",
|
"idTabela" : "CODIGO",
|
||||||
"campos" : ["CODIGO", "DESCRICAO" ],
|
"campos" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ],
|
||||||
"camposTable" : ["CODIGO", "DESCRICAO" ]
|
"camposTable" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ]
|
||||||
},
|
},
|
||||||
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
"relaciona" : [ ["CODIGO","idChave","Number"] ,
|
||||||
["DESCRICAO","idDescricao","String"]
|
["DESCRICAO","idDescricao","String"],
|
||||||
|
["CODIGO_CATEGORIA","idCategoria","Number"]
|
||||||
] ,
|
] ,
|
||||||
|
|
||||||
"validacaoExclusao" :
|
"validacaoExclusao" :
|
||||||
@@ -325,6 +332,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
|
|
||||||
<column name="CODIGO" caption="Código"/>
|
<column name="CODIGO" caption="Código"/>
|
||||||
<column name="DESCRICAO" caption="Descrição"/>
|
<column name="DESCRICAO" caption="Descrição"/>
|
||||||
|
|
||||||
</columns>
|
</columns>
|
||||||
</DBTable>
|
</DBTable>
|
||||||
</VerticalLayout>
|
</VerticalLayout>
|
||||||
@@ -377,6 +385,17 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
<HorizontalLayout width="100%" spacing="true">
|
<HorizontalLayout width="100%" spacing="true">
|
||||||
<TextField id="idChave" type="string" caption="Código" width="100%" expandRatio="0.08" />
|
<TextField id="idChave" type="string" caption="Código" width="100%" expandRatio="0.08" />
|
||||||
<TextField id="idDescricao" text-transform="uppercase" type="string" caption="Nome" required="true" width="100%" expandRatio="1" />
|
<TextField id="idDescricao" text-transform="uppercase" type="string" caption="Nome" required="true" width="100%" expandRatio="1" />
|
||||||
|
<DBComboBox type="number" required="true" id="idCategoria" allowNullSelection="true" caption="Categoria" description="Selecione a categoria que será vinculada" width="100%" expandRatio="0.4">
|
||||||
|
<datasource>
|
||||||
|
<freeQuery connection-key="vitruvio">
|
||||||
|
<![CDATA[
|
||||||
|
Select c.codigo, c.descricao from categoria c
|
||||||
|
]]>
|
||||||
|
</freeQuery>
|
||||||
|
</datasource>
|
||||||
|
<key-field>CODIGO</key-field>
|
||||||
|
<caption-field>DESCRICAO</caption-field>
|
||||||
|
</DBComboBox>
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
</VerticalLayout>
|
</VerticalLayout>
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
<description>Cadastro de Veículos</description>
|
<description>Cadastro de Veículos</description>
|
||||||
<afterFormRenderScript language="JavaScript">
|
<afterFormRenderScript language="JavaScript">
|
||||||
<;
|
||||||
|
engine.getField('listaPrincipal').refresh();
|
||||||
|
engine.getField('idPesquisa')['setValue(java.lang.Object)'](null);
|
||||||
|
|
||||||
engine.getField('idChave').focus();
|
engine.getField('idChave').focus();
|
||||||
|
|
||||||
@@ -385,12 +387,12 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
</DBSearchField>
|
</DBSearchField>
|
||||||
<HorizontalLayout width="60%" spacing="true">
|
<HorizontalLayout width="60%" spacing="true">
|
||||||
<TextField type="number" id="idChave" caption="Código" width="100%" expandRatio="0.08" />
|
<TextField type="number" id="idChave" caption="Código" width="100%" expandRatio="0.08" />
|
||||||
<TextField type="string" id="idPlaca" text-transform="uppercase" caption="Placa" required="true" width="100%" expandRatio="1" />
|
<TextField type="string" id="idPlaca" text-transform="uppercase" caption="Placa" maxLength="8" required="true" width="100%" expandRatio="0.15" />
|
||||||
|
<TextField type="string" id="idModelo" text-transform="uppercase" caption="Modelo" width="100%" expandRatio="1" />
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
<HorizontalLayout width="100%" spacing="true" >
|
<HorizontalLayout width="60%" spacing="true" >
|
||||||
<TextField type="string" id="idModelo" caption="Modelo" required="true" width="100%" expandRatio="0.45" />
|
<TextField type="string" id="idMarca" text-transform="uppercase" caption="Marca" width="100%" expandRatio="1" />
|
||||||
<TextField type="string" id="idMarca" caption="Marca" required="true" width="100%" expandRatio="0.45" />
|
<NumericField type="number" id="idAno" caption="Ano" width="100%" expandRatio="0.15" maximumValue="2999" maxLength="4"/>
|
||||||
<NumericField type="number" id="idAno" caption="Ano" required="true" width="100%" expandRatio="0.1" maximumValue="2999" />
|
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
</VerticalLayout>
|
</VerticalLayout>
|
||||||
</Tab>
|
</Tab>
|
||||||
@@ -407,7 +409,7 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
|
|||||||
importClass(Packages.br.com.davinti.base.vaadin.components.layout.MessageBox);
|
importClass(Packages.br.com.davinti.base.vaadin.components.layout.MessageBox);
|
||||||
function run() {
|
function run() {
|
||||||
if (engine.isValid()) {
|
if (engine.isValid()) {
|
||||||
if (engine.getGlobalVariable('validarDuplicidade')(engine.getField('idDescricao').getValue())) {
|
if (engine.getGlobalVariable('validarDuplicidade')(engine.getField('idPlaca').getValue())) {
|
||||||
MessageBox.show(MessageBox.BoxType.INFO, 'Atenção', 'Já existe uma operação cadastrada com este nome.');
|
MessageBox.show(MessageBox.BoxType.INFO, 'Atenção', 'Já existe uma operação cadastrada com este nome.');
|
||||||
} else {
|
} else {
|
||||||
var config = engine.getGlobalVariable('config');
|
var config = engine.getGlobalVariable('config');
|
||||||
|
|||||||
@@ -228,12 +228,15 @@
|
|||||||
<datasource>
|
<datasource>
|
||||||
<freeQuery connection-key="vitruvio">
|
<freeQuery connection-key="vitruvio">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Select * from subcategoria
|
Select * from subcategoria where codigo_categoria = ${categoria}
|
||||||
]]>
|
]]>
|
||||||
</freeQuery>
|
</freeQuery>
|
||||||
</datasource>
|
</datasource>
|
||||||
<key-field>CODIGO</key-field>
|
<key-field>CODIGO</key-field>
|
||||||
<caption-field>DESCRICAO</caption-field>
|
<caption-field>DESCRICAO</caption-field>
|
||||||
|
<bind>
|
||||||
|
<parameter value-type="number" defaultValue="-1" parameterName="categoria" field-ref="categoria" />
|
||||||
|
</bind>
|
||||||
</DBComboBox>
|
</DBComboBox>
|
||||||
</HorizontalLayout>
|
</HorizontalLayout>
|
||||||
<HorizontalLayout spacing="true" width="100%" height="100%" >
|
<HorizontalLayout spacing="true" width="100%" height="100%" >
|
||||||
|
|||||||
Reference in New Issue
Block a user