fix เงินเดือน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-11 11:46:41 +07:00
parent 247989c9e8
commit 3c83bc8306
3 changed files with 12 additions and 30 deletions

View file

@ -251,7 +251,7 @@ function fetchDataQuota(id: string) {
* function เรยกขอมลรายช
* @param id กล
*/
function fetchDataPeriod(id: string) {
async function fetchDataPeriod(id: string) {
showLoader();
rows.value = [];
let formData = {
@ -267,7 +267,7 @@ function fetchDataPeriod(id: string) {
: "0",
};
http
await http
.put(config.API.salaryListPeriodORG(id), formData)
.then((res) => {
rows.value = res.data.result.data;
@ -278,9 +278,7 @@ function fetchDataPeriod(id: string) {
messageError($q, err);
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 1000);
hideLoader();
});
}

View file

@ -121,11 +121,9 @@ async function getRound() {
store.isClosedRound = roundFilter.value.isClose;
salaryPeriodId.value = roundFilter.value.id;
await Promise.all([
getSnap(roundFilter.value.shortCode),
getAgency(roundFilter.value.revisionId),
getAgencyPosition(roundFilter.value.revisionId),
]);
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId);
} else {
isLoad.value = false;
roundFilter.value = "ไม่มีข้อมูล";
@ -143,7 +141,7 @@ async function getRound() {
/**
* function เรยกรอบ
*/
function getSnap(code: string) {
async function getSnap(code: string) {
snapOptions.value =
code == "OCT"
? [
@ -232,7 +230,7 @@ async function getAgencyPosition(id: string) {
agencyFilter.value = position ? position.id : "ALL";
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
fetchSalalyPeriod(
await fetchSalalyPeriod(
agencyFilter.value,
roundFilter.value.id,
snapFilter.value
@ -257,7 +255,6 @@ async function fetchSalalyPeriod(
snap: string
) {
if (rootId) {
showLoader();
isLoad.value = false;
const body = {
rootId: rootId,
@ -286,11 +283,6 @@ async function fetchSalalyPeriod(
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 800);
});
}
}

View file

@ -112,11 +112,9 @@ async function getRound() {
store.roundMainCode = roundFilter.value.shortCode;
store.isClosedRound = roundFilter.value.isClose;
await Promise.all([
getSnap(roundFilter.value.shortCode),
getAgency(roundFilter.value.revisionId),
getAgencyPosition(roundFilter.value.revisionId),
]);
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId);
} else {
isLoad.value = false;
roundFilter.value = "ไม่มีข้อมูล";
@ -220,7 +218,7 @@ async function getAgencyPosition(id: string) {
agencyFilter.value = position ? position.id : "ALL";
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
fetchSalalyPeriod(
await fetchSalalyPeriod(
agencyFilter.value,
roundFilter.value.id,
snapFilter.value
@ -245,7 +243,6 @@ async function fetchSalalyPeriod(
snap: string
) {
if (rootId) {
showLoader();
isLoad.value = false;
const body = {
rootId: rootId,
@ -263,11 +260,6 @@ async function fetchSalalyPeriod(
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 1500);
});
}
}