hl-core 0.0.10-beta.43 → 0.0.10-beta.44
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.
|
@@ -55,7 +55,10 @@
|
|
|
55
55
|
<base-form-input v-model="insured.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
56
56
|
</div>
|
|
57
57
|
</base-form-section>
|
|
58
|
-
<base-form-section
|
|
58
|
+
<base-form-section
|
|
59
|
+
v-if="isUnderwriterRole && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam' && whichProduct !== 'tumar'"
|
|
60
|
+
:title="$dataStore.t('recalculationInfo')"
|
|
61
|
+
>
|
|
59
62
|
<base-form-input
|
|
60
63
|
v-model="productConditionsForm.lifeMultiply"
|
|
61
64
|
:maska="$maska.numbers"
|
|
@@ -323,7 +326,7 @@
|
|
|
323
326
|
:label="$dataStore.t('productConditionsForm.agencyPart')"
|
|
324
327
|
:readonly="isDisabledAgentCommission"
|
|
325
328
|
:clearable="!isDisabledAgentCommission"
|
|
326
|
-
:rules="formStore.lfb.add ? $rules.required
|
|
329
|
+
:rules="!formStore.lfb.add ? $rules.required.concat($rules.numbers, $rules.agentCommission) : productConditionsForm.agentCommission === 0 ? [] : $rules.required"
|
|
327
330
|
/>
|
|
328
331
|
</base-form-section>
|
|
329
332
|
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
@@ -504,7 +507,7 @@
|
|
|
504
507
|
<base-form-input
|
|
505
508
|
v-model="contractDate"
|
|
506
509
|
:maska="$maska.date"
|
|
507
|
-
:rules="!isDisabled ? $rules.required.concat($rules.date) : []"
|
|
510
|
+
:rules="!isDisabled ? $rules.required.concat($rules.date, [validateContractDate]) : []"
|
|
508
511
|
:readonly="isDisabled || formStore.applicationData.processCode === 24 || isSlavePensionForm"
|
|
509
512
|
:clearable="!isDisabled"
|
|
510
513
|
:min-date="new Date()"
|
|
@@ -1838,6 +1841,14 @@ export default defineComponent({
|
|
|
1838
1841
|
return formatedContracts;
|
|
1839
1842
|
};
|
|
1840
1843
|
|
|
1844
|
+
const validateContractDate = (v: any) => {
|
|
1845
|
+
if (v && maxDate.value && formatDate(v) && formatDate(maxDate.value)) {
|
|
1846
|
+
const invalidDate = (formatDate(v) ?? new Date()) > (formatDate(maxDate.value) ?? new Date());
|
|
1847
|
+
if (invalidDate) return 'Дата заключения договора некорректна';
|
|
1848
|
+
}
|
|
1849
|
+
return true;
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1841
1852
|
const submitForm = async () => {
|
|
1842
1853
|
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
1843
1854
|
if (v.valid) {
|
|
@@ -2474,6 +2485,7 @@ export default defineComponent({
|
|
|
2474
2485
|
underwriterCalculate,
|
|
2475
2486
|
onInputInsurancePremiumPerMonth,
|
|
2476
2487
|
onInputInsurancePremiumPerMonthInDollar,
|
|
2488
|
+
validateContractDate,
|
|
2477
2489
|
onInputSum,
|
|
2478
2490
|
onInputPension,
|
|
2479
2491
|
onInputSumDollar,
|
package/composables/classes.ts
CHANGED
|
@@ -1715,7 +1715,7 @@ export class PhysGroupClass extends BaseGroupClass {
|
|
|
1715
1715
|
|
|
1716
1716
|
export class GroupMember extends PhysGroupClass {
|
|
1717
1717
|
isLeader: boolean;
|
|
1718
|
-
|
|
1718
|
+
organizationStartDate: string;
|
|
1719
1719
|
typeOfEconomicActivity: Value;
|
|
1720
1720
|
activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
|
|
1721
1721
|
beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
|
|
@@ -1726,6 +1726,7 @@ export class GroupMember extends PhysGroupClass {
|
|
|
1726
1726
|
super();
|
|
1727
1727
|
// Client
|
|
1728
1728
|
this.isLeader = false;
|
|
1729
|
+
this.organizationStartDate = '';
|
|
1729
1730
|
this.typeOfEconomicActivity = new Value();
|
|
1730
1731
|
this.activityTypes = [];
|
|
1731
1732
|
this.beneficalOwnerQuest = [
|
package/composables/index.ts
CHANGED
|
@@ -892,14 +892,10 @@ export class RoleController {
|
|
|
892
892
|
this.isUSNSsanctioner() ||
|
|
893
893
|
this.isUnderwriter() ||
|
|
894
894
|
this.isActuary() ||
|
|
895
|
-
this.isAdmin() ||
|
|
896
895
|
this.isCompliance() ||
|
|
897
|
-
this.isAnalyst() ||
|
|
898
896
|
this.isUpk() ||
|
|
899
897
|
this.isFinCenter() ||
|
|
900
898
|
this.isSupervisor() ||
|
|
901
|
-
this.isSupport() ||
|
|
902
|
-
this.isDrn() ||
|
|
903
899
|
this.isUrp() ||
|
|
904
900
|
this.isUsns() ||
|
|
905
901
|
this.isJurist() ||
|
|
@@ -916,7 +912,9 @@ export class RoleController {
|
|
|
916
912
|
this.isExecutor() ||
|
|
917
913
|
this.isArchivist() ||
|
|
918
914
|
this.isUKP() ||
|
|
919
|
-
this.isDpDirector()
|
|
915
|
+
this.isDpDirector() ||
|
|
916
|
+
this.isSecurity() ||
|
|
917
|
+
baseAccessRoles,
|
|
920
918
|
};
|
|
921
919
|
};
|
|
922
920
|
}
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -3680,6 +3680,24 @@ export const useDataStore = defineStore('data', {
|
|
|
3680
3680
|
});
|
|
3681
3681
|
}
|
|
3682
3682
|
},
|
|
3683
|
+
uniqPreparePersonData(local: GroupMember) {
|
|
3684
|
+
const checkForNull = (value: any) => (value ? value : '');
|
|
3685
|
+
try {
|
|
3686
|
+
(Object.keys(local) as Array<keyof GroupMember>).forEach(key => {
|
|
3687
|
+
if (key === 'actualAddress' || key === 'legalAddress') {
|
|
3688
|
+
const address = `${checkForNull(local[key].country.nameRu)}, ${checkForNull(local[key].state.nameRu)},${
|
|
3689
|
+
local[key].region.nameRu ? ` ${local[key].region.nameRu},` : ''
|
|
3690
|
+
} ${checkForNull(local[key].regionType.nameRu)} ${checkForNull(local[key].city.nameRu)},${local[key].square ? ` квартал ${local[key].square},` : ''}${
|
|
3691
|
+
local[key].microdistrict ? ` мкр ${local[key].microdistrict},` : ''
|
|
3692
|
+
} ул. ${checkForNull(local[key].street)}, д. ${checkForNull(local[key].houseNumber)}`;
|
|
3693
|
+
local[key].longName = address;
|
|
3694
|
+
local[key].longNameKz = address;
|
|
3695
|
+
}
|
|
3696
|
+
});
|
|
3697
|
+
} catch (e) {
|
|
3698
|
+
ErrorHandler(e);
|
|
3699
|
+
}
|
|
3700
|
+
},
|
|
3683
3701
|
async startApplicationV2(data: PolicyholderClass) {
|
|
3684
3702
|
const policyholder = JSON.parse(JSON.stringify(data)) as any;
|
|
3685
3703
|
this.preparePersonData(policyholder);
|
|
@@ -3699,6 +3717,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3699
3717
|
'clientData.authoritedPerson.addTaxResidency',
|
|
3700
3718
|
]);
|
|
3701
3719
|
policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3720
|
+
this.uniqPreparePersonData(policyholder.clientData);
|
|
3702
3721
|
if (this.formStore.lfb.add) {
|
|
3703
3722
|
policyholder.parentContractNumber = localStorage.getItem('policyNo');
|
|
3704
3723
|
policyholder.parentContractId = localStorage.getItem('policyId');
|
|
@@ -3715,6 +3734,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3715
3734
|
const policyholder = JSON.parse(JSON.stringify(data)) as any;
|
|
3716
3735
|
policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3717
3736
|
this.preparePersonData(policyholder);
|
|
3737
|
+
this.uniqPreparePersonData(policyholder.clientData);
|
|
3718
3738
|
try {
|
|
3719
3739
|
await this.api.saveClient(this.formStore.applicationData.processInstanceId, this.formStore.lfb.clientId, policyholder);
|
|
3720
3740
|
} catch (err) {
|
|
@@ -3799,7 +3819,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3799
3819
|
|
|
3800
3820
|
this.formStore.productConditionsForm.calcDate = reformatDate(applicationData.policyAppDto.calcDate);
|
|
3801
3821
|
this.formStore.productConditionsForm.contractEndDate = reformatDate(applicationData.policyAppDto.contractEndDate);
|
|
3802
|
-
this.formStore.productConditionsForm.agentCommission = applicationData.policyAppDto.agentCommission
|
|
3822
|
+
this.formStore.productConditionsForm.agentCommission = applicationData.policyAppDto.agentCommission;
|
|
3803
3823
|
this.formStore.productConditionsForm.fixInsSum = this.getNumberWithSpaces(applicationData.policyAppDto.fixInsSum === 0 ? null : applicationData.policyAppDto.fixInsSum);
|
|
3804
3824
|
this.formStore.productConditionsForm.coverPeriod = 12;
|
|
3805
3825
|
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
|