hl-core 0.0.9-beta.51 → 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.
- package/api/base.api.ts +11 -0
- package/components/Pages/Documents.vue +7 -3
- package/components/Pages/MemberForm.vue +24 -19
- package/components/Pages/ProductConditions.vue +49 -17
- package/components/Panel/PanelHandler.vue +37 -16
- package/composables/classes.ts +10 -5
- package/composables/constants.ts +1 -4
- package/composables/index.ts +24 -1
- package/locales/ru.json +15 -4
- package/package.json +1 -1
- package/store/data.store.ts +79 -45
- package/store/rules.ts +1 -5
- package/types/index.ts +1 -1
package/api/base.api.ts
CHANGED
|
@@ -1039,4 +1039,15 @@ export class ApiClass {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
|
+
|
|
1043
|
+
async uploadDigitalCertifijcate(data: any) {
|
|
1044
|
+
return await this.axiosCall<any>({
|
|
1045
|
+
method: Methods.POST,
|
|
1046
|
+
url: '/File/api/Document/UploadDigitalCertifijcate',
|
|
1047
|
+
headers: {
|
|
1048
|
+
'Content-Type': 'multipart/form-data',
|
|
1049
|
+
},
|
|
1050
|
+
data: data,
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1042
1053
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<section :class="[$styles.scrollPage]">
|
|
3
3
|
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
4
4
|
<base-content-block
|
|
5
|
-
v-if="$dataStore.isInitiator() && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
5
|
+
v-if="$dataStore.isInitiator() && !$dataStore.isPension && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
6
6
|
:class="[$styles.textSimple]"
|
|
7
7
|
>
|
|
8
8
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('Contract') }}</h5>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</base-content-block>
|
|
27
27
|
</section>
|
|
28
28
|
<div
|
|
29
|
-
v-if="(!formStore.signedDocumentList || !formStore.signedDocumentList.length)
|
|
29
|
+
v-if="(!formStore.signedDocumentList || !formStore.signedDocumentList.length)"
|
|
30
30
|
class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6"
|
|
31
31
|
>
|
|
32
32
|
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</svg>
|
|
49
49
|
<p class="text-xl" :class="[$styles.mutedText]">{{ $dataStore.t('labels.noDocuments') }}</p>
|
|
50
50
|
</div>
|
|
51
|
-
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2"
|
|
51
|
+
<section v-if="$dataStore.isPension && showContract" class="w-full px-[10px] pt-[14px] flex flex-col gap-2">
|
|
52
52
|
<base-content-block :class="[$styles.textSimple]">
|
|
53
53
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
|
|
54
54
|
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
@@ -158,6 +158,9 @@ export default defineComponent({
|
|
|
158
158
|
}
|
|
159
159
|
}),
|
|
160
160
|
);
|
|
161
|
+
const showContract = computed(
|
|
162
|
+
() => formStore.applicationData && (formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm'),
|
|
163
|
+
);
|
|
161
164
|
|
|
162
165
|
const openPanel = async (document: DocumentItem) => {
|
|
163
166
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
@@ -246,6 +249,7 @@ export default defineComponent({
|
|
|
246
249
|
|
|
247
250
|
// Computed
|
|
248
251
|
isDisabled,
|
|
252
|
+
showContract,
|
|
249
253
|
|
|
250
254
|
// Functions
|
|
251
255
|
openPanel,
|
|
@@ -199,25 +199,23 @@
|
|
|
199
199
|
:rules="$rules.required.concat($rules.numbers)"
|
|
200
200
|
/>
|
|
201
201
|
</base-form-section>
|
|
202
|
-
|
|
203
202
|
<base-form-section
|
|
204
203
|
v-if="$dataStore.isPension && (whichForm === formStore.insuredFormKey || whichForm === formStore.beneficiaryFormKey)"
|
|
205
204
|
:title="$dataStore.t('pension.disabilityInfo')"
|
|
206
205
|
>
|
|
207
|
-
<base-form-toggle v-model="
|
|
206
|
+
<base-form-toggle v-model="member.isDisability" :title="$dataStore.t('pension.ifHasDisability')" :disabled="isDisabled" :has-border="false" />
|
|
208
207
|
<base-animation>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
</div>
|
|
208
|
+
<base-panel-input
|
|
209
|
+
v-if="member.isDisability"
|
|
210
|
+
v-model="member.disabilityGroup"
|
|
211
|
+
:value="member.disabilityGroup?.nameRu"
|
|
212
|
+
:readonly="isDisabled"
|
|
213
|
+
:clearable="!isDisabled"
|
|
214
|
+
:label="$dataStore.t('pension.disabilityGroup')"
|
|
215
|
+
:rules="$rules.objectRequired"
|
|
216
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
217
|
+
@append="openPanel($dataStore.t('pension.disabilityGroup'), $dataStore.disabilityGroups, 'disabilityGroup', $dataStore.getDisabilityGroups)"
|
|
218
|
+
/>
|
|
221
219
|
</base-animation>
|
|
222
220
|
</base-form-section>
|
|
223
221
|
<base-form-section :title="$dataStore.t('policyholdersRepresentative.PowerOfAttorney')" v-if="whichForm === formStore.policyholdersRepresentativeFormKey">
|
|
@@ -396,7 +394,7 @@
|
|
|
396
394
|
<base-form-input v-model.trim="member.registrationMicroDistrict" :readonly="isDisabled" :clearable="!isDisabled" :label="$dataStore.t('form.MicroDistrict')" />
|
|
397
395
|
<base-form-input
|
|
398
396
|
v-model.trim="member.registrationStreet"
|
|
399
|
-
:rules="member.isInsuredUnderage ? [] : $rules.required"
|
|
397
|
+
:rules="member.isInsuredUnderage || $dataStore.isAULETTI || $dataStore.isAulettiParent ? [] : $rules.required"
|
|
400
398
|
:readonly="isDisabled"
|
|
401
399
|
:clearable="!isDisabled"
|
|
402
400
|
:label="$dataStore.t('form.Street')"
|
|
@@ -758,7 +756,6 @@ export default {
|
|
|
758
756
|
|
|
759
757
|
const currentPanelDeep = ref<string>();
|
|
760
758
|
const currentPanelSubDeep = ref<string>();
|
|
761
|
-
const hasDisability = ref<boolean>(false);
|
|
762
759
|
|
|
763
760
|
const memberSetting = computed(() => dataStore.members[memberStore.getMemberApplicationCode(whichForm.value)!]);
|
|
764
761
|
const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
|
|
@@ -837,7 +834,7 @@ export default {
|
|
|
837
834
|
return false;
|
|
838
835
|
}
|
|
839
836
|
};
|
|
840
|
-
return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
837
|
+
return dataStore.isAULETTI || dataStore.isAulettiParent ? false : dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
841
838
|
});
|
|
842
839
|
const hasDocumentReader = computed(() => {
|
|
843
840
|
return !!member.value.hasAgreement && !!isTask.value && (dataStore.isAULETTI || dataStore.isAulettiParent);
|
|
@@ -1426,7 +1423,7 @@ export default {
|
|
|
1426
1423
|
ownFundsRaisAmount: 0,
|
|
1427
1424
|
compulsoryProfContractAmount: 0,
|
|
1428
1425
|
};
|
|
1429
|
-
const isApplicationSaved = await dataStore.setApplication();
|
|
1426
|
+
const isApplicationSaved = await dataStore.setApplication(formStore.applicationData.pensionApp);
|
|
1430
1427
|
if (isApplicationSaved === false) return;
|
|
1431
1428
|
dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
|
|
1432
1429
|
}
|
|
@@ -1797,6 +1794,15 @@ export default {
|
|
|
1797
1794
|
}
|
|
1798
1795
|
},
|
|
1799
1796
|
);
|
|
1797
|
+
watch(
|
|
1798
|
+
() => member.value.isDisability,
|
|
1799
|
+
val => {
|
|
1800
|
+
if (!val) member.value.disabilityGroup = new Value();
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
immediate: true,
|
|
1804
|
+
},
|
|
1805
|
+
);
|
|
1800
1806
|
}
|
|
1801
1807
|
|
|
1802
1808
|
return {
|
|
@@ -1824,7 +1830,6 @@ export default {
|
|
|
1824
1830
|
selectedIndex,
|
|
1825
1831
|
selectedFamilyMember,
|
|
1826
1832
|
sameAddress,
|
|
1827
|
-
hasDisability,
|
|
1828
1833
|
isRelative,
|
|
1829
1834
|
imageDataList,
|
|
1830
1835
|
// Computed
|
|
@@ -286,7 +286,6 @@
|
|
|
286
286
|
<base-form-input
|
|
287
287
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
288
288
|
:maska="$maska.numbers"
|
|
289
|
-
:rules="$rules.required"
|
|
290
289
|
:readonly="isDisabled"
|
|
291
290
|
:clearable="!isDisabled"
|
|
292
291
|
:label="$dataStore.t('pension.compulsoryContractAmount')"
|
|
@@ -328,23 +327,43 @@
|
|
|
328
327
|
v-model="pensionForm.transferContractCompany"
|
|
329
328
|
:value="pensionForm.transferContractCompany?.nameRu"
|
|
330
329
|
:label="$dataStore.t('pension.transferContractCompany')"
|
|
331
|
-
|
|
330
|
+
:readonly="isDisabled"
|
|
331
|
+
:clearable="!isDisabled"
|
|
332
332
|
append-inner-icon="mdi mdi-chevron-right"
|
|
333
|
-
@append="openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.
|
|
333
|
+
@append="openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.transferContractCompanies, 'transferContractCompany', $dataStore.getInsuranceCompanies)"
|
|
334
334
|
/>
|
|
335
335
|
<base-form-input
|
|
336
|
-
v-model="
|
|
336
|
+
v-model="transferContractDate"
|
|
337
337
|
:maska="$maska.date"
|
|
338
338
|
:label="$dataStore.t('pension.contractDate')"
|
|
339
|
+
:readonly="isDisabled"
|
|
339
340
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
341
|
+
:clearable="!isDisabled"
|
|
342
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
|
|
340
343
|
/>
|
|
341
344
|
<base-form-input
|
|
342
|
-
v-model="pensionForm.
|
|
345
|
+
v-model="pensionForm.transferContractNumber"
|
|
346
|
+
:label="$dataStore.t('pension.globalId')"
|
|
347
|
+
:readonly="isDisabled"
|
|
348
|
+
:clearable="!isDisabled"
|
|
349
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required : []"
|
|
350
|
+
/>
|
|
351
|
+
<base-form-input
|
|
352
|
+
v-model="transferContractFirstPaymentDate"
|
|
343
353
|
:maska="$maska.date"
|
|
344
354
|
:label="$dataStore.t('pension.transferContractFirstPaymentDate')"
|
|
345
355
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
356
|
+
:readonly="isDisabled"
|
|
357
|
+
:clearable="!isDisabled"
|
|
358
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
|
|
359
|
+
/>
|
|
360
|
+
<base-form-input
|
|
361
|
+
v-model="pensionCalculationParams.transferContractAmount"
|
|
362
|
+
:maska="$maska.numbers"
|
|
363
|
+
:label="$dataStore.t('pension.transferContractAmount')"
|
|
364
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required : []"
|
|
346
365
|
/>
|
|
347
|
-
<base-form-
|
|
366
|
+
<base-form-toggle v-model="pensionForm.transferContractIsOppv" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('pension.isOPPVTransfer')" />
|
|
348
367
|
</base-form-section>
|
|
349
368
|
<base-form-section :title="$dataStore.t('pension.paymentTerms')">
|
|
350
369
|
<base-form-input
|
|
@@ -703,14 +722,16 @@ export default defineComponent({
|
|
|
703
722
|
const enabled = 'включено';
|
|
704
723
|
|
|
705
724
|
const additionalTerms = ref<AddCover[]>([]);
|
|
706
|
-
|
|
725
|
+
|
|
707
726
|
const maxDate = ref();
|
|
708
727
|
const dateOfBegin = ref();
|
|
709
728
|
const contractDate = ref();
|
|
710
|
-
const
|
|
711
|
-
const
|
|
729
|
+
const transferContractDate = ref();
|
|
730
|
+
const transferContractFirstPaymentDate = ref();
|
|
731
|
+
const guaranteedPeriodList = Array.from(Array(35), (e, i) => i + 1);
|
|
712
732
|
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
713
733
|
|
|
734
|
+
const isMultiplePanelOpen = ref<boolean>(false);
|
|
714
735
|
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
715
736
|
const multiplePanelList = ref<CountryValue[]>([]);
|
|
716
737
|
const calculatorForm = productConditionsForm.calculatorForm;
|
|
@@ -1007,6 +1028,7 @@ export default defineComponent({
|
|
|
1007
1028
|
ownFundsRaisAmount: pensionForm && pensionForm.ownFundsRaisAmount && pensionForm.ownFundsRaisAmount != 0 ? pensionForm.ownFundsRaisAmount : null,
|
|
1008
1029
|
compulsoryProfContractAmount:
|
|
1009
1030
|
pensionForm && pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount != 0 ? pensionForm.compulsoryProfContractAmount : null,
|
|
1031
|
+
transferContractAmount: pensionForm && pensionForm.transferContractAmount && pensionForm.transferContractAmount != 0 ? pensionForm.transferContractAmount : null,
|
|
1010
1032
|
});
|
|
1011
1033
|
|
|
1012
1034
|
const pensionAmount = computed(() =>
|
|
@@ -1014,7 +1036,8 @@ export default defineComponent({
|
|
|
1014
1036
|
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
1015
1037
|
(Number(pensionCalculationParams.value.voluntaryContractAmount) ?? 0) +
|
|
1016
1038
|
(Number(pensionCalculationParams.value.ownFundsRaisAmount) ?? 0) +
|
|
1017
|
-
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0)
|
|
1039
|
+
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0) +
|
|
1040
|
+
(Number(pensionCalculationParams.value.transferContractAmount) ?? 0)
|
|
1018
1041
|
: 0,
|
|
1019
1042
|
);
|
|
1020
1043
|
|
|
@@ -1055,6 +1078,9 @@ export default defineComponent({
|
|
|
1055
1078
|
if (whichProduct.value === 'lifetrip') {
|
|
1056
1079
|
// @ts-ignore
|
|
1057
1080
|
calculatorForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1081
|
+
} else if (whichProduct.value === 'pensionannuity') {
|
|
1082
|
+
// @ts-ignore
|
|
1083
|
+
pensionForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1058
1084
|
} else {
|
|
1059
1085
|
// @ts-ignore
|
|
1060
1086
|
productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
@@ -1414,17 +1440,21 @@ export default defineComponent({
|
|
|
1414
1440
|
dataStore.showToaster('error', 'Минимальное число дней уплаты ОППВ должно быть больше 60');
|
|
1415
1441
|
return;
|
|
1416
1442
|
}
|
|
1417
|
-
|
|
1418
|
-
pensionForm,
|
|
1419
|
-
(pensionCalculationParams.value = {
|
|
1443
|
+
const data = {
|
|
1444
|
+
...pensionForm,
|
|
1445
|
+
...(pensionCalculationParams.value = {
|
|
1420
1446
|
...pensionCalculationParams.value,
|
|
1421
1447
|
compulsoryContractAmount: Number(pensionCalculationParams.value.compulsoryContractAmount),
|
|
1422
1448
|
voluntaryContractAmount: Number(pensionCalculationParams.value.voluntaryContractAmount),
|
|
1423
1449
|
ownFundsRaisAmount: Number(pensionCalculationParams.value.ownFundsRaisAmount),
|
|
1424
1450
|
compulsoryProfContractAmount: Number(pensionCalculationParams.value.compulsoryProfContractAmount),
|
|
1451
|
+
transferContractAmount: Number(pensionCalculationParams.value.transferContractAmount),
|
|
1425
1452
|
}),
|
|
1426
|
-
|
|
1427
|
-
|
|
1453
|
+
transferContractCompany: pensionForm.transferContractCompany?.nameRu ?? null,
|
|
1454
|
+
transferContractDate: transferContractDate.value ? formatDate(transferContractDate.value) : null,
|
|
1455
|
+
transferContractFirstPaymentDate: transferContractFirstPaymentDate.value ? formatDate(transferContractFirstPaymentDate.value) : null,
|
|
1456
|
+
};
|
|
1457
|
+
await dataStore.setApplication(data, true);
|
|
1428
1458
|
} else {
|
|
1429
1459
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1430
1460
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
@@ -1606,8 +1636,9 @@ export default defineComponent({
|
|
|
1606
1636
|
if (whichProduct.value === 'pensionannuity') {
|
|
1607
1637
|
contractDate.value = reformatDate(formStore.applicationData.pensionApp.contractDate);
|
|
1608
1638
|
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
1639
|
+
transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
|
|
1640
|
+
transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
|
|
1609
1641
|
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 1);
|
|
1610
|
-
guaranteedPeriodList.value = Array.from(Array(35), (e, i) => i + 1);
|
|
1611
1642
|
}
|
|
1612
1643
|
});
|
|
1613
1644
|
|
|
@@ -1719,7 +1750,8 @@ export default defineComponent({
|
|
|
1719
1750
|
pensionForm,
|
|
1720
1751
|
dateOfBegin,
|
|
1721
1752
|
contractDate,
|
|
1722
|
-
|
|
1753
|
+
transferContractDate,
|
|
1754
|
+
transferContractFirstPaymentDate,
|
|
1723
1755
|
enabled,
|
|
1724
1756
|
maxDate,
|
|
1725
1757
|
guaranteedPeriodList,
|
|
@@ -34,8 +34,14 @@
|
|
|
34
34
|
<base-btn :text="$dataStore.t('buttons.sendElectronically')" :disabled="isElectronicDisabled" :loading="loading" @click="handleSignAction('electronic')" />
|
|
35
35
|
<base-btn :text="$dataStore.t('buttons.generatePrintedForms')" :disabled="isScansDisabled" :loading="loading" @click="handleSignAction('scans')" />
|
|
36
36
|
<base-btn :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
|
|
37
|
-
<base-btn v-if="$dataStore.isPension" text="
|
|
38
|
-
<base-btn
|
|
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
|
+
/>
|
|
39
45
|
</div>
|
|
40
46
|
<div v-if="isPaperContract" :class="[$styles.flexColNav]">
|
|
41
47
|
<base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="generateDocument" />
|
|
@@ -263,7 +269,15 @@ export default defineComponent({
|
|
|
263
269
|
const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
|
|
264
270
|
const selectedClient = ref<SignUrlType>();
|
|
265
271
|
const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
|
|
266
|
-
const
|
|
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);
|
|
267
281
|
const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
|
|
268
282
|
const affiliationData = ref<{
|
|
269
283
|
processInstanceId: string | number;
|
|
@@ -522,7 +536,7 @@ export default defineComponent({
|
|
|
522
536
|
return true;
|
|
523
537
|
});
|
|
524
538
|
const isPaperDisabled = computed(() => {
|
|
525
|
-
if (dataStore.isGons
|
|
539
|
+
if (dataStore.isGons) {
|
|
526
540
|
return false;
|
|
527
541
|
}
|
|
528
542
|
return true;
|
|
@@ -531,37 +545,43 @@ export default defineComponent({
|
|
|
531
545
|
if (dataStore.isGons) {
|
|
532
546
|
return true;
|
|
533
547
|
}
|
|
534
|
-
if (
|
|
548
|
+
if (formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson') {
|
|
535
549
|
return true;
|
|
536
550
|
}
|
|
551
|
+
if (needsAgreement.value) {
|
|
552
|
+
if (!consentGiven.value && dataStore.isPension) {
|
|
553
|
+
return true;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
537
556
|
return false;
|
|
538
557
|
});
|
|
539
558
|
const isScansDisabled = computed(() => {
|
|
540
559
|
if (dataStore.isGons) {
|
|
541
560
|
return true;
|
|
542
561
|
}
|
|
543
|
-
if (
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
return true;
|
|
562
|
+
if (needsAgreement.value) {
|
|
563
|
+
if (!consentGiven.value && dataStore.isPension && formStore.applicationData.statusCode !== 'ContractSignedFrom') {
|
|
564
|
+
return true;
|
|
565
|
+
}
|
|
548
566
|
}
|
|
549
567
|
return false;
|
|
550
568
|
});
|
|
551
569
|
const isQrDisabled = computed(() => {
|
|
552
|
-
if (
|
|
553
|
-
|
|
570
|
+
if (needsAgreement.value) {
|
|
571
|
+
if (!consentGiven.value && dataStore.isPension) {
|
|
572
|
+
return true;
|
|
573
|
+
}
|
|
554
574
|
}
|
|
555
|
-
if (dataStore.isLifeBusiness || dataStore.
|
|
575
|
+
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
556
576
|
return false;
|
|
557
577
|
}
|
|
558
578
|
return true;
|
|
559
579
|
});
|
|
560
580
|
const isQrXmlDisabled = computed(() => {
|
|
561
|
-
if (consentGiven.value &&
|
|
562
|
-
return
|
|
581
|
+
if (consentGiven.value && needsAgreement.value) {
|
|
582
|
+
return false;
|
|
563
583
|
}
|
|
564
|
-
return
|
|
584
|
+
return true;
|
|
565
585
|
});
|
|
566
586
|
const downloadTemplate = async (documentType: number, fileType: string) => {
|
|
567
587
|
await dataStore.downloadTemplate(documentType, fileType, formStore.applicationData.processInstanceId);
|
|
@@ -813,6 +833,7 @@ export default defineComponent({
|
|
|
813
833
|
isQrXmlDisabled,
|
|
814
834
|
choosePayActions,
|
|
815
835
|
consentGiven,
|
|
836
|
+
needsAgreement,
|
|
816
837
|
};
|
|
817
838
|
},
|
|
818
839
|
});
|
package/composables/classes.ts
CHANGED
|
@@ -438,7 +438,7 @@ export class Member extends Person {
|
|
|
438
438
|
familyStatus: Value;
|
|
439
439
|
isTerror: null;
|
|
440
440
|
relationDegree: Value;
|
|
441
|
-
isDisability:
|
|
441
|
+
isDisability: boolean;
|
|
442
442
|
disabilityGroup: Value | null;
|
|
443
443
|
percentageOfPayoutAmount: string | number | null;
|
|
444
444
|
_cyrPattern: RegExp;
|
|
@@ -454,6 +454,7 @@ export class Member extends Person {
|
|
|
454
454
|
documentsList: ContragentDocuments[];
|
|
455
455
|
isInsuredUnderage?: boolean = false;
|
|
456
456
|
bankInfo: BankInfoClass;
|
|
457
|
+
transferContractCompany: Value;
|
|
457
458
|
identityDocument: {
|
|
458
459
|
documentType: Value;
|
|
459
460
|
documentNumber: string | null;
|
|
@@ -507,7 +508,7 @@ export class Member extends Person {
|
|
|
507
508
|
address = null,
|
|
508
509
|
familyStatus = new Value(),
|
|
509
510
|
relationDegree = new Value(),
|
|
510
|
-
isDisability =
|
|
511
|
+
isDisability = false,
|
|
511
512
|
disabilityGroupId = new Value(),
|
|
512
513
|
percentageOfPayoutAmount = null,
|
|
513
514
|
migrationCard = null,
|
|
@@ -594,6 +595,7 @@ export class Member extends Person {
|
|
|
594
595
|
this.parsedDocument = null;
|
|
595
596
|
this.hasAgreement = null;
|
|
596
597
|
this.bankInfo = new BankInfoClass();
|
|
598
|
+
this.transferContractCompany = new Value();
|
|
597
599
|
this.identityDocument = {
|
|
598
600
|
documentType: new Value(),
|
|
599
601
|
documentNumber: null,
|
|
@@ -638,7 +640,7 @@ export class Member extends Person {
|
|
|
638
640
|
this.familyStatus = new Value();
|
|
639
641
|
this.isTerror = null;
|
|
640
642
|
this.relationDegree = new Value();
|
|
641
|
-
this.isDisability =
|
|
643
|
+
this.isDisability = false;
|
|
642
644
|
this.disabilityGroup = null;
|
|
643
645
|
this.percentageOfPayoutAmount = null;
|
|
644
646
|
this.gotFromInsis = true;
|
|
@@ -737,6 +739,7 @@ export class ProductConditions {
|
|
|
737
739
|
annualIncome: string | null;
|
|
738
740
|
processIndexRate: Value;
|
|
739
741
|
processGfot: Value;
|
|
742
|
+
transferContractCompany: Value;
|
|
740
743
|
requestedSumInsured: number | string | null;
|
|
741
744
|
requestedSumInsuredInDollar: number | string | null;
|
|
742
745
|
insurancePremiumPerMonth: number | string | null;
|
|
@@ -784,6 +787,7 @@ export class ProductConditions {
|
|
|
784
787
|
annualIncome = null,
|
|
785
788
|
processIndexRate = new Value(),
|
|
786
789
|
processGfot = new Value(),
|
|
790
|
+
transferContractCompany = new Value(),
|
|
787
791
|
requestedSumInsured = null,
|
|
788
792
|
insurancePremiumPerMonth = null,
|
|
789
793
|
establishingGroupDisabilityFromThirdYear = null,
|
|
@@ -833,6 +837,7 @@ export class ProductConditions {
|
|
|
833
837
|
this.annualIncome = annualIncome;
|
|
834
838
|
this.processIndexRate = processIndexRate;
|
|
835
839
|
this.processGfot = processGfot;
|
|
840
|
+
this.transferContractCompany = transferContractCompany;
|
|
836
841
|
this.requestedSumInsured = requestedSumInsured;
|
|
837
842
|
this.insurancePremiumPerMonth = insurancePremiumPerMonth;
|
|
838
843
|
this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
|
|
@@ -1007,7 +1012,7 @@ export class DataStoreClass {
|
|
|
1007
1012
|
disabilityGroups: Value[];
|
|
1008
1013
|
relations: Value[];
|
|
1009
1014
|
banks: Value[];
|
|
1010
|
-
|
|
1015
|
+
transferContractCompanies: Value[];
|
|
1011
1016
|
processTariff: Value[];
|
|
1012
1017
|
insurancePay: Value[];
|
|
1013
1018
|
questionRefs: Value[];
|
|
@@ -1190,7 +1195,7 @@ export class DataStoreClass {
|
|
|
1190
1195
|
this.relations = [];
|
|
1191
1196
|
this.processTariff = [];
|
|
1192
1197
|
this.banks = [];
|
|
1193
|
-
this.
|
|
1198
|
+
this.transferContractCompanies = [];
|
|
1194
1199
|
this.insurancePay = [];
|
|
1195
1200
|
this.residents = [];
|
|
1196
1201
|
this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
|
package/composables/constants.ts
CHANGED
|
@@ -54,11 +54,8 @@ export const constants = Object.freeze({
|
|
|
54
54
|
Statuses.ContractSignedFrom,
|
|
55
55
|
Statuses.AttachAppContractForm,
|
|
56
56
|
Statuses.PreparationDossierForm,
|
|
57
|
-
Statuses.DsoUsnsForm,
|
|
58
|
-
Statuses.AccountantForm,
|
|
59
|
-
Statuses.ContractSignedByAuthorizedPerson,
|
|
60
57
|
],
|
|
61
|
-
rejectApplicationStatuses: [Statuses.StartForm, Statuses.AttachAppContractForm],
|
|
58
|
+
rejectApplicationStatuses: [Statuses.StartForm, Statuses.AttachAppContractForm, Statuses.DsoUsnsForm, Statuses.AccountantForm, Statuses.ContractSignedByAuthorizedPerson, Statuses.ContractSignedFrom],
|
|
62
59
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
63
60
|
roles: Roles,
|
|
64
61
|
actions: Actions,
|
package/composables/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export const useEnv = () => {
|
|
|
17
17
|
export class Masks {
|
|
18
18
|
numbers: string = '#*';
|
|
19
19
|
otp: string = '# # # #';
|
|
20
|
+
spacedNumbers: string = '### ### ### ### ### ### ###';
|
|
20
21
|
iin: string = '###-###-###-###';
|
|
21
22
|
phone: string = '+7 (7##) ### ## ##';
|
|
22
23
|
date: string = '##.##.####';
|
|
@@ -98,6 +99,8 @@ export const formatPhone = (phone: string) => {
|
|
|
98
99
|
return phone?.replace(/(\(|\)|\+| )/g, '');
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
export const cleanWhiteSpace = (str: string) => String(str).replace(/\s+/g, '');
|
|
103
|
+
|
|
101
104
|
export const jwtDecode = (token: string): any => {
|
|
102
105
|
if (token) return jwt_decode(token);
|
|
103
106
|
else return null;
|
|
@@ -190,6 +193,7 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
|
|
|
190
193
|
console.log(err);
|
|
191
194
|
if (useDataStore) {
|
|
192
195
|
const dataStore = useDataStore();
|
|
196
|
+
if (typeof err === 'string') dataStore.showToaster('error', err);
|
|
193
197
|
if (err instanceof AxiosError) {
|
|
194
198
|
if ('response' in err && err.response && err.response.data) {
|
|
195
199
|
if (err.response.data === Object(err.response.data) && 'errors' in err.response.data && 'title' in err.response.data && 'traceId' in err.response.data) {
|
|
@@ -336,7 +340,17 @@ export const getLastDayOfMonth = (year: number, month: number) => {
|
|
|
336
340
|
return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
337
341
|
};
|
|
338
342
|
|
|
339
|
-
type WhichValuePerEnv =
|
|
343
|
+
type WhichValuePerEnv =
|
|
344
|
+
| 'qrGenUrl'
|
|
345
|
+
| 'qrXmlGenUrl'
|
|
346
|
+
| 'gatewayApiUrl'
|
|
347
|
+
| 'gatewayApiUrlLocal'
|
|
348
|
+
| 'baseApi'
|
|
349
|
+
| 'baseApiLocal'
|
|
350
|
+
| 'efoBaseApi'
|
|
351
|
+
| 'efoBaseApiLocal'
|
|
352
|
+
| 'amlBaseApi'
|
|
353
|
+
| 'amlBaseApiLocal';
|
|
340
354
|
|
|
341
355
|
export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
|
|
342
356
|
const valuesPerEnv: {
|
|
@@ -515,3 +529,12 @@ export const callDocumentReader = async (imageBase64: string | string[]) => {
|
|
|
515
529
|
return ErrorHandler(err);
|
|
516
530
|
}
|
|
517
531
|
};
|
|
532
|
+
|
|
533
|
+
export const validateResponseStructure = <T>(res: ResponseStructure<T>) => {
|
|
534
|
+
if (res && res.code === 0) {
|
|
535
|
+
return res.data;
|
|
536
|
+
} else {
|
|
537
|
+
useDataStore().showToaster('error', res.message);
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
};
|
package/locales/ru.json
CHANGED
|
@@ -223,14 +223,17 @@
|
|
|
223
223
|
"downloadPARefundStatement": "Скачать заявление на страхование возврат в ЕНПФ ПА",
|
|
224
224
|
"downloadPARefundAgreement": "Скачать согласие возврат в ЕНПФ ПА",
|
|
225
225
|
"sendEgovMob": "Отправить на подпись через Egov Mobile",
|
|
226
|
-
"signWithSignature": "Подписать
|
|
226
|
+
"signWithSignature": "Подписать с помощью ЭЦП",
|
|
227
|
+
"signWithSignatureXML": "Подписать Согласие через Egov QrXML",
|
|
227
228
|
"sendToPay": "Отправить на оплату",
|
|
228
229
|
"payEpay": "Оплатить через EPAY",
|
|
229
230
|
"payOffline": "Оплатить офлайн",
|
|
230
231
|
"paymentInvoice": "Cчет на оплату",
|
|
231
232
|
"finishApplication": "Завершить заявку",
|
|
232
233
|
"generateConract": "Сгенерировать Договор",
|
|
233
|
-
"signContract": "Заключить Договор"
|
|
234
|
+
"signContract": "Заключить Договор",
|
|
235
|
+
"sendDosie": "Отправить досье",
|
|
236
|
+
"downloadPaymentInvoice": "Скачать счет на оплату"
|
|
234
237
|
},
|
|
235
238
|
"dialog": {
|
|
236
239
|
"title": "Подтверждение",
|
|
@@ -266,7 +269,10 @@
|
|
|
266
269
|
"register": "Вы действительно хотите добавить в реестр данного ребенка?",
|
|
267
270
|
"toApprove": "Вы действительно хотите отправить на согласование?",
|
|
268
271
|
"affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?",
|
|
269
|
-
"choosePay": "Вы действительно хотите выбрать метод оплаты?"
|
|
272
|
+
"choosePay": "Вы действительно хотите выбрать метод оплаты?",
|
|
273
|
+
"searchBeneficiary":"Выполните поиск договоров по ИИН Выгодоприобретателя",
|
|
274
|
+
"searchFoundBeneficiary":"По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
|
|
275
|
+
"searchNotFoundBeneficiary":"По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
|
|
270
276
|
},
|
|
271
277
|
"sign": {
|
|
272
278
|
"chooseDoc": "Выберите документы для подписание",
|
|
@@ -534,6 +540,7 @@
|
|
|
534
540
|
"transferContractAmount": "Выкупная сумма, в тенге",
|
|
535
541
|
"guaranteedPeriod": "Гарантированный период страховых выплат (от 1 до 35, в годах)",
|
|
536
542
|
"isOPPV": "Включите, если есть ОППВ",
|
|
543
|
+
"isOPPVTransfer": "Выкупная сумма содержит суммы ОППВ?",
|
|
537
544
|
"annuityConditions": "Условия аннуитетных выплат",
|
|
538
545
|
"role": "Роль",
|
|
539
546
|
"frequencyPayments": "Периодичность аннуитетной выплаты",
|
|
@@ -560,7 +567,10 @@
|
|
|
560
567
|
"dossierPA": "Форма Описи страхового досье ПА (docx)",
|
|
561
568
|
"transferContractCompany": "Наименование КСЖ",
|
|
562
569
|
"transferContractFirstPaymentDate": "Дата начала выплат по договору с КСЖ",
|
|
563
|
-
"companyName": "Наименование компании по страхованию жизни"
|
|
570
|
+
"companyName": "Наименование компании по страхованию жизни",
|
|
571
|
+
"bankInvalid": "Некорректные банковские данные",
|
|
572
|
+
"globalId": "Уникальный номер договора (globalId)",
|
|
573
|
+
"oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'"
|
|
564
574
|
},
|
|
565
575
|
"agent": {
|
|
566
576
|
"currency": "Валюта",
|
|
@@ -811,6 +821,7 @@
|
|
|
811
821
|
},
|
|
812
822
|
"rules": {
|
|
813
823
|
"required": "Поле обязательно",
|
|
824
|
+
"fileRequired": "Файл обязательно",
|
|
814
825
|
"cyrillic": "Поле должно содержать только кириллические символы",
|
|
815
826
|
"latin": "Поле должно содержать только латинские символы",
|
|
816
827
|
"email": "Неправильный адрес электронной почты",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -983,7 +983,7 @@ export const useDataStore = defineStore('data', {
|
|
|
983
983
|
delete data.id;
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
data.isDisability = this.formStore.isPolicyholderInsured && !this.isPension ? false : member.isDisability
|
|
986
|
+
data.isDisability = this.formStore.isPolicyholderInsured && !this.isPension ? false : !!member.isDisability;
|
|
987
987
|
data.disabilityGroupId = data.isDisability && member.disabilityGroup ? member.disabilityGroup.id : null;
|
|
988
988
|
data.profession = member.job;
|
|
989
989
|
data.position = member.jobPosition;
|
|
@@ -1035,11 +1035,11 @@ export const useDataStore = defineStore('data', {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
},
|
|
1038
|
-
async setApplication(calculate: boolean = false) {
|
|
1038
|
+
async setApplication(applicationData: object, calculate: boolean = false) {
|
|
1039
1039
|
try {
|
|
1040
1040
|
this.isLoading = true;
|
|
1041
1041
|
this.isButtonsLoading = true;
|
|
1042
|
-
await this.api.setApplication(
|
|
1042
|
+
await this.api.setApplication(applicationData);
|
|
1043
1043
|
if (calculate) {
|
|
1044
1044
|
await this.api.calculatePension(String(this.formStore.applicationData.processInstanceId));
|
|
1045
1045
|
this.showToaster('success', this.t('toaster.successSaved'), 2000);
|
|
@@ -1437,7 +1437,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1437
1437
|
if (this.isLifeBusiness || this.isDas || this.isUU || this.isPension || this.isGns || this.isPrePension || this.isDSO) return await this.getFromApi('banks', 'getBanks');
|
|
1438
1438
|
},
|
|
1439
1439
|
async getInsuranceCompanies() {
|
|
1440
|
-
if (this.isPension) return await this.getFromApi('
|
|
1440
|
+
if (this.isPension) return await this.getFromApi('transferContractCompanies', 'getInsuranceCompanies');
|
|
1441
1441
|
},
|
|
1442
1442
|
async getProcessIndexRate() {
|
|
1443
1443
|
if (this.processCode) {
|
|
@@ -1526,6 +1526,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1526
1526
|
this.getInsuranceCompanies(),
|
|
1527
1527
|
this.getEconomicActivityType(),
|
|
1528
1528
|
this.getAuthorityBasis(),
|
|
1529
|
+
this.getDisabilityGroups(),
|
|
1529
1530
|
]);
|
|
1530
1531
|
},
|
|
1531
1532
|
async getQuestionList(
|
|
@@ -2286,7 +2287,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2286
2287
|
});
|
|
2287
2288
|
this.formStore.productConditionsForm.riskGroup = riskGroup ? riskGroup : this.riskGroup.find(item => item.id == 1) ?? new Value();
|
|
2288
2289
|
}
|
|
2289
|
-
if (this.isPension && this.formStore.policyholderForm.bankInfo) {
|
|
2290
|
+
if (this.isPension && this.formStore.policyholderForm.bankInfo && this.formStore.policyholderForm.bankInfo.bik) {
|
|
2290
2291
|
this.formStore.insuredForm[0].bankInfo = this.formStore.policyholderForm.bankInfo;
|
|
2291
2292
|
}
|
|
2292
2293
|
} catch (err) {
|
|
@@ -2438,16 +2439,20 @@ export const useDataStore = defineStore('data', {
|
|
|
2438
2439
|
if (!!this.formStore.applicationData[whichMember].profession) this.formStore[whichForm].job = this.formStore.applicationData[whichMember].profession;
|
|
2439
2440
|
if (!!this.formStore.applicationData[whichMember].position) this.formStore[whichForm].jobPosition = this.formStore.applicationData[whichMember].position;
|
|
2440
2441
|
if (!!this.formStore.applicationData[whichMember].jobName) this.formStore[whichForm].jobPlace = this.formStore.applicationData[whichMember].jobName;
|
|
2442
|
+
if (typeof this.formStore.applicationData[whichMember].isDisability === 'boolean')
|
|
2443
|
+
this.formStore[whichForm].isDisability = this.formStore.applicationData[whichMember].isDisability;
|
|
2444
|
+
if (!!this.formStore.applicationData[whichMember].disabilityGroupId) {
|
|
2445
|
+
const disabilityGroup = this.disabilityGroups.find(i => i.id === this.formStore.applicationData[whichMember].disabilityGroupId);
|
|
2446
|
+
this.formStore[whichForm].disabilityGroup = disabilityGroup ? disabilityGroup : new Value();
|
|
2447
|
+
}
|
|
2441
2448
|
if (whichForm === this.formStore.policyholderFormKey && this.isPension && 'pensionApp' in this.formStore.applicationData && !!this.formStore.applicationData.pensionApp) {
|
|
2442
2449
|
this.formStore[whichForm].bankInfo.iik = this.formStore.applicationData.pensionApp.account;
|
|
2443
2450
|
this.formStore[whichForm].bankInfo.bik = this.formStore.applicationData.pensionApp.bankBik;
|
|
2444
2451
|
const bank = this.banks.find(i => i.ids === this.formStore.applicationData.pensionApp.bankBin);
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
this.formStore[whichForm].bankInfo.bankName = new Value();
|
|
2450
|
-
}
|
|
2452
|
+
const transferCompany = this.transferContractCompanies.find(i => i.nameRu === this.formStore.applicationData.pensionApp.transferContractCompany);
|
|
2453
|
+
this.formStore[whichForm].bankInfo.bankName = bank ? bank : new Value();
|
|
2454
|
+
this.formStore[whichForm].bankInfo.bin = bank ? String(bank.ids) : '';
|
|
2455
|
+
this.formStore.applicationData.pensionApp.transferContractCompany = transferCompany ? transferCompany : new Value();
|
|
2451
2456
|
}
|
|
2452
2457
|
},
|
|
2453
2458
|
setMembersFieldIndex(whichForm: MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
|
|
@@ -2470,6 +2475,13 @@ export const useDataStore = defineStore('data', {
|
|
|
2470
2475
|
if ('jobPlace' in this.formStore[whichForm][index] && !!this.formStore.applicationData[whichMember][index].jobName) {
|
|
2471
2476
|
this.formStore[whichForm][index].jobPlace = this.formStore.applicationData[whichMember][index].jobName;
|
|
2472
2477
|
}
|
|
2478
|
+
if (typeof this.formStore.applicationData[whichMember][index].isDisability === 'boolean') {
|
|
2479
|
+
this.formStore[whichForm][index].isDisability = this.formStore.applicationData[whichMember][index].isDisability;
|
|
2480
|
+
}
|
|
2481
|
+
if (!!this.formStore.applicationData[whichMember][index].disabilityGroupId) {
|
|
2482
|
+
const disabilityGroup = this.disabilityGroups.find(i => i.id === this.formStore.applicationData[whichMember][index].disabilityGroupId);
|
|
2483
|
+
this.formStore[whichForm][index].disabilityGroup = disabilityGroup ? disabilityGroup : new Value();
|
|
2484
|
+
}
|
|
2473
2485
|
},
|
|
2474
2486
|
async signDocument(type: string = 'electronic') {
|
|
2475
2487
|
try {
|
|
@@ -2502,32 +2514,23 @@ export const useDataStore = defineStore('data', {
|
|
|
2502
2514
|
name: this.processCode == 1 ? 'PA_Statement' : 'PA_RefundStatement',
|
|
2503
2515
|
format: 'pdf',
|
|
2504
2516
|
},
|
|
2517
|
+
{
|
|
2518
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2519
|
+
name: 'Agreement',
|
|
2520
|
+
format: 'pdf',
|
|
2521
|
+
},
|
|
2505
2522
|
];
|
|
2506
2523
|
}
|
|
2507
|
-
|
|
2508
|
-
case 'ContractSignedByAuthorizedPerson':
|
|
2509
|
-
return [
|
|
2510
|
-
{
|
|
2511
|
-
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2512
|
-
name: this.processCode == 1 ? 'PA_Contract' : 'PA_Contract',
|
|
2513
|
-
format: 'pdf',
|
|
2514
|
-
},
|
|
2515
|
-
];
|
|
2516
2524
|
case 'ContractSignedByAuthorizedPerson':
|
|
2517
2525
|
return [
|
|
2518
2526
|
{
|
|
2519
2527
|
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2520
|
-
name:
|
|
2528
|
+
name: 'PA_Contract',
|
|
2521
2529
|
format: 'pdf',
|
|
2522
2530
|
},
|
|
2523
2531
|
];
|
|
2524
2532
|
default:
|
|
2525
2533
|
return [
|
|
2526
|
-
{
|
|
2527
|
-
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2528
|
-
name: 'Agreement',
|
|
2529
|
-
format: 'pdf',
|
|
2530
|
-
},
|
|
2531
2534
|
{
|
|
2532
2535
|
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2533
2536
|
name: 'Statement',
|
|
@@ -2550,25 +2553,56 @@ export const useDataStore = defineStore('data', {
|
|
|
2550
2553
|
await ncaLayerClient.connect();
|
|
2551
2554
|
activeTokens = await ncaLayerClient.getActiveTokens();
|
|
2552
2555
|
const storageType = activeTokens[0] || NCALayerClient.fileStorageType;
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
processInstanceId
|
|
2559
|
-
name
|
|
2560
|
-
format
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2556
|
+
if (this.formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson') {
|
|
2557
|
+
const document = await this.generatePDFDocument('PAEnpf_Agreement', '40', 'pdf');
|
|
2558
|
+
const base64EncodedSignature = await ncaLayerClient.basicsSignCMS(storageType, document, NCALayerClient.basicsCMSParams, NCALayerClient.basicsSignerSignAny);
|
|
2559
|
+
const formData = new FormData();
|
|
2560
|
+
formData.append('base64EncodedSignature', base64EncodedSignature);
|
|
2561
|
+
formData.append('processInstanceId', String(this.formStore.applicationData.processInstanceId));
|
|
2562
|
+
formData.append('name', 'PAEnpf_Agreement');
|
|
2563
|
+
formData.append('format', 'pdf');
|
|
2564
|
+
try {
|
|
2565
|
+
await this.api.uploadDigitalCertifijcate(formData);
|
|
2566
|
+
await this.handleTask('accept', String(this.formStore.applicationTaskId));
|
|
2567
|
+
} catch (e) {
|
|
2568
|
+
this.showToaster('error', String(e));
|
|
2569
|
+
return;
|
|
2570
|
+
}
|
|
2571
|
+
} else if (this.formStore.applicationData.statusCode === 'ContractSignedFrom') {
|
|
2572
|
+
const document = await this.generatePDFDocument('PA_Contract', '38', 'pdf');
|
|
2573
|
+
const base64EncodedSignature = await ncaLayerClient.basicsSignCMS(storageType, document, NCALayerClient.basicsCMSParams, NCALayerClient.basicsSignerSignAny);
|
|
2574
|
+
const formData = new FormData();
|
|
2575
|
+
formData.append('base64EncodedSignature', base64EncodedSignature);
|
|
2576
|
+
formData.append('processInstanceId', String(this.formStore.applicationData.processInstanceId));
|
|
2577
|
+
formData.append('name', 'PA_Contract');
|
|
2578
|
+
formData.append('format', 'pdf');
|
|
2579
|
+
try {
|
|
2580
|
+
await this.api.uploadDigitalCertifijcate(formData);
|
|
2581
|
+
await this.handleTask('accept', String(this.formStore.applicationTaskId));
|
|
2582
|
+
} catch (e) {
|
|
2583
|
+
this.showToaster('error', String(e));
|
|
2584
|
+
return;
|
|
2585
|
+
}
|
|
2586
|
+
} else {
|
|
2587
|
+
const agreementXml = await this.getDocument(this.formStore.applicationData.processInstanceId as string);
|
|
2588
|
+
const wnd = window.open('about:blank', '', '_blank');
|
|
2589
|
+
wnd?.document.write(agreementXml as any);
|
|
2590
|
+
const signedAgreement = await ncaLayerClient.signXml(storageType, agreementXml, 'SIGNATURE', '');
|
|
2591
|
+
const document = {
|
|
2592
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2593
|
+
name: 'PAEnpf_Agreement',
|
|
2594
|
+
format: 'xml',
|
|
2595
|
+
};
|
|
2596
|
+
const signData = await this.api.signXml([document]);
|
|
2597
|
+
const data = new FormData();
|
|
2598
|
+
data.append('processInstanceId', String(this.formStore.applicationData.processInstanceId));
|
|
2599
|
+
data.append('xmlData', signedAgreement);
|
|
2600
|
+
data.append('name', 'PAEnpf_Agreement');
|
|
2601
|
+
data.append('format', 'xml');
|
|
2602
|
+
data.append('EdsXmlId', signData.data);
|
|
2603
|
+
await this.api.uploadXml(data);
|
|
2604
|
+
await this.getSignedDocList(this.formStore.applicationData.processInstanceId);
|
|
2605
|
+
}
|
|
2572
2606
|
} catch (error) {
|
|
2573
2607
|
this.showToaster('error', String(error));
|
|
2574
2608
|
return;
|
package/store/rules.ts
CHANGED
|
@@ -240,19 +240,15 @@ export const rules = {
|
|
|
240
240
|
checkDate: [
|
|
241
241
|
(v: any) => {
|
|
242
242
|
const today = new Date();
|
|
243
|
-
const yesterday = new Date();
|
|
244
|
-
yesterday.setDate(today.getDate() - 1);
|
|
245
243
|
const yourDate = new Date(formatDate(v)!);
|
|
246
|
-
|
|
247
244
|
if (yourDate.toDateString() === today.toDateString()) {
|
|
248
245
|
return true;
|
|
249
|
-
} else if (yourDate.toDateString() === yesterday.toDateString()) {
|
|
250
|
-
return true;
|
|
251
246
|
} else {
|
|
252
247
|
return t('rules.checkDate');
|
|
253
248
|
}
|
|
254
249
|
},
|
|
255
250
|
],
|
|
251
|
+
fileRequired: [(v: any) => !!v || t('rules.fileRequired'), (v: any) => (v && v.length > 0) || t('rules.fileRequired')],
|
|
256
252
|
guaranteedPeriodLimit(v: any, termAnnuityPayments: any) {
|
|
257
253
|
if (Number(v) > Number(termAnnuityPayments)) {
|
|
258
254
|
return t('rules.guaranteedPeriodLimit');
|
package/types/index.ts
CHANGED
|
@@ -354,7 +354,7 @@ declare global {
|
|
|
354
354
|
|
|
355
355
|
type SignDataType = {
|
|
356
356
|
processInstanceId: string;
|
|
357
|
-
name: 'Statement' | 'Agreement' | 'Contract' | 'PA_Contract' | 'PA_Statement' | 'PA_RefundStatement' | 'PA_RefundAgreement' | 'PAEnpf_Agreement';
|
|
357
|
+
name: 'Statement' | 'Agreement' | 'Contract' | 'PA_Contract' | 'PA_Statement' | 'PA_RefundStatement' | 'PA_RefundAgreement' | 'PAEnpf_Agreement' | 'InvoicePayment';
|
|
358
358
|
format: 'pdf' | 'xml';
|
|
359
359
|
};
|
|
360
360
|
|