From 07338cdb637499687c0c98b7cffefd83a4934c90 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 15 Jul 2025 13:59:18 +0700 Subject: [PATCH] =?UTF-8?q?fix=20CurrentPage=20=3D=3D=3D>=20=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/18_command/components/Main/TableMain.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/18_command/components/Main/TableMain.vue b/src/modules/18_command/components/Main/TableMain.vue index 3c74b9f78..9667a7a63 100644 --- a/src/modules/18_command/components/Main/TableMain.vue +++ b/src/modules/18_command/components/Main/TableMain.vue @@ -6,6 +6,7 @@ import { useRouter } from "vue-router"; import { checkPermission } from "@/utils/permissions"; import { useCounterMixin } from "@/stores/mixin"; import { useCommandListStore } from "@/modules/18_command/store/ListStore"; +import { updateCurrentPage } from "@/utils/function"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -83,6 +84,11 @@ function onReCommand(id: string) { await http .put(config.API.commandAction(id, "resume")) .then(async () => { + page.value = await updateCurrentPage( + page.value, + store.maxPage, + store.rows.length + ); await fetchListCommand(); success($q, "ดึงไปทำคำสั่งใหม่สำเร็จ"); }) @@ -105,6 +111,11 @@ function onDeleteCommand(id: string) { await http .delete(config.API.command + `/${id}`) .then(async () => { + page.value = await updateCurrentPage( + page.value, + store.maxPage, + store.rows.length + ); await fetchListCommand(); success($q, "ลบรายการสำเร็จ"); })