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