From 6fa064bb7cc84f6cbe4ca3039a2d9edc597f0830 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Mar 2025 17:53:32 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=AD=E0=B8=B7=E0=B9=88=E0=B8=99=E0=B9=86=20=3D=3D?= =?UTF-8?q?>=20=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=9A=E0=B8=A3=E0=B8=A3?= =?UTF-8?q?=E0=B8=88=E0=B8=B8=E0=B8=81=E0=B8=A5=E0=B8=B1=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/views/08_otherMain.vue | 132 ++++++++++++++++++ .../01_retirement/RetirementDetail.vue | 5 +- 2 files changed, 136 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/views/08_otherMain.vue b/src/modules/05_placement/views/08_otherMain.vue index 1b02d73a9..d4b89a424 100644 --- a/src/modules/05_placement/views/08_otherMain.vue +++ b/src/modules/05_placement/views/08_otherMain.vue @@ -15,6 +15,7 @@ import type { listMain } from "@/modules/05_placement/interface/response/OhterMa /** importcomopnents*/ import Dialogbody from "@/modules/05_placement/components/Other/DialogOrders.vue"; +import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue"; /** use*/ const $q = useQuasar(); @@ -44,6 +45,7 @@ const filterKeyword2 = ref(""); //คำค้นหารายกา const visibleColumns = ref([ "no", "fullname", + "organizationPositionReturn", "positionLevel", "organizationPositionOld", "createdAt", @@ -73,6 +75,19 @@ const columns = ref([ }`; }, }, + + { + name: "organizationPositionReturn", + align: "left", + label: "ตำแหน่ง/หน่วยงานที่บรรจุกลับ", + sortable: true, + field: "organizationPositionReturn", + format(val, row) { + return row.organizationPositionOld.replace(/\n/g, " "); + }, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "positionLevel", align: "left", @@ -198,6 +213,65 @@ function clickDelete(id: string) { }); } +const modalSelectOrg = ref(false); +const type = ref(null); +const personalId = ref(""); + +const posType = ref(""); //ประเภทตำแหน่ง +const posLevel = ref(""); //ระดับตำแหน่ง +const position = ref(""); //ตำแหน่ง +const dataRows = ref(); //ข้อมูลที่ต้องการเลือกหน่วยงานที่รับโอน + +/** + * ฟังก์ชันเปิด popup เลือกหน่วยงานที่รับโอน + * @param id id รายการรับโอนที่เลือกหน่วยงานที่รับโอน + * @param data ข้อมูลรายการรับโอน + */ +function onSelectOrg(data: any) { + personalId.value = data.id; + // personal.value = dataRecevice.value.filter((e: ResponseData) => e.id === id); + dataRows.value = data; + posType.value = data.posTypeId; + posLevel.value = data.posLevelId; + position.value = data.positionId; + type.value = null; + modalSelectOrg.value = true; +} + +async function onSaveSelectOrg(data: any) { + const body = { + node: data.node, + nodeId: data.nodeId, + orgRevisionId: data.orgRevisionId, + positionId: data.positionId, + posMasterNo: data.posMasterNo, + positionName: data.positionName, + posTypeId: data.posTypeId, + posTypeName: data.posTypeName, + posLevelId: data.posLevelId, + posLevelName: data.posLevelName, + posExecutiveName: data.posExecutiveName, + reportingDate: data.reportingDate, + posmasterId: data.posmasterId, + typeCommand: data.typeCommand, + }; + + showLoader(); + await http + .put(config.API.otherPosition(personalId.value), body) + .then(async () => { + await fecthlistOthet(); + await success($q, "บันทึกข้อมูลสำเร็จ"); + modalSelectOrg.value = false; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +} + /** * redialect รายละเอียดรายการอื่นๆ * @param id รายการอื่นๆ @@ -220,6 +294,7 @@ onMounted(() => { fecthlistOthet(); }); +