ทะเบียนประวัติ: ฝึกอบรมดูงาน แก้การค้นหา
This commit is contained in:
parent
8f80776549
commit
4277eb2325
1 changed files with 11 additions and 62 deletions
|
|
@ -54,7 +54,10 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันเริ่มต้นการฝึกอบรม/ดูงาน",
|
label: "วันเริ่มต้นการฝึกอบรม/ดูงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "startDate",
|
field: (v) =>
|
||||||
|
v.isDate
|
||||||
|
? date2Thai(v.startDate)
|
||||||
|
: new Date(v.startDate).getFullYear() + 543,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -65,7 +68,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันสิ้นสุดการฝึกอบรม/ดูงาน",
|
label: "วันสิ้นสุดการฝึกอบรม/ดูงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "endDate",
|
field: (v) =>
|
||||||
|
v.isDate ? date2Thai(v.endDate) : new Date(v.endDate).getFullYear() + 543,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -77,6 +81,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ปีที่อบรม (พ.ศ.)",
|
label: "ปีที่อบรม (พ.ศ.)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "yearly",
|
field: "yearly",
|
||||||
|
format: (v) => v + 543,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -132,6 +137,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
label: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateOrder",
|
field: "dateOrder",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -510,17 +516,7 @@ onMounted(async () => {
|
||||||
<template v-slot:body="props" v-if="mode === 'table'">
|
<template v-slot:body="props" v-if="mode === 'table'">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name === 'startDate' || col.name === 'endDate'">
|
<div>
|
||||||
<div v-if="props.row.isDate">{{ date2Thai(col.value) }}</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ +col.value.slice(0, 4) + 543 }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'dateOrder'">
|
|
||||||
{{ date2Thai(col.value) }}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'yearly'">{{ col.value + 543 }}</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -637,38 +633,7 @@ onMounted(async () => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:style="`background-color: ${index % 2 !== 0 ? '#FAFAFA' : ''}`"
|
:style="`background-color: ${index % 2 !== 0 ? '#FAFAFA' : ''}`"
|
||||||
>
|
>
|
||||||
<div
|
<div class="row q-pa-sm">
|
||||||
v-if="col.name === 'startDate' || col.name === 'endDate'"
|
|
||||||
class="row q-pa-sm"
|
|
||||||
>
|
|
||||||
<div class="col-7 label-color">
|
|
||||||
<div>{{ col.label }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div v-if="props.row.isDate">
|
|
||||||
{{ date2Thai(col.value) }}
|
|
||||||
</div>
|
|
||||||
<div v-else>{{ +col.value.slice(0, 4) + 543 }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'dateOrder'" class="row q-pa-sm">
|
|
||||||
<div class="col-7 label-color">
|
|
||||||
<div>{{ col.label }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div>{{ date2Thai(col.value) }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'yearly'" class="row q-pa-sm">
|
|
||||||
<div class="col-7 label-color">
|
|
||||||
<div>{{ col.label }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div>{{ col.value + 543 }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else class="row q-pa-sm">
|
|
||||||
<div class="col-7 label-color">
|
<div class="col-7 label-color">
|
||||||
<div>{{ col.label }}</div>
|
<div>{{ col.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1104,23 +1069,7 @@ onMounted(async () => {
|
||||||
<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.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div
|
<div>
|
||||||
v-if="col.name === 'startDate' || col.name === 'endDate'"
|
|
||||||
>
|
|
||||||
<div v-if="props.row.isDate">
|
|
||||||
{{ date2Thai(col.value) }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ +col.value.slice(0, 4) + 543 }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'dateOrder'">
|
|
||||||
{{ date2Thai(col.value) }}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'yearly'">
|
|
||||||
{{ col.value + 543 }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue