hl-core 0.0.9-beta.26 → 0.0.9-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 +7 -0
- package/components/Pages/ProductConditions.vue +42 -5
- package/components/Panel/PanelHandler.vue +6 -1
- package/composables/classes.ts +8 -3
- package/locales/ru.json +9 -5
- package/package.json +1 -1
- package/store/data.store.ts +66 -13
- package/types/index.ts +5 -0
package/api/base.api.ts
CHANGED
|
@@ -766,4 +766,11 @@ export class ApiClass {
|
|
|
766
766
|
data: data,
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
+
|
|
770
|
+
async getProcessGfot(processCode: string | number) {
|
|
771
|
+
return await this.axiosCall<Value[]>({
|
|
772
|
+
method: Methods.GET,
|
|
773
|
+
url: `/Arm/api/Dictionary/ProcessGfot/${processCode}`,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
769
776
|
}
|
|
@@ -266,6 +266,16 @@
|
|
|
266
266
|
append-inner-icon="mdi mdi-chevron-right"
|
|
267
267
|
@append="openPanel($dataStore.t('productConditionsForm.agencyPart'), $dataStore.processTariff, 'processTariff', $dataStore.getProcessTariff)"
|
|
268
268
|
/>
|
|
269
|
+
<base-panel-input
|
|
270
|
+
v-if="hasProcessGfot"
|
|
271
|
+
v-model="productConditionsForm.processGfot"
|
|
272
|
+
:value="productConditionsForm.processGfot?.nameRu"
|
|
273
|
+
:readonly="isDisabledProcessGfot"
|
|
274
|
+
:clearable="!isDisabledProcessGfot"
|
|
275
|
+
:label="$dataStore.t('productConditionsForm.processGfot')"
|
|
276
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
277
|
+
@append="openPanel($dataStore.t('productConditionsForm.processGfot'), $dataStore.processTariff, 'processGfot', $dataStore.getProcessGfot)"
|
|
278
|
+
/>
|
|
269
279
|
</base-form-section>
|
|
270
280
|
<base-form-section v-if="hasAnnuityPayments" :title="$dataStore.t('calculationAnnuityPayments')">
|
|
271
281
|
<base-form-toggle
|
|
@@ -638,8 +648,13 @@ export default defineComponent({
|
|
|
638
648
|
return isDisabled.value;
|
|
639
649
|
});
|
|
640
650
|
const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
641
|
-
const hasCalculated = computed(() => !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth);
|
|
642
651
|
const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
652
|
+
const hasCalculated = computed(() => {
|
|
653
|
+
if (whichProduct.value === 'lifebusiness' && productConditionsForm.requestedSumInsured === null) {
|
|
654
|
+
return !!productConditionsForm.insurancePremiumPerMonth;
|
|
655
|
+
}
|
|
656
|
+
return !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth;
|
|
657
|
+
});
|
|
643
658
|
const hasProcessIndexRate = computed(() => {
|
|
644
659
|
if (whichProduct.value === 'gons' || whichProduct.value === 'halykkazyna' || whichProduct.value === 'liferenta' || whichProduct.value === 'lifebusiness') {
|
|
645
660
|
return false;
|
|
@@ -730,6 +745,12 @@ export default defineComponent({
|
|
|
730
745
|
}
|
|
731
746
|
return false;
|
|
732
747
|
});
|
|
748
|
+
const hasProcessGfot = computed(() => {
|
|
749
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
750
|
+
return true;
|
|
751
|
+
}
|
|
752
|
+
return false;
|
|
753
|
+
});
|
|
733
754
|
const coverPeriodRule = computed(() => {
|
|
734
755
|
const baseCondition = dataStore.rules.required.concat(dataStore.rules.numbers);
|
|
735
756
|
if (whichProduct.value === 'gons') {
|
|
@@ -777,6 +798,9 @@ export default defineComponent({
|
|
|
777
798
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
778
799
|
return false;
|
|
779
800
|
}
|
|
801
|
+
if (whichProduct.value === 'lifebusiness' && productConditionsForm.processGfot.id !== null) {
|
|
802
|
+
return true;
|
|
803
|
+
}
|
|
780
804
|
return isDisabled.value;
|
|
781
805
|
});
|
|
782
806
|
const isDisabledSumDollar = computed(() => {
|
|
@@ -807,6 +831,12 @@ export default defineComponent({
|
|
|
807
831
|
}
|
|
808
832
|
return true;
|
|
809
833
|
});
|
|
834
|
+
const isDisabledProcessGfot = computed(() => {
|
|
835
|
+
if (whichProduct.value === 'lifebusiness' && !!productConditionsForm.requestedSumInsured) {
|
|
836
|
+
return true;
|
|
837
|
+
}
|
|
838
|
+
return isDisabled.value;
|
|
839
|
+
});
|
|
810
840
|
const formatTermValue = (term: number) => {
|
|
811
841
|
if (term !== null) {
|
|
812
842
|
const termNumber = Number(term);
|
|
@@ -887,7 +917,10 @@ export default defineComponent({
|
|
|
887
917
|
additionalTerms.value[currentIndex.value].amount = 0;
|
|
888
918
|
}
|
|
889
919
|
if (termValue.value && termValue.value.coverTypeCode === 6) {
|
|
890
|
-
|
|
920
|
+
const res = await dataStore.getFromApi('DicCoverTypePeriod', 'getArmDicts', 'DicCoverTypePeriod');
|
|
921
|
+
panelList.value = filterList(res, '');
|
|
922
|
+
const coverPeriodName = panelList.value.find(i => i.id === String(termValue.value!.coverPeriodId));
|
|
923
|
+
if (coverPeriodName) coverPeriodValue.value = coverPeriodName.code as string;
|
|
891
924
|
isPanelOpen.value = false;
|
|
892
925
|
isTermsPanelOpen.value = false;
|
|
893
926
|
isFixInsAmountPanelOpen.value = false;
|
|
@@ -895,8 +928,7 @@ export default defineComponent({
|
|
|
895
928
|
dataStore.panelAction = null;
|
|
896
929
|
dataStore.panel.open = true;
|
|
897
930
|
isMultiplePanelOpen.value = false;
|
|
898
|
-
|
|
899
|
-
panelList.value = filterList(res, '');
|
|
931
|
+
dataStore.panel.title = dataStore.t('clients.coveragePeriod');
|
|
900
932
|
}
|
|
901
933
|
}
|
|
902
934
|
};
|
|
@@ -1028,7 +1060,7 @@ export default defineComponent({
|
|
|
1028
1060
|
dataStore.panel.open = true;
|
|
1029
1061
|
dataStore.panel.title = title;
|
|
1030
1062
|
panelList.value = constants.fixInsAmount;
|
|
1031
|
-
fixInsValue.value = amount;
|
|
1063
|
+
fixInsValue.value = String(amount);
|
|
1032
1064
|
} else {
|
|
1033
1065
|
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
1034
1066
|
}
|
|
@@ -1332,6 +1364,9 @@ export default defineComponent({
|
|
|
1332
1364
|
if (!!productConditionsForm.requestedSumInsured) {
|
|
1333
1365
|
whichSum.value = 'requestedSumInsured';
|
|
1334
1366
|
}
|
|
1367
|
+
if (dataStore.isLifeBusiness && !productConditionsForm.requestedSumInsured) {
|
|
1368
|
+
whichSum.value = 'requestedSumInsured';
|
|
1369
|
+
}
|
|
1335
1370
|
if (dataStore.isCalculator) {
|
|
1336
1371
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
1337
1372
|
await dataStore.getProcessPaymentPeriod();
|
|
@@ -1474,6 +1509,7 @@ export default defineComponent({
|
|
|
1474
1509
|
hasCalculated,
|
|
1475
1510
|
hasAnnuityPayments,
|
|
1476
1511
|
hasAgencyPart,
|
|
1512
|
+
hasProcessGfot,
|
|
1477
1513
|
currencySymbolsAddTerm,
|
|
1478
1514
|
amountAnnuityPayments,
|
|
1479
1515
|
requestedSumInsuredLabel,
|
|
@@ -1486,6 +1522,7 @@ export default defineComponent({
|
|
|
1486
1522
|
insurancePremiumPerMonthLabel,
|
|
1487
1523
|
isDisabledCoverPeriod,
|
|
1488
1524
|
hasDefault,
|
|
1525
|
+
isDisabledProcessGfot,
|
|
1489
1526
|
|
|
1490
1527
|
// Rules
|
|
1491
1528
|
coverPeriodRule,
|
|
@@ -318,7 +318,12 @@ export default defineComponent({
|
|
|
318
318
|
|
|
319
319
|
const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
|
|
320
320
|
const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
|
|
321
|
-
const requestedSumInsured = computed(() =>
|
|
321
|
+
const requestedSumInsured = computed(() => {
|
|
322
|
+
if (dataStore.isLifeBusiness && formStore.productConditionsForm.requestedSumInsured === null) {
|
|
323
|
+
dataStore.getNumberWithSpaces(formStore.applicationData.policyAppDto!.mainInsSum);
|
|
324
|
+
}
|
|
325
|
+
return dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured);
|
|
326
|
+
});
|
|
322
327
|
const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
|
|
323
328
|
const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
|
|
324
329
|
const hasConditionsInfo = computed(() => {
|
package/composables/classes.ts
CHANGED
|
@@ -717,6 +717,7 @@ export class ProductConditions {
|
|
|
717
717
|
termsOfInsurance: string | null;
|
|
718
718
|
annualIncome: string | null;
|
|
719
719
|
processIndexRate: Value;
|
|
720
|
+
processGfot: Value;
|
|
720
721
|
requestedSumInsured: number | string | null;
|
|
721
722
|
requestedSumInsuredInDollar: number | string | null;
|
|
722
723
|
insurancePremiumPerMonth: number | string | null;
|
|
@@ -760,6 +761,7 @@ export class ProductConditions {
|
|
|
760
761
|
termsOfInsurance = null,
|
|
761
762
|
annualIncome = null,
|
|
762
763
|
processIndexRate = new Value(),
|
|
764
|
+
processGfot = new Value(),
|
|
763
765
|
requestedSumInsured = null,
|
|
764
766
|
insurancePremiumPerMonth = null,
|
|
765
767
|
establishingGroupDisabilityFromThirdYear = null,
|
|
@@ -806,6 +808,7 @@ export class ProductConditions {
|
|
|
806
808
|
this.termsOfInsurance = termsOfInsurance;
|
|
807
809
|
this.annualIncome = annualIncome;
|
|
808
810
|
this.processIndexRate = processIndexRate;
|
|
811
|
+
this.processGfot = processGfot;
|
|
809
812
|
this.requestedSumInsured = requestedSumInsured;
|
|
810
813
|
this.insurancePremiumPerMonth = insurancePremiumPerMonth;
|
|
811
814
|
this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
|
|
@@ -979,6 +982,7 @@ export class DataStoreClass {
|
|
|
979
982
|
accessToken: string | null = null;
|
|
980
983
|
refreshToken: string | null = null;
|
|
981
984
|
processIndexRate: Value[];
|
|
985
|
+
processGfot: Value[];
|
|
982
986
|
processPaymentPeriod: Value[];
|
|
983
987
|
dicAnnuityTypeList: Value[];
|
|
984
988
|
processAnnuityPaymentPeriod: Value[];
|
|
@@ -1064,6 +1068,7 @@ export class DataStoreClass {
|
|
|
1064
1068
|
this.iframeLoading = false;
|
|
1065
1069
|
this.hasLayoutMargins = true;
|
|
1066
1070
|
this.processIndexRate = [];
|
|
1071
|
+
this.processGfot = [];
|
|
1067
1072
|
this.processPaymentPeriod = [];
|
|
1068
1073
|
this.dicAnnuityTypeList = [];
|
|
1069
1074
|
this.processAnnuityPaymentPeriod = [];
|
|
@@ -1423,7 +1428,7 @@ export class MemberV2 {
|
|
|
1423
1428
|
taxResidentCountry: Value;
|
|
1424
1429
|
showTaxResidentCountry: string | null;
|
|
1425
1430
|
};
|
|
1426
|
-
identityCard
|
|
1431
|
+
identityCard?: {
|
|
1427
1432
|
documentType: Value;
|
|
1428
1433
|
documentNumber: string | null;
|
|
1429
1434
|
series: string | null;
|
|
@@ -1452,12 +1457,12 @@ export class MemberV2 {
|
|
|
1452
1457
|
typeOfEconomicActivity: string | null;
|
|
1453
1458
|
};
|
|
1454
1459
|
jurAddressIsActualAddress: boolean;
|
|
1455
|
-
quests
|
|
1460
|
+
quests?: {
|
|
1456
1461
|
order: number;
|
|
1457
1462
|
text: string | null;
|
|
1458
1463
|
answer: boolean | null;
|
|
1459
1464
|
}[];
|
|
1460
|
-
isLeader
|
|
1465
|
+
isLeader?: boolean;
|
|
1461
1466
|
// insuredPolicyData: {
|
|
1462
1467
|
// insSum: 0;
|
|
1463
1468
|
// insSumWithLoad: 0;
|
package/locales/ru.json
CHANGED
|
@@ -357,7 +357,8 @@
|
|
|
357
357
|
"coverPeriodMonth": "Срок страхования (в месяцах)",
|
|
358
358
|
"totalRequestedSumInsured": "Общая страховая сумма",
|
|
359
359
|
"totalInsurancePremiumAmount": "Общая страховая премия",
|
|
360
|
-
"agencyPart": "Агентская переменная часть, %"
|
|
360
|
+
"agencyPart": "Агентская переменная часть, %",
|
|
361
|
+
"processGfot": "Кратность страховой суммы к ГФОТ-у"
|
|
361
362
|
},
|
|
362
363
|
"calculatorForm": {
|
|
363
364
|
"selectedCountries": "Выбранные страны",
|
|
@@ -445,7 +446,9 @@
|
|
|
445
446
|
"system": "Система",
|
|
446
447
|
"modifiedDate": "Дата редактирования",
|
|
447
448
|
"createdDate": "Дата добавления",
|
|
448
|
-
"isActive": "Активен"
|
|
449
|
+
"isActive": "Активен",
|
|
450
|
+
"countryName": "Место жительства",
|
|
451
|
+
"countryResidence": "Налоговое резидентство"
|
|
449
452
|
},
|
|
450
453
|
"agent": {
|
|
451
454
|
"currency": "Валюта",
|
|
@@ -834,6 +837,7 @@
|
|
|
834
837
|
"infoBeneficialOwner": "Сведения о Бенефициарном собственнике",
|
|
835
838
|
"dataBeneficialOwner": "Данные Бенефициарного собственника",
|
|
836
839
|
"documentsBeneficialOwner": "Документы Бенефициарного собственника",
|
|
840
|
+
"coveragePeriod": "Период покрытия",
|
|
837
841
|
"form": {
|
|
838
842
|
"nameOrganization": "Наименование организации",
|
|
839
843
|
"listSpecies": "Перечень видов",
|
|
@@ -871,9 +875,9 @@
|
|
|
871
875
|
"iin": "ИИН (при наличии)",
|
|
872
876
|
"isPublicForeignOfficial": "Отметка о принадлежности и/или причастности к публичному иностранному должностному лицу, его супруге (супругу) и близким родственникам?",
|
|
873
877
|
"series": "Серия",
|
|
874
|
-
"count":"Количество случаев",
|
|
875
|
-
"amount":"Сумма выплаты",
|
|
876
|
-
"shortDescription":"Краткое описание",
|
|
878
|
+
"count": "Количество случаев",
|
|
879
|
+
"amount": "Сумма выплаты",
|
|
880
|
+
"shortDescription": "Краткое описание",
|
|
877
881
|
"questionnaireInsured": "Анкета Застрахованного",
|
|
878
882
|
"recalculationSection": "Раздел переменных для перерасчета"
|
|
879
883
|
}
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -1022,6 +1022,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1022
1022
|
conditionsData.policyAppDto.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1023
1023
|
conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1024
1024
|
conditionsData.policyAppDto.tariffId = String(this.formStore.productConditionsForm.processTariff.id);
|
|
1025
|
+
conditionsData.policyAppDto.processDefinitionFgotId = (this.formStore.productConditionsForm.processGfot.id as string) ?? undefined;
|
|
1025
1026
|
}
|
|
1026
1027
|
return conditionsData;
|
|
1027
1028
|
},
|
|
@@ -1323,6 +1324,11 @@ export const useDataStore = defineStore('data', {
|
|
|
1323
1324
|
async getInsurancePay() {
|
|
1324
1325
|
return await this.getFromApi('insurancePay', 'getInsurancePay');
|
|
1325
1326
|
},
|
|
1327
|
+
async getProcessGfot() {
|
|
1328
|
+
if (this.processCode) {
|
|
1329
|
+
return await this.getFromApi('processGfot', 'getProcessGfot', this.processCode);
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1326
1332
|
async getCurrencies() {
|
|
1327
1333
|
try {
|
|
1328
1334
|
const currencies = await this.api.getCurrencies();
|
|
@@ -1368,6 +1374,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1368
1374
|
this.getDicSportsType(),
|
|
1369
1375
|
this.getDicTripPurpose(),
|
|
1370
1376
|
this.getCurrencies(),
|
|
1377
|
+
this.getProcessGfot(),
|
|
1371
1378
|
]);
|
|
1372
1379
|
},
|
|
1373
1380
|
async getQuestionList(
|
|
@@ -1412,7 +1419,14 @@ export const useDataStore = defineStore('data', {
|
|
|
1412
1419
|
return parts.join(',');
|
|
1413
1420
|
},
|
|
1414
1421
|
getNumberWithDot(n: any) {
|
|
1415
|
-
return n === null
|
|
1422
|
+
return n === null
|
|
1423
|
+
? null
|
|
1424
|
+
: n
|
|
1425
|
+
.toLocaleString('ru', {
|
|
1426
|
+
maximumFractionDigits: 2,
|
|
1427
|
+
minimumFractionDigits: 2,
|
|
1428
|
+
})
|
|
1429
|
+
.replace(/,/g, '.');
|
|
1416
1430
|
},
|
|
1417
1431
|
async getTaskList(
|
|
1418
1432
|
search: string = '',
|
|
@@ -1452,7 +1466,14 @@ export const useDataStore = defineStore('data', {
|
|
|
1452
1466
|
delete query.processCodes;
|
|
1453
1467
|
query.processCode = byOneProcess;
|
|
1454
1468
|
}
|
|
1455
|
-
const taskList = await this.api.getTaskList(
|
|
1469
|
+
const taskList = await this.api.getTaskList(
|
|
1470
|
+
processInstanceId === null
|
|
1471
|
+
? query
|
|
1472
|
+
: {
|
|
1473
|
+
...query,
|
|
1474
|
+
processInstanceId: processInstanceId,
|
|
1475
|
+
},
|
|
1476
|
+
);
|
|
1456
1477
|
if (needToReturn) {
|
|
1457
1478
|
this.isLoading = false;
|
|
1458
1479
|
return taskList.items;
|
|
@@ -1680,6 +1701,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1680
1701
|
calculationData.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1681
1702
|
calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1682
1703
|
calculationData.agentCommission = this.formStore.productConditionsForm.processTariff.id;
|
|
1704
|
+
calculationData.processDefinitionFgotId = this.formStore.productConditionsForm.processGfot.id;
|
|
1683
1705
|
}
|
|
1684
1706
|
const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
|
|
1685
1707
|
if (calculationResponse.amount) this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.amount);
|
|
@@ -1703,6 +1725,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1703
1725
|
}
|
|
1704
1726
|
if (this.isLifeBusiness || product === 'lifebusiness') {
|
|
1705
1727
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremium);
|
|
1728
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.fixInsSum === 0 ? null : calculationResponse.fixInsSum);
|
|
1706
1729
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1707
1730
|
if (calculationResponse.clients) {
|
|
1708
1731
|
this.formStore.lfb.clients = calculationResponse.clients;
|
|
@@ -2178,7 +2201,10 @@ export const useDataStore = defineStore('data', {
|
|
|
2178
2201
|
}
|
|
2179
2202
|
case constants.actions.affiliate: {
|
|
2180
2203
|
try {
|
|
2181
|
-
const sended = await this.sendUnderwritingCouncilTask({
|
|
2204
|
+
const sended = await this.sendUnderwritingCouncilTask({
|
|
2205
|
+
taskId: taskId,
|
|
2206
|
+
decision: constants.actions.accept,
|
|
2207
|
+
});
|
|
2182
2208
|
if (!sended) return;
|
|
2183
2209
|
this.formStore.$reset();
|
|
2184
2210
|
if (this.isEFO || this.isAML) {
|
|
@@ -2269,11 +2295,25 @@ export const useDataStore = defineStore('data', {
|
|
|
2269
2295
|
const prepareSignDocuments = (): SignDataType[] => {
|
|
2270
2296
|
switch (this.formStore.applicationData.statusCode) {
|
|
2271
2297
|
case 'ContractSignedFrom':
|
|
2272
|
-
return [
|
|
2298
|
+
return [
|
|
2299
|
+
{
|
|
2300
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2301
|
+
name: 'Contract',
|
|
2302
|
+
format: 'pdf',
|
|
2303
|
+
},
|
|
2304
|
+
];
|
|
2273
2305
|
default:
|
|
2274
2306
|
return [
|
|
2275
|
-
{
|
|
2276
|
-
|
|
2307
|
+
{
|
|
2308
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2309
|
+
name: 'Agreement',
|
|
2310
|
+
format: 'pdf',
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2314
|
+
name: 'Statement',
|
|
2315
|
+
format: 'pdf',
|
|
2316
|
+
},
|
|
2277
2317
|
];
|
|
2278
2318
|
}
|
|
2279
2319
|
};
|
|
@@ -2705,7 +2745,10 @@ export const useDataStore = defineStore('data', {
|
|
|
2705
2745
|
async getFamilyInfo(iin: string, phoneNumber: string) {
|
|
2706
2746
|
this.isLoading = true;
|
|
2707
2747
|
try {
|
|
2708
|
-
const familyResponse = await this.api.getFamilyInfo({
|
|
2748
|
+
const familyResponse = await this.api.getFamilyInfo({
|
|
2749
|
+
iin: iin.replace(/-/g, ''),
|
|
2750
|
+
phoneNumber: formatPhone(phoneNumber),
|
|
2751
|
+
});
|
|
2709
2752
|
if (familyResponse.status === 'soap:Server') {
|
|
2710
2753
|
this.showToaster('error', `${familyResponse.statusName}. Отправьте запрос через некоторое время`, 5000);
|
|
2711
2754
|
this.isLoading = false;
|
|
@@ -3024,7 +3067,6 @@ export const useDataStore = defineStore('data', {
|
|
|
3024
3067
|
this.formStore.lfb.policyholder = clientData;
|
|
3025
3068
|
this.formStore.lfb.clientId = clientId;
|
|
3026
3069
|
this.formStore.lfb.policyholder.clientPower.date = reformatDate(clientData.clientPower.date);
|
|
3027
|
-
this.formStore.lfb.accidentIncidents = accidentIncidents;
|
|
3028
3070
|
|
|
3029
3071
|
if (clientData && clientData.activityTypes !== null) {
|
|
3030
3072
|
this.formStore.lfb.policyholderActivities = clientData.activityTypes;
|
|
@@ -3032,6 +3074,9 @@ export const useDataStore = defineStore('data', {
|
|
|
3032
3074
|
|
|
3033
3075
|
if (beneficialOwnerApp && beneficialOwnerApp.length) {
|
|
3034
3076
|
this.formStore.lfb.beneficialOwners = beneficialOwnerApp;
|
|
3077
|
+
this.formStore.lfb.beneficialOwners.forEach(beneficial => {
|
|
3078
|
+
beneficial.beneficialOwnerData.identityCard!.validity = reformatDate(beneficial.beneficialOwnerData.identityCard!.validity as string);
|
|
3079
|
+
});
|
|
3035
3080
|
}
|
|
3036
3081
|
|
|
3037
3082
|
if (insuredApp && insuredApp.length) {
|
|
@@ -3039,10 +3084,16 @@ export const useDataStore = defineStore('data', {
|
|
|
3039
3084
|
this.formStore.lfb.clients = res;
|
|
3040
3085
|
}
|
|
3041
3086
|
|
|
3087
|
+
if (accidentIncidents && accidentIncidents.length) {
|
|
3088
|
+
this.formStore.lfb.accidentIncidents = accidentIncidents;
|
|
3089
|
+
this.formStore.lfb.accidentIncidents.forEach(incident => {
|
|
3090
|
+
incident.amount = incident.amount === 0 ? null : incident.amount;
|
|
3091
|
+
incident.count = incident.count === 0 ? null : incident.count;
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3042
3095
|
this.formStore.productConditionsForm.coverPeriod = 12;
|
|
3043
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(
|
|
3044
|
-
applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount,
|
|
3045
|
-
);
|
|
3096
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
|
|
3046
3097
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
|
|
3047
3098
|
applicationData.policyAppDto.mainPremium === 0 ? null : applicationData.policyAppDto.mainPremium,
|
|
3048
3099
|
);
|
|
@@ -3050,6 +3101,8 @@ export const useDataStore = defineStore('data', {
|
|
|
3050
3101
|
this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
|
|
3051
3102
|
const processTariff = this.processTariff.find(item => item.id == applicationData.policyAppDto.tariffId);
|
|
3052
3103
|
this.formStore.productConditionsForm.processTariff = processTariff ? processTariff : new Value();
|
|
3104
|
+
const processGfot = this.processGfot.find(item => item.id == applicationData.policyAppDto.processDefinitionFgotId);
|
|
3105
|
+
this.formStore.productConditionsForm.processGfot = processGfot ? processGfot : new Value();
|
|
3053
3106
|
} catch (err) {
|
|
3054
3107
|
ErrorHandler(err);
|
|
3055
3108
|
if (err instanceof AxiosError) {
|
|
@@ -3147,7 +3200,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3147
3200
|
this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
|
|
3148
3201
|
return false;
|
|
3149
3202
|
} else {
|
|
3150
|
-
|
|
3203
|
+
// @ts-ignore
|
|
3151
3204
|
if (this.formStore.lfb[localKey][0].iin !== null) {
|
|
3152
3205
|
this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
|
|
3153
3206
|
return false;
|
|
@@ -3197,7 +3250,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3197
3250
|
}
|
|
3198
3251
|
}
|
|
3199
3252
|
|
|
3200
|
-
if (
|
|
3253
|
+
if (this.formStore.productConditionsForm.insurancePremiumPerMonth === null) {
|
|
3201
3254
|
this.showToaster('error', this.t('toaster.emptyProductConditions'), 3000);
|
|
3202
3255
|
return false;
|
|
3203
3256
|
}
|
package/types/index.ts
CHANGED
|
@@ -265,6 +265,7 @@ declare global {
|
|
|
265
265
|
tariffId?: string | number | null;
|
|
266
266
|
clients?: ClientV2[];
|
|
267
267
|
agentCommission?: any;
|
|
268
|
+
processDefinitionFgotId?: any;
|
|
268
269
|
};
|
|
269
270
|
|
|
270
271
|
interface ClientV2 {
|
|
@@ -300,6 +301,7 @@ declare global {
|
|
|
300
301
|
annuityMonthPay: string | number | null;
|
|
301
302
|
mainPremium?: number;
|
|
302
303
|
clients?: ClientV2[];
|
|
304
|
+
fixInsSum?: number | null;
|
|
303
305
|
};
|
|
304
306
|
|
|
305
307
|
interface AddCover {
|
|
@@ -561,6 +563,9 @@ declare global {
|
|
|
561
563
|
insTermInMonth?: number | null;
|
|
562
564
|
fixInsSum?: number | string | null;
|
|
563
565
|
tariffId?: string | null;
|
|
566
|
+
mainPremium?: number | string | null;
|
|
567
|
+
processDefinitionFgotId?: string | number;
|
|
568
|
+
mainInsSum?: number;
|
|
564
569
|
};
|
|
565
570
|
|
|
566
571
|
type InsisWorkDataApp = {
|