@freteclick/quasar-financial-ui 1.0.113 → 1.0.114
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/components/common/Filters.vue +182 -28
- package/src/components/invoice/expense/CreateExpense.vue +519 -176
- package/src/components/invoice/expense/DetailExpense.vue +304 -39
- package/src/components/invoice/pay/InvoiceDetails.vue +327 -95
- package/src/components/invoice/pay/InvoiceSearching.vue +746 -146
- package/src/components/invoice/pay/details/InvoiceInvoice.vue +1 -1
- package/src/components/invoice/receive/InvoiceSearching.vue +647 -92
- package/src/pages/Invoice/Pay/Details.vue +18 -1
- package/src/pages/Invoice/Pay/Index.vue +149 -27
- package/src/pages/Invoice/Receive/Index.vue +15 -11
- package/src/store/modules/invoice/pay/actions.js +5 -4
- package/src/store/modules/invoice/pay/getters.js +2 -1
- package/src/store/modules/invoice/pay/index.js +1 -0
- package/src/store/modules/invoice/pay/mutation_types.js +2 -1
- package/src/store/modules/invoice/pay/mutations.js +5 -0
- package/src/store/modules/invoice/receive/actions.js +1 -0
- package/src/store/modules/invoice/receive/getters.js +2 -1
- package/src/store/modules/invoice/receive/index.js +1 -0
- package/src/store/modules/invoice/receive/mutation_types.js +2 -1
- package/src/store/modules/invoice/receive/mutations.js +5 -0
|
@@ -1,125 +1,134 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="pay-invoice-detail">
|
|
3
3
|
<q-inner-loading :showing="isLoading">
|
|
4
4
|
<q-spinner-gears size="50px" color="primary" />
|
|
5
5
|
</q-inner-loading>
|
|
6
6
|
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<tr>
|
|
32
|
-
<td class="text-left text-bold">Valor da fatura</td>
|
|
33
|
-
<td class="text-left">
|
|
34
|
-
{{ formatMoney(this.invoice.price) }}
|
|
35
|
-
</td>
|
|
36
|
-
</tr>
|
|
37
|
-
<tr>
|
|
38
|
-
<td class="text-left text-bold">Vencimento</td>
|
|
39
|
-
<td class="text-left">
|
|
40
|
-
{{ this.invoice.dueDate }}
|
|
41
|
-
</td>
|
|
42
|
-
</tr>
|
|
43
|
-
</tbody>
|
|
44
|
-
</q-markup-table>
|
|
45
|
-
</div>
|
|
46
|
-
<div class ="col-xs-12 col-sm-8">
|
|
47
|
-
<div
|
|
48
|
-
class ="row items-center justify-center full-height rounded-borders"
|
|
49
|
-
:style="`background-color: ${this.invoice.status.color}`"
|
|
50
|
-
>
|
|
51
|
-
<div class="text-white text-h6">
|
|
52
|
-
{{ $t(`invoice.statuses.${invoice.status.status}`) }}
|
|
7
|
+
<template v-if="invoice !== null">
|
|
8
|
+
<PageHeader
|
|
9
|
+
eyebrow="CONTAS A PAGAR"
|
|
10
|
+
icon="receipt_long"
|
|
11
|
+
:title="`Fatura #${invoiceNumber}`"
|
|
12
|
+
:description="provider.name || 'Detalhes e pedidos vinculados a esta despesa.'"
|
|
13
|
+
>
|
|
14
|
+
<template #actions>
|
|
15
|
+
<q-btn
|
|
16
|
+
outline
|
|
17
|
+
no-caps
|
|
18
|
+
rounded
|
|
19
|
+
color="white"
|
|
20
|
+
icon="arrow_back"
|
|
21
|
+
label="Voltar às contas a pagar"
|
|
22
|
+
:to="{ name: 'FinancePayIndex' }"
|
|
23
|
+
/>
|
|
24
|
+
</template>
|
|
25
|
+
</PageHeader>
|
|
26
|
+
|
|
27
|
+
<section class="pay-invoice-detail__summary">
|
|
28
|
+
<q-card flat class="pay-invoice-summary-card pay-invoice-summary-card--amount">
|
|
29
|
+
<div class="pay-invoice-summary-card__icon">
|
|
30
|
+
<q-icon name="payments" />
|
|
53
31
|
</div>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
32
|
+
<div class="pay-invoice-summary-card__copy">
|
|
33
|
+
<span>Valor da fatura</span>
|
|
34
|
+
<strong>{{ formatMoney(invoice.price) }}</strong>
|
|
35
|
+
</div>
|
|
36
|
+
</q-card>
|
|
57
37
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
69
|
-
<
|
|
70
|
-
name
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
38
|
+
<q-card flat class="pay-invoice-summary-card">
|
|
39
|
+
<div class="pay-invoice-summary-card__icon pay-invoice-summary-card__icon--date">
|
|
40
|
+
<q-icon name="event" />
|
|
41
|
+
</div>
|
|
42
|
+
<div class="pay-invoice-summary-card__copy">
|
|
43
|
+
<span>Vencimento</span>
|
|
44
|
+
<strong>{{ invoice.dueDate || "—" }}</strong>
|
|
45
|
+
</div>
|
|
46
|
+
</q-card>
|
|
47
|
+
|
|
48
|
+
<q-card flat class="pay-invoice-summary-card">
|
|
49
|
+
<div class="pay-invoice-summary-card__icon pay-invoice-summary-card__icon--status">
|
|
50
|
+
<q-icon name="fact_check" />
|
|
51
|
+
</div>
|
|
52
|
+
<div class="pay-invoice-summary-card__copy">
|
|
53
|
+
<span>Status</span>
|
|
54
|
+
<q-badge
|
|
55
|
+
class="pay-invoice-status"
|
|
56
|
+
:style="invoiceStatus.color ? { backgroundColor: invoiceStatus.color } : {}"
|
|
57
|
+
>
|
|
58
|
+
{{ invoiceStatus.status ? $t(`invoice.statuses.${invoiceStatus.status}`) : "—" }}
|
|
59
|
+
</q-badge>
|
|
60
|
+
</div>
|
|
61
|
+
</q-card>
|
|
62
|
+
|
|
63
|
+
<q-card flat class="pay-invoice-summary-card">
|
|
64
|
+
<div class="pay-invoice-summary-card__icon pay-invoice-summary-card__icon--orders">
|
|
65
|
+
<q-icon name="local_shipping" />
|
|
66
|
+
</div>
|
|
67
|
+
<div class="pay-invoice-summary-card__copy">
|
|
68
|
+
<span>Pedidos vinculados</span>
|
|
69
|
+
<strong>{{ invoiceOrdersCount }}</strong>
|
|
70
|
+
</div>
|
|
71
|
+
</q-card>
|
|
72
|
+
</section>
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
<section class="pay-invoice-detail__workspace">
|
|
75
|
+
<div class="pay-invoice-detail__tabs-shell">
|
|
76
|
+
<q-tabs
|
|
77
|
+
v-model="currentTab"
|
|
78
|
+
align="left"
|
|
79
|
+
no-caps
|
|
80
|
+
inline-label
|
|
81
|
+
class="pay-invoice-detail__tabs"
|
|
82
|
+
>
|
|
83
|
+
<q-tab name="details" icon="description" label="Detalhes da despesa" />
|
|
84
|
+
<q-tab name="orders" icon="local_shipping" label="Pedidos" />
|
|
85
|
+
</q-tabs>
|
|
86
|
+
</div>
|
|
80
87
|
|
|
81
|
-
<q-tab-panels
|
|
82
|
-
|
|
83
|
-
>
|
|
84
|
-
<q-tab-panel name="details" class="q-pa-none">
|
|
88
|
+
<q-tab-panels v-model="currentTab" class="pay-invoice-detail__panels">
|
|
89
|
+
<q-tab-panel name="details" class="pay-invoice-detail__panel">
|
|
85
90
|
<InvoiceInvoice
|
|
86
91
|
:invoiceId="invoiceId"
|
|
87
|
-
@updated
|
|
92
|
+
@updated="requestInvoice(invoiceId)"
|
|
88
93
|
/>
|
|
89
94
|
</q-tab-panel>
|
|
90
|
-
<q-tab-panel name="orders" class="
|
|
91
|
-
<InvoiceOrders
|
|
92
|
-
:invoiceId="invoiceId"
|
|
93
|
-
/>
|
|
95
|
+
<q-tab-panel name="orders" class="pay-invoice-detail__panel">
|
|
96
|
+
<InvoiceOrders :invoiceId="invoiceId" />
|
|
94
97
|
</q-tab-panel>
|
|
95
98
|
</q-tab-panels>
|
|
96
|
-
</
|
|
97
|
-
</
|
|
98
|
-
|
|
99
|
-
</transition-group>
|
|
99
|
+
</section>
|
|
100
|
+
</template>
|
|
100
101
|
|
|
101
|
-
<div v-if="
|
|
102
|
-
class="
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
<div v-else-if="notFound" class="pay-invoice-detail__not-found">
|
|
103
|
+
<q-card flat class="pay-invoice-not-found-card">
|
|
104
|
+
<div class="pay-invoice-not-found-card__icon">
|
|
105
|
+
<q-icon name="receipt_long" />
|
|
106
|
+
</div>
|
|
107
|
+
<h2>Fatura não encontrada</h2>
|
|
108
|
+
<p>Não foi possível carregar os detalhes desta conta a pagar.</p>
|
|
109
|
+
<q-btn
|
|
110
|
+
unelevated
|
|
111
|
+
no-caps
|
|
112
|
+
color="primary"
|
|
113
|
+
icon="arrow_back"
|
|
114
|
+
label="Voltar às contas a pagar"
|
|
115
|
+
:to="{ name: 'FinancePayIndex' }"
|
|
116
|
+
/>
|
|
117
|
+
</q-card>
|
|
111
118
|
</div>
|
|
112
|
-
</
|
|
119
|
+
</div>
|
|
113
120
|
</template>
|
|
114
121
|
|
|
115
122
|
<script>
|
|
116
123
|
import { mapActions, mapGetters } from 'vuex';
|
|
124
|
+
import PageHeader from '@freteclick/quasar-common-ui/src/components/common/PageHeader.vue';
|
|
117
125
|
import InvoiceOrders from './details/InvoiceOrders';
|
|
118
126
|
import InvoiceInvoice from './details/InvoiceInvoice';
|
|
119
127
|
import { formatMoney, formatDateYmdTodmY } from '@freteclick/quasar-common-ui/src/utils/formatter';
|
|
120
128
|
|
|
121
129
|
export default {
|
|
122
130
|
components: {
|
|
131
|
+
PageHeader,
|
|
123
132
|
InvoiceInvoice,
|
|
124
133
|
InvoiceOrders ,
|
|
125
134
|
},
|
|
@@ -151,6 +160,23 @@ export default {
|
|
|
151
160
|
...mapGetters({
|
|
152
161
|
myCompany: 'people/currentCompany',
|
|
153
162
|
}),
|
|
163
|
+
|
|
164
|
+
invoiceNumber() {
|
|
165
|
+
const invoiceUri = this.invoice && this.invoice['@id'] ? this.invoice['@id'] : '';
|
|
166
|
+
const match = invoiceUri.match(/^\/finance\/pay\/([a-z0-9-]*)$/i);
|
|
167
|
+
|
|
168
|
+
return match ? match[1] : (this.invoiceId || '—');
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
invoiceStatus() {
|
|
172
|
+
return (this.invoice && this.invoice.status) || {};
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
invoiceOrdersCount() {
|
|
176
|
+
return this.invoice && Array.isArray(this.invoice.order)
|
|
177
|
+
? this.invoice.order.length
|
|
178
|
+
: 0;
|
|
179
|
+
},
|
|
154
180
|
},
|
|
155
181
|
|
|
156
182
|
watch: {
|
|
@@ -208,3 +234,209 @@ export default {
|
|
|
208
234
|
},
|
|
209
235
|
};
|
|
210
236
|
</script>
|
|
237
|
+
|
|
238
|
+
<style lang="scss" scoped>
|
|
239
|
+
.pay-invoice-detail {
|
|
240
|
+
position: relative;
|
|
241
|
+
display: grid;
|
|
242
|
+
width: 100%;
|
|
243
|
+
min-width: 0;
|
|
244
|
+
min-height: 72vh;
|
|
245
|
+
gap: 20px;
|
|
246
|
+
color: #1b2d43;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.pay-invoice-detail__summary {
|
|
250
|
+
display: grid;
|
|
251
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
252
|
+
gap: 14px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.pay-invoice-summary-card {
|
|
256
|
+
display: flex;
|
|
257
|
+
min-width: 0;
|
|
258
|
+
align-items: center;
|
|
259
|
+
gap: 13px;
|
|
260
|
+
padding: 18px;
|
|
261
|
+
border: 1px solid #e5ebf3;
|
|
262
|
+
border-radius: 16px;
|
|
263
|
+
background: #fff;
|
|
264
|
+
box-shadow: 0 8px 22px rgba(26, 46, 70, 0.035);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.pay-invoice-summary-card__icon {
|
|
268
|
+
display: grid;
|
|
269
|
+
width: 44px;
|
|
270
|
+
height: 44px;
|
|
271
|
+
flex: 0 0 auto;
|
|
272
|
+
place-items: center;
|
|
273
|
+
border-radius: 13px;
|
|
274
|
+
color: #245d9c;
|
|
275
|
+
background: #eaf2fb;
|
|
276
|
+
font-size: 21px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.pay-invoice-summary-card--amount .pay-invoice-summary-card__icon {
|
|
280
|
+
color: #27805a;
|
|
281
|
+
background: #e8f7ef;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.pay-invoice-summary-card__icon--date {
|
|
285
|
+
color: #9b6b17;
|
|
286
|
+
background: #fff5df;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.pay-invoice-summary-card__icon--status {
|
|
290
|
+
color: #7357a6;
|
|
291
|
+
background: #f0ebfb;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.pay-invoice-summary-card__icon--orders {
|
|
295
|
+
color: #287f91;
|
|
296
|
+
background: #e6f5f7;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.pay-invoice-summary-card__copy {
|
|
300
|
+
display: flex;
|
|
301
|
+
min-width: 0;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
gap: 5px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.pay-invoice-summary-card__copy > span {
|
|
307
|
+
color: #7b8b9c;
|
|
308
|
+
font-size: 11px;
|
|
309
|
+
font-weight: 650;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.pay-invoice-summary-card__copy > strong {
|
|
313
|
+
overflow: hidden;
|
|
314
|
+
color: #1a2e45;
|
|
315
|
+
font-size: 18px;
|
|
316
|
+
font-weight: 750;
|
|
317
|
+
letter-spacing: -0.025em;
|
|
318
|
+
text-overflow: ellipsis;
|
|
319
|
+
white-space: nowrap;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.pay-invoice-status {
|
|
323
|
+
width: fit-content;
|
|
324
|
+
max-width: 100%;
|
|
325
|
+
padding: 6px 10px;
|
|
326
|
+
border-radius: 20px;
|
|
327
|
+
color: #fff;
|
|
328
|
+
font-size: 11px;
|
|
329
|
+
font-weight: 700;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.pay-invoice-detail__workspace {
|
|
333
|
+
min-width: 0;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
border: 1px solid #e5ebf3;
|
|
336
|
+
border-radius: 20px;
|
|
337
|
+
background: #fff;
|
|
338
|
+
box-shadow: 0 12px 30px rgba(25, 48, 78, 0.045);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.pay-invoice-detail__tabs-shell {
|
|
342
|
+
border-bottom: 1px solid #e9eef4;
|
|
343
|
+
background: #fbfcfe;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.pay-invoice-detail__tabs {
|
|
347
|
+
min-height: 58px;
|
|
348
|
+
padding: 0 18px;
|
|
349
|
+
color: #718398;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.pay-invoice-detail__tabs :deep(.q-tab--active) {
|
|
353
|
+
color: #245d9c;
|
|
354
|
+
font-weight: 700;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.pay-invoice-detail__tabs :deep(.q-tab__indicator) {
|
|
358
|
+
height: 3px;
|
|
359
|
+
border-radius: 3px 3px 0 0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.pay-invoice-detail__panels {
|
|
363
|
+
min-width: 0;
|
|
364
|
+
background: transparent;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.pay-invoice-detail__panel {
|
|
368
|
+
min-width: 0;
|
|
369
|
+
padding: 20px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.pay-invoice-detail__not-found {
|
|
373
|
+
display: grid;
|
|
374
|
+
min-height: 60vh;
|
|
375
|
+
place-items: center;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.pay-invoice-not-found-card {
|
|
379
|
+
display: flex;
|
|
380
|
+
width: min(100%, 440px);
|
|
381
|
+
align-items: center;
|
|
382
|
+
flex-direction: column;
|
|
383
|
+
padding: 36px 28px;
|
|
384
|
+
border: 1px solid #e5ebf3;
|
|
385
|
+
border-radius: 20px;
|
|
386
|
+
background: #fff;
|
|
387
|
+
text-align: center;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.pay-invoice-not-found-card__icon {
|
|
391
|
+
display: grid;
|
|
392
|
+
width: 62px;
|
|
393
|
+
height: 62px;
|
|
394
|
+
place-items: center;
|
|
395
|
+
border-radius: 18px;
|
|
396
|
+
color: #b84949;
|
|
397
|
+
background: #fff0f0;
|
|
398
|
+
font-size: 30px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.pay-invoice-not-found-card h2 {
|
|
402
|
+
margin: 18px 0 0;
|
|
403
|
+
color: #1a2e45;
|
|
404
|
+
font-size: 22px;
|
|
405
|
+
font-weight: 750;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.pay-invoice-not-found-card p {
|
|
409
|
+
margin: 8px 0 20px;
|
|
410
|
+
color: #7b8b9c;
|
|
411
|
+
font-size: 13px;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
@media (max-width: 1024px) {
|
|
415
|
+
.pay-invoice-detail__summary {
|
|
416
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@media (max-width: 600px) {
|
|
421
|
+
.pay-invoice-detail {
|
|
422
|
+
gap: 14px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.pay-invoice-detail__summary {
|
|
426
|
+
grid-template-columns: minmax(0, 1fr);
|
|
427
|
+
gap: 10px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.pay-invoice-summary-card {
|
|
431
|
+
padding: 15px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.pay-invoice-detail__tabs {
|
|
435
|
+
padding: 0 4px;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.pay-invoice-detail__panel {
|
|
439
|
+
padding: 12px;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
</style>
|