fix(leave):bug watch

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-07 10:52:23 +07:00
parent 27280c393f
commit 7175fac96b
17 changed files with 257 additions and 238 deletions

View file

@ -1,12 +1,13 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useRouter, useRoute } from "vue-router";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useLeaveStore } from "@/modules/05_leave/store";
import { calculateFiscalYear } from "@/utils/functions";
import type { LeaveType } from "@/modules/05_leave/interface/response/leave";
@ -26,7 +27,7 @@ const leaveType = ref<LeaveType[]>();
const leaveStatus = ref<string>("");
/** filter */
const year = ref<number>(new Date().getFullYear());
const year = ref<number>(LeaveData.fiscalYearyear);
const type = ref<string>("00000000-0000-0000-0000-000000000000");
const status = ref<string>("ALL");
const filter = ref<string>("");
@ -139,6 +140,7 @@ async function updateFilterTable(y: number, t: string, s: string, k: string) {
type.value = t;
status.value = s;
filter.value = k;
LeaveData.fiscalYearyear = y;
await fetchDataTable();
}
}
@ -180,6 +182,7 @@ function convert(val: any) {
* เรยกฟงกนทงหมดตอนเรยกใชไฟล
*/
onMounted(async () => {
year.value = LeaveData.fiscalYearyear;
await fectOptionType();
await fetchDataTable();
});