@nixweb/nixloc-ui 0.0.182 → 0.0.184
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
|
}
|
|
@@ -7,27 +7,14 @@
|
|
|
7
7
|
<Tip :field="field" :formName="formName" />
|
|
8
8
|
</label>
|
|
9
9
|
<div class="inner-addon right-addon">
|
|
10
|
-
<div
|
|
11
|
-
class="required glyphicon"
|
|
12
|
-
v-if="notifications.length > 0 && formDirty"
|
|
13
|
-
>
|
|
10
|
+
<div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
|
|
14
11
|
<i class="fas fa-exclamation-triangle"></i>
|
|
15
12
|
</div>
|
|
16
13
|
<slot v-else></slot>
|
|
17
|
-
<input
|
|
18
|
-
|
|
19
|
-
:
|
|
20
|
-
:
|
|
21
|
-
:disabled="disabled"
|
|
22
|
-
@keyup.enter.prevent="pressedEnter"
|
|
23
|
-
@keyup="cleanedField"
|
|
24
|
-
@blur="outField"
|
|
25
|
-
v-mask="mask || withoutMask"
|
|
26
|
-
v-bind:value="value"
|
|
27
|
-
v-on:input="$emit('input', $event.target.value)"
|
|
28
|
-
class="form-control"
|
|
29
|
-
:class="{ required: notifications.length > 0 && formDirty }"
|
|
30
|
-
/>
|
|
14
|
+
<input type="text" :style="_style" :placeholder="titlePlaceholder" :disabled="disabled"
|
|
15
|
+
@keyup.enter.prevent="pressedEnter" @keyup="cleanedField" @blur="outField" v-mask="mask || withoutMask"
|
|
16
|
+
v-bind:value="value" v-on:input="$emit('input', $event.target.value)" class="form-control"
|
|
17
|
+
:class="{ required: notifications.length > 0 && formDirty }" />
|
|
31
18
|
</div>
|
|
32
19
|
<div v-if="formDirty">
|
|
33
20
|
<div v-for="message in notifications" :key="message">
|
|
@@ -175,6 +162,7 @@ input::placeholder {
|
|
|
175
162
|
color: #94aa2a;
|
|
176
163
|
font-size: 14px;
|
|
177
164
|
}
|
|
165
|
+
|
|
178
166
|
.invalid {
|
|
179
167
|
color: #f0134d;
|
|
180
168
|
font-size: 14px;
|
|
@@ -6,19 +6,11 @@
|
|
|
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
|
|
|
14
|
-
<textarea
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
v-bind:value="value"
|
|
18
|
-
v-on:input="$emit('input', $event.target.value)"
|
|
19
|
-
class="form-control"
|
|
20
|
-
:class="{ 'is-invalid': notifications.length > 0 && formDirty }"
|
|
21
|
-
></textarea>
|
|
11
|
+
<textarea :disabled="disabled" rows="4" cols="50" type="text" :placeholder="placeholder" v-bind:value="value"
|
|
12
|
+
v-on:input="$emit('input', $event.target.value)" :class="{ 'is-invalid': notifications.length > 0 && formDirty }">
|
|
13
|
+
</textarea>
|
|
22
14
|
</div>
|
|
23
15
|
|
|
24
16
|
<div v-if="formDirty">
|
|
@@ -40,6 +32,7 @@ export default {
|
|
|
40
32
|
title: String,
|
|
41
33
|
field: String,
|
|
42
34
|
placeholder: String,
|
|
35
|
+
disabled: Boolean,
|
|
43
36
|
formName: String,
|
|
44
37
|
required: Boolean,
|
|
45
38
|
maxLength: Number,
|
|
@@ -115,10 +108,28 @@ export default {
|
|
|
115
108
|
</script>
|
|
116
109
|
|
|
117
110
|
<style scoped>
|
|
111
|
+
textarea {
|
|
112
|
+
width: 100%;
|
|
113
|
+
border: 1px #DBDEE0 solid;
|
|
114
|
+
border-radius: 5px;
|
|
115
|
+
color: #35495E;
|
|
116
|
+
padding-left: 10px;
|
|
117
|
+
padding-right: 10px;
|
|
118
|
+
font-weight: normal !important;
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
textarea:disabled{
|
|
123
|
+
background-color: white !important;
|
|
124
|
+
opacity: 0.5;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
118
128
|
.success {
|
|
119
129
|
color: #94aa2a;
|
|
120
130
|
font-size: 14px;
|
|
121
131
|
}
|
|
132
|
+
|
|
122
133
|
.invalid {
|
|
123
134
|
color: #f0134d;
|
|
124
135
|
font-size: 14px;
|
|
@@ -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
|
|