@freteclick/quasar-financial-ui 1.0.112 → 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/expense/FormExpense.vue +1 -1
- package/src/components/expense/TableExpenses.vue +2 -2
- package/src/components/invoice/client/InvoiceSearching.vue +3 -3
- package/src/components/invoice/client/details/InvoiceInvoice.vue +1 -1
- package/src/components/invoice/client/details/InvoiceOrders.vue +2 -2
- package/src/components/invoice/expense/CreateExpense.vue +520 -177
- 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 +747 -147
- package/src/components/invoice/pay/details/InvoiceInvoice.vue +1 -1
- package/src/components/invoice/pay/details/InvoiceOrders.vue +3 -3
- package/src/components/invoice/receive/InvoiceSearching.vue +648 -93
- package/src/components/invoice/receive/details/InvoiceInvoice.vue +1 -1
- package/src/components/invoice/receive/details/InvoiceInvoiceBkp.vue +2 -2
- package/src/components/invoice/receive/details/InvoiceOrders.vue +4 -4
- 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
package/package.json
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-card
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<q-card
|
|
3
|
+
class="row q-pa-md invoice-filters"
|
|
4
|
+
:class="{ 'invoice-filters--drawer': variant === 'receivables-drawer' }"
|
|
5
|
+
>
|
|
6
|
+
<div v-if="variant !== 'receivables-drawer'" class="col-xs-12 q-pb-md text-h6">
|
|
7
|
+
Faturas
|
|
6
8
|
</div>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
<div class="col-sm-6 col-xs-12 q-pa-md invoice-filters__field">
|
|
11
|
+
<q-input
|
|
12
|
+
v-model="filters.text"
|
|
13
|
+
stack-label
|
|
14
|
+
label="Buscar por"
|
|
15
|
+
debounce="1000"
|
|
16
|
+
:outlined="variant === 'receivables-drawer'"
|
|
17
|
+
:dense="variant === 'receivables-drawer'"
|
|
18
|
+
class="full-width"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-sm-6 col-xs-12 q-pa-md invoice-filters__field">
|
|
22
|
+
<q-select
|
|
23
|
+
v-model="filters.status"
|
|
24
|
+
:options="statuses"
|
|
25
|
+
stack-label
|
|
26
|
+
label="Status da fatura"
|
|
27
|
+
:outlined="variant === 'receivables-drawer'"
|
|
28
|
+
:dense="variant === 'receivables-drawer'"
|
|
29
|
+
:loading="loadingStatuses"
|
|
30
|
+
class="full-width"
|
|
31
|
+
>
|
|
10
32
|
<template v-slot:no-option>
|
|
11
33
|
<q-item>
|
|
12
34
|
<q-item-section class="text-grey"> Sem resultados </q-item-section>
|
|
@@ -14,9 +36,35 @@
|
|
|
14
36
|
</template>
|
|
15
37
|
</q-select>
|
|
16
38
|
</div>
|
|
17
|
-
<div class="col-6">
|
|
18
|
-
<q-select
|
|
19
|
-
|
|
39
|
+
<div v-if="showCategory" class="col-sm-6 col-xs-12 q-pa-md invoice-filters__field">
|
|
40
|
+
<q-select
|
|
41
|
+
v-model="filters.category"
|
|
42
|
+
:options="categories"
|
|
43
|
+
stack-label
|
|
44
|
+
label="Categoria"
|
|
45
|
+
:outlined="variant === 'receivables-drawer'"
|
|
46
|
+
:dense="variant === 'receivables-drawer'"
|
|
47
|
+
:loading="loadingCategories"
|
|
48
|
+
class="full-width"
|
|
49
|
+
>
|
|
50
|
+
<template v-slot:no-option>
|
|
51
|
+
<q-item>
|
|
52
|
+
<q-item-section class="text-grey">Sem categorias</q-item-section>
|
|
53
|
+
</q-item>
|
|
54
|
+
</template>
|
|
55
|
+
</q-select>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="col-6 q-pa-md invoice-filters__field">
|
|
58
|
+
<q-select
|
|
59
|
+
v-model="filters.orderType"
|
|
60
|
+
:options="orderType"
|
|
61
|
+
stack-label
|
|
62
|
+
label="Tipo de Fatura"
|
|
63
|
+
:outlined="variant === 'receivables-drawer'"
|
|
64
|
+
:dense="variant === 'receivables-drawer'"
|
|
65
|
+
:loading="loadingOrderType"
|
|
66
|
+
class="full-width"
|
|
67
|
+
>
|
|
20
68
|
<template v-slot:no-option>
|
|
21
69
|
<q-item>
|
|
22
70
|
<q-item-section class="text-grey"> Sem resultados </q-item-section>
|
|
@@ -24,7 +72,7 @@
|
|
|
24
72
|
</template>
|
|
25
73
|
</q-select>
|
|
26
74
|
</div>
|
|
27
|
-
<div class="col-6">
|
|
75
|
+
<div class="col-6 q-pa-md invoice-filters__field invoice-filters__date">
|
|
28
76
|
<DataFilter :fromDate="filters.date.from" :toDate="filters.date.to" :showButton="false"
|
|
29
77
|
@dateChanged="dateChanged" />
|
|
30
78
|
</div>
|
|
@@ -45,10 +93,19 @@ export default {
|
|
|
45
93
|
type: Object,
|
|
46
94
|
required: true,
|
|
47
95
|
},
|
|
96
|
+
variant: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "default",
|
|
99
|
+
},
|
|
100
|
+
showCategory: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
48
104
|
},
|
|
49
105
|
|
|
50
106
|
created() {
|
|
51
107
|
this.requestStatuses();
|
|
108
|
+
if (this.showCategory) this.requestCategories(this.filters.company);
|
|
52
109
|
},
|
|
53
110
|
|
|
54
111
|
data() {
|
|
@@ -56,7 +113,9 @@ export default {
|
|
|
56
113
|
|
|
57
114
|
return {
|
|
58
115
|
statuses: statuses,
|
|
116
|
+
categories: [{ label: "Todas", value: null }],
|
|
59
117
|
loadingStatuses: false,
|
|
118
|
+
loadingCategories: false,
|
|
60
119
|
loadingOrderType: false,
|
|
61
120
|
orderType: [
|
|
62
121
|
{
|
|
@@ -95,39 +154,80 @@ export default {
|
|
|
95
154
|
"filters.status"() {
|
|
96
155
|
this.$emit("onRequest");
|
|
97
156
|
},
|
|
157
|
+
"filters.category"() {
|
|
158
|
+
if (this.showCategory) this.$emit("onRequest");
|
|
159
|
+
},
|
|
160
|
+
"filters.company"(company) {
|
|
161
|
+
if (this.showCategory) this.requestCategories(company);
|
|
162
|
+
},
|
|
98
163
|
},
|
|
99
164
|
|
|
100
165
|
methods: {
|
|
101
166
|
...mapActions({
|
|
102
167
|
getStatuses: "receiveInvoice/getStatuses",
|
|
168
|
+
getCategories: "categories/getCategories",
|
|
103
169
|
}),
|
|
104
170
|
|
|
171
|
+
requestCategories(company) {
|
|
172
|
+
if (!company || !company.id) {
|
|
173
|
+
this.categories = [{ label: "Todas", value: null }];
|
|
174
|
+
return Promise.resolve(this.categories);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
this.loadingCategories = true;
|
|
178
|
+
return this.getCategories({
|
|
179
|
+
params: {
|
|
180
|
+
context: "expense",
|
|
181
|
+
company: company.id,
|
|
182
|
+
},
|
|
183
|
+
})
|
|
184
|
+
.then((members) => {
|
|
185
|
+
const options = [{ label: "Todas", value: null }];
|
|
186
|
+
(members || []).forEach((category) => {
|
|
187
|
+
const idFromIri = String(category["@id"] || "").match(/\/categories\/(\d+)$/);
|
|
188
|
+
const id = Number(category.id || (idFromIri && idFromIri[1]));
|
|
189
|
+
|
|
190
|
+
if (id) options.push({ label: category.name, value: id });
|
|
191
|
+
});
|
|
192
|
+
this.categories = options;
|
|
193
|
+
return options;
|
|
194
|
+
})
|
|
195
|
+
.catch(() => {
|
|
196
|
+
this.categories = [{ label: "Todas", value: null }];
|
|
197
|
+
return this.categories;
|
|
198
|
+
})
|
|
199
|
+
.finally(() => {
|
|
200
|
+
this.loadingCategories = false;
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
|
|
105
204
|
requestStatuses() {
|
|
106
205
|
this.loadingStatuses = true;
|
|
107
|
-
this.getStatuses({
|
|
206
|
+
return this.getStatuses({
|
|
108
207
|
visibility: "public",
|
|
109
208
|
context: "invoice",
|
|
110
209
|
realStatus: ["open", "pending", "canceled", "closed"],
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
|
|
210
|
+
})
|
|
211
|
+
.then((statuses) => {
|
|
212
|
+
const data = [{ label: "Todos", value: null }];
|
|
213
|
+
(Array.isArray(statuses) ? statuses : []).forEach((status) => {
|
|
214
|
+
const id = String(status["@id"] || "").replace(/[^0-9]/g, "");
|
|
215
|
+
if (!id) return;
|
|
114
216
|
|
|
115
|
-
data.push({
|
|
116
|
-
label: "Todos",
|
|
117
|
-
value: null,
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
for (let index in statuses) {
|
|
121
217
|
data.push({
|
|
122
|
-
label: this.$t(`invoice.statuses.${
|
|
123
|
-
value:
|
|
218
|
+
label: this.$t(`invoice.statuses.${status.status}`),
|
|
219
|
+
value: id,
|
|
124
220
|
});
|
|
125
|
-
}
|
|
221
|
+
});
|
|
126
222
|
|
|
127
223
|
this.statuses = data;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
224
|
+
})
|
|
225
|
+
.catch(() => {
|
|
226
|
+
this.statuses = [{ label: "Todos", value: null }];
|
|
227
|
+
})
|
|
228
|
+
.finally(() => {
|
|
229
|
+
this.loadingStatuses = false;
|
|
230
|
+
});
|
|
131
231
|
},
|
|
132
232
|
dateChanged(item) {
|
|
133
233
|
this.filters.date = item;
|
|
@@ -135,4 +235,58 @@ export default {
|
|
|
135
235
|
},
|
|
136
236
|
},
|
|
137
237
|
};
|
|
138
|
-
</script>
|
|
238
|
+
</script>
|
|
239
|
+
|
|
240
|
+
<style lang="scss" scoped>
|
|
241
|
+
.invoice-filters--drawer {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-flow: column nowrap;
|
|
244
|
+
align-items: stretch;
|
|
245
|
+
gap: 14px;
|
|
246
|
+
width: 100%;
|
|
247
|
+
padding: 0;
|
|
248
|
+
border: 0;
|
|
249
|
+
border-radius: 0;
|
|
250
|
+
background: transparent;
|
|
251
|
+
box-shadow: none;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.invoice-filters--drawer > .invoice-filters__field {
|
|
255
|
+
flex: 0 0 auto;
|
|
256
|
+
width: 100%;
|
|
257
|
+
min-width: 0;
|
|
258
|
+
max-width: none;
|
|
259
|
+
margin: 0;
|
|
260
|
+
padding: 0 !important;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.invoice-filters--drawer :deep(.q-field) {
|
|
264
|
+
width: 100%;
|
|
265
|
+
min-width: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.invoice-filters--drawer :deep(.q-field__control),
|
|
269
|
+
.invoice-filters--drawer :deep(.q-field__control:before),
|
|
270
|
+
.invoice-filters--drawer :deep(.q-field__control:after) {
|
|
271
|
+
min-height: 42px;
|
|
272
|
+
border-radius: 10px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.invoice-filters--drawer :deep(.container-filter) {
|
|
276
|
+
flex-direction: column;
|
|
277
|
+
align-items: stretch;
|
|
278
|
+
justify-content: flex-start;
|
|
279
|
+
gap: 10px;
|
|
280
|
+
padding: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.invoice-filters--drawer :deep(.date-filter__field) {
|
|
284
|
+
flex: 0 0 auto;
|
|
285
|
+
width: 100%;
|
|
286
|
+
max-width: none;
|
|
287
|
+
min-width: 0;
|
|
288
|
+
min-height: 0;
|
|
289
|
+
margin: 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
</style>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<q-table
|
|
4
4
|
:loading ="isLoading"
|
|
5
|
-
:
|
|
5
|
+
:rows ="data"
|
|
6
6
|
:columns ="settings.columns"
|
|
7
|
-
:pagination
|
|
7
|
+
v-model:pagination="pagination"
|
|
8
8
|
@request ="onRequest"
|
|
9
9
|
row-key ="id"
|
|
10
10
|
:visible-columns="settings.visibleColumns"
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
this.requestStatuses();
|
|
193
193
|
},
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
beforeUnmount() {
|
|
196
196
|
this.reset();
|
|
197
197
|
},
|
|
198
198
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div style="height: 1200px">
|
|
19
19
|
<iframe :src="invoiceUrlSicred" name="BILLETINTER" id="billet_sicred" width="100%" height="100%"
|
|
20
20
|
frameBorder="0">
|
|
21
|
-
|
|
21
|
+
This browser does not support IFrame.
|
|
22
22
|
</iframe>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-table :loading="isLoading" :
|
|
2
|
+
<q-table :loading="isLoading" :rows="data" :columns="settings.columns" v-model:pagination="pagination"
|
|
3
3
|
@request="onRequest" row-key="id" :visible-columns="settings.visibleColumns" style="min-height: 90vh;">
|
|
4
4
|
<template v-slot:body="props">
|
|
5
5
|
<q-tr :props="props">
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
this.requestStatuses();
|
|
170
170
|
},
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
beforeUnmount() {
|
|
173
173
|
this.reset();
|
|
174
174
|
},
|
|
175
175
|
|