รายการเงินเดือน (แสดงทั้งหมด กี่ รายการ)
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 },
|
periodLatest: { type: Object as () => DataPeriodLatest, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const total = ref<number>();
|
||||||
const splitterModel = ref<number>(13);
|
const splitterModel = ref<number>(13);
|
||||||
const rows = ref<DataPeriod[]>([]);
|
const rows = ref<DataPeriod[]>([]);
|
||||||
|
|
||||||
|
|
@ -229,6 +230,7 @@ function fetchDataPeriod(id: string) {
|
||||||
.put(config.API.salaryListPeriodORG(id), formData)
|
.put(config.API.salaryListPeriodORG(id), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result.data;
|
rows.value = res.data.result.data;
|
||||||
|
total.value = res.data.result.total
|
||||||
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -415,6 +417,7 @@ onMounted(async () => {
|
||||||
v-model:maxPage="maxPage"
|
v-model:maxPage="maxPage"
|
||||||
v-model:formFilter="formFilter"
|
v-model:formFilter="formFilter"
|
||||||
:fetchDataTable="fetchDataPeriodNew"
|
:fetchDataTable="fetchDataPeriodNew"
|
||||||
|
:total="total"
|
||||||
/>
|
/>
|
||||||
<TableTabType2
|
<TableTabType2
|
||||||
v-else
|
v-else
|
||||||
|
|
@ -422,6 +425,7 @@ onMounted(async () => {
|
||||||
v-model:maxPage="maxPage"
|
v-model:maxPage="maxPage"
|
||||||
v-model:formFilter="formFilter"
|
v-model:formFilter="formFilter"
|
||||||
:fetchDataTable="fetchDataPeriodNew"
|
:fetchDataTable="fetchDataPeriodNew"
|
||||||
|
:total="total"
|
||||||
/>
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ const props = defineProps({
|
||||||
fetchDataTable: {
|
fetchDataTable: {
|
||||||
type: Function,
|
type: Function,
|
||||||
},
|
},
|
||||||
|
total: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ข้อมูล Table*/
|
/** ข้อมูล Table*/
|
||||||
|
|
@ -383,7 +386,9 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ props.total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
||||||
v-model="formFilter.page"
|
v-model="formFilter.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
color="dark"
|
color="dark"
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,9 @@ const props = defineProps({
|
||||||
maxPage: {
|
maxPage: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
|
total: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ข้อมูล Table*/
|
/** ข้อมูล Table*/
|
||||||
|
|
@ -410,6 +413,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ props.total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="formFilter.page"
|
v-model="formFilter.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue