fix:add function calculateFiscalYear
This commit is contained in:
parent
70be19b5c4
commit
7877f26ac6
47 changed files with 131 additions and 68 deletions
|
|
@ -6,6 +6,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePagination } from "@/composables/usePagination";
|
||||
import { calculateFiscalYear } from "@/utils/function";
|
||||
|
||||
import type { MainData } from "@/modules/05_placement/interface/index/Survey";
|
||||
|
||||
|
|
@ -14,7 +15,7 @@ const mixin = useCounterMixin();
|
|||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
const { pagination, params, onRequest } = usePagination("", getData);
|
||||
|
||||
const year = ref<number | null>(new Date().getFullYear()); //ปีงบประมาณ
|
||||
const year = ref<number | null>(calculateFiscalYear(new Date())); //ปีงบประมาณ
|
||||
|
||||
const rows = ref<MainData[]>([]);
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import axios from "axios";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useStructureTree } from "@/stores/structureTree";
|
||||
import { calculateFiscalYear } from "@/utils/function";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -56,7 +57,7 @@ const optionReport = ref<DataTypeReport[]>([
|
|||
type: "probation",
|
||||
},
|
||||
]);
|
||||
const year = ref<number>(new Date().getFullYear());
|
||||
const year = ref<number>(calculateFiscalYear(new Date()));
|
||||
const dateStart = ref<Date>(new Date(year.value - 1, 9, 1));
|
||||
const dateEnd = ref<Date>(new Date(year.value + 1, 8, 30));
|
||||
|
||||
|
|
@ -188,7 +189,7 @@ function clearFilter() {
|
|||
detailReport.value = undefined;
|
||||
pdfSrc.value = undefined;
|
||||
|
||||
year.value = new Date().getFullYear();
|
||||
year.value = calculateFiscalYear(new Date());
|
||||
dateStart.value = new Date(year.value - 1, 9, 1);
|
||||
dateEnd.value = new Date(year.value + 1, 8, 30);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue