diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index cd92791e1..fb52ed67d 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -32,6 +32,7 @@ const props = defineProps({ periodLatest: { type: Object as () => DataPeriodLatest, require: true }, }); +const total = ref(); const splitterModel = ref(13); const rows = ref([]); @@ -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" /> { v-model:maxPage="maxPage" v-model:formFilter="formFilter" :fetchDataTable="fetchDataPeriodNew" + :total="total" /> diff --git a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue b/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue index dd1e593d7..4e83e32cf 100644 --- a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue +++ b/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue @@ -33,6 +33,9 @@ const props = defineProps({ fetchDataTable: { type: Function, }, + total: { + type: Number, + }, }); /** ข้อมูล Table*/ @@ -383,7 +386,9 @@ watch(