@nixweb/nixloc-ui 0.0.182 → 0.0.183
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/package.json
CHANGED
|
@@ -6,19 +6,10 @@
|
|
|
6
6
|
<Tip :field="field" :formName="formName" />
|
|
7
7
|
</label>
|
|
8
8
|
<div class="inner-addon right-addon">
|
|
9
|
-
<i
|
|
10
|
-
v-if="notifications.length > 0 && formDirty"
|
|
11
|
-
class="required glyphicon fas fa-exclamation-triangle"
|
|
12
|
-
></i>
|
|
9
|
+
<i v-if="notifications.length > 0 && formDirty" class="required glyphicon fas fa-exclamation-triangle"></i>
|
|
13
10
|
<slot v-else></slot>
|
|
14
|
-
<input
|
|
15
|
-
|
|
16
|
-
class="form-control"
|
|
17
|
-
type="number"
|
|
18
|
-
:disabled="disabled"
|
|
19
|
-
v-model="valueLocal"
|
|
20
|
-
@keyup.enter.prevent="pressedEnter"
|
|
21
|
-
/>
|
|
11
|
+
<input :style="_style" class="form-control" type="number" :disabled="disabled" v-model="valueLocal"
|
|
12
|
+
@keyup.enter.prevent="pressedEnter" />
|
|
22
13
|
</div>
|
|
23
14
|
|
|
24
15
|
<div v-if="formDirty">
|
|
@@ -157,10 +148,12 @@ export default {
|
|
|
157
148
|
color: #94aa2a;
|
|
158
149
|
font-size: 14px;
|
|
159
150
|
}
|
|
151
|
+
|
|
160
152
|
.invalid {
|
|
161
153
|
color: #f0134d;
|
|
162
154
|
font-size: 14px;
|
|
163
155
|
}
|
|
156
|
+
|
|
164
157
|
.margin-button {
|
|
165
158
|
margin-top: -2px;
|
|
166
159
|
}
|
|
@@ -2,91 +2,43 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
5
|
-
<RadioGroup
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
:options="[
|
|
10
|
-
{ text: 'Física', value: 1 },
|
|
11
|
-
{ text: 'Jurídica', value: 2 },
|
|
12
|
-
]"
|
|
13
|
-
v-model="person.typePerson"
|
|
14
|
-
:markFormDirty="markFormDirty"
|
|
15
|
-
/>
|
|
5
|
+
<RadioGroup field="typePerson" :formName="formName" v-show="showTypePerson" :options="[
|
|
6
|
+
{ text: 'Física', value: 1 },
|
|
7
|
+
{ text: 'Jurídica', value: 2 },
|
|
8
|
+
]" v-model="person.typePerson" :markFormDirty="markFormDirty" />
|
|
16
9
|
</b-col>
|
|
17
10
|
</b-row>
|
|
18
11
|
<b-row>
|
|
19
12
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
20
|
-
<InputText
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:required="required"
|
|
29
|
-
v-model="person.document"
|
|
30
|
-
:markFormDirty="markFormDirty"
|
|
31
|
-
><div class="glyphicon margin-button">
|
|
32
|
-
<Button
|
|
33
|
-
v-if="person.typePerson == 2"
|
|
34
|
-
_key="searchDocumentFederalRecipe"
|
|
35
|
-
type="success"
|
|
36
|
-
classIcon="fas fa-search"
|
|
37
|
-
:disabled="person.document.length < 18"
|
|
38
|
-
size="small"
|
|
39
|
-
:clicked="searchDocumentFederalRecipe"
|
|
40
|
-
/></div
|
|
41
|
-
></InputText>
|
|
13
|
+
<InputText :title="person.typePerson == 2 ? 'CNPJ' : 'CPF'" field="document" :formName="formName" :mask="person.typePerson == 2 ? ['##.###.###/####-##'] : ['###.###.###-##']
|
|
14
|
+
" :maxLength="30" :required="required" v-model="person.document" :markFormDirty="markFormDirty">
|
|
15
|
+
<div class="glyphicon margin-button">
|
|
16
|
+
<Button v-if="person.typePerson == 2" _key="searchDocumentFederalRecipe" type="success"
|
|
17
|
+
classIcon="fas fa-search" :disabled="person.document.length < 18" size="small"
|
|
18
|
+
:clicked="searchDocumentFederalRecipe" />
|
|
19
|
+
</div>
|
|
20
|
+
</InputText>
|
|
42
21
|
</b-col>
|
|
43
22
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
44
|
-
<InputText
|
|
45
|
-
:
|
|
46
|
-
|
|
47
|
-
:formName="formName"
|
|
48
|
-
:maxLength="50"
|
|
49
|
-
:required="required"
|
|
50
|
-
v-model="person.stateInscription"
|
|
51
|
-
:markFormDirty="markFormDirty"
|
|
52
|
-
/>
|
|
23
|
+
<InputText :title="person.typePerson == 2 ? 'Inscrição Estadual' : 'RG'" field="stateInscription"
|
|
24
|
+
:formName="formName" :maxLength="50" :required="required" v-model="person.stateInscription"
|
|
25
|
+
:markFormDirty="markFormDirty" />
|
|
53
26
|
</b-col>
|
|
54
27
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
55
|
-
<InputText
|
|
56
|
-
v-
|
|
57
|
-
|
|
58
|
-
field="municipalInscription"
|
|
59
|
-
:formName="formName"
|
|
60
|
-
:maxLength="50"
|
|
61
|
-
:required="false"
|
|
62
|
-
v-model="person.municipalInscription"
|
|
63
|
-
:markFormDirty="markFormDirty"
|
|
64
|
-
/>
|
|
28
|
+
<InputText v-if="person.typePerson == 2" title="Inscrição Municipal" field="municipalInscription"
|
|
29
|
+
:formName="formName" :maxLength="50" :required="false" v-model="person.municipalInscription"
|
|
30
|
+
:markFormDirty="markFormDirty" />
|
|
65
31
|
</b-col>
|
|
66
32
|
</b-row>
|
|
67
33
|
<br v-if="person.typePerson == 2" />
|
|
68
34
|
<b-row>
|
|
69
35
|
<b-col xs="12" sm="12" md="12" lg="8" xl="8">
|
|
70
|
-
<InputText
|
|
71
|
-
:
|
|
72
|
-
field="companyName"
|
|
73
|
-
:formName="formName"
|
|
74
|
-
:required="true"
|
|
75
|
-
:maxLength="100"
|
|
76
|
-
v-model="person.companyName"
|
|
77
|
-
:markFormDirty="markFormDirty"
|
|
78
|
-
/>
|
|
36
|
+
<InputText :title="person.typePerson == 2 ? 'Razão Social' : 'Nome'" field="companyName" :formName="formName"
|
|
37
|
+
:required="true" :maxLength="100" v-model="person.companyName" :markFormDirty="markFormDirty" />
|
|
79
38
|
</b-col>
|
|
80
39
|
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
81
|
-
<InputText
|
|
82
|
-
:
|
|
83
|
-
field="tradeName"
|
|
84
|
-
:formName="formName"
|
|
85
|
-
:required="true"
|
|
86
|
-
:maxLength="100"
|
|
87
|
-
v-model="person.tradeName"
|
|
88
|
-
:markFormDirty="markFormDirty"
|
|
89
|
-
/>
|
|
40
|
+
<InputText :title="person.typePerson == 2 ? 'Fantasia' : 'Apelido'" field="tradeName" :formName="formName"
|
|
41
|
+
:required="true" :maxLength="100" v-model="person.tradeName" :markFormDirty="markFormDirty" />
|
|
90
42
|
</b-col>
|
|
91
43
|
</b-row>
|
|
92
44
|
</div>
|
|
@@ -143,6 +95,7 @@ export default {
|
|
|
143
95
|
});
|
|
144
96
|
this.person.companyName = response.data.result.nome;
|
|
145
97
|
this.person.tradeName = response.data.result.fantasia;
|
|
98
|
+
console.log(response.data.result);
|
|
146
99
|
} else {
|
|
147
100
|
this.addNotifications([
|
|
148
101
|
{ message: "CNPJ inválido ou não encontrado." },
|
|
@@ -38,6 +38,7 @@ export default {
|
|
|
38
38
|
executedSearch: false,
|
|
39
39
|
clearedSearch: false,
|
|
40
40
|
methodExecutedApi: undefined,
|
|
41
|
+
filterStorage: [],
|
|
41
42
|
},
|
|
42
43
|
getters: {
|
|
43
44
|
tip: (state) => (tipId) => {
|
|
@@ -401,6 +402,7 @@ export default {
|
|
|
401
402
|
})
|
|
402
403
|
},
|
|
403
404
|
getApi: async function (context, params) {
|
|
405
|
+
|
|
404
406
|
context.commit('cleanMethodExecutedApi');
|
|
405
407
|
return axios.get(params.url, {
|
|
406
408
|
params: params.obj,
|
|
@@ -550,13 +552,25 @@ export default {
|
|
|
550
552
|
},
|
|
551
553
|
getFileApi: async function (context, params) {
|
|
552
554
|
context.commit('cleanMethodExecutedApi');
|
|
553
|
-
return axios.
|
|
554
|
-
|
|
555
|
+
return axios.get(params.url, {
|
|
556
|
+
params: params.obj,
|
|
557
|
+
headers: new Token().tokenHeaders(),
|
|
558
|
+
responseType: "arraybuffer",
|
|
555
559
|
})
|
|
556
560
|
.then((response) => {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
window.
|
|
561
|
+
|
|
562
|
+
let blob = new Blob([response.data], { type: "application/pdf" });
|
|
563
|
+
let url = window.URL.createObjectURL(blob);
|
|
564
|
+
|
|
565
|
+
let downloadLink = document.createElement("a");
|
|
566
|
+
downloadLink.href = url;
|
|
567
|
+
downloadLink.download = `${params.obj.fileName}.${params.obj.fileType}`;
|
|
568
|
+
|
|
569
|
+
document.body.appendChild(downloadLink);
|
|
570
|
+
downloadLink.click();
|
|
571
|
+
|
|
572
|
+
document.body.removeChild(downloadLink);
|
|
573
|
+
|
|
560
574
|
context.commit('addMethodExecutedApi', 'getPdfApi');
|
|
561
575
|
context.commit('removeNotificarions');
|
|
562
576
|
|