From d9bb320b168d498329cbdbe6096a5aae28e99f36 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 29 Nov 2024 14:28:21 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=3D=3D=3D=20>=20=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B9=80=E0=B8=9E=E0=B8=B7=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=A5=E0=B8=87=E0=B8=9A=E0=B8=B1=E0=B8=8D=E0=B8=8A=E0=B8=B5?= =?UTF-8?q?=E0=B9=81=E0=B8=99=E0=B8=9A=E0=B8=97=E0=B9=89=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=20=E0=B8=97=E0=B8=B8=E0=B8=81=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppointEmployee/AppointEmployeeDetail.vue | 76 ++++------ .../AppointMent/AppointMentDetail.vue | 67 ++++----- .../Help-Government/HelpGovernmentDetail.vue | 49 ++++--- .../components/Other/OtherDetail.vue | 48 +++--- .../components/Receive/receiveDetail.vue | 109 ++++++++++---- .../Repatriate/RepatriateDetail.vue | 58 ++++---- .../components/Transfer/TransferDetail.vue | 59 +++----- .../05_placement/interface/index/Main.ts | 77 ++++++++++ .../interface/response/Transfer.ts | 4 +- .../components/Deceased/DetailDeceased.vue | 2 +- .../components/DismissOrder/DismissOrder.vue | 2 +- .../components/DismissOrder/outRegistry.vue | 42 +++--- .../components/resign/ResignByid.vue | 27 +++- .../components/resign/ResignReject.vue | 41 ++++-- .../components/resignEMP/ResignByid.vue | 34 ++++- .../components/resignEMP/ResignReject.vue | 30 +++- .../components/7_ListSuspend/DetailPage.vue | 137 +++++++++++------- 17 files changed, 514 insertions(+), 348 deletions(-) diff --git a/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue b/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue index dbc03398e..452d173d3 100644 --- a/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue +++ b/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue @@ -8,19 +8,15 @@ import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -/** - * importType - */ +/** importType */ import type { QForm } from "quasar"; +import type { MainData } from "@/modules/05_placement/interface/index/Main"; import type { appointmentData, - ResponseData, DataProfile, } from "@/modules/05_placement/interface/response/AppointMent"; -/** - * importComponents - */ +/** importComponents*/ import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว const $q = useQuasar(); @@ -38,7 +34,6 @@ const { } = mixin; const dataProfile = ref(); //ข้อมุลส่วนตัว - const appointment = ref({ citizenId: "", prefixId: "", @@ -58,17 +53,17 @@ const date = ref(null); //ดำรงตำแหน่งใน const reason = ref(""); //หมายเหตุ const status = ref(""); const fullName = ref(""); +const mianData = ref(); -/** - * fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง - */ +/** fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง*/ async function fecthappointmentByid() { showLoader(); await http .get(config.API.appointEmployeeByid(paramsId.toString())) - .then((res: ResponseData) => { + .then((res) => { dataProfile.value = res.data.result as unknown as DataProfile; const data = res.data.result; + mianData.value = res.data.result; appointment.value = data; profileId.value = data.profileId; fullName.value = `${data.prefix === null ? "" : data.prefix}${ @@ -93,9 +88,7 @@ async function fecthappointmentByid() { }); } -/** - * ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย - */ +/** ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/ function clickSave() { if (myForm.value !== null) { myForm.value.validate().then((result: any) => { @@ -140,27 +133,33 @@ function clickSave() { } } -/** - * ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย - */ -function cancel() { +/** ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/ +async function cancel() { edit.value = false; - fecthappointmentByid(); + const data = mianData.value; + if (data) { + educationOld.value = data.educationOld ?? "-"; + organizationPositionOld.value = data.organizationPositionOld; + positionTypeOld.value = data.positionTypeOld; + positionLevelOld.value = data.positionLevelOld; + posNo.value = data.positionNumberOld; + salary.value = data.salary ?? 0; + reason.value = data.reason; + date.value = data.positionDate; + } myForm.value?.resetValidation(); } -/** - * Class input - */ -const getClass = (val: boolean) => { +/** Class inpu*/ +function getClass(val: boolean) { return { "full-width inputgreen cursor-pointer": val, "full-width cursor-pointer": !val, }; -}; +} -onMounted(() => { - fecthappointmentByid(); +onMounted(async () => { + await fecthappointmentByid(); });