รายการเงินเดือน => ปรับการเปลี่ยนรอบขึ้นเงืนเดือน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-01 09:33:55 +07:00
parent 6516bbf382
commit 609a98d216

View file

@ -58,6 +58,8 @@ async function getRound() {
(Number(x.year) + 543),
}));
console.log(roundOptions.value);
roundFilter.value = await (roundOptions.value
? roundOptions.value[0]
: "");
@ -127,19 +129,20 @@ function getSnap(code: string) {
* @param id revisionId
*/
async function getAgency(id: string) {
await http
.get(config.API.activeOrganizationRootById(id))
.then(async (res) => {
const data = res.data.result;
agencyOptions.value = await data.map((x: DataAgency) => ({
id: x.id,
name: x.orgRootName,
id &&
(await http
.get(config.API.activeOrganizationRootById(id))
.then(async (res) => {
const data = res.data.result;
agencyOptions.value = await data.map((x: DataAgency) => ({
id: x.id,
name: x.orgRootName,
}));
agencyFilter.value = store.rootId;
})
.catch((err) => {
messageError($q, err);
}));
agencyFilter.value = store.rootId;
})
.catch((err) => {
messageError($q, err);
});
}
/**
@ -147,19 +150,21 @@ async function getAgency(id: string) {
* @param id revisionId
*/
async function getAgencyPosition(id: string) {
await http
.get(config.API.keycloakPositionByid(id))
.then(async (res) => {
const data = res.data.result;
if (id) {
await http
.get(config.API.keycloakPositionByid(id))
.then(async (res) => {
const data = res.data.result;
const position = agencyOptions.value?.find(
(e: DataOption) => e.id === data.rootId
);
agencyFilter.value = position ? position.id : "";
})
.catch((err) => {
messageError($q, err);
});
const position = agencyOptions.value?.find(
(e: DataOption) => e.id === data.rootId
);
agencyFilter.value = position ? position.id : "";
})
.catch((err) => {
messageError($q, err);
});
} else agencyFilter.value = "";
}
/**
@ -214,6 +219,8 @@ async function onChangeRound() {
);
store.tabType = "PENDING";
store.roundMainCode = roundFilter.value.shortCode;
} else {
isLoad.value = false;
}
}