hl-core 0.0.9-beta.50 → 0.0.9-beta.52

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.
@@ -22,8 +22,10 @@
22
22
  >{{ `Стоимость на страховую сумму ${insuredAmount}:` }} <b>{{ `${price}₸` }}</b></span
23
23
  >
24
24
  </base-content-block>
25
- <base-btn :text="$dataStore.t('confirm.yes')" @click="handleTask" />
26
- <base-btn :btn="$styles.blueLightBtn" :text="$dataStore.t('confirm.no')" @click="closePanel" />
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,71 @@
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="$dataStore.t('buttons.signWithSignature')" :loading="loading" @click="handleSignAction('signature')" />
38
+ <base-btn
39
+ v-if="$dataStore.isPension"
40
+ :text="$dataStore.t('buttons.signWithSignatureXML')"
41
+ :disabled="isQrXmlDisabled"
42
+ :loading="loading"
43
+ @click="handleSignAction('qrXml')"
44
+ />
35
45
  </div>
36
46
  <div v-if="isPaperContract" :class="[$styles.flexColNav]">
37
47
  <base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="generateDocument" />
38
48
  </div>
39
49
  <div v-if="isScansDocuments" :class="[$styles.flexColNav]">
40
- <base-btn :text="$dataStore.t('buttons.downloadStatement')" @click="downloadTemplate(constants.documentTypes.statement, 'docx')" />
41
- <base-btn :text="$dataStore.t('buttons.downloadContract')" @click="downloadTemplate(constants.documentTypes.contract, 'doc')" />
42
- <base-btn :text="$dataStore.t('buttons.downloadApplication')" @click="downloadTemplate(constants.documentTypes.application1, 'vnd.ms-excel')" />
43
- <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
44
- <base-file-input :label="$dataStore.t('labels.attachStatement')" @input.prevent="onFileChangeScans($event, 'statement')" @onClear="onClearFile('statement')" />
45
- <base-file-input :label="$dataStore.t('labels.attachContract')" @input.prevent="onFileChangeScans($event, 'contract')" @onClear="onClearFile('contract')" />
46
- <base-file-input :label="$dataStore.t('labels.attachApplication')" @input.prevent="onFileChangeScans($event, 'app')" @onClear="onClearFile('app')" />
47
- <base-file-input :label="$dataStore.t('labels.attachPowerOfAttorney')" @input.prevent="onFileChangeScans($event, 'attorney')" @onClear="onClearFile('attorney')" />
48
- </base-form-section>
50
+ <div v-if="$dataStore.isPension">
51
+ <div v-if="processCode == 1">
52
+ <div v-if="formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson' || formStore.applicationData.statusCode === 'ContractSignedFrom'">
53
+ <base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="$dataStore.generatePDFDocument('PA_Contract', '38')" />
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.attachContract')" @input.prevent="onFileChangeScans($event, 'pa_contract')" @onClear="onClearFile('pa_contract')" />
56
+ </base-form-section>
57
+ </div>
58
+ <div v-else>
59
+ <base-btn :text="$dataStore.t('buttons.downloadStatement')" :loading="$dataStore.isButtonsLoading" @click="$dataStore.generatePDFDocument('PA_Statement', '37')" />
60
+ <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
61
+ <base-file-input :label="$dataStore.t('labels.attachStatement')" @input.prevent="onFileChangeScans($event, 'pa_statement')" @onClear="onClearFile('pa_statement')" />
62
+ </base-form-section>
63
+ </div>
64
+ </div>
65
+ <div v-if="processCode == 2">
66
+ <base-btn
67
+ :text="$dataStore.t('buttons.downloadPARefundStatement')"
68
+ :loading="$dataStore.isButtonsLoading"
69
+ @click="$dataStore.generatePDFDocument('PA_RefundStatement', '41')"
70
+ />
71
+ <base-btn
72
+ :text="$dataStore.t('buttons.downloadPARefundAgreement')"
73
+ :loading="$dataStore.isButtonsLoading"
74
+ @click="$dataStore.generatePDFDocument('PA_RefundAgreement', '42')"
75
+ />
76
+
77
+ <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
78
+ <base-file-input
79
+ :label="$dataStore.t('buttons.downloadPARefundStatement')"
80
+ @input.prevent="onFileChangeScans($event, 'pa_refundstatement')"
81
+ @onClear="onClearFile('pa_refundstatement')"
82
+ />
83
+ <base-file-input
84
+ :label="$dataStore.t('buttons.downloadPARefundAgreement')"
85
+ @input.prevent="onFileChangeScans($event, 'pa_refundagreement')"
86
+ @onClear="onClearFile('pa_refundagreement')"
87
+ />
88
+ </base-form-section>
89
+ </div>
90
+ </div>
91
+ <div v-else>
92
+ <base-btn :text="$dataStore.t('buttons.downloadStatement')" @click="downloadTemplate(constants.documentTypes.statement, 'docx')" />
93
+ <base-btn :text="$dataStore.t('buttons.downloadContract')" @click="downloadTemplate(constants.documentTypes.contract, 'doc')" />
94
+ <base-btn :text="$dataStore.t('buttons.downloadApplication')" @click="downloadTemplate(constants.documentTypes.application1, 'vnd.ms-excel')" />
95
+ <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
96
+ <base-file-input :label="$dataStore.t('labels.attachStatement')" @input.prevent="onFileChangeScans($event, 'statement')" @onClear="onClearFile('statement')" />
97
+ <base-file-input :label="$dataStore.t('labels.attachContract')" @input.prevent="onFileChangeScans($event, 'contract')" @onClear="onClearFile('contract')" />
98
+ <base-file-input :label="$dataStore.t('labels.attachApplication')" @input.prevent="onFileChangeScans($event, 'app')" @onClear="onClearFile('app')" />
99
+ <base-file-input :label="$dataStore.t('labels.attachPowerOfAttorney')" @input.prevent="onFileChangeScans($event, 'attorney')" @onClear="onClearFile('attorney')" />
100
+ </base-form-section>
101
+ </div>
49
102
  <base-btn :text="$dataStore.t('buttons.sign')" :loading="$dataStore.isButtonsLoading" @click="sendFiles" />
50
103
  <base-btn :text="$dataStore.t('buttons.cancel')" :btn="$styles.whiteBtn" @click="isScansDocuments = false" />
51
104
  </div>
@@ -66,6 +119,18 @@
66
119
  <base-btn :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
67
120
  <base-btn :text="$dataStore.t('buttons.payOffline')" :loading="loading" @click="handlePayAction('offline')" />
68
121
  </div>
122
+ <div v-if="isOfflinePay" :class="[$styles.flexColNav]">
123
+ <base-form-section class="!gap-3 p-3" :title="''">
124
+ <v-form ref="vForm">
125
+ <base-form-input v-model="email" :rules="$rules.required.concat($rules.email)" :label="$dataStore.t('form.email')" />
126
+ </v-form>
127
+ <base-panel-item class="cursor-pointer bg-white border-b-0 rounded" @click="downloadTemplate(constants.documentTypes.invoicePayment, 'pdf')">
128
+ Счет на оплату.pdf
129
+ <i class="mdi mdi-download text-2xl text-[#A0B3D8]"></i
130
+ ></base-panel-item>
131
+ </base-form-section>
132
+ <base-btn :text="$dataStore.t('buttons.send')" :loading="$dataStore.isButtonsLoading" @click="sendInvoiceToEmail" />
133
+ </div>
69
134
  </section>
70
135
  <section v-if="signingActions" class="relative">
71
136
  <base-fade-transition>
@@ -104,6 +169,14 @@
104
169
  </base-form-section>
105
170
  </div>
106
171
  </base-fade-transition>
172
+ <base-btn
173
+ :text="$dataStore.t('buttons.cancel')"
174
+ :btn="$styles.whiteBtn"
175
+ @click="
176
+ $dataStore.panelAction = constants.actions.chooseSign;
177
+ isElectronicContract = false;
178
+ "
179
+ />
107
180
  </section>
108
181
  <section v-if="payingActions" class="relative">
109
182
  <div>
