hl-core 0.0.9-beta.50 → 0.0.9-beta.51
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/api/base.api.ts +110 -3
- package/components/Form/ManagerAttachment.vue +1 -1
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/FormInput.vue +5 -0
- package/components/Input/RoundedSelect.vue +5 -0
- package/components/Pages/Auth.vue +9 -3
- package/components/Pages/Documents.vue +137 -52
- package/components/Pages/MemberForm.vue +240 -20
- package/components/Pages/ProductConditions.vue +178 -13
- package/components/Panel/PanelHandler.vue +201 -33
- package/composables/classes.ts +23 -0
- package/composables/constants.ts +14 -2
- package/composables/index.ts +21 -15
- package/locales/ru.json +72 -5
- package/package.json +4 -3
- package/store/data.store.ts +279 -33
- package/store/rules.ts +17 -0
- package/types/enum.ts +18 -0
- package/types/index.ts +6 -3
|
@@ -22,8 +22,10 @@
|
|
|
22
22
|
>{{ `Стоимость на страховую сумму ${insuredAmount}:` }} <b>{{ `${price}₸` }}</b></span
|
|
23
23
|
>
|
|
24
24
|
</base-content-block>
|
|
25
|
-
<
|
|
26
|
-
|
|
25
|
+
<div class="flex flex-col gap-3" v-if="hasConditionsAction">
|
|
26
|
+
<base-btn :text="$dataStore.t('confirm.yes')" @click="handleTask" />
|
|
27
|
+
<base-btn :btn="$styles.blueLightBtn" :text="$dataStore.t('confirm.no')" @click="closePanel" />
|
|
28
|
+
</div>
|
|
27
29
|
</div>
|
|
28
30
|
</section>
|
|
29
31
|
<section v-if="chooseSignActions">
|
|
@@ -32,20 +34,65 @@
|
|
|
32
34
|
<base-btn :text="$dataStore.t('buttons.sendElectronically')" :disabled="isElectronicDisabled" :loading="loading" @click="handleSignAction('electronic')" />
|
|
33
35
|
<base-btn :text="$dataStore.t('buttons.generatePrintedForms')" :disabled="isScansDisabled" :loading="loading" @click="handleSignAction('scans')" />
|
|
34
36
|
<base-btn :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
|
|
37
|
+
<base-btn v-if="$dataStore.isPension" text="Подписать Согласие через Egov QrXML" :disabled="isQrXmlDisabled" :loading="loading" @click="handleSignAction('qrXml')" />
|
|
38
|
+
<base-btn v-if="$dataStore.isPension" :text="$dataStore.t('buttons.signWithSignature')" :disabled="consentGiven" :loading="loading" @click="handleSignAction('signature')" />
|
|
35
39
|
</div>
|
|
36
40
|
<div v-if="isPaperContract" :class="[$styles.flexColNav]">
|
|
37
41
|
<base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="generateDocument" />
|
|
38
42
|
</div>
|
|
39
43
|
<div v-if="isScansDocuments" :class="[$styles.flexColNav]">
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
<div v-if="$dataStore.isPension">
|
|
45
|
+
<div v-if="processCode == 1">
|
|
46
|
+
<div v-if="formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson' || formStore.applicationData.statusCode === 'ContractSignedFrom'">
|
|
47
|
+
<base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="$dataStore.generatePDFDocument('PA_Contract', '38')" />
|
|
48
|
+
<base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
|
|
49
|
+
<base-file-input :label="$dataStore.t('labels.attachContract')" @input.prevent="onFileChangeScans($event, 'pa_contract')" @onClear="onClearFile('pa_contract')" />
|
|
50
|
+
</base-form-section>
|
|
51
|
+
</div>
|
|
52
|
+
<div v-else>
|
|
53
|
+
<base-btn :text="$dataStore.t('buttons.downloadStatement')" :loading="$dataStore.isButtonsLoading" @click="$dataStore.generatePDFDocument('PA_Statement', '37')" />
|
|
54
|
+
<base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
|
|
55
|
+
<base-file-input :label="$dataStore.t('labels.attachStatement')" @input.prevent="onFileChangeScans($event, 'pa_statement')" @onClear="onClearFile('pa_statement')" />
|
|
56
|
+
</base-form-section>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div v-if="processCode == 2">
|
|
60
|
+
<base-btn
|
|
61
|
+
:text="$dataStore.t('buttons.downloadPARefundStatement')"
|
|
62
|
+
:loading="$dataStore.isButtonsLoading"
|
|
63
|
+
@click="$dataStore.generatePDFDocument('PA_RefundStatement', '41')"
|
|
64
|
+
/>
|
|
65
|
+
<base-btn
|
|
66
|
+
:text="$dataStore.t('buttons.downloadPARefundAgreement')"
|
|
67
|
+
:loading="$dataStore.isButtonsLoading"
|
|
68
|
+
@click="$dataStore.generatePDFDocument('PA_RefundAgreement', '42')"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
|
|
72
|
+
<base-file-input
|
|
73
|
+
:label="$dataStore.t('buttons.downloadPARefundStatement')"
|
|
74
|
+
@input.prevent="onFileChangeScans($event, 'pa_refundstatement')"
|
|
75
|
+
@onClear="onClearFile('pa_refundstatement')"
|
|
76
|
+
/>
|
|
77
|
+
<base-file-input
|
|
78
|
+
:label="$dataStore.t('buttons.downloadPARefundAgreement')"
|
|
79
|
+
@input.prevent="onFileChangeScans($event, 'pa_refundagreement')"
|
|
80
|
+
@onClear="onClearFile('pa_refundagreement')"
|
|
81
|
+
/>
|
|
82
|
+
</base-form-section>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div v-else>
|
|
86
|
+
<base-btn :text="$dataStore.t('buttons.downloadStatement')" @click="downloadTemplate(constants.documentTypes.statement, 'docx')" />
|
|
87
|
+
<base-btn :text="$dataStore.t('buttons.downloadContract')" @click="downloadTemplate(constants.documentTypes.contract, 'doc')" />
|
|
88
|
+
<base-btn :text="$dataStore.t('buttons.downloadApplication')" @click="downloadTemplate(constants.documentTypes.application1, 'vnd.ms-excel')" />
|
|
89
|
+
<base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
|
|
90
|
+
<base-file-input :label="$dataStore.t('labels.attachStatement')" @input.prevent="onFileChangeScans($event, 'statement')" @onClear="onClearFile('statement')" />
|
|
91
|
+
<base-file-input :label="$dataStore.t('labels.attachContract')" @input.prevent="onFileChangeScans($event, 'contract')" @onClear="onClearFile('contract')" />
|
|
92
|
+
<base-file-input :label="$dataStore.t('labels.attachApplication')" @input.prevent="onFileChangeScans($event, 'app')" @onClear="onClearFile('app')" />
|
|
93
|
+
<base-file-input :label="$dataStore.t('labels.attachPowerOfAttorney')" @input.prevent="onFileChangeScans($event, 'attorney')" @onClear="onClearFile('attorney')" />
|
|
94
|
+
</base-form-section>
|
|
95
|
+
</div>
|
|
49
96
|
<base-btn :text="$dataStore.t('buttons.sign')" :loading="$dataStore.isButtonsLoading" @click="sendFiles" />
|
|
50
97
|
<base-btn :text="$dataStore.t('buttons.cancel')" :btn="$styles.whiteBtn" @click="isScansDocuments = false" />
|
|
51
98
|
</div>
|
|
@@ -66,6 +113,18 @@
|
|
|
66
113
|
<base-btn :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
|
|
67
114
|
<base-btn :text="$dataStore.t('buttons.payOffline')" :loading="loading" @click="handlePayAction('offline')" />
|
|
68
115
|
</div>
|
|
116
|
+
<div v-if="isOfflinePay" :class="[$styles.flexColNav]">
|
|
117
|
+
<base-form-section class="!gap-3 p-3" :title="''">
|
|
118
|
+
<v-form ref="vForm">
|
|
119
|
+
<base-form-input v-model="email" :rules="$rules.required.concat($rules.email)" :label="$dataStore.t('form.email')" />
|
|
120
|
+
</v-form>
|
|
121
|
+
<base-panel-item class="cursor-pointer bg-white border-b-0 rounded" @click="downloadTemplate(constants.documentTypes.invoicePayment, 'pdf')">
|
|
122
|
+
Счет на оплату.pdf
|
|
123
|
+
<i class="mdi mdi-download text-2xl text-[#A0B3D8]"></i
|
|
124
|
+
></base-panel-item>
|
|
125
|
+
</base-form-section>
|
|
126
|
+
<base-btn :text="$dataStore.t('buttons.send')" :loading="$dataStore.isButtonsLoading" @click="sendInvoiceToEmail" />
|
|
127
|
+
</div>
|
|
69
128
|
</section>
|
|
70
129
|
<section v-if="signingActions" class="relative">
|
|
71
130
|
<base-fade-transition>
|
|
@@ -104,6 +163,14 @@
|
|
|
104
163
|
</base-form-section>
|
|
105
164
|
</div>
|
|
106
165
|
</base-fade-transition>
|
|
166
|
+
<base-btn
|
|
167
|
+
:text="$dataStore.t('buttons.cancel')"
|
|
168
|
+
:btn="$styles.whiteBtn"
|
|
169
|
+
@click="
|
|
170
|
+
$dataStore.panelAction = constants.actions.chooseSign;
|
|
171
|
+
isElectronicContract = false;
|
|
172
|
+
"
|
|
173
|
+
/>
|
|
107
174
|
</section>
|
|
108
175
|
<section v-if="payingActions" class="relative">
|
|
109
176
|
<div>
|
|
@@ -189,12 +256,14 @@ export default defineComponent({
|
|
|
189
256
|
const isEpayPay = ref<boolean>(false);
|
|
190
257
|
const isOfflinePay = ref<boolean>(false);
|
|
191
258
|
const isQrDialog = ref<boolean>(false);
|
|
259
|
+
const email = ref<string>('');
|
|
192
260
|
|
|
193
261
|
const vForm = ref<any>();
|
|
194
262
|
const isSendNumberOpen = ref<boolean>(false);
|
|
195
263
|
const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
|
|
196
264
|
const selectedClient = ref<SignUrlType>();
|
|
197
265
|
const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
|
|
266
|
+
const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43')?.signed);
|
|
198
267
|
const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
|
|
199
268
|
const affiliationData = ref<{
|
|
200
269
|
processInstanceId: string | number;
|
|
@@ -209,6 +278,7 @@ export default defineComponent({
|
|
|
209
278
|
const affiliationFormData = ref(new FormData());
|
|
210
279
|
const scansFormData = ref(new FormData());
|
|
211
280
|
const scansFiles = ref<any[]>([]);
|
|
281
|
+
const processCode = formStore.applicationData.processCode;
|
|
212
282
|
|
|
213
283
|
const openSmsPanel = (signInfo: SignUrlType) => {
|
|
214
284
|
if (signInfo) {
|
|
@@ -238,7 +308,10 @@ export default defineComponent({
|
|
|
238
308
|
}
|
|
239
309
|
};
|
|
240
310
|
|
|
241
|
-
const onFileChangeScans = async (
|
|
311
|
+
const onFileChangeScans = async (
|
|
312
|
+
event: InputEvent,
|
|
313
|
+
type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney',
|
|
314
|
+
) => {
|
|
242
315
|
if (event.target) {
|
|
243
316
|
const files = (event.target as HTMLInputElement).files;
|
|
244
317
|
if (files && files.length) {
|
|
@@ -257,20 +330,32 @@ export default defineComponent({
|
|
|
257
330
|
}
|
|
258
331
|
};
|
|
259
332
|
|
|
260
|
-
const onClearFile = async (type: 'statement' | 'contract' | 'app' | 'attorney') => {
|
|
333
|
+
const onClearFile = async (type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney') => {
|
|
261
334
|
const doc = await selectedDocument(type);
|
|
262
335
|
const result = scansFiles.value.filter(i => JSON.parse(i.fileData)[0].fileTypeCode !== doc.code);
|
|
263
336
|
scansFiles.value = result;
|
|
264
337
|
};
|
|
265
338
|
|
|
266
|
-
const selectedDocument = (type: 'statement' | 'contract' | 'app' | 'attorney') => {
|
|
339
|
+
const selectedDocument = (type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney') => {
|
|
267
340
|
let selectedDocument: any;
|
|
268
341
|
if (type === 'statement') {
|
|
269
342
|
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '32');
|
|
270
343
|
}
|
|
344
|
+
if (type === 'pa_statement') {
|
|
345
|
+
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '37');
|
|
346
|
+
}
|
|
347
|
+
if (type === 'pa_refundstatement') {
|
|
348
|
+
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '41');
|
|
349
|
+
}
|
|
271
350
|
if (type === 'contract') {
|
|
272
351
|
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '6');
|
|
273
352
|
}
|
|
353
|
+
if (type === 'pa_contract') {
|
|
354
|
+
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '38');
|
|
355
|
+
}
|
|
356
|
+
if (type === 'pa_refundagreement') {
|
|
357
|
+
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '42');
|
|
358
|
+
}
|
|
274
359
|
if (type === 'app') {
|
|
275
360
|
selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '33');
|
|
276
361
|
}
|
|
@@ -281,7 +366,7 @@ export default defineComponent({
|
|
|
281
366
|
};
|
|
282
367
|
|
|
283
368
|
const sendFiles = async () => {
|
|
284
|
-
if (scansFiles.value.length !== 4) {
|
|
369
|
+
if (dataStore.isPension ? scansFiles.value.length !== 1 : scansFiles.value.length !== 4) {
|
|
285
370
|
dataStore.showToaster('warning', dataStore.t('toaster.notAllDocumentsAttached'));
|
|
286
371
|
return;
|
|
287
372
|
}
|
|
@@ -293,7 +378,7 @@ export default defineComponent({
|
|
|
293
378
|
}
|
|
294
379
|
closePanel();
|
|
295
380
|
dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
|
|
296
|
-
await dataStore.handleTask(constants.actions.signed, route.params.taskId as string, 'scans');
|
|
381
|
+
await dataStore.handleTask(dataStore.isPension ? constants.actions.accept : constants.actions.signed, route.params.taskId as string, 'scans');
|
|
297
382
|
};
|
|
298
383
|
const submitForm = async () => {
|
|
299
384
|
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
@@ -333,7 +418,7 @@ export default defineComponent({
|
|
|
333
418
|
// loading.value = false;
|
|
334
419
|
// return;
|
|
335
420
|
// }
|
|
336
|
-
if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas || dataStore.isUU) {
|
|
421
|
+
if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas || dataStore.isPrePension || dataStore.isUU) {
|
|
337
422
|
emit('task', [dataStore.panelAction, route.params.taskId as string, actionCause.value]);
|
|
338
423
|
} else {
|
|
339
424
|
await dataStore.handleTask(dataStore.panelAction, route.params.taskId as string, actionCause.value);
|
|
@@ -343,10 +428,13 @@ export default defineComponent({
|
|
|
343
428
|
|
|
344
429
|
const onInit = async () => {
|
|
345
430
|
if (dataStore.controls.hasChooseSign) {
|
|
346
|
-
if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isGns) {
|
|
431
|
+
if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isPension || dataStore.isGns) {
|
|
347
432
|
isElectronicContract.value = false;
|
|
348
433
|
}
|
|
349
434
|
}
|
|
435
|
+
if (dataStore.isPension) {
|
|
436
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
437
|
+
}
|
|
350
438
|
};
|
|
351
439
|
|
|
352
440
|
onMounted(async () => {
|
|
@@ -355,6 +443,7 @@ export default defineComponent({
|
|
|
355
443
|
|
|
356
444
|
const buttonText = computed(() => {
|
|
357
445
|
switch (dataStore.panelAction) {
|
|
446
|
+
case constants.actions.cancel:
|
|
358
447
|
case constants.actions.reject:
|
|
359
448
|
case constants.actions.rejectclient:
|
|
360
449
|
return dataStore.t('buttons.rejectStatement');
|
|
@@ -394,7 +483,11 @@ export default defineComponent({
|
|
|
394
483
|
formStore.productConditionsForm.isRecalculated === false,
|
|
395
484
|
);
|
|
396
485
|
const sendingActions = computed(
|
|
397
|
-
() =>
|
|
486
|
+
() =>
|
|
487
|
+
dataStore.panelAction === constants.actions.reject ||
|
|
488
|
+
dataStore.panelAction === constants.actions.cancel ||
|
|
489
|
+
dataStore.panelAction === constants.actions.return ||
|
|
490
|
+
dataStore.panelAction === constants.actions.rejectclient,
|
|
398
491
|
);
|
|
399
492
|
const acceptAction = computed(() => dataStore.panelAction === constants.actions.accept);
|
|
400
493
|
const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
|
|
@@ -414,7 +507,7 @@ export default defineComponent({
|
|
|
414
507
|
const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
|
|
415
508
|
const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
|
|
416
509
|
const hasConditionsInfo = computed(() => {
|
|
417
|
-
if (dataStore.isLifetrip || dataStore.isDas || dataStore.isUU) {
|
|
510
|
+
if (dataStore.isLifetrip || dataStore.isDas || dataStore.isUU || dataStore.isPrePension) {
|
|
418
511
|
return false;
|
|
419
512
|
}
|
|
420
513
|
if (dataStore.isFinCenter()) {
|
|
@@ -422,8 +515,14 @@ export default defineComponent({
|
|
|
422
515
|
}
|
|
423
516
|
return true;
|
|
424
517
|
});
|
|
518
|
+
const hasConditionsAction = computed(() => {
|
|
519
|
+
if (dataStore.isPrePension) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
return true;
|
|
523
|
+
});
|
|
425
524
|
const isPaperDisabled = computed(() => {
|
|
426
|
-
if (dataStore.isGons) {
|
|
525
|
+
if (dataStore.isGons || dataStore.isPension) {
|
|
427
526
|
return false;
|
|
428
527
|
}
|
|
429
528
|
return true;
|
|
@@ -432,25 +531,43 @@ export default defineComponent({
|
|
|
432
531
|
if (dataStore.isGons) {
|
|
433
532
|
return true;
|
|
434
533
|
}
|
|
534
|
+
if (!consentGiven.value && dataStore.isPension) {
|
|
535
|
+
return true;
|
|
536
|
+
}
|
|
435
537
|
return false;
|
|
436
538
|
});
|
|
437
539
|
const isScansDisabled = computed(() => {
|
|
438
540
|
if (dataStore.isGons) {
|
|
439
541
|
return true;
|
|
440
542
|
}
|
|
543
|
+
if (formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson') {
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
546
|
+
if (!consentGiven.value && dataStore.isPension) {
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
441
549
|
return false;
|
|
442
550
|
});
|
|
443
551
|
const isQrDisabled = computed(() => {
|
|
444
|
-
if (
|
|
552
|
+
if (!consentGiven.value && dataStore.isPension) {
|
|
553
|
+
return true;
|
|
554
|
+
}
|
|
555
|
+
if (dataStore.isLifeBusiness || dataStore.isPension || dataStore.isGns) {
|
|
445
556
|
return false;
|
|
446
557
|
}
|
|
447
558
|
return true;
|
|
448
559
|
});
|
|
560
|
+
const isQrXmlDisabled = computed(() => {
|
|
561
|
+
if (consentGiven.value && dataStore.isPension) {
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
return false;
|
|
565
|
+
});
|
|
449
566
|
const downloadTemplate = async (documentType: number, fileType: string) => {
|
|
450
567
|
await dataStore.downloadTemplate(documentType, fileType, formStore.applicationData.processInstanceId);
|
|
451
568
|
};
|
|
452
569
|
|
|
453
|
-
const handleSignAction = async (type: 'paper' | 'electronic' | 'scans' | 'qr') => {
|
|
570
|
+
const handleSignAction = async (type: 'paper' | 'electronic' | 'scans' | 'qr' | 'qrXml' | 'signature') => {
|
|
454
571
|
loading.value = true;
|
|
455
572
|
if (type === 'electronic') {
|
|
456
573
|
await dataStore.signDocument();
|
|
@@ -471,6 +588,17 @@ export default defineComponent({
|
|
|
471
588
|
isQr.value = true;
|
|
472
589
|
}
|
|
473
590
|
}
|
|
591
|
+
if (type === 'qrXml') {
|
|
592
|
+
const result = (await dataStore.signDocument('qrXml')) as any;
|
|
593
|
+
if (result && result.data) {
|
|
594
|
+
const id = result.data;
|
|
595
|
+
await generateQR(id, 'xml');
|
|
596
|
+
isQr.value = true;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (type === 'signature') {
|
|
600
|
+
await dataStore.signDocument('signature');
|
|
601
|
+
}
|
|
474
602
|
loading.value = false;
|
|
475
603
|
};
|
|
476
604
|
|
|
@@ -480,28 +608,32 @@ export default defineComponent({
|
|
|
480
608
|
await payEpay();
|
|
481
609
|
}
|
|
482
610
|
if (type === 'offline') {
|
|
483
|
-
await dataStore.
|
|
484
|
-
|
|
611
|
+
const result = await dataStore.sendTask(route.params.taskId as string, constants.actions.payed, 'offline');
|
|
612
|
+
if (result) {
|
|
613
|
+
isOfflinePay.value = true;
|
|
614
|
+
}
|
|
485
615
|
}
|
|
486
616
|
loading.value = false;
|
|
487
617
|
};
|
|
488
618
|
|
|
489
|
-
const generateQR = async (groupId: string) => {
|
|
619
|
+
const generateQR = async (groupId: string, type: string = 'cms') => {
|
|
620
|
+
const confName = type === 'cms' ? 'qrGenUrl' : 'qrXmlGenUrl';
|
|
490
621
|
const uuidV4 = uuid.v4();
|
|
491
|
-
const
|
|
622
|
+
const linkToCopy = ref<string>(`${getStrValuePerEnv(confName)}/${uuidV4}/${groupId}`);
|
|
623
|
+
const qrValue = `mobileSign:${linkToCopy.value}`;
|
|
492
624
|
qrUrl.value = qrValue;
|
|
493
625
|
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
494
626
|
//для юр лиц
|
|
495
|
-
urlCopy.value = `https://egovbusiness.page.link/?link=${
|
|
627
|
+
urlCopy.value = `https://egovbusiness.page.link/?link=${linkToCopy.value}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
496
628
|
} else {
|
|
497
629
|
//для физ лиц
|
|
498
|
-
urlCopy.value = `https://mgovsign.page.link/?link=${
|
|
630
|
+
urlCopy.value = `https://mgovsign.page.link/?link=${linkToCopy.value}?mgovSign&apn=kz.mobile.mgov&isi=1476128386&ibi=kz.egov.mobile`;
|
|
499
631
|
}
|
|
500
632
|
|
|
501
|
-
await startConnection(uuidV4);
|
|
633
|
+
await startConnection(uuidV4, groupId);
|
|
502
634
|
};
|
|
503
635
|
|
|
504
|
-
const startConnection = async (uuid: string) => {
|
|
636
|
+
const startConnection = async (uuid: string, groupId?: string) => {
|
|
505
637
|
connection.value = new HubConnectionBuilder().withUrl(`https://test-sign.halyklife.kz/qrhub/${uuid}`).withAutomaticReconnect().build();
|
|
506
638
|
try {
|
|
507
639
|
await connection.value.start();
|
|
@@ -509,8 +641,7 @@ export default defineComponent({
|
|
|
509
641
|
connection.value.on('QR', async (message: any) => {
|
|
510
642
|
if (message === 'Opened') {
|
|
511
643
|
isQrLoading.value = true;
|
|
512
|
-
}
|
|
513
|
-
if (message === 'Signed') {
|
|
644
|
+
} else if (message === 'Signed') {
|
|
514
645
|
isQrLoading.value = false;
|
|
515
646
|
dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
|
|
516
647
|
qrUrl.value = '';
|
|
@@ -518,6 +649,28 @@ export default defineComponent({
|
|
|
518
649
|
dataStore.panel.open = false;
|
|
519
650
|
dataStore.panelAction = null;
|
|
520
651
|
await stopConnection();
|
|
652
|
+
} else {
|
|
653
|
+
console.log('message from SignalR', message);
|
|
654
|
+
if (message.signed) {
|
|
655
|
+
isQrLoading.value = false;
|
|
656
|
+
qrUrl.value = '';
|
|
657
|
+
isQr.value = false;
|
|
658
|
+
dataStore.panel.open = false;
|
|
659
|
+
dataStore.panelAction = null;
|
|
660
|
+
if (message.signature) {
|
|
661
|
+
console.log('signature from SignalR', message.signature);
|
|
662
|
+
const data = new FormData();
|
|
663
|
+
data.append('processInstanceId', String(dataStore.formStore.applicationData.processInstanceId));
|
|
664
|
+
data.append('xmlData', message.signature);
|
|
665
|
+
data.append('name', 'PAEnpf_Agreement');
|
|
666
|
+
data.append('format', 'xml');
|
|
667
|
+
data.append('EdsXmlId', groupId ?? '');
|
|
668
|
+
await dataStore.api.uploadXml(data);
|
|
669
|
+
await dataStore.getSignedDocList(dataStore.formStore.applicationData.processInstanceId);
|
|
670
|
+
dataStore.showToaster('success', dataStore.t('pension.consentGiven'), 3000);
|
|
671
|
+
}
|
|
672
|
+
await stopConnection();
|
|
673
|
+
}
|
|
521
674
|
}
|
|
522
675
|
});
|
|
523
676
|
} catch (err) {
|
|
@@ -554,6 +707,15 @@ export default defineComponent({
|
|
|
554
707
|
}
|
|
555
708
|
};
|
|
556
709
|
|
|
710
|
+
const sendInvoiceToEmail = async () => {
|
|
711
|
+
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
712
|
+
if (v.valid) {
|
|
713
|
+
await dataStore.sendInvoiceToEmail(formStore.applicationData.processInstanceId, email.value);
|
|
714
|
+
email.value = '';
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
|
|
557
719
|
const payEpay = async () => {
|
|
558
720
|
const invoiceData = await dataStore.getInvoiceData(formStore.applicationData.processInstanceId);
|
|
559
721
|
if (invoiceData === false || invoiceData.status === 3 || invoiceData.status === 0) {
|
|
@@ -604,7 +766,9 @@ export default defineComponent({
|
|
|
604
766
|
urlCopy,
|
|
605
767
|
isEpayPay,
|
|
606
768
|
isOfflinePay,
|
|
769
|
+
processCode,
|
|
607
770
|
isQrDialog,
|
|
771
|
+
email,
|
|
608
772
|
|
|
609
773
|
// Functions
|
|
610
774
|
closePanel,
|
|
@@ -621,6 +785,8 @@ export default defineComponent({
|
|
|
621
785
|
handlePayAction,
|
|
622
786
|
payEpay,
|
|
623
787
|
convertQr,
|
|
788
|
+
sendInvoiceToEmail,
|
|
789
|
+
hasConditionsAction,
|
|
624
790
|
|
|
625
791
|
// Computed
|
|
626
792
|
buttonText,
|
|
@@ -644,7 +810,9 @@ export default defineComponent({
|
|
|
644
810
|
isElectronicDisabled,
|
|
645
811
|
isScansDisabled,
|
|
646
812
|
isQrDisabled,
|
|
813
|
+
isQrXmlDisabled,
|
|
647
814
|
choosePayActions,
|
|
815
|
+
consentGiven,
|
|
648
816
|
};
|
|
649
817
|
},
|
|
650
818
|
});
|
package/composables/classes.ts
CHANGED
|
@@ -453,6 +453,14 @@ export class Member extends Person {
|
|
|
453
453
|
otpCode: string | null;
|
|
454
454
|
documentsList: ContragentDocuments[];
|
|
455
455
|
isInsuredUnderage?: boolean = false;
|
|
456
|
+
bankInfo: BankInfoClass;
|
|
457
|
+
identityDocument: {
|
|
458
|
+
documentType: Value;
|
|
459
|
+
documentNumber: string | null;
|
|
460
|
+
issuedOn: string | null;
|
|
461
|
+
issuedBy: Value;
|
|
462
|
+
validUntil: string | null;
|
|
463
|
+
};
|
|
456
464
|
constructor(
|
|
457
465
|
id = 0,
|
|
458
466
|
type = 1,
|
|
@@ -585,6 +593,14 @@ export class Member extends Person {
|
|
|
585
593
|
this.gosPersonData = null;
|
|
586
594
|
this.parsedDocument = null;
|
|
587
595
|
this.hasAgreement = null;
|
|
596
|
+
this.bankInfo = new BankInfoClass();
|
|
597
|
+
this.identityDocument = {
|
|
598
|
+
documentType: new Value(),
|
|
599
|
+
documentNumber: null,
|
|
600
|
+
issuedOn: null,
|
|
601
|
+
issuedBy: new Value(),
|
|
602
|
+
validUntil: null,
|
|
603
|
+
};
|
|
588
604
|
}
|
|
589
605
|
|
|
590
606
|
resetMember(clearIinAndPhone: boolean = true) {
|
|
@@ -988,8 +1004,10 @@ export class DataStoreClass {
|
|
|
988
1004
|
documentTypes: Value[];
|
|
989
1005
|
documentIssuers: Value[];
|
|
990
1006
|
familyStatuses: Value[];
|
|
1007
|
+
disabilityGroups: Value[];
|
|
991
1008
|
relations: Value[];
|
|
992
1009
|
banks: Value[];
|
|
1010
|
+
insuranceCompanies: Value[];
|
|
993
1011
|
processTariff: Value[];
|
|
994
1012
|
insurancePay: Value[];
|
|
995
1013
|
questionRefs: Value[];
|
|
@@ -1168,9 +1186,11 @@ export class DataStoreClass {
|
|
|
1168
1186
|
this.documentTypes = [];
|
|
1169
1187
|
this.documentIssuers = [];
|
|
1170
1188
|
this.familyStatuses = [];
|
|
1189
|
+
this.disabilityGroups = [];
|
|
1171
1190
|
this.relations = [];
|
|
1172
1191
|
this.processTariff = [];
|
|
1173
1192
|
this.banks = [];
|
|
1193
|
+
this.insuranceCompanies = [];
|
|
1174
1194
|
this.insurancePay = [];
|
|
1175
1195
|
this.residents = [];
|
|
1176
1196
|
this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
|
|
@@ -1323,11 +1343,14 @@ export class FormStoreClass {
|
|
|
1323
1343
|
regNumber?: string;
|
|
1324
1344
|
statusCode?: keyof typeof Statuses;
|
|
1325
1345
|
clientApp?: any;
|
|
1346
|
+
processCode?: number;
|
|
1326
1347
|
insuredApp?: any;
|
|
1348
|
+
pensionApp?: any;
|
|
1327
1349
|
beneficiaryApp?: any;
|
|
1328
1350
|
beneficialOwnerApp?: any;
|
|
1329
1351
|
spokesmanApp?: any;
|
|
1330
1352
|
isTask?: boolean | null;
|
|
1353
|
+
createDate?: string | null;
|
|
1331
1354
|
policyAppDto?: PolicyAppDto;
|
|
1332
1355
|
insisWorkDataApp?: InsisWorkDataApp;
|
|
1333
1356
|
addCoverDto?: AddCover[];
|
package/composables/constants.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { Actions, PostActions, Roles, Statuses } from '../types/enum';
|
|
|
2
2
|
|
|
3
3
|
export const constants = Object.freeze({
|
|
4
4
|
products: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
pensionannuity: 1,
|
|
6
|
+
pa_refund: 2,
|
|
7
|
+
pa_joint: 4,
|
|
7
8
|
baiterek: 3,
|
|
8
9
|
halykmycar: 5,
|
|
9
10
|
lifetrip: 7,
|
|
@@ -15,6 +16,7 @@ export const constants = Object.freeze({
|
|
|
15
16
|
lifebusiness: 14,
|
|
16
17
|
amuletlife: 15,
|
|
17
18
|
gns: 16,
|
|
19
|
+
prepensionannuity: 18,
|
|
18
20
|
},
|
|
19
21
|
amlProducts: {
|
|
20
22
|
checkcontragent: 1,
|
|
@@ -37,6 +39,10 @@ export const constants = Object.freeze({
|
|
|
37
39
|
Statuses.WaitingInsurancePremiumForm,
|
|
38
40
|
Statuses.UnderwriterForm,
|
|
39
41
|
Statuses.ApproveForm,
|
|
42
|
+
Statuses.ActuaryForm,
|
|
43
|
+
Statuses.ControllerDpForm,
|
|
44
|
+
Statuses.DsoUsnsForm,
|
|
45
|
+
Statuses.AccountantForm,
|
|
40
46
|
],
|
|
41
47
|
cancelApplicationStatuses: [
|
|
42
48
|
Statuses.StartForm,
|
|
@@ -46,7 +52,13 @@ export const constants = Object.freeze({
|
|
|
46
52
|
Statuses.DocumentsSignedFrom,
|
|
47
53
|
Statuses.DocumentsSignedClientFrom,
|
|
48
54
|
Statuses.ContractSignedFrom,
|
|
55
|
+
Statuses.AttachAppContractForm,
|
|
56
|
+
Statuses.PreparationDossierForm,
|
|
57
|
+
Statuses.DsoUsnsForm,
|
|
58
|
+
Statuses.AccountantForm,
|
|
59
|
+
Statuses.ContractSignedByAuthorizedPerson,
|
|
49
60
|
],
|
|
61
|
+
rejectApplicationStatuses: [Statuses.StartForm, Statuses.AttachAppContractForm],
|
|
50
62
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
51
63
|
roles: Roles,
|
|
52
64
|
actions: Actions,
|
package/composables/index.ts
CHANGED
|
@@ -5,17 +5,6 @@ import { AxiosError } from 'axios';
|
|
|
5
5
|
import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
|
|
6
6
|
import { PolicyholderClass } from '../composables/classes';
|
|
7
7
|
|
|
8
|
-
export const getBaseCredentials = () => {
|
|
9
|
-
return {
|
|
10
|
-
production: { login: '', password: '' },
|
|
11
|
-
test: { login: '', password: '' },
|
|
12
|
-
development: {
|
|
13
|
-
login: import.meta.env.VITE_PRODUCT === 'auletti' ? '790101401056' : 'manager',
|
|
14
|
-
password: import.meta.env.VITE_PRODUCT === 'auletti' ? 'halyklife' : 'asdqwe123',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
8
|
export const useEnv = () => {
|
|
20
9
|
return {
|
|
21
10
|
envMode: import.meta.env.VITE_MODE,
|
|
@@ -66,6 +55,18 @@ export const formatDate = (date: string) => {
|
|
|
66
55
|
}
|
|
67
56
|
};
|
|
68
57
|
|
|
58
|
+
export const formatToPlanDate = (date: string) => {
|
|
59
|
+
if (date) {
|
|
60
|
+
const data = date.split('.');
|
|
61
|
+
const day = data[0];
|
|
62
|
+
const month = data[1];
|
|
63
|
+
const year = data[2];
|
|
64
|
+
return `${year}-${month}-${day}`;
|
|
65
|
+
} else {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
69
70
|
export const reformatDate = (date: string) => {
|
|
70
71
|
if (date) {
|
|
71
72
|
const data = new Date(date);
|
|
@@ -335,7 +336,7 @@ export const getLastDayOfMonth = (year: number, month: number) => {
|
|
|
335
336
|
return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
336
337
|
};
|
|
337
338
|
|
|
338
|
-
type WhichValuePerEnv = 'qrGenUrl' | 'gatewayApiUrl' | 'gatewayApiUrlLocal' | 'baseApi' | 'baseApiLocal' | 'efoBaseApi' | 'efoBaseApiLocal' | 'amlBaseApi' | 'amlBaseApiLocal';
|
|
339
|
+
type WhichValuePerEnv = 'qrGenUrl' | 'qrXmlGenUrl' | 'gatewayApiUrl' | 'gatewayApiUrlLocal' | 'baseApi' | 'baseApiLocal' | 'efoBaseApi' | 'efoBaseApiLocal' | 'amlBaseApi' | 'amlBaseApiLocal';
|
|
339
340
|
|
|
340
341
|
export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
|
|
341
342
|
const valuesPerEnv: {
|
|
@@ -344,9 +345,14 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
|
|
|
344
345
|
};
|
|
345
346
|
} = {
|
|
346
347
|
qrGenUrl: {
|
|
347
|
-
production: '
|
|
348
|
-
development: '
|
|
349
|
-
test: '
|
|
348
|
+
production: 'https://prod-sign.halyklife.kz/EgovQrCms',
|
|
349
|
+
development: 'https://test-sign.halyklife.kz/EgovQrCms',
|
|
350
|
+
test: 'https://test-sign.halyklife.kz/EgovQrCms',
|
|
351
|
+
},
|
|
352
|
+
qrXmlGenUrl: {
|
|
353
|
+
production: 'https://prod-sign.halyklife.kz/EgovQrXml',
|
|
354
|
+
development: 'https://test-sign.halyklife.kz/EgovQrXml',
|
|
355
|
+
test: 'https://test-sign.halyklife.kz/EgovQrXml',
|
|
350
356
|
},
|
|
351
357
|
gatewayApiUrl: {
|
|
352
358
|
production: 'https://products.halyklife.kz/gateway',
|