fix:add function calculateFiscalYear

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-01 15:20:45 +07:00
parent 70be19b5c4
commit 7877f26ac6
47 changed files with 131 additions and 68 deletions

View file

@ -5,6 +5,7 @@ import { checkPermission } from "@/utils/permissions";
import { useRoute, useRouter } from "vue-router";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import { useCounterMixin } from "@/stores/mixin";
import { calculateFiscalYear } from "@/utils/function";
/** importType*/
import { useQuasar, type QTableProps } from "quasar";
@ -44,7 +45,7 @@ const rangeAge = ref<RangeAge>({
const objMarkerLabel = computed(() => {
return { 39: `ช่วงอายุ ${rangeAge.value.min}-${rangeAge.value.max} ปี` };
});
const year = ref<number>(new Date().getFullYear());
const year = ref<number>(calculateFiscalYear(new Date()));
//
const modalHistory = ref<boolean>(false); //

View file

@ -7,6 +7,7 @@ import { checkPermission } from "@/utils/permissions";
import { useCounterMixin } from "@/stores/mixin";
import { useResultsPerformDataStore } from "@/modules/04_registryPerson/stores/ResultsPerformance";
import { usePagination } from "@/composables/usePagination";
import { calculateFiscalYear } from "@/utils/function";
import http from "@/plugins/http";
import config from "@/app.config";
@ -45,7 +46,7 @@ const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const year = ref<number | null>(new Date().getFullYear()); //
const year = ref<number | null>(calculateFiscalYear(new Date())); //
const id = ref<string>(""); //id
const typeIDP = ref<string>("");
const isEdit = ref<boolean>(false); //
@ -494,7 +495,7 @@ function clearData() {
resPerformForm.pointSumTotal = 0;
resPerformForm.pointSum = 0;
resPerformForm.date = null;
year.value = new Date().getFullYear();
year.value = calculateFiscalYear(new Date());
}
/**