@@ -189,12 +262,22 @@ export default defineComponent({
189
262
  const isEpayPay = ref<boolean>(false);
190
263
  const isOfflinePay = ref<boolean>(false);
191
264
  const isQrDialog = ref<boolean>(false);
265
+ const email = ref<string>('');
192
266
 
193
267
  const vForm = ref<any>();
194
268
  const isSendNumberOpen = ref<boolean>(false);
195
269
  const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
196
270
  const selectedClient = ref<SignUrlType>();
197
271
  const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
272
+ const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
273
+ const needsAgreement = computed(
274
+ () =>
275
+ formStore.applicationData.statusCode === 'ContractSignedFrom' &&
276
+ ((pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount !== 0) ||
277
+ (pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount !== 0) ||
278
+ (pensionForm.voluntaryContractAmount && pensionForm.voluntaryContractAmount !== 0)),
279
+ );
280
+ const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43')?.signed && needsAgreement.value);
198
281
  const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
199
282
  const affiliationData = ref<{
200
283
  processInstanceId: string | number;
@@ -209,6 +292,7 @@ export default defineComponent({
209
292
  const affiliationFormData = ref(new FormData());
210
293
  const scansFormData = ref(new FormData());
211
294
  const scansFiles = ref<any[]>([]);
295
+ const processCode = formStore.applicationData.processCode;
212
296
 
213
297
  const openSmsPanel = (signInfo: SignUrlType) => {
214
298
  if (signInfo) {
@@ -238,7 +322,10 @@ export default defineComponent({
238
322
  }
239
323
  };
240
324
 
241
- const onFileChangeScans = async (event: InputEvent, type: 'statement' | 'contract' | 'app' | 'attorney') => {
325
+ const onFileChangeScans = async (
326
+ event: InputEvent,
327
+ type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney',
328
+ ) => {
242
329
  if (event.target) {
243
330
  const files = (event.target as HTMLInputElement).files;
244
331
  if (files && files.length) {
@@ -257,20 +344,32 @@ export default defineComponent({
257
344
  }
258
345
  };
259
346
 
260
- const onClearFile = async (type: 'statement' | 'contract' | 'app' | 'attorney') => {
347
+ const onClearFile = async (type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney') => {
261
348
  const doc = await selectedDocument(type);
262
349
  const result = scansFiles.value.filter(i => JSON.parse(i.fileData)[0].fileTypeCode !== doc.code);
263
350
  scansFiles.value = result;
264
351
  };
265
352
 
266
- const selectedDocument = (type: 'statement' | 'contract' | 'app' | 'attorney') => {
353
+ const selectedDocument = (type: 'statement' | 'pa_statement' | 'pa_refundstatement' | 'contract' | 'pa_contract' | 'pa_refundagreement' | 'app' | 'attorney') => {
267
354
  let selectedDocument: any;
268
355
  if (type === 'statement') {
269
356
  selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '32');
270
357
  }
358
+ if (type === 'pa_statement') {
359
+ selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '37');
360
+ }
361
+ if (type === 'pa_refundstatement') {
362
+ selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '41');
363
+ }
271
364
  if (type === 'contract') {
272
365
  selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '6');
273
366
  }
367
+ if (type === 'pa_contract') {
368
+ selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '38');
369
+ }
370
+ if (type === 'pa_refundagreement') {
371
+ selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '42');
372
+ }
274
373
  if (type === 'app') {
275
374
  selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '33');
276
375
  }
@@ -281,7 +380,7 @@ export default defineComponent({
281
380
  };
282
381
 
283
382
  const sendFiles = async () => {
284
- if (scansFiles.value.length !== 4) {
383
+ if (dataStore.isPension ? scansFiles.value.length !== 1 : scansFiles.value.length !== 4) {
285
384
  dataStore.showToaster('warning', dataStore.t('toaster.notAllDocumentsAttached'));
286
385
  return;
287
386
  }
@@ -293,7 +392,7 @@ export default defineComponent({
293
392
  }
294
393
  closePanel();
295
394
  dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
296
- await dataStore.handleTask(constants.actions.signed, route.params.taskId as string, 'scans');
395
+ await dataStore.handleTask(dataStore.isPension ? constants.actions.accept : constants.actions.signed, route.params.taskId as string, 'scans');
297
396
  };
298
397
  const submitForm = async () => {
299
398
  await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
@@ -333,7 +432,7 @@ export default defineComponent({
333
432
  // loading.value = false;
334
433
  // return;
335
434
  // }
336
- if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas || dataStore.isUU) {
435
+ if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas || dataStore.isPrePension || dataStore.isUU) {
337
436
  emit('task', [dataStore.panelAction, route.params.taskId as string, actionCause.value]);
338
437
  } else {
339
438
  await dataStore.handleTask(dataStore.panelAction, route.params.taskId as string, actionCause.value);
@@ -343,10 +442,13 @@ export default defineComponent({
343
442
 
344
443
  const onInit = async () => {
345
444
  if (dataStore.controls.hasChooseSign) {
346
- if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isGns) {
445
+ if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isPension || dataStore.isGns) {
347
446
  isElectronicContract.value = false;
348
447
  }
349
448
  }
449
+ if (dataStore.isPension) {
450
+ await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
451
+ }
350
452
  };
351
453
 
352
454
  onMounted(async () => {
@@ -355,6 +457,7 @@ export default defineComponent({
355
457
 
356
458
  const buttonText = computed(() => {
357
459
  switch (dataStore.panelAction) {
460
+ case constants.actions.cancel:
358
461
  case constants.actions.reject:
359
462
  case constants.actions.rejectclient:
360
463
  return dataStore.t('buttons.rejectStatement');
@@ -394,7 +497,11 @@ export default defineComponent({
394
497
  formStore.productConditionsForm.isRecalculated === false,
395
498
  );
396
499
  const sendingActions = computed(
397
- () => dataStore.panelAction === constants.actions.reject || dataStore.panelAction === constants.actions.return || dataStore.panelAction === constants.actions.rejectclient,
500
+ () =>
501
+ dataStore.panelAction === constants.actions.reject ||
502
+ dataStore.panelAction === constants.actions.cancel ||
503
+ dataStore.panelAction === constants.actions.return ||
504
+ dataStore.panelAction === constants.actions.rejectclient,
398
505
  );
399
506
  const acceptAction = computed(() => dataStore.panelAction === constants.actions.accept);
400
507
  const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
@@ -414,7 +521,7 @@ export default defineComponent({
414
521
  const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
415
522
  const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
416
523
  const hasConditionsInfo = computed(() => {
417
- if (dataStore.isLifetrip || dataStore.isDas || dataStore.isUU) {
524
+ if (dataStore.isLifetrip || dataStore.isDas || dataStore.isUU || dataStore.isPrePension) {
418
525
  return false;
419
526
  }
420
527
  if (dataStore.isFinCenter()) {
@@ -422,6 +529,12 @@ export default defineComponent({
422
529
  }
423
530
  return true;
424
531
  });
532
+ const hasConditionsAction = computed(() => {
533
+ if (dataStore.isPrePension) {
534
+ return false;
535
+ }
536
+ return true;
537
+ });
425
538
  const isPaperDisabled = computed(() => {
426
539
  if (dataStore.isGons) {
427
540
  return false;
@@ -432,25 +545,49 @@ export default defineComponent({
432
545
  if (dataStore.isGons) {
433
546
  return true;
434
547
  }
548
+ if (formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson') {
549
+ return true;
550
+ }
551
+ if (needsAgreement.value) {
552
+ if (!consentGiven.value && dataStore.isPension) {
553
+ return true;
554
+ }
555
+ }
435
556
  return false;
436
557
  });
437
558
  const isScansDisabled = computed(() => {
438
559
  if (dataStore.isGons) {
439
560
  return true;
440
561
  }
562
+ if (needsAgreement.value) {
563
+ if (!consentGiven.value && dataStore.isPension && formStore.applicationData.statusCode !== 'ContractSignedFrom') {
564
+ return true;
565
+ }
566
+ }
441
567
  return false;
442
568
  });
443
569
  const isQrDisabled = computed(() => {
570
+ if (needsAgreement.value) {
571
+ if (!consentGiven.value && dataStore.isPension) {
572
+ return true;
573
+ }
574
+ }
444
575
  if (dataStore.isLifeBusiness || dataStore.isGns) {
445
576
  return false;
446
577
  }
447
578
  return true;
448
579
  });
580
+ const isQrXmlDisabled = computed(() => {
581
+ if (consentGiven.value && needsAgreement.value) {
582
+ return false;
583
+ }
584
+ return true;
585
+ });
449
586
  const downloadTemplate = async (documentType: number, fileType: string) => {
450
587
  await dataStore.downloadTemplate(documentType, fileType, formStore.applicationData.processInstanceId);
451
588
  };
452
589
 
453
- const handleSignAction = async (type: 'paper' | 'electronic' | 'scans' | 'qr') => {
590
+ const handleSignAction = async (type: 'paper' | 'electronic' | 'scans' | 'qr' | 'qrXml' | 'signature') => {
454
591
  loading.value = true;
455
592
  if (type === 'electronic') {
456
593
  await dataStore.signDocument();
@@ -471,6 +608,17 @@ export default defineComponent({
471
608
  isQr.value = true;
472
609
  }
473
610
  }
611
+ if (type === 'qrXml') {
612
+ const result = (await dataStore.signDocument('qrXml')) as any;
613
+ if (result && result.data) {
614
+ const id = result.data;
615
+ await generateQR(id, 'xml');
616
+ isQr.value = true;
617
+ }
618
+ }
619
+ if (type === 'signature') {
620
+ await dataStore.signDocument('signature');
621
+ }
474
622
  loading.value = false;
475
623
  };
476
624
 
@@ -480,28 +628,32 @@ export default defineComponent({
480
628
  await payEpay();
481
629
  }
482
630
  if (type === 'offline') {
483
- await dataStore.handleTask(constants.actions.payed, route.params.taskId as string, 'offline');
484
- isOfflinePay.value = true;
631
+ const result = await dataStore.sendTask(route.params.taskId as string, constants.actions.payed, 'offline');
632
+ if (result) {
633
+ isOfflinePay.value = true;
634
+ }
485
635
  }
486
636
  loading.value = false;
487
637
  };
488
638
 
489
- const generateQR = async (groupId: string) => {
639
+ const generateQR = async (groupId: string, type: string = 'cms') => {
640
+ const confName = type === 'cms' ? 'qrGenUrl' : 'qrXmlGenUrl';
490
641
  const uuidV4 = uuid.v4();
491
- const qrValue = `${getStrValuePerEnv('qrGenUrl')}/${uuidV4}/${groupId}`;
642
+ const linkToCopy = ref<string>(`${getStrValuePerEnv(confName)}/${uuidV4}/${groupId}`);
643
+ const qrValue = `mobileSign:${linkToCopy.value}`;
492
644
  qrUrl.value = qrValue;
493
645
  if (dataStore.isLifeBusiness || dataStore.isGns) {
494
646
  //для юр лиц
495
- urlCopy.value = `https://egovbusiness.page.link/?link=${qrValue}?mgovSign&amp;apn=kz.mobile.mgov.business&amp;isi=1597880144&amp;ibi=kz.mobile.mgov.business`;
647
+ urlCopy.value = `https://egovbusiness.page.link/?link=${linkToCopy.value}?mgovSign&amp;apn=kz.mobile.mgov.business&amp;isi=1597880144&amp;ibi=kz.mobile.mgov.business`;
496
648
  } else {
497
649
  //для физ лиц
498
- urlCopy.value = `https://mgovsign.page.link/?link=${qrValue}?mgovSign&amp;apn=kz.mobile.mgov&amp;isi=1476128386&amp;ibi=kz.egov.mobile`;
650
+ urlCopy.value = `https://mgovsign.page.link/?link=${linkToCopy.value}?mgovSign&amp;apn=kz.mobile.mgov&amp;isi=1476128386&amp;ibi=kz.egov.mobile`;
499
651
  }
500
652
 
501
- await startConnection(uuidV4);
653
+ await startConnection(uuidV4, groupId);
502
654
  };
503
655
 
504
- const startConnection = async (uuid: string) => {
656
+ const startConnection = async (uuid: string, groupId?: string) => {
505
657
  connection.value = new HubConnectionBuilder().withUrl(`https://test-sign.halyklife.kz/qrhub/${uuid}`).withAutomaticReconnect().build();
506
658
  try {
507
659
  await connection.value.start();
@@ -509,8 +661,7 @@ export default defineComponent({
509
661
  connection.value.on('QR', async (message: any) => {
510
662
  if (message === 'Opened') {
511
663
  isQrLoading.value = true;
512
- }
513
- if (message === 'Signed') {
664
+ } else if (message === 'Signed') {
514
665
  isQrLoading.value = false;
515
666
  dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
516
667
  qrUrl.value = '';
@@ -518,6 +669,28 @@ export default defineComponent({
518
669
  dataStore.panel.open = false;
519
670
  dataStore.panelAction = null;
520
671
  await stopConnection();
672
+ } else {
673
+ console.log('message from SignalR', message);
674
+ if (message.signed) {
675
+ isQrLoading.value = false;
676
+ qrUrl.value = '';
677
+ isQr.value = false;
678
+ dataStore.panel.open = false;
679
+ dataStore.panelAction = null;
680
+ if (message.signature) {
681
+ console.log('signature from SignalR', message.signature);
682
+ const data = new FormData();
683
+ data.append('processInstanceId', String(dataStore.formStore.applicationData.processInstanceId));
684
+ data.append('xmlData', message.signature);
685
+ data.append('name', 'PAEnpf_Agreement');
686
+ data.append('format', 'xml');
687
+ data.append('EdsXmlId', groupId ?? '');
688
+ await dataStore.api.uploadXml(data);
689
+ await dataStore.getSignedDocList(dataStore.formStore.applicationData.processInstanceId);
690
+ dataStore.showToaster('success', dataStore.t('pension.consentGiven'), 3000);
691
+ }
692
+ await stopConnection();
693
+ }
521
694
  }
522
695
  });
523
696
  } catch (err) {
@@ -554,6 +727,15 @@ export default defineComponent({
554
727
  }
555
728
  };
556
729
 
730
+ const sendInvoiceToEmail = async () => {
731
+ await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
732
+ if (v.valid) {
733
+ await dataStore.sendInvoiceToEmail(formStore.applicationData.processInstanceId, email.value);
734
+ email.value = '';
735
+ }
736
+ });
737
+ };
738
+
557
739
  const payEpay = async () => {
558
740
  const invoiceData = await dataStore.getInvoiceData(formStore.applicationData.processInstanceId);
559
741
  if (invoiceData === false || invoiceData.status === 3 || invoiceData.status === 0) {
@@ -604,7 +786,9 @@ export default defineComponent({
604
786
  urlCopy,
605
787
  isEpayPay,
606
788
  isOfflinePay,
789
+ processCode,
607
790
  isQrDialog,
791
+ email,
608
792
 
609
793
  // Functions
610
794
  closePanel,
@@ -621,6 +805,8 @@ export default defineComponent({
621
805
  handlePayAction,
622
806
  payEpay,
623
807
  convertQr,
808
+ sendInvoiceToEmail,
809
+ hasConditionsAction,
624
810
 
625
811
  // Computed
626
812
  buttonText,
@@ -644,7 +830,10 @@ export default defineComponent({
644
830
  isElectronicDisabled,
645
831
  isScansDisabled,
646
832
  isQrDisabled,
833
+ isQrXmlDisabled,
647
834
  choosePayActions,
835
+ consentGiven,
836
+ needsAgreement,
648
837
  };
649
838
  },
650
839
  });
@@ -438,7 +438,7 @@ export class Member extends Person {
438
438
  familyStatus: Value;
439
439
  isTerror: null;
440
440
  relationDegree: Value;
441
- isDisability: Value;
441
+ isDisability: boolean;
442
442
  disabilityGroup: Value | null;
443
443
  percentageOfPayoutAmount: string | number | null;
444
444
  _cyrPattern: RegExp;
@@ -453,6 +453,15 @@ export class Member extends Person {
453
453
  otpCode: string | null;
454
454
  documentsList: ContragentDocuments[];
455
455
  isInsuredUnderage?: boolean = false;
456
+ bankInfo: BankInfoClass;
457
+ transferContractCompany: Value;
458
+ identityDocument: {
459
+ documentType: Value;
460
+ documentNumber: string | null;
461
+ issuedOn: string | null;
462
+ issuedBy: Value;
463
+ validUntil: string | null;
464
+ };
456
465
  constructor(
457
466
  id = 0,
458
467
  type = 1,
@@ -499,7 +508,7 @@ export class Member extends Person {
499
508
  address = null,
500
509
  familyStatus = new Value(),
501
510
  relationDegree = new Value(),
502
- isDisability = new Value(),
511
+ isDisability = false,
503
512
  disabilityGroupId = new Value(),
504
513
  percentageOfPayoutAmount = null,
505
514
  migrationCard = null,
@@ -585,6 +594,15 @@ export class Member extends Person {
585
594
  this.gosPersonData = null;
586
595
  this.parsedDocument = null;
587
596
  this.hasAgreement = null;
597
+ this.bankInfo = new BankInfoClass();
598
+ this.transferContractCompany = new Value();
599
+ this.identityDocument = {
600
+ documentType: new Value(),
601
+ documentNumber: null,
602
+ issuedOn: null,
603
+ issuedBy: new Value(),
604
+ validUntil: null,
605
+ };
588
606
  }
589
607
 
590
608
  resetMember(clearIinAndPhone: boolean = true) {
@@ -622,7 +640,7 @@ export class Member extends Person {
622
640
  this.familyStatus = new Value();
623
641
  this.isTerror = null;
624
642
  this.relationDegree = new Value();
625
- this.isDisability = new Value();
643
+ this.isDisability = false;
626
644
  this.disabilityGroup = null;
627
645
  this.percentageOfPayoutAmount = null;
628
646
  this.gotFromInsis = true;
@@ -721,6 +739,7 @@ export class ProductConditions {
721
739
  annualIncome: string | null;
722
740
  processIndexRate: Value;
723
741
  processGfot: Value;
742
+ transferContractCompany: Value;
724
743
  requestedSumInsured: number | string | null;
725
744
  requestedSumInsuredInDollar: number | string | null;
726
745
  insurancePremiumPerMonth: number | string | null;
@@ -768,6 +787,7 @@ export class ProductConditions {
768
787
  annualIncome = null,
769
788
  processIndexRate = new Value(),
770
789
  processGfot = new Value(),
790
+ transferContractCompany = new Value(),
771
791
  requestedSumInsured = null,
772
792
  insurancePremiumPerMonth = null,
773
793
  establishingGroupDisabilityFromThirdYear = null,
@@ -817,6 +837,7 @@ export class ProductConditions {
817
837
  this.annualIncome = annualIncome;
818
838
  this.processIndexRate = processIndexRate;
819
839
  this.processGfot = processGfot;
840
+ this.transferContractCompany = transferContractCompany;
820
841
  this.requestedSumInsured = requestedSumInsured;
821
842
  this.insurancePremiumPerMonth = insurancePremiumPerMonth;
822
843
  this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
@@ -988,8 +1009,10 @@ export class DataStoreClass {
988
1009
  documentTypes: Value[];
989
1010
  documentIssuers: Value[];
990
1011
  familyStatuses: Value[];
1012
+ disabilityGroups: Value[];
991
1013
  relations: Value[];
992
1014
  banks: Value[];
1015
+ transferContractCompanies: Value[];
993
1016
  processTariff: Value[];
994
1017
  insurancePay: Value[];
995
1018
  questionRefs: Value[];
@@ -1168,9 +1191,11 @@ export class DataStoreClass {
1168
1191
  this.documentTypes = [];
1169
1192
  this.documentIssuers = [];
1170
1193
  this.familyStatuses = [];
1194
+ this.disabilityGroups = [];
1171
1195
  this.relations = [];
1172
1196
  this.processTariff = [];
1173
1197
  this.banks = [];
1198
+ this.transferContractCompanies = [];
1174
1199
  this.insurancePay = [];
1175
1200
  this.residents = [];
1176
1201
  this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
@@ -1323,11 +1348,14 @@ export class FormStoreClass {
1323
1348
  regNumber?: string;
1324
1349
  statusCode?: keyof typeof Statuses;
1325
1350
  clientApp?: any;
1351
+ processCode?: number;
1326
1352
  insuredApp?: any;
1353
+ pensionApp?: any;
1327
1354
  beneficiaryApp?: any;
1328
1355
  beneficialOwnerApp?: any;
1329
1356
  spokesmanApp?: any;
1330
1357
  isTask?: boolean | null;
1358
+ createDate?: string | null;
1331
1359
  policyAppDto?: PolicyAppDto;
1332
1360
  insisWorkDataApp?: InsisWorkDataApp;
1333
1361
  addCoverDto?: AddCover[];
@@ -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
- // TODO remove this after PA will be ready
6
- pensionannuity: import.meta.env.VITE_MODE === 'production' ? 0 : 1,
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,10 @@ export const constants = Object.freeze({
46
52
  Statuses.DocumentsSignedFrom,
47
53
  Statuses.DocumentsSignedClientFrom,
48
54
  Statuses.ContractSignedFrom,
55
+ Statuses.AttachAppContractForm,
56
+ Statuses.PreparationDossierForm,
49
57
  ],
58
+ rejectApplicationStatuses: [Statuses.StartForm, Statuses.AttachAppContractForm, Statuses.DsoUsnsForm, Statuses.AccountantForm, Statuses.ContractSignedByAuthorizedPerson, Statuses.ContractSignedFrom],
50
59
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
51
60
  roles: Roles,
52
61
  actions: Actions,