ปรับ css ทะเบียนประวัติใหม่แท็บที่เหลือ
This commit is contained in:
parent
15d174a98c
commit
0fa8d6ace1
15 changed files with 2153 additions and 2366 deletions
|
|
@ -496,9 +496,10 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<q-toolbar style="padding: 0px">
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
icon="add"
|
||||
|
|
@ -514,7 +515,7 @@ onMounted(async () => {
|
|||
>
|
||||
|
||||
<q-space />
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
|
|
@ -533,7 +534,6 @@ onMounted(async () => {
|
|||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="q-mr-sm"
|
||||
/>
|
||||
|
||||
<q-btn-toggle
|
||||
|
|
@ -566,7 +566,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</template>
|
||||
</q-btn-toggle>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:grid="mode === 'card'"
|
||||
|
|
@ -685,280 +685,87 @@ onMounted(async () => {
|
|||
</d-table>
|
||||
|
||||
<q-dialog v-model="dialog" class="dialog" persistent>
|
||||
<q-layout
|
||||
view="lHh lpr lFf"
|
||||
container
|
||||
style="height: 450px"
|
||||
class="bg-white"
|
||||
>
|
||||
<q-card>
|
||||
<q-form @submit.prevent greedy @validation-success="onSubmit()">
|
||||
<q-header>
|
||||
<q-toolbar>
|
||||
<dialog-header
|
||||
:tittle="
|
||||
dialogStatus == 'edit'
|
||||
? 'แก้ไขการฝึกอบรม/ดูงาน'
|
||||
: 'เพิ่มการฝึกอบรม/ดูงาน'
|
||||
"
|
||||
:close="closeDialog"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator color="grey-4" />
|
||||
</q-header>
|
||||
|
||||
<q-page-container>
|
||||
<q-page>
|
||||
<div class="row q-px-md q-mt-sm q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
v-model="trainData.name"
|
||||
label="ชื่อโครงการ/หลักสูตรการฝึกอบรม"
|
||||
bg-color="white"
|
||||
dense
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณากรอกชื่อโครงการ/หลักสูตรการฝึกอบรม'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.topic"
|
||||
label="หัวข้อการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกหัวข้อการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<dialog-header
|
||||
:tittle="
|
||||
dialogStatus == 'edit'
|
||||
? 'แก้ไขการฝึกอบรม/ดูงาน'
|
||||
: 'เพิ่มการฝึกอบรม/ดูงาน'
|
||||
"
|
||||
:close="closeDialog"
|
||||
/>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-section style="max-height: 55vh" class="scroll">
|
||||
<div class="row q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
v-model="trainData.name"
|
||||
label="ชื่อโครงการ/หลักสูตรการฝึกอบรม"
|
||||
bg-color="white"
|
||||
dense
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณากรอกชื่อโครงการ/หลักสูตรการฝึกอบรม'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="q-px-sm q-mx-md q-my-md q-pb-sm borderCard"
|
||||
>
|
||||
<div class="row col-12 q-gutter-md q-py-sm text-grey-7">
|
||||
<q-radio
|
||||
v-model="isDate"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="false"
|
||||
label="ปี"
|
||||
dense
|
||||
/>
|
||||
<q-radio
|
||||
v-model="isDate"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="true"
|
||||
label="วัน/เดือน/ปี"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div v-if="isDate === 'false'" class="row q-gutter-sm">
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.startYear"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="
|
||||
(v:number) =>
|
||||
(trainData.startDate = new Date(
|
||||
`${v}-01-01T00:00:02.010+07:00`
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
:model-value="trainData.startYear + 543"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกปีที่เริ่มต้นการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
:label="`${'ปีที่เริ่มต้นการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.finishYear"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="
|
||||
(v:number) =>
|
||||
(trainData.endDate = new Date(
|
||||
`${v}-01-01T00:00:02.010+07:00`
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="trainData.finishYear + 543"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกปีที่จบการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
:label="`${'ปีที่จบการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isDate === 'true'" class="row q-gutter-sm">
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.startDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
@update:modelValue="
|
||||
(v: Date) =>
|
||||
(trainData.startYear = parseInt(
|
||||
v.toString().slice(11, 15)
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
:model-value="date2Thai(trainData.startDate)"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกวันที่เริ่มต้นการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'วันที่เริ่มต้นการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.endDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
@update:modelValue="
|
||||
(v: Date) =>
|
||||
(trainData.finishYear = parseInt(
|
||||
v.toString().slice(11, 15)
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
:model-value="date2Thai(trainData.endDate)"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกวันที่จบการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'วันที่จบการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
<div class="row q-px-md q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.topic"
|
||||
label="หัวข้อการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกหัวข้อการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="q-px-sm q-my-sm q-pb-sm borderCard"
|
||||
>
|
||||
<div class="row col-12 q-gutter-md q-py-sm text-grey-7">
|
||||
<q-radio
|
||||
v-model="isDate"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="false"
|
||||
label="ปี"
|
||||
dense
|
||||
/>
|
||||
<q-radio
|
||||
v-model="isDate"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="true"
|
||||
label="วัน/เดือน/ปี"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div v-if="isDate === 'false'" class="row q-gutter-sm">
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.yearly"
|
||||
v-model="trainData.startYear"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="trainData.yearly"
|
||||
@update:modelValue="
|
||||
(v:number) =>
|
||||
(trainData.startDate = new Date(
|
||||
`${v}-01-01T00:00:02.010+07:00`
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
|
|
@ -970,14 +777,14 @@ onMounted(async () => {
|
|||
lazy-rules
|
||||
outlined
|
||||
class="inputgreen"
|
||||
clearable
|
||||
@clear="() => (trainData.yearly = null)"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
!!trainData.yearly ? trainData.yearly + 543 : null
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
@update:modelValue="trainData.yearly = null"
|
||||
:model-value="trainData.startYear + 543"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกปีที่เริ่มต้นการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
:label="`${'ปีที่เริ่มต้นการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -992,61 +799,66 @@ onMounted(async () => {
|
|||
</datepicker>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
v-model="trainData.place"
|
||||
label="สถานที่ฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
class="inputgreen"
|
||||
dense
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกสถานที่ฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.finishYear"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="
|
||||
(v:number) =>
|
||||
(trainData.endDate = new Date(
|
||||
`${v}-01-01T00:00:02.010+07:00`
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
outlined
|
||||
hide-bottom-space
|
||||
:model-value="trainData.finishYear + 543"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกปีที่จบการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
:label="`${'ปีที่จบการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-px-md q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.duration"
|
||||
label="รวมระยะเวลาในการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.department"
|
||||
label="หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-px-md q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
class="inputgreen"
|
||||
outlined
|
||||
v-model="trainData.numberOrder"
|
||||
label="เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div v-if="isDate === 'true'" class="row q-gutter-sm">
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.dateOrder"
|
||||
v-model="trainData.startDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
@update:modelValue="
|
||||
(v: Date) =>
|
||||
(trainData.startYear = parseInt(
|
||||
v.toString().slice(11, 15)
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
|
|
@ -1056,14 +868,61 @@ onMounted(async () => {
|
|||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="inputgreen"
|
||||
lazy-rules
|
||||
clearable
|
||||
@clear="() => (trainData.dateOrder = null)"
|
||||
@update:modelValue="trainData.dateOrder = null"
|
||||
:model-value="date2Thai(trainData.dateOrder)"
|
||||
class="inputgreen"
|
||||
:model-value="date2Thai(trainData.startDate)"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกวันที่เริ่มต้นการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'}`"
|
||||
:label="`${'วันที่เริ่มต้นการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.endDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
@update:modelValue="
|
||||
(v: Date) =>
|
||||
(trainData.finishYear = parseInt(
|
||||
v.toString().slice(11, 15)
|
||||
))
|
||||
"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
class="inputgreen"
|
||||
:model-value="date2Thai(trainData.endDate)"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกวันที่จบการฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'วันที่จบการฝึกอบรม/ดูงาน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1078,114 +937,228 @@ onMounted(async () => {
|
|||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
<q-footer>
|
||||
<q-separator color="grey-4" />
|
||||
<q-toolbar class="fit row wrap justify-end items-start content-start">
|
||||
<q-btn
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
class="q-px-md"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar>
|
||||
</q-footer>
|
||||
</q-card>
|
||||
<div class="row q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.yearly"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:modelValue="trainData.yearly"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
class="inputgreen"
|
||||
clearable
|
||||
@clear="() => (trainData.yearly = null)"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
!!trainData.yearly ? trainData.yearly + 543 : null
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
@update:modelValue="trainData.yearly = null"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
v-model="trainData.place"
|
||||
label="สถานที่ฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
class="inputgreen"
|
||||
dense
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกสถานที่ฝึกอบรม/ดูงาน'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.duration"
|
||||
label="รวมระยะเวลาในการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="trainData.department"
|
||||
label="หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mb-sm q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input
|
||||
class="inputgreen"
|
||||
outlined
|
||||
v-model="trainData.numberOrder"
|
||||
label="เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"
|
||||
bg-color="white"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="trainData.dateOrder"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
: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
|
||||
dense
|
||||
class="inputgreen"
|
||||
lazy-rules
|
||||
clearable
|
||||
@clear="() => (trainData.dateOrder = null)"
|
||||
@update:modelValue="trainData.dateOrder = null"
|
||||
:model-value="date2Thai(trainData.dateOrder)"
|
||||
hide-bottom-space
|
||||
:label="`${'คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
color="public"
|
||||
class="q-px-md"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-layout>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="historyDialog" class="dialog" persistent>
|
||||
<q-layout
|
||||
view="lHh lpr lFf"
|
||||
container
|
||||
style="height: 500px; min-width: 80%"
|
||||
class="bg-white"
|
||||
>
|
||||
<q-header>
|
||||
<q-toolbar>
|
||||
<dialog-header
|
||||
tittle="ประวัติแก้ไขการฝึกอบรม/ดูงาน"
|
||||
:close="closeHistoryDialog"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator color="grey-4" />
|
||||
</q-header>
|
||||
|
||||
<q-page-container>
|
||||
<q-page class="q-pa-md">
|
||||
<q-toolbar style="padding: 0px" class="text-primary q-mb-sm">
|
||||
<q-space />
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
bg-color="white"
|
||||
v-model="historyKeyword"
|
||||
label="ค้นหา"
|
||||
class="q-mr-sm"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-model="historyVisibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="historyColumns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="historyColumns"
|
||||
:rows="historyRows"
|
||||
row-key="name"
|
||||
flat
|
||||
:filter="historyKeyword"
|
||||
v-model:pagination="historyPagination"
|
||||
bordered
|
||||
:paging="true"
|
||||
<q-card style="min-width: 80%">
|
||||
<dialog-header
|
||||
tittle="ประวัติแก้ไขการฝึกอบรม/ดูงาน"
|
||||
:close="closeHistoryDialog"
|
||||
/>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-section style="max-height: 60vh" class="scroll">
|
||||
<div class="row q-gutter-sm q-mb-sm">
|
||||
<q-space />
|
||||
<q-input
|
||||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
class="custom-header-table"
|
||||
:visible-columns="historyVisibleColumns"
|
||||
outlined
|
||||
bg-color="white"
|
||||
v-model="historyKeyword"
|
||||
label="ค้นหา"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
</q-tr>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
</q-layout>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-model="historyVisibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="historyColumns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="historyColumns"
|
||||
:rows="historyRows"
|
||||
row-key="name"
|
||||
flat
|
||||
:filter="historyKeyword"
|
||||
v-model:pagination="historyPagination"
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
class="custom-header-table"
|
||||
:visible-columns="historyVisibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue