@nixweb/nixloc-ui 0.0.157 → 0.0.158
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
|
@@ -9,73 +9,120 @@
|
|
|
9
9
|
>
|
|
10
10
|
<div slot="content-main">
|
|
11
11
|
<br />
|
|
12
|
-
<div
|
|
13
|
-
<
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
12
|
+
<div v-show="!success">
|
|
13
|
+
<b-tabs>
|
|
14
|
+
<b-tab title="Importar">
|
|
15
|
+
<div class="div-loading" v-show="loading">
|
|
16
|
+
<span
|
|
17
|
+
>Aguarde, estamos carregando os dados, isso pode levar alguns
|
|
18
|
+
minutos...
|
|
19
|
+
</span>
|
|
20
|
+
<Loading type="line" :center="false" />
|
|
21
|
+
</div>
|
|
22
|
+
<div v-show="!loading">
|
|
23
|
+
<div v-show="!fileName">
|
|
24
|
+
<div class="import-icon">
|
|
25
|
+
<i class="fas fa-file-import"></i>
|
|
26
|
+
</div>
|
|
27
|
+
<slot></slot>
|
|
28
|
+
<Alert type="info">
|
|
29
|
+
<span>
|
|
30
|
+
Selecione o arquivo no formato <b> .xlsx </b> baseado na
|
|
31
|
+
planilha modelo e aguarde até carregar os dados para
|
|
32
|
+
conferência. </span
|
|
33
|
+
><br />
|
|
34
|
+
<span>
|
|
35
|
+
Até <b> 1000 </b> itens por planilha ou <b> 1MB </b> no
|
|
36
|
+
arquivo.
|
|
37
|
+
</span>
|
|
38
|
+
</Alert>
|
|
39
|
+
<div class="div-file">
|
|
40
|
+
<FileUpload
|
|
41
|
+
title="Carregar arquivo"
|
|
42
|
+
classIcon="fa-sharp fa-solid fa-upload"
|
|
43
|
+
:container="container"
|
|
44
|
+
accepted=".xlsx"
|
|
45
|
+
allowed=".xlsx"
|
|
46
|
+
:disabled="true"
|
|
47
|
+
urlPost="/api/v1/adm/file-upload/upload"
|
|
48
|
+
urlRemove="/api/v1/adm/file-upload/delete"
|
|
49
|
+
:onLoad="successUploadFile"
|
|
50
|
+
:nameDataBase="fileName"
|
|
51
|
+
v-model="fileName"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div v-show="fileName && !loading">
|
|
56
|
+
<div class="import-icon">
|
|
57
|
+
<i class="fas fa-file-import"></i>
|
|
58
|
+
</div>
|
|
59
|
+
<span>
|
|
60
|
+
Efetue o <b> mapeamento </b> dos campos e clique em iniciar
|
|
61
|
+
validação.</span
|
|
62
|
+
>
|
|
63
|
+
<br />
|
|
64
|
+
<div class="div-btn">
|
|
65
|
+
<Button
|
|
66
|
+
_key="btnBack"
|
|
67
|
+
type="info"
|
|
68
|
+
title="voltar"
|
|
69
|
+
classIcon="fa-solid fa-circle-arrow-left"
|
|
70
|
+
size="small"
|
|
71
|
+
:clicked="back"
|
|
72
|
+
/>
|
|
73
|
+
<Button
|
|
74
|
+
v-if="!isValid"
|
|
75
|
+
_key="btnValidate"
|
|
76
|
+
type="primary"
|
|
77
|
+
title="Iniciar Validação"
|
|
78
|
+
:disabled="false"
|
|
79
|
+
classIcon="fa-solid fa-arrow-right-arrow-left"
|
|
80
|
+
size="small"
|
|
81
|
+
:clicked="validate"
|
|
82
|
+
/>
|
|
83
|
+
<Button
|
|
84
|
+
v-if="listError.length > 0"
|
|
85
|
+
_key="btnListError"
|
|
86
|
+
type="danger"
|
|
87
|
+
title="Erro(s)"
|
|
88
|
+
classIcon="fa-sharp fa-solid fa-triangle-exclamation"
|
|
89
|
+
size="small"
|
|
90
|
+
:clicked="openListError"
|
|
91
|
+
/>
|
|
92
|
+
<Button
|
|
93
|
+
v-if="isValid"
|
|
94
|
+
_key="btnImport"
|
|
95
|
+
type="success"
|
|
96
|
+
title="Importar"
|
|
97
|
+
classIcon="fa-solid fa-file-import"
|
|
98
|
+
size="small"
|
|
99
|
+
:clicked="startImport"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
<br />
|
|
103
|
+
<Alert type="danger" v-if="listError.length > 0">
|
|
104
|
+
<span>
|
|
105
|
+
Atenção, foram identificados
|
|
106
|
+
<b>{{ listError.length }}</b> erro(s), corrija-os!
|
|
107
|
+
</span>
|
|
108
|
+
</Alert>
|
|
109
|
+
<Alert type="info">
|
|
110
|
+
<span>
|
|
111
|
+
Total de <b> {{ totalRecords }} </b> registro(s), para o
|
|
112
|
+
mapeamento serão carregados somente os
|
|
113
|
+
<b> 10 </b> primeiros (se houver).
|
|
114
|
+
</span>
|
|
115
|
+
</Alert>
|
|
116
|
+
<TableImport
|
|
117
|
+
v-if="fileName"
|
|
118
|
+
:select="select"
|
|
119
|
+
:headerTable="headerTable"
|
|
120
|
+
:data="data"
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</b-tab>
|
|
125
|
+
<b-tab title="Histórico">
|
|
79
126
|
<Button
|
|
80
127
|
v-if="listError.length > 0"
|
|
81
128
|
_key="btnListError"
|
|
@@ -85,39 +132,36 @@
|
|
|
85
132
|
size="small"
|
|
86
133
|
:clicked="openListError"
|
|
87
134
|
/>
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
</
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
:select="select"
|
|
116
|
-
:headerTable="headerTable"
|
|
117
|
-
:data="data"
|
|
118
|
-
/>
|
|
135
|
+
<ViewTemplateConfiguration
|
|
136
|
+
:templateList="templateList"
|
|
137
|
+
:showSearch="false"
|
|
138
|
+
:showHorizontalFilter="false"
|
|
139
|
+
>
|
|
140
|
+
</ViewTemplateConfiguration>
|
|
141
|
+
</b-tab>
|
|
142
|
+
</b-tabs>
|
|
143
|
+
</div>
|
|
144
|
+
<div v-show="success">
|
|
145
|
+
<div class="div-molded text-center">
|
|
146
|
+
<Molded>
|
|
147
|
+
<div class="msg-success">Importação realizada com sucesso!</div>
|
|
148
|
+
<div class="icon-success">
|
|
149
|
+
<i class="fa-light fa-circle-check"></i>
|
|
150
|
+
</div>
|
|
151
|
+
<div>
|
|
152
|
+
<Button
|
|
153
|
+
_key="btnBack"
|
|
154
|
+
type="info"
|
|
155
|
+
title="voltar"
|
|
156
|
+
classIcon="fa-solid fa-circle-arrow-left"
|
|
157
|
+
size="small"
|
|
158
|
+
:clicked="back"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
</Molded>
|
|
119
162
|
</div>
|
|
120
|
-
</
|
|
163
|
+
</div>
|
|
164
|
+
<br />
|
|
121
165
|
</div>
|
|
122
166
|
</Panel>
|
|
123
167
|
<Modal
|
|
@@ -128,6 +172,23 @@
|
|
|
128
172
|
>
|
|
129
173
|
<ListNotifications :listError="listError" />
|
|
130
174
|
</Modal>
|
|
175
|
+
<Modal
|
|
176
|
+
title="Você tem certeza?"
|
|
177
|
+
:width="500"
|
|
178
|
+
v-show="showModal('confirmDelete')"
|
|
179
|
+
>
|
|
180
|
+
<Alert type="warning">
|
|
181
|
+
<span>
|
|
182
|
+
Atenção, todos os registros relacionados também serão excluídos, esta
|
|
183
|
+
ação é irreversível!
|
|
184
|
+
</span>
|
|
185
|
+
</Alert>
|
|
186
|
+
<Confirmation
|
|
187
|
+
:isModal="false"
|
|
188
|
+
type="danger"
|
|
189
|
+
:confirmed="removeSelected"
|
|
190
|
+
/>
|
|
191
|
+
</Modal>
|
|
131
192
|
</div>
|
|
132
193
|
</template>
|
|
133
194
|
|
|
@@ -139,6 +200,8 @@ import FileUpload from "@nixweb/nixloc-ui/src/component/forms/FileUpload";
|
|
|
139
200
|
import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
|
|
140
201
|
import Alert from "@nixweb/nixloc-ui/src/component/layout/Alert";
|
|
141
202
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
203
|
+
import Confirmation from "@nixweb/nixloc-ui/src/component/shared/Confirmation.vue";
|
|
204
|
+
import ViewTemplateConfiguration from "@nixweb/nixloc-ui/src/component/template/ViewTemplateConfiguration";
|
|
142
205
|
|
|
143
206
|
import TableImport from "@nixweb/nixloc-ui/src/component/shared/TableImport.vue";
|
|
144
207
|
import ListNotifications from "@nixweb/nixloc-ui/src/component/shared/ListNotifications.vue";
|
|
@@ -154,12 +217,15 @@ export default {
|
|
|
154
217
|
FileUpload,
|
|
155
218
|
Loading,
|
|
156
219
|
ListNotifications,
|
|
220
|
+
ViewTemplateConfiguration,
|
|
157
221
|
TableImport,
|
|
158
222
|
Alert,
|
|
159
223
|
Modal,
|
|
224
|
+
Confirmation,
|
|
160
225
|
},
|
|
161
226
|
props: {
|
|
162
227
|
panel: Object,
|
|
228
|
+
templateList: Object,
|
|
163
229
|
select: Array,
|
|
164
230
|
container: String,
|
|
165
231
|
typeImport: Number,
|
|
@@ -176,14 +242,16 @@ export default {
|
|
|
176
242
|
totalRecords: 0,
|
|
177
243
|
listError: [],
|
|
178
244
|
isValid: false,
|
|
245
|
+
idRemove: "",
|
|
246
|
+
success: false,
|
|
179
247
|
};
|
|
180
248
|
},
|
|
181
249
|
computed: {
|
|
182
|
-
...mapGetters("generic", ["showModal"]),
|
|
250
|
+
...mapGetters("generic", ["showModal", "event"]),
|
|
183
251
|
},
|
|
184
252
|
methods: {
|
|
185
|
-
...mapActions("generic", ["postApi"]),
|
|
186
|
-
...mapMutations("generic", ["openModal", "removeLoading"]),
|
|
253
|
+
...mapActions("generic", ["postApi", "deleteAllApi"]),
|
|
254
|
+
...mapMutations("generic", ["openModal", "hideModal", "removeLoading"]),
|
|
187
255
|
successUploadFile() {
|
|
188
256
|
this.loading = true;
|
|
189
257
|
let self = this;
|
|
@@ -242,11 +310,29 @@ export default {
|
|
|
242
310
|
};
|
|
243
311
|
this.postApi(params).then((response) => {
|
|
244
312
|
if (response.success) {
|
|
245
|
-
|
|
313
|
+
this.success = true;
|
|
314
|
+
this.removeLoading(["btnImport"]);
|
|
246
315
|
}
|
|
247
316
|
this.removeLoading(["btnValidate"]);
|
|
248
317
|
});
|
|
249
318
|
},
|
|
319
|
+
removeSelected() {
|
|
320
|
+
let params = {
|
|
321
|
+
url: this.templateList.urlDeleteAllApi,
|
|
322
|
+
selected: [this.idRemove],
|
|
323
|
+
};
|
|
324
|
+
this.deleteAllApi(params).then((response) => {
|
|
325
|
+
if (response.success) {
|
|
326
|
+
this.listError = [];
|
|
327
|
+
this.hideModal();
|
|
328
|
+
} else {
|
|
329
|
+
this.listError = response.content;
|
|
330
|
+
if (this.listError.length == 0) this.isValid = true;
|
|
331
|
+
this.hideModal();
|
|
332
|
+
}
|
|
333
|
+
this.removeLoading(["confirm"]);
|
|
334
|
+
});
|
|
335
|
+
},
|
|
250
336
|
openListError() {
|
|
251
337
|
this.openModal("listError");
|
|
252
338
|
this.removeLoading(["btnListError"]);
|
|
@@ -254,9 +340,21 @@ export default {
|
|
|
254
340
|
back() {
|
|
255
341
|
this.fileName = "";
|
|
256
342
|
this.listError = [];
|
|
343
|
+
this.success = false;
|
|
257
344
|
this.removeLoading(["btnBack"]);
|
|
258
345
|
},
|
|
259
346
|
},
|
|
347
|
+
watch: {
|
|
348
|
+
event: {
|
|
349
|
+
handler(event) {
|
|
350
|
+
if (event.name == "deleteHistoryImport") {
|
|
351
|
+
this.openModal("confirmDelete");
|
|
352
|
+
this.idRemove = this.event.data.id;
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
deep: true,
|
|
356
|
+
},
|
|
357
|
+
},
|
|
260
358
|
};
|
|
261
359
|
</script>
|
|
262
360
|
|
|
@@ -279,4 +377,20 @@ export default {
|
|
|
279
377
|
.div-loading {
|
|
280
378
|
margin-top: 10px;
|
|
281
379
|
}
|
|
380
|
+
|
|
381
|
+
.div-molded {
|
|
382
|
+
width: 550px;
|
|
383
|
+
margin: auto;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.msg-success {
|
|
387
|
+
font-size: 18px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.icon-success {
|
|
391
|
+
font-size: 55px;
|
|
392
|
+
color: #38a169;
|
|
393
|
+
margin-top: 10px;
|
|
394
|
+
margin-bottom: 15px;
|
|
395
|
+
}
|
|
282
396
|
</style>
|
|
@@ -171,6 +171,7 @@ export default {
|
|
|
171
171
|
.replaceAll("t.pagamentoLocacao", "")
|
|
172
172
|
.replaceAll("t.periodoLocacao", "")
|
|
173
173
|
.replaceAll("t.produtoLocacao", "")
|
|
174
|
+
.replaceAll("t.produtoFatura", "")
|
|
174
175
|
.replaceAll("t.produtoAgrupado", "")
|
|
175
176
|
.replaceAll("t.produtoMovimentacao", "")
|
|
176
177
|
.replaceAll("t.enderecoCliente", "")
|