@freteclick/quasar-financial-ui 1.0.85 → 1.0.87
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 +17 -17
- package/src/components/common/Filters.vue +140 -140
- package/src/components/expense/FormExpense.vue +309 -309
- package/src/components/expense/TableExpenses.vue +305 -305
- package/src/components/invoice/client/ClientInvoiceDetails.vue +212 -212
- package/src/components/invoice/client/InvoiceSearching.vue +382 -382
- package/src/components/invoice/client/details/InvoiceInvoice.vue +248 -248
- package/src/components/invoice/client/details/InvoiceOrders.vue +327 -327
- package/src/components/invoice/expense/CreateExpense.vue +539 -539
- package/src/components/invoice/expense/DetailExpense.vue +393 -393
- package/src/components/invoice/pay/InvoiceDetails.vue +210 -210
- package/src/components/invoice/pay/InvoiceSearching.vue +388 -388
- package/src/components/invoice/pay/details/InvoiceInvoice.vue +47 -47
- package/src/components/invoice/pay/details/InvoiceOrders.vue +342 -342
- package/src/components/invoice/receive/InvoiceDetails.vue +280 -280
- package/src/components/invoice/receive/InvoiceSearching.vue +359 -359
- package/src/components/invoice/receive/details/InvoiceInvoice.vue +453 -371
- package/src/components/invoice/receive/details/InvoiceInvoiceBkp.vue +259 -259
- package/src/components/invoice/receive/details/InvoiceOrders.vue +369 -369
- package/src/i18n/en-us/index.js +8 -8
- package/src/i18n/index.js +5 -5
- package/src/i18n/pt-br/index.js +30 -30
- package/src/pages/Invoice/Client/Details.vue +23 -23
- package/src/pages/Invoice/Client/Index.vue +26 -26
- package/src/pages/Invoice/Pay/Details.vue +23 -23
- package/src/pages/Invoice/Pay/Index.vue +53 -53
- package/src/pages/Invoice/Receive/Details.vue +23 -23
- package/src/pages/Invoice/Receive/Index.vue +26 -26
- package/src/router/routes.js +32 -32
- package/src/store/modules/invoice/comission/actions.js +66 -66
- package/src/store/modules/invoice/comission/getters.js +6 -6
- package/src/store/modules/invoice/comission/index.js +19 -19
- package/src/store/modules/invoice/comission/mutation_types.js +7 -7
- package/src/store/modules/invoice/comission/mutations.js +42 -42
- package/src/store/modules/invoice/expense/actions.js +98 -98
- package/src/store/modules/invoice/expense/getters.js +1 -1
- package/src/store/modules/invoice/expense/index.js +12 -12
- package/src/store/modules/invoice/expense/mutations.js +3 -3
- package/src/store/modules/invoice/expense/state.js +5 -5
- package/src/store/modules/invoice/pay/actions.js +114 -114
- package/src/store/modules/invoice/pay/getters.js +6 -6
- package/src/store/modules/invoice/pay/index.js +19 -19
- package/src/store/modules/invoice/pay/mutation_types.js +7 -7
- package/src/store/modules/invoice/pay/mutations.js +42 -42
- package/src/store/modules/invoice/receive/actions.js +163 -152
- package/src/store/modules/invoice/receive/actionsBkp.js +77 -77
- package/src/store/modules/invoice/receive/getters.js +6 -6
- package/src/store/modules/invoice/receive/index.js +19 -19
- package/src/store/modules/invoice/receive/mutation_types.js +7 -7
- package/src/store/modules/invoice/receive/mutations.js +42 -42
- package/src/store/store-flag.d.ts +9 -9
|
@@ -1,249 +1,249 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="row items-center justify-center">
|
|
3
|
-
<div class="flex flex-center" v-if="isLoading">
|
|
4
|
-
<q-circular-progress :indeterminate="isLoading"
|
|
5
|
-
size ="sm"
|
|
6
|
-
color="primary"
|
|
7
|
-
class="q-ma-md"
|
|
8
|
-
/>
|
|
9
|
-
Carregando...
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<!-- BILLET VIEWER -->
|
|
13
|
-
|
|
14
|
-
<div :class="showBillet ? 'full-width q-pa-lg' : 'hidden'">
|
|
15
|
-
<q-form
|
|
16
|
-
ref ="myForm"
|
|
17
|
-
:action="payment !== null ? payment.invoiceUrl : ''"
|
|
18
|
-
method ="post"
|
|
19
|
-
class ="q-mt-sm row justify-center items-center"
|
|
20
|
-
target ="BILLET"
|
|
21
|
-
>
|
|
22
|
-
<input type="hidden" name="DC" :value="itauHash" />
|
|
23
|
-
</q-form>
|
|
24
|
-
|
|
25
|
-
<div style="height: 1200px">
|
|
26
|
-
<iframe name="BILLET" width="100%" height="100%" frameBorder="0">
|
|
27
|
-
<p>This browser does not support IFrame.</p>
|
|
28
|
-
</iframe>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<!-- BILLET GENERATOR TRIGGER -->
|
|
33
|
-
|
|
34
|
-
<div class="col-12 q-pt-lg" v-if="paymentIsPending && billetMustBeCreated">
|
|
35
|
-
<div
|
|
36
|
-
style="min-height: 80vh;"
|
|
37
|
-
class="row justify-center items-center"
|
|
38
|
-
>
|
|
39
|
-
<q-form
|
|
40
|
-
:action="payment ? payment.invoiceUrl : ''"
|
|
41
|
-
method ="post"
|
|
42
|
-
target ="_blank"
|
|
43
|
-
>
|
|
44
|
-
<input type="hidden" name="DC" :value="itauHash" />
|
|
45
|
-
<q-btn
|
|
46
|
-
type ="submit"
|
|
47
|
-
icon ="money"
|
|
48
|
-
size ="lg"
|
|
49
|
-
color ="primary"
|
|
50
|
-
label ="Gerar boleto"
|
|
51
|
-
@click ="loadOnFocus = true"
|
|
52
|
-
:disable="isPaid"
|
|
53
|
-
/>
|
|
54
|
-
</q-form>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<!-- PAID MESSAGE -->
|
|
59
|
-
|
|
60
|
-
<div class="col-12" v-if="payment !== null && isPaid">
|
|
61
|
-
<div
|
|
62
|
-
class="row items-center justify-center"
|
|
63
|
-
style="min-height: 90vh;"
|
|
64
|
-
>
|
|
65
|
-
<q-banner class="text-white bg-positive text-center text-h3" rounded>
|
|
66
|
-
<template v-slot:avatar>
|
|
67
|
-
<q-icon name="thumb_up" color="white" />
|
|
68
|
-
</template>
|
|
69
|
-
O boleto foi pago
|
|
70
|
-
</q-banner>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<script>
|
|
77
|
-
import { date, extend } from 'quasar';
|
|
78
|
-
import { mapActions, mapGetters } from 'vuex';
|
|
79
|
-
|
|
80
|
-
export default {
|
|
81
|
-
props: {
|
|
82
|
-
invoiceId: {
|
|
83
|
-
type : String,
|
|
84
|
-
required: true,
|
|
85
|
-
},
|
|
86
|
-
orderId : {
|
|
87
|
-
type : String,
|
|
88
|
-
required: true,
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
mounted() {
|
|
93
|
-
window.addEventListener ('focus', this.loadItauDataOnFocus);
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
beforeDestroy() {
|
|
97
|
-
window.removeEventListener('focus', this.loadItauDataOnFocus);
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
created() {
|
|
101
|
-
this.getPaymentStatus();
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
data() {
|
|
105
|
-
return {
|
|
106
|
-
isLoading : false,
|
|
107
|
-
payment : null,
|
|
108
|
-
isPaid : false,
|
|
109
|
-
itauHash : null,
|
|
110
|
-
showBillet : false,
|
|
111
|
-
loadOnFocus: false,
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
computed: {
|
|
116
|
-
...mapGetters({
|
|
117
|
-
myCompany: 'people/currentCompany',
|
|
118
|
-
}),
|
|
119
|
-
|
|
120
|
-
paymentIsPending() {
|
|
121
|
-
if (this.payment === null)
|
|
122
|
-
return false;
|
|
123
|
-
|
|
124
|
-
return ['waiting payment', 'outdated billing']
|
|
125
|
-
.includes(this.payment.status);
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
billetMustBeCreated() {
|
|
129
|
-
if (this.payment === null)
|
|
130
|
-
return false;
|
|
131
|
-
|
|
132
|
-
return this.payment.paymentType == 'choose_pending';
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
watch: {
|
|
137
|
-
myCompany(company) {
|
|
138
|
-
if (company !== null) {
|
|
139
|
-
this.getPaymentStatus();
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
payment(data) {
|
|
144
|
-
if (!data)
|
|
145
|
-
return;
|
|
146
|
-
|
|
147
|
-
if (data.paymentType == 'choose_pending' || data.paymentStatus == 'no_finished') {
|
|
148
|
-
this.isPaid = false;
|
|
149
|
-
this.getItauHash();
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
if (data.paymentType == 'billet') {
|
|
153
|
-
if (data.paymentStatus == 'paid')
|
|
154
|
-
this.isPaid = true;
|
|
155
|
-
else {
|
|
156
|
-
this.isPaid = false;
|
|
157
|
-
|
|
158
|
-
if (data.paymentStatus == 'created')
|
|
159
|
-
this.getItauHash()
|
|
160
|
-
.then(hash => {
|
|
161
|
-
if (hash !== null)
|
|
162
|
-
this.showBillet = true;
|
|
163
|
-
});
|
|
164
|
-
else
|
|
165
|
-
this.showBillet = false;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
showBillet(show) {
|
|
172
|
-
if (show == true) {
|
|
173
|
-
this.$refs.myForm.$el.submit();
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
methods: {
|
|
179
|
-
...mapActions({
|
|
180
|
-
getItauData: 'payInvoice/bankItau',
|
|
181
|
-
}),
|
|
182
|
-
|
|
183
|
-
loadItauDataOnFocus() {
|
|
184
|
-
if (this.loadOnFocus) {
|
|
185
|
-
this.getPaymentStatus()
|
|
186
|
-
.then(data => {
|
|
187
|
-
this.loadOnFocus = false;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
getItauHash() {
|
|
193
|
-
let params = {};
|
|
194
|
-
|
|
195
|
-
this.isLoading = true;
|
|
196
|
-
|
|
197
|
-
if (this.myCompany !== null)
|
|
198
|
-
params['myCompany'] = this.myCompany.id;
|
|
199
|
-
|
|
200
|
-
return this.getItauData({
|
|
201
|
-
invoiceId: this.invoiceId,
|
|
202
|
-
operation: 'itauhash',
|
|
203
|
-
params : params
|
|
204
|
-
})
|
|
205
|
-
.then(data => {
|
|
206
|
-
if (data !== null) {
|
|
207
|
-
return this.itauHash = data;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
return null;
|
|
211
|
-
})
|
|
212
|
-
.catch(error => {
|
|
213
|
-
|
|
214
|
-
})
|
|
215
|
-
.finally(() => {
|
|
216
|
-
this.isLoading = false;
|
|
217
|
-
});
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
getPaymentStatus() {
|
|
221
|
-
let params = {};
|
|
222
|
-
|
|
223
|
-
this.isLoading = true;
|
|
224
|
-
|
|
225
|
-
if (this.myCompany !== null)
|
|
226
|
-
params['myCompany'] = this.myCompany.id;
|
|
227
|
-
|
|
228
|
-
return this.getItauData({
|
|
229
|
-
invoiceId: this.invoiceId,
|
|
230
|
-
operation: 'payment',
|
|
231
|
-
params : params
|
|
232
|
-
})
|
|
233
|
-
.then(data => {
|
|
234
|
-
if (data !== null) {
|
|
235
|
-
return this.payment = data;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
return null;
|
|
239
|
-
})
|
|
240
|
-
.catch(error => {
|
|
241
|
-
|
|
242
|
-
})
|
|
243
|
-
.finally(() => {
|
|
244
|
-
this.isLoading = false;
|
|
245
|
-
});
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
};
|
|
1
|
+
<template>
|
|
2
|
+
<div class="row items-center justify-center">
|
|
3
|
+
<div class="flex flex-center" v-if="isLoading">
|
|
4
|
+
<q-circular-progress :indeterminate="isLoading"
|
|
5
|
+
size ="sm"
|
|
6
|
+
color="primary"
|
|
7
|
+
class="q-ma-md"
|
|
8
|
+
/>
|
|
9
|
+
Carregando...
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<!-- BILLET VIEWER -->
|
|
13
|
+
|
|
14
|
+
<div :class="showBillet ? 'full-width q-pa-lg' : 'hidden'">
|
|
15
|
+
<q-form
|
|
16
|
+
ref ="myForm"
|
|
17
|
+
:action="payment !== null ? payment.invoiceUrl : ''"
|
|
18
|
+
method ="post"
|
|
19
|
+
class ="q-mt-sm row justify-center items-center"
|
|
20
|
+
target ="BILLET"
|
|
21
|
+
>
|
|
22
|
+
<input type="hidden" name="DC" :value="itauHash" />
|
|
23
|
+
</q-form>
|
|
24
|
+
|
|
25
|
+
<div style="height: 1200px">
|
|
26
|
+
<iframe name="BILLET" width="100%" height="100%" frameBorder="0">
|
|
27
|
+
<p>This browser does not support IFrame.</p>
|
|
28
|
+
</iframe>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- BILLET GENERATOR TRIGGER -->
|
|
33
|
+
|
|
34
|
+
<div class="col-12 q-pt-lg" v-if="paymentIsPending && billetMustBeCreated">
|
|
35
|
+
<div
|
|
36
|
+
style="min-height: 80vh;"
|
|
37
|
+
class="row justify-center items-center"
|
|
38
|
+
>
|
|
39
|
+
<q-form
|
|
40
|
+
:action="payment ? payment.invoiceUrl : ''"
|
|
41
|
+
method ="post"
|
|
42
|
+
target ="_blank"
|
|
43
|
+
>
|
|
44
|
+
<input type="hidden" name="DC" :value="itauHash" />
|
|
45
|
+
<q-btn
|
|
46
|
+
type ="submit"
|
|
47
|
+
icon ="money"
|
|
48
|
+
size ="lg"
|
|
49
|
+
color ="primary"
|
|
50
|
+
label ="Gerar boleto"
|
|
51
|
+
@click ="loadOnFocus = true"
|
|
52
|
+
:disable="isPaid"
|
|
53
|
+
/>
|
|
54
|
+
</q-form>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<!-- PAID MESSAGE -->
|
|
59
|
+
|
|
60
|
+
<div class="col-12" v-if="payment !== null && isPaid">
|
|
61
|
+
<div
|
|
62
|
+
class="row items-center justify-center"
|
|
63
|
+
style="min-height: 90vh;"
|
|
64
|
+
>
|
|
65
|
+
<q-banner class="text-white bg-positive text-center text-h3" rounded>
|
|
66
|
+
<template v-slot:avatar>
|
|
67
|
+
<q-icon name="thumb_up" color="white" />
|
|
68
|
+
</template>
|
|
69
|
+
O boleto foi pago
|
|
70
|
+
</q-banner>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
import { date, extend } from 'quasar';
|
|
78
|
+
import { mapActions, mapGetters } from 'vuex';
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
props: {
|
|
82
|
+
invoiceId: {
|
|
83
|
+
type : String,
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
86
|
+
orderId : {
|
|
87
|
+
type : String,
|
|
88
|
+
required: true,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
mounted() {
|
|
93
|
+
window.addEventListener ('focus', this.loadItauDataOnFocus);
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
beforeDestroy() {
|
|
97
|
+
window.removeEventListener('focus', this.loadItauDataOnFocus);
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
created() {
|
|
101
|
+
this.getPaymentStatus();
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
data() {
|
|
105
|
+
return {
|
|
106
|
+
isLoading : false,
|
|
107
|
+
payment : null,
|
|
108
|
+
isPaid : false,
|
|
109
|
+
itauHash : null,
|
|
110
|
+
showBillet : false,
|
|
111
|
+
loadOnFocus: false,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
computed: {
|
|
116
|
+
...mapGetters({
|
|
117
|
+
myCompany: 'people/currentCompany',
|
|
118
|
+
}),
|
|
119
|
+
|
|
120
|
+
paymentIsPending() {
|
|
121
|
+
if (this.payment === null)
|
|
122
|
+
return false;
|
|
123
|
+
|
|
124
|
+
return ['waiting payment', 'outdated billing']
|
|
125
|
+
.includes(this.payment.status);
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
billetMustBeCreated() {
|
|
129
|
+
if (this.payment === null)
|
|
130
|
+
return false;
|
|
131
|
+
|
|
132
|
+
return this.payment.paymentType == 'choose_pending';
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
watch: {
|
|
137
|
+
myCompany(company) {
|
|
138
|
+
if (company !== null) {
|
|
139
|
+
this.getPaymentStatus();
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
payment(data) {
|
|
144
|
+
if (!data)
|
|
145
|
+
return;
|
|
146
|
+
|
|
147
|
+
if (data.paymentType == 'choose_pending' || data.paymentStatus == 'no_finished') {
|
|
148
|
+
this.isPaid = false;
|
|
149
|
+
this.getItauHash();
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
if (data.paymentType == 'billet') {
|
|
153
|
+
if (data.paymentStatus == 'paid')
|
|
154
|
+
this.isPaid = true;
|
|
155
|
+
else {
|
|
156
|
+
this.isPaid = false;
|
|
157
|
+
|
|
158
|
+
if (data.paymentStatus == 'created')
|
|
159
|
+
this.getItauHash()
|
|
160
|
+
.then(hash => {
|
|
161
|
+
if (hash !== null)
|
|
162
|
+
this.showBillet = true;
|
|
163
|
+
});
|
|
164
|
+
else
|
|
165
|
+
this.showBillet = false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
showBillet(show) {
|
|
172
|
+
if (show == true) {
|
|
173
|
+
this.$refs.myForm.$el.submit();
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
methods: {
|
|
179
|
+
...mapActions({
|
|
180
|
+
getItauData: 'payInvoice/bankItau',
|
|
181
|
+
}),
|
|
182
|
+
|
|
183
|
+
loadItauDataOnFocus() {
|
|
184
|
+
if (this.loadOnFocus) {
|
|
185
|
+
this.getPaymentStatus()
|
|
186
|
+
.then(data => {
|
|
187
|
+
this.loadOnFocus = false;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
getItauHash() {
|
|
193
|
+
let params = {};
|
|
194
|
+
|
|
195
|
+
this.isLoading = true;
|
|
196
|
+
|
|
197
|
+
if (this.myCompany !== null)
|
|
198
|
+
params['myCompany'] = this.myCompany.id;
|
|
199
|
+
|
|
200
|
+
return this.getItauData({
|
|
201
|
+
invoiceId: this.invoiceId,
|
|
202
|
+
operation: 'itauhash',
|
|
203
|
+
params : params
|
|
204
|
+
})
|
|
205
|
+
.then(data => {
|
|
206
|
+
if (data !== null) {
|
|
207
|
+
return this.itauHash = data;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return null;
|
|
211
|
+
})
|
|
212
|
+
.catch(error => {
|
|
213
|
+
|
|
214
|
+
})
|
|
215
|
+
.finally(() => {
|
|
216
|
+
this.isLoading = false;
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
getPaymentStatus() {
|
|
221
|
+
let params = {};
|
|
222
|
+
|
|
223
|
+
this.isLoading = true;
|
|
224
|
+
|
|
225
|
+
if (this.myCompany !== null)
|
|
226
|
+
params['myCompany'] = this.myCompany.id;
|
|
227
|
+
|
|
228
|
+
return this.getItauData({
|
|
229
|
+
invoiceId: this.invoiceId,
|
|
230
|
+
operation: 'payment',
|
|
231
|
+
params : params
|
|
232
|
+
})
|
|
233
|
+
.then(data => {
|
|
234
|
+
if (data !== null) {
|
|
235
|
+
return this.payment = data;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return null;
|
|
239
|
+
})
|
|
240
|
+
.catch(error => {
|
|
241
|
+
|
|
242
|
+
})
|
|
243
|
+
.finally(() => {
|
|
244
|
+
this.isLoading = false;
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
249
|
</script>
|