hl-core 0.0.9-beta.28 → 0.0.9-beta.29
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/components/Complex/MessageBlock.vue +1 -1
- package/components/Complex/Page.vue +1 -1
- package/components/Form/ManagerAttachment.vue +42 -12
- package/components/Input/FileInput.vue +8 -2
- package/components/Layout/Drawer.vue +15 -3
- package/components/Layout/Header.vue +1 -1
- package/components/Menu/MenuNav.vue +2 -2
- package/components/Pages/Anketa.vue +6 -6
- package/components/Pages/ContragentForm.vue +6 -6
- package/components/Pages/Documents.vue +4 -6
- package/components/Pages/MemberForm.vue +26 -26
- package/components/Pages/ProductAgreement.vue +1 -8
- package/components/Pages/ProductConditions.vue +22 -22
- package/components/Panel/PanelHandler.vue +88 -6
- package/components/Panel/RightPanelCloser.vue +7 -0
- package/composables/classes.ts +101 -108
- package/layouts/default.vue +42 -3
- package/locales/ru.json +23 -8
- package/package.json +1 -1
- package/store/data.store.ts +18 -13
- package/types/index.ts +2 -2
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
class="pl-1"
|
|
9
9
|
v-model="formStore.SaleChanellPolicy"
|
|
10
10
|
:value="formStore.SaleChanellPolicy?.nameRu"
|
|
11
|
-
:readonly="
|
|
12
|
-
:clearable="!
|
|
11
|
+
:readonly="isSaleChanellReadonly"
|
|
12
|
+
:clearable="!isSaleChanellReadonly"
|
|
13
13
|
:label="$dataStore.t('form.salesChanell')"
|
|
14
14
|
:rules="$rules.objectRequired"
|
|
15
15
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
class="pl-1"
|
|
20
20
|
v-model="formStore.RegionPolicy"
|
|
21
21
|
:value="formStore.RegionPolicy?.nameRu"
|
|
22
|
-
:readonly="
|
|
23
|
-
:clearable="!
|
|
22
|
+
:readonly="isRegionReadonly"
|
|
23
|
+
:clearable="!isRegionReadonly"
|
|
24
24
|
:label="$dataStore.t('form.Region')"
|
|
25
25
|
:rules="$rules.objectRequired"
|
|
26
26
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
class="pl-1"
|
|
31
31
|
v-model="formStore.ManagerPolicy"
|
|
32
32
|
:value="formStore.ManagerPolicy?.nameRu"
|
|
33
|
-
:readonly="
|
|
34
|
-
:clearable="!
|
|
33
|
+
:readonly="isManagerReadonly"
|
|
34
|
+
:clearable="!isManagerReadonly"
|
|
35
35
|
:label="$dataStore.t('form.manager')"
|
|
36
36
|
:rules="$rules.objectRequired"
|
|
37
37
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
class="pl-1"
|
|
42
42
|
v-model="formStore.AgentData"
|
|
43
43
|
:value="formStore.AgentData?.fullName"
|
|
44
|
-
:readonly="
|
|
45
|
-
:clearable="!
|
|
44
|
+
:readonly="isAgentReadonly"
|
|
45
|
+
:clearable="!isAgentReadonly"
|
|
46
46
|
:label="$dataStore.t('form.agent')"
|
|
47
47
|
:rules="$rules.agentDataRequired"
|
|
48
48
|
append-inner-icon="mdi mdi-chevron-right"
|
|
49
49
|
@append="openPanel('AgentData', $dataStore.t('form.agent'))"
|
|
50
50
|
/>
|
|
51
51
|
</v-form>
|
|
52
|
-
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
52
|
+
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
53
53
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
54
54
|
<base-rounded-input
|
|
55
55
|
v-model.trim="searchQuery"
|
|
@@ -127,13 +127,29 @@ export default defineComponent({
|
|
|
127
127
|
!dataStore.isInitiator() ||
|
|
128
128
|
(route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
|
|
129
129
|
);
|
|
130
|
+
const isSaleChanellReadonly = computed(() => {
|
|
131
|
+
if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
|
|
132
|
+
return isReadonly.value;
|
|
133
|
+
});
|
|
134
|
+
const isRegionReadonly = computed(() => {
|
|
135
|
+
if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
|
|
136
|
+
return isReadonly.value;
|
|
137
|
+
});
|
|
138
|
+
const isManagerReadonly = computed(() => {
|
|
139
|
+
if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
|
|
140
|
+
return isReadonly.value;
|
|
141
|
+
});
|
|
142
|
+
const isAgentReadonly = computed(() => {
|
|
143
|
+
if (dataStore.isGons) return isReadonly.value || !dataStore.isAgent();
|
|
144
|
+
return isReadonly.value;
|
|
145
|
+
});
|
|
130
146
|
|
|
131
147
|
const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
|
|
132
148
|
searchQuery.value = '';
|
|
133
149
|
if (dataStore.isTask() && !props.disabled) {
|
|
134
150
|
dataStore.panelAction = null;
|
|
135
|
-
dataStore.
|
|
136
|
-
dataStore.
|
|
151
|
+
dataStore.rightPanel.open = true;
|
|
152
|
+
dataStore.rightPanel.title = title;
|
|
137
153
|
currentDictName.value = currentDict;
|
|
138
154
|
|
|
139
155
|
if (currentDict === 'ManagerPolicy' && formStore.RegionPolicy.ids) {
|
|
@@ -161,7 +177,7 @@ export default defineComponent({
|
|
|
161
177
|
// @ts-ignore
|
|
162
178
|
formStore[currentDictName.value] = answer;
|
|
163
179
|
isPanelOpen.value = false;
|
|
164
|
-
dataStore.
|
|
180
|
+
dataStore.rightPanel.open = false;
|
|
165
181
|
searchQuery.value = '';
|
|
166
182
|
};
|
|
167
183
|
|
|
@@ -187,6 +203,16 @@ export default defineComponent({
|
|
|
187
203
|
},
|
|
188
204
|
);
|
|
189
205
|
|
|
206
|
+
watch(
|
|
207
|
+
() => dataStore.rightPanel.open,
|
|
208
|
+
() => {
|
|
209
|
+
if (dataStore.rightPanel.open === false) {
|
|
210
|
+
isPanelOpen.value = false;
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{ immediate: true },
|
|
214
|
+
);
|
|
215
|
+
|
|
190
216
|
onBeforeUnmount(() => {
|
|
191
217
|
if (!isReadonly.value) {
|
|
192
218
|
const areValid = !!formStore.SaleChanellPolicy.nameRu && !!formStore.RegionPolicy.nameRu && !!formStore.ManagerPolicy.nameRu && !!formStore.AgentData.fullName;
|
|
@@ -208,6 +234,10 @@ export default defineComponent({
|
|
|
208
234
|
|
|
209
235
|
// Computed
|
|
210
236
|
isReadonly,
|
|
237
|
+
isSaleChanellReadonly,
|
|
238
|
+
isRegionReadonly,
|
|
239
|
+
isManagerReadonly,
|
|
240
|
+
isAgentReadonly,
|
|
211
241
|
|
|
212
242
|
// Functions
|
|
213
243
|
openPanel,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
accept=".pdf,.doc,.jpeg,.jpg,.jpg,.xlsx,.xls"
|
|
12
12
|
truncate-length="15"
|
|
13
13
|
clear-icon="mdi mdi-close"
|
|
14
|
-
:label="
|
|
14
|
+
:label="label"
|
|
15
15
|
@click:append-inner="$emit('append-inner', $event)"
|
|
16
16
|
/>
|
|
17
17
|
</template>
|
|
@@ -26,7 +26,13 @@ export default defineComponent({
|
|
|
26
26
|
icon: {
|
|
27
27
|
type: String,
|
|
28
28
|
default: 'mdi-file-document',
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
default() {
|
|
33
|
+
return useDataStore().t('labels.chooseDoc');
|
|
34
|
+
},
|
|
35
|
+
},
|
|
30
36
|
},
|
|
31
37
|
emits: ['input', 'append-inner'],
|
|
32
38
|
});
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
<v-navigation-drawer
|
|
3
3
|
v-model="$dataStore[whichPanel].open"
|
|
4
4
|
:temporary="$dataStore[whichPanel].overlay"
|
|
5
|
-
location="
|
|
6
|
-
class="sm:!w-[400px]
|
|
7
|
-
:class="[
|
|
5
|
+
:location="side"
|
|
6
|
+
class="sm:!w-[400px]"
|
|
7
|
+
:class="[
|
|
8
|
+
$dataStore[whichPanel].overlay ? 'lg:!hidden' : '',
|
|
9
|
+
$dataStore[whichPanel].open ? '!w-full lg:!w-1/4' : 'lg:!w-[0px]',
|
|
10
|
+
side === 'left' ? '!left-0 !absolute' : '!right-0',
|
|
11
|
+
side === 'right' && $dataStore[whichPanel].open ? 'lg:!relative' : '',
|
|
12
|
+
]"
|
|
8
13
|
:disable-resize-watcher="true"
|
|
9
14
|
:disable-route-watcher="true"
|
|
10
15
|
>
|
|
@@ -12,6 +17,9 @@
|
|
|
12
17
|
<div v-if="$dataStore.panelAction === null" class="flex flex-col" id="panel-actions">
|
|
13
18
|
<slot></slot>
|
|
14
19
|
</div>
|
|
20
|
+
<div v-if="side === 'right'" class="flex flex-col" id="right-panel-actions">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
15
23
|
<base-panel-handler v-else @task="$emit('task', $event)" />
|
|
16
24
|
<slot name="panel"></slot>
|
|
17
25
|
</v-navigation-drawer>
|
|
@@ -29,6 +37,10 @@ export default defineComponent({
|
|
|
29
37
|
type: String as PropType<PanelTypes>,
|
|
30
38
|
default: 'panel',
|
|
31
39
|
},
|
|
40
|
+
side: {
|
|
41
|
+
type: String as PropType<'left' | 'right'>,
|
|
42
|
+
default: 'left',
|
|
43
|
+
},
|
|
32
44
|
},
|
|
33
45
|
emits: ['task'],
|
|
34
46
|
setup(props) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:has-back="hasBack"
|
|
7
7
|
:back-icon="backIcon"
|
|
8
8
|
:has-more="hasMore"
|
|
9
|
-
:hide-more-on-lg="
|
|
9
|
+
:hide-more-on-lg="false"
|
|
10
10
|
:more-icon="moreIcon"
|
|
11
11
|
@onBack="$emit('onBack')"
|
|
12
12
|
@onMore="$emit('onMore')"
|
|
@@ -78,7 +78,7 @@ export default defineComponent({
|
|
|
78
78
|
},
|
|
79
79
|
moreIcon: {
|
|
80
80
|
type: String,
|
|
81
|
-
default: 'mdi-
|
|
81
|
+
default: 'mdi-dots-vertical',
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
emits: ['onLink', 'onBack', 'onMore', 'clicked'],
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
</v-form>
|
|
149
149
|
</section>
|
|
150
150
|
</base-fade-transition>
|
|
151
|
-
<Teleport v-if="secondPanel" to="#panel-actions">
|
|
151
|
+
<Teleport v-if="secondPanel" to="#right-panel-actions">
|
|
152
152
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
153
153
|
<base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
|
|
154
154
|
<div v-if="$dataStore.questionRefs && $dataStore.questionRefs.length && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
@@ -304,8 +304,8 @@ export default defineComponent({
|
|
|
304
304
|
await dataStore.getQuestionRefs(question.id);
|
|
305
305
|
secondPanel.value = true;
|
|
306
306
|
dataStore.panelAction = null;
|
|
307
|
-
dataStore.
|
|
308
|
-
dataStore.
|
|
307
|
+
dataStore.rightPanel.open = true;
|
|
308
|
+
dataStore.rightPanel.title = question.name;
|
|
309
309
|
isPanelLoading.value = false;
|
|
310
310
|
};
|
|
311
311
|
|
|
@@ -316,7 +316,7 @@ export default defineComponent({
|
|
|
316
316
|
}
|
|
317
317
|
secondPanel.value = false;
|
|
318
318
|
dataStore.panelAction = null;
|
|
319
|
-
dataStore.
|
|
319
|
+
dataStore.rightPanel.open = false;
|
|
320
320
|
dataStore.questionRefs = [];
|
|
321
321
|
};
|
|
322
322
|
|
|
@@ -376,9 +376,9 @@ export default defineComponent({
|
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
watch(
|
|
379
|
-
() => dataStore.
|
|
379
|
+
() => dataStore.rightPanel.open,
|
|
380
380
|
() => {
|
|
381
|
-
if (dataStore.
|
|
381
|
+
if (dataStore.rightPanel.open === false) {
|
|
382
382
|
secondPanel.value = false;
|
|
383
383
|
dataStore.panelAction = null;
|
|
384
384
|
}
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
</base-form-section>
|
|
262
262
|
</v-form>
|
|
263
263
|
<base-btn v-if="showSaveButton && !disabled" :loading="isButtonLoading" :text="$dataStore.t('buttons.save')" @click="submitForm" />
|
|
264
|
-
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
264
|
+
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
265
265
|
<div :class="[$styles.scrollPage]" class="relative flex flex-col items-center">
|
|
266
266
|
<i
|
|
267
267
|
v-if="type === 'panel'"
|
|
@@ -344,8 +344,8 @@ export default defineComponent({
|
|
|
344
344
|
isPanelOpen.value = true;
|
|
345
345
|
dataStore.panelAction = null;
|
|
346
346
|
if (props.type === 'default') {
|
|
347
|
-
dataStore.
|
|
348
|
-
dataStore.
|
|
347
|
+
dataStore.rightPanel.open = true;
|
|
348
|
+
dataStore.rightPanel.title = title;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
let newList = list;
|
|
@@ -363,7 +363,7 @@ export default defineComponent({
|
|
|
363
363
|
|
|
364
364
|
const pickPanelValue = (item: Value) => {
|
|
365
365
|
if (props.type === 'default') {
|
|
366
|
-
dataStore.
|
|
366
|
+
dataStore.rightPanel.open = false;
|
|
367
367
|
}
|
|
368
368
|
showForm.value = true;
|
|
369
369
|
isPanelOpen.value = false;
|
|
@@ -463,9 +463,9 @@ export default defineComponent({
|
|
|
463
463
|
);
|
|
464
464
|
|
|
465
465
|
watch(
|
|
466
|
-
() => dataStore.
|
|
466
|
+
() => dataStore.rightPanel.open,
|
|
467
467
|
() => {
|
|
468
|
-
if (dataStore.
|
|
468
|
+
if (dataStore.rightPanel.open === false) {
|
|
469
469
|
isPanelOpen.value = false;
|
|
470
470
|
dataStore.panelAction = null;
|
|
471
471
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</base-content-block>
|
|
26
26
|
</section>
|
|
27
27
|
<base-list-empty v-else />
|
|
28
|
-
<Teleport v-if="$dataStore.panelAction === null" to="#panel-actions">
|
|
28
|
+
<Teleport v-if="$dataStore.panelAction === null" to="#right-panel-actions">
|
|
29
29
|
<base-fade-transition>
|
|
30
30
|
<div :class="[$styles.flexColNav]">
|
|
31
31
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
@@ -73,10 +73,9 @@ export default defineComponent({
|
|
|
73
73
|
);
|
|
74
74
|
|
|
75
75
|
const openPanel = async (document: DocumentItem) => {
|
|
76
|
-
dataStore.
|
|
77
|
-
dataStore.panel.title = document.fileTypeName!;
|
|
76
|
+
dataStore.rightPanel.title = document.fileTypeName!;
|
|
78
77
|
currentDocument.value = document;
|
|
79
|
-
dataStore.
|
|
78
|
+
dataStore.rightPanel.open = true;
|
|
80
79
|
};
|
|
81
80
|
|
|
82
81
|
const onFileChange = async (event: InputEvent) => {
|
|
@@ -132,8 +131,7 @@ export default defineComponent({
|
|
|
132
131
|
onInit();
|
|
133
132
|
|
|
134
133
|
onUnmounted(() => {
|
|
135
|
-
dataStore.
|
|
136
|
-
dataStore.panelAction = null;
|
|
134
|
+
dataStore.rightPanel.open = false;
|
|
137
135
|
});
|
|
138
136
|
|
|
139
137
|
return {
|
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
</base-form-section>
|
|
518
518
|
</v-form>
|
|
519
519
|
<base-btn v-if="showSaveButton" :loading="isButtonLoading || isSubmittingForm" :text="$dataStore.t('buttons.save')" @click="submitForm" />
|
|
520
|
-
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
520
|
+
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
521
521
|
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
522
522
|
<base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
|
|
523
523
|
<div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
@@ -533,20 +533,20 @@
|
|
|
533
533
|
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
|
|
534
534
|
</div>
|
|
535
535
|
</Teleport>
|
|
536
|
-
<Teleport v-if="isSearchOpen" to="#panel-actions">
|
|
536
|
+
<Teleport v-if="isSearchOpen" to="#right-panel-actions">
|
|
537
537
|
<div :class="[$styles.flexColNav]">
|
|
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
541
|
</div>
|
|
542
542
|
</Teleport>
|
|
543
|
-
<Teleport v-if="isDocumentOpen" to="#panel-actions">
|
|
543
|
+
<Teleport v-if="isDocumentOpen" to="#right-panel-actions">
|
|
544
544
|
<div :class="[$styles.flexColNav]">
|
|
545
545
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
546
546
|
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
547
547
|
</div>
|
|
548
548
|
</Teleport>
|
|
549
|
-
<Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#panel-actions">
|
|
549
|
+
<Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#right-panel-actions">
|
|
550
550
|
<div :class="[$styles.flexColNav]">
|
|
551
551
|
<base-fade-transition>
|
|
552
552
|
<base-rounded-input
|
|
@@ -834,8 +834,8 @@ export default {
|
|
|
834
834
|
const searchMember = async () => {
|
|
835
835
|
if (!isDisabled.value) {
|
|
836
836
|
dataStore.panelAction = null;
|
|
837
|
-
dataStore.
|
|
838
|
-
dataStore.
|
|
837
|
+
dataStore.rightPanel.title = 'Поиск контрагента';
|
|
838
|
+
dataStore.rightPanel.open = true;
|
|
839
839
|
isSearchOpen.value = true;
|
|
840
840
|
isDocumentOpen.value = false;
|
|
841
841
|
isOtpPanelOpen.value = false;
|
|
@@ -852,20 +852,20 @@ export default {
|
|
|
852
852
|
const openCustomPanel = (type: 'document' | 'otp' = 'document') => {
|
|
853
853
|
dataStore.panelAction = null;
|
|
854
854
|
if (type === 'document' && memberDocument.value) {
|
|
855
|
-
dataStore.
|
|
855
|
+
dataStore.rightPanel.title = memberDocument.value.fileTypeName!;
|
|
856
856
|
isDocumentOpen.value = true;
|
|
857
857
|
isSearchOpen.value = false;
|
|
858
858
|
isPanelOpen.value = false;
|
|
859
859
|
isOtpPanelOpen.value = false;
|
|
860
860
|
}
|
|
861
861
|
if (type === 'otp') {
|
|
862
|
-
dataStore.
|
|
862
|
+
dataStore.rightPanel.title = dataStore.t('form.otpCode');
|
|
863
863
|
isOtpPanelOpen.value = true;
|
|
864
864
|
isDocumentOpen.value = false;
|
|
865
865
|
isSearchOpen.value = false;
|
|
866
866
|
isPanelOpen.value = false;
|
|
867
867
|
}
|
|
868
|
-
dataStore.
|
|
868
|
+
dataStore.rightPanel.open = true;
|
|
869
869
|
};
|
|
870
870
|
|
|
871
871
|
const openPanel = async (title: string, list: Value[], key: string, asyncFunction?: Function, filterKey?: string) => {
|
|
@@ -883,15 +883,15 @@ export default {
|
|
|
883
883
|
currentPanel.value = key as keyof typeof member.value;
|
|
884
884
|
isPanelOpen.value = true;
|
|
885
885
|
dataStore.panelAction = null;
|
|
886
|
-
dataStore.
|
|
887
|
-
dataStore.
|
|
886
|
+
dataStore.rightPanel.open = true;
|
|
887
|
+
dataStore.rightPanel.title = title;
|
|
888
888
|
|
|
889
889
|
let newList = list;
|
|
890
890
|
if (asyncFunction) {
|
|
891
891
|
isPanelLoading.value = true;
|
|
892
892
|
newList = await asyncFunction(filterKey, member.value);
|
|
893
893
|
}
|
|
894
|
-
panelList.value = filterList(newList, key);
|
|
894
|
+
panelList.value = filterList(newList, key);
|
|
895
895
|
panelValue.value = member.value[currentPanel.value];
|
|
896
896
|
isPanelLoading.value = false;
|
|
897
897
|
} else {
|
|
@@ -917,7 +917,7 @@ export default {
|
|
|
917
917
|
|
|
918
918
|
const pickPanelValue = (item: Value) => {
|
|
919
919
|
if (formStore.isDisabled[whichForm.value as keyof typeof formStore.isDisabled] === false) {
|
|
920
|
-
dataStore.
|
|
920
|
+
dataStore.rightPanel.open = false;
|
|
921
921
|
isPanelOpen.value = false;
|
|
922
922
|
// @ts-ignore
|
|
923
923
|
member.value[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
@@ -989,7 +989,7 @@ export default {
|
|
|
989
989
|
familyDialog.value = false;
|
|
990
990
|
selectedFamilyMember.value = {};
|
|
991
991
|
isButtonLoading.value = false;
|
|
992
|
-
dataStore.
|
|
992
|
+
dataStore.rightPanel.open = false;
|
|
993
993
|
isSearchOpen.value = false;
|
|
994
994
|
};
|
|
995
995
|
|
|
@@ -1006,20 +1006,20 @@ export default {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
familyDialog.value = false;
|
|
1008
1008
|
isButtonLoading.value = false;
|
|
1009
|
-
dataStore.
|
|
1009
|
+
dataStore.rightPanel.open = false;
|
|
1010
1010
|
isSearchOpen.value = false;
|
|
1011
1011
|
};
|
|
1012
1012
|
|
|
1013
1013
|
const getContragentFromGBDFL = async () => {
|
|
1014
1014
|
if (member.value.hasAgreement !== true) {
|
|
1015
1015
|
dataStore.showToaster('error', dataStore.t('toaster.needAgreement'), 3000);
|
|
1016
|
-
dataStore.
|
|
1016
|
+
dataStore.rightPanel.open = false;
|
|
1017
1017
|
isSearchOpen.value = false;
|
|
1018
1018
|
return;
|
|
1019
1019
|
}
|
|
1020
1020
|
if (!member.value.iin || member.value.iin.length !== useMask().iin.length || !member.value.phoneNumber || member.value.phoneNumber.length !== useMask().phone.length) {
|
|
1021
1021
|
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: 'Номер телефона, ИИН' }), 5000);
|
|
1022
|
-
dataStore.
|
|
1022
|
+
dataStore.rightPanel.open = false;
|
|
1023
1023
|
isSearchOpen.value = false;
|
|
1024
1024
|
return;
|
|
1025
1025
|
}
|
|
@@ -1029,7 +1029,7 @@ export default {
|
|
|
1029
1029
|
if (response === true) {
|
|
1030
1030
|
member.value.gotFromInsis = true;
|
|
1031
1031
|
}
|
|
1032
|
-
dataStore.
|
|
1032
|
+
dataStore.rightPanel.open = false;
|
|
1033
1033
|
isSearchOpen.value = false;
|
|
1034
1034
|
}
|
|
1035
1035
|
isButtonLoading.value = false;
|
|
@@ -1038,20 +1038,20 @@ export default {
|
|
|
1038
1038
|
const getContragent = async () => {
|
|
1039
1039
|
if (member.value.hasAgreement !== true) {
|
|
1040
1040
|
dataStore.showToaster('error', dataStore.t('toaster.needAgreement'), 3000);
|
|
1041
|
-
dataStore.
|
|
1041
|
+
dataStore.rightPanel.open = false;
|
|
1042
1042
|
isSearchOpen.value = false;
|
|
1043
1043
|
return;
|
|
1044
1044
|
}
|
|
1045
1045
|
if (!member.value.iin || member.value.iin.length !== useMask().iin.length) {
|
|
1046
1046
|
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: 'ИИН' }), 5000);
|
|
1047
|
-
dataStore.
|
|
1047
|
+
dataStore.rightPanel.open = false;
|
|
1048
1048
|
isSearchOpen.value = false;
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
1051
|
isButtonLoading.value = true;
|
|
1052
1052
|
await dataStore.getContragent(member.value, false);
|
|
1053
1053
|
isButtonLoading.value = false;
|
|
1054
|
-
dataStore.
|
|
1054
|
+
dataStore.rightPanel.open = false;
|
|
1055
1055
|
isSearchOpen.value = false;
|
|
1056
1056
|
};
|
|
1057
1057
|
|
|
@@ -1245,7 +1245,7 @@ export default {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
otpSending.value = false;
|
|
1247
1247
|
if (checked === true) {
|
|
1248
|
-
dataStore.
|
|
1248
|
+
dataStore.rightPanel.open = false;
|
|
1249
1249
|
}
|
|
1250
1250
|
};
|
|
1251
1251
|
|
|
@@ -1255,7 +1255,7 @@ export default {
|
|
|
1255
1255
|
if (response) {
|
|
1256
1256
|
if (member.value.hasAgreement === null) member.value.hasAgreement = response.otpStatus;
|
|
1257
1257
|
if (response.otpStatus === true) {
|
|
1258
|
-
dataStore.
|
|
1258
|
+
dataStore.rightPanel.open = false;
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
otpSending.value = false;
|
|
@@ -1324,7 +1324,7 @@ export default {
|
|
|
1324
1324
|
};
|
|
1325
1325
|
|
|
1326
1326
|
const selectMember = async (index: number, update?: boolean) => {
|
|
1327
|
-
dataStore.
|
|
1327
|
+
dataStore.rightPanel.open = false;
|
|
1328
1328
|
isButtonLoading.value = true;
|
|
1329
1329
|
isChangingMember.value = true;
|
|
1330
1330
|
//@ts-ignore
|
|
@@ -1429,9 +1429,9 @@ export default {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
|
|
1431
1431
|
watch(
|
|
1432
|
-
() => dataStore.
|
|
1432
|
+
() => dataStore.rightPanel.open,
|
|
1433
1433
|
() => {
|
|
1434
|
-
if (dataStore.
|
|
1434
|
+
if (dataStore.rightPanel.open === false) {
|
|
1435
1435
|
isPanelOpen.value = false;
|
|
1436
1436
|
isDocumentOpen.value = false;
|
|
1437
1437
|
isSearchOpen.value = false;
|