Merge branch 'master' into 'feature/создание-договора'
# Conflicts: # src/components/base/BaseInputDate.vue
This commit is contained in:
@@ -170,6 +170,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//TODO: Разбить на несколько компонент
|
||||
import ClientDetailInput from "@/pages/clients/components/ClientDetailInput";
|
||||
import BaseButton from "@/components/base/BaseButton";
|
||||
import TableAddingNewDoc from "@/pages/clients/components/TableAddingNewDoc";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.mb-1.mt-4
|
||||
span.font-medium.text-base.modal-text Вы действительно хотите удалить клиента?
|
||||
span.font-medium.text-base.modal-text {{ bodyText }}
|
||||
.flex.gap-x-3.mt-6.font-semibold
|
||||
base-button(
|
||||
outlined,
|
||||
@@ -10,26 +10,22 @@
|
||||
base-button(
|
||||
outlined-red,
|
||||
:size=40,
|
||||
@click="transmitDeleteClient"
|
||||
) Удалить
|
||||
@click="clickConfirm"
|
||||
) {{ confirmTitle }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseButton from "@/components/base/BaseButton.vue";
|
||||
export default {
|
||||
name: "ClientTableDeleteModal",
|
||||
name: "ClientTableModal",
|
||||
components: {
|
||||
BaseButton,
|
||||
},
|
||||
props: {
|
||||
confirmTitle: String,
|
||||
bodyText: String,
|
||||
closeModal: Function,
|
||||
deletedClientId: String,
|
||||
},
|
||||
methods: {
|
||||
transmitDeleteClient() {
|
||||
this.$emit("delete-client", this.deletedClientId);
|
||||
this.closeModal();
|
||||
},
|
||||
clickConfirm: Function,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -32,7 +32,7 @@
|
||||
:update-data-client="updateDataClient",
|
||||
:fetch-data-clients="fetchDataClients",
|
||||
:fetch-created-client-data="fetchCreatedClientData",
|
||||
:create-medical-card="createMedicalCard",
|
||||
:create-medical-card="medicalCardHandler",
|
||||
:created-client-name="createdClientName",
|
||||
@delete-client="deleteClientHandler",
|
||||
@recover-client="clearDeletedRowId",
|
||||
@@ -46,12 +46,15 @@
|
||||
)
|
||||
base-modal(
|
||||
v-model="showModal",
|
||||
title="Удалить клиента"
|
||||
:title="titleModal",
|
||||
)
|
||||
client-table-delete-modal(
|
||||
client-table-modal(
|
||||
v-for="modal in modalConfig"
|
||||
v-show="modal.view"
|
||||
:close-modal="closeModal",
|
||||
:deleted-client-id="deletedClientId",
|
||||
@delete-client="writeDeletedRowId"
|
||||
:click-confirm="modal.clickConfirm"
|
||||
:confirm-title="modal.titleConfirm"
|
||||
:body-text="modal.bodyText"
|
||||
)
|
||||
</template>
|
||||
|
||||
@@ -64,7 +67,7 @@ import ClientsTableCheckbox from "@/pages/clients/components/ClientsTableCheckbo
|
||||
import BaseClientFormCreate from "@/components/base/BaseClientFormCreate";
|
||||
import ClientTablePagination from "./ClientTablePagination.vue";
|
||||
import BaseModal from "@/components/base/BaseModal.vue";
|
||||
import ClientTableDeleteModal from "./ClientTableDeleteModal.vue";
|
||||
import ClientTableModal from "./ClientTableModal.vue";
|
||||
import FormCreateMedicalCard from "@/pages/clients/components/FormCreateMedicalCard";
|
||||
import BaseLoader from "@/components/Loader/BaseLoader.vue";
|
||||
export default {
|
||||
@@ -77,7 +80,7 @@ export default {
|
||||
BaseClientFormCreate,
|
||||
ClientTablePagination,
|
||||
BaseModal,
|
||||
ClientTableDeleteModal,
|
||||
ClientTableModal,
|
||||
FormCreateMedicalCard,
|
||||
BaseLoader,
|
||||
},
|
||||
@@ -91,6 +94,23 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
modalConfig: [
|
||||
{
|
||||
name: "delete",
|
||||
bodyText: "Вы действительно хотите удалить клиента?",
|
||||
titleConfirm: "Удалить",
|
||||
clickConfirm: this.writeDeletedRowId,
|
||||
view: false,
|
||||
},
|
||||
{
|
||||
name: "medical",
|
||||
bodyText: "Медицинская карта отсутствует. Создать мед.карту?",
|
||||
titleConfirm: "Создать",
|
||||
clickConfirm: this.createMedicalCard,
|
||||
view: false,
|
||||
},
|
||||
],
|
||||
titleModal: "",
|
||||
selectAll: false,
|
||||
marked: [],
|
||||
dataClients: [
|
||||
@@ -108,7 +128,7 @@ export default {
|
||||
length: 0,
|
||||
},
|
||||
showModal: false,
|
||||
deletedClientId: "",
|
||||
clientId: "",
|
||||
deletedRowId: "",
|
||||
clearingTextSearch: false,
|
||||
showMedicalCard: false,
|
||||
@@ -233,21 +253,38 @@ export default {
|
||||
openModal() {
|
||||
this.showModal = true;
|
||||
},
|
||||
createMedicalCard() {
|
||||
this.showMedicalCard = true;
|
||||
},
|
||||
deleteClientHandler(id) {
|
||||
this.deletedClientId = id;
|
||||
medicalCardHandler() {
|
||||
this.modalConfig = this.modalConfig.map((el) => {
|
||||
return el.name === "medical"
|
||||
? { ...el, view: true }
|
||||
: { ...el, view: false };
|
||||
});
|
||||
this.titleModal = "Создать мед.карту";
|
||||
this.openModal();
|
||||
},
|
||||
writeDeletedRowId(id) {
|
||||
this.deletedRowId = id;
|
||||
createMedicalCard() {
|
||||
this.showMedicalCard = true;
|
||||
this.closeModal();
|
||||
},
|
||||
deleteClientHandler(id) {
|
||||
this.clientId = id;
|
||||
this.modalConfig = this.modalConfig.map((el) => {
|
||||
return el.name === "delete"
|
||||
? { ...el, view: true }
|
||||
: { ...el, view: false };
|
||||
});
|
||||
this.titleModal = "Удалить клиента";
|
||||
this.openModal();
|
||||
},
|
||||
writeDeletedRowId() {
|
||||
this.deletedRowId = this.clientId;
|
||||
this.closeModal();
|
||||
},
|
||||
clearDeletedRowId() {
|
||||
this.deletedRowId = "";
|
||||
},
|
||||
clearDeletedClientId() {
|
||||
this.deletedClientId = "";
|
||||
this.clientId = "";
|
||||
},
|
||||
changeClearingTextSearch() {
|
||||
this.clearingTextSearch = false;
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
<template lang="pug">
|
||||
.wrap.flex.flex-col.gap-y-6
|
||||
.flex.flex.flex-col.gap-y-9
|
||||
.wrapper.flex.flex-col.gap-y-6.justify-between
|
||||
.flex.flex.flex-col.gap-y-6
|
||||
span.text-center.font-bold.text-xl Создание медицинской карты стоматологического пациента
|
||||
.flex.justify-center.items-center.gap-x-2
|
||||
base-button.button(:size="32", :rounded="true")
|
||||
span(v-if="isBaseData") 1
|
||||
.icon-ok.text-xs(v-else)
|
||||
span(:style="{color: 'var(--btn-blue-color)'}") Основное
|
||||
.line.flex.mx-2
|
||||
base-button.button(:class="{'active-button': !isIdentityDoc && isBaseData}", :size="32", :rounded="true")
|
||||
span(v-if="isBaseData") 2
|
||||
.icon-ok.text-xs(v-else)
|
||||
span(:style="{color: !isBaseData ? 'var(--btn-blue-color)' : 'var(--font-dark-blue-color)' }") ДУЛ
|
||||
.line.flex.mx-2
|
||||
base-button.button(:class="{'active-button': !isPolicyDoc }", :size="32", :rounded="true") 3
|
||||
span(:style="{color: isPolicyDoc ? 'var(--btn-blue-color)' : 'var(--font-dark-blue-color)' }") Полис
|
||||
medical-base-data(v-if="isBaseData", :change-base-data="changeBaseData")
|
||||
medical-identity-documents(v-if="isIdentityDoc", :change-identity-doc="changeIdentityDoc")
|
||||
medical-policy-documents(v-if="isPolicyDoc")
|
||||
.flex.self-center
|
||||
base-stepper(
|
||||
:steps="steps",
|
||||
:currentStep="currentStep"
|
||||
)
|
||||
component(v-bind:is="currentTabComponent")
|
||||
.flex.justify-between
|
||||
.flex
|
||||
base-button.font-semibold(
|
||||
:size="40",
|
||||
@click="prevStep",
|
||||
v-if="currentStep !== 0",
|
||||
outlined,
|
||||
) Назад
|
||||
.flex
|
||||
base-button.font-semibold(
|
||||
:size="40",
|
||||
@click="nextStep",
|
||||
v-if="currentStep < steps.length-1",
|
||||
) Далее
|
||||
base-button.font-semibold(
|
||||
:size="40",
|
||||
@click="finish",
|
||||
v-if="currentStep === steps.length-1"
|
||||
) Создать медицинскую карту
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,6 +37,7 @@ import BaseSelect from "@/components/base/BaseSelect";
|
||||
import MedicalBaseData from "@/pages/medicalCard/components/MedicalBaseData";
|
||||
import MedicalIdentityDocuments from "@/pages/medicalCard/components/MedicalIdentityDocuments";
|
||||
import MedicalPolicyDocuments from "@/pages/medicalCard/components/MedicalPolicyDocuments";
|
||||
import BaseStepper from "@/components/base/BaseStepper.vue";
|
||||
|
||||
export default {
|
||||
name: "FormCreateMedicalCard",
|
||||
@@ -39,68 +49,54 @@ export default {
|
||||
MedicalBaseData,
|
||||
MedicalIdentityDocuments,
|
||||
MedicalPolicyDocuments,
|
||||
BaseStepper,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isBaseData: true,
|
||||
isIdentityDoc: false,
|
||||
isPolicyDoc: false,
|
||||
currentStep: 0,
|
||||
steps: [
|
||||
{
|
||||
id: 0,
|
||||
label: "1",
|
||||
value: "Основное",
|
||||
component: "medical-base-data",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
label: "2",
|
||||
value: "ДУЛ",
|
||||
component: "medical-identity-documents",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: "3",
|
||||
value: "Полис",
|
||||
component: "medical-policy-documents",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentTabComponent: function () {
|
||||
return this.steps[this.currentStep]?.component;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changeBaseData() {
|
||||
this.isBaseData = !this.isBaseData;
|
||||
this.isIdentityDoc = !this.isIdentityDoc;
|
||||
nextStep() {
|
||||
this.currentStep += 1;
|
||||
},
|
||||
changeIdentityDoc() {
|
||||
this.isIdentityDoc = !this.isIdentityDoc;
|
||||
this.isPolicyDoc = !this.isPolicyDoc;
|
||||
prevStep() {
|
||||
this.currentStep -= 1;
|
||||
},
|
||||
finish() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.wrap
|
||||
.wrapper
|
||||
width: 570px
|
||||
height: fit-content
|
||||
min-height: 485px
|
||||
|
||||
.services-wrapper
|
||||
border: 1px solid var(--btn-grey-color)
|
||||
border-radius: 8px
|
||||
|
||||
.list-services
|
||||
overflow-y: auto
|
||||
max-height: 280px
|
||||
|
||||
.input-date
|
||||
border: 1.5px solid var(--border-light-grey-color)
|
||||
border-radius: 4px
|
||||
|
||||
.button
|
||||
&:hover
|
||||
background-color: var(--btn-blue-color)
|
||||
border: none
|
||||
|
||||
.active-button
|
||||
background: var(--btn-grey-color)
|
||||
color: var(--font-dark-blue-color)
|
||||
border-color: var(--btn-grey-color)
|
||||
&:hover
|
||||
background-color: var(--btn-grey-color)
|
||||
border: none
|
||||
|
||||
.line
|
||||
width: 78px
|
||||
border: 1.5px solid var(--btn-grey-color)
|
||||
|
||||
.place
|
||||
width: 100%
|
||||
border: 2px dashed var(--font-grey-color)
|
||||
border-radius: 4px
|
||||
color: var(--font-grey-color)
|
||||
|
||||
.counter
|
||||
color: var(--font-grey-color)
|
||||
</style>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
.flex.flex-col.gap-y-6
|
||||
.flex.flex-col.gap-y-2
|
||||
.font-bold Услуги
|
||||
.counter.text-smm Выберите подходищие из списка
|
||||
.counter.text-smm Выберите подходящие из списка
|
||||
.services-wrapper.flex.flex-col.pt-4.px-4
|
||||
.flex.gap-x-2
|
||||
base-input(
|
||||
|
||||
Reference in New Issue
Block a user