@nixweb/nixloc-ui 0.0.265 → 0.0.267
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 +1 -1
- package/src/component/shared/DocumentPreview.vue +20 -0
- package/src/component/shared/DocumentPublic.vue +0 -1
- package/src/component/shared/HeaderReport.vue +13 -2
- package/src/component/shared/Report.vue +18 -14
- package/src/component/shared/TotalizationReport.vue +10 -20
- package/src/component/template/ViewTemplateReportPreview.vue +2 -1
package/package.json
CHANGED
|
@@ -17,6 +17,25 @@ export default {
|
|
|
17
17
|
d: Object,
|
|
18
18
|
},
|
|
19
19
|
methods: {
|
|
20
|
+
periodo(grupo, campo) {
|
|
21
|
+
var item = this.d.itensLocacao.find(item => item.grupo == grupo);
|
|
22
|
+
const campoMap = {
|
|
23
|
+
"dataEntrega": item.dataEntrega,
|
|
24
|
+
"horaEntrega": item.horaEntrega,
|
|
25
|
+
"dataInicio": item.dataInicio,
|
|
26
|
+
"horaInicio": item.horaInicio,
|
|
27
|
+
"dataFim": item.dataFim,
|
|
28
|
+
"horaFim": item.horaFim,
|
|
29
|
+
"dataRetirada": item.dataRetirada,
|
|
30
|
+
"horaRetirada": item.horaRetirada,
|
|
31
|
+
"ano": item.ano,
|
|
32
|
+
"mes": item.mes,
|
|
33
|
+
"dia": item.dia,
|
|
34
|
+
"hora": item.hora,
|
|
35
|
+
"minuto": item.minuto
|
|
36
|
+
};
|
|
37
|
+
return campoMap[campo];
|
|
38
|
+
},
|
|
20
39
|
somaGrupo(grupo) {
|
|
21
40
|
let sum = [];
|
|
22
41
|
this.d.itensLocacao.forEach((item) => {
|
|
@@ -36,6 +55,7 @@ export default {
|
|
|
36
55
|
var group = this.groupBy({ array: this.d.itensLocacao, key: "grupo" });
|
|
37
56
|
return group;
|
|
38
57
|
},
|
|
58
|
+
|
|
39
59
|
},
|
|
40
60
|
};
|
|
41
61
|
</script>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="div-header">
|
|
3
|
-
<div class="title-report-header">
|
|
4
|
-
|
|
3
|
+
<div class="title-report-header">
|
|
4
|
+
<span v-if="!title">
|
|
5
|
+
Relatório
|
|
6
|
+
<span>{{ $route.params.name }}</span>
|
|
7
|
+
</span>
|
|
8
|
+
<span v-else>
|
|
9
|
+
<span>{{ title }}</span>
|
|
10
|
+
</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div v-if="!title" class="side-by-side div-tag" v-for="tag in tags" :key="tag.id">
|
|
5
13
|
<span>{{ tag.title }}</span> <span>{{ tag.value }}</span>
|
|
6
14
|
<span>,</span>
|
|
7
15
|
</div>
|
|
@@ -13,6 +21,9 @@ import { mapGetters } from "vuex";
|
|
|
13
21
|
|
|
14
22
|
export default {
|
|
15
23
|
name: "HeaderReport",
|
|
24
|
+
props: {
|
|
25
|
+
title: String
|
|
26
|
+
},
|
|
16
27
|
computed: {
|
|
17
28
|
...mapGetters("report", ["tags"]),
|
|
18
29
|
fileName() {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
<ScrollBar :minHeight="400" :maxHeight="820">
|
|
12
12
|
<br />
|
|
13
|
-
<div id="printMe" class="a4 footer">
|
|
14
|
-
<HeaderReport />
|
|
13
|
+
<div id="printMe" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
|
|
14
|
+
<HeaderReport :title="titleHeader" />
|
|
15
15
|
<table class="table table-responsive-md">
|
|
16
16
|
<thead>
|
|
17
17
|
<tr>
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
<tbody>
|
|
27
27
|
<tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
|
|
28
28
|
<td v-for="(obj, ind) in header" :key="ind">
|
|
29
|
-
<div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
30
|
-
|
|
29
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
30
|
+
" v-if="obj.type === 'text'">
|
|
31
31
|
{{ row[obj.field] }}
|
|
32
32
|
</div>
|
|
33
|
-
<div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
34
|
-
|
|
33
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
34
|
+
" v-if="obj.type === 'date'">
|
|
35
35
|
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
36
36
|
</div>
|
|
37
|
-
<div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
38
|
-
|
|
37
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
38
|
+
" v-if="obj.type === 'dateTime'">
|
|
39
39
|
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
40
40
|
</div>
|
|
41
|
-
<div :style="obj.styleBody" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
42
|
-
|
|
41
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
42
|
+
" v-if="obj.type === 'currency'">
|
|
43
43
|
{{ row[obj.field] | currency }}
|
|
44
44
|
</div>
|
|
45
45
|
</td>
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
</tbody>
|
|
55
55
|
</table>
|
|
56
56
|
<div>
|
|
57
|
-
<TotalizationReport :totalization="totalization" :
|
|
57
|
+
<TotalizationReport :totalization="totalization" :totalizationCustom="totalizationCustom"
|
|
58
|
+
:totalRecords="data.length" />
|
|
58
59
|
</div>
|
|
59
60
|
</div>
|
|
60
61
|
</ScrollBar>
|
|
@@ -68,15 +69,16 @@ import TotalizationReport from "../shared/TotalizationReport.vue";
|
|
|
68
69
|
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
69
70
|
import print from "vue-print-nb";
|
|
70
71
|
|
|
71
|
-
import {
|
|
72
|
+
import { mapMutations } from "vuex";
|
|
72
73
|
|
|
73
74
|
export default {
|
|
74
75
|
directives: {
|
|
75
76
|
print,
|
|
76
77
|
},
|
|
77
|
-
props: ["header", "data", "totalization"],
|
|
78
|
+
props: ["titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
|
|
78
79
|
components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
|
|
79
80
|
methods: {
|
|
81
|
+
...mapMutations("generic", ["addEvent"]),
|
|
80
82
|
convertClass(fieldComparison, classCssBody) {
|
|
81
83
|
if (Array.isArray(classCssBody)) {
|
|
82
84
|
let ret = [];
|
|
@@ -91,6 +93,9 @@ export default {
|
|
|
91
93
|
return classCssBody;
|
|
92
94
|
}
|
|
93
95
|
},
|
|
96
|
+
sendEvent(eventName, data) {
|
|
97
|
+
if (eventName) this.addEvent({ name: eventName, data: data });
|
|
98
|
+
}
|
|
94
99
|
},
|
|
95
100
|
};
|
|
96
101
|
</script>
|
|
@@ -162,7 +167,6 @@ table tbody tr td {
|
|
|
162
167
|
|
|
163
168
|
.a4 {
|
|
164
169
|
max-width: 1100px;
|
|
165
|
-
min-height: 700px;
|
|
166
170
|
padding: 20px;
|
|
167
171
|
border-radius: var(--ck-border-radius);
|
|
168
172
|
background: white;
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
<span class="title-report-header value-report-header"> {{ totalRecords }} </span>
|
|
11
11
|
</b-col>
|
|
12
12
|
</b-row>
|
|
13
|
+
<!-- Utilizado para calculo do subReport -->
|
|
14
|
+
<b-row v-if="totalizationCustom">
|
|
15
|
+
<b-col sm="10">
|
|
16
|
+
<span class="title-report-header"> {{ totalizationCustom[0].title }} .................. </span>
|
|
17
|
+
</b-col>
|
|
18
|
+
<b-col sm="2">
|
|
19
|
+
<span class="title-report-header value-report-header"> {{ totalizationCustom[0].value | currency }} </span>
|
|
20
|
+
</b-col>
|
|
21
|
+
</b-row>
|
|
13
22
|
</div>
|
|
14
23
|
<div class="text-right" v-for="item in totalization" :key="item.title">
|
|
15
24
|
<b-row>
|
|
@@ -29,25 +38,6 @@
|
|
|
29
38
|
</span>
|
|
30
39
|
</b-col>
|
|
31
40
|
</b-row>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<!-- <span :class="convertName(item[0]).classCss">
|
|
35
|
-
<span class="title-report-header">
|
|
36
|
-
{{ convertName(item[0]).title }}
|
|
37
|
-
<span class="title-report-header value-report-header">
|
|
38
|
-
<div class="side-by-side div-title">
|
|
39
|
-
<span v-if="convertName(item[0]).type == 'currency'">
|
|
40
|
-
{{ item[1] | currency }}
|
|
41
|
-
</span>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="side-by-side div-value">
|
|
44
|
-
<span v-if="convertName(item[0]).type == 'numeric'">
|
|
45
|
-
{{ Math.round(item[1]) }}
|
|
46
|
-
</span>
|
|
47
|
-
</div>
|
|
48
|
-
</span>
|
|
49
|
-
</span>
|
|
50
|
-
</span> -->
|
|
51
41
|
</div>
|
|
52
42
|
</div>
|
|
53
43
|
</template>
|
|
@@ -56,7 +46,7 @@ import { mapState } from "vuex";
|
|
|
56
46
|
|
|
57
47
|
export default {
|
|
58
48
|
name: "TotalizationReport",
|
|
59
|
-
props: ["totalization", "totalRecords"],
|
|
49
|
+
props: ["totalization", "totalizationCustom", "totalRecords"],
|
|
60
50
|
computed: {
|
|
61
51
|
...mapState("report", ["finalQueryFormatOData"]),
|
|
62
52
|
},
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
</Alert>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="body-report" v-show="showBodyReport && rulesIsValid">
|
|
53
|
-
<Report :
|
|
53
|
+
<Report :minHeight="700" :header="content.headerTable" :data="content.data"
|
|
54
|
+
:totalization="content.totalization" />
|
|
54
55
|
</div>
|
|
55
56
|
</div>
|
|
56
57
|
<div v-show="showFilter">
|