[WIP] Правка создания адресов и паспортных данных
This commit is contained in:
@@ -14,15 +14,6 @@
|
|||||||
:size="20"
|
:size="20"
|
||||||
)
|
)
|
||||||
.icon-ok.text-xsm(class="pt-[3px]")
|
.icon-ok.text-xsm(class="pt-[3px]")
|
||||||
//- base-button(
|
|
||||||
//- v-if="isChange && this.isData",
|
|
||||||
//- @click="createNewAddress",
|
|
||||||
//- confirm,
|
|
||||||
//- rounded,
|
|
||||||
//- outlined,
|
|
||||||
//- :size="20"
|
|
||||||
//- )
|
|
||||||
.icon-ok.text-xsm(class="pt-[3px]")
|
|
||||||
.edit.icon-edit.cursor-pointer.text-sm(
|
.edit.icon-edit.cursor-pointer.text-sm(
|
||||||
v-if="!isChange",
|
v-if="!isChange",
|
||||||
@click="changeClientData"
|
@click="changeClientData"
|
||||||
@@ -49,7 +40,7 @@
|
|||||||
:add-new-additional="addDocAdditional",
|
:add-new-additional="addDocAdditional",
|
||||||
:save-additional="saveDocs"
|
:save-additional="saveDocs"
|
||||||
)
|
)
|
||||||
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4(v-if="this.isData")
|
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4(v-if="this.isData || this.isAddress")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
||||||
span.title-section.font-semibold.text-xs(
|
span.title-section.font-semibold.text-xs(
|
||||||
@@ -144,6 +135,7 @@ export default {
|
|||||||
updateDocument: Function,
|
updateDocument: Function,
|
||||||
updateAddress: Function,
|
updateAddress: Function,
|
||||||
lackData: Boolean,
|
lackData: Boolean,
|
||||||
|
lackAddress: Boolean,
|
||||||
dopeAddress: Object,
|
dopeAddress: Object,
|
||||||
createAddress: Function,
|
createAddress: Function,
|
||||||
createDocument: Function,
|
createDocument: Function,
|
||||||
@@ -160,7 +152,6 @@ export default {
|
|||||||
},
|
},
|
||||||
docData: [],
|
docData: [],
|
||||||
isOpenAddingWrap: false,
|
isOpenAddingWrap: false,
|
||||||
isOpenChange: false,
|
|
||||||
isChange: false,
|
isChange: false,
|
||||||
settings: detail,
|
settings: detail,
|
||||||
cities: [
|
cities: [
|
||||||
@@ -169,15 +160,17 @@ export default {
|
|||||||
{ id: 1, label: "Луховицы" },
|
{ id: 1, label: "Луховицы" },
|
||||||
],
|
],
|
||||||
isData: true,
|
isData: true,
|
||||||
|
isAddress: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeData() {
|
changeData() {
|
||||||
this.isData = true;
|
|
||||||
this.isChange = true;
|
this.isChange = true;
|
||||||
if (this.section === "pass") {
|
if (this.section === "pass") {
|
||||||
|
this.isData = true;
|
||||||
this.createDocument();
|
this.createDocument();
|
||||||
} else if (this.section === "addresses") {
|
} else if (this.section === "addresses") {
|
||||||
|
this.isAddress = true;
|
||||||
this.createAddress();
|
this.createAddress();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,7 +183,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
saveChange() {
|
saveChange() {
|
||||||
this.isOpenChange = false;
|
|
||||||
this.isChange = false;
|
this.isChange = false;
|
||||||
if (this.section === "pass") {
|
if (this.section === "pass") {
|
||||||
this.updateDocument();
|
this.updateDocument();
|
||||||
@@ -217,7 +209,6 @@ export default {
|
|||||||
this.saveNewDoc(this.section, this.docData);
|
this.saveNewDoc(this.section, this.docData);
|
||||||
}
|
}
|
||||||
this.isOpenAddingWrap = false;
|
this.isOpenAddingWrap = false;
|
||||||
this.isOpenChange = false;
|
|
||||||
this.docData = [];
|
this.docData = [];
|
||||||
this.additionalData = {
|
this.additionalData = {
|
||||||
header: "",
|
header: "",
|
||||||
@@ -234,6 +225,12 @@ export default {
|
|||||||
this.isData = newValue;
|
this.isData = newValue;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
lackAddress: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newValue) {
|
||||||
|
this.isAddress = newValue;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:section-info="dataAddress"
|
:section-info="dataAddress"
|
||||||
section="addresses"
|
section="addresses"
|
||||||
:update-address="updateAddress"
|
:update-address="updateAddress"
|
||||||
:lack-data="lackData"
|
:lack-address="lackAddress"
|
||||||
:dope-address="dopeAddress"
|
:dope-address="dopeAddress"
|
||||||
:create-address="createAddress"
|
:create-address="createAddress"
|
||||||
)
|
)
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
section="docs"
|
section="docs"
|
||||||
:save-new-doc="saveNewDoc"
|
:save-new-doc="saveNewDoc"
|
||||||
:delete-doc="deleteDoc"
|
:delete-doc="deleteDoc"
|
||||||
:lack-data="lackData"
|
|
||||||
)
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -41,6 +40,7 @@ export default {
|
|||||||
updateDocument: Function,
|
updateDocument: Function,
|
||||||
updateAddress: Function,
|
updateAddress: Function,
|
||||||
lackData: Boolean,
|
lackData: Boolean,
|
||||||
|
lackAddress: Boolean,
|
||||||
dopeAddress: Object,
|
dopeAddress: Object,
|
||||||
createAddress: Function,
|
createAddress: Function,
|
||||||
createDocument: Function,
|
createDocument: Function,
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
:update-document="postUpdateIdentityDocument"
|
:update-document="postUpdateIdentityDocument"
|
||||||
:update-address="postUpdateAddress"
|
:update-address="postUpdateAddress"
|
||||||
:lack-data="lackData"
|
:lack-data="lackData"
|
||||||
|
:lack-address="lackAddress"
|
||||||
:dope-address="dopeAddress"
|
:dope-address="dopeAddress"
|
||||||
:create-address="postCreateAddress"
|
:create-address="postCreateAddress"
|
||||||
:create-document="postCreateIdentityDocument"
|
:create-document="postCreateIdentityDocument"
|
||||||
@@ -297,6 +298,7 @@ export default {
|
|||||||
? data?.issued_by_date.split("-").reverse().join(".")
|
? data?.issued_by_date.split("-").reverse().join(".")
|
||||||
: "",
|
: "",
|
||||||
};
|
};
|
||||||
|
this.lackData = true;
|
||||||
} else {
|
} else {
|
||||||
this.lackData = false;
|
this.lackData = false;
|
||||||
this.dataIdentityDocument = {
|
this.dataIdentityDocument = {
|
||||||
@@ -327,9 +329,9 @@ export default {
|
|||||||
this.dataAddress = {
|
this.dataAddress = {
|
||||||
join_adress: data?.join_adress,
|
join_adress: data?.join_adress,
|
||||||
};
|
};
|
||||||
this.lackData = true;
|
this.lackAddress = true;
|
||||||
} else {
|
} else {
|
||||||
this.lackData = false;
|
this.lackAddress = false;
|
||||||
this.dataAddress = {
|
this.dataAddress = {
|
||||||
join_adress: "",
|
join_adress: "",
|
||||||
};
|
};
|
||||||
@@ -394,6 +396,14 @@ export default {
|
|||||||
fetchWrapper
|
fetchWrapper
|
||||||
.post("general/identity_document/create/", {
|
.post("general/identity_document/create/", {
|
||||||
person_id: this.id,
|
person_id: this.id,
|
||||||
|
kind: "ПАСПОРТ",
|
||||||
|
series_number: this.dataIdentityDocument.numba,
|
||||||
|
issued_by_org: this.dataIdentityDocument.issued_by_org,
|
||||||
|
issued_by_org_code: this.dataIdentityDocument.issued_by_org_code,
|
||||||
|
issued_by_date: this.dataIdentityDocument.issued_by_date
|
||||||
|
.split(".")
|
||||||
|
.reverse()
|
||||||
|
.join("-"),
|
||||||
})
|
})
|
||||||
.then(() => this.fetchClientDetail(this.id));
|
.then(() => this.fetchClientDetail(this.id));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user