2023-07-21 16:34:06 +07:00
|
|
|
<script setup lang="ts">
|
2023-08-21 15:05:05 +07:00
|
|
|
import { ref, onMounted } from "vue"
|
|
|
|
|
import { useQuasar } from "quasar"
|
|
|
|
|
import { useRouter, useRoute } from "vue-router"
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin"
|
|
|
|
|
import http from "@/plugins/http"
|
|
|
|
|
import config from "@/app.config"
|
2023-09-05 21:09:28 +07:00
|
|
|
import type { QForm } from "quasar"
|
2023-07-21 16:34:06 +07:00
|
|
|
|
2023-08-21 15:05:05 +07:00
|
|
|
const mixin = useCounterMixin()
|
2023-09-05 21:09:28 +07:00
|
|
|
const { date2Thai, dateToISO, success, messageError, showLoader, hideLoader, fails } = mixin
|
2023-08-21 15:05:05 +07:00
|
|
|
const router = useRouter()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const $q = useQuasar()
|
|
|
|
|
const routeName = router.currentRoute.value.name
|
2023-11-13 17:05:29 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ตัวแปรที่ใช้งาน
|
|
|
|
|
*/
|
2023-08-21 15:05:05 +07:00
|
|
|
const id = ref<string>("")
|
2023-11-13 17:05:29 +07:00
|
|
|
const myform = ref<QForm | null>(null)
|
2023-08-21 15:05:05 +07:00
|
|
|
const tranferOrg = ref("")
|
|
|
|
|
const dateCommand = ref<Date>(new Date())
|
|
|
|
|
const dateLeave = ref<Date>(new Date())
|
|
|
|
|
const noteReason = ref("")
|
2023-08-09 12:04:57 +07:00
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/** ข้อมูล v-model ของฟอร์ม */
|
2023-08-29 17:04:37 +07:00
|
|
|
const dataDetail = ref<any>({
|
2023-09-05 21:09:28 +07:00
|
|
|
datetext: "",
|
|
|
|
|
activeDate: new Date(),
|
|
|
|
|
createdAt: new Date(),
|
|
|
|
|
firstName: "",
|
|
|
|
|
id: "",
|
|
|
|
|
isActive: true,
|
|
|
|
|
lastName: "",
|
|
|
|
|
location: "",
|
|
|
|
|
organizationPositionOld: "",
|
|
|
|
|
positionLevelOld: "",
|
|
|
|
|
positionNumberOld: "",
|
|
|
|
|
positionTypeOld: "",
|
|
|
|
|
prefix: "",
|
|
|
|
|
profileId: "",
|
|
|
|
|
reason: "",
|
|
|
|
|
salary: 0,
|
|
|
|
|
sendDate: new Date(),
|
|
|
|
|
status: "",
|
|
|
|
|
statustext: "",
|
|
|
|
|
fullname: "",
|
|
|
|
|
})
|
2023-08-29 17:04:37 +07:00
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นย้อนกลับไปยังหน้ารายการลาออก
|
|
|
|
|
*/
|
2023-09-08 11:14:26 +07:00
|
|
|
const clickBack = () => {
|
2023-09-26 15:57:16 +07:00
|
|
|
router.push(`/retire`)
|
2023-09-08 11:14:26 +07:00
|
|
|
}
|
|
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นเปลี่ยนเป็น string ของ status
|
|
|
|
|
* @param val value ของ status true/false
|
|
|
|
|
*/
|
2023-08-29 17:04:37 +07:00
|
|
|
const statusOrder = (val: boolean) => {
|
2023-09-05 21:09:28 +07:00
|
|
|
switch (val) {
|
|
|
|
|
case true:
|
|
|
|
|
return "ยับยั้งการลาออก"
|
|
|
|
|
case false:
|
|
|
|
|
return "อนุมัติการลาออก"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-29 17:04:37 +07:00
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
|
|
|
|
*/
|
2023-08-09 12:04:57 +07:00
|
|
|
onMounted(() => {
|
2023-08-21 15:05:05 +07:00
|
|
|
if (route.params.id !== undefined) {
|
|
|
|
|
id.value = route.params.id.toString()
|
|
|
|
|
fectDataresign(id.value)
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-09-05 21:09:28 +07:00
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* บันทึกข้อมูลการลาออก
|
|
|
|
|
*/
|
2023-09-05 21:09:28 +07:00
|
|
|
const saveData = async () => {
|
|
|
|
|
if (myform.value != null) {
|
|
|
|
|
await myform.value.validate().then(async (saveDataTest: Boolean) => {
|
|
|
|
|
if (saveDataTest) {
|
|
|
|
|
saveResing()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นดาว์โหลดอัพโหลดไฟล์
|
|
|
|
|
*/
|
|
|
|
|
const filesNull = () => {
|
|
|
|
|
files.value = null
|
|
|
|
|
}
|
|
|
|
|
const nameFile = ref<string>("")
|
|
|
|
|
const fileDocDataUpload = ref<File[]>([])
|
|
|
|
|
const files = ref<any>()
|
|
|
|
|
//อัพโหลดไฟล์
|
2023-09-07 12:51:59 +07:00
|
|
|
const fileUploadDoc = async (file: any) => {
|
|
|
|
|
fileDocDataUpload.value.push(file)
|
|
|
|
|
nameFile.value = file[0].name
|
|
|
|
|
files.value = file
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นเซฟข้อมูลลาออกเเล้วเรียกใช้งานApi
|
|
|
|
|
*/
|
2023-08-09 12:04:57 +07:00
|
|
|
const saveResing = () => {
|
2023-08-21 15:05:05 +07:00
|
|
|
$q.dialog({
|
2023-09-25 12:53:42 +07:00
|
|
|
title: "ยืนยันการยื่นข้อมูลลาออก",
|
|
|
|
|
message: "ต้องการยื่นข้อมูลลาออกนี้ใช่หรือไม่?",
|
2023-08-21 15:05:05 +07:00
|
|
|
cancel: {
|
|
|
|
|
flat: true,
|
|
|
|
|
color: "negative",
|
|
|
|
|
},
|
|
|
|
|
persistent: true,
|
|
|
|
|
})
|
2023-09-25 12:53:42 +07:00
|
|
|
.onOk(() => {
|
|
|
|
|
createFormresign()
|
2023-09-07 12:51:59 +07:00
|
|
|
})
|
2023-09-21 14:53:14 +07:00
|
|
|
.onCancel(() => {})
|
|
|
|
|
.onDismiss(() => {})
|
2023-08-21 15:05:05 +07:00
|
|
|
}
|
2023-08-31 10:55:29 +07:00
|
|
|
|
2023-09-21 14:53:14 +07:00
|
|
|
//ยกเลิกการลาออก
|
2023-08-31 10:55:29 +07:00
|
|
|
const cancelResing = () => {
|
|
|
|
|
$q.dialog({
|
|
|
|
|
title: "ยืนยันการยกเลิกการลาออก",
|
|
|
|
|
message: "ต้องการยื่นข้อมูลยกเลิกการลาออกนี้ใช่หรือไม่?",
|
|
|
|
|
cancel: {
|
|
|
|
|
flat: true,
|
|
|
|
|
color: "negative",
|
|
|
|
|
},
|
|
|
|
|
persistent: true,
|
|
|
|
|
})
|
|
|
|
|
.onOk(async () => {
|
2023-09-05 21:09:28 +07:00
|
|
|
if (route.params.id !== undefined) {
|
|
|
|
|
id.value = route.params.id.toString()
|
|
|
|
|
deleteResting(id.value)
|
|
|
|
|
}
|
2023-08-31 10:55:29 +07:00
|
|
|
})
|
|
|
|
|
.onCancel(() => {})
|
|
|
|
|
.onDismiss(() => {})
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-13 17:05:29 +07:00
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นลบ
|
|
|
|
|
* @param id ไอดีของข้อมูลการลาออก
|
|
|
|
|
*/
|
2023-09-05 21:09:28 +07:00
|
|
|
const deleteResting = async (id: string) => {
|
2023-08-31 10:55:29 +07:00
|
|
|
showLoader()
|
|
|
|
|
await http
|
2023-09-05 21:09:28 +07:00
|
|
|
.delete(config.API.resingByid(id))
|
|
|
|
|
.then(() => {
|
|
|
|
|
success($q, "ยกเลิกการลาออกขอสำเร็จ")
|
|
|
|
|
})
|
|
|
|
|
.catch(e => {
|
|
|
|
|
messageError($q, e)
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader()
|
2023-09-08 16:50:27 +07:00
|
|
|
clickBack()
|
2023-09-05 21:09:28 +07:00
|
|
|
})
|
2023-08-31 10:55:29 +07:00
|
|
|
}
|
|
|
|
|
|
2023-09-21 14:53:14 +07:00
|
|
|
//บันทึกข้อมูล
|
2023-08-09 12:04:57 +07:00
|
|
|
const createFormresign = async () => {
|
2023-08-21 15:05:05 +07:00
|
|
|
const formData = new FormData()
|
2023-09-25 15:08:18 +07:00
|
|
|
if (files.value > 0) {
|
|
|
|
|
const blob = files.value.slice(0, files.value[0].size)
|
|
|
|
|
const newFile = new File(blob, nameFile.value, {
|
|
|
|
|
type: files.value[0].type,
|
|
|
|
|
})
|
|
|
|
|
formData.append("file", newFile)
|
|
|
|
|
}
|
2023-09-25 12:53:42 +07:00
|
|
|
|
2023-08-21 15:05:05 +07:00
|
|
|
formData.append("Location", tranferOrg.value)
|
|
|
|
|
formData.append("SendDate", dateToISO(dateCommand.value))
|
|
|
|
|
formData.append("ActiveDate", dateToISO(dateLeave.value))
|
|
|
|
|
formData.append("Reason", noteReason.value)
|
2023-09-25 15:08:18 +07:00
|
|
|
|
2023-08-21 15:05:05 +07:00
|
|
|
await http
|
|
|
|
|
.post(config.API.listResign(), formData)
|
|
|
|
|
.then((res: any) => {
|
2023-08-22 12:21:03 +07:00
|
|
|
let data = res.data.result.id
|
2023-08-21 15:05:05 +07:00
|
|
|
success($q, "บันทึกข้อมูลสำเร็จ")
|
2023-09-26 15:57:16 +07:00
|
|
|
router.push(`/retire/result/${data}`)
|
2023-08-21 15:05:05 +07:00
|
|
|
})
|
|
|
|
|
.catch((e: any) => {
|
|
|
|
|
messageError($q, e)
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-11-13 17:05:29 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ฟังก์ชั่นเรียกข้อมูลจาก Api
|
|
|
|
|
* @param id ไอดีของข้อมูล
|
|
|
|
|
*/
|
2023-08-09 12:04:57 +07:00
|
|
|
const fectDataresign = async (id: string) => {
|
2023-08-21 15:05:05 +07:00
|
|
|
showLoader()
|
|
|
|
|
await http
|
|
|
|
|
.get(config.API.resingByid(id))
|
|
|
|
|
.then((res: any) => {
|
|
|
|
|
let data = res.data.result
|
2023-09-05 21:09:28 +07:00
|
|
|
;(tranferOrg.value = data.location),
|
|
|
|
|
(dateCommand.value = data.sendDate),
|
|
|
|
|
(dateLeave.value = data.activeDate),
|
|
|
|
|
(noteReason.value = data.reason),
|
|
|
|
|
(files.value = data.docs),
|
|
|
|
|
(dataDetail.value = data)
|
2023-08-21 15:05:05 +07:00
|
|
|
})
|
|
|
|
|
.catch((e: any) => {
|
|
|
|
|
messageError($q, e)
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader()
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-07-21 16:34:06 +07:00
|
|
|
</script>
|
2023-09-21 14:53:14 +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)" />
|
2023-09-26 15:57:16 +07:00
|
|
|
<div v-if="routeName == 'AddRetire'">เพิ่มเรื่องลาออก</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
<div v-else>รายละเอียดเรื่องลาออก</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-form ref="myform" 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">
|
|
|
|
|
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
|
|
|
|
<q-input
|
|
|
|
|
class="col-8"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
v-model="tranferOrg"
|
|
|
|
|
label="สถานที่ยื่นขอลาออกจากราชการ"
|
2023-09-26 15:57:16 +07:00
|
|
|
:readonly="routeName != 'AddRetire'"
|
2023-09-21 14:53:14 +07:00
|
|
|
:rules="[(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`]"
|
|
|
|
|
/>
|
|
|
|
|
<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
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
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"
|
2023-09-26 15:57:16 +07:00
|
|
|
:readonly="routeName != 'AddRetire'"
|
2023-09-21 14:53:14 +07:00
|
|
|
>
|
|
|
|
|
<template #year="{ year }">
|
|
|
|
|
{{ year + 543 }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #year-overlay-value="{ value }">
|
|
|
|
|
{{ parseInt(value + 543) }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<q-input
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
hide-bottom-space
|
2023-09-26 15:57:16 +07:00
|
|
|
:readonly="routeName != 'AddRetire'"
|
2023-09-21 14:53:14 +07:00
|
|
|
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"
|
2023-09-26 15:57:16 +07:00
|
|
|
:readonly="routeName != 'AddRetire'"
|
2023-09-21 14:53:14 +07:00
|
|
|
:rules="[val => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`]"
|
|
|
|
|
/>
|
|
|
|
|
|
2023-09-26 15:57:16 +07:00
|
|
|
<div class="col-12 row" v-if="routeName == 'AddRetire'">
|
2023-09-21 14:53:14 +07:00
|
|
|
<q-uploader
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
class="col-xs-12 col-sm-12"
|
|
|
|
|
accept=".jpg,.png,.pdf,.csv,.doc"
|
|
|
|
|
url="http://localhost:4444/upload"
|
|
|
|
|
label="เอกสารเพิ่มเติม"
|
|
|
|
|
type="file"
|
|
|
|
|
@added="fileUploadDoc"
|
|
|
|
|
@removed="filesNull"
|
|
|
|
|
style="max-width: px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-09-26 15:57:16 +07:00
|
|
|
<div class="col-12 row" v-if="routeName != 'AddRetire'">
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
<q-card bordered flat class="full-width">
|
|
|
|
|
<q-list separator>
|
|
|
|
|
<q-item v-for="file in files" :key="file.key" class="q-my-xs">
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label class="full-width ellipsis">
|
|
|
|
|
{{ file.fileName }}
|
|
|
|
|
</q-item-label>
|
|
|
|
|
|
|
|
|
|
<q-item-label caption> </q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-26 15:57:16 +07:00
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm" v-if="routeName != 'AddRetire'">
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">ผลการพิจารณาของผู้บังคับบัญชา</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">สถานะ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{ dataDetail.commanderReject !== null ? statusOrder(dataDetail.commanderReject) : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{ dataDetail.commanderRejectDate !== null ? date2Thai(dataDetail.commanderRejectDate) : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="col-xs-12 row items-start">
|
|
|
|
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
|
|
|
|
<div class="col-12 text-detail" v-if="dataDetail.commanderReject === false">
|
|
|
|
|
{{ dataDetail.commanderApproveReason !== null ? dataDetail.commanderApproveReason : "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 text-detail" v-if="dataDetail.commanderReject === true">
|
|
|
|
|
{{ dataDetail.commanderRejectReason !== null ? dataDetail.commanderRejectReason : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
</q-card>
|
2023-09-21 14:53:14 +07:00
|
|
|
|
2023-09-26 15:57:16 +07:00
|
|
|
<q-card bordered class="row col-12 text-dark q-mt-sm" v-if="routeName != 'AddRetire'">
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
|
|
|
<div class="q-pl-sm text-weight-bold text-dark">ผลการพิจารณาของผู้มีอำนาจ</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<div class="row col-12 q-pa-md">
|
|
|
|
|
<div class="col-12 row bg-white q-col-gutter-md">
|
|
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">สถานะ</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{ dataDetail.oligarchReject !== null ? statusOrder(dataDetail.oligarchReject) : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="col-xs-6 row items-start">
|
|
|
|
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
|
|
|
<div class="col-12 text-detail">
|
|
|
|
|
{{ dataDetail.oligarchRejectDate !== null ? date2Thai(dataDetail.oligarchRejectDate) : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
<div class="col-xs-12 row items-start">
|
|
|
|
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
|
|
|
|
<div class="col-12 text-detail" v-if="dataDetail.oligarchReject == false">
|
|
|
|
|
{{ dataDetail.oligarchApproveReason !== null ? dataDetail.oligarchApproveReason : "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 text-detail" v-else-if="dataDetail.oligarchReject == true">
|
|
|
|
|
{{ dataDetail.oligarchRejectReason !== null ? dataDetail.oligarchRejectReason : "-" }}
|
|
|
|
|
</div>
|
2023-09-21 14:53:14 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-25 15:08:18 +07:00
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-09-26 15:57:16 +07:00
|
|
|
<div class="row col-12 q-pa-md" v-if="routeName != 'AddRetire'">
|
2023-09-21 14:53:14 +07:00
|
|
|
<q-space />
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="dataDetail.status !== 'DELETE' && dataDetail.status !== 'DONE'"
|
|
|
|
|
unelevated
|
|
|
|
|
dense
|
|
|
|
|
class="q-px-md items-center"
|
|
|
|
|
color="orange"
|
|
|
|
|
label="ยกเลิกการลาออก"
|
|
|
|
|
@click="cancelResing"
|
|
|
|
|
:disable="tranferOrg == '' && noteReason == ''"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-26 15:57:16 +07:00
|
|
|
<q-separator v-if="routeName == 'AddRetire'" />
|
|
|
|
|
<div class="row col-12 q-pa-md" v-if="routeName == 'AddRetire'">
|
2023-09-21 14:53:14 +07:00
|
|
|
<q-space />
|
|
|
|
|
<q-btn unelevated dense class="q-px-md items-center" color="primary" label="ยื่นเรื่องขอลาออก" @click="saveData" :disable="tranferOrg == '' && noteReason == ''" />
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|