hl-core 0.0.9-beta.11 → 0.0.9-beta.13
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 +624 -0
- package/api/efo.api.ts +27 -0
- package/api/index.ts +3 -620
- package/components/Form/FormBlock.vue +12 -3
- package/components/Input/FileInput.vue +8 -3
- package/components/Pages/Anketa.vue +2 -2
- package/components/Pages/ContragentForm.vue +1 -1
- package/components/Pages/InvoiceInfo.vue +1 -1
- package/components/Pages/MemberForm.vue +25 -17
- package/components/Pages/ProductConditions.vue +130 -53
- package/components/Panel/PanelHandler.vue +48 -12
- package/composables/constants.ts +1 -0
- package/composables/styles.ts +1 -1
- package/locales/ru.json +38 -9
- package/package.json +7 -7
- package/store/data.store.ts +60 -42
- package/types/enum.ts +6 -0
- package/types/index.ts +10 -3
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
class="file-input"
|
|
4
4
|
:disabled="disabled"
|
|
5
5
|
prepend-icon=""
|
|
6
|
-
append-inner-icon="mdi
|
|
7
|
-
@click:append-inner="$emit('input', $event)"
|
|
6
|
+
:append-inner-icon="`mdi ${icon}`"
|
|
8
7
|
@input="$emit('input', $event)"
|
|
9
8
|
variant="solo"
|
|
10
9
|
show-size
|
|
11
10
|
multiple
|
|
12
|
-
accept=".pdf,.doc,.jpeg,.jpg,.jpg"
|
|
11
|
+
accept=".pdf,.doc,.jpeg,.jpg,.jpg,.xlsx,.xls"
|
|
13
12
|
truncate-length="15"
|
|
14
13
|
clear-icon="mdi mdi-close"
|
|
15
14
|
:label="$dataStore.t('labels.chooseDoc')"
|
|
15
|
+
@click:append-inner="$emit('append-inner', $event)"
|
|
16
16
|
/>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
@@ -23,7 +23,12 @@ export default defineComponent({
|
|
|
23
23
|
type: Boolean,
|
|
24
24
|
default: false,
|
|
25
25
|
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'mdi-file-document',
|
|
29
|
+
}
|
|
26
30
|
},
|
|
31
|
+
emits: ['input', 'append-inner'],
|
|
27
32
|
});
|
|
28
33
|
</script>
|
|
29
34
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@clicked="handleToggler"
|
|
11
11
|
/>
|
|
12
12
|
</section>
|
|
13
|
-
<v-form ref="vForm" class="max-h-[
|
|
13
|
+
<v-form ref="vForm" class="max-h-[65svh] overflow-y-scroll" @submit="submitForm">
|
|
14
14
|
<section
|
|
15
15
|
v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'N').length"
|
|
16
16
|
:class="[$styles.blueBgLight, $styles.rounded]"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
|
|
129
129
|
</div>
|
|
130
130
|
</Teleport>
|
|
131
|
-
<base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
|
|
131
|
+
<base-scroll-buttons v-if="firstQuestionList && firstQuestionList.length" @up="scrollForm('up')" @down="scrollForm('down')" />
|
|
132
132
|
</template>
|
|
133
133
|
|
|
134
134
|
<script lang="ts">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section v-show="showForm" class="flex flex-col gap-4 px-[10px]">
|
|
3
|
-
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[
|
|
3
|
+
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[75svh] overflow-y-scroll">
|
|
4
4
|
<base-form-section :title="$dataStore.t('form.personalData')" class="mt-[14px]">
|
|
5
5
|
<base-form-input
|
|
6
6
|
v-model="member.phoneNumber"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</lazy-base-form-section>
|
|
9
9
|
<lazy-base-form-section v-if="invoiceData.paymentLink && invoiceData.status !== 1" :title="$dataStore.t('labels.epayPage')" class="flex items-center">
|
|
10
10
|
<div class="w-full lg:w-[70%] bg-white">
|
|
11
|
-
<iframe :src="invoiceData.paymentLink" frameborder="0" class="w-full h-[
|
|
11
|
+
<iframe :src="invoiceData.paymentLink" frameborder="0" class="w-full h-[70svh]"></iframe>
|
|
12
12
|
</div>
|
|
13
13
|
</lazy-base-form-section>
|
|
14
14
|
</section>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="flex flex-col gap-4 px-[10px]">
|
|
3
|
-
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[
|
|
3
|
+
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[80svh] overflow-y-scroll">
|
|
4
4
|
<div v-if="memberSetting && memberSetting.has === true && memberSetting.isMultiple === true" class="flex items-center mt-[14px] min-h-[54px]">
|
|
5
5
|
<div :class="[$styles.blueBgLight]" class="flex flex-wrap items-center gap-2 p-1 rounded-t-[8px] h-full">
|
|
6
6
|
<div
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
:disabled="!memberStore.canMemberDeleted(whichForm, index) && !memberStore.canMemberCleared(whichForm, index)"
|
|
18
18
|
variant="plain"
|
|
19
19
|
:color="Number(whichIndex) === index ? '#FFF' : '#A0B3D8'"
|
|
20
|
-
@click.prevent="memberStore.canMemberDeleted(whichForm, index) || memberStore.canMemberCleared(whichForm, index) ?
|
|
20
|
+
@click.prevent="memberStore.canMemberDeleted(whichForm, index) || memberStore.canMemberCleared(whichForm, index) ? openDeletionDialog(index) : null"
|
|
21
21
|
/>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
:maska="$maska.iin"
|
|
45
45
|
:readonly="!!isDisabled || !!isIinPhoneDisabled"
|
|
46
46
|
:clearable="!isDisabled"
|
|
47
|
-
:append-inner-icon="
|
|
47
|
+
:append-inner-icon="hasMemberSearch ? 'mdi mdi-magnify' : ''"
|
|
48
48
|
@append="searchMember"
|
|
49
49
|
@input="onIinInput"
|
|
50
50
|
:rules="$rules.required.concat($rules.iinRight)"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
v-model="member.gender"
|
|
85
85
|
:value="member.gender?.nameRu"
|
|
86
86
|
:readonly="isDisabled || isFromGBD"
|
|
87
|
-
:clearable="!isDisabled"
|
|
87
|
+
:clearable="!isDisabled && !isFromGBD"
|
|
88
88
|
:label="$dataStore.t('form.gender')"
|
|
89
89
|
:rules="$rules.objectRequired"
|
|
90
90
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -527,6 +527,7 @@
|
|
|
527
527
|
<base-btn v-if="member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.check')" @click="checkOtp()" />
|
|
528
528
|
</div>
|
|
529
529
|
</Teleport>
|
|
530
|
+
<base-dialog v-model="deletionDialog" :subtitle="$dataStore.t('dialog.delete')" actions="default" @yes="deleteMember(selectedIndex)" @no="deletionDialog = false" />
|
|
530
531
|
<base-dialog v-model="familyDialog" :title="$dataStore.t('dialog.familyMember')" actions="familyDialog">
|
|
531
532
|
<template #actions>
|
|
532
533
|
<base-family-dialog :selected="selectedFamilyMember" @selectFamilyMember="selectFamilyMember" @reset="closeFamilyDialog(true)" />
|
|
@@ -566,6 +567,8 @@ export default {
|
|
|
566
567
|
const isPanelLoading = ref<boolean>(false);
|
|
567
568
|
const isChangingMember = ref<boolean>(false);
|
|
568
569
|
const familyDialog = ref<boolean>(false);
|
|
570
|
+
const deletionDialog = ref<boolean>(false);
|
|
571
|
+
const selectedIndex = ref<number>(0);
|
|
569
572
|
const sameAddress = ref<boolean>(false);
|
|
570
573
|
const panelValue = ref<Value>(new Value());
|
|
571
574
|
const panelList = ref<Value[]>([]);
|
|
@@ -607,6 +610,9 @@ export default {
|
|
|
607
610
|
if (dataStore.isBolashak || dataStore.isGons) {
|
|
608
611
|
return false;
|
|
609
612
|
}
|
|
613
|
+
if (member.value.age !== null && Number(member.value.age) < 18) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
610
616
|
return true;
|
|
611
617
|
}
|
|
612
618
|
case formStore.insuredFormKey:
|
|
@@ -640,7 +646,7 @@ export default {
|
|
|
640
646
|
};
|
|
641
647
|
return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
642
648
|
});
|
|
643
|
-
|
|
649
|
+
const hasMemberSearch = computed(() => showSaveButton.value && (hasGBDFL.value || hasGKB.value || hasInsis.value));
|
|
644
650
|
const hasFamilyStatus = computed(() => {
|
|
645
651
|
if (whichForm.value === formStore.beneficiaryFormKey) {
|
|
646
652
|
if (dataStore.isBolashak) {
|
|
@@ -708,10 +714,7 @@ export default {
|
|
|
708
714
|
const phoneRule = computed(() => {
|
|
709
715
|
const basePhoneRule = dataStore.rules.required.concat(dataStore.rules.phoneFormat);
|
|
710
716
|
if (whichForm.value === formStore.beneficiaryFormKey) {
|
|
711
|
-
if (
|
|
712
|
-
return [];
|
|
713
|
-
}
|
|
714
|
-
if ((dataStore.isKazyna || dataStore.isLiferenta) && Number(member.value.age) < 18) {
|
|
717
|
+
if (member.value.age !== null && Number(member.value.age) < 18) {
|
|
715
718
|
return [];
|
|
716
719
|
}
|
|
717
720
|
}
|
|
@@ -742,6 +745,7 @@ export default {
|
|
|
742
745
|
const otpCondition = computed(() => {
|
|
743
746
|
// Add conditions by product
|
|
744
747
|
if (member.value.hasAgreement) return false;
|
|
748
|
+
if (whichForm.value === formStore.beneficiaryFormKey && member.value.age !== null && Number(member.value.age) < 18) return false;
|
|
745
749
|
if (!member.value.phoneNumber || (member.value.phoneNumber && member.value.phoneNumber.length !== useMask().phone.length)) return false;
|
|
746
750
|
return getOtpConditionByMember();
|
|
747
751
|
});
|
|
@@ -1071,14 +1075,8 @@ export default {
|
|
|
1071
1075
|
};
|
|
1072
1076
|
|
|
1073
1077
|
const validateAgreement = () => {
|
|
1074
|
-
if (
|
|
1075
|
-
if (
|
|
1076
|
-
// TODO уточнить
|
|
1077
|
-
return true;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
if (dataStore.isKazyna || dataStore.isLiferenta) {
|
|
1081
|
-
if (whichForm.value === formStore.beneficiaryFormKey && Number(member.value.age) < 18) {
|
|
1078
|
+
if (whichForm.value === formStore.beneficiaryFormKey) {
|
|
1079
|
+
if (member.value.age !== null && Number(member.value.age) < 18) {
|
|
1082
1080
|
return true;
|
|
1083
1081
|
}
|
|
1084
1082
|
}
|
|
@@ -1212,6 +1210,11 @@ export default {
|
|
|
1212
1210
|
isButtonLoading.value = false;
|
|
1213
1211
|
};
|
|
1214
1212
|
|
|
1213
|
+
const openDeletionDialog = (index: number) => {
|
|
1214
|
+
deletionDialog.value = true;
|
|
1215
|
+
selectedIndex.value = index;
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1215
1218
|
const deleteMember = async (index: number) => {
|
|
1216
1219
|
await memberStore.deleteMember(route.params.taskId as string, whichForm.value, index);
|
|
1217
1220
|
const currentIndex = Number(whichIndex.value);
|
|
@@ -1219,6 +1222,7 @@ export default {
|
|
|
1219
1222
|
const newIndex = ref<number>(currentIndex - 1 > 0 ? currentIndex - 1 : 0);
|
|
1220
1223
|
await selectMember(newIndex.value, index === currentIndex ? true : undefined);
|
|
1221
1224
|
}
|
|
1225
|
+
deletionDialog.value = false;
|
|
1222
1226
|
};
|
|
1223
1227
|
|
|
1224
1228
|
const onInit = async () => {
|
|
@@ -1342,6 +1346,8 @@ export default {
|
|
|
1342
1346
|
Value,
|
|
1343
1347
|
memberDocument,
|
|
1344
1348
|
familyDialog,
|
|
1349
|
+
deletionDialog,
|
|
1350
|
+
selectedIndex,
|
|
1345
1351
|
selectedFamilyMember,
|
|
1346
1352
|
sameAddress,
|
|
1347
1353
|
|
|
@@ -1363,6 +1369,7 @@ export default {
|
|
|
1363
1369
|
hasInsurancePay,
|
|
1364
1370
|
hasSignOfIPDL,
|
|
1365
1371
|
hasSameAddressToggle,
|
|
1372
|
+
hasMemberSearch,
|
|
1366
1373
|
|
|
1367
1374
|
// Rules
|
|
1368
1375
|
ageRule,
|
|
@@ -1385,6 +1392,7 @@ export default {
|
|
|
1385
1392
|
getFile,
|
|
1386
1393
|
selectFamilyMember,
|
|
1387
1394
|
closeFamilyDialog,
|
|
1395
|
+
openDeletionDialog,
|
|
1388
1396
|
scrollForm,
|
|
1389
1397
|
onIinInput,
|
|
1390
1398
|
onOtpCodeInput,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="flex flex-col gap-4 px-[10px]">
|
|
3
|
-
<v-form ref="vForm" @submit="submitForm" class="max-h-[
|
|
3
|
+
<v-form ref="vForm" @submit="submitForm" class="max-h-[80svh] overflow-y-scroll">
|
|
4
4
|
<base-message-block
|
|
5
|
-
v-if="
|
|
5
|
+
v-if="isCalculator"
|
|
6
6
|
class="mt-4"
|
|
7
7
|
:color="$styles.blueBgLight"
|
|
8
8
|
:text="$dataStore.t('preliminaryCalculation')"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
:maska="$maska.numbers"
|
|
69
69
|
:clearable="isRecalculationDisabled === false"
|
|
70
70
|
:label="$dataStore.t('percent') + `Life Additive`"
|
|
71
|
-
:readonly="
|
|
71
|
+
:readonly="readonlyLifeAdditive"
|
|
72
72
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
73
73
|
/>
|
|
74
74
|
<base-form-input
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
:maska="$maska.numbers"
|
|
95
95
|
:clearable="isRecalculationDisabled === false"
|
|
96
96
|
:label="$dataStore.t('percent') + `Disability Multiply`"
|
|
97
|
-
:readonly="
|
|
97
|
+
:readonly="readonlyDisabilityMultiply"
|
|
98
98
|
:rules="whichProduct === 'gons' ? [] : $dataStore.rules.recalculationMultiply"
|
|
99
99
|
/>
|
|
100
100
|
<base-form-input
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
:maska="$maska.numbers"
|
|
103
103
|
:clearable="isRecalculationDisabled === false"
|
|
104
104
|
:label="$dataStore.t('percent') + `Disability Additive`"
|
|
105
|
-
:readonly="
|
|
105
|
+
:readonly="readonlyDisabilityAdditive"
|
|
106
106
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
107
107
|
/>
|
|
108
108
|
<base-panel-input
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
/>
|
|
118
118
|
</base-form-section>
|
|
119
119
|
<base-form-section :title="$dataStore.t('generalConditions')">
|
|
120
|
-
<div v-if="
|
|
120
|
+
<div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator)">
|
|
121
121
|
<base-form-input
|
|
122
122
|
v-model="productConditionsForm.signDate"
|
|
123
123
|
:maska="$maska.date"
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
128
128
|
/>
|
|
129
129
|
<base-form-input
|
|
130
|
+
v-if="hasBirthDate"
|
|
130
131
|
v-model="productConditionsForm.birthDate"
|
|
131
132
|
:maska="$maska.date"
|
|
132
133
|
:readonly="isDisabled"
|
|
@@ -136,6 +137,7 @@
|
|
|
136
137
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
137
138
|
/>
|
|
138
139
|
<base-panel-input
|
|
140
|
+
v-if="hasGender"
|
|
139
141
|
v-model="productConditionsForm.gender"
|
|
140
142
|
:value="productConditionsForm.gender?.nameRu"
|
|
141
143
|
:readonly="isDisabled"
|
|
@@ -149,10 +151,10 @@
|
|
|
149
151
|
<base-form-input
|
|
150
152
|
v-model="productConditionsForm.coverPeriod"
|
|
151
153
|
:maska="$maska.numbers"
|
|
152
|
-
:readonly="
|
|
154
|
+
:readonly="isDisabledCoverPeriod"
|
|
153
155
|
:clearable="!isDisabled"
|
|
154
156
|
:rules="coverPeriodRule"
|
|
155
|
-
:label="
|
|
157
|
+
:label="coverPeriodLabel"
|
|
156
158
|
/>
|
|
157
159
|
<base-panel-input
|
|
158
160
|
v-if="hasPaymentPeriod"
|
|
@@ -179,8 +181,8 @@
|
|
|
179
181
|
<base-form-input
|
|
180
182
|
v-model="productConditionsForm.requestedSumInsured"
|
|
181
183
|
:readonly="isDisabledSum"
|
|
182
|
-
:clearable="!
|
|
183
|
-
:rules="
|
|
184
|
+
:clearable="!isDisabledSum"
|
|
185
|
+
:rules="requestedSumInsuredRule"
|
|
184
186
|
:label="requestedSumInsuredLabel"
|
|
185
187
|
:suffix="$constants.currencySymbols.kzt"
|
|
186
188
|
@input="onInputSum"
|
|
@@ -190,8 +192,8 @@
|
|
|
190
192
|
v-if="hasRequestedSumInsuredInDollar"
|
|
191
193
|
v-model="productConditionsForm.requestedSumInsuredInDollar"
|
|
192
194
|
:readonly="isDisabledSumDollar"
|
|
193
|
-
:clearable="!
|
|
194
|
-
:rules="
|
|
195
|
+
:clearable="!isDisabledSumDollar"
|
|
196
|
+
:rules="requestedSumInsuredRule"
|
|
195
197
|
:label="$dataStore.t('productConditionsForm.requestedSumInsuredInDollar')"
|
|
196
198
|
:suffix="$constants.currencySymbols.usd"
|
|
197
199
|
@input="onInputSumDollar"
|
|
@@ -199,60 +201,60 @@
|
|
|
199
201
|
/>
|
|
200
202
|
<base-form-input
|
|
201
203
|
v-model="productConditionsForm.insurancePremiumPerMonth"
|
|
202
|
-
:readonly="
|
|
203
|
-
:clearable="!
|
|
204
|
-
:rules="
|
|
205
|
-
:label="
|
|
204
|
+
:readonly="insurancePremiumPerMonthDisabled"
|
|
205
|
+
:clearable="!insurancePremiumPerMonthDisabled"
|
|
206
|
+
:rules="insurancePremiumPerMonthRule"
|
|
207
|
+
:label="insurancePremiumPerMonthLabel"
|
|
206
208
|
:suffix="$constants.currencySymbols.kzt"
|
|
207
209
|
@input="onInputInsurancePremiumPerMonth"
|
|
208
210
|
@onClear="onClearPremium"
|
|
209
211
|
/>
|
|
210
212
|
<base-form-input
|
|
211
|
-
v-if="
|
|
213
|
+
v-if="hasInsurancePremiumPerMonthInDollar"
|
|
214
|
+
v-model="productConditionsForm.insurancePremiumPerMonthInDollar"
|
|
215
|
+
:readonly="insurancePremiumPerMonthDisabled"
|
|
216
|
+
:clearable="!insurancePremiumPerMonthDisabled"
|
|
217
|
+
:rules="insurancePremiumPerMonthRule"
|
|
218
|
+
:label="$dataStore.t('productConditionsForm.insurancePremiumAmountInDollar')"
|
|
219
|
+
:suffix="$constants.currencySymbols.usd"
|
|
220
|
+
@input="onInputInsurancePremiumPerMonthInDollar"
|
|
221
|
+
@onClear="onClearPremiumDollar"
|
|
222
|
+
/>
|
|
223
|
+
<base-form-input
|
|
224
|
+
v-if="hasCurrency && $dataStore.currencies.usd"
|
|
225
|
+
v-model="$dataStore.currencies.usd"
|
|
226
|
+
:readonly="true"
|
|
227
|
+
:label="$dataStore.t('productConditionsForm.dollarExchangeRateNBRK')"
|
|
228
|
+
:suffix="$constants.currencySymbols.kzt"
|
|
229
|
+
/>
|
|
230
|
+
<base-form-input
|
|
231
|
+
v-if="whichProduct === 'gons' && isCalculator"
|
|
212
232
|
v-model="productConditionsForm.totalAmount5"
|
|
213
233
|
:readonly="true"
|
|
214
234
|
:label="$dataStore.t('productConditionsForm.totalAmount5')"
|
|
215
235
|
:suffix="$constants.currencySymbols.kzt"
|
|
216
236
|
/>
|
|
217
237
|
<base-form-input
|
|
218
|
-
v-if="whichProduct === 'gons' &&
|
|
238
|
+
v-if="whichProduct === 'gons' && isCalculator"
|
|
219
239
|
v-model="productConditionsForm.statePremium5"
|
|
220
240
|
:readonly="true"
|
|
221
241
|
:label="$dataStore.t('productConditionsForm.statePremium5')"
|
|
222
242
|
:suffix="$constants.currencySymbols.kzt"
|
|
223
243
|
/>
|
|
224
244
|
<base-form-input
|
|
225
|
-
v-if="whichProduct === 'gons' &&
|
|
245
|
+
v-if="whichProduct === 'gons' && isCalculator"
|
|
226
246
|
v-model="productConditionsForm.totalAmount7"
|
|
227
247
|
:readonly="true"
|
|
228
248
|
:label="$dataStore.t('productConditionsForm.totalAmount7')"
|
|
229
249
|
:suffix="$constants.currencySymbols.kzt"
|
|
230
250
|
/>
|
|
231
251
|
<base-form-input
|
|
232
|
-
v-if="whichProduct === 'gons' &&
|
|
252
|
+
v-if="whichProduct === 'gons' && isCalculator"
|
|
233
253
|
v-model="productConditionsForm.statePremium7"
|
|
234
254
|
:readonly="true"
|
|
235
255
|
:label="$dataStore.t('productConditionsForm.statePremium7')"
|
|
236
256
|
:suffix="$constants.currencySymbols.kzt"
|
|
237
257
|
/>
|
|
238
|
-
<base-form-input
|
|
239
|
-
v-if="hasInsurancePremiumPerMonthInDollar"
|
|
240
|
-
v-model="productConditionsForm.insurancePremiumPerMonthInDollar"
|
|
241
|
-
:readonly="isDisabled"
|
|
242
|
-
:clearable="!isDisabled"
|
|
243
|
-
:rules="insurancePremiumPerMonth"
|
|
244
|
-
:label="$dataStore.t('productConditionsForm.insurancePremiumAmountInDollar')"
|
|
245
|
-
:suffix="$constants.currencySymbols.usd"
|
|
246
|
-
@input="onInputInsurancePremiumPerMonthInDollar"
|
|
247
|
-
@onClear="onClearPremiumDollar"
|
|
248
|
-
/>
|
|
249
|
-
<base-form-input
|
|
250
|
-
v-if="hasCurrency && $dataStore.currencies.usd"
|
|
251
|
-
v-model="$dataStore.currencies.usd"
|
|
252
|
-
:readonly="true"
|
|
253
|
-
:label="$dataStore.t('productConditionsForm.dollarExchangeRateNBRK')"
|
|
254
|
-
:suffix="$constants.currencySymbols.kzt"
|
|
255
|
-
/>
|
|
256
258
|
</base-form-section>
|
|
257
259
|
<base-form-section :title="$dataStore.t('calculationAnnuityPayments')" v-if="hasAnnuityPayments">
|
|
258
260
|
<base-form-toggle
|
|
@@ -332,7 +334,7 @@
|
|
|
332
334
|
</div>
|
|
333
335
|
</base-form-section>
|
|
334
336
|
</v-form>
|
|
335
|
-
<base-btn v-if="!$dataStore.isCalculator &&
|
|
337
|
+
<base-btn v-if="!$dataStore.isCalculator && isCalculator && hasCalculated" :btn="$styles.greenLightBtn" :text="$dataStore.t('buttons.toStatement')" @click="toStatement" />
|
|
336
338
|
<base-btn
|
|
337
339
|
v-if="$dataStore.isCalculator ? true : !isDisabled && isTask && ($dataStore.isInitiator() || $dataStore.isUnderwriter())"
|
|
338
340
|
:loading="isCalculating"
|
|
@@ -382,7 +384,7 @@ import { Member, Value } from '../../composables/classes';
|
|
|
382
384
|
|
|
383
385
|
export default defineComponent({
|
|
384
386
|
props: {
|
|
385
|
-
|
|
387
|
+
isCalculator: {
|
|
386
388
|
type: Boolean,
|
|
387
389
|
default: false,
|
|
388
390
|
},
|
|
@@ -415,7 +417,7 @@ export default defineComponent({
|
|
|
415
417
|
|
|
416
418
|
const additionalTerms = ref<AddCover[]>([]);
|
|
417
419
|
const isUnderwriterForm = computed(() => {
|
|
418
|
-
if (route.params.taskId === '0 ' || props.
|
|
420
|
+
if (route.params.taskId === '0 ' || props.isCalculator === true) {
|
|
419
421
|
return false;
|
|
420
422
|
} else {
|
|
421
423
|
return formStore.applicationData.statusCode === 'UnderwriterForm';
|
|
@@ -428,15 +430,21 @@ export default defineComponent({
|
|
|
428
430
|
}
|
|
429
431
|
return isDisabled.value;
|
|
430
432
|
});
|
|
431
|
-
const isTask = computed(() => (route.params.taskId === '0' && props.
|
|
432
|
-
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm);
|
|
433
|
+
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask());
|
|
434
|
+
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
433
435
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
434
|
-
const
|
|
435
|
-
const
|
|
436
|
+
const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
437
|
+
const insurancePremiumPerMonthDisabled = computed(() => {
|
|
438
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
return isDisabled.value;
|
|
442
|
+
});
|
|
443
|
+
const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
436
444
|
const hasCalculated = computed(() => !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth);
|
|
437
445
|
const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
438
446
|
const hasProcessIndexRate = computed(() => {
|
|
439
|
-
if (whichProduct.value === 'gons' || whichProduct.value === 'halykkazyna' || whichProduct.value === 'liferenta') {
|
|
447
|
+
if (whichProduct.value === 'gons' || whichProduct.value === 'halykkazyna' || whichProduct.value === 'liferenta' || whichProduct.value === 'lifebusiness') {
|
|
440
448
|
return false;
|
|
441
449
|
}
|
|
442
450
|
return true;
|
|
@@ -471,6 +479,24 @@ export default defineComponent({
|
|
|
471
479
|
}
|
|
472
480
|
return true;
|
|
473
481
|
});
|
|
482
|
+
const readonlyLifeAdditive = computed(() => {
|
|
483
|
+
if (whichProduct.value === 'gons') {
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
486
|
+
return isRecalculationDisabled.value;
|
|
487
|
+
});
|
|
488
|
+
const readonlyDisabilityMultiply = computed(() => {
|
|
489
|
+
if (whichProduct.value === 'gons') {
|
|
490
|
+
return true;
|
|
491
|
+
}
|
|
492
|
+
return isRecalculationDisabled.value;
|
|
493
|
+
});
|
|
494
|
+
const readonlyDisabilityAdditive = computed(() => {
|
|
495
|
+
if (whichProduct.value === 'gons') {
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
return isRecalculationDisabled.value;
|
|
499
|
+
});
|
|
474
500
|
const hasAdbAdditive = computed(() => {
|
|
475
501
|
if (whichProduct.value === 'gons') {
|
|
476
502
|
return false;
|
|
@@ -489,6 +515,18 @@ export default defineComponent({
|
|
|
489
515
|
}
|
|
490
516
|
return false;
|
|
491
517
|
});
|
|
518
|
+
const hasBirthDate = computed(() => {
|
|
519
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
return true;
|
|
523
|
+
});
|
|
524
|
+
const hasGender = computed(() => {
|
|
525
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
return true;
|
|
529
|
+
});
|
|
492
530
|
const coverPeriodRule = computed(() => {
|
|
493
531
|
const baseCondition = dataStore.rules.required.concat(dataStore.rules.numbers);
|
|
494
532
|
if (whichProduct.value === 'gons') {
|
|
@@ -509,18 +547,48 @@ export default defineComponent({
|
|
|
509
547
|
if (whichProduct.value === 'halykkazyna') {
|
|
510
548
|
return dataStore.t('productConditionsForm.requestedSumInsuredInTenge');
|
|
511
549
|
}
|
|
550
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
551
|
+
return dataStore.t('productConditionsForm.totalRequestedSumInsured');
|
|
552
|
+
}
|
|
512
553
|
return dataStore.t('productConditionsForm.requestedSumInsured');
|
|
513
554
|
});
|
|
555
|
+
const coverPeriodLabel = computed(() => {
|
|
556
|
+
if (whichProduct.value === 'gons') {
|
|
557
|
+
return dataStore.t('productConditionsForm.coverPeriodFrom3to20');
|
|
558
|
+
}
|
|
559
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
560
|
+
return dataStore.t('productConditionsForm.coverPeriodMonth');
|
|
561
|
+
}
|
|
562
|
+
return dataStore.t('productConditionsForm.coverPeriod');
|
|
563
|
+
});
|
|
564
|
+
const insurancePremiumPerMonthLabel = computed(() => {
|
|
565
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
566
|
+
return dataStore.t('productConditionsForm.totalInsurancePremiumAmount');
|
|
567
|
+
}
|
|
568
|
+
return dataStore.t('productConditionsForm.insurancePremiumAmount');
|
|
569
|
+
});
|
|
514
570
|
const isDisabledSum = computed(() => {
|
|
515
571
|
if (whichProduct.value === 'halykkazyna') {
|
|
516
572
|
return true;
|
|
517
573
|
}
|
|
574
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
575
|
+
return false;
|
|
576
|
+
}
|
|
518
577
|
return isDisabled.value;
|
|
519
578
|
});
|
|
520
579
|
const isDisabledSumDollar = computed(() => {
|
|
521
580
|
if (whichProduct.value === 'halykkazyna') {
|
|
522
581
|
return true;
|
|
523
582
|
}
|
|
583
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
return isDisabled.value;
|
|
587
|
+
});
|
|
588
|
+
const isDisabledCoverPeriod = computed(() => {
|
|
589
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
590
|
+
return true;
|
|
591
|
+
}
|
|
524
592
|
return isDisabled.value;
|
|
525
593
|
});
|
|
526
594
|
|
|
@@ -743,11 +811,11 @@ export default defineComponent({
|
|
|
743
811
|
}
|
|
744
812
|
if (productConditionsForm.requestedSumInsured !== '' && productConditionsForm.requestedSumInsured != null) {
|
|
745
813
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
746
|
-
if (props.
|
|
814
|
+
if (props.isCalculator) whichSum.value = 'requestedSumInsured';
|
|
747
815
|
}
|
|
748
816
|
if (productConditionsForm.insurancePremiumPerMonth !== '' && productConditionsForm.insurancePremiumPerMonth != null) {
|
|
749
817
|
productConditionsForm.requestedSumInsured = null;
|
|
750
|
-
if (props.
|
|
818
|
+
if (props.isCalculator) whichSum.value = 'insurancePremiumPerMonth';
|
|
751
819
|
}
|
|
752
820
|
|
|
753
821
|
if (!whichSum.value && isUnderwriterForm.value === false) {
|
|
@@ -805,7 +873,7 @@ export default defineComponent({
|
|
|
805
873
|
await dataStore.reCalculate(formStore.applicationData.processInstanceId, recalculationData, route.params.taskId as string, whichSum.value);
|
|
806
874
|
}
|
|
807
875
|
isCalculating.value = true;
|
|
808
|
-
if (props.
|
|
876
|
+
if (props.isCalculator) {
|
|
809
877
|
//@ts-ignore
|
|
810
878
|
await dataStore.calculateWithoutApplication(true, whichProduct.value);
|
|
811
879
|
additionalTerms.value = formStore.additionalInsuranceTermsWithout;
|
|
@@ -839,7 +907,7 @@ export default defineComponent({
|
|
|
839
907
|
};
|
|
840
908
|
|
|
841
909
|
onMounted(async () => {
|
|
842
|
-
if (props.
|
|
910
|
+
if (props.isCalculator === true) {
|
|
843
911
|
if (dataStore.isCalculator) {
|
|
844
912
|
clearFields();
|
|
845
913
|
}
|
|
@@ -864,7 +932,7 @@ export default defineComponent({
|
|
|
864
932
|
productConditionsForm.signDate = reformatDate(defaultData.signDate);
|
|
865
933
|
}
|
|
866
934
|
}
|
|
867
|
-
additionalTerms.value = props.
|
|
935
|
+
additionalTerms.value = props.isCalculator ? formStore.additionalInsuranceTermsWithout : formStore.additionalInsuranceTerms;
|
|
868
936
|
if (!!productConditionsForm.insurancePremiumPerMonth) {
|
|
869
937
|
whichSum.value = 'insurancePremiumPerMonth';
|
|
870
938
|
}
|
|
@@ -935,8 +1003,9 @@ export default defineComponent({
|
|
|
935
1003
|
isDisabled,
|
|
936
1004
|
isTermsDisabled,
|
|
937
1005
|
isUnderwriterForm,
|
|
938
|
-
|
|
939
|
-
|
|
1006
|
+
insurancePremiumPerMonthRule,
|
|
1007
|
+
insurancePremiumPerMonthDisabled,
|
|
1008
|
+
requestedSumInsuredRule,
|
|
940
1009
|
isRecalculationDisabled,
|
|
941
1010
|
isUnderwriterRole,
|
|
942
1011
|
hasProcessIndexRate,
|
|
@@ -945,6 +1014,9 @@ export default defineComponent({
|
|
|
945
1014
|
hasInsurancePremiumPerMonthInDollar,
|
|
946
1015
|
hasCurrency,
|
|
947
1016
|
hasAdbMultiply,
|
|
1017
|
+
readonlyLifeAdditive,
|
|
1018
|
+
readonlyDisabilityMultiply,
|
|
1019
|
+
readonlyDisabilityAdditive,
|
|
948
1020
|
hasAdbAdditive,
|
|
949
1021
|
hasRiskGroup,
|
|
950
1022
|
hasCalculated,
|
|
@@ -954,6 +1026,11 @@ export default defineComponent({
|
|
|
954
1026
|
requestedSumInsuredLabel,
|
|
955
1027
|
isDisabledSum,
|
|
956
1028
|
isDisabledSumDollar,
|
|
1029
|
+
hasBirthDate,
|
|
1030
|
+
hasGender,
|
|
1031
|
+
coverPeriodLabel,
|
|
1032
|
+
insurancePremiumPerMonthLabel,
|
|
1033
|
+
isDisabledCoverPeriod,
|
|
957
1034
|
|
|
958
1035
|
// Rules
|
|
959
1036
|
coverPeriodRule,
|