diff --git a/src/modules/05_placement/components/Receive/Dialogbody.vue b/src/modules/05_placement/components/Receive/Dialogbody.vue new file mode 100644 index 000000000..074847184 --- /dev/null +++ b/src/modules/05_placement/components/Receive/Dialogbody.vue @@ -0,0 +1,249 @@ + + diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index 310d2f94f..aa0bac730 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -87,8 +87,7 @@ const positionLevelOld = ref(""); const posNo = ref(""); const salary = ref(0); const avatar = ref(""); -// const organization = ref(""); -// const date = ref(null); + const reason = ref(""); const informaData = ref(defaultInformation); @@ -127,11 +126,6 @@ const OpsFilter = ref({ ], }); -onMounted(async () => { - await fetchPerson(); - await getData(); -}); - const fetchPerson = async () => { showLoader(); await http @@ -189,9 +183,7 @@ const fetchPerson = async () => { OpsFilter.value.religionOps = optionreligions; }) .catch((e: any) => {}) - .finally(() => { - // hideLoader(); - }); + .finally(() => {}); }; const getData = async () => { @@ -200,7 +192,6 @@ const getData = async () => { .get(config.API.receiveDataId(paramsId.toString())) .then(async (res: any) => { const data = res.data.result; - console.log(data); let list: any[] = []; if (data.docs.length > 0) { data.docs.map((doc: any) => { @@ -213,7 +204,9 @@ const getData = async () => { rows.value = list; profileId.value = data.profileId; avatar.value = data.avatar ?? ""; - title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`; + title.value.fullname = `${data.prefix}${data.firstname ?? "-"} ${ + data.lastname ?? "-" + }`; title.value.organizationPositionOld = data.organizationPositionOld ?? "-"; title.value.positionLevelOld = data.positionLevelOld ?? "-"; title.value.positionTypeOld = data.positionTypeOld ?? "-"; @@ -285,13 +278,11 @@ const changeCardID = async (value: string | number | null) => { if (value != null && typeof value == "string") { if (value.length == 13 && value != defaultCitizenData.value) { await checkCitizen(value); - // informaData.value.cardid = defaultCitizenData.value; } } }; const checkCitizen = async (id: string) => { - console.log("String"); showLoader(); await http .get(config.API.profileCitizenId(id)) @@ -387,7 +378,6 @@ const calRetire = async (birth: Date) => { const body = { birthDate: dateToISO(birth), }; - // if (dateToISO(dateBefore.value) != dateToISO(birth)) { showLoader(); await http .post(config.API.profileCalRetire, body) @@ -454,8 +444,6 @@ const saveData = async () => { await http .put(config.API.receiveDataId(route.params.id.toString()), body) .then((res: any) => { - // const data = res.data.result; - // console.log(data); success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ"); edit.value = false; }) @@ -474,6 +462,10 @@ const getClass = (val: boolean) => { "full-width cursor-pointer": !val, }; }; +onMounted(async () => { + await fetchPerson(); + await getData(); +});