hl-core 0.0.10-beta.25 → 0.0.10-beta.27
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 +10 -33
- package/components/Form/ManagerAttachment.vue +16 -4
- package/components/Pages/ContragentForm.vue +1 -1
- package/components/Pages/MemberForm.vue +29 -59
- package/components/Pages/ProductConditions.vue +34 -154
- package/components/Panel/PanelHandler.vue +12 -30
- package/components/Utilities/Chip.vue +1 -1
- package/composables/classes.ts +0 -8
- package/composables/constants.ts +1 -17
- package/composables/index.ts +5 -2
- package/locales/ru.json +3 -5
- package/package.json +1 -1
- package/store/data.store.ts +59 -239
- package/store/member.store.ts +4 -15
- package/store/rules.ts +6 -0
- package/types/enum.ts +1 -1
- package/types/index.ts +2 -1
package/locales/ru.json
CHANGED
|
@@ -395,7 +395,6 @@
|
|
|
395
395
|
"insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
|
|
396
396
|
"insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
|
|
397
397
|
"dollarExchangeRateNBRK": "Курс доллара НБРК",
|
|
398
|
-
"exchangeRateSettlementDate": "Курс на дату расчета (USD/KZT)",
|
|
399
398
|
"contractDate": "Дата контракта",
|
|
400
399
|
"guaranteedTermAnnuityPayments": "Гарантированный срок аннуитетных выплат",
|
|
401
400
|
"guaranteedPeriod": "Укажите период гарантированного срока",
|
|
@@ -585,9 +584,7 @@
|
|
|
585
584
|
"signInProcessManager": "Договор будет подписан в течение минуты",
|
|
586
585
|
"transferRegNumber": "Номер и серия договора",
|
|
587
586
|
"contragentSelect": "Выбор контрагента",
|
|
588
|
-
"fileError": "Ошибка прикрепления файла"
|
|
589
|
-
"parentContractNextPay": "Возврат с учетом очередной выплаты",
|
|
590
|
-
"parentContractNextPayDate": "Очередная выплата по графику"
|
|
587
|
+
"fileError": "Ошибка прикрепления файла"
|
|
591
588
|
},
|
|
592
589
|
"agent": {
|
|
593
590
|
"currency": "Валюта",
|
|
@@ -876,7 +873,8 @@
|
|
|
876
873
|
"agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
|
|
877
874
|
"checkDate": "Укажите корректную дату",
|
|
878
875
|
"searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
|
|
879
|
-
"fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
|
|
876
|
+
"fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг",
|
|
877
|
+
"lengthLimit": "Превышен лимит символов. Введите текст длиной не более {len} символов"
|
|
880
878
|
},
|
|
881
879
|
"code": "КСЭ",
|
|
882
880
|
"fontSize": "Размер шрифта",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -63,6 +63,7 @@ export const useDataStore = defineStore('data', {
|
|
|
63
63
|
isCheckContract: state => state.product === 'checkcontract',
|
|
64
64
|
isCheckContragent: state => state.product === 'checkcontragent',
|
|
65
65
|
isPrePension: state => state.product === 'prepensionannuity',
|
|
66
|
+
isBalam: state => state.product === 'balam',
|
|
66
67
|
isDSO: state => state.product === 'dso',
|
|
67
68
|
isUU: state => state.product === 'uu',
|
|
68
69
|
hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
|
|
@@ -279,75 +280,39 @@ export const useDataStore = defineStore('data', {
|
|
|
279
280
|
if (!file.id) return;
|
|
280
281
|
try {
|
|
281
282
|
this.isLoading = true;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
window.open(url, '_blank', `width=${screen.width},height=${screen.height},top=70`);
|
|
292
|
-
});
|
|
293
|
-
} else {
|
|
294
|
-
link.setAttribute('download', file.fileName!);
|
|
295
|
-
document.body.appendChild(link);
|
|
296
|
-
link.click();
|
|
297
|
-
}
|
|
298
|
-
} else {
|
|
299
|
-
const blob = new Blob([response], {
|
|
300
|
-
type: `application/${fileType}`,
|
|
283
|
+
await this.api.file.getFile(file.id).then((response: any) => {
|
|
284
|
+
if (!['pdf', 'docx'].includes(fileType)) {
|
|
285
|
+
const blob = new Blob([response], { type: `image/${fileType}` });
|
|
286
|
+
const url = window.URL.createObjectURL(blob);
|
|
287
|
+
const link = document.createElement('a');
|
|
288
|
+
link.href = url;
|
|
289
|
+
if (mode === 'view') {
|
|
290
|
+
setTimeout(() => {
|
|
291
|
+
window.open(url, '_blank', `width=${screen.width},height=${screen.height},top=70`);
|
|
301
292
|
});
|
|
302
|
-
const url = window.URL.createObjectURL(blob);
|
|
303
|
-
const link = document.createElement('a');
|
|
304
|
-
link.href = url;
|
|
305
|
-
if (mode === 'view') {
|
|
306
|
-
setTimeout(() => {
|
|
307
|
-
window.open(url, '_blank', `right=100`);
|
|
308
|
-
});
|
|
309
|
-
} else {
|
|
310
|
-
link.setAttribute('download', file.fileName!);
|
|
311
|
-
document.body.appendChild(link);
|
|
312
|
-
link.click();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
} else {
|
|
317
|
-
await this.api.file.getFile(file.id).then((response: any) => {
|
|
318
|
-
if (!['pdf', 'docx'].includes(fileType)) {
|
|
319
|
-
const blob = new Blob([response], { type: `image/${fileType}` });
|
|
320
|
-
const url = window.URL.createObjectURL(blob);
|
|
321
|
-
const link = document.createElement('a');
|
|
322
|
-
link.href = url;
|
|
323
|
-
if (mode === 'view') {
|
|
324
|
-
setTimeout(() => {
|
|
325
|
-
window.open(url, '_blank', `width=${screen.width},height=${screen.height},top=70`);
|
|
326
|
-
});
|
|
327
|
-
} else {
|
|
328
|
-
link.setAttribute('download', file.fileName!);
|
|
329
|
-
document.body.appendChild(link);
|
|
330
|
-
link.click();
|
|
331
|
-
}
|
|
332
293
|
} else {
|
|
333
|
-
|
|
334
|
-
|
|
294
|
+
link.setAttribute('download', file.fileName!);
|
|
295
|
+
document.body.appendChild(link);
|
|
296
|
+
link.click();
|
|
297
|
+
}
|
|
298
|
+
} else {
|
|
299
|
+
const blob = new Blob([response], {
|
|
300
|
+
type: `application/${fileType}`,
|
|
301
|
+
});
|
|
302
|
+
const url = window.URL.createObjectURL(blob);
|
|
303
|
+
const link = document.createElement('a');
|
|
304
|
+
link.href = url;
|
|
305
|
+
if (mode === 'view') {
|
|
306
|
+
setTimeout(() => {
|
|
307
|
+
window.open(url, '_blank', `right=100`);
|
|
335
308
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
link
|
|
339
|
-
|
|
340
|
-
setTimeout(() => {
|
|
341
|
-
window.open(url, '_blank', `right=100`);
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
link.setAttribute('download', file.fileName!);
|
|
345
|
-
document.body.appendChild(link);
|
|
346
|
-
link.click();
|
|
347
|
-
}
|
|
309
|
+
} else {
|
|
310
|
+
link.setAttribute('download', file.fileName!);
|
|
311
|
+
document.body.appendChild(link);
|
|
312
|
+
link.click();
|
|
348
313
|
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
314
|
+
}
|
|
315
|
+
});
|
|
351
316
|
} catch (err) {
|
|
352
317
|
ErrorHandler(err);
|
|
353
318
|
} finally {
|
|
@@ -391,7 +356,6 @@ export const useDataStore = defineStore('data', {
|
|
|
391
356
|
lastName: '',
|
|
392
357
|
middleName: '',
|
|
393
358
|
iin: member.iin ? member.iin.replace(/-/g, '') : '',
|
|
394
|
-
birthDate: '',
|
|
395
359
|
};
|
|
396
360
|
const contragentResponse = await this.api.getContragent(queryData);
|
|
397
361
|
if (contragentResponse.totalItems > 0) {
|
|
@@ -413,17 +377,11 @@ export const useDataStore = defineStore('data', {
|
|
|
413
377
|
}
|
|
414
378
|
this.isLoading = false;
|
|
415
379
|
},
|
|
416
|
-
async getContragentById(id: number, whichForm: keyof typeof StoreMembers
|
|
380
|
+
async getContragentById(id: number, whichForm: keyof typeof StoreMembers, load: boolean = true, whichIndex: number | null = null) {
|
|
417
381
|
if (Number(id) === 0) return;
|
|
418
382
|
this.isLoading = load;
|
|
419
383
|
try {
|
|
420
|
-
const member =
|
|
421
|
-
this.isPension && whichForm === 'slaveInsuredForm'
|
|
422
|
-
? this.formStore.slaveInsuredForm
|
|
423
|
-
: whichIndex === null
|
|
424
|
-
? this.formStore[whichForm as Types.SingleMember]
|
|
425
|
-
: this.formStore[whichForm as Types.MultipleMember][whichIndex];
|
|
426
|
-
|
|
384
|
+
const member = whichIndex === null ? this.formStore[whichForm as Types.SingleMember] : this.formStore[whichForm as Types.MultipleMember][whichIndex];
|
|
427
385
|
const contragentResponse = await this.api.getContragentById(id);
|
|
428
386
|
if (contragentResponse.totalItems > 0) {
|
|
429
387
|
await this.serializeContragentData(member, contragentResponse.items[0]);
|
|
@@ -897,9 +855,6 @@ export const useDataStore = defineStore('data', {
|
|
|
897
855
|
isIpdlCompliance: null,
|
|
898
856
|
isTerrorCompliance: null,
|
|
899
857
|
};
|
|
900
|
-
if (this.isPension && memberFromApplicaiton && memberFromApplicaiton.processInstanceId === this.formStore.applicationData.slave?.processInstanceId) {
|
|
901
|
-
data.processInstanceId = this.formStore.applicationData.slave.processInstanceId;
|
|
902
|
-
}
|
|
903
858
|
data.id = memberFromApplicaiton && memberFromApplicaiton.id ? memberFromApplicaiton.id : null;
|
|
904
859
|
if (whichMember === 'Client') {
|
|
905
860
|
data.isInsured = this.formStore.isPolicyholderInsured;
|
|
@@ -909,12 +864,6 @@ export const useDataStore = defineStore('data', {
|
|
|
909
864
|
data.jobName = member.jobPlace;
|
|
910
865
|
data.positionCode = member.positionCode;
|
|
911
866
|
data.familyStatusId = member.familyStatus.id;
|
|
912
|
-
if (this.isPension) {
|
|
913
|
-
data.id =
|
|
914
|
-
memberFromApplicaiton.processInstanceId === this.formStore.applicationData.processInstanceId
|
|
915
|
-
? this.formStore.applicationData.clientApp.id
|
|
916
|
-
: this.formStore.applicationData.slave.clientApp.id;
|
|
917
|
-
}
|
|
918
867
|
}
|
|
919
868
|
if (whichMember === 'Spokesman') {
|
|
920
869
|
if (!!memberFromApplicaiton && memberFromApplicaiton.iin !== data.iin) {
|
|
@@ -973,12 +922,6 @@ export const useDataStore = defineStore('data', {
|
|
|
973
922
|
data.familyStatusId = member.familyStatus.id;
|
|
974
923
|
data.relationId = member.relationDegree.ids;
|
|
975
924
|
data.relationName = member.relationDegree.nameRu;
|
|
976
|
-
if (this.isPension) {
|
|
977
|
-
data.id =
|
|
978
|
-
memberFromApplicaiton.processInstanceId === this.formStore.applicationData.processInstanceId
|
|
979
|
-
? this.formStore.applicationData.insuredApp[0].id
|
|
980
|
-
: this.formStore.applicationData.slave.insuredApp[0].id;
|
|
981
|
-
}
|
|
982
925
|
}
|
|
983
926
|
if (whichMember === 'Beneficiary') {
|
|
984
927
|
if (
|
|
@@ -1023,20 +966,10 @@ export const useDataStore = defineStore('data', {
|
|
|
1023
966
|
}
|
|
1024
967
|
}
|
|
1025
968
|
},
|
|
1026
|
-
async setApplication(applicationData:
|
|
969
|
+
async setApplication(applicationData: object, calculate: boolean = false) {
|
|
1027
970
|
try {
|
|
1028
971
|
this.isLoading = true;
|
|
1029
972
|
this.isButtonsLoading = true;
|
|
1030
|
-
if (this.isPension) {
|
|
1031
|
-
applicationData.transferContractCompany = '';
|
|
1032
|
-
if (applicationData.slave) {
|
|
1033
|
-
applicationData.slave.guaranteedPeriod = applicationData.slave.guaranteedPeriod ?? 0;
|
|
1034
|
-
applicationData.slave.transferContractCompany = '';
|
|
1035
|
-
}
|
|
1036
|
-
if (Number(this.formStore.applicationData.processCode) === 2) {
|
|
1037
|
-
applicationData.transferContractAmount = applicationData.parentContractAmount - applicationData.refundAmount;
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
973
|
await this.api.setApplication(applicationData);
|
|
1041
974
|
if (calculate) {
|
|
1042
975
|
await this.api.calculatePension(String(this.formStore.applicationData.processInstanceId));
|
|
@@ -1091,14 +1024,6 @@ export const useDataStore = defineStore('data', {
|
|
|
1091
1024
|
conditionsData.policyAppDto.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1092
1025
|
conditionsData.policyAppDto.currencyExchangeRate = this.currencies.usd;
|
|
1093
1026
|
}
|
|
1094
|
-
if (this.isGons) {
|
|
1095
|
-
conditionsData.policyAppDto.premiumInCurrency =
|
|
1096
|
-
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
|
|
1097
|
-
conditionsData.policyAppDto.amountInCurrency =
|
|
1098
|
-
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1099
|
-
conditionsData.policyAppDto.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
|
|
1100
|
-
conditionsData.policyAppDto.currency = this.formStore.productConditionsForm.currency.code as string;
|
|
1101
|
-
}
|
|
1102
1027
|
if (this.isLiferenta) {
|
|
1103
1028
|
conditionsData.policyAppDto.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
|
|
1104
1029
|
conditionsData.policyAppDto.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
|
|
@@ -1641,7 +1566,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1641
1566
|
query.processCode = byOneProcess;
|
|
1642
1567
|
}
|
|
1643
1568
|
if (byOneProcess === 19 && !useEnv().isProduction) {
|
|
1644
|
-
query.processCodes = [19, 2
|
|
1569
|
+
query.processCodes = [19, 2];
|
|
1645
1570
|
delete query.processCode;
|
|
1646
1571
|
}
|
|
1647
1572
|
const taskList = await this.api.getTaskList(
|
|
@@ -1867,15 +1792,6 @@ export const useDataStore = defineStore('data', {
|
|
|
1867
1792
|
calculationData.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1868
1793
|
calculationData.currencyExchangeRate = this.currencies.usd;
|
|
1869
1794
|
}
|
|
1870
|
-
if (this.isGons || product === 'gons') {
|
|
1871
|
-
calculationData.premiumInCurrency =
|
|
1872
|
-
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
|
|
1873
|
-
calculationData.amountInCurrency =
|
|
1874
|
-
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1875
|
-
calculationData.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
|
|
1876
|
-
|
|
1877
|
-
calculationData.currency = this.formStore.productConditionsForm.currency.code as string;
|
|
1878
|
-
}
|
|
1879
1795
|
if (this.isLiferenta || product === 'liferenta') {
|
|
1880
1796
|
calculationData.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
|
|
1881
1797
|
calculationData.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
|
|
@@ -1894,15 +1810,10 @@ export const useDataStore = defineStore('data', {
|
|
|
1894
1810
|
calculationData.calcDate = formatDate(this.formStore.productConditionsForm.calcDate as string)!.toISOString();
|
|
1895
1811
|
}
|
|
1896
1812
|
const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
|
|
1897
|
-
if (calculationResponse.amount)
|
|
1898
|
-
|
|
1899
|
-
this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.amount) : this.getNumberWithSpaces(calculationResponse.amount);
|
|
1900
|
-
if (calculationResponse.premium)
|
|
1901
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth =
|
|
1902
|
-
this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.premium) : this.getNumberWithSpaces(calculationResponse.premium);
|
|
1903
|
-
|
|
1813
|
+
if (calculationResponse.amount) this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.amount);
|
|
1814
|
+
if (calculationResponse.premium) this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.premium);
|
|
1904
1815
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1905
|
-
if (this.isKazyna || product === 'halykkazyna'
|
|
1816
|
+
if (this.isKazyna || product === 'halykkazyna') {
|
|
1906
1817
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
|
|
1907
1818
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(calculationResponse.amountInCurrency);
|
|
1908
1819
|
} else {
|
|
@@ -1949,7 +1860,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1949
1860
|
const applicationData = await this.api.getApplicationData(taskId);
|
|
1950
1861
|
this.formStore.applicationData = applicationData;
|
|
1951
1862
|
if (this.formStore.applicationData.addCoverDto) this.formStore.additionalInsuranceTerms = this.formStore.applicationData.addCoverDto;
|
|
1952
|
-
if (
|
|
1863
|
+
if (this.isKazyna && this.currencies.usd) {
|
|
1953
1864
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
|
|
1954
1865
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(result.value / this.currencies.usd);
|
|
1955
1866
|
} else {
|
|
@@ -1957,15 +1868,11 @@ export const useDataStore = defineStore('data', {
|
|
|
1957
1868
|
}
|
|
1958
1869
|
}
|
|
1959
1870
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonth != null) {
|
|
1960
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.
|
|
1961
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.
|
|
1962
|
-
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium)
|
|
1963
|
-
: this.getNumberWithSpaces(applicationData.policyAppDto.premium);
|
|
1871
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(result.value);
|
|
1872
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(applicationData.policyAppDto.premium);
|
|
1964
1873
|
} else {
|
|
1965
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.
|
|
1966
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.
|
|
1967
|
-
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.amount)
|
|
1968
|
-
: this.getNumberWithSpaces(applicationData.policyAppDto.amount);
|
|
1874
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
|
|
1875
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount);
|
|
1969
1876
|
}
|
|
1970
1877
|
if (this.isLiferenta) {
|
|
1971
1878
|
this.formStore.productConditionsForm.amountAnnuityPayments = this.getNumberWithSpaces(applicationData.policyAppDto.annuityMonthPay);
|
|
@@ -1991,38 +1898,6 @@ export const useDataStore = defineStore('data', {
|
|
|
1991
1898
|
}
|
|
1992
1899
|
this.isLoading = false;
|
|
1993
1900
|
},
|
|
1994
|
-
async reCalculateRefund(insSum: number, insSumMain: number, guaranteedPeriod: number, isOppv: boolean, transferContractMonthCount: number) {
|
|
1995
|
-
this.isLoading = true;
|
|
1996
|
-
try {
|
|
1997
|
-
const data = {
|
|
1998
|
-
processInstanceId: this.formStore.applicationData.processInstanceId,
|
|
1999
|
-
insSum: insSum,
|
|
2000
|
-
insSumMain: insSumMain,
|
|
2001
|
-
guaranteedPeriod: guaranteedPeriod,
|
|
2002
|
-
isOppv: isOppv,
|
|
2003
|
-
transferContractMonthCount: transferContractMonthCount,
|
|
2004
|
-
};
|
|
2005
|
-
const response = await this.api.pensionannuityNew.reCalculateRefund(data);
|
|
2006
|
-
} catch (err) {
|
|
2007
|
-
ErrorHandler(err);
|
|
2008
|
-
}
|
|
2009
|
-
this.isLoading = false;
|
|
2010
|
-
},
|
|
2011
|
-
async calcParentContractSums(closeContractCompanyCode: string, closeContractCompanyName: string, isContractClosed: boolean) {
|
|
2012
|
-
this.isLoading = true;
|
|
2013
|
-
try {
|
|
2014
|
-
const data = {
|
|
2015
|
-
processInstanceId: this.formStore.applicationData.processInstanceId,
|
|
2016
|
-
closeContractCompanyCode: closeContractCompanyCode,
|
|
2017
|
-
closeContractCompanyName: closeContractCompanyName,
|
|
2018
|
-
isContractClosed: isContractClosed,
|
|
2019
|
-
};
|
|
2020
|
-
const response = await this.api.pensionannuityNew.calcParentContractSums(data);
|
|
2021
|
-
} catch (err) {
|
|
2022
|
-
ErrorHandler(err);
|
|
2023
|
-
}
|
|
2024
|
-
this.isLoading = false;
|
|
2025
|
-
},
|
|
2026
1901
|
async calculatePremium(data: any) {
|
|
2027
1902
|
this.isLoading = true;
|
|
2028
1903
|
try {
|
|
@@ -2131,7 +2006,6 @@ export const useDataStore = defineStore('data', {
|
|
|
2131
2006
|
|
|
2132
2007
|
const clientData = applicationData.clientApp;
|
|
2133
2008
|
const insuredData: any[] = applicationData.insuredApp;
|
|
2134
|
-
const slaveInsuredData: any = applicationData.slave?.insuredApp[0] ?? null;
|
|
2135
2009
|
const beneficiaryData: any[] = applicationData.beneficiaryApp;
|
|
2136
2010
|
const beneficialOwnerData: any[] = applicationData.beneficialOwnerApp;
|
|
2137
2011
|
const spokesmanData: any = applicationData.spokesmanApp;
|
|
@@ -2222,13 +2096,6 @@ export const useDataStore = defineStore('data', {
|
|
|
2222
2096
|
}
|
|
2223
2097
|
});
|
|
2224
2098
|
}
|
|
2225
|
-
if (slaveInsuredData) {
|
|
2226
|
-
allMembers.push({
|
|
2227
|
-
...slaveInsuredData,
|
|
2228
|
-
key: 'slaveInsuredForm',
|
|
2229
|
-
index: null,
|
|
2230
|
-
});
|
|
2231
|
-
}
|
|
2232
2099
|
if (beneficiaryData && beneficiaryData.length) {
|
|
2233
2100
|
beneficiaryData.forEach((member, index) => {
|
|
2234
2101
|
const inStore = this.formStore.beneficiaryForm.find(each => each.id == member.insisId);
|
|
@@ -2266,14 +2133,12 @@ export const useDataStore = defineStore('data', {
|
|
|
2266
2133
|
this.setMembersField(this.formStore.policyholderFormKey, 'clientApp');
|
|
2267
2134
|
if (insuredData && insuredData.length) {
|
|
2268
2135
|
insuredData.forEach((each, index) => {
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
this.formStore.insuredForm[index].relationDegree = relationDegree ? relationDegree : new Value();
|
|
2273
|
-
}
|
|
2136
|
+
this.setMembersFieldIndex(this.formStore.insuredFormKey, 'insuredApp', index);
|
|
2137
|
+
const relationDegree = this.relations.find((i: Value) => i.ids == each.relationId);
|
|
2138
|
+
this.formStore.insuredForm[index].relationDegree = relationDegree ? relationDegree : new Value();
|
|
2274
2139
|
});
|
|
2275
2140
|
}
|
|
2276
|
-
|
|
2141
|
+
|
|
2277
2142
|
if (beneficiaryData && beneficiaryData.length) {
|
|
2278
2143
|
beneficiaryData.forEach((each, index) => {
|
|
2279
2144
|
this.setMembersFieldIndex(this.formStore.beneficiaryFormKey, 'beneficiaryApp', index);
|
|
@@ -2351,21 +2216,16 @@ export const useDataStore = defineStore('data', {
|
|
|
2351
2216
|
const paymentPeriod = this.processPaymentPeriod.find(item => item.id == applicationData.policyAppDto.paymentPeriodId);
|
|
2352
2217
|
this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
|
|
2353
2218
|
|
|
2354
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
if (this.isKazyna || this.isGons) {
|
|
2219
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(
|
|
2220
|
+
applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount,
|
|
2221
|
+
);
|
|
2222
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
|
|
2223
|
+
applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium,
|
|
2224
|
+
);
|
|
2225
|
+
if (this.isKazyna) {
|
|
2362
2226
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.amountInCurrency);
|
|
2363
2227
|
this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.premiumInCurrency);
|
|
2364
2228
|
}
|
|
2365
|
-
if (this.isGons) {
|
|
2366
|
-
const currency = constants.currencyList.find(item => item.code === applicationData.policyAppDto.currency);
|
|
2367
|
-
this.formStore.productConditionsForm.currency = currency ? currency : new Value();
|
|
2368
|
-
}
|
|
2369
2229
|
const riskGroup = this.riskGroup.find(item => {
|
|
2370
2230
|
if (applicationData.policyAppDto.riskGroup == 0) {
|
|
2371
2231
|
return true;
|
|
@@ -2543,34 +2403,6 @@ export const useDataStore = defineStore('data', {
|
|
|
2543
2403
|
this.formStore.applicationData.pensionApp.transferContractCompany = transferCompany ? transferCompany : new Value();
|
|
2544
2404
|
}
|
|
2545
2405
|
},
|
|
2546
|
-
setMembersFieldSlave() {
|
|
2547
|
-
this.formStore.slaveInsuredForm.familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData.slave['insuredApp'].familyStatusId);
|
|
2548
|
-
this.formStore.slaveInsuredForm.signOfIPDL = this.findObject(
|
|
2549
|
-
'ipdl',
|
|
2550
|
-
'nameRu',
|
|
2551
|
-
this.formStore.applicationData.slave.insuredApp[0].isIpdl === null ? null : this.formStore.applicationData.slave.insuredApp[0].isIpdl == true ? 'Да' : 'Нет',
|
|
2552
|
-
);
|
|
2553
|
-
if (!!this.formStore.applicationData.slave.insuredApp[0].profession) this.formStore.slaveInsuredForm.job = this.formStore.applicationData.slave.insuredApp[0].profession;
|
|
2554
|
-
if (!!this.formStore.applicationData.slave.insuredApp[0].position) this.formStore.slaveInsuredForm.jobPosition = this.formStore.applicationData.slave.insuredApp[0].position;
|
|
2555
|
-
if (!!this.formStore.applicationData.slave.insuredApp[0].jobName) this.formStore.slaveInsuredForm.jobPlace = this.formStore.applicationData.slave.insuredApp[0].jobName;
|
|
2556
|
-
if (!!this.formStore.applicationData.slave.insuredApp[0].positionCode)
|
|
2557
|
-
this.formStore.slaveInsuredForm.positionCode = this.formStore.applicationData.slave.insuredApp[0].positionCode;
|
|
2558
|
-
if (typeof this.formStore.applicationData.slave.insuredApp[0].isDisability === 'boolean')
|
|
2559
|
-
this.formStore.slaveInsuredForm.isDisability = this.formStore.applicationData.slave.insuredApp[0].isDisability;
|
|
2560
|
-
if (!!this.formStore.applicationData.slave.insuredApp[0].disabilityGroupId) {
|
|
2561
|
-
const disabilityGroup = this.disabilityGroups.find(i => i.id === this.formStore.applicationData.slave.insuredApp[0].disabilityGroupId);
|
|
2562
|
-
this.formStore.slaveInsuredForm.disabilityGroup = disabilityGroup ? disabilityGroup : new Value();
|
|
2563
|
-
}
|
|
2564
|
-
if (this.formStore.slaveInsuredForm.bankInfo) {
|
|
2565
|
-
this.formStore.slaveInsuredForm.bankInfo.iik = this.formStore.applicationData.slave.pensionApp.account;
|
|
2566
|
-
this.formStore.slaveInsuredForm.bankInfo.bik = this.formStore.applicationData.slave.pensionApp.bankBik;
|
|
2567
|
-
const bank = this.banks.find(i => i.ids === this.formStore.applicationData.slave.pensionApp.bankBin);
|
|
2568
|
-
const transferCompany = this.transferContractCompanies.find(i => i.nameRu === this.formStore.applicationData.slave.pensionApp.transferContractCompany);
|
|
2569
|
-
this.formStore.slaveInsuredForm.bankInfo.bankName = bank ? bank : new Value();
|
|
2570
|
-
this.formStore.slaveInsuredForm.bankInfo.bin = bank ? String(bank.ids) : '';
|
|
2571
|
-
this.formStore.applicationData.slave.pensionApp.transferContractCompany = transferCompany ? transferCompany : new Value();
|
|
2572
|
-
}
|
|
2573
|
-
},
|
|
2574
2406
|
setMembersFieldIndex(whichForm: Types.MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
|
|
2575
2407
|
if ('familyStatus' in this.formStore[whichForm][index]) {
|
|
2576
2408
|
this.formStore[whichForm][index].familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData[whichMember][index].familyStatusId);
|
|
@@ -2684,7 +2516,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2684
2516
|
ErrorHandler(err);
|
|
2685
2517
|
}
|
|
2686
2518
|
},
|
|
2687
|
-
async nclayerSign(groupId: string, signType: number, isXml: boolean = false) {
|
|
2519
|
+
async nclayerSign(groupId: string, signType: number, isXml: boolean = false, processInstanceId?: string) {
|
|
2688
2520
|
try {
|
|
2689
2521
|
const ncaLayerClient = new NCALayerClient();
|
|
2690
2522
|
await ncaLayerClient.connect();
|
|
@@ -2694,7 +2526,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2694
2526
|
if (isXml) {
|
|
2695
2527
|
const signedAgreement = await ncaLayerClient.signXml(storageType, document, 'SIGNATURE', '');
|
|
2696
2528
|
const data = new FormData();
|
|
2697
|
-
data.append('processInstanceId', String(this.formStore.applicationData.processInstanceId));
|
|
2529
|
+
data.append('processInstanceId', processInstanceId ?? String(this.formStore.applicationData.processInstanceId));
|
|
2698
2530
|
data.append('xmlData', signedAgreement);
|
|
2699
2531
|
data.append('name', 'PAEnpf_Agreement');
|
|
2700
2532
|
data.append('format', 'xml');
|
|
@@ -2981,15 +2813,6 @@ export const useDataStore = defineStore('data', {
|
|
|
2981
2813
|
}
|
|
2982
2814
|
}
|
|
2983
2815
|
}
|
|
2984
|
-
} else if (applicationKey === 'slave') {
|
|
2985
|
-
if (this.formStore.slaveInsuredForm && this.formStore.applicationData.slave) {
|
|
2986
|
-
const localSlave = this.formStore.slaveInsuredForm;
|
|
2987
|
-
const applicationSlave = this.formStore.applicationData.slave.insuredApp[0];
|
|
2988
|
-
if ((localSlave.id === applicationSlave.insisId && applicationSlave.iin === localSlave.iin?.replace(/-/g, '')) === false) {
|
|
2989
|
-
this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
|
|
2990
|
-
return false;
|
|
2991
|
-
}
|
|
2992
|
-
}
|
|
2993
2816
|
} else {
|
|
2994
2817
|
if (this.formStore[localKey].some(i => i.iin !== null)) {
|
|
2995
2818
|
this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
|
|
@@ -3009,7 +2832,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3009
2832
|
},
|
|
3010
2833
|
async validateAllMembers(taskId: string, localCheck: boolean = false) {
|
|
3011
2834
|
const policyholderDoc = this.formStore.signedDocumentList.find(
|
|
3012
|
-
i => i.iin === String(this.formStore.policyholderForm.iin).replaceAll('-', '') && (i.fileTypeCode === '1' || i.fileTypeCode === '2'),
|
|
2835
|
+
i => i.iin === String(this.formStore.policyholderForm.iin).replaceAll('-', '') && (i.fileTypeCode === '1' || i.fileTypeCode === '2' || i.fileTypeCode === '4'),
|
|
3013
2836
|
);
|
|
3014
2837
|
if (taskId === '0') {
|
|
3015
2838
|
this.showToaster('error', this.t('toaster.needToRunStatement'), 2000);
|
|
@@ -3035,9 +2858,6 @@ export const useDataStore = defineStore('data', {
|
|
|
3035
2858
|
}
|
|
3036
2859
|
}
|
|
3037
2860
|
}
|
|
3038
|
-
if (this.formStore.applicationData.slave && this.validateMultipleMembers(this.formStore.insuredFormKey, 'slave', 'застрахованных') === false) {
|
|
3039
|
-
return false;
|
|
3040
|
-
}
|
|
3041
2861
|
if (this.members.beneficiaryApp.has) {
|
|
3042
2862
|
if (this.validateMultipleMembers(this.formStore.beneficiaryFormKey, 'beneficiaryApp', 'выгодоприобретателей') === false) {
|
|
3043
2863
|
return false;
|
|
@@ -3960,7 +3780,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3960
3780
|
}
|
|
3961
3781
|
},
|
|
3962
3782
|
hasJobSection(whichForm: keyof typeof StoreMembers) {
|
|
3963
|
-
if (this.isLifetrip || this.isPension) return false;
|
|
3783
|
+
if (this.isLifetrip || this.isPension || this.isBalam) return false;
|
|
3964
3784
|
switch (whichForm) {
|
|
3965
3785
|
case this.formStore.beneficiaryFormKey:
|
|
3966
3786
|
case this.formStore.beneficialOwnerFormKey:
|
|
@@ -3987,7 +3807,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3987
3807
|
}
|
|
3988
3808
|
},
|
|
3989
3809
|
hasBankSection(whichForm: keyof typeof StoreMembers) {
|
|
3990
|
-
if (!this.isPension
|
|
3810
|
+
if (!this.isPension) return false;
|
|
3991
3811
|
switch (whichForm) {
|
|
3992
3812
|
case 'beneficiaryForm':
|
|
3993
3813
|
return false;
|
|
@@ -3996,7 +3816,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3996
3816
|
}
|
|
3997
3817
|
},
|
|
3998
3818
|
hasAdditionalDocumentsSection(whichForm: keyof typeof StoreMembers) {
|
|
3999
|
-
if (!this.isPension
|
|
3819
|
+
if (!this.isPension) return false;
|
|
4000
3820
|
switch (whichForm) {
|
|
4001
3821
|
case 'beneficiaryForm':
|
|
4002
3822
|
return false;
|
package/store/member.store.ts
CHANGED
|
@@ -62,7 +62,7 @@ export const useMemberStore = defineStore('members', {
|
|
|
62
62
|
}
|
|
63
63
|
return false;
|
|
64
64
|
},
|
|
65
|
-
getMemberFromStore(whichForm: keyof typeof StoreMembers
|
|
65
|
+
getMemberFromStore(whichForm: keyof typeof StoreMembers, whichIndex?: number): Member | null {
|
|
66
66
|
switch (whichForm) {
|
|
67
67
|
case this.formStore.policyholderFormKey:
|
|
68
68
|
return this.formStore.policyholderForm;
|
|
@@ -70,8 +70,6 @@ export const useMemberStore = defineStore('members', {
|
|
|
70
70
|
return this.formStore.policyholdersRepresentativeForm;
|
|
71
71
|
case this.formStore.insuredFormKey:
|
|
72
72
|
return this.formStore.insuredForm[whichIndex!];
|
|
73
|
-
case 'slaveInsuredForm':
|
|
74
|
-
return this.formStore.slaveInsuredForm;
|
|
75
73
|
case this.formStore.beneficiaryFormKey:
|
|
76
74
|
return this.formStore.beneficiaryForm[whichIndex!];
|
|
77
75
|
case this.formStore.beneficialOwnerFormKey:
|
|
@@ -80,11 +78,8 @@ export const useMemberStore = defineStore('members', {
|
|
|
80
78
|
return null;
|
|
81
79
|
}
|
|
82
80
|
},
|
|
83
|
-
getMemberFromApplication(whichForm: keyof typeof StoreMembers
|
|
84
|
-
const id =
|
|
85
|
-
whichForm !== 'policyholderForm' && whichForm !== 'policyholdersRepresentativeForm' && whichForm !== 'slaveInsuredForm'
|
|
86
|
-
? this.formStore[whichForm][whichIndex!]?.id
|
|
87
|
-
: this.formStore[whichForm]?.id;
|
|
81
|
+
getMemberFromApplication(whichForm: keyof typeof StoreMembers, whichIndex?: number) {
|
|
82
|
+
const id = whichForm !== 'policyholderForm' && whichForm !== 'policyholdersRepresentativeForm' ? this.formStore[whichForm][whichIndex!].id : this.formStore[whichForm].id;
|
|
88
83
|
switch (whichForm) {
|
|
89
84
|
case this.formStore.policyholderFormKey:
|
|
90
85
|
return this.formStore.applicationData.clientApp;
|
|
@@ -94,10 +89,6 @@ export const useMemberStore = defineStore('members', {
|
|
|
94
89
|
const inStore = this.formStore.applicationData.insuredApp.find((member: any) => member.insisId === id);
|
|
95
90
|
return !!inStore ? inStore : false;
|
|
96
91
|
}
|
|
97
|
-
case 'slaveInsuredForm': {
|
|
98
|
-
const inStore = this.formStore.applicationData.slave.insuredApp[0];
|
|
99
|
-
return !!inStore ? inStore : false;
|
|
100
|
-
}
|
|
101
92
|
case this.formStore.beneficiaryFormKey: {
|
|
102
93
|
const inStore = this.formStore.applicationData.beneficiaryApp.find((member: any) => member.insisId === id);
|
|
103
94
|
return !!inStore ? inStore : false;
|
|
@@ -108,14 +99,12 @@ export const useMemberStore = defineStore('members', {
|
|
|
108
99
|
}
|
|
109
100
|
}
|
|
110
101
|
},
|
|
111
|
-
getMemberCode(whichForm: keyof typeof StoreMembers
|
|
102
|
+
getMemberCode(whichForm: keyof typeof StoreMembers) {
|
|
112
103
|
switch (whichForm) {
|
|
113
104
|
case this.formStore.policyholderFormKey:
|
|
114
105
|
return MemberCodes.Client;
|
|
115
106
|
case this.formStore.insuredFormKey:
|
|
116
107
|
return MemberCodes.Insured;
|
|
117
|
-
case 'slaveInsuredForm':
|
|
118
|
-
return MemberCodes.Insured;
|
|
119
108
|
case this.formStore.beneficiaryFormKey:
|
|
120
109
|
return MemberCodes.Beneficiary;
|
|
121
110
|
case this.formStore.beneficialOwnerFormKey:
|
package/store/rules.ts
CHANGED
package/types/enum.ts
CHANGED
|
@@ -104,6 +104,7 @@ export enum Roles {
|
|
|
104
104
|
AccountantDirector = 'AccountantDirector',
|
|
105
105
|
ManagerAuletti = 'ManagerAuletti',
|
|
106
106
|
HeadOfDso = 'HeadOfDso',
|
|
107
|
+
URSP = 'URSP',
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
export enum Statuses {
|
|
@@ -127,7 +128,6 @@ export enum Statuses {
|
|
|
127
128
|
ControllerDpForm = 'ControllerDpForm',
|
|
128
129
|
ActuaryForm = 'ActuaryForm',
|
|
129
130
|
DsoUsnsForm = 'DsoUsnsForm',
|
|
130
|
-
JuristForm = 'JuristForm',
|
|
131
131
|
AccountantForm = 'AccountantForm',
|
|
132
132
|
HeadManagerForm = 'HeadManagerForm',
|
|
133
133
|
}
|
package/types/index.ts
CHANGED
|
@@ -30,7 +30,8 @@ export type Projects =
|
|
|
30
30
|
| 'uu'
|
|
31
31
|
| 'auletti'
|
|
32
32
|
| 'lka-auletti'
|
|
33
|
-
| 'prepensionannuity'
|
|
33
|
+
| 'prepensionannuity'
|
|
34
|
+
| 'balam';
|
|
34
35
|
export type MemberKeys = keyof ReturnType<typeof useFormStore>;
|
|
35
36
|
export type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
|
|
36
37
|
export type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
|