hl-core 0.0.9-beta.5 → 0.0.9-beta.7
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/interceptors.ts +16 -14
- package/components/Button/Btn.vue +2 -2
- package/components/Complex/MessageBlock.vue +1 -1
- package/components/Dialog/Dialog.vue +24 -13
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedSelect.vue +13 -0
- package/components/Pages/ContragentForm.vue +103 -29
- package/composables/index.ts +10 -0
- package/composables/styles.ts +18 -9
- package/layouts/default.vue +3 -0
- package/locales/ru.json +10 -0
- package/package.json +1 -1
- package/store/rules.ts +11 -2
package/api/interceptors.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
1
|
+
import { AxiosError, AxiosInstance } from 'axios';
|
|
2
2
|
|
|
3
3
|
export default function (axios: AxiosInstance) {
|
|
4
4
|
axios.interceptors.request.use(
|
|
@@ -9,7 +9,7 @@ export default function (axios: AxiosInstance) {
|
|
|
9
9
|
}
|
|
10
10
|
return request;
|
|
11
11
|
},
|
|
12
|
-
error => {
|
|
12
|
+
(error: AxiosError) => {
|
|
13
13
|
return Promise.reject(error);
|
|
14
14
|
},
|
|
15
15
|
);
|
|
@@ -17,22 +17,24 @@ export default function (axios: AxiosInstance) {
|
|
|
17
17
|
response => {
|
|
18
18
|
return response;
|
|
19
19
|
},
|
|
20
|
-
error => {
|
|
20
|
+
(error: AxiosError) => {
|
|
21
21
|
const dataStore = useDataStore();
|
|
22
22
|
if (!dataStore.isCalculator) {
|
|
23
23
|
const router = useRouter();
|
|
24
|
-
if (error.response.status
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
if (error && error.response && error.response.status) {
|
|
25
|
+
if (error.response.status === 401) {
|
|
26
|
+
dataStore.$reset();
|
|
27
|
+
localStorage.clear();
|
|
28
|
+
if (dataStore.isBridge) {
|
|
29
|
+
router.push({ name: 'Auth', query: { error: 401 } });
|
|
30
|
+
} else {
|
|
31
|
+
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
32
|
+
}
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
if (error.response.status >= 500) {
|
|
35
|
+
if (router.currentRoute.value.name !== 'Auth') {
|
|
36
|
+
dataStore.showToaster('error', error.stack ?? dataStore.t('toaster.error'), 5000);
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
3
|
type="button"
|
|
4
|
-
class="transition-all"
|
|
4
|
+
class="transition-all border-solid"
|
|
5
5
|
@click="$emit('clicked')"
|
|
6
6
|
:disabled="disabled || loading"
|
|
7
7
|
:class="[
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
14
|
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2" />
|
|
15
|
-
<span v-if="!loading">{{ text }}</span>
|
|
15
|
+
<span class="!text-inherit" v-if="!loading">{{ text }}</span>
|
|
16
16
|
</button>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-dialog :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
|
|
3
|
-
<v-card class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
<v-card class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/5 xl:w-[600px] rounded-lg !px-10 !py-9">
|
|
4
|
+
<div class="flex gap-6">
|
|
5
|
+
<div v-if="Object.keys(icon).length" class="h-14 w-14 flex items-center justify-center text-[20px]" :class="[$styles.rounded, icon.color, icon.bg]">
|
|
6
|
+
<v-icon :icon="icon.mdi"></v-icon>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="h-full">
|
|
9
|
+
<v-card-title class="!p-0">
|
|
10
|
+
<slot v-if="!title" name="title"></slot>
|
|
11
|
+
{{ title }}
|
|
12
|
+
<v-btn class="!absolute top-2 right-3" icon="mdi mdi-window-close" variant="plain" @click="$emit('update:modelValue', null)" />
|
|
13
|
+
</v-card-title>
|
|
14
|
+
<v-card-subtitle class="!px-0 !pt-2">
|
|
15
|
+
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
16
|
+
{{ subtitle }}
|
|
17
|
+
</v-card-subtitle>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<v-card-actions class="gap-[16px] !p-0 !mt-6">
|
|
21
|
+
<base-btn v-if="actions === 'default'" class="h-[44px]" :text="$dataStore.t('confirm.yes')" :btn="$styles.whiteBtnBlueBr" @click="$emit('yes')" />
|
|
22
|
+
<base-btn v-if="actions === 'default'" class="h-[44px]" :text="$dataStore.t('confirm.no')" :btn="$styles.blueBtn" @click="$emit('no')" />
|
|
16
23
|
<slot v-if="actions !== 'default'" name="actions"></slot>
|
|
17
24
|
</v-card-actions>
|
|
18
25
|
</v-card>
|
|
@@ -40,6 +47,10 @@ export default defineComponent({
|
|
|
40
47
|
type: String,
|
|
41
48
|
default: 'default',
|
|
42
49
|
},
|
|
50
|
+
icon: {
|
|
51
|
+
type: Object as PropType<{ mdi: string; color: string; bg: string }>,
|
|
52
|
+
default: { mdi: 'mdi-circle-outline', color: 'text-[#FFF]', bg: 'bg-[#EEEEEE]' },
|
|
53
|
+
},
|
|
43
54
|
},
|
|
44
55
|
emits: ['update:modelValue', 'yes', 'no'],
|
|
45
56
|
});
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
:placeholder="placeholder"
|
|
8
8
|
:label="label"
|
|
9
9
|
:variant="variant"
|
|
10
|
+
:density="(density as any)"
|
|
11
|
+
:menu-icon="menuIcon"
|
|
10
12
|
:clear-icon="clearIcon"
|
|
11
13
|
:color="color"
|
|
12
14
|
:hint="hint"
|
|
@@ -78,10 +80,18 @@ export default defineComponent({
|
|
|
78
80
|
type: String as PropType<InputVariants>,
|
|
79
81
|
default: 'solo',
|
|
80
82
|
},
|
|
83
|
+
density: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: 'compact',
|
|
86
|
+
},
|
|
81
87
|
color: {
|
|
82
88
|
type: String,
|
|
83
89
|
default: '#009c73',
|
|
84
90
|
},
|
|
91
|
+
menuIcon: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: 'mdi-chevron-down',
|
|
94
|
+
},
|
|
85
95
|
clearIcon: {
|
|
86
96
|
type: String,
|
|
87
97
|
default: 'mdi-close',
|
|
@@ -122,6 +132,9 @@ export default defineComponent({
|
|
|
122
132
|
border: none !important;
|
|
123
133
|
outline: none !important;
|
|
124
134
|
}
|
|
135
|
+
.rounded-select.v-input {
|
|
136
|
+
flex: unset !important;
|
|
137
|
+
}
|
|
125
138
|
.rounded-select .v-label.v-field-label {
|
|
126
139
|
top: 20px;
|
|
127
140
|
}
|
|
@@ -2,22 +2,58 @@
|
|
|
2
2
|
<section v-show="showForm" class="flex flex-col gap-4 px-[10px]">
|
|
3
3
|
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[75vh] overflow-y-scroll">
|
|
4
4
|
<base-form-section :title="$dataStore.t('form.personalData')" class="mt-[14px]">
|
|
5
|
-
<base-form-input
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<base-form-input
|
|
6
|
+
v-model="member.phoneNumber"
|
|
7
|
+
:label="$dataStore.t('form.phoneNumber')"
|
|
8
|
+
:readonly="disabled"
|
|
9
|
+
:clearable="!disabled"
|
|
10
|
+
:maska="$maska.phone"
|
|
11
|
+
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
12
|
+
/>
|
|
13
|
+
<base-form-input
|
|
14
|
+
v-model="member.iin"
|
|
15
|
+
:label="$dataStore.t('form.iin')"
|
|
16
|
+
:readonly="disabled"
|
|
17
|
+
:clearable="!disabled"
|
|
18
|
+
:maska="$maska.iin"
|
|
19
|
+
:rules="$rules.required.concat($rules.iinRight)"
|
|
20
|
+
/>
|
|
21
|
+
<base-form-input
|
|
22
|
+
v-model.trim="member.lastName"
|
|
23
|
+
:label="$dataStore.t('form.lastName')"
|
|
24
|
+
:readonly="disabled"
|
|
25
|
+
:clearable="!disabled"
|
|
26
|
+
:rules="$rules.required.concat($rules.cyrillic)"
|
|
27
|
+
/>
|
|
28
|
+
<base-form-input
|
|
29
|
+
v-model.trim="member.firstName"
|
|
30
|
+
:label="$dataStore.t('form.firstName')"
|
|
31
|
+
:readonly="disabled"
|
|
32
|
+
:clearable="!disabled"
|
|
33
|
+
:rules="$rules.required.concat($rules.cyrillic)"
|
|
34
|
+
/>
|
|
35
|
+
<base-form-input
|
|
36
|
+
v-model.trim="member.middleName"
|
|
37
|
+
:label="$dataStore.t('form.middleName')"
|
|
38
|
+
:readonly="disabled"
|
|
39
|
+
:clearable="!disabled"
|
|
40
|
+
:rules="$rules.cyrillicNonRequired"
|
|
41
|
+
/>
|
|
10
42
|
<base-form-input
|
|
11
43
|
v-model="member.birthDate"
|
|
12
44
|
:label="$dataStore.t('form.birthDate')"
|
|
45
|
+
:readonly="disabled"
|
|
46
|
+
:clearable="!disabled"
|
|
13
47
|
:rules="$rules.required.concat($rules.birthDate)"
|
|
14
48
|
:maska="$maska.date"
|
|
15
49
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
16
50
|
/>
|
|
17
|
-
<base-form-input v-model="member.age" :label="$dataStore.t('form.age')" :rules="$rules.numbers.concat($rules.age18)" />
|
|
51
|
+
<base-form-input v-model="member.age" :label="$dataStore.t('form.age')" :readonly="disabled" :clearable="!disabled" :rules="$rules.numbers.concat($rules.age18)" />
|
|
18
52
|
<base-panel-input
|
|
19
53
|
v-model="member.gender"
|
|
20
54
|
:value="member.gender.nameRu"
|
|
55
|
+
:readonly="disabled"
|
|
56
|
+
:clearable="!disabled"
|
|
21
57
|
:label="$dataStore.t('form.gender')"
|
|
22
58
|
:rules="$rules.objectRequired"
|
|
23
59
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -25,15 +61,17 @@
|
|
|
25
61
|
/>
|
|
26
62
|
</base-form-section>
|
|
27
63
|
<!-- <base-form-section :title="$dataStore.t('form.jobData')">
|
|
28
|
-
<base-form-input v-model.trim="member.job" :label="$dataStore.t('form.job')" :rules="$rules.required" />
|
|
29
|
-
<base-form-input v-model.trim="member.jobPosition" :label="$dataStore.t('form.jobPosition')" :rules="$rules.required" />
|
|
30
|
-
<base-form-input v-model.trim="member.jobPlace" :label="$dataStore.t('form.jobPlace')" :rules="$rules.required" />
|
|
64
|
+
<base-form-input v-model.trim="member.job" :label="$dataStore.t('form.job')" :readonly="disabled" :clearable="!disabled" :rules="$rules.required" />
|
|
65
|
+
<base-form-input v-model.trim="member.jobPosition" :label="$dataStore.t('form.jobPosition')" :readonly="disabled" :clearable="!disabled" :rules="$rules.required" />
|
|
66
|
+
<base-form-input v-model.trim="member.jobPlace" :label="$dataStore.t('form.jobPlace')" :readonly="disabled" :clearable="!disabled" :rules="$rules.required" />
|
|
31
67
|
</base-form-section> -->
|
|
32
68
|
<base-form-section :title="$dataStore.t('form.placeRegistration')">
|
|
33
69
|
<base-panel-input
|
|
34
70
|
v-model="member.registrationCountry"
|
|
35
71
|
:value="member.registrationCountry.nameRu"
|
|
36
72
|
:label="$dataStore.t('form.Country')"
|
|
73
|
+
:readonly="disabled"
|
|
74
|
+
:clearable="!disabled"
|
|
37
75
|
:rules="$rules.objectRequired"
|
|
38
76
|
append-inner-icon="mdi mdi-chevron-right"
|
|
39
77
|
@append="openPanel($dataStore.t('form.Country'), [], 'registrationCountry', $dataStore.getCountries)"
|
|
@@ -44,6 +82,8 @@
|
|
|
44
82
|
v-model="member.registrationProvince"
|
|
45
83
|
:value="member.registrationProvince.nameRu"
|
|
46
84
|
:label="$dataStore.t('form.Province')"
|
|
85
|
+
:readonly="disabled"
|
|
86
|
+
:clearable="!disabled"
|
|
47
87
|
:rules="$rules.objectRequired"
|
|
48
88
|
append-inner-icon="mdi mdi-chevron-right"
|
|
49
89
|
@append="openPanel($dataStore.t('form.Province'), [], 'registrationProvince', $dataStore.getStates, 'registrationCountry')"
|
|
@@ -52,6 +92,8 @@
|
|
|
52
92
|
v-model="member.registrationRegionType"
|
|
53
93
|
:value="member.registrationRegionType.nameRu"
|
|
54
94
|
:label="$dataStore.t('form.RegionType')"
|
|
95
|
+
:readonly="disabled"
|
|
96
|
+
:clearable="!disabled"
|
|
55
97
|
:rules="$rules.objectRequired"
|
|
56
98
|
append-inner-icon="mdi mdi-chevron-right"
|
|
57
99
|
@append="openPanel($dataStore.t('form.RegionType'), [], 'registrationRegionType', $dataStore.getLocalityTypes)"
|
|
@@ -61,6 +103,8 @@
|
|
|
61
103
|
v-model="member.registrationRegion"
|
|
62
104
|
:value="member.registrationRegion.nameRu"
|
|
63
105
|
:label="$dataStore.t('form.Region')"
|
|
106
|
+
:readonly="disabled"
|
|
107
|
+
:clearable="!disabled"
|
|
64
108
|
:rules="$rules.objectRequired"
|
|
65
109
|
append-inner-icon="mdi mdi-chevron-right"
|
|
66
110
|
@append="openPanel($dataStore.t('form.Region'), [], 'registrationRegion', $dataStore.getRegions, 'registrationProvince')"
|
|
@@ -69,15 +113,23 @@
|
|
|
69
113
|
v-model="member.registrationCity"
|
|
70
114
|
:value="member.registrationCity.nameRu"
|
|
71
115
|
:label="$dataStore.t('form.City')"
|
|
116
|
+
:readonly="disabled"
|
|
117
|
+
:clearable="!disabled"
|
|
72
118
|
:rules="$rules.objectRequired"
|
|
73
119
|
append-inner-icon="mdi mdi-chevron-right"
|
|
74
120
|
@append="openPanel($dataStore.t('form.City'), [], 'registrationCity', $dataStore.getCities, 'registrationProvince')"
|
|
75
121
|
/>
|
|
76
|
-
<base-form-input v-model.trim="member.registrationQuarter" :label="$dataStore.t('form.Quarter')" />
|
|
77
|
-
<base-form-input v-model.trim="member.registrationMicroDistrict" :label="$dataStore.t('form.MicroDistrict')" />
|
|
78
|
-
<base-form-input v-model.trim="member.registrationStreet" :rules="$rules.required" :label="$dataStore.t('form.Street')" />
|
|
79
|
-
<base-form-input
|
|
80
|
-
|
|
122
|
+
<base-form-input v-model.trim="member.registrationQuarter" :label="$dataStore.t('form.Quarter')" :readonly="disabled" :clearable="!disabled" />
|
|
123
|
+
<base-form-input v-model.trim="member.registrationMicroDistrict" :label="$dataStore.t('form.MicroDistrict')" :readonly="disabled" :clearable="!disabled" />
|
|
124
|
+
<base-form-input v-model.trim="member.registrationStreet" :rules="$rules.required" :label="$dataStore.t('form.Street')" :readonly="disabled" :clearable="!disabled" />
|
|
125
|
+
<base-form-input
|
|
126
|
+
v-model.trim="member.registrationNumberHouse"
|
|
127
|
+
:rules="$rules.required"
|
|
128
|
+
:label="$dataStore.t('form.NumberHouse')"
|
|
129
|
+
:readonly="disabled"
|
|
130
|
+
:clearable="!disabled"
|
|
131
|
+
/>
|
|
132
|
+
<base-form-input v-model.trim="member.registrationNumberApartment" :label="$dataStore.t('form.NumberApartment')" :readonly="disabled" :clearable="!disabled" />
|
|
81
133
|
</div>
|
|
82
134
|
</base-fade-transition>
|
|
83
135
|
</base-form-section>
|
|
@@ -86,31 +138,25 @@
|
|
|
86
138
|
v-model="member.birthPlace"
|
|
87
139
|
:value="member.birthPlace.nameRu"
|
|
88
140
|
:label="$dataStore.t('form.Country')"
|
|
141
|
+
:readonly="disabled"
|
|
142
|
+
:clearable="!disabled"
|
|
89
143
|
:rules="$rules.objectRequired"
|
|
90
144
|
append-inner-icon="mdi mdi-chevron-right"
|
|
91
145
|
@append="openPanel($dataStore.t('form.Country'), [], 'birthPlace', $dataStore.getCountries)"
|
|
92
146
|
/>
|
|
93
|
-
<!-- TODO -->
|
|
94
|
-
<!-- <base-panel-input
|
|
95
|
-
v-model="member.birthRegion"
|
|
96
|
-
:value="member.birthRegion.nameRu"
|
|
97
|
-
:label="$dataStore.t('form.Region')"
|
|
98
|
-
|
|
99
|
-
:rules="$rules.objectRequired"
|
|
100
|
-
append-inner-icon="mdi mdi-chevron-right"
|
|
101
|
-
@append="openPanel($dataStore.t('form.Region'), [], 'birthRegion', $dataStore.getRegions)"
|
|
102
|
-
/> -->
|
|
103
147
|
</base-form-section>
|
|
104
148
|
<base-form-section :title="$dataStore.t('form.documentData')">
|
|
105
149
|
<base-panel-input
|
|
106
150
|
v-model="member.documentType"
|
|
107
151
|
:value="member.documentType.nameRu"
|
|
108
152
|
:label="$dataStore.t('form.documentType')"
|
|
153
|
+
:readonly="disabled"
|
|
154
|
+
:clearable="!disabled"
|
|
109
155
|
:rules="$rules.objectRequired"
|
|
110
156
|
append-inner-icon="mdi mdi-chevron-right"
|
|
111
157
|
@append="openPanel($dataStore.t('form.documentType'), [], 'documentType', $dataStore.getDocumentTypes)"
|
|
112
158
|
/>
|
|
113
|
-
<base-form-input v-model.trim="member.documentNumber" :label="$dataStore.t('form.documentNumber')" :rules="$rules.required" />
|
|
159
|
+
<base-form-input v-model.trim="member.documentNumber" :label="$dataStore.t('form.documentNumber')" :readonly="disabled" :clearable="!disabled" :rules="$rules.required" />
|
|
114
160
|
<!-- <base-file-input v-if="!memberDocument" :disabled="isDisabled" :clearable="!isDisabled" @input="attachFile($event)" />
|
|
115
161
|
<base-empty-form-field v-if="memberDocument" @click="!isDisabled && openCustomPanel('document')" class="justify-between">
|
|
116
162
|
{{ `${memberDocument.fileTypeName} - ${memberDocument.fileName}` }}
|
|
@@ -120,6 +166,8 @@
|
|
|
120
166
|
v-model="member.documentIssuers"
|
|
121
167
|
:value="member.documentIssuers.nameRu"
|
|
122
168
|
:label="$dataStore.t('form.documentIssuers')"
|
|
169
|
+
:readonly="disabled"
|
|
170
|
+
:clearable="!disabled"
|
|
123
171
|
:rules="$rules.objectRequired"
|
|
124
172
|
append-inner-icon="mdi mdi-chevron-right"
|
|
125
173
|
@append="openPanel($dataStore.t('form.documentIssuers'), [], 'documentIssuers', $dataStore.getDocumentIssuers)"
|
|
@@ -128,6 +176,8 @@
|
|
|
128
176
|
v-model="member.documentDate"
|
|
129
177
|
:label="$dataStore.t('form.documentDate')"
|
|
130
178
|
:rules="$rules.required.concat($rules.date)"
|
|
179
|
+
:readonly="disabled"
|
|
180
|
+
:clearable="!disabled"
|
|
131
181
|
:maska="$maska.date"
|
|
132
182
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
133
183
|
/>
|
|
@@ -136,6 +186,8 @@
|
|
|
136
186
|
v-if="member.documentType.ids !== 'SBI' && member.documentType.ids !== 'VNZ'"
|
|
137
187
|
v-model="member.documentExpire"
|
|
138
188
|
:label="$dataStore.t('form.documentExpire')"
|
|
189
|
+
:readonly="disabled"
|
|
190
|
+
:clearable="!disabled"
|
|
139
191
|
:rules="$rules.required.concat($rules.date)"
|
|
140
192
|
:maska="$maska.date"
|
|
141
193
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
@@ -145,6 +197,8 @@
|
|
|
145
197
|
v-model="member.signOfResidency"
|
|
146
198
|
:value="member.signOfResidency.nameRu"
|
|
147
199
|
:label="$dataStore.t('form.signOfResidency')"
|
|
200
|
+
:readonly="disabled"
|
|
201
|
+
:clearable="!disabled"
|
|
148
202
|
:rules="$rules.objectRequired"
|
|
149
203
|
append-inner-icon="mdi mdi-chevron-right"
|
|
150
204
|
@append="openPanel($dataStore.t('form.signOfResidency'), [], 'signOfResidency', $dataStore.getResidents)"
|
|
@@ -153,6 +207,8 @@
|
|
|
153
207
|
v-model="member.countryOfTaxResidency"
|
|
154
208
|
:value="member.countryOfTaxResidency.nameRu"
|
|
155
209
|
:label="$dataStore.t('form.countryOfTaxResidency')"
|
|
210
|
+
:readonly="disabled"
|
|
211
|
+
:clearable="!disabled"
|
|
156
212
|
:rules="$rules.objectRequired"
|
|
157
213
|
append-inner-icon="mdi mdi-chevron-right"
|
|
158
214
|
@append="openPanel($dataStore.t('form.countryOfTaxResidency'), [], 'countryOfTaxResidency', $dataStore.getTaxCountries)"
|
|
@@ -163,6 +219,8 @@
|
|
|
163
219
|
v-model="member.addTaxResidency"
|
|
164
220
|
:value="member.addTaxResidency.nameRu"
|
|
165
221
|
:label="$dataStore.t('form.addTaxResidency')"
|
|
222
|
+
:readonly="disabled"
|
|
223
|
+
:clearable="!disabled"
|
|
166
224
|
:rules="$rules.objectRequired"
|
|
167
225
|
append-inner-icon="mdi mdi-chevron-right"
|
|
168
226
|
@append="openPanel($dataStore.t('form.addTaxResidency'), [], 'addTaxResidency', $dataStore.getAdditionalTaxCountries)"
|
|
@@ -172,6 +230,8 @@
|
|
|
172
230
|
v-model="member.countryOfCitizenship"
|
|
173
231
|
:value="member.countryOfCitizenship.nameRu"
|
|
174
232
|
:label="$dataStore.t('form.countryOfCitizenship')"
|
|
233
|
+
:readonly="disabled"
|
|
234
|
+
:clearable="!disabled"
|
|
175
235
|
:rules="$rules.objectRequired"
|
|
176
236
|
append-inner-icon="mdi mdi-chevron-right"
|
|
177
237
|
@append="openPanel($dataStore.t('form.countryOfCitizenship'), [], 'countryOfCitizenship', $dataStore.getCitizenshipCountries)"
|
|
@@ -180,17 +240,27 @@
|
|
|
180
240
|
v-model="member.economySectorCode"
|
|
181
241
|
:value="member.economySectorCode.nameRu"
|
|
182
242
|
:label="$dataStore.t('form.economySectorCode')"
|
|
243
|
+
:readonly="disabled"
|
|
244
|
+
:clearable="!disabled"
|
|
183
245
|
:rules="$rules.objectRequired"
|
|
184
246
|
append-inner-icon="mdi mdi-chevron-right"
|
|
185
247
|
@append="openPanel($dataStore.t('form.economySectorCode'), [], 'economySectorCode', $dataStore.getSectorCodeList)"
|
|
186
248
|
/>
|
|
187
249
|
</base-form-section>
|
|
188
250
|
<base-form-section :title="$dataStore.t('form.contactsData')">
|
|
189
|
-
<base-form-input
|
|
190
|
-
|
|
251
|
+
<base-form-input
|
|
252
|
+
v-model="member.homePhone"
|
|
253
|
+
:maska="$maska.phone"
|
|
254
|
+
placeholder="+7 7"
|
|
255
|
+
:label="$dataStore.t('form.homePhone')"
|
|
256
|
+
:readonly="disabled"
|
|
257
|
+
:clearable="!disabled"
|
|
258
|
+
:rules="$rules.phoneFormat"
|
|
259
|
+
/>
|
|
260
|
+
<base-form-input v-model.trim="member.email" :label="$dataStore.t('form.email')" :readonly="disabled" :clearable="!disabled" :rules="$rules.email" />
|
|
191
261
|
</base-form-section>
|
|
192
262
|
</v-form>
|
|
193
|
-
<base-btn v-if="showSaveButton" :loading="isButtonLoading" :text="$dataStore.t('buttons.save')" @click="submitForm" />
|
|
263
|
+
<base-btn v-if="showSaveButton && !disabled" :loading="isButtonLoading" :text="$dataStore.t('buttons.save')" @click="submitForm" />
|
|
194
264
|
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
195
265
|
<div :class="[$styles.scrollPage]" class="relative flex flex-col items-center">
|
|
196
266
|
<i
|
|
@@ -217,7 +287,7 @@
|
|
|
217
287
|
</template>
|
|
218
288
|
|
|
219
289
|
<script lang="ts">
|
|
220
|
-
import { StoreMembers } from 'types/enum';
|
|
290
|
+
import { StoreMembers } from '../../types/enum';
|
|
221
291
|
import { Member, Value } from '../../composables/classes';
|
|
222
292
|
|
|
223
293
|
export default defineComponent({
|
|
@@ -234,6 +304,10 @@ export default defineComponent({
|
|
|
234
304
|
type: String as PropType<'contragent' | keyof typeof StoreMembers>,
|
|
235
305
|
default: 'contragent',
|
|
236
306
|
},
|
|
307
|
+
disabled: {
|
|
308
|
+
type: Boolean,
|
|
309
|
+
default: false,
|
|
310
|
+
},
|
|
237
311
|
},
|
|
238
312
|
emits: ['success'],
|
|
239
313
|
setup(props, { emit }) {
|
package/composables/index.ts
CHANGED
|
@@ -264,3 +264,13 @@ export const changeBridge = async (toBridge: 'efo' | 'lka', token: string) => {
|
|
|
264
264
|
}
|
|
265
265
|
window.open(`${bridgeUrl}/#/Token?token=${token}`, '_blank');
|
|
266
266
|
};
|
|
267
|
+
|
|
268
|
+
export const getFirstDayOfMonth = (year: number, month: number) => {
|
|
269
|
+
const date = new Date();
|
|
270
|
+
return new Date(year, month, 1, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export const getLastDayOfMonth = (year: number, month: number) => {
|
|
274
|
+
const date = new Date();
|
|
275
|
+
return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
276
|
+
};
|
package/composables/styles.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class Styles {
|
|
2
2
|
// Base
|
|
3
|
-
whiteBg: string = 'bg-
|
|
4
|
-
whiteText: string = 'text-
|
|
5
|
-
blackText: string = 'text-
|
|
3
|
+
whiteBg: string = 'bg-[#FFF]';
|
|
4
|
+
whiteText: string = '!text-[#FFF]';
|
|
5
|
+
blackText: string = '!text-[#000]';
|
|
6
6
|
bodyBg: string = '!bg-[#F5F5F5]';
|
|
7
7
|
|
|
8
8
|
whiteTextHover: string = 'hover:text-[#FFFFFF]';
|
|
@@ -11,7 +11,7 @@ export class Styles {
|
|
|
11
11
|
blueBgHover: string = 'hover:bg-[#96abd6]';
|
|
12
12
|
blueBgLight: string = 'bg-[#F3F6FC]';
|
|
13
13
|
blueBgLightHover: string = 'hover:bg-[#f5f8fd]';
|
|
14
|
-
blueText: string = 'text-[#A0B3D8]';
|
|
14
|
+
blueText: string = '!text-[#A0B3D8]';
|
|
15
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
16
16
|
|
|
17
17
|
// Green
|
|
@@ -23,13 +23,13 @@ export class Styles {
|
|
|
23
23
|
greenBgLightHover: string = 'hover:bg-[#dbf0e4]';
|
|
24
24
|
|
|
25
25
|
// Yellow
|
|
26
|
-
yellowText: string = 'text-[#FAB31C]';
|
|
26
|
+
yellowText: string = '!text-[#FAB31C]';
|
|
27
27
|
yellowBg: string = 'bg-[#FAB31C]';
|
|
28
28
|
yellowBgHover: string = 'hover:bg-[#FAB31C]';
|
|
29
29
|
|
|
30
30
|
// Grey
|
|
31
31
|
greyBg: string = 'bg-[#B8B8B8]';
|
|
32
|
-
greyText: string = 'text-[#B8B8B8]';
|
|
32
|
+
greyText: string = '!text-[#B8B8B8]';
|
|
33
33
|
greyTextLight: string = 'text-[#B8B8B8]';
|
|
34
34
|
greyIcon: string = 'text-[#DADADA]';
|
|
35
35
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
@@ -39,15 +39,22 @@ export class Styles {
|
|
|
39
39
|
greyTextDark: string = 'text-[#9197A1]';
|
|
40
40
|
|
|
41
41
|
// Red
|
|
42
|
-
redText: string = 'text-[#FD2D39]';
|
|
42
|
+
redText: string = '!text-[#FD2D39]';
|
|
43
43
|
redBg: string = 'bg-[#FF897D]';
|
|
44
44
|
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
45
45
|
// Error
|
|
46
46
|
errorBg: string = 'bg-[#FF5449]';
|
|
47
|
-
errorText: string = 'text-[#FF5449]';
|
|
47
|
+
errorText: string = '!text-[#FF5449]';
|
|
48
48
|
|
|
49
49
|
// Border
|
|
50
50
|
rounded: string = 'rounded-[8px]';
|
|
51
|
+
roundedT: string = 'rounded-t-[8px]';
|
|
52
|
+
roundedB: string = 'rounded-b-[8px]';
|
|
53
|
+
blueBorder: string = 'border-[1px] border-[#A0B3D8]';
|
|
54
|
+
blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
|
|
55
|
+
greenBorder: string = 'border-[1px] border-[#009C73]';
|
|
56
|
+
redBorder: string = 'border-[1px] border-[#FD2D39]';
|
|
57
|
+
yellowBorder: string = 'border-[1px] border-[#FAB31C]';
|
|
51
58
|
|
|
52
59
|
// Text
|
|
53
60
|
textSimple: string = 'text-[14px] leading-5';
|
|
@@ -63,6 +70,7 @@ export class Styles {
|
|
|
63
70
|
redBtn: string;
|
|
64
71
|
yellowBtn: string;
|
|
65
72
|
whiteBtn: string;
|
|
73
|
+
whiteBtnBlueBr: string;
|
|
66
74
|
blueLightBtn: string;
|
|
67
75
|
greenLightBtn: string;
|
|
68
76
|
|
|
@@ -72,7 +80,7 @@ export class Styles {
|
|
|
72
80
|
scrollPage: string;
|
|
73
81
|
|
|
74
82
|
// Muted or disabled
|
|
75
|
-
mutedText: string = 'text-[#99A3B3]';
|
|
83
|
+
mutedText: string = '!text-[#99A3B3]';
|
|
76
84
|
disabled: string = 'cursor-not-allowed opacity-50';
|
|
77
85
|
|
|
78
86
|
constructor() {
|
|
@@ -81,6 +89,7 @@ export class Styles {
|
|
|
81
89
|
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
82
90
|
this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
|
|
83
91
|
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
92
|
+
this.whiteBtnBlueBr = `${this.whiteBg} ${this.blueText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover} ${this.blueBorder}`;
|
|
84
93
|
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
85
94
|
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
86
95
|
this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
|
package/layouts/default.vue
CHANGED
package/locales/ru.json
CHANGED
|
@@ -311,6 +311,7 @@
|
|
|
311
311
|
"agentsInfo": "Сведения о страховых агентах",
|
|
312
312
|
"personalData": "Личные данные",
|
|
313
313
|
"info": "Данные об агенте",
|
|
314
|
+
"information": "Сведения",
|
|
314
315
|
"about": "Сведения об Агенте",
|
|
315
316
|
"level": "Уровень",
|
|
316
317
|
"subAgents": "Суб-агенты",
|
|
@@ -318,10 +319,12 @@
|
|
|
318
319
|
"myContracts": "Оформлено договоров",
|
|
319
320
|
"nextLevel": "Следующий уровень {text}",
|
|
320
321
|
"leftMy": "Осталось оформить лично",
|
|
322
|
+
"leftGroup": "Осталось оформить группой",
|
|
321
323
|
"leftAll": "Осталось оформить всего",
|
|
322
324
|
"donePolicies": "Оформлено полисов",
|
|
323
325
|
"successStat": "Статистика успешных сделок",
|
|
324
326
|
"doneMy": "Оформлено лично",
|
|
327
|
+
"doneGroup": "Оформлено группой",
|
|
325
328
|
"doneAll": "Всего оформлено",
|
|
326
329
|
"progressAll": "Прогресс за все время работы",
|
|
327
330
|
"subagentsCalled": "Привлечено суб-агентов",
|
|
@@ -336,6 +339,7 @@
|
|
|
336
339
|
"reportType": "Тип отчета",
|
|
337
340
|
"reportFile": "Файл отчета",
|
|
338
341
|
"reportDate": "Отчетная дата",
|
|
342
|
+
"agentPolicy": "Личные продажи",
|
|
339
343
|
"paymentJournal": "Журнал оплаты",
|
|
340
344
|
"journal": {
|
|
341
345
|
"incomeKz": "Приходы KZT",
|
|
@@ -385,6 +389,11 @@
|
|
|
385
389
|
"new": "Подать заявление"
|
|
386
390
|
},
|
|
387
391
|
"labels": {
|
|
392
|
+
"sorting": "Сортировка",
|
|
393
|
+
"premiumSum": "Сумма премии",
|
|
394
|
+
"department": "Департамент",
|
|
395
|
+
"fromDate": "Дата с",
|
|
396
|
+
"toDate": "Дата по",
|
|
388
397
|
"newVersion": "Новая версия",
|
|
389
398
|
"code": "Код",
|
|
390
399
|
"codes": "Коды",
|
|
@@ -476,6 +485,7 @@
|
|
|
476
485
|
"rules": {
|
|
477
486
|
"required": "Поле обязательно",
|
|
478
487
|
"cyrillic": "Поле должно содержать только кириллические символы",
|
|
488
|
+
"latin": "Поле должно содержать только латинские символы",
|
|
479
489
|
"email": "Неправильный адрес электронной почты",
|
|
480
490
|
"numbers": "Поле должно содержать только цифры",
|
|
481
491
|
"numbersSymbols": "Поле должно содержать цифры",
|
package/package.json
CHANGED
package/store/rules.ts
CHANGED
|
@@ -96,7 +96,11 @@ export const rules = {
|
|
|
96
96
|
date: [
|
|
97
97
|
(v: any) => {
|
|
98
98
|
if (v === null || v == '') return true;
|
|
99
|
-
if (
|
|
99
|
+
if (
|
|
100
|
+
/^(?:(?:(?:(?:0[1-9]|1[0-9]|2[0-8])[\.](?:0[1-9]|1[012]))|(?:(?:29|30|31)[\.](?:0[13578]|1[02]))|(?:(?:29|30)[\.](?:0[4,6,9]|11)))[\.](?:19|[2-3][0-9])\d\d)|(?:29[\.]02[\.](?:19|[2-3][0-9])(?:00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$/.test(
|
|
101
|
+
v,
|
|
102
|
+
)
|
|
103
|
+
) {
|
|
100
104
|
return true;
|
|
101
105
|
} else {
|
|
102
106
|
return t('rules.date');
|
|
@@ -108,8 +112,13 @@ export const rules = {
|
|
|
108
112
|
age18ByDate: [(v: any) => Math.abs(new Date(Date.now() - new Date(formatDate(v)!).getTime()).getUTCFullYear() - 1970) >= 18 || t('rules.age18')],
|
|
109
113
|
birthDate: [
|
|
110
114
|
(v: any) => {
|
|
115
|
+
if (v === null || v == '') return true;
|
|
111
116
|
if (new Date(formatDate(v)!) > new Date(Date.now())) return t('rules.exceedDate');
|
|
112
|
-
if (
|
|
117
|
+
if (
|
|
118
|
+
/^(?:(?:(?:(?:0[1-9]|1[0-9]|2[0-8])[\.](?:0[1-9]|1[012]))|(?:(?:29|30|31)[\.](?:0[13578]|1[02]))|(?:(?:29|30)[\.](?:0[4,6,9]|11)))[\.](?:19|[2-3][0-9])\d\d)|(?:29[\.]02[\.](?:19|[2-3][0-9])(?:00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$/.test(
|
|
119
|
+
v,
|
|
120
|
+
)
|
|
121
|
+
) {
|
|
113
122
|
return true;
|
|
114
123
|
} else {
|
|
115
124
|
return t('rules.date');
|