Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

PropriedadeDescrição
title

Título da página.

Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"title":"Novo Relacionamento Tributo"

breadcrumb

O caminho de migalhas da página, recebe a página o link para a página de listagem com label assim como também o link e label da página atual, o link de listagem deve ser "/relationshipTribute" para que ao ser clicado a pagina seja redirecionada para a tela de listagem.


Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"breadcrumb": {
        "items": [
            {
                "link": "/relationshipTribute",
                "label": "Lista Relacionamento Tributo"
            },
            {
                "link": "/relationshipTribute",
                "label": "Novo Relacionamento"
            }
        ]
}

getDefault

Indica se ao abrir a página de criação de um novo registro deve busca os valores padrões ou não, recebe true ou false.

OBS: Valores padrões (pode ser customizado): IBS UF, nota de entrada, "* - todos *" para as informações principais e 0 para as alíquotas e percentuas.

Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"getDefault": true
pageCustomActions

Indica quais ações a tela terá, por padrão irá criar "Salvar, Salvar e Continuar e Voltar", para remover a ação basta remover o label da ação que deseja que não apareça, pode ser retornar "URL" junto com o label para indicar para onde deve ser redirecionado ao clicar, a url da tela de listagem é "/relationshipTribute".

Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"pageCustomActions": [
        {
            "label": "Salvar"
        },
        {
            "label": "Salvar e Continuar"
        },
        {
            "label": "Voltar",
            "url": "/relationshipTribute"
        }
]

validateFields

Indica quais campos do po-dynamic-form ira executar a validação ao sair do campo, a validação em sí é feita na API de dados "/dts/datasul-rest/resources/prg/ftp/v1/refRelationshipTribute/validate", enviando para a API qual campo foi modificado e o registro completo. Para saber mais sobre o que pode ser feito com este campo, consulte a documentação do PO-UI: PoDynamicFormValidation

Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"validateFields": [
        "codRowid"
]
createDynamicFormFields

formulário dinâmico do cadastro de Relacionamento x Tributo, deve vir um array de objetos que implementam a interface PoDynamicFormField. Para mais informações do que é possível inserir acessar a documentação do Portinari: po-dynamic-form


Informações

Caso a propriedade tenha "searchService" é possível enviar na URL o queryParam "acceptAsterisk" como true pare que seja possivel no lookup informar "*" e seja automaticamente retornado "* - Todos" sem fazer o envio da requisição para a API, exemplo:

"searchService": "/dts/datasul-rest/resources/prg/cdp/v1/establishmentsPublic?acceptAsterisk=true"


OBS: Para as APIs padrões da tela o tratamento já foi feito, caso queira alterar ou incluir outras, a API precisa retornar "code" e "description" para funcionar, sendo o "code" o "*" e a "description  o "Todos", e no metadata o format precisa ser "format": [ "code", "description"], assim como também "fieldValue": "code" e "fieldLabel": "description"

