diff --git a/src/modules/13_salary/views/salaryEmployeeLists.vue b/src/modules/13_salary/views/salaryEmployeeLists.vue index 54436aa0e..d1484c6f3 100644 --- a/src/modules/13_salary/views/salaryEmployeeLists.vue +++ b/src/modules/13_salary/views/salaryEmployeeLists.vue @@ -226,9 +226,12 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) { .post(config.API.salaryListPeriodLatestEmp, body) .then(async (res) => { const data = res.data.result; + console.log(data.group1id); + data && store.fetchPeriodLatest(data, store.tabGroup); periodLatest.value = data; - isLoad.value = true; + + isLoad.value = data.group1id ? true : false; }) .catch((err) => { messageError($q, err); @@ -245,17 +248,11 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) { async function onChangeRound() { // เก็บสถานะการปิดรอบในตัวแปร isClosedRound เพื่อใช้ในการเช็ค store.isClosedRound = roundFilter.value.isClose; - await getSnap(roundFilter.value.shortCode); await getAgency(roundFilter.value.revisionId); await getAgencyPosition(roundFilter.value.revisionId); if (agencyFilter.value && roundFilter.value.id && snapFilter.value) { - // fetchSalalyPeriod( - // agencyFilter.value, - // roundFilter.value.id, - // snapFilter.value - // ); store.tabType = "PENDING"; store.roundMainCode = roundFilter.value.shortCode; } else {