From b50bc6db7c2fc9d166927440cea0d8f3fe95a100 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 18 Mar 2024 16:38:48 +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=B9=80=E0=B8=A5=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7?= =?UTF-8?q?=E0=B8=AD=E0=B8=99=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AF=20=3D>=20?= =?UTF-8?q?=E0=B8=A3=E0=B8=AD=E0=B8=9A=E0=B8=9E=E0=B8=B4=E0=B9=80=E0=B8=A8?= =?UTF-8?q?=E0=B8=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SalaryLists/TabMain.vue | 8 ++++- src/modules/13_salary/views/salaryLists.vue | 30 ++++++++++++------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index ef3bc6a27..b45d39e88 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -49,6 +49,10 @@ const itemsTabGroup = ref([ lable: "กลุ่ม 2", name: "group2", }, + { + lable: "รายชื่อรอบพิเศษ", + name: "group1", + }, ]); /** itemsTab ขั้น*/ @@ -341,7 +345,9 @@ onMounted(() => { align="left" >
diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue index d2e2282d4..26fdc63ed 100644 --- a/src/modules/13_salary/views/salaryLists.vue +++ b/src/modules/13_salary/views/salaryLists.vue @@ -219,8 +219,14 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) { .post(config.API.salaryListPeriodLatest, body) .then(async (res) => { const data = res.data.result; - if (Object.values(data).includes(null)) { - isLoad.value = false; + if (roundFilter.value.shortCode !== "SPECIAL") { + if (Object.values(data).includes(null)) { + isLoad.value = false; + } else { + data && store.fetchPeriodLatest(data, store.tabGroup); + periodLatest.value = data; + isLoad.value = true; + } } else { data && store.fetchPeriodLatest(data, store.tabGroup); periodLatest.value = data; @@ -241,8 +247,9 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) { async function onChangeRound() { // เก็บสถานะการปิดรอบในตัวแปร isClosedRound เพื่อใช้ในการเช็ค store.isClosedRound = roundFilter.value.isClose; - console.log(roundFilter.value); - + if (roundFilter.value.shortCode === "SPECIAL") { + store.tabGroup = "group1"; + } await getSnap(roundFilter.value.shortCode); await getAgency(roundFilter.value.revisionId); await getAgencyPosition(roundFilter.value.revisionId); @@ -311,12 +318,8 @@ function onScroll({ to, ref }: { to: number; ref: any }) { } } -function getQuota(){ - fetchSalalyPeriod( - agencyFilter.value, - roundFilter.value.id, - snapFilter.value - ); +function getQuota() { + fetchSalalyPeriod(agencyFilter.value, roundFilter.value.id, snapFilter.value); } onMounted(async () => { await getRound(); @@ -354,6 +357,7 @@ onMounted(async () => { { bordered class="row col-12 q-mt-xs" > - +