From aafef60aab9d4e6bfe92c3c167774645f94b9632 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 27 Jun 2024 11:08:01 +0700 Subject: [PATCH] fix bug --- src/modules/13_salary/views/salaryLists.vue | 12 +++++++++--- src/modules/15_development/components/BasicInfo.vue | 9 +++------ .../components/DialogFormPosition.vue | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue index ea6bfab5b..0bfda6b23 100644 --- a/src/modules/13_salary/views/salaryLists.vue +++ b/src/modules/13_salary/views/salaryLists.vue @@ -89,6 +89,8 @@ function getRound() { store.roundYear = roundFilter.value.year; store.isClosedRound = roundFilter.value.isClose; + console.log(roundFilter.value); + await getSnap(roundFilter.value.shortCode); await getAgency(roundFilter.value.revisionId); await getAgencyPosition(roundFilter.value.revisionId); @@ -150,8 +152,8 @@ function getSnap(code: string) { * @param id revisionId */ async function getAgency(id: string) { - id && - (await http + if (id) { + await http .get(config.API.activeOrganizationRootById(id)) .then(async (res) => { const data = res.data.result; @@ -170,7 +172,11 @@ async function getAgency(id: string) { }) .catch((err) => { messageError($q, err); - })); + }); + } else { + agencyOptionsMain.value = []; + agencyFilter.value = ""; + } } /** diff --git a/src/modules/15_development/components/BasicInfo.vue b/src/modules/15_development/components/BasicInfo.vue index adaf4eaef..b09d2008c 100644 --- a/src/modules/15_development/components/BasicInfo.vue +++ b/src/modules/15_development/components/BasicInfo.vue @@ -120,15 +120,13 @@ function fetchTree(id: string) { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { hideLoader(); }); } -/** function เลือกหน่วยงาน +/** function เลือกหน่วยงาน * @param data ข้อมูลทั้งหมดของ row -*/ + */ function updateSelected(data: DataTree) { orgName.value = data.orgTreeName; formData.node = data.orgLevel; @@ -240,8 +238,7 @@ onMounted(async () => { -
-
+