Merge pull request #134 from dderbentsov/UC-62
Добавил одно окно создания клиента и исправил баг с выбором города
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.flex-col.w-full.h-full.gap-y-2
|
.flex.flex-col.w-full.h-full.gap-y-2
|
||||||
the-header
|
the-header(:is-open-form="isOpenForm", :close-form="closeForm", :open-form="openForm")
|
||||||
.flex.flex-auto
|
.flex.flex-auto
|
||||||
the-sidebar
|
the-sidebar
|
||||||
router-view
|
router-view(:open-form="openForm")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -13,5 +13,18 @@ import TheSidebar from "@/components/TheSidebar";
|
|||||||
export default {
|
export default {
|
||||||
name: "LoggedInLayout",
|
name: "LoggedInLayout",
|
||||||
components: { TheHeader, TheSidebar },
|
components: { TheHeader, TheSidebar },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpenForm: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openForm() {
|
||||||
|
this.isOpenForm = true;
|
||||||
|
},
|
||||||
|
closeForm() {
|
||||||
|
this.isOpenForm = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.header-wrapper.relative.flex.justify-center.box-border.py-2.pl-4_75px.pr-6
|
.header-wrapper.relative.flex.justify-center.box-border.py-2.pl-4_75px.pr-6
|
||||||
base-client-form-create(v-if="isOpenCreate", @blure="isOpenCreate=false", :close-form="closeFormCreate")
|
base-client-form-create(v-if="isOpenForm", :close-form="closeForm")
|
||||||
.flex.items-center.box-border.cursor-pointer.mr-auto
|
.flex.items-center.box-border.cursor-pointer.mr-auto
|
||||||
img.logo-img.mr-29_25px(src="@/assets/images/logo.svg", alt="Logo")
|
img.logo-img.mr-29_25px(src="@/assets/images/logo.svg", alt="Logo")
|
||||||
header-inputs
|
header-inputs
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
:size="40",
|
:size="40",
|
||||||
right-icon="icon-person",
|
right-icon="icon-person",
|
||||||
:icon-right-size="18",
|
:icon-right-size="18",
|
||||||
@click="isOpenCreate=true"
|
@click="openForm"
|
||||||
)
|
)
|
||||||
button.header-buttons.flex.justify-center.items-center.mr-8.p-0(@click="logout")
|
button.header-buttons.flex.justify-center.items-center.mr-8.p-0(@click="logout")
|
||||||
.icon-bell.text-xxl
|
.icon-bell.text-xxl
|
||||||
@@ -34,6 +34,11 @@ import BaseClientFormCreate from "@/components/base/BaseClientFormCreate";
|
|||||||
export default {
|
export default {
|
||||||
name: "TheHeader",
|
name: "TheHeader",
|
||||||
components: { HeaderInputs, BaseAvatar, BaseButton, BaseClientFormCreate },
|
components: { HeaderInputs, BaseAvatar, BaseButton, BaseClientFormCreate },
|
||||||
|
props: {
|
||||||
|
openForm: Function,
|
||||||
|
closeForm: Function,
|
||||||
|
isOpenForm: Boolean,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
avatarSrc: img,
|
avatarSrc: img,
|
||||||
@@ -41,13 +46,9 @@ export default {
|
|||||||
avatarSrc: chargePersonAvatar,
|
avatarSrc: chargePersonAvatar,
|
||||||
name: "Гордеев Николай Степанович",
|
name: "Гордеев Николай Степанович",
|
||||||
},
|
},
|
||||||
isOpenCreate: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeFormCreate() {
|
|
||||||
this.isOpenCreate = false;
|
|
||||||
},
|
|
||||||
logout() {
|
logout() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.$router.push("/login");
|
this.$router.push("/login");
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
:save-client="saveClient"
|
:save-client="saveClient"
|
||||||
:choose-option="chooseOptionNetworks"
|
:choose-option="chooseOptionNetworks"
|
||||||
:choose-priority="choosePriority"
|
:choose-priority="choosePriority"
|
||||||
:priority-list="getPriorityList"
|
:priority-list="priorityList"
|
||||||
:current-year="currentYear"
|
:current-year="currentYear"
|
||||||
)
|
)
|
||||||
.flex(:style="{display :'none'}" ref="doc")
|
.flex(:style="{display :'none'}" ref="doc")
|
||||||
@@ -75,7 +75,10 @@ export default {
|
|||||||
basic: {
|
basic: {
|
||||||
full_name: "",
|
full_name: "",
|
||||||
birth_date: "",
|
birth_date: "",
|
||||||
priority: "",
|
priority: {
|
||||||
|
id: null,
|
||||||
|
label: "",
|
||||||
|
},
|
||||||
contacts: [
|
contacts: [
|
||||||
{
|
{
|
||||||
id: "network",
|
id: "network",
|
||||||
@@ -146,19 +149,19 @@ export default {
|
|||||||
],
|
],
|
||||||
priorityList: [
|
priorityList: [
|
||||||
{
|
{
|
||||||
id: "1",
|
id: 1,
|
||||||
label: "Высокий",
|
label: "Высокий",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: 2,
|
||||||
label: "Средний",
|
label: "Средний",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: 3,
|
||||||
label: "Низкий",
|
label: "Низкий",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "4",
|
id: 4,
|
||||||
label: "-",
|
label: "-",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
clients-wrapper
|
clients-wrapper(:open-form="openForm")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -7,5 +7,8 @@ import ClientsWrapper from "@/pages/clients/components/ClientsWrapper";
|
|||||||
export default {
|
export default {
|
||||||
name: "TheClients",
|
name: "TheClients",
|
||||||
components: { ClientsWrapper },
|
components: { ClientsWrapper },
|
||||||
|
props: {
|
||||||
|
openForm: Function,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.wrapper-table.relative.flex.flex-col.gap-y-8.px-6.py-6.h-full.w-full
|
.wrapper-table.relative.flex.flex-col.gap-y-8.px-6.py-6.h-full.w-full
|
||||||
base-client-form-create(v-if="isOpenFormCreate" :close-form="closeFormCreateClient")
|
clients-table-hat(:is-open-actions="marked.length" :open-form="openForm")
|
||||||
clients-table-hat(:is-open-actions="marked.length" :open-form-create="openFormCreateClient")
|
|
||||||
.flex.flex-col.h-full.gap-y-2.table-container.w-full
|
.flex.flex-col.h-full.gap-y-2.table-container.w-full
|
||||||
clients-table-header(:check="selectedCheck" :is-check="selectAll")
|
clients-table-header(:check="selectedCheck" :is-check="selectAll")
|
||||||
.flex.flex-col
|
.flex.flex-col
|
||||||
@@ -32,6 +31,10 @@ export default {
|
|||||||
ClientsTableHeader,
|
ClientsTableHeader,
|
||||||
BaseClientFormCreate,
|
BaseClientFormCreate,
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
openForm: Function,
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isOpenFormCreate: false,
|
isOpenFormCreate: false,
|
||||||
@@ -41,13 +44,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openFormCreateClient() {
|
|
||||||
this.isOpenFormCreate = true;
|
|
||||||
},
|
|
||||||
closeFormCreateClient() {
|
|
||||||
this.isOpenFormCreate = false;
|
|
||||||
this.fetchDataClients();
|
|
||||||
},
|
|
||||||
saveDataClients(data) {
|
saveDataClients(data) {
|
||||||
this.dataClients = data.results;
|
this.dataClients = data.results;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
clients-table-header-actions(v-if="!!isOpenActions" :is-selected-one="isOpenActions===1")
|
clients-table-header-actions(v-if="!!isOpenActions" :is-selected-one="isOpenActions===1")
|
||||||
.flex.w-fit.h-fit.gap-x-2
|
.flex.w-fit.h-fit.gap-x-2
|
||||||
base-button(left-icon="icon-download" :icon-left-size="16" :size="40" :outlined="true")
|
base-button(left-icon="icon-download" :icon-left-size="16" :size="40" :outlined="true")
|
||||||
base-button(left-icon="icon-plus" :icon-left-size="13" :size="40" @click="openFormCreate")
|
base-button(left-icon="icon-plus" :icon-left-size="13" :size="40" @click="openForm")
|
||||||
span.font-semibold Создать
|
span.font-semibold Создать
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ export default {
|
|||||||
BaseButton,
|
BaseButton,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
openFormCreate: Function,
|
openForm: Function,
|
||||||
isOpenActions: Number,
|
isOpenActions: Number,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.wrapper.flex.w-full.relative.mx-6
|
.wrapper.flex.w-full.relative.mx-6
|
||||||
clients-table(:open-form-create="openFormCreateClient")
|
clients-table(:open-form="openForm")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -8,18 +8,8 @@ import ClientsTable from "@/pages/clients/components/ClientsTable";
|
|||||||
export default {
|
export default {
|
||||||
name: "ClientsWrapper",
|
name: "ClientsWrapper",
|
||||||
components: { ClientsTable },
|
components: { ClientsTable },
|
||||||
data() {
|
props: {
|
||||||
return {
|
openForm: Function,
|
||||||
isOpenForm: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
openFormCreateClient() {
|
|
||||||
this.isOpenForm = true;
|
|
||||||
},
|
|
||||||
closeFormCreateClient() {
|
|
||||||
this.isOpenForm = false;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,8 +12,12 @@
|
|||||||
span.text-sm.separator.px-2 или
|
span.text-sm.separator.px-2 или
|
||||||
.grid.grid-cols-2.gap-y-6.gap-x-4
|
.grid.grid-cols-2.gap-y-6.gap-x-4
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm.font-semibold Город
|
.text-info.text-xxs.font-semibold Город
|
||||||
base-input.input-info(placeholder="Выберите город")
|
base-custom-select(
|
||||||
|
placeholder="Выберите город",
|
||||||
|
:items="cities",
|
||||||
|
v-model="currentCity"
|
||||||
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm.font-semibold Область
|
span.text-sm.font-semibold Область
|
||||||
base-input.input-info(placeholder="Введите область")
|
base-input.input-info(placeholder="Введите область")
|
||||||
@@ -37,16 +41,27 @@
|
|||||||
<script>
|
<script>
|
||||||
import BaseButton from "@/components/base/BaseButton";
|
import BaseButton from "@/components/base/BaseButton";
|
||||||
import BaseInput from "@/components/base/BaseInput";
|
import BaseInput from "@/components/base/BaseInput";
|
||||||
|
import BaseCustomSelect from "@/components/base/BaseCustomSelect";
|
||||||
import { mask } from "vue-the-mask";
|
import { mask } from "vue-the-mask";
|
||||||
export default {
|
export default {
|
||||||
name: "FormCreateAddresses",
|
name: "FormCreateAddresses",
|
||||||
components: { BaseInput, BaseButton },
|
components: { BaseInput, BaseButton, BaseCustomSelect },
|
||||||
props: {
|
props: {
|
||||||
addresses: Object,
|
addresses: Object,
|
||||||
saveClient: Function,
|
saveClient: Function,
|
||||||
saveFile: Function,
|
saveFile: Function,
|
||||||
},
|
},
|
||||||
directives: { mask },
|
directives: { mask },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentCity: { id: null, label: "" },
|
||||||
|
cities: [
|
||||||
|
{ id: 1, label: "Владивосток" },
|
||||||
|
{ id: 2, label: "Москва" },
|
||||||
|
{ id: 3, label: "Тула" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
.grid.grid-cols-2.gap-x-4.gap-y-6.px-4
|
.grid.grid-cols-2.gap-x-4.gap-y-6.px-4
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Приоритет
|
span.text-sm Приоритет
|
||||||
base-select(
|
base-custom-select(
|
||||||
:items="priorityList",
|
:items="priorityList",
|
||||||
placeholder="Приоритет клиента",
|
placeholder="Приоритет клиента",
|
||||||
v-model="basicInfo.priority"
|
v-model="basicInfo.priority"
|
||||||
@@ -55,14 +55,14 @@ import BaseButton from "@/components/base/BaseButton";
|
|||||||
import BaseInput from "@/components/base/BaseInput";
|
import BaseInput from "@/components/base/BaseInput";
|
||||||
import BaseAddingNetwork from "@/components/base/BaseAddingNetwork";
|
import BaseAddingNetwork from "@/components/base/BaseAddingNetwork";
|
||||||
import { column } from "@/pages/clients/utils/tableConfig";
|
import { column } from "@/pages/clients/utils/tableConfig";
|
||||||
import BaseSelect from "@/components/base/BaseSelect";
|
import BaseCustomSelect from "@/components/base/BaseCustomSelect";
|
||||||
export default {
|
export default {
|
||||||
name: "FormCreateBasicInfo",
|
name: "FormCreateBasicInfo",
|
||||||
components: {
|
components: {
|
||||||
BaseInput,
|
BaseInput,
|
||||||
BaseAddingNetwork,
|
BaseAddingNetwork,
|
||||||
BaseButton,
|
BaseButton,
|
||||||
BaseSelect,
|
BaseCustomSelect,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
choosePriority: Function,
|
choosePriority: Function,
|
||||||
|
|||||||
Reference in New Issue
Block a user