hl-core 0.0.8-beta.1 → 0.0.8-beta.11
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/index.ts +27 -13
- package/api/interceptors.ts +1 -1
- package/components/Dialog/Dialog.vue +1 -1
- package/components/Form/FormBlock.vue +52 -27
- package/components/Form/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +8 -4
- package/components/Input/Datepicker.vue +41 -0
- package/components/Input/FormInput.vue +15 -3
- package/components/Layout/SettingsPanel.vue +2 -2
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +12 -4
- package/components/Pages/Anketa.vue +13 -5
- package/components/Pages/Documents.vue +1 -1
- package/components/Pages/MemberForm.vue +107 -12
- package/components/Pages/ProductConditions.vue +334 -17
- package/components/Panel/PanelHandler.vue +25 -11
- package/composables/classes.ts +94 -23
- package/composables/constants.ts +9 -1
- package/composables/index.ts +3 -2
- package/composables/styles.ts +10 -2
- package/configs/i18n.ts +19 -0
- package/layouts/default.vue +1 -1
- package/locales/en.json +408 -0
- package/locales/kz.json +408 -0
- package/locales/ru.json +408 -0
- package/nuxt.config.ts +12 -0
- package/package.json +9 -3
- package/pages/500.vue +1 -1
- package/plugins/helperFunctionsPlugins.ts +5 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +5 -0
- package/store/data.store.js +344 -508
- package/store/member.store.ts +95 -5
- package/store/rules.js +27 -12
- package/types/index.ts +32 -0
- package/store/messages.ts +0 -433
package/api/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ export class ApiClass {
|
|
|
13
13
|
|
|
14
14
|
private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
|
|
15
15
|
const dataStore = useDataStore();
|
|
16
|
-
if ((dataStore.isEFO && !this.baseURL) || (!dataStore.isEFO && (!this.baseURL || !this.productUrl))) {
|
|
16
|
+
if (((dataStore.isEFO || dataStore.isAML) && !this.baseURL) || (!dataStore.isEFO && !dataStore.isAML && (!this.baseURL || !this.productUrl))) {
|
|
17
17
|
console.error('No Axios baseURL or productURL');
|
|
18
18
|
}
|
|
19
19
|
const { data } = await useAxios(this.baseURL).request<T>(config);
|
|
@@ -137,35 +137,42 @@ export class ApiClass {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
async getCurrencies(): Promise<{ eur: number; usd: number }> {
|
|
141
|
+
return this.axiosCall({
|
|
142
|
+
method: Methods.GET,
|
|
143
|
+
url: '/Ekk/api/Currency/GetExchange',
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
140
147
|
async getContragent(queryData: any) {
|
|
141
148
|
return this.axiosCall({
|
|
142
149
|
method: Methods.GET,
|
|
143
|
-
url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName
|
|
150
|
+
url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
|
|
144
151
|
});
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
|
|
148
155
|
return this.axiosCall({
|
|
149
156
|
method: Methods.GET,
|
|
150
|
-
url:
|
|
157
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
151
158
|
});
|
|
152
159
|
}
|
|
153
160
|
|
|
154
161
|
async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
|
|
155
162
|
return this.axiosCall({
|
|
156
163
|
method: Methods.GET,
|
|
157
|
-
url:
|
|
164
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
158
165
|
});
|
|
159
166
|
}
|
|
160
167
|
|
|
161
168
|
async definedAnswers(filter: string) {
|
|
162
169
|
return this.axiosCall({
|
|
163
170
|
method: Methods.GET,
|
|
164
|
-
url: `/
|
|
171
|
+
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
|
|
165
172
|
});
|
|
166
173
|
}
|
|
167
174
|
|
|
168
|
-
async setSurvey(surveyData: AnketaFirst) {
|
|
175
|
+
async setSurvey(surveyData: AnketaFirst): Promise<string> {
|
|
169
176
|
return this.axiosCall({
|
|
170
177
|
method: Methods.POST,
|
|
171
178
|
data: surveyData,
|
|
@@ -227,7 +234,7 @@ export class ApiClass {
|
|
|
227
234
|
});
|
|
228
235
|
}
|
|
229
236
|
|
|
230
|
-
async getDicFileTypeList() {
|
|
237
|
+
async getDicFileTypeList(): Promise<Value[]> {
|
|
231
238
|
return this.axiosCall({
|
|
232
239
|
method: Methods.GET,
|
|
233
240
|
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
|
|
@@ -498,7 +505,7 @@ export class ApiClass {
|
|
|
498
505
|
}
|
|
499
506
|
|
|
500
507
|
async getProcessTariff(code: number | string = 5) {
|
|
501
|
-
return this.axiosCall({ url: `/
|
|
508
|
+
return this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
|
|
502
509
|
}
|
|
503
510
|
|
|
504
511
|
async setConfirmation(data: any) {
|
|
@@ -519,30 +526,37 @@ export class ApiClass {
|
|
|
519
526
|
async sendUnderwritingCouncilTask(data: any) {
|
|
520
527
|
return this.axiosCall({
|
|
521
528
|
method: Methods.POST,
|
|
522
|
-
url: '/
|
|
529
|
+
url: '/Arm/api/UnderwritingCouncil/SendTask',
|
|
523
530
|
data: data,
|
|
524
531
|
});
|
|
525
532
|
}
|
|
526
533
|
|
|
534
|
+
async getDictionaryItems(dictName: string): Promise<Value[]> {
|
|
535
|
+
return this.axiosCall({
|
|
536
|
+
method: Methods.GET,
|
|
537
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
|
|
527
541
|
async filterManagerByRegion(dictName: string, filterName: string) {
|
|
528
542
|
return this.axiosCall({
|
|
529
543
|
method: Methods.GET,
|
|
530
|
-
url: `/
|
|
544
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
|
|
531
545
|
});
|
|
532
546
|
}
|
|
533
547
|
|
|
534
548
|
async setINSISWorkData(data: any) {
|
|
535
549
|
return this.axiosCall({
|
|
536
550
|
method: Methods.POST,
|
|
537
|
-
url: `/
|
|
551
|
+
url: `/Arm/api/Bpm/SetInsisWorkData`,
|
|
538
552
|
data: data,
|
|
539
553
|
});
|
|
540
554
|
}
|
|
541
555
|
|
|
542
|
-
async searchAgentByName(name: string) {
|
|
556
|
+
async searchAgentByName(name: string): Promise<AgentData[]> {
|
|
543
557
|
return this.axiosCall({
|
|
544
558
|
method: Methods.GET,
|
|
545
|
-
url: `/
|
|
559
|
+
url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
|
|
546
560
|
});
|
|
547
561
|
}
|
|
548
562
|
}
|
package/api/interceptors.ts
CHANGED
|
@@ -21,7 +21,7 @@ export default function (axios: AxiosInstance) {
|
|
|
21
21
|
if (error.response.status === 401) {
|
|
22
22
|
dataStore.$reset();
|
|
23
23
|
localStorage.clear();
|
|
24
|
-
if (dataStore.isEFO) {
|
|
24
|
+
if (dataStore.isEFO || dataStore.isAML) {
|
|
25
25
|
router.push({ name: 'Auth', query: { error: 401 } });
|
|
26
26
|
} else {
|
|
27
27
|
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
10
10
|
{{ subtitle }}
|
|
11
11
|
</v-card-subtitle>
|
|
12
|
-
<v-card-actions class="gap-[16px]">
|
|
12
|
+
<v-card-actions class="gap-[16px] m-2">
|
|
13
13
|
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.yes')" :btn="$libStyles.blueBtn" @click="$emit('yes')"></base-btn>
|
|
14
14
|
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.no')" :btn="$libStyles.blueBtn" @click="$emit('no')" />
|
|
15
15
|
<slot v-if="actions !== 'default'" name="actions"></slot>
|
|
@@ -1,54 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
|
|
2
|
+
<div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
3
|
<div class="ml-5">
|
|
4
4
|
<p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
|
|
5
5
|
<p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
|
|
6
6
|
</div>
|
|
7
|
-
<div
|
|
7
|
+
<div
|
|
8
|
+
class="ml-5 mt-6 grid auto-rows-fr items-center"
|
|
9
|
+
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2 mb-6' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 ']"
|
|
10
|
+
>
|
|
8
11
|
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.fullName') }}</span>
|
|
9
12
|
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.iin') }}</span>
|
|
10
|
-
<span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('form.gender') }}</span>
|
|
11
|
-
<span :class="[$libStyles.textSimple]" class="font-medium"> {{ $t('form.birthDate') }} </span>
|
|
12
|
-
<span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('form.Country') }} </span>
|
|
13
|
-
<span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('code') }}</span>
|
|
13
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('form.gender') }}</span>
|
|
14
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium"> {{ $t('form.birthDate') }} </span>
|
|
15
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('form.Country') }} </span>
|
|
16
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('code') }}</span>
|
|
14
17
|
</div>
|
|
15
|
-
<div v-if="isMultiple" class="ml-5 flex flex-col">
|
|
16
|
-
<div
|
|
18
|
+
<div v-if="isMultiple" class="ml-5 flex flex-col" :class="[isShort ? 'mb-6' : '']">
|
|
19
|
+
<div
|
|
20
|
+
v-for="(each, index) of member"
|
|
21
|
+
:key="index"
|
|
22
|
+
class="grid auto-rows-fr items-center relative"
|
|
23
|
+
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
24
|
+
>
|
|
17
25
|
<span :class="[getMemberInfo(each).fullName === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(each).fullName }}</span>
|
|
18
26
|
<span :class="[getMemberInfo(each).iin === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(each).iin }}</span>
|
|
19
|
-
<span :class="[getMemberInfo(each).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
|
|
20
|
-
<span :class="[getMemberInfo(each).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
|
|
21
|
-
<span :class="[getMemberInfo(each).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
|
|
22
|
-
<span :class="[getMemberInfo(each).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).sectorCode }} </span>
|
|
27
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
|
|
28
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
|
|
29
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
|
|
30
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).sectorCode }} </span>
|
|
23
31
|
<div
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
v-if="!isShort"
|
|
33
|
+
class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
|
|
34
|
+
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
35
|
+
@click="!disabled && $emit('onMore', { whichForm, index })"
|
|
27
36
|
>
|
|
28
37
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
|
|
29
38
|
</div>
|
|
30
39
|
</div>
|
|
31
40
|
</div>
|
|
32
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
v-else
|
|
43
|
+
class="ml-5 grid auto-rows-fr items-center relative"
|
|
44
|
+
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
45
|
+
>
|
|
33
46
|
<span :class="[getMemberInfo(member).fullName === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(member).fullName }}</span>
|
|
34
47
|
<span :class="[getMemberInfo(member).iin === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(member).iin }}</span>
|
|
35
|
-
<span :class="[getMemberInfo(member).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(member).gender }} </span>
|
|
36
|
-
<span :class="[getMemberInfo(member).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(member).birthDate }} </span>
|
|
37
|
-
<span :class="[getMemberInfo(member).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).birthPlace }} </span>
|
|
38
|
-
<span :class="[getMemberInfo(member).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).sectorCode }} </span>
|
|
48
|
+
<span v-if="!isShort" :class="[getMemberInfo(member).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(member).gender }} </span>
|
|
49
|
+
<span v-if="!isShort" :class="[getMemberInfo(member).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(member).birthDate }} </span>
|
|
50
|
+
<span v-if="!isShort" :class="[getMemberInfo(member).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).birthPlace }} </span>
|
|
51
|
+
<span v-if="!isShort" :class="[getMemberInfo(member).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).sectorCode }} </span>
|
|
39
52
|
<div
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
v-if="!isShort"
|
|
54
|
+
class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
|
|
55
|
+
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
56
|
+
@click="!disabled && $emit('onMore', { whichForm })"
|
|
43
57
|
>
|
|
44
58
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
|
|
45
59
|
</div>
|
|
46
60
|
</div>
|
|
47
61
|
<div
|
|
48
|
-
v-if="isMultiple && more"
|
|
49
|
-
:class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple]"
|
|
50
|
-
class="
|
|
51
|
-
@click="memberStore.addMember(whichForm)"
|
|
62
|
+
v-if="isMultiple && more && !isShort"
|
|
63
|
+
:class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
64
|
+
class="rounded-b-lg h-[36px] flex items-center font-medium justify-center"
|
|
65
|
+
@click="!disabled && memberStore.addMember(whichForm)"
|
|
52
66
|
>
|
|
53
67
|
{{ $t('buttons.add') }}
|
|
54
68
|
</div>
|
|
@@ -76,6 +90,14 @@ export default defineComponent({
|
|
|
76
90
|
type: Boolean,
|
|
77
91
|
default: false,
|
|
78
92
|
},
|
|
93
|
+
disabled: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: false,
|
|
96
|
+
},
|
|
97
|
+
type: {
|
|
98
|
+
type: String as PropType<'short' | 'default'>,
|
|
99
|
+
default: 'default',
|
|
100
|
+
},
|
|
79
101
|
},
|
|
80
102
|
emits: ['onMore', 'addMember'],
|
|
81
103
|
setup(props) {
|
|
@@ -86,6 +108,8 @@ export default defineComponent({
|
|
|
86
108
|
const isMultiple = ref(multipleMembers.includes(props.whichForm));
|
|
87
109
|
const member: Member = formStore[props.whichForm as MemberKeys];
|
|
88
110
|
|
|
111
|
+
const isShort = computed(() => props.type === 'short');
|
|
112
|
+
|
|
89
113
|
const getMemberInfo = (memberData: Member) => {
|
|
90
114
|
return {
|
|
91
115
|
fullName: computed(() => (memberData && memberData.getFullNameShorted() ? memberData.getFullNameShorted() : null)).value,
|
|
@@ -105,6 +129,7 @@ export default defineComponent({
|
|
|
105
129
|
isMultiple,
|
|
106
130
|
|
|
107
131
|
// Computed
|
|
132
|
+
isShort,
|
|
108
133
|
|
|
109
134
|
// Functions
|
|
110
135
|
getMemberInfo,
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
|
+
<div class="mt-3 ml-5">
|
|
4
|
+
<p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ $t('form.attachManager') }}</p>
|
|
5
|
+
</div>
|
|
6
|
+
<v-form ref="vForm" class="flex flex-col mt-1">
|
|
7
|
+
<base-panel-input
|
|
8
|
+
class="pl-1"
|
|
9
|
+
v-model="formStore.SaleChanellPolicy"
|
|
10
|
+
:value="formStore.SaleChanellPolicy.nameRu"
|
|
11
|
+
:readonly="isReadonly"
|
|
12
|
+
:clearable="!isReadonly"
|
|
13
|
+
:label="$t('form.salesChanell')"
|
|
14
|
+
:rules="$rules.objectRequired"
|
|
15
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
16
|
+
@append="openPanel('SaleChanellPolicy', $t('form.salesChanell'))"
|
|
17
|
+
></base-panel-input>
|
|
18
|
+
<base-panel-input
|
|
19
|
+
class="pl-1"
|
|
20
|
+
v-model="formStore.RegionPolicy"
|
|
21
|
+
:value="formStore.RegionPolicy.nameRu"
|
|
22
|
+
:readonly="isReadonly"
|
|
23
|
+
:clearable="!isReadonly"
|
|
24
|
+
:label="$t('form.Region')"
|
|
25
|
+
:rules="$rules.objectRequired"
|
|
26
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
27
|
+
@append="openPanel('RegionPolicy', $t('form.Region'))"
|
|
28
|
+
></base-panel-input>
|
|
29
|
+
<base-panel-input
|
|
30
|
+
class="pl-1"
|
|
31
|
+
v-model="formStore.ManagerPolicy"
|
|
32
|
+
:value="formStore.ManagerPolicy.nameRu"
|
|
33
|
+
:readonly="isReadonly"
|
|
34
|
+
:clearable="!isReadonly"
|
|
35
|
+
:label="$t('form.manager')"
|
|
36
|
+
:rules="$rules.objectRequired"
|
|
37
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
38
|
+
@append="openPanel('ManagerPolicy', $t('form.manager'))"
|
|
39
|
+
></base-panel-input>
|
|
40
|
+
<base-panel-input
|
|
41
|
+
class="pl-1"
|
|
42
|
+
v-model="formStore.AgentData"
|
|
43
|
+
:value="formStore.AgentData.fullName"
|
|
44
|
+
:readonly="isReadonly"
|
|
45
|
+
:clearable="!isReadonly"
|
|
46
|
+
:label="$t('form.agent')"
|
|
47
|
+
:rules="$rules.agentDataRequired"
|
|
48
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
49
|
+
@append="openPanel('AgentData', $t('form.agent'))"
|
|
50
|
+
></base-panel-input>
|
|
51
|
+
</v-form>
|
|
52
|
+
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
53
|
+
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
54
|
+
<base-rounded-input
|
|
55
|
+
v-model="searchQuery"
|
|
56
|
+
:label="$t('labels.search')"
|
|
57
|
+
class="w-full p-2"
|
|
58
|
+
:hide-details="true"
|
|
59
|
+
:append-inner-icon="currentDictName === 'AgentData' ? 'mdi mdi-magnify' : ''"
|
|
60
|
+
@append="searchAgent"
|
|
61
|
+
></base-rounded-input>
|
|
62
|
+
<div v-if="dictList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
63
|
+
<div v-for="(item, index) in dictList" :key="item.id">
|
|
64
|
+
<base-panel-select-item
|
|
65
|
+
:key="index"
|
|
66
|
+
:text="currentDictName === 'AgentData' ? item.fullName : (item.nameRu as string)"
|
|
67
|
+
:selected="currentDictName === 'AgentData' ? item.fullName === panelValue.fullName : item.nameRu === panelValue.nameRu"
|
|
68
|
+
@click="pickPanelValue(item)"
|
|
69
|
+
></base-panel-select-item>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50"></base-loader>
|
|
73
|
+
</div>
|
|
74
|
+
</Teleport>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script lang="ts">
|
|
79
|
+
import { Value } from '@/composables/classes';
|
|
80
|
+
|
|
81
|
+
export default defineComponent({
|
|
82
|
+
props: {
|
|
83
|
+
title: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: '',
|
|
86
|
+
},
|
|
87
|
+
disabled: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
setup(props) {
|
|
93
|
+
const route = useRoute();
|
|
94
|
+
const dataStore = useDataStore();
|
|
95
|
+
const formStore = useFormStore();
|
|
96
|
+
const isPanelOpen = ref<boolean>(false);
|
|
97
|
+
const isPanelLoading = ref<boolean>(false);
|
|
98
|
+
const panelValue = ref<Value & AgentData>(new Value());
|
|
99
|
+
const searchQuery = ref<string>('');
|
|
100
|
+
const currentDictName = ref<string>();
|
|
101
|
+
|
|
102
|
+
const dictList = computed(() => {
|
|
103
|
+
if (!currentDictName.value) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
if (currentDictName.value === 'AgentData') {
|
|
107
|
+
return dataStore[currentDictName.value];
|
|
108
|
+
} else {
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
return dataStore[currentDictName.value].filter((item: Value) => {
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
return item.nameRu ? item.nameRu.toLowerCase().includes(searchQuery.value.toLowerCase()) : item.fullName.toLowerCase().includes(searchQuery.value.toLowerCase());
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const isReadonly = computed(
|
|
117
|
+
() =>
|
|
118
|
+
props.disabled ||
|
|
119
|
+
route.params.taskId === '0' ||
|
|
120
|
+
(route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
const openPanel = async (currentDict: string, title: string) => {
|
|
124
|
+
searchQuery.value = '';
|
|
125
|
+
if (dataStore.isTask() && !props.disabled) {
|
|
126
|
+
dataStore.panelAction = null;
|
|
127
|
+
dataStore.panel.open = true;
|
|
128
|
+
dataStore.panel.title = title;
|
|
129
|
+
currentDictName.value = currentDict;
|
|
130
|
+
|
|
131
|
+
if (currentDict === 'ManagerPolicy') {
|
|
132
|
+
isPanelLoading.value = true;
|
|
133
|
+
await dataStore.filterManagerByRegion(formStore.RegionPolicy?.ids);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
isPanelOpen.value = true;
|
|
137
|
+
panelValue.value = formStore[currentDict as keyof typeof formStore];
|
|
138
|
+
isPanelLoading.value = false;
|
|
139
|
+
} else {
|
|
140
|
+
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const searchAgent = async () => {
|
|
145
|
+
if (searchQuery.value) {
|
|
146
|
+
isPanelLoading.value = true;
|
|
147
|
+
await dataStore.searchAgentByName(searchQuery.value);
|
|
148
|
+
isPanelLoading.value = false;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const pickPanelValue = (answer: any) => {
|
|
153
|
+
// @ts-ignore
|
|
154
|
+
formStore[currentDictName.value] = answer;
|
|
155
|
+
isPanelOpen.value = false;
|
|
156
|
+
dataStore.panel.open = false;
|
|
157
|
+
searchQuery.value = '';
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
watch(searchQuery, () => {
|
|
161
|
+
if (searchQuery.value === null) {
|
|
162
|
+
searchQuery.value = '';
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
watch(
|
|
167
|
+
() => formStore.RegionPolicy,
|
|
168
|
+
(val, oldVal) => {
|
|
169
|
+
if (val.ids !== oldVal.ids) {
|
|
170
|
+
formStore.ManagerPolicy = new Value();
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
// State
|
|
177
|
+
formStore,
|
|
178
|
+
isPanelOpen,
|
|
179
|
+
isPanelLoading,
|
|
180
|
+
panelValue,
|
|
181
|
+
searchQuery,
|
|
182
|
+
Value,
|
|
183
|
+
currentDictName,
|
|
184
|
+
|
|
185
|
+
// Computed
|
|
186
|
+
dictList,
|
|
187
|
+
isReadonly,
|
|
188
|
+
|
|
189
|
+
// Functions
|
|
190
|
+
openPanel,
|
|
191
|
+
searchAgent,
|
|
192
|
+
pickPanelValue,
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
|
|
2
|
+
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
3
|
<div>
|
|
4
4
|
<p :class="[$libStyles.textTitle, $libStyles.greenText]">
|
|
5
5
|
{{ $t('productConditions') }}
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
{{ paymentPeriod }}
|
|
21
21
|
</span>
|
|
22
22
|
<div
|
|
23
|
-
class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end
|
|
24
|
-
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
|
|
25
|
-
@click="$emit('onMore', { whichForm: 'productConditions' })"
|
|
23
|
+
class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end"
|
|
24
|
+
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
25
|
+
@click="!disabled && $emit('onMore', { whichForm: 'productConditions' })"
|
|
26
26
|
>
|
|
27
27
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
|
|
28
28
|
</div>
|
|
@@ -37,6 +37,10 @@ export default defineComponent({
|
|
|
37
37
|
type: String,
|
|
38
38
|
default: '',
|
|
39
39
|
},
|
|
40
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
40
44
|
},
|
|
41
45
|
setup() {
|
|
42
46
|
const formStore = useFormStore();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vue-date-picker
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:reaonly="readonly"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
locale="ru"
|
|
9
|
+
model-type="dd.MM.yyyy"
|
|
10
|
+
position="left"
|
|
11
|
+
menu-class-name="!left-[30vw] md:!left-[70vw] lg:!left-[75vw]"
|
|
12
|
+
teleport=".v-form"
|
|
13
|
+
:offset="-50"
|
|
14
|
+
:close-on-scroll="true"
|
|
15
|
+
:enable-time-picker="false"
|
|
16
|
+
cancel-text="Отменить"
|
|
17
|
+
select-text="Выбрать"
|
|
18
|
+
>
|
|
19
|
+
<template #trigger>
|
|
20
|
+
<v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer"></v-icon>
|
|
21
|
+
</template>
|
|
22
|
+
</vue-date-picker>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
readonly: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
@@ -19,15 +19,19 @@
|
|
|
19
19
|
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
20
20
|
:append-icon="appendIcon ? appendIcon : ''"
|
|
21
21
|
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
|
-
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
23
22
|
:bg-color="bgColor ? bgColor : ''"
|
|
23
|
+
:suffix="suffix"
|
|
24
|
+
@input="$emit('input', $event)"
|
|
24
25
|
@keyup.enter.prevent="submitted"
|
|
25
26
|
@click:append="!props.readonly && $emit('append-out')"
|
|
26
27
|
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
27
|
-
@click:append-inner="!props.readonly && $emit('append')"
|
|
28
28
|
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
29
29
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
30
30
|
>
|
|
31
|
+
<template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
|
|
32
|
+
<v-icon v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'" :icon="appendInnerIcon" @click="!props.readonly && $emit('append')"></v-icon>
|
|
33
|
+
<base-datepicker v-else :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)"></base-datepicker>
|
|
34
|
+
</template>
|
|
31
35
|
<template v-if="loading" #loader>
|
|
32
36
|
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
|
|
33
37
|
</template>
|
|
@@ -65,6 +69,10 @@ export default defineComponent({
|
|
|
65
69
|
type: String,
|
|
66
70
|
default: '',
|
|
67
71
|
},
|
|
72
|
+
suffix: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: '',
|
|
75
|
+
},
|
|
68
76
|
messages: {
|
|
69
77
|
type: [String, Array<string>],
|
|
70
78
|
},
|
|
@@ -112,7 +120,7 @@ export default defineComponent({
|
|
|
112
120
|
type: String,
|
|
113
121
|
},
|
|
114
122
|
},
|
|
115
|
-
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
123
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input'],
|
|
116
124
|
|
|
117
125
|
setup(props, { emit }) {
|
|
118
126
|
const submitted = (event: any) => {
|
|
@@ -168,4 +176,8 @@ export default defineComponent({
|
|
|
168
176
|
.form-input .v-field--error {
|
|
169
177
|
border-color: #ff5449;
|
|
170
178
|
}
|
|
179
|
+
.form-input .v-text-field__suffix {
|
|
180
|
+
padding-top: 30px;
|
|
181
|
+
font-size: 16px !important;
|
|
182
|
+
}
|
|
171
183
|
</style>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
11
11
|
></base-panel-item>
|
|
12
12
|
<base-panel-item
|
|
13
|
-
v-for="panelItem of dataStore.settings.items.filter(i =>
|
|
13
|
+
v-for="panelItem of dataStore.settings.items.filter(i => $dataStore.filters.show(i))"
|
|
14
14
|
:key="panelItem.title!"
|
|
15
15
|
class="cursor-pointer"
|
|
16
16
|
@click="panelItem.action ? panelItem.action() : null"
|
|
@@ -34,7 +34,7 @@ const dataStore = useDataStore();
|
|
|
34
34
|
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
35
35
|
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
36
36
|
if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
|
|
37
|
-
if (dataStore.isEFO) {
|
|
37
|
+
if (dataStore.isEFO || dataStore.isAML) {
|
|
38
38
|
dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
|
|
39
39
|
} else {
|
|
40
40
|
dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu v-if="items.length" :activator="activator" location="bottom center" :offset="top" transition="scale-transition">
|
|
3
|
+
<base-form-text-section class="p-4 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
|
|
4
|
+
<div v-for="item of items.filter(i => $dataStore.filters.show(i))" :key="item.id">
|
|
5
|
+
<base-menu-nav-item :class="[$libStyles.textSimple]" :menu-item="item" @click="$emit(item.id)"></base-menu-nav-item>
|
|
6
|
+
</div>
|
|
7
|
+
</base-form-text-section>
|
|
8
|
+
</v-menu>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { MenuItem } from '@/composables/classes';
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
props: {
|
|
16
|
+
items: {
|
|
17
|
+
type: Array as PropType<MenuItem[]>,
|
|
18
|
+
default: [],
|
|
19
|
+
},
|
|
20
|
+
activator: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'parent',
|
|
23
|
+
},
|
|
24
|
+
top: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 10,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
</script>
|