@nixweb/nixloc-ui 0.0.248 → 0.0.249
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/forms/InputTextEdit.vue +1 -0
- package/src/component/shared/HeaderReport.vue +1 -1
- package/src/component/shared/TableTotalization.vue +5 -1
- package/src/component/shared/TotalizationReport.vue +1 -1
- package/src/component/signature/Payment.vue +161 -0
- package/src/store/modules/generic.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="div-header">
|
|
3
|
-
<div class="title">Relatório {{ $route.params.name }}</div>
|
|
3
|
+
<div class="title">Relatório {{ $route.params.name }}</span></div>
|
|
4
4
|
<div class="side-by-side div-tag" v-for="tag in tags" :key="tag.id">
|
|
5
5
|
<span>{{ tag.title }}</span> <span>{{ tag.value }}</span>
|
|
6
6
|
<span>,</span>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
class="badge-side-by-side text-center"
|
|
5
|
+
v-for="item in totalization"
|
|
6
|
+
:key="item.title"
|
|
7
|
+
>
|
|
4
8
|
<div class="badge-totalization" :class="item.classCss">
|
|
5
9
|
<span>{{ item.title }} </span>
|
|
6
10
|
<span>{{ item.value | currency }}</span>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<table class="table table-responsive-xs">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>
|
|
7
|
+
<span class="title-header">Descrição</span>
|
|
8
|
+
</th>
|
|
9
|
+
<th class="text-center">
|
|
10
|
+
<span class="title-header">
|
|
11
|
+
<span>Vencimento</span>
|
|
12
|
+
</span>
|
|
13
|
+
</th>
|
|
14
|
+
<th class="text-center">
|
|
15
|
+
<span class="title-header">
|
|
16
|
+
<span>Status</span>
|
|
17
|
+
</span>
|
|
18
|
+
</th>
|
|
19
|
+
<th class="text-center">
|
|
20
|
+
<span class="title-header">Valor</span>
|
|
21
|
+
</th>
|
|
22
|
+
<th class="text-center">
|
|
23
|
+
<span class="title-header">2º via Boleto</span>
|
|
24
|
+
</th>
|
|
25
|
+
<th class="text-center">
|
|
26
|
+
<span class="title-header">Nota Fiscal</span>
|
|
27
|
+
</th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody v-for="billet in billets">
|
|
31
|
+
<tr>
|
|
32
|
+
<td>{{ billet.description }}</td>
|
|
33
|
+
<td class="text-center">{{ billet._DueDate | moment("DD/MM/YYYY") }}</td>
|
|
34
|
+
<td class="text-center">
|
|
35
|
+
<span class="badge badge-primary" v-if="billet.statusName == 'Agendada'">A vencer</span>
|
|
36
|
+
<span class="badge badge-success" v-if="billet.statusName == 'Pago'">Pago</span>
|
|
37
|
+
<span class="badge badge-warning" v-if="billet.statusName == 'Pendente'">Pendente</span>
|
|
38
|
+
<span class="badge badge-danger" v-if="billet.statusName == 'Em atraso'">Em atraso</span>
|
|
39
|
+
</td>
|
|
40
|
+
<td class="text-center">{{ billet.value | currency }}</td>
|
|
41
|
+
<td class="text-center">
|
|
42
|
+
<span class="link" @click="openLink(billet)">Visualizar</span>
|
|
43
|
+
</td>
|
|
44
|
+
<td class="text-center">
|
|
45
|
+
<span class="link" v-if="billet.idIntegracao" @click="getPdf(billet)">Baixar PDF</span>
|
|
46
|
+
</td>
|
|
47
|
+
</tr>
|
|
48
|
+
</tbody>
|
|
49
|
+
<tbody v-show="billets.length == 0">
|
|
50
|
+
<tr>
|
|
51
|
+
<td colspan="12">
|
|
52
|
+
<span>Nenhum produto encontrado!</span>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script>
|
|
61
|
+
|
|
62
|
+
import axios from 'axios';
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: "Payment",
|
|
66
|
+
props: {
|
|
67
|
+
companyId: Number,
|
|
68
|
+
},
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
urlGetAll: "/api/v1/billing/billet/client-get-all",
|
|
72
|
+
urlGetPdf: `/api/v1/billing/billet/get-pdf`,
|
|
73
|
+
billets: [],
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
mounted() {
|
|
77
|
+
this.getAll();
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
|
|
81
|
+
getAll() {
|
|
82
|
+
const apiUrl = `https://backend-adm-prod.azurewebsites.net${this.urlGetAll}?Any=${this.companyId}`;
|
|
83
|
+
|
|
84
|
+
// const apiUrl = `https://localhost:44347${this.urlGetAll}?Any=${this.companyId}`;
|
|
85
|
+
|
|
86
|
+
axios.get(apiUrl)
|
|
87
|
+
.then(response => {
|
|
88
|
+
this.billets = response.data.content.data;
|
|
89
|
+
})
|
|
90
|
+
.catch(error => {
|
|
91
|
+
console.error('Erro ao fazer a solicitação:', error);
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
getPdf(billet) {
|
|
95
|
+
const apiUrl = `https://backend-adm-prod.azurewebsites.net${this.urlGetPdf}?Any=${this.companyId}`;
|
|
96
|
+
|
|
97
|
+
let params = {
|
|
98
|
+
obj: {
|
|
99
|
+
idIntegracao: billet.idIntegracao,
|
|
100
|
+
fileName: `nota_fiscal`,
|
|
101
|
+
fileType: "pdf"
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
return axios.get(apiUrl, {
|
|
105
|
+
params: params.obj,
|
|
106
|
+
responseType: "arraybuffer",
|
|
107
|
+
})
|
|
108
|
+
.then((response) => {
|
|
109
|
+
|
|
110
|
+
let blob = new Blob([response.data], { type: "application/pdf" });
|
|
111
|
+
let url = window.URL.createObjectURL(blob);
|
|
112
|
+
|
|
113
|
+
let downloadLink = document.createElement("a");
|
|
114
|
+
downloadLink.href = url;
|
|
115
|
+
downloadLink.download = `${params.obj.fileName}`;
|
|
116
|
+
|
|
117
|
+
document.body.appendChild(downloadLink);
|
|
118
|
+
downloadLink.click();
|
|
119
|
+
|
|
120
|
+
document.body.removeChild(downloadLink);
|
|
121
|
+
|
|
122
|
+
}, (err) => {
|
|
123
|
+
return false;
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
openLink(billet) {
|
|
127
|
+
window.open(billet.link, '_blank');
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
</script>
|
|
132
|
+
<style scoped>
|
|
133
|
+
.table th,
|
|
134
|
+
.table td {
|
|
135
|
+
height: 10px !important;
|
|
136
|
+
padding-left: 5px !important;
|
|
137
|
+
padding-top: 7px !important;
|
|
138
|
+
padding-bottom: 5px !important;
|
|
139
|
+
padding-right: 5px !important;
|
|
140
|
+
padding-left: 10px !important;
|
|
141
|
+
border-bottom: 0px !important;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.title-header {
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
color: #757d8c;
|
|
147
|
+
font-weight: 400;
|
|
148
|
+
text-transform: uppercase;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.link {
|
|
152
|
+
color: #3f529b;
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
font-weight: 400;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.link:hover {
|
|
159
|
+
text-decoration: underline;
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
@@ -568,7 +568,7 @@ export default {
|
|
|
568
568
|
})
|
|
569
569
|
.then((response) => {
|
|
570
570
|
|
|
571
|
-
let blob = new Blob([response.data], { type:
|
|
571
|
+
let blob = new Blob([response.data], { type: "application/pdf" });
|
|
572
572
|
let url = window.URL.createObjectURL(blob);
|
|
573
573
|
|
|
574
574
|
let downloadLink = document.createElement("a");
|