From d5b5eec3e8c923717429439727062d7ec618ce74 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 20 Aug 2024 13:52:36 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80?= =?UTF-8?q?=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99=20=3D>=20=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=80=E0=B8=A5?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B9=80=E0=B8=87=E0=B8=B4?= =?UTF-8?q?=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=20=E0=B8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13_salary/components/InfoDiscipline.vue | 2 +- .../13_salary/components/InfoLeave.vue | 8 ++--- .../13_salary/components/InfoSalary.vue | 2 +- .../SalaryLists/DialogAddPerson.vue | 11 +++---- .../components/SalaryLists/DialogFormEdit.vue | 18 +++++------ .../SalaryLists/DialogMoveGroup.vue | 14 +++------ .../SalaryLists/DialogMoveLevel.vue | 13 +++----- .../SalaryLists/DialogProperties.vue | 13 +++----- .../components/SalaryLists/ProcessStep.vue | 31 ++++++++++--------- .../components/SalaryLists/TableTypeOther.vue | 6 ++-- .../SalaryLists/TableTypePending.vue | 24 ++++++++------ .../components/SalaryRound/DialogForm.vue | 5 ++- src/modules/13_salary/views/salaryLists.vue | 8 ++--- src/modules/13_salary/views/salaryRound.vue | 24 +++++++++----- 14 files changed, 90 insertions(+), 89 deletions(-) diff --git a/src/modules/13_salary/components/InfoDiscipline.vue b/src/modules/13_salary/components/InfoDiscipline.vue index 867ee7cf3..1abf65e2e 100644 --- a/src/modules/13_salary/components/InfoDiscipline.vue +++ b/src/modules/13_salary/components/InfoDiscipline.vue @@ -178,7 +178,7 @@ onMounted(() => { + + + + + + + + (""); -const isReadonly = ref(false); // อ่านได้อย่างเดียว const isActive = ref(false); const effectiveDate = ref(null); const typeOptions = ref([ @@ -81,10 +80,10 @@ function onSubmit() { ? config.API.salaryPeriod() : config.API.salaryPeriod() + `/${props.idRound}`; await http[!props.edit ? "post" : "put"](url, body); + await props.getData?.(); + await success($q, "บันทีกข้อมูลสำเร็จ"); modal.value = false; - props.getData?.(); clearForm(); - success($q, "บันทีกข้อมูลสำเร็จ"); } catch (err) { messageError($q, err); } finally { diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue index bafc1e27b..6f9d79e48 100644 --- a/src/modules/13_salary/views/salaryLists.vue +++ b/src/modules/13_salary/views/salaryLists.vue @@ -145,9 +145,9 @@ function getSnap(code: string) { * function เรียกข้อมูลหน่ยวงาน * @param id revisionId */ -async function getAgency(id: string) { +function getAgency(id: string) { if (id) { - await http + http .get(config.API.activeOrganizationRootById(id)) .then(async (res) => { const data = res.data.result; @@ -179,9 +179,9 @@ async function getAgency(id: string) { * function เรียกข้อมูลหน่ยวงานปจุบัน * @param id revisionId */ -async function getAgencyPosition(id: string) { +function getAgencyPosition(id: string) { if (id) { - await http + http .get(config.API.keycloakPositionByid(id)) .then(async (res) => { const data = await res.data.result; diff --git a/src/modules/13_salary/views/salaryRound.vue b/src/modules/13_salary/views/salaryRound.vue index bcba2d192..4da92db65 100644 --- a/src/modules/13_salary/views/salaryRound.vue +++ b/src/modules/13_salary/views/salaryRound.vue @@ -124,7 +124,9 @@ function clickAdd() { editCheck.value = false; } -/** ดึงข้อมูลเริ่มต้น */ +/** + * fetch รายการรอบการขึ้นเงินเดือน + */ function getData() { showLoader(); http @@ -165,9 +167,9 @@ function deleteData(id: string) { showLoader(); http .delete(config.API.salaryPeriod() + `/${id}`) - .then(() => { - getData(); - success($q, "ลบข้อมูลสำเร็จ"); + .then(async () => { + await getData(); + await success($q, "ลบข้อมูลสำเร็จ"); }) .catch((e) => { messageError($q, e); @@ -204,15 +206,19 @@ function dialogClose(id: string) { dialogConfirm( $q, () => { + showLoader(); http .get(config.API.salaryPeriod() + `/close/${id}`) - .then((res) => { + .then(() => { getData(); + success($q, "ลบข้อมูลสำเร็จ"); }) .catch((e) => { messageError($q, e); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); }, "ยืนยันการปิดรอบ", "หากปิดรอบแล้วจะไม่สามารถแก้ไขรายการเงินเดือนของรอบนี้ได้ ต้องการยืนยันการปิดรอบนี้ใช่หรือไม่?" @@ -406,14 +412,16 @@ onMounted(async () => { color="edit" size="17px" :name=" - props.row.revisionId !== null || !checkPermission($route)?.attrIsUpdate + props.row.revisionId !== null || + !checkPermission($route)?.attrIsUpdate ? 'mdi-eye-outline' : 'edit' " />
{{ - props.row.revisionId !== null || !checkPermission($route)?.attrIsUpdate + props.row.revisionId !== null || + !checkPermission($route)?.attrIsUpdate ? "ดูข้อมูล" : "แก้ไขข้อมูล" }}