From 3b5d9ff4fb6a671a56c181b7947d63b1575aaae8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 10 Jul 2024 15:00:16 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20=3D>=20fix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_order/components/step/step02.vue | 55 ++++--------------- .../13_salary/components/Command/step02.vue | 6 +- 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/src/modules/10_order/components/step/step02.vue b/src/modules/10_order/components/step/step02.vue index 644c31389..3a9650eba 100644 --- a/src/modules/10_order/components/step/step02.vue +++ b/src/modules/10_order/components/step/step02.vue @@ -249,7 +249,7 @@ const saveModal = () => { if (myForm.value !== null) { myForm.value.validate().then(async (result: boolean) => { if (result) { - putSalary(modalData.value); + putSalary(); } }); } @@ -309,7 +309,7 @@ const fetchSalary = async (personalId: string) => { }); }; // ยืนยันการแก้ไขข้อมูลเงินเดือน -const putSalary = async (salary: any) => { +const putSalary = async () => { dialogConfirm($q, async () => { showLoader(); if (modalData.value.salaryAmount === null) { @@ -323,15 +323,15 @@ const putSalary = async (salary: any) => { } await http .put(config.API.salaryOrder(personalId.value), modalData.value) - .then(() => { + .then(async () => { + await conditionData(); + modal.value = false; success($q, "บันทึกข้อมูลสำเร็จ"); }) .catch((e) => { messageError($q, e); }) .finally(async () => { - await conditionData(); - modal.value = false; hideLoader(); }); }); @@ -446,19 +446,6 @@ const resetFilter = () => { filter.value = ""; filterRef.value!.focus(); }; - -const getClass = (val: boolean) => { - return { - "full-width inputgreen cursor-pointer": val, - "full-width cursor-pointer": !val, - }; -}; -const pagination = ref({ - // sortBy: "OrderDate,OrderType", - descending: true, - page: 1, - rowsPerPage: 10, -});