Merge commit '29012699f9' into develop

This commit is contained in:
Warunee Tamkoo 2024-03-11 17:43:15 +07:00
commit 90d7cbe2ab
7 changed files with 1956 additions and 5 deletions

View file

@ -97,6 +97,8 @@ const formFilter = reactive<DataFilterPerson>({
pageSize: 10,
keyword: "",
rootId: "",
year: 0,
period: "",
});
const maxPage = ref<number>(1);
@ -111,6 +113,8 @@ function closeModal() {
function fetchListPerson() {
showLoader();
formFilter.rootId = store.rootId;
formFilter.period = store.roundMainCode;
formFilter.year = store.roundYear;
http
.post(config.API.salaryListPerson, formFilter)
.then((res) => {

View file

@ -10,6 +10,8 @@ interface DataFilterPerson {
pageSize: number;
keyword: string;
rootId: string;
year: number;
period: string;
}
export type { DataFilter, DataFilterPerson };

View file

@ -21,6 +21,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
const groupId = ref<string>("");
const rootId = ref<string>("");
const roundMainCode = ref<string>("");
const roundYear = ref<number>(0);
const roundCode = ref<string>("");
const isClosedRound = ref<boolean>(false); // การปิดรอบ
/** List Menu*/
@ -152,6 +153,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
groupOp,
roundMainCode,
remaining,
isClosedRound
isClosedRound,
roundYear,
};
});

View file

@ -63,6 +63,7 @@ function getRound() {
revisionId: x.revisionId,
shortCode: x.period,
isClose: x.isClose,
year: x.year,
name:
(x.period === "OCT"
? "รอบตุลาคม "
@ -78,6 +79,7 @@ function getRound() {
: "");
store.roundMainCode = roundFilter.value.shortCode;
store.roundYear = roundFilter.value.year;
store.isClosedRound = roundFilter.value.isClose;
await getSnap(roundFilter.value.shortCode);
@ -239,6 +241,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
console.log(roundFilter.value);
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
@ -251,6 +254,7 @@ async function onChangeRound() {
// );
store.tabType = "PENDING";
store.roundMainCode = roundFilter.value.shortCode;
store.roundYear = roundFilter.value.year;
} else {
isLoad.value = false;
}