hl-core 0.0.10-beta.2 → 0.0.10-beta.21
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 +221 -195
- package/components/Complex/TextBlock.vue +2 -0
- package/components/Dialog/Dialog.vue +7 -1
- package/components/Dialog/FamilyDialog.vue +2 -0
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Form/DynamicForm.vue +1 -0
- package/components/Form/FormData.vue +1 -0
- package/components/Form/ManagerAttachment.vue +2 -4
- package/components/Input/DynamicInput.vue +2 -0
- package/components/Input/FormInput.vue +2 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Input/PanelInput.vue +1 -0
- package/components/Input/RoundedInput.vue +2 -0
- package/components/Input/RoundedSelect.vue +4 -0
- package/components/Input/SwitchInput.vue +2 -0
- package/components/Input/TextInput.vue +2 -0
- package/components/Layout/Drawer.vue +2 -0
- package/components/Pages/Anketa.vue +165 -166
- package/components/Pages/Auth.vue +2 -0
- package/components/Pages/ContragentForm.vue +1 -0
- package/components/Pages/Documents.vue +237 -6
- package/components/Pages/MemberForm.vue +204 -56
- package/components/Pages/ProductConditions.vue +153 -74
- package/components/Panel/PanelHandler.vue +231 -105
- package/components/Transitions/Animation.vue +2 -0
- package/components/Utilities/Chip.vue +2 -0
- package/components/Utilities/JsonViewer.vue +1 -2
- package/composables/classes.ts +102 -41
- package/composables/fields.ts +6 -4
- package/composables/index.ts +220 -7
- package/composables/styles.ts +8 -24
- package/configs/pwa.ts +1 -7
- package/locales/ru.json +11 -4
- package/nuxt.config.ts +10 -13
- package/package.json +13 -12
- package/plugins/head.ts +1 -1
- package/store/data.store.ts +235 -357
- package/store/member.store.ts +3 -2
- package/tsconfig.json +3 -0
- package/types/enum.ts +17 -2
- package/types/form.ts +71 -75
- package/types/index.ts +889 -877
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="flex flex-col gap-4 px-[10px]">
|
|
3
|
-
<v-form ref="vForm" @submit="submitForm"
|
|
2
|
+
<section class="flex flex-col gap-4 px-[10px]" :class="[$styles.scrollPage]">
|
|
3
|
+
<v-form ref="vForm" @submit="submitForm">
|
|
4
4
|
<base-message-block
|
|
5
5
|
v-if="isCalculator"
|
|
6
6
|
class="mt-4"
|
|
@@ -36,7 +36,14 @@
|
|
|
36
36
|
<base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
37
37
|
</base-form-section>
|
|
38
38
|
<base-form-section
|
|
39
|
-
v-if="
|
|
39
|
+
v-if="
|
|
40
|
+
isUnderwriterRole &&
|
|
41
|
+
$dataStore.members.insuredApp.has === true &&
|
|
42
|
+
whichProduct !== 'lifebusiness' &&
|
|
43
|
+
whichProduct !== 'gns' &&
|
|
44
|
+
whichProduct !== 'pensionannuitynew' &&
|
|
45
|
+
whichProduct !== 'lifetrip'
|
|
46
|
+
"
|
|
40
47
|
:title="$dataStore.t('insuredForm')"
|
|
41
48
|
>
|
|
42
49
|
<div v-for="(insured, index) of formStore.insuredForm" :key="index">
|
|
@@ -293,7 +300,14 @@
|
|
|
293
300
|
/>
|
|
294
301
|
</base-form-section>
|
|
295
302
|
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
296
|
-
<base-
|
|
303
|
+
<base-animation>
|
|
304
|
+
<base-btn
|
|
305
|
+
v-if="formStore.applicationData.processCode === 19 && !isDisabled"
|
|
306
|
+
:text="$dataStore.t('buttons.copyToClient')"
|
|
307
|
+
class="mt-4 min-h-[60px]"
|
|
308
|
+
@click="copyRedirect"
|
|
309
|
+
/>
|
|
310
|
+
</base-animation>
|
|
297
311
|
<base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
|
|
298
312
|
<base-form-input
|
|
299
313
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
@@ -334,48 +348,43 @@
|
|
|
334
348
|
:label="$dataStore.t('pension.ownFundsRaisAmount')"
|
|
335
349
|
/>
|
|
336
350
|
</base-form-section>
|
|
337
|
-
<base-form-section :title="$dataStore.t('pension.companyName')">
|
|
338
|
-
<base-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
:clearable="!isDisabled"
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
:
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
:maska="$maska.numbers"
|
|
375
|
-
:label="$dataStore.t('pension.transferContractAmount')"
|
|
376
|
-
:rules="pensionForm.transferContractCompany?.ids ? $rules.required : []"
|
|
377
|
-
/>
|
|
378
|
-
<base-form-toggle v-model="pensionForm.transferContractIsOppv" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('pension.isOPPVTransfer')" />
|
|
351
|
+
<base-form-section v-if="formStore.applicationData.processCode !== 2" :title="$dataStore.t('pension.companyName')">
|
|
352
|
+
<base-btn :text="$dataStore.t('buttons.add')" size="sm" :btn="$styles.blueBtn" @click="addTransferContract" />
|
|
353
|
+
<section v-for="(contract, index) in transferContracts" class="py-2">
|
|
354
|
+
<base-panel-input
|
|
355
|
+
v-model="contract.transferContractCompany"
|
|
356
|
+
:value="contract.transferContractCompany?.nameRu"
|
|
357
|
+
:label="$dataStore.t('pension.transferContractCompany')"
|
|
358
|
+
:readonly="isDisabled"
|
|
359
|
+
:clearable="!isDisabled"
|
|
360
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
361
|
+
@append="
|
|
362
|
+
openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.transferContractCompanies, 'transferContractCompany', $dataStore.getInsuranceCompanies)
|
|
363
|
+
"
|
|
364
|
+
@click="contractIndex = index"
|
|
365
|
+
/>
|
|
366
|
+
<base-form-input
|
|
367
|
+
v-model="contract.transferContractDate"
|
|
368
|
+
:maska="$maska.date"
|
|
369
|
+
:label="$dataStore.t('pension.contractDate')"
|
|
370
|
+
:readonly="isDisabled"
|
|
371
|
+
:clearable="!isDisabled"
|
|
372
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
373
|
+
/>
|
|
374
|
+
<base-form-input v-model="contract.transferContractNumber" :label="$dataStore.t('pension.globalId')" :readonly="isDisabled" :clearable="!isDisabled" />
|
|
375
|
+
<base-form-input v-model="contract.transferContractRegNumber" :label="$dataStore.t('pension.transferRegNumber')" :readonly="isDisabled" :clearable="!isDisabled" />
|
|
376
|
+
<base-form-input
|
|
377
|
+
v-model="contract.transferContractFirstPaymentDate"
|
|
378
|
+
:maska="$maska.date"
|
|
379
|
+
:label="$dataStore.t('pension.transferContractFirstPaymentDate')"
|
|
380
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
381
|
+
:readonly="isDisabled"
|
|
382
|
+
:clearable="!isDisabled"
|
|
383
|
+
/>
|
|
384
|
+
<base-form-input v-model="contract.transferContractAmount" :maska="$maska.numbers" :label="$dataStore.t('pension.transferContractAmount')" />
|
|
385
|
+
<base-form-toggle v-model="contract.transferContractIsOppv" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('pension.isOPPVTransfer')" />
|
|
386
|
+
<base-btn :text="$dataStore.t('buttons.delete')" size="sm" :btn="$styles.whiteBtn" @click="removeTransferContract(index)" />
|
|
387
|
+
</section>
|
|
379
388
|
</base-form-section>
|
|
380
389
|
<base-form-section :title="$dataStore.t('pension.paymentTerms')">
|
|
381
390
|
<base-form-input
|
|
@@ -619,17 +628,46 @@
|
|
|
619
628
|
</div>
|
|
620
629
|
</base-form-section>
|
|
621
630
|
</v-form>
|
|
622
|
-
<base-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
631
|
+
<base-animation>
|
|
632
|
+
<base-btn
|
|
633
|
+
v-if="!$dataStore.isCalculator && isCalculator && hasCalculated"
|
|
634
|
+
:btn="$styles.greenLightBtn"
|
|
635
|
+
:text="$dataStore.t('buttons.toStatement')"
|
|
636
|
+
class="min-h-[60px]"
|
|
637
|
+
@click="toStatement"
|
|
638
|
+
/>
|
|
639
|
+
</base-animation>
|
|
640
|
+
<base-animation>
|
|
641
|
+
<base-btn
|
|
642
|
+
v-if="!isDisabled && $dataStore.isPension && isTask"
|
|
643
|
+
:text="$dataStore.t('buttons.save')"
|
|
644
|
+
:loading="$dataStore.isLoading"
|
|
645
|
+
class="min-h-[60px]"
|
|
646
|
+
type="submit"
|
|
647
|
+
@click="submitForm"
|
|
648
|
+
/>
|
|
649
|
+
</base-animation>
|
|
650
|
+
<base-animation>
|
|
651
|
+
<base-btn
|
|
652
|
+
v-if="$dataStore.isCalculator ? true : !isDisabled && isTask && ($dataStore.isInitiator() || $dataStore.isUnderwriter()) && !$dataStore.isPension"
|
|
653
|
+
:loading="isCalculating"
|
|
654
|
+
class="min-h-[60px]"
|
|
655
|
+
:text="$dataStore.t('buttons.calculate')"
|
|
656
|
+
@click="submitForm"
|
|
657
|
+
/>
|
|
658
|
+
</base-animation>
|
|
630
659
|
<div v-if="$dataStore.isTask() && $dataStore.isUnderwriter() && !isRecalculationDisabled" class="flex gap-3">
|
|
631
|
-
<base-
|
|
632
|
-
|
|
660
|
+
<base-animation>
|
|
661
|
+
<base-btn
|
|
662
|
+
v-if="hasCalcSum"
|
|
663
|
+
class="min-h-[60px]"
|
|
664
|
+
:text="$dataStore.t('buttons.calcSum')"
|
|
665
|
+
type="submit"
|
|
666
|
+
@click.prevent="underwriterCalculate('sum')"
|
|
667
|
+
:loading="isCalculating"
|
|
668
|
+
/>
|
|
669
|
+
</base-animation>
|
|
670
|
+
<base-btn class="min-h-[60px]" :text="$dataStore.t('buttons.calcPremium')" type="submit" @click.prevent="underwriterCalculate('premium')" :loading="isCalculating" />
|
|
633
671
|
</div>
|
|
634
672
|
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
635
673
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
@@ -695,7 +733,8 @@
|
|
|
695
733
|
</template>
|
|
696
734
|
|
|
697
735
|
<script lang="ts">
|
|
698
|
-
import { Member, Value, CountryValue, CalculatorForm } from '../../composables/classes';
|
|
736
|
+
import { Member, Value, CountryValue, CalculatorForm, TransferContract } from '../../composables/classes';
|
|
737
|
+
import type { Projects, AddCover, AddCoverAnswer } from '../../types';
|
|
699
738
|
|
|
700
739
|
export default defineComponent({
|
|
701
740
|
props: {
|
|
@@ -745,6 +784,9 @@ export default defineComponent({
|
|
|
745
784
|
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
746
785
|
const isEnpfSum = (formStore.applicationData?.isEnpfSum ?? false) && useEnv().isProduction;
|
|
747
786
|
|
|
787
|
+
const transferContracts = ref<TransferContract[]>([]);
|
|
788
|
+
const contractsValue = ref<Value[]>([]);
|
|
789
|
+
const contractIndex = ref<number>(0);
|
|
748
790
|
const isMultiplePanelOpen = ref<boolean>(false);
|
|
749
791
|
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
750
792
|
const multiplePanelList = ref<CountryValue[]>([]);
|
|
@@ -1045,15 +1087,19 @@ export default defineComponent({
|
|
|
1045
1087
|
compulsoryProfContractAmount:
|
|
1046
1088
|
pensionForm && pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount != 0 ? pensionForm.compulsoryProfContractAmount : null,
|
|
1047
1089
|
transferContractAmount: pensionForm && pensionForm.transferContractAmount && pensionForm.transferContractAmount != 0 ? pensionForm.transferContractAmount : null,
|
|
1090
|
+
transferContractCompany: pensionForm && pensionForm.transferContractCompany ? pensionForm.transferContractCompany : null,
|
|
1048
1091
|
});
|
|
1049
1092
|
|
|
1093
|
+
const contractsAmount = computed(() => transferContracts.value?.reduce((accumulator, currentValue) => accumulator + currentValue.transferContractAmount, 0));
|
|
1094
|
+
|
|
1050
1095
|
const pensionAmount = computed(() =>
|
|
1051
1096
|
pensionCalculationParams.value
|
|
1052
1097
|
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
1053
1098
|
(Number(pensionCalculationParams.value.voluntaryContractAmount) ?? 0) +
|
|
1054
1099
|
(Number(pensionCalculationParams.value.ownFundsRaisAmount) ?? 0) +
|
|
1055
1100
|
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0) +
|
|
1056
|
-
(Number(pensionCalculationParams.value.transferContractAmount) ?? 0)
|
|
1101
|
+
(Number(pensionCalculationParams.value.transferContractAmount) ?? 0) +
|
|
1102
|
+
Number(contractsAmount.value)
|
|
1057
1103
|
: 0,
|
|
1058
1104
|
);
|
|
1059
1105
|
|
|
@@ -1099,8 +1145,12 @@ export default defineComponent({
|
|
|
1099
1145
|
// @ts-ignore
|
|
1100
1146
|
calculatorForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1101
1147
|
} else if (whichProduct.value === 'pensionannuitynew') {
|
|
1102
|
-
|
|
1103
|
-
|
|
1148
|
+
if (currentPanel.value === 'transferContractCompany') {
|
|
1149
|
+
transferContracts.value[contractIndex.value].transferContractCompany = item;
|
|
1150
|
+
} else {
|
|
1151
|
+
// @ts-ignore
|
|
1152
|
+
pensionForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1153
|
+
}
|
|
1104
1154
|
} else {
|
|
1105
1155
|
// @ts-ignore
|
|
1106
1156
|
productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
@@ -1437,6 +1487,14 @@ export default defineComponent({
|
|
|
1437
1487
|
return term.coverTypeName;
|
|
1438
1488
|
};
|
|
1439
1489
|
|
|
1490
|
+
const addTransferContract = () => {
|
|
1491
|
+
transferContracts.value.push(new TransferContract());
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
const removeTransferContract = (index: number) => {
|
|
1495
|
+
transferContracts.value.splice(index, 1);
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1440
1498
|
const submitForm = async () => {
|
|
1441
1499
|
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
1442
1500
|
if (v.valid) {
|
|
@@ -1444,9 +1502,12 @@ export default defineComponent({
|
|
|
1444
1502
|
if (calculatorForm.type.code === 'Single' && calculatorForm.startDate && calculatorForm.endDate) {
|
|
1445
1503
|
const formattedStartDate = formatDate(calculatorForm.startDate);
|
|
1446
1504
|
const formattedEndDate = formatDate(calculatorForm.endDate);
|
|
1447
|
-
if (formattedStartDate && formattedEndDate && formattedStartDate.getTime()
|
|
1505
|
+
if (formattedStartDate && formattedEndDate && formattedStartDate.getTime() >= formattedEndDate.getTime()) {
|
|
1448
1506
|
return dataStore.showToaster('error', dataStore.t('toaster.startMoreEnd'));
|
|
1449
1507
|
}
|
|
1508
|
+
if (calculatorForm.days !== productConditionsForm.getSingleTripDays()) {
|
|
1509
|
+
return dataStore.showToaster('error', dataStore.t('toaster.daysPickAgain'));
|
|
1510
|
+
}
|
|
1450
1511
|
}
|
|
1451
1512
|
if (dataStore.isTask()) {
|
|
1452
1513
|
await dataStore.calculatePrice(route.params.taskId as string);
|
|
@@ -1454,15 +1515,21 @@ export default defineComponent({
|
|
|
1454
1515
|
await dataStore.calculatePrice();
|
|
1455
1516
|
}
|
|
1456
1517
|
} else if (whichProduct.value === 'pensionannuitynew') {
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1518
|
+
const formatedContracts: Array<TransferContract> = [];
|
|
1519
|
+
if (transferContracts.value && transferContracts.value.length) {
|
|
1520
|
+
transferContracts.value.forEach((i, index) => {
|
|
1521
|
+
const formatedContractDate = formatDate(transferContracts.value[index].transferContractDate);
|
|
1522
|
+
const formatedFirstPaymentDate = formatDate(transferContracts.value[index].transferContractFirstPaymentDate);
|
|
1523
|
+
const formatedNameRu = String(transferContracts.value[index].transferContractCompany?.nameRu);
|
|
1524
|
+
formatedContracts.push({
|
|
1525
|
+
...transferContracts.value[index],
|
|
1526
|
+
transferContractDate: formatedContractDate?.toISOString() ?? '',
|
|
1527
|
+
transferContractFirstPaymentDate: formatedFirstPaymentDate?.toISOString() ?? '',
|
|
1528
|
+
// @ts-ignore
|
|
1529
|
+
transferContractCompany: formatedNameRu,
|
|
1530
|
+
id: transferContracts.value[index].id ?? null,
|
|
1531
|
+
});
|
|
1532
|
+
});
|
|
1466
1533
|
}
|
|
1467
1534
|
const data = {
|
|
1468
1535
|
...pensionForm,
|
|
@@ -1473,10 +1540,9 @@ export default defineComponent({
|
|
|
1473
1540
|
ownFundsRaisAmount: Number(pensionCalculationParams.value.ownFundsRaisAmount),
|
|
1474
1541
|
compulsoryProfContractAmount: Number(pensionCalculationParams.value.compulsoryProfContractAmount),
|
|
1475
1542
|
transferContractAmount: Number(pensionCalculationParams.value.transferContractAmount),
|
|
1543
|
+
transferContractCompany: pensionForm?.transferContractCompany?.nameRu ?? '',
|
|
1476
1544
|
}),
|
|
1477
|
-
|
|
1478
|
-
transferContractDate: transferContractDate.value ? formatDate(transferContractDate.value) : null,
|
|
1479
|
-
transferContractFirstPaymentDate: transferContractFirstPaymentDate.value ? formatDate(transferContractFirstPaymentDate.value) : null,
|
|
1545
|
+
transferContracts: formatedContracts,
|
|
1480
1546
|
};
|
|
1481
1547
|
await dataStore.setApplication(data, true);
|
|
1482
1548
|
} else {
|
|
@@ -1663,6 +1729,14 @@ export default defineComponent({
|
|
|
1663
1729
|
transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
|
|
1664
1730
|
transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
|
|
1665
1731
|
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
|
|
1732
|
+
if (transferContracts.value && transferContracts.value.length) {
|
|
1733
|
+
transferContracts.value = pensionForm.transferContracts?.map((contract: TransferContract) => {
|
|
1734
|
+
contract.transferContractDate = reformatDate(contract.transferContractDate)!;
|
|
1735
|
+
contract.transferContractFirstPaymentDate = reformatDate(contract.transferContractFirstPaymentDate)!;
|
|
1736
|
+
contract.transferContractCompany = { nameRu: contract.transferContractCompany } as any;
|
|
1737
|
+
return contract;
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1666
1740
|
}
|
|
1667
1741
|
});
|
|
1668
1742
|
|
|
@@ -1763,7 +1837,7 @@ export default defineComponent({
|
|
|
1763
1837
|
}
|
|
1764
1838
|
|
|
1765
1839
|
const copyRedirect = async () => {
|
|
1766
|
-
const url = await dataStore.api.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
|
|
1840
|
+
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
|
|
1767
1841
|
dataStore.copyToClipboard(url.redirectUrl);
|
|
1768
1842
|
};
|
|
1769
1843
|
|
|
@@ -1800,6 +1874,9 @@ export default defineComponent({
|
|
|
1800
1874
|
maxDate,
|
|
1801
1875
|
guaranteedPeriodList,
|
|
1802
1876
|
isEnpfSum,
|
|
1877
|
+
transferContracts,
|
|
1878
|
+
contractsValue,
|
|
1879
|
+
contractIndex,
|
|
1803
1880
|
|
|
1804
1881
|
// Computed
|
|
1805
1882
|
isTask,
|
|
@@ -1882,6 +1959,8 @@ export default defineComponent({
|
|
|
1882
1959
|
pickSubTermValue,
|
|
1883
1960
|
onInputFixInsSum,
|
|
1884
1961
|
copyRedirect,
|
|
1962
|
+
addTransferContract,
|
|
1963
|
+
removeTransferContract,
|
|
1885
1964
|
};
|
|
1886
1965
|
},
|
|
1887
1966
|
});
|