hl-core 0.0.9-beta.50 → 0.0.9-beta.51
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 +110 -3
- package/components/Form/ManagerAttachment.vue +1 -1
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/FormInput.vue +5 -0
- package/components/Input/RoundedSelect.vue +5 -0
- package/components/Pages/Auth.vue +9 -3
- package/components/Pages/Documents.vue +137 -52
- package/components/Pages/MemberForm.vue +240 -20
- package/components/Pages/ProductConditions.vue +178 -13
- package/components/Panel/PanelHandler.vue +201 -33
- package/composables/classes.ts +23 -0
- package/composables/constants.ts +14 -2
- package/composables/index.ts +21 -15
- package/locales/ru.json +72 -5
- package/package.json +4 -3
- package/store/data.store.ts +279 -33
- package/store/rules.ts +17 -0
- package/types/enum.ts +18 -0
- package/types/index.ts +6 -3
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
:text="$dataStore.t('preliminaryCalculation')"
|
|
9
9
|
icon="mdi-alert text-[#FCB016]"
|
|
10
10
|
></base-message-block>
|
|
11
|
-
<base-form-section
|
|
11
|
+
<base-form-section
|
|
12
|
+
v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition && whichProduct !== 'pensionannuity'"
|
|
13
|
+
:title="$dataStore.t('policyholderForm')"
|
|
14
|
+
>
|
|
12
15
|
<base-form-input
|
|
13
16
|
v-model="productConditionsForm.lifeMultiplyClient"
|
|
14
17
|
:maska="$maska.numbers"
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
<base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
34
37
|
</base-form-section>
|
|
35
38
|
<base-form-section
|
|
36
|
-
v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns'"
|
|
39
|
+
v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuity'"
|
|
37
40
|
:title="$dataStore.t('insuredForm')"
|
|
38
41
|
>
|
|
39
42
|
<div v-for="(insured, index) of formStore.insuredForm" :key="index">
|
|
@@ -45,7 +48,10 @@
|
|
|
45
48
|
<base-form-input v-model="insured.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
46
49
|
</div>
|
|
47
50
|
</base-form-section>
|
|
48
|
-
<base-form-section
|
|
51
|
+
<base-form-section
|
|
52
|
+
v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuity'"
|
|
53
|
+
:title="$dataStore.t('recalculationInfo')"
|
|
54
|
+
>
|
|
49
55
|
<base-form-input
|
|
50
56
|
v-model="productConditionsForm.lifeMultiply"
|
|
51
57
|
:maska="$maska.numbers"
|
|
@@ -275,6 +281,100 @@
|
|
|
275
281
|
@append="openPanel($dataStore.t('productConditionsForm.processGfot'), $dataStore.processGfot, 'processGfot', $dataStore.getProcessGfot)"
|
|
276
282
|
/>
|
|
277
283
|
</base-form-section>
|
|
284
|
+
<section v-if="whichProduct === 'pensionannuity'">
|
|
285
|
+
<base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
|
|
286
|
+
<base-form-input
|
|
287
|
+
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
288
|
+
:maska="$maska.numbers"
|
|
289
|
+
:rules="$rules.required"
|
|
290
|
+
:readonly="isDisabled"
|
|
291
|
+
:clearable="!isDisabled"
|
|
292
|
+
:label="$dataStore.t('pension.compulsoryContractAmount')"
|
|
293
|
+
/>
|
|
294
|
+
<base-form-input
|
|
295
|
+
v-model="pensionCalculationParams.compulsoryProfContractAmount"
|
|
296
|
+
:maska="$maska.numbers"
|
|
297
|
+
:readonly="isDisabled"
|
|
298
|
+
:clearable="!isDisabled"
|
|
299
|
+
:label="$dataStore.t('pension.compulsoryProfContractAmount')"
|
|
300
|
+
/>
|
|
301
|
+
<base-animation>
|
|
302
|
+
<base-form-input
|
|
303
|
+
v-if="pensionCalculationParams.compulsoryProfContractAmount && pensionCalculationParams.compulsoryProfContractAmount != 0"
|
|
304
|
+
v-model="pensionForm.compulsoryProfMonthCount"
|
|
305
|
+
:maska="$maska.numbers"
|
|
306
|
+
:readonly="isDisabled"
|
|
307
|
+
:clearable="!isDisabled"
|
|
308
|
+
:label="$dataStore.t('pension.compulsoryProfMonthCount')"
|
|
309
|
+
/>
|
|
310
|
+
</base-animation>
|
|
311
|
+
<base-form-input
|
|
312
|
+
v-model="pensionCalculationParams.voluntaryContractAmount"
|
|
313
|
+
:maska="$maska.numbers"
|
|
314
|
+
:readonly="isDisabled"
|
|
315
|
+
:clearable="!isDisabled"
|
|
316
|
+
:label="$dataStore.t('pension.voluntaryContractAmount')"
|
|
317
|
+
/>
|
|
318
|
+
<base-form-input
|
|
319
|
+
v-model="pensionCalculationParams.ownFundsRaisAmount"
|
|
320
|
+
:maska="$maska.numbers"
|
|
321
|
+
:readonly="isDisabled"
|
|
322
|
+
:clearable="!isDisabled"
|
|
323
|
+
:label="$dataStore.t('pension.ownFundsRaisAmount')"
|
|
324
|
+
/>
|
|
325
|
+
</base-form-section>
|
|
326
|
+
<base-form-section :title="$dataStore.t('pension.companyName')">
|
|
327
|
+
<base-panel-input
|
|
328
|
+
v-model="pensionForm.transferContractCompany"
|
|
329
|
+
:value="pensionForm.transferContractCompany?.nameRu"
|
|
330
|
+
:label="$dataStore.t('pension.transferContractCompany')"
|
|
331
|
+
clearable
|
|
332
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
333
|
+
@append="openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.insuranceCompanies, 'insuranceCompanies', $dataStore.getInsuranceCompanies)"
|
|
334
|
+
/>
|
|
335
|
+
<base-form-input
|
|
336
|
+
v-model="pensionForm.transferContractDate"
|
|
337
|
+
:maska="$maska.date"
|
|
338
|
+
:label="$dataStore.t('pension.contractDate')"
|
|
339
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
340
|
+
/>
|
|
341
|
+
<base-form-input
|
|
342
|
+
v-model="pensionForm.transferContractFirstPaymentDate"
|
|
343
|
+
:maska="$maska.date"
|
|
344
|
+
:label="$dataStore.t('pension.transferContractFirstPaymentDate')"
|
|
345
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
346
|
+
/>
|
|
347
|
+
<base-form-input v-model="pensionForm.transferContractAmount" :maska="$maska.numbers" :label="$dataStore.t('pension.transferContractAmount')" />
|
|
348
|
+
</base-form-section>
|
|
349
|
+
<base-form-section :title="$dataStore.t('pension.paymentTerms')">
|
|
350
|
+
<base-form-input
|
|
351
|
+
v-model="contractDate"
|
|
352
|
+
:maska="$maska.date"
|
|
353
|
+
:rules="!isDisabled ? $rules.required.concat($rules.date) : []"
|
|
354
|
+
:readonly="isDisabled"
|
|
355
|
+
:clearable="!isDisabled"
|
|
356
|
+
:min-date="new Date()"
|
|
357
|
+
:label="$dataStore.t('pension.contractDate')"
|
|
358
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
359
|
+
/>
|
|
360
|
+
<span v-if="maxDate && !isDisabled" class="px-3 font-light text-sm bg-white py-0 mt-[-5px]" style="color: #a0b3d8 !important">до {{ maxDate }}</span>
|
|
361
|
+
<base-form-input v-model="dateOfBegin" :maska="$maska.date" readonly :label="$dataStore.t('pension.paymentsDate')" append-inner-icon="mdi mdi-calendar-blank-outline" />
|
|
362
|
+
<base-rounded-select
|
|
363
|
+
v-model="pensionForm.guaranteedPeriod"
|
|
364
|
+
class="pension-guaranteed-period"
|
|
365
|
+
:readonly="isDisabled"
|
|
366
|
+
:clearable="!isDisabled"
|
|
367
|
+
:label="$dataStore.t('pension.guaranteedPeriod')"
|
|
368
|
+
:items="guaranteedPeriodList"
|
|
369
|
+
:hide-details="true"
|
|
370
|
+
/>
|
|
371
|
+
<base-form-input v-model="pensionForm.frequencyPayments" disabled :label="$dataStore.t('pension.frequencyPayments')" />
|
|
372
|
+
<base-form-input v-model="pensionForm.periodPayments" disabled :label="$dataStore.t('pension.paymentPeriod')" />
|
|
373
|
+
<base-form-input v-model="pensionForm.insuranceProgramType" disabled :label="$dataStore.t('pension.insuranceProgramType')" />
|
|
374
|
+
<base-form-input v-model="pensionAmount" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionAmount')" />
|
|
375
|
+
<base-form-input v-model="pensionForm.payment" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionPayment')" />
|
|
376
|
+
</base-form-section>
|
|
377
|
+
</section>
|
|
278
378
|
<base-form-section v-if="hasAnnuityPayments" :title="$dataStore.t('calculationAnnuityPayments')">
|
|
279
379
|
<base-form-toggle
|
|
280
380
|
v-model="productConditionsForm.additionalConditionAnnuityPayments"
|
|
@@ -488,8 +588,9 @@
|
|
|
488
588
|
</base-form-section>
|
|
489
589
|
</v-form>
|
|
490
590
|
<base-btn v-if="!$dataStore.isCalculator && isCalculator && hasCalculated" :btn="$styles.greenLightBtn" :text="$dataStore.t('buttons.toStatement')" @click="toStatement" />
|
|
591
|
+
<base-btn v-if="!isDisabled && $dataStore.isPension && isTask" :text="$dataStore.t('buttons.save')" :loading="$dataStore.isLoading" type="submit" @click="submitForm" />
|
|
491
592
|
<base-btn
|
|
492
|
-
v-if="$dataStore.isCalculator ? true : !isDisabled && isTask && ($dataStore.isInitiator() || $dataStore.isUnderwriter())"
|
|
593
|
+
v-if="$dataStore.isCalculator ? true : !isDisabled && isTask && ($dataStore.isInitiator() || $dataStore.isUnderwriter()) && !$dataStore.isPension"
|
|
493
594
|
:loading="isCalculating"
|
|
494
595
|
:text="$dataStore.t('buttons.calculate')"
|
|
495
596
|
@click="submitForm"
|
|
@@ -602,6 +703,17 @@ export default defineComponent({
|
|
|
602
703
|
const enabled = 'включено';
|
|
603
704
|
|
|
604
705
|
const additionalTerms = ref<AddCover[]>([]);
|
|
706
|
+
const ksj = ref(new Value());
|
|
707
|
+
const maxDate = ref();
|
|
708
|
+
const dateOfBegin = ref();
|
|
709
|
+
const contractDate = ref();
|
|
710
|
+
const guaranteedPeriodList = ref();
|
|
711
|
+
const isMultiplePanelOpen = ref<boolean>(false);
|
|
712
|
+
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
713
|
+
|
|
714
|
+
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
715
|
+
const multiplePanelList = ref<CountryValue[]>([]);
|
|
716
|
+
const calculatorForm = productConditionsForm.calculatorForm;
|
|
605
717
|
|
|
606
718
|
const isShownAdditionalTerms = computed(() => {
|
|
607
719
|
if (whichProduct.value === 'gons') {
|
|
@@ -609,13 +721,6 @@ export default defineComponent({
|
|
|
609
721
|
}
|
|
610
722
|
return true;
|
|
611
723
|
});
|
|
612
|
-
|
|
613
|
-
const isMultiplePanelOpen = ref<boolean>(false);
|
|
614
|
-
|
|
615
|
-
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
616
|
-
const multiplePanelList = ref<CountryValue[]>([]);
|
|
617
|
-
const calculatorForm = productConditionsForm.calculatorForm;
|
|
618
|
-
|
|
619
724
|
const isUnderwriterForm = computed(() => {
|
|
620
725
|
if (route.params.taskId === '0 ' || props.isCalculator === true) {
|
|
621
726
|
return false;
|
|
@@ -845,7 +950,7 @@ export default defineComponent({
|
|
|
845
950
|
return isDisabled.value;
|
|
846
951
|
});
|
|
847
952
|
const hasDefault = computed(() => {
|
|
848
|
-
if (whichProduct.value === 'lifetrip') {
|
|
953
|
+
if (whichProduct.value === 'lifetrip' || whichProduct.value === 'pensionannuity') {
|
|
849
954
|
return false;
|
|
850
955
|
}
|
|
851
956
|
return true;
|
|
@@ -896,6 +1001,23 @@ export default defineComponent({
|
|
|
896
1001
|
return dataStore.t('generalConditions');
|
|
897
1002
|
});
|
|
898
1003
|
|
|
1004
|
+
const pensionCalculationParams = ref({
|
|
1005
|
+
compulsoryContractAmount: pensionForm && pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount != 0 ? pensionForm.compulsoryContractAmount : null,
|
|
1006
|
+
voluntaryContractAmount: pensionForm && pensionForm.voluntaryContractAmount && pensionForm.voluntaryContractAmount != 0 ? pensionForm.voluntaryContractAmount : null,
|
|
1007
|
+
ownFundsRaisAmount: pensionForm && pensionForm.ownFundsRaisAmount && pensionForm.ownFundsRaisAmount != 0 ? pensionForm.ownFundsRaisAmount : null,
|
|
1008
|
+
compulsoryProfContractAmount:
|
|
1009
|
+
pensionForm && pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount != 0 ? pensionForm.compulsoryProfContractAmount : null,
|
|
1010
|
+
});
|
|
1011
|
+
|
|
1012
|
+
const pensionAmount = computed(() =>
|
|
1013
|
+
pensionCalculationParams.value
|
|
1014
|
+
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
1015
|
+
(Number(pensionCalculationParams.value.voluntaryContractAmount) ?? 0) +
|
|
1016
|
+
(Number(pensionCalculationParams.value.ownFundsRaisAmount) ?? 0) +
|
|
1017
|
+
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0)
|
|
1018
|
+
: 0,
|
|
1019
|
+
);
|
|
1020
|
+
|
|
899
1021
|
const formatTermValue = (term: number) => {
|
|
900
1022
|
if (term !== null) {
|
|
901
1023
|
const termNumber = Number(term);
|
|
@@ -1281,6 +1403,28 @@ export default defineComponent({
|
|
|
1281
1403
|
} else {
|
|
1282
1404
|
await dataStore.calculatePrice();
|
|
1283
1405
|
}
|
|
1406
|
+
} else if (whichProduct.value === 'pensionannuity') {
|
|
1407
|
+
if (
|
|
1408
|
+
pensionCalculationParams.value &&
|
|
1409
|
+
pensionCalculationParams.value.compulsoryProfContractAmount &&
|
|
1410
|
+
pensionForm &&
|
|
1411
|
+
pensionForm.compulsoryProfContractAmount != 0 &&
|
|
1412
|
+
pensionForm.compulsoryProfMonthCount < 60
|
|
1413
|
+
) {
|
|
1414
|
+
dataStore.showToaster('error', 'Минимальное число дней уплаты ОППВ должно быть больше 60');
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
Object.assign(
|
|
1418
|
+
pensionForm,
|
|
1419
|
+
(pensionCalculationParams.value = {
|
|
1420
|
+
...pensionCalculationParams.value,
|
|
1421
|
+
compulsoryContractAmount: Number(pensionCalculationParams.value.compulsoryContractAmount),
|
|
1422
|
+
voluntaryContractAmount: Number(pensionCalculationParams.value.voluntaryContractAmount),
|
|
1423
|
+
ownFundsRaisAmount: Number(pensionCalculationParams.value.ownFundsRaisAmount),
|
|
1424
|
+
compulsoryProfContractAmount: Number(pensionCalculationParams.value.compulsoryProfContractAmount),
|
|
1425
|
+
}),
|
|
1426
|
+
);
|
|
1427
|
+
await dataStore.setApplication(true);
|
|
1284
1428
|
} else {
|
|
1285
1429
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1286
1430
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
@@ -1360,6 +1504,7 @@ export default defineComponent({
|
|
|
1360
1504
|
additionalTerms.value = formStore.additionalInsuranceTerms;
|
|
1361
1505
|
} else {
|
|
1362
1506
|
await dataStore.reCalculate(formStore.applicationData.processInstanceId, recalculationData, route.params.taskId as string, whichSum.value);
|
|
1507
|
+
additionalTerms.value = formStore.additionalInsuranceTerms;
|
|
1363
1508
|
}
|
|
1364
1509
|
}
|
|
1365
1510
|
isCalculating.value = true;
|
|
@@ -1403,7 +1548,7 @@ export default defineComponent({
|
|
|
1403
1548
|
if (dataStore.isCalculator) {
|
|
1404
1549
|
clearFields();
|
|
1405
1550
|
}
|
|
1406
|
-
if (whichProduct.value !== 'lifetrip') {
|
|
1551
|
+
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuity') {
|
|
1407
1552
|
if (
|
|
1408
1553
|
(dataStore.isCalculator || route.params.taskId === '0') &&
|
|
1409
1554
|
productConditionsForm.requestedSumInsured === null &&
|
|
@@ -1458,6 +1603,12 @@ export default defineComponent({
|
|
|
1458
1603
|
}, 0),
|
|
1459
1604
|
);
|
|
1460
1605
|
}
|
|
1606
|
+
if (whichProduct.value === 'pensionannuity') {
|
|
1607
|
+
contractDate.value = reformatDate(formStore.applicationData.pensionApp.contractDate);
|
|
1608
|
+
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
1609
|
+
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 1);
|
|
1610
|
+
guaranteedPeriodList.value = Array.from(Array(35), (e, i) => i + 1);
|
|
1611
|
+
}
|
|
1461
1612
|
});
|
|
1462
1613
|
|
|
1463
1614
|
watch(
|
|
@@ -1565,7 +1716,13 @@ export default defineComponent({
|
|
|
1565
1716
|
subPanelList,
|
|
1566
1717
|
subTermValue,
|
|
1567
1718
|
panelCodeList,
|
|
1719
|
+
pensionForm,
|
|
1720
|
+
dateOfBegin,
|
|
1721
|
+
contractDate,
|
|
1722
|
+
ksj,
|
|
1568
1723
|
enabled,
|
|
1724
|
+
maxDate,
|
|
1725
|
+
guaranteedPeriodList,
|
|
1569
1726
|
|
|
1570
1727
|
// Computed
|
|
1571
1728
|
isTask,
|
|
@@ -1612,6 +1769,8 @@ export default defineComponent({
|
|
|
1612
1769
|
isDisabledFixInsSum,
|
|
1613
1770
|
defaultText,
|
|
1614
1771
|
hasDeathInsFromNS,
|
|
1772
|
+
pensionAmount,
|
|
1773
|
+
pensionCalculationParams,
|
|
1615
1774
|
hasDeathInsAnyReason,
|
|
1616
1775
|
|
|
1617
1776
|
// Rules
|
|
@@ -1647,3 +1806,9 @@ export default defineComponent({
|
|
|
1647
1806
|
},
|
|
1648
1807
|
});
|
|
1649
1808
|
</script>
|
|
1809
|
+
|
|
1810
|
+
<style>
|
|
1811
|
+
.pension-guaranteed-period .v-field {
|
|
1812
|
+
border: none !important;
|
|
1813
|
+
}
|
|
1814
|
+
</style>
|