diff --git a/src/modules/04_registryPerson/components/Dialog/01_Information.vue b/src/modules/04_registryPerson/components/Dialog/01_Information.vue
index 70b8f6755..53bb9cd32 100644
--- a/src/modules/04_registryPerson/components/Dialog/01_Information.vue
+++ b/src/modules/04_registryPerson/components/Dialog/01_Information.vue
@@ -117,47 +117,25 @@ watch(
/>
- filterSelector(inputValue, doneFn, 'prefixOps'
- )"
+ :rules="[(val: string) => !!val || `${'กรุณากรอก คำนำหน้าชื่อ'}`]"
/>
- filterSelector(inputValue, doneFn, 'rankOps'
- )"
/>
@@ -239,47 +217,23 @@ watch(
/>
- filterSelector(inputValue, doneFn, 'genderOps'
- )"
/>
- filterSelector(inputValue, doneFn, 'statusOps'
- )"
/>
@@ -305,47 +259,13 @@ watch(
/>
- filterSelector(inputValue, doneFn, 'religionOps'
- )"
- />
-
-
- filterSelector(inputValue, doneFn, 'bloodOps'
- )"
/>
@@ -353,11 +273,9 @@ watch(
dense
outlined
lazy-rules
- hide-bottom-space
- mask="##########"
+ v-model="formInformations.bloodGroup"
class="inputgreen"
- v-model="formInformations.phone"
- :label="dataLabel.phone"
+ :label="dataLabel.bloodGroup"
/>
diff --git a/src/modules/04_registryPerson/components/Dialog/03_Family.vue b/src/modules/04_registryPerson/components/Dialog/03_Family.vue
deleted file mode 100644
index a34c53fa4..000000000
--- a/src/modules/04_registryPerson/components/Dialog/03_Family.vue
+++ /dev/null
@@ -1,571 +0,0 @@
-
-
-
-
ข้อมูลครอบครัว
-
• บิดา
-
-
-
-
- storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
- ) "
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
สถานภาพการมีชีวิต
-
-
-
-
-
-
-
• มารดา
-
-
-
-
- storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
- ) "
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
สถานภาพการมีชีวิต
-
-
-
-
-
-
-
• คู่สมรส
-
-
-
- filterSelectorRelation(inputValue, doneFn) "
- />
-
-
-
-
-
-
-
- storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
- ) "
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
สถานภาพการมีชีวิต
-
-
-
-
-
-
-
- • บุตร
- เพิ่ม
-
-
-
บุตรคนที่:{{ index + 1 }}
-
-
-
-
- storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
- ) "
- />
-
-
-
-
-
-
-
-
-
-
-
-
- ลบ
-
-
-
-
-
สถานภาพการมีชีวิต
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/04_registryPerson/components/Dialog/04_Father.vue b/src/modules/04_registryPerson/components/Dialog/04_Father.vue
new file mode 100644
index 000000000..8b9d6c3ae
--- /dev/null
+++ b/src/modules/04_registryPerson/components/Dialog/04_Father.vue
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
+ ) "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
สถานภาพการมีชีวิต
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ยกเลิก
+
+
+
+
+
diff --git a/src/modules/04_registryPerson/components/Dialog/05_Mother.vue b/src/modules/04_registryPerson/components/Dialog/05_Mother.vue
new file mode 100644
index 000000000..e5352bb0a
--- /dev/null
+++ b/src/modules/04_registryPerson/components/Dialog/05_Mother.vue
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
+ ) "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
สถานภาพการมีชีวิต
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ยกเลิก
+
+
+
+
+
diff --git a/src/modules/04_registryPerson/components/Dialog/06_Couple.vue b/src/modules/04_registryPerson/components/Dialog/06_Couple.vue
new file mode 100644
index 000000000..8204a14fe
--- /dev/null
+++ b/src/modules/04_registryPerson/components/Dialog/06_Couple.vue
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ filterSelectorRelation(inputValue, doneFn) "
+ />
+
+
+
+
+
+
+
+ storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
+ ) "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
สถานภาพการมีชีวิต
+
+
+
+
+
+
+
+
+
+
+
+
+ ยกเลิก
+
+
+
+
+
diff --git a/src/modules/04_registryPerson/components/Dialog/07_Child.vue b/src/modules/04_registryPerson/components/Dialog/07_Child.vue
new file mode 100644
index 000000000..0a63dbcb6
--- /dev/null
+++ b/src/modules/04_registryPerson/components/Dialog/07_Child.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+
+
+
+
+ • บุตร
+ เพิ่ม
+
+
+
บุตรคนที่:{{ index + 1 }}
+
+
+
+
+ storeProfile.filterSelector(inputValue, doneFn,'prefixOps'
+ ) "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ ลบ
+
+
+
+
+
สถานภาพการมีชีวิต
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ยกเลิก
+
+
+
+
+
diff --git a/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue b/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue
index 65f61c2d1..3996253b2 100644
--- a/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue
+++ b/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue
@@ -19,7 +19,6 @@ import type {
import Header from "@/components/DialogHeader.vue"; //ส่วนหัว popup
import InformationPage from "@/modules/04_registryPerson/components/Dialog/01_Information.vue"; //form ข้อมูลส่วนตัว
import AddressPage from "@/modules/04_registryPerson/components/Dialog/02_Address.vue"; //form ข้อมูลที่อยู่
-import FamilyPage from "@/modules/04_registryPerson/components/Dialog/03_Family.vue"; //form ข้อมูลครอบครัว
const modal = defineModel("modal", { required: true }); // ตัวแปร popup
const idCard = defineModel("idCard", { required: true }); //เลขบัตร ปชช
@@ -57,7 +56,6 @@ const formInformations = reactive({
nationality: null,
ethnicity: null,
birthDate: null,
- phone: null,
lastName: "",
firstName: "",
prefix: "",
@@ -78,38 +76,9 @@ const formDataAddress = reactive({
registrationAddress: "",
});
-const fatherData = reactive({
- isLive: 1,
- citizenId: "",
- prefix: "",
- firstName: "",
- lastName: "",
- job: "",
-});
-const motherData = reactive({
- isLive: 1,
- citizenId: "",
- prefix: "",
- firstName: "",
- lastName: "",
- job: "",
-});
-const coupleData = reactive({
- isLive: 1,
- citizenId: "",
- prefix: "",
- firstName: "",
- lastName: "",
- job: "",
- lastNameOld: "",
- statusMarital: "",
-});
-const childData = ref([]);
-
/** ปิด popup */
async function closeDialog() {
modal.value = false;
- childData.value = [];
formInformations.bloodGroup = null;
formInformations.relationship = null;
@@ -119,34 +88,10 @@ async function closeDialog() {
formInformations.nationality = null;
formInformations.ethnicity = null;
formInformations.birthDate = null;
- formInformations.phone = null;
formInformations.lastName = "";
formInformations.firstName = "";
formInformations.prefix = "";
formInformations.rank = null;
-
- fatherData.isLive = 1;
- fatherData.citizenId = "";
- fatherData.prefix = "";
- fatherData.firstName = "";
- fatherData.lastName = "";
- fatherData.job = "";
-
- motherData.isLive = 1;
- motherData.citizenId = "";
- motherData.prefix = "";
- motherData.firstName = "";
- motherData.lastName = "";
- motherData.job = "";
-
- coupleData.isLive = 1;
- coupleData.citizenId = "";
- coupleData.prefix = "";
- coupleData.firstName = "";
- coupleData.lastName = "";
- coupleData.job = "";
- coupleData.lastNameOld = "";
- coupleData.statusMarital = "";
}
/** อัพเดตข้อมูลส่วนตัว */
@@ -195,104 +140,6 @@ async function upDateAddress() {
.finally(() => {});
}
-/** อัพเดตข้อมูลครอบครัว */
-async function upDateFamily() {
- await saveFather();
- await saveMother();
- if (coupleData.citizenId !== "") {
- saveCouple();
- }
- if (childData.value.length !== 0) {
- for (const child of childData.value) {
- saveChildren(child);
- }
- }
- count.value += 1;
-}
-
-async function saveFather() {
- const body = {
- profileId: profileId.value,
- fatherCitizenId: fatherData.citizenId,
- fatherPrefix: fatherData.prefix,
- fatherFirstName: fatherData.firstName,
- fatherLastName: fatherData.lastName,
- fatherCareer: fatherData.job,
- fatherLive: fatherData.isLive === 1 ? true : false,
- };
- http
- .post(config.API.profileFamily("", "father"), body)
- .then((res) => {})
- .catch((e) => {
- messageError($q, e);
- hideLoader();
- })
- .finally(() => {});
-}
-
-async function saveMother() {
- const body = {
- profileId: profileId.value,
- motherCitizenId: motherData.citizenId,
- motherPrefix: motherData.prefix,
- motherFirstName: motherData.firstName,
- motherLastName: motherData.lastName,
- motherCareer: motherData.job,
- motherLive: motherData.isLive === 1 ? true : false,
- };
- http
- .post(config.API.profileFamily("", "mother"), body)
- .then((res) => {})
- .catch((e) => {
- messageError($q, e);
- hideLoader();
- })
- .finally(() => {});
-}
-
-async function saveCouple() {
- const body = {
- profileId: profileId.value,
- coupleCitizenId: coupleData.citizenId,
- couplePrefix: coupleData.prefix,
- coupleFirstName: coupleData.firstName,
- coupleLastName: coupleData.lastName,
- coupleCareer: coupleData.job,
- coupleLive: coupleData.isLive === 1 ? true : false,
- relationship: coupleData.statusMarital,
- coupleLastNameOld: coupleData.lastNameOld,
- };
- http
- .post(config.API.profileFamily("", "couple"), body)
- .then((res) => {})
- .catch((e) => {
- messageError($q, e);
- hideLoader();
- })
- .finally(() => {});
-}
-
-async function saveChildren(child: FormChildren) {
- const body = {
- profileId: profileId.value,
- childrenCitizenId: child.childrenCitizenId,
- childrenPrefix: child.childrenPrefix,
- childrenFirstName: child.childrenFirstName,
- childrenLastName: child.childrenLastName,
- childrenCareer: child.childrenCareer,
- childrenLive: child.childrenLive === 1 ? true : false,
- };
-
- return http
- .post(config.API.profileFamily("", "children"), body)
- .then((res) => {})
- .catch((e) => {
- messageError($q, e);
- hideLoader();
- })
- .finally(() => {});
-}
-
/** ส่ง สถานะ ดำเนินการเเล้ว */
async function upDateStatus() {
await http
@@ -318,8 +165,7 @@ function onSubmit() {
showLoader();
await upDateInfomation();
await upDateAddress();
- await upDateFamily();
- if (count.value == 3) {
+ if (count.value == 2) {
await upDateStatus();
success($q, "บันทึกข้อมูลสำเร็จ");
closeDialog();
@@ -334,53 +180,6 @@ async function amiRequest() {
data.value = profile;
data.value = profile;
- data.value = {
- titleCode: 3,
- titleDesc: "นาย",
- titleName: "นาย",
- titleSex: 1,
- firstName: "ชัยชนะ",
- middleName: "",
- lastName: "เรืองโรจน์",
- genderCode: 1,
- genderDesc: "ชาย",
- dateOfBirth: 25211228,
- nationalityCode: 99,
- nationalityDesc: "ไทย",
- ownerStatusDesc: "เจ้าบ้าน",
- statusOfPersonCode: 0,
- statusOfPersonDesc: "บุคคลนี้มีภูมิลำเนาอยู่ในบ้านนี้",
- dateOfMoveIn: 25580728,
- age: 45,
-
- fatherPersonalID: 3102100621479,
- fatherName: "บุญเชิด",
- fatherNationalityCode: 99,
- fatherNationalityDesc: "ไทย",
-
- motherPersonalID: 3102100621487,
- motherName: "พยอม",
- motherNationalityCode: 99,
- motherNationalityDesc: "ไทย",
-
- fullnameAndRank: "นายสุพลชัย พูลสวัสดิ์",
- englishTitleDesc: "MR.",
- englishFirstName: "SUPHONCHAI",
- englishMiddleName: "",
- englishLastName: "PHOONSAWAT",
-
- registrationAddress: "1220-1222 ถนนเพชรบุรี",
- registrationProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
- registrationDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
- registrationSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
- registrationZipCode: "10400",
- currentAddress: "1220-1222 ถนนเพชรบุรี",
- currentProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
- currentDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
- currentSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
- currentZipCode: "10400",
- };
-
formInformations.citizenId = idCard.value;
formInformations.prefix = data.value.titleName;
fullName.value = data.value.fullnameAndRank;
@@ -496,17 +295,6 @@ watch(
v-model:present-address="presentAddress"
/>
-
-
-
-
-
-
diff --git a/src/modules/04_registryPerson/interface/request/Profile.ts b/src/modules/04_registryPerson/interface/request/Profile.ts
index c56dab36a..53b616805 100644
--- a/src/modules/04_registryPerson/interface/request/Profile.ts
+++ b/src/modules/04_registryPerson/interface/request/Profile.ts
@@ -8,7 +8,6 @@ interface RequestObject {
gender: string | null;
lastName: string;
nationality: string | null;
- phone: string | null;
// posLevelId: string;
// posTypeId: string;
prefix: string;