@nixweb/nixloc-ui 0.0.121 → 0.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/src/component/template/ModeloRelatorioView.drawio +2 -2
- package/docs/src/store/modulos/relatorio.drawio +1 -1
- package/package.json +77 -77
- package/public/styles/app.css +1 -1
- package/src/component/forms/{Botao.vue → Button.vue} +53 -57
- package/src/component/forms/CheckboxGroup.vue +63 -0
- package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +53 -53
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
- package/src/component/forms/EditorHtml.vue +123 -0
- package/src/component/forms/FileUpload.vue +189 -0
- package/src/component/forms/InputDecimal.vue +137 -0
- package/src/component/forms/InputNumber.vue +149 -0
- package/src/component/forms/InputPassword.vue +135 -0
- package/src/component/forms/InputText.vue +157 -0
- package/src/component/forms/Modal.vue +15 -15
- package/src/component/forms/RadioGroup.vue +50 -0
- package/src/component/forms/Select.vue +337 -0
- package/src/component/forms/SelectStatic.vue +120 -0
- package/src/component/forms/TextArea.vue +126 -0
- package/src/component/forms/Toggle.vue +13 -13
- package/src/component/layout/{Conta.vue → Account.vue} +28 -28
- package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
- package/src/component/layout/Badge.vue +23 -23
- package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
- package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
- package/src/component/layout/Menu.vue +66 -66
- package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
- package/src/component/layout/Panel.vue +142 -0
- package/src/component/layout/Popover.vue +1 -1
- package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
- package/src/component/layout/Tag.vue +9 -9
- package/src/component/layout/Topo.vue +1 -1
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/BotaoCarregarMais.vue +9 -9
- package/src/component/shared/BotaoConsulta.vue +9 -9
- package/src/component/shared/CabecalhoImpressao.vue +6 -6
- package/src/component/shared/CodigoEditor.vue +16 -16
- package/src/component/shared/Confirmacao.vue +28 -28
- package/src/component/shared/Dica.vue +10 -10
- package/src/component/shared/DocumentoEditor.vue +3 -3
- package/src/component/shared/DocumentoPreview.vue +2 -2
- package/src/component/shared/EsconderMostrar.vue +26 -26
- package/src/component/shared/ExportarExcel.vue +14 -14
- package/src/component/shared/ExportarPDF.vue +10 -10
- package/src/component/shared/FiltroHorizontal.vue +19 -19
- package/src/component/shared/LegendaParametro.vue +17 -17
- package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/Paginacao.vue +10 -10
- package/src/component/shared/Progresso.vue +2 -2
- package/src/component/shared/Registro.vue +2 -2
- package/src/component/shared/ResumoTabela.vue +6 -6
- package/src/component/shared/SalvarCancelar.vue +26 -26
- package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
- package/src/component/shared/Tabela.vue +49 -49
- package/src/component/shared/TabelaBotao.vue +13 -13
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
- package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
- package/src/component/shared/construtor-consulta/Campo.vue +127 -0
- package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
- package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
- package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
- package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
- package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
- package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
- package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
- package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
- package/src/component/template/ModeloDocumentoView.vue +79 -79
- package/src/component/template/ModeloLista.vue +66 -66
- package/src/component/template/ModeloRelatorioListaView.vue +71 -68
- package/src/component/template/ModeloRelatorioView.vue +201 -190
- package/src/component/template/ModeloSubView.vue +13 -13
- package/src/component/template/ModeloView.vue +17 -17
- package/src/component/template/Relatorio.js +1 -5
- package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
- package/src/component/value-objects/DadosContato.vue +27 -27
- package/src/component/value-objects/DadosPessoa.js +1 -1
- package/src/component/value-objects/DadosPessoa.vue +52 -52
- package/src/component/value-objects/Endereco.js +1 -1
- package/src/component/value-objects/Endereco.vue +83 -83
- package/src/config/dicas.js +1 -1
- package/src/config/token.js +2 -2
- package/src/store/modules/generic.js +489 -0
- package/src/store/modules/report.js +246 -0
- package/src/store/modules/user.js +38 -0
- package/src/store/modules/validation.js +39 -0
- package/src/store/store.js +4 -4
- package/src/component/forms/ArquivoUpload.vue +0 -199
- package/src/component/forms/CheckboxMultiplo.vue +0 -63
- package/src/component/forms/Decimal.vue +0 -137
- package/src/component/forms/Escolher.vue +0 -335
- package/src/component/forms/EscolherEstatico.vue +0 -139
- package/src/component/forms/Numero.vue +0 -153
- package/src/component/forms/Opcoes.vue +0 -51
- package/src/component/forms/Senha.vue +0 -139
- package/src/component/forms/Texto.vue +0 -161
- package/src/component/forms/TextoArea.vue +0 -126
- package/src/component/forms/TextoEditor.vue +0 -123
- package/src/component/layout/Painel.vue +0 -142
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/query-builder/Campo.vue +0 -116
- package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
- package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
- package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
- package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
- package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
- package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -187
- package/src/component/shared/query-builder/main.js +0 -81
- package/src/store/modulos/generic.js +0 -494
- package/src/store/modulos/relatorio.js +0 -204
- package/src/store/modulos/usuario.js +0 -38
- package/src/store/modulos/validation.js +0 -39
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<Carregando :centralizado="false" v-show="carregando('modeloSubView')" />
|
|
4
4
|
<div v-show="!carregando('modeloSubView')">
|
|
5
|
-
<slot name="
|
|
6
|
-
<div v-if="
|
|
5
|
+
<slot name="content-buttons"></slot>
|
|
6
|
+
<div v-if="showSearch">
|
|
7
7
|
<Pesquisa />
|
|
8
8
|
<br />
|
|
9
9
|
</div>
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
:mostrarFiltroHorizontal="mostrarFiltroHorizontal"
|
|
16
16
|
:botaoExcluir="botaoExcluir"
|
|
17
17
|
>
|
|
18
|
-
<div slot="
|
|
19
|
-
<slot name="
|
|
18
|
+
<div slot="content-buttons-tabela-cabecalho">
|
|
19
|
+
<slot name="content-buttons-tabela-cabecalho"></slot>
|
|
20
20
|
</div>
|
|
21
|
-
<div slot="
|
|
22
|
-
<slot name="
|
|
21
|
+
<div slot="content-filter-horizontal">
|
|
22
|
+
<slot name="content-filter-horizontal"></slot>
|
|
23
23
|
</div>
|
|
24
|
-
<div slot="
|
|
25
|
-
<slot name="
|
|
24
|
+
<div slot="content-buttons-tabela">
|
|
25
|
+
<slot name="content-buttons-tabela"></slot>
|
|
26
26
|
</div>
|
|
27
27
|
</ModeloLista>
|
|
28
28
|
</div>
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script>
|
|
33
|
-
import Pesquisa from "../shared/
|
|
34
|
-
import Carregando from "../shared/
|
|
33
|
+
import Pesquisa from "../shared/Search.vue";
|
|
34
|
+
import Carregando from "../shared/Loading.vue";
|
|
35
35
|
|
|
36
36
|
import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
|
|
37
37
|
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
props: {
|
|
44
44
|
modeloLista: Object,
|
|
45
45
|
propsParam: Object,
|
|
46
|
-
|
|
46
|
+
showSearch: {
|
|
47
47
|
type: Boolean,
|
|
48
48
|
default: true,
|
|
49
49
|
},
|
|
@@ -60,10 +60,10 @@ export default {
|
|
|
60
60
|
...mapGetters("generic", ["carregando"]),
|
|
61
61
|
},
|
|
62
62
|
created() {
|
|
63
|
-
this.
|
|
63
|
+
this.addLoading("modeloSubView");
|
|
64
64
|
},
|
|
65
65
|
methods: {
|
|
66
|
-
...mapMutations("generic", ["
|
|
66
|
+
...mapMutations("generic", ["addLoading"]),
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
69
|
</script>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<Painel
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
:
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:showVerticalFilter="panel.showVerticalFilter"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
9
|
>
|
|
10
|
-
<div slot="
|
|
11
|
-
<slot name="
|
|
10
|
+
<div slot="content-filter-vertical">
|
|
11
|
+
<slot name="content-filter-vertical"></slot>
|
|
12
12
|
</div>
|
|
13
|
-
<div slot="
|
|
14
|
-
<slot name="
|
|
13
|
+
<div slot="content-buttons">
|
|
14
|
+
<slot name="content-buttons"></slot>
|
|
15
15
|
</div>
|
|
16
|
-
<div slot="
|
|
16
|
+
<div slot="content-main">
|
|
17
17
|
<ModeloLista :modeloLista="modeloLista" :botaoExcluir="botaoExcluir">
|
|
18
|
-
<div slot="
|
|
19
|
-
<slot name="
|
|
18
|
+
<div slot="content-buttons-tabela-cabecalho">
|
|
19
|
+
<slot name="content-buttons-tabela-cabecalho"></slot>
|
|
20
20
|
</div>
|
|
21
|
-
<div slot="
|
|
22
|
-
<slot name="
|
|
21
|
+
<div slot="content-filter-horizontal">
|
|
22
|
+
<slot name="content-filter-horizontal"></slot>
|
|
23
23
|
</div>
|
|
24
|
-
<div slot="
|
|
25
|
-
<slot name="
|
|
24
|
+
<div slot="content-buttons-tabela">
|
|
25
|
+
<slot name="content-buttons-tabela"></slot>
|
|
26
26
|
</div>
|
|
27
27
|
</ModeloLista>
|
|
28
28
|
</div>
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
name: "ModeloView",
|
|
39
39
|
components: { Painel, ModeloLista },
|
|
40
40
|
props: {
|
|
41
|
-
|
|
41
|
+
panel: Object,
|
|
42
42
|
modeloLista: Object,
|
|
43
43
|
botaoExcluir: {
|
|
44
44
|
type: Boolean,
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col sm="12"
|
|
5
5
|
><Texto
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
v-model="
|
|
12
|
-
:
|
|
6
|
+
title="Nome"
|
|
7
|
+
field="nome"
|
|
8
|
+
:formName="formName"
|
|
9
|
+
:required="true"
|
|
10
|
+
:maxLength="40"
|
|
11
|
+
v-model="report.nome"
|
|
12
|
+
:markFormDirty="false"
|
|
13
13
|
/>
|
|
14
14
|
</b-col>
|
|
15
15
|
</b-row>
|
|
16
16
|
<b-row>
|
|
17
17
|
<b-col sm="12">
|
|
18
18
|
<div class="text-right">
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
19
|
+
<Button
|
|
20
|
+
key="salvar"
|
|
21
|
+
type="success"
|
|
22
|
+
title="Salvar"
|
|
23
|
+
:disabled="!isFormValid(formName)"
|
|
24
|
+
classIcon="fas fa-save"
|
|
25
|
+
size="medium"
|
|
26
|
+
:clicked="salvarRelatorio"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
</b-col>
|
|
@@ -33,71 +33,71 @@
|
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
35
|
import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
|
|
36
|
-
import
|
|
37
|
-
import
|
|
36
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
37
|
+
import report from "@nixweb/nixloc-ui/src/component/template/report.js";
|
|
38
38
|
|
|
39
39
|
import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
|
|
40
40
|
|
|
41
41
|
export default {
|
|
42
42
|
name: "RelatorioAdicionarModificar",
|
|
43
|
-
components: {
|
|
43
|
+
components: { Button, Texto },
|
|
44
44
|
props: {
|
|
45
|
-
|
|
45
|
+
module: String,
|
|
46
46
|
},
|
|
47
47
|
data() {
|
|
48
48
|
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
urlAdicionar: "/api/v1/shared/
|
|
52
|
-
urlModificar: "/api/v1/shared/
|
|
49
|
+
formName: "relatorioAdicionarModificar",
|
|
50
|
+
report: new report(),
|
|
51
|
+
urlAdicionar: "/api/v1/shared/report/adicionar",
|
|
52
|
+
urlModificar: "/api/v1/shared/report/modificar",
|
|
53
53
|
};
|
|
54
54
|
},
|
|
55
55
|
computed: {
|
|
56
|
-
...mapGetters("validation", ["
|
|
56
|
+
...mapGetters("validation", ["isFormValid"]),
|
|
57
57
|
...mapGetters("generic", ["evento"]),
|
|
58
|
-
...mapGetters("
|
|
59
|
-
...mapState("
|
|
58
|
+
...mapGetters("report", ["headerTable", "filtroSelecionado"]),
|
|
59
|
+
...mapState("report", ["selectedField", "campoOrdenado"]),
|
|
60
60
|
},
|
|
61
61
|
methods: {
|
|
62
62
|
...mapActions("generic", ["postApi", "putApi"]),
|
|
63
|
-
...mapMutations("generic", ["
|
|
64
|
-
...mapMutations("validation", ["
|
|
63
|
+
...mapMutations("generic", ["removeLoading", "removeEvent", "hideModal"]),
|
|
64
|
+
...mapMutations("validation", ["resetValidation"]),
|
|
65
65
|
salvarRelatorio() {
|
|
66
|
+
var personalizado = this.report.id ? "" : "Personalizado";
|
|
66
67
|
const consulta = {
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
routeName: `${this.$route.name}${personalizado}`,
|
|
69
|
+
field: this.selectedField,
|
|
69
70
|
ordenacao: this.campoOrdenado,
|
|
70
|
-
|
|
71
|
+
filter: this.filtroSelecionado.children,
|
|
71
72
|
};
|
|
72
73
|
let obj = {
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
id: this.report.id,
|
|
75
|
+
nome: this.report.nome,
|
|
76
|
+
module: this.module,
|
|
75
77
|
consulta: JSON.stringify(consulta),
|
|
76
78
|
};
|
|
77
|
-
if (this.
|
|
79
|
+
if (this.report.id) {
|
|
78
80
|
let params = { url: this.urlModificar, obj: obj };
|
|
79
81
|
this.putApi(params).then((response) => {
|
|
80
|
-
if (response.
|
|
81
|
-
this.
|
|
82
|
+
if (response.success) this.hideModal();
|
|
83
|
+
this.removeLoading(["salvar"]);
|
|
82
84
|
});
|
|
83
85
|
} else {
|
|
84
86
|
let params = { url: this.urlAdicionar, obj: obj };
|
|
85
87
|
this.postApi(params).then((response) => {
|
|
86
|
-
if (response.
|
|
87
|
-
this.
|
|
88
|
+
if (response.success) this.hideModal();
|
|
89
|
+
this.removeLoading(["salvar"]);
|
|
88
90
|
});
|
|
89
91
|
}
|
|
90
92
|
},
|
|
91
|
-
modificar(dados) {
|
|
92
|
-
this.relatorio = new Relatorio();
|
|
93
|
-
this.relatorio.modificar(dados);
|
|
94
|
-
this.removeCarregando([dados.id]);
|
|
95
|
-
},
|
|
96
93
|
},
|
|
97
94
|
watch: {
|
|
98
95
|
evento: {
|
|
99
96
|
handler(evento) {
|
|
100
|
-
if (evento.nome == "modificarRelatorio")
|
|
97
|
+
if (evento.nome == "modificarRelatorio") {
|
|
98
|
+
this.report.id = this.$route.params.id;
|
|
99
|
+
if (this.report.id) this.report.nome = this.$route.params.nome;
|
|
100
|
+
}
|
|
101
101
|
},
|
|
102
102
|
deep: true,
|
|
103
103
|
},
|
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
5
5
|
<Texto
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
6
|
+
title="Telefone"
|
|
7
|
+
field="telefone"
|
|
8
|
+
:formName="formName"
|
|
9
|
+
:mask="['(##) ####-####', '(##) #####-####']"
|
|
10
|
+
:maxLength="20"
|
|
11
|
+
:required="required"
|
|
12
12
|
v-model="dadosContato.telefone"
|
|
13
13
|
/>
|
|
14
14
|
</b-col>
|
|
15
15
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
16
16
|
<Texto
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
17
|
+
title="Site"
|
|
18
|
+
field="site"
|
|
19
|
+
:formName="formName"
|
|
20
|
+
mask=""
|
|
21
|
+
:maxLength="100"
|
|
22
|
+
:required="required"
|
|
23
23
|
v-model="dadosContato.site"
|
|
24
24
|
/>
|
|
25
25
|
</b-col>
|
|
26
26
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
27
27
|
<Texto
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
:
|
|
28
|
+
title="E-mail"
|
|
29
|
+
field="email"
|
|
30
|
+
:formName="formName"
|
|
31
|
+
mask=""
|
|
32
|
+
:maxLength="100"
|
|
33
|
+
:required="required"
|
|
34
34
|
v-model="dadosContato.email"
|
|
35
35
|
/>
|
|
36
36
|
</b-col>
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import
|
|
42
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
43
43
|
import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
|
|
44
|
-
import
|
|
44
|
+
import options from "@nixweb/nixloc-ui/src/component/forms/options";
|
|
45
45
|
import DadosContato from "@nixweb/nixloc-ui/src/component/value-objects/DadosContato.js";
|
|
46
46
|
|
|
47
47
|
import { mapGetters } from "vuex";
|
|
@@ -49,14 +49,14 @@ import { mapGetters } from "vuex";
|
|
|
49
49
|
export default {
|
|
50
50
|
name: "DadosContato",
|
|
51
51
|
props: {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
formName: String,
|
|
53
|
+
required: {
|
|
54
54
|
type: Boolean,
|
|
55
55
|
default: false,
|
|
56
56
|
},
|
|
57
57
|
value: Object,
|
|
58
58
|
},
|
|
59
|
-
components: {
|
|
59
|
+
components: { options, Texto, Button },
|
|
60
60
|
data() {
|
|
61
61
|
return {
|
|
62
62
|
dadosContato: new DadosContato(),
|
|
@@ -66,9 +66,9 @@ export default {
|
|
|
66
66
|
if (this.value.telefone != undefined) this.dadosContato = this.value;
|
|
67
67
|
},
|
|
68
68
|
methods: {
|
|
69
|
-
carregaDados(
|
|
70
|
-
this.dadosContato.telefone =
|
|
71
|
-
this.dadosContato.email =
|
|
69
|
+
carregaDados(data) {
|
|
70
|
+
this.dadosContato.telefone = data.telefone;
|
|
71
|
+
this.dadosContato.email = data.email;
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
74
|
computed: {
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
evento: {
|
|
91
91
|
handler(evento) {
|
|
92
92
|
if (evento.nome == "buscarCnpjReceita") {
|
|
93
|
-
this.carregaDados(evento.
|
|
93
|
+
this.carregaDados(evento.data);
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
deep: true,
|
|
@@ -2,80 +2,80 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:
|
|
5
|
+
<options
|
|
6
|
+
field="typePessoa"
|
|
7
|
+
:formName="formName"
|
|
8
|
+
:options="[
|
|
9
9
|
{ text: 'Física', value: 1 },
|
|
10
10
|
{ text: 'Jurídica', value: 2 },
|
|
11
11
|
]"
|
|
12
|
-
v-model="dadosPessoa.
|
|
12
|
+
v-model="dadosPessoa.typePessoa"
|
|
13
13
|
/>
|
|
14
14
|
</b-col>
|
|
15
15
|
</b-row>
|
|
16
16
|
<b-row>
|
|
17
17
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
18
18
|
<Texto
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
:
|
|
19
|
+
:title="dadosPessoa.typePessoa == 2 ? 'CNPJ' : 'CPF'"
|
|
20
|
+
field="cnpjCpf"
|
|
21
|
+
:formName="formName"
|
|
22
|
+
:mask="['##.###.###/####-##', '###.###.###-##']"
|
|
23
|
+
:maxLength="30"
|
|
24
|
+
:required="required"
|
|
25
25
|
v-model="dadosPessoa.cnpjCpf"
|
|
26
|
-
><div class="glyphicon
|
|
27
|
-
<
|
|
28
|
-
v-if="dadosPessoa.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
|
|
34
|
-
:
|
|
26
|
+
><div class="glyphicon margin-button">
|
|
27
|
+
<Button
|
|
28
|
+
v-if="dadosPessoa.typePessoa == 2"
|
|
29
|
+
key="buscarCnpjReceita"
|
|
30
|
+
type="success"
|
|
31
|
+
classIcon="fas fa-search"
|
|
32
|
+
:disabled="dadosPessoa.cnpjCpf.length < 18"
|
|
33
|
+
size="small"
|
|
34
|
+
:clicked="buscarCnpjReceita"
|
|
35
35
|
/></div
|
|
36
36
|
></Texto>
|
|
37
37
|
</b-col>
|
|
38
38
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
39
39
|
<Texto
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
40
|
+
:title="dadosPessoa.typePessoa == 2 ? 'Inscrição Estadual' : 'RG'"
|
|
41
|
+
field="inscricaoEstadualRg"
|
|
42
|
+
:formName="formName"
|
|
43
|
+
:maxLength="50"
|
|
44
|
+
:required="required"
|
|
45
45
|
v-model="dadosPessoa.inscricaoEstadualRg"
|
|
46
46
|
/>
|
|
47
47
|
</b-col>
|
|
48
48
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
49
49
|
<Texto
|
|
50
|
-
v-if="dadosPessoa.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
:
|
|
55
|
-
:
|
|
50
|
+
v-if="dadosPessoa.typePessoa == 2"
|
|
51
|
+
title="Inscrição Municipal"
|
|
52
|
+
field="inscricaoMunicipal"
|
|
53
|
+
:formName="formName"
|
|
54
|
+
:maxLength="50"
|
|
55
|
+
:required="required"
|
|
56
56
|
v-model="dadosPessoa.inscricaoMunicipal"
|
|
57
57
|
/>
|
|
58
58
|
</b-col>
|
|
59
59
|
</b-row>
|
|
60
|
-
<br v-if="dadosPessoa.
|
|
60
|
+
<br v-if="dadosPessoa.typePessoa == 2" />
|
|
61
61
|
<b-row>
|
|
62
62
|
<b-col xs="12" sm="12" md="12" lg="8" xl="8">
|
|
63
63
|
<Texto
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
:
|
|
67
|
-
:
|
|
68
|
-
:
|
|
64
|
+
:title="dadosPessoa.typePessoa == 2 ? 'Razão Social' : 'Nome'"
|
|
65
|
+
field="razaoSocialNome"
|
|
66
|
+
:formName="formName"
|
|
67
|
+
:required="true"
|
|
68
|
+
:maxLength="100"
|
|
69
69
|
v-model="dadosPessoa.razaoSocialNome"
|
|
70
70
|
/>
|
|
71
71
|
</b-col>
|
|
72
72
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
73
73
|
<Texto
|
|
74
|
-
:
|
|
75
|
-
|
|
76
|
-
:
|
|
77
|
-
:
|
|
78
|
-
:
|
|
74
|
+
:title="dadosPessoa.typePessoa == 2 ? 'Fantasia' : 'Apelido'"
|
|
75
|
+
field="fantasiaApelido"
|
|
76
|
+
:formName="formName"
|
|
77
|
+
:required="true"
|
|
78
|
+
:maxLength="100"
|
|
79
79
|
v-model="dadosPessoa.fantasiaApelido"
|
|
80
80
|
/>
|
|
81
81
|
</b-col>
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<script>
|
|
87
|
-
import
|
|
87
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
88
88
|
import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
|
|
89
|
-
import
|
|
89
|
+
import options from "@nixweb/nixloc-ui/src/component/forms/options";
|
|
90
90
|
import DadosPessoa from "@nixweb/nixloc-ui/src/component/value-objects/DadosPessoa.js";
|
|
91
91
|
|
|
92
92
|
import { mapMutations } from "vuex";
|
|
@@ -94,14 +94,14 @@ import { mapMutations } from "vuex";
|
|
|
94
94
|
export default {
|
|
95
95
|
name: "DadosPessoa",
|
|
96
96
|
props: {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
formName: String,
|
|
98
|
+
required: {
|
|
99
99
|
type: Boolean,
|
|
100
100
|
default: false,
|
|
101
101
|
},
|
|
102
102
|
value: Object,
|
|
103
103
|
},
|
|
104
|
-
components: {
|
|
104
|
+
components: { options, Texto, Button },
|
|
105
105
|
data() {
|
|
106
106
|
return {
|
|
107
107
|
dadosPessoa: new DadosPessoa(),
|
|
@@ -111,21 +111,21 @@ export default {
|
|
|
111
111
|
if (this.value.razaoSocialNome != undefined) this.dadosPessoa = this.value;
|
|
112
112
|
},
|
|
113
113
|
methods: {
|
|
114
|
-
...mapMutations("generic", ["
|
|
114
|
+
...mapMutations("generic", ["addEvent", "addNotifications", "removeLoading"]),
|
|
115
115
|
buscarCnpjReceita() {
|
|
116
116
|
let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.dadosPessoa.cnpjCpf}&token=94473735FzLqpNKajP170569464`;
|
|
117
117
|
this.$http.post(url, {}, {}).then((response) => {
|
|
118
118
|
if (response.data.return == "OK") {
|
|
119
|
-
this.
|
|
119
|
+
this.addEvent({
|
|
120
120
|
nome: "buscarCnpjReceita",
|
|
121
|
-
|
|
121
|
+
data: response.data.result,
|
|
122
122
|
});
|
|
123
123
|
this.dadosPessoa.razaoSocialNome = response.data.result.nome;
|
|
124
124
|
this.dadosPessoa.fantasiaApelido = response.data.result.fantasia;
|
|
125
125
|
} else {
|
|
126
|
-
this.
|
|
126
|
+
this.addNotifications([{ message: "CNPJ inválido ou não encontrado." }]);
|
|
127
127
|
}
|
|
128
|
-
this.
|
|
128
|
+
this.removeLoading(["buscarCnpjReceita"]);
|
|
129
129
|
});
|
|
130
130
|
},
|
|
131
131
|
},
|