From 1aff001bcea5089abb123eba76a48f08a91313c8 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 29 Apr 2024 12:28:17 +0700 Subject: [PATCH] updated --- .../PersonalList/DialogSelectOrg.vue | 6 + .../components/PersonalList/Table.vue | 105 +++++++++++++++++- 2 files changed, 107 insertions(+), 4 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue index f4fd913bb..ecac1ec10 100644 --- a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue +++ b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue @@ -46,6 +46,10 @@ const props = defineProps({ require: true, }, fetchStatCard: { type: Function, require: true }, + typeCommand: { + type: String, + require: true, + }, }); /** Tree*/ @@ -137,6 +141,7 @@ async function fetchDataTable(id: string, level: number = 0) { node: level, nodeId: id, position: props?.dataRow?.positionCandidate, + typeCommand: props.typeCommand, }; await http .post(config.API.orgPosPlacement, body) @@ -217,6 +222,7 @@ async function onClickSubmit() { orgTreeShortName: dataNode.orgTreeShortName, //ชื่อย่อ posPath: selectedPos.value[0].positionName, //ชื่อตำแหน่ง posNumber: dataPosMaster.posMasterNo, //เลขที่ตำแหน่ง(เลขอย่่างเดียว) + typeCommand: props.typeCommand, }; await http diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 18e29592c..94bc6472b 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -262,7 +262,7 @@ function convertDraft(val: boolean) { } } -/**เรียกข้อมูลรายชื่อผู้สอบผ่าย */ +/**เรียกข้อมูลรายชื่อผู้สอบผ่าน */ async function getTable() { showLoader(); await http @@ -493,8 +493,13 @@ const editDetail = ( * @param pid id personal */ const modalDialogSelectOrg = ref(false); +const typeCommand = ref(""); const dataRow = ref(); -function openAppointModal(pid: string, data: DataList) { +function openAppointModal( + pid: string, + data: DataList, + typeCommandVal: "APPOINTED" | "APPOINT" | "SLIP" | "MOVE" +) { // appointModal.value = true; // personalId.value = pid; // personal.value = dataRes.value.filter( @@ -503,6 +508,7 @@ function openAppointModal(pid: string, data: DataList) { // console.log(personal.value); dataRow.value = data; + typeCommand.value = typeCommandVal; modalDialogSelectOrg.value = !modalDialogSelectOrg.value; } @@ -623,6 +629,7 @@ onMounted(async () => { await getTable(); }); +