Bloco de código
titleExemplo
linenumberstrue
collapsetrue
"createDynamicFormFields": [
        {
            "gridColumns": 6,
            "property": "tributeType",
            "options": [
                {
                    "label": "CBS",
                    "value": 1
                },
                {
                    "label": "IBS Mun",
                    "value": 2
                },
                {
                    "label": "IBS UF",
                    "value": 3
                },
                {
                    "label": "IS",
                    "value": 4
                }
            ],
            "disabled": false,
            "label": "Tributo",
            "type": "label",
            "key": true,
            "required": true,
            "labels": [
                {
                    "color": "color-10",
                    "tooltip": "Contribuição sobre bens e serviço",
                    "label": "CBS",
                    "value": 1
                },
                {
                    "color": "color-01",
                    "tooltip": "Imposto sobre Bens e serviço (Município)",
                    "label": "IBS MUN",
                    "value": 2
                },
                {
                    "color": "color-05",
                    "tooltip": "Imposto sobre Bens e serviço (Estadual)",
                    "label": "IBS UF",
                    "value": 3
                },
                {
                    "color": "color-08",
                    "tooltip": "Imposto Seletivo",
                    "label": "IS",
                    "value": 4
                }
            ]
        },
        {
            "gridColumns": 6,
            "divider": "Informações principais",
            "property": "dateValidIni",
            "disabled": false,
            "label": "Data inicio Validade",
            "placeholder": "Data de Validade",
            "type": "date",
            "required": true
        },
        {
            "gridColumns": 6,
            "property": "documentType",
            "options": [
                {
                    "label": "Entrada",
                    "value": 1
                },
                {
                    "label": "Saida",
                    "value": 2
                }
            ],
            "disabled": false,
            "label": "Tipo Documento",
            "type": "label",
            "required": true,
            "labels": [
                {
                    "color": "color-10",
                    "tooltip": "Documento de entrada",
                    "label": "Entrada",
                    "value": 1
                },
                {
                    "color": "color-01",
                    "tooltip": "Documento de saida",
                    "label": "Saida",
                    "value": 2
                }
            ]
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/establishmentsPublic?acceptAsterisk=true",
            "columns": [
                {
                    "property": "code",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "name",
                    "label": "Nome",
                    "type": "string"
                }
            ],
            "fieldLabel": "name",
            "property": "codEstab",
            "format": [
                "code",
                "name"
            ],
            "disabled": false,
            "label": "Estabelecimento",
            "placeholder": "Estabelecimento: * para todos",
            "fieldValue": "code",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/cfgTransactionType?acceptAsterisk=true",
            "columns": [
                {
                    "property": "natOperation",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "descriptionType",
                    "label": "Tipo",
                    "type": "string"
                },
                {
                    "property": "description",
                    "label": "Descrição",
                    "type": "string"
                }
            ],
            "fieldLabel": "description",
            "property": "codNaturOperac",
            "format": [
                "natOperation",
                "description"
            ],
            "disabled": false,
            "label": "Natureza de Operação",
            "placeholder": "Natureza - * para todos",
            "fieldValue": "natOperation",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/operationTypesPublic?acceptAsterisk=true",
            "columns": [
                {
                    "property": "code",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "description",
                    "label": "Descrição",
                    "type": "string"
                },
                {
                    "property": "addIinformation",
                    "label": "Informações Adicionais",
                    "type": "string"
                }
            ],
            "fieldLabel": "addIinformation",
            "property": "codCfop",
            "format": [
                "code",
                "description"
            ],
            "disabled": false,
            "label": "CFOP",
            "placeholder": "CFOP: * para todos",
            "fieldValue": "code",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/serviceCode?acceptAsterisk=true",
            "columns": [
                {
                    "property": "code",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "description",
                    "label": "Descrição",
                    "type": "string"
                }
            ],
            "fieldLabel": "description",
            "property": "codService",
            "format": [
                "code",
                "description"
            ],
            "disabled": false,
            "label": "Código de Serviço do Item",
            "placeholder": "Código de Serviço do Item: * para padrão",
            "fieldValue": "code",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/customerGroupsPublic?acceptAsterisk=true",
            "columns": [
                {
                    "property": "code",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "description",
                    "label": "Descrição",
                    "type": "string"
                }
            ],
            "fieldLabel": "description",
            "property": "codClientGroup",
            "format": [
                "code",
                "description"
            ],
            "disabled": false,
            "label": "Grupo de cliente/fornecedor",
            "placeholder": "Grupo de cliente: * para todos",
            "fieldValue": "code",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/customerPublic?acceptAsterisk=true",
            "columns": [
                {
                    "property": "customerCode",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "customerName",
                    "label": "Nome",
                    "type": "string"
                }
            ],
            "fieldLabel": "customerName",
            "property": "codIssuer",
            "format": [
                "customerCode",
                "customerName"
            ],
            "disabled": false,
            "label": "Cliente/Fornecedor",
            "placeholder": "Cliente/Fornecedor: * para todos",
            "fieldValue": "customerCode",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/product?acceptAsterisk=true",
            "columns": [
                {
                    "property": "product",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "productDescription",
                    "label": "Nome",
                    "type": "string"
                },
                {
                    "property": "unitMeasure",
                    "label": "Unidade Medida",
                    "type": "string"
                }
            ],
            "fieldLabel": "unitMeasure",
            "property": "codItem",
            "format": [
                "product",
                "productDescription"
            ],
            "disabled": false,
            "label": "Item",
            "placeholder": "Item: * para todos",
            "fieldValue": "product",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v1/fiscalClassification?acceptAsterisk=true",
            "columns": [
                {
                    "property": "fiscalClassification",
                    "label": "Código",
                    "type": "string"
                },
                {
                    "property": "description",
                    "label": "Descrição",
                    "type": "string"
                }
            ],
            "fieldLabel": "description",
            "property": "codNcm",
            "format": [
                "fiscalClassification",
                "description"
            ],
            "disabled": false,
            "label": "Classificação Fiscal",
            "placeholder": "Classificação Fiscal: * para todos",
            "fieldValue": "fiscalClassification",
            "required": true
        },
        {
            "gridColumns": 6,
            "searchService": "/dts/datasul-rest/resources/prg/cdp/v2/federatedState?acceptAsterisk=true",
            "columns": [
                {
                    "property": "code",
                    "label": "Sigla",
                    "type": "string"
                },
                {
                    "property": "name",
                    "label": "Cidade",
                    "type": "string"
                },
                {
                    "property": "country",
                    "label": "Pais",
                    "type": "string"
                }
            ],
            "fieldLabel": "country",
            "property": "uf",
            "format": [
                "code",
                "name"
            ],
            "disabled": false,
            "label": "Estado",
            "placeholder": "Estado: * para todos",
            "params": {
                "onlyBrasil": true
            },
            "fieldValue": "code",
            "required": true
        },
        {
            "gridColumns": 6,
            "property": "city",
            "disabled": false,
            "label": "Cidade",
            "placeholder": "Cidade: * para todos",
            "type": "string",
            "maxLength": 50,
            "required": true
        },
        {
            "thousandMaxlength": 3,
            "gridColumns": 6,
            "divider": "Alíquotas e Percentuais",
            "property": "aliquot",
            "optional": true,
            "label": "Alíquota",
            "type": "currency",
            "required": false,
            "decimalsLength": 4
        },
        {
            "thousandMaxlength": 3,
            "gridColumns": 6,
            "property": "reductionPercent",
            "optional": true,
            "label": "Perc Redução",
            "type": "currency",
            "required": false,
            "decimalsLength": 4
        },
        {
            "thousandMaxlength": 3,
            "gridColumns": 6,
            "property": "deferralPercent",
            "optional": true,
            "label": "Perc Diferido",
            "type": "currency",
            "required": false,
            "decimalsLength": 4
        },
        {
            "thousandMaxlength": 3,
            "gridColumns": 6,
            "property": "presumCredPercent",
            "optional": true,
            "label": "Perc Créd Presumido",
            "type": "currency",
            "required": false,
            "decimalsLength": 4
        },
        {
            "thousandMaxlength": 3,
            "gridColumns": 6,
            "property": "taxExemptionRate",
            "optional": true,
            "label": "Aliq Desoneração",
            "type": "currency",
            "required": false,
            "decimalsLength": 4
        }
]

...