เพิ่ม ui ลาออก
This commit is contained in:
parent
1b40d859e5
commit
bd6ccdbb3f
11 changed files with 8937 additions and 13229 deletions
115
src/modules/03_leave/views/AddLeave.vue
Normal file
115
src/modules/03_leave/views/AddLeave.vue
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<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>
|
||||
<div class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold">ฟอร์มลาออก</div>
|
||||
<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>
|
||||
<q-input class="col-12" dense outlined v-model="noteReason" label="วันที่ขอลาออกจากราชการ" type="textarea" :readonly="routeName != 'AddLeave'" />
|
||||
|
||||
<q-separator />
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12 q-pa-sm" v-if="routeName == 'AddLeave'">
|
||||
<q-space />
|
||||
<q-btn unelevated dense class="q-px-md items-center" color="primary" label="ยื่นเรื่องขอโอน" @click="router.go(-1)" />
|
||||
</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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue