Merge pull request #119 from dderbentsov/UC-54
[WIP] Настроил поля ввода документов, карточку создания события
This commit is contained in:
@@ -8,9 +8,12 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@vuelidate/core": "^2.0.0",
|
||||||
|
"@vuelidate/validators": "^2.0.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
"vue-router": "^4.1.5",
|
"vue-router": "^4.1.5",
|
||||||
|
"vue-the-mask": "^0.11.1",
|
||||||
"vuex": "^4.0.2"
|
"vuex": "^4.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.flex-col.gap-y-6.pt-6.pb-7.px-8.event-form.absolute.right-0.bottom-14
|
.flex.flex-col.gap-y-6.pt-6.pb-7.px-8.event-form.absolute.right-0.bottom-14
|
||||||
.flex.justify-between
|
.flex.justify-between
|
||||||
span.title.text-xl.font-bold Назначение события
|
span.title.text-xl.font-bold {{!selectedEventData.id ? "Назначение события" : "Изменение события"}}
|
||||||
.flex.pt-2
|
.flex.pt-2
|
||||||
.icon-cancel.close-icon.tesxt-xs.cursor-pointer(@click="clearForm")
|
.icon-cancel.close-icon.tesxt-xs.cursor-pointer(@click="clearForm")
|
||||||
.flex.flex-col.gap-y-8
|
.flex.flex-col.gap-y-8
|
||||||
@@ -337,7 +337,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
postCreateEvent(event) {
|
postCreateEvent(event) {
|
||||||
fetchWrapper.post("registry/event/create/", event);
|
fetchWrapper
|
||||||
|
.post("registry/event/create/", event)
|
||||||
|
.then(this.$emit("update-events"));
|
||||||
},
|
},
|
||||||
postUpdateEvent(id, event) {
|
postUpdateEvent(id, event) {
|
||||||
fetchWrapper
|
fetchWrapper
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ export default {
|
|||||||
sectionInfo: Object,
|
sectionInfo: Object,
|
||||||
section: String,
|
section: String,
|
||||||
deleteDoc: Function,
|
deleteDoc: Function,
|
||||||
|
updateDocument: Function,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -118,6 +119,7 @@ export default {
|
|||||||
saveChange() {
|
saveChange() {
|
||||||
this.isOpenChange = false;
|
this.isOpenChange = false;
|
||||||
this.isChange = false;
|
this.isChange = false;
|
||||||
|
this.updateDocument();
|
||||||
},
|
},
|
||||||
openAddingWrap() {
|
openAddingWrap() {
|
||||||
if (!this.isChange) {
|
if (!this.isChange) {
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.w-full.h-fit.pt-4.flex.gap-x-4(class="px-[52px] pb-[30px]")
|
.w-full.h-fit.pt-4.flex.gap-x-4(class="px-[52px] pb-[30px]")
|
||||||
client-detail-info-section(v-model:section-info="dataDocument" section="pass")
|
client-detail-info-section(
|
||||||
|
v-model:section-info="dataDocument"
|
||||||
|
section="pass"
|
||||||
|
)
|
||||||
.flex.flex-col
|
.flex.flex-col
|
||||||
client-detail-info-section(:section-info="dataAddress" section="addresses")
|
client-detail-info-section(:section-info="dataAddress" section="addresses")
|
||||||
.flex.flex-col
|
.flex.flex-col
|
||||||
client-detail-info-section(:section-info="dataAttachments" section="docs" :save-new-doc="saveNewDoc" :delete-doc="deleteDoc")
|
client-detail-info-section(
|
||||||
|
:section-info="dataAttachments"
|
||||||
|
section="docs"
|
||||||
|
:save-new-doc="saveNewDoc"
|
||||||
|
:delete-doc="deleteDoc"
|
||||||
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -14,7 +14,15 @@
|
|||||||
.icon-ok.text-xsm(class="pt-[3px]")
|
.icon-ok.text-xsm(class="pt-[3px]")
|
||||||
.relative.dots-button.icon-dots.cursor-pointer.leading-6.text-center(v-show="!isOpenChange" :tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
|
.relative.dots-button.icon-dots.cursor-pointer.leading-6.text-center(v-show="!isOpenChange" :tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
|
||||||
clients-action-popup(v-if="isOpenPopup" :open-change-data="openChangeData")
|
clients-action-popup(v-if="isOpenPopup" :open-change-data="openChangeData")
|
||||||
client-detail-info-wrapper(v-if="isOpenDetailInfo" :data-address="dataAddress" :data-detail="dataDetail" :data-attachments="dataAttachments" :data-document="dataIdentityDocument" :save-new-doc="saveNewDoc" :delete-doc="deleteDoc")
|
client-detail-info-wrapper(
|
||||||
|
v-if="isOpenDetailInfo"
|
||||||
|
:data-address="dataAddress"
|
||||||
|
:data-detail="dataDetail"
|
||||||
|
:data-attachments="dataAttachments"
|
||||||
|
:data-document="dataIdentityDocument"
|
||||||
|
:save-new-doc="saveNewDoc"
|
||||||
|
:delete-doc="deleteDoc"
|
||||||
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -165,6 +173,14 @@ export default {
|
|||||||
postDeleteContact(contact) {
|
postDeleteContact(contact) {
|
||||||
fetchWrapper.del(`general/contact/${contact.id}/delete/`);
|
fetchWrapper.del(`general/contact/${contact.id}/delete/`);
|
||||||
},
|
},
|
||||||
|
postUpdateIdentityDocument() {
|
||||||
|
fetchWrapper.post(
|
||||||
|
`general/identity_document/${this.identity_document}/update/`,
|
||||||
|
{
|
||||||
|
series_number: this.dataIdentityDocument.numba,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
addNetwork(network) {
|
addNetwork(network) {
|
||||||
this.dataClient.contacts.push(network);
|
this.dataClient.contacts.push(network);
|
||||||
},
|
},
|
||||||
@@ -201,15 +217,15 @@ export default {
|
|||||||
},
|
},
|
||||||
saveIdentityDocument(data) {
|
saveIdentityDocument(data) {
|
||||||
this.dataIdentityDocument = {
|
this.dataIdentityDocument = {
|
||||||
numba: data?.numba || "-",
|
numba: data?.numba || "",
|
||||||
issued_by_org: data?.issued_by_org || "-",
|
issued_by_org: data?.issued_by_org || "",
|
||||||
issued_by_org_code: data?.issued_by_org_code || "-",
|
issued_by_org_code: data?.issued_by_org_code || "",
|
||||||
issued_by_date: data?.issued_by_date || "-",
|
issued_by_date: data?.issued_by_date || "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
saveAddress(data) {
|
saveAddress(data) {
|
||||||
this.dataAddress = {
|
this.dataAddress = {
|
||||||
join_adress: data?.join_adress || "-",
|
join_adress: data?.join_adress || "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
saveAttachments(data) {
|
saveAttachments(data) {
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
.grid.grid-cols-2.gap-x-4.gap-y-6
|
.grid.grid-cols-2.gap-x-4.gap-y-6
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Серия и номер
|
span.text-sm Серия и номер
|
||||||
base-input.input-info(v-model:value="identityDocument.pass.series_number" placeholder="0000 000000" :width-input="277")
|
base-input.input-info(v-mask="'#### ######'" v-model:value="identityDocument.pass.series_number" placeholder="0000 000000" :width-input="277")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Кем и когда выдан
|
span.text-sm Кем и когда выдан
|
||||||
base-input.input-info(v-model:value="identityDocument.pass.issued_by_org" placeholder="Точно как в паспорте" :width-input="277")
|
base-input.input-info(v-model:value="identityDocument.pass.issued_by_org" placeholder="Точно как в паспорте" :width-input="277")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Код подразделения
|
span.text-sm Код подразделения
|
||||||
base-input.input-info(v-model:value="identityDocument.pass.issued_by_org_code" placeholder="000–000" :width-input="277")
|
base-input.input-info(v-mask="'###-###'" v-model:value="identityDocument.pass.issued_by_org_code" placeholder="000–000" :width-input="277")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Дата выдачи
|
span.text-sm Дата выдачи
|
||||||
base-input.input-info( type="date" v-model:value="identityDocument.pass.issued_by_date" placeholder="Дата" :width-input="277")
|
base-input.input-info( type="date" v-model:value="identityDocument.pass.issued_by_date" placeholder="Дата" :width-input="277")
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
.grid.grid-cols-2.gap-x-4.gap-y-6
|
.grid.grid-cols-2.gap-x-4.gap-y-6
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Номер СНИЛС
|
span.text-sm Номер СНИЛС
|
||||||
base-input.input-info(v-model:value="identityDocument.snils.numba" placeholder="000–000–000 00" :width-input="277")
|
base-input.input-info(v-mask="'###-###-### ##'" v-model:value="identityDocument.snils.numba" placeholder="000–000–000 00" :width-input="277")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Номер ИНН
|
span.text-sm Номер ИНН
|
||||||
base-input.input-info(v-model:value="identityDocument.inn.numba" placeholder="000000000000" :width-input="277")
|
base-input.input-info(v-mask="'##########'" v-model:value="identityDocument.inn.numba" placeholder="000000000000" :width-input="277")
|
||||||
.px-4
|
.px-4
|
||||||
base-button(@click="saveClient" :size="40")
|
base-button(@click="saveClient" :size="40")
|
||||||
span.font-semibold Создать клиента
|
span.font-semibold Создать клиента
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
<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 { mask } from "vue-the-mask";
|
||||||
export default {
|
export default {
|
||||||
name: "FormCreateIdentityDocuments",
|
name: "FormCreateIdentityDocuments",
|
||||||
components: { BaseInput, BaseButton },
|
components: { BaseInput, BaseButton },
|
||||||
@@ -39,6 +40,7 @@ export default {
|
|||||||
identityDocument: Object,
|
identityDocument: Object,
|
||||||
saveClient: Function,
|
saveClient: Function,
|
||||||
},
|
},
|
||||||
|
directives: { mask },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user