hl-core 0.0.10-beta.24 → 0.0.10-beta.25
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 +38 -5
- package/components/Pages/Documents.vue +15 -8
- package/components/Pages/MemberForm.vue +57 -27
- package/components/Pages/ProductConditions.vue +151 -30
- package/components/Panel/PanelHandler.vue +30 -12
- package/composables/classes.ts +8 -0
- package/composables/constants.ts +17 -0
- package/composables/index.ts +1 -0
- package/locales/ru.json +6 -2
- package/package.json +1 -1
- package/store/data.store.ts +246 -60
- package/store/member.store.ts +15 -4
- package/types/enum.ts +1 -0
|
@@ -152,6 +152,17 @@
|
|
|
152
152
|
@append="openPanel($dataStore.t('form.gender'), $dataStore.gender, 'gender')"
|
|
153
153
|
/>
|
|
154
154
|
</div>
|
|
155
|
+
<base-panel-input
|
|
156
|
+
v-if="hasCurrency"
|
|
157
|
+
v-model="productConditionsForm.currency"
|
|
158
|
+
:value="productConditionsForm.currency.nameRu"
|
|
159
|
+
:readonly="isDisabled"
|
|
160
|
+
:clearable="!isDisabled"
|
|
161
|
+
:label="$dataStore.t('agent.currency')"
|
|
162
|
+
:rules="$rules.objectRequired"
|
|
163
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
164
|
+
@append="openPanel($dataStore.t('agent.currency'), $constants.currencyList, 'currency')"
|
|
165
|
+
/>
|
|
155
166
|
<base-form-input
|
|
156
167
|
v-if="hasInsStartDate"
|
|
157
168
|
v-model="productConditionsForm.calcDate"
|
|
@@ -185,8 +196,8 @@
|
|
|
185
196
|
v-if="hasPaymentPeriod"
|
|
186
197
|
v-model="productConditionsForm.paymentPeriod"
|
|
187
198
|
:value="productConditionsForm.paymentPeriod?.nameRu"
|
|
188
|
-
:readonly="
|
|
189
|
-
:clearable="!
|
|
199
|
+
:readonly="isDisabledPaymentPeriod"
|
|
200
|
+
:clearable="!isDisabledPaymentPeriod"
|
|
190
201
|
:rules="$rules.objectRequired"
|
|
191
202
|
:label="$dataStore.t('productConditionsForm.processPaymentPeriod')"
|
|
192
203
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -256,10 +267,10 @@
|
|
|
256
267
|
@onClear="onClearPremiumDollar"
|
|
257
268
|
/>
|
|
258
269
|
<base-form-input
|
|
259
|
-
v-if="
|
|
270
|
+
v-if="hasCurrencySymbols && $dataStore.currencies.usd"
|
|
260
271
|
v-model="$dataStore.currencies.usd"
|
|
261
272
|
:readonly="true"
|
|
262
|
-
:label="
|
|
273
|
+
:label="currencySymbolsLabel"
|
|
263
274
|
:suffix="$constants.currencySymbols.kzt"
|
|
264
275
|
/>
|
|
265
276
|
<base-form-input
|
|
@@ -301,14 +312,37 @@
|
|
|
301
312
|
</base-form-section>
|
|
302
313
|
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
303
314
|
<base-animation>
|
|
304
|
-
<
|
|
305
|
-
v-if="formStore.applicationData.processCode === 19 && !isDisabled"
|
|
306
|
-
:
|
|
307
|
-
class="
|
|
308
|
-
|
|
309
|
-
|
|
315
|
+
<div
|
|
316
|
+
v-if="(formStore.applicationData.processCode === 19 || formStore.applicationData.processCode === 4) && !isDisabled"
|
|
317
|
+
:class="[$styles.blueBgLight]"
|
|
318
|
+
class="h-[52px] rounded-lg flex items-center justify-end px-2 gap-2 mt-4"
|
|
319
|
+
>
|
|
320
|
+
<base-btn class="max-w-[300px]" :text="$dataStore.t('buttons.copyToClient')" size="sm" @click="copyRedirect" />
|
|
321
|
+
</div>
|
|
310
322
|
</base-animation>
|
|
311
|
-
<
|
|
323
|
+
<div v-if="formStore.applicationData.processCode === 4" class="flex items-center mt-[14px] h-[48px]">
|
|
324
|
+
<div :class="[$styles.blueBgLight]" class="flex flex-wrap items-center gap-2 p-1 rounded-t-[8px] h-full">
|
|
325
|
+
<div
|
|
326
|
+
class="h-full px-4 py-1 rounded-[8px] cursor-pointer flex items-center"
|
|
327
|
+
:class="[$styles.textSimple, !isSlavePensionForm ? `${$styles.blueBg} ${$styles.whiteText}` : '']"
|
|
328
|
+
@click="$router.replace({ query: { ...$route.query, which: undefined, upd: 'true' } })"
|
|
329
|
+
>
|
|
330
|
+
Страхователь
|
|
331
|
+
</div>
|
|
332
|
+
<div
|
|
333
|
+
class="h-full px-4 py-1 rounded-[8px] cursor-pointer flex items-center"
|
|
334
|
+
:class="[$styles.textSimple, isSlavePensionForm ? `${$styles.blueBg} ${$styles.whiteText}` : '']"
|
|
335
|
+
@click="$router.replace({ query: { ...$route.query, which: 'slave', upd: 'true' } })"
|
|
336
|
+
>
|
|
337
|
+
Страхователь 1
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
<base-form-section
|
|
342
|
+
v-if="formStore.applicationData.processCode !== 2"
|
|
343
|
+
:title="$dataStore.t('pension.compulsoryAmount&Prof')"
|
|
344
|
+
:class="[formStore.applicationData.processCode === 4 ? 'mt-0 rounded-tl-none' : '']"
|
|
345
|
+
>
|
|
312
346
|
<base-form-input
|
|
313
347
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
314
348
|
:maska="$maska.numbers"
|
|
@@ -391,7 +425,7 @@
|
|
|
391
425
|
v-model="contractDate"
|
|
392
426
|
:maska="$maska.date"
|
|
393
427
|
:rules="!isDisabled ? $rules.required.concat($rules.date) : []"
|
|
394
|
-
:readonly="isDisabled"
|
|
428
|
+
:readonly="isDisabled || formStore.applicationData.processCode === 2"
|
|
395
429
|
:clearable="!isDisabled"
|
|
396
430
|
:min-date="new Date()"
|
|
397
431
|
:label="$dataStore.t('pension.contractDate')"
|
|
@@ -412,6 +446,13 @@
|
|
|
412
446
|
<base-form-input v-model="pensionForm.frequencyPayments" disabled :label="$dataStore.t('pension.frequencyPayments')" />
|
|
413
447
|
<base-form-input v-model="pensionForm.periodPayments" disabled :label="$dataStore.t('pension.paymentPeriod')" />
|
|
414
448
|
<base-form-input v-model="pensionForm.insuranceProgramType" disabled :label="$dataStore.t('pension.insuranceProgramType')" />
|
|
449
|
+
<base-form-input
|
|
450
|
+
v-if="formStore.applicationData.processCode === 4 && formStore.applicationData.slave?.pensionApp?.amount"
|
|
451
|
+
:value="Number(formStore.applicationData.pensionApp.amount) + Number(formStore.applicationData.slave.pensionApp.amount)"
|
|
452
|
+
:active="true"
|
|
453
|
+
label="Общая страховая премия в тенге"
|
|
454
|
+
readonly
|
|
455
|
+
/>
|
|
415
456
|
<base-form-input v-model="pensionAmount" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionAmount')" />
|
|
416
457
|
<base-form-input v-model="pensionForm.payment" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionPayment')" />
|
|
417
458
|
</base-form-section>
|
|
@@ -781,7 +822,8 @@ export default defineComponent({
|
|
|
781
822
|
const transferContractDate = ref();
|
|
782
823
|
const transferContractFirstPaymentDate = ref();
|
|
783
824
|
const guaranteedPeriodList = Array.from(Array(35), (e, i) => i + 1);
|
|
784
|
-
const
|
|
825
|
+
const isSlavePensionForm = computed(() => route.query.which === 'slave');
|
|
826
|
+
const pensionForm = isSlavePensionForm.value ? formStore.applicationData?.slave?.pensionApp : formStore.applicationData?.pensionApp ?? undefined;
|
|
785
827
|
const isEnpfSum = (formStore.applicationData?.isEnpfSum ?? false) && useEnv().isProduction;
|
|
786
828
|
|
|
787
829
|
const transferContracts = ref<TransferContract[]>([]);
|
|
@@ -819,7 +861,9 @@ export default defineComponent({
|
|
|
819
861
|
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask() || fromIndexPage.value);
|
|
820
862
|
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
821
863
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
822
|
-
const insurancePremiumPerMonthRule = computed(() =>
|
|
864
|
+
const insurancePremiumPerMonthRule = computed(() =>
|
|
865
|
+
!!productConditionsForm.insurancePremiumPerMonth ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
866
|
+
);
|
|
823
867
|
const insurancePremiumPerMonthDisabled = computed(() => {
|
|
824
868
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
825
869
|
return true;
|
|
@@ -829,7 +873,9 @@ export default defineComponent({
|
|
|
829
873
|
}
|
|
830
874
|
return isDisabled.value;
|
|
831
875
|
});
|
|
832
|
-
const requestedSumInsuredRule = computed(() =>
|
|
876
|
+
const requestedSumInsuredRule = computed(() =>
|
|
877
|
+
!!productConditionsForm.requestedSumInsured ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
878
|
+
);
|
|
833
879
|
const fixInsSumRule = computed(() =>
|
|
834
880
|
!!productConditionsForm.fixInsSum
|
|
835
881
|
? dataStore.rules.required.concat(dataStore.rules.sums, dataStore.rules.fixInsSumLimit(getNumber(productConditionsForm.fixInsSum as string), minInsSum.value))
|
|
@@ -871,18 +917,27 @@ export default defineComponent({
|
|
|
871
917
|
if (whichProduct.value === 'halykkazyna') {
|
|
872
918
|
return true;
|
|
873
919
|
}
|
|
920
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
921
|
+
return true;
|
|
922
|
+
}
|
|
874
923
|
return false;
|
|
875
924
|
});
|
|
876
925
|
const hasInsurancePremiumPerMonthInDollar = computed(() => {
|
|
877
926
|
if (whichProduct.value === 'halykkazyna') {
|
|
878
927
|
return true;
|
|
879
928
|
}
|
|
929
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
930
|
+
return true;
|
|
931
|
+
}
|
|
880
932
|
return false;
|
|
881
933
|
});
|
|
882
|
-
const
|
|
934
|
+
const hasCurrencySymbols = computed(() => {
|
|
883
935
|
if (whichProduct.value === 'halykkazyna') {
|
|
884
936
|
return true;
|
|
885
937
|
}
|
|
938
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
939
|
+
return true;
|
|
940
|
+
}
|
|
886
941
|
return false;
|
|
887
942
|
});
|
|
888
943
|
const hasAdbMultiply = computed(() => {
|
|
@@ -985,6 +1040,12 @@ export default defineComponent({
|
|
|
985
1040
|
}
|
|
986
1041
|
return dataStore.t('productConditionsForm.insurancePremiumAmount');
|
|
987
1042
|
});
|
|
1043
|
+
const currencySymbolsLabel = computed(() => {
|
|
1044
|
+
if (whichProduct.value === 'gons') {
|
|
1045
|
+
return dataStore.t('productConditionsForm.exchangeRateSettlementDate');
|
|
1046
|
+
}
|
|
1047
|
+
return dataStore.t('productConditionsForm.dollarExchangeRateNBRK');
|
|
1048
|
+
});
|
|
988
1049
|
const isDisabledFixInsSum = computed(() => {
|
|
989
1050
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
990
1051
|
return false;
|
|
@@ -1079,6 +1140,18 @@ export default defineComponent({
|
|
|
1079
1140
|
}
|
|
1080
1141
|
return false;
|
|
1081
1142
|
});
|
|
1143
|
+
const hasCurrency = computed(() => {
|
|
1144
|
+
if (whichProduct.value === 'gons') {
|
|
1145
|
+
return true;
|
|
1146
|
+
}
|
|
1147
|
+
return false;
|
|
1148
|
+
});
|
|
1149
|
+
const isDisabledPaymentPeriod = computed(() => {
|
|
1150
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
1151
|
+
return true;
|
|
1152
|
+
}
|
|
1153
|
+
return isDisabled.value;
|
|
1154
|
+
});
|
|
1082
1155
|
|
|
1083
1156
|
const pensionCalculationParams = ref({
|
|
1084
1157
|
compulsoryContractAmount: pensionForm && pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount != 0 ? pensionForm.compulsoryContractAmount : null,
|
|
@@ -1090,8 +1163,7 @@ export default defineComponent({
|
|
|
1090
1163
|
transferContractCompany: pensionForm && pensionForm.transferContractCompany ? pensionForm.transferContractCompany : null,
|
|
1091
1164
|
});
|
|
1092
1165
|
|
|
1093
|
-
const contractsAmount = computed(() => transferContracts.value?.reduce((accumulator, currentValue) => accumulator + currentValue.transferContractAmount, 0));
|
|
1094
|
-
|
|
1166
|
+
const contractsAmount = computed(() => transferContracts.value?.reduce((accumulator, currentValue) => accumulator + Number(currentValue.transferContractAmount), 0));
|
|
1095
1167
|
const pensionAmount = computed(() =>
|
|
1096
1168
|
pensionCalculationParams.value
|
|
1097
1169
|
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
@@ -1380,7 +1452,7 @@ export default defineComponent({
|
|
|
1380
1452
|
const calculatedPremiumDollar = getNumber(event.target.value as string);
|
|
1381
1453
|
if (calculatedPremiumDollar) {
|
|
1382
1454
|
productConditionsForm.insurancePremiumPerMonth = dataStore.getNumberWithSpaces(productConditionsForm.insurancePremiumPerMonth);
|
|
1383
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1455
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1384
1456
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1385
1457
|
productConditionsForm.insurancePremiumPerMonthInDollar = dataStore.getNumberWithSpaces(calculatedPremiumDollar / dataStore.currencies.usd);
|
|
1386
1458
|
} else {
|
|
@@ -1408,7 +1480,7 @@ export default defineComponent({
|
|
|
1408
1480
|
const calculatedSumDollar = getNumber(event.target.value as string);
|
|
1409
1481
|
if (calculatedSumDollar) {
|
|
1410
1482
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(productConditionsForm.requestedSumInsured);
|
|
1411
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1483
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1412
1484
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1413
1485
|
productConditionsForm.requestedSumInsuredInDollar = dataStore.getNumberWithSpaces(calculatedSumDollar / dataStore.currencies.usd);
|
|
1414
1486
|
} else {
|
|
@@ -1527,6 +1599,7 @@ export default defineComponent({
|
|
|
1527
1599
|
transferContractFirstPaymentDate: formatedFirstPaymentDate?.toISOString() ?? '',
|
|
1528
1600
|
// @ts-ignore
|
|
1529
1601
|
transferContractCompany: formatedNameRu,
|
|
1602
|
+
transferContractCompanyId: transferContracts.value[index].transferContractCompany?.ids,
|
|
1530
1603
|
id: transferContracts.value[index].id ?? null,
|
|
1531
1604
|
});
|
|
1532
1605
|
});
|
|
@@ -1542,19 +1615,23 @@ export default defineComponent({
|
|
|
1542
1615
|
transferContractAmount: Number(pensionCalculationParams.value.transferContractAmount),
|
|
1543
1616
|
transferContractCompany: pensionForm?.transferContractCompany?.nameRu ?? '',
|
|
1544
1617
|
}),
|
|
1618
|
+
amount: pensionAmount.value,
|
|
1545
1619
|
transferContracts: formatedContracts,
|
|
1546
1620
|
};
|
|
1547
|
-
await dataStore.setApplication(
|
|
1621
|
+
await dataStore.setApplication(
|
|
1622
|
+
isSlavePensionForm.value ? { ...formStore.applicationData.pensionApp, slave: data } : { ...data, slave: formStore.applicationData.slave?.pensionApp ?? null },
|
|
1623
|
+
true,
|
|
1624
|
+
);
|
|
1548
1625
|
} else {
|
|
1549
1626
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1550
1627
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
1551
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1628
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1552
1629
|
productConditionsForm.insurancePremiumPerMonthInDollar = null;
|
|
1553
1630
|
}
|
|
1554
1631
|
}
|
|
1555
1632
|
if (whichSum.value === 'insurancePremiumPerMonth') {
|
|
1556
1633
|
productConditionsForm.requestedSumInsured = null;
|
|
1557
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1634
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1558
1635
|
productConditionsForm.requestedSumInsuredInDollar = null;
|
|
1559
1636
|
}
|
|
1560
1637
|
}
|
|
@@ -1668,6 +1745,10 @@ export default defineComponent({
|
|
|
1668
1745
|
if (dataStore.isCalculator) {
|
|
1669
1746
|
clearFields();
|
|
1670
1747
|
}
|
|
1748
|
+
if (whichProduct.value === 'gons') {
|
|
1749
|
+
formStore.isDisabled.productConditionsForm = false;
|
|
1750
|
+
dataStore.setFormsDisabled(false);
|
|
1751
|
+
}
|
|
1671
1752
|
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
|
|
1672
1753
|
if (
|
|
1673
1754
|
(dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
|
|
@@ -1711,10 +1792,12 @@ export default defineComponent({
|
|
|
1711
1792
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
1712
1793
|
await dataStore.getProcessPaymentPeriod();
|
|
1713
1794
|
}
|
|
1795
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1796
|
+
await dataStore.getCurrencies();
|
|
1797
|
+
}
|
|
1714
1798
|
if (whichProduct.value === 'halykkazyna') {
|
|
1715
1799
|
const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
|
|
1716
1800
|
if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
|
|
1717
|
-
await dataStore.getCurrencies();
|
|
1718
1801
|
}
|
|
1719
1802
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1720
1803
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
|
|
@@ -1724,12 +1807,12 @@ export default defineComponent({
|
|
|
1724
1807
|
);
|
|
1725
1808
|
}
|
|
1726
1809
|
if (whichProduct.value === 'pensionannuitynew') {
|
|
1727
|
-
contractDate.value = reformatDate(
|
|
1728
|
-
dateOfBegin.value = reformatDate(
|
|
1729
|
-
transferContractDate.value = reformatDate(
|
|
1730
|
-
transferContractFirstPaymentDate.value = reformatDate(
|
|
1810
|
+
contractDate.value = reformatDate(pensionForm.contractDate);
|
|
1811
|
+
dateOfBegin.value = reformatDate(pensionForm.dateOfBegin);
|
|
1812
|
+
transferContractDate.value = reformatDate(pensionForm.transferContractDate);
|
|
1813
|
+
transferContractFirstPaymentDate.value = reformatDate(pensionForm.transferContractFirstPaymentDate);
|
|
1731
1814
|
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
|
|
1732
|
-
if (transferContracts
|
|
1815
|
+
if (pensionForm.transferContracts && pensionForm.transferContracts.length) {
|
|
1733
1816
|
transferContracts.value = pensionForm.transferContracts?.map((contract: TransferContract) => {
|
|
1734
1817
|
contract.transferContractDate = reformatDate(contract.transferContractDate)!;
|
|
1735
1818
|
contract.transferContractFirstPaymentDate = reformatDate(contract.transferContractFirstPaymentDate)!;
|
|
@@ -1770,6 +1853,23 @@ export default defineComponent({
|
|
|
1770
1853
|
{ immediate: true },
|
|
1771
1854
|
);
|
|
1772
1855
|
|
|
1856
|
+
if (hasCurrency.value) {
|
|
1857
|
+
watch(
|
|
1858
|
+
() => productConditionsForm.currency,
|
|
1859
|
+
async val => {
|
|
1860
|
+
if (val.code === 'USD') {
|
|
1861
|
+
if (!dataStore.processPaymentPeriod.length) {
|
|
1862
|
+
await dataStore.getProcessPaymentPeriod();
|
|
1863
|
+
}
|
|
1864
|
+
const paymentPeriod = dataStore.processPaymentPeriod.find(item => item.nameRu === 'единовременно');
|
|
1865
|
+
if (paymentPeriod) {
|
|
1866
|
+
productConditionsForm.paymentPeriod = paymentPeriod;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
);
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1773
1873
|
if (hasInsStartDate.value) {
|
|
1774
1874
|
watch(
|
|
1775
1875
|
() => productConditionsForm.calcDate,
|
|
@@ -1838,8 +1938,25 @@ export default defineComponent({
|
|
|
1838
1938
|
);
|
|
1839
1939
|
}
|
|
1840
1940
|
|
|
1941
|
+
if (whichProduct.value === 'pensionannuitynew') {
|
|
1942
|
+
watch(
|
|
1943
|
+
() => pensionForm.guaranteedPeriod,
|
|
1944
|
+
async () => {
|
|
1945
|
+
if (formStore.applicationData.processCode === 2) {
|
|
1946
|
+
await dataStore.reCalculateRefund(
|
|
1947
|
+
pensionForm.parentContractAmount,
|
|
1948
|
+
pensionForm.parentContractMainAmount,
|
|
1949
|
+
pensionForm.guaranteedPeriod,
|
|
1950
|
+
pensionForm.transferContractIsOppv,
|
|
1951
|
+
pensionForm.compulsoryProfMonthCount ?? 0,
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1841
1958
|
const copyRedirect = async () => {
|
|
1842
|
-
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(
|
|
1959
|
+
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(pensionForm.processInstanceId));
|
|
1843
1960
|
dataStore.copyToClipboard(url.redirectUrl);
|
|
1844
1961
|
};
|
|
1845
1962
|
|
|
@@ -1885,6 +2002,9 @@ export default defineComponent({
|
|
|
1885
2002
|
isDisabled,
|
|
1886
2003
|
isTermsDisabled,
|
|
1887
2004
|
isUnderwriterForm,
|
|
2005
|
+
hasCurrencySymbols,
|
|
2006
|
+
currencySymbolsLabel,
|
|
2007
|
+
isDisabledPaymentPeriod,
|
|
1888
2008
|
insurancePremiumPerMonthRule,
|
|
1889
2009
|
insurancePremiumPerMonthDisabled,
|
|
1890
2010
|
requestedSumInsuredRule,
|
|
@@ -1930,6 +2050,7 @@ export default defineComponent({
|
|
|
1930
2050
|
hasCoverPeriod,
|
|
1931
2051
|
hasInsStartDate,
|
|
1932
2052
|
hasInsEndDate,
|
|
2053
|
+
isSlavePensionForm,
|
|
1933
2054
|
|
|
1934
2055
|
// Rules
|
|
1935
2056
|
coverPeriodRule,
|
|
@@ -73,18 +73,21 @@
|
|
|
73
73
|
</base-form-section>
|
|
74
74
|
</div>
|
|
75
75
|
<div v-if="!(formStore.signatories.length === 0) && !isQr && !isScansDocuments" :class="[$styles.flexColNav]">
|
|
76
|
+
<div v-if="(processCode == 19 || processCode == 4) && formStore.applicationData.statusCode === 'AttachAppContractForm'" :class="[$styles.blueBgLight]" class="rounded-lg p-4">
|
|
77
|
+
<base-form-toggle v-model="isOnlineEnpf" title="Онлайн подписание согласия для ЕНПФ" :has-border="false" @clicked="setActualEnpf" />
|
|
78
|
+
</div>
|
|
76
79
|
<div :class="[$styles.blueBgLight]" class="rounded-lg p-4">
|
|
77
|
-
<v-expansion-panels v-if="formStore.signatories.length" variant="accordion" multiple>
|
|
80
|
+
<v-expansion-panels v-if="formStore.signatories.length" variant="accordion" :multiple="false">
|
|
78
81
|
<v-expansion-panel v-for="(person, index) of formStore.signatories" :key="person.personId!" class="border-[1px]" elevation="0" bg-color="#FFF">
|
|
79
82
|
<v-expansion-panel-title class="h-[80px]" :class="$styles.textTitle">
|
|
80
83
|
{{ person.longName }}
|
|
81
84
|
</v-expansion-panel-title>
|
|
82
85
|
<v-expansion-panel-text class="border-t-[1px]">
|
|
83
86
|
<section class="flex flex-col" :class="$styles.textSimple">
|
|
84
|
-
<v-expansion-panels v-if="person.fileDatas.length" v-model="currentFilePanel">
|
|
87
|
+
<v-expansion-panels v-if="person.fileDatas.length" v-model="currentFilePanel" :multiple="false">
|
|
85
88
|
<v-expansion-panel
|
|
86
89
|
v-for="(file, fileIndex) in groupBy(person.fileDatas, 'orderFile')"
|
|
87
|
-
:value="fileIndex"
|
|
90
|
+
:value="`${index} - ${fileIndex}`"
|
|
88
91
|
:disabled="inSigningOrder(person.fileDatas, fileIndex) || file[0].isSigned"
|
|
89
92
|
>
|
|
90
93
|
<v-expansion-panel-title v-for="name in file" class="h-[80px]" :class="$styles.textTitle">
|
|
@@ -249,7 +252,7 @@
|
|
|
249
252
|
import { DocumentItem, Value } from '../../composables/classes';
|
|
250
253
|
import { HubConnectionBuilder } from '@microsoft/signalr';
|
|
251
254
|
import { uuid } from 'vue-uuid';
|
|
252
|
-
import type
|
|
255
|
+
import type * as Types from '../../types';
|
|
253
256
|
import { CoreEnums } from '../../types/enum';
|
|
254
257
|
|
|
255
258
|
export default defineComponent({
|
|
@@ -272,15 +275,16 @@ export default defineComponent({
|
|
|
272
275
|
const isOfflinePay = ref<boolean>(false);
|
|
273
276
|
const isQrDialog = ref<boolean>(false);
|
|
274
277
|
const email = ref<string>('');
|
|
275
|
-
const signOptions = ref<Api.Sign.New.Response>();
|
|
276
|
-
const signingFiles = ref<Api.Sign.New.FileDatas[]>([]);
|
|
278
|
+
const signOptions = ref<Types.Api.Sign.New.Response>();
|
|
279
|
+
const signingFiles = ref<Types.Api.Sign.New.FileDatas[]>([]);
|
|
277
280
|
const allDocumentsSigned = ref<boolean>(false);
|
|
281
|
+
const isOnlineEnpf = ref<boolean>(true);
|
|
278
282
|
const currentFilePanel = ref<string[]>([]);
|
|
279
283
|
|
|
280
284
|
const vForm = ref<any>();
|
|
281
285
|
const isSendNumberOpen = ref<boolean>(false);
|
|
282
286
|
const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
|
|
283
|
-
const selectedClient = ref<SignUrlType>();
|
|
287
|
+
const selectedClient = ref<Types.SignUrlType>();
|
|
284
288
|
const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
|
|
285
289
|
const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
|
|
286
290
|
const affiliationData = ref<{
|
|
@@ -298,7 +302,7 @@ export default defineComponent({
|
|
|
298
302
|
const scansFiles = ref<any[]>([]);
|
|
299
303
|
const processCode = formStore.applicationData.processCode;
|
|
300
304
|
|
|
301
|
-
const openSmsPanel = (signInfo: SignUrlType) => {
|
|
305
|
+
const openSmsPanel = (signInfo: Types.SignUrlType) => {
|
|
302
306
|
if (signInfo) {
|
|
303
307
|
isSendNumberOpen.value = true;
|
|
304
308
|
selectedClient.value = signInfo;
|
|
@@ -512,6 +516,8 @@ export default defineComponent({
|
|
|
512
516
|
}
|
|
513
517
|
}
|
|
514
518
|
if (dataStore.isPension) {
|
|
519
|
+
const isOnlineEnpfAgreement = formStore.applicationData.pensionApp.isOnlineEnpfAgreement;
|
|
520
|
+
isOnlineEnpf.value = isOnlineEnpfAgreement === null ? true : isOnlineEnpfAgreement;
|
|
515
521
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
516
522
|
}
|
|
517
523
|
};
|
|
@@ -772,7 +778,7 @@ export default defineComponent({
|
|
|
772
778
|
await dataStore.generateDocument();
|
|
773
779
|
};
|
|
774
780
|
|
|
775
|
-
const convertQr = async (url: string | null, template?: Api.GenerateShortLink.Templates) => {
|
|
781
|
+
const convertQr = async (url: string | null, template?: Types.Api.GenerateShortLink.Templates) => {
|
|
776
782
|
if (url) {
|
|
777
783
|
const shortedUrl = await dataStore.generateShortLink(url, template);
|
|
778
784
|
qrUrl.value = typeof shortedUrl === 'string' && !!shortedUrl ? shortedUrl : url;
|
|
@@ -852,9 +858,9 @@ export default defineComponent({
|
|
|
852
858
|
...formStore.signatories[index],
|
|
853
859
|
signType: signType,
|
|
854
860
|
fileDatas: file,
|
|
855
|
-
};
|
|
861
|
+
} as Types.Api.Sign.New.GeneralResponse;
|
|
856
862
|
try {
|
|
857
|
-
signOptions.value = await dataStore.
|
|
863
|
+
signOptions.value = await dataStore.generalSign(data);
|
|
858
864
|
const message = [];
|
|
859
865
|
for (let i of file) {
|
|
860
866
|
message.push(i.fileName);
|
|
@@ -869,7 +875,7 @@ export default defineComponent({
|
|
|
869
875
|
break;
|
|
870
876
|
case CoreEnums.Sign.Types.scans:
|
|
871
877
|
isScansDocuments.value = true;
|
|
872
|
-
signingFiles.value = data.fileDatas;
|
|
878
|
+
signingFiles.value = data.fileDatas ?? [];
|
|
873
879
|
message.length = 0;
|
|
874
880
|
break;
|
|
875
881
|
case CoreEnums.Sign.Types.qr:
|
|
@@ -907,6 +913,16 @@ export default defineComponent({
|
|
|
907
913
|
loading.value = false;
|
|
908
914
|
};
|
|
909
915
|
|
|
916
|
+
const setActualEnpf = useDebounceFn(async () => {
|
|
917
|
+
try {
|
|
918
|
+
await dataStore.api.file.setActualEnpf({ processId: String(formStore.applicationData.processInstanceId), isOnlineEnpfAgreement: isOnlineEnpf.value });
|
|
919
|
+
await dataStore.generateSign(String(route.params.taskId));
|
|
920
|
+
} catch (err) {
|
|
921
|
+
ErrorHandler(err);
|
|
922
|
+
}
|
|
923
|
+
currentFilePanel.value = [];
|
|
924
|
+
}, 1000);
|
|
925
|
+
|
|
910
926
|
return {
|
|
911
927
|
// State
|
|
912
928
|
formStore,
|
|
@@ -930,6 +946,7 @@ export default defineComponent({
|
|
|
930
946
|
email,
|
|
931
947
|
signOptions,
|
|
932
948
|
signingFiles,
|
|
949
|
+
isOnlineEnpf,
|
|
933
950
|
allDocumentsSigned,
|
|
934
951
|
currentFilePanel,
|
|
935
952
|
|
|
@@ -949,6 +966,7 @@ export default defineComponent({
|
|
|
949
966
|
handlePayAction,
|
|
950
967
|
payEpay,
|
|
951
968
|
convertQr,
|
|
969
|
+
setActualEnpf,
|
|
952
970
|
sendInvoiceToEmail,
|
|
953
971
|
hasConditionsAction,
|
|
954
972
|
|
package/composables/classes.ts
CHANGED
|
@@ -825,6 +825,7 @@ export class ProductConditions {
|
|
|
825
825
|
fixInsSum: number | string | null;
|
|
826
826
|
calcDate: string | null;
|
|
827
827
|
contractEndDate: string | null;
|
|
828
|
+
currency: Value;
|
|
828
829
|
|
|
829
830
|
constructor(
|
|
830
831
|
insuranceCase = null,
|
|
@@ -873,6 +874,7 @@ export class ProductConditions {
|
|
|
873
874
|
fixInsSum = null,
|
|
874
875
|
calcDate = null,
|
|
875
876
|
contractEndDate = null,
|
|
877
|
+
currency = new Value(),
|
|
876
878
|
) {
|
|
877
879
|
this.requestedSumInsuredInDollar = null;
|
|
878
880
|
this.insurancePremiumPerMonthInDollar = null;
|
|
@@ -925,6 +927,7 @@ export class ProductConditions {
|
|
|
925
927
|
this.fixInsSum = fixInsSum;
|
|
926
928
|
this.calcDate = calcDate;
|
|
927
929
|
this.contractEndDate = contractEndDate;
|
|
930
|
+
this.currency = currency;
|
|
928
931
|
}
|
|
929
932
|
|
|
930
933
|
getSingleTripDays() {
|
|
@@ -1383,6 +1386,7 @@ export class FormStoreClass {
|
|
|
1383
1386
|
beneficiaryForm: boolean;
|
|
1384
1387
|
beneficialOwnerForm: boolean;
|
|
1385
1388
|
insuredForm: boolean;
|
|
1389
|
+
slaveInsuredForm: boolean;
|
|
1386
1390
|
policyholdersRepresentativeForm: boolean;
|
|
1387
1391
|
productConditionsForm: boolean;
|
|
1388
1392
|
calculatorForm: boolean;
|
|
@@ -1417,6 +1421,7 @@ export class FormStoreClass {
|
|
|
1417
1421
|
policyAppDto?: Types.PolicyAppDto;
|
|
1418
1422
|
insisWorkDataApp?: Types.InsisWorkDataApp;
|
|
1419
1423
|
addCoverDto?: Types.AddCover[];
|
|
1424
|
+
slave?: any;
|
|
1420
1425
|
};
|
|
1421
1426
|
policyholderForm: Member;
|
|
1422
1427
|
policyholderFormKey: StoreMembers.policyholderForm;
|
|
@@ -1429,6 +1434,7 @@ export class FormStoreClass {
|
|
|
1429
1434
|
beneficialOwnerFormIndex: number;
|
|
1430
1435
|
beneficialOwnerFormKey: StoreMembers.beneficialOwnerForm;
|
|
1431
1436
|
insuredForm: Member[];
|
|
1437
|
+
slaveInsuredForm: Member;
|
|
1432
1438
|
insuredFormKey: StoreMembers.insuredForm;
|
|
1433
1439
|
insuredFormIndex: number;
|
|
1434
1440
|
productConditionsForm: ProductConditions;
|
|
@@ -1505,6 +1511,7 @@ export class FormStoreClass {
|
|
|
1505
1511
|
beneficiaryForm: true,
|
|
1506
1512
|
beneficialOwnerForm: true,
|
|
1507
1513
|
insuredForm: true,
|
|
1514
|
+
slaveInsuredForm: true,
|
|
1508
1515
|
policyholdersRepresentativeForm: true,
|
|
1509
1516
|
productConditionsForm: true,
|
|
1510
1517
|
calculatorForm: true,
|
|
@@ -1533,6 +1540,7 @@ export class FormStoreClass {
|
|
|
1533
1540
|
this.beneficialOwnerFormIndex = 0;
|
|
1534
1541
|
this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
|
|
1535
1542
|
this.insuredForm = [new Member()];
|
|
1543
|
+
this.slaveInsuredForm = new Member();
|
|
1536
1544
|
this.insuredFormKey = StoreMembers.insuredForm;
|
|
1537
1545
|
this.insuredFormIndex = 0;
|
|
1538
1546
|
this.productConditionsForm = new ProductConditions();
|
package/composables/constants.ts
CHANGED
|
@@ -36,6 +36,7 @@ export const constants = Object.freeze({
|
|
|
36
36
|
returnStatementStatuses: [
|
|
37
37
|
Statuses.ApproveForm,
|
|
38
38
|
Statuses.ActuaryForm,
|
|
39
|
+
Statuses.JuristForm,
|
|
39
40
|
Statuses.DsoUsnsForm,
|
|
40
41
|
Statuses.AccountantForm,
|
|
41
42
|
Statuses.UnderwriterForm,
|
|
@@ -162,4 +163,20 @@ export const constants = Object.freeze({
|
|
|
162
163
|
ids: '',
|
|
163
164
|
},
|
|
164
165
|
],
|
|
166
|
+
currencyList: [
|
|
167
|
+
{
|
|
168
|
+
code: 'KZT',
|
|
169
|
+
id: '1',
|
|
170
|
+
nameKz: 'Тенге',
|
|
171
|
+
nameRu: 'Тенге',
|
|
172
|
+
ids: '',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
code: 'USD',
|
|
176
|
+
id: '2',
|
|
177
|
+
nameKz: 'С индексацией на курс USD',
|
|
178
|
+
nameRu: 'С индексацией на курс USD',
|
|
179
|
+
ids: '',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
165
182
|
});
|
package/composables/index.ts
CHANGED
package/locales/ru.json
CHANGED
|
@@ -143,7 +143,8 @@
|
|
|
143
143
|
"duplicateClient": "В списке присутствуют повторяющиеся клиенты",
|
|
144
144
|
"notParsedDocument": "Не удалось получить данные",
|
|
145
145
|
"errorOsns": "По данному БИН на дату заключения заявления не найден договор ОСНС. Просим проверить БИН Страхователя.",
|
|
146
|
-
"needDigDoc": "Нужно получить цифровой документ {text}"
|
|
146
|
+
"needDigDoc": "Нужно получить цифровой документ {text}",
|
|
147
|
+
"notDigDoc": "Выданный документ не найден"
|
|
147
148
|
},
|
|
148
149
|
"notSignedContract": "Неподписанный Договор",
|
|
149
150
|
"Contract": "Договор страхования",
|
|
@@ -394,6 +395,7 @@
|
|
|
394
395
|
"insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
|
|
395
396
|
"insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
|
|
396
397
|
"dollarExchangeRateNBRK": "Курс доллара НБРК",
|
|
398
|
+
"exchangeRateSettlementDate": "Курс на дату расчета (USD/KZT)",
|
|
397
399
|
"contractDate": "Дата контракта",
|
|
398
400
|
"guaranteedTermAnnuityPayments": "Гарантированный срок аннуитетных выплат",
|
|
399
401
|
"guaranteedPeriod": "Укажите период гарантированного срока",
|
|
@@ -583,7 +585,9 @@
|
|
|
583
585
|
"signInProcessManager": "Договор будет подписан в течение минуты",
|
|
584
586
|
"transferRegNumber": "Номер и серия договора",
|
|
585
587
|
"contragentSelect": "Выбор контрагента",
|
|
586
|
-
"fileError": "Ошибка прикрепления файла"
|
|
588
|
+
"fileError": "Ошибка прикрепления файла",
|
|
589
|
+
"parentContractNextPay": "Возврат с учетом очередной выплаты",
|
|
590
|
+
"parentContractNextPayDate": "Очередная выплата по графику"
|
|
587
591
|
},
|
|
588
592
|
"agent": {
|
|
589
593
|
"currency": "Валюта",
|