hl-core 0.0.9-beta.12 → 0.0.9-beta.14
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 +7 -0
- package/components/Form/FormBlock.vue +12 -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 +24 -16
- package/components/Pages/ProductConditions.vue +44 -31
- package/composables/styles.ts +1 -1
- package/locales/ru.json +2 -1
- package/package.json +5 -5
- package/plugins/vuetifyPlugin.ts +2 -0
- package/store/data.store.ts +42 -25
package/api/base.api.ts
CHANGED
|
@@ -430,6 +430,13 @@ export class ApiClass {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
+
async checkBeneficiariesInActualPolicy(iin: string) {
|
|
434
|
+
return await this.axiosCall<boolean>({
|
|
435
|
+
method: Methods.GET,
|
|
436
|
+
url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
433
440
|
async setMember(whichMember: keyof typeof MemberCodes, data: any) {
|
|
434
441
|
return await this.axiosCall({
|
|
435
442
|
method: Methods.POST,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div
|
|
7
7
|
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
8
8
|
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
9
|
-
class="lg:flex transition-all rounded-lg h-[36px]
|
|
9
|
+
class="hidden lg:flex transition-all rounded-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
|
|
10
10
|
@click="!disabled && memberStore.addMember(whichForm)"
|
|
11
11
|
>
|
|
12
12
|
{{ $dataStore.t('buttons.add') }}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
34
34
|
>
|
|
35
35
|
<span :class="[getMemberInfo(each).fullName === null && $styles.emptyBlockCol]">{{ getMemberInfo(each).fullName }}</span>
|
|
36
|
-
<span :class="[getMemberInfo(each).iin === null && $styles.emptyBlockCol]">{{
|
|
36
|
+
<span :class="[getMemberInfo(each).iin === null && $styles.emptyBlockCol]">{{ getMemberIIN(each) }}</span>
|
|
37
37
|
<span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $styles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
|
|
38
38
|
<span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $styles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
|
|
39
39
|
<span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $styles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<div
|
|
76
76
|
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
77
77
|
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
78
|
-
class="lg:hidden transition-all rounded-b-lg h-[36px]
|
|
78
|
+
class="flex lg:hidden transition-all rounded-b-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90"
|
|
79
79
|
@click="!disabled && memberStore.addMember(whichForm)"
|
|
80
80
|
>
|
|
81
81
|
{{ $dataStore.t('buttons.add') }}
|
|
@@ -116,6 +116,7 @@ export default defineComponent({
|
|
|
116
116
|
},
|
|
117
117
|
emits: ['onMore', 'addMember'],
|
|
118
118
|
setup(props) {
|
|
119
|
+
const dataStore = useDataStore();
|
|
119
120
|
const formStore = useFormStore();
|
|
120
121
|
const memberStore = useMemberStore();
|
|
121
122
|
const isMultiple = computed(() => [StoreMembers.insuredForm, StoreMembers.beneficiaryForm, StoreMembers.beneficialOwnerForm].includes(props.whichForm as StoreMembers));
|
|
@@ -128,6 +129,13 @@ export default defineComponent({
|
|
|
128
129
|
|
|
129
130
|
const isShort = computed(() => props.type === 'short');
|
|
130
131
|
const isActionsAvailable = computed(() => memberStore.isStatementEditible(props.whichForm));
|
|
132
|
+
const getMemberIIN = (each: Member) => {
|
|
133
|
+
const iin = getMemberInfo(each).iin;
|
|
134
|
+
if (dataStore.isFinCenter() && iin) {
|
|
135
|
+
return iin.replaceAll('-', '');
|
|
136
|
+
}
|
|
137
|
+
return iin;
|
|
138
|
+
};
|
|
131
139
|
|
|
132
140
|
const getMemberInfo = (memberData: Member) => {
|
|
133
141
|
return {
|
|
@@ -153,6 +161,7 @@ export default defineComponent({
|
|
|
153
161
|
isActionsAvailable,
|
|
154
162
|
|
|
155
163
|
// Functions
|
|
164
|
+
getMemberIIN,
|
|
156
165
|
getMemberInfo,
|
|
157
166
|
};
|
|
158
167
|
},
|
|
@@ -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)"
|
|
@@ -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,6 +1,6 @@
|
|
|
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
5
|
v-if="isCalculator"
|
|
6
6
|
class="mt-4"
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
<base-form-input
|
|
182
182
|
v-model="productConditionsForm.requestedSumInsured"
|
|
183
183
|
:readonly="isDisabledSum"
|
|
184
|
-
:clearable="!
|
|
185
|
-
:rules="
|
|
184
|
+
:clearable="!isDisabledSum"
|
|
185
|
+
:rules="requestedSumInsuredRule"
|
|
186
186
|
:label="requestedSumInsuredLabel"
|
|
187
187
|
:suffix="$constants.currencySymbols.kzt"
|
|
188
188
|
@input="onInputSum"
|
|
@@ -192,8 +192,8 @@
|
|
|
192
192
|
v-if="hasRequestedSumInsuredInDollar"
|
|
193
193
|
v-model="productConditionsForm.requestedSumInsuredInDollar"
|
|
194
194
|
:readonly="isDisabledSumDollar"
|
|
195
|
-
:clearable="!
|
|
196
|
-
:rules="
|
|
195
|
+
:clearable="!isDisabledSumDollar"
|
|
196
|
+
:rules="requestedSumInsuredRule"
|
|
197
197
|
:label="$dataStore.t('productConditionsForm.requestedSumInsuredInDollar')"
|
|
198
198
|
:suffix="$constants.currencySymbols.usd"
|
|
199
199
|
@input="onInputSumDollar"
|
|
@@ -201,14 +201,32 @@
|
|
|
201
201
|
/>
|
|
202
202
|
<base-form-input
|
|
203
203
|
v-model="productConditionsForm.insurancePremiumPerMonth"
|
|
204
|
-
:readonly="
|
|
205
|
-
:clearable="!
|
|
206
|
-
:rules="
|
|
204
|
+
:readonly="insurancePremiumPerMonthDisabled"
|
|
205
|
+
:clearable="!insurancePremiumPerMonthDisabled"
|
|
206
|
+
:rules="insurancePremiumPerMonthRule"
|
|
207
207
|
:label="insurancePremiumPerMonthLabel"
|
|
208
208
|
:suffix="$constants.currencySymbols.kzt"
|
|
209
209
|
@input="onInputInsurancePremiumPerMonth"
|
|
210
210
|
@onClear="onClearPremium"
|
|
211
211
|
/>
|
|
212
|
+
<base-form-input
|
|
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
|
+
/>
|
|
212
230
|
<base-form-input
|
|
213
231
|
v-if="whichProduct === 'gons' && isCalculator"
|
|
214
232
|
v-model="productConditionsForm.totalAmount5"
|
|
@@ -237,24 +255,6 @@
|
|
|
237
255
|
:label="$dataStore.t('productConditionsForm.statePremium7')"
|
|
238
256
|
:suffix="$constants.currencySymbols.kzt"
|
|
239
257
|
/>
|
|
240
|
-
<base-form-input
|
|
241
|
-
v-if="hasInsurancePremiumPerMonthInDollar"
|
|
242
|
-
v-model="productConditionsForm.insurancePremiumPerMonthInDollar"
|
|
243
|
-
:readonly="isDisabled"
|
|
244
|
-
:clearable="!isDisabled"
|
|
245
|
-
:rules="insurancePremiumPerMonth"
|
|
246
|
-
:label="$dataStore.t('productConditionsForm.insurancePremiumAmountInDollar')"
|
|
247
|
-
:suffix="$constants.currencySymbols.usd"
|
|
248
|
-
@input="onInputInsurancePremiumPerMonthInDollar"
|
|
249
|
-
@onClear="onClearPremiumDollar"
|
|
250
|
-
/>
|
|
251
|
-
<base-form-input
|
|
252
|
-
v-if="hasCurrency && $dataStore.currencies.usd"
|
|
253
|
-
v-model="$dataStore.currencies.usd"
|
|
254
|
-
:readonly="true"
|
|
255
|
-
:label="$dataStore.t('productConditionsForm.dollarExchangeRateNBRK')"
|
|
256
|
-
:suffix="$constants.currencySymbols.kzt"
|
|
257
|
-
/>
|
|
258
258
|
</base-form-section>
|
|
259
259
|
<base-form-section :title="$dataStore.t('calculationAnnuityPayments')" v-if="hasAnnuityPayments">
|
|
260
260
|
<base-form-toggle
|
|
@@ -431,10 +431,16 @@ export default defineComponent({
|
|
|
431
431
|
return isDisabled.value;
|
|
432
432
|
});
|
|
433
433
|
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask());
|
|
434
|
-
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm);
|
|
434
|
+
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
435
435
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
436
|
-
const
|
|
437
|
-
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) : []));
|
|
438
444
|
const hasCalculated = computed(() => !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth);
|
|
439
445
|
const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
440
446
|
const hasProcessIndexRate = computed(() => {
|
|
@@ -565,12 +571,18 @@ export default defineComponent({
|
|
|
565
571
|
if (whichProduct.value === 'halykkazyna') {
|
|
566
572
|
return true;
|
|
567
573
|
}
|
|
574
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
575
|
+
return false;
|
|
576
|
+
}
|
|
568
577
|
return isDisabled.value;
|
|
569
578
|
});
|
|
570
579
|
const isDisabledSumDollar = computed(() => {
|
|
571
580
|
if (whichProduct.value === 'halykkazyna') {
|
|
572
581
|
return true;
|
|
573
582
|
}
|
|
583
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
574
586
|
return isDisabled.value;
|
|
575
587
|
});
|
|
576
588
|
const isDisabledCoverPeriod = computed(() => {
|
|
@@ -991,8 +1003,9 @@ export default defineComponent({
|
|
|
991
1003
|
isDisabled,
|
|
992
1004
|
isTermsDisabled,
|
|
993
1005
|
isUnderwriterForm,
|
|
994
|
-
|
|
995
|
-
|
|
1006
|
+
insurancePremiumPerMonthRule,
|
|
1007
|
+
insurancePremiumPerMonthDisabled,
|
|
1008
|
+
requestedSumInsuredRule,
|
|
996
1009
|
isRecalculationDisabled,
|
|
997
1010
|
isUnderwriterRole,
|
|
998
1011
|
hasProcessIndexRate,
|
package/composables/styles.ts
CHANGED
|
@@ -98,7 +98,7 @@ export class Styles {
|
|
|
98
98
|
// Complex
|
|
99
99
|
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
|
100
100
|
this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
|
|
101
|
-
this.scrollPage = 'max-h-[
|
|
101
|
+
this.scrollPage = 'max-h-[85svh] overflow-y-scroll';
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
package/locales/ru.json
CHANGED
|
@@ -111,7 +111,8 @@
|
|
|
111
111
|
"underageShouldBeLess18": "Несовершеннолетний не может быть старше 18 лет",
|
|
112
112
|
"needAgent": "Поле агент должно быть заполнено",
|
|
113
113
|
"tripInsuredAmountCalculated": "Высчитана страховая сумма для выбора",
|
|
114
|
-
"calcSumForUnder": "Внимание! Требуется пересчет страховой суммы андеррайтером. Заявка будет направлена Андеррайтеру"
|
|
114
|
+
"calcSumForUnder": "Внимание! Требуется пересчет страховой суммы андеррайтером. Заявка будет направлена Андеррайтеру",
|
|
115
|
+
"doesHaveActiveContract": "Заключение договора невозможно. У Выгодоприобретателя имеется действующий договор"
|
|
115
116
|
},
|
|
116
117
|
"buttons": {
|
|
117
118
|
"dataInput": "Ввод данных",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@nuxt/devtools": "^0.4.5",
|
|
45
|
-
"@vueuse/components": "^10.
|
|
46
|
-
"@vueuse/core": "^10.
|
|
47
|
-
"@vueuse/nuxt": "^10.
|
|
45
|
+
"@vueuse/components": "^10.3.0",
|
|
46
|
+
"@vueuse/core": "^10.3.0",
|
|
47
|
+
"@vueuse/nuxt": "^10.3.0",
|
|
48
48
|
"nuxt": "^3.6.2",
|
|
49
49
|
"prettier": "^2.8.8"
|
|
50
50
|
},
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"vue-json-pretty": "^2.2.4",
|
|
67
67
|
"vue-toastification": "^2.0.0-rc.5",
|
|
68
68
|
"vue-uuid": "^3.0.0",
|
|
69
|
-
"vuetify": "^3.3.
|
|
69
|
+
"vuetify": "^3.3.11"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/plugins/vuetifyPlugin.ts
CHANGED
|
@@ -4,12 +4,14 @@ import 'vuetify/styles';
|
|
|
4
4
|
import { createVuetify } from 'vuetify';
|
|
5
5
|
import * as components from 'vuetify/components';
|
|
6
6
|
import * as directives from 'vuetify/directives';
|
|
7
|
+
import { VDataTable } from 'vuetify/labs/VDataTable';
|
|
7
8
|
|
|
8
9
|
export default defineNuxtPlugin(nuxtApp => {
|
|
9
10
|
const vuetify = createVuetify({
|
|
10
11
|
ssr: false,
|
|
11
12
|
components: {
|
|
12
13
|
...components,
|
|
14
|
+
VDataTable,
|
|
13
15
|
},
|
|
14
16
|
directives,
|
|
15
17
|
defaults: {
|
package/store/data.store.ts
CHANGED
|
@@ -589,6 +589,13 @@ export const useDataStore = defineStore('data', {
|
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
|
|
592
|
+
if (this.isGons && user.iin) {
|
|
593
|
+
const doesHaveActiveContract = await this.api.checkBeneficiariesInActualPolicy(user.iin.replace(/-/g, ''));
|
|
594
|
+
if (doesHaveActiveContract) {
|
|
595
|
+
this.showToaster('error', this.t('toaster.doesHaveActiveContract'), 6000);
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
592
599
|
this.isLoading = !onlySaveAction;
|
|
593
600
|
const hasInsisId = await this.alreadyInInsis(user);
|
|
594
601
|
if (typeof hasInsisId === 'number') {
|
|
@@ -1289,33 +1296,29 @@ export const useDataStore = defineStore('data', {
|
|
|
1289
1296
|
baseField: 'surveyByHealthBase' | 'surveyByCriticalBase' | 'surveyByHealthBasePolicyholder' | 'surveyByCriticalBasePolicyholder',
|
|
1290
1297
|
whichMember: 'insured' | 'policyholder' = 'insured',
|
|
1291
1298
|
) {
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
i.second = structuredClone(secondaryQuestions.value);
|
|
1312
|
-
}
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1299
|
+
try {
|
|
1300
|
+
const [baseQuestions, secondaryQuestions] = await Promise.allSettled([
|
|
1301
|
+
whichMember === 'insured' ? this.api.getQuestionList(surveyType, processInstanceId, insuredId) : this.api.getClientQuestionList(surveyType, processInstanceId, insuredId),
|
|
1302
|
+
whichMember === 'insured'
|
|
1303
|
+
? this.api.getQuestionListSecond(`${surveyType}second`, processInstanceId, insuredId)
|
|
1304
|
+
: this.api.getClientQuestionListSecond(`${surveyType}second`, processInstanceId, insuredId),
|
|
1305
|
+
,
|
|
1306
|
+
]);
|
|
1307
|
+
if (baseQuestions.status === 'fulfilled') {
|
|
1308
|
+
this.formStore[baseField] = baseQuestions.value;
|
|
1309
|
+
}
|
|
1310
|
+
if (secondaryQuestions.status === 'fulfilled') {
|
|
1311
|
+
const baseAnketa = this.formStore[baseField];
|
|
1312
|
+
if (baseAnketa && baseAnketa.body && baseAnketa.body.length) {
|
|
1313
|
+
baseAnketa.body.forEach(i => {
|
|
1314
|
+
if (i.first.definedAnswers === 'Y' && i.second === null && secondaryQuestions.value) {
|
|
1315
|
+
i.second = structuredClone(secondaryQuestions.value);
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1315
1318
|
}
|
|
1316
|
-
} catch (err) {
|
|
1317
|
-
ErrorHandler(err);
|
|
1318
1319
|
}
|
|
1320
|
+
} catch (err) {
|
|
1321
|
+
ErrorHandler(err);
|
|
1319
1322
|
}
|
|
1320
1323
|
return this.formStore[baseField];
|
|
1321
1324
|
},
|
|
@@ -2448,6 +2451,20 @@ export const useDataStore = defineStore('data', {
|
|
|
2448
2451
|
this.isLoading = false;
|
|
2449
2452
|
return false;
|
|
2450
2453
|
}
|
|
2454
|
+
if (!gbdResponse.content) {
|
|
2455
|
+
let errMsg: string = '';
|
|
2456
|
+
if (gbdResponse.status) {
|
|
2457
|
+
errMsg += gbdResponse.status;
|
|
2458
|
+
}
|
|
2459
|
+
if (gbdResponse.statusName) {
|
|
2460
|
+
errMsg += gbdResponse.statusName;
|
|
2461
|
+
}
|
|
2462
|
+
if (!!errMsg) {
|
|
2463
|
+
this.showToaster('error', errMsg, 5000);
|
|
2464
|
+
}
|
|
2465
|
+
this.isLoading = false;
|
|
2466
|
+
return false;
|
|
2467
|
+
}
|
|
2451
2468
|
const { person } = parseXML(gbdResponse.content, true, 'person');
|
|
2452
2469
|
const { responseInfo } = parseXML(gbdResponse.content, true, 'responseInfo');
|
|
2453
2470
|
if (member.gosPersonData !== null && member.gosPersonData.iin !== member.iin!.replace(/-/g, '')) {
|