hl-core 0.0.10-beta.2 → 0.0.10-beta.21
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 +221 -195
- package/components/Complex/TextBlock.vue +2 -0
- package/components/Dialog/Dialog.vue +7 -1
- package/components/Dialog/FamilyDialog.vue +2 -0
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Form/DynamicForm.vue +1 -0
- package/components/Form/FormData.vue +1 -0
- package/components/Form/ManagerAttachment.vue +2 -4
- package/components/Input/DynamicInput.vue +2 -0
- package/components/Input/FormInput.vue +2 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Input/PanelInput.vue +1 -0
- package/components/Input/RoundedInput.vue +2 -0
- package/components/Input/RoundedSelect.vue +4 -0
- package/components/Input/SwitchInput.vue +2 -0
- package/components/Input/TextInput.vue +2 -0
- package/components/Layout/Drawer.vue +2 -0
- package/components/Pages/Anketa.vue +165 -166
- package/components/Pages/Auth.vue +2 -0
- package/components/Pages/ContragentForm.vue +1 -0
- package/components/Pages/Documents.vue +237 -6
- package/components/Pages/MemberForm.vue +204 -56
- package/components/Pages/ProductConditions.vue +153 -74
- package/components/Panel/PanelHandler.vue +231 -105
- package/components/Transitions/Animation.vue +2 -0
- package/components/Utilities/Chip.vue +2 -0
- package/components/Utilities/JsonViewer.vue +1 -2
- package/composables/classes.ts +102 -41
- package/composables/fields.ts +6 -4
- package/composables/index.ts +220 -7
- package/composables/styles.ts +8 -24
- package/configs/pwa.ts +1 -7
- package/locales/ru.json +11 -4
- package/nuxt.config.ts +10 -13
- package/package.json +13 -12
- package/plugins/head.ts +1 -1
- package/store/data.store.ts +235 -357
- package/store/member.store.ts +3 -2
- package/tsconfig.json +3 -0
- package/types/enum.ts +17 -2
- package/types/form.ts +71 -75
- package/types/index.ts +889 -877
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
:maska="$maska.iin"
|
|
82
82
|
:readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin"
|
|
83
83
|
:clearable="!isDisabled"
|
|
84
|
-
:append-inner-icon="hasMemberSearch ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
|
|
84
|
+
:append-inner-icon="hasMemberSearch || !isNonResident ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
|
|
85
85
|
@append="searchMember"
|
|
86
86
|
@input="onIinInput"
|
|
87
|
-
:rules="$rules.required.concat($rules.iinRight)"
|
|
87
|
+
:rules="isNonResident ? [] : $rules.required.concat($rules.iinRight)"
|
|
88
88
|
/>
|
|
89
89
|
<base-form-input
|
|
90
90
|
v-model.trim="member.lastName"
|
|
@@ -99,6 +99,8 @@
|
|
|
99
99
|
:clearable="!isDisabled"
|
|
100
100
|
:label="$dataStore.t('form.firstName')"
|
|
101
101
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
102
|
+
:append-inner-icon="hasMemberSearch || isNonResident ? 'mdi mdi-magnify' : ''"
|
|
103
|
+
@append="isNonResident && searchMember"
|
|
102
104
|
/>
|
|
103
105
|
<base-form-input
|
|
104
106
|
v-if="hasMiddleName"
|
|
@@ -347,7 +349,7 @@
|
|
|
347
349
|
/>
|
|
348
350
|
<base-form-input v-model.trim="member.jobPlace" :label="$dataStore.t('form.jobPlace')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required" />
|
|
349
351
|
</base-form-section>
|
|
350
|
-
<base-form-section :title="$dataStore.t('form.placeRegistration')"
|
|
352
|
+
<base-form-section :title="$dataStore.t('form.placeRegistration')">
|
|
351
353
|
<base-form-toggle v-if="hasSameAddressToggle" v-model="sameAddress" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('form.sameAddress')" />
|
|
352
354
|
<base-panel-input
|
|
353
355
|
v-model="member.registrationCountry"
|
|
@@ -447,7 +449,7 @@
|
|
|
447
449
|
@append="openPanel($dataStore.t('form.Region'), [], 'birthRegion', $dataStore.getRegions)"
|
|
448
450
|
/> -->
|
|
449
451
|
</base-form-section>
|
|
450
|
-
<base-form-section :title="$dataStore.t('form.documentData')"
|
|
452
|
+
<base-form-section :title="$dataStore.t('form.documentData')">
|
|
451
453
|
<base-panel-input
|
|
452
454
|
v-if="gbdDocuments && gbdDocuments.length"
|
|
453
455
|
value="Список документов из ГБДФЛ"
|
|
@@ -623,24 +625,27 @@
|
|
|
623
625
|
:disabled="isDisabled"
|
|
624
626
|
:clearable="!isDisabled"
|
|
625
627
|
icon="mdi-paperclip"
|
|
626
|
-
@input="
|
|
628
|
+
@input="attachAdditionalFile($event, '1')"
|
|
627
629
|
:rules="$rules.required"
|
|
630
|
+
@onClear="clearAdditionalFile('1')"
|
|
628
631
|
/>
|
|
629
632
|
<base-file-input
|
|
630
633
|
:label="$dataStore.t('form.bankStatement')"
|
|
631
634
|
:disabled="isDisabled"
|
|
632
635
|
:clearable="!isDisabled"
|
|
633
636
|
icon="mdi-paperclip"
|
|
634
|
-
@input="
|
|
637
|
+
@input="attachAdditionalFile($event, '10')"
|
|
635
638
|
:rules="$rules.required"
|
|
639
|
+
@onClear="clearAdditionalFile('10')"
|
|
636
640
|
/>
|
|
637
641
|
<base-file-input
|
|
638
642
|
:label="$dataStore.t('pension.ENPFnote')"
|
|
639
643
|
:disabled="isDisabled"
|
|
640
644
|
:clearable="!isDisabled"
|
|
641
645
|
icon="mdi-paperclip"
|
|
642
|
-
@input="
|
|
646
|
+
@input="attachAdditionalFile($event, '8')"
|
|
643
647
|
:rules="$rules.required"
|
|
648
|
+
@onClear="clearAdditionalFile('8')"
|
|
644
649
|
/>
|
|
645
650
|
</base-form-section>
|
|
646
651
|
<base-form-section :title="$dataStore.t('form.contactsData')" v-if="$dataStore.hasContactSection(whichForm)">
|
|
@@ -678,6 +683,7 @@
|
|
|
678
683
|
<base-btn v-if="hasGBDFL" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGBDFL')" @click="getContragentFromGBDFL" />
|
|
679
684
|
<base-btn v-if="hasInsis" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromInsis')" @click="getContragent" />
|
|
680
685
|
<base-btn v-if="hasGKB" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGKB')" @click="getFamilyInfo" />
|
|
686
|
+
<base-btn v-if="isNonResident" :loading="isButtonLoading" :text="$dataStore.t('buttons.searchByFio')" @click="getContragent" />
|
|
681
687
|
<base-form-section v-if="hasDocumentReader" class="!mt-0">
|
|
682
688
|
<base-file-input
|
|
683
689
|
:disabled="isDisabled"
|
|
@@ -702,18 +708,16 @@
|
|
|
702
708
|
</Teleport>
|
|
703
709
|
<Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#right-panel-actions">
|
|
704
710
|
<div :class="[$styles.flexColNav]">
|
|
705
|
-
<base-
|
|
706
|
-
<
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
/>
|
|
716
|
-
</base-fade-transition>
|
|
711
|
+
<base-animation>
|
|
712
|
+
<div v-if="otpCondition && member.otpTokenId" class="flex flex-col">
|
|
713
|
+
<base-form-section class="mt-0 py-2">
|
|
714
|
+
<base-otp-input v-model="member.otpCode" :length="4" @keyup.enter.prevent="hasOtp && checkOtp()" @input="onOtpCodeInput" />
|
|
715
|
+
</base-form-section>
|
|
716
|
+
<span class="text-center cursor-pointer mt-2" :class="[$styles.mutedText]" @click="sendOtp(false)"
|
|
717
|
+
>Не получили код? <span class="underline underline-offset-2">Отправить код заново</span></span
|
|
718
|
+
>
|
|
719
|
+
</div>
|
|
720
|
+
</base-animation>
|
|
717
721
|
<base-btn v-if="!member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.sendOtp')" @click="sendOtp(false)" />
|
|
718
722
|
<base-btn v-if="member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.check')" @click="checkOtp()" />
|
|
719
723
|
</div>
|
|
@@ -721,12 +725,12 @@
|
|
|
721
725
|
<Teleport v-if="isPositionPanelOpen" to="#right-panel-actions">
|
|
722
726
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
723
727
|
<base-rounded-input
|
|
724
|
-
v-model="searchQuery"
|
|
725
|
-
|
|
728
|
+
v-model.trim="searchQuery"
|
|
729
|
+
label="Выполните поиск должностей"
|
|
726
730
|
class="w-full p-2"
|
|
727
731
|
:hide-details="searchQuery.length >= 4"
|
|
728
|
-
:rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len:
|
|
729
|
-
|
|
732
|
+
:rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len: 4 }) : true]"
|
|
733
|
+
append-inner-icon="mdi mdi-magnify"
|
|
730
734
|
@append="searchPositions"
|
|
731
735
|
/>
|
|
732
736
|
<base-animation>
|
|
@@ -783,6 +787,27 @@
|
|
|
783
787
|
<base-list-empty class="w-full" v-else @click="documentChooseDialog = false" />
|
|
784
788
|
</template>
|
|
785
789
|
</base-dialog>
|
|
790
|
+
<base-dialog
|
|
791
|
+
v-model="fioChooseDialog"
|
|
792
|
+
:title="$dataStore.t('pension.contragentSelect')"
|
|
793
|
+
:icon="{ mdi: 'format-list-bulleted-type', color: '#A0B3D8' }"
|
|
794
|
+
actions="fioChooseDialog"
|
|
795
|
+
:persistent="false"
|
|
796
|
+
>
|
|
797
|
+
<template #actions>
|
|
798
|
+
<v-list lines="two" v-if="contragents && contragents.length" class="w-full !py-0">
|
|
799
|
+
<v-list-item v-for="person of contragents" :key="person.id" @click="getContragentClick(person)">
|
|
800
|
+
<v-list-item-title :class="[$styles.greenText, $styles.textTitle]">
|
|
801
|
+
{{ person.longName }}
|
|
802
|
+
</v-list-item-title>
|
|
803
|
+
<v-list-item-subtitle :class="[$styles.textSimple]">
|
|
804
|
+
{{ reformatDate(person.birthDate) }} - {{ person.genderName }} - Рег: {{ reformatDate(person.registrationDate) }}
|
|
805
|
+
</v-list-item-subtitle>
|
|
806
|
+
</v-list-item>
|
|
807
|
+
</v-list>
|
|
808
|
+
<base-list-empty class="w-full" v-else @click="fioChooseDialog = false" />
|
|
809
|
+
</template>
|
|
810
|
+
</base-dialog>
|
|
786
811
|
</section>
|
|
787
812
|
<base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
|
|
788
813
|
</template>
|
|
@@ -790,7 +815,8 @@
|
|
|
790
815
|
<script lang="ts">
|
|
791
816
|
import { Value, DocumentItem, Member } from '../../composables/classes';
|
|
792
817
|
import { uuid } from 'vue-uuid';
|
|
793
|
-
import { StoreMembers,
|
|
818
|
+
import { StoreMembers, CoreEnums } from '../../types/enum';
|
|
819
|
+
import type { Api, ContragentType, Dicts, ESBDValidationType, FileActions, MultipleMember } from '../../types';
|
|
794
820
|
|
|
795
821
|
export default {
|
|
796
822
|
setup() {
|
|
@@ -817,9 +843,11 @@ export default {
|
|
|
817
843
|
const isPositionPanelOpen = ref<boolean>(false);
|
|
818
844
|
const isPanelLoading = ref<boolean>(false);
|
|
819
845
|
const isChangingMember = ref<boolean>(false);
|
|
846
|
+
const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency.ids === '500011.2');
|
|
820
847
|
const familyDialog = ref<boolean>(false);
|
|
821
848
|
const deletionDialog = ref<boolean>(false);
|
|
822
849
|
const documentChooseDialog = ref<boolean>(false);
|
|
850
|
+
const fioChooseDialog = ref<boolean>(false);
|
|
823
851
|
const selectedIndex = ref<number>(0);
|
|
824
852
|
const sameAddress = ref<boolean>(false);
|
|
825
853
|
const panelValue = ref<Value>(new Value());
|
|
@@ -830,6 +858,9 @@ export default {
|
|
|
830
858
|
const fileData = ref<{ file: any }>();
|
|
831
859
|
const imageDataList = ref<string[]>([]);
|
|
832
860
|
const isRelative = ref<boolean>(false);
|
|
861
|
+
const additionalDocuments = ref<any[]>([]);
|
|
862
|
+
const requiredDocuments = ref<string[]>(['10']);
|
|
863
|
+
const contragents = ref<ContragentType[]>([]);
|
|
833
864
|
|
|
834
865
|
const currentPanelDeep = ref<string>();
|
|
835
866
|
const currentPanelSubDeep = ref<string>();
|
|
@@ -972,7 +1003,7 @@ export default {
|
|
|
972
1003
|
(whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin) ||
|
|
973
1004
|
(dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
|
|
974
1005
|
);
|
|
975
|
-
const hasWorkPositionDict =
|
|
1006
|
+
const hasWorkPositionDict = dataStore.isBaiterek && dataStore.isEfoParent;
|
|
976
1007
|
|
|
977
1008
|
const birthDateRule = computed(() => {
|
|
978
1009
|
const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
|
|
@@ -1051,7 +1082,7 @@ export default {
|
|
|
1051
1082
|
case formStore.policyholderFormKey:
|
|
1052
1083
|
return route.params.taskId === '0';
|
|
1053
1084
|
case formStore.insuredFormKey:
|
|
1054
|
-
if (dataStore.isPension) return route.params.taskId === '0';
|
|
1085
|
+
if (dataStore.isPension && formStore.applicationData.processCode === 19) return route.params.taskId === '0';
|
|
1055
1086
|
return route.query.id === '0';
|
|
1056
1087
|
case formStore.policyholdersRepresentativeFormKey:
|
|
1057
1088
|
case formStore.beneficiaryFormKey:
|
|
@@ -1084,6 +1115,10 @@ export default {
|
|
|
1084
1115
|
};
|
|
1085
1116
|
|
|
1086
1117
|
const searchPositions = async () => {
|
|
1118
|
+
if (searchQuery.value.length < 4) {
|
|
1119
|
+
dataStore.showToaster('error', dataStore.t('rules.searchQueryLen', { len: 4 }));
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1087
1122
|
if (!isDisabled.value) {
|
|
1088
1123
|
isPanelLoading.value = true;
|
|
1089
1124
|
positionsList.value = await dataStore.getWorkPosition(searchQuery.value);
|
|
@@ -1122,6 +1157,7 @@ export default {
|
|
|
1122
1157
|
isPositionPanelOpen.value = false;
|
|
1123
1158
|
}
|
|
1124
1159
|
if (type === 'workPosition') {
|
|
1160
|
+
dataStore.rightPanel.title = dataStore.t('form.jobPosition');
|
|
1125
1161
|
isPositionPanelOpen.value = true;
|
|
1126
1162
|
isOtpPanelOpen.value = false;
|
|
1127
1163
|
isDocumentOpen.value = false;
|
|
@@ -1251,12 +1287,49 @@ export default {
|
|
|
1251
1287
|
}
|
|
1252
1288
|
};
|
|
1253
1289
|
|
|
1254
|
-
const
|
|
1290
|
+
const uploadAdditionalFiles = async (processInstanceId: string | number) => {
|
|
1291
|
+
const formData = new FormData();
|
|
1292
|
+
const information: any = [];
|
|
1293
|
+
const uuidV4 = uuid.v4();
|
|
1294
|
+
if (additionalDocuments.value) {
|
|
1295
|
+
Object.values(additionalDocuments.value).map((value: any) => {
|
|
1296
|
+
formData.append('file', value);
|
|
1297
|
+
const ext = value.name.substring(value.name.lastIndexOf('.'));
|
|
1298
|
+
const selectedDocument = dataStore.dicFileTypeList.find((i: Value) => i.code === value.code);
|
|
1299
|
+
information.push({
|
|
1300
|
+
identifier: `${uuidV4}${ext}`,
|
|
1301
|
+
iin: member.value.iin ? member.value.iin.replaceAll('-', '') : null,
|
|
1302
|
+
processInstanceId: processInstanceId,
|
|
1303
|
+
fileTypeCode: selectedDocument ? selectedDocument.code : null,
|
|
1304
|
+
fileTypeId: selectedDocument ? selectedDocument.id : null,
|
|
1305
|
+
fileName: value.name,
|
|
1306
|
+
});
|
|
1307
|
+
});
|
|
1308
|
+
formData.append('fileData', JSON.stringify(information));
|
|
1309
|
+
await dataStore.uploadFiles(formData, false);
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
const attachFile = (event: InputEvent) => {
|
|
1255
1314
|
if (event.target) {
|
|
1256
|
-
fileData.value =
|
|
1315
|
+
fileData.value = { file: (event.target as HTMLInputElement).files };
|
|
1257
1316
|
} else {
|
|
1258
1317
|
if (event.dataTransfer) {
|
|
1259
|
-
fileData.value =
|
|
1318
|
+
fileData.value = { file: (event.dataTransfer as DataTransfer).files };
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1323
|
+
const attachAdditionalFile = (event: InputEvent, code: string) => {
|
|
1324
|
+
if (event.target) {
|
|
1325
|
+
const files = (event.target as HTMLInputElement).files;
|
|
1326
|
+
if (files && files.length && files[0]) {
|
|
1327
|
+
if (files[0].type !== 'application/pdf') {
|
|
1328
|
+
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
1329
|
+
}
|
|
1330
|
+
const file = Object.assign(files[0]);
|
|
1331
|
+
file.code = code;
|
|
1332
|
+
additionalDocuments.value.push(file);
|
|
1260
1333
|
}
|
|
1261
1334
|
}
|
|
1262
1335
|
};
|
|
@@ -1325,7 +1398,7 @@ export default {
|
|
|
1325
1398
|
if (parsedDocument.middleName) member.value.middleName = parsedDocument.middleName;
|
|
1326
1399
|
if (parsedDocument.fullName) member.value.longName = parsedDocument.fullName;
|
|
1327
1400
|
if (parsedDocument.documentName && parsedDocument.documentName.startsWith('Kazakhstan - Id Card')) {
|
|
1328
|
-
const documentType = dataStore.documentTypes.find((i: Value) => i.ids ===
|
|
1401
|
+
const documentType = dataStore.documentTypes.find((i: Value) => i.ids === CoreEnums.Insis.DocTypes['1UDL']);
|
|
1329
1402
|
if (documentType) member.value.documentType = documentType;
|
|
1330
1403
|
}
|
|
1331
1404
|
if (!!parsedDocument.documentIssuer) {
|
|
@@ -1429,7 +1502,9 @@ export default {
|
|
|
1429
1502
|
|
|
1430
1503
|
const selectGbdDocument = (document: Api.GBD.Document) => {
|
|
1431
1504
|
if (document) {
|
|
1432
|
-
const documentType = dataStore.documentTypes.find(
|
|
1505
|
+
const documentType = dataStore.documentTypes.find(
|
|
1506
|
+
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(document.type.code)],
|
|
1507
|
+
);
|
|
1433
1508
|
if (documentType) member.value.documentType = documentType;
|
|
1434
1509
|
const documentNumber = document.number;
|
|
1435
1510
|
if (documentNumber) member.value.documentNumber = documentNumber;
|
|
@@ -1446,21 +1521,45 @@ export default {
|
|
|
1446
1521
|
isSearchOpen.value = false;
|
|
1447
1522
|
};
|
|
1448
1523
|
|
|
1524
|
+
const getContragentClick = async (contragent: ContragentType) => {
|
|
1525
|
+
await dataStore.serializeContragentData(member.value, contragent);
|
|
1526
|
+
fioChooseDialog.value = false;
|
|
1527
|
+
isButtonLoading.value = false;
|
|
1528
|
+
dataStore.rightPanel.open = false;
|
|
1529
|
+
isSearchOpen.value = false;
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1449
1532
|
const getContragent = async () => {
|
|
1450
|
-
if (
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1533
|
+
if (isNonResident.value) {
|
|
1534
|
+
if (!member.value.lastName || !member.value.firstName) {
|
|
1535
|
+
dataStore.showToaster('error', 'Заполните поля Имя и Фамилия', 3000);
|
|
1536
|
+
dataStore.rightPanel.open = false;
|
|
1537
|
+
isSearchOpen.value = false;
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
} else {
|
|
1541
|
+
if (member.value.hasAgreement !== true) {
|
|
1542
|
+
dataStore.showToaster('error', dataStore.t('toaster.needAgreement'), 3000);
|
|
1543
|
+
dataStore.rightPanel.open = false;
|
|
1544
|
+
isSearchOpen.value = false;
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
if (!member.value.iin || member.value.iin.length !== useMask().iin.length) {
|
|
1548
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: 'ИИН' }), 5000);
|
|
1549
|
+
dataStore.rightPanel.open = false;
|
|
1550
|
+
isSearchOpen.value = false;
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1461
1553
|
}
|
|
1462
1554
|
isButtonLoading.value = true;
|
|
1463
|
-
|
|
1555
|
+
if (isNonResident.value) {
|
|
1556
|
+
const response = await dataStore.getContragent(member.value, false);
|
|
1557
|
+
if (response) contragents.value = response.items;
|
|
1558
|
+
else dataStore.showToaster('error', 'Не найдено совпадений', 3000);
|
|
1559
|
+
fioChooseDialog.value = true;
|
|
1560
|
+
} else {
|
|
1561
|
+
await dataStore.getContragent(member.value, false);
|
|
1562
|
+
}
|
|
1464
1563
|
isButtonLoading.value = false;
|
|
1465
1564
|
dataStore.rightPanel.open = false;
|
|
1466
1565
|
isSearchOpen.value = false;
|
|
@@ -1523,6 +1622,26 @@ export default {
|
|
|
1523
1622
|
if (fileData.value && fileData.value.file) {
|
|
1524
1623
|
await uploadFile(formStore.applicationData.processInstanceId);
|
|
1525
1624
|
}
|
|
1625
|
+
if (additionalDocuments.value && additionalDocuments.value.length) {
|
|
1626
|
+
if (
|
|
1627
|
+
(!formStore.applicationData.isEnpfSum && formStore.applicationData?.pensionApp.transferContracts && formStore.applicationData?.pensionApp.transferContracts.length) ||
|
|
1628
|
+
(formStore.applicationData?.pensionApp.compulsoryProfMonthCount && formStore.applicationData?.pensionApp.compulsoryProfMonthCount >= 60)
|
|
1629
|
+
)
|
|
1630
|
+
requiredDocuments.value.push('8');
|
|
1631
|
+
if (isNonResident.value) requiredDocuments.value.push('1');
|
|
1632
|
+
if (requiredDocuments.value && requiredDocuments.value.length != 0) {
|
|
1633
|
+
const hasAllDocs = requiredDocuments.value.every(fileCode => {
|
|
1634
|
+
const result = additionalDocuments.value.map(i => i.code).indexOf(fileCode) !== -1;
|
|
1635
|
+
if (!result) {
|
|
1636
|
+
const missingFile = dataStore.dicFileTypeList.find((i: Value) => i.code === fileCode);
|
|
1637
|
+
dataStore.showToaster('error', `Необходимо вложить ${missingFile?.nameRu}`, 8000);
|
|
1638
|
+
}
|
|
1639
|
+
return result;
|
|
1640
|
+
});
|
|
1641
|
+
if (!hasAllDocs) return;
|
|
1642
|
+
}
|
|
1643
|
+
await uploadAdditionalFiles(formStore.applicationData.processInstanceId);
|
|
1644
|
+
}
|
|
1526
1645
|
}
|
|
1527
1646
|
const memberFromApplicaiton = memberStore.getMemberFromApplication(whichForm.value, whichIndex.value ? Number(whichIndex.value) : undefined);
|
|
1528
1647
|
if (typeof member.value.id !== 'number' || (typeof member.value.id === 'number' && member.value.id > 0 === false)) {
|
|
@@ -1556,12 +1675,6 @@ export default {
|
|
|
1556
1675
|
bankBin: member.value.bankInfo.bankName.ids,
|
|
1557
1676
|
bankId: member.value.bankInfo.bankName.id,
|
|
1558
1677
|
bankName: member.value.bankInfo.bankName.nameRu,
|
|
1559
|
-
guaranteedPeriod: 0,
|
|
1560
|
-
amount: 0,
|
|
1561
|
-
compulsoryContractAmount: 0,
|
|
1562
|
-
voluntaryContractAmount: 0,
|
|
1563
|
-
ownFundsRaisAmount: 0,
|
|
1564
|
-
compulsoryProfContractAmount: 0,
|
|
1565
1678
|
};
|
|
1566
1679
|
const data = {
|
|
1567
1680
|
...formStore.applicationData.pensionApp,
|
|
@@ -1608,6 +1721,7 @@ export default {
|
|
|
1608
1721
|
}
|
|
1609
1722
|
}
|
|
1610
1723
|
if (member.value.hasAgreement !== true) {
|
|
1724
|
+
if (isNonResident.value) return true;
|
|
1611
1725
|
dataStore.showToaster('error', dataStore.t('toaster.needAgreement'));
|
|
1612
1726
|
return false;
|
|
1613
1727
|
}
|
|
@@ -1623,7 +1737,10 @@ export default {
|
|
|
1623
1737
|
const docType = member.value.documentType.ids;
|
|
1624
1738
|
if (
|
|
1625
1739
|
member.value.gotFromInsis === true &&
|
|
1626
|
-
(docType ===
|
|
1740
|
+
(docType === CoreEnums.Insis.DocTypes['1UDL'] ||
|
|
1741
|
+
docType === CoreEnums.Insis.DocTypes.SBI ||
|
|
1742
|
+
docType === CoreEnums.Insis.DocTypes.PS ||
|
|
1743
|
+
docType === CoreEnums.Insis.DocTypes.VNZ)
|
|
1627
1744
|
) {
|
|
1628
1745
|
dataStore.isLoading = true;
|
|
1629
1746
|
const docTypeCodes = {
|
|
@@ -1665,6 +1782,23 @@ export default {
|
|
|
1665
1782
|
dataStore.isLoading = false;
|
|
1666
1783
|
dataStore.showToaster('error', errorMessage, 5000);
|
|
1667
1784
|
}
|
|
1785
|
+
} else if (isNonResident.value) {
|
|
1786
|
+
if (member.value.bankInfo.iik.length === useMask().iik.length) {
|
|
1787
|
+
const isValidIik = await dataStore.checkAccountNumber(member.value.bankInfo.iik);
|
|
1788
|
+
if (isValidIik === false) {
|
|
1789
|
+
dataStore.showToaster('error', dataStore.t('error.notValidIik'));
|
|
1790
|
+
member.value.bankInfo.iik = '';
|
|
1791
|
+
isSubmittingForm.value = false;
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
if (formStore.applicationData.pensionApp) {
|
|
1795
|
+
formStore.applicationData.pensionApp.account = member.value.bankInfo.iik;
|
|
1796
|
+
formStore.applicationData.pensionApp.bankBik = member.value.bankInfo.bik;
|
|
1797
|
+
formStore.applicationData.pensionApp.bankBin = member.value.bankInfo.bin;
|
|
1798
|
+
formStore.applicationData.pensionApp.bankId = member.value.bankInfo.bankName.id;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
const hasMemberSaved = await saveMember();
|
|
1668
1802
|
} else {
|
|
1669
1803
|
member.value.gotFromInsis = true;
|
|
1670
1804
|
const hasMemberSaved = await saveMember();
|
|
@@ -1807,6 +1941,13 @@ export default {
|
|
|
1807
1941
|
deletionDialog.value = false;
|
|
1808
1942
|
};
|
|
1809
1943
|
|
|
1944
|
+
const clearAdditionalFile = (code: string) => {
|
|
1945
|
+
const index = additionalDocuments.value.indexOf(additionalDocuments.value.find((i: any) => i.code == code));
|
|
1946
|
+
if (index > -1) {
|
|
1947
|
+
additionalDocuments.value.splice(index, 1);
|
|
1948
|
+
}
|
|
1949
|
+
};
|
|
1950
|
+
|
|
1810
1951
|
const onInit = async () => {
|
|
1811
1952
|
// if (route.params.taskId === '0' || (route.params.taskId !== '0' && dataStore.isProcessEditable(formStore.applicationData.statusCode))) {
|
|
1812
1953
|
// await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
@@ -1823,9 +1964,9 @@ export default {
|
|
|
1823
1964
|
if (dataStore.isLifetrip) {
|
|
1824
1965
|
const documentByPriority = (() => {
|
|
1825
1966
|
if (whichForm.value !== formStore.policyholderFormKey || formStore.isPolicyholderInsured === true) {
|
|
1826
|
-
return member.value.documentsList.find(i => i.type ===
|
|
1967
|
+
return member.value.documentsList.find(i => i.type === CoreEnums.Insis.DocTypes.PS);
|
|
1827
1968
|
}
|
|
1828
|
-
return member.value.documentsList.find(i => i.type ===
|
|
1969
|
+
return member.value.documentsList.find(i => i.type === CoreEnums.Insis.DocTypes['1UDL']);
|
|
1829
1970
|
})();
|
|
1830
1971
|
const userDocument = documentByPriority ? documentByPriority : member.value.documentsList[0];
|
|
1831
1972
|
const documentType = dataStore.documentTypes.find((i: Value) => i.ids === userDocument.type);
|
|
@@ -1932,13 +2073,14 @@ export default {
|
|
|
1932
2073
|
watch(
|
|
1933
2074
|
() => member.value.age,
|
|
1934
2075
|
val => {
|
|
1935
|
-
if (val
|
|
1936
|
-
if (member.value.hasAgreement !== true) {
|
|
2076
|
+
if (val) {
|
|
2077
|
+
if (Number(val) >= 18 && member.value.hasAgreement !== true) {
|
|
1937
2078
|
member.value.hasAgreement = false;
|
|
2079
|
+
} else {
|
|
2080
|
+
member.value.hasAgreement = true;
|
|
1938
2081
|
}
|
|
1939
|
-
} else {
|
|
1940
|
-
member.value.hasAgreement = true;
|
|
1941
2082
|
}
|
|
2083
|
+
|
|
1942
2084
|
member.value.isInsuredUnderage = Number(val) >= 18 ? false : true;
|
|
1943
2085
|
},
|
|
1944
2086
|
{ immediate: true },
|
|
@@ -1999,11 +2141,13 @@ export default {
|
|
|
1999
2141
|
familyDialog,
|
|
2000
2142
|
deletionDialog,
|
|
2001
2143
|
documentChooseDialog,
|
|
2144
|
+
fioChooseDialog,
|
|
2002
2145
|
selectedIndex,
|
|
2003
2146
|
selectedFamilyMember,
|
|
2004
2147
|
sameAddress,
|
|
2005
2148
|
isRelative,
|
|
2006
2149
|
imageDataList,
|
|
2150
|
+
contragents,
|
|
2007
2151
|
// Computed
|
|
2008
2152
|
whichForm,
|
|
2009
2153
|
whichIndex,
|
|
@@ -2029,6 +2173,7 @@ export default {
|
|
|
2029
2173
|
hasWorkPositionDict,
|
|
2030
2174
|
gbdDocuments,
|
|
2031
2175
|
hasGBDFLDocSelection,
|
|
2176
|
+
isNonResident,
|
|
2032
2177
|
|
|
2033
2178
|
// Rules
|
|
2034
2179
|
ageRule,
|
|
@@ -2048,6 +2193,7 @@ export default {
|
|
|
2048
2193
|
getContragentFromGBDFL,
|
|
2049
2194
|
getContragent,
|
|
2050
2195
|
attachFile,
|
|
2196
|
+
attachAdditionalFile,
|
|
2051
2197
|
attachDocumentReader,
|
|
2052
2198
|
getDocumentReader,
|
|
2053
2199
|
getFile,
|
|
@@ -2062,6 +2208,8 @@ export default {
|
|
|
2062
2208
|
searchPositions,
|
|
2063
2209
|
selectGbdDocument,
|
|
2064
2210
|
pickPosition,
|
|
2211
|
+
clearAdditionalFile,
|
|
2212
|
+
getContragentClick,
|
|
2065
2213
|
};
|
|
2066
2214
|
},
|
|
2067
2215
|
};
|