แก้ไข บัญชีแสดงวันลา
This commit is contained in:
parent
df3d266969
commit
cd02c24fd5
1 changed files with 6 additions and 7 deletions
|
|
@ -47,7 +47,7 @@ const dateMonth = ref<DataDateMonthObject>({
|
|||
});
|
||||
const year = ref<number>(new Date().getFullYear());
|
||||
const dateStart = ref<Date>(new Date(year.value, 9, 1));
|
||||
const dateEnd = ref<Date>(new Date(year.value, 8, 30));
|
||||
const dateEnd = ref<Date>(new Date(year.value + 1, 8, 30));
|
||||
const employeeClass = ref<string>("employee");
|
||||
const yearType = ref<string>("FULL");
|
||||
const filterType = ref<string>("daily");
|
||||
|
|
@ -155,8 +155,7 @@ async function fetchLeaveday(
|
|||
showLoader();
|
||||
|
||||
const body = {
|
||||
type: year,
|
||||
year: 2024,
|
||||
type: year === "FULL" ? "FULL" : "HAFT",
|
||||
startDate: dateToISO(startDate),
|
||||
endDate: dateToISO(endDate),
|
||||
};
|
||||
|
|
@ -274,13 +273,13 @@ async function genReportXLSX(data: any) {
|
|||
async function updateLeaveday() {
|
||||
if (yearType.value === "FULL") {
|
||||
dateStart.value = new Date(year.value, 9, 1);
|
||||
dateEnd.value = new Date(year.value, 8, 30);
|
||||
dateEnd.value = new Date(year.value + 1, 8, 30);
|
||||
} else if (yearType.value === "FIRSTHAFT") {
|
||||
dateStart.value = new Date(year.value, 9, 1);
|
||||
dateEnd.value = new Date(year.value, 2, 31);
|
||||
dateEnd.value = new Date(year.value + 1, 2, 31);
|
||||
} else if (yearType.value === "SECONDHAFT") {
|
||||
dateStart.value = new Date(year.value, 3, 1);
|
||||
dateEnd.value = new Date(year.value, 8, 30);
|
||||
dateStart.value = new Date(year.value + 1, 2, 31);
|
||||
dateEnd.value = new Date(year.value + 1, 8, 30);
|
||||
}
|
||||
|
||||
fetchLeaveday(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue