diff --git a/src/modules/02_organizationalNew/components/DialogFormAgency.vue b/src/modules/02_organizationalNew/components/DialogFormAgency.vue index 5392d33fc..f6ecc0d64 100644 --- a/src/modules/02_organizationalNew/components/DialogFormAgency.vue +++ b/src/modules/02_organizationalNew/components/DialogFormAgency.vue @@ -151,8 +151,8 @@ function onSubmit() { }) .finally(async () => { await props.fetchDataTree?.(); - await closeClear(); - await hideLoader(); + closeClear(); + hideLoader(); }); } else { props.dataNode && @@ -175,8 +175,8 @@ function onSubmit() { }) .finally(async () => { // await props.fetchDataTree?.(); - await closeClear(); - await hideLoader(); + closeClear(); + hideLoader(); })); } }); diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index 5b7183fe1..ea8e6cfab 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -205,7 +205,27 @@ function validateFormPositionEdit() { /** ฟังชั่น บันทึก */ function onSubmit() { dialogConfirm($q, () => { - console.log(formData); + const positionsData = rows.value.map((e) => ({ + posDictName: e.positionName, //ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) + posDictField: e.positionField, //สายงาน + posTypeId: e.positionName, //*ประเภทตำแหน่ง + posLevelId: e.positionName, //*ระดับตำแหน่ง + posExecutiveId: e.positionName, //ตำแหน่งทางการบริหาร + posDictExecutiveField: e.positionName, //ด้านทางการบริหาร + posDictArea: e.positionArea, //ด้าน/สาขา + })); + const body = { + posMasterNoPrefix: formData.prefixNo, //*Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) + posMasterNo: Number(formData.positionNo), //*เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNoSuffix: formData.suffixNo, //Suffix หลังเลขที่ตำแหน่ง เช่น ช. + // orgRootId: Guid, //Id สำนัก + // orgChild1Id: Guid, //Id โครงสร้างระดับ1 + // orgChild2Id: Guid, //Id โครงสร้างระดับ2 + // orgChild3Id: Guid, //Id โครงสร้างระดับ3 + // orgChild4Id: Guid, //Id โครงสร้างระดับ4 + positions: [positionsData], + }; + console.log(body); }); } /** ฟังชั่น บันทึก */ diff --git a/src/modules/02_organizationalNew/components/mainTree.vue b/src/modules/02_organizationalNew/components/mainTree.vue index 84afe164a..cbb1e22d7 100644 --- a/src/modules/02_organizationalNew/components/mainTree.vue +++ b/src/modules/02_organizationalNew/components/mainTree.vue @@ -208,8 +208,8 @@ async function onClickDel(type: number, id: string) { messageError($q, err); }) .finally(async () => { - await props.fetchDataTree?.(); - await hideLoader(); + props.fetchDataTree?.(); + hideLoader(); }); }); } diff --git a/src/modules/02_organizationalNew/components/tableTree.vue b/src/modules/02_organizationalNew/components/tableTree.vue index 24d23e211..e433ede5a 100644 --- a/src/modules/02_organizationalNew/components/tableTree.vue +++ b/src/modules/02_organizationalNew/components/tableTree.vue @@ -101,6 +101,13 @@ const rows = ref([ levelPositoion: "ชำนาญการ / ?", isStatus: "ไม่มี", }, + { + noPosition: "สกง.2", + namePosition: "นักทรัพยากรบุคคล", + typePosition: "ทั่วไป", + levelPositoion: "ชำนาญการ / ?", + isStatus: "ไม่มี", + }, ]); const dialogPosition = ref(false); @@ -173,7 +180,7 @@ function onClickViewDetail() { ref="table" :columns="columns" :rows="rows" - row-key="id" + row-key="noPosition" flat bordered :paging="true" @@ -184,6 +191,7 @@ function onClickViewDetail() { >