fix CurrentPage ===> อัตรากำลังลูกจ้างประจำ ฯ,อัตรากำลังลูกจ้างชั่วคราว

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-07-11 17:22:24 +07:00
parent 2609b825dd
commit 963839d98b
2 changed files with 28 additions and 10 deletions

View file

@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import { updateCurrentPage } from "@/utils/function";
import genreport from "@/plugins/genreportxlsx";
import config from "@/app.config";
import http from "@/plugins/http";
@ -203,12 +204,20 @@ function onClickDelete(id: string) {
await http
.delete(config.API.orgPosMasterByIdEmp(id))
.then(async () => {
await props.fetchDataTable?.(
reqMaster.value.id,
reqMaster.value.type,
false
reqMaster.value.page = await updateCurrentPage(
reqMaster.value.page,
totalPage.value,
posMaster.value.length
);
await getSummary();
await Promise.all([
props.fetchDataTable?.(
reqMaster.value.id,
reqMaster.value.type,
false
),
getSummary(),
]);
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {

View file

@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
import { usePositionEmp } from "@/modules/20_positionTemp/store/organizational";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import { updateCurrentPage } from "@/utils/function";
import genreport from "@/plugins/genreportxlsx";
import config from "@/app.config";
import http from "@/plugins/http";
@ -204,12 +205,20 @@ function onClickDelete(id: string) {
await http
.delete(config.API.orgPosMasterByIdEmpTemp(id))
.then(async () => {
await props.fetchDataTable?.(
reqMaster.value.id,
reqMaster.value.type,
false
reqMaster.value.page = await updateCurrentPage(
reqMaster.value.page,
totalPage.value,
posMaster.value.length
);
await getSummary();
await Promise.all([
props.fetchDataTable?.(
reqMaster.value.id,
reqMaster.value.type,
false
),
getSummary(),
]);
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {