1566 - Operação

This commit is contained in:
2018-08-07 14:39:48 -03:00
parent 518076f90f
commit 23f629f1de
10 changed files with 73 additions and 30 deletions
+26 -7
View File
@@ -12,12 +12,13 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
"nome" : "subcategoria" ,
"sequence" : "subcategoria_seq" ,
"idTabela" : "CODIGO",
"campos" : ["CODIGO", "DESCRICAO" ],
"camposTable" : ["CODIGO", "DESCRICAO" ]
"campos" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ],
"camposTable" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ]
},
"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"],
["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 lib = libService.loadScript('lib_cadastro_padrao');
var retorno = lib.fncLimpaCampos(config);
engine.getField('idCategoria')['setValue(java.lang.Object)'](null);
};
var habilitaCampos = function(lHabilita){
@@ -97,7 +99,11 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
habilitaCampos(true);
engine.getLayout('pnlTitulo').getRootComposition().setVisible(false);
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();
@@ -209,11 +215,12 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
"nome" : "subcategoria" ,
"sequence" : "subcategoria_seq" ,
"idTabela" : "CODIGO",
"campos" : ["CODIGO", "DESCRICAO" ],
"camposTable" : ["CODIGO", "DESCRICAO" ]
"campos" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ],
"camposTable" : ["CODIGO", "DESCRICAO", "CODIGO_CATEGORIA" ]
},
"relaciona" : [ ["CODIGO","idChave","Number"] ,
["DESCRICAO","idDescricao","String"]
["DESCRICAO","idDescricao","String"],
["CODIGO_CATEGORIA","idCategoria","Number"]
] ,
"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="DESCRICAO" caption="Descrição"/>
</columns>
</DBTable>
</VerticalLayout>
@@ -377,6 +385,17 @@ xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/panel https://bitbuc
<HorizontalLayout width="100%" spacing="true">
<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" />
<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>
</VerticalLayout>
</Tab>