การแจ้งเตื่อน เครื่องราช

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-27 16:58:49 +07:00
parent 0ec462287c
commit 3e42ecbcb6
2 changed files with 35 additions and 21 deletions

View file

@ -42,19 +42,7 @@ const dialogDesc = ref<string>("");
//
const dialogWarn = ref<boolean>(false);
const checkboxData = ref<any>([
{ id: 1, name: "มีโทษทางวินัย", val: true },
{
id: 2,
name: "ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน",
val: false,
},
{
id: 3,
name: "ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)",
val: false,
},
]);
const checkboxData = ref<any>([]);
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
const visibleColumns = ref<string[]>([
@ -641,7 +629,24 @@ const clickShowreson = (name: string, requestNote: string) => {
const clickCloseReson = () => {
dialogNote.value = false;
};
const clickShowWarn = () => {
const clickShowWarn = (
markDiscipline: boolean,
markLeave: boolean,
markRate: boolean
) => {
checkboxData.value = [
{ id: 1, name: "มีโทษทางวินัย", val: markDiscipline },
{
id: 2,
name: "ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน",
val: markLeave,
},
{
id: 3,
name: "ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)",
val: markRate,
},
];
dialogWarn.value = true;
};
</script>
@ -805,7 +810,6 @@ const clickShowWarn = () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th></q-th>
<q-th
auto-width
v-if="
@ -870,20 +874,26 @@ const clickShowWarn = () => {
<q-tooltip>หมายเหต</q-tooltip>
</q-btn>
</q-td>
<q-td key="warn" class="text-center">
<q-td key="warn" class="text-center" v-if="props.row.statusMark">
<q-btn
v-if="props.rowIndex == 1"
icon="mdi-information-outline"
size="12px"
color="red"
flat
round
dense
@click.stop="clickShowWarn"
@click.stop="
clickShowWarn(
props.row.markDiscipline,
props.row.markLeave,
props.row.markRate
)
"
>
<q-tooltip>แจงเตอน</q-tooltip></q-btn
>
</q-td>
<q-td v-else auto-width></q-td>
<q-td
v-close-popup
@ -996,7 +1006,6 @@ const clickShowWarn = () => {
</div>
</div>
</div>
<!-- add -->
<q-dialog v-model="modalAdd">
<q-card style="width: 800px; max-width: 80vw">

View file

@ -55,8 +55,12 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
dateSend: date2Thai(e.requestDate),
requestNote: e.requestNote,
employeeType: profileType(e.profileType),
reason: e.reason
reason: e.reason,
markDiscipline: e.markDiscipline,
markLeave: e.markLeave,
markRate: e.markRate,
isApprove: e.isApprove,
statusMark: e.markDiscipline === true || e.markLeave === true || e.markRate === true ? true : false
}));
rows.value = await datalist;
listinsignia.value = await datalist;
@ -146,6 +150,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
}
}
return {
roundId,
optionRound,