updated kpi
This commit is contained in:
parent
f7f0198613
commit
c7cda1c7ba
11 changed files with 185 additions and 78 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ watch(
|
|||
|
||||
function onChangTab() {
|
||||
store.formQuery.page = 1;
|
||||
dataListMain.value = [];
|
||||
fetchList();
|
||||
store.selected = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue