2023-07-21 16:34:06 +07:00
|
|
|
<template>
|
|
|
|
|
<div class="col-12 row justify-center">
|
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
|
|
|
|
<div class="toptitle text-white col-12 row items-center">
|
|
|
|
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
|
|
|
|
<div v-if="routeName == 'AddLeave'">เพิ่มเรื่องลาออก</div>
|
|
|
|
|
<div v-else>รายละเอียดเรื่องลาออก</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-card bordered>
|
|
|
|
|
<div class="col-12 row q-col-gutter-md q-pa-md">
|
|
|
|
|
<div class="col-xs-12 col-sm-12">
|
|
|
|
|
<q-card bordered flat>
|
2023-07-24 09:36:23 +07:00
|
|
|
<div class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold">ลาออก</div>
|
2023-07-21 16:34:06 +07:00
|
|
|
<q-separator />
|
|
|
|
|
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
|
|
|
|
<q-input class="col-8" dense outlined v-model="tranferOrg" label="สถานที่ยื่นขอลาออกจากราชการ" :readonly="routeName != 'AddLeave'" />
|
|
|
|
|
<datepicker class="col-2" menu-class-name="modalfix" v-model="dateCommand" :locale="'th'" autoApply readonly borderless :enableTimePicker="false" week-start="0">
|
|
|
|
|
<template #year="{ year }">
|
|
|
|
|
{{ year + 543 }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #year-overlay-value="{ value }">
|
|
|
|
|
{{ parseInt(value + 543) }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<q-input
|
|
|
|
|
outlined
|
|
|
|
|
readonly
|
|
|
|
|
dense
|
|
|
|
|
class="full-width datepicker"
|
|
|
|
|
:model-value="dateCommand != null ? date2Thai(dateCommand) : null"
|
|
|
|
|
:label="`${'วันที่ยื่นขอลาออกจากราชการ'}`"
|
|
|
|
|
:rules="[val => !!val || `${'กรุณาเลือกวันที่ยื่นขอลาออกจากราชการ'}`]"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
</template>
|
|
|
|
|
</datepicker>
|
|
|
|
|
<datepicker
|
|
|
|
|
class="col-2"
|
|
|
|
|
menu-class-name="modalfix"
|
|
|
|
|
v-model="dateLeave"
|
|
|
|
|
:locale="'th'"
|
|
|
|
|
autoApply
|
|
|
|
|
borderless
|
|
|
|
|
:enableTimePicker="false"
|
|
|
|
|
week-start="0"
|
|
|
|
|
:readonly="routeName != 'AddLeave'"
|
|
|
|
|
>
|
|
|
|
|
<template #year="{ year }">
|
|
|
|
|
{{ year + 543 }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #year-overlay-value="{ value }">
|
|
|
|
|
{{ parseInt(value + 543) }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<q-input
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
:readonly="routeName != 'AddLeave'"
|
|
|
|
|
class="full-width datepicker"
|
|
|
|
|
:model-value="dateLeave != null ? date2Thai(dateLeave) : null"
|
|
|
|
|
:label="`${'วันที่ขอลาออกจากราชการ'}`"
|
|
|
|
|
:rules="[val => !!val || `${'กรุณาเลือกวันที่ขอลาออกจากราชการ'}`]"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)"> </q-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
</template>
|
|
|
|
|
</datepicker>
|
2023-07-24 09:34:12 +07:00
|
|
|
<q-input class="col-12" dense outlined v-model="noteReason" label="เหตุผลที่ลาออกจากราชการ" type="textarea" :readonly="routeName != 'AddLeave'" />
|
2023-07-21 16:34:06 +07:00
|
|
|
|
|
|
|
|
<q-separator />
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row col-12 q-pa-sm" v-if="routeName == 'AddLeave'">
|
|
|
|
|
<q-space />
|
2023-07-24 09:34:12 +07:00
|
|
|
<q-btn unelevated dense class="q-px-md items-center" color="primary" label="ยื่นเรื่องขอลาออก" @click="router.go(-1)" />
|
2023-07-21 16:34:06 +07:00
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { QTableProps } from "quasar"
|
|
|
|
|
import { ref } from "vue"
|
|
|
|
|
import { useQuasar } from "quasar"
|
|
|
|
|
import { useRouter } from "vue-router"
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin"
|
|
|
|
|
|
|
|
|
|
const mixin = useCounterMixin()
|
|
|
|
|
const { date2Thai } = mixin
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const $q = useQuasar()
|
|
|
|
|
const dateCommand = ref<Date>(new Date())
|
|
|
|
|
const dateLeave = ref<Date>(new Date())
|
|
|
|
|
const file = ref(null)
|
|
|
|
|
const tranferOrg = ref("")
|
|
|
|
|
const noteReason = ref("")
|
|
|
|
|
const noPos = ref("")
|
|
|
|
|
const level = ref("")
|
|
|
|
|
const salary = ref("")
|
|
|
|
|
const positionNew = ref("")
|
|
|
|
|
const salaryNew = ref("")
|
|
|
|
|
const transfer = ref("")
|
|
|
|
|
const note = ref("")
|
|
|
|
|
|
|
|
|
|
const routeName = router.currentRoute.value.name
|
|
|
|
|
</script>
|