no message

This commit is contained in:
setthawutttty 2023-08-23 14:28:50 +07:00
commit c01503b297
48 changed files with 4735 additions and 4760 deletions

View file

@ -39,16 +39,19 @@ export default {
formevaluateround: (id: string, no: string) => `${evaluate}/evaluate-record?assign_id=${id}&evaluate_no=${no}`,
formevaluateRecord: (id: string) => `${evaluate}/evaluate-record/create?assign_id=${id}`,
createformevaluate: (id: string) => `${evaluate}/evaluate-record?assign_id=${id}`,
editFormEvaluate: (id: string, evaluate_id: string) => `${evaluate}/evaluate-record?assign_id=${id}&evaluate_id=${evaluate_id}`,
//แบบประเมินผล (ผู้บังคับบัญชา)
evaluateCreate: (id: string) => `${evaluate}/evaluate/create?assign_id=${id}`,
evaluatecommader: (id: string, no: string) => `${evaluate}/evaluate?assign_id=${id}&evaluate_no=${no}`,
createformCommader: (id: string) => `${evaluate}/evaluate?assign_id=${id}`,
editFormEvaluateCommader: (id: string, evaluate_id: string) => `${evaluate}/evaluate?assign_id=${id}&evaluate_id=${evaluate_id}`,
//แบบประเมินผล (คณะกรรมการ)
evaluateChairman: (id: string) => `${evaluate}/evaluate-chairman/create?assign_id=${id}`,
evaluateRoundChairman: (id: string, no: string) => `${evaluate}/evaluate-chairman?assign_id=${id}&evaluate_no=${no}`,
createformChairman: (id: string) => `${evaluate}/evaluate-chairman?assign_id=${id}`,
editFormEvaluateChairman: (id: string, evaluate_id: string) => `${evaluate}/evaluate-chairman?assign_id=${id}&evaluate_id=${evaluate_id}`,
//แบบรายงาน
evaluateReportcreate: (id: string) => `${evaluate}/evaluate-result/create?assign_id=${id}`,

View file

@ -26,6 +26,9 @@ export default {
resingByid: (id: string) => `${retirement}/resign/${id}`,
resignConfirm: (id: string) => `${retirement}/resign/confirm/${id}`,
resignReject: (id: string) => `${retirement}/resign/reject/${id}`,
listExitInterview: () => `${retirement}/resign/questionnaire`,
ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`,
ExitInterviewReport: `${retirement}/resign/questionnaire/report`,
// ปลดออก
retirementDischarge,
listDischarge: () => `${retirement}/discharge`,
@ -43,4 +46,7 @@ export default {
listOut: () => `${retirement}/out`,
outByid: (id: string) => `${retirement}/out/${id}`,
outReport: `${retirement}/out/report`,
fileRetirement: (id: string) => `${retirement}/upload/${id}`,
checkfileupload: (id: string) => `${retirement}/upload/check/${id}`
};

View file

@ -21,6 +21,7 @@ export default {
insigniaReject: (profileId: string) => `${insignia}/request/status/reject/${profileId}`,
insigniaDelete: (profileId: string) => `${insignia}/request/status/delete/${profileId}`,
insigniaEdit: (profileId: string) => `${insignia}/request/${profileId}`,
insigniaNosend: (insigniaPeriodId: any) => `${insignia}/request/org/no-send/${insigniaPeriodId}`,
insigniaAgency: () => `${insignia}/request/agency`,
insigniaDashboard: (insigniaPeriodId: string) => `${insignia}/request/dashboard/${insigniaPeriodId}`,

View file

@ -3,10 +3,15 @@
ref="inputRef"
v-model="formattedValue"
:dense="dense"
:outlined="outlined"
:class="className"
:readonly="readonly"
:borderless="borderless"
:outlined="edit"
:class="
edit == true
? 'full-width inputgreen cursor-pointer'
: 'full-width cursor-pointer'
"
:readonly="!edit"
:borderless="!edit"
hide-bottom-space
>
<template v-for="(_, slot) in slots" v-slot:[slot]="scope">
<slot :name="slot" v-bind="scope || {}" />
@ -24,21 +29,11 @@ const props = defineProps({
modelValue: Number,
dense: {
type: Boolean,
default: false,
default: true,
},
outlined: {
edit: {
type: Boolean,
default: false,
},
readonly: {
type: Boolean,
default: false,
},
borderless: {
type: Boolean,
default: false,
},
className: String,
});
const { inputRef, formattedValue, setValue } = useCurrencyInput({

View file

@ -121,7 +121,7 @@ const menuList = readonly<any[]>([
},
{
key: 10,
icon: "o_list",
icon: "mdi-file-certificate-outline",
activeIcon: "order",
label: "ออกคำสั่ง",
path: "order",
@ -293,7 +293,7 @@ const menuList = readonly<any[]>([
{
key: 7.3,
label: "Exit interview",
// path: "",
path: "exit-Interview",
role: "retirement",
},
{

View file

@ -3,6 +3,7 @@ import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
@ -61,8 +62,8 @@ const fecthappointmentByid = async () => {
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
title.value.positionLevelOld = data.positionLevelOld ?? "-";
title.value.positionTypeOld = data.positionTypeOld ?? "-";
status.value = data.status,
console.log("🚀 ~ file: Detail.vue:65 ~ .then ~ status:", status.value)
(status.value = data.status),
console.log("🚀 ~ file: Detail.vue:65 ~ .then ~ status:", status.value);
educationOld.value = data.educationOld;
organizationPositionOld.value = data.organizationPositionOld;
positionTypeOld.value = data.positionTypeOld;
@ -72,7 +73,6 @@ const fecthappointmentByid = async () => {
// organization.value = data.organization; //
reason.value = data.reason;
date.value = data.positionDate;
})
.catch((e) => {
messageError($q, e);
@ -135,7 +135,16 @@ const getClass = (val: boolean) => {
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
รายละเอยดการแตงต-เลอน {{ title.fullname }}
</div>
<q-card bordered class="row col-12 text-dark">
@ -144,8 +153,15 @@ const getClass = (val: boolean) => {
{{ title.fullname }}
</div>
<q-space />
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ"
@click="router.push(`/registry/${profileId}`)" />
<q-btn
outline
color="blue"
dense
icon-right="mdi-open-in-new"
class="q-px-sm"
label="ดูข้อมูลทะเบียนประวัติ"
@click="router.push(`/registry/${profileId}`)"
/>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
@ -191,19 +207,40 @@ const getClass = (val: boolean) => {
แกไขขอมลเพอลงบญชแนบทาย
</div>
<q-space />
<div v-if="status !== 'DONE' && status !== 'REPORT'" >
<div v-if="status !== 'DONE' && status !== 'REPORT'">
<div class="q-gutter-sm" v-if="!edit">
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline" class="q-px-sm" label="แก้ไข"
style="width: 80px" @click="edit = !edit" />
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="clickSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
</div>
</div>
<div class="q-gutter-sm" v-else>
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px" @click="clickSave" />
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="edit = !edit" />
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>
<q-form ref="myForm">
@ -212,9 +249,19 @@ const getClass = (val: boolean) => {
<div class="text-weight-bold text-grey">การศกษา</div>
</div>
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="educationOld" :rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]" hide-bottom-space
:label="`${'วุฒิการศึกษา'}`" type="text" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
type="text"
/>
</div>
</div>
<div class="row col-12 q-pa-md">
@ -227,38 +274,83 @@ const getClass = (val: boolean) => {
</div>
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" hide-bottom-space
:label="`${'ระดับ'}`" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]" hide-bottom-space
:label="`${'เลขที่'}`" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
<!-- <q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="salary" :rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]" hide-bottom-space
:label="`${'เงินเดือน'}`" type="number" />
:label="`${'เงินเดือน'}`" type="number" /> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
<div class="col-12"><q-separator /></div>
@ -280,22 +372,41 @@ const getClass = (val: boolean) => {
</div> -->
<div class="col-xs-6 col-sm-6 row items-center">
<div class="col-12">
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'" autoApply
:enableTimePicker="false" week-start="0">
<datepicker
menu-class-name="modalfix"
:readonly="!edit"
v-model="date"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`">
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer" :style="edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
">
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
@ -304,9 +415,19 @@ const getClass = (val: boolean) => {
</div>
</div>
<div class="col-12">
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]" hide-bottom-space
:label="`${'หมายเหตุ '}`" type="textarea" />
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="reason"
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
hide-bottom-space
:label="`${'หมายเหตุ '}`"
type="textarea"
/>
</div>
</div>
</div>

View file

@ -534,7 +534,7 @@
/>
</div>
<div class="col-xs-6 col-sm-3">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -546,6 +546,14 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
<div class="col-xs-12">
@ -575,8 +583,7 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useProfileDataStore } from "@/modules/08_registryEmployee/store";
import CurruncyInput from "@/components/CurruncyInput.vue";
import CurrencyInput from "@/components/CurruncyInput.vue";
import type { QTableProps, QForm } from "quasar";
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
import type { InformationOps } from "@/modules/04_registry/interface/index/Main";

View file

@ -7,7 +7,7 @@ import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";
import CurrencyInput from "@/components/CurruncyInput.vue";
import type { QTableProps, QForm } from "quasar";
// import type {
// TypeFile,
@ -423,18 +423,13 @@ onMounted(async () => {
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
<CurrencyInput
v-model="amountOld"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
hide-bottom-space
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
type="number"
/>
</div>
</div>
@ -461,7 +456,7 @@ onMounted(async () => {
เงนเดอนตำแหนงและหนวยงานทบยาย
</div>
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -473,6 +468,14 @@ onMounted(async () => {
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="amount"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>

View file

@ -176,18 +176,16 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
<!-- <q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
v-model="salary" :rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]" hide-bottom-space
:label="`${'เงินเดือน'}`" type="number" /> -->
<CurrencyInput
v-model="salary"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
hide-bottom-space
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
type="number"
/>
</div>
</div>
@ -278,6 +276,8 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";

View file

@ -80,7 +80,7 @@
label="ส่งคำร้องไปยัง สกจ."
@click="confirmMessage"
/>
<q-btn
<!-- <q-btn
v-else
outline
color="primary"
@ -88,7 +88,7 @@
icon-right="download"
class="q-px-sm"
label="ดาวน์โหลด"
/>
/> -->
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
@ -148,6 +148,41 @@
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">เอกสารดาวนโหลด</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12">
<d-table
:rows="rowsFileDownload"
:columns="columns"
row-key="fileName"
hide-header
hide-bottom
>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fileName" :props="props">
{{ props.row.fileName }}
</q-td>
<q-td key="btnMicrosoft" :props="props">
<q-btn flat dense round color="red" icon="picture_as_pdf">
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<!-- <q-btn flat dense round color="blue" icon="mdi-file-word">
<q-tooltip>ไฟล WORD</q-tooltip>
</q-btn> -->
</q-td>
</q-tr>
</template>
</d-table>
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">
@ -266,7 +301,7 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -278,6 +313,14 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
@ -368,6 +411,7 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";
@ -386,7 +430,6 @@ const mixin = useCounterMixin();
const dataId = route.params.id;
const {
date2Thai,
dialogMessage,
messageError,
showLoader,
hideLoader,
@ -463,6 +506,26 @@ onMounted(async () => {
await getData();
});
const rowsFileDownload = ref<TypeFile[]>([{
fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน",
pathName: ""
},{
fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน",
pathName: ""
},{
fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน",
pathName: ""
},{
fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์",
pathName: ""
},{
fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ",
pathName: ""
},{
fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร",
pathName: ""
}]);
const getData = async () => {
showLoader();
await http

File diff suppressed because it is too large Load diff

View file

@ -1,127 +0,0 @@
<!-- card อมลสวนต -->
<template>
<div class="q-pb-md">
<!-- <div class="toptitle text-dark col-12 row items-center">
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
ฟอรมแบบประเมนสำหรบผแล
</div> -->
<div class="col-12 text-dark">
<div class="row col-12 q-gutter-lg q-pa-lg">
<div class="col-12 row">
<div class="col-12 text-top0 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
นเรมทดลองปฎหนาทราชการ งแตนท
<span class="text-black q-px-sm">{{ date2Thai(dateToday) }}</span>
งวนท
<span class="text-black q-px-sm">{{ date2Thai(dateEnd) }}</span>
</div>
<div class="col-12 text-top0 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
การทดลองปฏหนาทราชการมผล งน
<span class="text-black q-px-sm">{{ "ครั้งที่" + period }}</span>
ระหวางวนท
<span class="text-black q-px-sm">{{ date2Thai(dateToday) }}</span>
งวนท
<span class="text-black q-px-sm">{{ date2Thai(dateEnd) }}</span>
</div>
<div class="col-12 q-pt-md">
<q-separator size="3px" color="grey-2" />
</div>
</div>
<!--------------------- 1 --------------------->
<FormEva1 />
<div class="col-12">
<q-separator size="3px" color="grey-2" />
</div>
<!--------------------- 2 --------------------->
<FormEva2 />
<div class="col-12">
<q-separator size="3px" color="grey-2" />
</div>
<!--------------------- 3 --------------------->
<FormEva3 />
<div class="col-12">
<q-separator size="3px" color="grey-2" />
</div>
<!--------------------- งคบบญชาผมอบหมายงาน --------------------->
<FormEvaOrder />
</div>
<q-separator />
<div class="flex justify-end q-px-sm q-pt-sm">
<q-footer class="bg-white q-px-lg q-py-sm flex justify-end">
<q-btn
dense
class="q-px-md"
unelevated
label="บันทึก"
color="public"
/>
</q-footer>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, defineAsyncComponent } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useRoute } from "vue-router";
import { useQuasar } from "quasar";
import router from "@/router";
const FormEva1 = defineAsyncComponent(
() => import("@/modules/05_placement/components/probation/form/formEva1.vue")
);
const FormEva2 = defineAsyncComponent(
() => import("@/modules/05_placement/components/probation/form/formEva2.vue")
);
const FormEva3 = defineAsyncComponent(
() => import("@/modules/05_placement/components/probation/form/formEva3.vue")
);
const FormEvaOrder = defineAsyncComponent(
() =>
import("@/modules/05_placement/components/probation/form/formEvaOrder.vue")
);
const $q = useQuasar();
const mixin = useCounterMixin();
const { date2Thai } = mixin;
const dateToday = ref<Date>(new Date("10-10-2023"));
const dateEnd = ref<Date>(new Date("12-10-2023"));
const period = ref<number>(1);
const onSubmit = () => {
$q.notify({
color: "green-4",
textColor: "white",
icon: "cloud_done",
message: "ส่งแบบประเมินเเล้ว",
});
};
</script>
<style lang="scss" scoped>
.text-top2 {
font-weight: 500;
padding-bottom: 8px;
color: rgb(70, 68, 68);
}
.text-top0 {
font-weight: 600;
padding-bottom: 8px;
color: rgb(70, 68, 68);
}
</style>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted } from "vue";
import { ref, onMounted, watch } from "vue";
import { useQuasar } from "quasar";
import { useProbationDataStore } from "@/modules/05_placement/store";
import { useCounterMixin } from "@/stores/mixin";
@ -7,7 +7,6 @@ import { useRouter, useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
const router = useRouter();
const routeName = router.currentRoute.value.name;
@ -27,27 +26,35 @@ const {
} = mixin;
const route = useRoute();
const assignId = ref<string>(route.params.form.toString());
const saveEdit = (id:string) => {
dialogConfirm($q,() => console.log("save"))
const personalId = ref<string>(route.params.personalId.toString());
const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save"))
}
const edit = () => {
status.value = true;
console.log(status.value);
// console.log(status.value);
};
const cancel = () => {
status.value = false;
};
const person = ref<any>([]);
const assign = ref<any>([]);
const evaluate_no = ref<string>("");
const evaluate_no = ref<number>();
const evaluate_id = ref<string>("");
const start_date = ref<Date>(new Date());
const date_finish = ref<Date>(new Date());
const commander = ref<any>([]);
const round = ref<any>();
const status = ref<boolean>(true);
const dataArr = ref<any>();
const props = defineProps({
tab: String,
data: Object,
action: String
});
const list2_1 = [
@ -95,103 +102,133 @@ const list2_3 = [
label: "ปฏิบัติบัติหน้าที่อย่างตรงไปตรงมาโดยยึกหลักจรรยาบรรณวิชาชีพ",
},
];
onMounted(async () => {
if (props.tab !== undefined) {
round.value = props.tab.charAt(4);
// fetchEvaluate(assignId.value, round.value);
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == 'edit') {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
fecthAssign();
}
fecthAssign(assignId.value);
// console.log(round.value);
// console.log(assignId.value);
});
const fecthAssign = async (id: string) => {
watch(props, async () => {
if (props.tab && props.action == 'edit') {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
fecthAssign();
// console.log("props===>", props);
}
})
// onMounted(async () => {
// if (props.tab !== undefined) {
// round.value = props.tab.charAt(4);
// // fetchEvaluate(assignId.value, round.value);
// }
// fecthAssign(assignId.value);
// // console.log(round.value);
// // console.log(assignId.value);
// });
const fecthAssign = async () => {
showLoader();
await http
.get(config.API.evaluateCreate(id))
.get(config.API.evaluateCreate(assignId.value))
.then(async (res: any) => {
person.value = res.data.data.person;
assign.value = res.data.data.assign;
commander.value = res.data.data.commander;
option.value.push(commander.value);
Autherise.value = commander.value.name;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
console.log(props.tab, res.data.data.evaluate_no);
if (props.action == 'add') {
person.value = res.data.data.person;
assign.value = res.data.data.assign;
commander.value = res.data.data.commander;
option.value.push(commander.value);
Autherise.value = commander.value.name;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
if (res.data.data.evaluate_no > round.value) {
await fetchEvaluate(assignId.value, round.value);
}
// console.log(props.tab, res.data.data.evaluate_no);
// if (res.data.data.evaluate_no > evaluate_no.value) {
// await fetchEvaluate(assignId.value, evaluate_no.value);
// }
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
}).finally(() => {
if (props.action == 'edit') {
fetchEvaluate();
}
hideLoader();
});
};
const fetchEvaluate = async (id: string, round: string) => {
showLoader();
await http
.get(config.API.evaluatecommader(id, round))
.then((res: any) => {
console.log(res);
let data = res.data.data.evaluate;
console.log(data);
start_date.value = data.date_start;
date_finish.value = data.date_finish;
knowledge_level.value = data.knowledge_level;
skill_level.value = data.skill_level;
competency_level.value = data.competency_level;
learn_level.value = data.learn_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
behavio_strength_desc.value = data.behavior_strength_desc;
behavior_improve_desc.value = data.behavior_improve_desc;
orientation.value = data.orientation.toString();
self_learning.value = data.self_learning.toString();
training_seminar.value = data.training_seminar.toString();
other_training.value = data.other_training.toString();
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
}
if (
data.behavior_other_desc !== "" &&
data.behavior_other_level !== null
) {
etc2.value = true;
}
status.value = false;
})
.catch((e) => {
console.log(e);
const fetchEvaluate = async () => {
// showLoader();
// await http
// .get(config.API.evaluatecommader(assignId.value, evaluate_no.value))
// .then((res: any) => {
// console.log(res);
// let data = res.data.data.evaluate;
// console.log(data);
let data = await dataArr.value;
evaluate_id.value = data.id;
start_date.value = data.date_start;
date_finish.value = data.date_finish;
knowledge_level.value = data.knowledge_level;
skill_level.value = data.skill_level;
competency_level.value = data.competency_level;
learn_level.value = data.learn_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
behavio_strength_desc.value = data.behavior_strength_desc;
behavior_improve_desc.value = data.behavior_improve_desc;
orientation.value = data.orientation.toString();
self_learning.value = data.self_learning.toString();
training_seminar.value = data.training_seminar.toString();
other_training.value = data.other_training.toString();
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
}
if (
data.behavior_other_desc !== "" &&
data.behavior_other_level !== null
) {
etc2.value = true;
}
status.value = false;
// })
// .catch((e) => {
// console.log(e);
if (e.data.message !== "Data not found!") {
messageError($q, e);
}
})
.finally(() => {
hideLoader();
});
// if (e.data.message !== "Data not found!") {
// messageError($q, e);
// }
// })
// .finally(() => {
// hideLoader();
// });
};
// const dateToday = ref<Date>(new Date("10-10-2023"));
@ -229,14 +266,14 @@ const behavio_strengthRules = [
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลจุดเด่น",
];
const behavio_inproveRef = ref<any>(null);
const behavio_inproveRules = [
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง",
];
// const behavio_inproveRules = [
// (val: any) => (val && val.length > 0) || "",
// ];
const savaForm = () => {
let hasError = false;
behavio_strengthRef.value.validate();
behavio_inproveRef.value.validate();
// behavio_inproveRef.value.validate();
if (
knowledge_level.value === 0 ||
skill_level.value === 0 ||
@ -248,7 +285,7 @@ const savaForm = () => {
moral_level.value.length < 3 ||
discipline_level.value.length < 5 ||
behavio_strength_desc.value === "" ||
behavior_improve_desc.value === "" ||
// behavior_improve_desc.value === "" ||
orientation.value === null ||
self_learning.value === null ||
training_seminar.value === null
@ -267,13 +304,13 @@ const savaForm = () => {
behavio_orther.value.level == 0))
) {
hasError = true;
} else putformData();
} else save();
if (hasError === true) {
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
}
};
const putformData = () => {
const save = () => {
const data = {
evaluate_no: evaluate_no.value,
start_date: start_date.value,
@ -309,16 +346,17 @@ const putformData = () => {
dialogConfirm($q, async () => {
await http
.post(config.API.createformCommader(assignId.value), data)
.put(config.API.editFormEvaluateCommader(assignId.value, evaluate_id.value), data)
.then((res: any) => {
console.log(res);
// console.log(res);
status.value = false;
success($q, "บันทึกสำเร็จ");
})
.catch((e: any) => {
messageError($q, e);
});
});
};
};
</script>
<template>
@ -327,31 +365,19 @@ const putformData = () => {
<div>แบบประเมนผล (งคบบญชา)</div>
<q-space />
<div v-if="status == false">
<q-btn
flat
round
color="primary"
@click="edit()"
icon="mdi-pencil-outline"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
<div v-else>
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
<q-btn
flat
round
color="public"
@click="saveEdit(assignId)"
icon="mdi-content-save-outline"
>
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</div>
<q-btn flat round color="primary" @click="edit()" icon="mdi-pencil-outline">
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
<div v-else>
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
<q-btn flat round color="public" @click="savaForm()" icon="mdi-content-save-outline">
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</div>
</div>
<div class="col-12 row">
@ -368,7 +394,7 @@ const putformData = () => {
</div>
<div class="col-12 text-top0 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
<span class="text-black q-px-sm">{{ "ครั้งที่" + round }}</span>
<span class="text-black q-px-sm">{{ "ครั้งที่" + evaluate_no }}</span>
ระหวางวนท
<span class="text-black q-px-sm">{{ date2Thai(start_date) }}</span>
งวนท
@ -392,19 +418,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.1. ความรความสามารถ</q-item-label
>
1.1. ความรความสามารถ</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="knowledge_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="knowledge_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -432,19 +450,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.2. กษะ</q-item-label
>
1.2. กษะ</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="skill_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="skill_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -472,19 +482,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.3. สมมรถนะ</q-item-label
>
1.3. สมมรถนะ</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="competency_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="competency_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -512,19 +514,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.4. ความสามารถในการเรยนรงาน</q-item-label
>
1.4. ความสามารถในการเรยนรงาน</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="learn_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="learn_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -552,19 +546,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.5. ความสามารถในการปรบใชความรบงานในหนาท</q-item-label
>
1.5. ความสามารถในการปรบใชความรบงานในหนาท</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="apply_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="apply_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -592,19 +578,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.6. ความสำเรจของงานทไดบมอบหมาย</q-item-label
>
1.6. ความสำเรจของงานทไดบมอบหมาย</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="success_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
:disable="!status"
>
<q-rating v-model="success_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม" :disable="!status">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -633,15 +611,9 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.7 นๆ
<q-checkbox
class="q-ml-sm"
:disable="!status"
dense
v-model="etc"
@click="
(achievement_other.text = ''), (achievement_other.level = 0)
"
/></q-item-label>
<q-checkbox class="q-ml-sm" :disable="!status" dense v-model="etc" @click="
(achievement_other.text = ''), (achievement_other.level = 0)
" /></q-item-label>
</q-item-section>
</q-item>
</q-list>
@ -652,32 +624,15 @@ const putformData = () => {
<q-item dense tag="label" v-ripple>
<q-item-section class="q-ml-md">
<q-item-label>
<q-input
v-model="achievement_other.text"
label="กรอกอื่นๆ"
dense
:disable="!status"
lazy-rules
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input v-model="achievement_other.text" label="กรอกอื่นๆ" dense :disable="!status" lazy-rules autogrow
hide-bottom-space outlined class="bg-white" :rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="achievement_other.level"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="achievement_other.level" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -712,27 +667,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.1 ความประพฤต
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_1" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="conduct_level[i]"
:val="list.id"
max="5"
:disable="!status"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="conduct_level[i]" :val="list.id" max="5" :disable="!status" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -760,27 +703,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.2 ความมณธรรมจรยธรรม
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_2" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="moral_level[i]"
:val="list.id"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="moral_level[i]" :val="list.id" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -808,27 +739,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.3 การรกษาว
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_3" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="discipline_level[i]"
:val="list.id"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="discipline_level[i]" :val="list.id" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -855,50 +774,23 @@ const putformData = () => {
<div class="col-12 text-top0 row items-center q-pl-lg">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.4 นๆ
<q-checkbox
class="q-ml-sm"
dense
v-model="etc2"
:disable="!status"
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
/>
<q-checkbox class="q-ml-sm" dense v-model="etc2" :disable="!status"
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)" />
</div>
<q-card
v-if="etc2"
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card v-if="etc2" flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense>
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>
<q-input
v-model="behavio_orther.text"
label="กรอกอื่นๆ"
dense
:disable="!status"
lazy-rules
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input v-model="behavio_orther.text" label="กรอกอื่นๆ" dense :disable="!status" lazy-rules autogrow
hide-bottom-space outlined class="bg-white" :rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="behavio_orther.level"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="behavio_orther.level" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -927,40 +819,18 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
ดเด (ไมเก 5 บรรท)
</div>
<q-input
outlined
dense
v-model="behavio_strength_desc"
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
lazy-rules
type="textarea"
:disable="!status"
label="กรอกจุดเด่น"
hide-bottom-space
:row="5"
:rules="behavio_strengthRules"
ref="behavio_strengthRef"
/>
<q-input outlined dense v-model="behavio_strength_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
lazy-rules type="textarea" :disable="!status" label="กรอกจุดเด่น" hide-bottom-space :row="5"
:rules="behavio_strengthRules" ref="behavio_strengthRef" />
</div>
<div class="col-12 row">
<div class="col-12 text-top0 row items-center q-pl-lg">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
งทควรปรบปร (ไมเก 5 บรรท)
</div>
<q-input
outlined
dense
v-model="behavior_improve_desc"
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
lazy-rules
type="textarea"
hide-bottom-space
label="กรอกสิ่งที่ควรปรับปรุง"
:disable="!status"
:row="5"
:rules="behavio_inproveRules"
ref="behavio_inproveRef"
/>
<q-input outlined dense v-model="behavior_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
lazy-rules type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :disable="!status" :row="5"
ref="behavio_inproveRef" />
</div>
</div>
</div>
@ -973,11 +843,7 @@ const putformData = () => {
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
การพฒนาผทดลองปฏหนาทราชการ
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1">
<q-list dense>
<q-item dense tag="label" v-ripple>
<q-item-section>
@ -985,22 +851,10 @@ const putformData = () => {
</q-item-section>
<q-item-section side>
<div class="row">
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="orientation"
val="1"
label="ดำเนินการเเล้ว"
:disable="!status"
/>
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="orientation"
:disable="!status"
val="0"
label=" ยังไม่ได้ดำเนินการ"
/>
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="orientation" val="1"
label="ดำเนินการเเล้ว" :disable="!status" />
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="orientation"
:disable="!status" val="0" label=" ยังไม่ได้ดำเนินการ" />
</div>
</q-item-section>
</q-item>
@ -1011,22 +865,10 @@ const putformData = () => {
</q-item-section>
<q-item-section side>
<div class="row">
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="self_learning"
:disable="!status"
val="1"
label="ดำเนินการเเล้ว"
/>
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
:disable="!status"
v-model="self_learning"
val="0"
label=" ยังไม่ได้ดำเนินการ"
/>
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="self_learning"
:disable="!status" val="1" label="ดำเนินการเเล้ว" />
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" :disable="!status"
v-model="self_learning" val="0" label=" ยังไม่ได้ดำเนินการ" />
</div>
</q-item-section>
</q-item>
@ -1037,50 +879,24 @@ const putformData = () => {
</q-item-section>
<q-item-section side>
<div class="row">
<q-radio
checked-icon="task_alt"
:disable="!status"
unchecked-icon="panorama_fish_eye"
v-model="training_seminar"
val="1"
label="ดำเนินการเเล้ว"
/>
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="training_seminar"
:disable="!status"
val="0"
label=" ยังไม่ได้ดำเนินการ"
/>
<q-radio checked-icon="task_alt" :disable="!status" unchecked-icon="panorama_fish_eye"
v-model="training_seminar" val="1" label="ดำเนินการเเล้ว" />
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="training_seminar"
:disable="!status" val="0" label=" ยังไม่ได้ดำเนินการ" />
</div>
</q-item-section>
</q-item>
<q-separator class="q-my-xs" />
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label
>4. การอบรมอ ตามทหนวยงานกำหนด (าม)</q-item-label
>
<q-item-label>4. การอบรมอ ตามทหนวยงานกำหนด (าม)</q-item-label>
</q-item-section>
<q-item-section side>
<div class="row">
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="other_training"
val="1"
:disable="!status"
label="ดำเนินการเเล้ว"
/>
<q-radio
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
v-model="other_training"
:disable="!status"
val="0"
label=" ยังไม่ได้ดำเนินการ"
/>
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="other_training" val="1"
:disable="!status" label="ดำเนินการเเล้ว" />
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="other_training"
:disable="!status" val="0" label=" ยังไม่ได้ดำเนินการ" />
</div>
</q-item-section>
</q-item>
@ -1094,26 +910,11 @@ const putformData = () => {
<div class="col-12 row">
<div class="col-12 text-top2 row items-center">งคบบญชา</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="Autherise"
outlined
:options="option"
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="Autherise" outlined :options="option" label="ผู้บังคับบัญชา"
disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
:readonly="!status"
week-start="0"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:enableTimePicker="false" :readonly="!status" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1121,23 +922,10 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:disable="!status"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null ? date2Thai(dateAutherise) : null
" :label="`${'ลงวันที่'}`" :disable="!status" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1152,7 +940,7 @@ const putformData = () => {
<q-space />
<q-btn v-if="routeName == 'FormEvaluateAdd'" label="บันทึก" color="secondary" @click="savaForm" />
</q-toolbar>
</div>
</div>
</template>
<style lang="scss" scoped>

View file

@ -24,6 +24,7 @@ const {
const route = useRoute();
const router = useRouter();
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.id.toString());
const person = ref<any>([]);
const assign = ref<any>([]);
@ -148,7 +149,7 @@ const behavio_inproveRules = [
const savaForm = () => {
let hasError = false;
behavio_strengthRef.value.validate();
behavio_inproveRef.value.validate();
// behavio_inproveRef.value.validate();
if (
knowledge_level.value === 0 ||
skill_level.value === 0 ||
@ -222,8 +223,11 @@ const putformData = () => {
await http
.post(config.API.createformCommader(assignId.value), data)
.then((res: any) => {
console.log(res);
// console.log(res);
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`
);
})
.catch((e: any) => {
messageError($q, e);

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, computed, onMounted } from "vue";
import { ref, watch, computed, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useProbationDataStore } from "@/modules/05_placement/store";
import { useCounterMixin } from "@/stores/mixin";
@ -25,123 +25,158 @@ const {
} = mixin;
const route = useRoute();
const assignId = ref<string>(route.params.form.toString());
const saveEdit = (id:string) => {
dialogConfirm($q,() => console.log("save"))
const personalId = ref<string>(route.params.personalId.toString());
const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save"))
}
const edit = () => {
status.value = true;
console.log(status.value);
// console.log(status.value);
};
const cancel = () => {
status.value = false;
};
// const person = ref<any>([]);
const assign = ref<any>([]);
const evaluate_no = ref<string>("");
const evaluate_no = ref<number>();
const evaluate_id = ref<string>("");
const start_date = ref<Date>(new Date());
const date_finish = ref<Date>(new Date());
const status = ref<boolean>(true);
const chairman = ref<any>([]);
const commander = ref<any>([]);
const mentors = ref<any>([{ name: "" }, { name: "" }]);
const dataArr = ref<any>();
const round = ref<any>();
const props = defineProps({
tab: String,
data: Object,
action: String
});
onMounted(() => {
if (props.tab !== undefined) {
round.value = props.tab.charAt(4);
// fetchEvaluate(assignId.value, round.value);
onMounted(async () => {
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == 'edit') {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
fecthAssign();
}
fecthAssign(assignId.value);
});
const fecthAssign = async (id: string) => {
watch(props, async () => {
if (props.tab && props.action == 'edit') {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
fecthAssign();
// console.log("props===>", props);
}
})
// onMounted(() => {
// if (props.tab !== undefined) {
// round.value = props.tab.charAt(4);
// // fetchEvaluate(assignId.value, round.value);
// }
// fecthAssign(assignId.value);
// });
const fecthAssign = async () => {
showLoader();
await http
.get(config.API.evaluateChairman(id))
.get(config.API.evaluateChairman(assignId.value))
.then(async (res: any) => {
// console.log(res);
assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
chairman.value = res.data.data.chairman;
commander.value = res.data.data.commander;
mentors.value = res.data.data.mentors;
if (res.data.data.evaluate_no > round.value) {
await fetchEvaluate(assignId.value, round.value);
if (props.action == 'add') {
assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
chairman.value = res.data.data.chairman;
commander.value = res.data.data.commander;
mentors.value = res.data.data.mentors;
}
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
if (props.action == 'edit') {
fetchEvaluate();
}
hideLoader();
});
};
const fetchEvaluate = async (id: string, round: string) => {
const fetchEvaluate = async () => {
showLoader();
await http
.get(config.API.evaluateRoundChairman(id, round))
.then((res: any) => {
let data = res.data.data.evaluate;
console.log(data);
start_date.value = data.date_start;
date_finish.value = data.date_finish;
learn_level.value = data.knowledge_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
orientation.value = data.develop_orientation_score;
self_learning.value = data.develop_self_learning_score;
training_seminar.value = data.develop_training_seminar_score;
other_training.value = data.develop_other_training_score;
orientation_percent.value = data.develop_orientation_percent;
self_learning_percent.value = data.develop_self_learning_percent;
training_seminar_percent.value = data.develop_training_seminar_percent;
other_training_percent.value = data.develop_other_training_percent;
// await http
// .get(config.API.evaluateRoundChairman(assignId.value, evaluate_no.value))
// .then((res: any) => {
// let data = res.data.data.evaluate;
// console.log(data);
let data = await dataArr.value;
evaluate_id.value = data.id;
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
}
if (
data.behavior_other_desc !== "" &&
data.behavior_other_level !== null
) {
etc2.value = true;
}
start_date.value = data.date_start;
date_finish.value = data.date_finish;
learn_level.value = data.knowledge_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
orientation.value = data.develop_orientation_score;
self_learning.value = data.develop_self_learning_score;
training_seminar.value = data.develop_training_seminar_score;
other_training.value = data.develop_other_training_score;
orientation_percent.value = data.develop_orientation_percent;
self_learning_percent.value = data.develop_self_learning_percent;
training_seminar_percent.value = data.develop_training_seminar_percent;
other_training_percent.value = data.develop_other_training_percent;
develop_result.value = data.develop_result;
evaluate_result.value = data.evaluate_result;
status.value = false;
})
.catch((e) => {
if (e.data.message !== "Data not found!") {
messageError($q, e);
}
})
.finally(() => {
hideLoader();
});
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
}
if (
data.behavior_other_desc !== "" &&
data.behavior_other_level !== null
) {
etc2.value = true;
}
status.value = false;
// })
// .catch((e) => {
// if (e.data.message !== "Data not found!") {
// messageError($q, e);
// }
// })
// .finally(() => {
// hideLoader();
// });
};
const list2_1 = [
@ -190,9 +225,6 @@ const list2_3 = [
},
];
const dateToday = ref<Date>(new Date("10-10-2023"));
const dateEnd = ref<Date>(new Date("12-10-2023"));
const period = ref<number>(1);
// part 1
const learn_level = ref<number>(0);
const apply_level = ref<number>(0);
@ -216,9 +248,15 @@ const self_learning_percent = ref<number>(0);
const training_seminar_percent = ref<number>(0);
const other_training_percent = ref<number>(0);
const develop_result = ref<any>();
const evaluate_result = ref<any>();
const evaluate_result_option = ref<any>([
{ name: "ผ่าน", value: 1 },
{ name: "ไม่ผ่าน", value: 0 },
]);
const develop_result_option = ref<any>([
{ name: "ไม่ผ่านการทดลองงาน", value: 0 },
{ name: "ผ่านการทดลองงาน", value: 1 },
{ name: "ผ่าน (สูงกว่าร้อยละ 60)", value: 1 },
{ name: "ไม่ผ่าน (ต่ำกว่าร้อยละ 60)", value: 0 },
]);
// footer
const Autherise = ref<any>(null);
@ -365,6 +403,7 @@ const savaForm = () => {
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
}
};
const putformData = () => {
const data = {
evaluate_no: evaluate_no.value,
@ -406,14 +445,21 @@ const putformData = () => {
sum_score: Number(score1.value) + Number(score2.value),
sum_percent: Number(percent_score1.value) + Number(percent_score2.value),
chairman_dated: dateToISO(dateAutherise.value),
develop_result: develop_result.value,
develop_result: Number(develop_result.value),
evaluate_result: Number(evaluate_result.value),
};
dialogConfirm($q, async () => {
console.log("data==>", data);
await http
.post(config.API.createformChairman(assignId.value), data)
.put(config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value), data)
.then((res: any) => {
console.log(res);
// console.log(res);
status.value = false;
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`
);
})
.catch((e: any) => {
messageError($q, e);
@ -454,31 +500,19 @@ const putformData = () => {
<div class="toptitle text-dark col-12 row items-center">
<div>แบบประเมนผล (คณะกรรมการ)</div>
<q-space />
<div v-if="status == false">
<q-btn
flat
round
color="primary"
@click="edit()"
icon="mdi-pencil-outline"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
<div v-else>
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
<q-btn
flat
round
color="public"
@click="saveEdit(assignId)"
icon="mdi-content-save-outline"
>
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</div>
<div v-if="status == false">
<q-btn flat round color="primary" @click="edit()" icon="mdi-pencil-outline">
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
<div v-else>
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
<q-btn flat round color="public" @click="savaForm()" icon="mdi-content-save-outline">
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</div>
</div>
@ -496,7 +530,7 @@ const putformData = () => {
</div>
<div class="col-12 text-top0 row items-center">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
<span class="text-black q-px-sm">{{ "ครั้งที่" + round }}</span>
<span class="text-black q-px-sm">{{ "ครั้งที่" + evaluate_no }}</span>
ระหวางวนท
<span class="text-black q-px-sm">{{ date2Thai(start_date) }}</span>
งวนท
@ -520,19 +554,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.1. ความสามารถในการเรยนรงาน</q-item-label
>
1.1. ความสามารถในการเรยนรงาน</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="learn_level"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="learn_level" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -560,19 +586,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.2. ความสามารถในการปรบใชความรบงานในหนาท</q-item-label
>
1.2. ความสามารถในการปรบใชความรบงานในหนาท</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="apply_level"
max="5"
size="sm"
color="grey"
:disable="!status"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="apply_level" max="5" size="sm" color="grey" :disable="!status"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -600,19 +618,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.3. ความสำเรจของงานทไดบมอบหมาย</q-item-label
>
1.3. ความสำเรจของงานทไดบมอบหมาย</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="success_level"
max="5"
:disable="!status"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="success_level" max="5" :disable="!status" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -641,15 +651,9 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.4 นๆ
<q-checkbox
class="q-ml-sm"
dense
:disable="!status"
v-model="etc"
@click="
(achievement_other.text = ''), (achievement_other.level = 0)
"
/></q-item-label>
<q-checkbox class="q-ml-sm" dense :disable="!status" v-model="etc" @click="
(achievement_other.text = ''), (achievement_other.level = 0)
" /></q-item-label>
</q-item-section>
</q-item>
</q-list>
@ -660,32 +664,15 @@ const putformData = () => {
<q-item dense tag="label" v-ripple>
<q-item-section class="q-ml-md">
<q-item-label>
<q-input
v-model="achievement_other.text"
label="กรอกอื่นๆ"
dense
lazy-rules
autogrow
:disable="!status"
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input v-model="achievement_other.text" label="กรอกอื่นๆ" dense lazy-rules autogrow :disable="!status"
hide-bottom-space outlined class="bg-white" :rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="achievement_other.level"
max="5"
size="sm"
color="grey"
:disable="!status"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="achievement_other.level" max="5" size="sm" color="grey" :disable="!status"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -738,27 +725,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.1 ความประพฤต
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_1" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="conduct_level[i]"
:val="list.id"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="conduct_level[i]" :val="list.id" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -786,27 +761,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.2 ความมณธรรมจรยธรรม
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_2" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="moral_level[i]"
:val="list.id"
:disable="!status"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="moral_level[i]" :val="list.id" :disable="!status" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -834,27 +797,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.3 การรกษาว
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_3" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="discipline_level[i]"
:val="list.id"
:disable="!status"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="discipline_level[i]" :val="list.id" :disable="!status" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -881,50 +832,23 @@ const putformData = () => {
<div class="col-12 text-top0 row items-center q-pl-lg">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.4 นๆ
<q-checkbox
class="q-ml-sm"
dense
v-model="etc2"
:disable="!status"
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
/>
<q-checkbox class="q-ml-sm" dense v-model="etc2" :disable="!status"
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)" />
</div>
<q-card
v-if="etc2"
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card v-if="etc2" flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense>
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>
<q-input
v-model="behavio_orther.text"
label="กรอกอื่นๆ"
dense
lazy-rules
:disable="!status"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input v-model="behavio_orther.text" label="กรอกอื่นๆ" dense lazy-rules :disable="!status" autogrow
hide-bottom-space outlined class="bg-white" :rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
v-model="behavio_orther.level"
max="5"
size="sm"
:disable="!status"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating v-model="behavio_orther.level" max="5" size="sm" :disable="!status" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -982,8 +906,7 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
3.1. ผลสมฤทธของการทดลองปฏหนาทราชการ</q-item-label
>
3.1. ผลสมฤทธของการทดลองปฏหนาทราชการ</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label style="color: gray">
@ -1015,8 +938,7 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
3.2. พฤตกรรมของผทดลองปฏหนาทราชการ</q-item-label
>
3.2. พฤตกรรมของผทดลองปฏหนาทราชการ</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label style="color: gray">
@ -1088,11 +1010,7 @@ const putformData = () => {
<div class="col">อยละ</div>
</div>
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1">
<div class="row q-gutter-md align-center">
<div class="col-8">1. การปฐมนเทศ</div>
<div class="col">
@ -1109,14 +1027,14 @@ const putformData = () => {
<q-input dense type="number" :disable="!status" v-model="self_learning" />
</div>
<div class="col">
<q-input dense type="number" :disable="!status" v-model="self_learning_percent" />
<q-input dense type="number" :disable="!status" v-model="self_learning_percent" />
</div>
</div>
<q-separator class="q-my-xs" />
<div class="row q-gutter-md align-center">
<div class="col-8">3. การอบรมสมนารวมก</div>
<div class="col">
<q-input dense type="number" :disable="!status" v-model="training_seminar" />
<q-input dense type="number" :disable="!status" v-model="training_seminar" />
</div>
<div class="col">
<q-input dense type="number" :disable="!status" v-model="training_seminar_percent" />
@ -1246,6 +1164,20 @@ const putformData = () => {
</div>
</div>
<div class="row col-12 q-gutter-lg no-margin">
<div class="col-12 row justify-center">
<div class="col-12 text-top0 items-center">
<!-- <q-avatar class="bg-grey-2 q-mr-sm" size="28px">5</q-avatar> -->
สรปผลการพฒนา
</div>
<div class="col-12">
<q-select :disable="!status" class="col-xs-12" dense v-model="develop_result" outlined
:options="develop_result_option" option-label="name" option-value="value" label="เลือกสรุปผลการพัฒนา"
map-options emit-value />
</div>
</div>
</div>
<div class="row col-12 q-gutter-lg no-margin">
<div class="col-12 row justify-center">
<div class="col-12 text-top0 items-center">
@ -1253,19 +1185,9 @@ const putformData = () => {
สรปผล การประเมนผลทดลองปฎหนาทราชการ
</div>
<div class="col-12">
<q-select
class="col-xs-12"
dense
v-model="develop_result"
outlined
:disable="!status"
:options="develop_result_option"
option-label="name"
option-value="value"
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ"
map-options
emit-value
/>
<q-select :disable="!status" class="col-xs-12" dense v-model="evaluate_result" outlined
:options="evaluate_result_option" option-label="name" option-value="value"
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ" map-options emit-value />
</div>
</div>
</div>
@ -1278,25 +1200,10 @@ const putformData = () => {
งคบบญชาผมอบหมายงาน
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="commander.name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="commander.name" outlined label="ผู้บังคับบัญชา" disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:readonly="!status"
:enableTimePicker="false"
week-start="0"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:readonly="!status" :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1304,23 +1211,10 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
:disable="!status"
class="full-width datepicker col-3"
:model-value="
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="dateAutherise != null ? date2Thai(dateAutherise) : null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1329,25 +1223,10 @@ const putformData = () => {
</div>
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="mentors[0].name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="mentors[0].name" outlined label="ผู้บังคับบัญชา" disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:readonly="!status"
:enableTimePicker="false"
week-start="0"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:readonly="!status" :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1355,23 +1234,10 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
:disable="!status"
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined :disable="!status" dense class="full-width datepicker col-3" :model-value="dateAutherise != null ? date2Thai(dateAutherise) : null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1380,25 +1246,10 @@ const putformData = () => {
</div>
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="mentors[1].name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="mentors[1].name" outlined label="ผู้บังคับบัญชา" disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:readonly="!status"
:enableTimePicker="false"
week-start="0"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:readonly="!status" :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1406,23 +1257,10 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
:disable="!status"
class="full-width datepicker col-3"
:model-value="
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="dateAutherise != null ? date2Thai(dateAutherise) : null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1437,25 +1275,10 @@ const putformData = () => {
<div class="col-12 row">
<div class="col-12 text-top2 row items-center">คณะกรรมการ</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="chairman.name"
outlined
label="คณะกรรมการ"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="chairman.name" outlined label="คณะกรรมการ" disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
:readonly="!status"
week-start="0"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:enableTimePicker="false" :readonly="!status" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1463,23 +1286,10 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
:disable="!status"
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined :disable="!status" dense class="full-width datepicker col-3" :model-value="dateAutherise != null ? date2Thai(dateAutherise) : null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1492,7 +1302,7 @@ const putformData = () => {
<q-toolbar class="text-primary">
<q-space />
<q-btn v-if="routeName == 'probationFormAddevaluascore'" label="บันทึก" color="secondary" @click="savaForm" />
<q-btn v-if="routeName == 'probationFormAddevaluascore'" label="บันทึก" color="secondary" @click="savaForm" />
</q-toolbar>
</div>
</template>
@ -1501,8 +1311,10 @@ const putformData = () => {
.align-center {
display: flex;
align-items: center; /* จัดเนื้อหาให้อยู่กลางแนวตั้ง */
align-items: center;
/* จัดเนื้อหาให้อยู่กลางแนวตั้ง */
}
.text-top2 {
font-weight: 500;
padding-bottom: 8px;

View file

@ -24,6 +24,7 @@ const {
const route = useRoute();
const router = useRouter();
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.id.toString());
const person = ref<any>([]);
const assign = ref<any>([]);
@ -138,10 +139,16 @@ const orientation_percent = ref<number>(0);
const self_learning_percent = ref<number>(0);
const training_seminar_percent = ref<number>(0);
const other_training_percent = ref<number>(0);
const evaluate_result = ref<any>();
const evaluate_result_option = ref<any>([
{ name: "ผ่าน", value: 1 },
{ name: "ไม่ผ่าน", value: 0 },
]);
const develop_result = ref<any>();
const develop_result_option = ref<any>([
{ name: "ไม่ผ่านการทดลองงาน", value: 0 },
{ name: "ผ่านการทดลองงาน", value: 1 },
{ name: "ผ่าน (สูงกว่าร้อยละ 60)", value: 1 },
{ name: "ไม่ผ่าน (ต่ำกว่าร้อยละ 60)", value: 0 },
]);
// footer
const Autherise = ref<any>(null);
@ -329,14 +336,18 @@ const putformData = () => {
sum_score: Number(score1.value) + Number(score2.value),
sum_percent: Number(percent_score1.value) + Number(percent_score2.value),
chairman_dated: dateToISO(dateAutherise.value),
develop_result: develop_result.value,
develop_result: Number(develop_result.value),
evaluate_result: Number(evaluate_result.value),
};
dialogConfirm($q, async () => {
await http
.post(config.API.createformChairman(assignId.value), data)
.then((res: any) => {
console.log(res);
// console.log(res);
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`
);
})
.catch((e: any) => {
messageError($q, e);
@ -350,19 +361,9 @@ const putformData = () => {
<q-item>
<q-item-section>
<q-toolbar>
<div
class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md"
>
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
<div class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md">
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
@click="router.go(-1)" />
การทดลองปฏหนาทราชการของ {{ person.name }}
</div>
</q-toolbar>
@ -419,19 +420,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.1. ความสามารถในการเรยนรงาน</q-item-label
>
1.1. ความสามารถในการเรยนรงาน</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="learn_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="learn_level" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -460,19 +453,11 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.2.
ความสามารถในการปรบใชความรบงานในหนาท</q-item-label
>
ความสามารถในการปรบใชความรบงานในหนาท</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="apply_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="apply_level" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -500,19 +485,11 @@ const putformData = () => {
<q-item-section>
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.3. ความสำเรจของงานทไดบมอบหมาย</q-item-label
>
1.3. ความสำเรจของงานทไดบมอบหมาย</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="success_level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="success_level" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -541,16 +518,10 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
1.4 นๆ
<q-checkbox
:disable="!status"
class="q-ml-sm"
dense
v-model="etc"
@click="
(achievement_other.text = ''),
(achievement_other.level = 0)
"
/></q-item-label>
<q-checkbox :disable="!status" class="q-ml-sm" dense v-model="etc" @click="
(achievement_other.text = ''),
(achievement_other.level = 0)
" /></q-item-label>
</q-item-section>
</q-item>
</q-list>
@ -561,33 +532,16 @@ const putformData = () => {
<q-item dense tag="label" v-ripple>
<q-item-section class="q-ml-md">
<q-item-label>
<q-input
:disable="!status"
v-model="achievement_other.text"
label="กรอกอื่นๆ"
dense
lazy-rules
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input :disable="!status" v-model="achievement_other.text" label="กรอกอื่นๆ" dense lazy-rules
autogrow hide-bottom-space outlined class="bg-white" :rules="[
(val) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="achievement_other.level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="achievement_other.level" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -640,27 +594,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.1 ความประพฤต
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_1" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="conduct_level[i]"
:val="list.id"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="conduct_level[i]" :val="list.id" max="5" size="sm"
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -688,27 +630,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.2 ความมณธรรมจรยธรรม
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_2" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="moral_level[i]"
:val="list.id"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="moral_level[i]" :val="list.id" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -736,27 +666,15 @@ const putformData = () => {
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.3 การรกษาว
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense v-for="(list, i) in list2_3" :key="i">
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>{{ list.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="discipline_level[i]"
:val="list.id"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="discipline_level[i]" :val="list.id" max="5" size="sm"
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -783,53 +701,25 @@ const putformData = () => {
<div class="col-12 text-top0 row items-center q-pl-lg">
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
2.4 นๆ
<q-checkbox
:disable="!status"
class="q-ml-sm"
dense
v-model="etc2"
@click="
(behavio_orther.text = ''), (behavio_orther.level = 0)
"
/>
<q-checkbox :disable="!status" class="q-ml-sm" dense v-model="etc2" @click="
(behavio_orther.text = ''), (behavio_orther.level = 0)
" />
</div>
<q-card
v-if="etc2"
flat
bordered
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
>
<q-card v-if="etc2" flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
<q-list dense>
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>
<q-input
:disable="!status"
v-model="behavio_orther.text"
label="กรอกอื่นๆ"
dense
lazy-rules
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
<q-input :disable="!status" v-model="behavio_orther.text" label="กรอกอื่นๆ" dense lazy-rules
autogrow hide-bottom-space outlined class="bg-white" :rules="[
(val) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
]" />
</q-item-label>
</q-item-section>
<q-item-section side>
<q-rating
:disable="!status"
v-model="behavio_orther.level"
max="5"
size="sm"
color="grey"
:color-selected="ratingColors"
label="ระดับการประเมินพฤติกรรม"
>
<q-rating :disable="!status" v-model="behavio_orther.level" max="5" size="sm" color="grey"
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
<template v-slot:tip-1>
<q-tooltip>ำกวาความคาดหวงมาก</q-tooltip>
</template>
@ -857,8 +747,7 @@ const putformData = () => {
<q-item dense tag="label" v-ripple>
<q-item-section>
<q-item-label>
คะแนนรวมพฤตกรรมการปฎราชการ</q-item-label
>
คะแนนรวมพฤตกรรมการปฎราชการ</q-item-label>
</q-item-section>
<q-item-section side>
<q-field dense>
@ -890,8 +779,7 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
3.1.
ผลสมฤทธของการทดลองปฏหนาทราชการ</q-item-label
>
ผลสมฤทธของการทดลองปฏหนาทราชการ</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label style="color: gray">
@ -924,8 +812,7 @@ const putformData = () => {
<q-item-label>
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
3.2.
พฤตกรรมของผทดลองปฏหนาทราชการ</q-item-label
>
พฤตกรรมของผทดลองปฏหนาทราชการ</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label style="color: gray">
@ -997,23 +884,14 @@ const putformData = () => {
<div class="col">อยละ</div>
</div>
</div>
<q-card
flat
bordered
class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1"
>
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1">
<div class="row q-gutter-md align-center">
<div class="col-8">1. การปฐมนเทศ</div>
<div class="col">
<q-input :disable="!status" dense type="number" v-model="orientation" />
</div>
<div class="col">
<q-input
:disable="!status"
dense
type="number"
v-model="orientation_percent"
/>
<q-input :disable="!status" dense type="number" v-model="orientation_percent" />
</div>
</div>
<q-separator class="q-my-xs" />
@ -1023,12 +901,7 @@ const putformData = () => {
<q-input :disable="!status" dense type="number" v-model="self_learning" />
</div>
<div class="col">
<q-input
:disable="!status"
dense
type="number"
v-model="self_learning_percent"
/>
<q-input :disable="!status" dense type="number" v-model="self_learning_percent" />
</div>
</div>
<q-separator class="q-my-xs" />
@ -1038,12 +911,7 @@ const putformData = () => {
<q-input :disable="!status" dense type="number" v-model="training_seminar" />
</div>
<div class="col">
<q-input
:disable="!status"
dense
type="number"
v-model="training_seminar_percent"
/>
<q-input :disable="!status" dense type="number" v-model="training_seminar_percent" />
</div>
</div>
<q-separator class="q-my-xs" />
@ -1055,12 +923,7 @@ const putformData = () => {
<q-input :disable="!status" dense type="number" v-model="other_training" />
</div>
<div class="col">
<q-input
:disable="!status"
dense
type="number"
v-model="other_training_percent"
/>
<q-input :disable="!status" dense type="number" v-model="other_training_percent" />
</div>
</div>
<!-- <q-list dense>
@ -1177,6 +1040,20 @@ const putformData = () => {
</div>
</div>
<div class="row col-12 q-gutter-lg no-margin">
<div class="col-12 row justify-center">
<div class="col-12 text-top0 items-center">
<!-- <q-avatar class="bg-grey-2 q-mr-sm" size="28px">5</q-avatar> -->
สรปผลการพฒนา
</div>
<div class="col-12">
<q-select :disable="!status" class="col-xs-12" dense v-model="develop_result" outlined
:options="develop_result_option" option-label="name" option-value="value"
label="เลือกสรุปผลการพัฒนา" map-options emit-value />
</div>
</div>
</div>
<div class="row col-12 q-gutter-lg no-margin">
<div class="col-12 row justify-center">
<div class="col-12 text-top0 items-center">
@ -1184,19 +1061,9 @@ const putformData = () => {
สรปผล การประเมนผลทดลองปฎหนาทราชการ
</div>
<div class="col-12">
<q-select
:disable="!status"
class="col-xs-12"
dense
v-model="develop_result"
outlined
:options="develop_result_option"
option-label="name"
option-value="value"
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ"
map-options
emit-value
/>
<q-select :disable="!status" class="col-xs-12" dense v-model="evaluate_result" outlined
:options="evaluate_result_option" option-label="name" option-value="value"
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ" map-options emit-value />
</div>
</div>
</div>
@ -1209,25 +1076,11 @@ const putformData = () => {
งคบบญชาผมอบหมายงาน
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="commander.name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="commander.name" outlined label="ผู้บังคับบัญชา"
disable />
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
:readonly="!status"
>
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
:enableTimePicker="false" week-start="0" :readonly="!status">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1235,25 +1088,12 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
:disable="!status"
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null
? date2Thai(dateAutherise)
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input outlined :disable="!status" dense class="full-width datepicker col-3" :model-value="dateAutherise != null
? date2Thai(dateAutherise)
: null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1262,25 +1102,11 @@ const putformData = () => {
</div>
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="mentors[0].name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="mentors[0].name" outlined label="ผู้บังคับบัญชา"
disable />
<div class="col-xs-12 col-sm-4">
<datepicker
:readonly="!status"
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<datepicker :readonly="!status" menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'"
autoApply borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1288,25 +1114,12 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:disable="!status"
outlined
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null
? date2Thai(dateAutherise)
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
? date2Thai(dateAutherise)
: null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1315,25 +1128,11 @@ const putformData = () => {
</div>
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="mentors[1].name"
outlined
label="ผู้บังคับบัญชา"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="mentors[1].name" outlined label="ผู้บังคับบัญชา"
disable />
<div class="col-xs-12 col-sm-4">
<datepicker
:readonly="!status"
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<datepicker :readonly="!status" menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'"
autoApply borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1341,25 +1140,12 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:disable="!status"
outlined
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null
? date2Thai(dateAutherise)
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
? date2Thai(dateAutherise)
: null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1374,25 +1160,10 @@ const putformData = () => {
<div class="col-12 row">
<div class="col-12 text-top2 row items-center">คณะกรรมการ</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="chairman.name"
outlined
label="คณะกรรมการ"
disable
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="chairman.name" outlined label="คณะกรรมการ" disable />
<div class="col-xs-12 col-sm-4">
<datepicker
:readonly="!status"
menu-class-name="modalfix"
v-model="dateAutherise"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<datepicker :readonly="!status" menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'"
autoApply borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -1400,25 +1171,12 @@ const putformData = () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
:disable="!status"
outlined
dense
class="full-width datepicker col-3"
:model-value="
dateAutherise != null
? date2Thai(dateAutherise)
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<q-input :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
? date2Thai(dateAutherise)
: null
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
<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>
</template>
</q-input>
@ -1431,12 +1189,7 @@ const putformData = () => {
<q-toolbar class="text-primary">
<q-space />
<q-btn
label="บันทึก"
color="secondary"
@click="savaForm"
v-if="status"
/>
<q-btn label="บันทึก" color="secondary" @click="savaForm" v-if="status" />
</q-toolbar>
</div>
</q-card-section>
@ -1448,8 +1201,10 @@ const putformData = () => {
.align-center {
display: flex;
align-items: center; /* จัดเนื้อหาให้อยู่กลางแนวตั้ง */
align-items: center;
/* จัดเนื้อหาให้อยู่กลางแนวตั้ง */
}
.text-top2 {
font-weight: 500;
padding-bottom: 8px;

View file

@ -9,6 +9,7 @@ import config from "@/app.config";
const $q = useQuasar();
const myForm = ref<QForm>();
const mixin = useCounterMixin();
const router = useRouter();
const {
date2Thai,
notifyError,
@ -20,7 +21,8 @@ const {
} = mixin;
const route = useRoute();
const assignId = ref<string>(route.params.form.toString());
const saveData = ref<boolean>(true)
const personalId = ref<string>(route.params.personalId.toString());
const action = ref<string>('add')
const assign = ref<any>([]);
const mentors = ref<any>([]);
const commander = ref<any>([]);
@ -31,7 +33,7 @@ const saveEdit = (id: string) => {
};
const edit = () => {
status.value = true;
console.log(status.value);
// console.log(status.value);
};
const cancel = () => {
status.value = false;
@ -40,6 +42,7 @@ onMounted(() => {
fecthAssign(assignId.value);
fecthResult(assignId.value);
});
const fecthAssign = async (id: string) => {
showLoader();
await http
@ -74,6 +77,7 @@ const reson = ref<string>("");
const chairman_dated = ref<string>("");
const director1_dated = ref<any>("");
const director2_dated = ref<any>("");
const fecthResult = async (id: string) => {
await http
.get(config.API.createformReport(id))
@ -89,7 +93,7 @@ const fecthResult = async (id: string) => {
director1_dated.value = data.director1_dated;
director2_dated.value = data.director2_dated;
status.value = false;
saveData.value = false;
action.value = 'edit';
})
.catch((e) => {
console.log(e);
@ -138,6 +142,9 @@ const postData = async () => {
.post(config.API.createformReport(assignId.value), data)
.then(() => {
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`
);
})
.catch((e: any) => {
console.log(e);
@ -148,17 +155,12 @@ const postData = async () => {
<template>
<div class="row col-12 q-ma-xs">
<div class="toptitle text-dark col-12 row items-center">
<div>แบบรายงานการประเมนฯ</div>
<q-space />
<div class="toptitle text-dark col-12 row items-center">
<div>แบบรายงานการประเมนฯ</div>
<q-space />
<div v-if="action == 'edit'">
<div v-if="status == false">
<q-btn
flat
round
color="primary"
@click="edit()"
icon="mdi-pencil-outline"
>
<q-btn flat round color="primary" @click="edit()" icon="mdi-pencil-outline">
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
@ -166,30 +168,103 @@ const postData = async () => {
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
<q-btn
flat
round
color="public"
@click="saveEdit(assignId)"
icon="mdi-content-save-outline"
>
<q-btn flat round color="public" @click="saveEdit(assignId)" icon="mdi-content-save-outline">
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</div>
</div>
<div class="row col-12">
</div>
<div class="row col-12">
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<datepicker menu-class-name="modalfix" v-model="date_start" :locale="'th'" autoApply borderless
:readonly="!status" :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input 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>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-6">
<datepicker menu-class-name="modalfix" v-model="date_finish" :locale="'th'" autoApply :readonly="!status"
borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input 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>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
<div class="col-12 row q-mt-xs">
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-select :rules="[
(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="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ" />
</div>
</div>
</div>
<div class="col-12 row q-mt-lg">
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-select :rules="[
(val) =>
!!val || 'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
]" hide-bottom-space :options="optionsResult" class="col-xs-12 col-sm-6" :disable="!status" dense borderless
emit-value map-options option-label="label" option-value="value" outlined v-model="result"
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ" />
</div>
</div>
</div>
<div class="col-12 row q-mt-lg">
<div class="col-12">
<q-input hide-bottom-space dense borderless outlined :disable="!status" class="bg-white" type="textarea"
v-model="reson" label="เหตุผล" :rules="[(val) => !!val || 'กรุณาระบุเหตุผล']" />
</div>
</div>
<div class="col-12 q-mt-lg">
<q-separator size="3px" color="grey-2" />
</div>
<div class="row col-12 q-gutter-lg q-mt-sm">
<div class="col-12 row">
<div class="col-12 text-top2 row items-center">
ประธานคณะกรรมการประเมนผลการปฏหนาทราชการ
</div>
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<datepicker
menu-class-name="modalfix"
v-model="date_start"
:locale="'th'"
autoApply
borderless
:readonly ="!status"
:enableTimePicker="false"
week-start="0"
>
<q-select 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">
<datepicker menu-class-name="modalfix" v-model="chairman_dated" :locale="'th'" :readonly="!status" autoApply
borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
@ -197,64 +272,10 @@ const postData = async () => {
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
:disable="!status"
class="full-width datepicker"
:model-value="
date_start != null ? date2Thai(date_start) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<q-input 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>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-12 col-sm-6">
<datepicker
menu-class-name="modalfix"
v-model="date_finish"
:locale="'th'"
autoApply
:readonly="!status"
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
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>
<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>
</template>
</q-input>
@ -265,271 +286,76 @@ const postData = async () => {
</div>
<div class="col-12 row q-mt-xs">
<div class="col-12 text-top2 row items-center">
คณะกรรมการ
<!-- ความเหนของผอำนาจสงบรรจตามมาตรา 52 -->
</div>
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-select
:rules="[
(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="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ"
/>
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id2" outlined :disable="!status"
:options="optionDirector" label="" option-label="name" />
<div class="col-xs-12 col-sm-4">
<datepicker menu-class-name="modalfix" v-model="director1_dated" :locale="'th'" autoApply borderless
:readonly="!status" :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input outlined dense :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>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
<div class="col-12 row q-mt-xs">
<div class="col-12 text-top2 row items-center">
คณะกรรมการ
<!-- อำนาจสงบรรจตามมาตรา 52 -->
</div>
<div class="col-12 row q-col-gutter-md">
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id3" outlined :options="optionDirector"
:disable="!status" label="" option-label="name" />
<div class="col-xs-12 col-sm-4">
<datepicker menu-class-name="modalfix" v-model="director2_dated" :locale="'th'" autoApply :readonly="!status"
borderless :enableTimePicker="false" week-start="0">
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input outlined dense :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>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
</div>
<div class="col-12 row q-mt-lg">
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-select
:rules="[
(val) =>
!!val || 'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
]"
hide-bottom-space
:options="optionsResult"
class="col-xs-12 col-sm-6"
:disable="!status"
dense
borderless
emit-value
map-options
option-label="label"
option-value="value"
outlined
v-model="result"
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ"
/>
</div>
</div>
</div>
<div class="col-12 row q-mt-lg">
<div class="col-12">
<q-input
hide-bottom-space
dense
borderless
outlined
:disable="!status"
class="bg-white"
type="textarea"
v-model="reson"
label="เหตุผล"
:rules="[(val) => !!val || 'กรุณาระบุเหตุผล']"
/>
</div>
</div>
<div class="col-12 q-mt-lg">
<q-separator size="3px" color="grey-2" />
</div>
<div class="row col-12 q-gutter-lg q-mt-sm">
<div class="col-12 row">
<div class="col-12 text-top2 row items-center">
ประธานคณะกรรมการประเมนผลการปฏหนาทราชการ
</div>
<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"
label=""
option-label="name"
disable
/>
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="chairman_dated"
:locale="'th'"
:readonly="!status"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
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>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
<div class="col-12 row q-mt-xs">
<div class="col-12 text-top2 row items-center">
คณะกรรมการ
<!-- ความเหนของผอำนาจสงบรรจตามมาตรา 52 -->
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="director_id2"
outlined
:disable="!status"
:options="optionDirector"
label=""
option-label="name"
/>
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="director1_dated"
:locale="'th'"
autoApply
borderless
:readonly="!status"
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
: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>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
<div class="col-12 row q-mt-xs">
<div class="col-12 text-top2 row items-center">
คณะกรรมการ
<!-- อำนาจสงบรรจตามมาตรา 52 -->
</div>
<div class="col-12 row q-col-gutter-md">
<q-select
class="col-xs-12 col-sm-8"
dense
v-model="director_id3"
outlined
:options="optionDirector"
:disable="!status"
label=""
option-label="name"
/>
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="director2_dated"
:locale="'th'"
autoApply
:readonly="!status"
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
: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>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</div>
</div>
<q-toolbar class="text-primary">
<q-space />
<q-btn
label="บันทึก"
color="secondary"
@click="savaForm"
v-if="!saveData"
/>
</q-toolbar>
<q-toolbar class="text-primary">
<q-space />
<q-btn label="บันทึก" color="secondary" @click="savaForm" v-if="action == 'add'" />
</q-toolbar>
</div>
</template>

View file

@ -54,6 +54,9 @@ const fecthFormdata = async (id: string) => {
Autherise.value = res.data.data.director.name;
list1_1.value = res.data.data.assign_output;
res.data.data.assign_output.forEach((e: any) => {
list1_2.push({ id: "", label: "" })
});
evaluate_expenct_level.value = res.data.data.assign_output.map((e) => ({
id: e.id,
labal: e.output_desc,
@ -76,13 +79,7 @@ const list1_1 = ref<any>([
// { id: "4", label: " 4" },
// { id: "5", label: " 5" },
]);
const list1_2 = [
{ id: "1", label: "ผลผลิตของงานที่เกิดขึ้น 1" },
// { id: "2", label: " 2" },
// { id: "3", label: " 3" },
// { id: "4", label: " 4" },
// { id: "5", label: " 5" },
];
const list1_2 = [{ id: "", label: "" }];
const list2_1 = [
{ id: "1", label: "ให้บริการประชาชนหรือผู้รับบริการด้วยอัธยาศัยดี" },
{ id: "2", label: "มีความรับผิดชอบในการปฏิบัติบัติงาน" },
@ -303,6 +300,7 @@ const putformData = () => {
};
dialogConfirm($q, async () => await saveformdata(data));
};
const saveformdata = async (data: any) => {
await http
.post(config.API.createformevaluate(assignId.value), data)
@ -718,8 +716,7 @@ const saveformdata = async (data: any) => {
งทควรปรบปร (ไมเก 5 บรรท)
</div>
<q-input outlined dense v-model="achievement_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
/>
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5" />
</div>
</div>
@ -899,8 +896,7 @@ const saveformdata = async (data: any) => {
งทควรปรบปร (ไมเก 5 บรรท)
</div>
<q-input outlined dense v-model="behavior_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
/>
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5" />
</div>
</div>
</div>

View file

@ -2,10 +2,7 @@
import { ref, watch, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const tabHead = ref<string>("save1");
const props = defineProps({
@ -24,12 +21,12 @@ const props = defineProps({
return "Default function";
},
},
activeTab: String,
});
watch(tabHead, () => {
props.changeTab(tabHead.value);
});
const nextPage = () => {
props.addData();
};

View file

@ -3,17 +3,15 @@ import { ref, defineAsyncComponent, watch, onMounted, onUpdated } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
const Header = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/Header.vue"
)
const Header = defineAsyncComponent(() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/Header.vue"
)
);
const FormSaveResult = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue"
)
const FormSaveResult = defineAsyncComponent(() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue"
)
);
import http from "@/plugins/http";
@ -28,24 +26,22 @@ const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const evaluate = ref<any>([]);
const tabHead = ref<string>("save1");
const tabs = ref<any>([]);
const tab = ref<string>("save1");
const activeTab = ref<string>("tab2");
const dataArrayNumber = ref<number>();
onMounted(async () => {
await fecthAssign(assignId.value);
tab.value = "save1";
});
const fecthAssign = async (id: string) => {
showLoader();
await http
.get(config.API.formevaluate(id))
.then((res: any) => {
.then(async (res: any) => {
evaluate.value = res.data.data.evaluate;
tabs.value = evaluate.value;
// console.log(tabs.value);
dataArrayNumber.value = 1;
})
.catch((e: any) => {
// console.log(e);
@ -57,8 +53,8 @@ const fecthAssign = async (id: string) => {
};
const changeTab = (tabVal: string) => {
console.log("tabVal===>", tabVal);
tab.value = tabVal;
dataArrayNumber.value = Number(tabVal.charAt(4));
};
const addData = () => {
router.push(
@ -68,28 +64,15 @@ const addData = () => {
</script>
<template>
<Header
:change-tab="changeTab"
:activeTab="activeTab"
:add-data="addData"
:loop="tabs.length"
v-if="tabs.length > 0"
/>
<Header v-if="tabs.length > 0" :change-tab="changeTab" :add-data="addData" :loop="tabs.length" />
<q-page-container>
<q-tab-panels v-model="tab" animated>
<q-tab-panel
v-for="tabName in tabs"
:key="tabName"
:name="'save' + tabName.no"
>
<FormSaveResult :tab="tab" />
</q-tab-panel>
</q-tab-panels>
<q-page-container v-if="tabs.length > 0">
<FormSaveResult :tab="tab" :data="evaluate.find((x: any) => x.no === dataArrayNumber)" action="edit" />
</q-page-container>
<div class="q-gutter-md" v-if="tabs.length === 0">
<div class="q-gutter-md" v-else-if="tabs.length == 0">
<div class="flex justify-center items-center q-my-md q-gutter-md">
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
<q-btn outline color="primary" label="สร้างแบบบันทึกผล" @click="addData" />
</div>
</div>
</template>

View file

@ -5,18 +5,9 @@ import config from "@/app.config";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
const Header = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/Header.vue"
)
);
const FormEvaluate = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue"
)
);
const Header = defineAsyncComponent(() => import("@/modules/05_placement/components/probation/FormEvaluation/Header.vue"));
const FormEvaluate = defineAsyncComponent(() => import("@/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue"));
const router = useRouter();
const route = useRoute();
@ -28,10 +19,12 @@ const personalId = ref<string>(route.params.personalId.toString());
const tab = ref<string>("save1");
const tabs = ref<any>([]);
const activeTab = ref<string>("tab2");
const dataArrayNumber = ref<number>(1);
const evaluate = ref<any>([]);
const changeTab = (tabVal: string) => {
tab.value = tabVal;
dataArrayNumber.value = Number(tabVal.charAt(4));
};
onMounted(() => {
@ -43,9 +36,9 @@ const fecthAssign = async (id: string) => {
await http
.get(config.API.createformCommader(id))
.then((res: any) => {
if (res.data.data.evaluate_no > 0) {
tabs.value = res.data.data.evaluate;
}
evaluate.value = res.data.data.evaluate;
tabs.value = evaluate.value;
dataArrayNumber.value = 1;
})
.catch((e: any) => {
// console.log(e);
@ -63,38 +56,13 @@ const addData = () => {
</script>
<template>
<Header
:change-tab="changeTab"
:activeTab="activeTab"
:loop="tabs.length"
:add-data="addData"
v-if="tabs.length > 0"
/>
<Header v-if="tabs.length > 0" :change-tab="changeTab" :loop="tabs.length" :add-data="addData" />
<!-- <q-page-container>
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="save1">
<FormEvaluate :tab="tab" />
</q-tab-panel>
<q-tab-panel name="save2">
<FormEvaluate :tab="tab"/>
</q-tab-panel>
</q-tab-panels>
</q-page-container> -->
<q-page-container>
<q-tab-panels v-model="tab" animated>
<q-tab-panel
v-for="tabName in tabs"
:key="tabName"
:name="'save' + tabName.no"
>
<FormEvaluate :tab="tab" />
</q-tab-panel>
</q-tab-panels>
<q-page-container v-if="tabs.length > 0">
<FormEvaluate :tab="tab" :data="evaluate.find((x: any) => x.no === dataArrayNumber)" action="edit" />
</q-page-container>
<div class="q-gutter-md" v-if="tabs.length === 0">
<div v-else class="q-gutter-md">
<div class="flex justify-center items-center q-my-md q-gutter-md">
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
</div>

View file

@ -5,18 +5,9 @@ import config from "@/app.config";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
const Header = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/Header.vue"
)
);
const FormEvaluateScore = defineAsyncComponent(
() =>
import(
"@/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue"
)
);
const Header = defineAsyncComponent(() => import("@/modules/05_placement/components/probation/FormEvaluation/Header.vue"));
const FormEvaluateScore = defineAsyncComponent(() => import("@/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue"));
const router = useRouter();
const route = useRoute();
@ -28,7 +19,8 @@ const personalId = ref<string>(route.params.personalId.toString());
const tab = ref<string>("save1");
const tabs = ref<any>([]);
const activeTab = ref<string>("tab2");
const dataArrayNumber = ref<number>(1);
const evaluate = ref<any>([]);
onMounted(() => {
fecthAssign(assignId.value);
@ -39,9 +31,9 @@ const fecthAssign = async (id: string) => {
await http
.get(config.API.createformChairman(id))
.then((res: any) => {
if (res.data.data.evaluate_no > 0) {
tabs.value = res.data.data.evaluate;
}
evaluate.value = res.data.data.evaluate;
tabs.value = evaluate.value;
dataArrayNumber.value = 1;
})
.catch((e) => {
messageError($q, e);
@ -55,42 +47,20 @@ const addData = () => {
`/probation/detail/addevaluascore/${personalId.value}/${assignId.value}`
);
};
const changeTab = (tabVal: string) => {
tab.value = tabVal;
dataArrayNumber.value = Number(tabVal.charAt(4));
};
</script>
<template>
<Header
:change-tab="changeTab"
:activeTab="activeTab"
:loop="tabs.length"
:add-data="addData"
v-if="tabs.length > 0"
/>
<Header v-if="tabs.length > 0" :change-tab="changeTab" :loop="tabs.length" :add-data="addData" />
<!-- <q-page-container>
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="save1">
<FormEvaluateScore :tab="tab" />
</q-tab-panel>
<q-tab-panel name="save2">
<FormEvaluateScore :tab="tab" />
</q-tab-panel>
</q-tab-panels>
</q-page-container> -->
<q-page-container>
<q-tab-panels v-model="tab" animated>
<q-tab-panel
v-for="tabName in tabs"
:key="tabName"
:name="'save' + tabName.no"
>
<FormEvaluateScore :tab="tab" />
</q-tab-panel>
</q-tab-panels>
<q-page-container v-if="tabs.length > 0">
<FormEvaluateScore :tab="tab" :data="evaluate.find((x: any) => x.no === dataArrayNumber)" action="edit" />
</q-page-container>
<div class="q-gutter-md" v-if="tabs.length === 0">
<div class="flex justify-center items-center q-my-md q-gutter-md">
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { ref, defineAsyncComponent } from "vue";
const ProbationFormAssign = defineAsyncComponent(
@ -18,9 +18,16 @@ const TabsTemplate3 = defineAsyncComponent(
() => import("@/modules/05_placement/components/probation/FormEvaluation/Template3.vue")
);
const SummaryScore = defineAsyncComponent(
() => import("@/modules/05_placement/components/probation/SummaryScore.vue")
);
const router = useRouter();
const route = useRoute();
const drawer = ref<boolean>(true);
const activeTab = ref<string>("tab1");
const personalId = ref<string>(route.params.personalId.toString());
</script>
<template>
@ -31,8 +38,8 @@ const activeTab = ref<string>("tab1");
<q-toolbar>
<div class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md">
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
@click="router.go(-1)" />
การทดลองปฏหนาทราชการของ นายสมค ยอดใจ
@click="router.push(`/probation/detail/${personalId}`)" />
การทดลองปฏหนาทราชการ
</div>
</q-toolbar>
<q-separator />
@ -92,7 +99,8 @@ const activeTab = ref<string>("tab1");
แบบรายงาน<br />การประเมนฯ
</q-item-section>
</q-item>
<q-item>
<q-item active-class="text-primary bg-teal-1 text-weight-medium" clickable class="q-py-sm" dense v-ripple
:active="activeTab == 'tab6'" @click="activeTab = 'tab6'">
<q-item-section>
ผลการประเมนการทดลองปฏหนาทราชการ
</q-item-section>
@ -123,6 +131,11 @@ const activeTab = ref<string>("tab1");
<q-tab-panel name="tab5">
<TabsTemplate3 />
</q-tab-panel>
<q-tab-panel name="tab6">
<SummaryScore />
</q-tab-panel>
</q-tab-panels>
</q-layout>
</q-page-container>

View file

@ -0,0 +1,83 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { QForm, useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useRoute, useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
const $q = useQuasar();
const myForm = ref<QForm>();
const mixin = useCounterMixin();
const router = useRouter();
const {
date2Thai,
notifyError,
messageError,
success,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const route = useRoute();
onMounted(() => {
// fecthResult(assignId.value);
});
// const fecthResult = async (id: string) => {
// await http
// .get(config.API.createformReport(id))
// .then((res: any) => {
// let data = res.data.data.evaluate;
// console.log(data);
// date_start.value = data.date_start;
// date_finish.value = data.date_finish;
// develop.value = Number(data.develop_complete);
// result.value = Number(data.pass_result);
// reson.value = data.reson;
// chairman_dated.value = data.chairman_dated;
// director1_dated.value = data.director1_dated;
// director2_dated.value = data.director2_dated;
// status.value = false;
// action.value = 'edit';
// })
// .catch((e) => {
// console.log(e);
// });
// };
</script>
<template>
<div class="row col-12 q-ma-xs">
<div class="toptitle text-dark col-12 row items-center">
<div> ผลการประเมนการทดลองปฏหนาทราชการ </div>
<q-space />
</div>
<div class="row col-12">
</div>
</div>
</template>
<style lang="scss" scoped>
.text-top2 {
font-weight: 500;
padding-bottom: 8px;
color: rgb(70, 68, 68);
}
.text-top0 {
font-weight: 600;
padding-bottom: 8px;
color: rgb(70, 68, 68);
}
.q-rating__icon {
text-shadow: transparent !important;
}
.q-card {
box-shadow: 0px 0px 0px 0px !important;
}
</style>

View file

@ -1,47 +0,0 @@
<template>
<input
:class="
edit == true
? 'full-width inputgreen cursor-pointer'
: 'full-width cursor-pointer'
"
:outlined="edit"
dense
ref="inputRef"
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="test"
:label="`${'เงินเดือน'}`"
hide-bottom-space
type="text"
@update:modelValue="updateCoords(test)"
/>
{{ salary }}
</template>
<script>
import { useCurrencyInput } from "vue-currency-input";
export default {
name: "CurrencyInput",
props: {
salary: String,
edit: Boolean,
modelValue: Number,
options: Object,
},
emits: ["update:salary"],
setup(props) {
const { inputRef } = useCurrencyInput(props.options);
const test = "";
return { inputRef };
},
methods: {
updateCoords(title) {
console.log("asd");
this.$emit("update:salary", title); // previously was `this.$emit('input', title)`
},
},
// watch(){}
};
</script>

View file

@ -183,7 +183,7 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -195,6 +195,14 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
@ -285,6 +293,7 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";

View file

@ -187,7 +187,7 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -199,6 +199,15 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
@ -290,6 +299,7 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";

View file

@ -0,0 +1,562 @@
<script setup lang="ts">
import { ref, onMounted, computed } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useRetirementDataStore } from "@/modules/06_retirement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
const $q = useQuasar(); // noti quasar
const router = useRouter();
const mixin = useCounterMixin();
const RetirementData = useRetirementDataStore();
const { messageError, date2Thai, showLoader, hideLoader, success } = mixin;
const { statusText } = RetirementData;
const rows = ref<ResponseItems[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "prefix",
align: "left",
label: "คำนำหน้า",
sortable: true,
field: "prefix",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionTypeOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "positionTypeOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevelOld",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevelOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "statustext",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns = ref<string[]>([
"no",
"prefix",
"fullname",
"positionTypeOld",
"positionLevelOld",
"positionNumberOld",
"organizationPositionOld",
"statustext",
]);
const filters = ref<ResponseItems[]>([]);
const rows2 = ref<ResponseItems[]>([]);
const columns2 = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "prefix",
align: "left",
label: "คำนำหน้า",
sortable: true,
field: "prefix",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionTypeOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "positionTypeOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevelOld",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevelOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "statustext",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns2 = ref<string[]>([
"no",
"prefix",
"fullname",
"positionTypeOld",
"positionLevelOld",
"positionNumberOld",
"organizationPositionOld",
"statustext",
]);
const modal = ref<boolean>(false);
const filterKeyword2 = ref<string>("");
//
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const openModal = () => (modal.value = true);
const closeModal = () => (modal.value = false);
const selected = ref<ResponseItems[]>([]);
const checkSelected = computed(() => {
if (selected.value.length === 0) {
return true;
}
});
const resetFilter = () => {
filterKeyword.value = "";
filterRef.value.focus();
};
const openModalOrder = () => {
openModal();
const row = filters.value.filter(
(r: ResponseItems) =>
r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE"
);
rows2.value = row;
};
onMounted(async () => {
await fecthlist();
});
const fecthlist = async () => {
showLoader();
await http
.get(config.API.listExitInterview())
.then((res: any) => {
const data = res.data.result;
let list: ResponseItems[] = [];
data.map((r: ResponseItems) => {
list.push({
activeDate: new Date(),
createdAt: new Date(),
firstName: r.firstName ?? "",
id: r.id ?? "",
isActive: r.isActive ? r.isActive : false,
lastName: r.lastName ?? "",
location: r.location ?? "",
organizationPositionOld: r.organizationPositionOld ?? "",
positionLevelOld: r.positionLevelOld ?? "",
positionNumberOld: r.positionNumberOld ?? "",
positionTypeOld: r.positionTypeOld ?? "",
prefix: r.prefix ?? "",
profileId: r.profileId ?? "",
reason: r.reason ?? "",
salary: r.salary ? r.salary : 0,
sendDate: new Date(),
status: r.status ?? "",
statustext: statusText(r.status ?? ""),
fullname: `${r.firstName ?? ""} ${r.lastName ?? ""}`,
});
});
rows.value = list;
filters.value = list;
})
.catch((e: any) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
const saveOrder = async () => {
const id = selected.value.map((r) => r.id);
const body = {
id,
};
showLoader();
await http
.post(config.API.ExitInterviewReport, body)
.then((res: any) => {
// const data = res.data.result;
// console.log(data);
success($q, "ส่งไปออกคำสั่งลาออกสำเร็จ");
closeModal();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await fecthlist();
hideLoader();
});
};
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
รายการ Exit interview
</div>
<q-card flat bordered class="col-12 q-mt-sm">
<q-separator />
<div class="col-12 row q-pa-md">
<div class="row col-12">
<div class="row col-12 q-col-gutter-sm">
<!-- <q-btn
@click="openModalOrder"
size="14px"
flat
round
color="add"
icon="mdi-account-arrow-right"
>
<q-tooltip>งไปออกคำสงลาออก</q-tooltip>
</q-btn> -->
<q-space />
<q-input
class="col-xs-12 col-sm-3 col-md-2"
standout
dense
v-model="filterKeyword"
ref="filterRef"
outlined
debounce="300"
placeholder="ค้นหา"
>
<template v-slot:append>
<q-icon v-if="filterKeyword == ''" name="search" />
<q-icon
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
options-cover
style="min-width: 150px"
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-12 q-pt-sm">
<d-table
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
class="cursor-pointer"
@click="router.push(`/retirement/resign/${props.row.id}`)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="prefix" :props="props">
{{ props.row.prefix }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionTypeOld" :props="props">
{{ props.row.positionTypeOld }}
</q-td>
<q-td key="positionLevelOld" :props="props">
{{ props.row.positionLevelOld }}
</q-td>
<q-td key="positionNumberOld" :props="props">
{{ props.row.positionNumberOld }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
</div>
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</div>
</q-card>
<!-- <q-dialog v-model="modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งโอนออก" :close="closeModal" />
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-end">
<div class="col-5">
<q-toolbar style="padding: 0">
<q-input
borderless
outlined
dense
debounce="300"
v-model="filterKeyword2"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</q-toolbar>
</div>
</div>
<d-table
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="id"
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="prefix" :props="props">
{{ props.row.prefix }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionTypeOld" :props="props">
{{ props.row.positionTypeOld }}
</q-td>
<q-td key="positionLevelOld" :props="props">
{{ props.row.positionLevelOld }}
</q-td>
<q-td key="positionNumberOld" :props="props">
{{ props.row.positionNumberOld }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
</div>
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>
</d-table>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn
label="ส่งไปออกคำสั่ง"
@click="saveOrder"
:disable="checkSelected"
color="public"
/>
</q-card-actions>
</q-card>
</q-dialog> -->
</template>
<style scoped lang="scss"></style>

View file

@ -0,0 +1,492 @@
<template>
<div class="toptitle text-dark col-12 row items-center">
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
รายละเอยด Exit interview ของ {{ responseData.fullname }}
</div>
<q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-subtitle2">
{{ responseData.fullname }}
</div>
<q-space />
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-3 col-sm-2 col-md-1 row">
<q-img
:src="responseData.avataPath"
v-if="responseData.avataPath !== ''"
/>
<q-img src="@/assets/avatar_user.jpg" v-else />
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12 q-pl-md">
<div class="col-12 text-top">ตำแหนงในสายงาน</div>
<div class="col-12 text-detail">
{{ responseData.positionTypeOld }}
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">ระด</div>
<div class="col-12 text-detail">
{{ responseData.positionLevelOld }}
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">งก</div>
<div class="col-12 text-detail">
{{ responseData.organizationPositionOld }}
</div>
</div>
</div>
</div>
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">
อมลการตอบแบบสอบถาม
</div>
<q-space />
<!-- <div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
</div> -->
</div>
<div class="col-12"><q-separator /></div>
<q-form ref="myForm">
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold text-grey">
แสดงขอมลแบบสอบถามเปนคำถามเเละคำตอบ
</div>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="salary"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-6 col-sm-6 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="organization"
:rules="[(val) => !!val || `${'กรุณากรอกการให้ออกสังกัด'}`]"
hide-bottom-space
:label="`${'การให้ออกสังกัด'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-6 row items-center">
<div class="col-12">
<datepicker
menu-class-name="modalfix"
:readonly="!edit"
v-model="date"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ตั้งแต่วัน'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="reason"
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
hide-bottom-space
:label="`${'หมายเหตุ '}`"
type="textarea"
/>
</div>
</div>
</div>
</q-form>
</q-card>
</template>
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";
import type { QTableProps, QForm } from "quasar";
import type {
TypeFile,
ResponseDataDetail,
} from "@/modules/06_retirement/interface/response/expulsion";
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const mixin = useCounterMixin();
const dataId = route.params.id.toString();
const {
date2Thai,
dialogMessage,
messageError,
showLoader,
hideLoader,
success,
} = mixin;
const myForm = ref<QForm | null>(null);
const roleAdmin = ref<boolean>(false);
const edit = ref<boolean>(false);
const organizationPositionOld = ref<string>("");
const positionTypeOld = ref<string>("");
const positionLevelOld = ref<string>("");
const posNo = ref<string>("");
const salary = ref<number>(0);
const organization = ref<string>("");
const date = ref<Date | null>(null);
const reason = ref<string>("");
const responseData = ref<ResponseDataDetail>({
personId: "",
avataPath: "",
createdAt: new Date(),
date: new Date(),
id: "",
organization: "",
organizationPositionOld: "",
positionLevelOld: "",
positionNumberOld: "",
positionTypeOld: "",
reason: "",
salary: 0,
status: "",
fullname: "",
});
const rows = ref<TypeFile[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fileName",
align: "left",
label: "ชื่อไฟล์",
sortable: true,
field: "fileName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "btnMicrosoft",
align: "right",
label: "ปุ่ม",
sortable: true,
field: "btnMicrosoft",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
onMounted(async () => {
if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
console.log("roleAdmin===>", roleAdmin.value);
}
await getData();
});
const getData = async () => {
showLoader();
await http
.get(config.API.ExitInterviewByid(dataId))
.then((res: any) => {
const data = res.data.result;
responseData.value.personId = data.profileId;
responseData.value.createdAt = data.createdAt;
responseData.value.date =
data.date !== null ? new Date(data.date) : new Date();
responseData.value.id = data.id ?? "";
responseData.value.organization = data.organization ?? "";
responseData.value.organizationPositionOld =
data.organizationPositionOld ?? "";
responseData.value.positionLevelOld = data.positionLevelOld ?? "";
responseData.value.positionNumberOld = data.positionNumberOld ?? "";
responseData.value.positionTypeOld = data.positionTypeOld ?? "";
responseData.value.reason = data.reason ?? "";
responseData.value.salary = data.salary !== null ? data.salary : 0;
responseData.value.status = data.status ?? "";
responseData.value.avataPath = data.avataPath ?? "";
responseData.value.fullname = `${data.firstName ?? "-"} ${
data.lastName ?? "-"
}`;
organizationPositionOld.value = data.organizationPositionOld ?? "";
positionTypeOld.value = data.positionTypeOld ?? "";
positionLevelOld.value = data.positionLevelOld ?? "";
posNo.value = data.posNo ?? "";
salary.value = data.salary ?? "";
organization.value = data.organization ?? "";
date.value = data.date !== null ? new Date(data.date) : null;
reason.value = data.reason ?? "";
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
const conditionSave = async () => {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogMessage(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await saveData(),
undefined
);
}
});
}
};
const saveData = async () => {
const body = {
organization: organization.value,
reason: reason.value,
organizationPositionOld: organizationPositionOld.value,
date: date.value,
positionTypeOld: positionTypeOld.value,
positionLevelOld: positionLevelOld.value,
positionNumberOld: posNo.value,
amountOld: salary.value,
};
showLoader();
await http
.put(config.API.ExitInterviewByid(dataId), body)
.then((res: any) => {
// const data = res.data.result;
// console.log(data);
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
edit.value = false;
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await getData();
hideLoader();
});
};
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
"full-width cursor-pointer": !val,
};
};
</script>
<style lang="scss" scope>
.q-img {
border-radius: 5px;
height: 70px;
}
.text-top {
color: gray;
font-weight: 400;
padding-bottom: 3px;
}
.text-detail {
font-weight: 500;
}
</style>

View file

@ -204,7 +204,10 @@
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{ currency: 'THB' }"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
@ -294,7 +297,7 @@ import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/modules/06_retirement/components/CurrencyInput.vue";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";

View file

@ -20,9 +20,10 @@ const retireld_params = route.params.retirementId;
const modalNote = ref<boolean>(false);
const note = ref<string>("");
const retireProfileId = ref<string>("");
const retireld = ref<string>();
const retireld = ref<string>(retireld_params.toString());
const profileId = ref<string>("");
const filter = ref<string>("");
const statusUpload = ref<boolean>();
const columns = ref<any["columns"]>([
{
@ -131,20 +132,7 @@ const columns = ref<any["columns"]>([
style: "font-size: 14px",
},
]);
const rows = ref<any>([
// {
// fixname: "",
// name: " ",
// brand: "",
// positionType: "",
// positionManager: "",
// positionLavel: "",
// positionNumber: ".2",
// govGroup: "",
// govOffice: "",
// bureau: "",
// },
]);
const rows = ref<any>([]);
const visibleColumns = ref<string[]>([
"order",
"fixname",
@ -160,11 +148,14 @@ const visibleColumns = ref<string[]>([
]);
const action = ref<string>("");
const fileUpload = ref<any>(null);
const fileInputRef = ref<any>(null);
onMounted(() => {
retireld.value = retireld_params.toString();
console.log(retireld_params);
fecthlistprofile(retireld.value);
fecthCheck(retireld.value);
});
const round = ref<number>();
const typeReport = ref<string>("");
@ -205,6 +196,17 @@ const fecthlistprofile = async (id: string) => {
hideLoader();
});
};
const fecthCheck = async (id: string) => {
await http
.get(config.API.checkfileupload(id))
.then((res) => {
console.log(res);
statusUpload.value = res.data.result;
})
.catch((err) => {
console.log(err);
});
};
// DelProfile
const clickDelete = () => {
$q.dialog({
@ -297,38 +299,33 @@ const visibleNote = computed(() => {
return true;
}
});
// const saveList = () => {
// $q.dialog({
// title: "",
// message: "?",
// cancel: {
// flat: true,
// color: "negative",
// },
// persistent: true,
// })
// .onOk(async () => {
// const retireld = "1233444";
// await http
// .post(config.API.listRetire("123"), { retireld: retireld })
// .then(() => {
// success($q, "");
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// fecthlist();
// });
// })
// .onCancel(() => {})
// .onDismiss(() => {});
// };
const classrow = (prop: any) => {
if (profileId.value !== "" && prop.profileId === profileId.value) {
return "color: #26a69a;";
} else return "";
const uploadFile = async (event: any) => {
showLoader();
const selectedFile = event;
console.log(selectedFile);
const formdata = new FormData();
formdata.append("file", selectedFile);
await http
.put(config.API.fileRetirement(retireld.value.toString()), formdata)
.then((res) => {
success($q, "เพิ่มไฟล์สำเร็จ");
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
fileUpload.value = null;
fecthlistprofile(retireld.value);
fecthCheck(retireld.value);
hideLoader();
});
};
// const classrow = (prop: any) => {
// if (profileId.value !== "" && prop.profileId === profileId.value) {
// return "color: #26a69a;";
// } else return "";
// };
const paging = ref<boolean>(true);
const pagination = ref({
sortBy: "order",
@ -359,80 +356,103 @@ const paginationLabel = (start: number, end: number, total: number) => {
<div>
<q-card class="col-12 q-pa-md">
<div class="row col-12 q-pb-sm">
<AddList
:dataProfile="dataProfile"
:retireld="retireld"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
statusReport === false &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null)
"
/>
<div class="row">
<AddList
:dataProfile="dataProfile"
:retireld="retireld"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
statusReport === false &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
statusUpload !== true
"
/>
<!-- <q-btn flat round style="color: #016987;" icon="save" @click="saveList">
<!-- <q-btn flat round style="color: #016987;" icon="save" @click="saveList">
<q-tooltip>นทกขอม</q-tooltip>
</q-btn> -->
<q-btn color="primary" flat round icon="download">
<q-menu>
<q-list style="min-width: 100px">
<q-item clickable>
<q-item-section avatar>
<q-icon color="red" name="mdi-file-pdf" />
</q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable>
<q-item-section avatar>
<q-icon color="green" name="mdi-file-excel" />
</q-item-section>
<q-item-section>ไฟล .xls</q-item-section>
</q-item>
</q-list>
</q-menu>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
</q-btn>
<q-btn flat round color="light-blue" icon="upload">
<q-tooltip>พโหลดไฟล</q-tooltip>
</q-btn>
<q-space />
<q-tabs shrink>
<q-input
borderless
<q-btn color="primary" flat round icon="download">
<q-menu>
<q-list style="min-width: 100px">
<q-item clickable>
<q-item-section avatar>
<q-icon color="red" name="mdi-file-pdf" />
</q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable>
<q-item-section avatar>
<q-icon color="green" name="mdi-file-excel" />
</q-item-section>
<q-item-section>ไฟล .xls</q-item-section>
</q-item>
</q-list>
</q-menu>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
</q-btn>
<q-file
bg-color="white"
outlined
dense
debounce="300"
v-model="filter"
placeholder="ค้นหา"
style="max-width: 200px"
class="q-ml-sm"
v-model="fileUpload"
accept=".pdf"
:style="fileUpload === null ? 'width: 100px' : 'width: auto'"
v-if="statusUpload !== true"
>
<template v-slot:append>
<q-icon name="search" />
<template v-slot:prepend>
<q-icon color="light-blue" name="attach_file" />
<q-tooltip>พโหลดไฟล</q-tooltip>
</template>
</q-input>
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
>
<!-- <template v-slot:option="{ opt }">
<div>{{ opt.label }}</div>
<div class="sublabel">{{ opt.sublabel }}</div>
</template> -->
</q-select>
</q-tabs>
</q-file>
<q-btn
flat
round
color="light-blue"
icon="upload"
@click="uploadFile(fileUpload)"
v-if="fileUpload !== null"
/>
</div>
<q-space />
<div class="row">
<q-tabs shrink>
<q-input
borderless
outlined
dense
debounce="300"
v-model="filter"
placeholder="ค้นหา"
style="max-width: 200px"
class="q-ml-sm"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
>
<!-- <template v-slot:option="{ opt }">
<div>{{ opt.label }}</div>
<div class="sublabel">{{ opt.sublabel }}</div>
</template> -->
</q-select>
</q-tabs>
</div>
</div>
<div>
@ -467,7 +487,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
(typeReport === 'EDIT' ||
typeReport === null ||
typeReport === '') &&
statusReport === false
statusReport === false &&
statusUpload !== true
"
/>
<q-th
@ -476,7 +497,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
(typeReport === 'REMOVE' ||
typeReport === null ||
typeReport === '') &&
statusReport === false
statusReport === false &&
statusUpload !== true
"
/>
</q-tr>
@ -553,7 +575,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
(typeReport === 'EDIT' ||
typeReport === null ||
typeReport === '') &&
statusReport === false
statusReport === false &&
statusUpload !== true
"
>
<q-btn
@ -578,7 +601,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
(typeReport === 'REMOVE' ||
typeReport === null ||
typeReport === '') &&
statusReport === false
statusReport === false &&
statusUpload !== true
"
>
<q-btn

View file

@ -99,13 +99,13 @@
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">สถานทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{ dataDetail.location }}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">
@ -113,18 +113,33 @@
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">เหตผลทลาออกจากราชการ</div>
<div class="col-12 text-detail">{{ dataDetail.reason }}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทขอลาออกจากราชการ</div>
<div class="col-12 text-detail">
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ date2Thai(dataDetail.activeDate) }}
</div>
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }}
</div>
</div>
</div>
</div>
@ -242,7 +257,7 @@
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<q-input
<!-- <q-input
:class="getClass(edit)"
:outlined="edit"
dense
@ -254,6 +269,15 @@
hide-bottom-space
:label="`${'เงินเดือน'}`"
type="number"
/> -->
<CurrencyInput
v-model="salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:label="`${'เงินเดือน'}`"
/>
</div>
</div>
@ -454,16 +478,44 @@
</q-form>
</q-card>
</q-dialog> -->
<q-dialog v-model="modal" persistent>
<q-card style="width: 800px">
<q-form ref="myFormConfirm">
<DialogHeader
:title="`${actionPass ? 'การอนุมัติการลาออก' : 'การยับยั้งการลาออก'}`"
:close="closeModal"
/>
<q-separator />
<q-card-section class="q-p-sm">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
hide-bottom-space
dense
outlined
lazy-rules
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
v-model="reasonReign"
:label="`${'กรอกเหตุผล'}`"
type="textarea"
/>
</div>
</q-card-section>
<q-separator />
<DialogFooter :editvisible="true" :save="conditionPopup" />
</q-form>
</q-card>
</q-dialog>
</template>
<script setup lang="ts">
import { useRouter, useRoute } from "vue-router";
import { useQuasar, QForm } from "quasar";
import { ref, onMounted } from "vue";
// import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
// import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import { useRetirementDataStore } from "@/modules/06_retirement/store";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
@ -487,6 +539,7 @@ const { statusText } = RetirementData;
const id = ref<string>(route.params.id.toString());
const myForm = ref<QForm | null>(null);
const myFormConfirm = ref<QForm | null>(null);
const edit = ref<boolean>(false);
const dataDetail = ref<ResponseItems>({
datetext: "",
@ -522,12 +575,33 @@ const reason = ref<string>("");
const location = ref<string>("");
const status = ref<string>("");
const modal = ref<boolean>(false);
const actionPass = ref<boolean>(false);
const reasonReign = ref<string>("");
const closeModal = () => (modal.value = false);
const openModal = () => (modal.value = true);
// const modalPass = ref<boolean>(false);
// const modalPassNot = ref<boolean>(false);
onMounted(() => {
fetchData(id.value);
});
const diffDate = () => {
if (date.value !== null && dateLeave.value !== null) {
const time = dateLeave.value.getTime() - date.value.getTime();
// -
const day = time / (1000 * 3600 * 24);
if (day < 30) {
return true;
}
return false;
}
return false;
};
const fetchData = async (id: string) => {
showLoader();
await http
@ -558,39 +632,60 @@ const fetchData = async (id: string) => {
};
const popUp = (action: "pass" | "passNot") => {
if (action === "pass") {
$q.dialog({
title: "ยืนยันการอนุมัติการลาออก",
message: "ต้องการยืนยันอนุมัติการลาออกนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
}).onOk(async () => {
confirmpopUp();
});
} else if (action === "passNot") {
$q.dialog({
title: "ยืนยันการยับยั้งการลาออก",
message: "ต้องการยืนยันการยับยั้งการลาออกนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
}).onOk(async () => {
rejectpopUp();
reasonReign.value = "";
actionPass.value = action === "pass";
openModal();
// if (action === "pass") {
// $q.dialog({
// title: "",
// message: "?",
// cancel: {
// flat: true,
// color: "negative",
// },
// persistent: true,
// }).onOk(async () => {
// confirmpopUp();
// });
// } else if (action === "passNot") {
// $q.dialog({
// title: "",
// message: "?",
// cancel: {
// flat: true,
// color: "negative",
// },
// persistent: true,
// }).onOk(async () => {
// rejectpopUp();
// });
// }
};
const conditionPopup = () => {
if (myFormConfirm.value !== null) {
myFormConfirm.value.validate().then(async (check) => {
if (check) {
if (actionPass.value) {
await confirmpopUp();
} else {
await rejectpopUp();
}
}
});
}
};
const confirmpopUp = async () => {
const body = {
reason: reasonReign.value,
};
await http
.get(config.API.resignConfirm(id.value))
.put(config.API.resignConfirm(id.value), body)
.then(() => {
console.log("ยืนยัน");
success($q, "บันทึกสำเร็จ");
success($q, "การอนุมัติสำเร็จ");
closeModal();
})
.catch((e) => {
console.log(e);
@ -602,11 +697,14 @@ const confirmpopUp = async () => {
};
const rejectpopUp = async () => {
console.log("ยกเลิก");
const body = {
reason: reasonReign.value,
};
await http
.get(config.API.resignReject(id.value))
.put(config.API.resignReject(id.value), body)
.then(() => {
success($q, "บันทึกสำเร็จ");
success($q, "การยับยั้งสำเร็จ");
closeModal();
})
.catch((e) => {
messageError($q, e);

View file

@ -31,6 +31,9 @@ const expulsionMain = () =>
const expulsionDetails = () =>
import("@/modules/06_retirement/components/Expulsion/expulsionRegistry.vue");
const ExitInterviewMain = () =>
import("@/modules/06_retirement/components/ExitInterview/exitMain.vue");
export default [
{
path: "/retirement",
@ -42,6 +45,16 @@ export default [
Role: "retirement",
},
},
{
path: "/exit-Interview",
name: "exit-Interview",
component: ExitInterviewMain,
meta: {
Auth: true,
Key: [7.3],
Role: "retirement",
},
},
{
path: "/retirement/:retirementId",
name: "retirementid",

View file

@ -50,6 +50,7 @@
round
color="add"
icon="mdi-plus"
:disable="checkjson == true"
>
<q-tooltip>เพ</q-tooltip>
</q-btn>
@ -275,7 +276,7 @@
</template>
<script setup lang="ts">
import { onMounted, ref, useAttrs, reactive, watch } from "vue";
import { onMounted, ref, useAttrs, reactive, watch, computed } from "vue";
import type { QTableProps } from "quasar";
import type {
FormMainProbation,
@ -355,9 +356,9 @@ const tab = ref<any>("officer");
const visibleColumns2 = ref<string[]>(["no", "name", "retireNumber"]);
const yearOptions = reactive<any[]>([]);
const filteryear = () => {
console.log(yearOptions);
// console.log(yearOptions);
yearOptions.push({ id: currentYear, name: currentYear + 543 });
console.log(yearOptions[0].id);
// console.log(yearOptions[0].id);
fiscalyear.value = yearOptions[0].id;
fetchRetirement(type.value, currentYear);
};
@ -367,7 +368,7 @@ const fetchRetirement = async (type: string, year: any) => {
await http
.get(config.API.retirement(type, year))
.then((res) => {
console.log(res);
// console.log(res);
rows.value = [];
let data = res.data.result;
rows.value = data.map((items: any) => ({
@ -378,9 +379,11 @@ const fetchRetirement = async (type: string, year: any) => {
total: items.total,
round: items.round,
typeReport: typeReportChangeName(items.typeReport),
json: items.json,
}));
actionOption.value = rows.value;
rows.value.sort((a, b) => a.round - b.round);
checkststus(rows.value);
})
.catch((e) => {
messageError($q, e);
@ -540,7 +543,7 @@ const cerateRetirement = async (data: object) => {
});
};
const clickSelect = async (action: string) => {
console.log(action);
// console.log(action);
// console.log(radio.value);
$q.dialog({
title: "ยืนยันการแก้ไขข้อมูลประกาศเกษียณ",
@ -558,7 +561,7 @@ const clickSelect = async (action: string) => {
retireHistoryId: action,
option: radio.value,
};
console.log(data);
// console.log(data);
await cerateRetirement(data);
})
@ -569,6 +572,14 @@ const clickSelect = async (action: string) => {
const clickClose = async () => {
modal.value = false;
};
const checkjson = ref<boolean>();
const checkststus = (data: any) => {
let jsonfasle = rows.value.find((e: any) => e.json == false);
if (jsonfasle) {
checkjson.value = true;
} else checkjson.value = false;
};
const fiscalyear = ref<number>();
// const fiscalyearOP = ref<any>([
// { id: 1, name: "" },
@ -608,7 +619,7 @@ watch(type, () => {
fetchRetirement(type.value, currentYear);
});
const typeReportChangeName = (val: string) => {
console.log(val);
// console.log(val);
switch (val) {
case "EDIT":
return "ประกาศแก้ไขเกษียณ";

View file

@ -426,7 +426,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
round
color="primary"
@click="clickListInsignia(props.row.id)"
icon="mdi-account-star"
icon="mdi-account-check"
>
<q-tooltip>ไดบเครองราชฯ</q-tooltip>
</q-btn>

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
const sizeCard = (val: number) => {
if (val === 5) {
return "width:15%;";
return "width:20%;";
}
};
const props = defineProps({

View file

@ -6,6 +6,9 @@ import type { QTableProps } from "quasar";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
import http from "@/plugins/http";
import config from "@/app.config";
import { useRouter } from "vue-router";
const router = useRouter();
const mixin = useCounterMixin();
const {
@ -190,10 +193,11 @@ const props = defineProps({
});
onMounted(async () => {
if (DataStore.typeOc == "") {
organization.value = DataStore.optionsTypeOc[2].id;
DataStore.typeOc = organization.value;
} else organization.value = DataStore.typeOc;
// if (DataStore.typeOc == "") {
// // organization.value = DataStore.optionsTypeOc[2].id;
// DataStore.typeOc = organization.value;
// } else organization.value = DataStore.typeOc;
organization.value = DataStore.typeOc;
organizationOptions.value = DataStore.optionsTypeOc;
if (organization.value !== "" || organization.value !== undefined) {
if (props.fecthInsigniaByOc) {
@ -232,7 +236,7 @@ const fecthlistRetire = async () => {
}
})
.catch((e) => {
console.log(e);
// console.log(e);
messageError($q, e);
});
};
@ -253,7 +257,7 @@ const fecthlistperson = async (id: string) => {
criterias: data,
})
.then((res) => {
console.log(res);
// console.log(res);
rows2.value = res.data.result.map((e: any) => ({
id: e.id,
@ -265,7 +269,7 @@ const fecthlistperson = async (id: string) => {
modalAdd.value = true;
})
.catch((e) => {
console.log(e);
// console.log(e);
messageError($q, e);
})
.finally(() => {
@ -290,14 +294,14 @@ const addlistperson = async (id: string) => {
// insigniaId: organization.value,
insigniaPeriodId: props.roundId,
};
console.log(data);
// console.log(data);
await http
.post(config.API.insigniaCreate(), data)
.then(() => {
success($q, "เพิ่มรายชื่อสำเร็จ");
})
.catch((err) => {
console.log(err);
// console.log(err);
messageError($q, err);
})
.finally(() => {
@ -323,12 +327,11 @@ const addlistperson = async (id: string) => {
// };
const clickmodalEdit = (props: any) => {
insignia.value = props.insigniaSend;
insigniaType.value = props.insigniaLevel;
// insigniaType.value = props.insigniaLevel;
person.value = props;
console.log(person.value);
modalEdit.value = true;
fecthInsignia();
fecthInsigniaType();
// fecthInsigniaType();
};
const clickSave = () => {
dialogConfirm(
@ -343,7 +346,7 @@ const clickSave = () => {
const listEdit = async (profileId: string) => {
let data: any = {
insigniaId: insignia.value,
insigniaTypeId: insigniaType.value,
// insigniaTypeId: insigniaType.value,
};
await http
.put(config.API.insigniaEdit(profileId), data)
@ -428,7 +431,7 @@ const listdelete = async (profileId: string) => {
const insignia = ref<string>("");
const insigniaOptions = ref<any>([]);
const insigniaType = ref<string>("");
const insigniaTypeOptions = ref<any>([]);
// const insigniaTypeOptions = ref<any>([]);
const fecthInsignia = async () => {
await http
@ -436,14 +439,20 @@ const fecthInsignia = async () => {
.then((res) => {
insigniaOptions.value = res.data.result;
})
.catch((err) => {});
.catch(() => {
// console.log(err);
});
};
const fecthInsigniaType = async () => {
await http(config.API.insigniaType)
.then((res) => {
insigniaTypeOptions.value = res.data.result;
})
.catch((err) => {});
// const fecthInsigniaType = async () => {
// await http(config.API.insigniaType)
// .then((res) => {
// insigniaTypeOptions.value = res.data.result;
// })
// .catch((err) => {});
// };
const nextPage = (id: string) => {
router.push(`/registry/${id}`);
};
const filterKeyword = ref<string>("");
@ -597,7 +606,11 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr
:props="props"
class="cursor-pointer"
@click.stop="nextPage(props.row.profileId)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
@ -636,13 +649,14 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
flat
round
dense
@click.stop
>
<q-menu transition-show="jump-down" transition-hide="jump-up">
<q-list dense style="min-width: 250px">
<q-item
clickable
v-close-popup
@click="clickmodalEdit(props.row)"
@click.stop="clickmodalEdit(props.row)"
>
<q-item-section
style="min-width: 0px"
@ -659,7 +673,7 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
<q-item
clickable
v-close-popup
@click="clickReject(props.row.profileId)"
@click.stop="clickReject(props.row.profileId)"
>
<q-item-section
style="min-width: 0px"
@ -678,7 +692,7 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
<q-item
clickable
v-close-popup
@click="clickDelete(props.row.profileId)"
@click.stop="clickDelete(props.row.profileId)"
>
<q-item-section
style="min-width: 0px"
@ -846,7 +860,7 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
style="min-width: 150px"
/>
</div>
<div class="col">
<!-- <div class="col">
<q-select
v-model="insigniaType"
label="ชั้นเครื่องราชฯ"
@ -864,7 +878,7 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
:hide-dropdown-icon="false"
style="min-width: 150px"
/>
</div>
</div> -->
</div>
</div>
<q-separator />
@ -877,7 +891,7 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
</q-dialog>
<!-- note -->
<q-dialog v-model="modalNote" persistent>
<!-- <q-dialog v-model="modalNote" persistent>
<q-card style="min-width: 350px">
<q-toolbar>
<q-toolbar-title class="text-subtitle2 text-bold">
@ -924,5 +938,5 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
/>
</q-card-actions>
</q-card>
</q-dialog>
</q-dialog> -->
</template>

View file

@ -2,6 +2,9 @@
import { onMounted, ref, watch, reactive } from "vue";
import type { QTableProps } from "quasar";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
import { useRouter } from "vue-router";
const router = useRouter();
import http from "@/plugins/http";
import config from "@/app.config";
@ -159,6 +162,9 @@ const changtypeOc = () => {
}
DataStore.typeOc = organization.value;
};
const nextPage = (id: string) => {
router.push(`/registry/${id}`);
};
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
@ -285,7 +291,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
<q-tr
:props="props"
class="cursor-pointer"
@click="nextPage(props.row)"
@click="nextPage(props.row.profileId)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}

View file

@ -3,7 +3,9 @@ import { onMounted, ref, watch, reactive } from "vue";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
import { useRouter } from "vue-router";
const router = useRouter();
const DataStore = useInsigniaDataStore();
const props = defineProps({
@ -155,6 +157,9 @@ const changtypeOc = () => {
}
DataStore.typeOc = organization.value;
};
const nextPage = (id: string) => {
router.push(`/registry/${id}`);
};
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
@ -280,7 +285,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
<q-tr
:props="props"
class="cursor-pointer"
@click="nextPage(props.row)"
@click="nextPage(props.row.profileId)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}

View file

@ -2,6 +2,7 @@
import { onMounted, ref, watch } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
@ -9,21 +10,16 @@ const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const organization = ref<string>(1);
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
const visibleColumns = ref<string[]>([
"no",
// "citizenId",
// "name",
// "position",
// "level",
// "salary",
"organization",
// "insigniaType",
// "insigniaSend",
// "insigniaLevel",
// "dateSend",
]);
const props = defineProps({
roundId: {
type: String,
},
tab: {
type: String,
},
});
const visibleColumns = ref<string[]>(["no", "orgName"]);
//
const columns = ref<QTableProps["columns"]>([
{
@ -34,169 +30,43 @@ const columns = ref<QTableProps["columns"]>([
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
width: "0px",
},
// {
// name: "citizenId",
// align: "left",
// label: "",
// sortable: true,
// field: "citizenId",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "name",
// align: "left",
// label: "-",
// sortable: true,
// field: "name",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "position",
// align: "left",
// label: "",
// sortable: true,
// field: "position",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "level",
// align: "left",
// label: "/",
// sortable: true,
// field: "level",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "salary",
// align: "left",
// label: "",
// sortable: true,
// field: "salary",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
{
name: "organization",
name: "orgName",
align: "left",
label: "หน่วยงาน",
sortable: true,
field: "organization",
field: "orgName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
width: "100px",
},
// {
// name: "insigniaType",
// align: "left",
// label: " ",
// sortable: true,
// field: "insigniaType",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "insigniaSend",
// align: "left",
// label: " ",
// sortable: true,
// field: "insigniaSend",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "insigniaLevel",
// align: "left",
// label: "",
// sortable: true,
// field: "insigniaLevel",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "dateSend",
// align: "left",
// label: "",
// sortable: true,
// field: "dateSend",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
]);
// ()
const rows = ref<any[]>([
{
no: "1",
citizenId: "1xxxxxxxxxx",
name: "นายใจดี ยอดใจ ",
position: "นักวิชาการพัสดุ",
level: "1",
salary: "15000",
organization: "บริหาร",
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
insigniaSend: "ตริตาภรณ์ช้างเผือก",
insigniaLevel: "ต่ำกว่าสายสะพาย",
dateSend: "31 ม.ค. 2566",
},
{
no: "2",
citizenId: "1xxxxxxxxxx",
name: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฏิบัติการ",
salary: "15000",
organization: "บริหาร",
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
insigniaSend: "ตริตาภรณ์ช้างเผือก",
insigniaLevel: "ต่ำกว่าสายสะพาย",
dateSend: "31 ม.ค. 2566",
},
{
no: "3",
citizenId: "1xxxxxxxxxx",
name: "นางสาวกัณฐิมา กาฬสินธุ์",
position: "นักจัดการงานทั่วไป",
level: "ปฏิบัติการ",
salary: "15000",
organization: "บริหาร",
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
insigniaSend: "ตริตาภรณ์ช้างเผือก",
insigniaLevel: "ต่ำกว่าสายสะพาย",
dateSend: "31 ม.ค. 2566",
},
{
no: "4",
citizenId: "1xxxxxxxxxx",
name: "นางสาวเมขลา กระจ่างมนตรี",
position: "นักจัดการงานทั่วไป",
level: "ปฏิบัติการ",
salary: "15000",
organization: "บริหาร",
insigniaType: "ทวีติยาภรณ์ช้างเผือก",
insigniaSend: "ตริตาภรณ์ช้างเผือก",
insigniaLevel: "ต่ำกว่าสายสะพาย",
dateSend: "31 ม.ค. 2566",
},
]);
const rows = ref<any[]>([]);
onMounted(async () => {
await fecthAgency();
await fecthOrg();
});
watch(props, async () => {
if (props.tab === "organization") {
await fecthOrg();
}
});
const fecthAgency = async () => {
const fecthOrg = async () => {
showLoader();
await http
.get(config.API.insigniaAgency())
.get(config.API.insigniaNosend(props.roundId))
.then((res) => {
console.log(res);
let data = res.data.result;
rows.value = data.map((e: any) => ({
orgId: e.orgId,
orgName: e.orgName,
}));
console.log(rows.value);
})
.catch((err) => {
messageError($q, eer);
messageError($q, err);
})
.finally(() => {
hideLoader();
@ -289,13 +159,14 @@ const paginationLabel = (start: string, end: string, total: string) => {
class="col-xs-12 col-sm-3 col-md-2"
/>
</div> -->
<div class="col-12 q-pt-sm">
<div class="col-12">
<q-table
ref="table"
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="name"
dense
flat
bordered
:paging="true"
@ -318,8 +189,8 @@ const paginationLabel = (start: string, end: string, total: string) => {
<q-td key="no" style="width: 50px" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="organization" style="width: 300px" :props="props">
{{ props.row.organization }}
<q-td key="orgName" style="width: 300px" :props="props">
{{ props.row.orgName }}
</q-td>
</q-tr>
</template>

View file

@ -37,7 +37,7 @@ const stat = ref<any>({
});
onMounted(async () => {
await fecthlistRound();
await fecthType();
await fecthAgency();
});
const fecthlistRound = async () => {
await http
@ -46,7 +46,9 @@ const fecthlistRound = async () => {
optionRound.value = res.data.result.map((e: any) => ({
id: e.period_id,
year: e.period_year,
name: `รอบการเสนอพระราชทานเครื่องราช ${e.period_name} ปี ${e.period_year} `,
name: `รอบการเสนอพระราชทานเครื่องราชรอบที่ ${e.period_round} ปี ${
e.period_year + 543
} `,
}));
// console.log(optionRound.value);
// const lastIndex = optionRound.value.length;
@ -59,24 +61,6 @@ const fecthlistRound = async () => {
messageError($q, err);
});
};
const fecthType = async () => {
await http
.get(config.API.typeOc())
.then((res) => {
optiontypeOc.value = res.data.result.map((e: any) => ({
id: e.organizationId,
name: e.organizationName,
}));
DataStore.optionsTypeOc = optiontypeOc.value;
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(() => {
loading.value = true;
});
};
const fecthStat = async (id: string) => {
showLoader();
await http
@ -91,6 +75,40 @@ const fecthStat = async (id: string) => {
hideLoader();
});
};
const fecthAgency = async () => {
showLoader();
await http
.get(config.API.insigniaAgency())
.then(async (res) => {
DataStore.agency = res.data.result;
await fecthType();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
};
const fecthType = async () => {
await http
.get(config.API.typeOc())
.then((res) => {
optiontypeOc.value = res.data.result.map((e: any) => ({
id: e.organizationId,
name: e.organizationName,
}));
DataStore.fetchOption(optiontypeOc.value);
// DataStore.optionsTypeOc = ;
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(() => {
loading.value = true;
});
};
const changround = () => {
fecthStat(round.value);
fecthInsigniaByOc(round.value, DataStore.typeOc, "officer", tab.value);
@ -139,11 +157,11 @@ const fecthInsigniaByOc = async (
รายชอขาราชการสามญฯ ทธนขอพระราชทานเครองราชยสรยาภรณ
</div>
<q-card bordered class="row col-12 q-mt-sm">
<div class="bg-grey-2 col-12 row items-center">
<div class="q-pl-sm q-mr-md text-weight-bold text-grey">รอบ</div>
<div class="bg-grey-1 col-12 row items-center">
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
<q-select
borderless
dense
v-model="round"
:options="optionRound"
map-options
@ -153,9 +171,10 @@ const fecthInsigniaByOc = async (
@update:model-value="changround"
/>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12 row bg-white">
<div class="fit q-px-md q-py-sm">
<div class="row col-12 q-col-gutter-md fit">
<div class="row col-12 q-col-gutter-sm fit">
<cardTop
:amount="stat.orgAllCount"
label="หน่วยงานทั้งหมด"
@ -200,28 +219,28 @@ const fecthInsigniaByOc = async (
</div>
<q-separator />
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="pending">
<q-tab-panel name="pending" class="q-pa-none">
<tab1
:tab="tab"
:roundId="round"
:fecthInsigniaByOc="fecthInsigniaByOc"
/>
</q-tab-panel>
<q-tab-panel name="reject">
<q-tab-panel name="reject" class="q-pa-none">
<tab2
:tab="tab"
:roundId="round"
:fecthInsigniaByOc="fecthInsigniaByOc"
/>
</q-tab-panel>
<q-tab-panel name="delete">
<q-tab-panel name="delete" class="q-pa-none">
<tab3
:tab="tab"
:roundId="round"
:fecthInsigniaByOc="fecthInsigniaByOc"
/>
</q-tab-panel>
<q-tab-panel name="organization">
<q-tab-panel name="organization" class="q-pa-none">
<tab4 :tab="tab" :roundId="round" />
</q-tab-panel>
</q-tab-panels>

View file

@ -40,6 +40,10 @@
<style lang="scss" scope>
.q-item.hover-green:hover {
background-color: #d5f1ee;
background-color: #d5f1ee57;
border-radius: 2px ;
}
.q-item.hover-green{
padding: 10px;
}
</style>

View file

@ -63,7 +63,7 @@ const backHistory = () => {
</div>
<div>
<q-card flat bordered class="col-12 q-mt-sm">
<div class="q-pa-md q-gutter-y-md">
<div class="q-pa-md q-gutter-y-sm">
<q-toolbar style="padding: 0" >
<q-select
class="q-mr-sm"
@ -87,11 +87,13 @@ const backHistory = () => {
<q-space />
<div class="q-pa-ms q-gutter-sm" style="padding: 0">
<q-btn outline color="primary" icon="download" label="ดาวน์โหลด" />
<q-btn icon="mdi-eye" color="primary" label="แสดงรางงาน" />
<q-btn unelevated icon="mdi-eye" color="primary" label="แสดงรางงาน" />
<q-btn
color="primary"
unelevated
color="blue"
icon="mdi-fullscreen"
@click="dialog = true"
dense
/>
</div>
</q-toolbar>
@ -107,7 +109,7 @@ const backHistory = () => {
separator-class="bg-white disabled"
>
<template v-slot:before>
<div class="q-pa-md">
<div class="q-px-sm">
<div class="row items-start items-center">
<div class="col">
<q-btn

View file

@ -1,6 +1,7 @@
import { defineStore } from "pinia";
import { ref, } from "vue";
import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin();
const {
date2Thai
@ -10,9 +11,9 @@ const {
export const useInsigniaDataStore = defineStore("insignia", () => {
let optionsTypeOc = ref<any>([]);
let typeOc = ref<string>("")
const agency = ref<string>('')
let rows = ref<any>([])
const listinsignia = ref<any>([])
const typeinsigniaValues: Set<number> = new Set();
const typeinsignia = ref<number | string>("all");
let typeinsigniaOptions = ref<any>([{ id: "all", name: "ทั้งหมด" }]);
@ -36,8 +37,13 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
listinsignia.value = await rows.value
filtertypeInsignia()
} else rows.value = []
}
const fetchOption = (op: any) => {
if (agency.value !== null) {
typeOc.value = agency.value
optionsTypeOc.value = op.filter((e: any) => e.id == agency.value
)
} else { optionsTypeOc.value = op, typeOc.value = op[2].id }
}
const filtertypeInsignia = async () => {
typeinsignia.value = "all"
@ -45,16 +51,19 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
const double_name = [
...new Set(listinsignia.value.map((item: any) => item.insigniaType)),
];
typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }]
for (let i = 1; i <= double_name.length; i++) {
const type = double_name[i - 1];
const listtype = {
id: type,
name: type,
};
// typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }]
typeinsigniaOptions.value.push(listtype)
}
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }]
};
const searchFilterTable = async () => {
if (typeinsignia.value !== undefined && typeinsignia.value !== null) {
if (typeinsignia.value === "all") {
@ -66,14 +75,16 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
}
}
};
return {
optionsTypeOc,
typeOc,
rows,
typeinsigniaOptions,
typeinsignia,
agency,
fetchData,
fetchOption,
searchFilterTable,
};
});

View file

@ -284,47 +284,64 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
นทกผลการไดบพระราชทานเครองราชยสรยสภรณ/การจายใบกำก
</div>
<q-card flat bordered class="col-12 q-my-md q-mt-sm rounded-borders">
<div class="q-pa-md row items-center">
<selector hide-bottom-space borderless dense lazy-rules emit-value map-options options-dense option-label="name"
option-value="id" v-model="selectRound" :options="selectRoundOption" use-input input-debounce="0"
input-class="text-bold text-grey">
<template v-slot:before><label class="text-bold text-grey" style="font-size: 16px">รอบ</label>
</template>
</selector>
<div class="bg-grey-1 col-12 row items-center">
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
<div>
<selector
hide-bottom-space
borderless
dense
lazy-rules
emit-value
map-options
options-dense
option-label="name"
option-value="id"
v-model="selectRound"
:options="selectRoundOption"
use-input
input-debounce="0"
input-class="text-bold text-grey">
</selector>
</div>
</div>
<q-separator />
<q-tabs v-model="tab" align="left" class="bg-white text-grey" active-color="primary" indicator-color="primary">
<q-tabs dense v-model="tab" align="left" class="bg-white text-grey" active-color="primary" indicator-color="primary">
<q-tab name="hight" label="ขั้นสายสะพาน" />
<q-tab name="low" label="ขั้นต่ำกว่าสายสะพาน" />
<q-tab name="medal" label="เหรียญตรา" />
<q-tab name="doc" label="เอกสารอ้างอิง" />
</q-tabs>
<q-separator />
<div class="q-py-md q-px-md">
<div>
<div v-if="tab=='hight'">
<div class="row col-12 q-pb-sm">
<div v-if="tab=='hight'" class="q-pa-md">
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
<selector outlined dense lazy-rules v-model="selectType" hide-bottom-space :label="`${'เครื่องราชฯ'}`"
emit-value map-options option-label="name" :options="selectTypeOption" option-value="id" use-input
input-debounce="0" style="min-width: 150px" class="gt-xs q-ml-sm" @filter="(inputValue: string, doneFn: Function) => filterSelector(inputValue, doneFn, 'selectTypeOption')" />
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
input-debounce="0" style="min-width: 150px" @filter="(inputValue: string, doneFn: Function) => filterSelector(inputValue, doneFn, 'selectTypeOption')" />
<div>
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
</div>
<div>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
<q-space />
@ -373,31 +390,35 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
</d-table>
</div>
<div v-else-if="tab=='low'">
<div class="row col-12 q-pb-sm">
<div v-else-if="tab=='low'" class="q-pa-md">
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
<selector outlined dense lazy-rules v-model="selectType" hide-bottom-space :label="`${'เครื่องราชฯ'}`"
emit-value map-options option-label="name" :options="selectTypeOption" option-value="id" use-input
input-debounce="0" style="min-width: 150px" class="gt-xs q-ml-sm" @filter="(inputValue: string,
input-debounce="0" style="min-width: 150px" @filter="(inputValue: string,
doneFn: Function) => filterSelector(inputValue, doneFn, 'selectTypeOption'
)" />
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<div>
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
</div>
<div>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
<q-space />
@ -446,32 +467,35 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
</d-table>
</div>
<div v-else-if="tab=='medal'">
<div class="row col-12 q-pb-sm">
<div v-else-if="tab=='medal'" class="q-pa-md">
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
<selector outlined dense lazy-rules v-model="selectType" hide-bottom-space :label="`${'เครื่องราชฯ'}`"
emit-value map-options option-label="name" :options="selectTypeOption" option-value="id" use-input
input-debounce="0" style="min-width: 150px" class="gt-xs q-ml-sm" @filter="(inputValue: string,
input-debounce="0" style="min-width: 150px" @filter="(inputValue: string,
doneFn: Function) => filterSelector(inputValue, doneFn, 'selectTypeOption'
)" />
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<div>
<q-btn @click="addData()" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพ</q-tooltip>
</q-btn>
</div>
<div>
<q-btn flat round color="light-blue" icon="upload">
<!-- <q-tooltip>พโหลดไฟล</q-tooltip> -->
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการไดบพระราชทานเครองราชยสรยสภรณ</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
<q-item-section>นทกผลการจายใบกำก</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
<q-space />
<div class="items-center" style="display: flex">
@ -521,6 +545,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
<div v-else-if="tab=='doc'">
<Transition>
<<<<<<< HEAD
<div class="bg-base rounded-borders q-pa-md q-mb-md">
<div class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md">
@ -651,11 +676,189 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
</div>
<div class="col-xs-12 col-md-3 flexsave">
=======
<div>
<div class="q-pa-md">
<div class="row col-12 q-col-gutter-sm">
<!-- <div class="col-xs-6 col-md-2">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="issue"
:label="`${'ฉบับ'}`"
hide-bottom-space
/>
</div>
<div class="col-xs-6 col-md-2">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="book"
:label="`${'เล่มที่'}`"
hide-bottom-space
/>
</div>
<div class="col-xs-6 col-md-2">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="volume"
:label="`${'เล่ม'}`"
hide-bottom-space
/>
</div>
<div class="col-xs-6 col-md-2">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="section"
:label="`${'ตอนที่'}`"
hide-bottom-space
/>
</div> -->
<div class="col-xs-6 col-md-4">
<q-file
class="bg-white"
outlined
dense
v-model="fileUpload"
label="ไฟล์เอกสาร"
hide-bottom-space
lazy-rules
>
<template v-slot:prepend>
<q-icon name="attach_file" color="primary" />
</template>
</q-file>
</div>
<div class="col-xs-6 col-md-3">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="documentTitle"
:label="`${'ชื่อเอกสาร'}`"
hide-bottom-space
/>
</div>
<div class="col-xs-12 col-md-5">
<q-input
class="bg-white"
outlined
dense
lazy-rules
v-model="reason"
:label="`${'หมายเหตุ'}`"
hide-bottom-space
/>
</div>
<!-- <div class="col-xs-6 col-md-2">
<datepicker
menu-class-name="modalfix"
v-model="dateGoverment"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker bg-white"
:model-value="
dateGoverment != null ? date2Thai(dateGoverment) : null
"
:label="`${'วันที่ประกาศราชกิจจานุเบกษา'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-xs-6 col-md-2">
<datepicker
menu-class-name="modalfix"
v-model="dateReceiver"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker bg-white"
:model-value="
dateReceiver != null ? date2Thai(dateReceiver) : null
"
:label="`${'วันที่ได้รับ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div> -->
<!--<div class="col-xs-12 col-md-9">
<p>
นทประกาศราชกจจานเบกษา <b>{{ date2Thai(new Date()) }}</b>
</p>
</div> -->
<!-- <div class="col-xs-6 col-md-3">
<p>
นทได <b>{{ date2Thai(new Date()) }}</b>
</p>
</div> -->
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12 flexsave q-pa-sm">
<q-space/>
>>>>>>> develop
<q-btn label="บันทึก" @click="save" color="public" />
</div>
</div>
</div>
</Transition>
</Transition>
</div>
</div>

View file

@ -24,6 +24,8 @@ interface FormRegistryEmployee {
draftOrganizationOrganization: String | null;
newAgency: String | null;
currentAgency: String | null;
status: String;
statustext: String;
}
interface ResponseEmployeeTemp {
id: string;
@ -49,5 +51,6 @@ interface ResponseEmployeeTemp {
leaveDateOrder: Date | null;
draftPositionEmployee: String | null;
draftOrganizationOrganization: String | null;
draftOrgEmployeeStatus: String;
}
export type { ResponseEmployeeTemp, FormRegistryEmployee };

View file

@ -7,26 +7,64 @@
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
<q-btn flat round color="primary" icon="mdi-account-arrow-right" @click="clickAddOrder" />
<q-btn
flat
round
color="primary"
icon="mdi-account-arrow-right"
@click="clickAddOrder"
>
<q-tooltip>งรายชอไปออกคำส</q-tooltip>
</q-btn>
<q-space />
<div class="items-center" style="display: flex">
<!-- นหาขอความใน table -->
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
style="max-width: 200px" class="q-ml-sm">
<q-input
standout
dense
v-model="filter"
ref="filterRef"
outlined
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
class="q-ml-sm"
>
<template v-slot:append>
<q-icon v-if="filter == ''" name="search" />
<q-icon v-if="filter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
<q-icon
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<!-- แสดงคอลมนใน table -->
<q-select v-model="visibleColumnsEmployeeTemp" :display-value="$q.lang.table.columns" multiple outlined dense
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
class="gt-xs q-ml-sm" />
<q-select
v-model="visibleColumnsEmployeeTemp"
:display-value="$q.lang.table.columns"
multiple
outlined
dense
:options="columns"
options-dense
option-value="name"
map-options
emit-value
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</div>
</div>
<div class="col-12 q-pt-sm">
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumnsEmployeeTemp" :filter="filter"
row-key="id">
<d-table
:rows="rows"
:columns="columns"
:visible-columns="visibleColumnsEmployeeTemp"
:filter="filter"
row-key="id"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
@ -37,16 +75,32 @@
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td key="no" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="no"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fullname" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="fullname"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.fullname }}
</q-td>
<q-td key="newAgency" :props="props" @click="redirectToPage(props.row.id)">
<div class="col-12" v-if="props.row.draftOrganizationOrganization == null &&
props.row.draftPositionEmployee == null
">
<q-td
key="newAgency"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
<div
class="col-12"
v-if="
props.row.draftOrganizationOrganization == null &&
props.row.draftPositionEmployee == null
"
>
<div class="text-weight-medium">
{{ "-" }}
</div>
@ -60,8 +114,15 @@
</div>
</div>
</q-td>
<q-td key="currentAgency" :props="props" @click="redirectToPage(props.row.id)">
<div class="col-12" v-if="props.row.oc == null && props.row.position == null">
<q-td
key="currentAgency"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
<div
class="col-12"
v-if="props.row.oc == null && props.row.position == null"
>
<div class="text-weight-medium">
{{ "-" }}
</div>
@ -78,82 +139,182 @@
<!-- <q-td
key="positionEmployeePosition"
:props="props"
@click="redirectToPage(props.row.id)"
@click="redirectToPage(props.row.id,props.row.status)"
>
{{ props.row.positionEmployeePosition }}
</q-td>
<q-td
key="positionEmployeePositionSide"
:props="props"
@click="redirectToPage(props.row.id)"
@click="redirectToPage(props.row.id,props.row.status)"
>
{{ props.row.positionEmployeePositionSide }}
</q-td>
<q-td
key="positionLine"
:props="props"
@click="redirectToPage(props.row.id)"
@click="redirectToPage(props.row.id,props.row.status)"
>
{{ props.row.positionLine }}
</q-td>
<q-td
key="positionEmployeeGroup"
:props="props"
@click="redirectToPage(props.row.id)"
@click="redirectToPage(props.row.id,props.row.status)"
>
{{ props.row.positionEmployeeGroup }}
</q-td>
<q-td key="oc" :props="props" @click="redirectToPage(props.row.id)">
<q-td key="oc" :props="props" @click="redirectToPage(props.row.id,props.row.status)">
{{ props.row.oc }}
</q-td> -->
<q-td key="amount" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="amount"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.amount }}
</q-td>
<q-td key="govAge" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="govAge"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.govAge }}
</q-td>
<q-td key="dateAppoint" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="dateAppoint"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.dateAppoint }}
</q-td>
<q-td key="dateStart" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="dateStart"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.dateStart }}
</q-td>
<q-td key="salaryDate" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="salaryDate"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.salaryDate }}
</q-td>
<q-td key="refSalary" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="refSalary"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.refSalary }}
</q-td>
<q-td key="age" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="age"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.age }}
</q-td>
<q-td key="fullnameOld" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="fullnameOld"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.fullnameOld }}
</q-td>
<q-td key="createdAt" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="createdAt"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.createdAt }}
</q-td>
<q-td key="isLeave" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="isLeave"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.isLeave }}
</q-td>
<q-td key="leaveDateOrder" :props="props" @click="redirectToPage(props.row.id)">
<q-td
key="leaveDateOrder"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.leaveDateOrder }}
</q-td>
<q-td
key="statustext"
:props="props"
@click="redirectToPage(props.row.id, props.row.status)"
>
{{ props.row.statustext }}
</q-td>
<q-td auto-width>
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
<q-btn
icon="mdi-dots-vertical"
size="12px"
color="grey-7"
flat
round
dense
>
<q-menu transition-show="jump-down" transition-hide="jump-up">
<q-list dense style="min-width: 160px">
<q-item clickable v-close-popup @click="editDetail(props.row)">
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
<q-icon color="blue" size="xs" name="mdi-account-settings" />
<q-item
clickable
v-close-popup
@click="editDetail(props.row)"
:disable="
props.row.status == 'REPORT' ||
props.row.status == 'DONE'
"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
:color="
props.row.status == 'REPORT' ||
props.row.status == 'DONE'
? 'grey'
: 'blue'
"
size="xs"
name="mdi-account-settings"
/>
</q-item-section>
<q-item-section>กำหนดตำแหน</q-item-section>
</q-item>
<q-separator />
<q-item clickable v-close-popup @click="clickDelete(props.row.id)">
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
<q-icon color="red" size="xs" name="mdi-delete" />
<q-item
clickable
v-close-popup
@click="clickDelete(props.row.id)"
:disable="
props.row.status == 'REPORT' ||
props.row.status == 'DONE'
"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
:color="
props.row.status == 'REPORT' ||
props.row.status == 'DONE'
? 'grey'
: 'red-7'
"
size="xs"
name="mdi-delete"
/>
</q-item-section>
<q-item-section>ลบ</q-item-section>
</q-item>
@ -173,16 +334,34 @@
<DialogHeader tittle="กำหนดตำแหน่ง" :close="modalOpenClose" />
<q-separator />
<q-card-section class="q-pa-sm">
<d-table :rows="rowsPosition" :columns="columnsPosition" row-key="id" selection="single"
v-model:selected="selectedPosition" :visible-columns="visibleColumnsPosition">
<d-table
:rows="rowsPosition"
:columns="columnsPosition"
row-key="id"
selection="single"
v-model:selected="selectedPosition"
:visible-columns="visibleColumnsPosition"
>
<template v-slot:body-selection="scope">
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
</d-table>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn dense unelevated label="บันทึก" color="public" @click="checkSave" class="q-px-md"><!-- icon="mdi-content-save-outline"
<q-btn
dense
unelevated
label="บันทึก"
color="public"
@click="checkSave"
class="q-px-md"
><!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
</q-btn>
</q-card-actions>
@ -192,14 +371,24 @@
<!-- dialog งรายชอไปออกคำส -->
<q-dialog v-model="modaladdOrder">
<q-card style="width: 900px; max-width: 80vw">
<DialogHeader tittle="ส่งรายชื่อไปออกคำสั่ง" :close="clickCloseSendModal" />
<DialogHeader
tittle="ส่งรายชื่อไปออกคำสั่ง"
:close="clickCloseSendModal"
/>
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-end">
<div class="col-5">
<q-toolbar style="padding: 0">
<q-input borderless outlined dense debounce="300" v-model="filter" placeholder="ค้นหา"
style="width: 850px; max-width: auto">
<q-input
borderless
outlined
dense
debounce="300"
v-model="filter"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
>
<template v-slot:append>
<q-icon name="search" />
</template>
@ -208,37 +397,80 @@
</div>
</div>
<d-table :rows="rowsOrder" :columns="columnsOrder" :visible-columns="visibleColumnsOrder" :filter="filter"
row-key="id" selection="single" v-model:selected="selectedToOrder">
<d-table
:rows="rowsOrder"
:columns="columnsOrder"
:visible-columns="visibleColumnsOrder"
:filter="filter"
row-key="id"
selection="single"
v-model:selected="selectedToOrder"
>
<template v-slot:body-selection="scope">
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-checkbox keep-color color="primary" dense v-model="props.selected" />
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionEmployeePosition" :props="props">
{{ props.row.positionEmployeePosition }}
<q-td key="newAgency" :props="props">
<div
class="col-12"
v-if="
props.row.draftOrganizationOrganization == null &&
props.row.draftPositionEmployee == null
"
>
<div class="text-weight-medium">
{{ "-" }}
</div>
</div>
<div class="col-12" v-else>
<div class="text-weight-medium">
{{ props.row.draftOrganizationOrganization ?? "-" }}
</div>
<div class="text-weight-light">
{{ props.row.draftPositionEmployee ?? "-" }}
</div>
</div>
</q-td>
<q-td key="positionEmployeePositionSide" :props="props">
{{ props.row.positionEmployeePositionSide }}
</q-td>
<q-td key="positionLine" :props="props">
{{ props.row.positionLine }}
</q-td>
<q-td key="positionEmployeeGroup" :props="props">
{{ props.row.positionEmployeeGroup }}
</q-td>
<q-td key="oc" :props="props">
{{ props.row.oc }}
<q-td key="currentAgency" :props="props">
<div
class="col-12"
v-if="props.row.oc == null && props.row.position == null"
>
<div class="text-weight-medium">
{{ "-" }}
</div>
</div>
<div class="col-12" v-else>
<div class="text-weight-medium">
{{ props.row.oc ?? "-" }}
</div>
<div class="text-weight-light">
{{ props.row.position ?? "-" }}
</div>
</div>
</q-td>
<q-td key="amount" :props="props">
{{ props.row.amount }}
</q-td>
@ -269,9 +501,13 @@
<q-td key="isLeave" :props="props">
{{ props.row.isLeave }}
</q-td>
<q-td key="leaveDateOrder" :props="props">
{{ props.row.leaveDateOrder }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>
</d-table>
@ -322,7 +558,7 @@ const {
dialogMessage,
dialogRemove,
dialogConfirm,
dialogMessageNotify
dialogMessageNotify,
} = mixin;
const modaladdOrder = ref<boolean>(false);
@ -368,12 +604,13 @@ const visibleColumnsOrder = ref<String[]>([
"salaryDate",
"age",
"amount",
"isLeave",
"statustext",
"leaveDateOrder",
"newAgency",
"currentAgency",
]);
const visibleColumnsEmployeeTemp = ref<String[]>([]);
visibleColumnsEmployeeTemp.value = [
const visibleColumnsEmployeeTemp = ref<String[]>([
"no",
"fullname",
"fullnameOld",
@ -390,10 +627,12 @@ visibleColumnsEmployeeTemp.value = [
"salaryDate",
"age",
"amount",
"statustext",
"leaveDateOrder",
"newAgency",
"currentAgency",
];
]);
// "isLeave",
const columns = ref<QTableProps["columns"]>([
{
@ -645,6 +884,20 @@ const columns = ref<QTableProps["columns"]>([
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "statustext",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
]);
const rows = ref<FormRegistryEmployee[]>([]);
@ -788,13 +1041,12 @@ const columnsOrder = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px; min-width: 200px",
style: "font-size: 14px; ",
},
{
name: "positionEmployeePosition",
name: "newAgency",
align: "left",
label: "ตำแหน่ง",
label: "หน่วยงานที่รับการบรรจุ",
sortable: true,
field: "positionEmployeePosition",
field: "newAgency",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -804,25 +1056,11 @@ const columnsOrder = ref<QTableProps["columns"]>([
}),
},
{
name: "positionEmployeePositionSide",
name: "currentAgency",
align: "left",
label: "ด้านของตำแหน่ง",
label: "หน่วยงานปัจจุบัน",
sortable: true,
field: "positionEmployeePositionSide",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "positionLine",
align: "left",
label: "สายงาน",
sortable: true,
field: "positionLine",
field: "currentAgency",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -832,34 +1070,77 @@ const columnsOrder = ref<QTableProps["columns"]>([
}),
},
{
name: "positionEmployeeGroup",
align: "left",
label: "กลุ่มงาน",
sortable: true,
field: "positionEmployeeGroup",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "oc",
align: "left",
label: "สังกัด",
sortable: true,
field: "oc",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
// {
// name: "positionEmployeePosition",
// align: "left",
// label: "",
// sortable: true,
// field: "positionEmployeePosition",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, {
// numeric: true,
// sensitivity: "base",
// }),
// },
// {
// name: "positionEmployeePositionSide",
// align: "left",
// label: "",
// sortable: true,
// field: "positionEmployeePositionSide",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, {
// numeric: true,
// sensitivity: "base",
// }),
// },
// {
// name: "positionLine",
// align: "left",
// label: "",
// sortable: true,
// field: "positionLine",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, {
// numeric: true,
// sensitivity: "base",
// }),
// },
// {
// name: "positionEmployeeGroup",
// align: "left",
// label: "",
// sortable: true,
// field: "positionEmployeeGroup",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, {
// numeric: true,
// sensitivity: "base",
// }),
// },
// {
// name: "oc",
// align: "left",
// label: "",
// sortable: true,
// field: "oc",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, {
// numeric: true,
// sensitivity: "base",
// }),
// },
{
name: "amount",
align: "left",
@ -964,17 +1245,17 @@ const columnsOrder = ref<QTableProps["columns"]>([
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isLeave",
align: "left",
label: "สถานะ",
sortable: true,
field: "isLeave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
// {
// name: "isLeave",
// align: "left",
// label: "",
// sortable: true,
// field: "isLeave",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// // sort: (a: string, b: string) =>
// // a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
// },
{
name: "leaveDateOrder",
align: "left",
@ -986,8 +1267,23 @@ const columnsOrder = ref<QTableProps["columns"]>([
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "statustext",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
]);
const rowsOrder = ref<FormRegistryEmployee[]>([]);
const filters = ref<FormRegistryEmployee[]>([]);
const selected = ref([]);
onMounted(async () => {
await nodeTree();
@ -997,8 +1293,8 @@ const checkNull = (text: string) =>
text == null
? ""
: text == "00000000-0000-0000-0000-000000000000"
? ""
: text;
? ""
: text;
const getPosition = async (id: string) => {
showLoader();
@ -1079,23 +1375,24 @@ const getPosition = async (id: string) => {
const clickAddOrder = () => {
modaladdOrder.value = true;
const filteredRows = rowsOrder.value.filter(
(row) => row.draftPositionEmployee !== null
const row = filters.value.filter(
(r: FormRegistryEmployee) => r.status == "PENDING"
);
rowsOrder.value = filteredRows;
rowsOrder.value = row;
};
const clickCloseSendModal = () => {
modaladdOrder.value = false;
};
const checkSave = () => {
dialogConfirm($q, async () => await saveData())
}
dialogConfirm($q, async () => await saveData());
};
const saveData = async () => {
if (selectedPosition.value.length == 0) {
dialogMessageNotify(
$q,
"ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง",
"ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง"
// "",
// "warning",
// undefined,
@ -1110,8 +1407,8 @@ const saveData = async () => {
}
};
const checkSaveOrder = () => {
dialogConfirm($q, () => SaveOrder())
}
dialogConfirm($q, () => SaveOrder());
};
const SaveOrder = async () => {
//
let pId: string[] = [];
@ -1194,8 +1491,10 @@ const clickAdd = () => {
};
//
const redirectToPage = (id?: string) => {
router.push(`/registry-employee/edit/${id}`);
const redirectToPage = (id?: string, status?: string) => {
if (!(status == "REPORT" || status == "DONE")) {
router.push(`/registry-employee/edit/${id}`);
}
};
const editDetail = async (row: any) => {
await getPosition(row.id);
@ -1204,10 +1503,9 @@ const editDetail = async (row: any) => {
modal.value = true;
};
const clickDelete = (id: string) => {
dialogRemove($q, async () => await deleteData(id))
}
dialogRemove($q, async () => await deleteData(id));
};
const deleteData = async (id: string) => {
showLoader();
@ -1222,7 +1520,7 @@ const deleteData = async (id: string) => {
})
.finally(() => {
hideLoader();
})
});
};
const nodeTree = async () => {
@ -1266,10 +1564,12 @@ const showEmployeeTemp = async () => {
criterias: cirteria,
})
.then((res) => {
let data = res.data.result;
const data = res.data.result;
rows.value = [];
filters.value = [];
let list: FormRegistryEmployee[] = [];
data.map((e: ResponseEmployeeTemp) => {
rows.value.push({
list.push({
id: e.id,
fullname: e.fullname,
fullnameOld: e.fullnameOld,
@ -1299,10 +1599,12 @@ const showEmployeeTemp = async () => {
currentAgency: "",
draftPositionEmployee: e.draftPositionEmployee,
draftOrganizationOrganization: e.draftOrganizationOrganization,
status: e.draftOrgEmployeeStatus ?? "",
statustext: statusText(e.draftOrgEmployeeStatus ?? ""),
});
rowsOrder.value = rows.value.filter((e: any) => e.draftPositionEmployee !== null);
});
rows.value = list;
filters.value = list;
})
.catch((e) => {
messageError($q, e);
@ -1312,6 +1614,26 @@ const showEmployeeTemp = async () => {
});
};
const statusText = (val: String) => {
switch (val) {
case "WAITTING":
return "รอดำเนินการ";
case "PENDING":
return "เลือกตำแหน่งแล้ว";
case "APPROVE":
return "อนุมัติ";
case "REJECT":
return "ไม่อนุมัติ";
case "REPORT":
return "ส่งรายชื่อไปออกคำสั่ง";
case "DONE":
return "ออกคำสั่งเสร็จแล้ว";
default:
return "-";
}
};
// const showEmployeeTempOrder = async () => {
// let cirteria = [];
@ -1380,6 +1702,5 @@ const showEmployeeTemp = async () => {
const onSelected = async (id: string) => {
// await fetchPositionNumber(id);
};
</script>
<style lang="scss"></style>