hl-core 0.0.9-beta.47 → 0.0.9-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/base.api.ts +20 -2
- package/components/Input/FormInput.vue +1 -1
- package/components/Pages/MemberForm.vue +96 -12
- package/components/Pages/ProductConditions.vue +26 -14
- package/components/Panel/PanelHandler.vue +35 -9
- package/components/Utilities/Qr.vue +44 -0
- package/composables/classes.ts +9 -2
- package/composables/constants.ts +1 -0
- package/composables/index.ts +117 -0
- package/locales/ru.json +9 -4
- package/package.json +4 -2
- package/store/data.store.ts +90 -51
- package/types/enum.ts +3 -2
package/api/base.api.ts
CHANGED
|
@@ -234,6 +234,13 @@ export class ApiClass {
|
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
async getProcessCoverTypePeriod(processCode: string | number, questionId: string) {
|
|
238
|
+
return await this.axiosCall<AddCoverAnswer[]>({
|
|
239
|
+
method: Methods.GET,
|
|
240
|
+
url: `/Arm/api/Dictionary/GetProcessCoverTypePeriod/${processCode}/${questionId}`,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
237
244
|
async getProcessPaymentPeriod(processCode: string | number) {
|
|
238
245
|
return await this.axiosCall({
|
|
239
246
|
method: Methods.GET,
|
|
@@ -712,11 +719,15 @@ export class ApiClass {
|
|
|
712
719
|
data: data,
|
|
713
720
|
});
|
|
714
721
|
}
|
|
715
|
-
async downloadTemplate(fileType: number) {
|
|
722
|
+
async downloadTemplate(fileType: number, processInstanceId?: string | number) {
|
|
716
723
|
return await this.axiosCall({
|
|
717
724
|
method: Methods.GET,
|
|
718
|
-
url: `/${this.productUrl}/api/Application/DownloadTemplate
|
|
725
|
+
url: `/${this.productUrl}/api/Application/DownloadTemplate`,
|
|
719
726
|
responseType: 'arraybuffer',
|
|
727
|
+
params: {
|
|
728
|
+
fileType,
|
|
729
|
+
processInstanceId: processInstanceId ?? null,
|
|
730
|
+
},
|
|
720
731
|
});
|
|
721
732
|
}
|
|
722
733
|
|
|
@@ -727,6 +738,13 @@ export class ApiClass {
|
|
|
727
738
|
});
|
|
728
739
|
}
|
|
729
740
|
|
|
741
|
+
async sendInvoiceToEmail(processInstanceId: string | number, email: string) {
|
|
742
|
+
return await this.axiosCall({
|
|
743
|
+
method: Methods.GET,
|
|
744
|
+
url: `/${this.productUrl}/api/Application/SendInvoiceToEmail?processInstanceId=${processInstanceId}&emailTo=${email}`,
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
730
748
|
async getCalculator(data: SetApplicationRequest) {
|
|
731
749
|
return await this.axiosCall<number>({
|
|
732
750
|
method: Methods.POST,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<v-icon
|
|
34
34
|
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') === false"
|
|
35
35
|
:icon="appendInnerIcon"
|
|
36
|
-
@click="appendInnerIcon.includes('mdi-magnify') ? $emit('append') : !props.readonly && $emit('append')"
|
|
36
|
+
@click="appendInnerIcon.includes('mdi-magnify') || appendInnerIcon.includes('mdi-credit-card-scan') ? $emit('append') : !props.readonly && $emit('append')"
|
|
37
37
|
/>
|
|
38
38
|
<base-datepicker
|
|
39
39
|
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
|
|
@@ -59,23 +59,23 @@
|
|
|
59
59
|
v-model="member.iin"
|
|
60
60
|
:label="$dataStore.t('form.iin')"
|
|
61
61
|
:maska="$maska.iin"
|
|
62
|
-
:readonly="!!isDisabled || !!isIinPhoneDisabled"
|
|
62
|
+
:readonly="!!isDisabled || !!isIinPhoneDisabled || !!member.parsedDocument?.iin"
|
|
63
63
|
:clearable="!isDisabled"
|
|
64
|
-
:append-inner-icon="hasMemberSearch ? 'mdi mdi-magnify' : ''"
|
|
64
|
+
:append-inner-icon="hasMemberSearch ? (hasDocumentReader ? 'mdi mdi-credit-card-scan-outline' : 'mdi mdi-magnify') : ''"
|
|
65
65
|
@append="searchMember"
|
|
66
66
|
@input="onIinInput"
|
|
67
67
|
:rules="$rules.required.concat($rules.iinRight)"
|
|
68
68
|
/>
|
|
69
69
|
<base-form-input
|
|
70
70
|
v-model.trim="member.lastName"
|
|
71
|
-
:readonly="isDisabled || isFromGBD"
|
|
71
|
+
:readonly="isDisabled || isFromGBD || !!member.parsedDocument?.lastName"
|
|
72
72
|
:clearable="!isDisabled"
|
|
73
73
|
:label="$dataStore.t('form.lastName')"
|
|
74
74
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
75
75
|
/>
|
|
76
76
|
<base-form-input
|
|
77
77
|
v-model.trim="member.firstName"
|
|
78
|
-
:readonly="isDisabled || isFromGBD"
|
|
78
|
+
:readonly="isDisabled || isFromGBD || !!member.parsedDocument?.firstName"
|
|
79
79
|
:clearable="!isDisabled"
|
|
80
80
|
:label="$dataStore.t('form.firstName')"
|
|
81
81
|
:rules="$rules.required.concat($rules.cyrillic)"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<base-form-input
|
|
84
84
|
v-if="hasMiddleName"
|
|
85
85
|
v-model.trim="member.middleName"
|
|
86
|
-
:readonly="isDisabled || isFromGBD"
|
|
86
|
+
:readonly="isDisabled || isFromGBD || !!member.parsedDocument?.middleName"
|
|
87
87
|
:clearable="!isDisabled"
|
|
88
88
|
:label="$dataStore.t('form.middleName')"
|
|
89
89
|
:rules="$rules.cyrillicNonRequired"
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
/>
|
|
109
109
|
<base-form-input
|
|
110
110
|
v-model="member.birthDate"
|
|
111
|
-
:readonly="isDisabled || isFromGBD"
|
|
111
|
+
:readonly="isDisabled || isFromGBD || !!member.parsedDocument?.birthDate"
|
|
112
112
|
:clearable="!isDisabled"
|
|
113
113
|
:label="$dataStore.t('form.birthDate')"
|
|
114
114
|
:rules="birthDateRule"
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
<base-form-input
|
|
387
387
|
v-model.trim="member.documentNumber"
|
|
388
388
|
:label="$dataStore.t('form.documentNumber')"
|
|
389
|
-
:readonly="isDisabled"
|
|
389
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentNumber"
|
|
390
390
|
:clearable="!isDisabled"
|
|
391
391
|
:rules="$rules.required"
|
|
392
392
|
/>
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
v-model="member.documentIssuers"
|
|
400
400
|
:value="member.documentIssuers?.nameRu"
|
|
401
401
|
:label="$dataStore.t('form.documentIssuers')"
|
|
402
|
-
:readonly="isDisabled"
|
|
402
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentIssuer"
|
|
403
403
|
:clearable="!isDisabled"
|
|
404
404
|
:rules="$rules.objectRequired"
|
|
405
405
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
<base-form-input
|
|
409
409
|
v-model="member.documentDate"
|
|
410
410
|
:label="$dataStore.t('form.documentDate')"
|
|
411
|
-
:readonly="isDisabled"
|
|
411
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentIssueDate"
|
|
412
412
|
:clearable="!isDisabled"
|
|
413
413
|
:rules="$rules.required.concat($rules.date)"
|
|
414
414
|
:maska="$maska.date"
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
v-if="member.documentType.ids !== 'SBI' && member.documentType.ids !== 'VNZ'"
|
|
420
420
|
v-model="member.documentExpire"
|
|
421
421
|
:label="$dataStore.t('form.documentExpire')"
|
|
422
|
-
:readonly="isDisabled"
|
|
422
|
+
:readonly="isDisabled || !!member.parsedDocument?.documentExpireDate"
|
|
423
423
|
:clearable="!isDisabled"
|
|
424
424
|
:rules="$rules.required.concat($rules.date)"
|
|
425
425
|
:maska="$maska.date"
|
|
@@ -538,6 +538,20 @@
|
|
|
538
538
|
<base-btn v-if="hasGBDFL" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGBDFL')" @click="getContragentFromGBDFL" />
|
|
539
539
|
<base-btn v-if="hasInsis" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromInsis')" @click="getContragent" />
|
|
540
540
|
<base-btn v-if="hasGKB" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGKB')" @click="getFamilyInfo" />
|
|
541
|
+
<base-form-section v-if="hasDocumentReader" class="!mt-0">
|
|
542
|
+
<base-file-input
|
|
543
|
+
:disabled="isDisabled"
|
|
544
|
+
:clearable="!isDisabled"
|
|
545
|
+
accept="image/*,.pdf"
|
|
546
|
+
append="mdi-credit-card-scan-outline"
|
|
547
|
+
:multiple="true"
|
|
548
|
+
@onClear="imageDataList = []"
|
|
549
|
+
@input="attachDocumentReader($event)"
|
|
550
|
+
/>
|
|
551
|
+
</base-form-section>
|
|
552
|
+
<base-animation>
|
|
553
|
+
<base-btn v-if="hasDocumentReader && imageDataList && !!imageDataList.length" :loading="isButtonLoading" text="Получить данные" @click="getDocumentReader" />
|
|
554
|
+
</base-animation>
|
|
541
555
|
</div>
|
|
542
556
|
</Teleport>
|
|
543
557
|
<Teleport v-if="isDocumentOpen" to="#right-panel-actions">
|
|
@@ -620,6 +634,7 @@ export default {
|
|
|
620
634
|
const currentPanel = ref<keyof typeof member.value>();
|
|
621
635
|
const searchQuery = ref<string>('');
|
|
622
636
|
const fileData = ref<{ file: any }>();
|
|
637
|
+
const imageDataList = ref<string[]>([]);
|
|
623
638
|
|
|
624
639
|
const memberSetting = computed(() => dataStore.members[memberStore.getMemberApplicationCode(whichForm.value)!]);
|
|
625
640
|
const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
|
|
@@ -696,7 +711,10 @@ export default {
|
|
|
696
711
|
};
|
|
697
712
|
return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
|
|
698
713
|
});
|
|
699
|
-
const
|
|
714
|
+
const hasDocumentReader = computed(() => {
|
|
715
|
+
return !!member.value.hasAgreement && !!isTask.value && (dataStore.isAULETTI || dataStore.isAulettiParent);
|
|
716
|
+
});
|
|
717
|
+
const hasMemberSearch = computed(() => showSaveButton.value && (hasGBDFL.value || hasGKB.value || hasInsis.value || hasDocumentReader.value));
|
|
700
718
|
const hasMiddleName = computed(() => {
|
|
701
719
|
if (dataStore.isLifetrip) {
|
|
702
720
|
return false;
|
|
@@ -834,7 +852,7 @@ export default {
|
|
|
834
852
|
const searchMember = async () => {
|
|
835
853
|
if (!isDisabled.value) {
|
|
836
854
|
dataStore.panelAction = null;
|
|
837
|
-
dataStore.rightPanel.title = 'Поиск контрагента';
|
|
855
|
+
dataStore.rightPanel.title = hasDocumentReader.value ? 'Получение данных со скана документа' : 'Поиск контрагента';
|
|
838
856
|
dataStore.rightPanel.open = true;
|
|
839
857
|
isSearchOpen.value = true;
|
|
840
858
|
isDocumentOpen.value = false;
|
|
@@ -959,6 +977,68 @@ export default {
|
|
|
959
977
|
}
|
|
960
978
|
};
|
|
961
979
|
|
|
980
|
+
const attachDocumentReader = async (event: InputEvent) => {
|
|
981
|
+
if (event.target) {
|
|
982
|
+
const target = event.target as HTMLInputElement;
|
|
983
|
+
if (target.files && !!target.files.length) {
|
|
984
|
+
imageDataList.value = [];
|
|
985
|
+
await Promise.allSettled(
|
|
986
|
+
Object.values(target.files).map(async f => {
|
|
987
|
+
const { execute: getBase64 } = useBase64(f);
|
|
988
|
+
imageDataList.value.push(await getBase64());
|
|
989
|
+
}),
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
} else {
|
|
993
|
+
if (event.dataTransfer) {
|
|
994
|
+
const dataTransfer = event.dataTransfer as DataTransfer;
|
|
995
|
+
if (!!dataTransfer.files && !!dataTransfer.files.length) {
|
|
996
|
+
imageDataList.value = [];
|
|
997
|
+
await Promise.allSettled(
|
|
998
|
+
Object.values(dataTransfer.files).map(async f => {
|
|
999
|
+
const { execute: getBase64 } = useBase64(f);
|
|
1000
|
+
imageDataList.value.push(await getBase64());
|
|
1001
|
+
}),
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
const getDocumentReader = async () => {
|
|
1009
|
+
if (imageDataList.value && !!imageDataList.value.length) {
|
|
1010
|
+
isButtonLoading.value = true;
|
|
1011
|
+
const parsedDocument = await callDocumentReader(imageDataList.value);
|
|
1012
|
+
if (typeof parsedDocument === 'object') {
|
|
1013
|
+
formatDateProperty(parsedDocument, 'front');
|
|
1014
|
+
member.value.parsedDocument = parsedDocument;
|
|
1015
|
+
if (parsedDocument.age) member.value.age = parsedDocument.age;
|
|
1016
|
+
if (parsedDocument.iin) member.value.iin = reformatIin(parsedDocument.iin);
|
|
1017
|
+
if (parsedDocument.birthDate) member.value.birthDate = parsedDocument.birthDate;
|
|
1018
|
+
if (parsedDocument.documentIssueDate) member.value.documentDate = parsedDocument.documentIssueDate;
|
|
1019
|
+
if (parsedDocument.documentExpireDate) member.value.documentExpire = parsedDocument.documentExpireDate;
|
|
1020
|
+
if (parsedDocument.documentNumber) member.value.documentNumber = parsedDocument.documentNumber;
|
|
1021
|
+
if (parsedDocument.lastName) member.value.lastName = parsedDocument.lastName;
|
|
1022
|
+
if (parsedDocument.firstName) member.value.firstName = parsedDocument.firstName;
|
|
1023
|
+
if (parsedDocument.middleName) member.value.middleName = parsedDocument.middleName;
|
|
1024
|
+
if (parsedDocument.fullName) member.value.longName = parsedDocument.fullName;
|
|
1025
|
+
if (!!parsedDocument.documentIssuer) {
|
|
1026
|
+
if (parsedDocument.documentIssuer === 'МИНИСТЕРСТВО ВНУТРЕННИХ ДЕЛ РК' || parsedDocument.documentIssuer === 'ҚР ІШКІ ІСТЕР МИНИСТРЛІГІ') {
|
|
1027
|
+
const documentIssuer = dataStore.documentIssuers.find(i => (i.nameRu as string).match(new RegExp('МВД РК', 'i')));
|
|
1028
|
+
if (documentIssuer) member.value.documentIssuers = documentIssuer;
|
|
1029
|
+
} else {
|
|
1030
|
+
const documentIssuer = dataStore.documentIssuers.find(i => (i.nameRu as string).match(new RegExp(`${parsedDocument.documentIssuer}`, 'i')));
|
|
1031
|
+
if (documentIssuer) member.value.documentIssuers = documentIssuer;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
dataStore.rightPanel.open = false;
|
|
1035
|
+
dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
|
|
1036
|
+
imageDataList.value = [];
|
|
1037
|
+
}
|
|
1038
|
+
isButtonLoading.value = false;
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
|
|
962
1042
|
const getFile = async (type: FileActions) => {
|
|
963
1043
|
if (memberDocument.value) {
|
|
964
1044
|
documentLoading.value = true;
|
|
@@ -1498,6 +1578,7 @@ export default {
|
|
|
1498
1578
|
selectedIndex,
|
|
1499
1579
|
selectedFamilyMember,
|
|
1500
1580
|
sameAddress,
|
|
1581
|
+
imageDataList,
|
|
1501
1582
|
|
|
1502
1583
|
// Computed
|
|
1503
1584
|
whichForm,
|
|
@@ -1513,6 +1594,7 @@ export default {
|
|
|
1513
1594
|
hasGBDFL,
|
|
1514
1595
|
hasInsis,
|
|
1515
1596
|
hasGKB,
|
|
1597
|
+
hasDocumentReader,
|
|
1516
1598
|
hasMiddleName,
|
|
1517
1599
|
hasRelationDegree,
|
|
1518
1600
|
hasFamilyStatus,
|
|
@@ -1539,6 +1621,8 @@ export default {
|
|
|
1539
1621
|
getContragentFromGBDFL,
|
|
1540
1622
|
getContragent,
|
|
1541
1623
|
attachFile,
|
|
1624
|
+
attachDocumentReader,
|
|
1625
|
+
getDocumentReader,
|
|
1542
1626
|
getFile,
|
|
1543
1627
|
selectFamilyMember,
|
|
1544
1628
|
closeFamilyDialog,
|
|
@@ -460,7 +460,10 @@
|
|
|
460
460
|
<base-form-input v-model="calculatorForm.price" :readonly="true" :label="isCalculator ? $dataStore.t('calculatorForm.premium') : $dataStore.t('calculatorForm.price')" />
|
|
461
461
|
</base-form-section>
|
|
462
462
|
<base-form-section v-if="hasDeathInsFromNS" :title="$dataStore.t('generalConditions')">
|
|
463
|
-
<base-form-input v-model="
|
|
463
|
+
<base-form-input v-model="enabled" :readonly="true" :clearable="false" :label="$dataStore.t('form.deathInsFromNS')" />
|
|
464
|
+
</base-form-section>
|
|
465
|
+
<base-form-section v-if="hasDeathInsAnyReason" :title="$dataStore.t('generalConditions')">
|
|
466
|
+
<base-form-input v-model="enabled" :readonly="true" :clearable="false" :label="$dataStore.t('form.deathInsAnyReason')" />
|
|
464
467
|
</base-form-section>
|
|
465
468
|
<base-form-section v-if="isShownAdditionalTerms && additionalTerms && additionalTerms.length" :title="$dataStore.t('productConditionsForm.additional')">
|
|
466
469
|
<div v-for="(term, index) of additionalTerms" :key="index">
|
|
@@ -589,14 +592,14 @@ export default defineComponent({
|
|
|
589
592
|
const termValue = ref<AddCover>();
|
|
590
593
|
const subTermValue = ref<string>('');
|
|
591
594
|
const panelList = ref<Value[]>([]);
|
|
592
|
-
const subPanelList = ref<Value[]>([]);
|
|
595
|
+
const subPanelList = ref<AddCoverAnswer[] | Value[]>([]);
|
|
593
596
|
const productConditionsForm = formStore.productConditionsForm;
|
|
594
597
|
const currentPanel = ref<keyof typeof productConditionsForm>();
|
|
595
598
|
const currentIndex = ref<number>();
|
|
596
599
|
const searchQuery = ref<string>('');
|
|
597
600
|
const whichSum = ref<'insurancePremiumPerMonth' | 'requestedSumInsured' | ''>('');
|
|
598
601
|
const panelCodeList = ['processcovertypesum', 'fixedinssum'];
|
|
599
|
-
const
|
|
602
|
+
const enabled = 'включено';
|
|
600
603
|
|
|
601
604
|
const additionalTerms = ref<AddCover[]>([]);
|
|
602
605
|
|
|
@@ -880,8 +883,14 @@ export default defineComponent({
|
|
|
880
883
|
}
|
|
881
884
|
return false;
|
|
882
885
|
});
|
|
886
|
+
const hasDeathInsAnyReason = computed(() => {
|
|
887
|
+
if (whichProduct.value === 'lifebusiness') {
|
|
888
|
+
return true;
|
|
889
|
+
}
|
|
890
|
+
return false;
|
|
891
|
+
});
|
|
883
892
|
const defaultText = computed(() => {
|
|
884
|
-
if (whichProduct.value === 'gns') {
|
|
893
|
+
if (whichProduct.value === 'gns' || whichProduct.value === 'lifebusiness') {
|
|
885
894
|
return dataStore.t('clients.form.calculation');
|
|
886
895
|
}
|
|
887
896
|
return dataStore.t('generalConditions');
|
|
@@ -985,9 +994,11 @@ export default defineComponent({
|
|
|
985
994
|
}
|
|
986
995
|
|
|
987
996
|
if (termValue.value && termValue.value.coverTypeCode === 6 && item.code === 'processcovertypesum') {
|
|
988
|
-
const response = await dataStore.
|
|
989
|
-
|
|
990
|
-
|
|
997
|
+
const response = await dataStore.getProcessCoverTypePeriod(termValue.value.coverTypeId);
|
|
998
|
+
if (response) {
|
|
999
|
+
subPanelList.value = response;
|
|
1000
|
+
subTermValue.value = termValue.value.coverPeriodCode as string;
|
|
1001
|
+
}
|
|
991
1002
|
}
|
|
992
1003
|
|
|
993
1004
|
if (termValue.value && termValue.value.coverTypeCode === 6 && item.code !== 'processcovertypesum') {
|
|
@@ -1074,11 +1085,11 @@ export default defineComponent({
|
|
|
1074
1085
|
};
|
|
1075
1086
|
|
|
1076
1087
|
const filterList = (list: Value[], key: string) => {
|
|
1077
|
-
if (whichProduct.value === 'baiterek') {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}
|
|
1088
|
+
// if (whichProduct.value === 'baiterek') {
|
|
1089
|
+
// if (dataStore.isManagerHalykBank()) {
|
|
1090
|
+
// if (key === 'paymentPeriod') return list.filter(i => i.code !== 'single');
|
|
1091
|
+
// }
|
|
1092
|
+
// }
|
|
1082
1093
|
return list;
|
|
1083
1094
|
};
|
|
1084
1095
|
|
|
@@ -1107,7 +1118,7 @@ export default defineComponent({
|
|
|
1107
1118
|
}
|
|
1108
1119
|
};
|
|
1109
1120
|
|
|
1110
|
-
const pickSubTermValue = (item:
|
|
1121
|
+
const pickSubTermValue = (item: any, subItem: any) => {
|
|
1111
1122
|
dataStore.rightPanel.open = false;
|
|
1112
1123
|
isTermsPanelOpen.value = false;
|
|
1113
1124
|
subTermValue.value = item.code as string;
|
|
@@ -1554,7 +1565,7 @@ export default defineComponent({
|
|
|
1554
1565
|
subPanelList,
|
|
1555
1566
|
subTermValue,
|
|
1556
1567
|
panelCodeList,
|
|
1557
|
-
|
|
1568
|
+
enabled,
|
|
1558
1569
|
|
|
1559
1570
|
// Computed
|
|
1560
1571
|
isTask,
|
|
@@ -1601,6 +1612,7 @@ export default defineComponent({
|
|
|
1601
1612
|
isDisabledFixInsSum,
|
|
1602
1613
|
defaultText,
|
|
1603
1614
|
hasDeathInsFromNS,
|
|
1615
|
+
hasDeathInsAnyReason,
|
|
1604
1616
|
|
|
1605
1617
|
// Rules
|
|
1606
1618
|
coverPeriodRule,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<base-form-section :title="''">
|
|
54
54
|
<base-loader v-if="isQrLoading" class="self-center m-5 opacity-70" />
|
|
55
55
|
<div v-if="qrUrl && !isQrLoading">
|
|
56
|
-
<
|
|
56
|
+
<base-qr :value="qrUrl" :size="200" class="ma-auto rounded" />
|
|
57
57
|
<span :class="[$styles.textSimple]" class="mt-3 text-center d-block">{{ $dataStore.t('sign.scanQrCode') }}</span>
|
|
58
58
|
</div>
|
|
59
59
|
<base-btn class="mt-10" :loading="loading" :text="$dataStore.t('sign.copyEgov')" @click="$dataStore.copyToClipboard(urlCopy)" />
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</div>
|
|
63
63
|
</section>
|
|
64
64
|
<section v-if="choosePayActions">
|
|
65
|
-
<div v-if="!isEpayPay" :class="[$styles.flexColNav]">
|
|
65
|
+
<div v-if="!isEpayPay && !isOfflinePay" :class="[$styles.flexColNav]">
|
|
66
66
|
<base-btn :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
|
|
67
67
|
<base-btn :text="$dataStore.t('buttons.payOffline')" :loading="loading" @click="handlePayAction('offline')" />
|
|
68
68
|
</div>
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
<section class="flex flex-col gap-4 py-3" :class="$styles.textSimple">
|
|
81
81
|
<base-btn :loading="loading" :text="$dataStore.t('sign.copyCloud')" @click="$dataStore.copyToClipboard(signUrl.uri)" />
|
|
82
82
|
<base-btn :loading="loading" :btn="$styles.blueLightBtn" :text="$dataStore.t('sign.recipientNumber')" @click="openSmsPanel(signUrl)" />
|
|
83
|
+
<base-btn :loading="loading" :text="$dataStore.t('sign.convertQr')" @click="convertQr(signUrl.uri)" />
|
|
83
84
|
</section>
|
|
84
85
|
</v-expansion-panel-text>
|
|
85
86
|
</v-expansion-panel>
|
|
@@ -110,6 +111,7 @@
|
|
|
110
111
|
<div v-if="!isSendNumberOpen" :class="[$styles.flexColNav]">
|
|
111
112
|
<base-btn :loading="loading" :text="$dataStore.t('payment.copyUrl')" @click="$dataStore.copyToClipboard(formStore.epayLink)" />
|
|
112
113
|
<base-btn :loading="loading" :btn="$styles.blueLightBtn" :text="$dataStore.t('payment.recipientNumber')" @click="openEpayPanel" />
|
|
114
|
+
<base-btn :loading="loading" :text="$dataStore.t('sign.convertQr')" @click="convertQr(formStore.epayLink)" />
|
|
113
115
|
</div>
|
|
114
116
|
<div v-if="isSendNumberOpen" :class="[$styles.flexColNav]">
|
|
115
117
|
<i
|
|
@@ -154,6 +156,13 @@
|
|
|
154
156
|
<base-btn :text="buttonText" :loading="loading" @click="submitForm" />
|
|
155
157
|
</div>
|
|
156
158
|
</section>
|
|
159
|
+
<v-dialog v-model="isQrDialog" width="auto">
|
|
160
|
+
<v-card>
|
|
161
|
+
<v-card-text class="!p-4">
|
|
162
|
+
<base-qr :value="qrUrl" class="rounded" :size="300" />
|
|
163
|
+
</v-card-text>
|
|
164
|
+
</v-card>
|
|
165
|
+
</v-dialog>
|
|
157
166
|
</template>
|
|
158
167
|
|
|
159
168
|
<script lang="ts">
|
|
@@ -178,6 +187,8 @@ export default defineComponent({
|
|
|
178
187
|
const isQrLoading = ref<boolean>(false);
|
|
179
188
|
const urlCopy = ref<string>('');
|
|
180
189
|
const isEpayPay = ref<boolean>(false);
|
|
190
|
+
const isOfflinePay = ref<boolean>(false);
|
|
191
|
+
const isQrDialog = ref<boolean>(false);
|
|
181
192
|
|
|
182
193
|
const vForm = ref<any>();
|
|
183
194
|
const isSendNumberOpen = ref<boolean>(false);
|
|
@@ -282,7 +293,7 @@ export default defineComponent({
|
|
|
282
293
|
}
|
|
283
294
|
closePanel();
|
|
284
295
|
dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
|
|
285
|
-
await dataStore.handleTask(constants.actions.
|
|
296
|
+
await dataStore.handleTask(constants.actions.signed, route.params.taskId as string, 'scans');
|
|
286
297
|
};
|
|
287
298
|
const submitForm = async () => {
|
|
288
299
|
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
@@ -322,7 +333,7 @@ export default defineComponent({
|
|
|
322
333
|
// loading.value = false;
|
|
323
334
|
// return;
|
|
324
335
|
// }
|
|
325
|
-
if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas) {
|
|
336
|
+
if (dataStore.isAML || dataStore.isCheckContract || dataStore.isCheckContragent || dataStore.isDas || dataStore.isUU) {
|
|
326
337
|
emit('task', [dataStore.panelAction, route.params.taskId as string, actionCause.value]);
|
|
327
338
|
} else {
|
|
328
339
|
await dataStore.handleTask(dataStore.panelAction, route.params.taskId as string, actionCause.value);
|
|
@@ -403,7 +414,7 @@ export default defineComponent({
|
|
|
403
414
|
const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
|
|
404
415
|
const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
|
|
405
416
|
const hasConditionsInfo = computed(() => {
|
|
406
|
-
if (dataStore.isLifetrip || dataStore.isDas) {
|
|
417
|
+
if (dataStore.isLifetrip || dataStore.isDas || dataStore.isUU) {
|
|
407
418
|
return false;
|
|
408
419
|
}
|
|
409
420
|
if (dataStore.isFinCenter()) {
|
|
@@ -436,7 +447,7 @@ export default defineComponent({
|
|
|
436
447
|
return true;
|
|
437
448
|
});
|
|
438
449
|
const downloadTemplate = async (documentType: number, fileType: string) => {
|
|
439
|
-
await dataStore.downloadTemplate(documentType, fileType);
|
|
450
|
+
await dataStore.downloadTemplate(documentType, fileType, formStore.applicationData.processInstanceId);
|
|
440
451
|
};
|
|
441
452
|
|
|
442
453
|
const handleSignAction = async (type: 'paper' | 'electronic' | 'scans' | 'qr') => {
|
|
@@ -468,14 +479,17 @@ export default defineComponent({
|
|
|
468
479
|
if (type === 'epay') {
|
|
469
480
|
await payEpay();
|
|
470
481
|
}
|
|
482
|
+
if (type === 'offline') {
|
|
483
|
+
await dataStore.handleTask(constants.actions.payed, route.params.taskId as string, 'offline');
|
|
484
|
+
isOfflinePay.value = true;
|
|
485
|
+
}
|
|
486
|
+
loading.value = false;
|
|
471
487
|
};
|
|
472
488
|
|
|
473
|
-
// TODO Рефактор QR c npm
|
|
474
489
|
const generateQR = async (groupId: string) => {
|
|
475
490
|
const uuidV4 = uuid.v4();
|
|
476
491
|
const qrValue = `${getStrValuePerEnv('qrGenUrl')}/${uuidV4}/${groupId}`;
|
|
477
|
-
qrUrl.value =
|
|
478
|
-
|
|
492
|
+
qrUrl.value = qrValue;
|
|
479
493
|
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
480
494
|
//для юр лиц
|
|
481
495
|
urlCopy.value = `https://egovbusiness.page.link/?link=${qrValue}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
@@ -530,6 +544,15 @@ export default defineComponent({
|
|
|
530
544
|
await dataStore.generateDocument();
|
|
531
545
|
};
|
|
532
546
|
|
|
547
|
+
const convertQr = (url: string | null) => {
|
|
548
|
+
if (url) {
|
|
549
|
+
qrUrl.value = url;
|
|
550
|
+
isQrDialog.value = true;
|
|
551
|
+
} else {
|
|
552
|
+
dataStore.showToaster('error', dataStore.t('toaster.noUrl'));
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
|
|
533
556
|
const payEpay = async () => {
|
|
534
557
|
const invoiceData = await dataStore.getInvoiceData(formStore.applicationData.processInstanceId);
|
|
535
558
|
if (invoiceData === false || invoiceData.status === 3 || invoiceData.status === 0) {
|
|
@@ -579,6 +602,8 @@ export default defineComponent({
|
|
|
579
602
|
isQrLoading,
|
|
580
603
|
urlCopy,
|
|
581
604
|
isEpayPay,
|
|
605
|
+
isOfflinePay,
|
|
606
|
+
isQrDialog,
|
|
582
607
|
|
|
583
608
|
// Functions
|
|
584
609
|
closePanel,
|
|
@@ -594,6 +619,7 @@ export default defineComponent({
|
|
|
594
619
|
closeQrPanel,
|
|
595
620
|
handlePayAction,
|
|
596
621
|
payEpay,
|
|
622
|
+
convertQr,
|
|
597
623
|
|
|
598
624
|
// Computed
|
|
599
625
|
buttonText,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<qrcode-vue v-if="!!value" :value="value" :size="size" :level="level" :margin="margin" :render-as="renderAs" :background="background" :foreground="foreground" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import QrcodeVue from 'qrcode.vue';
|
|
7
|
+
|
|
8
|
+
export default defineComponent({
|
|
9
|
+
components: {
|
|
10
|
+
QrcodeVue,
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
value: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 250,
|
|
21
|
+
},
|
|
22
|
+
renderAs: {
|
|
23
|
+
type: String as PropType<'canvas' | 'svg'>,
|
|
24
|
+
default: 'canvas',
|
|
25
|
+
},
|
|
26
|
+
margin: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 0,
|
|
29
|
+
},
|
|
30
|
+
level: {
|
|
31
|
+
type: String as PropType<'L' | 'M' | 'Q' | 'H'>,
|
|
32
|
+
default: 'M',
|
|
33
|
+
},
|
|
34
|
+
background: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: '#ffffff',
|
|
37
|
+
},
|
|
38
|
+
foreground: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '#000000',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
</script>
|
package/composables/classes.ts
CHANGED
|
@@ -447,6 +447,7 @@ export class Member extends Person {
|
|
|
447
447
|
_emailPattern: RegExp;
|
|
448
448
|
gotFromInsis: boolean | null;
|
|
449
449
|
gosPersonData: any;
|
|
450
|
+
parsedDocument: any;
|
|
450
451
|
hasAgreement: boolean | null;
|
|
451
452
|
otpTokenId: string | null;
|
|
452
453
|
otpCode: string | null;
|
|
@@ -582,6 +583,7 @@ export class Member extends Person {
|
|
|
582
583
|
this._emailPattern = /.+@.+\..+/;
|
|
583
584
|
this.gotFromInsis = true;
|
|
584
585
|
this.gosPersonData = null;
|
|
586
|
+
this.parsedDocument = null;
|
|
585
587
|
this.hasAgreement = null;
|
|
586
588
|
}
|
|
587
589
|
|
|
@@ -625,6 +627,7 @@ export class Member extends Person {
|
|
|
625
627
|
this.percentageOfPayoutAmount = null;
|
|
626
628
|
this.gotFromInsis = true;
|
|
627
629
|
this.gosPersonData = null;
|
|
630
|
+
this.parsedDocument = null;
|
|
628
631
|
this.hasAgreement = null;
|
|
629
632
|
this.insurancePay = new Value();
|
|
630
633
|
this.migrationCard = null;
|
|
@@ -1513,7 +1516,8 @@ export class BaseGroupClass {
|
|
|
1513
1516
|
documentNumber: string;
|
|
1514
1517
|
series: string;
|
|
1515
1518
|
issuedBy: Value;
|
|
1516
|
-
|
|
1519
|
+
issuedOn: string;
|
|
1520
|
+
validUntil: string;
|
|
1517
1521
|
};
|
|
1518
1522
|
bankInfo: BankInfoClass;
|
|
1519
1523
|
kbe: string;
|
|
@@ -1541,6 +1545,7 @@ export class BaseGroupClass {
|
|
|
1541
1545
|
documentNumber: '',
|
|
1542
1546
|
series: '',
|
|
1543
1547
|
issuedBy: new Value(),
|
|
1548
|
+
issuedOn: '',
|
|
1544
1549
|
validUntil: '',
|
|
1545
1550
|
};
|
|
1546
1551
|
this.bankInfo = new BankInfoClass();
|
|
@@ -1552,7 +1557,8 @@ export class PhysGroupClass extends BaseGroupClass {
|
|
|
1552
1557
|
lastName: string;
|
|
1553
1558
|
firstName: string;
|
|
1554
1559
|
middleName: string;
|
|
1555
|
-
birthDate: string
|
|
1560
|
+
birthDate: string;
|
|
1561
|
+
gender: Value;
|
|
1556
1562
|
placeOfBirth: Value;
|
|
1557
1563
|
workDetails: { workplace: string; position: string; jobDuties: string };
|
|
1558
1564
|
hasContactPerson: boolean;
|
|
@@ -1562,6 +1568,7 @@ export class PhysGroupClass extends BaseGroupClass {
|
|
|
1562
1568
|
this.firstName = '';
|
|
1563
1569
|
this.middleName = '';
|
|
1564
1570
|
this.birthDate = '';
|
|
1571
|
+
this.gender = new Value();
|
|
1565
1572
|
this.placeOfBirth = new Value();
|
|
1566
1573
|
this.workDetails = { workplace: '', position: '', jobDuties: '' };
|
|
1567
1574
|
this.hasContactPerson = false;
|
package/composables/constants.ts
CHANGED
package/composables/index.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { useDisplay } from 'vuetify';
|
|
|
2
2
|
import jwt_decode from 'jwt-decode';
|
|
3
3
|
import { XMLParser } from 'fast-xml-parser';
|
|
4
4
|
import { AxiosError } from 'axios';
|
|
5
|
+
import { DocumentReaderApi, Scenario, TextFieldType } from '@regulaforensics/document-reader-webclient';
|
|
6
|
+
import { PolicyholderClass } from '../composables/classes';
|
|
5
7
|
|
|
6
8
|
export const getBaseCredentials = () => {
|
|
7
9
|
return {
|
|
@@ -202,6 +204,48 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
|
|
|
202
204
|
return false;
|
|
203
205
|
};
|
|
204
206
|
|
|
207
|
+
export const policyholderToBeneficialOwner = (isPolicyholderBeneficialOwner: boolean, policyholder?: PolicyholderClass) => {
|
|
208
|
+
const formStore = useFormStore();
|
|
209
|
+
const dataStore = useDataStore();
|
|
210
|
+
const beneficialOwner = formStore.lfb.beneficialOwners[0].beneficialOwnerData;
|
|
211
|
+
if (isPolicyholderBeneficialOwner && policyholder) {
|
|
212
|
+
beneficialOwner.iin = policyholder.clientData.authoritedPerson.iin;
|
|
213
|
+
beneficialOwner.firstName = policyholder.clientData.authoritedPerson.firstName;
|
|
214
|
+
beneficialOwner.middleName = policyholder.clientData.authoritedPerson.middleName;
|
|
215
|
+
beneficialOwner.lastName = policyholder.clientData.authoritedPerson.lastName;
|
|
216
|
+
beneficialOwner.citizenship = policyholder.clientData.authoritedPerson.citizenship;
|
|
217
|
+
beneficialOwner.birthDate = policyholder.clientData.authoritedPerson.birthDate;
|
|
218
|
+
beneficialOwner.gender = policyholder.clientData.authoritedPerson.gender;
|
|
219
|
+
beneficialOwner.resident = policyholder.clientData.resident;
|
|
220
|
+
beneficialOwner.taxResidentCountry = policyholder.clientData.taxResidentCountry;
|
|
221
|
+
beneficialOwner.economySectorCode = policyholder.clientData.economySectorCode;
|
|
222
|
+
beneficialOwner.identityDocument.issuedOn = policyholder.clientData.authoritedPerson.identityDocument.issuedOn;
|
|
223
|
+
beneficialOwner.identityDocument.documentNumber = policyholder.clientData.authoritedPerson.identityDocument.documentNumber;
|
|
224
|
+
beneficialOwner.identityDocument.documentType = policyholder.clientData.authoritedPerson.identityDocument.documentType;
|
|
225
|
+
beneficialOwner.identityDocument.issuedBy = policyholder.clientData.authoritedPerson.identityDocument.issuedBy;
|
|
226
|
+
beneficialOwner.identityDocument.validUntil = policyholder.clientData.authoritedPerson.identityDocument.validUntil;
|
|
227
|
+
beneficialOwner.identityDocument.series = policyholder.clientData.authoritedPerson.identityDocument.series;
|
|
228
|
+
dataStore.showToaster('warning', dataStore.t('toaster.formFieldEmptyWarning'));
|
|
229
|
+
} else {
|
|
230
|
+
beneficialOwner.iin = '';
|
|
231
|
+
beneficialOwner.firstName = '';
|
|
232
|
+
beneficialOwner.middleName = '';
|
|
233
|
+
beneficialOwner.lastName = '';
|
|
234
|
+
beneficialOwner.citizenship = new Value();
|
|
235
|
+
beneficialOwner.birthDate = '';
|
|
236
|
+
beneficialOwner.gender = new Value();
|
|
237
|
+
beneficialOwner.resident = new Value();
|
|
238
|
+
beneficialOwner.taxResidentCountry = new Value();
|
|
239
|
+
beneficialOwner.economySectorCode = new Value();
|
|
240
|
+
beneficialOwner.identityDocument.issuedOn = '';
|
|
241
|
+
beneficialOwner.identityDocument.documentNumber = '';
|
|
242
|
+
beneficialOwner.identityDocument.documentType = new Value();
|
|
243
|
+
beneficialOwner.identityDocument.issuedBy = new Value();
|
|
244
|
+
beneficialOwner.identityDocument.validUntil = '';
|
|
245
|
+
beneficialOwner.identityDocument.series = '';
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
|
|
205
249
|
export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean) => {
|
|
206
250
|
const formStore = useFormStore();
|
|
207
251
|
const dataStore = useDataStore();
|
|
@@ -339,3 +383,76 @@ export const keyDeleter = <T extends object>(data: T, keys: Array<NestedKeyOf<T>
|
|
|
339
383
|
});
|
|
340
384
|
}
|
|
341
385
|
};
|
|
386
|
+
|
|
387
|
+
export const formatDateProperty = (item: any, to: 'front' | 'back', additionalKeys?: string[]) => {
|
|
388
|
+
try {
|
|
389
|
+
if (item) {
|
|
390
|
+
Object.keys(item).forEach((key: string) => {
|
|
391
|
+
if (item[key] === Object(item[key])) {
|
|
392
|
+
formatDateProperty(item[key], to);
|
|
393
|
+
} else {
|
|
394
|
+
if (Array.isArray(additionalKeys)) {
|
|
395
|
+
additionalKeys.forEach(k => {
|
|
396
|
+
if (String(key).includes(k) && typeof item[key] === 'string' && !!item[key]) {
|
|
397
|
+
item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
if ((String(key).includes('date') || String(key).includes('Date')) && typeof item[key] === 'string' && !!item[key]) {
|
|
402
|
+
item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
} catch (err) {
|
|
408
|
+
console.log(err);
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export const callDocumentReader = async (imageBase64: string | string[]) => {
|
|
413
|
+
if (!imageBase64) return false;
|
|
414
|
+
const dataStore = useDataStore();
|
|
415
|
+
try {
|
|
416
|
+
const api = new DocumentReaderApi({ basePath: 'http://10.176.49.47:8080' });
|
|
417
|
+
const result = await api.process({
|
|
418
|
+
images: Array.isArray(imageBase64) ? imageBase64 : [imageBase64],
|
|
419
|
+
processParam: { scenario: Scenario.FULL_PROCESS, doublePageSpread: true, measureSystem: 0 },
|
|
420
|
+
});
|
|
421
|
+
if (result.text) {
|
|
422
|
+
const iin = result.text.getField(TextFieldType.PERSONAL_NUMBER);
|
|
423
|
+
const lastName = result.text.getField(TextFieldType.SURNAME);
|
|
424
|
+
const firstName = result.text.getField(TextFieldType.GIVEN_NAMES_RUS) ?? result.text.getField(TextFieldType.GIVEN_NAMES);
|
|
425
|
+
const middleName = result.text.getField(TextFieldType.FATHERS_NAME_RUS) ?? result.text.getField(TextFieldType.FATHERS_NAME);
|
|
426
|
+
const fullName = result.text.getField(TextFieldType.SURNAME_AND_GIVEN_NAMES);
|
|
427
|
+
const birthDate = result.text.getField(TextFieldType.DATE_OF_BIRTH);
|
|
428
|
+
const age = result.text.getField(TextFieldType.AGE);
|
|
429
|
+
const documentNumber = result.text.getField(TextFieldType.DOCUMENT_NUMBER);
|
|
430
|
+
const documentIssuer = result.text.getField(TextFieldType.AUTHORITY_RUS) ?? result.text.getField(TextFieldType.AUTHORITY);
|
|
431
|
+
const documentIssueDate = result.text.getField(TextFieldType.DATE_OF_ISSUE);
|
|
432
|
+
const documentExpireDate = result.text.getField(TextFieldType.DATE_OF_EXPIRY);
|
|
433
|
+
const parsedDocument = {
|
|
434
|
+
iin: iin?.value,
|
|
435
|
+
lastName: lastName?.value,
|
|
436
|
+
firstName: firstName?.value,
|
|
437
|
+
middleName: middleName?.value,
|
|
438
|
+
fullName: fullName?.value,
|
|
439
|
+
birthDate: birthDate?.value,
|
|
440
|
+
age: age?.value,
|
|
441
|
+
documentNumber: documentNumber?.value,
|
|
442
|
+
documentIssuer: documentIssuer?.value,
|
|
443
|
+
documentIssueDate: documentIssueDate?.value,
|
|
444
|
+
documentExpireDate: documentExpireDate?.value,
|
|
445
|
+
};
|
|
446
|
+
if (Object.values(parsedDocument).every(i => !i)) {
|
|
447
|
+
dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
return parsedDocument;
|
|
451
|
+
} else {
|
|
452
|
+
dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
|
|
453
|
+
}
|
|
454
|
+
return false;
|
|
455
|
+
} catch (err) {
|
|
456
|
+
return ErrorHandler(err);
|
|
457
|
+
}
|
|
458
|
+
};
|
package/locales/ru.json
CHANGED
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
"needAttachQuestionnaire": "Нужно вложить анкету для клиентов",
|
|
137
137
|
"notZeroPremium": "Общая страховая премия не должен быть 0",
|
|
138
138
|
"requiredFieldsLB": "Обязательные поля: №, Ф.И.О, Пол, Должность, Дата рождения, ИИН, Страховая сумма",
|
|
139
|
-
"duplicateClient": "В списке присутствуют повторяющиеся клиенты"
|
|
139
|
+
"duplicateClient": "В списке присутствуют повторяющиеся клиенты",
|
|
140
|
+
"notParsedDocument": "Не удалось получить данные"
|
|
140
141
|
},
|
|
141
142
|
"notSignedContract": "Неподписанный Договор",
|
|
142
143
|
"Contract": "Договор страхования",
|
|
@@ -220,7 +221,8 @@
|
|
|
220
221
|
"sendEgovMob": "Отправить на подпись через Egov Mobile",
|
|
221
222
|
"sendToPay": "Отправить на оплату",
|
|
222
223
|
"payEpay": "Оплатить через EPAY",
|
|
223
|
-
"payOffline": "Оплатить офлайн"
|
|
224
|
+
"payOffline": "Оплатить офлайн",
|
|
225
|
+
"paymentInvoice": "Cчет на оплату"
|
|
224
226
|
},
|
|
225
227
|
"dialog": {
|
|
226
228
|
"title": "Подтверждение",
|
|
@@ -275,7 +277,8 @@
|
|
|
275
277
|
"timer": "Вы создали счет на оплату, через 00:59 сек счет станет не активным",
|
|
276
278
|
"copyEgov": "Скопировать ссылку на подпись через Egov",
|
|
277
279
|
"scanQrCode": "Отсканируйте этот QR-код в приложении, чтобы осуществить подписание",
|
|
278
|
-
"successQrSigned": "Заявление и Договор подписаны Страхователем"
|
|
280
|
+
"successQrSigned": "Заявление и Договор подписаны Страхователем",
|
|
281
|
+
"convertQr": "Преобразовать в QR код"
|
|
279
282
|
},
|
|
280
283
|
"questionnaireType": {
|
|
281
284
|
"byHealth": "Анкета по здоровью Застрахованного",
|
|
@@ -381,6 +384,7 @@
|
|
|
381
384
|
"totalRequestedSumInsured": "Общая страховая сумма",
|
|
382
385
|
"totalInsurancePremiumAmount": "Общая страховая премия",
|
|
383
386
|
"totalInsurancePremiumAmountWithCommission": "Общая страховая премия с комиссией",
|
|
387
|
+
"totalInsurancePremiumAmountWithAgent": "Общая страховая премия с агентской частью",
|
|
384
388
|
"agencyPart": "Агентская переменная часть, %",
|
|
385
389
|
"processGfot": "Кратность страховой суммы к ГФОТ-у",
|
|
386
390
|
"annuiteStartDate": "Дата расчета",
|
|
@@ -895,7 +899,8 @@
|
|
|
895
899
|
"identityCardOfContactPerson": "Документ удостоверяющий личность Контактного лица Застрахованного",
|
|
896
900
|
"recipientDocs": "Документы Получателя",
|
|
897
901
|
"recipientData": "Сведения о Получателе",
|
|
898
|
-
"deathInsFromNS": "Страхование от смерти от НС"
|
|
902
|
+
"deathInsFromNS": "Страхование от смерти от НС",
|
|
903
|
+
"deathInsAnyReason": "Смерть Застрахованного по любой причине"
|
|
899
904
|
},
|
|
900
905
|
"bankDetailsForm": {
|
|
901
906
|
"title": "Банковские реквизиты",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.49",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -51,9 +51,10 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@intlify/unplugin-vue-i18n": "0.12.2",
|
|
53
53
|
"@mdi/font": "7.3.67",
|
|
54
|
-
"@microsoft/signalr": "
|
|
54
|
+
"@microsoft/signalr": "7.0.12",
|
|
55
55
|
"@nuxtjs/tailwindcss": "6.8.0",
|
|
56
56
|
"@pinia/nuxt": "0.4.11",
|
|
57
|
+
"@regulaforensics/document-reader-webclient": "6.9.5",
|
|
57
58
|
"@vuepic/vue-datepicker": "7.2.0",
|
|
58
59
|
"animate.css": "4.1.1",
|
|
59
60
|
"axios": "1.4.0",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"jwt-decode": "3.1.2",
|
|
62
63
|
"maska": "1.5.0",
|
|
63
64
|
"pinia": "2.1.4",
|
|
65
|
+
"qrcode.vue": "3.4.1",
|
|
64
66
|
"typedoc": "0.24.8",
|
|
65
67
|
"typescript": "5.0.4",
|
|
66
68
|
"vue-i18n": "9.2.2",
|
package/store/data.store.ts
CHANGED
|
@@ -237,6 +237,9 @@ export const useDataStore = defineStore('data', {
|
|
|
237
237
|
isHeadManager() {
|
|
238
238
|
return this.isRole(constants.roles.HeadManager);
|
|
239
239
|
},
|
|
240
|
+
isBranchDirector() {
|
|
241
|
+
return this.isRole(constants.roles.BranchDirector);
|
|
242
|
+
},
|
|
240
243
|
isProcessEditable(statusCode?: keyof typeof Statuses) {
|
|
241
244
|
const getEditibleStatuses = () => {
|
|
242
245
|
const defaultStatuses = constants.editableStatuses;
|
|
@@ -1112,6 +1115,16 @@ export const useDataStore = defineStore('data', {
|
|
|
1112
1115
|
}
|
|
1113
1116
|
return null;
|
|
1114
1117
|
},
|
|
1118
|
+
async getProcessCoverTypePeriod(questionId: string) {
|
|
1119
|
+
if (!this.processCode) return null;
|
|
1120
|
+
try {
|
|
1121
|
+
const answers = await this.api.getProcessCoverTypePeriod(this.processCode, questionId);
|
|
1122
|
+
return answers;
|
|
1123
|
+
} catch (err) {
|
|
1124
|
+
console.log(err);
|
|
1125
|
+
}
|
|
1126
|
+
return null;
|
|
1127
|
+
},
|
|
1115
1128
|
async definedAnswers(
|
|
1116
1129
|
filter: string,
|
|
1117
1130
|
whichSurvey: 'surveyByHealthBase' | 'surveyByHealthBasePolicyholder' | 'surveyByCriticalBase' | 'surveyByCriticalBasePolicyholder',
|
|
@@ -1341,20 +1354,6 @@ export const useDataStore = defineStore('data', {
|
|
|
1341
1354
|
}
|
|
1342
1355
|
return this.cities;
|
|
1343
1356
|
},
|
|
1344
|
-
async getCitiesEfo(key?: string, member?: any, parentKey?: string) {
|
|
1345
|
-
if (this.isLifeBusiness || this.isGns) {
|
|
1346
|
-
await this.getFromApi('cities', 'getCities');
|
|
1347
|
-
//@ts-ignore
|
|
1348
|
-
if (key && member[parentKey][key] && member[parentKey][key].ids !== null) return this.cities.filter(i => i.code === member[parentKey][key].ids);
|
|
1349
|
-
//@ts-ignore
|
|
1350
|
-
if (member && member[parentKey].registrationProvince.ids !== null) {
|
|
1351
|
-
//@ts-ignore
|
|
1352
|
-
return this.cities.filter(i => i.code === member[parentKey].registrationProvince.ids);
|
|
1353
|
-
} else {
|
|
1354
|
-
return this.cities;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
},
|
|
1358
1357
|
async getLocalityTypes() {
|
|
1359
1358
|
return await this.getFromApi('localityTypes', 'getLocalityTypes');
|
|
1360
1359
|
},
|
|
@@ -1453,7 +1452,6 @@ export const useDataStore = defineStore('data', {
|
|
|
1453
1452
|
this.getStates(),
|
|
1454
1453
|
this.getRegions(),
|
|
1455
1454
|
this.getCities(),
|
|
1456
|
-
this.getCitiesEfo(),
|
|
1457
1455
|
this.getLocalityTypes(),
|
|
1458
1456
|
this.getDocumentTypes(),
|
|
1459
1457
|
this.getDocumentIssuers(),
|
|
@@ -2249,7 +2247,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2249
2247
|
try {
|
|
2250
2248
|
const data = {
|
|
2251
2249
|
taskId: taskId,
|
|
2252
|
-
decision: decision,
|
|
2250
|
+
decision: decision.replace(/custom/i, '') as keyof typeof constants.actions,
|
|
2253
2251
|
};
|
|
2254
2252
|
await this.api.sendTask(comment === null ? data : { ...data, comment: comment });
|
|
2255
2253
|
this.showToaster('success', this.t('toaster.successOperation'), 3000);
|
|
@@ -2281,7 +2279,8 @@ export const useDataStore = defineStore('data', {
|
|
|
2281
2279
|
case constants.actions.return:
|
|
2282
2280
|
case constants.actions.signed:
|
|
2283
2281
|
case constants.actions.rejectclient:
|
|
2284
|
-
case constants.actions.accept:
|
|
2282
|
+
case constants.actions.accept:
|
|
2283
|
+
case constants.actions.payed: {
|
|
2285
2284
|
try {
|
|
2286
2285
|
const sended = await this.sendTask(taskId, action, comment);
|
|
2287
2286
|
if (!sended) return;
|
|
@@ -2427,10 +2426,10 @@ export const useDataStore = defineStore('data', {
|
|
|
2427
2426
|
ErrorHandler(err);
|
|
2428
2427
|
}
|
|
2429
2428
|
},
|
|
2430
|
-
async downloadTemplate(documentType: number, fileType: string = 'pdf') {
|
|
2429
|
+
async downloadTemplate(documentType: number, fileType: string = 'pdf', processInstanceId?: string | number) {
|
|
2431
2430
|
try {
|
|
2432
2431
|
this.isButtonsLoading = true;
|
|
2433
|
-
const response: any = await this.api.downloadTemplate(documentType);
|
|
2432
|
+
const response: any = await this.api.downloadTemplate(documentType, processInstanceId);
|
|
2434
2433
|
const blob = new Blob([response], {
|
|
2435
2434
|
type: `application/${fileType}`,
|
|
2436
2435
|
});
|
|
@@ -2442,10 +2441,10 @@ export const useDataStore = defineStore('data', {
|
|
|
2442
2441
|
link.setAttribute('download', 'РФ-ДС-028 Список застрахованных ГССЖ_ГНС, изд.1.xls');
|
|
2443
2442
|
break;
|
|
2444
2443
|
case constants.documentTypes.statement:
|
|
2445
|
-
link.setAttribute('download', 'Заявление.
|
|
2444
|
+
link.setAttribute('download', 'Заявление.pdf');
|
|
2446
2445
|
break;
|
|
2447
2446
|
case constants.documentTypes.contract:
|
|
2448
|
-
link.setAttribute('download', 'Договор страхования.
|
|
2447
|
+
link.setAttribute('download', 'Договор страхования.pdf');
|
|
2449
2448
|
break;
|
|
2450
2449
|
case constants.documentTypes.application1:
|
|
2451
2450
|
link.setAttribute('download', 'Приложение №1.xls');
|
|
@@ -2453,6 +2452,9 @@ export const useDataStore = defineStore('data', {
|
|
|
2453
2452
|
case constants.documentTypes.questionnaireInsured:
|
|
2454
2453
|
link.setAttribute('download', 'Анкета Застрахованного.docx');
|
|
2455
2454
|
break;
|
|
2455
|
+
case constants.documentTypes.invoicePayment:
|
|
2456
|
+
link.setAttribute('download', 'Счет на оплату.pdf');
|
|
2457
|
+
break;
|
|
2456
2458
|
}
|
|
2457
2459
|
document.body.appendChild(link);
|
|
2458
2460
|
link.click();
|
|
@@ -2471,6 +2473,16 @@ export const useDataStore = defineStore('data', {
|
|
|
2471
2473
|
}
|
|
2472
2474
|
this.isButtonsLoading = false;
|
|
2473
2475
|
},
|
|
2476
|
+
async sendInvoiceToEmail(processInstanceId: string | number, email: string) {
|
|
2477
|
+
try {
|
|
2478
|
+
this.isButtonsLoading = true;
|
|
2479
|
+
await this.api.sendInvoiceToEmail(processInstanceId, email);
|
|
2480
|
+
this.showToaster('info', this.t('toaster.successfullyDocSent'), 5000);
|
|
2481
|
+
} catch (err) {
|
|
2482
|
+
ErrorHandler(err);
|
|
2483
|
+
}
|
|
2484
|
+
this.isButtonsLoading = false;
|
|
2485
|
+
},
|
|
2474
2486
|
async generateDocument() {
|
|
2475
2487
|
try {
|
|
2476
2488
|
this.isButtonsLoading = true;
|
|
@@ -3147,20 +3159,26 @@ export const useDataStore = defineStore('data', {
|
|
|
3147
3159
|
},
|
|
3148
3160
|
async startApplicationV2(data: PolicyholderClass) {
|
|
3149
3161
|
const policyholder = JSON.parse(JSON.stringify(data)) as any;
|
|
3150
|
-
this.preparePersonData(policyholder);
|
|
3151
|
-
delete policyholder.clientData.beneficalOwnerQuest;
|
|
3152
|
-
delete policyholder.clientData.identityDocument;
|
|
3153
|
-
delete policyholder.clientData.activityTypes;
|
|
3154
|
-
delete policyholder.clientData.citizenship;
|
|
3155
|
-
delete policyholder.clientData.authoritedPerson.identityDocument;
|
|
3156
|
-
delete policyholder.clientData.authoritedPerson.actualAddress;
|
|
3157
|
-
delete policyholder.clientData.authoritedPerson.bankInfo;
|
|
3158
|
-
delete policyholder.clientData.authoritedPerson.economySectorCode;
|
|
3159
|
-
delete policyholder.clientData.authoritedPerson.legalAddress;
|
|
3160
|
-
delete policyholder.clientData.authoritedPerson.placeOfBirth;
|
|
3161
|
-
delete policyholder.clientData.authoritedPerson.resident;
|
|
3162
|
-
delete policyholder.clientData.authoritedPerson.taxResidentCountry;
|
|
3163
3162
|
if (!policyholder.clientData.iin) return false;
|
|
3163
|
+
this.preparePersonData(policyholder);
|
|
3164
|
+
keyDeleter(policyholder as PolicyholderClass, [
|
|
3165
|
+
'clientData.beneficalOwnerQuest',
|
|
3166
|
+
'clientData.identityDocument',
|
|
3167
|
+
'clientData.activityTypes',
|
|
3168
|
+
'clientData.citizenship',
|
|
3169
|
+
'clientData.addTaxResidency',
|
|
3170
|
+
'clientData.gender',
|
|
3171
|
+
'clientData.placeOfBirth',
|
|
3172
|
+
'clientData.authoritedPerson.actualAddress',
|
|
3173
|
+
'clientData.authoritedPerson.bankInfo',
|
|
3174
|
+
'clientData.authoritedPerson.economySectorCode',
|
|
3175
|
+
'clientData.authoritedPerson.legalAddress',
|
|
3176
|
+
'clientData.authoritedPerson.placeOfBirth',
|
|
3177
|
+
'clientData.authoritedPerson.resident',
|
|
3178
|
+
'clientData.authoritedPerson.taxResidentCountry',
|
|
3179
|
+
'clientData.authoritedPerson.addTaxResidency',
|
|
3180
|
+
]);
|
|
3181
|
+
policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3164
3182
|
try {
|
|
3165
3183
|
const response = await this.api.startApplication(policyholder);
|
|
3166
3184
|
this.sendToParent(constants.postActions.applicationCreated, response.processInstanceId);
|
|
@@ -3171,6 +3189,7 @@ export const useDataStore = defineStore('data', {
|
|
|
3171
3189
|
},
|
|
3172
3190
|
async saveClient(data: PolicyholderClass) {
|
|
3173
3191
|
const policyholder = JSON.parse(JSON.stringify(data)) as any;
|
|
3192
|
+
policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3174
3193
|
this.preparePersonData(policyholder);
|
|
3175
3194
|
try {
|
|
3176
3195
|
await this.api.saveClient(this.formStore.applicationData.processInstanceId, this.formStore.lfb.clientId, policyholder);
|
|
@@ -3218,6 +3237,11 @@ export const useDataStore = defineStore('data', {
|
|
|
3218
3237
|
this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
|
|
3219
3238
|
this.formStore.lfb.clientId = clientId;
|
|
3220
3239
|
this.formStore.lfb.policyholder.clientData.authorityDetails.date = reformatDate(clientData.authorityDetails.date);
|
|
3240
|
+
this.formStore.lfb.policyholder.clientData.authoritedPerson.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
|
|
3241
|
+
this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
|
|
3242
|
+
this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
|
|
3243
|
+
const gender = this.gender.find((i: Value) => i.id === clientData.authoritedPerson.gender);
|
|
3244
|
+
this.formStore.lfb.policyholder.clientData.authoritedPerson.gender = gender ? gender : new Value();
|
|
3221
3245
|
|
|
3222
3246
|
if (clientData && clientData.activityTypes !== null) {
|
|
3223
3247
|
this.formStore.lfb.policyholderActivities = clientData.activityTypes;
|
|
@@ -3227,9 +3251,13 @@ export const useDataStore = defineStore('data', {
|
|
|
3227
3251
|
this.formStore.lfb.beneficialOwners = beneficialOwnerApp;
|
|
3228
3252
|
this.formStore.lfb.isPolicyholderBeneficialOwner = clientData.authoritedPerson.iin.replace(/-/g, '') === beneficialOwnerApp[0].beneficialOwnerData.iin ? true : false;
|
|
3229
3253
|
this.formStore.lfb.beneficialOwners.forEach(beneficial => {
|
|
3230
|
-
beneficial.beneficialOwnerData.birthDate = reformatDate(beneficial.beneficialOwnerData.birthDate as string);
|
|
3231
|
-
beneficial.beneficialOwnerData.identityDocument
|
|
3254
|
+
beneficial.beneficialOwnerData.birthDate = reformatDate(beneficial.beneficialOwnerData.birthDate as string) ?? '';
|
|
3255
|
+
beneficial.beneficialOwnerData.identityDocument.validUntil = reformatDate(beneficial.beneficialOwnerData.identityDocument.validUntil as string) ?? '';
|
|
3232
3256
|
beneficial.beneficialOwnerData.iin = reformatIin(beneficial.beneficialOwnerData.iin as string);
|
|
3257
|
+
beneficial.beneficialOwnerData.identityDocument.issuedOn = reformatDate(beneficial.beneficialOwnerData.identityDocument.issuedOn as string) ?? '';
|
|
3258
|
+
//@ts-ignore
|
|
3259
|
+
const gender = this.gender.find((i: Value) => i.id === beneficial.beneficialOwnerData.gender);
|
|
3260
|
+
beneficial.beneficialOwnerData.gender = gender ? gender : new Value();
|
|
3233
3261
|
});
|
|
3234
3262
|
}
|
|
3235
3263
|
|
|
@@ -3286,20 +3314,19 @@ export const useDataStore = defineStore('data', {
|
|
|
3286
3314
|
async saveBeneficialOwnerList(data: BeneficialOwner[]) {
|
|
3287
3315
|
const beneficialOwnerList = JSON.parse(JSON.stringify(data)) as any;
|
|
3288
3316
|
for (const item of beneficialOwnerList) {
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
delete item.beneficialOwnerData.taxResidentCountry;
|
|
3301
|
-
delete item.beneficialOwnerData.typeOfEconomicActivity;
|
|
3317
|
+
keyDeleter(item as BeneficialOwner, [
|
|
3318
|
+
'beneficialOwnerData.activityTypes',
|
|
3319
|
+
'beneficialOwnerData.actualAddress',
|
|
3320
|
+
'beneficialOwnerData.addTaxResidency',
|
|
3321
|
+
'beneficialOwnerData.authoritedPerson',
|
|
3322
|
+
'beneficialOwnerData.authorityDetails',
|
|
3323
|
+
'beneficialOwnerData.bankInfo',
|
|
3324
|
+
'beneficialOwnerData.legalAddress',
|
|
3325
|
+
'beneficialOwnerData.placeOfBirth',
|
|
3326
|
+
'beneficialOwnerData.typeOfEconomicActivity',
|
|
3327
|
+
]);
|
|
3302
3328
|
item.processInstanceId = this.formStore.applicationData.processInstanceId;
|
|
3329
|
+
item.beneficialOwnerData.gender = item.beneficialOwnerData.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3303
3330
|
this.preparePersonData(item.beneficialOwnerData);
|
|
3304
3331
|
}
|
|
3305
3332
|
try {
|
|
@@ -3311,7 +3338,18 @@ export const useDataStore = defineStore('data', {
|
|
|
3311
3338
|
},
|
|
3312
3339
|
async saveBeneficialOwner(data: BeneficialOwner) {
|
|
3313
3340
|
const beneficialOwner = JSON.parse(JSON.stringify(data)) as any;
|
|
3314
|
-
|
|
3341
|
+
keyDeleter(beneficialOwner as BeneficialOwner, [
|
|
3342
|
+
'beneficialOwnerData.activityTypes',
|
|
3343
|
+
'beneficialOwnerData.actualAddress',
|
|
3344
|
+
'beneficialOwnerData.addTaxResidency',
|
|
3345
|
+
'beneficialOwnerData.authoritedPerson',
|
|
3346
|
+
'beneficialOwnerData.authorityDetails',
|
|
3347
|
+
'beneficialOwnerData.bankInfo',
|
|
3348
|
+
'beneficialOwnerData.legalAddress',
|
|
3349
|
+
'beneficialOwnerData.placeOfBirth',
|
|
3350
|
+
'beneficialOwnerData.typeOfEconomicActivity',
|
|
3351
|
+
]);
|
|
3352
|
+
beneficialOwner.beneficialOwnerData.gender = beneficialOwner.beneficialOwnerData.gender.nameRu === 'Мужской' ? 1 : 2;
|
|
3315
3353
|
this.preparePersonData(beneficialOwner.beneficialOwnerData);
|
|
3316
3354
|
try {
|
|
3317
3355
|
const response = await this.api.saveBeneficialOwner(this.formStore.applicationData.processInstanceId, String(beneficialOwner.id), beneficialOwner);
|
|
@@ -3533,7 +3571,8 @@ export const useDataStore = defineStore('data', {
|
|
|
3533
3571
|
this.isFinCenter() ||
|
|
3534
3572
|
this.isSupervisor() ||
|
|
3535
3573
|
this.isSupport() ||
|
|
3536
|
-
this.isDrn()
|
|
3574
|
+
this.isDrn() ||
|
|
3575
|
+
this.isBranchDirector(),
|
|
3537
3576
|
};
|
|
3538
3577
|
},
|
|
3539
3578
|
},
|
package/types/enum.ts
CHANGED
|
@@ -46,8 +46,8 @@ export enum Actions {
|
|
|
46
46
|
choosePay = 'choosePay',
|
|
47
47
|
choosePayCustom = 'choosePayCustom',
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
payed = 'payed',
|
|
50
|
+
payedCustom = 'payedCustom',
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export enum PostActions {
|
|
@@ -83,6 +83,7 @@ export enum Roles {
|
|
|
83
83
|
DRNSJ = 'DRNSJ',
|
|
84
84
|
HeadManager = 'HeadManager',
|
|
85
85
|
AgentAuletti = 'AgentAuletti',
|
|
86
|
+
BranchDirector = 'BranchDirector',
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
export enum Statuses {
|