hl-core 0.0.9-beta.20 → 0.0.9-beta.22
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 +16 -0
- package/api/interceptors.ts +6 -0
- package/components/Layout/SettingsPanel.vue +1 -1
- package/components/Pages/Anketa.vue +14 -12
- package/components/Pages/Auth.vue +12 -1
- package/components/Pages/Documents.vue +48 -0
- package/components/Pages/ProductConditions.vue +4 -4
- package/components/Panel/PanelHandler.vue +79 -41
- package/composables/classes.ts +18 -1
- package/locales/ru.json +42 -3
- package/package.json +1 -1
- package/store/data.store.ts +61 -17
- package/types/enum.ts +2 -0
- package/types/index.ts +7 -0
package/api/base.api.ts
CHANGED
|
@@ -394,6 +394,13 @@ export class ApiClass {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
+
async getGovernmentPremiums(id: string) {
|
|
398
|
+
return await this.axiosCall<GovPremiums>({
|
|
399
|
+
method: Methods.POST,
|
|
400
|
+
url: `/${this.productUrl}/api/Application/getGovernmentPremiums?processInstanceId=${id} `,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
397
404
|
async getCalculation(id: string) {
|
|
398
405
|
return await this.axiosCall<number>({
|
|
399
406
|
method: Methods.POST,
|
|
@@ -495,6 +502,15 @@ export class ApiClass {
|
|
|
495
502
|
});
|
|
496
503
|
}
|
|
497
504
|
|
|
505
|
+
async generateDocument(data: SignDataType) {
|
|
506
|
+
return await this.axiosCall<void>({
|
|
507
|
+
method: Methods.POST,
|
|
508
|
+
url: '/File/api/Document/Generate',
|
|
509
|
+
responseType: 'arraybuffer',
|
|
510
|
+
data: data,
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
498
514
|
async getSignedDocList(data: { processInstanceId: string | number }) {
|
|
499
515
|
return await this.axiosCall<IDocument[]>({
|
|
500
516
|
method: Methods.POST,
|
package/api/interceptors.ts
CHANGED
|
@@ -16,6 +16,9 @@ export default function (axios: AxiosInstance) {
|
|
|
16
16
|
if (request.baseURL === 'https://products.halyklife.kz/efo/api') {
|
|
17
17
|
request.baseURL = 'http://efo-prod.halyklife.nb/api';
|
|
18
18
|
}
|
|
19
|
+
if (request.baseURL === 'https://products.halyklife.kz/aml/api') {
|
|
20
|
+
request.baseURL = 'http://aml-prod.halyklife.nb/api';
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
if (host.startsWith('vega')) {
|
|
21
24
|
if (request.baseURL === 'https://products.halyklife.kz/api/v1/test/insis') {
|
|
@@ -24,6 +27,9 @@ export default function (axios: AxiosInstance) {
|
|
|
24
27
|
if (request.baseURL === 'https://products.halyklife.kz/dev/efo/api') {
|
|
25
28
|
request.baseURL = 'http://efo-dev.halyklife.nb/api';
|
|
26
29
|
}
|
|
30
|
+
if (request.baseURL === 'https://products.halyklife.kz/dev/aml/api') {
|
|
31
|
+
request.baseURL = 'http://aml-dev.halyklife.nb/api';
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
if (import.meta.env.VITE_ON_NEW_API === 'true') {
|
|
29
35
|
if (request.url.includes('api/Application')) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')" />
|
|
10
10
|
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
11
11
|
></base-panel-item>
|
|
12
|
-
<base-panel-item v-if="$dataStore.isEFO && $dataStore.accessToken" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
|
|
12
|
+
<base-panel-item v-if="$dataStore.isEFO && $dataStore.accessToken && $dataStore.hasAccess().toLKA" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
|
|
13
13
|
{{ $dataStore.t('labels.lkaLong') }}
|
|
14
14
|
<i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
|
|
15
15
|
></base-panel-item>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<base-fade-transition>
|
|
3
|
-
<section v-if="firstQuestionList && firstQuestionList.length && !firstPanel && !secondPanel" class="flex flex-col">
|
|
3
|
+
<section v-if="firstQuestionList && firstQuestionList.length && !firstPanel && !secondPanel" class="flex flex-col shrink grow max-h-[90vh]">
|
|
4
4
|
<section :class="[$styles.blueBgLight, $styles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
|
|
5
5
|
<base-form-toggle
|
|
6
6
|
v-model="answerToAll"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@clicked="handleToggler"
|
|
11
11
|
/>
|
|
12
12
|
</section>
|
|
13
|
-
<v-form ref="vForm" class="
|
|
13
|
+
<v-form ref="vForm" class="grow shrink overflow-y-scroll" @submit="submitForm">
|
|
14
14
|
<section
|
|
15
15
|
v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'N').length"
|
|
16
16
|
:class="[$styles.blueBgLight, $styles.rounded]"
|
|
@@ -69,18 +69,20 @@
|
|
|
69
69
|
</base-form-text-section>
|
|
70
70
|
</section>
|
|
71
71
|
</v-form>
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
<div class="px-[14px]">
|
|
73
|
+
<base-btn
|
|
74
|
+
class="my-[14px] self-center"
|
|
75
|
+
:loading="isButtonLoading"
|
|
76
|
+
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
77
|
+
@click="submitForm"
|
|
78
|
+
:text="$dataStore.t('buttons.save')"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
79
81
|
</section>
|
|
80
|
-
<
|
|
82
|
+
<base-btn
|
|
81
83
|
v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && firstPanel"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
class="!absolute z-10 my-[14px] self-center w-[96%] bottom-0"
|
|
85
|
+
:text="$dataStore.t('buttons.save')"
|
|
84
86
|
@click="submitSecondaryForm"
|
|
85
87
|
/>
|
|
86
88
|
<section ref="firstPanelSection" v-if="currentQuestion && currentQuestion.second && firstPanel" class="flex flex-col px-[10px] pb-[14px]" :class="[$styles.scrollPage]">
|
|
@@ -24,7 +24,15 @@
|
|
|
24
24
|
<span :class="[$styles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.needAuth') }}</span>
|
|
25
25
|
</div>
|
|
26
26
|
<v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
|
|
27
|
-
<base-rounded-input
|
|
27
|
+
<base-rounded-input
|
|
28
|
+
class="mb-1"
|
|
29
|
+
v-model.trim="login"
|
|
30
|
+
:rules="$rules.required"
|
|
31
|
+
:loading="authLoading"
|
|
32
|
+
:placeholder="$dataStore.t('buttons.userLogin')"
|
|
33
|
+
type="text"
|
|
34
|
+
@keyup.enter="submitAuthForm"
|
|
35
|
+
/>
|
|
28
36
|
<base-rounded-input
|
|
29
37
|
class="mb-1"
|
|
30
38
|
v-model.trim="password"
|
|
@@ -34,6 +42,7 @@
|
|
|
34
42
|
:append-inner-icon="showPassword ? 'mdi-eye-outline' : 'mdi-eye-off-outline'"
|
|
35
43
|
@append="showPassword = !showPassword"
|
|
36
44
|
:type="showPassword ? ('' as InputTypes) : 'password'"
|
|
45
|
+
@keyup.enter="submitAuthForm"
|
|
37
46
|
/>
|
|
38
47
|
<span v-if="$dataStore.isLKA" class="inline-block w-full text-end mb-4" :class="[$styles.textSimple, $styles.greyTextDark]" @click="isLogin = false">{{
|
|
39
48
|
$dataStore.t('labels.resetPassword')
|
|
@@ -61,6 +70,7 @@
|
|
|
61
70
|
:loading="authLoading"
|
|
62
71
|
:placeholder="$dataStore.t('form.phoneNumber')"
|
|
63
72
|
type="text"
|
|
73
|
+
@keyup.enter="submitAuthForm"
|
|
64
74
|
/>
|
|
65
75
|
<base-rounded-input
|
|
66
76
|
v-if="resetPasswordType === 'email'"
|
|
@@ -69,6 +79,7 @@
|
|
|
69
79
|
:loading="authLoading"
|
|
70
80
|
:placeholder="$dataStore.t('form.email')"
|
|
71
81
|
type="text"
|
|
82
|
+
@keyup.enter="submitAuthForm"
|
|
72
83
|
/>
|
|
73
84
|
<span class="inline-block w-full text-end mb-4" :class="[$styles.textSimple, $styles.greyTextDark]" @click="isLogin = true">{{ $dataStore.t('buttons.login') }}</span>
|
|
74
85
|
<base-btn :text="$dataStore.t('buttons.reset')" :disabled="authLoading" :btn="$styles.greenBtn" @click="submitAuthForm" />
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" :class="[$styles.scrollPage]" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
3
|
+
<base-content-block
|
|
4
|
+
v-if="$dataStore.isInitiator() && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
5
|
+
:class="[$styles.textSimple]"
|
|
6
|
+
>
|
|
7
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('Contract') }}</h5>
|
|
8
|
+
<base-form-input v-model="formStore.documentName" :label="$dataStore.t('form.document')" :readonly="true" />
|
|
9
|
+
<base-form-input v-model="formStore.policyNumber" :label="$dataStore.t('form.documentNumber')" :readonly="true" />
|
|
10
|
+
<base-form-input v-model="formStore.contractDate" :label="$dataStore.t('form.date')" :readonly="true" append-inner-icon="mdi mdi-calendar-blank-outline" />
|
|
11
|
+
<base-file-input :readonly="isDisabled" @input.prevent="onFileChange($event)" />
|
|
12
|
+
</base-content-block>
|
|
3
13
|
<base-content-block v-for="document of formStore.signedDocumentList" :key="document.id" :class="[$styles.textSimple]">
|
|
4
14
|
<h5 class="text-center font-medium mb-4">
|
|
5
15
|
{{ document.fileTypeName }}
|
|
@@ -35,6 +45,19 @@ export default defineComponent({
|
|
|
35
45
|
const currentDocument = ref<DocumentItem>(new DocumentItem());
|
|
36
46
|
const documentLoading = ref<boolean>(false);
|
|
37
47
|
|
|
48
|
+
const isDisabled = computed(() => !dataStore.isTask());
|
|
49
|
+
const contractDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Договор страхования'));
|
|
50
|
+
const signedContract = reactive<{
|
|
51
|
+
processInstanceId: string | number;
|
|
52
|
+
fileTypeId: string | number | null;
|
|
53
|
+
fileTypeCode: string | number | null;
|
|
54
|
+
fileName?: string | number | null;
|
|
55
|
+
}>({
|
|
56
|
+
processInstanceId: formStore.applicationData.processInstanceId,
|
|
57
|
+
fileTypeId: contractDict.value ? contractDict.value.id : '',
|
|
58
|
+
fileTypeCode: contractDict.value ? contractDict.value.code : '',
|
|
59
|
+
});
|
|
60
|
+
const signedContractFormData = ref(new FormData());
|
|
38
61
|
const currentState = reactive<{ action: string; text: string }>({
|
|
39
62
|
action: '',
|
|
40
63
|
text: '',
|
|
@@ -56,6 +79,26 @@ export default defineComponent({
|
|
|
56
79
|
dataStore.panel.open = true;
|
|
57
80
|
};
|
|
58
81
|
|
|
82
|
+
const onFileChange = async (event: InputEvent) => {
|
|
83
|
+
if (event.target) {
|
|
84
|
+
const files = (event.target as HTMLInputElement).files;
|
|
85
|
+
if (files && files.length && files[0].name !== signedContract.fileName) {
|
|
86
|
+
if (files[0].size >= 5_000_000) {
|
|
87
|
+
return dataStore.showToaster('error', dataStore.t('toaster.fileOnlyBelow5mb'), 6000);
|
|
88
|
+
}
|
|
89
|
+
if (files[0].type !== 'application/pdf') {
|
|
90
|
+
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
91
|
+
}
|
|
92
|
+
signedContract.fileName = files[0].name;
|
|
93
|
+
formStore.documentName = signedContract.fileName;
|
|
94
|
+
signedContractFormData.value.append('file', files[0]);
|
|
95
|
+
signedContractFormData.value.append('fileData', JSON.stringify([signedContract]));
|
|
96
|
+
formStore.signedContractFormData = signedContractFormData.value;
|
|
97
|
+
formStore.isUploadedSignedContract = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
59
102
|
watch(
|
|
60
103
|
() => document_list.value,
|
|
61
104
|
() => {
|
|
@@ -98,10 +141,15 @@ export default defineComponent({
|
|
|
98
141
|
formStore,
|
|
99
142
|
documentLoading,
|
|
100
143
|
DocumentItem,
|
|
144
|
+
signedContract,
|
|
145
|
+
|
|
146
|
+
// Computed
|
|
147
|
+
isDisabled,
|
|
101
148
|
|
|
102
149
|
// Functions
|
|
103
150
|
openPanel,
|
|
104
151
|
getFile,
|
|
152
|
+
onFileChange,
|
|
105
153
|
};
|
|
106
154
|
},
|
|
107
155
|
});
|
|
@@ -228,28 +228,28 @@
|
|
|
228
228
|
:suffix="$constants.currencySymbols.kzt"
|
|
229
229
|
/>
|
|
230
230
|
<base-form-input
|
|
231
|
-
v-if="whichProduct === 'gons'
|
|
231
|
+
v-if="whichProduct === 'gons'"
|
|
232
232
|
v-model="productConditionsForm.totalAmount5"
|
|
233
233
|
:readonly="true"
|
|
234
234
|
:label="$dataStore.t('productConditionsForm.totalAmount5')"
|
|
235
235
|
:suffix="$constants.currencySymbols.kzt"
|
|
236
236
|
/>
|
|
237
237
|
<base-form-input
|
|
238
|
-
v-if="whichProduct === 'gons'
|
|
238
|
+
v-if="whichProduct === 'gons'"
|
|
239
239
|
v-model="productConditionsForm.statePremium5"
|
|
240
240
|
:readonly="true"
|
|
241
241
|
:label="$dataStore.t('productConditionsForm.statePremium5')"
|
|
242
242
|
:suffix="$constants.currencySymbols.kzt"
|
|
243
243
|
/>
|
|
244
244
|
<base-form-input
|
|
245
|
-
v-if="whichProduct === 'gons'
|
|
245
|
+
v-if="whichProduct === 'gons'"
|
|
246
246
|
v-model="productConditionsForm.totalAmount7"
|
|
247
247
|
:readonly="true"
|
|
248
248
|
:label="$dataStore.t('productConditionsForm.totalAmount7')"
|
|
249
249
|
:suffix="$constants.currencySymbols.kzt"
|
|
250
250
|
/>
|
|
251
251
|
<base-form-input
|
|
252
|
-
v-if="whichProduct === 'gons'
|
|
252
|
+
v-if="whichProduct === 'gons'"
|
|
253
253
|
v-model="productConditionsForm.statePremium7"
|
|
254
254
|
:readonly="true"
|
|
255
255
|
:label="$dataStore.t('productConditionsForm.statePremium7')"
|
|
@@ -26,47 +26,51 @@
|
|
|
26
26
|
<base-btn :btn="$styles.blueLightBtn" :text="$dataStore.t('confirm.no')" @click="closePanel" />
|
|
27
27
|
</div>
|
|
28
28
|
</section>
|
|
29
|
+
<section v-if="chooseSignActions">
|
|
30
|
+
<div v-if="!isElectronicContract && !isPaperContract" :class="[$styles.flexColNav]">
|
|
31
|
+
<base-btn :text="$dataStore.t('buttons.sendOnPaper')" @click="handleSignAction('paper')" />
|
|
32
|
+
<base-btn :text="$dataStore.t('buttons.sendElectronically')" :disabled="true" @click="handleSignAction('electronic')" />
|
|
33
|
+
</div>
|
|
34
|
+
<div v-if="isPaperContract" :class="[$styles.flexColNav]">
|
|
35
|
+
<base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="generateDocument" />
|
|
36
|
+
</div>
|
|
37
|
+
</section>
|
|
29
38
|
<section v-if="signingActions" class="relative">
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
<div
|
|
33
|
-
<
|
|
34
|
-
<v-expansion-
|
|
35
|
-
<v-expansion-panel
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<base-list-empty v-else />
|
|
48
|
-
</div>
|
|
39
|
+
<base-fade-transition>
|
|
40
|
+
<div v-if="!isSendNumberOpen" :class="[$styles.flexColNav]">
|
|
41
|
+
<div :class="[$styles.blueBgLight]" class="rounded-lg p-4">
|
|
42
|
+
<v-expansion-panels v-if="formStore.signUrls && formStore.signUrls.length" variant="accordion" multiple>
|
|
43
|
+
<v-expansion-panel v-for="signUrl of formStore.signUrls" :key="signUrl.iin!" class="border-[1px]" elevation="0" bg-color="#FFF">
|
|
44
|
+
<v-expansion-panel-title class="h-[80px]" :class="$styles.textTitle">
|
|
45
|
+
{{ `${signUrl.longName} - ${signUrl.iin}` }}
|
|
46
|
+
</v-expansion-panel-title>
|
|
47
|
+
<v-expansion-panel-text class="border-t-[1px]">
|
|
48
|
+
<section class="flex flex-col gap-4 py-3" :class="$styles.textSimple">
|
|
49
|
+
<base-btn :loading="loading" :text="$dataStore.t('sign.copyCloud')" @click="$dataStore.copyToClipboard(signUrl.uri)" />
|
|
50
|
+
<base-btn :loading="loading" :btn="$styles.blueLightBtn" :text="$dataStore.t('sign.recipientNumber')" @click="openSmsPanel(signUrl)" />
|
|
51
|
+
</section>
|
|
52
|
+
</v-expansion-panel-text>
|
|
53
|
+
</v-expansion-panel>
|
|
54
|
+
</v-expansion-panels>
|
|
55
|
+
<base-list-empty v-else />
|
|
49
56
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</div>
|
|
68
|
-
</base-fade-transition>
|
|
69
|
-
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div v-if="isSendNumberOpen" :class="[$styles.flexColNav]">
|
|
59
|
+
<i class="mdi mdi-arrow-left cursor-pointer absolute text-xl left-0 top-0 rounded-br-full bg-white border-[1px] pb-3 pt-1 pl-1 pr-3" @click="isSendNumberOpen = false"></i>
|
|
60
|
+
<base-form-section :title="selectedClient && selectedClient.longName ? selectedClient.longName : ''">
|
|
61
|
+
<v-form ref="vForm">
|
|
62
|
+
<base-rounded-input
|
|
63
|
+
v-model="phoneNumber"
|
|
64
|
+
:maska="$maska.phone"
|
|
65
|
+
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
66
|
+
:label="$dataStore.t('form.phoneNumber')"
|
|
67
|
+
placeholder="+7 7"
|
|
68
|
+
/>
|
|
69
|
+
</v-form>
|
|
70
|
+
<base-btn :text="$dataStore.t('buttons.sendSMS')" :loading="loading" @click="submitForm" />
|
|
71
|
+
</base-form-section>
|
|
72
|
+
</div>
|
|
73
|
+
</base-fade-transition>
|
|
70
74
|
</section>
|
|
71
75
|
<section v-if="payingActions" class="relative">
|
|
72
76
|
<div>
|
|
@@ -145,6 +149,9 @@ export default defineComponent({
|
|
|
145
149
|
const formStore = useFormStore();
|
|
146
150
|
const actionCause = ref<string>('');
|
|
147
151
|
const loading = ref<boolean>(false);
|
|
152
|
+
const isPaperContract = ref<boolean>(false);
|
|
153
|
+
const isElectronicContract = ref<boolean>(true);
|
|
154
|
+
|
|
148
155
|
const vForm = ref<any>();
|
|
149
156
|
const isSendNumberOpen = ref<boolean>(false);
|
|
150
157
|
const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
|
|
@@ -190,7 +197,6 @@ export default defineComponent({
|
|
|
190
197
|
}
|
|
191
198
|
}
|
|
192
199
|
};
|
|
193
|
-
|
|
194
200
|
const submitForm = async () => {
|
|
195
201
|
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
196
202
|
if (v.valid) {
|
|
@@ -237,6 +243,18 @@ export default defineComponent({
|
|
|
237
243
|
loading.value = false;
|
|
238
244
|
};
|
|
239
245
|
|
|
246
|
+
const onInit = async () => {
|
|
247
|
+
if (dataStore.controls.hasChooseSign) {
|
|
248
|
+
if (dataStore.isGons) {
|
|
249
|
+
isElectronicContract.value = false;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
onMounted(async () => {
|
|
255
|
+
await onInit();
|
|
256
|
+
});
|
|
257
|
+
|
|
240
258
|
const buttonText = computed(() => {
|
|
241
259
|
switch (dataStore.panelAction) {
|
|
242
260
|
case constants.actions.reject:
|
|
@@ -293,6 +311,8 @@ export default defineComponent({
|
|
|
293
311
|
const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
|
|
294
312
|
const payingActions = computed(() => dataStore.panelAction === constants.actions.pay);
|
|
295
313
|
const affiliateActions = computed(() => dataStore.panelAction === constants.actions.affiliate);
|
|
314
|
+
const chooseSignActions = computed(() => dataStore.controls.hasChooseSign && dataStore.panelAction === constants.actions.chooseSign);
|
|
315
|
+
|
|
296
316
|
const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
|
|
297
317
|
const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
|
|
298
318
|
const requestedSumInsured = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured));
|
|
@@ -307,7 +327,20 @@ export default defineComponent({
|
|
|
307
327
|
}
|
|
308
328
|
return true;
|
|
309
329
|
});
|
|
310
|
-
|
|
330
|
+
const handleSignAction = async (type: 'paper' | 'electronic') => {
|
|
331
|
+
if (type === 'electronic') {
|
|
332
|
+
await dataStore.signDocument();
|
|
333
|
+
isElectronicContract.value = true;
|
|
334
|
+
}
|
|
335
|
+
if (type === 'paper') {
|
|
336
|
+
isPaperContract.value = true;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
const generateDocument = async () => {
|
|
340
|
+
dataStore.panel.open = false;
|
|
341
|
+
dataStore.panelAction = null;
|
|
342
|
+
await dataStore.generateDocument();
|
|
343
|
+
};
|
|
311
344
|
return {
|
|
312
345
|
// State
|
|
313
346
|
formStore,
|
|
@@ -317,6 +350,7 @@ export default defineComponent({
|
|
|
317
350
|
isSendNumberOpen,
|
|
318
351
|
phoneNumber,
|
|
319
352
|
selectedClient,
|
|
353
|
+
isPaperContract,
|
|
320
354
|
|
|
321
355
|
// Functions
|
|
322
356
|
closePanel,
|
|
@@ -333,6 +367,7 @@ export default defineComponent({
|
|
|
333
367
|
payingActions,
|
|
334
368
|
acceptAction,
|
|
335
369
|
affiliateActions,
|
|
370
|
+
chooseSignActions,
|
|
336
371
|
paymentPeriod,
|
|
337
372
|
insurancePremiumPerMonth,
|
|
338
373
|
requestedSumInsured,
|
|
@@ -341,6 +376,9 @@ export default defineComponent({
|
|
|
341
376
|
price,
|
|
342
377
|
insuredAmount,
|
|
343
378
|
templateAction,
|
|
379
|
+
isElectronicContract,
|
|
380
|
+
handleSignAction,
|
|
381
|
+
generateDocument,
|
|
344
382
|
};
|
|
345
383
|
},
|
|
346
384
|
});
|
package/composables/classes.ts
CHANGED
|
@@ -906,6 +906,8 @@ export class DataStoreClass {
|
|
|
906
906
|
hasAttachment: boolean;
|
|
907
907
|
// Решение АС
|
|
908
908
|
hasAffiliation: boolean;
|
|
909
|
+
// Выбор метода подписания
|
|
910
|
+
hasChooseSign: boolean;
|
|
909
911
|
};
|
|
910
912
|
members: {
|
|
911
913
|
clientApp: MemberSettings;
|
|
@@ -1056,6 +1058,7 @@ export class DataStoreClass {
|
|
|
1056
1058
|
hasCalculator: false,
|
|
1057
1059
|
hasAttachment: true,
|
|
1058
1060
|
hasAffiliation: true,
|
|
1061
|
+
hasChooseSign: false,
|
|
1059
1062
|
};
|
|
1060
1063
|
this.iframeLoading = false;
|
|
1061
1064
|
this.hasLayoutMargins = true;
|
|
@@ -1192,6 +1195,13 @@ export class DataStoreClass {
|
|
|
1192
1195
|
}
|
|
1193
1196
|
|
|
1194
1197
|
export class FormStoreClass {
|
|
1198
|
+
documentName: string | null;
|
|
1199
|
+
regNumber: string | null;
|
|
1200
|
+
policyNumber: string | null;
|
|
1201
|
+
contractDate: string | null;
|
|
1202
|
+
needToScanSignedContract: boolean;
|
|
1203
|
+
isUploadedSignedContract: boolean;
|
|
1204
|
+
signedContractFormData: any;
|
|
1195
1205
|
lfb: {
|
|
1196
1206
|
insurers: ClientV2[];
|
|
1197
1207
|
fixInsAmount: Value[];
|
|
@@ -1286,7 +1296,14 @@ export class FormStoreClass {
|
|
|
1286
1296
|
questionnaireByCritical: any[];
|
|
1287
1297
|
canBeClaimed: boolean | null;
|
|
1288
1298
|
applicationTaskId: string | null;
|
|
1289
|
-
constructor(
|
|
1299
|
+
constructor() {
|
|
1300
|
+
this.regNumber = null;
|
|
1301
|
+
this.policyNumber = null;
|
|
1302
|
+
this.contractDate = null;
|
|
1303
|
+
this.documentName = null;
|
|
1304
|
+
this.isUploadedSignedContract = false;
|
|
1305
|
+
this.needToScanSignedContract = false;
|
|
1306
|
+
this.signedContractFormData = null;
|
|
1290
1307
|
this.lfb = {
|
|
1291
1308
|
insurers: [],
|
|
1292
1309
|
fixInsAmount: [],
|
package/locales/ru.json
CHANGED
|
@@ -113,13 +113,24 @@
|
|
|
113
113
|
"needAgent": "Поле агент должно быть заполнено",
|
|
114
114
|
"tripInsuredAmountCalculated": "Высчитана страховая сумма для выбора",
|
|
115
115
|
"calcSumForUnder": "Внимание! Требуется пересчет страховой суммы андеррайтером. Заявка будет направлена Андеррайтеру",
|
|
116
|
-
"doesHaveActiveContract": "Заключение договора невозможно. У Выгодоприобретателя имеется действующий договор"
|
|
116
|
+
"doesHaveActiveContract": "Заключение договора невозможно. У Выгодоприобретателя имеется действующий договор",
|
|
117
|
+
"needToSignContract": "Документ скачан. После подписи, необходимо вложить договор в разделе “Документы”",
|
|
118
|
+
"successfullyDocSent": "Отправка документа прошла успешно",
|
|
119
|
+
"fileOnlyBelow5mb": "Максимальный размер документа для загрузки - 5 МБ.",
|
|
120
|
+
"onlyPDF": "Загружать документы можно только в формате PDF"
|
|
117
121
|
},
|
|
122
|
+
"notSignedContract": "Неподписанный Договор",
|
|
123
|
+
"Contract": "Договор страхования",
|
|
124
|
+
"needToScanSignedContract": "Необходимо вложить подписанный и отсканированный договор",
|
|
118
125
|
"buttons": {
|
|
119
126
|
"clearOrReset": "Не выбран / Очистить",
|
|
120
127
|
"dataInput": "Ввод данных",
|
|
121
128
|
"createStatement": "Создать заявку",
|
|
122
129
|
"add": "Добавить",
|
|
130
|
+
"addRelative": "Добавить родственника",
|
|
131
|
+
"deleteAML": "Исключить",
|
|
132
|
+
"deleteRelative": "Исключить родственника",
|
|
133
|
+
"editRelative": "Изменить родственника",
|
|
123
134
|
"userLogin": "Логин",
|
|
124
135
|
"password": "Пароль",
|
|
125
136
|
"login": "Войти в систему",
|
|
@@ -173,10 +184,15 @@
|
|
|
173
184
|
"toStatement": "Продолжить оформление",
|
|
174
185
|
"affiliate": "Добавить решение АС",
|
|
175
186
|
"more": "Подробнее",
|
|
176
|
-
"reset": "Восстановить"
|
|
187
|
+
"reset": "Восстановить",
|
|
188
|
+
"sendToSign": "Отправить на подпись",
|
|
189
|
+
"downloadContract": "Скачать договор",
|
|
190
|
+
"sendElectronically": "Отправить в электронном виде",
|
|
191
|
+
"sendOnPaper": "Отправить на бумажном носителе"
|
|
177
192
|
},
|
|
178
193
|
"dialog": {
|
|
179
194
|
"title": "Подтверждение",
|
|
195
|
+
"do": "Вы действительно хотите сделать данное действие?",
|
|
180
196
|
"exit": "Вы действительно хотите выйти?",
|
|
181
197
|
"exitApp": "Вы действительно хотите выйти? Данные будут очищены.",
|
|
182
198
|
"dataWillClear": "Данные будут очищены",
|
|
@@ -191,6 +207,7 @@
|
|
|
191
207
|
"continue": "Продолжить",
|
|
192
208
|
"correctSum": "Корректна ли сумма страховой премии?",
|
|
193
209
|
"sign": "Вы действительно хотите подписать?",
|
|
210
|
+
"signed": "Вы действительно хотите отправить на следующий этап?",
|
|
194
211
|
"pay": "Вы действительно хотите оплатить?",
|
|
195
212
|
"familyMember": "Выберите члена семьи",
|
|
196
213
|
"register": "Вы действительно хотите добавить в реестр данного ребенка?",
|
|
@@ -368,7 +385,28 @@
|
|
|
368
385
|
"nameRu": "Наименование (рус)",
|
|
369
386
|
"nameEn": "Наименование (англ)",
|
|
370
387
|
"from": "От",
|
|
371
|
-
"to": "До"
|
|
388
|
+
"to": "До",
|
|
389
|
+
"reasonForAffiliation": "Основание для признания аффилированности",
|
|
390
|
+
"reasonForRelation": "Основание для признания связанности",
|
|
391
|
+
"affiliationDate": "Дата появления аффилированности",
|
|
392
|
+
"relationDate": "Дата появления связанности",
|
|
393
|
+
"expulsionDate": "Дата исключения",
|
|
394
|
+
"applicationDate": "Дата заявки",
|
|
395
|
+
"wrongData": "Некорректные данные обнаружены",
|
|
396
|
+
"legalName": "Название организации",
|
|
397
|
+
"oked": "Окэд",
|
|
398
|
+
"contragentType": "Тип контрагента",
|
|
399
|
+
"checkSingle": "Проверить одного",
|
|
400
|
+
"checkMultiple": "Проверить несколько",
|
|
401
|
+
"legalEntity": "Юр. лицо",
|
|
402
|
+
"checkConfirmation": "Подтверждение результата проверки:",
|
|
403
|
+
"controllerCheck": "Проверенно контроллером",
|
|
404
|
+
"amountCurrency": "Сумма в валюте",
|
|
405
|
+
"isAnotherContract ": "Подозрение что у клиента есть договор страхования в другой иностранной компании",
|
|
406
|
+
"opf": "Организационно-правовая форма",
|
|
407
|
+
"checkType": "Тип проверки",
|
|
408
|
+
"personType": "Тип клиента",
|
|
409
|
+
"operationtype": "Тип операции"
|
|
372
410
|
},
|
|
373
411
|
"agent": {
|
|
374
412
|
"currency": "Валюта",
|
|
@@ -697,6 +735,7 @@
|
|
|
697
735
|
"NumberApartment": "№ кв.",
|
|
698
736
|
"birthData": "Место рождения",
|
|
699
737
|
"documentData": "Документы",
|
|
738
|
+
"document": "Документ",
|
|
700
739
|
"documentType": "Тип документа",
|
|
701
740
|
"documentNumber": "Номер документа",
|
|
702
741
|
"date": "Дата",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -245,24 +245,15 @@ export const useDataStore = defineStore('data', {
|
|
|
245
245
|
this.getUserRoles();
|
|
246
246
|
}
|
|
247
247
|
const checkPermission = () => {
|
|
248
|
+
const hasAccess = this.hasAccess();
|
|
248
249
|
if (this.isAML) {
|
|
249
|
-
return
|
|
250
|
+
return hasAccess.toAML;
|
|
250
251
|
}
|
|
251
252
|
if (this.isLKA) {
|
|
252
|
-
return
|
|
253
|
+
return hasAccess.toLKA;
|
|
253
254
|
}
|
|
254
255
|
if (this.isEFO) {
|
|
255
|
-
return
|
|
256
|
-
this.isInitiator() ||
|
|
257
|
-
this.isUnderwriter() ||
|
|
258
|
-
this.isAdmin() ||
|
|
259
|
-
this.isCompliance() ||
|
|
260
|
-
this.isAnalyst() ||
|
|
261
|
-
this.isUpk() ||
|
|
262
|
-
this.isFinCenter() ||
|
|
263
|
-
this.isSupervisor() ||
|
|
264
|
-
this.isSupport()
|
|
265
|
-
);
|
|
256
|
+
return hasAccess.toEFO;
|
|
266
257
|
}
|
|
267
258
|
return false;
|
|
268
259
|
};
|
|
@@ -612,7 +603,7 @@ export const useDataStore = defineStore('data', {
|
|
|
612
603
|
}
|
|
613
604
|
},
|
|
614
605
|
async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
|
|
615
|
-
if (this.isGons && user.iin) {
|
|
606
|
+
if (this.isGons && user.iin && whichForm === 'beneficiaryForm') {
|
|
616
607
|
const doesHaveActiveContract = await this.api.checkBeneficiariesInActualPolicy(user.iin.replace(/-/g, ''));
|
|
617
608
|
if (doesHaveActiveContract) {
|
|
618
609
|
this.showToaster('error', this.t('toaster.doesHaveActiveContract'), 6000);
|
|
@@ -1313,7 +1304,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1313
1304
|
return await this.getFromApi('questionRefs', 'getQuestionRefs', id, true);
|
|
1314
1305
|
},
|
|
1315
1306
|
async getProcessTariff() {
|
|
1316
|
-
return await this.getFromApi('processTariff', 'getProcessTariff', this.processCode);
|
|
1307
|
+
if (this.processCode) return await this.getFromApi('processTariff', 'getProcessTariff', this.processCode);
|
|
1317
1308
|
},
|
|
1318
1309
|
async getDicAnnuityTypeList() {
|
|
1319
1310
|
return await this.getFromApi('dicAnnuityTypeList', 'getDicAnnuityTypeList');
|
|
@@ -1748,6 +1739,13 @@ export const useDataStore = defineStore('data', {
|
|
|
1748
1739
|
if (this.isLiferenta) {
|
|
1749
1740
|
this.formStore.productConditionsForm.amountAnnuityPayments = this.getNumberWithSpaces(applicationData.policyAppDto.annuityMonthPay);
|
|
1750
1741
|
}
|
|
1742
|
+
if (this.isGons) {
|
|
1743
|
+
const govPremiums = await this.api.getGovernmentPremiums(String(id));
|
|
1744
|
+
this.formStore.productConditionsForm.totalAmount5 = this.getNumberWithSpaces(govPremiums.totalAmount5 === null ? null : govPremiums.totalAmount5);
|
|
1745
|
+
this.formStore.productConditionsForm.totalAmount7 = this.getNumberWithSpaces(govPremiums.totalAmount7 === null ? null : govPremiums.totalAmount7);
|
|
1746
|
+
this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(govPremiums.statePremium5 === null ? null : govPremiums.statePremium5);
|
|
1747
|
+
this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
|
|
1748
|
+
}
|
|
1751
1749
|
|
|
1752
1750
|
this.showToaster('success', this.t('toaster.calculated'), 1000);
|
|
1753
1751
|
} catch (err) {
|
|
@@ -1842,6 +1840,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1842
1840
|
this.sendToParent(constants.postActions.toHomePage, this.t('toaster.noSuchProduct'));
|
|
1843
1841
|
return;
|
|
1844
1842
|
}
|
|
1843
|
+
this.formStore.regNumber = applicationData.regNumber;
|
|
1845
1844
|
this.formStore.applicationData = applicationData;
|
|
1846
1845
|
this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
|
|
1847
1846
|
|
|
@@ -2032,6 +2031,8 @@ export const useDataStore = defineStore('data', {
|
|
|
2032
2031
|
}
|
|
2033
2032
|
}
|
|
2034
2033
|
if (setProductConditions) {
|
|
2034
|
+
this.formStore.policyNumber = applicationData.policyAppDto.policyNumber;
|
|
2035
|
+
this.formStore.contractDate = reformatDate(applicationData.policyAppDto.contractDate);
|
|
2035
2036
|
this.formStore.productConditionsForm.coverPeriod = applicationData.policyAppDto.coverPeriod;
|
|
2036
2037
|
this.formStore.productConditionsForm.payPeriod = applicationData.policyAppDto.payPeriod;
|
|
2037
2038
|
// this.formStore.productConditionsForm.annualIncome = applicationData.policyAppDto.annualIncome?.toString();
|
|
@@ -2149,6 +2150,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2149
2150
|
}
|
|
2150
2151
|
case constants.actions.reject:
|
|
2151
2152
|
case constants.actions.return:
|
|
2153
|
+
case constants.actions.signed:
|
|
2152
2154
|
case constants.actions.rejectclient:
|
|
2153
2155
|
case constants.actions.accept: {
|
|
2154
2156
|
try {
|
|
@@ -2274,6 +2276,34 @@ export const useDataStore = defineStore('data', {
|
|
|
2274
2276
|
ErrorHandler(err);
|
|
2275
2277
|
}
|
|
2276
2278
|
},
|
|
2279
|
+
async generateDocument() {
|
|
2280
|
+
try {
|
|
2281
|
+
this.isButtonsLoading = true;
|
|
2282
|
+
if (this.formStore.signUrls.length) {
|
|
2283
|
+
return this.formStore.signUrls;
|
|
2284
|
+
}
|
|
2285
|
+
this.formStore.needToScanSignedContract = true;
|
|
2286
|
+
const data: SignDataType = {
|
|
2287
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2288
|
+
name: 'Contract',
|
|
2289
|
+
format: 'pdf',
|
|
2290
|
+
};
|
|
2291
|
+
const response: any = await this.api.generateDocument(data);
|
|
2292
|
+
const blob = new Blob([response], {
|
|
2293
|
+
type: `application/pdf`,
|
|
2294
|
+
});
|
|
2295
|
+
this.showToaster('info', this.t('toaster.needToSignContract'), 100000);
|
|
2296
|
+
const url = window.URL.createObjectURL(blob);
|
|
2297
|
+
const link = document.createElement('a');
|
|
2298
|
+
link.href = url;
|
|
2299
|
+
link.setAttribute('download', this.formStore.regNumber + ' Договор страхования');
|
|
2300
|
+
document.body.appendChild(link);
|
|
2301
|
+
link.click();
|
|
2302
|
+
} catch (err) {
|
|
2303
|
+
ErrorHandler(err);
|
|
2304
|
+
}
|
|
2305
|
+
this.isButtonsLoading = false;
|
|
2306
|
+
},
|
|
2277
2307
|
async registerNumber() {
|
|
2278
2308
|
try {
|
|
2279
2309
|
if (!this.formStore.finCenterData.date) return;
|
|
@@ -2959,8 +2989,22 @@ export const useDataStore = defineStore('data', {
|
|
|
2959
2989
|
hasPercentageOfPayoutAmount() {
|
|
2960
2990
|
return true;
|
|
2961
2991
|
},
|
|
2962
|
-
|
|
2963
|
-
return
|
|
2992
|
+
hasAccess() {
|
|
2993
|
+
return {
|
|
2994
|
+
invoiceInfo: this.isAdmin(),
|
|
2995
|
+
toLKA: this.isAgent() || this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn(),
|
|
2996
|
+
toAML: this.isCompliance() || this.isAdmin() || this.isSupport() || this.isAnalyst(),
|
|
2997
|
+
toEFO:
|
|
2998
|
+
this.isInitiator() ||
|
|
2999
|
+
this.isUnderwriter() ||
|
|
3000
|
+
this.isAdmin() ||
|
|
3001
|
+
this.isCompliance() ||
|
|
3002
|
+
this.isAnalyst() ||
|
|
3003
|
+
this.isUpk() ||
|
|
3004
|
+
this.isFinCenter() ||
|
|
3005
|
+
this.isSupervisor() ||
|
|
3006
|
+
this.isSupport(),
|
|
3007
|
+
};
|
|
2964
3008
|
},
|
|
2965
3009
|
},
|
|
2966
3010
|
});
|
package/types/enum.ts
CHANGED
|
@@ -13,11 +13,13 @@ export enum Actions {
|
|
|
13
13
|
return = 'return',
|
|
14
14
|
claim = 'claim',
|
|
15
15
|
sign = 'sign',
|
|
16
|
+
signed = 'signed',
|
|
16
17
|
pay = 'pay',
|
|
17
18
|
register = 'register',
|
|
18
19
|
send = 'send',
|
|
19
20
|
affiliate = 'affiliate',
|
|
20
21
|
template = 'template',
|
|
22
|
+
chooseSign = 'chooseSign',
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export enum PostActions {
|
package/types/index.ts
CHANGED