hl-core 0.0.8-beta.29 → 0.0.8-beta.30
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/index.ts +18 -0
- package/components/Form/ManagerAttachment.vue +1 -1
- package/components/Pages/Anketa.vue +19 -6
- package/components/Pages/Auth.vue +4 -4
- package/components/Pages/MemberForm.vue +70 -33
- package/components/Pages/ProductConditions.vue +56 -5
- package/components/Panel/PanelHandler.vue +2 -2
- package/composables/classes.ts +10 -0
- package/locales/en.json +3 -1
- package/locales/kz.json +3 -1
- package/locales/ru.json +5 -2
- package/package.json +1 -1
- package/store/data.store.js +98 -32
- package/store/rules.js +8 -0
package/api/index.ts
CHANGED
|
@@ -161,6 +161,10 @@ export class ApiClass {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
async getInsurancePay(): Promise<Value[]> {
|
|
165
|
+
return this.axiosCall({ method: Methods.GET, url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay' });
|
|
166
|
+
}
|
|
167
|
+
|
|
164
168
|
async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
|
|
165
169
|
return this.axiosCall({
|
|
166
170
|
method: Methods.GET,
|
|
@@ -168,6 +172,13 @@ export class ApiClass {
|
|
|
168
172
|
});
|
|
169
173
|
}
|
|
170
174
|
|
|
175
|
+
async getClientQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
|
|
176
|
+
return this.axiosCall({
|
|
177
|
+
method: Methods.GET,
|
|
178
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
171
182
|
async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
|
|
172
183
|
return this.axiosCall({
|
|
173
184
|
method: Methods.GET,
|
|
@@ -175,6 +186,13 @@ export class ApiClass {
|
|
|
175
186
|
});
|
|
176
187
|
}
|
|
177
188
|
|
|
189
|
+
async getClientQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
|
|
190
|
+
return this.axiosCall({
|
|
191
|
+
method: Methods.GET,
|
|
192
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
178
196
|
async definedAnswers(filter: string) {
|
|
179
197
|
return this.axiosCall({
|
|
180
198
|
method: Methods.GET,
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
53
53
|
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
54
54
|
<base-rounded-input
|
|
55
|
-
v-model="searchQuery"
|
|
55
|
+
v-model.trim="searchQuery"
|
|
56
56
|
:label="$t('labels.search')"
|
|
57
57
|
class="w-full p-2"
|
|
58
58
|
:hide-details="true"
|
|
@@ -69,7 +69,13 @@
|
|
|
69
69
|
</base-form-text-section>
|
|
70
70
|
</section>
|
|
71
71
|
</v-form>
|
|
72
|
-
<base-btn
|
|
72
|
+
<base-btn
|
|
73
|
+
class="my-[14px] self-center"
|
|
74
|
+
:loading="isButtonLoading"
|
|
75
|
+
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
76
|
+
@click="submitForm"
|
|
77
|
+
:text="$t('buttons.save')"
|
|
78
|
+
></base-btn>
|
|
73
79
|
</section>
|
|
74
80
|
<v-btn
|
|
75
81
|
v-if="secondQuestionList && secondQuestionList.length && firstPanel"
|
|
@@ -136,7 +142,15 @@ export default defineComponent({
|
|
|
136
142
|
const firstPanel = ref<boolean>(false);
|
|
137
143
|
const secondPanel = ref<boolean>(false);
|
|
138
144
|
const surveyType = ref<'health' | 'critical'>('tab' in route.query && route.query.tab === 'criticalBase' ? 'critical' : 'health');
|
|
139
|
-
const whichSurvey = computed(() =>
|
|
145
|
+
const whichSurvey = computed(() =>
|
|
146
|
+
surveyType.value === 'health'
|
|
147
|
+
? whichMember.value === 'insured'
|
|
148
|
+
? 'surveyByHealthBase'
|
|
149
|
+
: 'surveyByHealthBasePolicyholder'
|
|
150
|
+
: whichMember.value === 'insured'
|
|
151
|
+
? 'surveyByCriticalBase'
|
|
152
|
+
: 'surveyByCriticalBasePolicyholder',
|
|
153
|
+
);
|
|
140
154
|
const firstQuestionList = ref<AnketaBody[]>();
|
|
141
155
|
const secondQuestionList = ref<AnketaSecond[]>([]);
|
|
142
156
|
const currentQuestion = ref<AnketaBody>();
|
|
@@ -144,6 +158,7 @@ export default defineComponent({
|
|
|
144
158
|
const isPanelLoading = ref<boolean>(false);
|
|
145
159
|
const searchQuery = ref<string>('');
|
|
146
160
|
|
|
161
|
+
const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as string) : 'insured'));
|
|
147
162
|
const scrollForm = (direction: 'up' | 'down') => {
|
|
148
163
|
const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
|
|
149
164
|
if (firstPanel.value) {
|
|
@@ -259,9 +274,10 @@ export default defineComponent({
|
|
|
259
274
|
await dataStore.getQuestionList(
|
|
260
275
|
surveyType.value,
|
|
261
276
|
formStore.applicationData.processInstanceId,
|
|
262
|
-
formStore.applicationData.insuredApp[0].id,
|
|
277
|
+
whichMember.value === 'insured' ? formStore.applicationData.insuredApp[0].id : formStore.applicationData.clientApp.id,
|
|
263
278
|
whichSurvey.value,
|
|
264
279
|
surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond',
|
|
280
|
+
whichMember.value,
|
|
265
281
|
);
|
|
266
282
|
firstQuestionList.value = formStore[whichSurvey.value]!.body;
|
|
267
283
|
secondQuestionList.value = formStore[surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond']!;
|
|
@@ -275,9 +291,6 @@ export default defineComponent({
|
|
|
275
291
|
await dataStore.definedAnswers(question.first.id, whichSurvey.value);
|
|
276
292
|
}),
|
|
277
293
|
);
|
|
278
|
-
if (formStore.isDisabled.surveyByHealthBase) {
|
|
279
|
-
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
280
|
-
}
|
|
281
294
|
};
|
|
282
295
|
|
|
283
296
|
onMounted(async () => {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
|
|
27
27
|
<base-rounded-input
|
|
28
28
|
class="mb-1"
|
|
29
|
-
v-model="login"
|
|
29
|
+
v-model.trim="login"
|
|
30
30
|
:rules="$rules.required"
|
|
31
31
|
:loading="authLoading"
|
|
32
32
|
:placeholder="$t('buttons.userLogin')"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
></base-rounded-input>
|
|
36
36
|
<base-rounded-input
|
|
37
37
|
class="mb-1"
|
|
38
|
-
v-model="password"
|
|
38
|
+
v-model.trim="password"
|
|
39
39
|
:rules="$rules.required"
|
|
40
40
|
:loading="authLoading"
|
|
41
41
|
:placeholder="$t('buttons.password')"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
|
|
65
65
|
<base-rounded-input
|
|
66
66
|
v-if="resetPasswordType === 'phone'"
|
|
67
|
-
v-model="phone"
|
|
67
|
+
v-model.trim="phone"
|
|
68
68
|
:maska="$maska.phone"
|
|
69
69
|
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
70
70
|
:loading="authLoading"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
></base-rounded-input>
|
|
75
75
|
<base-rounded-input
|
|
76
76
|
v-if="resetPasswordType === 'email'"
|
|
77
|
-
v-model="email"
|
|
77
|
+
v-model.trim="email"
|
|
78
78
|
:rules="$rules.required.concat($rules.email)"
|
|
79
79
|
:loading="authLoading"
|
|
80
80
|
:placeholder="$t('form.email')"
|
|
@@ -49,25 +49,25 @@
|
|
|
49
49
|
:rules="$rules.required.concat($rules.iinRight)"
|
|
50
50
|
></base-form-input>
|
|
51
51
|
<base-form-input
|
|
52
|
-
v-model="member.lastName"
|
|
52
|
+
v-model.trim="member.lastName"
|
|
53
53
|
:readonly="isDisabled || isFromGBD"
|
|
54
54
|
:clearable="!isDisabled"
|
|
55
55
|
:label="$t('form.lastName')"
|
|
56
56
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
57
57
|
></base-form-input>
|
|
58
58
|
<base-form-input
|
|
59
|
-
v-model="member.firstName"
|
|
59
|
+
v-model.trim="member.firstName"
|
|
60
60
|
:readonly="isDisabled || isFromGBD"
|
|
61
61
|
:clearable="!isDisabled"
|
|
62
62
|
:label="$t('form.firstName')"
|
|
63
63
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
64
64
|
></base-form-input>
|
|
65
65
|
<base-form-input
|
|
66
|
-
v-model="member.middleName"
|
|
66
|
+
v-model.trim="member.middleName"
|
|
67
67
|
:readonly="isDisabled || isFromGBD"
|
|
68
68
|
:clearable="!isDisabled"
|
|
69
69
|
:label="$t('form.middleName')"
|
|
70
|
-
:rules="$rules.
|
|
70
|
+
:rules="$rules.cyrillicNonRequired"
|
|
71
71
|
></base-form-input>
|
|
72
72
|
<base-form-input
|
|
73
73
|
v-model="member.birthDate"
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
@append="openPanel($t('form.gender'), $dataStore.gender, 'gender')"
|
|
91
91
|
></base-panel-input>
|
|
92
92
|
<base-panel-input
|
|
93
|
+
v-if="hasFamilyStatus"
|
|
93
94
|
v-model="member.familyStatus"
|
|
94
95
|
:value="member.familyStatus.nameRu"
|
|
95
96
|
:readonly="isDisabled"
|
|
@@ -113,8 +114,8 @@
|
|
|
113
114
|
<base-form-input
|
|
114
115
|
v-if="whichForm === formStore.beneficiaryFormKey"
|
|
115
116
|
v-model="member.percentageOfPayoutAmount"
|
|
116
|
-
:readonly="isDisabled"
|
|
117
|
-
:clearable="!isDisabled"
|
|
117
|
+
:readonly="memberSetting.isMultiple === false ? true : isDisabled"
|
|
118
|
+
:clearable="memberSetting.isMultiple === false ? false : !isDisabled"
|
|
118
119
|
:label="$t('form.percentageOfPayoutAmount')"
|
|
119
120
|
:rules="$rules.required.concat($rules.numbers)"
|
|
120
121
|
></base-form-input>
|
|
@@ -122,35 +123,35 @@
|
|
|
122
123
|
</base-form-section>
|
|
123
124
|
<base-form-section :title="$t('policyholdersRepresentative.PowerOfAttorney')" v-if="whichForm === formStore.policyholdersRepresentativeFormKey">
|
|
124
125
|
<base-form-input
|
|
125
|
-
v-model="member.fullNameRod"
|
|
126
|
+
v-model.trim="member.fullNameRod"
|
|
126
127
|
:label="$t('policyholdersRepresentative.NameParentCase')"
|
|
127
128
|
:readonly="isDisabled"
|
|
128
129
|
:clearable="!isDisabled"
|
|
129
130
|
:rules="$rules.required"
|
|
130
131
|
></base-form-input>
|
|
131
132
|
<base-form-input
|
|
132
|
-
v-model="member.confirmDocTypeKz"
|
|
133
|
+
v-model.trim="member.confirmDocTypeKz"
|
|
133
134
|
:label="$t('policyholdersRepresentative.basisDocKz')"
|
|
134
135
|
:readonly="isDisabled"
|
|
135
136
|
:clearable="!isDisabled"
|
|
136
137
|
:rules="$rules.required"
|
|
137
138
|
></base-form-input>
|
|
138
139
|
<base-form-input
|
|
139
|
-
v-model="member.confirmDocType"
|
|
140
|
+
v-model.trim="member.confirmDocType"
|
|
140
141
|
:label="$t('policyholdersRepresentative.basisDocRu')"
|
|
141
142
|
:readonly="isDisabled"
|
|
142
143
|
:clearable="!isDisabled"
|
|
143
144
|
:rules="$rules.required"
|
|
144
145
|
></base-form-input>
|
|
145
146
|
<base-form-input
|
|
146
|
-
v-model="member.confirmDocTypeRod"
|
|
147
|
+
v-model.trim="member.confirmDocTypeRod"
|
|
147
148
|
:label="$t('policyholdersRepresentative.basisDocRuParentCase')"
|
|
148
149
|
:readonly="isDisabled"
|
|
149
150
|
:clearable="!isDisabled"
|
|
150
151
|
:rules="$rules.required"
|
|
151
152
|
></base-form-input>
|
|
152
153
|
<base-form-input
|
|
153
|
-
v-model="member.confirmDocNumber"
|
|
154
|
+
v-model.trim="member.confirmDocNumber"
|
|
154
155
|
:label="$t('policyholdersRepresentative.numberDoc')"
|
|
155
156
|
:readonly="isDisabled"
|
|
156
157
|
:clearable="!isDisabled"
|
|
@@ -174,7 +175,7 @@
|
|
|
174
175
|
:maska="$maska.date"
|
|
175
176
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
176
177
|
></base-form-input>
|
|
177
|
-
<base-form-input v-model="member.migrationCard" :label="$t('policyholdersRepresentative.numberVisa')"></base-form-input>
|
|
178
|
+
<base-form-input v-model.trim="member.migrationCard" :label="$t('policyholdersRepresentative.numberVisa')"></base-form-input>
|
|
178
179
|
<base-form-input
|
|
179
180
|
v-model="member.migrationCardIssueDate"
|
|
180
181
|
:label="$t('form.documentDate')"
|
|
@@ -200,21 +201,21 @@
|
|
|
200
201
|
:title="$t('policyholdersRepresentative.confirmAuthority')"
|
|
201
202
|
></base-form-toggle>
|
|
202
203
|
<base-form-input
|
|
203
|
-
v-model="member.notaryLongName"
|
|
204
|
+
v-model.trim="member.notaryLongName"
|
|
204
205
|
:label="$t('policyholdersRepresentative.name')"
|
|
205
206
|
:readonly="isDisabled"
|
|
206
207
|
:clearable="!isDisabled"
|
|
207
208
|
:rules="formStore.policyholdersRepresentativeForm.isNotary ? $rules.required : []"
|
|
208
209
|
></base-form-input>
|
|
209
210
|
<base-form-input
|
|
210
|
-
v-model="member.notaryLicenseNumber"
|
|
211
|
+
v-model.trim="member.notaryLicenseNumber"
|
|
211
212
|
:label="$t('policyholdersRepresentative.numberLicense')"
|
|
212
213
|
:readonly="isDisabled"
|
|
213
214
|
:clearable="!isDisabled"
|
|
214
215
|
:rules="formStore.policyholdersRepresentativeForm.isNotary ? $rules.required : []"
|
|
215
216
|
></base-form-input>
|
|
216
217
|
<base-form-input
|
|
217
|
-
v-model="member.notaryLicenseIssuer"
|
|
218
|
+
v-model.trim="member.notaryLicenseIssuer"
|
|
218
219
|
:label="$t('policyholdersRepresentative.documentIssuers')"
|
|
219
220
|
:readonly="isDisabled"
|
|
220
221
|
:clearable="!isDisabled"
|
|
@@ -231,9 +232,9 @@
|
|
|
231
232
|
></base-form-input>
|
|
232
233
|
</base-form-section>
|
|
233
234
|
<base-form-section :title="$t('form.jobData')" v-if="$dataStore.hasJobSection(whichForm)">
|
|
234
|
-
<base-form-input v-model="member.job" :label="$t('form.job')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
235
|
-
<base-form-input v-model="member.jobPosition" :label="$t('form.jobPosition')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
236
|
-
<base-form-input v-model="member.jobPlace" :label="$t('form.jobPlace')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
235
|
+
<base-form-input v-model.trim="member.job" :label="$t('form.job')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
236
|
+
<base-form-input v-model.trim="member.jobPosition" :label="$t('form.jobPosition')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
237
|
+
<base-form-input v-model.trim="member.jobPlace" :label="$t('form.jobPlace')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required"></base-form-input>
|
|
237
238
|
</base-form-section>
|
|
238
239
|
<base-form-section :title="$t('form.placeRegistration')" v-if="$dataStore.hasPlaceSection(whichForm)">
|
|
239
240
|
<base-form-toggle
|
|
@@ -298,23 +299,23 @@
|
|
|
298
299
|
></base-panel-input>
|
|
299
300
|
<!-- <base-form-input v-if="$dataStore.isGons" v-model="member.postIndex" :readonly="isDisabled"
|
|
300
301
|
:clearable="!isDisabled" :label="$t('form.postIndex')" :maska="$maska.post"></base-form-input> -->
|
|
301
|
-
<base-form-input v-model="member.registrationQuarter" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.Quarter')"></base-form-input>
|
|
302
|
-
<base-form-input v-model="member.registrationMicroDistrict" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.MicroDistrict')"></base-form-input>
|
|
302
|
+
<base-form-input v-model.trim="member.registrationQuarter" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.Quarter')"></base-form-input>
|
|
303
|
+
<base-form-input v-model.trim="member.registrationMicroDistrict" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.MicroDistrict')"></base-form-input>
|
|
303
304
|
<base-form-input
|
|
304
|
-
v-model="member.registrationStreet"
|
|
305
|
+
v-model.trim="member.registrationStreet"
|
|
305
306
|
:rules="$rules.required"
|
|
306
307
|
:readonly="isDisabled"
|
|
307
308
|
:clearable="!isDisabled"
|
|
308
309
|
:label="$t('form.Street')"
|
|
309
310
|
></base-form-input>
|
|
310
311
|
<base-form-input
|
|
311
|
-
v-model="member.registrationNumberHouse"
|
|
312
|
+
v-model.trim="member.registrationNumberHouse"
|
|
312
313
|
:rules="$rules.required"
|
|
313
314
|
:readonly="isDisabled"
|
|
314
315
|
:clearable="!isDisabled"
|
|
315
316
|
:label="$t('form.NumberHouse')"
|
|
316
317
|
></base-form-input>
|
|
317
|
-
<base-form-input v-model="member.registrationNumberApartment" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.NumberApartment')"></base-form-input>
|
|
318
|
+
<base-form-input v-model.trim="member.registrationNumberApartment" :readonly="isDisabled" :clearable="!isDisabled" :label="$t('form.NumberApartment')"></base-form-input>
|
|
318
319
|
</div>
|
|
319
320
|
</base-fade-transition>
|
|
320
321
|
</base-form-section>
|
|
@@ -353,7 +354,7 @@
|
|
|
353
354
|
@append="openPanel($t('form.documentType'), [], 'documentType', $dataStore.getDocumentTypes)"
|
|
354
355
|
></base-panel-input>
|
|
355
356
|
<base-form-input
|
|
356
|
-
v-model="member.documentNumber"
|
|
357
|
+
v-model.trim="member.documentNumber"
|
|
357
358
|
:label="$t('form.documentNumber')"
|
|
358
359
|
:readonly="isDisabled"
|
|
359
360
|
:clearable="!isDisabled"
|
|
@@ -458,6 +459,17 @@
|
|
|
458
459
|
append-inner-icon="mdi mdi-chevron-right"
|
|
459
460
|
@append="openPanel($t('form.economySectorCode'), [], 'economySectorCode', $dataStore.getSectorCodeList)"
|
|
460
461
|
></base-panel-input>
|
|
462
|
+
<base-panel-input
|
|
463
|
+
v-if="hasInsurancePay"
|
|
464
|
+
v-model="member.insurancePay"
|
|
465
|
+
:value="member.insurancePay.nameRu"
|
|
466
|
+
:readonly="isDisabled"
|
|
467
|
+
:clearable="!isDisabled"
|
|
468
|
+
:rules="$rules.objectRequired"
|
|
469
|
+
:label="$t('form.insurancePay')"
|
|
470
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
471
|
+
@append="openPanel($t('form.insurancePay'), $dataStore.insurancePay, 'insurancePay', $dataStore.getInsurancePay)"
|
|
472
|
+
></base-panel-input>
|
|
461
473
|
</base-form-section>
|
|
462
474
|
<base-form-section :title="$t('form.contactsData')" v-if="$dataStore.hasContactSection(whichForm)">
|
|
463
475
|
<base-form-input
|
|
@@ -636,6 +648,23 @@ export default {
|
|
|
636
648
|
return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
637
649
|
});
|
|
638
650
|
|
|
651
|
+
const hasFamilyStatus = computed(() => {
|
|
652
|
+
if (whichForm.value === formStore.beneficiaryFormKey) {
|
|
653
|
+
if (dataStore.isBolashak) {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return true;
|
|
658
|
+
});
|
|
659
|
+
const hasInsurancePay = computed(() => {
|
|
660
|
+
if (whichForm.value === formStore.beneficiaryFormKey) {
|
|
661
|
+
if (dataStore.isBolashak || dataStore.isLiferenta) {
|
|
662
|
+
return true;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
return false;
|
|
666
|
+
});
|
|
667
|
+
|
|
639
668
|
const birthDateRule = computed(() => {
|
|
640
669
|
const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
|
|
641
670
|
const byMemverAndProductRule = () => {
|
|
@@ -1216,15 +1245,21 @@ export default {
|
|
|
1216
1245
|
watch(
|
|
1217
1246
|
() => member.value.percentageOfPayoutAmount,
|
|
1218
1247
|
val => {
|
|
1219
|
-
if (
|
|
1248
|
+
if (whichForm.value === formStore.beneficiaryFormKey && !isDisabled.value) {
|
|
1220
1249
|
const percentage = typeof val === 'string' ? Number(val) : val;
|
|
1221
|
-
if (percentage) {
|
|
1222
|
-
if (
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1250
|
+
if (typeof percentage === 'number') {
|
|
1251
|
+
if (memberSetting.value.isMultiple) {
|
|
1252
|
+
if (percentage < 0) {
|
|
1253
|
+
member.value.percentageOfPayoutAmount = 0;
|
|
1254
|
+
dataStore.showToaster('error', dataStore.t('toaster.incorrectInput'), 1000);
|
|
1255
|
+
} else if (percentage > 100) {
|
|
1256
|
+
member.value.percentageOfPayoutAmount = 100;
|
|
1257
|
+
dataStore.showToaster('error', dataStore.t('toaster.incorrectInput'), 1000);
|
|
1258
|
+
}
|
|
1259
|
+
} else {
|
|
1260
|
+
if (member.value.percentageOfPayoutAmount !== 100) {
|
|
1261
|
+
member.value.percentageOfPayoutAmount = 100;
|
|
1262
|
+
}
|
|
1228
1263
|
}
|
|
1229
1264
|
}
|
|
1230
1265
|
}
|
|
@@ -1234,7 +1269,7 @@ export default {
|
|
|
1234
1269
|
watch(
|
|
1235
1270
|
() => member.value.birthDate,
|
|
1236
1271
|
val => {
|
|
1237
|
-
if (val && val.length === useMask().date.length
|
|
1272
|
+
if (val && val.length === useMask().date.length) {
|
|
1238
1273
|
const calculatedAge = member.value.getAgeByBirthDate();
|
|
1239
1274
|
if (calculatedAge) member.value.age = calculatedAge;
|
|
1240
1275
|
}
|
|
@@ -1315,6 +1350,8 @@ export default {
|
|
|
1315
1350
|
hasGBDFL,
|
|
1316
1351
|
hasInsis,
|
|
1317
1352
|
hasGKB,
|
|
1353
|
+
hasFamilyStatus,
|
|
1354
|
+
hasInsurancePay,
|
|
1318
1355
|
|
|
1319
1356
|
// Rules
|
|
1320
1357
|
ageRule,
|
|
@@ -13,6 +13,30 @@
|
|
|
13
13
|
subtitle="Если несовершеннолетний не достиг возраста 14 лет - законному представителю в соответствии с законодательством Республики Казахстан"
|
|
14
14
|
></base-form-text-section>
|
|
15
15
|
</base-form-section>
|
|
16
|
+
<base-form-section v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition" :title="$t('policyholderForm')">
|
|
17
|
+
<base-form-input
|
|
18
|
+
v-model="productConditionsForm.lifeMultiplyClient"
|
|
19
|
+
:maska="$maska.numbers"
|
|
20
|
+
:clearable="isRecalculationDisabled === false"
|
|
21
|
+
:label="$t('percent') + `Life Multiply`"
|
|
22
|
+
:readonly="isRecalculationDisabled"
|
|
23
|
+
:rules="$dataStore.rules.recalculationMultiply"
|
|
24
|
+
></base-form-input>
|
|
25
|
+
<base-form-input
|
|
26
|
+
v-model="productConditionsForm.lifeAdditiveClient"
|
|
27
|
+
:maska="$maska.numbers"
|
|
28
|
+
:clearable="isRecalculationDisabled === false"
|
|
29
|
+
:label="$t('percent') + `Life Additive`"
|
|
30
|
+
:readonly="isRecalculationDisabled"
|
|
31
|
+
:rules="$dataStore.rules.recalculationAdditive"
|
|
32
|
+
></base-form-input>
|
|
33
|
+
<base-form-input v-model="formStore.policyholderForm.longName" :label="$t('labels.policyholderLongName')" :readonly="true"> </base-form-input>
|
|
34
|
+
<base-form-input v-model="formStore.policyholderForm.job" :label="$t('form.job')" :readonly="true"> </base-form-input>
|
|
35
|
+
<base-form-input v-model="formStore.policyholderForm.jobPosition" :label="$t('form.jobPosition')" :readonly="true"> </base-form-input>
|
|
36
|
+
<base-form-input v-model="formStore.policyholderForm.birthDate" :label="$t('form.birthDate')" :readonly="true"> </base-form-input>
|
|
37
|
+
<base-form-input v-model="formStore.policyholderForm.age" :label="$t('form.age')" :readonly="true"> </base-form-input>
|
|
38
|
+
<base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$t('form.gender')" :readonly="true"> </base-form-input>
|
|
39
|
+
</base-form-section>
|
|
16
40
|
<base-form-section v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true" :title="$t('insuredForm')">
|
|
17
41
|
<div v-for="(insured, index) of formStore.insuredForm" :key="index">
|
|
18
42
|
<base-form-input v-model="insured.longName" :label="$t('labels.insurerLongName')" :readonly="true"> </base-form-input>
|
|
@@ -208,7 +232,11 @@
|
|
|
208
232
|
v-model="productConditionsForm.guaranteedPeriod"
|
|
209
233
|
:readonly="isDisabled"
|
|
210
234
|
:clearable="!isDisabled"
|
|
211
|
-
:rules="
|
|
235
|
+
:rules="
|
|
236
|
+
productConditionsForm.termAnnuityPayments
|
|
237
|
+
? [$dataStore.rules.guaranteedPeriodLimit(productConditionsForm.guaranteedPeriod, productConditionsForm.termAnnuityPayments)]
|
|
238
|
+
: []
|
|
239
|
+
"
|
|
212
240
|
:label="$t('productConditionsForm.guaranteedPeriod')"
|
|
213
241
|
></base-form-input>
|
|
214
242
|
<base-panel-input
|
|
@@ -237,7 +265,9 @@
|
|
|
237
265
|
:rules="$rules.objectRequired"
|
|
238
266
|
:label="$t('productConditionsForm.periodAnnuityPayment')"
|
|
239
267
|
append-inner-icon="mdi mdi-chevron-right"
|
|
240
|
-
@append="
|
|
268
|
+
@append="
|
|
269
|
+
openPanel($t('productConditionsForm.processPaymentPeriod'), $dataStore.processAnnuityPaymentPeriod, 'periodAnnuityPayment', $dataStore.getProcessAnnuityPaymentPeriod)
|
|
270
|
+
"
|
|
241
271
|
></base-panel-input>
|
|
242
272
|
<base-form-input
|
|
243
273
|
v-model="productConditionsForm.amountAnnuityPayments"
|
|
@@ -250,6 +280,7 @@
|
|
|
250
280
|
<base-form-section v-if="additionalTerms && additionalTerms.length" :title="$t('productConditionsForm.additional')">
|
|
251
281
|
<div v-for="(term, index) of additionalTerms" :key="index">
|
|
252
282
|
<base-panel-input
|
|
283
|
+
v-if="filterTermConditions(term)"
|
|
253
284
|
v-model="additionalTerms[index]"
|
|
254
285
|
:value="term.coverSumName"
|
|
255
286
|
:readonly="isDisabled"
|
|
@@ -275,7 +306,7 @@
|
|
|
275
306
|
</div>
|
|
276
307
|
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
277
308
|
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
278
|
-
<base-rounded-input v-model="searchQuery" :label="$t('labels.search')" class="w-full p-2" :hide-details="true"></base-rounded-input>
|
|
309
|
+
<base-rounded-input v-model.trim="searchQuery" :label="$t('labels.search')" class="w-full p-2" :hide-details="true"></base-rounded-input>
|
|
279
310
|
<div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
280
311
|
<base-panel-select-item :text="$t('form.notChosen')" :selected="panelValue.nameRu === null" @click="pickPanelValue(new Value())"></base-panel-select-item>
|
|
281
312
|
<base-panel-select-item
|
|
@@ -291,7 +322,7 @@
|
|
|
291
322
|
</Teleport>
|
|
292
323
|
<Teleport v-if="isTermsPanelOpen" to="#panel-actions">
|
|
293
324
|
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
294
|
-
<base-rounded-input v-model="searchQuery" :label="$t('labels.search')" class="w-full p-2" :hide-details="true"></base-rounded-input>
|
|
325
|
+
<base-rounded-input v-model.trim="searchQuery" :label="$t('labels.search')" class="w-full p-2" :hide-details="true"></base-rounded-input>
|
|
295
326
|
<div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
296
327
|
<base-panel-select-item
|
|
297
328
|
v-for="(item, index) of panelList.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
|
|
@@ -498,7 +529,7 @@ export default defineComponent({
|
|
|
498
529
|
};
|
|
499
530
|
|
|
500
531
|
const filterList = (list: Value[], key: string) => {
|
|
501
|
-
if (
|
|
532
|
+
if (whichProduct.value === 'baiterek') {
|
|
502
533
|
if (dataStore.isManagerHalykBank()) {
|
|
503
534
|
if (key === 'paymentPeriod') return list.filter(i => i.code !== 'single');
|
|
504
535
|
}
|
|
@@ -615,6 +646,13 @@ export default defineComponent({
|
|
|
615
646
|
productConditionsForm.insurancePremiumPerMonthInDollar = null;
|
|
616
647
|
};
|
|
617
648
|
|
|
649
|
+
const filterTermConditions = (term: AddCover) => {
|
|
650
|
+
if (term.coverTypeCode === 10) {
|
|
651
|
+
return !!formStore.insuredForm.find(member => member.iin === formStore.policyholderForm.iin) === false;
|
|
652
|
+
}
|
|
653
|
+
return true;
|
|
654
|
+
};
|
|
655
|
+
|
|
618
656
|
const submitForm = async () => {
|
|
619
657
|
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
620
658
|
if (v.valid) {
|
|
@@ -642,6 +680,8 @@ export default defineComponent({
|
|
|
642
680
|
type recalculationInfo = {
|
|
643
681
|
lifeMultiply: string | null;
|
|
644
682
|
lifeAdditive: string | null;
|
|
683
|
+
lifeMultiplyClient?: number | null;
|
|
684
|
+
lifeAdditiveClient?: number | null;
|
|
645
685
|
adbMultiply: string | null;
|
|
646
686
|
adbAdditive: string | null;
|
|
647
687
|
disabilityMultiply: string | null;
|
|
@@ -662,6 +702,16 @@ export default defineComponent({
|
|
|
662
702
|
// @ts-ignore
|
|
663
703
|
recalculationData[key] = formatProcents(recalculationData[key]);
|
|
664
704
|
});
|
|
705
|
+
recalculationData.lifeMultiplyClient = dataStore.isClientAnketaCondition
|
|
706
|
+
? formStore.productConditionsForm.lifeMultiplyClient === null
|
|
707
|
+
? null
|
|
708
|
+
: formatProcents(formStore.productConditionsForm.lifeMultiplyClient)
|
|
709
|
+
: null;
|
|
710
|
+
recalculationData.lifeAdditiveClient = dataStore.isClientAnketaCondition
|
|
711
|
+
? formStore.productConditionsForm.lifeAdditiveClient === null
|
|
712
|
+
? null
|
|
713
|
+
: formatProcents(formStore.productConditionsForm.lifeAdditiveClient)
|
|
714
|
+
: null;
|
|
665
715
|
recalculationData.amount = Number((productConditionsForm.requestedSumInsured as string)?.replace(/\s/g, ''));
|
|
666
716
|
recalculationData.premium = Number((productConditionsForm.insurancePremiumPerMonth as string)?.replace(/\s/g, ''));
|
|
667
717
|
recalculationData.riskGroup = productConditionsForm.riskGroup?.id ? productConditionsForm.riskGroup.id : 1;
|
|
@@ -858,6 +908,7 @@ export default defineComponent({
|
|
|
858
908
|
onClearPremiumDollar,
|
|
859
909
|
clearFields,
|
|
860
910
|
formatTermValue,
|
|
911
|
+
filterTermConditions,
|
|
861
912
|
};
|
|
862
913
|
},
|
|
863
914
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<section v-if="sendingActions">
|
|
3
3
|
<div :class="[$libStyles.flexColNav]">
|
|
4
4
|
<v-form ref="vForm">
|
|
5
|
-
<base-rounded-input v-model="actionCause" placeholder="Причина" :rules="$rules.required"></base-rounded-input>
|
|
5
|
+
<base-rounded-input v-model.trim="actionCause" placeholder="Причина" :rules="$rules.required"></base-rounded-input>
|
|
6
6
|
</v-form>
|
|
7
7
|
<base-btn :text="buttonText" :loading="loading" @click="submitForm"></base-btn>
|
|
8
8
|
</div>
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<div :class="[$libStyles.flexColNav]">
|
|
94
94
|
<v-form ref="vForm">
|
|
95
95
|
<base-content-block class="flex flex-col gap-3">
|
|
96
|
-
<base-form-input v-model="formStore.affilationResolution.number" :rules="$rules.required" :label="$t('form.documentNumber')"></base-form-input>
|
|
96
|
+
<base-form-input v-model.trim="formStore.affilationResolution.number" :rules="$rules.required" :label="$t('form.documentNumber')"></base-form-input>
|
|
97
97
|
<base-form-input
|
|
98
98
|
v-model="formStore.affilationResolution.date"
|
|
99
99
|
:maska="$maska.date"
|
package/composables/classes.ts
CHANGED
|
@@ -899,6 +899,7 @@ export class DataStoreClass {
|
|
|
899
899
|
documentIssuers: Value[];
|
|
900
900
|
familyStatuses: Value[];
|
|
901
901
|
relations: Value[];
|
|
902
|
+
insurancePay: Value[];
|
|
902
903
|
questionRefs: Value[];
|
|
903
904
|
residents: Value[];
|
|
904
905
|
ipdl: Value[];
|
|
@@ -1040,6 +1041,7 @@ export class DataStoreClass {
|
|
|
1040
1041
|
this.documentIssuers = [];
|
|
1041
1042
|
this.familyStatuses = [];
|
|
1042
1043
|
this.relations = [];
|
|
1044
|
+
this.insurancePay = [];
|
|
1043
1045
|
this.residents = [];
|
|
1044
1046
|
this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
|
|
1045
1047
|
this.economySectorCode = [];
|
|
@@ -1119,12 +1121,16 @@ export class FormStoreClass {
|
|
|
1119
1121
|
};
|
|
1120
1122
|
signedDocumentList: IDocument[];
|
|
1121
1123
|
surveyByHealthBase: AnketaFirst | null;
|
|
1124
|
+
surveyByHealthBasePolicyholder: AnketaFirst | null;
|
|
1122
1125
|
surveyByCriticalBase: AnketaFirst | null;
|
|
1126
|
+
surveyByCriticalBasePolicyholder: AnketaFirst | null;
|
|
1123
1127
|
surveyByHealthSecond: AnketaSecond[] | null;
|
|
1124
1128
|
surveyByCriticalSecond: AnketaSecond[] | null;
|
|
1125
1129
|
definedAnswersId: {
|
|
1126
1130
|
surveyByHealthBase: any;
|
|
1127
1131
|
surveyByCriticalBase: any;
|
|
1132
|
+
surveyByHealthBasePolicyholder: any;
|
|
1133
|
+
surveyByCriticalBasePolicyholder: any;
|
|
1128
1134
|
};
|
|
1129
1135
|
birthInfos: BirthInfoGKB[];
|
|
1130
1136
|
SaleChanellPolicy: Value;
|
|
@@ -1199,12 +1205,16 @@ export class FormStoreClass {
|
|
|
1199
1205
|
};
|
|
1200
1206
|
this.signedDocumentList = [];
|
|
1201
1207
|
this.surveyByHealthBase = null;
|
|
1208
|
+
this.surveyByHealthBasePolicyholder = null;
|
|
1202
1209
|
this.surveyByCriticalBase = null;
|
|
1210
|
+
this.surveyByCriticalBasePolicyholder = null;
|
|
1203
1211
|
this.surveyByHealthSecond = null;
|
|
1204
1212
|
this.surveyByCriticalSecond = null;
|
|
1205
1213
|
this.definedAnswersId = {
|
|
1206
1214
|
surveyByHealthBase: {},
|
|
1207
1215
|
surveyByCriticalBase: {},
|
|
1216
|
+
surveyByHealthBasePolicyholder: {},
|
|
1217
|
+
surveyByCriticalBasePolicyholder: {},
|
|
1208
1218
|
};
|
|
1209
1219
|
this.birthInfos = [];
|
|
1210
1220
|
this.SaleChanellPolicy = new Value();
|
package/locales/en.json
CHANGED
|
@@ -453,6 +453,7 @@
|
|
|
453
453
|
"iin&bin": "IIN/BIN",
|
|
454
454
|
"insurerIin": "Insured IIN",
|
|
455
455
|
"insurerLongName": "Insured Full Name",
|
|
456
|
+
"policyholderLongName": "Policyholder Full Name",
|
|
456
457
|
"jsonObject": "JSON value",
|
|
457
458
|
"epayPage": "ePay page"
|
|
458
459
|
},
|
|
@@ -572,7 +573,8 @@
|
|
|
572
573
|
"salesChanell": "Sales Channel",
|
|
573
574
|
"manager": "Manager",
|
|
574
575
|
"attachManager": "Manager",
|
|
575
|
-
"agent": "Agent"
|
|
576
|
+
"agent": "Agent",
|
|
577
|
+
"insurancePay": "Insurance payment is subject to implementation"
|
|
576
578
|
},
|
|
577
579
|
"agreementBlock": {
|
|
578
580
|
"title": "Consent to the collection and processing of personal data",
|
package/locales/kz.json
CHANGED
|
@@ -453,6 +453,7 @@
|
|
|
453
453
|
"iin&bin": "ІИН/БИН",
|
|
454
454
|
"insurerIin": "Cақтанушының ІИН",
|
|
455
455
|
"insurerLongName": "Cақтанушының толық аты-жөні",
|
|
456
|
+
"policyholderLongName": "Cақтандырушының толық аты-жөні",
|
|
456
457
|
"jsonObject": "JSON мәні",
|
|
457
458
|
"epayPage": "ePay беті"
|
|
458
459
|
},
|
|
@@ -572,7 +573,8 @@
|
|
|
572
573
|
"salesChanell": "Сатып алу каналы",
|
|
573
574
|
"manager": "Менеджер",
|
|
574
575
|
"attachManager": "Менеджерге байланысу",
|
|
575
|
-
"agent": "Агент"
|
|
576
|
+
"agent": "Агент",
|
|
577
|
+
"insurancePay": "Сақтандыру төлемі жүзеге асырылуға жатады"
|
|
576
578
|
},
|
|
577
579
|
"agreementBlock": {
|
|
578
580
|
"title": "Жеке деректерді топтай жинау мен өңдеу туралы келісім",
|
package/locales/ru.json
CHANGED
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"timer": "Вы создали счет на оплату, через 00:59 сек счет станет не активным"
|
|
199
199
|
},
|
|
200
200
|
"questionnaireType": {
|
|
201
|
-
"byHealth": "Анкета по здоровью
|
|
201
|
+
"byHealth": "Анкета по здоровью Застрахованного",
|
|
202
|
+
"byHealthPolicyholder": "Анкета по здоровью Страхователя",
|
|
202
203
|
"byCritical": "Анкета по критической болезни Застрахованного",
|
|
203
204
|
"answerAllNo": "Ответить везде \"Нет\"",
|
|
204
205
|
"pleaseAnswer": "Пожалуйста ответьте на {text} вопросов"
|
|
@@ -453,6 +454,7 @@
|
|
|
453
454
|
"iin&bin": "ИИН/БИН",
|
|
454
455
|
"insurerIin": "ИИН застрахованного",
|
|
455
456
|
"insurerLongName": "ФИО застрахованного",
|
|
457
|
+
"policyholderLongName": "ФИО страхователя",
|
|
456
458
|
"jsonObject": "JSON значение",
|
|
457
459
|
"epayPage": "Страница на ePay"
|
|
458
460
|
},
|
|
@@ -573,7 +575,8 @@
|
|
|
573
575
|
"salesChanell": " Канал продаж",
|
|
574
576
|
"manager": "Менеджер",
|
|
575
577
|
"attachManager": "Менеджер",
|
|
576
|
-
"agent": "Агент"
|
|
578
|
+
"agent": "Агент",
|
|
579
|
+
"insurancePay": "Страховая выплата подлежит осуществлению"
|
|
577
580
|
},
|
|
578
581
|
"agreementBlock": {
|
|
579
582
|
"title": "Согласие на сбор и обработку пресональных данных",
|
package/package.json
CHANGED
package/store/data.store.js
CHANGED
|
@@ -45,6 +45,10 @@ export const useDataStore = defineStore('data', {
|
|
|
45
45
|
isCalculator: state => state.product === 'calculator',
|
|
46
46
|
isComplianceWindow: state => state.product === 'compliance',
|
|
47
47
|
isEveryFormDisabled: state => Object.values(state.formStore.isDisabled).every(i => i === true),
|
|
48
|
+
hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
|
|
49
|
+
isClientAnketaCondition: state =>
|
|
50
|
+
!state.formStore.insuredForm.find(member => member.iin === state.formStore.policyholderForm.iin) &&
|
|
51
|
+
!!state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10 && i.coverSumCode === 'included'),
|
|
48
52
|
},
|
|
49
53
|
actions: {
|
|
50
54
|
isIframe() {
|
|
@@ -511,7 +515,7 @@ export const useDataStore = defineStore('data', {
|
|
|
511
515
|
if (contact.type === 'EMAIL' && contact.value) {
|
|
512
516
|
member.email = contact.value;
|
|
513
517
|
}
|
|
514
|
-
if (contact.type === 'MOBILE' && contact.value) {
|
|
518
|
+
if (contact.type === 'MOBILE' && contact.value && !member.phoneNumber) {
|
|
515
519
|
let phoneNumber = contact.value.substring(1);
|
|
516
520
|
member.phoneNumber = `+7 (${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(3, 6)} ${phoneNumber.slice(6, 8)} ${phoneNumber.slice(8)}`;
|
|
517
521
|
}
|
|
@@ -825,15 +829,9 @@ export const useDataStore = defineStore('data', {
|
|
|
825
829
|
data.isNotary = member.isNotary;
|
|
826
830
|
}
|
|
827
831
|
if (whichMember === 'Insured') {
|
|
828
|
-
if (
|
|
829
|
-
this.formStore.applicationData &&
|
|
830
|
-
this.formStore.applicationData.insuredApp &&
|
|
831
|
-
this.formStore.applicationData.insuredApp.length
|
|
832
|
-
) {
|
|
832
|
+
if (this.formStore.applicationData && this.formStore.applicationData.insuredApp && this.formStore.applicationData.insuredApp.length) {
|
|
833
833
|
await this.deleteInsuredLogic();
|
|
834
|
-
if(
|
|
835
|
-
this.formStore.applicationData.insuredApp.every(i => i.iin !== data.iin) &&
|
|
836
|
-
data.id !== null) {
|
|
834
|
+
if (this.formStore.applicationData.insuredApp.every(i => i.iin !== data.iin) && data.id !== null) {
|
|
837
835
|
await this.api.deleteMember('Insured', data.id);
|
|
838
836
|
delete data.id;
|
|
839
837
|
}
|
|
@@ -862,6 +860,9 @@ export const useDataStore = defineStore('data', {
|
|
|
862
860
|
data.percentage = Number(member.percentageOfPayoutAmount);
|
|
863
861
|
data.relationId = member.relationDegree.ids;
|
|
864
862
|
data.relationName = member.relationDegree.nameRu;
|
|
863
|
+
if (this.isLiferenta || this.isBolashak) {
|
|
864
|
+
data.beneficiaryInsurancePayId = member.insurancePay.id;
|
|
865
|
+
}
|
|
865
866
|
}
|
|
866
867
|
if (whichMember === 'BeneficialOwner') {
|
|
867
868
|
if (data.id === 0) {
|
|
@@ -1066,6 +1067,9 @@ export const useDataStore = defineStore('data', {
|
|
|
1066
1067
|
async getProcessAnnuityPaymentPeriod() {
|
|
1067
1068
|
return await this.getFromApi('processAnnuityPaymentPeriod', 'getProcessAnnuityPaymentPeriod', this.processCode);
|
|
1068
1069
|
},
|
|
1070
|
+
async getInsurancePay() {
|
|
1071
|
+
return await this.getFromApi('insurancePay', 'getInsurancePay');
|
|
1072
|
+
},
|
|
1069
1073
|
async getCurrencies() {
|
|
1070
1074
|
try {
|
|
1071
1075
|
const currencies = await this.api.getCurrencies();
|
|
@@ -1083,15 +1087,25 @@ export const useDataStore = defineStore('data', {
|
|
|
1083
1087
|
console.log(err);
|
|
1084
1088
|
}
|
|
1085
1089
|
},
|
|
1086
|
-
async getQuestionList(surveyType, processInstanceId, insuredId, baseField, secondaryField) {
|
|
1090
|
+
async getQuestionList(surveyType, processInstanceId, insuredId, baseField, secondaryField, whichMember = 'insured') {
|
|
1087
1091
|
if (!this.formStore[baseField] || (this.formStore[baseField] && !this.formStore[baseField].length)) {
|
|
1088
1092
|
try {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1093
|
+
if (whichMember === 'insured') {
|
|
1094
|
+
const [{ value: baseQuestions }, { value: secondaryQuestions }] = await Promise.allSettled([
|
|
1095
|
+
this.api.getQuestionList(surveyType, processInstanceId, insuredId),
|
|
1096
|
+
this.api.getQuestionListSecond(`${surveyType}second`, processInstanceId, insuredId),
|
|
1097
|
+
]);
|
|
1098
|
+
this.formStore[baseField] = baseQuestions;
|
|
1099
|
+
this.formStore[secondaryField] = secondaryQuestions;
|
|
1100
|
+
}
|
|
1101
|
+
if (whichMember === 'policyholder') {
|
|
1102
|
+
const [{ value: baseQuestions }, { value: secondaryQuestions }] = await Promise.allSettled([
|
|
1103
|
+
this.api.getClientQuestionList(surveyType, processInstanceId, insuredId),
|
|
1104
|
+
this.api.getClientQuestionListSecond(`${surveyType}second`, processInstanceId, insuredId),
|
|
1105
|
+
]);
|
|
1106
|
+
this.formStore[baseField] = baseQuestions;
|
|
1107
|
+
this.formStore[secondaryField] = secondaryQuestions;
|
|
1108
|
+
}
|
|
1095
1109
|
} catch (err) {
|
|
1096
1110
|
console.log(err);
|
|
1097
1111
|
}
|
|
@@ -1194,6 +1208,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1194
1208
|
this.getDicFileTypeList(),
|
|
1195
1209
|
this.getDicAnnuityTypeList(),
|
|
1196
1210
|
this.getProcessAnnuityPaymentPeriod(),
|
|
1211
|
+
this.getInsurancePay(),
|
|
1197
1212
|
this.getDictionaryItems('RegionPolicy'),
|
|
1198
1213
|
this.getDictionaryItems('SaleChanellPolicy'),
|
|
1199
1214
|
]);
|
|
@@ -1329,7 +1344,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1329
1344
|
this.formStore.definedAnswersId[whichSurvey][filter] = await this.api.definedAnswers(filter);
|
|
1330
1345
|
}
|
|
1331
1346
|
if (value !== null && this.formStore.definedAnswersId[whichSurvey][filter].length) {
|
|
1332
|
-
const answer = this.formStore.definedAnswersId[whichSurvey][filter].find(answer => answer.nameRu
|
|
1347
|
+
const answer = this.formStore.definedAnswersId[whichSurvey][filter].find(answer => answer.nameRu.match(new RegExp(value, 'i')));
|
|
1333
1348
|
this.formStore[whichSurvey].body[index].first.answerId = answer.ids;
|
|
1334
1349
|
}
|
|
1335
1350
|
return this.formStore.definedAnswersId[whichSurvey];
|
|
@@ -1378,6 +1393,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1378
1393
|
},
|
|
1379
1394
|
async clearAddCovers(coverCode, coverValue) {
|
|
1380
1395
|
if (!coverCode || !coverValue) return;
|
|
1396
|
+
const applicationData = this.getConditionsData();
|
|
1381
1397
|
const termCoverIndex = applicationData.addCoversDto.findIndex(i => i.coverTypeCode === coverCode);
|
|
1382
1398
|
if (termCoverIndex !== -1) {
|
|
1383
1399
|
const answers = await this.getAdditionalInsuranceTermsAnswers(applicationData.addCoversDto[termCoverIndex].coverTypeId);
|
|
@@ -1656,6 +1672,10 @@ export const useDataStore = defineStore('data', {
|
|
|
1656
1672
|
const relationDegree = this.relations.find(i => i.ids == each.relationId);
|
|
1657
1673
|
this.formStore.beneficiaryForm[index].relationDegree = relationDegree ? relationDegree : new Value();
|
|
1658
1674
|
this.formStore.beneficiaryForm[index].percentageOfPayoutAmount = each.percentage;
|
|
1675
|
+
if (this.isLiferenta || this.isBolashak) {
|
|
1676
|
+
const insurancePay = this.insurancePay.find(i => i.id == each.beneficiaryInsurancePayId);
|
|
1677
|
+
this.formStore.beneficiaryForm[index].insurancePay = insurancePay ? insurancePay : new Value();
|
|
1678
|
+
}
|
|
1659
1679
|
});
|
|
1660
1680
|
}
|
|
1661
1681
|
|
|
@@ -1691,6 +1711,8 @@ export const useDataStore = defineStore('data', {
|
|
|
1691
1711
|
// this.formStore.productConditionsForm.annualIncome = applicationData.policyAppDto.annualIncome?.toString();
|
|
1692
1712
|
this.formStore.productConditionsForm.lifeMultiply = parseProcents(applicationData.policyAppDto.lifeMultiply);
|
|
1693
1713
|
this.formStore.productConditionsForm.lifeAdditive = parseProcents(applicationData.policyAppDto.lifeAdditive);
|
|
1714
|
+
this.formStore.productConditionsForm.lifeMultiplyClient = parseProcents(applicationData.policyAppDto.lifeMultiplyClient);
|
|
1715
|
+
this.formStore.productConditionsForm.lifeAdditiveClient = parseProcents(applicationData.policyAppDto.lifeAdditiveClient);
|
|
1694
1716
|
this.formStore.productConditionsForm.adbMultiply = parseProcents(applicationData.policyAppDto.adbMultiply);
|
|
1695
1717
|
this.formStore.productConditionsForm.adbAdditive = parseProcents(applicationData.policyAppDto.adbAdditive);
|
|
1696
1718
|
this.formStore.productConditionsForm.disabilityMultiply = parseProcents(applicationData.policyAppDto.disabilityMultiply);
|
|
@@ -2171,7 +2193,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2171
2193
|
if (areMembersValid) {
|
|
2172
2194
|
if (!!this.formStore.productConditionsForm.insurancePremiumPerMonth && !!this.formStore.productConditionsForm.requestedSumInsured) {
|
|
2173
2195
|
const hasCritical = this.formStore.additionalInsuranceTerms?.find(cover => cover.coverTypeName === 'Критическое заболевание Застрахованного');
|
|
2174
|
-
if (hasCritical && hasCritical.coverSumName
|
|
2196
|
+
if (hasCritical && hasCritical.coverSumName.match(new RegExp('не включено', 'i'))) {
|
|
2175
2197
|
await Promise.allSettled([
|
|
2176
2198
|
this.getQuestionList(
|
|
2177
2199
|
'health',
|
|
@@ -2187,15 +2209,36 @@ export const useDataStore = defineStore('data', {
|
|
|
2187
2209
|
'surveyByCriticalBase',
|
|
2188
2210
|
'surveyByCriticalSecond',
|
|
2189
2211
|
),
|
|
2212
|
+
this.isClientAnketaCondition &&
|
|
2213
|
+
this.getQuestionList(
|
|
2214
|
+
'health',
|
|
2215
|
+
this.formStore.applicationData.processInstanceId,
|
|
2216
|
+
this.formStore.applicationData.clientApp.id,
|
|
2217
|
+
'surveyByHealthBasePolicyholder',
|
|
2218
|
+
'surveyByHealthSecond',
|
|
2219
|
+
'policyholder',
|
|
2220
|
+
),
|
|
2190
2221
|
]);
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2222
|
+
this.isClientAnketaCondition
|
|
2223
|
+
? await Promise.allSettled([
|
|
2224
|
+
...this.formStore.surveyByHealthBase.body.map(async question => {
|
|
2225
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2226
|
+
}),
|
|
2227
|
+
...this.formStore.surveyByCriticalBase.body.map(async question => {
|
|
2228
|
+
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2229
|
+
}),
|
|
2230
|
+
...this.formStore.surveyByHealthBasePolicyholder.body.map(async question => {
|
|
2231
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
|
|
2232
|
+
}),
|
|
2233
|
+
])
|
|
2234
|
+
: await Promise.allSettled([
|
|
2235
|
+
...this.formStore.surveyByHealthBase.body.map(async question => {
|
|
2236
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2237
|
+
}),
|
|
2238
|
+
...this.formStore.surveyByCriticalBase.body.map(async question => {
|
|
2239
|
+
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2240
|
+
}),
|
|
2241
|
+
]);
|
|
2199
2242
|
} else {
|
|
2200
2243
|
await Promise.allSettled([
|
|
2201
2244
|
this.getQuestionList(
|
|
@@ -2205,14 +2248,32 @@ export const useDataStore = defineStore('data', {
|
|
|
2205
2248
|
'surveyByHealthBase',
|
|
2206
2249
|
'surveyByHealthSecond',
|
|
2207
2250
|
),
|
|
2251
|
+
this.isClientAnketaCondition &&
|
|
2252
|
+
this.getQuestionList(
|
|
2253
|
+
'health',
|
|
2254
|
+
this.formStore.applicationData.processInstanceId,
|
|
2255
|
+
this.formStore.applicationData.clientApp.id,
|
|
2256
|
+
'surveyByHealthBasePolicyholder',
|
|
2257
|
+
'surveyByHealthSecond',
|
|
2258
|
+
'policyholder',
|
|
2259
|
+
),
|
|
2260
|
+
,
|
|
2208
2261
|
]);
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2262
|
+
this.isClientAnketaCondition
|
|
2263
|
+
? await Promise.allSettled([
|
|
2264
|
+
...this.formStore.surveyByHealthBase.body.map(async question => {
|
|
2265
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2266
|
+
}),
|
|
2267
|
+
...this.formStore.surveyByHealthBasePolicyholder.body.map(async question => {
|
|
2268
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
|
|
2269
|
+
}),
|
|
2270
|
+
])
|
|
2271
|
+
: await Promise.allSettled(
|
|
2272
|
+
this.formStore.surveyByHealthBase.body.map(async question => {
|
|
2273
|
+
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2274
|
+
}),
|
|
2275
|
+
);
|
|
2214
2276
|
}
|
|
2215
|
-
|
|
2216
2277
|
if (this.validateAnketa('surveyByHealthBase')) {
|
|
2217
2278
|
let hasCriticalAndItsValid = null;
|
|
2218
2279
|
if (hasCritical && hasCritical.coverSumName !== 'не включено') {
|
|
@@ -2226,6 +2287,11 @@ export const useDataStore = defineStore('data', {
|
|
|
2226
2287
|
hasCriticalAndItsValid = null;
|
|
2227
2288
|
}
|
|
2228
2289
|
if (hasCriticalAndItsValid === true || hasCriticalAndItsValid === null) {
|
|
2290
|
+
if (this.isClientAnketaCondition && this.validateAnketa('surveyByHealthBasePolicyholder') === false) {
|
|
2291
|
+
this.showToaster('error', this.t('toaster.emptyHealthAnketaPolicyholder'), 3000);
|
|
2292
|
+
this.isLoading = false;
|
|
2293
|
+
return false;
|
|
2294
|
+
}
|
|
2229
2295
|
this.isLoading = false;
|
|
2230
2296
|
return true;
|
|
2231
2297
|
}
|
package/store/rules.js
CHANGED
|
@@ -35,6 +35,14 @@ export const rules = {
|
|
|
35
35
|
},
|
|
36
36
|
],
|
|
37
37
|
cyrillic: [v => v === null || /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic')],
|
|
38
|
+
cyrillicNonRequired: [
|
|
39
|
+
v => {
|
|
40
|
+
if (!v) return true;
|
|
41
|
+
else {
|
|
42
|
+
return /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic');
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
],
|
|
38
46
|
email: [
|
|
39
47
|
v => {
|
|
40
48
|
if (v === '' || v === null) {
|