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, -});