responsive ระบบการลา,ระบบลาออก

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-21 18:08:38 +07:00
parent 19da1d284a
commit 3221535748
21 changed files with 2119 additions and 1931 deletions

View file

@ -10,6 +10,7 @@
dense dense
:pagination-label="paginationLabel" :pagination-label="paginationLabel"
v-model:pagination="pagination" v-model:pagination="pagination"
:grid="!$q.screen.gt.xs"
> >
<template v-slot:pagination="scope"> <template v-slot:pagination="scope">
งหมด {{ attrs.rows.length }} รายการ งหมด {{ attrs.rows.length }} รายการ
@ -28,6 +29,28 @@
<template v-for="(_, slot) in slots" v-slot:[slot]="scope"> <template v-for="(_, slot) in slots" v-slot:[slot]="scope">
<slot :name="slot" v-bind="scope || {}" /> <slot :name="slot" v-bind="scope || {}" />
</template> </template>
<!-- <template #item="props">
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list>
<q-item
v-for="col in props.cols.filter((col:any) => col.name !== 'desc')"
:key="col.name"
>
<q-item-section>
<q-item-label caption>{{ col.label }}</q-item-label>
<q-item-label v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</q-item-label>
<q-item-label v-else>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template> -->
</q-table> </q-table>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -42,7 +65,6 @@ const props = defineProps({
}, },
}); });
const pagination = ref({ const pagination = ref({
sortBy: "desc", sortBy: "desc",
descending: false, descending: false,

View file

@ -186,7 +186,7 @@ function downloadFile(data: string) {
<div class="col-xs-12 col-sm-12"> <div class="col-xs-12 col-sm-12">
<div class="col-12 row q-pa-sm q-col-gutter-sm"> <div class="col-12 row q-pa-sm q-col-gutter-sm">
<q-input <q-input
class="col-8" class="col-md-8 col-xs-12"
dense dense
outlined outlined
v-model="tranferOrg" v-model="tranferOrg"
@ -196,7 +196,7 @@ function downloadFile(data: string) {
:rules="[(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`]" :rules="[(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`]"
/> />
<datepicker <datepicker
class="col-2" class="col-md-2 col-xs-12"
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="dateCommand" v-model="dateCommand"
:locale="'th'" :locale="'th'"
@ -240,7 +240,7 @@ function downloadFile(data: string) {
</template> </template>
</datepicker> </datepicker>
<datepicker <datepicker
class="col-2" class="col-md-2 col-xs-12"
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="dateLeave" v-model="dateLeave"
:locale="'th'" :locale="'th'"

View file

@ -209,13 +209,11 @@ const clickBack = () => {
</div> </div>
</div> </div>
<div> <div>
<q-table <d-table
flat flat
bordered bordered
dense dense
row-key="id" row-key="id"
class="custom-table2"
style="max-height: 80vh"
:rows="rows" :rows="rows"
:columns="columns" :columns="columns"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
@ -264,49 +262,37 @@ const clickBack = () => {
</q-td> </q-td>
</q-tr> </q-tr>
</template> </template>
</q-table> <template #item="props">
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card
bordered
flat
@click="router.push(`/retire/` + props.row.id)"
>
<q-list>
<q-item
v-for="col in props.cols.filter((col:any) => col.name !== 'desc')"
:key="col.name"
>
<q-item-section>
<q-item-label caption>{{ col.label }}</q-item-label>
<q-item-label v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</q-item-label>
<q-item-label v-else>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template>
</d-table>
</div> </div>
</q-card> </q-card>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss"></style>
.custom-table2 {
max-height: 64vh;
.q-table tr:nth-child(odd) td {
background: white;
}
.q-table tr:nth-child(even) td {
background: #f8f8f8;
}
.q-table thead tr {
background: #ecebeb;
}
.q-table thead tr th {
position: sticky;
}
.q-table td:nth-of-type(2) {
z-index: 3 !important;
}
.q-table th:nth-of-type(2),
.q-table td:nth-of-type(2) {
position: sticky;
left: 0;
z-index: 1;
}
.q-table thead tr:last-child th {
top: 48px;
}
.q-table thead tr:first-child th {
top: 0;
}
}
</style>

File diff suppressed because it is too large Load diff

View file

@ -19,13 +19,13 @@ import { useLeaveStore } from "@/modules/05_leave/store";
/**ตัวแปรที่ใช้ */ /**ตัวแปรที่ใช้ */
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { const {
showLoader, showLoader,
hideLoader, hideLoader,
messageError, messageError,
date2Thai, date2Thai,
monthYear2Thai, monthYear2Thai,
dialogRemove, dialogRemove,
success, success,
} = mixin; } = mixin;
const LeaveData = useLeaveStore(); const LeaveData = useLeaveStore();
const router = useRouter(); const router = useRouter();
@ -49,41 +49,41 @@ const pageSize = ref<number>(10);
/** function เรียกข้อมูลการลา*/ /** function เรียกข้อมูลการลา*/
async function fetchDataTable() { async function fetchDataTable() {
showLoader(); showLoader();
const body = { const body = {
year: year.value, //*( .) year: year.value, //*( .)
type: type.value, //*Id type: type.value, //*Id
status: status.value, //* status: status.value, //*
page: page.value.toString(), //* page: page.value.toString(), //*
pageSize: pageSize.value.toString(), //* pageSize: pageSize.value.toString(), //*
keyword: filter.value, //keyword keyword: filter.value, //keyword
}; };
await http await http
.post(config.API.leaveTableList(), body) .post(config.API.leaveTableList(), body)
.then((res) => { .then((res) => {
const data = res.data.result.data; const data = res.data.result.data;
LeaveData.fetchListLeave(data); LeaveData.fetchListLeave(data);
maxPage.value = Math.ceil(res.data.result.total / pageSize.value); maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
}); });
} }
/** function เรียกประเภทการลา */ /** function เรียกประเภทการลา */
async function fectOptionType() { async function fectOptionType() {
await http await http
.get(config.API.leaveType()) .get(config.API.leaveType())
.then(async (res) => { .then(async (res) => {
leaveType.value = res.data.result; leaveType.value = res.data.result;
LeaveData.fetchLeaveType(res.data.result); LeaveData.fetchLeaveType(res.data.result);
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
}); });
} }
/** /**
@ -92,9 +92,9 @@ async function fectOptionType() {
* @param status การลา * @param status การลา
*/ */
const onClickView = async (id: string, status: string) => { const onClickView = async (id: string, status: string) => {
modal.value = true; modal.value = true;
leaveId.value = id; leaveId.value = id;
leaveStatus.value = status; leaveStatus.value = status;
}; };
/** /**
@ -102,12 +102,12 @@ const onClickView = async (id: string, status: string) => {
* @param id * @param id
*/ */
const onClickEdit = async (id: string) => { const onClickEdit = async (id: string) => {
router.push(`/leave/edit/${id}`); router.push(`/leave/edit/${id}`);
}; };
// //
const clickDelete = (id: string) => { const clickDelete = (id: string) => {
dialogRemove($q, () => onClickDelete(id)); dialogRemove($q, () => onClickDelete(id));
}; };
/** /**
@ -115,20 +115,20 @@ const clickDelete = (id: string) => {
* @param id * @param id
*/ */
const onClickDelete = async (id: string) => { const onClickDelete = async (id: string) => {
await http await http
.delete(config.API.leaveUserId(id)) .delete(config.API.leaveUserId(id))
.then(async (res) => { .then(async (res) => {
success($q, "ลบข้อมูลสำเร็จ"); success($q, "ลบข้อมูลสำเร็จ");
fetchDataTable(); fetchDataTable();
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
}); });
}; };
/** function closePopup*/ /** function closePopup*/
async function onClickClose() { async function onClickClose() {
modal.value = false; modal.value = false;
} }
/** /**
@ -139,13 +139,13 @@ async function onClickClose() {
* @param k คำคนหา * @param k คำคนหา
*/ */
async function updateFilterTable(y: number, t: string, s: string, k: string) { async function updateFilterTable(y: number, t: string, s: string, k: string) {
if (t && s) { if (t && s) {
year.value = await y; year.value = await y;
type.value = await t; type.value = await t;
status.value = await s; status.value = await s;
filter.value = await k; filter.value = await k;
await fetchDataTable(); await fetchDataTable();
} }
} }
/** /**
@ -154,174 +154,295 @@ async function updateFilterTable(y: number, t: string, s: string, k: string) {
* @param ps แถวตอหน * @param ps แถวตอหน
*/ */
async function updatePagination(p: number, ps: number) { async function updatePagination(p: number, ps: number) {
(page.value = await p), (pageSize.value = await ps); (page.value = await p), (pageSize.value = await ps);
await fetchDataTable(); await fetchDataTable();
} }
/** /**
* เรยกฟงกนทงหมดตอนเรยกใชไฟล * เรยกฟงกนทงหมดตอนเรยกใชไฟล
*/ */
onMounted(async () => { onMounted(async () => {
await fetchDataTable(); await fetchDataTable();
await fectOptionType(); await fectOptionType();
}); });
</script> </script>
<template> <template>
<Table <Table
:rows="LeaveData.rows" :rows="LeaveData.rows"
:columns="LeaveData.columns" :columns="LeaveData.columns"
:visible-columns="LeaveData.visibleColumns" :visible-columns="LeaveData.visibleColumns"
v-model:inputfilter="filter" v-model:inputfilter="filter"
v-model:inputvisible="LeaveData.visibleColumns" v-model:inputvisible="LeaveData.visibleColumns"
:inputShow="true" :inputShow="true"
:grid="$q.screen.gt.xs ? false : true" :grid="$q.screen.gt.xs ? false : true"
@update:filter="updateFilterTable" @update:filter="updateFilterTable"
@update:Pagination="updatePagination" @update:Pagination="updatePagination"
:maxPage="maxPage" :maxPage="maxPage"
:pageSize="pageSize" :pageSize="pageSize"
:leaveType="leaveType" :leaveType="leaveType"
> >
<template #columns="props"> <template #columns="props">
<q-tr :props="props" class="cursor-pointer"> <q-tr :props="props" class="cursor-pointer">
<q-td <q-td
key="no" key="no"
:props="props" :props="props"
@click="onClickView(props.row.id, props.row.status)" @click="onClickView(props.row.id, props.row.status)"
> >
{{ (page - 1) * pageSize + props.rowIndex + 1 }} {{ (page - 1) * pageSize + props.rowIndex + 1 }}
</q-td> </q-td>
<q-td <q-td
key="leaveTypeName" key="leaveTypeName"
:props="props" :props="props"
@click="onClickView(props.row.id, props.row.status)" @click="onClickView(props.row.id, props.row.status)"
> >
{{ props.row.leaveTypeName }} {{ props.row.leaveTypeName }}
</q-td> </q-td>
<q-td <q-td
key="dateLeave" key="dateLeave"
:props="props" :props="props"
@click="onClickView(props.row.id, props.row.status)" @click="onClickView(props.row.id, props.row.status)"
> >
{{ props.row.dateLeave }} {{ props.row.dateLeave }}
</q-td> </q-td>
<q-td <q-td
key="dateSendLeave" key="dateSendLeave"
:props="props" :props="props"
@click="onClickView(props.row.id, props.row.status)" @click="onClickView(props.row.id, props.row.status)"
> >
{{ props.row.dateSendLeave }} {{ props.row.dateSendLeave }}
</q-td> </q-td>
<q-td key="status" :props="props"> <q-td key="status" :props="props">
<div class="col-12 row items-center"> <div class="col-12 row items-center">
<div @click="onClickView(props.row.id, props.row.status)"> <div @click="onClickView(props.row.id, props.row.status)">
<q-icon <q-icon
v-if="props.row.status == 'DRAFT'" v-if="props.row.status == 'DRAFT'"
size="10px" size="10px"
color="light-grey" color="light-grey"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<q-icon <q-icon
v-if="props.row.status == 'APPROVE'" v-if="props.row.status == 'APPROVE'"
size="10px" size="10px"
color="light-green" color="light-green"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<q-icon <q-icon
v-else-if="props.row.status == 'REJECT'" v-else-if="props.row.status == 'REJECT'"
size="10px" size="10px"
color="red-6" color="red-6"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<q-icon <q-icon
v-else-if="props.row.status == 'PENDING'" v-else-if="props.row.status == 'PENDING'"
size="10px" size="10px"
color="light-blue-14" color="light-blue-14"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<q-icon <q-icon
v-else-if="props.row.status == 'NEW'" v-else-if="props.row.status == 'NEW'"
size="10px" size="10px"
color="orange" color="orange"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<q-icon <q-icon
v-if="props.row.status == 'DELETE'" v-if="props.row.status == 'DELETE'"
size="10px" size="10px"
color="grey-10" color="grey-10"
name="mdi-circle" name="mdi-circle"
class="q-mr-sm" class="q-mr-sm"
/> />
<span class="q-pr-md">{{ props.row.statusConvert }}</span> <span class="q-pr-md">{{ props.row.statusConvert }}</span>
</div> </div>
<q-space /> <q-space />
<q-btn <q-btn
v-if=" v-if="
props.row.status != 'DELETE' && props.row.status != 'DELETE' &&
props.row.status != 'REJECT' && props.row.status != 'REJECT' &&
props.row.status != 'CANCEL' props.row.status != 'CANCEL'
" "
flat flat
icon="mdi-dots-vertical" icon="mdi-dots-vertical"
color="grey-8" color="grey-8"
for="#cancel" for="#cancel"
dense dense
round round
unelevated unelevated
> >
<q-menu> <q-menu>
<q-list> <q-list>
<q-item <q-item
clickable clickable
v-close-popup v-close-popup
@click="onClickView(props.row.id, 'CANCEL')" @click="onClickView(props.row.id, 'CANCEL')"
> >
<q-item-section> <q-item-section>
<q-item-label>ขอยกเล</q-item-label> <q-item-label>ขอยกเล</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="props.row.status == 'DRAFT'" v-if="props.row.status == 'DRAFT'"
clickable clickable
v-close-popup v-close-popup
@click="onClickEdit(props.row.id)" @click="onClickEdit(props.row.id)"
> >
<q-item-section> <q-item-section>
<q-item-label>แกไข</q-item-label> <q-item-label>แกไข</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="props.row.status == 'DRAFT'" v-if="props.row.status == 'DRAFT'"
clickable clickable
v-close-popup v-close-popup
@click="clickDelete(props.row.id)" @click="clickDelete(props.row.id)"
> >
<q-item-section> <q-item-section>
<q-item-label>ลบรายการการลา</q-item-label> <q-item-label>ลบรายการการลา</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
</q-menu> </q-menu>
</q-btn> </q-btn>
</div> </div>
</q-td> </q-td>
</q-tr> </q-tr>
</template> </template>
</Table>
<DialogDetail <template #item="props">
:modal="modal" <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
:leaveId="leaveId" <q-card bordered flat>
:leaveStatus="leaveStatus" <div class="row justify-end">
:onClickClose="onClickClose" <q-btn
:leaveType="leaveType" v-if="
:fetchDataTable="fetchDataTable" props.row.status != 'DELETE' &&
/> props.row.status != 'REJECT' &&
props.row.status != 'CANCEL'
"
flat
icon="mdi-dots-vertical"
color="grey-8"
for="#cancel"
dense
round
unelevated
@click.pervent
>
<q-menu>
<q-list>
<q-item
clickable
v-close-popup
@click="onClickView(props.row.id, 'CANCEL')"
>
<q-item-section>
<q-item-label>ขอยกเล</q-item-label>
</q-item-section>
</q-item>
<q-item
v-if="props.row.status == 'DRAFT'"
clickable
v-close-popup
@click="onClickEdit(props.row.id)"
>
<q-item-section>
<q-item-label>แกไข</q-item-label>
</q-item-section>
</q-item>
<q-item
v-if="props.row.status == 'DRAFT'"
clickable
v-close-popup
@click="clickDelete(props.row.id)"
>
<q-item-section>
<q-item-label>ลบรายการการลา</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
<q-separator />
<q-list @click.prevent="onClickView(props.row.id, props.row.status)">
<q-item
v-for="col in props.cols.filter((col:any) => col.name !== 'desc')"
:key="col.name"
>
<q-item-section>
<q-item-label caption>{{ col.label }}</q-item-label>
<q-item-label v-if="col.name === 'no'">
{{ (page - 1) * pageSize + props.rowIndex + 1 }}
</q-item-label>
<q-item-label v-if="col.name === 'status'">
<q-icon
v-if="props.row.status == 'DRAFT'"
size="10px"
color="light-grey"
name="mdi-circle"
class="q-mr-sm"
/>
<q-icon
v-if="props.row.status == 'APPROVE'"
size="10px"
color="light-green"
name="mdi-circle"
class="q-mr-sm"
/>
<q-icon
v-else-if="props.row.status == 'REJECT'"
size="10px"
color="red-6"
name="mdi-circle"
class="q-mr-sm"
/>
<q-icon
v-else-if="props.row.status == 'PENDING'"
size="10px"
color="light-blue-14"
name="mdi-circle"
class="q-mr-sm"
/>
<q-icon
v-else-if="props.row.status == 'NEW'"
size="10px"
color="orange"
name="mdi-circle"
class="q-mr-sm"
/>
<q-icon
v-if="props.row.status == 'DELETE'"
size="10px"
color="grey-10"
name="mdi-circle"
class="q-mr-sm"
/>
<span class="q-pr-md">{{ props.row.statusConvert }}</span>
</q-item-label>
<q-item-label v-else>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template>
</Table>
<DialogDetail
:modal="modal"
:leaveId="leaveId"
:leaveStatus="leaveStatus"
:onClickClose="onClickClose"
:leaveType="leaveType"
:fetchDataTable="fetchDataTable"
/>
</template> </template>

View file

@ -100,7 +100,7 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
v-if="leaveStore.tabValue === 'list'" v-if="leaveStore.tabValue === 'list'"
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="year" v-model="year"
class="col-2" class="col-xs-12 col-sm-auto"
:locale="'th'" :locale="'th'"
autoApply autoApply
year-picker year-picker
@ -217,6 +217,7 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
:rows-per-page-options="[10, 25, 50, 100]" :rows-per-page-options="[10, 25, 50, 100]"
:pagination="pagination" :pagination="pagination"
@update:pagination="updatePageSize" @update:pagination="updatePageSize"
:grid="$q.screen.gt.xs ? false : true"
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
@ -239,6 +240,10 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
<template #body="props"> <template #body="props">
<slot v-bind="props" name="columns"></slot> <slot v-bind="props" name="columns"></slot>
</template> </template>
<template v-slot:item="props">
<slot v-bind="props" name="item"></slot>
</template>
</q-table> </q-table>
</div> </div>
</template> </template>

View file

@ -3,104 +3,104 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section>
<div class="q-pa-md q-gutter-md"> <div class="q-gutter-md q-pa-sm">
<div class="row"> <div class="row">
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col">{{ props.data.dateSendLeave }}</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col">{{ props.data.leaveTypeName }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col">{{ props.data.leaveWrote }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col">{{ props.data.leaveDateStart }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col"> <div class="col-xs-12 col-md-6">
{{ {{
props.data.leaveRange == "ALL" props.data.leaveRange == "ALL"
? props.data.leaveTotal + " วัน" ? props.data.leaveTotal + " วัน"
: props.data.leaveRange == "MORNING" : props.data.leaveRange == "MORNING"
? "ลาครึ่งวันเช้า (0.5)" ? "ลาครึ่งวันเช้า (0.5)"
: "ลาครึ่งวันบ่าย (0.5)" : "ลาครึ่งวันบ่าย (0.5)"
}} }}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8"></div> <div class="col-xs-12 col-md-6 text-grey-8"></div>
<div class="col">{{ props.data.leaveTypeDay }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeDay }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8"> <div class="col-xs-12 col-md-6 text-grey-8">
ลาครงสดทายในประเภทน เมอวนท ลาครงสดทายในประเภทน เมอวนท
</div> </div>
<div class="col">{{ props.data.leaveLastStart }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveLastStart }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
<div class="col">{{ props.data.leaveNumber }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">อยดตอไดระหวางลา</div> <div class="col-xs-12 col-md-6 text-grey-8">อยดตอไดระหวางลา</div>
<div class="col">{{ props.data.leaveAddress }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col"> <div class="col-xs-12 col-md-6">
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col"> <div class="col-xs-12 col-md-6">
<div <div
v-if=" v-if="
props.data.leaveDocument && props.data.leaveDocument.length > 0 props.data.leaveDocument && props.data.leaveDocument.length > 0
" "
> >
<div <div
v-for="(document, index) in props.data.leaveDocument" v-for="(document, index) in props.data.leaveDocument"
:key="index" :key="index"
:style="{ marginBottom: '10px' }" :style="{ marginBottom: '10px' }"
> >
<div> <div>
<q-btn <q-btn
:href="document" :href="document"
target="_blank" target="_blank"
outline outline
color="blue" color="blue"
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
size="12px" size="12px"
> >
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
</q-btn> </q-btn>
</div> </div>
</div> </div>
</div> </div>
<div v-else>-</div> <div v-else>-</div>
</div> </div>
</div> </div>
</div> </div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,95 +3,91 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }}
{{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">อภรรยา</div>
<div class="col text-grey-8">อภรรยา</div> <div class="col-xs-12 col-md-6">{{ props.data.wifeDayName }}</div>
<div class="col">{{ props.data.wifeDayName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทคลอด</div>
<div class="col text-grey-8">นทคลอด</div> <div class="col-xs-12 col-md-6">{{ props.data.wifeDayDateBorn }}</div>
<div class="col">{{ props.data.wifeDayDateBorn }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
<div class="col">{{ props.data.leaveNumber }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">อยดตอไดระหวางลา</div>
<div class="col text-grey-8">อยดตอไดระหวางลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
<div class="col">{{ props.data.leaveAddress }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6">
<div class="col"> <div
<div v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
v-if=" >
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div
" v-for="(document, index) in props.data.leaveDocument"
> :key="index"
<div :style="{ marginBottom: '11px' }"
v-for="(document, index) in props.data.leaveDocument" >
:key="index" <div>
:style="{ marginBottom: '11px' }" <q-btn
> :href="document"
<div> target="_blank"
<q-btn outline
:href="document" color="blue"
target="_blank" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
outline size="12px"
color="blue" >
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
size="12px" </q-btn>
> </div>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </div>
</q-btn> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div>
</div>
</div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,106 +3,108 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">
<div class="col text-grey-8">จำนวนวนลาพกผอนสะสม จากปานมา</div> จำนวนวนลาพกผอนสะสม จากปานมา
<div class="col">{{ props.data.restDayOldTotal }}</div> </div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.restDayOldTotal }}</div>
<div class="row"> </div>
<div class="col text-grey-8">จำนวนวนลาพกผอนประจำปจจ</div> <div class="row">
<div class="col">{{ props.data.restDayCurrentTotal }}</div> <div class="col-xs-12 col-md-6 text-grey-8">
</div> จำนวนวนลาพกผอนประจำปจจ
<div class="row"> </div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.restDayCurrentTotal }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col"> </div>
{{ <div class="row">
props.data.leaveRange == "ALL" <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
? props.data.leaveTotal + " วัน" <div class="col-xs-12 col-md-6">
: props.data.leaveRange == "MORNING" {{
? "ลาครึ่งวันเช้า (0.5)" props.data.leaveRange == "ALL"
: "ลาครึ่งวันบ่าย (0.5)" ? props.data.leaveTotal + " วัน"
}} : props.data.leaveRange == "MORNING"
</div> ? "ลาครึ่งวันเช้า (0.5)"
</div> : "ลาครึ่งวันบ่าย (0.5)"
<div class="row"> }}
<div class="col text-grey-8"></div> </div>
<div class="col">{{ props.data.leaveTypeDay }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8"></div>
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeDay }}</div>
<div class="col">{{ props.data.leaveNumber }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
<div class="col text-grey-8">อยดตอไดระหวางลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
<div class="col">{{ props.data.leaveAddress }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">
<div class="col text-grey-8">รายละเอยด</div> อยดตอไดระหวางลา
<div class="col"> </div>
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
<div </div>
v-if=" </div>
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div class="row">
" <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
> <div class="col-xs-12 col-md-6">
<div <div
v-for="(document, index) in props.data.leaveDocument" v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
:key="index" >
:style="{ marginBottom: '10px' }" <div
> v-for="(document, index) in props.data.leaveDocument"
<div> :key="index"
<q-btn :style="{ marginBottom: '10px' }"
:href="document" >
target="_blank" <div>
outline <q-btn
color="blue" :href="document"
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" target="_blank"
size="12px" outline
> color="blue"
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
</q-btn> size="12px"
</div> >
</div> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
</div> </q-btn>
<div v-else>-</div> </div>
</div> </div>
</div> </div>
</div> <div v-else>-</div>
</q-card-section> </div>
</div>
</div>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,113 +3,109 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-md q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveLastStart }}</div>
<div class="col">{{ props.data.leaveLastStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveLastEnd }}</div>
<div class="col">{{ props.data.leaveLastEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }}
{{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นเดอนปเก</div>
<div class="col text-grey-8">นเดอนปเก</div> <div class="col-xs-12 col-md-6">{{ props.data.leavebirthDate }}</div>
<div class="col">{{ props.data.leavebirthDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทเขารบราชการ</div>
<div class="col text-grey-8">นทเขารบราชการ</div> <div class="col-xs-12 col-md-6">{{ props.data.leavegovernmentDate }}</div>
<div class="col">{{ props.data.leavegovernmentDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เคย/ไมเคยบวช</div>
<div class="col text-grey-8">เคย/ไมเคยบวช</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.ordainDayStatus ? "เคย" : "ไม่เคย" }}
{{ props.data.ordainDayStatus ? "เคย" : "ไม่เคย" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">สถานทบวช</div>
<div class="col text-grey-8">สถานทบวช</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.ordainDayLocationName }}
{{ props.data.ordainDayLocationName }} {{ props.data.ordainDayLocationAddress }}
{{ props.data.ordainDayLocationAddress }} {{ props.data.ordainDayLocationNumber }}
{{ props.data.ordainDayLocationNumber }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นอปสมบท</div>
<div class="col text-grey-8">นอปสมบท</div> <div class="col-xs-12 col-md-6">{{ props.data.ordainDayOrdination }}</div>
<div class="col">{{ props.data.ordainDayOrdination }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">สถานทจำพรรษา</div>
<div class="col text-grey-8">สถานทจำพรรษา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.ordainDayBuddhistLentName }}
{{ props.data.ordainDayBuddhistLentName }} {{ props.data.ordainDayBuddhistLentAddress }}
{{ props.data.ordainDayBuddhistLentAddress }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6">
<div class="col"> <div
<div v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
v-if=" >
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div
" v-for="(document, index) in props.data.leaveDocument"
> :key="index"
<div :style="{ marginBottom: '10px' }"
v-for="(document, index) in props.data.leaveDocument" >
:key="index" <div>
:style="{ marginBottom: '10px' }" <q-btn
> :href="document"
<div> target="_blank"
<q-btn outline
:href="document" color="blue"
target="_blank" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
outline size="12px"
color="blue" >
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
size="12px" </q-btn>
> </div>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </div>
</q-btn> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div>
</div>
</div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,88 +3,88 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }}
{{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทเขารบราชการ</div>
<div class="col text-grey-8">นทเขารบราชการ</div> <div class="col-xs-12 col-md-6">{{ props.data.leavegovernmentDate }}</div>
<div class="col">{{ props.data.leavegovernmentDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">
<div class="col text-grey-8">เคย/ไมเคยไปประกอบพจญ</div> เคย/ไมเคยไปประกอบพจญ
<div class="col">{{ props.data.hajjDayStatus ? "เคย" : "ไม่เคย" }}</div> </div>
</div> <div class="col-xs-12 col-md-6">
<div class="row"> {{ props.data.hajjDayStatus ? "เคย" : "ไม่เคย" }}
<div class="col text-grey-8">รายละเอยด</div> </div>
<div class="col"> </div>
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} <div class="row">
</div> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
</div> <div class="col-xs-12 col-md-6">
<div class="row"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
<div class="col text-grey-8">เอกสารแนบ</div> </div>
<div class="col"> </div>
<div <div class="row">
v-if=" <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div class="col-xs-12 col-md-6">
" <div
> v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
<div >
v-for="(document, index) in props.data.leaveDocument" <div
:key="index" v-for="(document, index) in props.data.leaveDocument"
:style="{ marginBottom: '10px' }" :key="index"
> :style="{ marginBottom: '10px' }"
<div> >
<q-btn <div>
:href="document" <q-btn
target="_blank" :href="document"
outline target="_blank"
color="blue" outline
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" color="blue"
size="12px" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
> size="12px"
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> >
</q-btn> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
</div> </q-btn>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
</q-card-section> </div>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,101 +3,99 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
console.log(props); console.log(props);
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }}
{{ props.data.leaveTotal ? props.data.leaveTotal + " วัน" : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ไดบหมายเรยกของ</div>
<div class="col text-grey-8">ไดบหมายเรยกของ</div> <div class="col-xs-12 col-md-6">{{ props.data.absentDaySummon }}</div>
<div class="col">{{ props.data.absentDaySummon }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8"></div>
<div class="col text-grey-8"></div> <div class="col-xs-12 col-md-6">{{ props.data.absentDayLocation }}</div>
<div class="col">{{ props.data.absentDayLocation }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลงวนท</div>
<div class="col text-grey-8">ลงวนท</div> <div class="col-xs-12 col-md-6">
<div class="col">{{ props.data.absentDayRegistorDate }}</div> {{ props.data.absentDayRegistorDate }}
</div> </div>
<div class="row"> </div>
<div class="col text-grey-8">ใหเขารบการ</div> <div class="row">
<div class="col">{{ props.data.absentDayGetIn }}</div> <div class="col-xs-12 col-md-6 text-grey-8">ใหเขารบการ</div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.absentDayGetIn }}</div>
<div class="row"> </div>
<div class="col text-grey-8"> </div> <div class="row">
<div class="col">{{ props.data.absentDayAt }}</div> <div class="col-xs-12 col-md-6 text-grey-8"> </div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.absentDayAt }}</div>
<div class="row"> </div>
<div class="col text-grey-8">รายละเอยด</div> <div class="row">
<div class="col"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} <div class="col-xs-12 col-md-6">
</div> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
</div> </div>
<div class="row"> </div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="row">
<div class="col"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div <div class="col-xs-12 col-md-6">
v-if=" <div
props.data.leaveDocument && props.data.leaveDocument.length > 0 v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
" >
> <div
<div v-for="(document, index) in props.data.leaveDocument"
v-for="(document, index) in props.data.leaveDocument" :key="index"
:key="index" :style="{ marginBottom: '10px' }"
:style="{ marginBottom: '10px' }" >
> <div>
<div> <q-btn
<q-btn :href="document"
:href="document" target="_blank"
target="_blank" outline
outline color="blue"
color="blue" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" size="12px"
size="12px" >
> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </q-btn>
</q-btn> </div>
</div> </div>
</div> </div>
</div> <div v-else>-</div>
<div v-else>-</div> </div>
</div> </div>
</div> </div>
</div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,122 +3,122 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveCount ? props.data.leaveCount : "-" }}
{{ props.data.leaveCount ? props.data.leaveCount : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นเดอนปเก</div>
<div class="col text-grey-8">นเดอนปเก</div> <div class="col-xs-12 col-md-6">{{ props.data.leavebirthDate }}</div>
<div class="col">{{ props.data.leavebirthDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทเขารบราชการ</div>
<div class="col text-grey-8">นทเขารบราชการ</div> <div class="col-xs-12 col-md-6">{{ props.data.leavegovernmentDate }}</div>
<div class="col">{{ props.data.leavegovernmentDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เงนเดอนปจจ</div>
<div class="col text-grey-8">เงนเดอนปจจ</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }})
{{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }}) </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">กษาวชา</div>
<div class="col text-grey-8">กษาวชา</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDaySubject }}</div>
<div class="col">{{ props.data.studyDaySubject }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นปรญญา</div>
<div class="col text-grey-8">นปรญญา</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayDegreeLevel }}</div>
<div class="col">{{ props.data.studyDayDegreeLevel }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">อสถานศกษา</div>
<div class="col text-grey-8">อสถานศกษา</div> <div class="col-xs-12 col-md-6">
<div class="col">{{ props.data.studyDayUniversityName }}</div> {{ props.data.studyDayUniversityName }}
</div> </div>
<div class="row"> </div>
<div class="col text-grey-8">ประเทศ</div> <div class="row">
<div class="col">{{ props.data.studyDayCountry }}</div> <div class="col-xs-12 col-md-6 text-grey-8">ประเทศ</div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayCountry }}</div>
<div class="row"> </div>
<div class="col text-grey-8">วยท</div> <div class="row">
<div class="col">{{ props.data.studyDayScholarship }}</div> <div class="col-xs-12 col-md-6 text-grey-8">วยท</div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayScholarship }}</div>
<div class="row"> </div>
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="row">
<div class="col">{{ props.data.leaveNumber }}</div> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
<div class="row"> </div>
<div class="col text-grey-8">อยดตอไดระหวางลา</div> <div class="row">
<div class="col">{{ props.data.leaveAddress }}</div> <div class="col-xs-12 col-md-6 text-grey-8">
</div> อยดตอไดระหวางลา
<div class="row"> </div>
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
<div class="col"> </div>
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} <div class="row">
</div> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
</div> <div class="col-xs-12 col-md-6">
<div class="row"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
<div class="col text-grey-8">เอกสารแนบ</div> </div>
<div class="col"> </div>
<div <div class="row">
v-if=" <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div class="col-xs-12 col-md-6">
" <div
> v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
<div >
v-for="(document, index) in props.data.leaveDocument" <div
:key="index" v-for="(document, index) in props.data.leaveDocument"
:style="{ marginBottom: '10px' }" :key="index"
> :style="{ marginBottom: '10px' }"
<div> >
<q-btn <div>
:href="document" <q-btn
target="_blank" :href="document"
outline target="_blank"
color="blue" outline
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" color="blue"
size="12px" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
> size="12px"
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> >
</q-btn> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
</div> </q-btn>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
</q-card-section> </div>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,117 +3,113 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveCount ? props.data.leaveCount : "-" }}
{{ props.data.leaveCount ? props.data.leaveCount : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นเดอนปเก</div>
<div class="col text-grey-8">นเดอนปเก</div> <div class="col-xs-12 col-md-6">{{ props.data.leavebirthDate }}</div>
<div class="col">{{ props.data.leavebirthDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทเขารบราชการ</div>
<div class="col text-grey-8">นทเขารบราชการ</div> <div class="col-xs-12 col-md-6">{{ props.data.leavegovernmentDate }}</div>
<div class="col">{{ props.data.leavegovernmentDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เงนเดอนปจจ</div>
<div class="col text-grey-8">เงนเดอนปจจ</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }})
{{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }}) </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="col text-grey-8">าน/หลกสตร</div> <div class="col-xs-12 col-md-6 text-grey-8">าน/หลกสตร</div>
<div class="col">{{ props.data.studyDayTrainingSubject }}</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayTrainingSubject }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8"> สถานท</div> <div class="col-xs-12 col-md-6 text-grey-8"> สถานท</div>
<div class="col">{{ props.data.studyDayTrainingName }}</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayTrainingName }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">ประเทศ</div> <div class="col-xs-12 col-md-6 text-grey-8">ประเทศ</div>
<div class="col">{{ props.data.studyDayCountry }}</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayCountry }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">วยท</div> <div class="col-xs-12 col-md-6 text-grey-8">วยท</div>
<div class="col">{{ props.data.studyDayScholarship }}</div> <div class="col-xs-12 col-md-6">{{ props.data.studyDayScholarship }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
<div class="col">{{ props.data.leaveNumber }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">อยดตอไดระหวางลา</div> <div class="col-xs-12 col-md-6 text-grey-8">อยดตอไดระหวางลา</div>
<div class="col">{{ props.data.leaveAddress }}</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col"> <div class="col-xs-12 col-md-6">
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col"> <div class="col-xs-12 col-md-6">
<div <div
v-if=" v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
props.data.leaveDocument && props.data.leaveDocument.length > 0 >
" <div
> v-for="(document, index) in props.data.leaveDocument"
<div :key="index"
v-for="(document, index) in props.data.leaveDocument" :style="{ marginBottom: '10px' }"
:key="index" >
:style="{ marginBottom: '10px' }" <div>
> <q-btn
<div> :href="document"
<q-btn target="_blank"
:href="document" outline
target="_blank" color="blue"
outline :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
color="blue" size="12px"
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" >
size="12px" <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
> </q-btn>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </div>
</q-btn> </div>
</div> </div>
</div> <div v-else>-</div>
</div> </div>
<div v-else>-</div> </div>
</div> </div>
</div>
</div>
</q-card-section>
</template> </template>

View file

@ -3,93 +3,89 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveCount ? props.data.leaveCount : "-" }}
{{ props.data.leaveCount ? props.data.leaveCount : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารประกอบ</div>
<div class="col text-grey-8">เอกสารประกอบ</div> <div class="col-xs-12 col-md-6" v-if="props.data.leaveDocument">
<div class="col" v-if="props.data.leaveDocument"> <q-btn
<q-btn :href="props.data.leaveDocument"
:href="props.data.leaveDocument" target="_blank"
target="_blank" outline
outline color="blue"
color="blue" label="ดาวน์โหลด"
label="ดาวน์โหลด" size="12px"
size="12px" >
> <q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
<q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn >
> </div>
</div> <div class="col-xs-12 col-md-6" v-else>-</div>
<div class="col" v-else>-</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6">
<div class="col"> <div
<div v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
v-if=" >
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div
" v-for="(document, index) in props.data.leaveDocument"
> :key="index"
<div :style="{ marginBottom: '10px' }"
v-for="(document, index) in props.data.leaveDocument" >
:key="index" <div>
:style="{ marginBottom: '10px' }" <q-btn
> :href="document"
<div> target="_blank"
<q-btn outline
:href="document" color="blue"
target="_blank" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
outline size="12px"
color="blue" >
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
size="12px" </q-btn>
> </div>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </div>
</q-btn> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div>
</div>
</div>
</q-card-section>
</template> </template>

View file

@ -3,124 +3,124 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveCount ? props.data.leaveCount : "-" }}
{{ props.data.leaveCount ? props.data.leaveCount : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นเดอนปเก</div>
<div class="col text-grey-8">นเดอนปเก</div> <div class="col-xs-12 col-md-6">{{ props.data.leavebirthDate }}</div>
<div class="col">{{ props.data.leavebirthDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทเขารบราชการ</div>
<div class="col text-grey-8">นทเขารบราชการ</div> <div class="col-xs-12 col-md-6">{{ props.data.leavegovernmentDate }}</div>
<div class="col">{{ props.data.leavegovernmentDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เงนเดอนปจจ</div>
<div class="col text-grey-8">เงนเดอนปจจ</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }})
{{ props.data.leaveSalary }} ({{ props.data.leaveSalaryText }}) </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">อคสมรส</div>
<div class="col text-grey-8">อคสมรส</div> <div class="col-xs-12 col-md-6">{{ props.data.coupleDayName }}</div>
<div class="col">{{ props.data.coupleDayName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ตำแหนงคสมรส</div>
<div class="col text-grey-8">ตำแหนงคสมรส</div> <div class="col-xs-12 col-md-6">{{ props.data.coupleDayPosition }}</div>
<div class="col">{{ props.data.coupleDayPosition }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ไปปฏราชการ ประเทศ</div>
<div class="col text-grey-8">ไปปฏราชการ ประเทศ</div> <div class="col-xs-12 col-md-6">
<div class="col">{{ props.data.coupleDayLevelCountry }}</div> {{ props.data.coupleDayLevelCountry }}
</div> </div>
<div class="row"> </div>
<div class="col text-grey-8">ประวการลาตดตามคสมรสครงสดทาย</div> <div class="row">
</div> <div class="col-xs-12 col-md-6 text-grey-8">
<div class="row q-mt-xs"> ประวการลาตดตามคสมรสครงสดทาย
<div class="col text-grey-8"> </div>
<div class="q-ml-md" style="list-style-type: circle"> </div>
<li>ประเทศ</li> <div class="row q-mt-xs">
<li>จำนวนว</li> <div class="col-xs-12 col-md-6 text-grey-8">
<li>งแตนท</li> <div class="q-ml-md" style="list-style-type: circle">
<li>งวนท</li> <li>ประเทศ</li>
<li>ลาตดตอกบครงกอน รวมทงนวย</li> <li>จำนวนว</li>
</div> <li>งแตนท</li>
</div> <li>งวนท</li>
<div class="col"> <li>ลาตดตอกบครงกอน รวมทงนวย</li>
<div>{{ props.data.coupleDayCountryHistory }}</div> </div>
<div>{{ props.data.coupleDayTotalHistory }}</div> </div>
<div>{{ props.data.coupleDayStartDateHistory }}</div> <div class="col-xs-12 col-md-6">
<div>{{ props.data.coupleDayEndDateHistory }}</div> <div>{{ props.data.coupleDayCountryHistory }}</div>
<div>{{ props.data.coupleDaySumTotalHistory }}</div> <div>{{ props.data.coupleDayTotalHistory }}</div>
</div> <div>{{ props.data.coupleDayStartDateHistory }}</div>
</div> <div>{{ props.data.coupleDayEndDateHistory }}</div>
<div class="row"> <div>{{ props.data.coupleDaySumTotalHistory }}</div>
<div class="col text-grey-8">รายละเอยด</div> </div>
<div class="col"> </div>
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} <div class="row">
</div> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
</div> <div class="col-xs-12 col-md-6">
<div class="row"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
<div class="col text-grey-8">เอกสารแนบ</div> </div>
<div class="col"> </div>
<div <div class="row">
v-if=" <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div class="col-xs-12 col-md-6">
" <div
> v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
<div >
v-for="(document, index) in props.data.leaveDocument" <div
:key="index" v-for="(document, index) in props.data.leaveDocument"
:style="{ marginBottom: '10px' }" :key="index"
> :style="{ marginBottom: '10px' }"
<div> >
<q-btn <div>
:href="document" <q-btn
target="_blank" :href="document"
outline target="_blank"
color="blue" outline
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" color="blue"
size="12px" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
> size="12px"
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> >
</q-btn> <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
</div> </q-btn>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
</q-card-section> </div>
</template> </template>

View file

@ -3,87 +3,83 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">นทนใบลา</div>
<div class="col text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เรอง</div>
<div class="col text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateStart }}</div>
<div class="col">{{ props.data.leaveDateStart }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDateEnd }}</div>
<div class="col">{{ props.data.leaveDateEnd }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยด</div>
<div class="col text-grey-8">รายละเอยด</div> <div class="col-xs-12 col-md-6">
<div class="col"> {{ props.data.leaveDetail ? props.data.leaveDetail : "-" }}
{{ props.data.leaveDetail ? props.data.leaveDetail : "-" }} </div>
</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารประกอบ</div>
<div class="col text-grey-8">เอกสารประกอบ</div> <div class="col-xs-12 col-md-6" v-if="props.data.leaveDocument">
<div class="col" v-if="props.data.leaveDocument"> <q-btn
<q-btn :href="props.data.leaveDocument"
:href="props.data.leaveDocument" target="_blank"
target="_blank" outline
outline color="blue"
color="blue" label="ดาวน์โหลด"
label="ดาวน์โหลด" size="12px"
size="12px" >
> <q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
<q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn >
> </div>
</div> <div class="col-xs-12 col-md-6" v-else>-</div>
<div class="col" v-else>-</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารแนบ</div>
<div class="col text-grey-8">เอกสารแนบ</div> <div class="col-xs-12 col-md-6">
<div class="col"> <div
<div v-if="props.data.leaveDocument && props.data.leaveDocument.length > 0"
v-if=" >
props.data.leaveDocument && props.data.leaveDocument.length > 0 <div
" v-for="(document, index) in props.data.leaveDocument"
> :key="index"
<div :style="{ marginBottom: '10px' }"
v-for="(document, index) in props.data.leaveDocument" >
:key="index" <div>
:style="{ marginBottom: '10px' }" <q-btn
> :href="document"
<div> target="_blank"
<q-btn outline
:href="document" color="blue"
target="_blank" :label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`"
outline size="12px"
color="blue" >
:label="`ดาวน์โหลดเอกสารแนบที่ ${index + 1}`" <q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip>
size="12px" </q-btn>
> </div>
<q-tooltip>ดาวนโหลดเอกสารแนบท {{ index + 1 }}</q-tooltip> </div>
</q-btn> </div>
</div> <div v-else>-</div>
</div> </div>
</div> </div>
<div v-else>-</div> </div>
</div>
</div>
</div>
</q-card-section>
</template> </template>

View file

@ -3,77 +3,75 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เขยนท</div>
<div class="col text-grey-8">เขยนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveWrote }}</div>
<div class="col">{{ props.data.leaveWrote }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ประเภทการลา</div>
<div class="col text-grey-8">ประเภทการลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">-นามสก</div>
<div class="col text-grey-8">-นามสก</div> <div class="col-xs-12 col-md-6">{{ props.data.fullname }}</div>
<div class="col">{{ props.data.fullname }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">สถานะการของลา</div>
<div class="col text-grey-8">สถานะการของลา</div> <div class="col-xs-12 col-md-6">{{ props.data.status }}</div>
<div class="col">{{ props.data.status }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาตงแตนท</div>
<div class="col text-grey-8">ลาตงแตนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveStartDate }}</div>
<div class="col">{{ props.data.leaveStartDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">ลาถงวนท</div>
<div class="col text-grey-8">ลาถงวนท</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveEndDate }}</div>
<div class="col">{{ props.data.leaveEndDate }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">จำนวนวนทลา</div>
<div class="col text-grey-8">จำนวนวนทลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTotal }}</div>
<div class="col">{{ props.data.leaveTotal }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">สถานทดตอขณะลา</div>
<div class="col text-grey-8">สถานทดตอขณะลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveAddress }}</div>
<div class="col">{{ props.data.leaveAddress }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">หมายเลขทดตอขณะลา</div>
<div class="col text-grey-8">หมายเลขทดตอขณะลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveNumber }}</div>
<div class="col">{{ props.data.leaveNumber }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เหตผลการยกเลกการลา</div>
<div class="col text-grey-8">เหตผลการยกเลกการลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveResonDelete }}</div>
<div class="col">{{ props.data.leaveResonDelete }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">รายละเอยดการลา</div>
<div class="col text-grey-8">รายละเอยดการลา</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveDetail }}</div>
<div class="col">{{ props.data.leaveDetail }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6 text-grey-8">เอกสารการยกเลกการลา</div>
<div class="col text-grey-8">เอกสารการยกเลกการลา</div> <div class="col-xs-12 col-md-6" v-if="props.data.leaveDocDelete">
<div class="col" v-if="props.data.leaveDocDelete"> <q-btn
<q-btn :href="props.data.leaveDocDelete"
:href="props.data.leaveDocDelete" target="_blank"
target="_blank" outline
outline color="blue"
color="blue" label="ดาวน์โหลด"
label="ดาวน์โหลด" size="12px"
size="12px" >
> <q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
<q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn >
> </div>
</div> <div class="col-xs-12 col-md-6" v-else>-</div>
<div class="col" v-else>-</div> </div>
</div> </div>
</div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -3,45 +3,43 @@
* prop จาก component * prop จาก component
*/ */
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
}); });
</script> </script>
<template> <template>
<q-card-section> <div class="q-pa-sm q-gutter-md">
<div class="q-pa-md q-gutter-md"> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">นทนใบลา</div>
<div class="col-4 text-grey-8">นทนใบลา</div> <div class="col-xs-12 col-md-6">{{ props.data.dateSendLeave }}</div>
<div class="col">{{ props.data.dateSendLeave }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">เรอง</div>
<div class="col-4 text-grey-8">เรอง</div> <div class="col-xs-12 col-md-6">{{ props.data.leaveTypeName }}</div>
<div class="col">{{ props.data.leaveTypeName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">เรยน</div>
<div class="col-4 text-grey-8">เรยน</div> <div class="col-xs-12 col-md-6">{{ props.data.notification }}</div>
<div class="col">{{ props.data.notification }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">อผนขอ</div>
<div class="col-4 text-grey-8">อผนขอ</div> <div class="col-xs-12 col-md-6">{{ props.data.fullname }}</div>
<div class="col">{{ props.data.fullname }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">ตำแหนงผนขอ</div>
<div class="col-4 text-grey-8">ตำแหนงผนขอ</div> <div class="col-xs-12 col-md-6">{{ props.data.positionName }}</div>
<div class="col">{{ props.data.positionName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">ระดบผนขอ</div>
<div class="col-4 text-grey-8">ระดบผนขอ</div> <div class="col-xs-12 col-md-6">{{ props.data.positionLevelName }}</div>
<div class="col">{{ props.data.positionLevelName }}</div> </div>
</div> <div class="row">
<div class="row"> <div class="col-xs-12 col-md-6-4 text-grey-8">งกดผนขอ</div>
<div class="col-4 text-grey-8">งกดผนขอ</div> <div class="col-xs-12 col-md-6">{{ props.data.organizationName }}</div>
<div class="col">{{ props.data.organizationName }}</div> </div>
</div> </div>
</div>
</q-card-section>
</template> </template>
<style scoped></style> <style scoped></style>

View file

@ -18,7 +18,7 @@ const leaveStore = useLeaveStore();
const { showLoader, hideLoader, messageError } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const router = useRouter(); const router = useRouter();
const route = useRoute() const route = useRoute();
const $q = useQuasar(); const $q = useQuasar();
const filterLeaveType = ref(["ลาป่วย", "ลากิจส่วนตัว", "ลาพักผ่อน"]); const filterLeaveType = ref(["ลาป่วย", "ลากิจส่วนตัว", "ลาพักผ่อน"]);
@ -422,37 +422,60 @@ onMounted(async () => {
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-section class="q-p-md row"> <q-card-section class="q-p-md row">
<q-table <div class="col-12">
flat <d-table
bordered flat
dense bordered
:rows="row" dense
:columns="columns" :rows="row"
row-key="leaveTypeName" :columns="columns"
class="custom-table2 col-12" row-key="leaveTypeName"
hide-bottom hide-bottom
v-model:pagination="pagination" v-model:pagination="pagination"
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props"> <q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span> <span class="text-weight-medium">{{ col.label }}</span>
</q-th> </q-th>
</q-tr> </q-tr>
</template> </template>
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer"> <q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props"> <q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'"> <div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }} {{ props.rowIndex + 1 }}
</div> </div>
<div v-else> <div v-else>
{{ col.value }} {{ col.value }}
</div> </div>
</q-td> </q-td>
</q-tr></template </q-tr></template
></q-table >
> <!-- <template #item="props">
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list>
<q-item
v-for="col in props.cols.filter((col:any) => col.name !== 'desc')"
:key="col.name"
>
<q-item-section>
<q-item-label caption>{{ col.label }}</q-item-label>
<q-item-label v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</q-item-label>
<q-item-label v-else>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template> -->
</d-table>
</div>
</q-card-section> </q-card-section>
</q-card> </q-card>
</q-dialog> </q-dialog>

View file

@ -378,12 +378,55 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
</q-list> </q-list>
</q-btn-dropdown> </q-btn-dropdown>
<div v-else class="q-ml-sm" style="width: 30px"> <div v-else class="q-ml-sm" style="width: 30px">
<q-img <q-btn round>
src="@/assets/avatar_user.jpg" <q-avatar>
class="border-100" <q-img
spinner-color="white" src="@/assets/avatar_user.jpg"
style="height: 30px; max-width: 30px" class="border-100"
/> spinner-color="white"
style="height: 30px; max-width: 30px"
/>
</q-avatar>
<q-menu>
<q-list dense style="min-width: 200px">
<q-item clickable v-close-popup>
<q-item-section>
<div class="row items-center">
<q-list>
<q-item clickable v-close-popup>
<q-item-section avatar style="min-width: 30px">
<q-icon
color="orange-9"
size="18px"
name="mdi-lock-outline"
/>
</q-item-section>
<q-item-section
><q-item-label
>เปลยนรหสผาน</q-item-label
></q-item-section
>
</q-item>
<q-item clickable v-close-popup @click="doLogout">
<q-item-section avatar style="min-width: 30px">
<q-icon
color="primary"
size="18px"
name="mdi-logout-variant"
/>
</q-item-section>
<q-item-section>
<q-item-label>ออกจากระบบ</q-item-label>
</q-item-section>
</q-item>
</q-list>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div> </div>
</q-toolbar> </q-toolbar>
</q-header> </q-header>