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