@nixweb/nixloc-ui 0.0.121 → 0.0.124
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 +2 -2
- 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} +8 -8
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +55 -55
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +58 -58
- 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/{Topo.vue → Header.vue} +5 -5
- 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 +15 -15
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/{CodigoEditor.vue → CodeEditor.vue} +25 -25
- package/src/component/shared/Collapse.vue +131 -0
- package/src/component/shared/Confirmation.vue +80 -0
- package/src/component/shared/{DocumentoEditor.vue → DocumentEditor.vue} +10 -16
- package/src/component/shared/{DocumentoPreview.vue → DocumentPreview.vue} +2 -2
- package/src/component/shared/ExportExcel.vue +67 -0
- package/src/component/shared/{ExportarPDF.vue → ExportPDF.vue} +18 -18
- package/src/component/shared/HeaderPrint.vue +36 -0
- package/src/component/shared/HorizontalFilter.vue +59 -0
- package/src/component/shared/LegendaParametro.vue +22 -22
- package/src/component/shared/{Carregando.vue → Loading.vue} +16 -16
- package/src/component/shared/LoadingMoreButton.vue +23 -0
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/{Paginacao.vue → Pagination.vue} +12 -12
- package/src/component/shared/ProgressBar.vue +21 -0
- package/src/component/shared/{BotaoConsulta.vue → QueryButton.vue} +16 -16
- package/src/component/shared/SaveCancel.vue +56 -0
- package/src/component/shared/{Pesquisa.vue → Search.vue} +46 -46
- package/src/component/shared/Table.vue +243 -0
- package/src/component/shared/TableButton.vue +36 -0
- package/src/component/shared/{Registro.vue → TableTotalRecords.vue} +7 -7
- package/src/component/shared/{ResumoTabela.vue → TableTotalization.vue} +12 -8
- package/src/component/shared/Tip.vue +42 -0
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +24 -24
- package/src/component/shared/query-builder/AddRule.vue +187 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +80 -0
- package/src/component/shared/query-builder/DynamicComponent.vue +107 -0
- package/src/component/shared/query-builder/Fields.vue +127 -0
- package/src/component/shared/query-builder/ListDynamicComponent.vue +42 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +25 -120
- package/src/component/shared/query-builder/{Filtro.vue → Rules.vue} +13 -18
- package/src/component/shared/query-builder/SelectRule.vue +96 -0
- package/src/component/shared/query-builder/Tags.vue +14 -14
- package/src/component/shared/query-builder/{Rodape.vue → Totalization.vue} +10 -10
- package/src/component/template/AddEditReport.vue +106 -0
- package/src/component/template/ListViewWithHandlerData.vue +231 -0
- package/src/component/template/ViewTemplateConfiguration.vue +69 -0
- package/src/component/template/ViewTemplateDocumentView.vue +227 -0
- package/src/component/template/ViewTemplateReportList.vue +230 -0
- package/src/component/template/ViewTemplateReportPreview.vue +500 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
- package/src/component/template/ViewTemplateWithTable.vue +49 -0
- package/src/component/template/model/Report.js +6 -0
- package/src/component/value-objects/DadosContato.vue +34 -35
- package/src/component/value-objects/DadosPessoa.vue +58 -58
- package/src/component/value-objects/Endereco.vue +96 -97
- 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/BotaoCarregarMais.vue +0 -23
- package/src/component/shared/CabecalhoImpressao.vue +0 -36
- package/src/component/shared/Confirmacao.vue +0 -80
- package/src/component/shared/Dica.vue +0 -42
- package/src/component/shared/EsconderMostrar.vue +0 -131
- package/src/component/shared/ExportarExcel.vue +0 -67
- package/src/component/shared/FiltroHorizontal.vue +0 -59
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/Progresso.vue +0 -21
- package/src/component/shared/SalvarCancelar.vue +0 -56
- package/src/component/shared/Tabela.vue +0 -275
- package/src/component/shared/TabelaBotao.vue +0 -36
- 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/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/component/template/ModeloAdicionarModificarView.vue +0 -32
- package/src/component/template/ModeloDocumentoView.vue +0 -227
- package/src/component/template/ModeloLista.vue +0 -231
- package/src/component/template/ModeloRelatorioListaView.vue +0 -227
- package/src/component/template/ModeloRelatorioView.vue +0 -489
- package/src/component/template/ModeloSubView.vue +0 -69
- package/src/component/template/ModeloView.vue +0 -49
- package/src/component/template/Relatorio.js +0 -10
- package/src/component/template/RelatorioAdicionarModificar.vue +0 -106
- 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,35 +2,35 @@
|
|
|
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
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
5
|
+
<InputText
|
|
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
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
16
|
+
<InputText
|
|
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
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
:
|
|
27
|
+
<InputText
|
|
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,8 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
|
|
42
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
43
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
45
44
|
import DadosContato from "@nixweb/nixloc-ui/src/component/value-objects/DadosContato.js";
|
|
46
45
|
|
|
47
46
|
import { mapGetters } from "vuex";
|
|
@@ -49,14 +48,14 @@ import { mapGetters } from "vuex";
|
|
|
49
48
|
export default {
|
|
50
49
|
name: "DadosContato",
|
|
51
50
|
props: {
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
formName: String,
|
|
52
|
+
required: {
|
|
54
53
|
type: Boolean,
|
|
55
54
|
default: false,
|
|
56
55
|
},
|
|
57
56
|
value: Object,
|
|
58
57
|
},
|
|
59
|
-
components: {
|
|
58
|
+
components: { InputText, Button },
|
|
60
59
|
data() {
|
|
61
60
|
return {
|
|
62
61
|
dadosContato: new DadosContato(),
|
|
@@ -66,13 +65,13 @@ export default {
|
|
|
66
65
|
if (this.value.telefone != undefined) this.dadosContato = this.value;
|
|
67
66
|
},
|
|
68
67
|
methods: {
|
|
69
|
-
carregaDados(
|
|
70
|
-
this.dadosContato.telefone =
|
|
71
|
-
this.dadosContato.email =
|
|
68
|
+
carregaDados(data) {
|
|
69
|
+
this.dadosContato.telefone = data.telefone;
|
|
70
|
+
this.dadosContato.email = data.email;
|
|
72
71
|
},
|
|
73
72
|
},
|
|
74
73
|
computed: {
|
|
75
|
-
...mapGetters("generic", ["
|
|
74
|
+
...mapGetters("generic", ["event"]),
|
|
76
75
|
},
|
|
77
76
|
watch: {
|
|
78
77
|
value: {
|
|
@@ -87,10 +86,10 @@ export default {
|
|
|
87
86
|
},
|
|
88
87
|
deep: true,
|
|
89
88
|
},
|
|
90
|
-
|
|
91
|
-
handler(
|
|
92
|
-
if (
|
|
93
|
-
this.carregaDados(
|
|
89
|
+
event: {
|
|
90
|
+
handler(event) {
|
|
91
|
+
if (event.nome == "buscarCnpjReceita") {
|
|
92
|
+
this.carregaDados(event.data);
|
|
94
93
|
}
|
|
95
94
|
},
|
|
96
95
|
deep: true,
|
|
@@ -2,10 +2,10 @@
|
|
|
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
|
+
<RadioGroup
|
|
6
|
+
field="tipoPessoa"
|
|
7
|
+
:formName="formName"
|
|
8
|
+
:options="[
|
|
9
9
|
{ text: 'Física', value: 1 },
|
|
10
10
|
{ text: 'Jurídica', value: 2 },
|
|
11
11
|
]"
|
|
@@ -15,67 +15,67 @@
|
|
|
15
15
|
</b-row>
|
|
16
16
|
<b-row>
|
|
17
17
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
18
|
-
<
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
:
|
|
18
|
+
<InputText
|
|
19
|
+
:title="dadosPessoa.tipoPessoa == 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
|
+
></InputText>
|
|
37
37
|
</b-col>
|
|
38
38
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
39
|
-
<
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
39
|
+
<InputText
|
|
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
|
-
<
|
|
50
|
-
v-if="dadosPessoa.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
:
|
|
55
|
-
:
|
|
49
|
+
<InputText
|
|
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
|
-
<
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
:
|
|
67
|
-
:
|
|
68
|
-
:
|
|
63
|
+
<InputText
|
|
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
|
-
<
|
|
74
|
-
:
|
|
75
|
-
|
|
76
|
-
:
|
|
77
|
-
:
|
|
78
|
-
:
|
|
73
|
+
<InputText
|
|
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
|
|
88
|
-
import
|
|
89
|
-
import
|
|
87
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
88
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
89
|
+
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
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: { RadioGroup, InputText, 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
|
},
|
|
@@ -2,51 +2,51 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="12" sm="12" md="12" lg="3" xl="3">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
5
|
+
<InputText
|
|
6
|
+
title="CEP"
|
|
7
|
+
field="cep"
|
|
8
|
+
:formName="formName"
|
|
9
|
+
:mask="'#####-###'"
|
|
10
|
+
:maxLength="9"
|
|
11
|
+
:required="required"
|
|
12
12
|
v-model="endereco.cep"
|
|
13
13
|
>
|
|
14
|
-
<div class="glyphicon
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
:
|
|
14
|
+
<div class="glyphicon margin-button">
|
|
15
|
+
<Button
|
|
16
|
+
key="buscarCep"
|
|
17
|
+
type="success"
|
|
18
|
+
classIcon="fas fa-search"
|
|
19
|
+
size="small"
|
|
20
|
+
:disabled="endereco.cep.length < 9"
|
|
21
|
+
:clicked="buscarCep"
|
|
22
22
|
/></div
|
|
23
|
-
></
|
|
23
|
+
></InputText>
|
|
24
24
|
</b-col>
|
|
25
25
|
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
:
|
|
26
|
+
<InputText
|
|
27
|
+
title="Endereço"
|
|
28
|
+
field="logradouro"
|
|
29
|
+
:formName="formName"
|
|
30
|
+
:maxLength="150"
|
|
31
|
+
:required="required"
|
|
32
32
|
v-model="endereco.logradouro"
|
|
33
33
|
/>
|
|
34
34
|
</b-col>
|
|
35
35
|
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
:
|
|
40
|
-
:
|
|
36
|
+
<InputText
|
|
37
|
+
title="Número"
|
|
38
|
+
field="numero"
|
|
39
|
+
:formName="formName"
|
|
40
|
+
:maxLength="20"
|
|
41
41
|
v-model="endereco.numero"
|
|
42
42
|
/>
|
|
43
43
|
</b-col>
|
|
44
44
|
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
:
|
|
45
|
+
<InputText
|
|
46
|
+
title="Complemento"
|
|
47
|
+
field="complemento"
|
|
48
|
+
:formName="formName"
|
|
49
|
+
:maxLength="50"
|
|
50
50
|
v-model="endereco.complemento"
|
|
51
51
|
/>
|
|
52
52
|
</b-col>
|
|
@@ -54,41 +54,40 @@
|
|
|
54
54
|
</b-row>
|
|
55
55
|
<b-row>
|
|
56
56
|
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
:
|
|
61
|
-
:
|
|
62
|
-
:
|
|
57
|
+
<InputText
|
|
58
|
+
title="Bairro"
|
|
59
|
+
field="bairro"
|
|
60
|
+
:formName="formName"
|
|
61
|
+
:maxLength="100"
|
|
62
|
+
:required="required"
|
|
63
63
|
v-model="endereco.bairro"
|
|
64
64
|
/> </b-col
|
|
65
65
|
><b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
:
|
|
70
|
-
:
|
|
71
|
-
:
|
|
66
|
+
<InputText
|
|
67
|
+
title="Cidade"
|
|
68
|
+
field="cidade"
|
|
69
|
+
:formName="formName"
|
|
70
|
+
:maxLength="100"
|
|
71
|
+
:required="required"
|
|
72
72
|
v-model="endereco.cidade"
|
|
73
73
|
/>
|
|
74
74
|
</b-col>
|
|
75
75
|
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
:
|
|
76
|
+
<SelectStatic
|
|
77
|
+
title="UF"
|
|
78
|
+
fieldTarget="uf"
|
|
79
|
+
:required="required"
|
|
80
80
|
v-model="endereco.estado"
|
|
81
|
-
:
|
|
81
|
+
:data="estados"
|
|
82
82
|
/> </b-col
|
|
83
83
|
></b-row>
|
|
84
84
|
</div>
|
|
85
85
|
</template>
|
|
86
86
|
|
|
87
87
|
<script>
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import EscolherEstatico from "@nixweb/nixloc-ui/src/component/forms/EscolherEstatico";
|
|
88
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
89
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
90
|
+
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
92
91
|
|
|
93
92
|
import Endereco from "@nixweb/nixloc-ui/src/component/value-objects/Endereco.js";
|
|
94
93
|
|
|
@@ -97,46 +96,46 @@ import { mapGetters, mapMutations } from "vuex";
|
|
|
97
96
|
export default {
|
|
98
97
|
name: "Endereco",
|
|
99
98
|
props: {
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
formName: String,
|
|
100
|
+
required: {
|
|
102
101
|
type: Boolean,
|
|
103
102
|
default: false,
|
|
104
103
|
},
|
|
105
104
|
value: Object,
|
|
106
105
|
},
|
|
107
|
-
components: {
|
|
106
|
+
components: { InputText, Button, SelectStatic },
|
|
108
107
|
|
|
109
108
|
data() {
|
|
110
109
|
return {
|
|
111
110
|
endereco: new Endereco(),
|
|
112
111
|
estados: [
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
{
|
|
116
|
-
{
|
|
117
|
-
{
|
|
118
|
-
{
|
|
119
|
-
{
|
|
120
|
-
{
|
|
121
|
-
{
|
|
122
|
-
{
|
|
123
|
-
{
|
|
124
|
-
{
|
|
125
|
-
{
|
|
126
|
-
{
|
|
127
|
-
{
|
|
128
|
-
{
|
|
129
|
-
{
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
133
|
-
{
|
|
134
|
-
{
|
|
135
|
-
{
|
|
136
|
-
{
|
|
137
|
-
{
|
|
138
|
-
{
|
|
139
|
-
{
|
|
112
|
+
{ content: "AC", id: "AC" },
|
|
113
|
+
{ content: "AL", id: "AL" },
|
|
114
|
+
{ content: "AP", id: "AP" },
|
|
115
|
+
{ content: "AM", id: "AM" },
|
|
116
|
+
{ content: "BA", id: "BA" },
|
|
117
|
+
{ content: "CE", id: "CE" },
|
|
118
|
+
{ content: "DF", id: "DF" },
|
|
119
|
+
{ content: "ES", id: "ES" },
|
|
120
|
+
{ content: "GO", id: "GO" },
|
|
121
|
+
{ content: "MA", id: "MA" },
|
|
122
|
+
{ content: "MT", id: "MT" },
|
|
123
|
+
{ content: "MS", id: "MS" },
|
|
124
|
+
{ content: "MG", id: "MG" },
|
|
125
|
+
{ content: "PA", id: "PA" },
|
|
126
|
+
{ content: "PB", id: "PB" },
|
|
127
|
+
{ content: "PR", id: "PR" },
|
|
128
|
+
{ content: "PE", id: "PE" },
|
|
129
|
+
{ content: "PI", id: "PI" },
|
|
130
|
+
{ content: "RJ", id: "RJ" },
|
|
131
|
+
{ content: "RN", id: "RN" },
|
|
132
|
+
{ content: "RS", id: "RS" },
|
|
133
|
+
{ content: "RO", id: "RO" },
|
|
134
|
+
{ content: "RR", id: "RR" },
|
|
135
|
+
{ content: "SC", id: "SC" },
|
|
136
|
+
{ content: "SP", id: "SP" },
|
|
137
|
+
{ content: "SE", id: "SE" },
|
|
138
|
+
{ content: "TO", id: "TO" },
|
|
140
139
|
],
|
|
141
140
|
};
|
|
142
141
|
},
|
|
@@ -144,10 +143,10 @@ export default {
|
|
|
144
143
|
if (this.value.cep != undefined) this.endereco = this.value;
|
|
145
144
|
},
|
|
146
145
|
computed: {
|
|
147
|
-
...mapGetters("generic", ["
|
|
146
|
+
...mapGetters("generic", ["event"]),
|
|
148
147
|
},
|
|
149
148
|
methods: {
|
|
150
|
-
...mapMutations("generic", ["
|
|
149
|
+
...mapMutations("generic", ["addEvent", "addNotifications", "removeLoading"]),
|
|
151
150
|
buscarCep() {
|
|
152
151
|
let cep = this.endereco.cep.replace(/\.|\-/g, "");
|
|
153
152
|
let url = `https://viacep.com.br/ws/${cep}/json/`;
|
|
@@ -155,18 +154,18 @@ export default {
|
|
|
155
154
|
let self = this;
|
|
156
155
|
setTimeout(function () {
|
|
157
156
|
self.carregaDados(response.data);
|
|
158
|
-
self.
|
|
157
|
+
self.removeLoading(["buscarCep"]);
|
|
159
158
|
}, 300);
|
|
160
159
|
});
|
|
161
160
|
},
|
|
162
|
-
carregaDados(
|
|
163
|
-
this.endereco.cep =
|
|
164
|
-
this.endereco.logradouro =
|
|
165
|
-
this.endereco.numero =
|
|
166
|
-
this.endereco.bairro =
|
|
161
|
+
carregaDados(data) {
|
|
162
|
+
this.endereco.cep = data.cep;
|
|
163
|
+
this.endereco.logradouro = data.logradouro;
|
|
164
|
+
this.endereco.numero = data.complemento;
|
|
165
|
+
this.endereco.bairro = data.bairro;
|
|
167
166
|
this.endereco.cidade =
|
|
168
|
-
|
|
169
|
-
this.endereco.estado = { id:
|
|
167
|
+
data.localidade == undefined ? data.municipio : data.localidade;
|
|
168
|
+
this.endereco.estado = { id: data.uf, content: data.uf };
|
|
170
169
|
},
|
|
171
170
|
},
|
|
172
171
|
watch: {
|
|
@@ -182,10 +181,10 @@ export default {
|
|
|
182
181
|
},
|
|
183
182
|
deep: true,
|
|
184
183
|
},
|
|
185
|
-
|
|
186
|
-
handler(
|
|
187
|
-
if (
|
|
188
|
-
this.carregaDados(
|
|
184
|
+
event: {
|
|
185
|
+
handler(event) {
|
|
186
|
+
if (event.nome == "buscarCnpjReceita") {
|
|
187
|
+
this.carregaDados(event.data);
|
|
189
188
|
}
|
|
190
189
|
},
|
|
191
190
|
deep: true,
|
package/src/config/dicas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const dicas = [];
|
|
2
2
|
|
|
3
3
|
const manutencao = [
|
|
4
|
-
// {
|
|
4
|
+
// { formName: "opcoesFaturamento", field: "unificar", title: "Unificar Cliente", description: "Ao marcar essa opção" },
|
|
5
5
|
|
|
6
6
|
];
|
|
7
7
|
|
package/src/config/token.js
CHANGED
|
@@ -3,13 +3,13 @@ export default class Token {
|
|
|
3
3
|
tokenHeaders() {
|
|
4
4
|
return {
|
|
5
5
|
"Content-Type": "application/json",
|
|
6
|
-
Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).
|
|
6
|
+
Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
tokenHeadersFormData() {
|
|
10
10
|
return {
|
|
11
11
|
"Content-Type": "multipart/form-data",
|
|
12
|
-
Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).
|
|
12
|
+
Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
}
|