hl-core 0.0.10-beta.30 → 0.0.10-beta.32
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/README.md +0 -2
- package/api/base.api.ts +41 -4
- package/components/Form/ManagerAttachment.vue +1 -2
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/FormInput.vue +5 -0
- package/components/Input/RoundedInput.vue +2 -0
- package/components/Pages/Documents.vue +191 -56
- package/components/Pages/MemberForm.vue +104 -116
- package/components/Pages/ProductConditions.vue +513 -124
- package/components/Panel/PanelHandler.vue +64 -49
- package/composables/classes.ts +20 -9
- package/composables/constants.ts +10 -2
- package/composables/index.ts +9 -2
- package/locales/ru.json +14 -9
- package/package.json +1 -1
- package/store/data.store.ts +327 -122
- package/store/member.store.ts +15 -4
- package/store/rules.ts +2 -2
- package/types/enum.ts +2 -0
- package/types/index.ts +2 -0
package/README.md
CHANGED
package/api/base.api.ts
CHANGED
|
@@ -502,6 +502,7 @@ export class ApiClass {
|
|
|
502
502
|
return await this.axiosCall<Types.EpayShortResponse>({
|
|
503
503
|
method: Methods.POST,
|
|
504
504
|
url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
|
|
505
|
+
data: {},
|
|
505
506
|
});
|
|
506
507
|
}
|
|
507
508
|
|
|
@@ -592,10 +593,6 @@ export class ApiClass {
|
|
|
592
593
|
});
|
|
593
594
|
}
|
|
594
595
|
|
|
595
|
-
async getProcessTariff(code: number | string = 5) {
|
|
596
|
-
return await this.axiosCall({ method: Methods.GET, url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
|
|
597
|
-
}
|
|
598
|
-
|
|
599
596
|
async setConfirmation(data: any) {
|
|
600
597
|
return await this.axiosCall({
|
|
601
598
|
method: Methods.POST,
|
|
@@ -1034,6 +1031,22 @@ export class ApiClass {
|
|
|
1034
1031
|
url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
|
|
1035
1032
|
});
|
|
1036
1033
|
},
|
|
1034
|
+
calcParentContractSums: async (data: any) => {
|
|
1035
|
+
return await this.axiosCall<void>({
|
|
1036
|
+
method: Methods.POST,
|
|
1037
|
+
baseURL: getStrValuePerEnv('efoBaseApi'),
|
|
1038
|
+
url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
|
|
1039
|
+
data: data,
|
|
1040
|
+
});
|
|
1041
|
+
},
|
|
1042
|
+
reCalculateRefund: async (data: any) => {
|
|
1043
|
+
return await this.axiosCall<void>({
|
|
1044
|
+
method: Methods.POST,
|
|
1045
|
+
baseURL: getStrValuePerEnv('efoBaseApi'),
|
|
1046
|
+
url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
|
|
1047
|
+
data: data,
|
|
1048
|
+
});
|
|
1049
|
+
},
|
|
1037
1050
|
};
|
|
1038
1051
|
|
|
1039
1052
|
externalServices = {
|
|
@@ -1052,6 +1065,13 @@ export class ApiClass {
|
|
|
1052
1065
|
data: data,
|
|
1053
1066
|
});
|
|
1054
1067
|
},
|
|
1068
|
+
updateDigitalDocumentsProfile: async (data: { iinBin: string }) => {
|
|
1069
|
+
return await this.axiosCall<void>({
|
|
1070
|
+
method: Methods.POST,
|
|
1071
|
+
url: `${this.externalServices.base}/api/ExternalServices/UpdateDigitalDocumentsProfile`,
|
|
1072
|
+
data: data,
|
|
1073
|
+
});
|
|
1074
|
+
},
|
|
1055
1075
|
};
|
|
1056
1076
|
|
|
1057
1077
|
file = {
|
|
@@ -1128,6 +1148,16 @@ export class ApiClass {
|
|
|
1128
1148
|
},
|
|
1129
1149
|
});
|
|
1130
1150
|
},
|
|
1151
|
+
getFileNew: async (id: string) => {
|
|
1152
|
+
return await this.axiosCall({
|
|
1153
|
+
method: Methods.GET,
|
|
1154
|
+
url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
|
|
1155
|
+
responseType: 'arraybuffer',
|
|
1156
|
+
headers: {
|
|
1157
|
+
'Content-Type': 'application/pdf',
|
|
1158
|
+
},
|
|
1159
|
+
});
|
|
1160
|
+
},
|
|
1131
1161
|
deleteFile: async (data: any) => {
|
|
1132
1162
|
return await this.axiosCall<void>({
|
|
1133
1163
|
method: Methods.POST,
|
|
@@ -1174,5 +1204,12 @@ export class ApiClass {
|
|
|
1174
1204
|
data: data,
|
|
1175
1205
|
});
|
|
1176
1206
|
},
|
|
1207
|
+
setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
|
|
1208
|
+
return await this.axiosCall<void>({
|
|
1209
|
+
method: Methods.POST,
|
|
1210
|
+
url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
|
|
1211
|
+
data: data,
|
|
1212
|
+
});
|
|
1213
|
+
},
|
|
1177
1214
|
};
|
|
1178
1215
|
}
|
|
@@ -159,7 +159,7 @@ export default defineComponent({
|
|
|
159
159
|
const isAgentReadonly = computed(() => {
|
|
160
160
|
if (!isReadonly.value) {
|
|
161
161
|
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
162
|
-
if (dataStore.isPension) return
|
|
162
|
+
if (dataStore.isPension) return true;
|
|
163
163
|
}
|
|
164
164
|
return isReadonly.value;
|
|
165
165
|
});
|
|
@@ -176,7 +176,6 @@ export default defineComponent({
|
|
|
176
176
|
});
|
|
177
177
|
const isAgentShown = computed(() => {
|
|
178
178
|
if (dataStore.isGons) return !dataStore.isAgent();
|
|
179
|
-
if (dataStore.isPension) return dataStore.isServiceManager();
|
|
180
179
|
return true;
|
|
181
180
|
});
|
|
182
181
|
const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:enable-time-picker="false"
|
|
14
14
|
:six-weeks="true"
|
|
15
15
|
:min-date="minDate"
|
|
16
|
+
:max-date="maxDate"
|
|
16
17
|
cancel-text="Отменить"
|
|
17
18
|
select-text="Выбрать"
|
|
18
19
|
>
|
|
@@ -43,6 +44,10 @@ export default defineComponent({
|
|
|
43
44
|
type: Date,
|
|
44
45
|
required: false,
|
|
45
46
|
},
|
|
47
|
+
maxDate: {
|
|
48
|
+
type: Date,
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
46
51
|
},
|
|
47
52
|
});
|
|
48
53
|
</script>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
|
|
40
40
|
:model-value="modelValue"
|
|
41
41
|
:min-date="minDate"
|
|
42
|
+
:max-date="maxDate"
|
|
42
43
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
43
44
|
/>
|
|
44
45
|
</template>
|
|
@@ -120,6 +121,10 @@ export default defineComponent({
|
|
|
120
121
|
type: Date,
|
|
121
122
|
default: undefined,
|
|
122
123
|
},
|
|
124
|
+
maxDate: {
|
|
125
|
+
type: Date,
|
|
126
|
+
default: undefined,
|
|
127
|
+
},
|
|
123
128
|
prependIcon: {
|
|
124
129
|
type: String,
|
|
125
130
|
},
|
|
@@ -6,6 +6,55 @@
|
|
|
6
6
|
<base-btn v-if="underDocumentsList && underDocumentsList.length" :loading="documentLoading" text="Загрузить" size="sm" class="mt-3" @click="uploadUnderFiles" />
|
|
7
7
|
</base-animation>
|
|
8
8
|
</base-form-section>
|
|
9
|
+
<section
|
|
10
|
+
v-if="$dataStore.isPension && (showContract || formStore.applicationData.statusCode === 'PreparationDossierForm')"
|
|
11
|
+
class="w-full px-[10px] pt-[14px] flex flex-col gap-2"
|
|
12
|
+
>
|
|
13
|
+
<base-content-block v-if="showContract" :class="[$styles.textSimple]">
|
|
14
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
|
|
15
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
16
|
+
<span class="ml-2">Заявления на {{ processCode === 19 || processCode === 25 ? 'страхование' : 'возврат' }}</span>
|
|
17
|
+
<i
|
|
18
|
+
class="transition-all cursor-pointer mdi mdi-tray-arrow-down pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
19
|
+
:class="[$styles.greenTextHover]"
|
|
20
|
+
@click="$dataStore.generatePDFDocument(processCode === 19 ? 'PA_Statement' : processCode === 25 ? 'PAJ_Statement' : 'PA_RefundStatement', '37')"
|
|
21
|
+
></i>
|
|
22
|
+
</div>
|
|
23
|
+
</base-content-block>
|
|
24
|
+
<base-content-block v-if="showContract" :class="[$styles.textSimple]">
|
|
25
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.contract') }}</h5>
|
|
26
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
27
|
+
<span class="ml-2">Договор {{ processCode === 19 || processCode === 25 ? 'страхования' : 'возврата' }}</span>
|
|
28
|
+
<i
|
|
29
|
+
class="transition-all cursor-pointer mdi mdi-tray-arrow-down pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
30
|
+
:class="[$styles.greenTextHover]"
|
|
31
|
+
@click="$dataStore.generatePDFDocument(processCode === 19 ? 'PA_Contract' : processCode === 25 ? 'PAJ_Contract' : 'PA_RefundAgreement', '38')"
|
|
32
|
+
></i>
|
|
33
|
+
</div>
|
|
34
|
+
</base-content-block>
|
|
35
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && showContract">
|
|
36
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.complianceFinMonitoring') }}</h5>
|
|
37
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
38
|
+
<span class="ml-2">{{ $dataStore.t('pension.complianceFinMonitoring') }}</span>
|
|
39
|
+
<i
|
|
40
|
+
class="transition-all cursor-pointer mdi mdi-tray-arrow-down pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
41
|
+
:class="[$styles.greenTextHover]"
|
|
42
|
+
@click="$dataStore.generatePDFDocument('Compliance_FinMonitoring', '39')"
|
|
43
|
+
></i>
|
|
44
|
+
</div>
|
|
45
|
+
</base-content-block>
|
|
46
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm'">
|
|
47
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.dossierPA') }}</h5>
|
|
48
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
49
|
+
<span class="ml-2">{{ $dataStore.t('pension.dossierPA') }}</span>
|
|
50
|
+
<i
|
|
51
|
+
class="transition-all cursor-pointer mdi mdi-tray-arrow-down pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
52
|
+
:class="[$styles.greenTextHover]"
|
|
53
|
+
@click="$dataStore.generatePDFDocument('PA_Dossier', '40', 'doc')"
|
|
54
|
+
></i>
|
|
55
|
+
</div>
|
|
56
|
+
</base-content-block>
|
|
57
|
+
</section>
|
|
9
58
|
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
10
59
|
<base-content-block
|
|
11
60
|
v-if="$dataStore.isInitiator() && !$dataStore.isPension && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
@@ -31,6 +80,54 @@
|
|
|
31
80
|
</div>
|
|
32
81
|
</base-content-block>
|
|
33
82
|
</section>
|
|
83
|
+
<section v-if="requiredSign">
|
|
84
|
+
<div v-for="(member, index) in jointMembers.filter(i => memberHasDocumentsToSign(i.iin))" :key="index">
|
|
85
|
+
<base-form-section :title="`${member.firstName} ${member.lastName}`" class="mx-[10px] mt-[14px] d-flex">
|
|
86
|
+
<base-file-input
|
|
87
|
+
v-if="
|
|
88
|
+
!formStore.signedDocumentList.find(i => i.fileTypeCode === '10' && i.iin === String(member.iin).replaceAll('-', '')) &&
|
|
89
|
+
formStore.requiredDocuments.some(i => i.code === '10' && i.iin === String(member.iin).replaceAll('-', ''))
|
|
90
|
+
"
|
|
91
|
+
:label="$dataStore.t('form.bankStatement')"
|
|
92
|
+
:loading="$dataStore.isLoading"
|
|
93
|
+
@input="uploadAdditionalFile($event, '10', member.iin)"
|
|
94
|
+
/>
|
|
95
|
+
<base-file-input
|
|
96
|
+
v-if="!formStore.signedDocumentList.find(i => i.fileTypeCode === '9' && i.iin === String(member.iin).replaceAll('-', '')) && member.isDisability"
|
|
97
|
+
label="Справка об инвалидности"
|
|
98
|
+
:loading="$dataStore.isLoading"
|
|
99
|
+
@input="uploadAdditionalFile($event, '9', member.iin)"
|
|
100
|
+
/>
|
|
101
|
+
<base-file-input
|
|
102
|
+
v-if="
|
|
103
|
+
!formStore.signedDocumentList.find(i => i.fileTypeCode === '8' && i.iin === String(member.iin).replaceAll('-', '')) &&
|
|
104
|
+
formStore.requiredDocuments.some(i => i.code === '8' && i.iin === String(member.iin).replaceAll('-', ''))
|
|
105
|
+
"
|
|
106
|
+
:label="$dataStore.t('pension.ENPFnote')"
|
|
107
|
+
:loading="$dataStore.isLoading"
|
|
108
|
+
@input="uploadAdditionalFile($event, '8', member.iin)"
|
|
109
|
+
/>
|
|
110
|
+
<base-file-input
|
|
111
|
+
v-if="
|
|
112
|
+
!formStore.signedDocumentList.find(i => i.fileTypeCode === '40' && i.iin === String(member.iin).replaceAll('-', '')) &&
|
|
113
|
+
formStore.requiredDocuments.some(i => i.code === '40' && i.iin === String(member.iin).replaceAll('-', ''))
|
|
114
|
+
"
|
|
115
|
+
:label="$dataStore.t('pension.dossierPA')"
|
|
116
|
+
:loading="$dataStore.isLoading"
|
|
117
|
+
@input="uploadAdditionalFile($event, '40', member.iin)"
|
|
118
|
+
/>
|
|
119
|
+
<base-file-input
|
|
120
|
+
v-if="
|
|
121
|
+
!formStore.signedDocumentList.find(i => i.fileTypeCode === '50' && i.iin === String(member.iin).replaceAll('-', '')) &&
|
|
122
|
+
formStore.requiredDocuments.some(i => i.code === '50' && i.iin === String(member.iin).replaceAll('-', ''))
|
|
123
|
+
"
|
|
124
|
+
:label="$dataStore.t('pension.oppvPaymentCertificate')"
|
|
125
|
+
:loading="$dataStore.isLoading"
|
|
126
|
+
@input="uploadAdditionalFile($event, '50', member.iin)"
|
|
127
|
+
/>
|
|
128
|
+
</base-form-section>
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
34
131
|
<section v-if="hasDigitalDocuments">
|
|
35
132
|
<base-digital-document
|
|
36
133
|
v-if="$route.params.taskId !== '0'"
|
|
@@ -40,6 +137,14 @@
|
|
|
40
137
|
@openDigitalDocPanel="openDigitalDocPanel($event, 'Страхователя')"
|
|
41
138
|
@openPanel="openPanel"
|
|
42
139
|
/>
|
|
140
|
+
<base-digital-document
|
|
141
|
+
v-if="$route.params.taskId !== '0' && slaveInsuredForm"
|
|
142
|
+
:member="slaveInsuredForm"
|
|
143
|
+
:title="$dataStore.t('policyholderForm') + ' 2'"
|
|
144
|
+
:disabled="isDigitalDocDisabled"
|
|
145
|
+
@openDigitalDocPanel="openDigitalDocPanel($event, 'Страхователя 2')"
|
|
146
|
+
@openPanel="openPanel"
|
|
147
|
+
/>
|
|
43
148
|
<div v-if="insuredFiltered.length !== 0">
|
|
44
149
|
<base-digital-document
|
|
45
150
|
v-for="(member, index) in insuredFiltered"
|
|
@@ -85,56 +190,18 @@
|
|
|
85
190
|
</svg>
|
|
86
191
|
<p class="text-xl" :class="[$styles.mutedText]">{{ $dataStore.t('labels.noDocuments') }}</p>
|
|
87
192
|
</div>
|
|
88
|
-
<section v-if="$dataStore.isPension && showContract" class="w-full px-[10px] pt-[14px] flex flex-col gap-2">
|
|
89
|
-
<base-content-block :class="[$styles.textSimple]">
|
|
90
|
-
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
|
|
91
|
-
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
92
|
-
<span class="ml-2">Заявления на {{ processCode == 19 ? 'страхование' : 'возврат' }}</span>
|
|
93
|
-
<i
|
|
94
|
-
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
95
|
-
:class="[$styles.greenTextHover]"
|
|
96
|
-
@click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Statement' : 'PA_RefundStatement', '37')"
|
|
97
|
-
></i>
|
|
98
|
-
</div>
|
|
99
|
-
</base-content-block>
|
|
100
|
-
<base-content-block :class="[$styles.textSimple]">
|
|
101
|
-
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.contract') }}</h5>
|
|
102
|
-
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
103
|
-
<span class="ml-2">Договор {{ processCode == 19 ? 'страхования' : 'возврата' }}</span>
|
|
104
|
-
<i
|
|
105
|
-
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
106
|
-
:class="[$styles.greenTextHover]"
|
|
107
|
-
@click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Contract' : 'PA_RefundAgreement', '38')"
|
|
108
|
-
></i>
|
|
109
|
-
</div>
|
|
110
|
-
</base-content-block>
|
|
111
|
-
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode == 19">
|
|
112
|
-
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.complianceFinMonitoring') }}</h5>
|
|
113
|
-
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
114
|
-
<span class="ml-2">{{ $dataStore.t('pension.complianceFinMonitoring') }}</span>
|
|
115
|
-
<i
|
|
116
|
-
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
117
|
-
:class="[$styles.greenTextHover]"
|
|
118
|
-
@click="$dataStore.generatePDFDocument('Compliance_FinMonitoring', '39')"
|
|
119
|
-
></i>
|
|
120
|
-
</div>
|
|
121
|
-
</base-content-block>
|
|
122
|
-
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode == 19">
|
|
123
|
-
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.dossierPA') }}</h5>
|
|
124
|
-
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
125
|
-
<span class="ml-2">{{ $dataStore.t('pension.dossierPA') }}</span>
|
|
126
|
-
<i
|
|
127
|
-
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
128
|
-
:class="[$styles.greenTextHover]"
|
|
129
|
-
@click="$dataStore.generatePDFDocument('PA_Dossier', '40', 'doc')"
|
|
130
|
-
></i>
|
|
131
|
-
</div>
|
|
132
|
-
</base-content-block>
|
|
133
|
-
</section>
|
|
134
193
|
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
135
194
|
<base-fade-transition>
|
|
136
195
|
<div :class="[$styles.flexColNav]">
|
|
137
|
-
<base-
|
|
196
|
+
<base-animation>
|
|
197
|
+
<base-btn
|
|
198
|
+
v-if="currentDocument.fileName && currentDocument.fileName.includes('.') ? currentDocument.fileName.endsWith('.pdf') : true"
|
|
199
|
+
:disabled="documentLoading"
|
|
200
|
+
:loading="documentLoading"
|
|
201
|
+
text="Открыть"
|
|
202
|
+
@click="getFile('view')"
|
|
203
|
+
/>
|
|
204
|
+
</base-animation>
|
|
138
205
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
139
206
|
<base-animation>
|
|
140
207
|
<base-btn v-if="canDeleteFiles" :disabled="documentLoading" :loading="documentLoading" text="Удалить" @click="deletionDialog = true" />
|
|
@@ -158,7 +225,8 @@
|
|
|
158
225
|
3. Через SMS: <br />
|
|
159
226
|
• Нажмите "Отправить код". <br />
|
|
160
227
|
• Введите полученный SMS-код. <br />
|
|
161
|
-
• Нажмите "Получить документ".<br />
|
|
228
|
+
• Нажмите "Получить документ".<br /><br />
|
|
229
|
+
4. При ошибке нажмите <a href="javascript:void(0);" class="text-blue-600" @click="$dataStore.updateDigitalDocumentsProfile(currentIin)">обновить профиль</a><br />
|
|
162
230
|
</v-expansion-panel-text>
|
|
163
231
|
</v-expansion-panel>
|
|
164
232
|
</v-expansion-panels>
|
|
@@ -195,8 +263,8 @@
|
|
|
195
263
|
</template>
|
|
196
264
|
|
|
197
265
|
<script lang="ts">
|
|
198
|
-
import { DocumentItem } from '../../composables/classes';
|
|
199
|
-
import type { IDocument } from '../../composables/classes';
|
|
266
|
+
import { DocumentItem, Value } from '../../composables/classes';
|
|
267
|
+
import type { IDocument, Member } from '../../composables/classes';
|
|
200
268
|
import { uuid } from 'vue-uuid';
|
|
201
269
|
import type { Base, FileActions } from '../../types';
|
|
202
270
|
|
|
@@ -216,7 +284,15 @@ export default defineComponent({
|
|
|
216
284
|
const isDisabled = computed(() => !dataStore.isTask());
|
|
217
285
|
const contractDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Договор страхования' || i.nameRu === 'Договор'));
|
|
218
286
|
const processCode = formStore.applicationData.processCode;
|
|
219
|
-
|
|
287
|
+
const requiredSign = computed(
|
|
288
|
+
() =>
|
|
289
|
+
!isDisabled.value &&
|
|
290
|
+
dataStore.isPension &&
|
|
291
|
+
formStore.applicationData &&
|
|
292
|
+
(formStore.applicationData.statusCode === 'StartForm' ||
|
|
293
|
+
formStore.applicationData.statusCode === 'EditForm' ||
|
|
294
|
+
formStore.applicationData.statusCode === 'PreparationDossierForm'),
|
|
295
|
+
);
|
|
220
296
|
const hasDigitalDocuments = computed(() => dataStore.isEfoParent && !dataStore.isGns && !dataStore.isLifeBusiness && !!formStore.applicationData);
|
|
221
297
|
const isDigitalDocDisabled = computed(
|
|
222
298
|
() => !dataStore.isTask() || route.params.taskId === '0' || !dataStore.isInitiator() || !dataStore.isProcessEditable(formStore.applicationData.statusCode),
|
|
@@ -267,9 +343,7 @@ export default defineComponent({
|
|
|
267
343
|
}),
|
|
268
344
|
);
|
|
269
345
|
const showContract = computed(
|
|
270
|
-
() =>
|
|
271
|
-
formStore.applicationData &&
|
|
272
|
-
(formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm' || dataStore.isActuary()),
|
|
346
|
+
() => formStore.applicationData && (dataStore.isAdmin() || dataStore.isSupport() || (dataStore.isActuary() && formStore.applicationData.statusCode === 'ActuaryForm')),
|
|
273
347
|
);
|
|
274
348
|
const noDocuments = computed(() => {
|
|
275
349
|
if (dataStore.isPension && (!formStore.signedDocumentList || !formStore.signedDocumentList.length)) return !showContract.value;
|
|
@@ -287,14 +361,24 @@ export default defineComponent({
|
|
|
287
361
|
if (dataStore.isBaiterek || dataStore.isBolashak || dataStore.isLiferenta || dataStore.isKazyna || dataStore.isAmulet || dataStore.isGons) {
|
|
288
362
|
return baseCondition && (currentDocument.value ? deleteFilesId.includes(String(currentDocument.value.fileTypeCode)) : false);
|
|
289
363
|
}
|
|
290
|
-
if (dataStore.isPension)
|
|
364
|
+
if (dataStore.isPension) {
|
|
365
|
+
const canDeleteInPension = dataStore.isTask() && dataStore.isInitiator();
|
|
366
|
+
const canDeletePaperInPension = canDeleteInPension && currentDocument.value.signed === true && currentDocument.value.signedType === 2;
|
|
367
|
+
if (canDeleteInPension && dataStore.isProcessEditable(formStore.applicationData.statusCode))
|
|
368
|
+
return formStore.requiredDocuments.some(i => i.code === currentDocument.value.fileTypeCode);
|
|
369
|
+
if (formStore.applicationData.statusCode === 'AttachAppContractForm')
|
|
370
|
+
return canDeletePaperInPension && (currentDocument.value.fileTypeCode === '5' || currentDocument.value.fileTypeCode === '19');
|
|
371
|
+
if (formStore.applicationData.statusCode === 'ContractSignedFrom') return canDeletePaperInPension && currentDocument.value.fileTypeCode === '6';
|
|
372
|
+
}
|
|
291
373
|
return false;
|
|
292
374
|
});
|
|
293
375
|
|
|
294
376
|
const policyholderForm = computed(() => formStore.policyholderForm as Base.Document.Digital);
|
|
295
377
|
const insuredFiltered = computed(() => formStore.insuredForm.filter(i => i.iin !== formStore.policyholderForm.iin) as Base.Document.Digital[]);
|
|
296
378
|
const beneficiaryFiltered = computed(() => formStore.beneficiaryForm.filter(i => i.iin !== formStore.policyholderForm.iin) as Base.Document.Digital[]);
|
|
379
|
+
const slaveInsuredForm = computed(() => formStore.slaveInsuredForm as Base.Document.Digital);
|
|
297
380
|
const documentListFiltered = computed(() => formStore.signedDocumentList.filter(i => !['1', '2', '4'].includes(String(i.fileTypeCode))));
|
|
381
|
+
const jointMembers = ref<Member[]>([formStore.insuredForm[0]]);
|
|
298
382
|
|
|
299
383
|
const openPanel = async (document: DocumentItem) => {
|
|
300
384
|
dataStore.rightPanel.title = document.fileTypeName!;
|
|
@@ -312,7 +396,7 @@ export default defineComponent({
|
|
|
312
396
|
if (files[0].size >= 20_000_000) {
|
|
313
397
|
return dataStore.showToaster('error', dataStore.t('toaster.fileOnlyBelow20mb'), 6000);
|
|
314
398
|
}
|
|
315
|
-
if (files[0].type !==
|
|
399
|
+
if (files[0].type !== constants.fileTypes.pdf) {
|
|
316
400
|
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
317
401
|
}
|
|
318
402
|
signedContract.fileName = files[0].name;
|
|
@@ -497,10 +581,54 @@ export default defineComponent({
|
|
|
497
581
|
}
|
|
498
582
|
};
|
|
499
583
|
|
|
584
|
+
const memberHasDocumentsToSign = (iin: string | null) => {
|
|
585
|
+
if (!iin) return false;
|
|
586
|
+
// TODO reformat logic
|
|
587
|
+
return (
|
|
588
|
+
formStore.signedDocumentList.filter(i => formStore.requiredDocuments.find(j => j.code === i.fileTypeCode) && i.iin === iin.replaceAll('-', '')).length !==
|
|
589
|
+
formStore.requiredDocuments.filter(i => i.iin === iin.replaceAll('-', '')).length
|
|
590
|
+
);
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
const uploadAdditionalFile = async (event: InputEvent, code: string, iin?: string | null) => {
|
|
594
|
+
if (event.target) {
|
|
595
|
+
const files = (event.target as HTMLInputElement).files;
|
|
596
|
+
if (files && files.length && files[0]) {
|
|
597
|
+
if (files[0].type !== constants.fileTypes.pdf && files[0].type !== constants.fileTypes.docx && files[0].type !== constants.fileTypes.doc) {
|
|
598
|
+
return dataStore.showToaster('error', dataStore.t('toaster.onlyWithFormat', { format: 'PDF, Word' }), 6000);
|
|
599
|
+
}
|
|
600
|
+
if (files[0].size >= 10_000_000) {
|
|
601
|
+
return dataStore.showToaster('error', dataStore.t('toaster.fileOnlyBelow10mb'), 6000);
|
|
602
|
+
}
|
|
603
|
+
const file = Object.assign(files[0]);
|
|
604
|
+
const formData = new FormData();
|
|
605
|
+
const information: any = [];
|
|
606
|
+
const uuidV4 = uuid.v4();
|
|
607
|
+
formData.append('file', file);
|
|
608
|
+
const ext = file.name.substring(file.name.lastIndexOf('.'));
|
|
609
|
+
const selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === code);
|
|
610
|
+
information.push({
|
|
611
|
+
identifier: `${uuidV4}${ext}`,
|
|
612
|
+
iin: iin ? iin.replaceAll('-', '') : null,
|
|
613
|
+
processInstanceId: formStore.applicationData.processInstanceId,
|
|
614
|
+
fileTypeCode: selectedDocument ? selectedDocument.code : null,
|
|
615
|
+
fileTypeId: selectedDocument ? selectedDocument.id : null,
|
|
616
|
+
fileName: file.name,
|
|
617
|
+
});
|
|
618
|
+
formData.append('fileData', JSON.stringify(information));
|
|
619
|
+
dataStore.isLoading = true;
|
|
620
|
+
await dataStore.uploadFiles(formData, false);
|
|
621
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
622
|
+
}
|
|
623
|
+
dataStore.isLoading = false;
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
|
|
500
627
|
const onInit = async () => {
|
|
501
628
|
await dataStore.getDicFileTypeList();
|
|
502
629
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
503
630
|
if (hasDigitalDocuments.value) getDigitalDocs();
|
|
631
|
+
if (processCode === 25) jointMembers.value.push(slaveInsuredForm.value as Member);
|
|
504
632
|
};
|
|
505
633
|
|
|
506
634
|
onInit();
|
|
@@ -513,24 +641,29 @@ export default defineComponent({
|
|
|
513
641
|
// State
|
|
514
642
|
otpCode,
|
|
515
643
|
formStore,
|
|
644
|
+
currentIin,
|
|
516
645
|
processCode,
|
|
517
646
|
isPanelOpen,
|
|
647
|
+
jointMembers,
|
|
518
648
|
DocumentItem,
|
|
519
649
|
documentType,
|
|
520
650
|
documentItems,
|
|
521
651
|
signedContract,
|
|
522
652
|
deletionDialog,
|
|
653
|
+
currentDocument,
|
|
523
654
|
documentLoading,
|
|
524
655
|
isDigitalDocOpen,
|
|
525
656
|
underDocumentsList,
|
|
526
657
|
|
|
527
658
|
// Computed
|
|
528
659
|
isDisabled,
|
|
660
|
+
requiredSign,
|
|
529
661
|
showContract,
|
|
530
662
|
noDocuments,
|
|
531
663
|
canDeleteFiles,
|
|
532
664
|
insuredFiltered,
|
|
533
665
|
policyholderForm,
|
|
666
|
+
slaveInsuredForm,
|
|
534
667
|
beneficiaryFiltered,
|
|
535
668
|
hasDigitalDocuments,
|
|
536
669
|
documentListFiltered,
|
|
@@ -548,6 +681,8 @@ export default defineComponent({
|
|
|
548
681
|
openDigitalDocPanel,
|
|
549
682
|
uploadUnderFiles,
|
|
550
683
|
onClearUnderFiles,
|
|
684
|
+
uploadAdditionalFile,
|
|
685
|
+
memberHasDocumentsToSign,
|
|
551
686
|
};
|
|
552
687
|
},
|
|
553
688
|
});
|