hl-core 0.0.9-beta.51 → 0.0.9-beta.53
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 +11 -0
- package/components/Pages/Documents.vue +100 -21
- package/components/Pages/MemberForm.vue +25 -20
- package/components/Pages/ProductConditions.vue +57 -25
- package/components/Panel/PanelHandler.vue +39 -21
- package/composables/classes.ts +21 -15
- package/composables/constants.ts +2 -4
- package/composables/index.ts +24 -1
- package/locales/ru.json +17 -5
- package/package.json +3 -3
- package/store/data.store.ts +104 -52
- package/store/rules.ts +1 -5
- package/types/enum.ts +2 -0
- package/types/index.ts +5 -4
package/api/base.api.ts
CHANGED
|
@@ -1039,4 +1039,15 @@ export class ApiClass {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
|
+
|
|
1043
|
+
async uploadDigitalCertifijcate(data: any) {
|
|
1044
|
+
return await this.axiosCall<any>({
|
|
1045
|
+
method: Methods.POST,
|
|
1046
|
+
url: '/File/api/Document/UploadDigitalCertifijcate',
|
|
1047
|
+
headers: {
|
|
1048
|
+
'Content-Type': 'multipart/form-data',
|
|
1049
|
+
},
|
|
1050
|
+
data: data,
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1042
1053
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section :class="[$styles.scrollPage]">
|
|
3
|
+
<base-form-section v-if="isUnderwriterDocuments" title="Загрузить документы для Андеррайтинга" class="mx-[10px] mt-[14px]">
|
|
4
|
+
<base-file-input :readonly="isDisabled || documentLoading" @input.prevent="onUnderFiles($event)" @onClear="onClearUnderFiles()" />
|
|
5
|
+
<base-animation>
|
|
6
|
+
<base-btn v-if="underDocumentsList && underDocumentsList.length" :loading="documentLoading" text="Загрузить" size="sm" class="mt-3" @click="uploadUnderFiles" />
|
|
7
|
+
</base-animation>
|
|
8
|
+
</base-form-section>
|
|
3
9
|
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
4
10
|
<base-content-block
|
|
5
|
-
v-if="$dataStore.isInitiator() && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
11
|
+
v-if="$dataStore.isInitiator() && !$dataStore.isPension && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
6
12
|
:class="[$styles.textSimple]"
|
|
7
13
|
>
|
|
8
14
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('Contract') }}</h5>
|
|
@@ -25,10 +31,7 @@
|
|
|
25
31
|
</div>
|
|
26
32
|
</base-content-block>
|
|
27
33
|
</section>
|
|
28
|
-
<div
|
|
29
|
-
v-if="(!formStore.signedDocumentList || !formStore.signedDocumentList.length) && !$dataStore.isPension"
|
|
30
|
-
class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6"
|
|
31
|
-
>
|
|
34
|
+
<div v-if="!formStore.signedDocumentList || !formStore.signedDocumentList.length" class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
|
|
32
35
|
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
|
|
33
36
|
<path
|
|
34
37
|
fill-rule="evenodd"
|
|
@@ -48,30 +51,30 @@
|
|
|
48
51
|
</svg>
|
|
49
52
|
<p class="text-xl" :class="[$styles.mutedText]">{{ $dataStore.t('labels.noDocuments') }}</p>
|
|
50
53
|
</div>
|
|
51
|
-
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2"
|
|
54
|
+
<section v-if="$dataStore.isPension && showContract" class="w-full px-[10px] pt-[14px] flex flex-col gap-2">
|
|
52
55
|
<base-content-block :class="[$styles.textSimple]">
|
|
53
56
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
|
|
54
57
|
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
55
|
-
<span class="ml-2">Заявления на {{ processCode ==
|
|
58
|
+
<span class="ml-2">Заявления на {{ processCode == 19 ? 'страхование' : 'возврат' }}</span>
|
|
56
59
|
<i
|
|
57
60
|
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
58
61
|
:class="[$styles.greenTextHover]"
|
|
59
|
-
@click="$dataStore.generatePDFDocument(processCode ==
|
|
62
|
+
@click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Statement' : 'PA_RefundStatement', '37')"
|
|
60
63
|
></i>
|
|
61
64
|
</div>
|
|
62
65
|
</base-content-block>
|
|
63
66
|
<base-content-block :class="[$styles.textSimple]">
|
|
64
67
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.contract') }}</h5>
|
|
65
68
|
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
66
|
-
<span class="ml-2">Договор {{ processCode ==
|
|
69
|
+
<span class="ml-2">Договор {{ processCode == 19 ? 'страхования' : 'возврата' }}</span>
|
|
67
70
|
<i
|
|
68
71
|
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
69
72
|
:class="[$styles.greenTextHover]"
|
|
70
|
-
@click="$dataStore.generatePDFDocument(processCode ==
|
|
73
|
+
@click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Contract' : 'PA_RefundAgreement', '38')"
|
|
71
74
|
></i>
|
|
72
75
|
</div>
|
|
73
76
|
</base-content-block>
|
|
74
|
-
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode ==
|
|
77
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode == 19">
|
|
75
78
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.complianceFinMonitoring') }}</h5>
|
|
76
79
|
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
77
80
|
<span class="ml-2">{{ $dataStore.t('pension.complianceFinMonitoring') }}</span>
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
></i>
|
|
83
86
|
</div>
|
|
84
87
|
</base-content-block>
|
|
85
|
-
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode ==
|
|
88
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode == 19">
|
|
86
89
|
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.dossierPA') }}</h5>
|
|
87
90
|
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
88
91
|
<span class="ml-2">{{ $dataStore.t('pension.dossierPA') }}</span>
|
|
@@ -99,13 +102,9 @@
|
|
|
99
102
|
<div :class="[$styles.flexColNav]">
|
|
100
103
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
101
104
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
102
|
-
<base-
|
|
103
|
-
v-if="
|
|
104
|
-
|
|
105
|
-
:loading="documentLoading"
|
|
106
|
-
text="Удалить"
|
|
107
|
-
@click="deletionDialog = true"
|
|
108
|
-
/>
|
|
105
|
+
<base-animation>
|
|
106
|
+
<base-btn v-if="canDeleteFiles" :disabled="documentLoading" :loading="documentLoading" text="Удалить" @click="deletionDialog = true" />
|
|
107
|
+
</base-animation>
|
|
109
108
|
</div>
|
|
110
109
|
</base-fade-transition>
|
|
111
110
|
</Teleport>
|
|
@@ -123,6 +122,7 @@
|
|
|
123
122
|
|
|
124
123
|
<script lang="ts">
|
|
125
124
|
import { DocumentItem } from '../../composables/classes';
|
|
125
|
+
import { uuid } from 'vue-uuid';
|
|
126
126
|
|
|
127
127
|
export default defineComponent({
|
|
128
128
|
setup() {
|
|
@@ -149,6 +149,18 @@ export default defineComponent({
|
|
|
149
149
|
action: '',
|
|
150
150
|
text: '',
|
|
151
151
|
});
|
|
152
|
+
const underDocumentsList = ref<
|
|
153
|
+
{
|
|
154
|
+
file: File;
|
|
155
|
+
fileName: string;
|
|
156
|
+
identifier: string;
|
|
157
|
+
fileTypeId: string;
|
|
158
|
+
fileTypeCode: string;
|
|
159
|
+
fileTypeName: string;
|
|
160
|
+
processInstanceId: string;
|
|
161
|
+
}[]
|
|
162
|
+
>([]);
|
|
163
|
+
|
|
152
164
|
const object_list = computed(() => Object.values(formStore.signedDocumentList));
|
|
153
165
|
const unSignedList = computed(() => document_list.value.filter((doc: DocumentItem) => doc.signed === false || doc.signed === null));
|
|
154
166
|
const document_list = computed(() =>
|
|
@@ -158,6 +170,24 @@ export default defineComponent({
|
|
|
158
170
|
}
|
|
159
171
|
}),
|
|
160
172
|
);
|
|
173
|
+
const showContract = computed(
|
|
174
|
+
() => formStore.applicationData && (formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm'),
|
|
175
|
+
);
|
|
176
|
+
const isUnderwriterDocuments = computed(
|
|
177
|
+
() =>
|
|
178
|
+
(dataStore.isAULETTI || dataStore.isAulettiParent) &&
|
|
179
|
+
dataStore.isInitiator() &&
|
|
180
|
+
formStore.applicationData &&
|
|
181
|
+
(formStore.applicationData.statusCode === 'StartForm' || formStore.applicationData.statusCode === 'EditForm'),
|
|
182
|
+
);
|
|
183
|
+
const canDeleteFiles = computed(() => {
|
|
184
|
+
const baseCondition = dataStore.isTask() && dataStore.isInitiator() && dataStore.isProcessEditable(formStore.applicationData.statusCode);
|
|
185
|
+
if (dataStore.isAULETTI || dataStore.isAulettiParent) {
|
|
186
|
+
return baseCondition && (currentDocument.value ? currentDocument.value.fileTypeCode === '46' : false);
|
|
187
|
+
}
|
|
188
|
+
if (dataStore.isPension) return baseCondition;
|
|
189
|
+
return false;
|
|
190
|
+
});
|
|
161
191
|
|
|
162
192
|
const openPanel = async (document: DocumentItem) => {
|
|
163
193
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
@@ -185,6 +215,48 @@ export default defineComponent({
|
|
|
185
215
|
}
|
|
186
216
|
};
|
|
187
217
|
|
|
218
|
+
const onUnderFiles = async (event: InputEvent) => {
|
|
219
|
+
if (event.target || event.dataTransfer) {
|
|
220
|
+
const files = event.target ? (event.target as HTMLInputElement).files : (event.dataTransfer as DataTransfer).files;
|
|
221
|
+
if (files !== null) {
|
|
222
|
+
const underDocumentType = dataStore.dicFileTypeList.find(i => i.code === '46');
|
|
223
|
+
Object.values(files).map(file => {
|
|
224
|
+
const uuidV4 = uuid.v4();
|
|
225
|
+
underDocumentsList.value.push({
|
|
226
|
+
file: file,
|
|
227
|
+
identifier: `${uuidV4}${file.name.substring(file.name.lastIndexOf('.'))}`,
|
|
228
|
+
processInstanceId: String(formStore.applicationData.processInstanceId),
|
|
229
|
+
fileTypeId: underDocumentType ? String(underDocumentType.id) : '',
|
|
230
|
+
fileTypeCode: underDocumentType ? String(underDocumentType.code) : '',
|
|
231
|
+
fileTypeName: underDocumentType ? String(underDocumentType.nameRu) : '',
|
|
232
|
+
fileName: file.name ? file.name : underDocumentType ? String(underDocumentType.nameRu) : '',
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const onClearUnderFiles = () => {
|
|
240
|
+
underDocumentsList.value = [];
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
const uploadUnderFiles = async () => {
|
|
244
|
+
if (underDocumentsList.value) {
|
|
245
|
+
documentLoading.value = true;
|
|
246
|
+
await Promise.allSettled(
|
|
247
|
+
Object.values(underDocumentsList.value).map(async value => {
|
|
248
|
+
const formData = new FormData();
|
|
249
|
+
formData.append('file', value.file);
|
|
250
|
+
formData.append('fileData', JSON.stringify([{ ...value, file: undefined }]));
|
|
251
|
+
await dataStore.uploadFiles(formData, false);
|
|
252
|
+
}),
|
|
253
|
+
);
|
|
254
|
+
onClearUnderFiles();
|
|
255
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
256
|
+
documentLoading.value = false;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
188
260
|
watch(
|
|
189
261
|
() => document_list.value,
|
|
190
262
|
() => {
|
|
@@ -243,15 +315,22 @@ export default defineComponent({
|
|
|
243
315
|
signedContract,
|
|
244
316
|
deletionDialog,
|
|
245
317
|
processCode,
|
|
318
|
+
underDocumentsList,
|
|
246
319
|
|
|
247
320
|
// Computed
|
|
248
321
|
isDisabled,
|
|
322
|
+
showContract,
|
|
323
|
+
canDeleteFiles,
|
|
324
|
+
isUnderwriterDocuments,
|
|
249
325
|
|
|
250
326
|
// Functions
|
|
251
|
-
openPanel,
|
|
252
327
|
getFile,
|
|
253
|
-
|
|
328
|
+
openPanel,
|
|
254
329
|
deleteFile,
|
|
330
|
+
onFileChange,
|
|
331
|
+
onUnderFiles,
|
|
332
|
+
uploadUnderFiles,
|
|
333
|
+
onClearUnderFiles,
|
|
255
334
|
};
|
|
256
335
|
},
|
|
257
336
|
});
|
|
@@ -199,25 +199,23 @@
|
|
|
199
199
|
:rules="$rules.required.concat($rules.numbers)"
|
|
200
200
|
/>
|
|
201
201
|
</base-form-section>
|
|
202
|
-
|
|
203
202
|
<base-form-section
|
|
204
203
|
v-if="$dataStore.isPension && (whichForm === formStore.insuredFormKey || whichForm === formStore.beneficiaryFormKey)"
|
|
205
204
|
:title="$dataStore.t('pension.disabilityInfo')"
|
|
206
205
|
>
|
|
207
|
-
<base-form-toggle v-model="
|
|
206
|
+
<base-form-toggle v-model="member.isDisability" :title="$dataStore.t('pension.ifHasDisability')" :disabled="isDisabled" :has-border="false" />
|
|
208
207
|
<base-animation>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
</div>
|
|
208
|
+
<base-panel-input
|
|
209
|
+
v-if="member.isDisability"
|
|
210
|
+
v-model="member.disabilityGroup"
|
|
211
|
+
:value="member.disabilityGroup?.nameRu"
|
|
212
|
+
:readonly="isDisabled"
|
|
213
|
+
:clearable="!isDisabled"
|
|
214
|
+
:label="$dataStore.t('pension.disabilityGroup')"
|
|
215
|
+
:rules="$rules.objectRequired"
|
|
216
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
217
|
+
@append="openPanel($dataStore.t('pension.disabilityGroup'), $dataStore.disabilityGroups, 'disabilityGroup', $dataStore.getDisabilityGroups)"
|
|
218
|
+
/>
|
|
221
219
|
</base-animation>
|
|
222
220
|
</base-form-section>
|
|
223
221
|
<base-form-section :title="$dataStore.t('policyholdersRepresentative.PowerOfAttorney')" v-if="whichForm === formStore.policyholdersRepresentativeFormKey">
|
|
@@ -396,7 +394,7 @@
|
|
|
396
394
|
<base-form-input v-model.trim="member.registrationMicroDistrict" :readonly="isDisabled" :clearable="!isDisabled" :label="$dataStore.t('form.MicroDistrict')" />
|
|
397
395
|
<base-form-input
|
|
398
396
|
v-model.trim="member.registrationStreet"
|
|
399
|
-
:rules="member.isInsuredUnderage ? [] : $rules.required"
|
|
397
|
+
:rules="member.isInsuredUnderage || $dataStore.isAULETTI || $dataStore.isAulettiParent ? [] : $rules.required"
|
|
400
398
|
:readonly="isDisabled"
|
|
401
399
|
:clearable="!isDisabled"
|
|
402
400
|
:label="$dataStore.t('form.Street')"
|
|
@@ -758,7 +756,6 @@ export default {
|
|
|
758
756
|
|
|
759
757
|
const currentPanelDeep = ref<string>();
|
|
760
758
|
const currentPanelSubDeep = ref<string>();
|
|
761
|
-
const hasDisability = ref<boolean>(false);
|
|
762
759
|
|
|
763
760
|
const memberSetting = computed(() => dataStore.members[memberStore.getMemberApplicationCode(whichForm.value)!]);
|
|
764
761
|
const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
|
|
@@ -837,7 +834,7 @@ export default {
|
|
|
837
834
|
return false;
|
|
838
835
|
}
|
|
839
836
|
};
|
|
840
|
-
return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
837
|
+
return dataStore.isAULETTI || dataStore.isAulettiParent ? false : dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
841
838
|
});
|
|
842
839
|
const hasDocumentReader = computed(() => {
|
|
843
840
|
return !!member.value.hasAgreement && !!isTask.value && (dataStore.isAULETTI || dataStore.isAulettiParent);
|
|
@@ -1362,7 +1359,7 @@ export default {
|
|
|
1362
1359
|
if (whichForm.value == formStore.policyholderFormKey || (dataStore.isPension && whichForm.value == formStore.insuredFormKey)) {
|
|
1363
1360
|
if (route.params.taskId === '0') {
|
|
1364
1361
|
try {
|
|
1365
|
-
const taskId = await dataStore.startApplication(member.value, dataStore.isPension ? (String(route.query.type) === 'joint' ? 4 :
|
|
1362
|
+
const taskId = await dataStore.startApplication(member.value, dataStore.isPension ? (String(route.query.type) === 'joint' ? 4 : 19) : undefined);
|
|
1366
1363
|
if (typeof taskId === 'string') {
|
|
1367
1364
|
await dataStore.getApplicationData(taskId, false, false, false, false);
|
|
1368
1365
|
remoteIsInsured.value = formStore.applicationData.clientApp.isInsured;
|
|
@@ -1426,7 +1423,7 @@ export default {
|
|
|
1426
1423
|
ownFundsRaisAmount: 0,
|
|
1427
1424
|
compulsoryProfContractAmount: 0,
|
|
1428
1425
|
};
|
|
1429
|
-
const isApplicationSaved = await dataStore.setApplication();
|
|
1426
|
+
const isApplicationSaved = await dataStore.setApplication(formStore.applicationData.pensionApp);
|
|
1430
1427
|
if (isApplicationSaved === false) return;
|
|
1431
1428
|
dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
|
|
1432
1429
|
}
|
|
@@ -1797,6 +1794,15 @@ export default {
|
|
|
1797
1794
|
}
|
|
1798
1795
|
},
|
|
1799
1796
|
);
|
|
1797
|
+
watch(
|
|
1798
|
+
() => member.value.isDisability,
|
|
1799
|
+
val => {
|
|
1800
|
+
if (!val) member.value.disabilityGroup = new Value();
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
immediate: true,
|
|
1804
|
+
},
|
|
1805
|
+
);
|
|
1800
1806
|
}
|
|
1801
1807
|
|
|
1802
1808
|
return {
|
|
@@ -1824,7 +1830,6 @@ export default {
|
|
|
1824
1830
|
selectedIndex,
|
|
1825
1831
|
selectedFamilyMember,
|
|
1826
1832
|
sameAddress,
|
|
1827
|
-
hasDisability,
|
|
1828
1833
|
isRelative,
|
|
1829
1834
|
imageDataList,
|
|
1830
1835
|
// Computed
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
icon="mdi-alert text-[#FCB016]"
|
|
10
10
|
></base-message-block>
|
|
11
11
|
<base-form-section
|
|
12
|
-
v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition && whichProduct !== '
|
|
12
|
+
v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition && whichProduct !== 'pensionannuitynew'"
|
|
13
13
|
:title="$dataStore.t('policyholderForm')"
|
|
14
14
|
>
|
|
15
15
|
<base-form-input
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
37
37
|
</base-form-section>
|
|
38
38
|
<base-form-section
|
|
39
|
-
v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== '
|
|
39
|
+
v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew'"
|
|
40
40
|
:title="$dataStore.t('insuredForm')"
|
|
41
41
|
>
|
|
42
42
|
<div v-for="(insured, index) of formStore.insuredForm" :key="index">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
</base-form-section>
|
|
51
51
|
<base-form-section
|
|
52
|
-
v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== '
|
|
52
|
+
v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew'"
|
|
53
53
|
:title="$dataStore.t('recalculationInfo')"
|
|
54
54
|
>
|
|
55
55
|
<base-form-input
|
|
@@ -281,12 +281,11 @@
|
|
|
281
281
|
@append="openPanel($dataStore.t('productConditionsForm.processGfot'), $dataStore.processGfot, 'processGfot', $dataStore.getProcessGfot)"
|
|
282
282
|
/>
|
|
283
283
|
</base-form-section>
|
|
284
|
-
<section v-if="whichProduct === '
|
|
284
|
+
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
285
285
|
<base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
|
|
286
286
|
<base-form-input
|
|
287
287
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
288
288
|
:maska="$maska.numbers"
|
|
289
|
-
:rules="$rules.required"
|
|
290
289
|
:readonly="isDisabled"
|
|
291
290
|
:clearable="!isDisabled"
|
|
292
291
|
:label="$dataStore.t('pension.compulsoryContractAmount')"
|
|
@@ -328,23 +327,43 @@
|
|
|
328
327
|
v-model="pensionForm.transferContractCompany"
|
|
329
328
|
:value="pensionForm.transferContractCompany?.nameRu"
|
|
330
329
|
:label="$dataStore.t('pension.transferContractCompany')"
|
|
331
|
-
|
|
330
|
+
:readonly="isDisabled"
|
|
331
|
+
:clearable="!isDisabled"
|
|
332
332
|
append-inner-icon="mdi mdi-chevron-right"
|
|
333
|
-
@append="openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.
|
|
333
|
+
@append="openPanel($dataStore.t('pension.transferContractCompany'), $dataStore.transferContractCompanies, 'transferContractCompany', $dataStore.getInsuranceCompanies)"
|
|
334
334
|
/>
|
|
335
335
|
<base-form-input
|
|
336
|
-
v-model="
|
|
336
|
+
v-model="transferContractDate"
|
|
337
337
|
:maska="$maska.date"
|
|
338
338
|
:label="$dataStore.t('pension.contractDate')"
|
|
339
|
+
:readonly="isDisabled"
|
|
339
340
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
341
|
+
:clearable="!isDisabled"
|
|
342
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
|
|
340
343
|
/>
|
|
341
344
|
<base-form-input
|
|
342
|
-
v-model="pensionForm.
|
|
345
|
+
v-model="pensionForm.transferContractNumber"
|
|
346
|
+
:label="$dataStore.t('pension.globalId')"
|
|
347
|
+
:readonly="isDisabled"
|
|
348
|
+
:clearable="!isDisabled"
|
|
349
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required : []"
|
|
350
|
+
/>
|
|
351
|
+
<base-form-input
|
|
352
|
+
v-model="transferContractFirstPaymentDate"
|
|
343
353
|
:maska="$maska.date"
|
|
344
354
|
:label="$dataStore.t('pension.transferContractFirstPaymentDate')"
|
|
345
355
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
356
|
+
:readonly="isDisabled"
|
|
357
|
+
:clearable="!isDisabled"
|
|
358
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
|
|
359
|
+
/>
|
|
360
|
+
<base-form-input
|
|
361
|
+
v-model="pensionCalculationParams.transferContractAmount"
|
|
362
|
+
:maska="$maska.numbers"
|
|
363
|
+
:label="$dataStore.t('pension.transferContractAmount')"
|
|
364
|
+
:rules="pensionForm.transferContractCompany?.ids ? $rules.required : []"
|
|
346
365
|
/>
|
|
347
|
-
<base-form-
|
|
366
|
+
<base-form-toggle v-model="pensionForm.transferContractIsOppv" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('pension.isOPPVTransfer')" />
|
|
348
367
|
</base-form-section>
|
|
349
368
|
<base-form-section :title="$dataStore.t('pension.paymentTerms')">
|
|
350
369
|
<base-form-input
|
|
@@ -703,14 +722,16 @@ export default defineComponent({
|
|
|
703
722
|
const enabled = 'включено';
|
|
704
723
|
|
|
705
724
|
const additionalTerms = ref<AddCover[]>([]);
|
|
706
|
-
|
|
725
|
+
|
|
707
726
|
const maxDate = ref();
|
|
708
727
|
const dateOfBegin = ref();
|
|
709
728
|
const contractDate = ref();
|
|
710
|
-
const
|
|
711
|
-
const
|
|
729
|
+
const transferContractDate = ref();
|
|
730
|
+
const transferContractFirstPaymentDate = ref();
|
|
731
|
+
const guaranteedPeriodList = Array.from(Array(35), (e, i) => i + 1);
|
|
712
732
|
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
713
733
|
|
|
734
|
+
const isMultiplePanelOpen = ref<boolean>(false);
|
|
714
735
|
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
715
736
|
const multiplePanelList = ref<CountryValue[]>([]);
|
|
716
737
|
const calculatorForm = productConditionsForm.calculatorForm;
|
|
@@ -950,7 +971,7 @@ export default defineComponent({
|
|
|
950
971
|
return isDisabled.value;
|
|
951
972
|
});
|
|
952
973
|
const hasDefault = computed(() => {
|
|
953
|
-
if (whichProduct.value === 'lifetrip' || whichProduct.value === '
|
|
974
|
+
if (whichProduct.value === 'lifetrip' || whichProduct.value === 'pensionannuitynew') {
|
|
954
975
|
return false;
|
|
955
976
|
}
|
|
956
977
|
return true;
|
|
@@ -1007,6 +1028,7 @@ export default defineComponent({
|
|
|
1007
1028
|
ownFundsRaisAmount: pensionForm && pensionForm.ownFundsRaisAmount && pensionForm.ownFundsRaisAmount != 0 ? pensionForm.ownFundsRaisAmount : null,
|
|
1008
1029
|
compulsoryProfContractAmount:
|
|
1009
1030
|
pensionForm && pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount != 0 ? pensionForm.compulsoryProfContractAmount : null,
|
|
1031
|
+
transferContractAmount: pensionForm && pensionForm.transferContractAmount && pensionForm.transferContractAmount != 0 ? pensionForm.transferContractAmount : null,
|
|
1010
1032
|
});
|
|
1011
1033
|
|
|
1012
1034
|
const pensionAmount = computed(() =>
|
|
@@ -1014,7 +1036,8 @@ export default defineComponent({
|
|
|
1014
1036
|
? (Number(pensionCalculationParams.value.compulsoryContractAmount) ?? 0) +
|
|
1015
1037
|
(Number(pensionCalculationParams.value.voluntaryContractAmount) ?? 0) +
|
|
1016
1038
|
(Number(pensionCalculationParams.value.ownFundsRaisAmount) ?? 0) +
|
|
1017
|
-
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0)
|
|
1039
|
+
(Number(pensionCalculationParams.value.compulsoryProfContractAmount) ?? 0) +
|
|
1040
|
+
(Number(pensionCalculationParams.value.transferContractAmount) ?? 0)
|
|
1018
1041
|
: 0,
|
|
1019
1042
|
);
|
|
1020
1043
|
|
|
@@ -1055,6 +1078,9 @@ export default defineComponent({
|
|
|
1055
1078
|
if (whichProduct.value === 'lifetrip') {
|
|
1056
1079
|
// @ts-ignore
|
|
1057
1080
|
calculatorForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1081
|
+
} else if (whichProduct.value === 'pensionannuitynew') {
|
|
1082
|
+
// @ts-ignore
|
|
1083
|
+
pensionForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1058
1084
|
} else {
|
|
1059
1085
|
// @ts-ignore
|
|
1060
1086
|
productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
@@ -1403,7 +1429,7 @@ export default defineComponent({
|
|
|
1403
1429
|
} else {
|
|
1404
1430
|
await dataStore.calculatePrice();
|
|
1405
1431
|
}
|
|
1406
|
-
} else if (whichProduct.value === '
|
|
1432
|
+
} else if (whichProduct.value === 'pensionannuitynew') {
|
|
1407
1433
|
if (
|
|
1408
1434
|
pensionCalculationParams.value &&
|
|
1409
1435
|
pensionCalculationParams.value.compulsoryProfContractAmount &&
|
|
@@ -1414,17 +1440,21 @@ export default defineComponent({
|
|
|
1414
1440
|
dataStore.showToaster('error', 'Минимальное число дней уплаты ОППВ должно быть больше 60');
|
|
1415
1441
|
return;
|
|
1416
1442
|
}
|
|
1417
|
-
|
|
1418
|
-
pensionForm,
|
|
1419
|
-
(pensionCalculationParams.value = {
|
|
1443
|
+
const data = {
|
|
1444
|
+
...pensionForm,
|
|
1445
|
+
...(pensionCalculationParams.value = {
|
|
1420
1446
|
...pensionCalculationParams.value,
|
|
1421
1447
|
compulsoryContractAmount: Number(pensionCalculationParams.value.compulsoryContractAmount),
|
|
1422
1448
|
voluntaryContractAmount: Number(pensionCalculationParams.value.voluntaryContractAmount),
|
|
1423
1449
|
ownFundsRaisAmount: Number(pensionCalculationParams.value.ownFundsRaisAmount),
|
|
1424
1450
|
compulsoryProfContractAmount: Number(pensionCalculationParams.value.compulsoryProfContractAmount),
|
|
1451
|
+
transferContractAmount: Number(pensionCalculationParams.value.transferContractAmount),
|
|
1425
1452
|
}),
|
|
1426
|
-
|
|
1427
|
-
|
|
1453
|
+
transferContractCompany: pensionForm.transferContractCompany?.nameRu ?? null,
|
|
1454
|
+
transferContractDate: transferContractDate.value ? formatDate(transferContractDate.value) : null,
|
|
1455
|
+
transferContractFirstPaymentDate: transferContractFirstPaymentDate.value ? formatDate(transferContractFirstPaymentDate.value) : null,
|
|
1456
|
+
};
|
|
1457
|
+
await dataStore.setApplication(data, true);
|
|
1428
1458
|
} else {
|
|
1429
1459
|
if (whichSum.value === 'requestedSumInsured') {
|
|
1430
1460
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
@@ -1548,7 +1578,7 @@ export default defineComponent({
|
|
|
1548
1578
|
if (dataStore.isCalculator) {
|
|
1549
1579
|
clearFields();
|
|
1550
1580
|
}
|
|
1551
|
-
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== '
|
|
1581
|
+
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
|
|
1552
1582
|
if (
|
|
1553
1583
|
(dataStore.isCalculator || route.params.taskId === '0') &&
|
|
1554
1584
|
productConditionsForm.requestedSumInsured === null &&
|
|
@@ -1603,11 +1633,12 @@ export default defineComponent({
|
|
|
1603
1633
|
}, 0),
|
|
1604
1634
|
);
|
|
1605
1635
|
}
|
|
1606
|
-
if (whichProduct.value === '
|
|
1636
|
+
if (whichProduct.value === 'pensionannuitynew') {
|
|
1607
1637
|
contractDate.value = reformatDate(formStore.applicationData.pensionApp.contractDate);
|
|
1608
1638
|
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
1639
|
+
transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
|
|
1640
|
+
transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
|
|
1609
1641
|
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 1);
|
|
1610
|
-
guaranteedPeriodList.value = Array.from(Array(35), (e, i) => i + 1);
|
|
1611
1642
|
}
|
|
1612
1643
|
});
|
|
1613
1644
|
|
|
@@ -1719,7 +1750,8 @@ export default defineComponent({
|
|
|
1719
1750
|
pensionForm,
|
|
1720
1751
|
dateOfBegin,
|
|
1721
1752
|
contractDate,
|
|
1722
|
-
|
|
1753
|
+
transferContractDate,
|
|
1754
|
+
transferContractFirstPaymentDate,
|
|
1723
1755
|
enabled,
|
|
1724
1756
|
maxDate,
|
|
1725
1757
|
guaranteedPeriodList,
|