[WIP] Добавил приоритет клиента, обработку ввода паспортных данных, фикс чекбокса выбора клиента
This commit is contained in:
@@ -260,15 +260,14 @@ export default {
|
|||||||
},
|
},
|
||||||
postNewClient() {
|
postNewClient() {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
formData.append("full_name", this.infoClient.basic.full_name);
|
||||||
this.imageData.forEach((e) => {
|
this.imageData.forEach((e) => {
|
||||||
formData.append("photo", e);
|
formData.append("photo", e);
|
||||||
formData.append("full_name", this.infoClient.basic.full_name);
|
|
||||||
});
|
});
|
||||||
if (this.infoClient.basic.birth_date)
|
if (this.infoClient.basic.birth_date)
|
||||||
formData.append("birth_date", this.infoClient.basic.birth_date);
|
formData.append("birth_date", this.infoClient.basic.birth_date);
|
||||||
|
|
||||||
let foundElement = this.prioritySettings.settings.find(
|
let foundElement = this.prioritySettings.settings.find(
|
||||||
(el) => el.text === this.infoClient.basic.priority
|
(el) => el.priority === this.infoClient.basic.priority.id
|
||||||
);
|
);
|
||||||
if (foundElement) formData.append("priority", foundElement.priority);
|
if (foundElement) formData.append("priority", foundElement.priority);
|
||||||
fetchWrapper
|
fetchWrapper
|
||||||
|
|||||||
@@ -68,13 +68,11 @@
|
|||||||
v-model:value="sectionInfo[key]",
|
v-model:value="sectionInfo[key]",
|
||||||
:width="settings[section].width",
|
:width="settings[section].width",
|
||||||
:placeholder="settings[section].placeholder[key]"
|
:placeholder="settings[section].placeholder[key]"
|
||||||
|
:sharp="settings[section].sharps[key] && section === 'pass' ? settings[section].sharps[key] : ''"
|
||||||
)
|
)
|
||||||
base-input.max-h-10.py-2.pl-3(
|
base-input-date.input(
|
||||||
v-else-if="isChange && section !== 'docs'",
|
v-else-if="isChange && section !== 'docs'",
|
||||||
type="date",
|
|
||||||
v-model:value="sectionInfo.issued_by_date"
|
v-model:value="sectionInfo.issued_by_date"
|
||||||
:max-date="`${currentYear}-12-31`",
|
|
||||||
dateInput
|
|
||||||
)
|
)
|
||||||
.copy.icon-copy.cursor-pointer(
|
.copy.icon-copy.cursor-pointer(
|
||||||
v-if="item.copy",
|
v-if="item.copy",
|
||||||
@@ -123,9 +121,9 @@ import TableAddingNewAdditional from "@/pages/clients/components/TableAddingNewA
|
|||||||
import TableCreatePackageDoc from "@/pages/clients/components/TableCreatePackageDoc";
|
import TableCreatePackageDoc from "@/pages/clients/components/TableCreatePackageDoc";
|
||||||
import ClientDetailSectionAddress from "@/pages/clients/components/ClientDetailSectionAddress";
|
import ClientDetailSectionAddress from "@/pages/clients/components/ClientDetailSectionAddress";
|
||||||
import TableChoiceAddingDoc from "@/pages/clients/components/TableChoiceAddingDoc";
|
import TableChoiceAddingDoc from "@/pages/clients/components/TableChoiceAddingDoc";
|
||||||
import BaseInput from "@/components/base/BaseInput";
|
|
||||||
import BasePopup from "@/components/base/BasePopup";
|
import BasePopup from "@/components/base/BasePopup";
|
||||||
import BaseModal from "@/components/base/BaseModal";
|
import BaseModal from "@/components/base/BaseModal";
|
||||||
|
import BaseInputDate from "@/components/base/BaseInputDate";
|
||||||
import { detail } from "@/pages/clients/utils/tableConfig";
|
import { detail } from "@/pages/clients/utils/tableConfig";
|
||||||
import pdfIcon from "@/assets/icons/pdf.svg";
|
import pdfIcon from "@/assets/icons/pdf.svg";
|
||||||
import wordIcon from "@/assets/icons/word.svg";
|
import wordIcon from "@/assets/icons/word.svg";
|
||||||
@@ -134,7 +132,7 @@ export default {
|
|||||||
name: "ClientDetailInfoSection",
|
name: "ClientDetailInfoSection",
|
||||||
components: {
|
components: {
|
||||||
BaseButton,
|
BaseButton,
|
||||||
BaseInput,
|
BaseInputDate,
|
||||||
BasePopup,
|
BasePopup,
|
||||||
BaseModal,
|
BaseModal,
|
||||||
ClientDetailInput,
|
ClientDetailInput,
|
||||||
@@ -367,4 +365,7 @@ export default {
|
|||||||
width: 38px
|
width: 38px
|
||||||
z-index: 1
|
z-index: 1
|
||||||
background: var(--light-grey-bg-color)
|
background: var(--light-grey-bg-color)
|
||||||
|
|
||||||
|
.input
|
||||||
|
border: 1.5px solid var(--border-light-grey-color)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,15 +1,25 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.input-wrapper.flex.gap-x-2.px-3.box-border.w-max-fit(class="py-2.5")
|
.input-wrapper.flex.gap-x-2.px-3.box-border.w-max-fit(class="py-2.5")
|
||||||
textarea.place-input.w-full.outline-0.text-sm.not-italic.resize-none.font-medium(
|
textarea.place-input.w-full.outline-0.text-sm.not-italic.resize-none.font-medium(
|
||||||
|
v-if="!sharp"
|
||||||
:rows="Math.ceil(value.length/heightInput)",
|
:rows="Math.ceil(value.length/heightInput)",
|
||||||
:value="value",
|
:value="value",
|
||||||
@input="$emit('update:value', $event.target.value)",
|
@input="$emit('update:value', $event.target.value)",
|
||||||
:placeholder="placeholder",
|
:placeholder="placeholder",
|
||||||
)
|
)
|
||||||
|
input.place-input.w-full.outline-0.text-sm.not-italic.resize-none.font-medium(
|
||||||
|
v-else,
|
||||||
|
:rows="Math.ceil(value.length/heightInput)",
|
||||||
|
:value="value",
|
||||||
|
@input="$emit('update:value', $event.target.value)",
|
||||||
|
:placeholder="placeholder",
|
||||||
|
v-mask="sharp"
|
||||||
|
)
|
||||||
slot
|
slot
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mask } from "vue-the-mask";
|
||||||
export default {
|
export default {
|
||||||
name: "ClientDetailInput",
|
name: "ClientDetailInput",
|
||||||
props: {
|
props: {
|
||||||
@@ -20,7 +30,7 @@ export default {
|
|||||||
default: "Поиск",
|
default: "Поиск",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
directives: { mask },
|
||||||
computed: {
|
computed: {
|
||||||
heightInput() {
|
heightInput() {
|
||||||
return ((this.width / 100) * 70) / 11;
|
return ((this.width / 100) * 70) / 11;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
input.checkbox.cursor-pointer(type="checkbox" :id="id" :checked="isCheck" @change="(e) => check(e)")
|
input.checkbox.cursor-pointer(type="checkbox" :id="id" :checked="isCheck" @click.stop @change="(e) => check(e)")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
base-input.input-info(
|
base-input.input-info(
|
||||||
v-model:value="phone.username",
|
v-model:value="phone.username",
|
||||||
placeholder="+7 (915) 644–92–23",
|
placeholder="+7 (915) 644–92–23",
|
||||||
|
v-mask="'+7 (###) ###-##-##'",
|
||||||
:width-input="277"
|
:width-input="277"
|
||||||
)
|
)
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
@@ -56,6 +57,7 @@ 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 BaseCustomSelect from "@/components/base/BaseCustomSelect";
|
import BaseCustomSelect from "@/components/base/BaseCustomSelect";
|
||||||
|
import { mask } from "vue-the-mask";
|
||||||
export default {
|
export default {
|
||||||
name: "FormCreateBasicInfo",
|
name: "FormCreateBasicInfo",
|
||||||
components: {
|
components: {
|
||||||
@@ -76,6 +78,7 @@ export default {
|
|||||||
addNetwork: Function,
|
addNetwork: Function,
|
||||||
currentYear: Number,
|
currentYear: Number,
|
||||||
},
|
},
|
||||||
|
directives: { mask },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
networks: column.find((el) => el.name === "networks"),
|
networks: column.find((el) => el.name === "networks"),
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export const detail = {
|
|||||||
},
|
},
|
||||||
sharps: {
|
sharps: {
|
||||||
numba: "#### ######",
|
numba: "#### ######",
|
||||||
issued_by_org: "XXXXXX",
|
issued_by_org: "",
|
||||||
issued_by_org_code: "###-###",
|
issued_by_org_code: "###-###",
|
||||||
issued_by_date: "##.##.####",
|
issued_by_date: "##.##.####",
|
||||||
},
|
},
|
||||||
@@ -157,6 +157,7 @@ export const detail = {
|
|||||||
options: {
|
options: {
|
||||||
join_adress: "Полный адрес",
|
join_adress: "Полный адрес",
|
||||||
},
|
},
|
||||||
|
sharps: { join_adress: "" },
|
||||||
placeholder: {
|
placeholder: {
|
||||||
join_adress: "Введите адрес целиком",
|
join_adress: "Введите адрес целиком",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user