hl-core 0.0.10-beta.64 → 0.0.10-beta.66
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 +27 -1
- package/api/interceptors.ts +165 -60
- package/components/Form/ManagerAttachment.vue +29 -4
- package/components/Input/TextHint.vue +13 -0
- package/components/Pages/Auth.vue +2 -5
- package/components/Pages/ContragentForm.vue +23 -17
- package/components/Pages/MemberForm.vue +177 -45
- package/components/Pages/ProductConditions.vue +214 -61
- package/composables/classes.ts +17 -0
- package/composables/index.ts +36 -9
- package/layouts/default.vue +1 -1
- package/locales/ru.json +17 -4
- package/package.json +2 -1
- package/store/data.store.ts +52 -15
- package/store/rules.ts +8 -0
- package/types/enum.ts +3 -0
- package/types/index.ts +3 -0
- package/utils/auth-helpers.ts +42 -0
- package/utils/redirect-utils.ts +57 -0
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
<base-form-input
|
|
16
16
|
v-model="productConditionsForm.lifeMultiplyClient"
|
|
17
17
|
:maska="$maska.numbers"
|
|
18
|
-
:clearable="isRecalculationDisabled === false"
|
|
19
18
|
:label="$dataStore.t('percent') + `Life Multiply`"
|
|
20
19
|
:readonly="isRecalculationDisabled"
|
|
20
|
+
:clearable="!isRecalculationDisabled"
|
|
21
21
|
:rules="$dataStore.rules.recalculationMultiply"
|
|
22
22
|
/>
|
|
23
23
|
<base-form-input
|
|
24
24
|
v-model="productConditionsForm.lifeAdditiveClient"
|
|
25
25
|
:maska="$maska.numbers"
|
|
26
|
-
:clearable="isRecalculationDisabled === false"
|
|
27
26
|
:label="$dataStore.t('percent') + `Life Additive`"
|
|
28
27
|
:readonly="isRecalculationDisabled"
|
|
28
|
+
:clearable="!isRecalculationDisabled"
|
|
29
29
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
30
30
|
/>
|
|
31
31
|
<base-form-input v-model="formStore.policyholderForm.longName" :label="$dataStore.t('labels.policyholderLongName')" :readonly="true" />
|
|
@@ -62,52 +62,52 @@
|
|
|
62
62
|
<base-form-input
|
|
63
63
|
v-model="productConditionsForm.lifeMultiply"
|
|
64
64
|
:maska="$maska.numbers"
|
|
65
|
-
:clearable="isRecalculationDisabled === false"
|
|
66
65
|
:label="lifeMultiplyLabel"
|
|
67
66
|
:readonly="isRecalculationDisabled"
|
|
67
|
+
:clearable="!isRecalculationDisabled"
|
|
68
68
|
:rules="whichProduct === 'gons' ? $dataStore.rules.recalculationMultiplyBetween : $dataStore.rules.recalculationMultiply"
|
|
69
69
|
/>
|
|
70
70
|
<base-form-input
|
|
71
71
|
v-model="productConditionsForm.lifeAdditive"
|
|
72
72
|
:maska="$maska.numbers"
|
|
73
|
-
:clearable="isRecalculationDisabled === false"
|
|
74
73
|
:label="lifeAdditiveLabel"
|
|
75
74
|
:readonly="readonlyLifeAdditive"
|
|
75
|
+
:clearable="!isRecalculationDisabled"
|
|
76
76
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
77
77
|
/>
|
|
78
78
|
<base-form-input
|
|
79
79
|
v-if="hasAdbMultiply"
|
|
80
80
|
v-model="productConditionsForm.adbMultiply"
|
|
81
81
|
:maska="$maska.numbers"
|
|
82
|
-
:clearable="isRecalculationDisabled === false"
|
|
83
82
|
:label="adbMultiplyLabel"
|
|
84
83
|
:readonly="isRecalculationDisabled"
|
|
84
|
+
:clearable="!isRecalculationDisabled"
|
|
85
85
|
:rules="$dataStore.rules.recalculationMultiply"
|
|
86
86
|
/>
|
|
87
87
|
<base-form-input
|
|
88
88
|
v-if="hasAdbAdditive"
|
|
89
89
|
v-model="productConditionsForm.adbAdditive"
|
|
90
90
|
:maska="$maska.numbers"
|
|
91
|
-
:clearable="isRecalculationDisabled === false"
|
|
92
91
|
:label="adbAdditiveLabel"
|
|
93
92
|
:readonly="isRecalculationDisabled"
|
|
93
|
+
:clearable="!isRecalculationDisabled"
|
|
94
94
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
95
95
|
/>
|
|
96
96
|
<base-form-input
|
|
97
97
|
v-model="productConditionsForm.disabilityMultiply"
|
|
98
98
|
:maska="$maska.numbers"
|
|
99
|
-
:clearable="isRecalculationDisabled === false"
|
|
100
99
|
:label="disabilityMultiplyLabel"
|
|
101
100
|
:readonly="readonlyDisabilityMultiply"
|
|
101
|
+
:clearable="!isRecalculationDisabled"
|
|
102
102
|
:rules="whichProduct === 'gons' ? [] : $dataStore.rules.recalculationMultiply"
|
|
103
103
|
/>
|
|
104
104
|
<base-form-input
|
|
105
105
|
v-if="hasDisabilityAdditive"
|
|
106
106
|
v-model="productConditionsForm.disabilityAdditive"
|
|
107
107
|
:maska="$maska.numbers"
|
|
108
|
-
:clearable="isRecalculationDisabled === false"
|
|
109
108
|
:label="$dataStore.t('percent') + `Disability Additive`"
|
|
110
109
|
:readonly="readonlyDisabilityAdditive"
|
|
110
|
+
:clearable="!isRecalculationDisabled"
|
|
111
111
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
112
112
|
/>
|
|
113
113
|
<base-panel-input
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
v-model="productConditionsForm.riskGroup"
|
|
116
116
|
:value="productConditionsForm.riskGroup?.nameRu"
|
|
117
117
|
:label="$dataStore.t('productConditionsForm.riskGroup')"
|
|
118
|
-
:clearable="isRecalculationDisabled === false"
|
|
119
118
|
:readonly="isRecalculationDisabled"
|
|
119
|
+
:clearable="!isRecalculationDisabled"
|
|
120
120
|
append-inner-icon="mdi mdi-chevron-right"
|
|
121
121
|
@append="openPanel($dataStore.t('productConditionsForm.riskGroup'), $dataStore.riskGroup, 'riskGroup')"
|
|
122
122
|
/>
|
|
@@ -134,11 +134,13 @@
|
|
|
134
134
|
<base-form-input
|
|
135
135
|
v-model="productConditionsForm.signDate"
|
|
136
136
|
:maska="$maska.date"
|
|
137
|
-
:clearable="false"
|
|
138
137
|
:readonly="true"
|
|
138
|
+
:clearable="false"
|
|
139
139
|
:label="$dataStore.t('form.signDate')"
|
|
140
140
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
141
141
|
/>
|
|
142
|
+
<!-- $dataStore.t('hint.needToFillPolicyholder') -->
|
|
143
|
+
<base-text-hint v-if="whichProduct === 'gons'" text="Необходимо заполнить данные страхователя" />
|
|
142
144
|
<base-form-input
|
|
143
145
|
v-if="hasBirthDate"
|
|
144
146
|
v-model="productConditionsForm.birthDate"
|
|
@@ -198,7 +200,7 @@
|
|
|
198
200
|
v-model="productConditionsForm.coverPeriod"
|
|
199
201
|
:maska="$maska.numbers"
|
|
200
202
|
:readonly="isDisabledCoverPeriod"
|
|
201
|
-
:clearable="!
|
|
203
|
+
:clearable="!isDisabledCoverPeriod"
|
|
202
204
|
:rules="coverPeriodRule"
|
|
203
205
|
:label="coverPeriodLabel"
|
|
204
206
|
/>
|
|
@@ -228,7 +230,7 @@
|
|
|
228
230
|
<!-- v-if="hasFixInsSum"-->
|
|
229
231
|
<!-- v-model="productConditionsForm.fixInsSum"-->
|
|
230
232
|
<!-- :readonly="isDisabledFixInsSum"-->
|
|
231
|
-
<!-- :clearable="!
|
|
233
|
+
<!-- :clearable="!isDisabledFixInsSum"-->
|
|
232
234
|
<!-- :rules="fixInsSumRule"-->
|
|
233
235
|
<!-- :label="$dataStore.t('productConditionsForm.fixInsSum')"-->
|
|
234
236
|
<!-- :suffix="$constants.currencySymbols.kzt"-->
|
|
@@ -396,19 +398,6 @@
|
|
|
396
398
|
:label="$dataStore.t('pension.disabilityGroup')"
|
|
397
399
|
/>
|
|
398
400
|
</base-form-section>
|
|
399
|
-
<base-form-section v-if="formStore.applicationData.processCode !== 24" :title="$dataStore.t('pension.ENPFnote')" class="mt-[14px]">
|
|
400
|
-
<base-file-input :loading="$dataStore.isLoading" @input.prevent="onFileChange($event)" v-if="!enpfNoteFile" />
|
|
401
|
-
<base-content-block class="!p-0" v-if="!!enpfNoteFile">
|
|
402
|
-
<div :class="[$styles.whiteBg]" class="p-2 h-12 flex items-center relative rounded-[4px]">
|
|
403
|
-
<span class="ml-2">{{ enpfNoteFile.fileName }}</span>
|
|
404
|
-
<i
|
|
405
|
-
class="transition-all cursor-pointer mdi mdi-dots-vertical pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
406
|
-
:class="[$styles.greenTextHover]"
|
|
407
|
-
@click="openFileActionsPanel(enpfNoteFile)"
|
|
408
|
-
></i>
|
|
409
|
-
</div>
|
|
410
|
-
</base-content-block>
|
|
411
|
-
</base-form-section>
|
|
412
401
|
<base-form-section
|
|
413
402
|
v-if="formStore.applicationData.processCode !== 24"
|
|
414
403
|
:title="$dataStore.t('pension.compulsoryAmount&Prof')"
|
|
@@ -438,7 +427,7 @@
|
|
|
438
427
|
v-model="pensionForm.compulsoryProfMonthCount"
|
|
439
428
|
:readonly="true"
|
|
440
429
|
:clearable="false"
|
|
441
|
-
:rules="$dataStore.rules.
|
|
430
|
+
:rules="isCompulsoryProfContractAmount ? $dataStore.rules.required : []"
|
|
442
431
|
:label="$dataStore.t('pension.compulsoryProfMonthCount')"
|
|
443
432
|
/>
|
|
444
433
|
<base-form-input
|
|
@@ -471,6 +460,19 @@
|
|
|
471
460
|
/>
|
|
472
461
|
</base-animation>
|
|
473
462
|
</base-form-section>
|
|
463
|
+
<base-form-section v-if="formStore.applicationData.processCode !== 24" :title="$dataStore.t('pension.ENPFnote')" class="mt-[14px]">
|
|
464
|
+
<base-file-input :loading="$dataStore.isLoading" @input.prevent="onFileChange($event)" v-if="!enpfNoteFile" />
|
|
465
|
+
<base-content-block class="!p-0" v-if="!!enpfNoteFile">
|
|
466
|
+
<div :class="[$styles.whiteBg]" class="p-2 h-12 flex items-center relative rounded-[4px]">
|
|
467
|
+
<span class="ml-2">{{ enpfNoteFile.fileName }}</span>
|
|
468
|
+
<i
|
|
469
|
+
class="transition-all cursor-pointer mdi mdi-dots-vertical pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
470
|
+
:class="[$styles.greenTextHover]"
|
|
471
|
+
@click="openFileActionsPanel(enpfNoteFile)"
|
|
472
|
+
></i>
|
|
473
|
+
</div>
|
|
474
|
+
</base-content-block>
|
|
475
|
+
</base-form-section>
|
|
474
476
|
<base-form-section v-if="formStore.applicationData.processCode !== 24" :title="$dataStore.t('pension.companyName')">
|
|
475
477
|
<base-btn v-if="!isDisabled" :text="$dataStore.t('buttons.add')" :disabled="isDisabled" size="sm" :btn="$styles.blueBtn" @click="addTransferContract" />
|
|
476
478
|
<section v-for="(contract, index) in transferContracts" class="py-2">
|
|
@@ -501,16 +503,18 @@
|
|
|
501
503
|
>до {{ transferMaxDate }} включительно</span
|
|
502
504
|
>
|
|
503
505
|
</div>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
+
<base-form-input
|
|
507
|
+
v-model="contract.transferContractNumber"
|
|
508
|
+
:label="$dataStore.t('pension.globalId')"
|
|
509
|
+
:readonly="isDisabled"
|
|
510
|
+
:clearable="!isDisabled"
|
|
511
|
+
/>
|
|
506
512
|
<base-form-input
|
|
507
513
|
v-model="contract.transferContractRegNumber"
|
|
508
514
|
:label="$dataStore.t('pension.transferRegNumber')"
|
|
509
|
-
:rules="$rules.required"
|
|
510
515
|
:readonly="isDisabled"
|
|
511
516
|
:clearable="!isDisabled"
|
|
512
517
|
/>
|
|
513
|
-
-->
|
|
514
518
|
<base-form-input
|
|
515
519
|
v-model="contract.transferContractFirstPaymentDate"
|
|
516
520
|
:maska="$maska.date"
|
|
@@ -530,14 +534,20 @@
|
|
|
530
534
|
@input="onInputPension($event, 'transferContractAmount', index)"
|
|
531
535
|
@onClear="onClearPension('transferContractAmount', index)"
|
|
532
536
|
/>
|
|
533
|
-
|
|
534
|
-
<
|
|
535
|
-
v-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
537
|
+
<base-form-toggle v-model="contract.transferContractIsOppv" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('pension.isOPPVTransfer')" />
|
|
538
|
+
<div class="flex items-center gap-[8px] mt-2">
|
|
539
|
+
<v-icon class="text-[#99A3B3] text-[20px]">mdi-information-outline</v-icon>
|
|
540
|
+
<p class="font-normal text-[14px] leading-[20px] tracking-[0.25px] text-[#99A3B3]">
|
|
541
|
+
Если выкупная сумма содержит ОППВ, необходимо приложить развернутую выписку из ЕНПФ.
|
|
542
|
+
</p>
|
|
543
|
+
</div>
|
|
544
|
+
<!-- <base-form-input-->
|
|
545
|
+
<!-- v-if="contract.transferContractIsOppv"-->
|
|
546
|
+
<!-- v-model="contract.transferContractMonthCount"-->
|
|
547
|
+
<!-- :disabled="$dataStore.isLoading"-->
|
|
548
|
+
<!-- :rules="$rules.required.concat($rules.notZero, $rules.numbers)"-->
|
|
549
|
+
<!-- :label="$dataStore.t('pension.compulsoryProfMonthCount')"-->
|
|
550
|
+
<!-- />-->
|
|
541
551
|
<base-btn
|
|
542
552
|
v-if="!isDisabled"
|
|
543
553
|
class="mt-3"
|
|
@@ -759,6 +769,7 @@
|
|
|
759
769
|
v-if="calculatorForm.type.code === 'Single'"
|
|
760
770
|
v-model="calculatorForm.days"
|
|
761
771
|
:readonly="isDisabled || !isCalculator"
|
|
772
|
+
:clearable="!isDisabled && isCalculator"
|
|
762
773
|
:label="$dataStore.t('calculatorForm.days')"
|
|
763
774
|
:rules="$rules.required"
|
|
764
775
|
/>
|
|
@@ -767,7 +778,7 @@
|
|
|
767
778
|
v-model="calculatorForm.age"
|
|
768
779
|
:rules="$rules.required"
|
|
769
780
|
:readonly="isDisabledSum"
|
|
770
|
-
:clearable="!
|
|
781
|
+
:clearable="!isDisabledSum"
|
|
771
782
|
:label="$dataStore.t('calculatorForm.age')"
|
|
772
783
|
/>
|
|
773
784
|
<base-form-input
|
|
@@ -805,7 +816,7 @@
|
|
|
805
816
|
v-model="additionalTerms[index]"
|
|
806
817
|
:value="locale === 'ru' ? term.coverSumName : term.coverSumNameKz"
|
|
807
818
|
:readonly="isTermsDisabled"
|
|
808
|
-
:clearable="
|
|
819
|
+
:clearable="!isTermsDisabled"
|
|
809
820
|
:label="coverTypeName(term)"
|
|
810
821
|
append-inner-icon="mdi mdi-chevron-right"
|
|
811
822
|
:suffix="
|
|
@@ -818,6 +829,38 @@
|
|
|
818
829
|
@append="openTermPanel(coverTypeName(term), $dataStore.getAdditionalInsuranceTermsAnswers, term.coverTypeId, index)"
|
|
819
830
|
/>
|
|
820
831
|
</div>
|
|
832
|
+
<template v-if="whichProduct === 'halykkazyna'">
|
|
833
|
+
<base-form-toggle
|
|
834
|
+
v-model="productConditionsForm.managerHelped"
|
|
835
|
+
:has-border="false"
|
|
836
|
+
:title="$dataStore.t('Вам помогал менеджер?')"
|
|
837
|
+
height="min-h-[56px]"
|
|
838
|
+
/>
|
|
839
|
+
<base-panel-input
|
|
840
|
+
v-if="isDisabled"
|
|
841
|
+
v-model="productConditionsForm.hasEnhancedGift"
|
|
842
|
+
:value="productConditionsForm.hasEnhancedGift ? 'включено' : 'не включено'"
|
|
843
|
+
:readonly="true"
|
|
844
|
+
:clearable="false"
|
|
845
|
+
label="Подарочный сертификат"
|
|
846
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
847
|
+
/>
|
|
848
|
+
<base-form-toggle
|
|
849
|
+
v-else
|
|
850
|
+
v-model="productConditionsForm.hasEnhancedGift"
|
|
851
|
+
:disabled="enhancedGiftDisabled"
|
|
852
|
+
:showValue="false"
|
|
853
|
+
:has-border="false"
|
|
854
|
+
:title="$dataStore.t('Получить «Подарочный сертификат»')"
|
|
855
|
+
height="min-h-[56px]"
|
|
856
|
+
/>
|
|
857
|
+
<div class="flex items-center gap-[8px] mt-2">
|
|
858
|
+
<v-icon class="text-[#99A3B3] text-[20px]">mdi-information-outline</v-icon>
|
|
859
|
+
<p class="font-normal text-[14px] leading-[20px] tracking-[0.25px] text-[#99A3B3]">
|
|
860
|
+
Доступно, если размер страховой премии больше {{ $dataStore.getNumberWithSpaces(minEnhancedGiftSum) }} тенге или {{ $dataStore.getNumberWithSpaces(minEnhancedGiftSumInUsd) }} долларов.
|
|
861
|
+
</p>
|
|
862
|
+
</div>
|
|
863
|
+
</template>
|
|
821
864
|
</base-form-section>
|
|
822
865
|
</v-form>
|
|
823
866
|
<base-animation>
|
|
@@ -997,6 +1040,8 @@
|
|
|
997
1040
|
import { Member, Value, CountryValue, CalculatorForm, TransferContract, DocumentItem } from '../../composables/classes';
|
|
998
1041
|
import type { Projects, AddCover, AddCoverAnswer, FileActions } from '../../types';
|
|
999
1042
|
import { useI18n } from 'vue-i18n';
|
|
1043
|
+
import { getNumber, parseAmount } from '../../composables';
|
|
1044
|
+
import { uuid } from 'vue-uuid';
|
|
1000
1045
|
|
|
1001
1046
|
type PensionCalculation = {
|
|
1002
1047
|
compulsoryContractAmount: number | string | null;
|
|
@@ -1101,7 +1146,13 @@ export default defineComponent({
|
|
|
1101
1146
|
return disabilityGroup;
|
|
1102
1147
|
}
|
|
1103
1148
|
});
|
|
1104
|
-
const enpfNoteFile = computed(() =>
|
|
1149
|
+
const enpfNoteFile = computed(() => {
|
|
1150
|
+
if(useEnv().isProduction) {
|
|
1151
|
+
return formStore.signedDocumentList.find(i => i.fileTypeCode === '8' && i.iin === contragentData.value?.iin)
|
|
1152
|
+
} else {
|
|
1153
|
+
return formStore.signedDocumentList.find(i => i.fileTypeCode === '8')
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1105
1156
|
const isEnpfSum = pensionForm.value?.isEnpfSum ?? false;
|
|
1106
1157
|
|
|
1107
1158
|
const transferContracts = ref<TransferContract[]>([]);
|
|
@@ -1118,6 +1169,7 @@ export default defineComponent({
|
|
|
1118
1169
|
const firstAmount = ref<boolean>(true);
|
|
1119
1170
|
const isHalykBank = formStore.lfb.policyholder.clientData.iin.replace(/-/g, '') === '940140000385';
|
|
1120
1171
|
const closeDate = ref<any>('');
|
|
1172
|
+
const minEnhancedGiftSum = 10_000_000
|
|
1121
1173
|
|
|
1122
1174
|
const checkTransferContractDate = (val: any) => {
|
|
1123
1175
|
if (val) {
|
|
@@ -1131,6 +1183,17 @@ export default defineComponent({
|
|
|
1131
1183
|
}
|
|
1132
1184
|
};
|
|
1133
1185
|
|
|
1186
|
+
const minEnhancedGiftSumInUsd = computed(() => {
|
|
1187
|
+
if(typeof dataStore.currencies.usd === 'number') {
|
|
1188
|
+
return Math.round(minEnhancedGiftSum / dataStore.currencies.usd)
|
|
1189
|
+
}
|
|
1190
|
+
})
|
|
1191
|
+
const enhancedGiftDisabled = computed(() => {
|
|
1192
|
+
const insurancePremium = parseAmount(productConditionsForm.insurancePremiumPerMonth)
|
|
1193
|
+
|
|
1194
|
+
return (!insurancePremium || insurancePremium < minEnhancedGiftSum) ||
|
|
1195
|
+
(!productConditionsForm.coverPeriod || productConditionsForm.coverPeriod < 1 || productConditionsForm.coverPeriod > 5)
|
|
1196
|
+
})
|
|
1134
1197
|
const isShownAdditionalTerms = computed(() => {
|
|
1135
1198
|
if (whichProduct.value === 'gons') {
|
|
1136
1199
|
return false;
|
|
@@ -1197,6 +1260,9 @@ export default defineComponent({
|
|
|
1197
1260
|
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && productConditionsForm.requestedSumInsured === null) {
|
|
1198
1261
|
return !!productConditionsForm.insurancePremiumPerMonth;
|
|
1199
1262
|
}
|
|
1263
|
+
if (whichProduct.value === 'gons') {
|
|
1264
|
+
return false
|
|
1265
|
+
}
|
|
1200
1266
|
return !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth;
|
|
1201
1267
|
});
|
|
1202
1268
|
const hasProcessIndexRate = computed(() => {
|
|
@@ -1541,6 +1607,14 @@ export default defineComponent({
|
|
|
1541
1607
|
dataStore.getNumberWithSpaces(formatSpacedNumber(formStore.pensionApp?.amount) + formatSpacedNumber(formStore.pensionApp.slave?.amount)),
|
|
1542
1608
|
);
|
|
1543
1609
|
|
|
1610
|
+
const isCompulsoryProfContractAmount = computed(() => {
|
|
1611
|
+
return Number(cleanWhiteSpace(pensionForm.value.compulsoryProfContractAmount)) > 0
|
|
1612
|
+
})
|
|
1613
|
+
|
|
1614
|
+
const transferContractsHasOppv = computed(() => {
|
|
1615
|
+
return transferContracts.value.length && transferContracts.value.some(item => item.transferContractIsOppv)
|
|
1616
|
+
})
|
|
1617
|
+
|
|
1544
1618
|
const getContragent = async () => {
|
|
1545
1619
|
const data = await dataStore.api.getContragentById(
|
|
1546
1620
|
Number(route.query.which !== 'slave' ? formStore.applicationData.clientApp.insisId : formStore.applicationData.slave.clientApp.insisId),
|
|
@@ -1676,7 +1750,7 @@ export default defineComponent({
|
|
|
1676
1750
|
|
|
1677
1751
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1678
1752
|
if (termValue.value && item.code === 'fixedinssum') {
|
|
1679
|
-
if (termValue.value.coverTypeCode === 11) {
|
|
1753
|
+
if (termValue.value.coverTypeCode === 11 || termValue.value.coverTypeCode === 4) {
|
|
1680
1754
|
subPanelList.value = constants.fixInsAmount.slice(0, 5);
|
|
1681
1755
|
} else if (termValue.value.coverTypeCode !== 19) {
|
|
1682
1756
|
subPanelList.value = constants.fixInsAmount.slice(0, 10);
|
|
@@ -2055,17 +2129,39 @@ export default defineComponent({
|
|
|
2055
2129
|
return true;
|
|
2056
2130
|
};
|
|
2057
2131
|
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2132
|
+
const isTruthyNumber = (value: any): boolean => {
|
|
2133
|
+
const num = Number(value?.toString().replace(/\s/g, ''));
|
|
2134
|
+
return !!num;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
const doesNeedEnpfNoteFile = (): boolean => {
|
|
2138
|
+
let needFile = false
|
|
2139
|
+
|
|
2140
|
+
if(
|
|
2141
|
+
dataStore.isProcessEditable(formStore.applicationData.statusCode) &&
|
|
2142
|
+
(isTruthyNumber(pensionForm.value.compulsoryProfContractAmount) ||
|
|
2143
|
+
isTruthyNumber(pensionForm.value.compulsoryContractAmount) ||
|
|
2144
|
+
transferContractsHasOppv.value
|
|
2145
|
+
)
|
|
2064
2146
|
) {
|
|
2065
|
-
|
|
2147
|
+
needFile = true
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
return needFile;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
const submitForm = async () => {
|
|
2154
|
+
if (whichProduct.value === 'pensionannuitynew') {
|
|
2155
|
+
const needsEnpfNoteFile = doesNeedEnpfNoteFile()
|
|
2156
|
+
if(needsEnpfNoteFile && !enpfNoteFile.value) {
|
|
2066
2157
|
dataStore.showToaster('error', 'Необходимо вложить Выписка ЕНПФ');
|
|
2067
2158
|
return;
|
|
2068
2159
|
}
|
|
2160
|
+
const isValid = !!(formatSpacedNumber(pensionForm.value.compulsoryContractAmount) || formatSpacedNumber(pensionForm.value.compulsoryProfContractAmount) || transferContracts.value?.length)
|
|
2161
|
+
if(formStore.applicationData.processCode !== 24 && !isValid) {
|
|
2162
|
+
dataStore.showToaster('error', 'Отказ')
|
|
2163
|
+
return
|
|
2164
|
+
}
|
|
2069
2165
|
}
|
|
2070
2166
|
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
2071
2167
|
if (v.valid) {
|
|
@@ -2104,7 +2200,7 @@ export default defineComponent({
|
|
|
2104
2200
|
}
|
|
2105
2201
|
});
|
|
2106
2202
|
}
|
|
2107
|
-
if (!pensionForm.value.compulsoryProfContractAmount) pensionForm.value.compulsoryProfMonthCount =
|
|
2203
|
+
if (!pensionForm.value.compulsoryProfContractAmount) pensionForm.value.compulsoryProfMonthCount = 0;
|
|
2108
2204
|
const pensionData = {
|
|
2109
2205
|
...pensionForm.value,
|
|
2110
2206
|
...{
|
|
@@ -2330,18 +2426,48 @@ export default defineComponent({
|
|
|
2330
2426
|
if (file.type !== constants.fileTypes.pdf) {
|
|
2331
2427
|
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
2332
2428
|
}
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2429
|
+
dataStore.isLoading = true;
|
|
2430
|
+
try {
|
|
2431
|
+
if(isCompulsoryProfContractAmount.value || transferContractsHasOppv.value) {
|
|
2432
|
+
await setOppvCount(file)
|
|
2433
|
+
} else {
|
|
2434
|
+
await uploadFile(file)
|
|
2435
|
+
}
|
|
2339
2436
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2340
2437
|
dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
|
|
2438
|
+
} finally {
|
|
2439
|
+
dataStore.isLoading = false;
|
|
2341
2440
|
}
|
|
2342
2441
|
}
|
|
2343
2442
|
}
|
|
2344
2443
|
};
|
|
2444
|
+
const setOppvCount = async (file: File) => {
|
|
2445
|
+
const result = await dataStore.setOppvCount(
|
|
2446
|
+
{ file },
|
|
2447
|
+
isSlavePensionForm.value ? formStore.applicationData.slave.processInstanceId : formStore.applicationData.processInstanceId,
|
|
2448
|
+
);
|
|
2449
|
+
if (typeof result === 'number') {
|
|
2450
|
+
pensionForm.value.compulsoryProfMonthCount = result;
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
const uploadFile = async (file: File) => {
|
|
2454
|
+
const formData = new FormData();
|
|
2455
|
+
const information: any = [];
|
|
2456
|
+
const uuidV4 = uuid.v4();
|
|
2457
|
+
formData.append('file', file);
|
|
2458
|
+
const ext = file.name.substring(file.name.lastIndexOf('.'));
|
|
2459
|
+
const selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === '8');
|
|
2460
|
+
information.push({
|
|
2461
|
+
identifier: `${uuidV4}${ext}`,
|
|
2462
|
+
iin: contragentData.value?.iin ? contragentData.value?.iin.replaceAll('-', '') : null,
|
|
2463
|
+
processInstanceId: formStore.applicationData.processInstanceId,
|
|
2464
|
+
fileTypeCode: selectedDocument ? selectedDocument.code : null,
|
|
2465
|
+
fileTypeId: selectedDocument ? selectedDocument.id : null,
|
|
2466
|
+
fileName: file.name,
|
|
2467
|
+
});
|
|
2468
|
+
formData.append('fileData', JSON.stringify(information));
|
|
2469
|
+
await dataStore.uploadFiles(formData, false);
|
|
2470
|
+
}
|
|
2345
2471
|
const openFileActionsPanel = async (document: DocumentItem) => {
|
|
2346
2472
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
2347
2473
|
dataStore.rightPanel.open = true;
|
|
@@ -2364,11 +2490,13 @@ export default defineComponent({
|
|
|
2364
2490
|
iin: enpfNoteFile.value.iin ?? '',
|
|
2365
2491
|
};
|
|
2366
2492
|
await dataStore.deleteFile(data);
|
|
2493
|
+
formStore.signedDocumentList = formStore.signedDocumentList.filter(doc => doc.id !== data.id)
|
|
2367
2494
|
deletionDialog.value = false;
|
|
2368
2495
|
isFileActionsPanelOpen.value = false;
|
|
2369
2496
|
dataStore.rightPanel.open = false;
|
|
2370
2497
|
dataStore.panelAction = null;
|
|
2371
|
-
|
|
2498
|
+
await dataStore.api.pensionannuityNew.resetApplicationData(formStore.applicationData.processInstanceId);
|
|
2499
|
+
await dataStore.getApplicationData(String(route.params.taskId), false, false, false, true);
|
|
2372
2500
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2373
2501
|
}
|
|
2374
2502
|
};
|
|
@@ -2415,12 +2543,12 @@ export default defineComponent({
|
|
|
2415
2543
|
}
|
|
2416
2544
|
}
|
|
2417
2545
|
additionalTerms.value = props.isCalculator ? formStore.additionalInsuranceTermsWithout : formStore.additionalInsuranceTerms;
|
|
2418
|
-
if (!!productConditionsForm.insurancePremiumPerMonth) {
|
|
2419
|
-
whichSum.value = 'insurancePremiumPerMonth';
|
|
2420
|
-
}
|
|
2421
2546
|
if (!!productConditionsForm.requestedSumInsured) {
|
|
2422
2547
|
whichSum.value = 'requestedSumInsured';
|
|
2423
2548
|
}
|
|
2549
|
+
if (!!productConditionsForm.insurancePremiumPerMonth) {
|
|
2550
|
+
whichSum.value = 'insurancePremiumPerMonth';
|
|
2551
|
+
}
|
|
2424
2552
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
2425
2553
|
if (!productConditionsForm.requestedSumInsured) {
|
|
2426
2554
|
whichSum.value = 'requestedSumInsured';
|
|
@@ -2454,7 +2582,8 @@ export default defineComponent({
|
|
|
2454
2582
|
);
|
|
2455
2583
|
}
|
|
2456
2584
|
if (whichProduct.value === 'gons') {
|
|
2457
|
-
|
|
2585
|
+
const response = await dataStore.api.availableToAccureStartEducationalCapital(formStore.applicationData.processInstanceId);
|
|
2586
|
+
hasEduCapitalConsent.value = response.isAllowed;
|
|
2458
2587
|
}
|
|
2459
2588
|
if (whichProduct.value === 'pensionannuitynew') {
|
|
2460
2589
|
contractDate.value = reformatDate(pensionForm.value.contractDate ?? '');
|
|
@@ -2480,6 +2609,7 @@ export default defineComponent({
|
|
|
2480
2609
|
});
|
|
2481
2610
|
});
|
|
2482
2611
|
}
|
|
2612
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2483
2613
|
}
|
|
2484
2614
|
} catch (err) {
|
|
2485
2615
|
console.log(err);
|
|
@@ -2673,6 +2803,25 @@ export default defineComponent({
|
|
|
2673
2803
|
);
|
|
2674
2804
|
}
|
|
2675
2805
|
|
|
2806
|
+
if(whichProduct.value === 'halykkazyna') {
|
|
2807
|
+
watch(
|
|
2808
|
+
() => productConditionsForm.coverPeriod,
|
|
2809
|
+
(val) => {
|
|
2810
|
+
if(!val || val > 5) {
|
|
2811
|
+
productConditionsForm.hasEnhancedGift = false
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
);
|
|
2815
|
+
watch(
|
|
2816
|
+
() => productConditionsForm.insurancePremiumPerMonth,
|
|
2817
|
+
(val) => {
|
|
2818
|
+
if(!val || Number(val) < minEnhancedGiftSum) {
|
|
2819
|
+
productConditionsForm.hasEnhancedGift = false
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
)
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2676
2825
|
const copyRedirect = async () => {
|
|
2677
2826
|
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(pensionForm.value.processInstanceId));
|
|
2678
2827
|
dataStore.copyToClipboard(url.redirectUrl);
|
|
@@ -2727,6 +2876,7 @@ export default defineComponent({
|
|
|
2727
2876
|
contractIndex,
|
|
2728
2877
|
contragentData,
|
|
2729
2878
|
customPension,
|
|
2879
|
+
minEnhancedGiftSum,
|
|
2730
2880
|
|
|
2731
2881
|
// Computed
|
|
2732
2882
|
isTask,
|
|
@@ -2797,6 +2947,9 @@ export default defineComponent({
|
|
|
2797
2947
|
isSlavePensionForm,
|
|
2798
2948
|
dividendPeriods,
|
|
2799
2949
|
dividendSchedules,
|
|
2950
|
+
enhancedGiftDisabled,
|
|
2951
|
+
minEnhancedGiftSumInUsd,
|
|
2952
|
+
isCompulsoryProfContractAmount,
|
|
2800
2953
|
|
|
2801
2954
|
// Rules
|
|
2802
2955
|
fixInsSumRule,
|
package/composables/classes.ts
CHANGED
|
@@ -834,6 +834,9 @@ export class ProductConditions {
|
|
|
834
834
|
contractEndDate: string | null;
|
|
835
835
|
currency: Value;
|
|
836
836
|
accureStartEducationCapital: boolean;
|
|
837
|
+
hasEnhancedGift: boolean | null;
|
|
838
|
+
isCalculated: boolean | null;
|
|
839
|
+
managerHelped: boolean;
|
|
837
840
|
|
|
838
841
|
constructor(
|
|
839
842
|
insuranceCase = null,
|
|
@@ -885,6 +888,9 @@ export class ProductConditions {
|
|
|
885
888
|
contractEndDate = null,
|
|
886
889
|
currency = new Value(),
|
|
887
890
|
accureStartEducationCapital = false,
|
|
891
|
+
hasEnhancedGift = false,
|
|
892
|
+
isCalculated = false,
|
|
893
|
+
managerHelped = true,
|
|
888
894
|
) {
|
|
889
895
|
this.requestedSumInsuredInDollar = null;
|
|
890
896
|
this.insurancePremiumPerMonthInDollar = null;
|
|
@@ -940,6 +946,9 @@ export class ProductConditions {
|
|
|
940
946
|
this.contractEndDate = contractEndDate;
|
|
941
947
|
this.currency = currency;
|
|
942
948
|
this.accureStartEducationCapital = accureStartEducationCapital;
|
|
949
|
+
this.hasEnhancedGift = hasEnhancedGift;
|
|
950
|
+
this.isCalculated = isCalculated;
|
|
951
|
+
this.managerHelped = managerHelped;
|
|
943
952
|
}
|
|
944
953
|
|
|
945
954
|
getSingleTripDays() {
|
|
@@ -1139,6 +1148,10 @@ export class DataStoreClass {
|
|
|
1139
1148
|
sportsTypes: Value[];
|
|
1140
1149
|
purposes: Value[];
|
|
1141
1150
|
programType: Value[];
|
|
1151
|
+
checkWithESBD: boolean;
|
|
1152
|
+
isDirty: boolean;
|
|
1153
|
+
quitDialog: boolean;
|
|
1154
|
+
pendingTab: any;
|
|
1142
1155
|
constructor() {
|
|
1143
1156
|
this.projectConfig = null;
|
|
1144
1157
|
this.filters = {
|
|
@@ -1342,6 +1355,10 @@ export class DataStoreClass {
|
|
|
1342
1355
|
this.purposes = [];
|
|
1343
1356
|
this.workTypes = [];
|
|
1344
1357
|
this.sportsTypes = [];
|
|
1358
|
+
this.checkWithESBD = false;
|
|
1359
|
+
this.isDirty = false;
|
|
1360
|
+
this.quitDialog = false;
|
|
1361
|
+
this.pendingTab = null;
|
|
1345
1362
|
}
|
|
1346
1363
|
}
|
|
1347
1364
|
|