updated kpi

This commit is contained in:
Warunee Tamkoo 2024-06-26 20:24:39 +07:00
parent f7f0198613
commit c7cda1c7ba
11 changed files with 185 additions and 78 deletions

View file

@ -283,31 +283,31 @@ function sendToEvaluatore(status: string) {
);
}
function sendToSummary(status: string) {
dialogConfirm(
$q,
() => {
if (id.value) {
showLoader();
http
.get(config.API.kpiSendToSummary(id.value))
.then((res) => {
success($q, "ส่งไปสรุปผลการประเมินสำเร็จ");
getAll()
store.tabMain = '4'
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
},
"ยืนยันการส่งไปสรุปผลการประเมิน",
"ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
);
}
// function sendToSummary(status: string) {
// dialogConfirm(
// $q,
// () => {
// if (id.value) {
// showLoader();
// http
// .get(config.API.kpiSendToSummary(id.value))
// .then((res) => {
// success($q, "");
// getAll();
// store.tabMain = "4";
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
// }
// },
// "",
// "?"
// );
// }
function requireEdit() {
dialogConfirm(
$q,
@ -364,27 +364,31 @@ function sendToEvauator() {
}
function goToSummary() {
dialogConfirm($q, () => {
showLoader();
http
.post(config.API.sendToSummary(store.dataEvaluation.id), {
status: "SUMMARY",
})
.then(async (res) => {
await getAll();
store.tabMain = "4";
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
dialogConfirm(
$q,
() => {
showLoader();
http
.get(config.API.sendToSummary(store.dataEvaluation.id))
.then(async (res) => {
await getAll();
store.tabMain = "4";
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
},
"ยืนยันการส่งไปสรุปผลการประเมิน",
"ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
);
}
onMounted(async () => {
showLoader();
store.isUpdate = await false;
await getAll();
});
</script>
@ -457,7 +461,8 @@ onMounted(async () => {
<div class="q-gutter-x-sm">
<span
v-if="
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
(store.tabMain === '1' &&
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
store.dataEvaluation.posTypeName != 'บริหาร' &&
store.indicatorWeightTotal != 100) ||
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
@ -527,7 +532,7 @@ onMounted(async () => {
>งใหประเมนรายงานผลสำเรจของงาน</q-tooltip
>
</q-btn>
<q-btn
<!-- <q-btn
v-if="
store.rolePerson == 'EVALUATOR' &&
store.dataEvaluation.evaluationStatus ==
@ -543,7 +548,7 @@ onMounted(async () => {
@click="sendToSummary('SUMMARY')"
>
<q-tooltip>งไปสรปผลการประเม</q-tooltip>
</q-btn>
</q-btn> -->
<q-btn
v-if="
store.rolePerson == 'USER' &&
@ -573,7 +578,7 @@ onMounted(async () => {
"
:disabled="
store.dataEvaluation.evaluatorId == null ||
store.dataEvaluation.summaryPoint > 0
store.dataEvaluation.summaryPoint <= 0
"
unelevated
round

View file

@ -329,15 +329,21 @@ function getOrgOp() {
const data = res.data.result;
evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({
id: i.id,
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
i.lastName ? i.lastName : ""
}`,
}));
commanderIdMainOp.value = data.commander.map((i: any) => ({
id: i.id,
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
i.lastName ? i.lastName : ""
}`,
}));
commanderHighMainOp.value = data.chairman.map((i: any) => ({
id: i.id,
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
i.lastName ? i.lastName : ""
}`,
}));
})
.catch((e) => {
@ -636,7 +642,7 @@ onMounted(() => {
:options="roundDialgOp"
hide-bottom-space
lazy-rules
:rules="[(val) => !!val.id || `${'กรุณาเลือกรอบการประเมิน'}`]"
:rules="[(val:any) => !!val.id || `${'กรุณาเลือกรอบการประเมิน'}`]"
@update:model-value="checkClosed"
/>
</div>

View file

@ -186,6 +186,7 @@ watch(
function onChangTab() {
store.formQuery.page = 1;
dataListMain.value = [];
fetchList();
store.selected = [];
}