hl-core 0.0.10-beta.25 → 0.0.10-beta.26
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 +0 -33
- package/components/Pages/MemberForm.vue +28 -58
- package/components/Pages/ProductConditions.vue +31 -152
- package/components/Panel/PanelHandler.vue +12 -30
- package/components/Utilities/Chip.vue +1 -1
- package/composables/classes.ts +0 -8
- package/composables/constants.ts +0 -17
- package/composables/index.ts +0 -1
- package/locales/ru.json +1 -4
- package/package.json +1 -1
- package/store/data.store.ts +56 -237
- package/store/member.store.ts +4 -15
- package/types/enum.ts +0 -1
package/api/base.api.ts
CHANGED
|
@@ -991,22 +991,6 @@ export class ApiClass {
|
|
|
991
991
|
url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
|
|
992
992
|
});
|
|
993
993
|
},
|
|
994
|
-
calcParentContractSums: async (data: any) => {
|
|
995
|
-
return await this.axiosCall<void>({
|
|
996
|
-
method: Methods.POST,
|
|
997
|
-
baseURL: getStrValuePerEnv('efoBaseApi'),
|
|
998
|
-
url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
|
|
999
|
-
data: data,
|
|
1000
|
-
});
|
|
1001
|
-
},
|
|
1002
|
-
reCalculateRefund: async (data: any) => {
|
|
1003
|
-
return await this.axiosCall<void>({
|
|
1004
|
-
method: Methods.POST,
|
|
1005
|
-
baseURL: getStrValuePerEnv('efoBaseApi'),
|
|
1006
|
-
url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
|
|
1007
|
-
data: data,
|
|
1008
|
-
});
|
|
1009
|
-
},
|
|
1010
994
|
};
|
|
1011
995
|
|
|
1012
996
|
externalServices = {
|
|
@@ -1101,16 +1085,6 @@ export class ApiClass {
|
|
|
1101
1085
|
},
|
|
1102
1086
|
});
|
|
1103
1087
|
},
|
|
1104
|
-
getFileNew: async (id: string) => {
|
|
1105
|
-
return await this.axiosCall({
|
|
1106
|
-
method: Methods.GET,
|
|
1107
|
-
url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
|
|
1108
|
-
responseType: 'arraybuffer',
|
|
1109
|
-
headers: {
|
|
1110
|
-
'Content-Type': 'application/pdf',
|
|
1111
|
-
},
|
|
1112
|
-
});
|
|
1113
|
-
},
|
|
1114
1088
|
deleteFile: async (data: any) => {
|
|
1115
1089
|
return await this.axiosCall<void>({
|
|
1116
1090
|
method: Methods.POST,
|
|
@@ -1157,12 +1131,5 @@ export class ApiClass {
|
|
|
1157
1131
|
data: data,
|
|
1158
1132
|
});
|
|
1159
1133
|
},
|
|
1160
|
-
setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
|
|
1161
|
-
return await this.axiosCall<void>({
|
|
1162
|
-
method: Methods.POST,
|
|
1163
|
-
url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
|
|
1164
|
-
data: data,
|
|
1165
|
-
});
|
|
1166
|
-
},
|
|
1167
1134
|
};
|
|
1168
1135
|
}
|
|
@@ -828,8 +828,7 @@ export default {
|
|
|
828
828
|
const memberStore = useMemberStore();
|
|
829
829
|
const whichForm = computed(() => route.query.tab as keyof typeof StoreMembers);
|
|
830
830
|
const whichIndex = computed(() => route.query.i as string);
|
|
831
|
-
const getMember = (whichForm: keyof typeof StoreMembers
|
|
832
|
-
memberStore.getMemberFromStore(whichForm, Number((whichIndex ? whichIndex : '0') as string))!;
|
|
831
|
+
const getMember = (whichForm: keyof typeof StoreMembers, whichIndex?: string) => memberStore.getMemberFromStore(whichForm, Number((whichIndex ? whichIndex : '0') as string))!;
|
|
833
832
|
const member = ref(getMember(whichForm.value, whichIndex.value));
|
|
834
833
|
const selectedFamilyMember = ref<Api.GKB.BirthInfo>({});
|
|
835
834
|
const isPanelOpen = ref<boolean>(false);
|
|
@@ -844,7 +843,7 @@ export default {
|
|
|
844
843
|
const isPositionPanelOpen = ref<boolean>(false);
|
|
845
844
|
const isPanelLoading = ref<boolean>(false);
|
|
846
845
|
const isChangingMember = ref<boolean>(false);
|
|
847
|
-
const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency
|
|
846
|
+
const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency.ids === '500011.2');
|
|
848
847
|
const familyDialog = ref<boolean>(false);
|
|
849
848
|
const deletionDialog = ref<boolean>(false);
|
|
850
849
|
const documentChooseDialog = ref<boolean>(false);
|
|
@@ -870,9 +869,7 @@ export default {
|
|
|
870
869
|
const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
|
|
871
870
|
const isDisabled = computed(() => !memberStore.isStatementEditible(whichForm.value));
|
|
872
871
|
const isTask = computed(() => route.params.taskId === '0' || dataStore.isTask());
|
|
873
|
-
const isIinPhoneDisabled = computed(() =>
|
|
874
|
-
dataStore.isPension ? !!member.value.hasAgreement && member.value.phoneNumber && member.value.phoneNumber.length == 11 && !!member.value.iin : member.value.hasAgreement,
|
|
875
|
-
);
|
|
872
|
+
const isIinPhoneDisabled = computed(() => member.value.hasAgreement);
|
|
876
873
|
const isFromGBD = computed(() => !!member.value.gosPersonData);
|
|
877
874
|
const gbdDocuments = computed(() => {
|
|
878
875
|
if (hasGBDFLDocSelection && !!member.value.gosPersonData && !!member.value.gosPersonData.documents) {
|
|
@@ -899,7 +896,6 @@ export default {
|
|
|
899
896
|
case formStore.policyholdersRepresentativeFormKey:
|
|
900
897
|
return route.params.taskId !== '0';
|
|
901
898
|
default:
|
|
902
|
-
if (route.query.tab === 'slaveInsuredForm') return true;
|
|
903
899
|
return false;
|
|
904
900
|
}
|
|
905
901
|
};
|
|
@@ -1007,7 +1003,7 @@ export default {
|
|
|
1007
1003
|
(whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin) ||
|
|
1008
1004
|
(dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
|
|
1009
1005
|
);
|
|
1010
|
-
const hasWorkPositionDict = dataStore.isBaiterek
|
|
1006
|
+
const hasWorkPositionDict = dataStore.isBaiterek;
|
|
1011
1007
|
|
|
1012
1008
|
const birthDateRule = computed(() => {
|
|
1013
1009
|
const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
|
|
@@ -1086,13 +1082,12 @@ export default {
|
|
|
1086
1082
|
case formStore.policyholderFormKey:
|
|
1087
1083
|
return route.params.taskId === '0';
|
|
1088
1084
|
case formStore.insuredFormKey:
|
|
1085
|
+
if (dataStore.isPension && formStore.applicationData.processCode === 19) return route.params.taskId === '0';
|
|
1089
1086
|
return route.query.id === '0';
|
|
1090
1087
|
case formStore.policyholdersRepresentativeFormKey:
|
|
1091
1088
|
case formStore.beneficiaryFormKey:
|
|
1092
1089
|
case formStore.beneficialOwnerFormKey:
|
|
1093
1090
|
return route.query.id === '0';
|
|
1094
|
-
default:
|
|
1095
|
-
if (dataStore.isPension && formStore.applicationData.processCode === 2 && route.query.tab === 'slaveInsuredForm') return true;
|
|
1096
1091
|
}
|
|
1097
1092
|
};
|
|
1098
1093
|
const otpCondition = computed(() => {
|
|
@@ -1527,7 +1522,6 @@ export default {
|
|
|
1527
1522
|
};
|
|
1528
1523
|
|
|
1529
1524
|
const getContragentClick = async (contragent: ContragentType) => {
|
|
1530
|
-
isButtonLoading.value = true;
|
|
1531
1525
|
await dataStore.serializeContragentData(member.value, contragent);
|
|
1532
1526
|
fioChooseDialog.value = false;
|
|
1533
1527
|
isButtonLoading.value = false;
|
|
@@ -1671,40 +1665,17 @@ export default {
|
|
|
1671
1665
|
}
|
|
1672
1666
|
}
|
|
1673
1667
|
}
|
|
1674
|
-
if (whichForm.value === formStore.insuredFormKey
|
|
1668
|
+
if (whichForm.value === formStore.insuredFormKey) {
|
|
1675
1669
|
wasInsuredAction.value = true;
|
|
1676
1670
|
if (dataStore.isPension) {
|
|
1677
|
-
|
|
1678
|
-
formStore.applicationData.
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
guaranteedPeriod: formStore.applicationData.slave.pensionApp.guaranteedPeriod ?? 0,
|
|
1686
|
-
amount: formStore.applicationData.slave.pensionApp.amount ?? 0,
|
|
1687
|
-
compulsoryContractAmount: formStore.applicationData.slave.pensionApp.compulsoryContractAmount ?? 0,
|
|
1688
|
-
voluntaryContractAmount: formStore.applicationData.slave.pensionApp.voluntaryContractAmount ?? 0,
|
|
1689
|
-
ownFundsRaisAmount: formStore.applicationData.slave.pensionApp.ownFundsRaisAmount ?? 0,
|
|
1690
|
-
compulsoryProfContractAmount: formStore.applicationData.slave.pensionApp.compulsoryProfContractAmount ?? 0,
|
|
1691
|
-
};
|
|
1692
|
-
} else {
|
|
1693
|
-
formStore.applicationData.pensionApp = {
|
|
1694
|
-
...formStore.applicationData.pensionApp,
|
|
1695
|
-
account: member.value.bankInfo.iik,
|
|
1696
|
-
bankBik: member.value.bankInfo.bik,
|
|
1697
|
-
bankBin: member.value.bankInfo.bankName.ids,
|
|
1698
|
-
bankId: member.value.bankInfo.bankName.id,
|
|
1699
|
-
bankName: member.value.bankInfo.bankName.nameRu,
|
|
1700
|
-
guaranteedPeriod: formStore.applicationData.pensionApp.guaranteedPeriod ?? 0,
|
|
1701
|
-
amount: formStore.applicationData.pensionApp.amount ?? 0,
|
|
1702
|
-
compulsoryContractAmount: formStore.applicationData.pensionApp.compulsoryContractAmount ?? 0,
|
|
1703
|
-
voluntaryContractAmount: formStore.applicationData.pensionApp.voluntaryContractAmount ?? 0,
|
|
1704
|
-
ownFundsRaisAmount: formStore.applicationData.pensionApp.ownFundsRaisAmount ?? 0,
|
|
1705
|
-
compulsoryProfContractAmount: formStore.applicationData.pensionApp.compulsoryProfContractAmount ?? 0,
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1671
|
+
formStore.applicationData.pensionApp = {
|
|
1672
|
+
...formStore.applicationData.pensionApp,
|
|
1673
|
+
account: member.value.bankInfo.iik,
|
|
1674
|
+
bankBik: member.value.bankInfo.bik,
|
|
1675
|
+
bankBin: member.value.bankInfo.bankName.ids,
|
|
1676
|
+
bankId: member.value.bankInfo.bankName.id,
|
|
1677
|
+
bankName: member.value.bankInfo.bankName.nameRu,
|
|
1678
|
+
};
|
|
1708
1679
|
const data = {
|
|
1709
1680
|
...formStore.applicationData.pensionApp,
|
|
1710
1681
|
transferContractCompany: formStore.applicationData.pensionApp.transferContractCompany?.nameRu ?? null,
|
|
@@ -1712,7 +1683,6 @@ export default {
|
|
|
1712
1683
|
const isApplicationSaved = await dataStore.setApplication(data);
|
|
1713
1684
|
if (isApplicationSaved === false) return;
|
|
1714
1685
|
dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
|
|
1715
|
-
await dataStore.saveMember(member.value, 'Client', memberFromApplicaiton);
|
|
1716
1686
|
}
|
|
1717
1687
|
}
|
|
1718
1688
|
await router.replace({
|
|
@@ -1800,7 +1770,7 @@ export default {
|
|
|
1800
1770
|
isSubmittingForm.value = false;
|
|
1801
1771
|
return;
|
|
1802
1772
|
}
|
|
1803
|
-
if (formStore.applicationData.pensionApp
|
|
1773
|
+
if (formStore.applicationData.pensionApp) {
|
|
1804
1774
|
formStore.applicationData.pensionApp.account = member.value.bankInfo.iik;
|
|
1805
1775
|
formStore.applicationData.pensionApp.bankBik = member.value.bankInfo.bik;
|
|
1806
1776
|
formStore.applicationData.pensionApp.bankBin = member.value.bankInfo.bin;
|
|
@@ -1821,7 +1791,7 @@ export default {
|
|
|
1821
1791
|
isSubmittingForm.value = false;
|
|
1822
1792
|
return;
|
|
1823
1793
|
}
|
|
1824
|
-
if (formStore.applicationData.pensionApp
|
|
1794
|
+
if (formStore.applicationData.pensionApp) {
|
|
1825
1795
|
formStore.applicationData.pensionApp.account = member.value.bankInfo.iik;
|
|
1826
1796
|
formStore.applicationData.pensionApp.bankBik = member.value.bankInfo.bik;
|
|
1827
1797
|
formStore.applicationData.pensionApp.bankBin = member.value.bankInfo.bin;
|
|
@@ -2007,10 +1977,12 @@ export default {
|
|
|
2007
1977
|
member.value.documentDate = reformatDate(userDocument.issueDate);
|
|
2008
1978
|
member.value.documentExpire = reformatDate(userDocument.expireDate);
|
|
2009
1979
|
}
|
|
1980
|
+
|
|
2010
1981
|
// const filteredDocuments: DocumentItem[] = dataStore.getFilesByIIN(member.value.iin!.replace(/-/g, '')) as DocumentItem[];
|
|
2011
1982
|
// if (filteredDocuments && filteredDocuments.length) memberDocument.value = filteredDocuments[0];
|
|
2012
1983
|
}
|
|
2013
1984
|
await setDefaultValues();
|
|
1985
|
+
if (Number(formStore.applicationData.processCode) === 4) dataStore.members.insuredApp.isMultiple = true;
|
|
2014
1986
|
if (hasWorkPositionDict && member.value.positionCode === null) member.value.jobPosition = null;
|
|
2015
1987
|
};
|
|
2016
1988
|
onMounted(async () => {
|
|
@@ -2060,7 +2032,7 @@ export default {
|
|
|
2060
2032
|
);
|
|
2061
2033
|
|
|
2062
2034
|
const onIinInput = () => {
|
|
2063
|
-
if (!!member.value.iin && member.value.iin.length === useMask().iin.length && memberSetting.value
|
|
2035
|
+
if (!!member.value.iin && member.value.iin.length === useMask().iin.length && memberSetting.value.isMultiple === true) {
|
|
2064
2036
|
const alreadyInStatement = formStore[whichForm.value as MultipleMember].findIndex((i: Member) => i.iin === member.value.iin);
|
|
2065
2037
|
if (alreadyInStatement !== -1 && alreadyInStatement !== Number(whichIndex.value)) {
|
|
2066
2038
|
dataStore.showToaster('error', dataStore.t('toaster.hasAlreadyMember'), 3000);
|
|
@@ -2124,17 +2096,15 @@ export default {
|
|
|
2124
2096
|
);
|
|
2125
2097
|
}
|
|
2126
2098
|
if (dataStore.isPension) {
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
val
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
);
|
|
2137
|
-
}
|
|
2099
|
+
watch(
|
|
2100
|
+
() => member.value.bankInfo.bankName,
|
|
2101
|
+
val => {
|
|
2102
|
+
if (val) {
|
|
2103
|
+
member.value.bankInfo.bik = val.code as string;
|
|
2104
|
+
member.value.bankInfo.bin = reformatIin(val.ids as string);
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
);
|
|
2138
2108
|
watch(
|
|
2139
2109
|
() => member.value.isDisability,
|
|
2140
2110
|
val => {
|
|
@@ -152,17 +152,6 @@
|
|
|
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
|
-
/>
|
|
166
155
|
<base-form-input
|
|
167
156
|
v-if="hasInsStartDate"
|
|
168
157
|
v-model="productConditionsForm.calcDate"
|
|
@@ -196,8 +185,8 @@
|
|
|
196
185
|
v-if="hasPaymentPeriod"
|
|
197
186
|
v-model="productConditionsForm.paymentPeriod"
|
|
198
187
|
:value="productConditionsForm.paymentPeriod?.nameRu"
|
|
199
|
-
:readonly="
|
|
200
|
-
:clearable="!
|
|
188
|
+
:readonly="isDisabled"
|
|
189
|
+
:clearable="!isDisabled"
|
|
201
190
|
:rules="$rules.objectRequired"
|
|
202
191
|
:label="$dataStore.t('productConditionsForm.processPaymentPeriod')"
|
|
203
192
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -267,10 +256,10 @@
|
|
|
267
256
|
@onClear="onClearPremiumDollar"
|
|
268
257
|
/>
|
|
269
258
|
<base-form-input
|
|
270
|
-
v-if="
|
|
259
|
+
v-if="hasCurrency && $dataStore.currencies.usd"
|
|
271
260
|
v-model="$dataStore.currencies.usd"
|
|
272
261
|
:readonly="true"
|
|
273
|
-
:label="
|
|
262
|
+
:label="$dataStore.t('productConditionsForm.dollarExchangeRateNBRK')"
|
|
274
263
|
:suffix="$constants.currencySymbols.kzt"
|
|
275
264
|
/>
|
|
276
265
|
<base-form-input
|
|
@@ -312,37 +301,14 @@
|
|
|
312
301
|
</base-form-section>
|
|
313
302
|
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
314
303
|
<base-animation>
|
|
315
|
-
<
|
|
316
|
-
v-if="
|
|
317
|
-
:
|
|
318
|
-
class="h-[
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
</div>
|
|
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
|
+
/>
|
|
322
310
|
</base-animation>
|
|
323
|
-
<
|
|
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
|
-
>
|
|
311
|
+
<base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
|
|
346
312
|
<base-form-input
|
|
347
313
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
348
314
|
:maska="$maska.numbers"
|
|
@@ -425,7 +391,7 @@
|
|
|
425
391
|
v-model="contractDate"
|
|
426
392
|
:maska="$maska.date"
|
|
427
393
|
:rules="!isDisabled ? $rules.required.concat($rules.date) : []"
|
|
428
|
-
:readonly="isDisabled
|
|
394
|
+
:readonly="isDisabled"
|
|
429
395
|
:clearable="!isDisabled"
|
|
430
396
|
:min-date="new Date()"
|
|
431
397
|
:label="$dataStore.t('pension.contractDate')"
|
|
@@ -446,13 +412,6 @@
|
|
|
446
412
|
<base-form-input v-model="pensionForm.frequencyPayments" disabled :label="$dataStore.t('pension.frequencyPayments')" />
|
|
447
413
|
<base-form-input v-model="pensionForm.periodPayments" disabled :label="$dataStore.t('pension.paymentPeriod')" />
|
|
448
414
|
<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
|
-
/>
|
|
456
415
|
<base-form-input v-model="pensionAmount" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionAmount')" />
|
|
457
416
|
<base-form-input v-model="pensionForm.payment" readonly :maska="$maska.numbers" :label="$dataStore.t('pension.pensionPayment')" />
|
|
458
417
|
</base-form-section>
|
|
@@ -822,8 +781,7 @@ export default defineComponent({
|
|
|
822
781
|
const transferContractDate = ref();
|
|
823
782
|
const transferContractFirstPaymentDate = ref();
|
|
824
783
|
const guaranteedPeriodList = Array.from(Array(35), (e, i) => i + 1);
|
|
825
|
-
const
|
|
826
|
-
const pensionForm = isSlavePensionForm.value ? formStore.applicationData?.slave?.pensionApp : formStore.applicationData?.pensionApp ?? undefined;
|
|
784
|
+
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
827
785
|
const isEnpfSum = (formStore.applicationData?.isEnpfSum ?? false) && useEnv().isProduction;
|
|
828
786
|
|
|
829
787
|
const transferContracts = ref<TransferContract[]>([]);
|
|
@@ -861,9 +819,7 @@ export default defineComponent({
|
|
|
861
819
|
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask() || fromIndexPage.value);
|
|
862
820
|
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
863
821
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
864
|
-
const insurancePremiumPerMonthRule = computed(() =>
|
|
865
|
-
!!productConditionsForm.insurancePremiumPerMonth ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
866
|
-
);
|
|
822
|
+
const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
867
823
|
const insurancePremiumPerMonthDisabled = computed(() => {
|
|
868
824
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
869
825
|
return true;
|
|
@@ -873,9 +829,7 @@ export default defineComponent({
|
|
|
873
829
|
}
|
|
874
830
|
return isDisabled.value;
|
|
875
831
|
});
|
|
876
|
-
const requestedSumInsuredRule = computed(() =>
|
|
877
|
-
!!productConditionsForm.requestedSumInsured ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
878
|
-
);
|
|
832
|
+
const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
879
833
|
const fixInsSumRule = computed(() =>
|
|
880
834
|
!!productConditionsForm.fixInsSum
|
|
881
835
|
? dataStore.rules.required.concat(dataStore.rules.sums, dataStore.rules.fixInsSumLimit(getNumber(productConditionsForm.fixInsSum as string), minInsSum.value))
|
|
@@ -917,27 +871,18 @@ export default defineComponent({
|
|
|
917
871
|
if (whichProduct.value === 'halykkazyna') {
|
|
918
872
|
return true;
|
|
919
873
|
}
|
|
920
|
-
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
921
|
-
return true;
|
|
922
|
-
}
|
|
923
874
|
return false;
|
|
924
875
|
});
|
|
925
876
|
const hasInsurancePremiumPerMonthInDollar = computed(() => {
|
|
926
877
|
if (whichProduct.value === 'halykkazyna') {
|
|
927
878
|
return true;
|
|
928
879
|
}
|
|
929
|
-
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
930
|
-
return true;
|
|
931
|
-
}
|
|
932
880
|
return false;
|
|
933
881
|
});
|
|
934
|
-
const
|
|
882
|
+
const hasCurrency = computed(() => {
|
|
935
883
|
if (whichProduct.value === 'halykkazyna') {
|
|
936
884
|
return true;
|
|
937
885
|
}
|
|
938
|
-
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
939
|
-
return true;
|
|
940
|
-
}
|
|
941
886
|
return false;
|
|
942
887
|
});
|
|
943
888
|
const hasAdbMultiply = computed(() => {
|
|
@@ -1040,12 +985,6 @@ export default defineComponent({
|
|
|
1040
985
|
}
|
|
1041
986
|
return dataStore.t('productConditionsForm.insurancePremiumAmount');
|
|
1042
987
|
});
|
|
1043
|
-
const currencySymbolsLabel = computed(() => {
|
|
1044
|
-
if (whichProduct.value === 'gons') {
|
|
1045
|
-
return dataStore.t('productConditionsForm.exchangeRateSettlementDate');
|
|
1046
|
-
}
|
|
1047
|
-
return dataStore.t('productConditionsForm.dollarExchangeRateNBRK');
|
|
1048
|
-
});
|
|
1049
988
|
const isDisabledFixInsSum = computed(() => {
|
|
1050
989
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
1051
990
|
return false;
|
|
@@ -1140,18 +1079,6 @@ export default defineComponent({
|
|
|
1140
1079
|
}
|
|
1141
1080
|
return false;
|
|
1142
1081
|
});
|
|
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
|
-
});
|
|
1155
1082
|
|
|
1156
1083
|
const pensionCalculationParams = ref({
|
|
1157
1084
|
compulsoryContractAmount: pensionForm && pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount != 0 ? pensionForm.compulsoryContractAmount : null,
|
|
@@ -1163,7 +1090,8 @@ export default defineComponent({
|
|
|
1163
1090
|
transferContractCompany: pensionForm && pensionForm.transferContractCompany ? pensionForm.transferContractCompany : null,
|
|
1164
1091
|
});
|
|
1165
1092
|
|
|
1166
|
-
const contractsAmount = computed(() => transferContracts.value?.reduce((accumulator, currentValue) => accumulator +
|
|
1093
|
+
const contractsAmount = computed(() => transferContracts.value?.reduce((accumulator, currentValue) => accumulator + currentValue.transferContractAmount, 0));
|
|
1094
|
+
|
|
1167
1095
|
const pensionAmount = computed(() =>
|
|
1168
1096
|
pensionCalculationParams.value
|
|
1169
1097
|
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
@@ -1452,7 +1380,7 @@ export default defineComponent({
|
|
|
1452
1380
|
const calculatedPremiumDollar = getNumber(event.target.value as string);
|
|
1453
1381
|
if (calculatedPremiumDollar) {
|
|
1454
1382
|
productConditionsForm.insurancePremiumPerMonth = dataStore.getNumberWithSpaces(productConditionsForm.insurancePremiumPerMonth);
|
|
1455
|
-
if (whichProduct.value === 'halykkazyna'
|
|
1383
|
+
if (whichProduct.value === 'halykkazyna') {
|
|
1456
1384
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1457
1385
|
productConditionsForm.insurancePremiumPerMonthInDollar = dataStore.getNumberWithSpaces(calculatedPremiumDollar / dataStore.currencies.usd);
|
|
1458
1386
|
} else {
|
|
@@ -1480,7 +1408,7 @@ export default defineComponent({
|
|
|
1480
1408
|
const calculatedSumDollar = getNumber(event.target.value as string);
|
|
1481
1409
|
if (calculatedSumDollar) {
|
|
1482
1410
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(productConditionsForm.requestedSumInsured);
|
|
1483
|
-
if (whichProduct.value === 'halykkazyna'
|
|
1411
|
+
if (whichProduct.value === 'halykkazyna') {
|
|
1484
1412
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1485
1413
|
productConditionsForm.requestedSumInsuredInDollar = dataStore.getNumberWithSpaces(calculatedSumDollar / dataStore.currencies.usd);
|
|
1486
1414
|
} else {
|
|
@@ -1546,7 +1474,7 @@ export default defineComponent({
|
|
|
1546
1474
|
};
|
|
1547
1475
|
|
|
1548
1476
|
const filterTermConditions = (term: AddCover) => {
|
|
1549
|
-
if (term.coverTypeCode === 10) {
|
|
1477
|
+
if (term.coverTypeCode === 10 && !props.isCalculator) {
|
|
1550
1478
|
return !!formStore.insuredForm.find((member: Member) => member.iin === formStore.policyholderForm.iin) === false;
|
|
1551
1479
|
}
|
|
1552
1480
|
return true;
|
|
@@ -1599,7 +1527,6 @@ export default defineComponent({
|
|
|
1599
1527
|
transferContractFirstPaymentDate: formatedFirstPaymentDate?.toISOString() ?? '',
|
|
1600
1528
|
// @ts-ignore
|
|
1601
1529
|
transferContractCompany: formatedNameRu,
|
|
1602
|
-
transferContractCompanyId: transferContracts.value[index].transferContractCompany?.ids,
|
|
1603
1530
|
id: transferContracts.value[index].id ?? null,
|
|
1604
1531
|
});
|
|
1605
1532
|
});
|
|
@@ -1615,23 +1542,19 @@ export default defineComponent({
|
|
|
1615
1542
|
transferContractAmount: Number(pensionCalculationParams.value.transferContractAmount),
|
|
1616
1543
|
transferContractCompany: pensionForm?.transferContractCompany?.nameRu ?? '',
|
|
1617
1544
|
}),
|
|
1618
|
-
amount: pensionAmount.value,
|
|
1619
1545
|
transferContracts: formatedContracts,
|
|
1620
1546
|
};
|
|
1621
|
-
await dataStore.setApplication(
|
|
1622
|
-
isSlavePensionForm.value ? { ...formStore.applicationData.pensionApp, slave: data } : { ...data, slave: formStore.applicationData.slave?.pensionApp ?? null },
|
|
1623
|
-
true,
|
|
1624
|
-
);
|
|
1547
|
+
await dataStore.setApplication(data, true);
|
|
1625
1548
|
} else {
|
|
1626
1549
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1627
1550
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
1628
|
-
if (whichProduct.value === 'halykkazyna'
|
|
1551
|
+
if (whichProduct.value === 'halykkazyna') {
|
|
1629
1552
|
productConditionsForm.insurancePremiumPerMonthInDollar = null;
|
|
1630
1553
|
}
|
|
1631
1554
|
}
|
|
1632
1555
|
if (whichSum.value === 'insurancePremiumPerMonth') {
|
|
1633
1556
|
productConditionsForm.requestedSumInsured = null;
|
|
1634
|
-
if (whichProduct.value === 'halykkazyna'
|
|
1557
|
+
if (whichProduct.value === 'halykkazyna') {
|
|
1635
1558
|
productConditionsForm.requestedSumInsuredInDollar = null;
|
|
1636
1559
|
}
|
|
1637
1560
|
}
|
|
@@ -1745,10 +1668,6 @@ export default defineComponent({
|
|
|
1745
1668
|
if (dataStore.isCalculator) {
|
|
1746
1669
|
clearFields();
|
|
1747
1670
|
}
|
|
1748
|
-
if (whichProduct.value === 'gons') {
|
|
1749
|
-
formStore.isDisabled.productConditionsForm = false;
|
|
1750
|
-
dataStore.setFormsDisabled(false);
|
|
1751
|
-
}
|
|
1752
1671
|
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
|
|
1753
1672
|
if (
|
|
1754
1673
|
(dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
|
|
@@ -1792,12 +1711,10 @@ export default defineComponent({
|
|
|
1792
1711
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
1793
1712
|
await dataStore.getProcessPaymentPeriod();
|
|
1794
1713
|
}
|
|
1795
|
-
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1796
|
-
await dataStore.getCurrencies();
|
|
1797
|
-
}
|
|
1798
1714
|
if (whichProduct.value === 'halykkazyna') {
|
|
1799
1715
|
const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
|
|
1800
1716
|
if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
|
|
1717
|
+
await dataStore.getCurrencies();
|
|
1801
1718
|
}
|
|
1802
1719
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1803
1720
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
|
|
@@ -1807,12 +1724,12 @@ export default defineComponent({
|
|
|
1807
1724
|
);
|
|
1808
1725
|
}
|
|
1809
1726
|
if (whichProduct.value === 'pensionannuitynew') {
|
|
1810
|
-
contractDate.value = reformatDate(
|
|
1811
|
-
dateOfBegin.value = reformatDate(
|
|
1812
|
-
transferContractDate.value = reformatDate(
|
|
1813
|
-
transferContractFirstPaymentDate.value = reformatDate(
|
|
1727
|
+
contractDate.value = reformatDate(formStore.applicationData.pensionApp.contractDate);
|
|
1728
|
+
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
1729
|
+
transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
|
|
1730
|
+
transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
|
|
1814
1731
|
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
|
|
1815
|
-
if (
|
|
1732
|
+
if (transferContracts.value && transferContracts.value.length) {
|
|
1816
1733
|
transferContracts.value = pensionForm.transferContracts?.map((contract: TransferContract) => {
|
|
1817
1734
|
contract.transferContractDate = reformatDate(contract.transferContractDate)!;
|
|
1818
1735
|
contract.transferContractFirstPaymentDate = reformatDate(contract.transferContractFirstPaymentDate)!;
|
|
@@ -1853,23 +1770,6 @@ export default defineComponent({
|
|
|
1853
1770
|
{ immediate: true },
|
|
1854
1771
|
);
|
|
1855
1772
|
|
|
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
|
-
|
|
1873
1773
|
if (hasInsStartDate.value) {
|
|
1874
1774
|
watch(
|
|
1875
1775
|
() => productConditionsForm.calcDate,
|
|
@@ -1938,25 +1838,8 @@ export default defineComponent({
|
|
|
1938
1838
|
);
|
|
1939
1839
|
}
|
|
1940
1840
|
|
|
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
|
-
|
|
1958
1841
|
const copyRedirect = async () => {
|
|
1959
|
-
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(
|
|
1842
|
+
const url = await dataStore.api.pensionannuityNew.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
|
|
1960
1843
|
dataStore.copyToClipboard(url.redirectUrl);
|
|
1961
1844
|
};
|
|
1962
1845
|
|
|
@@ -2002,9 +1885,6 @@ export default defineComponent({
|
|
|
2002
1885
|
isDisabled,
|
|
2003
1886
|
isTermsDisabled,
|
|
2004
1887
|
isUnderwriterForm,
|
|
2005
|
-
hasCurrencySymbols,
|
|
2006
|
-
currencySymbolsLabel,
|
|
2007
|
-
isDisabledPaymentPeriod,
|
|
2008
1888
|
insurancePremiumPerMonthRule,
|
|
2009
1889
|
insurancePremiumPerMonthDisabled,
|
|
2010
1890
|
requestedSumInsuredRule,
|
|
@@ -2050,7 +1930,6 @@ export default defineComponent({
|
|
|
2050
1930
|
hasCoverPeriod,
|
|
2051
1931
|
hasInsStartDate,
|
|
2052
1932
|
hasInsEndDate,
|
|
2053
|
-
isSlavePensionForm,
|
|
2054
1933
|
|
|
2055
1934
|
// Rules
|
|
2056
1935
|
coverPeriodRule,
|