diff --git a/src/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue b/src/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue index 7df603b80..dda4ade92 100644 --- a/src/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue @@ -83,7 +83,8 @@ const itemsTabType = computed(() => { type: "NONE", }, ] - : [ + : store.roundMainCode === "APR" + ? [ { lable: "รายชื่อคนครอง", name: "tab1", @@ -104,6 +105,23 @@ const itemsTabType = computed(() => { name: "tab4", type: "NONE", }, + ] + : [ + { + lable: "รายชื่อคนครอง", + name: "tab1", + type: "PENDING", + }, + { + lable: "1 ขั้น", + name: "tab2", + type: "FULL", + }, + { + lable: "0.5 ขั้น", + name: "tab3", + type: "HAFT", + }, ]; }); @@ -354,7 +372,7 @@ onMounted(() => { ? itemsCard.slice(0, 5) : store.roundMainCode === 'OCT' ? itemsCard.slice(5, 12) - : itemsCard" + : []" :key="index" :class=" store.roundMainCode === 'APR' diff --git a/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue index 6ec17d63d..ca777ff43 100644 --- a/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue @@ -422,7 +422,7 @@ watch( (false); /** ตัวแปร*/ const profileId = ref(""); const amount = ref(0); -const isPunish = ref(false) -const isSuspension = ref(false) -const isAbsent = ref(false) -const isLeave = ref(false) +const isPunish = ref(false); +const isSuspension = ref(false); +const isAbsent = ref(false); +const isLeave = ref(false); /** * function ยืนยันการลบรายชื่อ * @param id profileId @@ -282,14 +282,14 @@ function searchData() { props.fetchDataTable?.(); } -function onProperties(data:any){ - console.log(data) - modalDialogProperties.value = true - profileId.value = data.id - isPunish.value = data.isPunish - isSuspension.value = data.isSuspension - isAbsent.value = data.isAbsent - isLeave.value = data.isLeave +function onProperties(data: any) { + console.log(data); + modalDialogProperties.value = true; + profileId.value = data.id; + isPunish.value = data.isPunish; + isSuspension.value = data.isSuspension; + isAbsent.value = data.isAbsent; + isLeave.value = data.isLeave; } /** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/ watch( @@ -302,7 +302,14 @@ watch( diff --git a/src/modules/13_salary/views/salaryEmployeeLists.vue b/src/modules/13_salary/views/salaryEmployeeLists.vue index 8a5fd8291..f033e8392 100644 --- a/src/modules/13_salary/views/salaryEmployeeLists.vue +++ b/src/modules/13_salary/views/salaryEmployeeLists.vue @@ -17,8 +17,8 @@ import type { /** importComponents*/ import TabGroup from "@/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue"; -// import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue"; -// import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue"; +import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue"; +import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue"; /** importStore*/ import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; @@ -84,14 +84,6 @@ function getRound() { await getSnap(roundFilter.value.shortCode); await getAgency(roundFilter.value.revisionId); await getAgencyPosition(roundFilter.value.revisionId); - - // if (agencyFilter.value && roundFilter.value.id && snapFilter.value) { - // await fetchSalalyPeriod( - // agencyFilter.value, - // roundFilter.value.id, - // snapFilter.value - // ); - // } }) .catch((e) => { messageError($q, e); @@ -218,8 +210,14 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) { .post(config.API.salaryListPeriodLatestEmp, 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; @@ -345,6 +343,7 @@ onMounted(async () => {