hl-core 0.0.10-beta.63 → 0.0.10-beta.65
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 +34 -1
- package/api/interceptors.ts +166 -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 +255 -66
- package/components/Panel/PanelHandler.vue +1 -1
- package/composables/classes.ts +17 -0
- package/composables/constants.ts +1 -0
- package/composables/index.ts +42 -3
- package/layouts/default.vue +1 -1
- package/locales/kz.json +2 -1
- package/locales/ru.json +18 -4
- package/package.json +1 -1
- package/store/data.store.ts +53 -15
- package/store/rules.ts +15 -0
- package/types/enum.ts +6 -0
- package/types/index.ts +3 -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"
|
|
@@ -179,7 +181,8 @@
|
|
|
179
181
|
:readonly="isDisabledInsStartDate"
|
|
180
182
|
:clearable="!isDisabledInsStartDate"
|
|
181
183
|
:label="$dataStore.t('labels.insuranceStartDate')"
|
|
182
|
-
:rules="$rules.
|
|
184
|
+
:rules="[...$rules.required, formStore.lfb.add ? [] : $rules.checkDateIsAfterOrSame(productConditionsForm.calcDate, closeDate)]"
|
|
185
|
+
:min-date="closeDate ?? undefined"
|
|
183
186
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
184
187
|
/>
|
|
185
188
|
<base-form-input
|
|
@@ -197,7 +200,7 @@
|
|
|
197
200
|
v-model="productConditionsForm.coverPeriod"
|
|
198
201
|
:maska="$maska.numbers"
|
|
199
202
|
:readonly="isDisabledCoverPeriod"
|
|
200
|
-
:clearable="!
|
|
203
|
+
:clearable="!isDisabledCoverPeriod"
|
|
201
204
|
:rules="coverPeriodRule"
|
|
202
205
|
:label="coverPeriodLabel"
|
|
203
206
|
/>
|
|
@@ -227,7 +230,7 @@
|
|
|
227
230
|
<!-- v-if="hasFixInsSum"-->
|
|
228
231
|
<!-- v-model="productConditionsForm.fixInsSum"-->
|
|
229
232
|
<!-- :readonly="isDisabledFixInsSum"-->
|
|
230
|
-
<!-- :clearable="!
|
|
233
|
+
<!-- :clearable="!isDisabledFixInsSum"-->
|
|
231
234
|
<!-- :rules="fixInsSumRule"-->
|
|
232
235
|
<!-- :label="$dataStore.t('productConditionsForm.fixInsSum')"-->
|
|
233
236
|
<!-- :suffix="$constants.currencySymbols.kzt"-->
|
|
@@ -395,19 +398,6 @@
|
|
|
395
398
|
:label="$dataStore.t('pension.disabilityGroup')"
|
|
396
399
|
/>
|
|
397
400
|
</base-form-section>
|
|
398
|
-
<base-form-section v-if="formStore.applicationData.processCode !== 24" :title="$dataStore.t('pension.ENPFnote')" class="mt-[14px]">
|
|
399
|
-
<base-file-input :loading="$dataStore.isLoading" @input.prevent="onFileChange($event)" v-if="!enpfNoteFile" />
|
|
400
|
-
<base-content-block class="!p-0" v-if="!!enpfNoteFile">
|
|
401
|
-
<div :class="[$styles.whiteBg]" class="p-2 h-12 flex items-center relative rounded-[4px]">
|
|
402
|
-
<span class="ml-2">{{ enpfNoteFile.fileName }}</span>
|
|
403
|
-
<i
|
|
404
|
-
class="transition-all cursor-pointer mdi mdi-dots-vertical pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
405
|
-
:class="[$styles.greenTextHover]"
|
|
406
|
-
@click="openFileActionsPanel(enpfNoteFile)"
|
|
407
|
-
></i>
|
|
408
|
-
</div>
|
|
409
|
-
</base-content-block>
|
|
410
|
-
</base-form-section>
|
|
411
401
|
<base-form-section
|
|
412
402
|
v-if="formStore.applicationData.processCode !== 24"
|
|
413
403
|
:title="$dataStore.t('pension.compulsoryAmount&Prof')"
|
|
@@ -437,7 +427,7 @@
|
|
|
437
427
|
v-model="pensionForm.compulsoryProfMonthCount"
|
|
438
428
|
:readonly="true"
|
|
439
429
|
:clearable="false"
|
|
440
|
-
:rules="$dataStore.rules.
|
|
430
|
+
:rules="isCompulsoryProfContractAmount ? $dataStore.rules.required : []"
|
|
441
431
|
:label="$dataStore.t('pension.compulsoryProfMonthCount')"
|
|
442
432
|
/>
|
|
443
433
|
<base-form-input
|
|
@@ -470,6 +460,19 @@
|
|
|
470
460
|
/>
|
|
471
461
|
</base-animation>
|
|
472
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>
|
|
473
476
|
<base-form-section v-if="formStore.applicationData.processCode !== 24" :title="$dataStore.t('pension.companyName')">
|
|
474
477
|
<base-btn v-if="!isDisabled" :text="$dataStore.t('buttons.add')" :disabled="isDisabled" size="sm" :btn="$styles.blueBtn" @click="addTransferContract" />
|
|
475
478
|
<section v-for="(contract, index) in transferContracts" class="py-2">
|
|
@@ -500,16 +503,18 @@
|
|
|
500
503
|
>до {{ transferMaxDate }} включительно</span
|
|
501
504
|
>
|
|
502
505
|
</div>
|
|
503
|
-
|
|
504
|
-
|
|
506
|
+
<base-form-input
|
|
507
|
+
v-model="contract.transferContractNumber"
|
|
508
|
+
:label="$dataStore.t('pension.globalId')"
|
|
509
|
+
:readonly="isDisabled"
|
|
510
|
+
:clearable="!isDisabled"
|
|
511
|
+
/>
|
|
505
512
|
<base-form-input
|
|
506
513
|
v-model="contract.transferContractRegNumber"
|
|
507
514
|
:label="$dataStore.t('pension.transferRegNumber')"
|
|
508
|
-
:rules="$rules.required"
|
|
509
515
|
:readonly="isDisabled"
|
|
510
516
|
:clearable="!isDisabled"
|
|
511
517
|
/>
|
|
512
|
-
-->
|
|
513
518
|
<base-form-input
|
|
514
519
|
v-model="contract.transferContractFirstPaymentDate"
|
|
515
520
|
:maska="$maska.date"
|
|
@@ -529,14 +534,20 @@
|
|
|
529
534
|
@input="onInputPension($event, 'transferContractAmount', index)"
|
|
530
535
|
@onClear="onClearPension('transferContractAmount', index)"
|
|
531
536
|
/>
|
|
532
|
-
|
|
533
|
-
<
|
|
534
|
-
v-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
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
|
+
<!-- />-->
|
|
540
551
|
<base-btn
|
|
541
552
|
v-if="!isDisabled"
|
|
542
553
|
class="mt-3"
|
|
@@ -758,6 +769,7 @@
|
|
|
758
769
|
v-if="calculatorForm.type.code === 'Single'"
|
|
759
770
|
v-model="calculatorForm.days"
|
|
760
771
|
:readonly="isDisabled || !isCalculator"
|
|
772
|
+
:clearable="!isDisabled && isCalculator"
|
|
761
773
|
:label="$dataStore.t('calculatorForm.days')"
|
|
762
774
|
:rules="$rules.required"
|
|
763
775
|
/>
|
|
@@ -766,7 +778,7 @@
|
|
|
766
778
|
v-model="calculatorForm.age"
|
|
767
779
|
:rules="$rules.required"
|
|
768
780
|
:readonly="isDisabledSum"
|
|
769
|
-
:clearable="!
|
|
781
|
+
:clearable="!isDisabledSum"
|
|
770
782
|
:label="$dataStore.t('calculatorForm.age')"
|
|
771
783
|
/>
|
|
772
784
|
<base-form-input
|
|
@@ -804,7 +816,7 @@
|
|
|
804
816
|
v-model="additionalTerms[index]"
|
|
805
817
|
:value="locale === 'ru' ? term.coverSumName : term.coverSumNameKz"
|
|
806
818
|
:readonly="isTermsDisabled"
|
|
807
|
-
:clearable="
|
|
819
|
+
:clearable="!isTermsDisabled"
|
|
808
820
|
:label="coverTypeName(term)"
|
|
809
821
|
append-inner-icon="mdi mdi-chevron-right"
|
|
810
822
|
:suffix="
|
|
@@ -817,6 +829,38 @@
|
|
|
817
829
|
@append="openTermPanel(coverTypeName(term), $dataStore.getAdditionalInsuranceTermsAnswers, term.coverTypeId, index)"
|
|
818
830
|
/>
|
|
819
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>
|
|
820
864
|
</base-form-section>
|
|
821
865
|
</v-form>
|
|
822
866
|
<base-animation>
|
|
@@ -996,6 +1040,8 @@
|
|
|
996
1040
|
import { Member, Value, CountryValue, CalculatorForm, TransferContract, DocumentItem } from '../../composables/classes';
|
|
997
1041
|
import type { Projects, AddCover, AddCoverAnswer, FileActions } from '../../types';
|
|
998
1042
|
import { useI18n } from 'vue-i18n';
|
|
1043
|
+
import { getNumber, parseAmount } from '../../composables';
|
|
1044
|
+
import { uuid } from 'vue-uuid';
|
|
999
1045
|
|
|
1000
1046
|
type PensionCalculation = {
|
|
1001
1047
|
compulsoryContractAmount: number | string | null;
|
|
@@ -1100,7 +1146,13 @@ export default defineComponent({
|
|
|
1100
1146
|
return disabilityGroup;
|
|
1101
1147
|
}
|
|
1102
1148
|
});
|
|
1103
|
-
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
|
+
});
|
|
1104
1156
|
const isEnpfSum = pensionForm.value?.isEnpfSum ?? false;
|
|
1105
1157
|
|
|
1106
1158
|
const transferContracts = ref<TransferContract[]>([]);
|
|
@@ -1116,6 +1168,8 @@ export default defineComponent({
|
|
|
1116
1168
|
const transferSum = ref<number>(0);
|
|
1117
1169
|
const firstAmount = ref<boolean>(true);
|
|
1118
1170
|
const isHalykBank = formStore.lfb.policyholder.clientData.iin.replace(/-/g, '') === '940140000385';
|
|
1171
|
+
const closeDate = ref<any>('');
|
|
1172
|
+
const minEnhancedGiftSum = 10_000_000
|
|
1119
1173
|
|
|
1120
1174
|
const checkTransferContractDate = (val: any) => {
|
|
1121
1175
|
if (val) {
|
|
@@ -1129,6 +1183,17 @@ export default defineComponent({
|
|
|
1129
1183
|
}
|
|
1130
1184
|
};
|
|
1131
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
|
+
})
|
|
1132
1197
|
const isShownAdditionalTerms = computed(() => {
|
|
1133
1198
|
if (whichProduct.value === 'gons') {
|
|
1134
1199
|
return false;
|
|
@@ -1195,6 +1260,9 @@ export default defineComponent({
|
|
|
1195
1260
|
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && productConditionsForm.requestedSumInsured === null) {
|
|
1196
1261
|
return !!productConditionsForm.insurancePremiumPerMonth;
|
|
1197
1262
|
}
|
|
1263
|
+
if (whichProduct.value === 'gons') {
|
|
1264
|
+
return false
|
|
1265
|
+
}
|
|
1198
1266
|
return !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth;
|
|
1199
1267
|
});
|
|
1200
1268
|
const hasProcessIndexRate = computed(() => {
|
|
@@ -1539,6 +1607,14 @@ export default defineComponent({
|
|
|
1539
1607
|
dataStore.getNumberWithSpaces(formatSpacedNumber(formStore.pensionApp?.amount) + formatSpacedNumber(formStore.pensionApp.slave?.amount)),
|
|
1540
1608
|
);
|
|
1541
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
|
+
|
|
1542
1618
|
const getContragent = async () => {
|
|
1543
1619
|
const data = await dataStore.api.getContragentById(
|
|
1544
1620
|
Number(route.query.which !== 'slave' ? formStore.applicationData.clientApp.insisId : formStore.applicationData.slave.clientApp.insisId),
|
|
@@ -1674,7 +1750,7 @@ export default defineComponent({
|
|
|
1674
1750
|
|
|
1675
1751
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1676
1752
|
if (termValue.value && item.code === 'fixedinssum') {
|
|
1677
|
-
if (termValue.value.coverTypeCode === 11) {
|
|
1753
|
+
if (termValue.value.coverTypeCode === 11 || termValue.value.coverTypeCode === 4) {
|
|
1678
1754
|
subPanelList.value = constants.fixInsAmount.slice(0, 5);
|
|
1679
1755
|
} else if (termValue.value.coverTypeCode !== 19) {
|
|
1680
1756
|
subPanelList.value = constants.fixInsAmount.slice(0, 10);
|
|
@@ -2053,17 +2129,39 @@ export default defineComponent({
|
|
|
2053
2129
|
return true;
|
|
2054
2130
|
};
|
|
2055
2131
|
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
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
|
+
)
|
|
2062
2146
|
) {
|
|
2063
|
-
|
|
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) {
|
|
2064
2157
|
dataStore.showToaster('error', 'Необходимо вложить Выписка ЕНПФ');
|
|
2065
2158
|
return;
|
|
2066
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
|
+
}
|
|
2067
2165
|
}
|
|
2068
2166
|
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
2069
2167
|
if (v.valid) {
|
|
@@ -2102,7 +2200,7 @@ export default defineComponent({
|
|
|
2102
2200
|
}
|
|
2103
2201
|
});
|
|
2104
2202
|
}
|
|
2105
|
-
if (!pensionForm.value.compulsoryProfContractAmount) pensionForm.value.compulsoryProfMonthCount =
|
|
2203
|
+
if (!pensionForm.value.compulsoryProfContractAmount) pensionForm.value.compulsoryProfMonthCount = 0;
|
|
2106
2204
|
const pensionData = {
|
|
2107
2205
|
...pensionForm.value,
|
|
2108
2206
|
...{
|
|
@@ -2174,10 +2272,12 @@ export default defineComponent({
|
|
|
2174
2272
|
if (!isParentValid || !isSlaveValid) {
|
|
2175
2273
|
return;
|
|
2176
2274
|
}
|
|
2177
|
-
await dataStore.setApplication(data, true);
|
|
2275
|
+
const isApplicationSaved = await dataStore.setApplication(data, true);
|
|
2276
|
+
if (isApplicationSaved === false) return;
|
|
2178
2277
|
customPension.value = false;
|
|
2179
2278
|
} else {
|
|
2180
|
-
await dataStore.setApplication(data, true);
|
|
2279
|
+
const isApplicationSaved = await dataStore.setApplication(data, true);
|
|
2280
|
+
if (isApplicationSaved === false) return;
|
|
2181
2281
|
}
|
|
2182
2282
|
await dataStore.getApplicationData(String(route.params.taskId), false, false, false, true);
|
|
2183
2283
|
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
@@ -2326,18 +2426,48 @@ export default defineComponent({
|
|
|
2326
2426
|
if (file.type !== constants.fileTypes.pdf) {
|
|
2327
2427
|
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
2328
2428
|
}
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2429
|
+
dataStore.isLoading = true;
|
|
2430
|
+
try {
|
|
2431
|
+
if(isCompulsoryProfContractAmount.value || transferContractsHasOppv.value) {
|
|
2432
|
+
await setOppvCount(file)
|
|
2433
|
+
} else {
|
|
2434
|
+
await uploadFile(file)
|
|
2435
|
+
}
|
|
2335
2436
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2336
2437
|
dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
|
|
2438
|
+
} finally {
|
|
2439
|
+
dataStore.isLoading = false;
|
|
2337
2440
|
}
|
|
2338
2441
|
}
|
|
2339
2442
|
}
|
|
2340
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
|
+
}
|
|
2341
2471
|
const openFileActionsPanel = async (document: DocumentItem) => {
|
|
2342
2472
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
2343
2473
|
dataStore.rightPanel.open = true;
|
|
@@ -2360,11 +2490,13 @@ export default defineComponent({
|
|
|
2360
2490
|
iin: enpfNoteFile.value.iin ?? '',
|
|
2361
2491
|
};
|
|
2362
2492
|
await dataStore.deleteFile(data);
|
|
2493
|
+
formStore.signedDocumentList = formStore.signedDocumentList.filter(doc => doc.id !== data.id)
|
|
2363
2494
|
deletionDialog.value = false;
|
|
2364
2495
|
isFileActionsPanelOpen.value = false;
|
|
2365
2496
|
dataStore.rightPanel.open = false;
|
|
2366
2497
|
dataStore.panelAction = null;
|
|
2367
|
-
|
|
2498
|
+
await dataStore.api.pensionannuityNew.resetApplicationData(formStore.applicationData.processInstanceId);
|
|
2499
|
+
await dataStore.getApplicationData(String(route.params.taskId), false, false, false, true);
|
|
2368
2500
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2369
2501
|
}
|
|
2370
2502
|
};
|
|
@@ -2411,14 +2543,21 @@ export default defineComponent({
|
|
|
2411
2543
|
}
|
|
2412
2544
|
}
|
|
2413
2545
|
additionalTerms.value = props.isCalculator ? formStore.additionalInsuranceTermsWithout : formStore.additionalInsuranceTerms;
|
|
2414
|
-
if (!!productConditionsForm.insurancePremiumPerMonth) {
|
|
2415
|
-
whichSum.value = 'insurancePremiumPerMonth';
|
|
2416
|
-
}
|
|
2417
2546
|
if (!!productConditionsForm.requestedSumInsured) {
|
|
2418
2547
|
whichSum.value = 'requestedSumInsured';
|
|
2419
2548
|
}
|
|
2420
|
-
if (
|
|
2421
|
-
whichSum.value = '
|
|
2549
|
+
if (!!productConditionsForm.insurancePremiumPerMonth) {
|
|
2550
|
+
whichSum.value = 'insurancePremiumPerMonth';
|
|
2551
|
+
}
|
|
2552
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
2553
|
+
if (!productConditionsForm.requestedSumInsured) {
|
|
2554
|
+
whichSum.value = 'requestedSumInsured';
|
|
2555
|
+
}
|
|
2556
|
+
if (!formStore.lfb.add) {
|
|
2557
|
+
const apiDate = await dataStore.api.getCloseDate();
|
|
2558
|
+
const minDate = new Date(apiDate);
|
|
2559
|
+
closeDate.value = minDate.setDate(minDate.getDate() + 1);
|
|
2560
|
+
}
|
|
2422
2561
|
}
|
|
2423
2562
|
if (dataStore.isCalculator) {
|
|
2424
2563
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
@@ -2443,7 +2582,8 @@ export default defineComponent({
|
|
|
2443
2582
|
);
|
|
2444
2583
|
}
|
|
2445
2584
|
if (whichProduct.value === 'gons') {
|
|
2446
|
-
|
|
2585
|
+
const response = await dataStore.api.availableToAccureStartEducationalCapital(formStore.applicationData.processInstanceId);
|
|
2586
|
+
hasEduCapitalConsent.value = response.isAllowed;
|
|
2447
2587
|
}
|
|
2448
2588
|
if (whichProduct.value === 'pensionannuitynew') {
|
|
2449
2589
|
contractDate.value = reformatDate(pensionForm.value.contractDate ?? '');
|
|
@@ -2469,6 +2609,7 @@ export default defineComponent({
|
|
|
2469
2609
|
});
|
|
2470
2610
|
});
|
|
2471
2611
|
}
|
|
2612
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
|
|
2472
2613
|
}
|
|
2473
2614
|
} catch (err) {
|
|
2474
2615
|
console.log(err);
|
|
@@ -2476,6 +2617,27 @@ export default defineComponent({
|
|
|
2476
2617
|
isLoading.value = false;
|
|
2477
2618
|
}
|
|
2478
2619
|
});
|
|
2620
|
+
watch(isSlavePensionForm, newVal => {
|
|
2621
|
+
if (newVal) {
|
|
2622
|
+
transferContracts.value = formStore.pensionApp.slave.transferContracts;
|
|
2623
|
+
} else {
|
|
2624
|
+
transferContracts.value = formStore.pensionApp.transferContracts;
|
|
2625
|
+
}
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
watch(
|
|
2629
|
+
transferContracts,
|
|
2630
|
+
newVal => {
|
|
2631
|
+
if (!isDisabled.value) {
|
|
2632
|
+
if (isSlavePensionForm.value) {
|
|
2633
|
+
formStore.pensionApp.slave.transferContracts = newVal;
|
|
2634
|
+
} else {
|
|
2635
|
+
formStore.pensionApp.transferContracts = newVal;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2639
|
+
{ deep: true },
|
|
2640
|
+
);
|
|
2479
2641
|
|
|
2480
2642
|
watch(
|
|
2481
2643
|
() => pensionForm.value?.amount,
|
|
@@ -2539,6 +2701,9 @@ export default defineComponent({
|
|
|
2539
2701
|
formattedStartDate?.setFullYear(formattedStartDate?.getFullYear() + 1);
|
|
2540
2702
|
formattedStartDate?.setDate(formattedStartDate?.getDate() - 1);
|
|
2541
2703
|
productConditionsForm.contractEndDate = reformatDate(String(formattedStartDate));
|
|
2704
|
+
if (formStore.applicationData.policyAppDto?.mainPremiumWithCommission !== 0) {
|
|
2705
|
+
dataStore.showToaster('error', dataStore.t('toaster.needToRecalculate'), 2000);
|
|
2706
|
+
}
|
|
2542
2707
|
}
|
|
2543
2708
|
},
|
|
2544
2709
|
);
|
|
@@ -2638,6 +2803,25 @@ export default defineComponent({
|
|
|
2638
2803
|
);
|
|
2639
2804
|
}
|
|
2640
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
|
+
|
|
2641
2825
|
const copyRedirect = async () => {
|
|
2642
2826
|
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(pensionForm.value.processInstanceId));
|
|
2643
2827
|
dataStore.copyToClipboard(url.redirectUrl);
|
|
@@ -2648,6 +2832,7 @@ export default defineComponent({
|
|
|
2648
2832
|
formStore,
|
|
2649
2833
|
vForm,
|
|
2650
2834
|
locale,
|
|
2835
|
+
closeDate,
|
|
2651
2836
|
isLoading,
|
|
2652
2837
|
whichProduct,
|
|
2653
2838
|
productConditionsForm,
|
|
@@ -2691,6 +2876,7 @@ export default defineComponent({
|
|
|
2691
2876
|
contractIndex,
|
|
2692
2877
|
contragentData,
|
|
2693
2878
|
customPension,
|
|
2879
|
+
minEnhancedGiftSum,
|
|
2694
2880
|
|
|
2695
2881
|
// Computed
|
|
2696
2882
|
isTask,
|
|
@@ -2761,6 +2947,9 @@ export default defineComponent({
|
|
|
2761
2947
|
isSlavePensionForm,
|
|
2762
2948
|
dividendPeriods,
|
|
2763
2949
|
dividendSchedules,
|
|
2950
|
+
enhancedGiftDisabled,
|
|
2951
|
+
minEnhancedGiftSumInUsd,
|
|
2952
|
+
isCompulsoryProfContractAmount,
|
|
2764
2953
|
|
|
2765
2954
|
// Rules
|
|
2766
2955
|
fixInsSumRule,
|
|
@@ -749,7 +749,7 @@ export default defineComponent({
|
|
|
749
749
|
urlCopy.value = `https://egovbusiness.page.link/?link=${linkToCopy.value}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
750
750
|
} else {
|
|
751
751
|
//для физ лиц
|
|
752
|
-
urlCopy.value = `https://
|
|
752
|
+
urlCopy.value = `https://m.egov.kz/mobileSign/?link=${encodeURIComponent(linkToCopy.value)}?mgovSign`;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
await startConnection(uuidV4, groupId);
|