hl-core 0.0.10-beta.17 → 0.0.10-beta.19
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 +20 -1
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Pages/Documents.vue +236 -6
- package/components/Pages/MemberForm.vue +25 -21
- package/components/Pages/ProductConditions.vue +1 -1
- package/composables/classes.ts +19 -3
- package/composables/index.ts +19 -2
- package/composables/styles.ts +5 -16
- package/locales/ru.json +1 -1
- package/nuxt.config.ts +2 -2
- package/package.json +1 -1
- package/store/data.store.ts +42 -10
- package/store/member.store.ts +2 -2
- package/types/enum.ts +1 -0
- package/types/index.ts +7 -0
package/api/base.api.ts
CHANGED
|
@@ -999,12 +999,13 @@ export class ApiClass {
|
|
|
999
999
|
});
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
-
async checkOsns(bin: string) {
|
|
1002
|
+
async checkOsns(bin: string, date: string) {
|
|
1003
1003
|
return await this.axiosCall<boolean>({
|
|
1004
1004
|
method: Methods.GET,
|
|
1005
1005
|
url: `/${this.productUrl}/api/Application/CheckOSNS`,
|
|
1006
1006
|
params: {
|
|
1007
1007
|
bin,
|
|
1008
|
+
date,
|
|
1008
1009
|
},
|
|
1009
1010
|
});
|
|
1010
1011
|
}
|
|
@@ -1107,4 +1108,22 @@ export class ApiClass {
|
|
|
1107
1108
|
url: `/pensionannuityNew/SetEnpfSharedId/${sharedId}/${infoId}`,
|
|
1108
1109
|
});
|
|
1109
1110
|
}
|
|
1111
|
+
|
|
1112
|
+
integration = {
|
|
1113
|
+
base: '/integration',
|
|
1114
|
+
onlineAccess: async (data: { iin: string; documentType: string }) => {
|
|
1115
|
+
return await this.axiosCall<void>({
|
|
1116
|
+
method: Methods.POST,
|
|
1117
|
+
url: `${this.integration.base}/api/External/OnlineAccess`,
|
|
1118
|
+
data: data,
|
|
1119
|
+
});
|
|
1120
|
+
},
|
|
1121
|
+
digitalDocuments: async (data: { iin: string; processInstanceId: string; code: string }) => {
|
|
1122
|
+
return await this.axiosCall<void>({
|
|
1123
|
+
method: Methods.POST,
|
|
1124
|
+
url: `${this.integration.base}/api/External/DigitalDocuments`,
|
|
1125
|
+
data: data,
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
};
|
|
1110
1129
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section v-if="member" class="mb-2">
|
|
3
|
+
<base-form-section :title="`${title} ${number === 0 ? '' : number}`" class="mx-[10px] mt-[14px] d-flex">
|
|
4
|
+
<base-form-input v-model="member.iin" :label="$dataStore.t('form.iin')" :readonly="true" />
|
|
5
|
+
<base-form-input v-model.trim="member.longName" :label="$dataStore.t('labels.userFullName')" :readonly="true" />
|
|
6
|
+
<base-panel-input
|
|
7
|
+
v-if="!!member.digitalDocument"
|
|
8
|
+
v-model="member.digitalDocument.fileName"
|
|
9
|
+
label="Цифровой документ"
|
|
10
|
+
:readonly="disabled"
|
|
11
|
+
:clearable="!disabled"
|
|
12
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
13
|
+
@click="$emit('openPanel', member.digitalDocument)"
|
|
14
|
+
/>
|
|
15
|
+
<base-content-block
|
|
16
|
+
v-if="!disabled && !member.digitalDocument"
|
|
17
|
+
class="d-flex align-center justify-between !py-3.5 !pr-5"
|
|
18
|
+
:class="[$styles.whiteBg]"
|
|
19
|
+
@click="$emit('openDigitalDocPanel', member.iin)"
|
|
20
|
+
>
|
|
21
|
+
<p :class="[$styles.greyText]">Получить цифровой документ</p>
|
|
22
|
+
<div class="cursor-pointer">
|
|
23
|
+
<i class="mdi mdi-file-document text-xl" :class="[$styles.blueText]"></i>
|
|
24
|
+
</div>
|
|
25
|
+
</base-content-block>
|
|
26
|
+
</base-form-section>
|
|
27
|
+
</section>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import type { Base } from '../../types';
|
|
32
|
+
|
|
33
|
+
defineEmits(['openDigitalDocPanel', 'openPanel']);
|
|
34
|
+
defineProps({
|
|
35
|
+
title: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: '',
|
|
38
|
+
},
|
|
39
|
+
member: {
|
|
40
|
+
type: Object as PropType<Base.Document.Digital>,
|
|
41
|
+
default: null,
|
|
42
|
+
},
|
|
43
|
+
number: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-otp-input v-model="modelValue" class="base-otp-input" base-color="#A0B3D8" color="#FFF" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
const modelValue = defineModel<string>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
.base-otp-input .v-otp-input__field {
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
}
|
|
13
|
+
.base-otp-input .v-field {
|
|
14
|
+
width: 50px;
|
|
15
|
+
height: 60px;
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
}
|
|
18
|
+
.base-otp-input .v-otp-input__content {
|
|
19
|
+
gap: 24px;
|
|
20
|
+
}
|
|
21
|
+
.base-otp-input .v-otp-input__divider {
|
|
22
|
+
margin: 0 4px;
|
|
23
|
+
color: #b8b8b8;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<base-form-input v-model="formStore.contractDate" :label="$dataStore.t('form.date')" :readonly="true" append-inner-icon="mdi mdi-calendar-blank-outline" />
|
|
18
18
|
<base-file-input :readonly="isDisabled" @input.prevent="onFileChange($event)" />
|
|
19
19
|
</base-content-block>
|
|
20
|
-
<base-content-block v-for="document of formStore.signedDocumentList" :key="document.id" :class="[$styles.textSimple]">
|
|
20
|
+
<base-content-block v-for="document of !useEnv().isProduction ? documentListFiltered : formStore.signedDocumentList" :key="document.id" :class="[$styles.textSimple]">
|
|
21
21
|
<h5 class="text-center font-medium mb-4">
|
|
22
22
|
{{ document.fileTypeName }}
|
|
23
23
|
</h5>
|
|
@@ -31,6 +31,40 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</base-content-block>
|
|
33
33
|
</section>
|
|
34
|
+
<section v-if="hasDigitalDocuments">
|
|
35
|
+
<base-digital-document
|
|
36
|
+
v-if="$route.params.taskId !== '0'"
|
|
37
|
+
:member="policyholderForm"
|
|
38
|
+
:title="$dataStore.t('policyholderForm')"
|
|
39
|
+
:disabled="isDigitalDocDisabled"
|
|
40
|
+
@openDigitalDocPanel="openDigitalDocPanel($event, 'Страхователя')"
|
|
41
|
+
@openPanel="openPanel"
|
|
42
|
+
/>
|
|
43
|
+
<div v-if="insuredFiltered.length !== 0">
|
|
44
|
+
<base-digital-document
|
|
45
|
+
v-for="(member, index) in insuredFiltered"
|
|
46
|
+
:key="index"
|
|
47
|
+
:member="member"
|
|
48
|
+
:number="index + 1"
|
|
49
|
+
:title="$dataStore.t('insuredForm')"
|
|
50
|
+
:disabled="isDigitalDocDisabled"
|
|
51
|
+
@openDigitalDocPanel="openDigitalDocPanel($event, 'Застрахованного')"
|
|
52
|
+
@openPanel="openPanel"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<div v-if="beneficiaryFiltered.length !== 0">
|
|
56
|
+
<base-digital-document
|
|
57
|
+
v-for="(member, index) in beneficiaryFiltered"
|
|
58
|
+
:key="index"
|
|
59
|
+
:member="member"
|
|
60
|
+
:number="index + 1"
|
|
61
|
+
:title="$dataStore.t('beneficiaryForm')"
|
|
62
|
+
:disabled="isDigitalDocDisabled"
|
|
63
|
+
@openDigitalDocPanel="openDigitalDocPanel($event, 'Выгодоприобретателя')"
|
|
64
|
+
@openPanel="openPanel"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
34
68
|
<div v-if="noDocuments" class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
|
|
35
69
|
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
|
|
36
70
|
<path
|
|
@@ -97,7 +131,7 @@
|
|
|
97
131
|
</div>
|
|
98
132
|
</base-content-block>
|
|
99
133
|
</section>
|
|
100
|
-
<Teleport v-if="
|
|
134
|
+
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
101
135
|
<base-fade-transition>
|
|
102
136
|
<div :class="[$styles.flexColNav]">
|
|
103
137
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
@@ -108,6 +142,46 @@
|
|
|
108
142
|
</div>
|
|
109
143
|
</base-fade-transition>
|
|
110
144
|
</Teleport>
|
|
145
|
+
<Teleport v-if="isDigitalDocOpen" to="#right-panel-actions">
|
|
146
|
+
<div :class="[$styles.flexColNav]">
|
|
147
|
+
<base-form-section class="!mt-0">
|
|
148
|
+
<v-expansion-panels :flat="true">
|
|
149
|
+
<v-expansion-panel class="digital-doc-info !rounded-[8px]">
|
|
150
|
+
<v-expansion-panel-title class="!text-[12px]"> Как получить цифровой документ: </v-expansion-panel-title>
|
|
151
|
+
<v-expansion-panel-text class="text-[12px] text-[#464f60]">
|
|
152
|
+
1. Выберите тип документа.<br /><br />
|
|
153
|
+
2. Через приложение eGov mobile и другие приложения: <br />
|
|
154
|
+
• Откройте раздел "Цифровые документы". <br />
|
|
155
|
+
• Выберите нужный документ и откройте доступ. <br />
|
|
156
|
+
• Введите 6-значный код в поле «Код подтверждения». <br />
|
|
157
|
+
• Нажмите "Получить документ".<br /><br />
|
|
158
|
+
3. Через SMS: <br />
|
|
159
|
+
• Нажмите "Отправить код". <br />
|
|
160
|
+
• Введите полученный SMS-код. <br />
|
|
161
|
+
• Нажмите "Получить документ".<br />
|
|
162
|
+
</v-expansion-panel-text>
|
|
163
|
+
</v-expansion-panel>
|
|
164
|
+
</v-expansion-panels>
|
|
165
|
+
</base-form-section>
|
|
166
|
+
<div class="p-4 d-flex flex-col gap-0.5" :class="[$styles.blueBgLight, $styles.rounded]">
|
|
167
|
+
<base-rounded-select v-model="documentType" class="document-type-select" :items="documentItems" :label="$dataStore.t('form.documentType')" hide-details />
|
|
168
|
+
<div class="digital-document-otp flex flex-col">
|
|
169
|
+
<base-otp-input
|
|
170
|
+
v-model="otpCode"
|
|
171
|
+
@keyup.enter.prevent="otpCode.length === useMask().otpSixDigit.length && getCode()"
|
|
172
|
+
@input="otpCode.length === useMask().otpSixDigit.length && getDigitalDocument()"
|
|
173
|
+
/>
|
|
174
|
+
<base-animation>
|
|
175
|
+
<span v-if="!documentLoading" class="text-center cursor-pointer" :class="[$styles.mutedText]" @click="getCode"
|
|
176
|
+
>Не получили код? <span class="underline underline-offset-2">Отправить код заново</span></span
|
|
177
|
+
>
|
|
178
|
+
</base-animation>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" :btn="$styles.greenLightBtn" text="Отправить SMS-код" @click="getCode" />
|
|
182
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Получить документ" @click="getDigitalDocument" />
|
|
183
|
+
</div>
|
|
184
|
+
</Teleport>
|
|
111
185
|
<base-dialog
|
|
112
186
|
v-model="deletionDialog"
|
|
113
187
|
:title="$dataStore.t('dialog.confirmDelete')"
|
|
@@ -122,19 +196,39 @@
|
|
|
122
196
|
|
|
123
197
|
<script lang="ts">
|
|
124
198
|
import { DocumentItem } from '../../composables/classes';
|
|
199
|
+
import type { IDocument } from '../../composables/classes';
|
|
125
200
|
import { uuid } from 'vue-uuid';
|
|
126
|
-
import type { FileActions } from '../../types';
|
|
201
|
+
import type { Base, FileActions } from '../../types';
|
|
127
202
|
|
|
128
203
|
export default defineComponent({
|
|
129
204
|
setup() {
|
|
205
|
+
type DigitalDocNames = 'Удостоверение личности' | 'Паспорт';
|
|
206
|
+
type DigitalDocTypes = 'IdentityCard' | 'Passport';
|
|
207
|
+
|
|
208
|
+
const route = useRoute();
|
|
130
209
|
const dataStore = useDataStore();
|
|
131
210
|
const formStore = useFormStore();
|
|
132
211
|
const currentDocument = ref<DocumentItem>(new DocumentItem());
|
|
133
212
|
const documentLoading = ref<boolean>(false);
|
|
134
213
|
const deletionDialog = ref<boolean>(false);
|
|
214
|
+
const isPanelOpen = ref<boolean>(false);
|
|
215
|
+
const isDigitalDocOpen = ref<boolean>(false);
|
|
135
216
|
const isDisabled = computed(() => !dataStore.isTask());
|
|
136
217
|
const contractDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Договор страхования' || i.nameRu === 'Договор'));
|
|
137
218
|
const processCode = formStore.applicationData.processCode;
|
|
219
|
+
|
|
220
|
+
const hasDigitalDocuments = computed(() => !useEnv().isProduction && dataStore.isEfoParent && !dataStore.isGns && !dataStore.isLifeBusiness && !!formStore.applicationData);
|
|
221
|
+
const isDigitalDocDisabled = computed(
|
|
222
|
+
() => !dataStore.isTask() || route.params.taskId === '0' || !dataStore.isInitiator() || !dataStore.isProcessEditable(formStore.applicationData.statusCode),
|
|
223
|
+
);
|
|
224
|
+
const documentType = ref<DigitalDocNames | null>(null);
|
|
225
|
+
const otpCode = ref<string>('');
|
|
226
|
+
const currentIin = ref<string>('');
|
|
227
|
+
const deleteFilesId = ['1', '2', '46'];
|
|
228
|
+
const documentItems: Array<{ title: DigitalDocNames; value: DigitalDocTypes }> = [
|
|
229
|
+
{ title: 'Удостоверение личности', value: 'IdentityCard' },
|
|
230
|
+
{ title: 'Паспорт', value: 'Passport' },
|
|
231
|
+
];
|
|
138
232
|
const signedContract = reactive<{
|
|
139
233
|
processInstanceId: string | number;
|
|
140
234
|
fileTypeId: string | number | null;
|
|
@@ -190,16 +284,24 @@ export default defineComponent({
|
|
|
190
284
|
const canDeleteFiles = computed(() => {
|
|
191
285
|
const baseCondition = dataStore.isTask() && dataStore.isInitiator() && dataStore.isProcessEditable(formStore.applicationData.statusCode);
|
|
192
286
|
if (dataStore.isBaiterek || dataStore.isBolashak || dataStore.isLiferenta || dataStore.isKazyna || dataStore.isAmulet || dataStore.isGons) {
|
|
193
|
-
return baseCondition && (currentDocument.value ? currentDocument.value.fileTypeCode
|
|
287
|
+
return baseCondition && (currentDocument.value ? deleteFilesId.includes(String(currentDocument.value.fileTypeCode)) : false);
|
|
194
288
|
}
|
|
195
289
|
if (dataStore.isPension) return baseCondition;
|
|
196
290
|
return false;
|
|
197
291
|
});
|
|
198
292
|
|
|
293
|
+
const policyholderForm = computed(() => formStore.policyholderForm as Base.Document.Digital);
|
|
294
|
+
const insuredFiltered = computed(() => formStore.insuredForm.filter(i => i.iin !== formStore.policyholderForm.iin) as Base.Document.Digital[]);
|
|
295
|
+
const beneficiaryFiltered = computed(() => formStore.beneficiaryForm.filter(i => i.iin !== formStore.policyholderForm.iin) as Base.Document.Digital[]);
|
|
296
|
+
const documentListFiltered = computed(() => formStore.signedDocumentList.filter(i => !['1', '2'].includes(String(i.fileTypeCode))));
|
|
297
|
+
|
|
199
298
|
const openPanel = async (document: DocumentItem) => {
|
|
200
299
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
201
300
|
currentDocument.value = document;
|
|
202
301
|
dataStore.rightPanel.open = true;
|
|
302
|
+
isDigitalDocOpen.value = false;
|
|
303
|
+
isPanelOpen.value = true;
|
|
304
|
+
dataStore.panelAction = null;
|
|
203
305
|
};
|
|
204
306
|
|
|
205
307
|
const onFileChange = async (event: InputEvent) => {
|
|
@@ -264,6 +366,17 @@ export default defineComponent({
|
|
|
264
366
|
}
|
|
265
367
|
};
|
|
266
368
|
|
|
369
|
+
const openDigitalDocPanel = async (iin: string, title: string) => {
|
|
370
|
+
isPanelOpen.value = false;
|
|
371
|
+
isDigitalDocOpen.value = true;
|
|
372
|
+
dataStore.panelAction = null;
|
|
373
|
+
dataStore.rightPanel.open = true;
|
|
374
|
+
dataStore.rightPanel.title = `Получить ЦД ${title}`;
|
|
375
|
+
documentType.value = null;
|
|
376
|
+
otpCode.value = '';
|
|
377
|
+
currentIin.value = iin;
|
|
378
|
+
};
|
|
379
|
+
|
|
267
380
|
watch(
|
|
268
381
|
() => document_list.value,
|
|
269
382
|
() => {
|
|
@@ -294,18 +407,93 @@ export default defineComponent({
|
|
|
294
407
|
const data = {
|
|
295
408
|
id: currentDocument.value.id,
|
|
296
409
|
processInstanceId: currentDocument.value.processInstanceId,
|
|
410
|
+
iin: currentDocument.value.iin ?? '',
|
|
297
411
|
};
|
|
298
412
|
await dataStore.deleteFile(data);
|
|
299
413
|
deletionDialog.value = false;
|
|
300
414
|
dataStore.rightPanel.open = false;
|
|
301
415
|
dataStore.panelAction = null;
|
|
302
416
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
417
|
+
if (hasDigitalDocuments.value && (currentDocument.value.fileTypeCode === '1' || currentDocument.value.fileTypeCode === '2')) {
|
|
418
|
+
getDigitalDocs();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
const getCode = async () => {
|
|
424
|
+
if (!documentType.value) {
|
|
425
|
+
dataStore.showToaster('error', 'Выберите тип документа', 3000);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
documentLoading.value = true;
|
|
429
|
+
const response = await dataStore.onlineAccess(currentIin.value, String(documentType.value));
|
|
430
|
+
if (response) {
|
|
431
|
+
dataStore.showToaster('success', dataStore.t('toaster.successOtp'), 3000);
|
|
432
|
+
}
|
|
433
|
+
documentLoading.value = false;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
const getDigitalDocument = async () => {
|
|
437
|
+
if (!otpCode.value) {
|
|
438
|
+
dataStore.showToaster('error', 'Введите код подтверждения', 3000);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
documentLoading.value = true;
|
|
442
|
+
const response = await dataStore.digitalDocuments(currentIin.value, String(formStore.applicationData.processInstanceId), otpCode.value);
|
|
443
|
+
if (response) {
|
|
444
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
445
|
+
getDigitalDocs();
|
|
446
|
+
isDigitalDocOpen.value = false;
|
|
447
|
+
dataStore.panelAction = null;
|
|
448
|
+
dataStore.rightPanel.open = false;
|
|
449
|
+
documentType.value = null;
|
|
450
|
+
otpCode.value = '';
|
|
451
|
+
}
|
|
452
|
+
documentLoading.value = false;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
const findCommonDocs = (members: Base.Document.Digital[]) => {
|
|
456
|
+
let commonDocs: IDocument[] = [];
|
|
457
|
+
for (let member of members) {
|
|
458
|
+
const matchingDoc = formStore.signedDocumentList.find(doc => doc.iin === String(member.iin).replaceAll('-', '') && (doc.fileTypeCode === '1' || doc.fileTypeCode === '2'));
|
|
459
|
+
if (matchingDoc) commonDocs.push(matchingDoc);
|
|
460
|
+
}
|
|
461
|
+
return commonDocs;
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
const setDigitalDocuments = (members: Base.Document.Digital[]) => {
|
|
465
|
+
const commonDocs = findCommonDocs(members);
|
|
466
|
+
if (commonDocs.length !== 0) {
|
|
467
|
+
for (let member of members) {
|
|
468
|
+
const matchingDoc = commonDocs.find(doc => doc.iin === String(member.iin).replaceAll('-', ''));
|
|
469
|
+
if (matchingDoc) member.digitalDocument = matchingDoc;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
const clearDigitalDocuments = (members: Base.Document.Digital[]) => {
|
|
475
|
+
for (let member of members) member.digitalDocument = null;
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
const getDigitalDocs = () => {
|
|
479
|
+
if (route.params.taskId !== '0') {
|
|
480
|
+
clearDigitalDocuments([formStore.policyholderForm as Base.Document.Digital]);
|
|
481
|
+
setDigitalDocuments([formStore.policyholderForm as Base.Document.Digital]);
|
|
482
|
+
if (insuredFiltered.value.length !== 0) {
|
|
483
|
+
clearDigitalDocuments(insuredFiltered.value);
|
|
484
|
+
setDigitalDocuments(insuredFiltered.value);
|
|
485
|
+
}
|
|
486
|
+
if (beneficiaryFiltered.value.length !== 0) {
|
|
487
|
+
clearDigitalDocuments(beneficiaryFiltered.value);
|
|
488
|
+
setDigitalDocuments(beneficiaryFiltered.value);
|
|
489
|
+
}
|
|
303
490
|
}
|
|
304
491
|
};
|
|
305
492
|
|
|
306
493
|
const onInit = async () => {
|
|
307
494
|
await dataStore.getDicFileTypeList();
|
|
308
495
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
496
|
+
if (hasDigitalDocuments.value) getDigitalDocs();
|
|
309
497
|
};
|
|
310
498
|
|
|
311
499
|
onInit();
|
|
@@ -316,12 +504,17 @@ export default defineComponent({
|
|
|
316
504
|
|
|
317
505
|
return {
|
|
318
506
|
// State
|
|
507
|
+
otpCode,
|
|
319
508
|
formStore,
|
|
320
|
-
|
|
509
|
+
processCode,
|
|
510
|
+
isPanelOpen,
|
|
321
511
|
DocumentItem,
|
|
512
|
+
documentType,
|
|
513
|
+
documentItems,
|
|
322
514
|
signedContract,
|
|
323
515
|
deletionDialog,
|
|
324
|
-
|
|
516
|
+
documentLoading,
|
|
517
|
+
isDigitalDocOpen,
|
|
325
518
|
underDocumentsList,
|
|
326
519
|
|
|
327
520
|
// Computed
|
|
@@ -329,17 +522,54 @@ export default defineComponent({
|
|
|
329
522
|
showContract,
|
|
330
523
|
noDocuments,
|
|
331
524
|
canDeleteFiles,
|
|
525
|
+
insuredFiltered,
|
|
526
|
+
policyholderForm,
|
|
527
|
+
beneficiaryFiltered,
|
|
528
|
+
hasDigitalDocuments,
|
|
529
|
+
documentListFiltered,
|
|
530
|
+
isDigitalDocDisabled,
|
|
332
531
|
isUnderwriterDocuments,
|
|
333
532
|
|
|
334
533
|
// Functions
|
|
534
|
+
getCode,
|
|
335
535
|
getFile,
|
|
336
536
|
openPanel,
|
|
337
537
|
deleteFile,
|
|
538
|
+
getDigitalDocument,
|
|
338
539
|
onFileChange,
|
|
339
540
|
onUnderFiles,
|
|
541
|
+
openDigitalDocPanel,
|
|
340
542
|
uploadUnderFiles,
|
|
341
543
|
onClearUnderFiles,
|
|
342
544
|
};
|
|
343
545
|
},
|
|
344
546
|
});
|
|
345
547
|
</script>
|
|
548
|
+
|
|
549
|
+
<style>
|
|
550
|
+
.document-type-select .v-field {
|
|
551
|
+
border: none !important;
|
|
552
|
+
border-radius: 4px;
|
|
553
|
+
height: 56px;
|
|
554
|
+
}
|
|
555
|
+
.digital-document-otp .base-otp-input .v-otp-input__content {
|
|
556
|
+
gap: 8px;
|
|
557
|
+
padding-right: 0px !important;
|
|
558
|
+
padding-left: 0px !important;
|
|
559
|
+
}
|
|
560
|
+
.digital-doc-info .v-expansion-panel-text__wrapper {
|
|
561
|
+
padding: 8px 14px !important;
|
|
562
|
+
}
|
|
563
|
+
.digital-doc-info .v-expansion-panel-title {
|
|
564
|
+
max-height: 40px !important;
|
|
565
|
+
min-height: 39px !important;
|
|
566
|
+
padding: 0px 14px !important;
|
|
567
|
+
color: #464f60 !important;
|
|
568
|
+
}
|
|
569
|
+
.document-type-select .v-field-label--floating {
|
|
570
|
+
top: 5px !important;
|
|
571
|
+
}
|
|
572
|
+
.document-type-select .v-field__input {
|
|
573
|
+
padding-top: 21px;
|
|
574
|
+
}
|
|
575
|
+
</style>
|
|
@@ -702,18 +702,16 @@
|
|
|
702
702
|
</Teleport>
|
|
703
703
|
<Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#right-panel-actions">
|
|
704
704
|
<div :class="[$styles.flexColNav]">
|
|
705
|
-
<base-
|
|
706
|
-
<
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
/>
|
|
716
|
-
</base-fade-transition>
|
|
705
|
+
<base-animation>
|
|
706
|
+
<div v-if="otpCondition && member.otpTokenId" class="flex flex-col">
|
|
707
|
+
<base-form-section class="mt-0 py-2">
|
|
708
|
+
<base-otp-input v-model="member.otpCode" :length="4" @keyup.enter.prevent="hasOtp && checkOtp()" @input="onOtpCodeInput" />
|
|
709
|
+
</base-form-section>
|
|
710
|
+
<span class="text-center cursor-pointer mt-2" :class="[$styles.mutedText]" @click="sendOtp(false)"
|
|
711
|
+
>Не получили код? <span class="underline underline-offset-2">Отправить код заново</span></span
|
|
712
|
+
>
|
|
713
|
+
</div>
|
|
714
|
+
</base-animation>
|
|
717
715
|
<base-btn v-if="!member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.sendOtp')" @click="sendOtp(false)" />
|
|
718
716
|
<base-btn v-if="member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.check')" @click="checkOtp()" />
|
|
719
717
|
</div>
|
|
@@ -721,12 +719,12 @@
|
|
|
721
719
|
<Teleport v-if="isPositionPanelOpen" to="#right-panel-actions">
|
|
722
720
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
723
721
|
<base-rounded-input
|
|
724
|
-
v-model="searchQuery"
|
|
725
|
-
|
|
722
|
+
v-model.trim="searchQuery"
|
|
723
|
+
label="Выполните поиск должностей"
|
|
726
724
|
class="w-full p-2"
|
|
727
725
|
:hide-details="searchQuery.length >= 4"
|
|
728
|
-
:rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len:
|
|
729
|
-
|
|
726
|
+
:rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len: 4 }) : true]"
|
|
727
|
+
append-inner-icon="mdi mdi-magnify"
|
|
730
728
|
@append="searchPositions"
|
|
731
729
|
/>
|
|
732
730
|
<base-animation>
|
|
@@ -973,7 +971,7 @@ export default {
|
|
|
973
971
|
(whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin) ||
|
|
974
972
|
(dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
|
|
975
973
|
);
|
|
976
|
-
const hasWorkPositionDict =
|
|
974
|
+
const hasWorkPositionDict = dataStore.isBaiterek && dataStore.isEfoParent;
|
|
977
975
|
|
|
978
976
|
const birthDateRule = computed(() => {
|
|
979
977
|
const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
|
|
@@ -1085,6 +1083,10 @@ export default {
|
|
|
1085
1083
|
};
|
|
1086
1084
|
|
|
1087
1085
|
const searchPositions = async () => {
|
|
1086
|
+
if (searchQuery.value.length < 4) {
|
|
1087
|
+
dataStore.showToaster('error', dataStore.t('rules.searchQueryLen', { len: 4 }));
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1088
1090
|
if (!isDisabled.value) {
|
|
1089
1091
|
isPanelLoading.value = true;
|
|
1090
1092
|
positionsList.value = await dataStore.getWorkPosition(searchQuery.value);
|
|
@@ -1123,6 +1125,7 @@ export default {
|
|
|
1123
1125
|
isPositionPanelOpen.value = false;
|
|
1124
1126
|
}
|
|
1125
1127
|
if (type === 'workPosition') {
|
|
1128
|
+
dataStore.rightPanel.title = dataStore.t('form.jobPosition');
|
|
1126
1129
|
isPositionPanelOpen.value = true;
|
|
1127
1130
|
isOtpPanelOpen.value = false;
|
|
1128
1131
|
isDocumentOpen.value = false;
|
|
@@ -1938,13 +1941,14 @@ export default {
|
|
|
1938
1941
|
watch(
|
|
1939
1942
|
() => member.value.age,
|
|
1940
1943
|
val => {
|
|
1941
|
-
if (val
|
|
1942
|
-
if (member.value.hasAgreement !== true) {
|
|
1944
|
+
if (val) {
|
|
1945
|
+
if (Number(val) >= 18 && member.value.hasAgreement !== true) {
|
|
1943
1946
|
member.value.hasAgreement = false;
|
|
1947
|
+
} else {
|
|
1948
|
+
member.value.hasAgreement = true;
|
|
1944
1949
|
}
|
|
1945
|
-
} else {
|
|
1946
|
-
member.value.hasAgreement = true;
|
|
1947
1950
|
}
|
|
1951
|
+
|
|
1948
1952
|
member.value.isInsuredUnderage = Number(val) >= 18 ? false : true;
|
|
1949
1953
|
},
|
|
1950
1954
|
{ immediate: true },
|
|
@@ -1445,7 +1445,7 @@ export default defineComponent({
|
|
|
1445
1445
|
if (calculatorForm.type.code === 'Single' && calculatorForm.startDate && calculatorForm.endDate) {
|
|
1446
1446
|
const formattedStartDate = formatDate(calculatorForm.startDate);
|
|
1447
1447
|
const formattedEndDate = formatDate(calculatorForm.endDate);
|
|
1448
|
-
if (formattedStartDate && formattedEndDate && formattedStartDate.getTime()
|
|
1448
|
+
if (formattedStartDate && formattedEndDate && formattedStartDate.getTime() >= formattedEndDate.getTime()) {
|
|
1449
1449
|
return dataStore.showToaster('error', dataStore.t('toaster.startMoreEnd'));
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
package/composables/classes.ts
CHANGED
|
@@ -198,13 +198,25 @@ export class User {
|
|
|
198
198
|
roles: string[];
|
|
199
199
|
id: string | null;
|
|
200
200
|
fullName: string | null;
|
|
201
|
+
code: string;
|
|
202
|
+
branchCode: string;
|
|
201
203
|
|
|
202
|
-
constructor(
|
|
204
|
+
constructor(
|
|
205
|
+
login: string | null = null,
|
|
206
|
+
password: string | null = null,
|
|
207
|
+
roles: string[] = [],
|
|
208
|
+
id: string | null = null,
|
|
209
|
+
fullName: string | null = null,
|
|
210
|
+
code: string = '',
|
|
211
|
+
branchCode: string = '',
|
|
212
|
+
) {
|
|
203
213
|
this.login = login;
|
|
204
214
|
this.password = password;
|
|
205
215
|
this.roles = roles;
|
|
206
216
|
this.id = id;
|
|
207
217
|
this.fullName = fullName;
|
|
218
|
+
this.code = code;
|
|
219
|
+
this.branchCode = branchCode;
|
|
208
220
|
}
|
|
209
221
|
|
|
210
222
|
resetUser() {
|
|
@@ -213,6 +225,8 @@ export class User {
|
|
|
213
225
|
this.roles = [];
|
|
214
226
|
this.id = null;
|
|
215
227
|
this.fullName = null;
|
|
228
|
+
this.code = '';
|
|
229
|
+
this.branchCode = '';
|
|
216
230
|
}
|
|
217
231
|
}
|
|
218
232
|
|
|
@@ -474,11 +488,12 @@ export class Member extends Person {
|
|
|
474
488
|
parsedDocument: any;
|
|
475
489
|
hasAgreement: boolean | null;
|
|
476
490
|
otpTokenId: string | null;
|
|
477
|
-
otpCode: string
|
|
491
|
+
otpCode: string;
|
|
478
492
|
documentsList: Types.ContragentDocuments[];
|
|
479
493
|
isInsuredUnderage?: boolean = false;
|
|
480
494
|
bankInfo: BankInfoClass;
|
|
481
495
|
transferContractCompany: Value;
|
|
496
|
+
digitalDocument: IDocument | null;
|
|
482
497
|
identityDocument: {
|
|
483
498
|
documentType: Value;
|
|
484
499
|
documentNumber: string | null;
|
|
@@ -605,7 +620,7 @@ export class Member extends Person {
|
|
|
605
620
|
this.homePhone = homePhone;
|
|
606
621
|
this.email = email;
|
|
607
622
|
this.otpTokenId = null;
|
|
608
|
-
this.otpCode =
|
|
623
|
+
this.otpCode = '';
|
|
609
624
|
this.address = address;
|
|
610
625
|
this.familyStatus = familyStatus;
|
|
611
626
|
this.isTerror = isTerror;
|
|
@@ -623,6 +638,7 @@ export class Member extends Person {
|
|
|
623
638
|
this.hasAgreement = null;
|
|
624
639
|
this.bankInfo = new BankInfoClass();
|
|
625
640
|
this.transferContractCompany = new Value();
|
|
641
|
+
this.digitalDocument = null;
|
|
626
642
|
this.identityDocument = {
|
|
627
643
|
documentType: new Value(),
|
|
628
644
|
documentNumber: null,
|
package/composables/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { jwtDecode as jwt_decode } from 'jwt-decode';
|
|
|
3
3
|
import { XMLParser } from 'fast-xml-parser';
|
|
4
4
|
import { AxiosError } from 'axios';
|
|
5
5
|
import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
|
|
6
|
-
import { PolicyholderClass } from '../composables/classes';
|
|
6
|
+
import { PolicyholderClass, Value } from '../composables/classes';
|
|
7
7
|
import type { EnvModes, NestedKeyOf, ResponseStructure, Utils } from '../types';
|
|
8
8
|
|
|
9
9
|
export const useEnv = () => {
|
|
@@ -17,7 +17,8 @@ export const useEnv = () => {
|
|
|
17
17
|
|
|
18
18
|
export class Masks {
|
|
19
19
|
numbers: string = '#*';
|
|
20
|
-
otp: string = '
|
|
20
|
+
otp: string = '####';
|
|
21
|
+
otpSixDigit: string = '######';
|
|
21
22
|
spacedNumbers: string = '### ### ### ### ### ### ###';
|
|
22
23
|
iin: string = '###-###-###-###';
|
|
23
24
|
phone: string = '+7 (7##) ### ## ##';
|
|
@@ -275,6 +276,7 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
|
|
|
275
276
|
if (beneficiary.id === 0) {
|
|
276
277
|
beneficiary.registrationCity = new Value();
|
|
277
278
|
beneficiary.registrationCountry = new Value();
|
|
279
|
+
beneficiary.birthPlace = new Value();
|
|
278
280
|
beneficiary.registrationMicroDistrict = '';
|
|
279
281
|
beneficiary.registrationNumberApartment = '';
|
|
280
282
|
beneficiary.registrationNumberApartment = '';
|
|
@@ -297,6 +299,13 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
|
|
|
297
299
|
const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
|
|
298
300
|
beneficiary.registrationCity = city ?? new Value();
|
|
299
301
|
}
|
|
302
|
+
const contragentData = beneficiary.response.contragent;
|
|
303
|
+
if (contragentData) {
|
|
304
|
+
const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
|
|
305
|
+
beneficiary.birthPlace = country ?? new Value();
|
|
306
|
+
} else {
|
|
307
|
+
beneficiary.birthPlace = new Value();
|
|
308
|
+
}
|
|
300
309
|
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
301
310
|
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
302
311
|
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
|
@@ -334,6 +343,7 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
|
|
|
334
343
|
if (insured.id === 0) {
|
|
335
344
|
insured.registrationCity = new Value();
|
|
336
345
|
insured.registrationCountry = new Value();
|
|
346
|
+
insured.birthPlace = new Value();
|
|
337
347
|
insured.registrationMicroDistrict = '';
|
|
338
348
|
insured.registrationNumberApartment = '';
|
|
339
349
|
insured.registrationNumberApartment = '';
|
|
@@ -356,6 +366,13 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
|
|
|
356
366
|
const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
|
|
357
367
|
insured.registrationCity = city ?? new Value();
|
|
358
368
|
}
|
|
369
|
+
const contragentData = insured.response.contragent;
|
|
370
|
+
if (contragentData) {
|
|
371
|
+
const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
|
|
372
|
+
insured.birthPlace = country ?? new Value();
|
|
373
|
+
} else {
|
|
374
|
+
insured.birthPlace = new Value();
|
|
375
|
+
}
|
|
359
376
|
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
360
377
|
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
361
378
|
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
package/composables/styles.ts
CHANGED
|
@@ -15,24 +15,13 @@ export class Styles {
|
|
|
15
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
16
16
|
|
|
17
17
|
// Green
|
|
18
|
-
greenBg: string =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
: 'bg-[#009C73]';
|
|
22
|
-
greenBgHover: string =
|
|
23
|
-
import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
|
|
24
|
-
? 'bg-[#C19B5F]'
|
|
25
|
-
: 'hover:bg-[#00a277]';
|
|
26
|
-
greenBgLight: string =
|
|
27
|
-
import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
|
|
28
|
-
? 'bg-[#e8d2af]'
|
|
29
|
-
: 'bg-[#EAF6EF]';
|
|
18
|
+
greenBg: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#DEBE8C]' : 'bg-[#009C73]';
|
|
19
|
+
greenBgHover: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#C19B5F]' : 'hover:bg-[#00a277]';
|
|
20
|
+
greenBgLight: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#e8d2af]' : 'bg-[#EAF6EF]';
|
|
30
21
|
greenText: string = '!text-[#009C73]';
|
|
31
22
|
greenTextHover: string = 'hover:text-[#009C73]';
|
|
32
23
|
greenBgLightHover: string =
|
|
33
|
-
import.meta.env.VITE_PRODUCT
|
|
34
|
-
? 'hover:bg-[#efdfc6]'
|
|
35
|
-
: 'hover:bg-[#dbf0e4]';
|
|
24
|
+
String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'hover:bg-[#efdfc6]' : 'hover:bg-[#dbf0e4]';
|
|
36
25
|
|
|
37
26
|
// Yellow
|
|
38
27
|
yellowText: string = '!text-[#FAB31C]';
|
|
@@ -65,7 +54,7 @@ export class Styles {
|
|
|
65
54
|
blueBorder: string = 'border-[1px] border-[#A0B3D8]';
|
|
66
55
|
blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
|
|
67
56
|
greenBorder: string =
|
|
68
|
-
import.meta.env.VITE_PRODUCT
|
|
57
|
+
String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti'
|
|
69
58
|
? 'border-[1px] border-[#DEBE8C]'
|
|
70
59
|
: 'border-[1px] border-[#009C73]';
|
|
71
60
|
redBorder: string = 'border-[1px] border-[#FD2D39]';
|
package/locales/ru.json
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"courseChanged": "Изменился курс НБ РК, необходимо вернуть на доработку и сделать перерасчет",
|
|
120
120
|
"noAmountBeforeTypeAndCountries": "Страховая сумма вычисляется после выбора полей типа поездки и страны поездки",
|
|
121
121
|
"noMaxDaysBeforePeriod": "Количество дней пребывания вычисляется после выбора поля периода",
|
|
122
|
-
"startMoreEnd": "Дата начала не должна превышать дату окончания поездки",
|
|
122
|
+
"startMoreEnd": "Дата начала не должна равняться или превышать дату окончания поездки",
|
|
123
123
|
"passportNotFound": "Паспорт не найден",
|
|
124
124
|
"wrongInn": "Неправильный ИНН",
|
|
125
125
|
"underageShouldBeLess18": "Несовершеннолетний не может быть старше 18 лет",
|
package/nuxt.config.ts
CHANGED
|
@@ -11,7 +11,7 @@ export default defineNuxtConfig({
|
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
build: {
|
|
14
|
-
transpile: ['@vuepic/vue-datepicker', '@microsoft/signalr', 'vue-uuid', 'qrcode.vue'],
|
|
14
|
+
transpile: ['@vuepic/vue-datepicker', '@microsoft/signalr', 'vue-uuid', 'qrcode.vue', 'vue-i18n'],
|
|
15
15
|
},
|
|
16
16
|
|
|
17
17
|
vite: {
|
|
@@ -26,7 +26,7 @@ export default defineNuxtConfig({
|
|
|
26
26
|
},
|
|
27
27
|
plugins: [
|
|
28
28
|
VueI18nVitePlugin.vite({
|
|
29
|
-
include: [path.resolve(__dirname, './
|
|
29
|
+
include: [path.resolve(__dirname, './locales/**')],
|
|
30
30
|
}),
|
|
31
31
|
],
|
|
32
32
|
build: {
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -163,6 +163,8 @@ export const useDataStore = defineStore('data', {
|
|
|
163
163
|
if (decoded) {
|
|
164
164
|
this.user.id = String(decoded.sub);
|
|
165
165
|
this.user.fullName = `${decoded.lastName} ${decoded.firstName} ${decoded.middleName ?? ''}`;
|
|
166
|
+
this.user.code = decoded.code;
|
|
167
|
+
this.user.branchCode = decoded.branchCode;
|
|
166
168
|
const key = getKeyWithPattern(decoded, 'role');
|
|
167
169
|
if (key) {
|
|
168
170
|
const roles = decoded[key as keyof Types.Utils.JwtToken];
|
|
@@ -3423,12 +3425,11 @@ export const useDataStore = defineStore('data', {
|
|
|
3423
3425
|
if (person.regAddress.flat) member.registrationNumberApartment = person.regAddress.flat;
|
|
3424
3426
|
|
|
3425
3427
|
if (Array.isArray(person.documents.document)) {
|
|
3426
|
-
const
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
);
|
|
3428
|
+
const filteredDocuments = person.documents.document.filter(i => new Date(i.endDate) > new Date(Date.now()) && i.status.code === '00');
|
|
3429
|
+
const validDocument =
|
|
3430
|
+
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes['1UDL']) ??
|
|
3431
|
+
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.VNZ) ??
|
|
3432
|
+
filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS);
|
|
3432
3433
|
if (validDocument) {
|
|
3433
3434
|
const documentType = this.documentTypes.find(
|
|
3434
3435
|
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(validDocument.type.code)],
|
|
@@ -3497,7 +3498,6 @@ export const useDataStore = defineStore('data', {
|
|
|
3497
3498
|
'clientData.authoritedPerson.economySectorCode',
|
|
3498
3499
|
'clientData.authoritedPerson.legalAddress',
|
|
3499
3500
|
'clientData.authoritedPerson.placeOfBirth',
|
|
3500
|
-
'clientData.authoritedPerson.resident',
|
|
3501
3501
|
'clientData.authoritedPerson.taxResidentCountry',
|
|
3502
3502
|
'clientData.authoritedPerson.addTaxResidency',
|
|
3503
3503
|
]);
|
|
@@ -3814,6 +3814,37 @@ export const useDataStore = defineStore('data', {
|
|
|
3814
3814
|
|
|
3815
3815
|
return true;
|
|
3816
3816
|
},
|
|
3817
|
+
async onlineAccess(iin: string, documentType: string) {
|
|
3818
|
+
try {
|
|
3819
|
+
const data = {
|
|
3820
|
+
userName: this.user.code,
|
|
3821
|
+
branchName: this.user.branchCode,
|
|
3822
|
+
iin: iin.replaceAll('-', ''),
|
|
3823
|
+
documentType: documentType,
|
|
3824
|
+
};
|
|
3825
|
+
await this.api.integration.onlineAccess(data);
|
|
3826
|
+
return true;
|
|
3827
|
+
} catch (err) {
|
|
3828
|
+
ErrorHandler(err);
|
|
3829
|
+
return null;
|
|
3830
|
+
}
|
|
3831
|
+
},
|
|
3832
|
+
async digitalDocuments(iin: string, processInstanceId: string, code: string) {
|
|
3833
|
+
try {
|
|
3834
|
+
const data = {
|
|
3835
|
+
userName: this.user.code,
|
|
3836
|
+
branchName: this.user.branchCode,
|
|
3837
|
+
iin: iin.replaceAll('-', ''),
|
|
3838
|
+
processInstanceId: processInstanceId,
|
|
3839
|
+
code: code.replace(/\s/g, ''),
|
|
3840
|
+
};
|
|
3841
|
+
await this.api.integration.digitalDocuments(data);
|
|
3842
|
+
return true;
|
|
3843
|
+
} catch (err) {
|
|
3844
|
+
ErrorHandler(err);
|
|
3845
|
+
return null;
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3817
3848
|
async getVariableData(processCode: number) {
|
|
3818
3849
|
try {
|
|
3819
3850
|
const response = await this.api.getVariableData(0, processCode);
|
|
@@ -3875,7 +3906,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3875
3906
|
}
|
|
3876
3907
|
},
|
|
3877
3908
|
hasBirthSection(whichForm: keyof typeof StoreMembers) {
|
|
3878
|
-
if (this.
|
|
3909
|
+
if (this.isPension) return false;
|
|
3879
3910
|
switch (whichForm) {
|
|
3880
3911
|
case this.formStore.beneficiaryFormKey:
|
|
3881
3912
|
return false;
|
|
@@ -3938,7 +3969,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3938
3969
|
const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
|
|
3939
3970
|
return {
|
|
3940
3971
|
invoiceInfo: this.isAdmin(),
|
|
3941
|
-
toLKA: this.isAgent() || baseAccessRoles,
|
|
3972
|
+
toLKA: this.isAgent() || this.isManagerHalykBank() || baseAccessRoles,
|
|
3942
3973
|
toAML: this.isCompliance() || baseAccessRoles,
|
|
3943
3974
|
toAULETTI: this.isAgentAuletti() || baseAccessRoles,
|
|
3944
3975
|
toLKA_A: this.isAgentAuletti() || baseAccessRoles,
|
|
@@ -3967,7 +3998,8 @@ export const useDataStore = defineStore('data', {
|
|
|
3967
3998
|
this.isDsuio() ||
|
|
3968
3999
|
this.isAdjuster() ||
|
|
3969
4000
|
this.isDsoDirector() ||
|
|
3970
|
-
this.isAccountantDirector()
|
|
4001
|
+
this.isAccountantDirector() ||
|
|
4002
|
+
this.isHeadAdjuster(),
|
|
3971
4003
|
};
|
|
3972
4004
|
},
|
|
3973
4005
|
},
|
package/store/member.store.ts
CHANGED
|
@@ -308,11 +308,11 @@ export const useMemberStore = defineStore('members', {
|
|
|
308
308
|
// TODO Доработать и менять значение hasAgreement.value => true
|
|
309
309
|
this.dataStore.showToaster(otpResponse.status !== 2 ? 'error' : 'success', otpResponse.statusName, 3000);
|
|
310
310
|
if (otpResponse.status === 2) {
|
|
311
|
-
member.otpCode =
|
|
311
|
+
member.otpCode = '';
|
|
312
312
|
return true;
|
|
313
313
|
}
|
|
314
314
|
if (otpResponse.status === 4 || otpResponse.status === 5) {
|
|
315
|
-
member.otpCode =
|
|
315
|
+
member.otpCode = '';
|
|
316
316
|
member.otpTokenId = null;
|
|
317
317
|
return false;
|
|
318
318
|
}
|
package/types/enum.ts
CHANGED
package/types/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Value } from '../composables/classes';
|
|
2
|
+
import type { IDocument } from '../composables/classes';
|
|
2
3
|
import type { RouteLocationNormalizedLoaded, RouteLocationNormalized } from 'vue-router';
|
|
3
4
|
import type { AxiosRequestConfig } from 'axios';
|
|
4
5
|
import { Methods, CoreEnums, Actions, Statuses } from './enum';
|
|
@@ -724,6 +725,12 @@ export type SignedState = {
|
|
|
724
725
|
code: string;
|
|
725
726
|
};
|
|
726
727
|
|
|
728
|
+
export namespace Base {
|
|
729
|
+
export namespace Document {
|
|
730
|
+
export type Digital = { iin: string; longName: string; digitalDocument: IDocument | null };
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
727
734
|
export namespace Utils {
|
|
728
735
|
export type ProjectConfig = {
|
|
729
736
|
version: string;
|