hl-core 0.0.9-beta.21 → 0.0.9-beta.23
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/components/Layout/SettingsPanel.vue +1 -1
- package/components/Pages/Anketa.vue +51 -13
- 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/composables/constants.ts +1 -0
- package/locales/ru.json +40 -5
- package/package.json +1 -1
- package/store/data.store.ts +46 -2
- package/types/enum.ts +2 -0
- package/types/index.ts +10 -1
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,
|
|
@@ -77,6 +77,6 @@ const hasHistory = computed(() => {
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
const openHistory = async () => {
|
|
80
|
-
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
|
|
80
|
+
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO ? '' : dataStore.product);
|
|
81
81
|
};
|
|
82
82
|
</script>
|
|
@@ -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]"
|
|
@@ -68,19 +68,54 @@
|
|
|
68
68
|
</div>
|
|
69
69
|
</base-form-text-section>
|
|
70
70
|
</section>
|
|
71
|
+
<section
|
|
72
|
+
v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'D').length"
|
|
73
|
+
:class="[$styles.blueBgLight, $styles.rounded]"
|
|
74
|
+
class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
|
|
75
|
+
>
|
|
76
|
+
<base-form-text-section v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'D')" :key="index">
|
|
77
|
+
<span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between"> {{ question.first.name }} </span>
|
|
78
|
+
<div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
|
|
79
|
+
<v-radio-group
|
|
80
|
+
v-model="question.first.answerName"
|
|
81
|
+
class="anketa-radio"
|
|
82
|
+
:true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
|
|
83
|
+
false-icon="mdi-radiobox-blank text-[#636363]"
|
|
84
|
+
:rules="$rules.required"
|
|
85
|
+
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
86
|
+
inline
|
|
87
|
+
>
|
|
88
|
+
<v-radio label="Да" value="Да" />
|
|
89
|
+
<v-radio label="Нет" value="Нет" />
|
|
90
|
+
</v-radio-group>
|
|
91
|
+
</div>
|
|
92
|
+
<base-fade-transition>
|
|
93
|
+
<div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
|
|
94
|
+
<base-form-input
|
|
95
|
+
v-model="question.first.answerText"
|
|
96
|
+
:label="$dataStore.t('labels.inDetails')"
|
|
97
|
+
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
98
|
+
:rules="$rules.required"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</base-fade-transition>
|
|
102
|
+
</base-form-text-section>
|
|
103
|
+
</section>
|
|
71
104
|
</v-form>
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
105
|
+
<div class="px-[14px]">
|
|
106
|
+
<base-btn
|
|
107
|
+
class="my-[14px] self-center"
|
|
108
|
+
:loading="isButtonLoading"
|
|
109
|
+
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
110
|
+
@click="submitForm"
|
|
111
|
+
:text="$dataStore.t('buttons.save')"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
79
114
|
</section>
|
|
80
|
-
<
|
|
115
|
+
<base-btn
|
|
81
116
|
v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && firstPanel"
|
|
82
|
-
|
|
83
|
-
|
|
117
|
+
class="!absolute z-10 my-[14px] self-center w-[96%] bottom-0"
|
|
118
|
+
:text="$dataStore.t('buttons.save')"
|
|
84
119
|
@click="submitSecondaryForm"
|
|
85
120
|
/>
|
|
86
121
|
<section ref="firstPanelSection" v-if="currentQuestion && currentQuestion.second && firstPanel" class="flex flex-col px-[10px] pb-[14px]" :class="[$styles.scrollPage]">
|
|
@@ -195,6 +230,9 @@ export default defineComponent({
|
|
|
195
230
|
}
|
|
196
231
|
});
|
|
197
232
|
}
|
|
233
|
+
if (question.first.definedAnswers === 'D' && question.first.answerName?.match(new RegExp('Нет', 'i')) && question.first.answerText) {
|
|
234
|
+
question.first.answerText = null;
|
|
235
|
+
}
|
|
198
236
|
});
|
|
199
237
|
}
|
|
200
238
|
formStore[whichSurvey.value]!.type = surveyType.value;
|
|
@@ -352,7 +390,7 @@ export default defineComponent({
|
|
|
352
390
|
() => firstQuestionList.value,
|
|
353
391
|
value => {
|
|
354
392
|
if (value) {
|
|
355
|
-
const hasPositiveAnswer = value.some(i => i.first.definedAnswers === 'Y' && i.first.answerName !== 'Нет');
|
|
393
|
+
const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && i.first.answerName !== 'Нет');
|
|
356
394
|
answerToAll.value = !hasPositiveAnswer;
|
|
357
395
|
}
|
|
358
396
|
},
|
|
@@ -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/composables/constants.ts
CHANGED
|
@@ -16,6 +16,7 @@ export const constants = Object.freeze({
|
|
|
16
16
|
checkcontragent: 1,
|
|
17
17
|
checkcontract: 2,
|
|
18
18
|
},
|
|
19
|
+
extractedProducts: ['dso'],
|
|
19
20
|
editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
|
|
20
21
|
documentsLinkVisibleStatuses: [
|
|
21
22
|
Statuses.DocumentsSignedFrom,
|
package/locales/ru.json
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"memberSave": "Ошибка при сохранении данных участников"
|
|
22
22
|
},
|
|
23
23
|
"toaster": {
|
|
24
|
+
"wrongFormatOf": "Некорректный формат \"{text}\"",
|
|
24
25
|
"shengenZoneCondition": "Для стран Шенгенской зоны может быть только один застрахованный",
|
|
25
26
|
"noCurrency": "Отсутствует курс доллара",
|
|
26
27
|
"membersLimit": "Количество этих участников превышено. Лимит составляет: {text}",
|
|
@@ -113,8 +114,15 @@
|
|
|
113
114
|
"needAgent": "Поле агент должно быть заполнено",
|
|
114
115
|
"tripInsuredAmountCalculated": "Высчитана страховая сумма для выбора",
|
|
115
116
|
"calcSumForUnder": "Внимание! Требуется пересчет страховой суммы андеррайтером. Заявка будет направлена Андеррайтеру",
|
|
116
|
-
"doesHaveActiveContract": "Заключение договора невозможно. У Выгодоприобретателя имеется действующий договор"
|
|
117
|
+
"doesHaveActiveContract": "Заключение договора невозможно. У Выгодоприобретателя имеется действующий договор",
|
|
118
|
+
"needToSignContract": "Документ скачан. После подписи, необходимо вложить договор в разделе “Документы”",
|
|
119
|
+
"successfullyDocSent": "Отправка документа прошла успешно",
|
|
120
|
+
"fileOnlyBelow5mb": "Максимальный размер документа для загрузки - 5 МБ.",
|
|
121
|
+
"onlyPDF": "Загружать документы можно только в формате PDF"
|
|
117
122
|
},
|
|
123
|
+
"notSignedContract": "Неподписанный Договор",
|
|
124
|
+
"Contract": "Договор страхования",
|
|
125
|
+
"needToScanSignedContract": "Необходимо вложить подписанный и отсканированный договор",
|
|
118
126
|
"buttons": {
|
|
119
127
|
"clearOrReset": "Не выбран / Очистить",
|
|
120
128
|
"dataInput": "Ввод данных",
|
|
@@ -177,10 +185,15 @@
|
|
|
177
185
|
"toStatement": "Продолжить оформление",
|
|
178
186
|
"affiliate": "Добавить решение АС",
|
|
179
187
|
"more": "Подробнее",
|
|
180
|
-
"reset": "Восстановить"
|
|
188
|
+
"reset": "Восстановить",
|
|
189
|
+
"sendToSign": "Отправить на подпись",
|
|
190
|
+
"downloadContract": "Скачать договор",
|
|
191
|
+
"sendElectronically": "Отправить в электронном виде",
|
|
192
|
+
"sendOnPaper": "Отправить на бумажном носителе"
|
|
181
193
|
},
|
|
182
194
|
"dialog": {
|
|
183
195
|
"title": "Подтверждение",
|
|
196
|
+
"do": "Вы действительно хотите сделать данное действие?",
|
|
184
197
|
"exit": "Вы действительно хотите выйти?",
|
|
185
198
|
"exitApp": "Вы действительно хотите выйти? Данные будут очищены.",
|
|
186
199
|
"dataWillClear": "Данные будут очищены",
|
|
@@ -195,6 +208,7 @@
|
|
|
195
208
|
"continue": "Продолжить",
|
|
196
209
|
"correctSum": "Корректна ли сумма страховой премии?",
|
|
197
210
|
"sign": "Вы действительно хотите подписать?",
|
|
211
|
+
"signed": "Вы действительно хотите отправить на следующий этап?",
|
|
198
212
|
"pay": "Вы действительно хотите оплатить?",
|
|
199
213
|
"familyMember": "Выберите члена семьи",
|
|
200
214
|
"register": "Вы действительно хотите добавить в реестр данного ребенка?",
|
|
@@ -350,6 +364,13 @@
|
|
|
350
364
|
"decision": "Статус",
|
|
351
365
|
"userFullName": "Исполнитель"
|
|
352
366
|
},
|
|
367
|
+
"dso": {
|
|
368
|
+
"project": "ДСО",
|
|
369
|
+
"generalInfo": "Общая информация",
|
|
370
|
+
"prevStatements": "Ранее оформленные заявки",
|
|
371
|
+
"title": "Сопровождение договоров/полисов",
|
|
372
|
+
"warningNSJ": "На данный момент сопровождение договоров/полисов только для НСЖ"
|
|
373
|
+
},
|
|
353
374
|
"aml": {
|
|
354
375
|
"contractSignDate": "Дата заключение контракта",
|
|
355
376
|
"contractEndDate": "Дата завершения контракта",
|
|
@@ -373,9 +394,12 @@
|
|
|
373
394
|
"nameEn": "Наименование (англ)",
|
|
374
395
|
"from": "От",
|
|
375
396
|
"to": "До",
|
|
376
|
-
"
|
|
397
|
+
"reasonForAffiliation": "Основание для признания аффилированности",
|
|
398
|
+
"reasonForRelation": "Основание для признания связанности",
|
|
377
399
|
"affiliationDate": "Дата появления аффилированности",
|
|
400
|
+
"relationDate": "Дата появления связанности",
|
|
378
401
|
"expulsionDate": "Дата исключения",
|
|
402
|
+
"applicationDate": "Дата заявки",
|
|
379
403
|
"wrongData": "Некорректные данные обнаружены",
|
|
380
404
|
"legalName": "Название организации",
|
|
381
405
|
"oked": "Окэд",
|
|
@@ -387,7 +411,14 @@
|
|
|
387
411
|
"controllerCheck": "Проверенно контроллером",
|
|
388
412
|
"amountCurrency": "Сумма в валюте",
|
|
389
413
|
"isAnotherContract ": "Подозрение что у клиента есть договор страхования в другой иностранной компании",
|
|
390
|
-
"opf": "Организационно-правовая форма"
|
|
414
|
+
"opf": "Организационно-правовая форма",
|
|
415
|
+
"checkType": "Тип проверки",
|
|
416
|
+
"personType": "Тип клиента",
|
|
417
|
+
"operationtype": "Тип операции",
|
|
418
|
+
"createRecord": "Сформировать отчет",
|
|
419
|
+
"export": "Экспорт",
|
|
420
|
+
"overlapType": "Тип совпадения",
|
|
421
|
+
"system": "Система"
|
|
391
422
|
},
|
|
392
423
|
"agent": {
|
|
393
424
|
"currency": "Валюта",
|
|
@@ -518,6 +549,7 @@
|
|
|
518
549
|
"new": "Подать заявление"
|
|
519
550
|
},
|
|
520
551
|
"labels": {
|
|
552
|
+
"personId": "ИНСИС Id",
|
|
521
553
|
"period": "Период",
|
|
522
554
|
"currentPerf": "Текущие показатели",
|
|
523
555
|
"premium": "Премия",
|
|
@@ -604,6 +636,7 @@
|
|
|
604
636
|
"welcome": "Добро пожаловать",
|
|
605
637
|
"information": "Дополнительные данные",
|
|
606
638
|
"policyNumber": "Номер полиса",
|
|
639
|
+
"policyStartDate": "Начало полиса",
|
|
607
640
|
"statusCode": "Статус заявки",
|
|
608
641
|
"initiator": "Инициатор",
|
|
609
642
|
"iin&bin": "ИИН/БИН",
|
|
@@ -612,7 +645,8 @@
|
|
|
612
645
|
"policyholderLongName": "ФИО страхователя",
|
|
613
646
|
"jsonObject": "JSON значение",
|
|
614
647
|
"epayPage": "Страница на ePay",
|
|
615
|
-
"checkWithDoc": "Сверьте с документом"
|
|
648
|
+
"checkWithDoc": "Сверьте с документом",
|
|
649
|
+
"inDetails": "Подробно"
|
|
616
650
|
},
|
|
617
651
|
"placeholders": {
|
|
618
652
|
"login": "Логин",
|
|
@@ -716,6 +750,7 @@
|
|
|
716
750
|
"NumberApartment": "№ кв.",
|
|
717
751
|
"birthData": "Место рождения",
|
|
718
752
|
"documentData": "Документы",
|
|
753
|
+
"document": "Документ",
|
|
719
754
|
"documentType": "Тип документа",
|
|
720
755
|
"documentNumber": "Номер документа",
|
|
721
756
|
"date": "Дата",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -48,6 +48,7 @@ export const useDataStore = defineStore('data', {
|
|
|
48
48
|
isCalculator: state => state.product === 'calculator',
|
|
49
49
|
isCheckContract: state => state.product === 'checkcontract',
|
|
50
50
|
isCheckContragent: state => state.product === 'checkcontragent',
|
|
51
|
+
isDSO: state => state.product === 'dso',
|
|
51
52
|
isEveryFormDisabled: state => Object.values(state.formStore.isDisabled).every(i => i === true),
|
|
52
53
|
hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
|
|
53
54
|
isClientAnketaCondition: state =>
|
|
@@ -603,7 +604,7 @@ export const useDataStore = defineStore('data', {
|
|
|
603
604
|
}
|
|
604
605
|
},
|
|
605
606
|
async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
|
|
606
|
-
if (this.isGons && user.iin) {
|
|
607
|
+
if (this.isGons && user.iin && whichForm === 'beneficiaryForm' && useEnv().isProduction) {
|
|
607
608
|
const doesHaveActiveContract = await this.api.checkBeneficiariesInActualPolicy(user.iin.replace(/-/g, ''));
|
|
608
609
|
if (doesHaveActiveContract) {
|
|
609
610
|
this.showToaster('error', this.t('toaster.doesHaveActiveContract'), 6000);
|
|
@@ -1739,6 +1740,13 @@ export const useDataStore = defineStore('data', {
|
|
|
1739
1740
|
if (this.isLiferenta) {
|
|
1740
1741
|
this.formStore.productConditionsForm.amountAnnuityPayments = this.getNumberWithSpaces(applicationData.policyAppDto.annuityMonthPay);
|
|
1741
1742
|
}
|
|
1743
|
+
if (this.isGons) {
|
|
1744
|
+
const govPremiums = await this.api.getGovernmentPremiums(String(id));
|
|
1745
|
+
this.formStore.productConditionsForm.totalAmount5 = this.getNumberWithSpaces(govPremiums.totalAmount5 === null ? null : govPremiums.totalAmount5);
|
|
1746
|
+
this.formStore.productConditionsForm.totalAmount7 = this.getNumberWithSpaces(govPremiums.totalAmount7 === null ? null : govPremiums.totalAmount7);
|
|
1747
|
+
this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(govPremiums.statePremium5 === null ? null : govPremiums.statePremium5);
|
|
1748
|
+
this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
|
|
1749
|
+
}
|
|
1742
1750
|
|
|
1743
1751
|
this.showToaster('success', this.t('toaster.calculated'), 1000);
|
|
1744
1752
|
} catch (err) {
|
|
@@ -1833,6 +1841,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1833
1841
|
this.sendToParent(constants.postActions.toHomePage, this.t('toaster.noSuchProduct'));
|
|
1834
1842
|
return;
|
|
1835
1843
|
}
|
|
1844
|
+
this.formStore.regNumber = applicationData.regNumber;
|
|
1836
1845
|
this.formStore.applicationData = applicationData;
|
|
1837
1846
|
this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
|
|
1838
1847
|
|
|
@@ -2023,6 +2032,8 @@ export const useDataStore = defineStore('data', {
|
|
|
2023
2032
|
}
|
|
2024
2033
|
}
|
|
2025
2034
|
if (setProductConditions) {
|
|
2035
|
+
this.formStore.policyNumber = applicationData.policyAppDto.policyNumber;
|
|
2036
|
+
this.formStore.contractDate = reformatDate(applicationData.policyAppDto.contractDate);
|
|
2026
2037
|
this.formStore.productConditionsForm.coverPeriod = applicationData.policyAppDto.coverPeriod;
|
|
2027
2038
|
this.formStore.productConditionsForm.payPeriod = applicationData.policyAppDto.payPeriod;
|
|
2028
2039
|
// this.formStore.productConditionsForm.annualIncome = applicationData.policyAppDto.annualIncome?.toString();
|
|
@@ -2140,6 +2151,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2140
2151
|
}
|
|
2141
2152
|
case constants.actions.reject:
|
|
2142
2153
|
case constants.actions.return:
|
|
2154
|
+
case constants.actions.signed:
|
|
2143
2155
|
case constants.actions.rejectclient:
|
|
2144
2156
|
case constants.actions.accept: {
|
|
2145
2157
|
try {
|
|
@@ -2265,6 +2277,34 @@ export const useDataStore = defineStore('data', {
|
|
|
2265
2277
|
ErrorHandler(err);
|
|
2266
2278
|
}
|
|
2267
2279
|
},
|
|
2280
|
+
async generateDocument() {
|
|
2281
|
+
try {
|
|
2282
|
+
this.isButtonsLoading = true;
|
|
2283
|
+
if (this.formStore.signUrls.length) {
|
|
2284
|
+
return this.formStore.signUrls;
|
|
2285
|
+
}
|
|
2286
|
+
this.formStore.needToScanSignedContract = true;
|
|
2287
|
+
const data: SignDataType = {
|
|
2288
|
+
processInstanceId: String(this.formStore.applicationData.processInstanceId),
|
|
2289
|
+
name: 'Contract',
|
|
2290
|
+
format: 'pdf',
|
|
2291
|
+
};
|
|
2292
|
+
const response: any = await this.api.generateDocument(data);
|
|
2293
|
+
const blob = new Blob([response], {
|
|
2294
|
+
type: `application/pdf`,
|
|
2295
|
+
});
|
|
2296
|
+
this.showToaster('info', this.t('toaster.needToSignContract'), 100000);
|
|
2297
|
+
const url = window.URL.createObjectURL(blob);
|
|
2298
|
+
const link = document.createElement('a');
|
|
2299
|
+
link.href = url;
|
|
2300
|
+
link.setAttribute('download', this.formStore.regNumber + ' Договор страхования');
|
|
2301
|
+
document.body.appendChild(link);
|
|
2302
|
+
link.click();
|
|
2303
|
+
} catch (err) {
|
|
2304
|
+
ErrorHandler(err);
|
|
2305
|
+
}
|
|
2306
|
+
this.isButtonsLoading = false;
|
|
2307
|
+
},
|
|
2268
2308
|
async registerNumber() {
|
|
2269
2309
|
try {
|
|
2270
2310
|
if (!this.formStore.finCenterData.date) return;
|
|
@@ -2500,7 +2540,11 @@ export const useDataStore = defineStore('data', {
|
|
|
2500
2540
|
if (!list || (list && list.length === 0)) return false;
|
|
2501
2541
|
const isAnketaValid = ref<boolean>(true);
|
|
2502
2542
|
list.forEach(i => {
|
|
2503
|
-
if (
|
|
2543
|
+
if (
|
|
2544
|
+
(i.first.definedAnswers === 'N' && !i.first.answerText) ||
|
|
2545
|
+
(i.first.definedAnswers === 'Y' && !i.first.answerName) ||
|
|
2546
|
+
(i.first.definedAnswers === 'D' && !i.first.answerName?.match(new RegExp('Нет', 'i')) && !i.first.answerText)
|
|
2547
|
+
) {
|
|
2504
2548
|
isAnketaValid.value = false;
|
|
2505
2549
|
return false;
|
|
2506
2550
|
}
|
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
|
@@ -22,7 +22,8 @@ declare global {
|
|
|
22
22
|
| 'mycar'
|
|
23
23
|
| 'checkcontract'
|
|
24
24
|
| 'checkcontragent'
|
|
25
|
-
| 'daskamkorlyk'
|
|
25
|
+
| 'daskamkorlyk'
|
|
26
|
+
| 'dso';
|
|
26
27
|
type MemberKeys = keyof ReturnType<typeof useFormStore>;
|
|
27
28
|
type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
|
|
28
29
|
type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
|
|
@@ -179,6 +180,7 @@ declare global {
|
|
|
179
180
|
enum DefinedAnswers {
|
|
180
181
|
N = 'N',
|
|
181
182
|
Y = 'Y',
|
|
183
|
+
D = 'D',
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
type AnketaFirst = {
|
|
@@ -618,4 +620,11 @@ declare global {
|
|
|
618
620
|
middleName: string;
|
|
619
621
|
name: string;
|
|
620
622
|
};
|
|
623
|
+
|
|
624
|
+
type GovPremiums = {
|
|
625
|
+
statePremium5: number | null;
|
|
626
|
+
statePremium7: number | null;
|
|
627
|
+
totalAmount5: number | null;
|
|
628
|
+
totalAmount7: number | null;
|
|
629
|
+
};
|
|
621
630
|
}
|