Merge branch 'develop' into AanandaDev
This commit is contained in:
commit
653ee17da3
6 changed files with 492 additions and 184 deletions
|
|
@ -27,9 +27,11 @@ export default {
|
||||||
saveEditAssign: (personalId: string) =>
|
saveEditAssign: (personalId: string) =>
|
||||||
`${finish}/probation-assign?id=${personalId}`,
|
`${finish}/probation-assign?id=${personalId}`,
|
||||||
personalAdd: () => `${personal}/add`,
|
personalAdd: () => `${personal}/add`,
|
||||||
probationGetAssignList: (personalId:string) =>
|
probationGetAssignList: (personalId: string) =>
|
||||||
`${finish}/probation-assign-list?personal_id=${personalId}`,
|
`${finish}/probation-assign-list?personal_id=${personalId}`,
|
||||||
probationsGetAssign: (assignId:string) =>`${finish}/probation-assign?assign_id=${assignId}`,
|
probationsGetAssign: (assignId: string) => `${finish}/probation-assign?assign_id=${assignId}`,
|
||||||
|
changestatusProbations: (personalId: string) => `${evaluate}/probation/change-status?personal_id=${personalId}`,
|
||||||
|
|
||||||
// probationGetAssignList: (personalId: string) =>
|
// probationGetAssignList: (personalId: string) =>
|
||||||
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
||||||
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
||||||
|
|
@ -60,8 +62,8 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
summarySurveyDetail:(id:string) => `${evaluate}/survey?assign_id=${id}`,
|
summarySurveyDetail: (id: string) => `${evaluate}/survey?assign_id=${id}`,
|
||||||
summaryReportDetail:(id:string) => `${evaluate}/report?assign_id=${id}`
|
summaryReportDetail: (id: string) => `${evaluate}/report?assign_id=${id}`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,13 @@ const date_start = ref<Date>(new Date());
|
||||||
const date_finish = ref<Date>();
|
const date_finish = ref<Date>();
|
||||||
const develop = ref<number>();
|
const develop = ref<number>();
|
||||||
const result = ref<number>();
|
const result = ref<number>();
|
||||||
|
const expand_month = ref<string>();
|
||||||
const reson = ref<string>("");
|
const reson = ref<string>("");
|
||||||
const chairman_dated = ref<Date>();
|
const chairman_dated = ref<Date>();
|
||||||
const director1_dated = ref<any>("");
|
const director1_dated = ref<any>("");
|
||||||
const director2_dated = ref<any>("");
|
const director2_dated = ref<any>("");
|
||||||
const fullname = ref<string>("")
|
const fullname = ref<string>("");
|
||||||
|
|
||||||
const fecthResult = async (id: string) => {
|
const fecthResult = async (id: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.createformReport(id))
|
.get(config.API.createformReport(id))
|
||||||
|
|
@ -92,8 +94,7 @@ const fecthResult = async (id: string) => {
|
||||||
status.value = false;
|
status.value = false;
|
||||||
action.value = "edit";
|
action.value = "edit";
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// part new
|
// part new
|
||||||
|
|
@ -105,6 +106,10 @@ const options = [
|
||||||
const optionsResult = [
|
const optionsResult = [
|
||||||
{ value: 1, label: "ไม่ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้รับราชการต่อ" },
|
{ value: 1, label: "ไม่ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้รับราชการต่อ" },
|
||||||
{ value: 2, label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ" },
|
{ value: 2, label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ" },
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: "เห็นควรให้ขยายระยะเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const director_id = ref<any>(null);
|
const director_id = ref<any>(null);
|
||||||
|
|
@ -137,7 +142,7 @@ const clickdownloadFile = async (type: string) => {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
downloadFile(res,`แบบรายงานการประเมินฯ_${fullname.value}.${type}`);
|
downloadFile(res, `แบบรายงานการประเมินฯ_${fullname.value}.${type}`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -156,6 +161,7 @@ const postData = async () => {
|
||||||
chairman_dated: chairman_dated.value,
|
chairman_dated: chairman_dated.value,
|
||||||
director1_dated: director1_dated.value,
|
director1_dated: director1_dated.value,
|
||||||
director2_dated: director2_dated.value,
|
director2_dated: director2_dated.value,
|
||||||
|
expand_month: expand_month.value,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.post(config.API.createformReport(assignId.value), data)
|
.post(config.API.createformReport(assignId.value), data)
|
||||||
|
|
@ -167,24 +173,39 @@ const postData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const selectRuslt = () => {
|
||||||
|
if (result.value !== 3) {
|
||||||
|
expand_month.value = "";
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
|
|
||||||
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
||||||
<div>แบบรายงานการประเมินฯ</div>
|
<div>แบบรายงานการประเมินฯ</div>
|
||||||
<!-- <q-space /> -->
|
<!-- <q-space /> -->
|
||||||
<q-btn v-if="!status" size="12px" flat dense icon="mdi-download" color="primary">
|
<q-btn
|
||||||
|
v-if="!status"
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
icon="mdi-download"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
||||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
<q-item-section avatar
|
||||||
|
><q-icon color="red" name="mdi-file-pdf"
|
||||||
|
/></q-item-section>
|
||||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
||||||
<q-item-section avatar><q-icon color="blue" name="mdi-file-word" /></q-item-section>
|
<q-item-section avatar
|
||||||
|
><q-icon color="blue" name="mdi-file-word"
|
||||||
|
/></q-item-section>
|
||||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
@ -193,7 +214,14 @@ const postData = async () => {
|
||||||
|
|
||||||
<div v-if="action == 'edit'">
|
<div v-if="action == 'edit'">
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn dense flat round color="primary" @click="edit()" icon="mdi-pencil-outline">
|
<q-btn
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
@click="edit()"
|
||||||
|
icon="mdi-pencil-outline"
|
||||||
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -201,8 +229,15 @@ const postData = async () => {
|
||||||
<q-btn dense flat round color="red" @click="cancel()" icon="mdi-undo">
|
<q-btn dense flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||||
<q-tooltip>ยกเลิก</q-tooltip>
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn dense flat round class="q-ml-sm" color="public" @click="saveEdit(assignId)"
|
<q-btn
|
||||||
icon="mdi-content-save-outline">
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
class="q-ml-sm"
|
||||||
|
color="public"
|
||||||
|
@click="saveEdit(assignId)"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -212,8 +247,16 @@ const postData = async () => {
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker menu-class-name="modalfix" v-model="date_start" :locale="'th'" autoApply borderless
|
<datepicker
|
||||||
:readonly="!status" :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="date_start"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -221,10 +264,23 @@ const postData = async () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_start != null ? date2Thai(date_start) : null
|
<q-input
|
||||||
" :label="`${'ระหว่างวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
date_start != null ? date2Thai(date_start) : null
|
||||||
|
"
|
||||||
|
:label="`${'ระหว่างวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -232,8 +288,16 @@ const postData = async () => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker menu-class-name="modalfix" v-model="date_finish" :locale="'th'" autoApply :readonly="!status"
|
<datepicker
|
||||||
borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="date_finish"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:readonly="!status"
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -241,10 +305,23 @@ const postData = async () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_finish != null ? date2Thai(date_finish) : null
|
<q-input
|
||||||
" :label="`${'ถึงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
date_finish != null ? date2Thai(date_finish) : null
|
||||||
|
"
|
||||||
|
:label="`${'ถึงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -257,28 +334,78 @@ const postData = async () => {
|
||||||
<div class="col-12 row q-mt-xs">
|
<div class="col-12 row q-mt-xs">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select :rules="[
|
<q-select
|
||||||
(val) =>
|
:rules="[
|
||||||
!!val ||
|
(val) =>
|
||||||
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
!!val ||
|
||||||
]" hide-bottom-space :options="options" class="col-xs-12 col-sm-6" dense borderless :disable="!status"
|
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
emit-value map-options option-label="label" option-value="value" outlined v-model="develop"
|
]"
|
||||||
label="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ" />
|
hide-bottom-space
|
||||||
|
:options="options"
|
||||||
|
class="col-xs-12 col-sm-6"
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
:disable="!status"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="label"
|
||||||
|
option-value="value"
|
||||||
|
outlined
|
||||||
|
v-model="develop"
|
||||||
|
label="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select :rules="[
|
<div class="row">
|
||||||
(val) =>
|
<q-select
|
||||||
!!val || 'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
class="col-sm-12"
|
||||||
]" hide-bottom-space :options="optionsResult" class="col-xs-12 col-sm-6" :disable="!status" dense
|
:rules="[
|
||||||
borderless emit-value map-options option-label="label" option-value="value" outlined v-model="result"
|
(val) =>
|
||||||
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ" />
|
!!val ||
|
||||||
|
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
|
]"
|
||||||
|
hide-bottom-space
|
||||||
|
:options="optionsResult"
|
||||||
|
:disable="!status"
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="label"
|
||||||
|
option-value="value"
|
||||||
|
outlined
|
||||||
|
v-model="result"
|
||||||
|
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ"
|
||||||
|
@update:model-value="selectRuslt"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="row q-mt-xs" v-if="result === 3">
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="expand_month"
|
||||||
|
label="จำนวนเดือน"
|
||||||
|
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']"
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-mt-lg">
|
<div class="col-12 row q-mt-lg">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input hide-bottom-space dense borderless outlined :disable="!status" class="bg-white" type="textarea"
|
<q-input
|
||||||
v-model="reson" label="เหตุผล" :rules="[(val) => !!val || 'กรุณาระบุเหตุผล']" />
|
hide-bottom-space
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
outlined
|
||||||
|
:disable="!status"
|
||||||
|
class="bg-white"
|
||||||
|
type="textarea"
|
||||||
|
v-model="reson"
|
||||||
|
label="เหตุผล"
|
||||||
|
:rules="[(val) => !!val || 'กรุณาระบุเหตุผล']"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -292,11 +419,27 @@ const postData = async () => {
|
||||||
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
|
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id" outlined :options="commander"
|
<q-select
|
||||||
label="ชื่อ-นามสกุล" option-label="name" disable />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id"
|
||||||
|
outlined
|
||||||
|
:options="commander"
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
option-label="name"
|
||||||
|
disable
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="chairman_dated" :locale="'th'" :readonly="!status" autoApply
|
<datepicker
|
||||||
borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="chairman_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
:readonly="!status"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -304,10 +447,23 @@ const postData = async () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="chairman_dated != null ? date2Thai(chairman_dated) : null
|
<q-input
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
chairman_dated != null ? date2Thai(chairman_dated) : null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -323,11 +479,27 @@ const postData = async () => {
|
||||||
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id2" outlined label="ชื่อ-นามสกุล"
|
<q-select
|
||||||
:disable="!status" :options="optionDirector" option-label="name" />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id2"
|
||||||
|
outlined
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
:disable="!status"
|
||||||
|
:options="optionDirector"
|
||||||
|
option-label="name"
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="director1_dated" :locale="'th'" autoApply borderless
|
<datepicker
|
||||||
:readonly="!status" :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="director1_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -335,12 +507,25 @@ const postData = async () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director1_dated != null
|
<q-input
|
||||||
? date2Thai(director1_dated)
|
outlined
|
||||||
: null
|
dense
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
director1_dated != null
|
||||||
|
? date2Thai(director1_dated)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -356,11 +541,27 @@ const postData = async () => {
|
||||||
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id3" outlined label="ชื่อ-นามสกุล"
|
<q-select
|
||||||
:options="optionDirector" :disable="!status" option-label="name" />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id3"
|
||||||
|
outlined
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
:options="optionDirector"
|
||||||
|
:disable="!status"
|
||||||
|
option-label="name"
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="director2_dated" :locale="'th'" autoApply
|
<datepicker
|
||||||
:readonly="!status" borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="director2_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:readonly="!status"
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -368,12 +569,25 @@ const postData = async () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director2_dated != null
|
<q-input
|
||||||
? date2Thai(director2_dated)
|
outlined
|
||||||
: null
|
dense
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
director2_dated != null
|
||||||
|
? date2Thai(director2_dated)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,6 @@ const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "desc",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"name",
|
"name",
|
||||||
|
|
@ -33,8 +25,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"probation_no",
|
"probation_no",
|
||||||
"order_number",
|
"order_number",
|
||||||
"probation_status",
|
"probation_status",
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
]);
|
||||||
|
|
||||||
// หัวตาราง
|
// หัวตาราง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -110,10 +101,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
// ข้อมูลตาราง (จำลอง)
|
||||||
const rows = ref<FormMainProbation[]>([]);
|
const rows = ref<FormMainProbation[]>([]);
|
||||||
|
|
||||||
// หัวตาราง2
|
// หัวตาราง2
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns2 = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -161,21 +150,26 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "status",
|
||||||
|
align: "left",
|
||||||
|
label: "สะถานะทดลองงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "status",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
// ข้อมูลตาราง (จำลอง)
|
||||||
const rows2 = ref<FormMainProbation2[]>([]);
|
const rows2 = ref<FormMainProbation2[]>([]);
|
||||||
|
|
||||||
|
const modal = ref<boolean>(false);
|
||||||
|
const probationlist = ref<any>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getpersonalList();
|
getpersonalList();
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(modal, () => {
|
|
||||||
if (modal.value === true) {
|
|
||||||
fecthlistPersonal();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const getpersonalList = async () => {
|
const getpersonalList = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -192,7 +186,7 @@ const getpersonalList = async () => {
|
||||||
organization: item.organization,
|
organization: item.organization,
|
||||||
probation_no: item.probation_no,
|
probation_no: item.probation_no,
|
||||||
order_number: item.order_number,
|
order_number: item.order_number,
|
||||||
probation_status: item.probation_status,
|
probation_status: statusProbationMain(item.probation_status),
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|
@ -200,7 +194,6 @@ const getpersonalList = async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// fecth profile
|
// fecth profile
|
||||||
const fecthlistPersonal = async () => {
|
const fecthlistPersonal = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -215,45 +208,53 @@ const fecthlistPersonal = async () => {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {});
|
||||||
hideLoader();
|
};
|
||||||
});
|
const fecthlistProbation = async (id: string, data: any) => {
|
||||||
|
try {
|
||||||
|
probationlist.value = [];
|
||||||
|
const res = await http.post(
|
||||||
|
config.API.profileSearchNewOcIdType(id, "officer"),
|
||||||
|
{
|
||||||
|
criterias: data,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return res.data.result;
|
||||||
|
} catch (err) {
|
||||||
|
messageError($q, err);
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const findlist = async (id: string) => {
|
const findlist = async (id: string) => {
|
||||||
let data = [
|
let data = [
|
||||||
|
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||||
|
{ criteriaType: "is_probation", criteriaValue: "true" },
|
||||||
|
];
|
||||||
|
let data2 = [
|
||||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||||
{ criteriaType: "is_probation", criteriaValue: "false" },
|
{ criteriaType: "is_probation", criteriaValue: "false" },
|
||||||
];
|
];
|
||||||
await http
|
let response1 = await fecthlistProbation(id, data);
|
||||||
.post(config.API.profileSearchNewOcIdType(id, "officer"), {
|
let response2 = await fecthlistProbation(id, data2);
|
||||||
criterias: data,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
rows2.value = res.data.result.map((e: any) => ({
|
|
||||||
id: e.id,
|
|
||||||
fullname: e.fullname,
|
|
||||||
position: e.position,
|
|
||||||
level: e.positionEmployeeLevel,
|
|
||||||
organizationOrganization: e.oc,
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const clickDelete = (id: string) => {
|
response1.forEach((e: any) =>
|
||||||
$q.dialog({
|
probationlist.value.push({ ...e, probation: true })
|
||||||
title: "ยืนยันการลบข้อมูล",
|
);
|
||||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
response2.forEach((e: any) =>
|
||||||
cancel: {
|
probationlist.value.push({ ...e, probation: false })
|
||||||
flat: true,
|
);
|
||||||
color: "negative",
|
console.log(probationlist.value);
|
||||||
},
|
rows2.value = probationlist.value.map((e: any) => ({
|
||||||
persistent: true,
|
id: e.id,
|
||||||
})
|
fullname: e.fullname,
|
||||||
.onOk(async () => {})
|
position: e.position,
|
||||||
.onCancel(() => {})
|
level: e.positionEmployeeLevel,
|
||||||
.onDismiss(() => {});
|
organizationOrganization: e.oc,
|
||||||
|
status: statusProbation(e.probation),
|
||||||
|
}));
|
||||||
|
modal.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAdd = (id: string) => {
|
const clickAdd = (id: string) => {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -279,25 +280,36 @@ const clickAdd = (id: string) => {
|
||||||
"ยันยันการเพิ่มข้อมูล",
|
"ยันยันการเพิ่มข้อมูล",
|
||||||
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||||
);
|
);
|
||||||
// $q.dialog({
|
|
||||||
// title: "ยืนยันการเพิ่มข้อมูล",
|
|
||||||
// message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
|
||||||
// cancel: {
|
|
||||||
// flat: true,
|
|
||||||
// color: "negative",
|
|
||||||
// },
|
|
||||||
// persistent: true,
|
|
||||||
// })
|
|
||||||
// .onOk(async () => {
|
|
||||||
|
|
||||||
// })
|
|
||||||
// .onCancel(() => {})
|
|
||||||
// .onDismiss(() => {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickClose = async () => {
|
const clickClose = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
};
|
};
|
||||||
|
const statusProbationMain = (val: string) => {
|
||||||
|
switch (val) {
|
||||||
|
case "1":
|
||||||
|
return "อยู่ระหว่างการทดลองปฏิบัติหน้าที่ราชการ";
|
||||||
|
case "2":
|
||||||
|
return "พ้นการทดลองปฏิบัติหน้าที่ราชการ";
|
||||||
|
case "3":
|
||||||
|
return "ไม่พ้นการทดลองปฏิบัติหน้าที่ราชการ";
|
||||||
|
case "4":
|
||||||
|
return "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากเปลี่ยนตำแหน่ง";
|
||||||
|
case "5":
|
||||||
|
return "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากลาออก";
|
||||||
|
case "6":
|
||||||
|
return "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากถึงแก่กรรม";
|
||||||
|
default:
|
||||||
|
return " ";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const statusProbation = (val: boolean) => {
|
||||||
|
switch (val) {
|
||||||
|
case true:
|
||||||
|
return "ทดลองงาน";
|
||||||
|
default:
|
||||||
|
return " ";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
// ค้นหาในตาราง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
@ -313,14 +325,30 @@ const resetFilter2 = () => {
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
filterRef2.value.focus();
|
filterRef2.value.focus();
|
||||||
};
|
};
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
const pagination2 = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
};
|
};
|
||||||
|
const paging2 = ref<boolean>(true);
|
||||||
|
const paginationLabel2 = (start: string, end: string, total: string) => {
|
||||||
|
if (paging2.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -332,7 +360,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="modal = true"
|
@click="fecthlistPersonal"
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -415,7 +443,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name === 'probation_status'">
|
<!-- <div v-else-if="col.name === 'probation_status'">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="20px"
|
size="20px"
|
||||||
v-if="props.row.probation_status === 'PENDING'"
|
v-if="props.row.probation_status === 'PENDING'"
|
||||||
|
|
@ -451,7 +479,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
? "ไม่ผ่านการทดลองงาน"
|
? "ไม่ผ่านการทดลองงาน"
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div> -->
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -517,8 +545,8 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
:pagination-label="paginationLabel"
|
:pagination-label="paginationLabel2"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination2"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -561,7 +589,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="pagination.page"
|
v-model="pagination2.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
color="dark"
|
color="dark"
|
||||||
:max="scope.pagesNumber"
|
:max="scope.pagesNumber"
|
||||||
|
|
|
||||||
|
|
@ -11,22 +11,24 @@ import config from "@/app.config";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success, showLoader, hideLoader, date2Thai } = mixin;
|
const {
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
date2Thai,
|
||||||
|
dialogConfirm,
|
||||||
|
} = mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const personalId = ref<string>(route.params.id as string);
|
const personalId = ref<string>(route.params.id as string);
|
||||||
|
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const position_line = ref<string>("");
|
const position_line = ref<string>("");
|
||||||
const position_level = ref<string>("");
|
const position_level = ref<string>("");
|
||||||
const organization = ref<string>("");
|
const organization = ref<string>("");
|
||||||
const probation_status = ref<string>("");
|
const probation_status = ref<string>("");
|
||||||
|
const probation_statusold = ref<string>("");
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "desc",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -34,9 +36,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"date_finish",
|
"date_finish",
|
||||||
"mentors",
|
"mentors",
|
||||||
"commander",
|
"commander",
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
]);
|
||||||
|
|
||||||
// หัวตาราง
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -84,31 +84,39 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
|
||||||
const rows = ref<FormProbationDetail[]>([]);
|
const rows = ref<FormProbationDetail[]>([]);
|
||||||
|
|
||||||
const clickAdd = () => {};
|
const probation_statusOP = ref<any>([
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
label: "อยู่ระหว่างการทดลองปฏิบัติหน้าที่ราชการ",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
label: "พ้นการทดลองปฏิบัติหน้าที่ราชการ",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "3",
|
||||||
|
label: "ไม่พ้นการทดลองปฏิบัติหน้าที่ราชการ",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "4",
|
||||||
|
label: "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากเปลี่ยนตำแหน่ง",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "5",
|
||||||
|
label: "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากลาออก",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "5",
|
||||||
|
label: "ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากถึงแก่กรรม",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const clickSelect = (id: string) => {
|
onMounted(async () => {
|
||||||
router.push(`${route.fullPath}/${id}`);
|
await getpersonalList();
|
||||||
};
|
await getAssignList();
|
||||||
|
});
|
||||||
// ค้นหาในตาราง
|
|
||||||
const filterKeyword = ref<string>("");
|
|
||||||
const filterRef = ref<any>(null);
|
|
||||||
const resetFilter = () => {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
};
|
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
};
|
|
||||||
const getAssignList = async () => {
|
const getAssignList = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -141,17 +149,65 @@ const getpersonalList = async () => {
|
||||||
position_level.value = data.position_level;
|
position_level.value = data.position_level;
|
||||||
organization.value = data.organization;
|
organization.value = data.organization;
|
||||||
probation_status.value = data.probation_status;
|
probation_status.value = data.probation_status;
|
||||||
|
probation_statusold.value = data.probation_status;
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const selectStatus = async () => {
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.changestatusProbations(personalId.value), {
|
||||||
|
status: probation_status.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "แก้ไขสถานะสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
probation_status.value = probation_statusold.value;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
getpersonalList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"ยืนยันการเปลี่ยนสถานะทดลองงาน",
|
||||||
|
"ต้องการเปลี่ยนสถานะทดลองงานข้อมูลนี้หรือไม่ ?",
|
||||||
|
() => {
|
||||||
|
probation_status.value = probation_statusold.value;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const clickSelect = (id: string) => {
|
||||||
|
router.push(`${route.fullPath}/${id}`);
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
// ค้นหาในตาราง
|
||||||
await getpersonalList();
|
const filterKeyword = ref<string>("");
|
||||||
await getAssignList();
|
const filterRef = ref<any>(null);
|
||||||
|
const resetFilter = () => {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
filterRef.value.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
const attrs = ref<any>(useAttrs());
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
const paging = ref<boolean>(true);
|
||||||
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -210,7 +266,18 @@ onMounted(async () => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="col-12 text-top">สถานะการทดลองงาน</div>
|
<div class="col-12 text-top">สถานะการทดลองงาน</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
<q-icon
|
<q-select
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
v-model="probation_status"
|
||||||
|
:options="probation_statusOP"
|
||||||
|
option-label="label"
|
||||||
|
option-value="id"
|
||||||
|
@update:model-value="selectStatus"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
/>
|
||||||
|
<!-- <q-icon
|
||||||
size="20px"
|
size="20px"
|
||||||
v-if="probation_status === 'PENDING'"
|
v-if="probation_status === 'PENDING'"
|
||||||
name="mdi-timer-sand"
|
name="mdi-timer-sand"
|
||||||
|
|
@ -245,7 +312,7 @@ onMounted(async () => {
|
||||||
: probation_status === "PASS"
|
: probation_status === "PASS"
|
||||||
? "ผ่านการทดลองงาน"
|
? "ผ่านการทดลองงาน"
|
||||||
: ""
|
: ""
|
||||||
}}
|
}} -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ onMounted(() => {
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-12 text-top0 items-center">
|
<div class="col-12 text-top0 items-center">
|
||||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">1</q-avatar>
|
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">1</q-avatar>
|
||||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
คุณคิดเห็นอย่างไรกับการทดลองปฏิบัติหน้าที่ราชการ?
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -117,7 +117,7 @@ onMounted(() => {
|
||||||
<div class="col-12 row q-mt-md">
|
<div class="col-12 row q-mt-md">
|
||||||
<div class="col-12 text-top0 items-center">
|
<div class="col-12 text-top0 items-center">
|
||||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">2</q-avatar>
|
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">2</q-avatar>
|
||||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
ปัญหาและอุปสรรคที่พบระหว่างการทดลองปฏิบัติหน้าที่ราชการ
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -136,7 +136,7 @@ onMounted(() => {
|
||||||
<div class="col-12 row q-mt-md">
|
<div class="col-12 row q-mt-md">
|
||||||
<div class="text-top0 items-center">
|
<div class="text-top0 items-center">
|
||||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
|
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
|
||||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
ความพึงพอใจกับการทดลองปฏิบัติหน้าที่ราชการของคุณอยู่ในระดับใด
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-rating
|
<q-rating
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
||||||
DataUpdateMain,
|
DataUpdateMain,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
interface placementOrder {
|
interface placementOrder {
|
||||||
mappingPosition: { columns: String[] };
|
mappingPosition: { columns: String[] };
|
||||||
|
|
@ -287,7 +286,6 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
DataMainOrder,
|
DataMainOrder,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useProbationDataStore = defineStore("probationDataStore", () => {
|
export const useProbationDataStore = defineStore("probationDataStore", () => {
|
||||||
const ratingColors = ref<string[]>([
|
const ratingColors = ref<string[]>([
|
||||||
"light-blue-3",
|
"light-blue-3",
|
||||||
|
|
@ -311,7 +309,6 @@ export const useProbationDataStore = defineStore("probationDataStore", () => {
|
||||||
setStepOrder,
|
setStepOrder,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useTransferDataStore = defineStore("transferDataStore", () => {
|
export const useTransferDataStore = defineStore("transferDataStore", () => {
|
||||||
const statusText = (val: string) => {
|
const statusText = (val: string) => {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue