ปรับข้อมูลการลา และปรับ layout หน้าหลักการลา
This commit is contained in:
Warunee Tamkoo 2023-11-21 15:59:14 +07:00
parent 0705eff57c
commit 1ea53b0fe5
7 changed files with 1465 additions and 1521 deletions

View file

@ -2,8 +2,8 @@
import { ref, useAttrs, reactive, onMounted } from "vue"
import { useLeaveStore } from "@/modules/05_leave/store"
const LeaveData = useLeaveStore()
const { filterSelector, searchFilterTable } = LeaveData
const leaveStore = useLeaveStore()
const { filterSelector, searchFilterTable } = leaveStore
const attrs = ref<any>(useAttrs())
const table = ref<any>(null)
const filterRef = ref<any>(null)
@ -59,18 +59,38 @@ const resetFilter = () => {
<div class="q-py-sm row">
<q-card bordered flat class="q-py-sm q-pl-sm col-12 row bg-grey-1 shadow-0">
<div class="items-center col-12 row q-col-gutter-sm">
<q-select
v-if="leaveStore.tabValue === 'list'"
outlined
dense
lazy-rules
v-model="leaveStore.fiscalYearyear"
:label="`${'ปี พ.ศ.'}`"
emit-value
map-options
option-label="name"
:options="leaveStore.fiscalyearOP"
option-value="id"
hide-bottom-space
style="min-width: 150px"
class="col-xs-12 col-sm-auto"
@update:model-value="searchFilterTable"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'fiscalyearOP'
) "
/>
<!-- นหาขอความใน table -->
<q-select
outlined
dense
lazy-rules
v-model="LeaveData.LeaveType"
v-model="leaveStore.LeaveType"
:rules="[val => !!val || `${'กรุณาเลือกประเภทใบลา'}`]"
:label="`${'ประเภทใบลา'}`"
emit-value
map-options
option-label="name"
:options="LeaveData.typeOptions"
:options="leaveStore.typeOptions"
option-value="id"
hide-bottom-space
style="min-width: 150px"
@ -84,13 +104,13 @@ const resetFilter = () => {
outlined
dense
lazy-rules
v-model="LeaveData.LeaveStatus"
v-model="leaveStore.LeaveStatus"
:rules="[val => !!val || `${'กรุณาเลือกสถานะ'}`]"
:label="`${'สถานะ'}`"
emit-value
map-options
option-label="name"
:options="LeaveData.statusOptions"
:options="leaveStore.statusOptions"
option-value="id"
hide-bottom-space
style="min-width: 150px"