รายการเงินเดือน (แสดงทั้งหมด กี่ รายการ)
This commit is contained in:
parent
c867e8c569
commit
de168d6209
3 changed files with 13 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue