รายการเงินเดือน (แสดงทั้งหมด กี่ รายการ)

This commit is contained in:
setthawutttty 2024-03-05 15:12:03 +07:00
parent c867e8c569
commit de168d6209
3 changed files with 13 additions and 0 deletions

View file

@ -32,6 +32,7 @@ const props = defineProps({
periodLatest: { type: Object as () => DataPeriodLatest, require: true },
});
const total = ref<number>();
const splitterModel = ref<number>(13);
const rows = ref<DataPeriod[]>([]);
@ -229,6 +230,7 @@ function fetchDataPeriod(id: string) {
.put(config.API.salaryListPeriodORG(id), formData)
.then((res) => {
rows.value = res.data.result.data;
total.value = res.data.result.total
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
})
.catch((err) => {
@ -415,6 +417,7 @@ onMounted(async () => {
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="fetchDataPeriodNew"
:total="total"
/>
<TableTabType2
v-else
@ -422,6 +425,7 @@ onMounted(async () => {
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="fetchDataPeriodNew"
:total="total"
/>
</q-tab-panel>
</q-tab-panels>

View file

@ -33,6 +33,9 @@ const props = defineProps({
fetchDataTable: {
type: Function,
},
total: {
type: Number,
},
});
/** ข้อมูล Table*/
@ -383,7 +386,9 @@ watch(
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ props.total }} รายการ
<q-pagination
v-model="formFilter.page"
active-color="primary"
color="dark"

View file

@ -36,6 +36,9 @@ const props = defineProps({
maxPage: {
type: Number,
},
total: {
type: Number,
},
});
/** ข้อมูล Table*/
@ -410,6 +413,7 @@ watch(
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ props.total }} รายการ
<q-pagination
v-model="formFilter.page"
active-color="primary"