Merge branch 'nice_dev' into develop
This commit is contained in:
commit
10efd65ba9
6 changed files with 240 additions and 49 deletions
|
|
@ -7,6 +7,7 @@ import config from "@/app.config";
|
|||
|
||||
/**importType*/
|
||||
import type {
|
||||
DataOption,
|
||||
ItemsMenu,
|
||||
NewPagination,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
|
|
@ -22,6 +23,7 @@ const router = useRouter();
|
|||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
/** หัวตาราง */
|
||||
const rows = ref<ResListProject[]>([]); // ข้อมูลรายการ
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "year",
|
||||
|
|
@ -82,10 +84,12 @@ const formQuery = reactive<FormQueryListProject>({
|
|||
year: new Date().getFullYear(),
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
org: "1",
|
||||
keyword: "",
|
||||
});
|
||||
const orgOp = ref<DataOption[]>([{ id: "1", name: "หน่วยงาน 1" }]);
|
||||
|
||||
const totalList = ref<number>(1); //จำนวนข้อมูลรายการ
|
||||
const rows = ref<ResListProject[]>([]); // ข้อมูลรายการ
|
||||
|
||||
/** funciton fetch รายการโครงการ*/
|
||||
function fetchListProject() {
|
||||
|
|
@ -134,6 +138,11 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
function fetchListProjectNew() {
|
||||
formQuery.page = 1;
|
||||
fetchListProject();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchListProject();
|
||||
});
|
||||
|
|
@ -145,50 +154,64 @@ onMounted(() => {
|
|||
</div>
|
||||
<q-card flat bordered class="q-pa-md">
|
||||
<q-toolbar style="padding: 0">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formQuery.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListProject"
|
||||
>
|
||||
<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="Number(formQuery.year) + 543"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
color="primary"
|
||||
@click="onClickAddOrView()"
|
||||
<div class="row q-gutter-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formQuery.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="fetchListProjectNew"
|
||||
>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar-title>
|
||||
<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="Number(formQuery.year) + 543"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
v-model="formQuery.org"
|
||||
:options="orgOp"
|
||||
label="หน่วยงาน"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="fetchListProjectNew"
|
||||
/>
|
||||
<q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
color="primary"
|
||||
@click="onClickAddOrView()"
|
||||
>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar-title>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
<div class="row q-gutter-sm">
|
||||
|
|
@ -222,7 +245,7 @@ onMounted(() => {
|
|||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="fetchListProject"
|
||||
@keyup.enter="fetchListProjectNew"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formQuery.keyword == ''" name="search" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue