ระบบพัฒนา => ปรับ filter
This commit is contained in:
parent
aec6c64190
commit
46cb1fe6cc
2 changed files with 116 additions and 122 deletions
|
|
@ -150,9 +150,9 @@ function fetchListOrg() {
|
|||
});
|
||||
}
|
||||
|
||||
/** download file
|
||||
/** download file
|
||||
* @param type ประเภทของไฟล์ xlsx pdf
|
||||
*/
|
||||
*/
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -172,9 +172,9 @@ function onDownload(type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** edit page
|
||||
/** edit page
|
||||
* @param id id ของ row
|
||||
*/
|
||||
*/
|
||||
function onEdit(id: string) {
|
||||
store.statusEdit = true;
|
||||
router.push(`/development/employee-history/${id}`);
|
||||
|
|
@ -242,64 +242,61 @@ onMounted(() => {
|
|||
<q-card flat bordered class="q-pa-md">
|
||||
<div class="row no-wrap shadow-1 justify-between">
|
||||
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm">
|
||||
<div class="col-3">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListOrg()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListOrg()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="formFilter.root"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="(formFilter.page = 1), getData()"
|
||||
/>
|
||||
</div>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="formFilter.root"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="(formFilter.page = 1), getData()"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
|
||||
<!-- <q-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -194,9 +194,9 @@ function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** download file
|
||||
/** download file
|
||||
* @param type ประเภทของไฟล์ xlsx pdf
|
||||
*/
|
||||
*/
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -221,9 +221,9 @@ function onDownload(type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** edit page
|
||||
/** edit page
|
||||
* @param id id ของ row
|
||||
*/
|
||||
*/
|
||||
function onEdit(id: string) {
|
||||
store.statusEdit = true;
|
||||
router.push(`/development/history/${id}`);
|
||||
|
|
@ -259,64 +259,61 @@ onMounted(() => {
|
|||
<q-card flat bordered class="q-pa-md">
|
||||
<div class="row no-wrap shadow-1 justify-between">
|
||||
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm">
|
||||
<div class="col-3">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListOrg()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListOrg()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="formFilter.root"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="(formFilter.page = 1), getData()"
|
||||
/>
|
||||
</div>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="formFilter.root"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="(formFilter.page = 1), getData()"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
|
||||
<q-space />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue