แก้ kpi

This commit is contained in:
setthawutttty 2025-01-29 14:48:48 +07:00
parent adfbe1a2f8
commit 4d29976a8c

View file

@ -220,7 +220,7 @@ function filterOption(val: string, update: Function, refData: string) {
/** ดึงข้อมูลทั้งหมดในหน้า */
async function getAll() {
await Promise.all([fetchEvaluation(), getOrgOp()]);
await Promise.all([fetchEvaluation(), getOrgOp(), getProfile()]);
await store.checkStep();
}
@ -459,6 +459,19 @@ async function fetchProfileEvaluator(id: string) {
});
}
/** ดึงข้อมูลโปรไฟล์ */
async function getProfile() {
await http
.get(config.API.profilePosition())
.then(async (res) => {
const data = await res.data.result;
store.dataProfile = await data;
})
.catch((e) => {
messageError($q, e);
});
}
onMounted(async () => {
showLoader();
store.isUpdate = false;
@ -545,8 +558,7 @@ onMounted(async () => {
store.indicatorWeightTotal != 100) ||
((store.dataEvaluation.posTypeName == 'อำนวยการ' ||
store.dataEvaluation.posTypeName == 'บริหาร') &&
(store.indicatorWeight1Total != 100 ||
store.indicatorWeight2Total != 20)))
store.indicatorWeightTotal != 100))
"
class="text-red"
>*ำหน(อยละ) ผลสมฤทธของงานไมกตอง</span
@ -558,13 +570,12 @@ onMounted(async () => {
store.dataEvaluation.evaluationStatus == 'NEW'
"
:disabled="
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
store.dataEvaluation.posTypeName != 'บริหาร' &&
((store.dataEvaluation.posTypeName != 'อำนวยการ' ||
store.dataEvaluation.posTypeName != 'บริหาร') &&
store.indicatorWeightTotal != 100) ||
((store.dataEvaluation.posTypeName == 'อำนวยการ' ||
store.dataEvaluation.posTypeName == 'บริหาร') &&
(store.indicatorWeight1Total != 100 ||
store.indicatorWeight2Total != 20))
store.indicatorWeightTotal != 100)
"
unelevated
round