Merge branch 'feature/создание-договора' into 'master'
Feature/создание договора See merge request andrusyakka/urban-couscous!226
This commit is contained in:
@@ -1,51 +1,57 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.input-wrapper.flex.gap-x-2.px-4.box-border(
|
.flex.flex-col
|
||||||
class="py-2.5",
|
.label(v-if="!!label") {{label}}
|
||||||
:style="{ minWidth: widthInput + 'px' }"
|
.field
|
||||||
)
|
input(
|
||||||
input.input.w-full.outline-0.not-italic.date.cursor-text(
|
v-model="value",
|
||||||
:value="value",
|
type="date",
|
||||||
type="date",
|
max="9999-12-31",
|
||||||
@input="$emit('update:value', $event.target.value)",
|
min="0000-01-01"
|
||||||
:placeholder="placeholder",
|
)
|
||||||
:maxlength="maxLength",
|
|
||||||
max="9999-12-31",
|
|
||||||
min="0000-01-01"
|
|
||||||
)
|
|
||||||
.slot(v-if="withIcon" :class="iconPosition")
|
|
||||||
slot.cursor-pointer
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
//TODO стили перенести для всего кита, избавиться от scoped
|
||||||
|
//TODO покрыть тестами
|
||||||
|
//TODO сделать серый цвет плейсхолдера
|
||||||
|
//TODO обработать ошибку при стирании даты
|
||||||
export default {
|
export default {
|
||||||
name: "BaseInputDate",
|
name: "BaseInputDate",
|
||||||
props: {
|
props: {
|
||||||
maxLength: Number,
|
modelValue: Date,
|
||||||
value: String,
|
label: String,
|
||||||
withIcon: {
|
},
|
||||||
default: false,
|
emits: ["update:modelValue"],
|
||||||
|
computed: {
|
||||||
|
value: {
|
||||||
|
get() {
|
||||||
|
return this.modelValue?.toISOString().split("T")[0];
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$emit("update:modelValue", new Date(value));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
iconPosition: {
|
|
||||||
default: "right",
|
|
||||||
},
|
|
||||||
placeholder: String,
|
|
||||||
widthInput: Number,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.left
|
.field
|
||||||
order: -1
|
align-items: center
|
||||||
.right
|
border: 1.5px solid var(--border-light-grey-color)
|
||||||
order: 1
|
|
||||||
.input-wrapper
|
|
||||||
border-radius: 4px
|
border-radius: 4px
|
||||||
background-color: var(--default-white)
|
padding: 8px 16px
|
||||||
color: var(--font-black-color)
|
input
|
||||||
.date
|
cursor: text
|
||||||
background: url("../../assets/icons/calendar-input.svg") no-repeat 100% 50%
|
border: none
|
||||||
&::-webkit-calendar-picker-indicator
|
outline: none
|
||||||
opacity: 0
|
background: url("../../assets/icons/calendar-input.svg") no-repeat 100% 50%
|
||||||
cursor: pointer
|
&::-webkit-calendar-picker-indicator
|
||||||
|
opacity: 0
|
||||||
|
cursor: pointer
|
||||||
|
|
||||||
|
.label
|
||||||
|
font-weight: 600
|
||||||
|
font-size: 14px
|
||||||
|
line-height: 135%
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9,28 +9,19 @@
|
|||||||
v-model="category",
|
v-model="category",
|
||||||
:items="categories",
|
:items="categories",
|
||||||
)
|
)
|
||||||
.flex.w-full.my-6
|
.flex.justify-between.w-full.gap-4
|
||||||
.flex-col
|
base-input-date(
|
||||||
.font-semibold.text-smm Дата подписания
|
v-model="signedDate",
|
||||||
.input-date.flex.h-10.justify-center
|
label="Дата подписания"
|
||||||
base-input-date(
|
)
|
||||||
:width-input="200",
|
base-input-date(
|
||||||
v-model:value="signedDate"
|
v-model="startDate",
|
||||||
)
|
label="Начало оказания услуг"
|
||||||
.flex-col
|
)
|
||||||
.font-semibold.text-smm Начало оказания услуг
|
base-input-date(
|
||||||
.input-date.flex.h-10.justify-center
|
v-model="endDate",
|
||||||
base-input-date(
|
label="Окончание оказания услуг"
|
||||||
:width-input="200",
|
)
|
||||||
v-model:value="startDate"
|
|
||||||
)
|
|
||||||
.flex-col
|
|
||||||
.font-semibold.text-smm Окончание оказания услуг
|
|
||||||
.input-date.flex.h-10.justify-center
|
|
||||||
base-input-date(
|
|
||||||
:width-input="200",
|
|
||||||
v-model:value="endDate"
|
|
||||||
)
|
|
||||||
|
|
||||||
.flex-col.w-full.my-6
|
.flex-col.w-full.my-6
|
||||||
.font-semibold.text-smm Исполнитель
|
.font-semibold.text-smm Исполнитель
|
||||||
@@ -61,7 +52,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isService: true,
|
|
||||||
steps: [
|
steps: [
|
||||||
{ id: "1", label: "1", value: "Договор" },
|
{ id: "1", label: "1", value: "Договор" },
|
||||||
{ id: "2", label: "2", value: "Пациент" },
|
{ id: "2", label: "2", value: "Пациент" },
|
||||||
@@ -73,8 +63,8 @@ export default {
|
|||||||
{ id: "Хирургия", label: "Хирургия" },
|
{ id: "Хирургия", label: "Хирургия" },
|
||||||
{ id: "Ортопедия", label: "Ортопедия" },
|
{ id: "Ортопедия", label: "Ортопедия" },
|
||||||
],
|
],
|
||||||
signedDate: undefined,
|
signedDate: new Date(),
|
||||||
startDate: undefined,
|
startDate: new Date(),
|
||||||
endDate: undefined,
|
endDate: undefined,
|
||||||
employee: {},
|
employee: {},
|
||||||
employees: [],
|
employees: [],
|
||||||
|
|||||||
@@ -1,9 +1,101 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.text GHBDTN
|
.flex-col
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm ФИО пациента
|
||||||
|
base-input(
|
||||||
|
:width-input="200",
|
||||||
|
v-model:value="patient.full_name"
|
||||||
|
)
|
||||||
|
.flex
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Документ, удостоверяющий личность
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
placeholder="Тип документа",
|
||||||
|
v-model="patient.doc_type",
|
||||||
|
:items="patentIdentityDocumentTypes",
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Серия и номер
|
||||||
|
base-input(
|
||||||
|
v-model:value="patient.seriesAndNumber",
|
||||||
|
disabled,
|
||||||
|
)
|
||||||
|
.flex
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Телефон
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
v-model="patient.phone",
|
||||||
|
:items="patentIdentityDocumentTypes",
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Адрес
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
v-model="patient.phone",
|
||||||
|
:items="patentIdentityDocumentTypes"
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm ФИО Заказчика
|
||||||
|
base-input(
|
||||||
|
:width-input="200",
|
||||||
|
v-model:value="patient.full_name"
|
||||||
|
)
|
||||||
|
.flex
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Документ, удостоверяющий личность
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
placeholder="Тип документа",
|
||||||
|
v-model="patient.doc_type",
|
||||||
|
:items="patentIdentityDocumentTypes",
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Серия и номер
|
||||||
|
base-input(
|
||||||
|
v-model:value="patient.seriesAndNumber",
|
||||||
|
disabled,
|
||||||
|
)
|
||||||
|
.flex
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Телефон
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
v-model="patient.phone",
|
||||||
|
:items="patentIdentityDocumentTypes",
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Адрес
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
v-model="patient.phone",
|
||||||
|
:items="patentIdentityDocumentTypes" )
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BaseInput from "@/components/base/BaseInput";
|
||||||
|
import BaseCustomSelect from "@/components/base/BaseCustomSelect.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "AgreementPerson",
|
name: "AgreementPerson",
|
||||||
|
components: {
|
||||||
|
BaseInput,
|
||||||
|
BaseCustomSelect,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
patient: {
|
||||||
|
full_name: "",
|
||||||
|
doc_type: "",
|
||||||
|
seriesAndNumber: "2354 125423",
|
||||||
|
phone: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
patentIdentityDocumentTypes() {
|
||||||
|
return [
|
||||||
|
{ id: "Паспорт", label: "Паспорт" },
|
||||||
|
{
|
||||||
|
id: "Водительское удостоверение",
|
||||||
|
label: "Водительское удостоверение",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
.flex-col
|
||||||
|
span.font-bold Общая информация
|
||||||
|
.flex-col
|
||||||
|
.flex-col.my-6
|
||||||
|
.counter.font-semibold.text-smm Категория
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
placeholder="Категория договора",
|
||||||
|
v-model="category",
|
||||||
|
:items="categories",
|
||||||
|
)
|
||||||
|
.flex.w-full.my-6
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Дата подписания
|
||||||
|
.input-date.flex.h-10.justify-center
|
||||||
|
base-input-date(
|
||||||
|
:width-input="200",
|
||||||
|
v-model:value="signedDate"
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Начало оказания услуг
|
||||||
|
.input-date.flex.h-10.justify-center
|
||||||
|
base-input-date(
|
||||||
|
:width-input="200",
|
||||||
|
v-model:value="startDate"
|
||||||
|
)
|
||||||
|
.flex-col
|
||||||
|
.font-semibold.text-smm Окончание оказания услуг
|
||||||
|
.input-date.flex.h-10.justify-center
|
||||||
|
base-input-date(
|
||||||
|
:width-input="200",
|
||||||
|
v-model:value="endDate"
|
||||||
|
)
|
||||||
|
|
||||||
|
.flex-col.w-full.my-6
|
||||||
|
.font-semibold.text-smm Исполнитель
|
||||||
|
base-custom-select.select.text-sm(
|
||||||
|
placeholder="Поручить",
|
||||||
|
v-model="employee",
|
||||||
|
:items="employees",
|
||||||
|
)
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import BaseButton from "@/components/base/BaseButton";
|
||||||
|
import BaseStepper from "@/components/base/BaseStepper";
|
||||||
|
import BaseSelect from "@/components/base/BaseSelect";
|
||||||
|
import BaseInputDate from "@/components/base/BaseInputDate";
|
||||||
|
import BaseInput from "@/components/base/BaseInput";
|
||||||
|
import BaseCustomSelect from "@/components/base/BaseCustomSelect.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AgreementServices",
|
||||||
|
components: {
|
||||||
|
BaseButton,
|
||||||
|
BaseStepper,
|
||||||
|
BaseSelect,
|
||||||
|
BaseInputDate,
|
||||||
|
BaseInput,
|
||||||
|
BaseCustomSelect,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isService: true,
|
||||||
|
steps: [
|
||||||
|
{ id: "1", label: "1", value: "Договор" },
|
||||||
|
{ id: "2", label: "2", value: "Пациент" },
|
||||||
|
],
|
||||||
|
category: {},
|
||||||
|
categories: [
|
||||||
|
{ id: "Консультация", label: "Консультация" },
|
||||||
|
{ id: "Терапия", label: "Терапия" },
|
||||||
|
{ id: "Хирургия", label: "Хирургия" },
|
||||||
|
{ id: "Ортопедия", label: "Ортопедия" },
|
||||||
|
],
|
||||||
|
signedDate: undefined,
|
||||||
|
startDate: undefined,
|
||||||
|
endDate: undefined,
|
||||||
|
employee: {},
|
||||||
|
employees: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped></style>
|
||||||
@@ -34,6 +34,7 @@ import BaseButton from "@/components/base/BaseButton";
|
|||||||
import BaseStepper from "@/components/base/BaseStepper";
|
import BaseStepper from "@/components/base/BaseStepper";
|
||||||
import AgreementCommon from "./FormsAgreementCreate/AgreementCommon";
|
import AgreementCommon from "./FormsAgreementCreate/AgreementCommon";
|
||||||
import AgreementPerson from "./FormsAgreementCreate/AgreementPerson";
|
import AgreementPerson from "./FormsAgreementCreate/AgreementPerson";
|
||||||
|
import AgreementServices from "./FormsAgreementCreate/AgreementServices";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StepperCreateAgreement",
|
name: "StepperCreateAgreement",
|
||||||
@@ -42,6 +43,7 @@ export default {
|
|||||||
BaseStepper,
|
BaseStepper,
|
||||||
AgreementCommon,
|
AgreementCommon,
|
||||||
AgreementPerson,
|
AgreementPerson,
|
||||||
|
AgreementServices,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -62,8 +64,8 @@ export default {
|
|||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
label: "2",
|
label: "2",
|
||||||
value: "Пациент",
|
value: "Услуги",
|
||||||
component: "agreement-person",
|
component: "agreement-services",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user