hl-core 0.0.9-beta.40 → 0.0.9-beta.42
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 +1 -1
- package/components/Input/Datepicker.vue +38 -0
- package/components/Input/FileInput.vue +9 -1
- package/components/Input/Monthpicker.vue +1 -0
- package/components/Input/TextInput.vue +2 -3
- package/components/Layout/SettingsPanel.vue +1 -1
- package/components/Pages/ProductConditions.vue +107 -118
- package/components/Panel/PanelHandler.vue +6 -43
- package/composables/classes.ts +159 -157
- package/locales/ru.json +8 -2
- package/package.json +1 -1
- package/store/data.store.ts +33 -17
- package/store/rules.ts +1 -0
- package/types/enum.ts +0 -3
- package/types/index.ts +29 -4
package/composables/classes.ts
CHANGED
|
@@ -754,6 +754,7 @@ export class ProductConditions {
|
|
|
754
754
|
statePremium5: number | string | null;
|
|
755
755
|
statePremium7: number | string | null;
|
|
756
756
|
calculatorForm: CalculatorForm;
|
|
757
|
+
agentCommission: number | null;
|
|
757
758
|
constructor(
|
|
758
759
|
insuranceCase = null,
|
|
759
760
|
coverPeriod = null,
|
|
@@ -796,6 +797,7 @@ export class ProductConditions {
|
|
|
796
797
|
statePremium5 = null,
|
|
797
798
|
statePremium7 = null,
|
|
798
799
|
calculatorForm = new CalculatorForm(),
|
|
800
|
+
agentCommission = null,
|
|
799
801
|
) {
|
|
800
802
|
this.requestedSumInsuredInDollar = null;
|
|
801
803
|
this.insurancePremiumPerMonthInDollar = null;
|
|
@@ -843,6 +845,7 @@ export class ProductConditions {
|
|
|
843
845
|
this.statePremium5 = statePremium5;
|
|
844
846
|
this.statePremium7 = statePremium7;
|
|
845
847
|
this.calculatorForm = calculatorForm;
|
|
848
|
+
this.agentCommission = agentCommission;
|
|
846
849
|
}
|
|
847
850
|
getSingleTripDays() {
|
|
848
851
|
if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
|
|
@@ -1238,13 +1241,7 @@ export class FormStoreClass {
|
|
|
1238
1241
|
signedContractFormData: any;
|
|
1239
1242
|
lfb: {
|
|
1240
1243
|
clients: ClientV2[];
|
|
1241
|
-
policyholder:
|
|
1242
|
-
isIpdl: boolean;
|
|
1243
|
-
clientData: {
|
|
1244
|
-
company: MemberV2;
|
|
1245
|
-
authoritedPerson: MemberV2;
|
|
1246
|
-
};
|
|
1247
|
-
};
|
|
1244
|
+
policyholder: PolicyholderClass;
|
|
1248
1245
|
hasAccidentIncidents: boolean;
|
|
1249
1246
|
accidentIncidents: AccidentIncidents[];
|
|
1250
1247
|
policyholderActivities: PolicyholderActivity[];
|
|
@@ -1352,13 +1349,7 @@ export class FormStoreClass {
|
|
|
1352
1349
|
this.signedContractFormData = null;
|
|
1353
1350
|
this.lfb = {
|
|
1354
1351
|
clients: [],
|
|
1355
|
-
policyholder:
|
|
1356
|
-
isIpdl: false,
|
|
1357
|
-
clientData: {
|
|
1358
|
-
company: new MemberV2(),
|
|
1359
|
-
authoritedPerson: new MemberV2(),
|
|
1360
|
-
},
|
|
1361
|
-
},
|
|
1352
|
+
policyholder: new PolicyholderClass(),
|
|
1362
1353
|
hasAccidentIncidents: true,
|
|
1363
1354
|
policyholderActivities: [new PolicyholderActivity()],
|
|
1364
1355
|
beneficialOwners: [new BeneficialOwner()],
|
|
@@ -1453,111 +1444,144 @@ export class FormStoreClass {
|
|
|
1453
1444
|
}
|
|
1454
1445
|
}
|
|
1455
1446
|
|
|
1456
|
-
export class
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1447
|
+
export class Address {
|
|
1448
|
+
country: Value;
|
|
1449
|
+
region: Value;
|
|
1450
|
+
regionType: Value;
|
|
1451
|
+
city: Value;
|
|
1452
|
+
square: string | null;
|
|
1453
|
+
microdistrict: string | null;
|
|
1454
|
+
street: string | null;
|
|
1455
|
+
houseNumber: string | null;
|
|
1456
|
+
kato: string | null;
|
|
1457
|
+
longName: string | null;
|
|
1458
|
+
longNameKz: string | null;
|
|
1459
|
+
constructor() {
|
|
1460
|
+
this.country = new Value();
|
|
1461
|
+
this.region = new Value();
|
|
1462
|
+
this.regionType = new Value();
|
|
1463
|
+
this.city = new Value();
|
|
1464
|
+
this.square = null;
|
|
1465
|
+
this.microdistrict = null;
|
|
1466
|
+
this.street = null;
|
|
1467
|
+
this.houseNumber = null;
|
|
1468
|
+
this.kato = null;
|
|
1469
|
+
this.longName = null;
|
|
1470
|
+
this.longNameKz = null;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
export class PolicyholderActivity {
|
|
1475
|
+
activityTypeName: string | null;
|
|
1476
|
+
empoloyeeCount: string | null;
|
|
1477
|
+
constructor() {
|
|
1478
|
+
this.activityTypeName = null;
|
|
1479
|
+
this.empoloyeeCount = null;
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
export class BaseGroupClass {
|
|
1484
|
+
id: string | number;
|
|
1485
|
+
longName: string;
|
|
1486
|
+
iin: string;
|
|
1487
|
+
phoneNumber: string;
|
|
1488
|
+
age: string;
|
|
1489
|
+
name: string;
|
|
1490
|
+
nameKz: string;
|
|
1491
|
+
longNameKz: string;
|
|
1466
1492
|
citizenship: Value;
|
|
1467
|
-
email: string
|
|
1493
|
+
email: string;
|
|
1468
1494
|
resident: Value;
|
|
1469
1495
|
taxResidentCountry: Value;
|
|
1496
|
+
addTaxResidency: Value;
|
|
1470
1497
|
economySectorCode: Value;
|
|
1498
|
+
hasAttachedFile: boolean;
|
|
1499
|
+
actualAddress: Address;
|
|
1471
1500
|
isActualAddressEqualLegalAddres: boolean;
|
|
1472
|
-
|
|
1501
|
+
legalAddress: Address;
|
|
1502
|
+
identityDocument: {
|
|
1473
1503
|
documentType: Value;
|
|
1474
|
-
documentNumber: string
|
|
1475
|
-
series: string
|
|
1504
|
+
documentNumber: string;
|
|
1505
|
+
series: string;
|
|
1476
1506
|
issuedBy: Value;
|
|
1477
1507
|
validUntil: string | null;
|
|
1478
1508
|
};
|
|
1479
|
-
bankInfo:
|
|
1480
|
-
|
|
1481
|
-
bankName: Value;
|
|
1482
|
-
iik: string | null;
|
|
1483
|
-
bik: string | null;
|
|
1484
|
-
kbe: string | null;
|
|
1485
|
-
};
|
|
1486
|
-
workDetails?: {
|
|
1487
|
-
workplace: string | null;
|
|
1488
|
-
position: string | null;
|
|
1489
|
-
jobDuties: string | null;
|
|
1490
|
-
};
|
|
1491
|
-
authorityDetails: {
|
|
1492
|
-
basis: string | null;
|
|
1493
|
-
documentNumber: string | null;
|
|
1494
|
-
date: string | null;
|
|
1495
|
-
};
|
|
1496
|
-
kbe: string | null;
|
|
1497
|
-
typeOfEconomicActivity: Value;
|
|
1498
|
-
legalAddress: Address;
|
|
1499
|
-
actualAddress: Address;
|
|
1500
|
-
activityTypes: {
|
|
1501
|
-
activityTypeName: string | null;
|
|
1502
|
-
empoloyeeCount: number | null;
|
|
1503
|
-
}[];
|
|
1504
|
-
isLeader?: boolean;
|
|
1505
|
-
beneficalOwnerQuest?: {
|
|
1506
|
-
order: number;
|
|
1507
|
-
text: string | null;
|
|
1508
|
-
answer: boolean | null;
|
|
1509
|
-
}[];
|
|
1509
|
+
bankInfo: BankInfoClass;
|
|
1510
|
+
kbe: string;
|
|
1510
1511
|
constructor() {
|
|
1511
|
-
this.
|
|
1512
|
-
this.
|
|
1513
|
-
this.
|
|
1514
|
-
this.
|
|
1515
|
-
this.
|
|
1516
|
-
this.name =
|
|
1517
|
-
this.
|
|
1518
|
-
this.
|
|
1519
|
-
this.longNameKz = null;
|
|
1512
|
+
this.id = 0;
|
|
1513
|
+
this.longName = '';
|
|
1514
|
+
this.iin = '';
|
|
1515
|
+
this.phoneNumber = '';
|
|
1516
|
+
this.age = '';
|
|
1517
|
+
this.name = '';
|
|
1518
|
+
this.nameKz = '';
|
|
1519
|
+
this.longNameKz = '';
|
|
1520
1520
|
this.citizenship = new Value();
|
|
1521
|
-
this.email =
|
|
1521
|
+
this.email = '';
|
|
1522
1522
|
this.resident = new Value();
|
|
1523
1523
|
this.taxResidentCountry = new Value();
|
|
1524
|
+
this.addTaxResidency = new Value();
|
|
1524
1525
|
this.economySectorCode = new Value();
|
|
1526
|
+
this.hasAttachedFile = false;
|
|
1527
|
+
this.actualAddress = new Address();
|
|
1525
1528
|
this.isActualAddressEqualLegalAddres = true;
|
|
1529
|
+
this.legalAddress = new Address();
|
|
1526
1530
|
this.identityDocument = {
|
|
1527
1531
|
documentType: new Value(),
|
|
1528
|
-
documentNumber:
|
|
1529
|
-
series:
|
|
1532
|
+
documentNumber: '',
|
|
1533
|
+
series: '',
|
|
1530
1534
|
issuedBy: new Value(),
|
|
1531
|
-
validUntil:
|
|
1532
|
-
};
|
|
1533
|
-
this.bankInfo = {
|
|
1534
|
-
bin: null,
|
|
1535
|
-
bankName: new Value(),
|
|
1536
|
-
iik: null,
|
|
1537
|
-
bik: null,
|
|
1538
|
-
kbe: null,
|
|
1539
|
-
};
|
|
1540
|
-
this.workDetails = {
|
|
1541
|
-
workplace: null,
|
|
1542
|
-
position: null,
|
|
1543
|
-
jobDuties: null,
|
|
1535
|
+
validUntil: '',
|
|
1544
1536
|
};
|
|
1537
|
+
this.bankInfo = new BankInfoClass();
|
|
1538
|
+
this.kbe = '';
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
export class PhysGroupClass extends BaseGroupClass {
|
|
1543
|
+
lastName: string;
|
|
1544
|
+
firstName: string;
|
|
1545
|
+
middleName: string;
|
|
1546
|
+
birthDate: string | null;
|
|
1547
|
+
placeOfBirth: Value;
|
|
1548
|
+
workDetails: { workplace: string; position: string; jobDuties: string };
|
|
1549
|
+
hasContactPerson: boolean;
|
|
1550
|
+
constructor() {
|
|
1551
|
+
super();
|
|
1552
|
+
this.lastName = '';
|
|
1553
|
+
this.firstName = '';
|
|
1554
|
+
this.middleName = '';
|
|
1555
|
+
this.birthDate = '';
|
|
1556
|
+
this.placeOfBirth = new Value();
|
|
1557
|
+
this.workDetails = { workplace: '', position: '', jobDuties: '' };
|
|
1558
|
+
this.hasContactPerson = false;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export class GroupMember extends PhysGroupClass {
|
|
1563
|
+
isLeader: boolean;
|
|
1564
|
+
authorityDetails: {
|
|
1565
|
+
basis: Value;
|
|
1566
|
+
documentNumber: string | null;
|
|
1567
|
+
date: string | null;
|
|
1568
|
+
};
|
|
1569
|
+
typeOfEconomicActivity: Value;
|
|
1570
|
+
activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
|
|
1571
|
+
beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
|
|
1572
|
+
authoritedPerson: PhysGroupClass;
|
|
1573
|
+
insuredPolicyData: InsuredPolicyType;
|
|
1574
|
+
constructor() {
|
|
1575
|
+
super();
|
|
1576
|
+
// Client
|
|
1577
|
+
this.isLeader = false;
|
|
1545
1578
|
this.authorityDetails = {
|
|
1546
|
-
basis:
|
|
1579
|
+
basis: new Value(),
|
|
1547
1580
|
documentNumber: null,
|
|
1548
1581
|
date: null,
|
|
1549
1582
|
};
|
|
1550
|
-
this.kbe = null;
|
|
1551
1583
|
this.typeOfEconomicActivity = new Value();
|
|
1552
|
-
this.
|
|
1553
|
-
this.actualAddress = new Address();
|
|
1554
|
-
this.activityTypes = [
|
|
1555
|
-
{
|
|
1556
|
-
activityTypeName: null,
|
|
1557
|
-
empoloyeeCount: null,
|
|
1558
|
-
},
|
|
1559
|
-
];
|
|
1560
|
-
this.isLeader = false;
|
|
1584
|
+
this.activityTypes = [];
|
|
1561
1585
|
this.beneficalOwnerQuest = [
|
|
1562
1586
|
{
|
|
1563
1587
|
order: 0,
|
|
@@ -1575,82 +1599,60 @@ export class MemberV2 {
|
|
|
1575
1599
|
answer: null,
|
|
1576
1600
|
},
|
|
1577
1601
|
];
|
|
1602
|
+
this.authoritedPerson = new PhysGroupClass();
|
|
1603
|
+
// Insured
|
|
1604
|
+
this.insuredPolicyData = {
|
|
1605
|
+
insSum: 0,
|
|
1606
|
+
insSumWithLoad: 0,
|
|
1607
|
+
premium: 0,
|
|
1608
|
+
premiumWithLoad: 0,
|
|
1609
|
+
insuredRisk: {
|
|
1610
|
+
lifeMultiply: 0,
|
|
1611
|
+
lifeAdditive: 0,
|
|
1612
|
+
disabilityMultiply: 0,
|
|
1613
|
+
disabilityAdditive: 0,
|
|
1614
|
+
traumaTableMultiple: 0,
|
|
1615
|
+
accidentalLifeMultiply: 0,
|
|
1616
|
+
accidentalLifeAdditive: 0,
|
|
1617
|
+
criticalMultiply: 0,
|
|
1618
|
+
criticalAdditive: 0,
|
|
1619
|
+
},
|
|
1620
|
+
insuredCoverData: [],
|
|
1621
|
+
};
|
|
1578
1622
|
}
|
|
1579
1623
|
}
|
|
1580
1624
|
|
|
1581
|
-
export class
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
microdistrict: string | null;
|
|
1588
|
-
street: string | null;
|
|
1589
|
-
houseNumber: string | null;
|
|
1590
|
-
kato: string | null;
|
|
1625
|
+
export class BankInfoClass {
|
|
1626
|
+
bankName: Value;
|
|
1627
|
+
bin: string;
|
|
1628
|
+
iik: string;
|
|
1629
|
+
bik: string;
|
|
1630
|
+
kbe: string;
|
|
1591
1631
|
constructor() {
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
this.microdistrict = null;
|
|
1598
|
-
this.street = null;
|
|
1599
|
-
this.houseNumber = null;
|
|
1600
|
-
this.kato = null;
|
|
1632
|
+
this.bankName = new Value();
|
|
1633
|
+
this.bin = '';
|
|
1634
|
+
this.iik = '';
|
|
1635
|
+
this.bik = '';
|
|
1636
|
+
this.kbe = '';
|
|
1601
1637
|
}
|
|
1602
1638
|
}
|
|
1603
1639
|
|
|
1604
|
-
export class
|
|
1605
|
-
|
|
1606
|
-
|
|
1640
|
+
export class PolicyholderClass {
|
|
1641
|
+
isIpdl: boolean;
|
|
1642
|
+
clientData: GroupMember;
|
|
1607
1643
|
constructor() {
|
|
1608
|
-
this.
|
|
1609
|
-
this.
|
|
1644
|
+
this.isIpdl = false;
|
|
1645
|
+
this.clientData = new GroupMember();
|
|
1610
1646
|
}
|
|
1611
1647
|
}
|
|
1612
1648
|
|
|
1613
1649
|
export class BeneficialOwner {
|
|
1614
|
-
id: string
|
|
1615
|
-
processInstanceId: string | number;
|
|
1616
|
-
insisId: number;
|
|
1617
|
-
iin: string | null;
|
|
1618
|
-
longName: string | null;
|
|
1650
|
+
id: string;
|
|
1619
1651
|
isIpdl: boolean;
|
|
1620
|
-
|
|
1621
|
-
isIpdlCompliance: boolean;
|
|
1622
|
-
isTerrorCompliance: boolean;
|
|
1623
|
-
personType: number;
|
|
1624
|
-
lastName: string | null;
|
|
1625
|
-
firstName: string | null;
|
|
1626
|
-
middleName: string | null;
|
|
1627
|
-
countryId: string | null;
|
|
1628
|
-
countryName: string | null;
|
|
1629
|
-
residentId: string | null;
|
|
1630
|
-
residentName: string | null;
|
|
1631
|
-
taxResidentId: string | null;
|
|
1632
|
-
taxResidentName: string | null;
|
|
1633
|
-
beneficialOwnerData: MemberV2;
|
|
1652
|
+
beneficialOwnerData: GroupMember;
|
|
1634
1653
|
constructor() {
|
|
1635
|
-
this.id = null;
|
|
1636
|
-
this.processInstanceId = 0;
|
|
1637
|
-
this.insisId = 0;
|
|
1638
|
-
this.iin = null;
|
|
1639
|
-
this.longName = null;
|
|
1640
1654
|
this.isIpdl = false;
|
|
1641
|
-
this.
|
|
1642
|
-
this.
|
|
1643
|
-
this.isTerrorCompliance = true;
|
|
1644
|
-
this.personType = 0;
|
|
1645
|
-
this.lastName = null;
|
|
1646
|
-
this.firstName = null;
|
|
1647
|
-
this.middleName = null;
|
|
1648
|
-
this.countryId = null;
|
|
1649
|
-
this.countryName = null;
|
|
1650
|
-
this.residentId = null;
|
|
1651
|
-
this.residentName = null;
|
|
1652
|
-
this.taxResidentId = null;
|
|
1653
|
-
this.taxResidentName = null;
|
|
1654
|
-
this.beneficialOwnerData = new MemberV2();
|
|
1655
|
+
this.beneficialOwnerData = new GroupMember();
|
|
1656
|
+
this.id = '';
|
|
1655
1657
|
}
|
|
1656
1658
|
}
|
package/locales/ru.json
CHANGED
|
@@ -725,7 +725,11 @@
|
|
|
725
725
|
"attachApplication": "Вложить приложение №1",
|
|
726
726
|
"attachPowerOfAttorney": "Вложить доверенность",
|
|
727
727
|
"noDocuments": "Нет документов для просмотра",
|
|
728
|
-
"address": "Адрес"
|
|
728
|
+
"address": "Адрес",
|
|
729
|
+
"premiumWithLoad": "Страховая премия за факт период (с нагрузкой)",
|
|
730
|
+
"premiumWithoutLoad": "Страховая премия за факт период (без нагрузки)",
|
|
731
|
+
"policyStartDate": "Дата начала действия полиса",
|
|
732
|
+
"policyEndDate": "Дата окончания действия полиса",
|
|
729
733
|
},
|
|
730
734
|
"placeholders": {
|
|
731
735
|
"login": "Логин",
|
|
@@ -761,7 +765,8 @@
|
|
|
761
765
|
"calculationPreliminary": "Расчет предварительный. Требуется заполнить все необходимые данные",
|
|
762
766
|
"planDate": "Дата должна превышать сегодняшнюю дату",
|
|
763
767
|
"iik": "ИИК должен состоять из 20 символов",
|
|
764
|
-
"dataInPast": "Указанная дата осталась в прошлом"
|
|
768
|
+
"dataInPast": "Указанная дата осталась в прошлом",
|
|
769
|
+
"agentCommission": "Агентская комиссия не должно превышать 50"
|
|
765
770
|
},
|
|
766
771
|
"code": "КСЭ",
|
|
767
772
|
"fontSize": "Размер шрифта",
|
|
@@ -915,6 +920,7 @@
|
|
|
915
920
|
"coveragePeriod": "Период покрытия",
|
|
916
921
|
"attachScansSignDocs": "Вложить сканы подписанных документов",
|
|
917
922
|
"declarationHealthInsured": "Декларация о здоровье Застрахованных",
|
|
923
|
+
"uploadInsured": "Загрузите застрахованных",
|
|
918
924
|
"form": {
|
|
919
925
|
"calculation": "Расчеты",
|
|
920
926
|
"paymentAmount": "Размер выплаты",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -3,7 +3,18 @@ import { rules } from './rules';
|
|
|
3
3
|
import { i18n } from '../configs/i18n';
|
|
4
4
|
import { Toast, Types, Positions, ToastOptions } from './toast';
|
|
5
5
|
import { isValidGUID, yearEnding, jwtDecode, ErrorHandler, getKeyWithPattern, getNumber, getAgeByBirthDate } from '../composables';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
DataStoreClass,
|
|
8
|
+
Contragent,
|
|
9
|
+
DocumentItem,
|
|
10
|
+
Member,
|
|
11
|
+
Value,
|
|
12
|
+
CountryValue,
|
|
13
|
+
PolicyholderActivity,
|
|
14
|
+
BeneficialOwner,
|
|
15
|
+
GroupMember,
|
|
16
|
+
PolicyholderClass,
|
|
17
|
+
} from '../composables/classes';
|
|
7
18
|
import { ApiClass } from '../api';
|
|
8
19
|
import { useFormStore } from './form.store';
|
|
9
20
|
import { AxiosError } from 'axios';
|
|
@@ -1038,7 +1049,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1038
1049
|
if (this.isLifeBusiness) {
|
|
1039
1050
|
conditionsData.policyAppDto.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1040
1051
|
conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1041
|
-
conditionsData.policyAppDto.
|
|
1052
|
+
conditionsData.policyAppDto.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
|
|
1042
1053
|
conditionsData.policyAppDto.processDefinitionFgotId = (this.formStore.productConditionsForm.processGfot.id as string) ?? undefined;
|
|
1043
1054
|
}
|
|
1044
1055
|
return conditionsData;
|
|
@@ -1320,7 +1331,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1320
1331
|
}
|
|
1321
1332
|
return this.cities;
|
|
1322
1333
|
},
|
|
1323
|
-
async getCitiesEfo(key?: string, member?:
|
|
1334
|
+
async getCitiesEfo(key?: string, member?: any, parentKey?: string) {
|
|
1324
1335
|
if (this.isLifeBusiness) {
|
|
1325
1336
|
await this.getFromApi('cities', 'getCities');
|
|
1326
1337
|
//@ts-ignore
|
|
@@ -1784,7 +1795,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1784
1795
|
calculationData.insrCount = this.formStore.lfb.clients.length;
|
|
1785
1796
|
calculationData.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1786
1797
|
calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1787
|
-
calculationData.agentCommission = this.formStore.productConditionsForm.
|
|
1798
|
+
calculationData.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
|
|
1788
1799
|
calculationData.processDefinitionFgotId = this.formStore.productConditionsForm.processGfot.id;
|
|
1789
1800
|
}
|
|
1790
1801
|
const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
|
|
@@ -1811,6 +1822,9 @@ export const useDataStore = defineStore('data', {
|
|
|
1811
1822
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremium);
|
|
1812
1823
|
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.fixInsSum === 0 ? null : calculationResponse.fixInsSum);
|
|
1813
1824
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1825
|
+
if (calculationResponse.agentCommission) {
|
|
1826
|
+
this.formStore.productConditionsForm.agentCommission = calculationResponse.agentCommission;
|
|
1827
|
+
}
|
|
1814
1828
|
if (calculationResponse.clients) {
|
|
1815
1829
|
this.formStore.lfb.clients = calculationResponse.clients;
|
|
1816
1830
|
}
|
|
@@ -3104,9 +3118,9 @@ export const useDataStore = defineStore('data', {
|
|
|
3104
3118
|
const economySectorCode = this.economySectorCode.find((i: Value) => i.ids === '500003.9');
|
|
3105
3119
|
if (economySectorCode) member.economySectorCode = economySectorCode;
|
|
3106
3120
|
},
|
|
3107
|
-
async startApplicationV2(data:
|
|
3121
|
+
async startApplicationV2(data: PolicyholderClass) {
|
|
3108
3122
|
const policyholder = data.clientData;
|
|
3109
|
-
if (!policyholder.
|
|
3123
|
+
if (!policyholder.iin) return false;
|
|
3110
3124
|
try {
|
|
3111
3125
|
const response = await this.api.startApplication(data);
|
|
3112
3126
|
this.sendToParent(constants.postActions.applicationCreated, response.processInstanceId);
|
|
@@ -3115,7 +3129,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3115
3129
|
return ErrorHandler(err);
|
|
3116
3130
|
}
|
|
3117
3131
|
},
|
|
3118
|
-
async saveClient(policyholder:
|
|
3132
|
+
async saveClient(policyholder: PolicyholderClass) {
|
|
3119
3133
|
try {
|
|
3120
3134
|
await this.api.saveClient(this.formStore.applicationData.processInstanceId, this.formStore.lfb.clientId, policyholder);
|
|
3121
3135
|
} catch (err) {
|
|
@@ -3156,12 +3170,12 @@ export const useDataStore = defineStore('data', {
|
|
|
3156
3170
|
|
|
3157
3171
|
this.formStore.applicationData.processInstanceId = applicationData.processInstanceId;
|
|
3158
3172
|
this.formStore.lfb.policyholder.isIpdl = applicationData.clientApp.isIpdl;
|
|
3159
|
-
this.formStore.lfb.policyholder.clientData
|
|
3173
|
+
this.formStore.lfb.policyholder.clientData = clientData;
|
|
3160
3174
|
this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
|
|
3161
|
-
this.formStore.lfb.policyholder.clientData.
|
|
3175
|
+
this.formStore.lfb.policyholder.clientData.iin = reformatIin(clientData.iin);
|
|
3162
3176
|
this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
|
|
3163
3177
|
this.formStore.lfb.clientId = clientId;
|
|
3164
|
-
this.formStore.lfb.policyholder.clientData.
|
|
3178
|
+
this.formStore.lfb.policyholder.clientData.authorityDetails.date = reformatDate(clientData.authorityDetails.date);
|
|
3165
3179
|
|
|
3166
3180
|
if (clientData && clientData.activityTypes !== null) {
|
|
3167
3181
|
this.formStore.lfb.policyholderActivities = clientData.activityTypes;
|
|
@@ -3171,6 +3185,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3171
3185
|
this.formStore.lfb.beneficialOwners = beneficialOwnerApp;
|
|
3172
3186
|
this.formStore.lfb.isPolicyholderBeneficialOwner = clientData.authoritedPerson.iin.replace(/-/g, '') === beneficialOwnerApp[0].beneficialOwnerData.iin ? true : false;
|
|
3173
3187
|
this.formStore.lfb.beneficialOwners.forEach(beneficial => {
|
|
3188
|
+
beneficial.beneficialOwnerData.birthDate = reformatDate(beneficial.beneficialOwnerData.birthDate as string);
|
|
3174
3189
|
beneficial.beneficialOwnerData.identityDocument!.validUntil = reformatDate(beneficial.beneficialOwnerData.identityDocument!.validUntil as string);
|
|
3175
3190
|
beneficial.beneficialOwnerData.iin = reformatIin(beneficial.beneficialOwnerData.iin as string);
|
|
3176
3191
|
});
|
|
@@ -3189,6 +3204,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3189
3204
|
});
|
|
3190
3205
|
}
|
|
3191
3206
|
|
|
3207
|
+
this.formStore.productConditionsForm.agentCommission = applicationData.policyAppDto.agentCommission === 0 ? null : applicationData.policyAppDto.agentCommission;
|
|
3192
3208
|
this.formStore.productConditionsForm.coverPeriod = 12;
|
|
3193
3209
|
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
|
|
3194
3210
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
|
|
@@ -3196,8 +3212,8 @@ export const useDataStore = defineStore('data', {
|
|
|
3196
3212
|
);
|
|
3197
3213
|
const paymentPeriod = this.processPaymentPeriod.find(item => item.id == applicationData.policyAppDto.paymentPeriodId);
|
|
3198
3214
|
this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
|
|
3199
|
-
const processTariff = this.processTariff.find(item => item.id == applicationData.policyAppDto.tariffId);
|
|
3200
|
-
this.formStore.productConditionsForm.processTariff = processTariff ? processTariff : new Value();
|
|
3215
|
+
// const processTariff = this.processTariff.find(item => item.id == applicationData.policyAppDto.tariffId);
|
|
3216
|
+
// this.formStore.productConditionsForm.processTariff = processTariff ? processTariff : new Value();
|
|
3201
3217
|
const processGfot = this.processGfot.find(item => item.id == applicationData.policyAppDto.processDefinitionFgotId);
|
|
3202
3218
|
this.formStore.productConditionsForm.processGfot = processGfot ? processGfot : new Value();
|
|
3203
3219
|
} catch (err) {
|
|
@@ -3218,9 +3234,9 @@ export const useDataStore = defineStore('data', {
|
|
|
3218
3234
|
return ErrorHandler(err);
|
|
3219
3235
|
}
|
|
3220
3236
|
},
|
|
3221
|
-
async
|
|
3237
|
+
async saveClientActivityTypes(data: PolicyholderActivity[]) {
|
|
3222
3238
|
try {
|
|
3223
|
-
const response = await this.api.
|
|
3239
|
+
const response = await this.api.saveClientActivityTypes(this.formStore.applicationData.clientApp.id, data);
|
|
3224
3240
|
return response;
|
|
3225
3241
|
} catch (err) {
|
|
3226
3242
|
return ErrorHandler(err);
|
|
@@ -3236,7 +3252,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3236
3252
|
},
|
|
3237
3253
|
async saveBeneficialOwner(beneficialOwner: BeneficialOwner) {
|
|
3238
3254
|
try {
|
|
3239
|
-
const response = await this.api.saveBeneficialOwner(this.formStore.applicationData.processInstanceId, beneficialOwner.id, beneficialOwner);
|
|
3255
|
+
const response = await this.api.saveBeneficialOwner(this.formStore.applicationData.processInstanceId, String(beneficialOwner.id), beneficialOwner);
|
|
3240
3256
|
return response;
|
|
3241
3257
|
} catch (err) {
|
|
3242
3258
|
return ErrorHandler(err);
|
|
@@ -3265,7 +3281,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3265
3281
|
id: index,
|
|
3266
3282
|
fullName: client.longName,
|
|
3267
3283
|
gender: client.gender,
|
|
3268
|
-
position:
|
|
3284
|
+
position: client.workDetails.position,
|
|
3269
3285
|
birthDate: client.birthDate,
|
|
3270
3286
|
iin: reformatIin(client.iin),
|
|
3271
3287
|
insSum: client.insuredPolicyData.insSum,
|
|
@@ -3323,7 +3339,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3323
3339
|
if (this.validateMultipleMembersV2('beneficialOwners', 'beneficialOwnerApp', 'бенефициарных собственников') === false) {
|
|
3324
3340
|
return false;
|
|
3325
3341
|
}
|
|
3326
|
-
const inStatement = this.formStore.lfb.beneficialOwners.every(i => i.id !== null);
|
|
3342
|
+
const inStatement = this.formStore.lfb.beneficialOwners.every(i => i.beneficialOwnerData.id !== null);
|
|
3327
3343
|
if (inStatement === false) {
|
|
3328
3344
|
this.showToaster('error', this.t('toaster.requiredMember', { text: this.t('toaster.beneficialOwner') }));
|
|
3329
3345
|
return false;
|
package/store/rules.ts
CHANGED
|
@@ -9,6 +9,7 @@ export const rules = {
|
|
|
9
9
|
recalculationAdditive: [(v: any) => (v !== null && v !== '' && v <= 100 && v >= 0) || t('toaster.valueShouldBeBetween', { floor: '0', ceil: '100' })],
|
|
10
10
|
required: [(v: any) => !!v || t('rules.required')],
|
|
11
11
|
iik: [(v: any) => v.length === 20 || t('rules.iik')],
|
|
12
|
+
agentCommission: [(v: any) => v <= 50 || t('rules.agentCommission')],
|
|
12
13
|
objectRequired: [
|
|
13
14
|
(v: any) => {
|
|
14
15
|
if (!!v && 'nameRu' in v && v.nameRu != null) {
|
package/types/enum.ts
CHANGED