2023-06-28 17:22:44 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted } from "vue";
|
|
|
|
|
import type { QForm } from "quasar";
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
import { useQuasar } from "quasar";
|
2023-07-13 16:15:58 +07:00
|
|
|
import type { DataOption } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
2023-06-28 17:22:44 +07:00
|
|
|
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
|
|
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
|
|
|
|
import { useRoute } from "vue-router";
|
2023-07-13 16:15:58 +07:00
|
|
|
import type { PropType } from "vue";
|
|
|
|
|
import type { Family } from "@/modules/05_placement/interface/index/Main";
|
|
|
|
|
import { FamilyDataDefualt } from "@/modules/05_placement/interface/index/Main";
|
2023-06-28 17:22:44 +07:00
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
statusEdit: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
notiNoEdit: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: () => console.log("not function"),
|
|
|
|
|
},
|
2023-07-13 09:10:43 +07:00
|
|
|
fetch: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: () => console.log("not function"),
|
|
|
|
|
},
|
2023-07-13 16:15:58 +07:00
|
|
|
data: {
|
|
|
|
|
type: Object as PropType<Family>,
|
|
|
|
|
default: FamilyDataDefualt,
|
|
|
|
|
},
|
2023-06-28 17:22:44 +07:00
|
|
|
});
|
|
|
|
|
const emit = defineEmits(["update:statusEdit"]);
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const $q = useQuasar();
|
2023-07-13 16:15:58 +07:00
|
|
|
|
2023-06-28 17:22:44 +07:00
|
|
|
const mixin = useCounterMixin();
|
2024-05-07 17:06:34 +07:00
|
|
|
const {
|
|
|
|
|
date2Thai,
|
|
|
|
|
success,
|
|
|
|
|
messageError,
|
|
|
|
|
showLoader,
|
|
|
|
|
hideLoader,
|
|
|
|
|
dialogConfirm,
|
|
|
|
|
} = mixin;
|
2023-06-28 17:22:44 +07:00
|
|
|
const edit = ref<boolean>(false);
|
2023-07-13 16:15:58 +07:00
|
|
|
|
2023-06-28 17:22:44 +07:00
|
|
|
const myform = ref<QForm | null>(null);
|
2023-07-13 16:15:58 +07:00
|
|
|
const familyData = ref<Family>(props.data);
|
|
|
|
|
|
2023-06-28 17:22:44 +07:00
|
|
|
const Ops = ref<any>({
|
|
|
|
|
prefixOps: [],
|
|
|
|
|
});
|
|
|
|
|
const OpsFilter = ref<any>({
|
|
|
|
|
prefixOps: [],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
await fetchPrefix();
|
2023-07-13 16:15:58 +07:00
|
|
|
|
2023-06-28 17:22:44 +07:00
|
|
|
emit("update:statusEdit", false);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const filterSelector = (val: any, update: Function, refData: string) => {
|
|
|
|
|
update(() => {
|
|
|
|
|
Ops.value[`${refData}`] = OpsFilter.value[`${refData}`].filter(
|
|
|
|
|
(v: DataOption) => v.name.indexOf(val) > -1
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const refreshData = async () => {
|
|
|
|
|
if (myform.value != null) {
|
|
|
|
|
myform.value.reset();
|
|
|
|
|
}
|
2023-07-13 16:15:58 +07:00
|
|
|
emit("update:statusEdit", false);
|
|
|
|
|
await props.fetch();
|
2023-06-28 17:22:44 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchPrefix = async () => {
|
2023-07-13 16:15:58 +07:00
|
|
|
showLoader();
|
2023-06-28 17:22:44 +07:00
|
|
|
await http
|
2024-05-16 15:43:18 +07:00
|
|
|
.get(config.API.profileNewMetaMain)
|
2023-06-28 17:22:44 +07:00
|
|
|
.then((res) => {
|
|
|
|
|
const data = res.data.result;
|
|
|
|
|
let option: DataOption[] = [];
|
2024-05-16 15:43:18 +07:00
|
|
|
data.prefixs.map((r: any) => {
|
|
|
|
|
option.push({ id: r.name.toString(), name: r.name.toString() });
|
2023-06-28 17:22:44 +07:00
|
|
|
});
|
|
|
|
|
Ops.value.prefixOps = option;
|
|
|
|
|
OpsFilter.value.prefixOps = option;
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
2023-07-13 16:15:58 +07:00
|
|
|
hideLoader();
|
2023-06-28 17:22:44 +07:00
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2023-07-13 16:15:58 +07:00
|
|
|
const editData = async () => {
|
2024-05-07 17:06:34 +07:00
|
|
|
dialogConfirm($q, async () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
// const body: ResponseObject = {
|
|
|
|
|
// couple: familyData.value.couple == "1",
|
|
|
|
|
// couplePrefixId: familyData.value.marryPrefixId,
|
|
|
|
|
// coupleFirstName: familyData.value.marryFirstName,
|
|
|
|
|
// coupleLastName: familyData.value.marryLastName,
|
|
|
|
|
// coupleLastNameOld: familyData.value.lastnameCOld,
|
|
|
|
|
// coupleCareer: familyData.value.marryOccupation,
|
|
|
|
|
// fatherPrefixId: familyData.value.fatherPrefixId,
|
|
|
|
|
// fatherFirstName: familyData.value.fatherFirstName,
|
|
|
|
|
// fatherLastName: familyData.value.fatherLastName,
|
|
|
|
|
// fatherCareer: familyData.value.fatherOccupation,
|
|
|
|
|
// motherPrefixId: familyData.value.motherPrefixId,
|
|
|
|
|
// motherFirstName: familyData.value.motherFirstName,
|
|
|
|
|
// motherLastName: familyData.value.motherLastName,
|
|
|
|
|
// motherCareer: familyData.value.motherOccupation,
|
|
|
|
|
// // childrens: familyData.value.childrens,
|
|
|
|
|
// createdFullName: "-",
|
|
|
|
|
// createdAt: new Date(),
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
const body = {
|
|
|
|
|
couple: familyData.value.couple == "1",
|
2024-05-16 17:31:14 +07:00
|
|
|
couplePrefix: familyData.value.marryPrefixId,
|
2024-05-07 17:06:34 +07:00
|
|
|
coupleFirstName: familyData.value.marryFirstName,
|
|
|
|
|
coupleLastName: familyData.value.marryLastName,
|
|
|
|
|
coupleLastNameOld: "",
|
|
|
|
|
coupleCareer: familyData.value.marryOccupation,
|
2024-05-16 17:31:14 +07:00
|
|
|
fatherPrefix: familyData.value.fatherPrefixId,
|
2024-05-07 17:06:34 +07:00
|
|
|
fatherFirstName: familyData.value.fatherFirstName,
|
|
|
|
|
fatherLastName: familyData.value.fatherLastName,
|
|
|
|
|
fatherCareer: familyData.value.fatherOccupation,
|
2024-05-16 17:31:14 +07:00
|
|
|
motherPrefix: familyData.value.motherPrefixId,
|
2024-05-07 17:06:34 +07:00
|
|
|
motherFirstName: familyData.value.motherFirstName,
|
|
|
|
|
motherLastName: familyData.value.motherLastName,
|
|
|
|
|
motherCareer: familyData.value.motherOccupation,
|
|
|
|
|
};
|
|
|
|
|
await http
|
|
|
|
|
.put(
|
|
|
|
|
config.API.placementFamilyId(route.params.personalId.toString()),
|
|
|
|
|
body
|
|
|
|
|
)
|
|
|
|
|
.then(() => {
|
|
|
|
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(async () => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
edit.value = false;
|
|
|
|
|
emit("update:statusEdit", false);
|
|
|
|
|
await props.fetch();
|
|
|
|
|
});
|
|
|
|
|
});
|
2023-06-28 17:22:44 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const saveData = async () => {
|
2023-07-13 16:15:58 +07:00
|
|
|
await myform.value?.validate().then(async (success: boolean) => {
|
|
|
|
|
if (success) {
|
|
|
|
|
await editData();
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
});
|
2023-06-28 17:22:44 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const selectRadio = (e: boolean, i: any) => {
|
|
|
|
|
if (e) {
|
2023-07-13 16:15:58 +07:00
|
|
|
familyData.value.marryPrefixId = "";
|
|
|
|
|
familyData.value.marryFirstName = "";
|
|
|
|
|
familyData.value.marryLastName = "";
|
|
|
|
|
// familyData.value.lastnameCOld = "";
|
|
|
|
|
familyData.value.marryOccupation = "";
|
2023-06-28 17:22:44 +07:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const changeBtn = async () => {
|
|
|
|
|
if (edit.value == true) {
|
|
|
|
|
if (props.statusEdit === true) {
|
|
|
|
|
edit.value = false;
|
|
|
|
|
props.notiNoEdit();
|
|
|
|
|
} else {
|
|
|
|
|
emit("update:statusEdit", true);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
emit("update:statusEdit", false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const getClass = (val: boolean) => {
|
|
|
|
|
return {
|
|
|
|
|
"full-width inputgreen cursor-pointer": val,
|
|
|
|
|
"full-width cursor-pointer": !val,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<q-card flat class="col-12 q-px-lg q-py-md q-mt-md text-dark">
|
2024-05-07 17:06:34 +07:00
|
|
|
<q-form ref="myform" greedy @submit.prevent @validation-success="editData">
|
|
|
|
|
<HeaderTop
|
|
|
|
|
v-model:edit="edit"
|
|
|
|
|
header="ข้อมูลครอบครัว"
|
|
|
|
|
icon="mdi-account-group"
|
|
|
|
|
:history="false"
|
|
|
|
|
:changeBtn="changeBtn"
|
|
|
|
|
:disable="statusEdit"
|
|
|
|
|
:cancel="refreshData"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<div class="row col-12 items-top q-col-gutter-x-xs q-col-gutter-y-xs">
|
2023-06-28 17:22:44 +07:00
|
|
|
<div class="col-xs-12 text-weight-bold">• บิดา</div>
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
|
|
|
<selector
|
|
|
|
|
:hide-dropdown-icon="!edit"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.fatherPrefixId"
|
2023-06-28 17:22:44 +07:00
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
option-label="name"
|
|
|
|
|
:options="Ops.prefixOps"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:label="`${'คำนำหน้า'}`"
|
|
|
|
|
use-input
|
|
|
|
|
input-debounce="0"
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
|
|
|
|
|
) "
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.fatherFirstName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
|
|
|
|
:label="`${'ชื่อ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.fatherLastName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
|
|
|
|
:label="`${'นามสกุล'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.fatherOccupation"
|
2023-06-28 17:22:44 +07:00
|
|
|
:label="`${'อาชีพ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12 q-pt-md q-pb-sm"><q-separator /></div>
|
|
|
|
|
<div class="col-xs-12 text-weight-bold">• มารดา</div>
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
|
|
|
<selector
|
|
|
|
|
:hide-dropdown-icon="!edit"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.motherPrefixId"
|
2023-06-28 17:22:44 +07:00
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
option-label="name"
|
|
|
|
|
:options="Ops.prefixOps"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:label="`${'คำนำหน้า'}`"
|
|
|
|
|
use-input
|
|
|
|
|
input-debounce="0"
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
|
|
|
|
|
) "
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.motherFirstName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
|
|
|
|
:label="`${'ชื่อ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.motherLastName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
|
|
|
|
:label="`${'นามสกุล'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.motherOccupation"
|
2023-06-28 17:22:44 +07:00
|
|
|
:label="`${'อาชีพ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 q-pt-md q-pb-sm"><q-separator /></div>
|
|
|
|
|
<div class="col-xs-12 q-col-gutter-x-sm items-center flex q-my-sm">
|
|
|
|
|
<label class="text-weight-bold">• คู่สมรส</label>
|
|
|
|
|
<q-radio
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.couple"
|
2023-06-28 17:22:44 +07:00
|
|
|
checked-icon="task_alt"
|
|
|
|
|
unchecked-icon="panorama_fish_eye"
|
|
|
|
|
val="1"
|
|
|
|
|
label="มี"
|
|
|
|
|
dense
|
|
|
|
|
:disable="!edit"
|
|
|
|
|
@update:model-value="selectRadio"
|
|
|
|
|
/>
|
|
|
|
|
<q-radio
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.couple"
|
2023-06-28 17:22:44 +07:00
|
|
|
checked-icon="task_alt"
|
|
|
|
|
unchecked-icon="panorama_fish_eye"
|
|
|
|
|
val="0"
|
|
|
|
|
label="ไม่มี"
|
|
|
|
|
dense
|
|
|
|
|
:disable="!edit"
|
|
|
|
|
@update:model-value="selectRadio"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-07-13 16:15:58 +07:00
|
|
|
<div
|
|
|
|
|
class="col-xs-12 col-sm-2 col-md-2"
|
|
|
|
|
v-if="familyData.couple == '1'"
|
|
|
|
|
>
|
2023-06-28 17:22:44 +07:00
|
|
|
<selector
|
|
|
|
|
:hide-dropdown-icon="!edit"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.marryPrefixId"
|
2023-06-28 17:22:44 +07:00
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
option-label="name"
|
|
|
|
|
:options="Ops.prefixOps"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:label="`${'คำนำหน้า'}`"
|
|
|
|
|
use-input
|
|
|
|
|
input-debounce="0"
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
|
|
|
|
|
) "
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-07-13 16:15:58 +07:00
|
|
|
<div class="col-xs-6 col-sm-3 col-md-3" v-if="familyData.couple == '1'">
|
2023-06-28 17:22:44 +07:00
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.marryFirstName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
|
|
|
|
:label="`${'ชื่อ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-07-13 16:15:58 +07:00
|
|
|
<div class="col-xs-6 col-sm-2 col-md-2" v-if="familyData.couple == '1'">
|
2023-06-28 17:22:44 +07:00
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.marryLastName"
|
2023-06-28 17:22:44 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
|
|
|
|
:label="`${'นามสกุล'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-07-13 16:15:58 +07:00
|
|
|
<!-- <div class="col-xs-6 col-sm-2 col-md-2" v-if="familyData.couple == '1'">
|
2023-06-28 17:22:44 +07:00
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
|
|
|
|
v-model="familyData.lastnameCOld"
|
|
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล(เดิม)'}`]"
|
|
|
|
|
:label="`${'นามสกุล(เดิม)'}`"
|
|
|
|
|
/>
|
2023-07-13 16:15:58 +07:00
|
|
|
</div> -->
|
|
|
|
|
<div
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-3"
|
|
|
|
|
v-if="familyData.couple == '1'"
|
|
|
|
|
>
|
2023-06-28 17:22:44 +07:00
|
|
|
<q-input
|
|
|
|
|
:class="getClass(edit)"
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
:outlined="edit"
|
|
|
|
|
dense
|
|
|
|
|
lazy-rules
|
|
|
|
|
:readonly="!edit"
|
|
|
|
|
:borderless="!edit"
|
2023-07-13 16:15:58 +07:00
|
|
|
v-model="familyData.marryOccupation"
|
2023-06-28 17:22:44 +07:00
|
|
|
:label="`${'อาชีพ'}`"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.q-card {
|
2023-07-13 09:10:43 +07:00
|
|
|
box-shadow: 0px 0px 0px 0px !important;
|
2023-06-28 17:22:44 +07:00
|
|
|
}
|
2023-07-13 09:10:43 +07:00
|
|
|
</style>
|