hl-core 0.0.9-beta.50 → 0.0.9-beta.51
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 +110 -3
- package/components/Form/ManagerAttachment.vue +1 -1
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/FormInput.vue +5 -0
- package/components/Input/RoundedSelect.vue +5 -0
- package/components/Pages/Auth.vue +9 -3
- package/components/Pages/Documents.vue +137 -52
- package/components/Pages/MemberForm.vue +240 -20
- package/components/Pages/ProductConditions.vue +178 -13
- package/components/Panel/PanelHandler.vue +201 -33
- package/composables/classes.ts +23 -0
- package/composables/constants.ts +14 -2
- package/composables/index.ts +21 -15
- package/locales/ru.json +72 -5
- package/package.json +4 -3
- package/store/data.store.ts +279 -33
- package/store/rules.ts +17 -0
- package/types/enum.ts +18 -0
- package/types/index.ts +6 -3
package/api/base.api.ts
CHANGED
|
@@ -142,6 +142,13 @@ export class ApiClass {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
async getInsuranceCompanies() {
|
|
146
|
+
return await this.axiosCall<Value[]>({
|
|
147
|
+
method: Methods.GET,
|
|
148
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/InsCompany',
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
145
152
|
async getDicAnnuityTypeList() {
|
|
146
153
|
return await this.axiosCall<Value[]>({
|
|
147
154
|
method: Methods.GET,
|
|
@@ -432,7 +439,7 @@ export class ApiClass {
|
|
|
432
439
|
}
|
|
433
440
|
|
|
434
441
|
async deleteFile(data: any) {
|
|
435
|
-
return await this.axiosCall({
|
|
442
|
+
return await this.axiosCall<void>({
|
|
436
443
|
method: Methods.POST,
|
|
437
444
|
url: '/File/api/Data/DeleteFiles',
|
|
438
445
|
data: data,
|
|
@@ -684,10 +691,10 @@ export class ApiClass {
|
|
|
684
691
|
});
|
|
685
692
|
}
|
|
686
693
|
|
|
687
|
-
async searchAgentByName(name: string) {
|
|
694
|
+
async searchAgentByName(name: string, branchCode?: string) {
|
|
688
695
|
return await this.axiosCall<AgentData[]>({
|
|
689
696
|
method: Methods.GET,
|
|
690
|
-
url: `/Ekk/api/ContragentInsis/
|
|
697
|
+
url: `/Ekk/api/ContragentInsis/Agent${branchCode ? 's' : ''}ByName?${branchCode ? `branchCode=${branchCode}&` : ''}fullName=${name}`,
|
|
691
698
|
});
|
|
692
699
|
}
|
|
693
700
|
|
|
@@ -921,6 +928,68 @@ export class ApiClass {
|
|
|
921
928
|
});
|
|
922
929
|
}
|
|
923
930
|
|
|
931
|
+
async calculatePension(id: string, product: string | undefined | null = this.productUrl) {
|
|
932
|
+
return await this.axiosCall<void>({
|
|
933
|
+
method: Methods.POST,
|
|
934
|
+
url: `/${product}/api/Application/Calculate?Id=${id}`,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
async calculatePremium(data: any) {
|
|
939
|
+
return await this.axiosCall<any>({
|
|
940
|
+
method: Methods.POST,
|
|
941
|
+
url: `/insuranceCalculator/Calculator/calculatePremium`,
|
|
942
|
+
data: data,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
async generatePdfDocument(data: any) {
|
|
947
|
+
return await this.axiosCall<any>({
|
|
948
|
+
method: Methods.POST,
|
|
949
|
+
url: `/Arm/api/Bpm/generatePdfDocument`,
|
|
950
|
+
data: data,
|
|
951
|
+
responseType: 'arraybuffer',
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
async getVariableData(type: number, processCode: number) {
|
|
956
|
+
return await this.axiosCall<any>({
|
|
957
|
+
method: Methods.GET,
|
|
958
|
+
url: `/Arm/api/Dictionary/GetVariableData/${type}/${processCode}`,
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
async getDocument(id: string) {
|
|
963
|
+
return await this.axiosCall<any>({
|
|
964
|
+
method: Methods.POST,
|
|
965
|
+
url: `/${this.productUrl}/api/Application/GetDocument/${id}`,
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
async uploadXml(data: any) {
|
|
970
|
+
return await this.axiosCall<void>({
|
|
971
|
+
url: `/File/api/Document/UploadXml`,
|
|
972
|
+
method: Methods.POST,
|
|
973
|
+
data: data,
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
async signXml(data: any) {
|
|
978
|
+
return await this.axiosCall<any>({
|
|
979
|
+
url: `/File/api/Sign/SignXml`,
|
|
980
|
+
method: Methods.POST,
|
|
981
|
+
data: data,
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
async signBts(data: any) {
|
|
986
|
+
return await this.axiosCall<ResponseStructure<SignUrlType[]>>({
|
|
987
|
+
url: `/File/api/Sign/SignBts`,
|
|
988
|
+
method: Methods.POST,
|
|
989
|
+
data: data,
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
|
|
924
993
|
async generateShortLink(data: { link: string; priority: string }) {
|
|
925
994
|
return await this.axiosCall<{
|
|
926
995
|
id: string;
|
|
@@ -932,4 +1001,42 @@ export class ApiClass {
|
|
|
932
1001
|
data: data,
|
|
933
1002
|
});
|
|
934
1003
|
}
|
|
1004
|
+
|
|
1005
|
+
async checkOsns(bin: string) {
|
|
1006
|
+
return await this.axiosCall<boolean>({
|
|
1007
|
+
method: Methods.GET,
|
|
1008
|
+
url: `/${this.productUrl}/api/Application/CheckOSNS`,
|
|
1009
|
+
params: {
|
|
1010
|
+
bin,
|
|
1011
|
+
},
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
async checkOsnsBalance(processInstanceId: string) {
|
|
1016
|
+
return await this.axiosCall<string>({
|
|
1017
|
+
method: Methods.GET,
|
|
1018
|
+
url: `/${this.productUrl}/api/Application/CheckOSNSBalance`,
|
|
1019
|
+
params: {
|
|
1020
|
+
processInstanceId,
|
|
1021
|
+
},
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
async getOsrnsToken(data: { iin: string; phoneNumber: string }) {
|
|
1026
|
+
return await this.axiosCall({
|
|
1027
|
+
method: Methods.POST,
|
|
1028
|
+
url: '/externalservices/api/ExternalServices/GetOsrnsToken',
|
|
1029
|
+
data: data,
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
async checkOutDate(processInstanceId: string) {
|
|
1034
|
+
return await this.axiosCall<boolean>({
|
|
1035
|
+
method: Methods.GET,
|
|
1036
|
+
url: `/${this.productUrl}/api/Application/CheckOutDate`,
|
|
1037
|
+
params: {
|
|
1038
|
+
processInstanceId,
|
|
1039
|
+
},
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
935
1042
|
}
|
|
@@ -146,7 +146,7 @@ export default defineComponent({
|
|
|
146
146
|
return isReadonly.value;
|
|
147
147
|
});
|
|
148
148
|
const isAgentReadonly = computed(() => {
|
|
149
|
-
if (dataStore.isGons) return isReadonly.value || !dataStore.isAgent();
|
|
149
|
+
if (dataStore.isGons || dataStore.isPension) return isReadonly.value || !dataStore.isAgent();
|
|
150
150
|
return isReadonly.value;
|
|
151
151
|
});
|
|
152
152
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:close-on-scroll="true"
|
|
13
13
|
:enable-time-picker="false"
|
|
14
14
|
:six-weeks="true"
|
|
15
|
+
:min-date="minDate"
|
|
15
16
|
cancel-text="Отменить"
|
|
16
17
|
select-text="Выбрать"
|
|
17
18
|
>
|
|
@@ -38,6 +39,10 @@ export default defineComponent({
|
|
|
38
39
|
type: Boolean,
|
|
39
40
|
default: false,
|
|
40
41
|
},
|
|
42
|
+
minDate: {
|
|
43
|
+
type: Date,
|
|
44
|
+
required: false,
|
|
45
|
+
},
|
|
41
46
|
},
|
|
42
47
|
});
|
|
43
48
|
</script>
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
<base-datepicker
|
|
39
39
|
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
|
|
40
40
|
:model-value="modelValue"
|
|
41
|
+
:min-date="minDate"
|
|
41
42
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
42
43
|
/>
|
|
43
44
|
</template>
|
|
@@ -113,6 +114,10 @@ export default defineComponent({
|
|
|
113
114
|
type: String,
|
|
114
115
|
default: 'mdi-close',
|
|
115
116
|
},
|
|
117
|
+
minDate: {
|
|
118
|
+
type: Date,
|
|
119
|
+
default: undefined,
|
|
120
|
+
},
|
|
116
121
|
prependIcon: {
|
|
117
122
|
type: String,
|
|
118
123
|
},
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
22
22
|
:bg-color="bgColor ? bgColor : ''"
|
|
23
23
|
:items="items"
|
|
24
|
+
:hide-details="hideDetails"
|
|
24
25
|
@click:append="!props.readonly && $emit('append-out')"
|
|
25
26
|
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
26
27
|
@click:append-inner="!props.readonly && $emit('append')"
|
|
@@ -84,6 +85,10 @@ export default defineComponent({
|
|
|
84
85
|
type: String,
|
|
85
86
|
default: 'compact',
|
|
86
87
|
},
|
|
88
|
+
hideDetails: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
87
92
|
color: {
|
|
88
93
|
type: String,
|
|
89
94
|
default: '#009c73',
|
|
@@ -36,7 +36,13 @@
|
|
|
36
36
|
</aside>
|
|
37
37
|
<section v-if="isLogin" class="flex flex-col justify-center" :class="[$dataStore.isAULETTI === false ? 'w-full lg:w-3/4' : 'w-full']">
|
|
38
38
|
<!-- @vue-ignore -->
|
|
39
|
-
<img
|
|
39
|
+
<img
|
|
40
|
+
v-if="$dataStore.isAULETTI === false"
|
|
41
|
+
:class="{ '!block': !$display().lgAndUp.value }"
|
|
42
|
+
draggable="false"
|
|
43
|
+
class="hidden w-2/4 sm:w-1/3 mb-10 self-center"
|
|
44
|
+
src="~/assets/auth-logo.svg"
|
|
45
|
+
/>
|
|
40
46
|
<div class="flex flex-col items-center mb-8 text-center">
|
|
41
47
|
<h1 class="text-[28px] font-medium mb-1">{{ $dataStore.isAULETTI === false ? $dataStore.t('labels.welcomeHL') : $dataStore.t('labels.welcomeAuletti') }}</h1>
|
|
42
48
|
<span :class="[$styles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.needAuth') }}</span>
|
|
@@ -144,8 +150,8 @@ export default defineComponent({
|
|
|
144
150
|
},
|
|
145
151
|
];
|
|
146
152
|
|
|
147
|
-
const login = ref<string>(
|
|
148
|
-
const password = ref<string>(
|
|
153
|
+
const login = ref<string>('');
|
|
154
|
+
const password = ref<string>('');
|
|
149
155
|
|
|
150
156
|
const numAttempts = ref(0);
|
|
151
157
|
|
|
@@ -1,57 +1,124 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<section :class="[$styles.scrollPage]">
|
|
3
|
+
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
4
|
+
<base-content-block
|
|
5
|
+
v-if="$dataStore.isInitiator() && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
|
|
6
|
+
:class="[$styles.textSimple]"
|
|
7
|
+
>
|
|
8
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('Contract') }}</h5>
|
|
9
|
+
<base-form-input v-model="formStore.documentName" :label="$dataStore.t('form.document')" :readonly="true" />
|
|
10
|
+
<base-form-input v-model="formStore.policyNumber" :label="$dataStore.t('form.documentNumber')" :readonly="true" />
|
|
11
|
+
<base-form-input v-model="formStore.contractDate" :label="$dataStore.t('form.date')" :readonly="true" append-inner-icon="mdi mdi-calendar-blank-outline" />
|
|
12
|
+
<base-file-input :readonly="isDisabled" @input.prevent="onFileChange($event)" />
|
|
13
|
+
</base-content-block>
|
|
14
|
+
<base-content-block v-for="document of formStore.signedDocumentList" :key="document.id" :class="[$styles.textSimple]">
|
|
15
|
+
<h5 class="text-center font-medium mb-4">
|
|
16
|
+
{{ document.fileTypeName }}
|
|
17
|
+
</h5>
|
|
18
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
19
|
+
<span class="ml-2">{{ document.fileName }}</span>
|
|
20
|
+
<i
|
|
21
|
+
class="transition-all cursor-pointer mdi mdi-dots-vertical pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
22
|
+
:class="[$styles.greenTextHover]"
|
|
23
|
+
@click="openPanel(document)"
|
|
24
|
+
></i>
|
|
25
|
+
</div>
|
|
26
|
+
</base-content-block>
|
|
27
|
+
</section>
|
|
28
|
+
<div
|
|
29
|
+
v-if="(!formStore.signedDocumentList || !formStore.signedDocumentList.length) && !$dataStore.isPension"
|
|
30
|
+
class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6"
|
|
6
31
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
</
|
|
32
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
|
|
33
|
+
<path
|
|
34
|
+
fill-rule="evenodd"
|
|
35
|
+
clip-rule="evenodd"
|
|
36
|
+
d="M71.0404 15.5H34.8737C29.8801 15.5 25.832 19.6638 25.832 24.8V99.2C25.832 104.336 29.8801 108.5 34.8737 108.5H89.1237C94.1173 108.5 98.1654 104.336 98.1654 99.2V43.4L71.0404 15.5Z"
|
|
37
|
+
stroke="#009C73"
|
|
38
|
+
stroke-width="6"
|
|
39
|
+
stroke-linecap="round"
|
|
40
|
+
stroke-linejoin="round"
|
|
41
|
+
/>
|
|
42
|
+
<path d="M72.332 20.6641V41.3307H92.9987" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
43
|
+
<path opacity="0.497024" d="M82.6654 67.1641H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
44
|
+
<path opacity="0.497024" d="M82.6654 87.8359H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
45
|
+
<path opacity="0.497024" d="M51.6654 46.5H46.4987H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
46
|
+
<circle cx="102" cy="108" r="22.5" fill="#FCB016" stroke="#F1F2F6" />
|
|
47
|
+
<path d="M103.375 95.625V109.375H92.375" stroke="white" stroke-linecap="round" stroke-linejoin="round" />
|
|
48
|
+
</svg>
|
|
49
|
+
<p class="text-xl" :class="[$styles.mutedText]">{{ $dataStore.t('labels.noDocuments') }}</p>
|
|
50
|
+
</div>
|
|
51
|
+
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="$dataStore.isPension">
|
|
52
|
+
<base-content-block :class="[$styles.textSimple]">
|
|
53
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
|
|
54
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
55
|
+
<span class="ml-2">Заявления на {{ processCode == 1 ? 'страхование' : 'возврат' }}</span>
|
|
56
|
+
<i
|
|
57
|
+
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
58
|
+
:class="[$styles.greenTextHover]"
|
|
59
|
+
@click="$dataStore.generatePDFDocument(processCode == 1 ? 'PA_Statement' : 'PA_RefundStatement', '37')"
|
|
60
|
+
></i>
|
|
61
|
+
</div>
|
|
62
|
+
</base-content-block>
|
|
63
|
+
<base-content-block :class="[$styles.textSimple]">
|
|
64
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.contract') }}</h5>
|
|
65
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
66
|
+
<span class="ml-2">Договор {{ processCode == 1 ? 'страхования' : 'возврата' }}</span>
|
|
67
|
+
<i
|
|
68
|
+
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
69
|
+
:class="[$styles.greenTextHover]"
|
|
70
|
+
@click="$dataStore.generatePDFDocument(processCode == 1 ? 'PA_Contract' : 'PA_RefundAgreement', '38')"
|
|
71
|
+
></i>
|
|
72
|
+
</div>
|
|
73
|
+
</base-content-block>
|
|
74
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode == 1">
|
|
75
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.complianceFinMonitoring') }}</h5>
|
|
76
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
77
|
+
<span class="ml-2">{{ $dataStore.t('pension.complianceFinMonitoring') }}</span>
|
|
78
|
+
<i
|
|
79
|
+
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
80
|
+
:class="[$styles.greenTextHover]"
|
|
81
|
+
@click="$dataStore.generatePDFDocument('Compliance_FinMonitoring', '39')"
|
|
82
|
+
></i>
|
|
83
|
+
</div>
|
|
84
|
+
</base-content-block>
|
|
85
|
+
<base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode == 1">
|
|
86
|
+
<h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.dossierPA') }}</h5>
|
|
87
|
+
<div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
88
|
+
<span class="ml-2">{{ $dataStore.t('pension.dossierPA') }}</span>
|
|
89
|
+
<i
|
|
90
|
+
class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
91
|
+
:class="[$styles.greenTextHover]"
|
|
92
|
+
@click="$dataStore.generatePDFDocument('PA_Dossier', '40', 'doc')"
|
|
93
|
+
></i>
|
|
94
|
+
</div>
|
|
95
|
+
</base-content-block>
|
|
96
|
+
</section>
|
|
97
|
+
<Teleport v-if="$dataStore.panelAction === null" to="#right-panel-actions">
|
|
98
|
+
<base-fade-transition>
|
|
99
|
+
<div :class="[$styles.flexColNav]">
|
|
100
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
101
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
102
|
+
<base-btn
|
|
103
|
+
v-if="$dataStore.isPension && $dataStore.isProcessEditable(formStore.applicationData.statusCode)"
|
|
104
|
+
:disabled="documentLoading"
|
|
105
|
+
:loading="documentLoading"
|
|
106
|
+
text="Удалить"
|
|
107
|
+
@click="deletionDialog = true"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</base-fade-transition>
|
|
111
|
+
</Teleport>
|
|
112
|
+
<base-dialog
|
|
113
|
+
v-model="deletionDialog"
|
|
114
|
+
:title="$dataStore.t('dialog.confirmDelete')"
|
|
115
|
+
:subtitle="$dataStore.t('dialog.deleteFile')"
|
|
116
|
+
:confirm="$dataStore.t('confirm.delete')"
|
|
117
|
+
:icon="{ mdi: 'delete-outline', color: '#FD2D39' }"
|
|
118
|
+
@yes="deleteFile"
|
|
119
|
+
@no="deletionDialog = false"
|
|
120
|
+
/>
|
|
26
121
|
</section>
|
|
27
|
-
<div v-else class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
|
|
28
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
|
|
29
|
-
<path
|
|
30
|
-
fill-rule="evenodd"
|
|
31
|
-
clip-rule="evenodd"
|
|
32
|
-
d="M71.0404 15.5H34.8737C29.8801 15.5 25.832 19.6638 25.832 24.8V99.2C25.832 104.336 29.8801 108.5 34.8737 108.5H89.1237C94.1173 108.5 98.1654 104.336 98.1654 99.2V43.4L71.0404 15.5Z"
|
|
33
|
-
stroke="#009C73"
|
|
34
|
-
stroke-width="6"
|
|
35
|
-
stroke-linecap="round"
|
|
36
|
-
stroke-linejoin="round"
|
|
37
|
-
/>
|
|
38
|
-
<path d="M72.332 20.6641V41.3307H92.9987" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
39
|
-
<path opacity="0.497024" d="M82.6654 67.1641H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
40
|
-
<path opacity="0.497024" d="M82.6654 87.8359H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
41
|
-
<path opacity="0.497024" d="M51.6654 46.5H46.4987H41.332" stroke="#009C73" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
|
|
42
|
-
<circle cx="102" cy="108" r="22.5" fill="#FCB016" stroke="#F1F2F6" />
|
|
43
|
-
<path d="M103.375 95.625V109.375H92.375" stroke="white" stroke-linecap="round" stroke-linejoin="round" />
|
|
44
|
-
</svg>
|
|
45
|
-
<p class="text-xl" :class="[$styles.mutedText]">{{ $dataStore.t('labels.noDocuments') }}</p>
|
|
46
|
-
</div>
|
|
47
|
-
<Teleport v-if="$dataStore.panelAction === null" to="#right-panel-actions">
|
|
48
|
-
<base-fade-transition>
|
|
49
|
-
<div :class="[$styles.flexColNav]">
|
|
50
|
-
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
51
|
-
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
52
|
-
</div>
|
|
53
|
-
</base-fade-transition>
|
|
54
|
-
</Teleport>
|
|
55
122
|
</template>
|
|
56
123
|
|
|
57
124
|
<script lang="ts">
|
|
@@ -63,9 +130,10 @@ export default defineComponent({
|
|
|
63
130
|
const formStore = useFormStore();
|
|
64
131
|
const currentDocument = ref<DocumentItem>(new DocumentItem());
|
|
65
132
|
const documentLoading = ref<boolean>(false);
|
|
66
|
-
|
|
133
|
+
const deletionDialog = ref<boolean>(false);
|
|
67
134
|
const isDisabled = computed(() => !dataStore.isTask());
|
|
68
135
|
const contractDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Договор страхования' || i.nameRu === 'Договор'));
|
|
136
|
+
const processCode = formStore.applicationData.processCode;
|
|
69
137
|
const signedContract = reactive<{
|
|
70
138
|
processInstanceId: string | number;
|
|
71
139
|
fileTypeId: string | number | null;
|
|
@@ -142,6 +210,20 @@ export default defineComponent({
|
|
|
142
210
|
}
|
|
143
211
|
};
|
|
144
212
|
|
|
213
|
+
const deleteFile = async () => {
|
|
214
|
+
if (currentDocument.value) {
|
|
215
|
+
const data = {
|
|
216
|
+
id: currentDocument.value.id,
|
|
217
|
+
processInstanceId: currentDocument.value.processInstanceId,
|
|
218
|
+
};
|
|
219
|
+
await dataStore.deleteFile(data);
|
|
220
|
+
deletionDialog.value = false;
|
|
221
|
+
dataStore.rightPanel.open = false;
|
|
222
|
+
dataStore.panelAction = null;
|
|
223
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
145
227
|
const onInit = async () => {
|
|
146
228
|
await dataStore.getDicFileTypeList();
|
|
147
229
|
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
@@ -159,6 +241,8 @@ export default defineComponent({
|
|
|
159
241
|
documentLoading,
|
|
160
242
|
DocumentItem,
|
|
161
243
|
signedContract,
|
|
244
|
+
deletionDialog,
|
|
245
|
+
processCode,
|
|
162
246
|
|
|
163
247
|
// Computed
|
|
164
248
|
isDisabled,
|
|
@@ -167,6 +251,7 @@ export default defineComponent({
|
|
|
167
251
|
openPanel,
|
|
168
252
|
getFile,
|
|
169
253
|
onFileChange,
|
|
254
|
+
deleteFile,
|
|
170
255
|
};
|
|
171
256
|
},
|
|
172
257
|
});
|