Merge branch 'develop' into dev-tee
This commit is contained in:
commit
94f85adc0c
21 changed files with 3020 additions and 737 deletions
|
|
@ -11,10 +11,10 @@
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="clickBack"
|
@click="clickBack"
|
||||||
/>
|
/>
|
||||||
{{ edit ? `แก้ไขรอบคัดเลือก` : "เพิ่มรอบคัดเลือก" }}
|
{{ edit ? `แก้ไขรอบ` : "เพิ่มรอบคัดเลือก" }}
|
||||||
{{
|
{{
|
||||||
edit && announcementExam
|
edit && announcementExam
|
||||||
? `ครั้งที่ ${roundRaw}/${yearlyRaw == null ? "" : yearlyRaw + 543}`
|
? `${name} ครั้งที่ ${roundRaw}/${yearlyRaw == null ? "" : yearlyRaw + 543}`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -92,14 +92,14 @@
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
|
||||||
:label="`${'ปีงบประมาณ'}`"
|
:label="`${'ปีงบประมาณ'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<!-- <template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="event"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
style="color: var(--q-primary)"
|
style="color: var(--q-primary)"
|
||||||
>
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template> -->
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
|
|
@ -220,7 +220,7 @@
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam && fee != 0">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
v-model="datePayment"
|
v-model="datePayment"
|
||||||
|
|
@ -464,10 +464,10 @@
|
||||||
</ProfileTable>
|
</ProfileTable>
|
||||||
</q-form>
|
</q-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12" v-if="announcementExam">
|
<div class="col-12" v-if="announcementExam && fee != 0">
|
||||||
<q-separator size="5px" color="grey-2" class="q-mt-lg" />
|
<q-separator size="5px" color="grey-2" class="q-mt-lg" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 q-mt-lg" v-if="announcementExam">
|
<div class="col-12 q-mt-lg" v-if="announcementExam && fee != 0">
|
||||||
<div class="text-bold text-subtitle2 q-pb-md">
|
<div class="text-bold text-subtitle2 q-pb-md">
|
||||||
เลือกวิธีการชำระเงิน
|
เลือกวิธีการชำระเงิน
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
divdivdiv<script setup lang="ts">
|
divdivdiv
|
||||||
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||||
import type { appointmentData,ResponseData } from "@/modules/05_placement/interface/response/AppointMent";
|
import type {
|
||||||
|
appointmentData,
|
||||||
|
ResponseData,
|
||||||
|
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -16,10 +20,10 @@ const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const appointment = ref<appointmentData>({
|
const appointment = ref<appointmentData>({
|
||||||
citizenId:"",
|
citizenId: "",
|
||||||
prefixId:"",
|
prefixId: "",
|
||||||
firstname:"",
|
firstname: "",
|
||||||
lastname:""
|
lastname: "",
|
||||||
});
|
});
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
|
@ -52,7 +56,6 @@ const title = ref<ResponseTitle>({
|
||||||
positionTypeOld: "",
|
positionTypeOld: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//เรียกข้อมูลตาม id
|
//เรียกข้อมูลตาม id
|
||||||
const fecthappointmentByid = async () => {
|
const fecthappointmentByid = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -62,12 +65,14 @@ const fecthappointmentByid = async () => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
appointment.value = data;
|
appointment.value = data;
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
title.value.fullname = `${data.prefix}${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
title.value.fullname = `${data.prefix}${data.firstname ?? "-"} ${
|
||||||
|
data.lastname ?? "-"
|
||||||
|
}`;
|
||||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||||
(status.value = data.status),
|
(status.value = data.status),
|
||||||
educationOld.value = data.educationOld ?? "-";
|
(educationOld.value = data.educationOld ?? "-");
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
positionTypeOld.value = data.positionTypeOld;
|
positionTypeOld.value = data.positionTypeOld;
|
||||||
positionLevelOld.value = data.positionLevelOld;
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
|
|
@ -131,10 +136,10 @@ const putAppointment = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
edit.value = false
|
edit.value = false;
|
||||||
fecthappointmentByid()
|
fecthappointmentByid();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
}
|
};
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
|
@ -148,8 +153,16 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary"
|
<q-btn
|
||||||
class="q-mr-sm" @click="router.push(`/appoint-promote`)" />
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="router.push(`/appoint-promote`)"
|
||||||
|
/>
|
||||||
รายละเอียดการแต่งตั้ง-เลื่อน {{ title.fullname }}
|
รายละเอียดการแต่งตั้ง-เลื่อน {{ title.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
|
|
@ -158,8 +171,15 @@ onMounted(async () => {
|
||||||
{{ title.fullname }}
|
{{ title.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm"
|
<q-btn
|
||||||
label="ดูข้อมูลทะเบียนประวัติ" @click="router.push(`/registry/${profileId}`)" />
|
outline
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-open-in-new"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
|
@click="router.push(`/registry/${profileId}`)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -204,14 +224,36 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="status !== 'DONE' && status !== 'REPORT'">
|
<div v-if="status !== 'DONE' && status !== 'REPORT'">
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline"
|
<q-btn
|
||||||
class="q-px-sm" label="แก้ไข" style="width: 80px" @click="edit = !edit" />
|
outline
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-file-edit-outline"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="แก้ไข"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="edit = !edit"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
|
<q-btn
|
||||||
style="width: 80px" @click="clickSave" />
|
outline
|
||||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px"
|
color="public"
|
||||||
@click="cancel()" />
|
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="cancel()"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -219,74 +261,146 @@ onMounted(async () => {
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">วุฒิการศึกษา</div>
|
<div class="text-weight-bold">วุฒิการศึกษา</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="educationOld" :rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'วุฒิการศึกษา'}`" type="text" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="educationOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'วุฒิการศึกษา'}`"
|
||||||
|
type="text"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row q-pa-md items-center">
|
<div class="col-xs-12 row q-pa-md items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="organizationPositionOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่งประเภท'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionTypeOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่งประเภท'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ระดับ'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionLevelOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ระดับ'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'เลขที่'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="posNo"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เลขที่'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<CurrencyInput v-model="salary" label="เงินเดือน" :edit="edit"
|
<CurrencyInput
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]" />
|
v-model="salary"
|
||||||
|
label="เงินเดือน"
|
||||||
|
:edit="edit"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'"
|
<datepicker
|
||||||
autoApply :enableTimePicker="false" week-start="0" >
|
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="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
|
<q-input
|
||||||
:readonly="!edit" :model-value="date !== null ? date2Thai(date) : null"
|
:class="getClass(edit)"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:borderless="!edit"
|
||||||
|
:readonly="!edit"
|
||||||
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||||
hide-bottom-space :label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`" >
|
hide-bottom-space
|
||||||
|
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer"
|
<q-icon
|
||||||
:style="edit? 'color: var(--q-primary)': 'color: var(--q-grey)' ">
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:style="
|
||||||
|
edit
|
||||||
|
? 'color: var(--q-primary)'
|
||||||
|
: 'color: var(--q-grey)'
|
||||||
|
"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -295,9 +409,19 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'หมายเหตุ '}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="reason"
|
||||||
|
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หมายเหตุ '}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@ const fetchPlacementData = async (val: number) => {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
examTime.value = "all";
|
examTime.value = "ทั้งหมด";
|
||||||
examType.value = "all";
|
examType.value = "ทั้งหมด";
|
||||||
expiredAccount.value = false;
|
expiredAccount.value = false;
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -168,6 +168,7 @@ const fetchYearOptions = async () => {
|
||||||
}, "");
|
}, "");
|
||||||
searchYear.value = maxNumber;
|
searchYear.value = maxNumber;
|
||||||
DataStore.DataMainYearSet(searchYear.value);
|
DataStore.DataMainYearSet(searchYear.value);
|
||||||
|
yearOptionsFn.value = yearOptions;
|
||||||
searchYear.value && fetchPlacementData(searchYear.value);
|
searchYear.value && fetchPlacementData(searchYear.value);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -175,7 +176,9 @@ const fetchYearOptions = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const filterYear = () => {
|
const filterYear = () => {
|
||||||
fetchPlacementData(searchYear.value);
|
if (searchYear.value !== null) {
|
||||||
|
fetchPlacementData(searchYear.value);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ดูรายการสอบแข่งขัน หน้าต่อไป
|
// ดูรายการสอบแข่งขัน หน้าต่อไป
|
||||||
|
|
@ -233,11 +236,10 @@ const searchFilterTable = async () => {
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
if (examType.value !== undefined && examType.value !== null) {
|
if (examType.value !== undefined && examType.value !== null) {
|
||||||
await DataStore.DataUpdateMain(
|
await DataStore.DataUpdateMain(
|
||||||
examTime.value,
|
examTime.value == "ทั้งหมด" ? "all" : examTime.value,
|
||||||
examType.value,
|
examType.value == "ทั้งหมด" ? "all" : examType.value,
|
||||||
expiredAccount.value
|
expiredAccount.value
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataArr: any = [];
|
const dataArr: any = [];
|
||||||
await DataStore.DataMainUpdate.map((e: any) => {
|
await DataStore.DataMainUpdate.map((e: any) => {
|
||||||
dataArr.push({
|
dataArr.push({
|
||||||
|
|
@ -278,6 +280,49 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
};
|
};
|
||||||
|
// filter ใน dropdown ครั้งที่
|
||||||
|
const examTimeOP2 = ref<any[]>([]);
|
||||||
|
function filterFnexamTime(val: string, update: any) {
|
||||||
|
if (val === "") {
|
||||||
|
update(() => {
|
||||||
|
examTimeOP2.value = examTimeOP;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
examTimeOP2.value = examTimeOP.filter(
|
||||||
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const examTypeOP2 = ref<any[]>([]);
|
||||||
|
function filterFnExamtype(val: string, update: any) {
|
||||||
|
if (val === "") {
|
||||||
|
update(() => {
|
||||||
|
examTypeOP2.value = examTypeOP.value;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
examTypeOP2.value = examTypeOP.value.filter(
|
||||||
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const yearOptionsFn = ref<any>([]);
|
||||||
|
function filterFnYear(val: string, update: any) {
|
||||||
|
if (val === "") {
|
||||||
|
update(() => {
|
||||||
|
yearOptionsFn.value = yearOptions;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
yearOptionsFn.value = yearOptions.filter(
|
||||||
|
(e: any) => e.name.toString().search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -294,7 +339,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
dense
|
dense
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="yearOptions"
|
:options="yearOptionsFn"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -304,7 +349,14 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="filterYear"
|
@update:model-value="filterYear"
|
||||||
/>
|
use-input
|
||||||
|
@filter="filterFnYear"
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
|
@ -351,7 +403,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
dense
|
dense
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="examTimeOP"
|
:options="examTimeOP2"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -361,7 +413,17 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="searchFilterTable"
|
@update:model-value="searchFilterTable"
|
||||||
/>
|
@filter="filterFnexamTime"
|
||||||
|
use-input
|
||||||
|
input-debounce="0"
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
v-model="examType"
|
v-model="examType"
|
||||||
|
|
@ -370,7 +432,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="examTypeOP"
|
:options="examTypeOP2"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -379,7 +441,17 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="searchFilterTable"
|
@update:model-value="searchFilterTable"
|
||||||
/>
|
@filter="filterFnExamtype"
|
||||||
|
use-input
|
||||||
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
||||||
v-model="expiredAccount"
|
v-model="expiredAccount"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||||
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
||||||
import type { OtherdataInterface,resApiData } from "@/modules/05_placement/interface/response/OhterMain";
|
import type {
|
||||||
|
OtherdataInterface,
|
||||||
|
resApiData,
|
||||||
|
} from "@/modules/05_placement/interface/response/OhterMain";
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -76,7 +79,7 @@ const fecthOther = async () => {
|
||||||
.get(config.API.otherByid(paramsId.toString()))
|
.get(config.API.otherByid(paramsId.toString()))
|
||||||
.then((res: resApiData) => {
|
.then((res: resApiData) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
Otherdata.value = data
|
Otherdata.value = data;
|
||||||
avatar.value = data.avatar ?? "";
|
avatar.value = data.avatar ?? "";
|
||||||
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
||||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||||
|
|
@ -85,19 +88,23 @@ const fecthOther = async () => {
|
||||||
responseData.value.profileId = data.profileId;
|
responseData.value.profileId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.id = data.id ?? "";
|
responseData.value.id = data.id ?? "";
|
||||||
responseData.value.organizationPositionOld = data.organizationPositionOld ?? "";
|
responseData.value.organizationPositionOld =
|
||||||
|
data.organizationPositionOld ?? "";
|
||||||
responseData.value.positionLevelOld = data.positionLevelOld ?? "";
|
responseData.value.positionLevelOld = data.positionLevelOld ?? "";
|
||||||
responseData.value.positionNumberOld = data.positionNumberOld ?? "";
|
responseData.value.positionNumberOld = data.positionNumberOld ?? "";
|
||||||
responseData.value.positionTypeOld = data.positionTypeOld ?? "";
|
responseData.value.positionTypeOld = data.positionTypeOld ?? "";
|
||||||
responseData.value.reason = data.reason ?? "";
|
responseData.value.reason = data.reason ?? "";
|
||||||
responseData.value.status = data.status ?? "";
|
responseData.value.status = data.status ?? "";
|
||||||
responseData.value.fullname = `${data.prefix ?? "-"}${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
responseData.value.fullname = `${data.prefix ?? "-"}${
|
||||||
|
data.firstname ?? "-"
|
||||||
|
} ${data.lastname ?? "-"}`;
|
||||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
posNo.value = data.positionNumberOld ?? "";
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
salary.value = data.amountOld ?? "";
|
salary.value = data.amountOld ?? "";
|
||||||
date.value = data.positionDate !== null ? new Date(data.positionDate) : null;
|
date.value =
|
||||||
|
data.positionDate !== null ? new Date(data.positionDate) : null;
|
||||||
reason.value = data.reason ?? "";
|
reason.value = data.reason ?? "";
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -124,7 +131,7 @@ const clickEdit = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----(update)-----//
|
//-----(update)-----//
|
||||||
const saveOther = async () => {
|
const saveOther = async () => {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -155,7 +162,7 @@ const saveOther = async () => {
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
fecthOther();
|
fecthOther();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
};
|
};
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -172,8 +179,16 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat
|
<q-btn
|
||||||
color="primary" class="q-mr-sm" @click="router.push(`/other`)" />
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="router.push(`/other`)"
|
||||||
|
/>
|
||||||
รายละเอียดรายการอื่นๆ {{ responseData.fullname }}
|
รายละเอียดรายการอื่นๆ {{ responseData.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
|
|
@ -182,8 +197,15 @@ onMounted(async () => {
|
||||||
{{ responseData.fullname }}
|
{{ responseData.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm"
|
<q-btn
|
||||||
label="ดูข้อมูลทะเบียนประวัติ" @click="router.push(`/registry/${responseData.profileId}`)" />
|
outline
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-open-in-new"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
|
@click="router.push(`/registry/${responseData.profileId}`)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -232,14 +254,36 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline"
|
<q-btn
|
||||||
class="q-px-sm" label="แก้ไข" style="width: 80px" @click="edit = !edit" />
|
outline
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-file-edit-outline"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="แก้ไข"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="edit = !edit"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
|
<q-btn
|
||||||
style="width: 80px" @click="clickEdit" />
|
outline
|
||||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก"
|
color="public"
|
||||||
style="width: 80px" @click="cancel()" />
|
dense
|
||||||
|
class="q-px-sm"
|
||||||
|
label="บันทึก"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="clickEdit"
|
||||||
|
/>
|
||||||
|
<q-btn
|
||||||
|
outline
|
||||||
|
color="red"
|
||||||
|
dense
|
||||||
|
class="q-px-sm"
|
||||||
|
label="ยกเลิก"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="cancel()"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -249,60 +293,122 @@ onMounted(async () => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="organizationPositionOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่งประเภท'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionTypeOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่งประเภท'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ระดับ'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionLevelOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ระดับ'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'เลขที่'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="posNo"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เลขที่'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<CurruncyInput v-model="salary" label="เงินเดือน" :edit="edit"
|
<CurruncyInput
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]" />
|
v-model="salary"
|
||||||
|
label="เงินเดือน"
|
||||||
|
:edit="edit"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'"
|
<datepicker
|
||||||
autoApply :enableTimePicker="false" week-start="0" >
|
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="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" :model-value="date !== null ? date2Thai(date) : null"
|
:class="getClass(edit)"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space
|
:outlined="edit"
|
||||||
:label="`${'ตั้งแต่วัน'}`" >
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer"
|
<q-icon
|
||||||
:style=" edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)' " >
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:style="
|
||||||
|
edit
|
||||||
|
? 'color: var(--q-primary)'
|
||||||
|
: 'color: var(--q-grey)'
|
||||||
|
"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -311,9 +417,18 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'หมายเหตุ '}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="reason"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หมายเหตุ '}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import type {
|
||||||
Information,
|
Information,
|
||||||
DataOption,
|
DataOption,
|
||||||
DataOptioninfo,
|
DataOptioninfo,
|
||||||
docList
|
docList,
|
||||||
} from "@/modules/04_registry/components/profileType";
|
} from "@/modules/04_registry/components/profileType";
|
||||||
|
|
||||||
import { defaultInformation } from "@/modules/04_registry/components/profileType";
|
import { defaultInformation } from "@/modules/04_registry/components/profileType";
|
||||||
|
|
@ -272,7 +272,7 @@ const cancel = async () => {
|
||||||
edit.value = !edit.value;
|
edit.value = !edit.value;
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
await getData();
|
await getData();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -871,7 +871,8 @@ onMounted(async () => {
|
||||||
:label="`${'ประเภทการจ้าง'}`"
|
:label="`${'ประเภทการจ้าง'}`"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps' ) " />
|
@filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps' ) "
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="col-xs-6 col-sm-3 col-md-3"
|
class="col-xs-6 col-sm-3 col-md-3"
|
||||||
|
|
@ -896,10 +897,11 @@ onMounted(async () => {
|
||||||
:label="`${'ประเภทลูกจ้าง'}`"
|
:label="`${'ประเภทลูกจ้าง'}`"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeClassOps' ) " />
|
@filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'employeeClassOps' ) "
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
ตำแหน่งและหน่วยงานเดิม
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -984,6 +986,8 @@ onMounted(async () => {
|
||||||
currency: 'THB',
|
currency: 'THB',
|
||||||
}"
|
}"
|
||||||
:label="`${'เงินเดือน'}`"
|
:label="`${'เงินเดือน'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
@ -995,7 +999,6 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="reason"
|
v-model="reason"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'หมายเหตุ '}`"
|
:label="`${'หมายเหตุ '}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
div<script setup lang="ts">
|
div
|
||||||
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
|
@ -9,7 +10,7 @@ import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import type { ResponseData } from "@/modules/05_placement/interface/response/officer";
|
import type { ResponseData } from "@/modules/05_placement/interface/response/officer";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -48,6 +49,7 @@ const positionLevelOld = ref<string>("");
|
||||||
const positionNumberOld = ref<string>("");
|
const positionNumberOld = ref<string>("");
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
const avatar = ref<string>("");
|
const avatar = ref<string>("");
|
||||||
|
const dateRepatriation = ref<Date | null>(null);
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -75,6 +77,7 @@ const getData = async () => {
|
||||||
positionLevelOld.value = data.positionLevelOld;
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
positionNumberOld.value = data.positionNumberOld;
|
positionNumberOld.value = data.positionNumberOld;
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
|
dateRepatriation.value = data.dateRepatriation;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -108,7 +111,7 @@ const conditionSave = async () => {
|
||||||
const cancelBtn = () => {
|
const cancelBtn = () => {
|
||||||
edit.value = !edit;
|
edit.value = !edit;
|
||||||
getData();
|
getData();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
};
|
};
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
const body = {
|
const body = {
|
||||||
|
|
@ -120,11 +123,12 @@ const saveData = async () => {
|
||||||
positionLevelOld: positionLevelOld.value,
|
positionLevelOld: positionLevelOld.value,
|
||||||
positionNumberOld: posNo.value,
|
positionNumberOld: posNo.value,
|
||||||
amountOld: salary.value,
|
amountOld: salary.value,
|
||||||
|
dateRepatriation: dateRepatriation.value,
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.repatriationMainEdit(dataId), body)
|
.put(config.API.repatriationMainEdit(dataId), body)
|
||||||
.then((res: any) => {
|
.then(() => {
|
||||||
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
})
|
})
|
||||||
|
|
@ -144,8 +148,16 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat
|
<q-btn
|
||||||
color="primary" class="q-mr-sm" @click="router.push(`/repatriate`)" />
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="router.push(`/repatriate`)"
|
||||||
|
/>
|
||||||
รายละเอียดการส่งตัวกลับ {{ fullname }}
|
รายละเอียดการส่งตัวกลับ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
|
|
@ -154,8 +166,15 @@ onMounted(async () => {
|
||||||
{{ fullname }}
|
{{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm"
|
<q-btn
|
||||||
label="ดูข้อมูลทะเบียนประวัติ" @click="router.push(`/registry/${personId}`)" />
|
outline
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-open-in-new"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
|
@click="router.push(`/registry/${personId}`)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -199,14 +218,37 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline"
|
<q-btn
|
||||||
class="q-px-sm" label="แก้ไข" style="width: 80px" @click="edit = !edit"
|
outline
|
||||||
v-if="!(status == 'REPORT' || status == 'DONE')"/>
|
color="primary"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-file-edit-outline"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="แก้ไข"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="edit = !edit"
|
||||||
|
v-if="!(status == 'REPORT' || status == 'DONE')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
|
<q-btn
|
||||||
style="width: 80px" @click="conditionSave" />
|
outline
|
||||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="cancelBtn" />
|
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="cancelBtn"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -215,67 +257,191 @@ onMounted(async () => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
<q-input
|
||||||
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="organizationPositionOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row ">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
<q-input
|
||||||
v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'ตำแหน่งประเภท'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionTypeOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่งประเภท'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row ">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
<q-input
|
||||||
v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'ระดับ'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="positionLevelOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ระดับ'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row ">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
<q-input
|
||||||
v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'เลขที่'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="posNo"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เลขที่'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row ">
|
<div class="col-xs-6 col-sm-3 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<CurrencyInput v-model="salary" :edit="edit" :options="{ currency: 'THB', }" :label="`${'เงินเดือน'}`" />
|
<CurrencyInput
|
||||||
|
v-model="salary"
|
||||||
|
:edit="edit"
|
||||||
|
:options="{ currency: 'THB' }"
|
||||||
|
:label="`${'เงินเดือน'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row ">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<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="organization"
|
v-model="organization"
|
||||||
:rules="[ (val) => !!val || `${'กรุณากรอกหน่วยงานที่ให้ช่วยราชการ'}`, ]" hide-bottom-space
|
:rules="[
|
||||||
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`" />
|
(val) => !!val || `${'กรุณากรอกหน่วยงานที่ให้ช่วยราชการ'}`,
|
||||||
|
]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 row ">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'"
|
<datepicker
|
||||||
autoApply :enableTimePicker="false" week-start="0" >
|
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="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" :model-value="date !== null ? date2Thai(date) : null"
|
:class="getClass(edit)"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space
|
:outlined="edit"
|
||||||
:label="`${'ตั้งแต่วัน'}`" >
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" :style="
|
<q-icon
|
||||||
edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)'" >
|
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-xs-6 col-sm-4 row">
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
:readonly="!edit"
|
||||||
|
v-model="dateRepatriation"
|
||||||
|
: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
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
:model-value="
|
||||||
|
dateRepatriation !== null
|
||||||
|
? date2Thai(dateRepatriation)
|
||||||
|
: 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>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -284,9 +450,18 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
<q-input
|
||||||
v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'หมายเหตุ '}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="reason"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หมายเหตุ '}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type { QTableProps, QForm } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
TypeFile,
|
||||||
ResponseDataDetail,
|
ResponseDataDetail,
|
||||||
rowFile
|
rowFile,
|
||||||
} from "@/modules/05_placement/interface/response/Transfer";
|
} from "@/modules/05_placement/interface/response/Transfer";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -275,10 +275,10 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
edit.value = false
|
edit.value = false;
|
||||||
getData()
|
getData();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
}
|
};
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
|
@ -537,9 +537,7 @@ onMounted(async () => {
|
||||||
<div class="row bg-white q-col-gutter-y-md">
|
<div class="row bg-white q-col-gutter-y-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -609,6 +607,8 @@ onMounted(async () => {
|
||||||
currency: 'THB',
|
currency: 'THB',
|
||||||
}"
|
}"
|
||||||
:label="`${'เงินเดือน'}`"
|
:label="`${'เงินเดือน'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -687,7 +687,6 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="reason"
|
v-model="reason"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'หมายเหตุ '}`"
|
:label="`${'หมายเหตุ '}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ const {
|
||||||
success,
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
@ -75,8 +74,7 @@ const getData = async () => {
|
||||||
positionNumberOld.value = data.positionNumberOld;
|
positionNumberOld.value = data.positionNumberOld;
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {})
|
||||||
})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -106,7 +104,7 @@ const conditionSave = async () => {
|
||||||
const cancelBtn = () => {
|
const cancelBtn = () => {
|
||||||
edit.value = !edit;
|
edit.value = !edit;
|
||||||
getData();
|
getData();
|
||||||
myForm.value?.resetValidation()
|
myForm.value?.resetValidation();
|
||||||
};
|
};
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
const body = {
|
const body = {
|
||||||
|
|
@ -143,16 +141,31 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary"
|
<q-btn
|
||||||
class="q-mr-sm" @click="router.push(`/help-government`)" />
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="router.push(`/help-government`)"
|
||||||
|
/>
|
||||||
รายละเอียดการช่วยราชการ {{ fullname }}
|
รายละเอียดการช่วยราชการ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<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="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm"
|
<q-btn
|
||||||
label="ดูข้อมูลทะเบียนประวัติ" @click="router.push(`/registry/${profileId}`)" />
|
outline
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-open-in-new"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
|
@click="router.push(`/registry/${profileId}`)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -196,15 +209,37 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline"
|
<q-btn
|
||||||
class="q-px-sm" label="แก้ไข" style="width: 80px" @click="edit = !edit"
|
outline
|
||||||
v-if="!(status == 'REPORT' || status == 'DONE')" />
|
color="primary"
|
||||||
|
dense
|
||||||
|
icon-right="mdi-file-edit-outline"
|
||||||
|
class="q-px-sm"
|
||||||
|
label="แก้ไข"
|
||||||
|
style="width: 80px"
|
||||||
|
@click="edit = !edit"
|
||||||
|
v-if="!(status == 'REPORT' || status == 'DONE')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px"
|
<q-btn
|
||||||
@click="conditionSave" />
|
outline
|
||||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก"
|
color="public"
|
||||||
style="width: 80px" @click="cancelBtn" />
|
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="cancelBtn"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -213,40 +248,81 @@ onMounted(async () => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'ตำแหน่ง'}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="organizationPositionOld"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตำแหน่ง'}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-4 row ">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="organization" :rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]" hide-bottom-space
|
:class="getClass(edit)"
|
||||||
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="organization"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-4 row ">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="dateStart" :locale="'th'"
|
<datepicker
|
||||||
autoApply :enableTimePicker="false" week-start="0" >
|
menu-class-name="modalfix"
|
||||||
|
:readonly="!edit"
|
||||||
|
v-model="dateStart"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense :readonly="!edit"
|
<q-input
|
||||||
lazy-rules :borderless="!edit" :rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:class="getClass(edit)"
|
||||||
:model-value=" dateStart !== null ? date2Thai(dateStart) : null "
|
:outlined="edit"
|
||||||
hide-bottom-space :label="`${'ตั้งแต่วัน'}`" >
|
dense
|
||||||
|
:readonly="!edit"
|
||||||
|
lazy-rules
|
||||||
|
:borderless="!edit"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||||
|
:model-value="
|
||||||
|
dateStart !== null ? date2Thai(dateStart) : null
|
||||||
|
"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer"
|
<q-icon
|
||||||
:style=" edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)' " >
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:style="
|
||||||
|
edit
|
||||||
|
? 'color: var(--q-primary)'
|
||||||
|
: 'color: var(--q-grey)'
|
||||||
|
"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -254,21 +330,43 @@ onMounted(async () => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-4 row ">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="dateEnd" :locale="'th'"
|
<datepicker
|
||||||
autoApply :enableTimePicker="false" week-start="0" >
|
menu-class-name="modalfix"
|
||||||
|
:readonly="!edit"
|
||||||
|
v-model="dateEnd"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :readonly="!edit" :class="getClass(edit)" :outlined="edit" dense
|
<q-input
|
||||||
lazy-rules :borderless="!edit" :model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
:readonly="!edit"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space :label="`${'ถึงวันที่'}`" >
|
:class="getClass(edit)"
|
||||||
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:borderless="!edit"
|
||||||
|
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'ถึงวันที่'}`"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer"
|
<q-icon
|
||||||
:style=" edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)' "
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:style="
|
||||||
|
edit
|
||||||
|
? 'color: var(--q-primary)'
|
||||||
|
: 'color: var(--q-grey)'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -278,9 +376,18 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit"
|
<q-input
|
||||||
:borderless="!edit" v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
:class="getClass(edit)"
|
||||||
hide-bottom-space :label="`${'หมายเหตุ '}`" type="textarea" />
|
:outlined="edit"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:readonly="!edit"
|
||||||
|
:borderless="!edit"
|
||||||
|
v-model="reason"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'หมายเหตุ '}`"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -17,7 +17,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogMessageNotify
|
dialogMessageNotify,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const assignId = ref<string>(route.params.form.toString());
|
const assignId = ref<string>(route.params.form.toString());
|
||||||
|
|
@ -27,7 +27,7 @@ const assign = ref<any>([]);
|
||||||
const mentors = ref<any>([]);
|
const mentors = ref<any>([]);
|
||||||
const commander = ref<any>([]);
|
const commander = ref<any>([]);
|
||||||
const status = ref<boolean>(true);
|
const status = ref<boolean>(true);
|
||||||
const ID = ref<string>('')
|
const ID = ref<string>("");
|
||||||
const date_start = ref<Date>(new Date());
|
const date_start = ref<Date>(new Date());
|
||||||
const date_finish = ref<Date>();
|
const date_finish = ref<Date>();
|
||||||
const develop = ref<number>();
|
const develop = ref<number>();
|
||||||
|
|
@ -61,13 +61,16 @@ const fecthAssign = async (id: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluateReportcreate(id))
|
.get(config.API.evaluateReportcreate(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
assign.value = res.data.data.assign
|
assign.value = res.data.data.assign;
|
||||||
person.value = res.data.data.person
|
person.value = res.data.data.person;
|
||||||
mentors.value = res.data.data.mentors;
|
mentors.value = res.data.data.mentors;
|
||||||
date_start.value = res.data.data.assign.date_start;
|
date_start.value = res.data.data.assign.date_start;
|
||||||
date_finish.value = res.data.data.assign.date_finish;
|
date_finish.value = res.data.data.assign.date_finish;
|
||||||
|
|
||||||
if (res.data.data.result.develop_complete != null && res.data.data.result.evaluate_result != null) {
|
if (
|
||||||
|
res.data.data.result.develop_complete != null &&
|
||||||
|
res.data.data.result.evaluate_result != null
|
||||||
|
) {
|
||||||
develop.value = res.data.data.result.develop_complete;
|
develop.value = res.data.data.result.develop_complete;
|
||||||
result.value = res.data.data.result.evaluate_result;
|
result.value = res.data.data.result.evaluate_result;
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +97,7 @@ const fecthResult = async (id: string) => {
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
if (res.data.data != null) {
|
if (res.data.data != null) {
|
||||||
const data = await res.data.data.evaluate;
|
const data = await res.data.data.evaluate;
|
||||||
ID.value = data.id
|
ID.value = data.id;
|
||||||
date_start.value = data.date_start;
|
date_start.value = data.date_start;
|
||||||
date_finish.value = data.date_finish;
|
date_finish.value = data.date_finish;
|
||||||
develop.value = await Number(data.develop_complete);
|
develop.value = await Number(data.develop_complete);
|
||||||
|
|
@ -106,10 +109,10 @@ const fecthResult = async (id: string) => {
|
||||||
status.value = false;
|
status.value = false;
|
||||||
action.value = "edit";
|
action.value = "edit";
|
||||||
expand_month.value = data.expand_month;
|
expand_month.value = data.expand_month;
|
||||||
changeReson52(Number(data.pass_result))
|
changeReson52(Number(data.pass_result));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => { });
|
.catch((e) => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
// part new
|
// part new
|
||||||
|
|
@ -127,8 +130,6 @@ const optionsResult = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const savaForm = async () => {
|
const savaForm = async () => {
|
||||||
await myForm.value.validate().then((result: boolean) => {
|
await myForm.value.validate().then((result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
@ -185,7 +186,8 @@ const postData = async (action: string) => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
}).finally(() => {
|
})
|
||||||
|
.finally(() => {
|
||||||
status.value = false;
|
status.value = false;
|
||||||
fecthResult(assignId.value);
|
fecthResult(assignId.value);
|
||||||
});
|
});
|
||||||
|
|
@ -210,19 +212,19 @@ const selectRuslt = () => {
|
||||||
expand_month.value = "";
|
expand_month.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
changeReson52(Number(result.value))
|
changeReson52(Number(result.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
function changeReson52(val: number) {
|
function changeReson52(val: number) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 1:
|
case 1:
|
||||||
reson52.value = "เห็นควรให้รับราชการต่อไป"
|
reson52.value = "เห็นควรให้รับราชการต่อไป";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
reson52.value = "เห็นควรให้ออกจากราชการ"
|
reson52.value = "เห็นควรให้ออกจากราชการ";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน`
|
reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน`;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -234,22 +236,57 @@ onMounted(() => {
|
||||||
fecthAssign(assignId.value);
|
fecthAssign(assignId.value);
|
||||||
fecthResult(assignId.value);
|
fecthResult(assignId.value);
|
||||||
});
|
});
|
||||||
|
const optionsFn = ref<any>([]);
|
||||||
|
function filterFnOptions(val: string, update: any) {
|
||||||
|
if (val == "") {
|
||||||
|
update(() => {
|
||||||
|
optionsFn.value = options;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
optionsFn.value = options.filter((e: any) => e.label.search(val) !== -1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const optionsResultFn = ref<any>([])
|
||||||
|
function filterFnOptionsResult(val: string, update: any) {
|
||||||
|
if (val == "") {
|
||||||
|
update(() => {
|
||||||
|
optionsResultFn.value = optionsResult;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
optionsResultFn.value = optionsResult.filter((e: any) => e.label.search(val) !== -1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
||||||
<div>แบบรายงานการประเมินฯ</div>
|
<div>แบบรายงานการประเมินฯ</div>
|
||||||
<q-btn v-if="!status" size="12px" flat dense icon="mdi-download" color="primary">
|
<q-btn
|
||||||
|
v-if="!status"
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
icon="mdi-download"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
||||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
<q-item-section avatar
|
||||||
|
><q-icon color="red" name="mdi-file-pdf"
|
||||||
|
/></q-item-section>
|
||||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
||||||
<q-item-section avatar><q-icon color="blue" name="mdi-file-word" /></q-item-section>
|
<q-item-section avatar
|
||||||
|
><q-icon color="blue" name="mdi-file-word"
|
||||||
|
/></q-item-section>
|
||||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
@ -282,9 +319,7 @@ onMounted(() => {
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||||
ประเมินผล
|
ประเมินผล
|
||||||
<span class="text-primary q-pr-sm">
|
<span class="text-primary q-pr-sm"> ครั้งที่ 1 </span>
|
||||||
ครั้งที่ 1
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
|
|
@ -299,8 +334,16 @@ onMounted(() => {
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker menu-class-name="modalfix" v-model="date_start" :locale="'th'" autoApply borderless
|
<datepicker
|
||||||
:readonly="!status" :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="date_start"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -308,10 +351,23 @@ onMounted(() => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_start != null ? date2Thai(date_start) : null
|
<q-input
|
||||||
" :label="`${'ระหว่างวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
date_start != null ? date2Thai(date_start) : null
|
||||||
|
"
|
||||||
|
:label="`${'ระหว่างวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -319,8 +375,16 @@ onMounted(() => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker menu-class-name="modalfix" v-model="date_finish" :locale="'th'" autoApply :readonly="!status"
|
<datepicker
|
||||||
borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="date_finish"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:readonly="!status"
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -328,10 +392,23 @@ onMounted(() => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_finish != null ? date2Thai(date_finish) : null
|
<q-input
|
||||||
" :label="`${'ถึงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
date_finish != null ? date2Thai(date_finish) : null
|
||||||
|
"
|
||||||
|
:label="`${'ถึงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -344,27 +421,78 @@ onMounted(() => {
|
||||||
<div class="col-12 row q-mt-xs">
|
<div class="col-12 row q-mt-xs">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select :rules="[
|
<q-select
|
||||||
(val) =>
|
:rules="[
|
||||||
!!val ||
|
(val) =>
|
||||||
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
!!val ||
|
||||||
]" hide-bottom-space :options="options" class="col-xs-12 col-sm-6" dense borderless :disable="!status"
|
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
emit-value map-options option-label="label" option-value="value" outlined v-model="develop"
|
]"
|
||||||
label="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ" />
|
hide-bottom-space
|
||||||
|
:options="optionsFn"
|
||||||
|
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="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ"
|
||||||
|
@filter="filterFnOptions"
|
||||||
|
use-input
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-select class="col-sm-12" :rules="[
|
<q-select
|
||||||
(val) =>
|
class="col-sm-12"
|
||||||
!!val ||
|
:rules="[
|
||||||
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
(val) =>
|
||||||
]" hide-bottom-space :options="optionsResult" :disable="!status" dense borderless emit-value map-options
|
!!val ||
|
||||||
option-label="label" option-value="value" outlined v-model="result"
|
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ" @update:model-value="selectRuslt" />
|
]"
|
||||||
|
hide-bottom-space
|
||||||
|
:options="optionsResultFn"
|
||||||
|
:disable="!status"
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="label"
|
||||||
|
option-value="value"
|
||||||
|
outlined
|
||||||
|
v-model="result"
|
||||||
|
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ"
|
||||||
|
@update:model-value="selectRuslt"
|
||||||
|
use-input
|
||||||
|
@filter="filterFnOptionsResult"
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-mt-xs" v-if="result === 3">
|
<div class="row q-mt-xs" v-if="result === 3">
|
||||||
<q-input outlined dense v-model="expand_month" label="จำนวนเดือน"
|
<q-input
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']" type="number" />
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="expand_month"
|
||||||
|
label="จำนวนเดือน"
|
||||||
|
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']"
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -373,14 +501,34 @@ onMounted(() => {
|
||||||
<div class="col-12 row q-mt-md">
|
<div class="col-12 row q-mt-md">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input hide-bottom-space dense borderless outlined :disable="!status" class="bg-white" type="textarea"
|
<q-input
|
||||||
v-model="reson" lazy-rules label="เหตุผล"
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val && val.length > 0 || 'กรุณาระบุเหตุผล']" />
|
dense
|
||||||
|
borderless
|
||||||
|
outlined
|
||||||
|
:disable="!status"
|
||||||
|
class="bg-white"
|
||||||
|
type="textarea"
|
||||||
|
v-model="reson"
|
||||||
|
lazy-rules
|
||||||
|
label="เหตุผล"
|
||||||
|
:rules="[(val) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input hide-bottom-space dense borderless outlined disable class="bg-white" type="textarea"
|
<q-input
|
||||||
v-model="reson52" lazy-rules label="ความเห็นของผู้มีอํานาจสั่งบรรจุตามมาตรา 52"
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val && val.length > 0 || 'กรุณาระบุเหตุผล']" />
|
dense
|
||||||
|
borderless
|
||||||
|
outlined
|
||||||
|
disable
|
||||||
|
class="bg-white"
|
||||||
|
type="textarea"
|
||||||
|
v-model="reson52"
|
||||||
|
lazy-rules
|
||||||
|
label="ความเห็นของผู้มีอํานาจสั่งบรรจุตามมาตรา 52"
|
||||||
|
:rules="[(val) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -392,14 +540,31 @@ onMounted(() => {
|
||||||
<div class="row col-12 q-gutter-lg q-mt-none">
|
<div class="row col-12 q-gutter-lg q-mt-none">
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-12 text-top2 row items-center">
|
<div class="col-12 text-top2 row items-center">
|
||||||
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ/ผู้มีอํานาจสั่งบรรจุตามมาตรา 52
|
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ/ผู้มีอํานาจสั่งบรรจุตามมาตรา
|
||||||
|
52
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id" outlined :options="commander"
|
<q-select
|
||||||
label="ชื่อ-นามสกุล" option-label="name" disable />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id"
|
||||||
|
outlined
|
||||||
|
:options="commander"
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
option-label="name"
|
||||||
|
disable
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="chairman_dated" :locale="'th'" :readonly="!status" autoApply
|
<datepicker
|
||||||
borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="chairman_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
:readonly="!status"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -407,10 +572,23 @@ onMounted(() => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="chairman_dated != null ? date2Thai(chairman_dated) : null
|
<q-input
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
outlined
|
||||||
|
dense
|
||||||
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
chairman_dated != null ? date2Thai(chairman_dated) : null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -426,11 +604,27 @@ onMounted(() => {
|
||||||
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id2" outlined label="ชื่อ-นามสกุล" disable
|
<q-select
|
||||||
:options="optionDirector" option-label="name" />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id2"
|
||||||
|
outlined
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
disable
|
||||||
|
:options="optionDirector"
|
||||||
|
option-label="name"
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="director1_dated" :locale="'th'" autoApply borderless
|
<datepicker
|
||||||
:readonly="!status" :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="director1_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -438,12 +632,25 @@ onMounted(() => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director1_dated != null
|
<q-input
|
||||||
? date2Thai(director1_dated)
|
outlined
|
||||||
: null
|
dense
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
director1_dated != null
|
||||||
|
? date2Thai(director1_dated)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -459,11 +666,27 @@ onMounted(() => {
|
||||||
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id3" outlined label="ชื่อ-นามสกุล"
|
<q-select
|
||||||
:options="optionDirector" disable option-label="name" />
|
class="col-xs-12 col-sm-8"
|
||||||
|
dense
|
||||||
|
v-model="director_id3"
|
||||||
|
outlined
|
||||||
|
label="ชื่อ-นามสกุล"
|
||||||
|
:options="optionDirector"
|
||||||
|
disable
|
||||||
|
option-label="name"
|
||||||
|
/>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker menu-class-name="modalfix" v-model="director2_dated" :locale="'th'" autoApply
|
<datepicker
|
||||||
:readonly="!status" borderless :enableTimePicker="false" week-start="0">
|
menu-class-name="modalfix"
|
||||||
|
v-model="director2_dated"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:readonly="!status"
|
||||||
|
borderless
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -471,12 +694,25 @@ onMounted(() => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director2_dated != null
|
<q-input
|
||||||
? date2Thai(director2_dated)
|
outlined
|
||||||
: null
|
dense
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
:disable="!status"
|
||||||
|
class="full-width datepicker col-3"
|
||||||
|
:model-value="
|
||||||
|
director2_dated != null
|
||||||
|
? date2Thai(director2_dated)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,15 @@
|
||||||
import { ref, useAttrs, onMounted } from "vue";
|
import { ref, useAttrs, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useTransferDataStore } from "@/modules/05_placement/store"
|
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { FormMainProbation, FormMainProbation2,mapData,OpfillterType,CriteriaType } from "@/modules/05_placement/interface/request/Main";
|
import type {
|
||||||
|
FormMainProbation,
|
||||||
|
FormMainProbation2,
|
||||||
|
mapData,
|
||||||
|
OpfillterType,
|
||||||
|
CriteriaType,
|
||||||
|
} from "@/modules/05_placement/interface/request/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
|
@ -18,7 +24,7 @@ const rows2 = ref<FormMainProbation2[]>([]);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const fillter = ref<number>(0);
|
const fillter = ref<number | null>(0);
|
||||||
const paging2 = ref<boolean>(true);
|
const paging2 = ref<boolean>(true);
|
||||||
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
|
|
@ -28,10 +34,10 @@ const probationlist = ref<any>([]);
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const fillterStatus = ref<any>([]);
|
const fillterStatus = ref<any>([]);
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
|
|
||||||
const storeFn = useTransferDataStore()
|
const storeFn = useTransferDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { statusProbationMain } = storeFn
|
const { statusProbationMain } = storeFn;
|
||||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||||
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
|
|
@ -205,6 +211,7 @@ const ProbationMainFilter = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Opfillter.value.sort((a: any, b: any) => a.id - b.id);
|
Opfillter.value.sort((a: any, b: any) => a.id - b.id);
|
||||||
|
Opfillter2.value = Opfillter.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateRows = (body: any) => {
|
const updateRows = (body: any) => {
|
||||||
|
|
@ -240,7 +247,7 @@ const getpersonalList = async () => {
|
||||||
dataUpdate.value = rows.value;
|
dataUpdate.value = rows.value;
|
||||||
ProbationMainFilter();
|
ProbationMainFilter();
|
||||||
})
|
})
|
||||||
.catch(() => { })
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -259,7 +266,7 @@ const fecthlistPersonal = async () => {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => { });
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
const fecthlistProbation = async (id: string, data: any) => {
|
const fecthlistProbation = async (id: string, data: any) => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -279,11 +286,11 @@ const fecthlistProbation = async (id: string, data: any) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const findlist = async (id: string) => {
|
const findlist = async (id: string) => {
|
||||||
let data:CriteriaType[] = [
|
let data: CriteriaType[] = [
|
||||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||||
{ criteriaType: "is_probation", criteriaValue: "true" },
|
{ criteriaType: "is_probation", criteriaValue: "true" },
|
||||||
];
|
];
|
||||||
let data2:CriteriaType[] = [
|
let data2: CriteriaType[] = [
|
||||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||||
{ criteriaType: "is_probation", criteriaValue: "false" },
|
{ criteriaType: "is_probation", criteriaValue: "false" },
|
||||||
];
|
];
|
||||||
|
|
@ -336,7 +343,6 @@ const clickClose = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
|
@ -359,6 +365,22 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getpersonalList();
|
getpersonalList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const Opfillter2 = ref<any[]>([]);
|
||||||
|
function filterFn(val: string, update: any) {
|
||||||
|
if (val == "") {
|
||||||
|
update(() => {
|
||||||
|
Opfillter2.value = Opfillter.value;
|
||||||
|
fillter.value = null;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update(() => {
|
||||||
|
Opfillter2.value = Opfillter.value.filter(
|
||||||
|
(e: any) => e.value.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -370,33 +392,103 @@ onMounted(async () => {
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-select class="col-5 q-mr-sm" v-model="fillter" label="สถานะ" dense map-options option-label="value"
|
<q-select
|
||||||
:options="Opfillter" option-value="id" lazy-rules hide-bottom-space :readonly="false" :borderless="false"
|
class="col-5 q-mr-sm"
|
||||||
:outlined="true" :hide-dropdown-icon="false" @update:model-value="updateRows(fillter)" />
|
v-model="fillter"
|
||||||
|
label="สถานะ"
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
option-label="value"
|
||||||
|
:options="Opfillter2"
|
||||||
|
option-value="id"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
:readonly="false"
|
||||||
|
:borderless="false"
|
||||||
|
:outlined="true"
|
||||||
|
:hide-dropdown-icon="false"
|
||||||
|
@update:model-value="updateRows(fillter)"
|
||||||
|
@filter="filterFn"
|
||||||
|
use-input
|
||||||
|
behavior="menu"
|
||||||
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
<div>
|
<div>
|
||||||
<q-btn @click="fecthlistPersonal" size="12px" flat round color="add" icon="mdi-plus">
|
<q-btn
|
||||||
|
@click="fecthlistPersonal"
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="add"
|
||||||
|
icon="mdi-plus"
|
||||||
|
>
|
||||||
<q-tooltip>เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ</q-tooltip>
|
<q-tooltip>เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
<q-input
|
||||||
debounce="300" placeholder="ค้นหา">
|
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>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
|
<q-select
|
||||||
emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
|
v-model="visibleColumns"
|
||||||
class="col-xs-12 col-sm-3 col-md-2" />
|
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>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-table ref="table" :columns="columns" :rows="rows" :filter="filterKeyword" row-key="Order" flat bordered
|
<q-table
|
||||||
:paging="true" dense class="custom-header-table" v-bind="attrs" :visible-columns="visibleColumns"
|
ref="table"
|
||||||
:pagination-label="paginationLabel" v-model:pagination="pagination">
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
|
row-key="Order"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
class="custom-header-table"
|
||||||
|
v-bind="attrs"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -405,8 +497,11 @@ onMounted(async () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer"
|
<q-tr
|
||||||
@click="router.push(`/probation/detail/${props.row.personal_id}`)">
|
:props="props"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="router.push(`/probation/detail/${props.row.personal_id}`)"
|
||||||
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
@ -418,8 +513,16 @@ onMounted(async () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination v-model="pagination.page" active-color="primary" color="dark" :max="scope.pagesNumber"
|
<q-pagination
|
||||||
:max-pages="5" size="sm" boundary-links direction-links></q-pagination>
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -429,23 +532,55 @@ onMounted(async () => {
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="width: 900px; max-width: 80vw">
|
<q-card style="width: 900px; max-width: 80vw">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<DialogHeader tittle="เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ " :close="clickClose" />
|
<DialogHeader
|
||||||
|
tittle="เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ "
|
||||||
|
:close="clickClose"
|
||||||
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pa-md q-col-gutter-sm">
|
<q-card-section class="q-pa-md q-col-gutter-sm">
|
||||||
<q-input class="col-12" standout dense v-model="filterKeyword2" ref="filterRef2" outlined debounce="300"
|
<q-input
|
||||||
placeholder="ค้นหา">
|
class="col-12"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword2"
|
||||||
|
ref="filterRef2"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword2 !== ''" name="clear" class="cursor-pointer" @click="resetFilter2" />
|
<q-icon
|
||||||
|
v-if="filterKeyword2 !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter2"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-table ref="table2" :columns="columns2" :rows="rows2" :filter="filterKeyword2" row-key="Order" flat bordered
|
<q-table
|
||||||
:paging="true" dense class="custom-header-table" v-bind="attrs" :pagination-label="paginationLabel2"
|
ref="table2"
|
||||||
v-model:pagination="pagination2">
|
:columns="columns2"
|
||||||
|
:rows="rows2"
|
||||||
|
:filter="filterKeyword2"
|
||||||
|
row-key="Order"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
class="custom-header-table"
|
||||||
|
v-bind="attrs"
|
||||||
|
:pagination-label="paginationLabel2"
|
||||||
|
v-model:pagination="pagination2"
|
||||||
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
|
@ -453,26 +588,50 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'" class="text-center">
|
<div v-else-if="col.name == 'status'" class="text-center">
|
||||||
<q-icon v-if="col.value === true" name="mdi-check" color="positive" size="sm" />
|
<q-icon
|
||||||
|
v-if="col.value === true"
|
||||||
|
name="mdi-check"
|
||||||
|
color="positive"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn dense class="q-px-md" outline color="primary" label="เพิ่ม" @click="clickAdd(props.row.id)">
|
<q-btn
|
||||||
|
dense
|
||||||
|
class="q-px-md"
|
||||||
|
outline
|
||||||
|
color="primary"
|
||||||
|
label="เพิ่ม"
|
||||||
|
@click="clickAdd(props.row.id)"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination v-model="pagination2.page" active-color="primary" color="dark" :max="scope.pagesNumber"
|
<q-pagination
|
||||||
:max-pages="5" size="sm" boundary-links direction-links></q-pagination>
|
v-model="pagination2.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ interface officerType {
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
dateEnd: string;
|
dateEnd: string;
|
||||||
dateStart: string;
|
dateStart: string;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
interface ResponseData {
|
interface ResponseData {
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -43,6 +45,7 @@ interface ResponseData {
|
||||||
positionNumberOld: string;
|
positionNumberOld: string;
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
dateRepatriation: Date
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -72,8 +75,8 @@ interface resHelpDetail {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export type {
|
export type {
|
||||||
officerType,
|
officerType,
|
||||||
ResponseData,
|
ResponseData,
|
||||||
resHelpDetail
|
resHelpDetail
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
||||||
filter_3: boolean
|
filter_3: boolean
|
||||||
) => {
|
) => {
|
||||||
DataMainUpdate.value = [];
|
DataMainUpdate.value = [];
|
||||||
|
|
||||||
if (filter_1 === "all" && filter_2 === "all" && filter_3 === false) {
|
if (filter_1 === "all" && filter_2 === "all" && filter_3 === false) {
|
||||||
// console.log('case 1');
|
// console.log('case 1');
|
||||||
// return DataMainUpdate.value = DataMainOrig.value; อันเก่า
|
// return DataMainUpdate.value = DataMainOrig.value; อันเก่า
|
||||||
|
|
@ -330,6 +331,6 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
statusText,statusProbationMain
|
statusText, statusProbationMain
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -281,9 +281,7 @@ const getClass = (val: boolean) => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -432,7 +430,6 @@ const getClass = (val: boolean) => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="reason"
|
v-model="reason"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'หมายเหตุ '}`"
|
:label="`${'หมายเหตุ '}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -283,9 +283,7 @@ const getClass = (val: boolean) => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -434,7 +432,6 @@ const getClass = (val: boolean) => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="reason"
|
v-model="reason"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'หมายเหตุ '}`"
|
:label="`${'หมายเหตุ '}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -283,9 +283,7 @@ const getClass = (val: boolean) => {
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
<div class="col-12 row bg-white q-col-gutter-md">
|
||||||
<div class="col-xs-12 row items-center">
|
<div class="col-xs-12 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="text-weight-bold text-grey">
|
<div class="text-weight-bold">ตำแหน่งและหน่วยงานเดิม</div>
|
||||||
ตำแหน่งและหน่วยงานเดิม
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -448,7 +446,6 @@ const getClass = (val: boolean) => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="reason"
|
v-model="reason"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'หมายเหตุ '}`"
|
:label="`${'หมายเหตุ '}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ const router = useRouter();
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
||||||
const fiscalyear = ref<number>();
|
const fiscalyear = ref<number>();
|
||||||
|
const yearOptionsFilter = ref<any>({
|
||||||
|
yearOptions: [],
|
||||||
|
});
|
||||||
const actionOption = ref<resMain[]>([]);
|
const actionOption = ref<resMain[]>([]);
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -69,15 +72,19 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
// ข้อมูลตาราง (จำลอง)
|
// ข้อมูลตาราง (จำลอง)
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const rows = ref<resMain[]>([]);
|
const rows = ref<resMain[]>([]);
|
||||||
const yearOptions = reactive<any[]>([]);
|
const yearOptions = ref<any[]>([]);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
filteryear();
|
filteryear();
|
||||||
});
|
});
|
||||||
// หาปีปัจจุบัน
|
// หาปีปัจจุบัน
|
||||||
const filteryear = () => {
|
const filteryear = () => {
|
||||||
yearOptions.push({ id: currentYear, name: currentYear + 543 });
|
yearOptions.value = [{ id: currentYear, name: currentYear + 543 }];
|
||||||
fiscalyear.value = yearOptions[0].id;
|
yearOptions.value.push({ id: currentYear, name: currentYear + 543 });
|
||||||
|
// fiscalyear.value = yearOptions[0].id;
|
||||||
|
|
||||||
|
yearOptionsFilter.value = [{ id: currentYear, name: currentYear + 543 }];
|
||||||
|
yearOptionsFilter.value.push({ id: currentYear, name: currentYear + 543 });
|
||||||
fetchRetirement(type.value, currentYear);
|
fetchRetirement(type.value, currentYear);
|
||||||
};
|
};
|
||||||
// ประกาศเกษียณอายุราชการ
|
// ประกาศเกษียณอายุราชการ
|
||||||
|
|
@ -136,6 +143,15 @@ const pagination = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const filterSelector = (val: any, update: Function, year: any) => {
|
||||||
|
update(() => {
|
||||||
|
yearOptions.value = yearOptionsFilter.value.filter(
|
||||||
|
(v: any) => v.name.valueOf(val.toLowerCase()) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
|
@ -211,7 +227,11 @@ const typeReportChangeName = (val: string) => {
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
style="min-width: 150px"
|
style="min-width: 150px"
|
||||||
|
@filter="(inputValue:any,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'yearOptions'
|
||||||
|
) "
|
||||||
/>
|
/>
|
||||||
|
<!-- use-input -->
|
||||||
<div>
|
<div>
|
||||||
<popupAdd
|
<popupAdd
|
||||||
:type="useStoreRetire.type"
|
:type="useStoreRetire.type"
|
||||||
|
|
|
||||||
|
|
@ -43,19 +43,7 @@ const typeinsigniaOptions = ref<any>(DataStore.typeinsigniaOptions);
|
||||||
const employeeClassOps = ref<any>(DataStore.employeeClassOps);
|
const employeeClassOps = ref<any>(DataStore.employeeClassOps);
|
||||||
// แจ้งเตือน
|
// แจ้งเตือน
|
||||||
const dialogWarn = ref<boolean>(false);
|
const dialogWarn = ref<boolean>(false);
|
||||||
const checkboxData = ref<any>([
|
const checkboxData = ref<any>([]);
|
||||||
{ id: 1, name: "มีโทษทางวินัย", val: true },
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: "ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน",
|
|
||||||
val: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: "ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)",
|
|
||||||
val: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
||||||
const filterOrganizationOP = ref<any>([]);
|
const filterOrganizationOP = ref<any>([]);
|
||||||
|
|
@ -644,7 +632,24 @@ const clickShowreson = (name: string, requestNote: string) => {
|
||||||
const clickCloseReson = () => {
|
const clickCloseReson = () => {
|
||||||
dialogNote.value = false;
|
dialogNote.value = false;
|
||||||
};
|
};
|
||||||
const clickShowWarn = () => {
|
const clickShowWarn = (
|
||||||
|
markDiscipline: boolean,
|
||||||
|
markLeave: boolean,
|
||||||
|
markRate: boolean
|
||||||
|
) => {
|
||||||
|
checkboxData.value = [
|
||||||
|
{ id: 1, name: "มีโทษทางวินัย", val: markDiscipline },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน",
|
||||||
|
val: markLeave,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)",
|
||||||
|
val: markRate,
|
||||||
|
},
|
||||||
|
];
|
||||||
dialogWarn.value = true;
|
dialogWarn.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -886,7 +891,6 @@ const clearInsigniaFilters = (name: string) => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th></q-th>
|
<q-th></q-th>
|
||||||
|
|
||||||
<q-th
|
<q-th
|
||||||
auto-width
|
auto-width
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -951,20 +955,26 @@ const clearInsigniaFilters = (name: string) => {
|
||||||
<q-tooltip>หมายเหตุ</q-tooltip>
|
<q-tooltip>หมายเหตุ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="warn" class="text-center">
|
<q-td key="warn" class="text-center" v-if="props.row.statusMark">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="props.rowIndex == 1"
|
|
||||||
icon="mdi-information-outline"
|
icon="mdi-information-outline"
|
||||||
size="12px"
|
size="12px"
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@click.stop="clickShowWarn"
|
@click.stop="
|
||||||
|
clickShowWarn(
|
||||||
|
props.row.markDiscipline,
|
||||||
|
props.row.markLeave,
|
||||||
|
props.row.markRate
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>แจ้งเตือน</q-tooltip></q-btn
|
<q-tooltip>แจ้งเตือน</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td v-else auto-width></q-td>
|
||||||
|
|
||||||
<q-td
|
<q-td
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
@ -1077,7 +1087,6 @@ const clearInsigniaFilters = (name: string) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- add -->
|
<!-- add -->
|
||||||
<q-dialog v-model="modalAdd">
|
<q-dialog v-model="modalAdd">
|
||||||
<q-card style="width: 800px; max-width: 80vw">
|
<q-card style="width: 800px; max-width: 80vw">
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,12 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
dateSend: date2Thai(e.requestDate),
|
dateSend: date2Thai(e.requestDate),
|
||||||
requestNote: e.requestNote,
|
requestNote: e.requestNote,
|
||||||
employeeType: profileType(e.profileType),
|
employeeType: profileType(e.profileType),
|
||||||
reason: e.reason
|
reason: e.reason,
|
||||||
|
markDiscipline: e.markDiscipline,
|
||||||
|
markLeave: e.markLeave,
|
||||||
|
markRate: e.markRate,
|
||||||
|
isApprove: e.isApprove,
|
||||||
|
statusMark: e.markDiscipline === true || e.markLeave === true || e.markRate === true ? true : false
|
||||||
}));
|
}));
|
||||||
rows.value = await datalist;
|
rows.value = await datalist;
|
||||||
listinsignia.value = await datalist;
|
listinsignia.value = await datalist;
|
||||||
|
|
@ -146,6 +150,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
roundId,
|
roundId,
|
||||||
optionRound,
|
optionRound,
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const {
|
||||||
} = mixin; //ฟังก์ชันกลางที่ใช้ในหน้านี้
|
} = mixin; //ฟังก์ชันกลางที่ใช้ในหน้านี้
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const filterRef = ref<QInput>();
|
const filterRef = ref<any>(null);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
||||||
|
|
@ -241,8 +241,8 @@ const checkNull = (text: string) =>
|
||||||
text == null
|
text == null
|
||||||
? ""
|
? ""
|
||||||
: text == "00000000-0000-0000-0000-000000000000"
|
: text == "00000000-0000-0000-0000-000000000000"
|
||||||
? ""
|
? ""
|
||||||
: text;
|
: text;
|
||||||
|
|
||||||
// คลิก icon ส่งไปออกคำสั่ง (เปิด dialog)
|
// คลิก icon ส่งไปออกคำสั่ง (เปิด dialog)
|
||||||
const modaladdOrder = ref<boolean>(false); // dialog ส่งไปออกคำสั่ง
|
const modaladdOrder = ref<boolean>(false); // dialog ส่งไปออกคำสั่ง
|
||||||
|
|
@ -255,10 +255,22 @@ const clickCloseSendModal = () => {
|
||||||
modaladdOrder.value = false;
|
modaladdOrder.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
|
||||||
|
|
||||||
|
//รีเซ็ตค่าในช่องค้นหา
|
||||||
|
const Reset = () => {
|
||||||
|
emit("update:filterKeyword2", "");
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateInput = (value: any) => {
|
||||||
|
emit("update:filterKeyword2", value);
|
||||||
|
};
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
filterRef.value!.focus();
|
filterRef.value!.focus();
|
||||||
|
filterKeyword2.value = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
// เพิ่มข้อมูลลูกจ้าง
|
// เพิ่มข้อมูลลูกจ้าง
|
||||||
|
|
@ -298,6 +310,7 @@ const deleteData = async (id: string) => {
|
||||||
// **** เริ่มในส่วนของการเลือกตำแหน่ง ***//
|
// **** เริ่มในส่วนของการเลือกตำแหน่ง ***//
|
||||||
const rowsPosition = ref<any>([]); // รายการข้อมูลในตารางกำหนดตำแหน่ง
|
const rowsPosition = ref<any>([]); // รายการข้อมูลในตารางกำหนดตำแหน่ง
|
||||||
const filters = ref<FormRegistryEmployee[]>([]);
|
const filters = ref<FormRegistryEmployee[]>([]);
|
||||||
|
const filterKeyword2 = ref<string>("");
|
||||||
const modal = ref<boolean>(false); // เปิด-ปิด dialod กำหนดตำแหน่ง
|
const modal = ref<boolean>(false); // เปิด-ปิด dialod กำหนดตำแหน่ง
|
||||||
const selectedPosition = ref<any>([]); // เก็บตำแหน่งที่เลือก
|
const selectedPosition = ref<any>([]); // เก็บตำแหน่งที่เลือก
|
||||||
|
|
||||||
|
|
@ -425,10 +438,7 @@ const checkSave = () => {
|
||||||
// เช็คข้อมูลก่อนบันทึกการกำหนดตำแหน่ง
|
// เช็คข้อมูลก่อนบันทึกการกำหนดตำแหน่ง
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (selectedPosition.value.length == 0) {
|
if (selectedPosition.value.length == 0) {
|
||||||
dialogMessageNotify(
|
dialogMessageNotify($q, "ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง");
|
||||||
$q,
|
|
||||||
"ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง"
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
await savePosition();
|
await savePosition();
|
||||||
|
|
@ -550,7 +560,7 @@ const getPosition = async (id: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// ดึงข้อมูลตำแหน่ง (root tree)
|
// ดึงข้อมูลตำแหน่ง (root tree)
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
const nodeTree = async () => {
|
const nodeTree = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -577,14 +587,16 @@ const rows = ref<FormRegistryEmployee[]>([]);
|
||||||
const showEmployeeTemp = async () => {
|
const showEmployeeTemp = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
let cirteria = [{
|
let cirteria = [
|
||||||
criteriaType: "employee_class",
|
{
|
||||||
criteriaValue: "temp",
|
criteriaType: "employee_class",
|
||||||
},
|
criteriaValue: "temp",
|
||||||
{
|
},
|
||||||
criteriaType: "is_retire",
|
{
|
||||||
criteriaValue: "false",
|
criteriaType: "is_retire",
|
||||||
}];
|
criteriaValue: "false",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
if (selected.value == null) return;
|
if (selected.value == null) return;
|
||||||
await http
|
await http
|
||||||
|
|
@ -652,28 +664,64 @@ const showEmployeeTemp = async () => {
|
||||||
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
|
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
|
||||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</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-tooltip>ส่งรายชื่อไปออกคำสั่ง</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="items-center" style="display: flex">
|
<div class="items-center" style="display: flex">
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
|
<q-input
|
||||||
style="max-width: 200px" class="q-ml-sm">
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filter"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
style="max-width: 200px"
|
||||||
|
class="q-ml-sm"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filter == ''" name="search" />
|
<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>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<!-- แสดงคอลัมน์ใน table -->
|
<!-- แสดงคอลัมน์ใน table -->
|
||||||
<q-select v-model="visibleColumnsEmployeeTemp" :display-value="$q.lang.table.columns" multiple outlined dense
|
<q-select
|
||||||
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
|
v-model="visibleColumnsEmployeeTemp"
|
||||||
class="gt-xs q-ml-sm" />
|
: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>
|
</div>
|
||||||
<div class="col-12 q-pt-sm">
|
<div class="col-12 q-pt-sm">
|
||||||
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumnsEmployeeTemp" :filter="filter"
|
<d-table
|
||||||
row-key="id">
|
:rows="rows"
|
||||||
|
:columns="columns"
|
||||||
|
:visible-columns="visibleColumnsEmployeeTemp"
|
||||||
|
:filter="filter"
|
||||||
|
row-key="id"
|
||||||
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -684,16 +732,32 @@ const showEmployeeTemp = async () => {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td key="no" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="no"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="fullname" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="fullname"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="newAgency" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
<div class="col-12" v-if="props.row.draftOrganizationOrganization == null &&
|
key="newAgency"
|
||||||
props.row.draftPositionEmployee == null
|
: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 class="text-weight-medium">
|
||||||
{{ "-" }}
|
{{ "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -707,8 +771,15 @@ const showEmployeeTemp = async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="currentAgency" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
<div class="col-12" v-if="props.row.oc == null && props.row.position == null">
|
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 class="text-weight-medium">
|
||||||
{{ "-" }}
|
{{ "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -722,69 +793,154 @@ const showEmployeeTemp = async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="amount" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="amount"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.amount }}
|
{{ props.row.amount }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="govAge" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="govAge"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.govAge }}
|
{{ props.row.govAge }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="dateAppoint" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="dateAppoint"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.dateAppoint }}
|
{{ props.row.dateAppoint }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="dateStart" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="dateStart"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.dateStart }}
|
{{ props.row.dateStart }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="salaryDate" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="salaryDate"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.salaryDate }}
|
{{ props.row.salaryDate }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="refSalary" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="refSalary"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.refSalary }}
|
{{ props.row.refSalary }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="age" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="age"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.age }}
|
{{ props.row.age }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="fullnameOld" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="fullnameOld"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.fullnameOld }}
|
{{ props.row.fullnameOld }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="createdAt" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="createdAt"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.createdAt }}
|
{{ props.row.createdAt }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="isLeave" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="isLeave"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.isLeave }}
|
{{ props.row.isLeave }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
<q-td key="leaveDateOrder" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="leaveDateOrder"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.leaveDateOrder }}
|
{{ props.row.leaveDateOrder }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="statustext" :props="props" @click="redirectToPage(props.row.id, props.row.status)">
|
<q-td
|
||||||
|
key="statustext"
|
||||||
|
:props="props"
|
||||||
|
@click="redirectToPage(props.row.id, props.row.status)"
|
||||||
|
>
|
||||||
{{ props.row.statustext }}
|
{{ props.row.statustext }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<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-menu transition-show="jump-down" transition-hide="jump-up">
|
||||||
<q-list dense style="min-width: 160px">
|
<q-list dense style="min-width: 160px">
|
||||||
<q-item clickable v-close-popup @click="editDetail(props.row)" :disable="props.row.status == 'REPORT' ||
|
<q-item
|
||||||
props.row.status == 'DONE'
|
clickable
|
||||||
">
|
v-close-popup
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
@click="editDetail(props.row)"
|
||||||
<q-icon :color="props.row.status == 'REPORT' ||
|
:disable="
|
||||||
props.row.status == 'DONE'
|
props.row.status == 'REPORT' ||
|
||||||
? 'grey'
|
props.row.status == 'DONE'
|
||||||
: 'blue'
|
"
|
||||||
" size="xs" name="mdi-account-settings" />
|
>
|
||||||
|
<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-section>
|
<q-item-section>กำหนดตำแหน่ง</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-item clickable v-close-popup @click="clickDelete(props.row.id)" :disable="props.row.status == 'REPORT' ||
|
<q-item
|
||||||
props.row.status == 'DONE'
|
clickable
|
||||||
">
|
v-close-popup
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
@click="clickDelete(props.row.id)"
|
||||||
<q-icon :color="props.row.status == 'REPORT' ||
|
:disable="
|
||||||
props.row.status == 'DONE'
|
props.row.status == 'REPORT' ||
|
||||||
? 'grey'
|
props.row.status == 'DONE'
|
||||||
: 'red-7'
|
"
|
||||||
" size="xs" name="mdi-delete" />
|
>
|
||||||
|
<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-section>
|
<q-item-section>ลบ</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -805,20 +961,85 @@ const showEmployeeTemp = async () => {
|
||||||
<DialogHeader tittle="กำหนดตำแหน่ง" :close="modalOpenClose" />
|
<DialogHeader tittle="กำหนดตำแหน่ง" :close="modalOpenClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pa-sm">
|
<q-card-section class="q-pa-sm">
|
||||||
<d-table :rows="rowsPosition" :columns="columnsPosition" row-key="id" selection="single"
|
<div class="row justify-end">
|
||||||
v-model:selected="selectedPosition" :visible-columns="visibleColumnsPosition">
|
<div class="col-5">
|
||||||
|
<q-toolbar style="padding: 0">
|
||||||
|
<q-input
|
||||||
|
borderless
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
ref="filterRef"
|
||||||
|
debounce="300"
|
||||||
|
:model-value="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="visibleColumnsPosition"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columnsPosition"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="gt-xs q-ml-sm"
|
||||||
|
/>
|
||||||
|
</q-toolbar>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<d-table
|
||||||
|
:rows="rowsPosition"
|
||||||
|
:columns="columnsPosition"
|
||||||
|
:filter="filterKeyword2"
|
||||||
|
row-key="id"
|
||||||
|
selection="single"
|
||||||
|
v-model:selected="selectedPosition"
|
||||||
|
:visible-columns="visibleColumnsPosition"
|
||||||
|
>
|
||||||
<template v-slot:body-selection="scope">
|
<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>
|
||||||
</d-table>
|
</d-table>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn dense unelevated label="บันทึก" color="public" @click="checkSave" class="q-px-md">
|
<q-btn
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="บันทึก"
|
||||||
|
color="public"
|
||||||
|
@click="checkSave"
|
||||||
|
class="q-px-md"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<DialogSendToCommand :modal="modaladdOrder" :closeDialog="clickCloseSendModal" :rows="rows" :fetch-new-list="showEmployeeTemp"/>
|
<DialogSendToCommand
|
||||||
</template>
|
:modal="modaladdOrder"
|
||||||
|
:closeDialog="clickCloseSendModal"
|
||||||
|
:rows="rows"
|
||||||
|
:fetch-new-list="showEmployeeTemp"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,15 @@ const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||||
const DataStore = useOrderPlacementDataStore();
|
const DataStore = useOrderPlacementDataStore();
|
||||||
|
|
||||||
|
const OpsFilterYear = ref<any>({
|
||||||
|
fiscalyearOP: [],
|
||||||
|
});
|
||||||
|
const OpsFilterOrderType = ref<any>({
|
||||||
|
OrderTypeOption: [],
|
||||||
|
});
|
||||||
|
const OpsFilterOrderStatus = ref<any>({
|
||||||
|
OrderStatusOption: [],
|
||||||
|
});
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
descending: true,
|
descending: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
@ -144,6 +153,16 @@ const OriginalDataFetch = async () => {
|
||||||
OrderType: e.orderTypeName,
|
OrderType: e.orderTypeName,
|
||||||
orderTypeValue: e.orderTypeValue,
|
orderTypeValue: e.orderTypeValue,
|
||||||
}));
|
}));
|
||||||
|
// OpsFilterYear.value.fiscalYear = res.data.result.map((e: any) => ({
|
||||||
|
// fiscalYear: Number(e.fiscalYear),
|
||||||
|
// }));
|
||||||
|
OpsFilterOrderStatus.value.OrderStatus = res.data.result.map(
|
||||||
|
(e: any) => ({
|
||||||
|
OrderStatus: e.orderStatusName,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
console.log(fiscalyear.value);
|
||||||
|
console.log(OrderStatus.value);
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -180,26 +199,40 @@ const redirectToPage = (id?: string, status?: string) => {
|
||||||
const clickAdd = () => {
|
const clickAdd = () => {
|
||||||
router.push({ name: "OrderAdd" });
|
router.push({ name: "OrderAdd" });
|
||||||
};
|
};
|
||||||
|
const Ops = ref<any>({
|
||||||
|
fiscalyearOP: [],
|
||||||
|
});
|
||||||
|
|
||||||
// รายการข้อมูลปีงบประมาณ
|
// รายการข้อมูลปีงบประมาณ
|
||||||
const fiscalyear = ref<number | null>(0);
|
const fiscalyear = ref<number | null>(0);
|
||||||
const fiscalyearOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
const fiscalyearOP = ref<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
|
||||||
|
const fiscalyearFilter1 = ref<any>([]);
|
||||||
const fiscalYearFilter = async () => {
|
const fiscalYearFilter = async () => {
|
||||||
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
||||||
const response = res.data.result;
|
const response = res.data.result;
|
||||||
fiscalyearOP.push(...response);
|
fiscalyearOP.value = [{ id: 0, name: "ทั้งหมด" }];
|
||||||
|
fiscalyearOP.value.push(...response);
|
||||||
|
|
||||||
|
fiscalyearFilter1.value = [{ id: 0, name: "ทั้งหมด" }];
|
||||||
|
fiscalyearFilter1.value.push(...response);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// รายการข้อมูลประเภทคำสั่ง
|
// รายการข้อมูลประเภทคำสั่ง
|
||||||
const OrderType = ref<string>("");
|
const OrderType = ref<string>("");
|
||||||
const OrderTypeOption = reactive<DataOption1[]>([{ id: "", name: "ทั้งหมด" }]);
|
const OrderTypeFilter1 = ref<any>([]);
|
||||||
|
const OrderTypeOption = ref<DataOption1[]>([{ id: "", name: "ทั้งหมด" }]);
|
||||||
|
|
||||||
const OrderTypeFilter = async () => {
|
const OrderTypeFilter = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const response = res.data.result;
|
const response = res.data.result;
|
||||||
OrderTypeOption.push(...response);
|
OrderTypeOption.value = [{ id: "", name: "ทั้งหมด" }];
|
||||||
|
OrderTypeOption.value.push(...response);
|
||||||
|
|
||||||
|
OrderTypeFilter1.value = [{ id: "", name: "ทั้งหมด" }];
|
||||||
|
OrderTypeFilter1.value.push(...response);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -208,9 +241,10 @@ const OrderTypeFilter = async () => {
|
||||||
|
|
||||||
// รายการข้อมูลสถานะคำสั่ง
|
// รายการข้อมูลสถานะคำสั่ง
|
||||||
const OrderStatus = ref<string>("ทั้งหมด");
|
const OrderStatus = ref<string>("ทั้งหมด");
|
||||||
const OrderStatusOption = reactive<DataOption1[]>([
|
const OrderStatusOption = ref<DataOption1[]>([
|
||||||
{ id: "ทั้งหมด", name: "ทั้งหมด" },
|
{ id: "ทั้งหมด", name: "ทั้งหมด" },
|
||||||
]);
|
]);
|
||||||
|
const OrderStatusFilter1 = ref<any>([]);
|
||||||
const addedOrderStatusValues: string[] = [];
|
const addedOrderStatusValues: string[] = [];
|
||||||
const OrderStatusFilter = async () => {
|
const OrderStatusFilter = async () => {
|
||||||
for (let data of OriginalData.value) {
|
for (let data of OriginalData.value) {
|
||||||
|
|
@ -224,9 +258,16 @@ const OrderStatusFilter = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
|
||||||
OrderStatusOption.push({
|
OrderStatusOption.value = [{ id: "ทั้งหมด", name: "ทั้งหมด" }];
|
||||||
|
OrderStatusOption.value.push({
|
||||||
// id: OrderStatusValue,
|
// id: OrderStatusValue,
|
||||||
id: OrderStatusOption.length.toString(),
|
id: OrderStatusOption.value.length.toString(),
|
||||||
|
name: OrderStatusValue,
|
||||||
|
});
|
||||||
|
OrderStatusFilter1.value = [{ id: "ทั้งหมด", name: "ทั้งหมด" }];
|
||||||
|
OrderStatusFilter1.value.push({
|
||||||
|
// id: OrderStatusValue,
|
||||||
|
id: OrderStatusFilter1.value.length.toString(),
|
||||||
name: OrderStatusValue,
|
name: OrderStatusValue,
|
||||||
});
|
});
|
||||||
addedOrderStatusValues.push(OrderStatusValue);
|
addedOrderStatusValues.push(OrderStatusValue);
|
||||||
|
|
@ -254,6 +295,34 @@ const searchFilterTable = async () => {
|
||||||
UpdataData.value = DataStore.DataMainUpdateOrder;
|
UpdataData.value = DataStore.DataMainUpdateOrder;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
|
switch (refData) {
|
||||||
|
case "fiscalyearOP":
|
||||||
|
update(() => {
|
||||||
|
fiscalyearOP.value = fiscalyearFilter1.value.filter(
|
||||||
|
(v: any) => v.name.valueOf(val) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "OrderTypeOption":
|
||||||
|
update(() => {
|
||||||
|
OrderTypeOption.value = OrderTypeFilter1.value.filter(
|
||||||
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "OrderStatusOption":
|
||||||
|
update(() => {
|
||||||
|
OrderStatusOption.value = OrderStatusFilter1.value.filter(
|
||||||
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
|
@ -284,7 +353,11 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="searchFilterTable"
|
@update:model-value="searchFilterTable"
|
||||||
|
@filter="(inputValue:any,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'fiscalyearOP'
|
||||||
|
) "
|
||||||
/>
|
/>
|
||||||
|
<!-- use-input -->
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="12px"
|
size="12px"
|
||||||
|
|
@ -350,12 +423,16 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
:options="OrderTypeOption"
|
:options="OrderTypeOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
use-input
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="searchFilterTable"
|
@update:model-value="searchFilterTable"
|
||||||
|
@filter="(inputValue:any,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'OrderTypeOption'
|
||||||
|
) "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
|
@ -369,12 +446,16 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
:options="OrderStatusOption"
|
:options="OrderStatusOption"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
use-input
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
@update:model-value="searchFilterTable"
|
@update:model-value="searchFilterTable"
|
||||||
|
@filter="(inputValue:any,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'OrderStatusOption'
|
||||||
|
) "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue