hl-core 0.0.10-beta.27 → 0.0.10-beta.29
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/api/interceptors.ts +0 -5
- package/components/Form/ProductConditionsBlock.vue +12 -6
- package/components/Pages/MemberForm.vue +32 -33
- package/components/Pages/ProductConditions.vue +80 -12
- package/components/Panel/PanelHandler.vue +13 -5
- package/composables/classes.ts +3 -0
- package/composables/constants.ts +16 -0
- package/locales/ru.json +1 -0
- package/package.json +1 -1
- package/store/data.store.ts +60 -19
package/api/base.api.ts
CHANGED
|
@@ -643,6 +643,13 @@ export class ApiClass {
|
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
+
async getBankByAccountNumber(accountNumber: string) {
|
|
647
|
+
return await this.axiosCall<Value>({
|
|
648
|
+
method: Methods.GET,
|
|
649
|
+
url: `/Ekk/api/ContragentInsis/GetBankByAccountNumber?accountNumber=${accountNumber}`,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
646
653
|
async searchAgentByName(name: string, branchCode?: string) {
|
|
647
654
|
return await this.axiosCall<Types.AgentData[]>({
|
|
648
655
|
method: Methods.GET,
|
package/api/interceptors.ts
CHANGED
|
@@ -65,11 +65,6 @@ export default function (axios: AxiosInstance) {
|
|
|
65
65
|
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
if (error.response.status >= 500) {
|
|
69
|
-
if (router.currentRoute.value.name !== 'Auth') {
|
|
70
|
-
dataStore.showToaster('error', error.stack ?? dataStore.t('toaster.error'), 5000);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
68
|
if (error.response.status === 403 && error.response.config.url) {
|
|
74
69
|
dataStore.showToaster('error', `Нет доступа на запрос: ${error.response.config.url.substring(error.response.config.url.lastIndexOf('/') + 1)}`, 5000);
|
|
75
70
|
}
|
|
@@ -75,12 +75,18 @@ export default defineComponent({
|
|
|
75
75
|
const dataStore = useDataStore();
|
|
76
76
|
const formStore = useFormStore();
|
|
77
77
|
|
|
78
|
-
const amount = computed(() =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
formStore.productConditionsForm && formStore.productConditionsForm.
|
|
83
|
-
);
|
|
78
|
+
const amount = computed(() => {
|
|
79
|
+
if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
|
|
80
|
+
return formStore.productConditionsForm.requestedSumInsuredInDollar;
|
|
81
|
+
}
|
|
82
|
+
return formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null;
|
|
83
|
+
});
|
|
84
|
+
const premium = computed(() => {
|
|
85
|
+
if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
|
|
86
|
+
return formStore.productConditionsForm.insurancePremiumPerMonthInDollar;
|
|
87
|
+
}
|
|
88
|
+
return formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null;
|
|
89
|
+
});
|
|
84
90
|
const policyNumber = computed(() => (formStore.applicationData && formStore.applicationData.policyAppDto ? formStore.applicationData.policyAppDto.policyNumber : null));
|
|
85
91
|
const contractDate = computed(() =>
|
|
86
92
|
formStore.applicationData && formStore.applicationData.policyAppDto && formStore.applicationData.policyAppDto.contractDate
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
v-model="member.phoneNumber"
|
|
69
69
|
:label="$dataStore.t('form.phoneNumber')"
|
|
70
70
|
:maska="$maska.phone"
|
|
71
|
-
:readonly="!!isDisabled || !!isIinPhoneDisabled"
|
|
72
|
-
:clearable="!isDisabled"
|
|
71
|
+
:readonly="!!isDisabled || !!isIinPhoneDisabled || !!isDataFromGov"
|
|
72
|
+
:clearable="!isDisabled && !isIinPhoneDisabled && !isDataFromGov"
|
|
73
73
|
:append-inner-icon="otpCondition ? `${$dataStore.isPension ? 'mdi-message-text' : 'mdi mdi-phone-message'}` : ''"
|
|
74
74
|
@append="openCustomPanel('otp')"
|
|
75
75
|
@keyup.enter.prevent="otpCondition ? openCustomPanel('otp') : null"
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
v-model="member.iin"
|
|
80
80
|
:label="$dataStore.t('form.iin')"
|
|
81
81
|
:maska="$maska.iin"
|
|
82
|
-
:readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin"
|
|
83
|
-
:clearable="!isDisabled"
|
|
82
|
+
:readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin || !!isDataFromGov"
|
|
83
|
+
:clearable="!isDisabled && !isIinPhoneDisabled && !member.parsedDocument?.iin && !isDataFromGov"
|
|
84
84
|
:append-inner-icon="hasMemberSearch || !isNonResident ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
|
|
85
85
|
@append="searchMember"
|
|
86
86
|
@input="onIinInput"
|
|
@@ -88,33 +88,33 @@
|
|
|
88
88
|
/>
|
|
89
89
|
<base-form-input
|
|
90
90
|
v-model.trim="member.lastName"
|
|
91
|
-
:readonly="isDisabled ||
|
|
92
|
-
:clearable="!isDisabled"
|
|
91
|
+
:readonly="isDisabled || isDataFromGov || !!member.parsedDocument?.lastName"
|
|
92
|
+
:clearable="!isDisabled && !isDataFromGov && !member.parsedDocument?.lastName"
|
|
93
93
|
:label="$dataStore.t('form.lastName')"
|
|
94
94
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
95
95
|
/>
|
|
96
96
|
<base-form-input
|
|
97
97
|
v-model.trim="member.firstName"
|
|
98
|
-
:readonly="isDisabled ||
|
|
99
|
-
:clearable="!isDisabled"
|
|
98
|
+
:readonly="isDisabled || isDataFromGov || !!member.parsedDocument?.firstName"
|
|
99
|
+
:clearable="!isDisabled && !isDataFromGov && !member.parsedDocument?.firstName"
|
|
100
100
|
:label="$dataStore.t('form.firstName')"
|
|
101
101
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
102
|
-
:append-inner-icon="
|
|
102
|
+
:append-inner-icon="isNonResident ? 'mdi mdi-magnify' : ''"
|
|
103
103
|
@append="isNonResident && searchMember"
|
|
104
104
|
/>
|
|
105
105
|
<base-form-input
|
|
106
106
|
v-if="hasMiddleName"
|
|
107
107
|
v-model.trim="member.middleName"
|
|
108
|
-
:readonly="isDisabled ||
|
|
109
|
-
:clearable="!isDisabled"
|
|
108
|
+
:readonly="isDisabled || isDataFromGov || !!member.parsedDocument?.middleName"
|
|
109
|
+
:clearable="!isDisabled && !isDataFromGov && !member.parsedDocument?.middleName"
|
|
110
110
|
:label="$dataStore.t('form.middleName')"
|
|
111
111
|
:rules="$rules.cyrillicNonRequired"
|
|
112
112
|
/>
|
|
113
113
|
<base-form-input
|
|
114
114
|
v-if="$dataStore.isLifetrip"
|
|
115
115
|
v-model.trim="member.lastNameLat"
|
|
116
|
-
:readonly="isDisabled ||
|
|
117
|
-
:clearable="!isDisabled"
|
|
116
|
+
:readonly="isDisabled || isDataFromGov"
|
|
117
|
+
:clearable="!isDisabled && !isDataFromGov"
|
|
118
118
|
:label="$dataStore.t('form.lastNameLat')"
|
|
119
119
|
:rules="$rules.required.concat($rules.latin)"
|
|
120
120
|
:hint="$dataStore.t('labels.checkWithDoc')"
|
|
@@ -122,16 +122,16 @@
|
|
|
122
122
|
<base-form-input
|
|
123
123
|
v-if="$dataStore.isLifetrip"
|
|
124
124
|
v-model.trim="member.firstNameLat"
|
|
125
|
-
:readonly="isDisabled ||
|
|
126
|
-
:clearable="!isDisabled"
|
|
125
|
+
:readonly="isDisabled || isDataFromGov"
|
|
126
|
+
:clearable="!isDisabled && !isDataFromGov"
|
|
127
127
|
:label="$dataStore.t('form.firstNameLat')"
|
|
128
128
|
:rules="$rules.required.concat($rules.latin)"
|
|
129
129
|
:hint="$dataStore.t('labels.checkWithDoc')"
|
|
130
130
|
/>
|
|
131
131
|
<base-form-input
|
|
132
132
|
v-model="member.birthDate"
|
|
133
|
-
:readonly="isDisabled ||
|
|
134
|
-
:clearable="!isDisabled"
|
|
133
|
+
:readonly="isDisabled || isDataFromGov || !!member.parsedDocument?.birthDate"
|
|
134
|
+
:clearable="!isDisabled && !isDataFromGov && !member.parsedDocument?.birthDate"
|
|
135
135
|
:label="$dataStore.t('form.birthDate')"
|
|
136
136
|
:rules="birthDateRule"
|
|
137
137
|
:maska="$maska.date"
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
<base-panel-input
|
|
164
164
|
v-model="member.gender"
|
|
165
165
|
:value="member.gender?.nameRu"
|
|
166
|
-
:readonly="isDisabled ||
|
|
167
|
-
:clearable="!isDisabled && !
|
|
166
|
+
:readonly="isDisabled || isDataFromGov"
|
|
167
|
+
:clearable="!isDisabled && !isDataFromGov"
|
|
168
168
|
:label="$dataStore.t('form.gender')"
|
|
169
169
|
:rules="$rules.objectRequired"
|
|
170
170
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -463,8 +463,8 @@
|
|
|
463
463
|
v-model="member.documentType"
|
|
464
464
|
:value="member.documentType?.nameRu"
|
|
465
465
|
:label="$dataStore.t('form.documentType')"
|
|
466
|
-
:readonly="isDisabled"
|
|
467
|
-
:clearable="!isDisabled"
|
|
466
|
+
:readonly="isDisabled || isDataFromGov"
|
|
467
|
+
:clearable="!isDisabled && !isDataFromGov"
|
|
468
468
|
:rules="$rules.objectRequired"
|
|
469
469
|
append-inner-icon="mdi mdi-chevron-right"
|
|
470
470
|
@append="openPanel($dataStore.t('form.documentType'), [], 'documentType', $dataStore.getDocumentTypes)"
|
|
@@ -472,8 +472,8 @@
|
|
|
472
472
|
<base-form-input
|
|
473
473
|
v-model.trim="member.documentNumber"
|
|
474
474
|
:label="$dataStore.t('form.documentNumber')"
|
|
475
|
-
:readonly="isDisabled || !!member.parsedDocument?.documentNumber"
|
|
476
|
-
:clearable="!isDisabled"
|
|
475
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentNumber || isDataFromGov"
|
|
476
|
+
:clearable="!isDisabled && !member.parsedDocument?.documentNumber && !isDataFromGov"
|
|
477
477
|
:rules="$rules.required"
|
|
478
478
|
/>
|
|
479
479
|
<!-- <base-file-input v-if="!memberDocument" :disabled="isDisabled" :clearable="!isDisabled" @input="attachFile($event)" />
|
|
@@ -485,8 +485,8 @@
|
|
|
485
485
|
v-model="member.documentIssuers"
|
|
486
486
|
:value="member.documentIssuers?.nameRu"
|
|
487
487
|
:label="$dataStore.t('form.documentIssuers')"
|
|
488
|
-
:readonly="isDisabled || !!member.parsedDocument?.documentIssuer"
|
|
489
|
-
:clearable="!isDisabled"
|
|
488
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentIssuer || isDataFromGov"
|
|
489
|
+
:clearable="!isDisabled && !member.parsedDocument?.documentIssuer && !isDataFromGov"
|
|
490
490
|
:rules="$rules.objectRequired"
|
|
491
491
|
append-inner-icon="mdi mdi-chevron-right"
|
|
492
492
|
@append="openPanel($dataStore.t('form.documentIssuers'), [], 'documentIssuers', $dataStore.getDocumentIssuers)"
|
|
@@ -494,8 +494,8 @@
|
|
|
494
494
|
<base-form-input
|
|
495
495
|
v-model="member.documentDate"
|
|
496
496
|
:label="$dataStore.t('form.documentDate')"
|
|
497
|
-
:readonly="isDisabled || !!member.parsedDocument?.documentIssueDate"
|
|
498
|
-
:clearable="!isDisabled"
|
|
497
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentIssueDate || isDataFromGov"
|
|
498
|
+
:clearable="!isDisabled && !member.parsedDocument?.documentIssueDate && !isDataFromGov"
|
|
499
499
|
:rules="$rules.required.concat($rules.date)"
|
|
500
500
|
:maska="$maska.date"
|
|
501
501
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
@@ -505,8 +505,8 @@
|
|
|
505
505
|
v-if="member.documentType.ids !== 'SBI'"
|
|
506
506
|
v-model="member.documentExpire"
|
|
507
507
|
:label="$dataStore.t('form.documentExpire')"
|
|
508
|
-
:readonly="isDisabled || !!member.parsedDocument?.documentExpireDate"
|
|
509
|
-
:clearable="!isDisabled"
|
|
508
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentExpireDate || isDataFromGov"
|
|
509
|
+
:clearable="!isDisabled && !member.parsedDocument?.documentExpireDate && !isDataFromGov"
|
|
510
510
|
:rules="$rules.required.concat($rules.date)"
|
|
511
511
|
:maska="$maska.date"
|
|
512
512
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
@@ -844,6 +844,7 @@ export default {
|
|
|
844
844
|
const isPanelLoading = ref<boolean>(false);
|
|
845
845
|
const isChangingMember = ref<boolean>(false);
|
|
846
846
|
const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency.ids === '500011.2');
|
|
847
|
+
const isDataFromGov = computed(() => member.value.verifyType === 'GBDFL' || member.value.verifyType === 'ESBD' || !!member.value.gosPersonData);
|
|
847
848
|
const familyDialog = ref<boolean>(false);
|
|
848
849
|
const deletionDialog = ref<boolean>(false);
|
|
849
850
|
const documentChooseDialog = ref<boolean>(false);
|
|
@@ -870,7 +871,6 @@ export default {
|
|
|
870
871
|
const isDisabled = computed(() => !memberStore.isStatementEditible(whichForm.value));
|
|
871
872
|
const isTask = computed(() => route.params.taskId === '0' || dataStore.isTask());
|
|
872
873
|
const isIinPhoneDisabled = computed(() => member.value.hasAgreement);
|
|
873
|
-
const isFromGBD = computed(() => !!member.value.gosPersonData);
|
|
874
874
|
const gbdDocuments = computed(() => {
|
|
875
875
|
if (hasGBDFLDocSelection && !!member.value.gosPersonData && !!member.value.gosPersonData.documents) {
|
|
876
876
|
const documents = Array.isArray(member.value.gosPersonData.documents.document)
|
|
@@ -932,7 +932,7 @@ export default {
|
|
|
932
932
|
};
|
|
933
933
|
return dataStore.isAULETTI || dataStore.isAulettiParent ? false : dataStore.controls.hasGBDFL && perMemberCondition();
|
|
934
934
|
});
|
|
935
|
-
const hasGBDFLDocSelection = dataStore.isLifetrip
|
|
935
|
+
const hasGBDFLDocSelection = dataStore.isLifetrip;
|
|
936
936
|
const hasInsis = computed(() => dataStore.controls.hasInsis);
|
|
937
937
|
const hasGKB = computed(() => {
|
|
938
938
|
const perMemberCondition = () => {
|
|
@@ -1082,7 +1082,6 @@ export default {
|
|
|
1082
1082
|
case formStore.policyholderFormKey:
|
|
1083
1083
|
return route.params.taskId === '0';
|
|
1084
1084
|
case formStore.insuredFormKey:
|
|
1085
|
-
if (dataStore.isPension && formStore.applicationData.processCode === 19) return route.params.taskId === '0';
|
|
1086
1085
|
return route.query.id === '0';
|
|
1087
1086
|
case formStore.policyholdersRepresentativeFormKey:
|
|
1088
1087
|
case formStore.beneficiaryFormKey:
|
|
@@ -2157,7 +2156,6 @@ export default {
|
|
|
2157
2156
|
isDisabled,
|
|
2158
2157
|
isTask,
|
|
2159
2158
|
isIinPhoneDisabled,
|
|
2160
|
-
isFromGBD,
|
|
2161
2159
|
showSaveButton,
|
|
2162
2160
|
hasGBDFL,
|
|
2163
2161
|
hasInsis,
|
|
@@ -2174,6 +2172,7 @@ export default {
|
|
|
2174
2172
|
gbdDocuments,
|
|
2175
2173
|
hasGBDFLDocSelection,
|
|
2176
2174
|
isNonResident,
|
|
2175
|
+
isDataFromGov,
|
|
2177
2176
|
|
|
2178
2177
|
// Rules
|
|
2179
2178
|
ageRule,
|
|
@@ -152,6 +152,17 @@
|
|
|
152
152
|
@append="openPanel($dataStore.t('form.gender'), $dataStore.gender, 'gender')"
|
|
153
153
|
/>
|
|
154
154
|
</div>
|
|
155
|
+
<base-panel-input
|
|
156
|
+
v-if="hasCurrency"
|
|
157
|
+
v-model="productConditionsForm.currency"
|
|
158
|
+
:value="productConditionsForm.currency.nameRu"
|
|
159
|
+
:readonly="isDisabled"
|
|
160
|
+
:clearable="!isDisabled"
|
|
161
|
+
:label="$dataStore.t('agent.currency')"
|
|
162
|
+
:rules="$rules.objectRequired"
|
|
163
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
164
|
+
@append="openPanel($dataStore.t('agent.currency'), $constants.currencyList, 'currency')"
|
|
165
|
+
/>
|
|
155
166
|
<base-form-input
|
|
156
167
|
v-if="hasInsStartDate"
|
|
157
168
|
v-model="productConditionsForm.calcDate"
|
|
@@ -185,8 +196,8 @@
|
|
|
185
196
|
v-if="hasPaymentPeriod"
|
|
186
197
|
v-model="productConditionsForm.paymentPeriod"
|
|
187
198
|
:value="productConditionsForm.paymentPeriod?.nameRu"
|
|
188
|
-
:readonly="
|
|
189
|
-
:clearable="!
|
|
199
|
+
:readonly="isDisabledPaymentPeriod"
|
|
200
|
+
:clearable="!isDisabledPaymentPeriod"
|
|
190
201
|
:rules="$rules.objectRequired"
|
|
191
202
|
:label="$dataStore.t('productConditionsForm.processPaymentPeriod')"
|
|
192
203
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -256,10 +267,10 @@
|
|
|
256
267
|
@onClear="onClearPremiumDollar"
|
|
257
268
|
/>
|
|
258
269
|
<base-form-input
|
|
259
|
-
v-if="
|
|
270
|
+
v-if="hasCurrencySymbols && $dataStore.currencies.usd"
|
|
260
271
|
v-model="$dataStore.currencies.usd"
|
|
261
272
|
:readonly="true"
|
|
262
|
-
:label="
|
|
273
|
+
:label="currencySymbolsLabel"
|
|
263
274
|
:suffix="$constants.currencySymbols.kzt"
|
|
264
275
|
/>
|
|
265
276
|
<base-form-input
|
|
@@ -819,7 +830,9 @@ export default defineComponent({
|
|
|
819
830
|
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask() || fromIndexPage.value);
|
|
820
831
|
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
821
832
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
822
|
-
const insurancePremiumPerMonthRule = computed(() =>
|
|
833
|
+
const insurancePremiumPerMonthRule = computed(() =>
|
|
834
|
+
!!productConditionsForm.insurancePremiumPerMonth ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
835
|
+
);
|
|
823
836
|
const insurancePremiumPerMonthDisabled = computed(() => {
|
|
824
837
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
825
838
|
return true;
|
|
@@ -829,7 +842,9 @@ export default defineComponent({
|
|
|
829
842
|
}
|
|
830
843
|
return isDisabled.value;
|
|
831
844
|
});
|
|
832
|
-
const requestedSumInsuredRule = computed(() =>
|
|
845
|
+
const requestedSumInsuredRule = computed(() =>
|
|
846
|
+
!!productConditionsForm.requestedSumInsured ? (whichProduct.value === 'gons' ? dataStore.rules.required : dataStore.rules.required.concat(dataStore.rules.sums)) : [],
|
|
847
|
+
);
|
|
833
848
|
const fixInsSumRule = computed(() =>
|
|
834
849
|
!!productConditionsForm.fixInsSum
|
|
835
850
|
? dataStore.rules.required.concat(dataStore.rules.sums, dataStore.rules.fixInsSumLimit(getNumber(productConditionsForm.fixInsSum as string), minInsSum.value))
|
|
@@ -872,18 +887,27 @@ export default defineComponent({
|
|
|
872
887
|
if (whichProduct.value === 'halykkazyna') {
|
|
873
888
|
return true;
|
|
874
889
|
}
|
|
890
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
891
|
+
return true;
|
|
892
|
+
}
|
|
875
893
|
return false;
|
|
876
894
|
});
|
|
877
895
|
const hasInsurancePremiumPerMonthInDollar = computed(() => {
|
|
878
896
|
if (whichProduct.value === 'halykkazyna') {
|
|
879
897
|
return true;
|
|
880
898
|
}
|
|
899
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
900
|
+
return true;
|
|
901
|
+
}
|
|
881
902
|
return false;
|
|
882
903
|
});
|
|
883
|
-
const
|
|
904
|
+
const hasCurrencySymbols = computed(() => {
|
|
884
905
|
if (whichProduct.value === 'halykkazyna') {
|
|
885
906
|
return true;
|
|
886
907
|
}
|
|
908
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
909
|
+
return true;
|
|
910
|
+
}
|
|
887
911
|
return false;
|
|
888
912
|
});
|
|
889
913
|
const hasAdbMultiply = computed(() => {
|
|
@@ -986,6 +1010,12 @@ export default defineComponent({
|
|
|
986
1010
|
}
|
|
987
1011
|
return dataStore.t('productConditionsForm.insurancePremiumAmount');
|
|
988
1012
|
});
|
|
1013
|
+
const currencySymbolsLabel = computed(() => {
|
|
1014
|
+
if (whichProduct.value === 'gons') {
|
|
1015
|
+
return dataStore.t('productConditionsForm.exchangeRateSettlementDate');
|
|
1016
|
+
}
|
|
1017
|
+
return dataStore.t('productConditionsForm.dollarExchangeRateNBRK');
|
|
1018
|
+
});
|
|
989
1019
|
const isDisabledFixInsSum = computed(() => {
|
|
990
1020
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
991
1021
|
return false;
|
|
@@ -1080,6 +1110,18 @@ export default defineComponent({
|
|
|
1080
1110
|
}
|
|
1081
1111
|
return false;
|
|
1082
1112
|
});
|
|
1113
|
+
const hasCurrency = computed(() => {
|
|
1114
|
+
if (whichProduct.value === 'gons') {
|
|
1115
|
+
return true;
|
|
1116
|
+
}
|
|
1117
|
+
return false;
|
|
1118
|
+
});
|
|
1119
|
+
const isDisabledPaymentPeriod = computed(() => {
|
|
1120
|
+
if (whichProduct.value === 'gons' && productConditionsForm.currency.code === 'USD') {
|
|
1121
|
+
return true;
|
|
1122
|
+
}
|
|
1123
|
+
return isDisabled.value;
|
|
1124
|
+
});
|
|
1083
1125
|
|
|
1084
1126
|
const pensionCalculationParams = ref({
|
|
1085
1127
|
compulsoryContractAmount: pensionForm && pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount != 0 ? pensionForm.compulsoryContractAmount : null,
|
|
@@ -1381,7 +1423,7 @@ export default defineComponent({
|
|
|
1381
1423
|
const calculatedPremiumDollar = getNumber(event.target.value as string);
|
|
1382
1424
|
if (calculatedPremiumDollar) {
|
|
1383
1425
|
productConditionsForm.insurancePremiumPerMonth = dataStore.getNumberWithSpaces(productConditionsForm.insurancePremiumPerMonth);
|
|
1384
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1426
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1385
1427
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1386
1428
|
productConditionsForm.insurancePremiumPerMonthInDollar = dataStore.getNumberWithSpaces(calculatedPremiumDollar / dataStore.currencies.usd);
|
|
1387
1429
|
} else {
|
|
@@ -1409,7 +1451,7 @@ export default defineComponent({
|
|
|
1409
1451
|
const calculatedSumDollar = getNumber(event.target.value as string);
|
|
1410
1452
|
if (calculatedSumDollar) {
|
|
1411
1453
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(productConditionsForm.requestedSumInsured);
|
|
1412
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1454
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1413
1455
|
if (typeof dataStore.currencies.usd === 'number') {
|
|
1414
1456
|
productConditionsForm.requestedSumInsuredInDollar = dataStore.getNumberWithSpaces(calculatedSumDollar / dataStore.currencies.usd);
|
|
1415
1457
|
} else {
|
|
@@ -1549,13 +1591,13 @@ export default defineComponent({
|
|
|
1549
1591
|
} else {
|
|
1550
1592
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1551
1593
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
1552
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1594
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1553
1595
|
productConditionsForm.insurancePremiumPerMonthInDollar = null;
|
|
1554
1596
|
}
|
|
1555
1597
|
}
|
|
1556
1598
|
if (whichSum.value === 'insurancePremiumPerMonth') {
|
|
1557
1599
|
productConditionsForm.requestedSumInsured = null;
|
|
1558
|
-
if (whichProduct.value === 'halykkazyna') {
|
|
1600
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1559
1601
|
productConditionsForm.requestedSumInsuredInDollar = null;
|
|
1560
1602
|
}
|
|
1561
1603
|
}
|
|
@@ -1669,6 +1711,10 @@ export default defineComponent({
|
|
|
1669
1711
|
if (dataStore.isCalculator) {
|
|
1670
1712
|
clearFields();
|
|
1671
1713
|
}
|
|
1714
|
+
if (whichProduct.value === 'gons') {
|
|
1715
|
+
formStore.isDisabled.productConditionsForm = false;
|
|
1716
|
+
dataStore.setFormsDisabled(false);
|
|
1717
|
+
}
|
|
1672
1718
|
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
|
|
1673
1719
|
if (
|
|
1674
1720
|
(dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
|
|
@@ -1712,10 +1758,12 @@ export default defineComponent({
|
|
|
1712
1758
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
1713
1759
|
await dataStore.getProcessPaymentPeriod();
|
|
1714
1760
|
}
|
|
1761
|
+
if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
|
|
1762
|
+
await dataStore.getCurrencies();
|
|
1763
|
+
}
|
|
1715
1764
|
if (whichProduct.value === 'halykkazyna') {
|
|
1716
1765
|
const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
|
|
1717
1766
|
if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
|
|
1718
|
-
await dataStore.getCurrencies();
|
|
1719
1767
|
}
|
|
1720
1768
|
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1721
1769
|
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
|
|
@@ -1771,6 +1819,23 @@ export default defineComponent({
|
|
|
1771
1819
|
{ immediate: true },
|
|
1772
1820
|
);
|
|
1773
1821
|
|
|
1822
|
+
if (hasCurrency.value) {
|
|
1823
|
+
watch(
|
|
1824
|
+
() => productConditionsForm.currency,
|
|
1825
|
+
async val => {
|
|
1826
|
+
if (val.code === 'USD') {
|
|
1827
|
+
if (!dataStore.processPaymentPeriod.length) {
|
|
1828
|
+
await dataStore.getProcessPaymentPeriod();
|
|
1829
|
+
}
|
|
1830
|
+
const paymentPeriod = dataStore.processPaymentPeriod.find(item => item.nameRu === 'единовременно');
|
|
1831
|
+
if (paymentPeriod) {
|
|
1832
|
+
productConditionsForm.paymentPeriod = paymentPeriod;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1774
1839
|
if (hasInsStartDate.value) {
|
|
1775
1840
|
watch(
|
|
1776
1841
|
() => productConditionsForm.calcDate,
|
|
@@ -1886,6 +1951,9 @@ export default defineComponent({
|
|
|
1886
1951
|
isDisabled,
|
|
1887
1952
|
isTermsDisabled,
|
|
1888
1953
|
isUnderwriterForm,
|
|
1954
|
+
hasCurrencySymbols,
|
|
1955
|
+
currencySymbolsLabel,
|
|
1956
|
+
isDisabledPaymentPeriod,
|
|
1889
1957
|
insurancePremiumPerMonthRule,
|
|
1890
1958
|
insurancePremiumPerMonthDisabled,
|
|
1891
1959
|
requestedSumInsuredRule,
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
<div :class="[$styles.flexColNav]">
|
|
12
12
|
<base-content-block v-if="hasConditionsInfo" class="flex flex-col gap-3">
|
|
13
13
|
<span
|
|
14
|
-
>{{ `Сумма страховой премии ${paymentPeriod}:` }} <b>{{ `${insurancePremiumPerMonth}
|
|
14
|
+
>{{ `Сумма страховой премии ${paymentPeriod}:` }} <b>{{ `${insurancePremiumPerMonth}` }}</b></span
|
|
15
15
|
>
|
|
16
16
|
<span
|
|
17
|
-
>{{ `Запрашиваемая страховая сумма: ` }} <b>{{ `${requestedSumInsured}
|
|
17
|
+
>{{ `Запрашиваемая страховая сумма: ` }} <b>{{ `${requestedSumInsured}` }}</b>
|
|
18
18
|
</span>
|
|
19
19
|
</base-content-block>
|
|
20
20
|
<base-content-block v-if="$dataStore.isLifetrip" class="flex flex-col gap-3">
|
|
@@ -574,14 +574,22 @@ export default defineComponent({
|
|
|
574
574
|
const affiliateActions = computed(() => dataStore.panelAction === constants.actions.affiliate);
|
|
575
575
|
const chooseSignActions = computed(() => dataStore.controls.hasChooseSign && dataStore.panelAction === constants.actions.chooseSign);
|
|
576
576
|
const choosePayActions = computed(() => dataStore.controls.hasChoosePay && dataStore.panelAction === constants.actions.choosePay);
|
|
577
|
-
const isNewSign = computed(() => (dataStore.isPension
|
|
577
|
+
const isNewSign = computed(() => (dataStore.isPension && !useEnv().isProduction) || dataStore.isGons);
|
|
578
578
|
const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
|
|
579
|
-
const insurancePremiumPerMonth = computed(() =>
|
|
579
|
+
const insurancePremiumPerMonth = computed(() => {
|
|
580
|
+
if (dataStore.isGons && formStore.productConditionsForm.currency.code === 'USD') {
|
|
581
|
+
return `${formStore.productConditionsForm.insurancePremiumPerMonthInDollar}$`;
|
|
582
|
+
}
|
|
583
|
+
return `${formStore.productConditionsForm.insurancePremiumPerMonth}₸`;
|
|
584
|
+
});
|
|
580
585
|
const requestedSumInsured = computed(() => {
|
|
581
586
|
if ((dataStore.isLifeBusiness || dataStore.isGns) && formStore.productConditionsForm.requestedSumInsured === null) {
|
|
582
587
|
return dataStore.getNumberWithSpaces(formStore.applicationData.policyAppDto!.mainInsSum);
|
|
583
588
|
}
|
|
584
|
-
|
|
589
|
+
if (dataStore.isGons && formStore.productConditionsForm.currency.code === 'USD') {
|
|
590
|
+
return `${formStore.productConditionsForm.requestedSumInsuredInDollar}$`;
|
|
591
|
+
}
|
|
592
|
+
return `${formStore.productConditionsForm.requestedSumInsured}₸`;
|
|
585
593
|
});
|
|
586
594
|
const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
|
|
587
595
|
const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
|
package/composables/classes.ts
CHANGED
|
@@ -825,6 +825,7 @@ export class ProductConditions {
|
|
|
825
825
|
fixInsSum: number | string | null;
|
|
826
826
|
calcDate: string | null;
|
|
827
827
|
contractEndDate: string | null;
|
|
828
|
+
currency: Value;
|
|
828
829
|
|
|
829
830
|
constructor(
|
|
830
831
|
insuranceCase = null,
|
|
@@ -873,6 +874,7 @@ export class ProductConditions {
|
|
|
873
874
|
fixInsSum = null,
|
|
874
875
|
calcDate = null,
|
|
875
876
|
contractEndDate = null,
|
|
877
|
+
currency = new Value(),
|
|
876
878
|
) {
|
|
877
879
|
this.requestedSumInsuredInDollar = null;
|
|
878
880
|
this.insurancePremiumPerMonthInDollar = null;
|
|
@@ -925,6 +927,7 @@ export class ProductConditions {
|
|
|
925
927
|
this.fixInsSum = fixInsSum;
|
|
926
928
|
this.calcDate = calcDate;
|
|
927
929
|
this.contractEndDate = contractEndDate;
|
|
930
|
+
this.currency = currency;
|
|
928
931
|
}
|
|
929
932
|
|
|
930
933
|
getSingleTripDays() {
|
package/composables/constants.ts
CHANGED
|
@@ -163,4 +163,20 @@ export const constants = Object.freeze({
|
|
|
163
163
|
ids: '',
|
|
164
164
|
},
|
|
165
165
|
],
|
|
166
|
+
currencyList: [
|
|
167
|
+
{
|
|
168
|
+
code: 'KZT',
|
|
169
|
+
id: '1',
|
|
170
|
+
nameKz: 'Тенге',
|
|
171
|
+
nameRu: 'Тенге',
|
|
172
|
+
ids: '',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
code: 'USD',
|
|
176
|
+
id: '2',
|
|
177
|
+
nameKz: 'С индексацией на курс USD',
|
|
178
|
+
nameRu: 'С индексацией на курс USD',
|
|
179
|
+
ids: '',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
166
182
|
});
|
package/locales/ru.json
CHANGED
|
@@ -395,6 +395,7 @@
|
|
|
395
395
|
"insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
|
|
396
396
|
"insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
|
|
397
397
|
"dollarExchangeRateNBRK": "Курс доллара НБРК",
|
|
398
|
+
"exchangeRateSettlementDate": "Курс на дату расчета (USD/KZT)",
|
|
398
399
|
"contractDate": "Дата контракта",
|
|
399
400
|
"guaranteedTermAnnuityPayments": "Гарантированный срок аннуитетных выплат",
|
|
400
401
|
"guaranteedPeriod": "Укажите период гарантированного срока",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -1024,6 +1024,14 @@ export const useDataStore = defineStore('data', {
|
|
|
1024
1024
|
conditionsData.policyAppDto.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1025
1025
|
conditionsData.policyAppDto.currencyExchangeRate = this.currencies.usd;
|
|
1026
1026
|
}
|
|
1027
|
+
if (this.isGons) {
|
|
1028
|
+
conditionsData.policyAppDto.premiumInCurrency =
|
|
1029
|
+
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
|
|
1030
|
+
conditionsData.policyAppDto.amountInCurrency =
|
|
1031
|
+
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1032
|
+
conditionsData.policyAppDto.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
|
|
1033
|
+
conditionsData.policyAppDto.currency = this.formStore.productConditionsForm.currency.code as string;
|
|
1034
|
+
}
|
|
1027
1035
|
if (this.isLiferenta) {
|
|
1028
1036
|
conditionsData.policyAppDto.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
|
|
1029
1037
|
conditionsData.policyAppDto.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
|
|
@@ -1792,6 +1800,15 @@ export const useDataStore = defineStore('data', {
|
|
|
1792
1800
|
calculationData.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1793
1801
|
calculationData.currencyExchangeRate = this.currencies.usd;
|
|
1794
1802
|
}
|
|
1803
|
+
if (this.isGons || product === 'gons') {
|
|
1804
|
+
calculationData.premiumInCurrency =
|
|
1805
|
+
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
|
|
1806
|
+
calculationData.amountInCurrency =
|
|
1807
|
+
this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
|
|
1808
|
+
calculationData.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
|
|
1809
|
+
|
|
1810
|
+
calculationData.currency = this.formStore.productConditionsForm.currency.code as string;
|
|
1811
|
+
}
|
|
1795
1812
|
if (this.isLiferenta || product === 'liferenta') {
|
|
1796
1813
|
calculationData.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
|
|
1797
1814
|
calculationData.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
|
|
@@ -1810,10 +1827,15 @@ export const useDataStore = defineStore('data', {
|
|
|
1810
1827
|
calculationData.calcDate = formatDate(this.formStore.productConditionsForm.calcDate as string)!.toISOString();
|
|
1811
1828
|
}
|
|
1812
1829
|
const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
|
|
1813
|
-
if (calculationResponse.amount)
|
|
1814
|
-
|
|
1830
|
+
if (calculationResponse.amount)
|
|
1831
|
+
this.formStore.productConditionsForm.requestedSumInsured =
|
|
1832
|
+
this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.amount) : this.getNumberWithSpaces(calculationResponse.amount);
|
|
1833
|
+
if (calculationResponse.premium)
|
|
1834
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth =
|
|
1835
|
+
this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.premium) : this.getNumberWithSpaces(calculationResponse.premium);
|
|
1836
|
+
|
|
1815
1837
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1816
|
-
if (this.isKazyna || product === 'halykkazyna') {
|
|
1838
|
+
if (this.isKazyna || product === 'halykkazyna' || this.isGons || product === 'gons') {
|
|
1817
1839
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
|
|
1818
1840
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(calculationResponse.amountInCurrency);
|
|
1819
1841
|
} else {
|
|
@@ -1860,7 +1882,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1860
1882
|
const applicationData = await this.api.getApplicationData(taskId);
|
|
1861
1883
|
this.formStore.applicationData = applicationData;
|
|
1862
1884
|
if (this.formStore.applicationData.addCoverDto) this.formStore.additionalInsuranceTerms = this.formStore.applicationData.addCoverDto;
|
|
1863
|
-
if (this.isKazyna && this.currencies.usd) {
|
|
1885
|
+
if ((this.isKazyna || this.isGons) && this.currencies.usd) {
|
|
1864
1886
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
|
|
1865
1887
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(result.value / this.currencies.usd);
|
|
1866
1888
|
} else {
|
|
@@ -1868,11 +1890,15 @@ export const useDataStore = defineStore('data', {
|
|
|
1868
1890
|
}
|
|
1869
1891
|
}
|
|
1870
1892
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonth != null) {
|
|
1871
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(result.value);
|
|
1872
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.
|
|
1893
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.isGons ? this.getNumberWithSpacesAfterComma(result.value) : this.getNumberWithSpaces(result.value);
|
|
1894
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.isGons
|
|
1895
|
+
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium)
|
|
1896
|
+
: this.getNumberWithSpaces(applicationData.policyAppDto.premium);
|
|
1873
1897
|
} else {
|
|
1874
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
|
|
1875
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.
|
|
1898
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.isGons ? this.getNumberWithSpacesAfterComma(result.value) : this.getNumberWithSpaces(result.value);
|
|
1899
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.isGons
|
|
1900
|
+
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.amount)
|
|
1901
|
+
: this.getNumberWithSpaces(applicationData.policyAppDto.amount);
|
|
1876
1902
|
}
|
|
1877
1903
|
if (this.isLiferenta) {
|
|
1878
1904
|
this.formStore.productConditionsForm.amountAnnuityPayments = this.getNumberWithSpaces(applicationData.policyAppDto.annuityMonthPay);
|
|
@@ -2216,16 +2242,21 @@ export const useDataStore = defineStore('data', {
|
|
|
2216
2242
|
const paymentPeriod = this.processPaymentPeriod.find(item => item.id == applicationData.policyAppDto.paymentPeriodId);
|
|
2217
2243
|
this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
|
|
2218
2244
|
|
|
2219
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.
|
|
2220
|
-
applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount
|
|
2221
|
-
|
|
2222
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.
|
|
2223
|
-
applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium
|
|
2224
|
-
|
|
2225
|
-
|
|
2245
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.isGons
|
|
2246
|
+
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount)
|
|
2247
|
+
: this.getNumberWithSpaces(applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount);
|
|
2248
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.isGons
|
|
2249
|
+
? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium)
|
|
2250
|
+
: this.getNumberWithSpaces(applicationData.policyAppDto.premium === null ? null : applicationData.policyAppDto.premium);
|
|
2251
|
+
|
|
2252
|
+
if (this.isKazyna || this.isGons) {
|
|
2226
2253
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.amountInCurrency);
|
|
2227
2254
|
this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar = this.getNumberWithSpaces(applicationData.policyAppDto.premiumInCurrency);
|
|
2228
2255
|
}
|
|
2256
|
+
if (this.isGons) {
|
|
2257
|
+
const currency = constants.currencyList.find(item => item.code === applicationData.policyAppDto.currency);
|
|
2258
|
+
this.formStore.productConditionsForm.currency = currency ? currency : new Value();
|
|
2259
|
+
}
|
|
2229
2260
|
const riskGroup = this.riskGroup.find(item => {
|
|
2230
2261
|
if (applicationData.policyAppDto.riskGroup == 0) {
|
|
2231
2262
|
return true;
|
|
@@ -3310,10 +3341,12 @@ export const useDataStore = defineStore('data', {
|
|
|
3310
3341
|
|
|
3311
3342
|
if (Array.isArray(person.documents.document)) {
|
|
3312
3343
|
const filteredDocuments = person.documents.document.filter(i => new Date(i.endDate) > new Date(Date.now()) && i.status.code === '00');
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.
|
|
3316
|
-
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes
|
|
3344
|
+
|
|
3345
|
+
const validDocument = this.isLifetrip
|
|
3346
|
+
? filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS)
|
|
3347
|
+
: filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes['1UDL']) ??
|
|
3348
|
+
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.VNZ) ??
|
|
3349
|
+
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS);
|
|
3317
3350
|
if (validDocument) {
|
|
3318
3351
|
const documentType = this.documentTypes.find(
|
|
3319
3352
|
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(validDocument.type.code)],
|
|
@@ -3759,6 +3792,14 @@ export const useDataStore = defineStore('data', {
|
|
|
3759
3792
|
return ErrorHandler(err);
|
|
3760
3793
|
}
|
|
3761
3794
|
},
|
|
3795
|
+
async getBankByAccountNumber(accountNumber: string) {
|
|
3796
|
+
try {
|
|
3797
|
+
const bank = await this.api.getBankByAccountNumber(accountNumber);
|
|
3798
|
+
return bank;
|
|
3799
|
+
} catch (err) {
|
|
3800
|
+
return ErrorHandler(err);
|
|
3801
|
+
}
|
|
3802
|
+
},
|
|
3762
3803
|
async isCourseChanged(processInstanceId: string) {
|
|
3763
3804
|
try {
|
|
3764
3805
|
const response = await this.api.isCourseChanged(processInstanceId);
|