From 577b04b1a57a314b1aea57d63cb8b771ed2cf575 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 13 Sep 2023 14:06:44 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=88=E0=B8=87/=E0=B8=84=E0=B9=88=E0=B8=B2=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87=20=20=E0=B8=97=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=A5=E0=B8=B9=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../08_registryEmployee/views/SalaryEmployee.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/modules/08_registryEmployee/views/SalaryEmployee.vue b/src/modules/08_registryEmployee/views/SalaryEmployee.vue index 047b169da..8819beb13 100644 --- a/src/modules/08_registryEmployee/views/SalaryEmployee.vue +++ b/src/modules/08_registryEmployee/views/SalaryEmployee.vue @@ -536,6 +536,7 @@ + (""); @@ -1498,6 +1500,8 @@ const fetchData = async () => { .get(config.API.profileSalaryEmployeeId(profileId.value)) .then((res) => { const data = res.data.result; + console.log(data); + rows.value = []; data.map((e: ResponseObjectEmployee) => { rows.value.push({ @@ -1711,12 +1715,14 @@ const clickSave = () => { }; const SaveData = async () => { await myForm.value.validate().then(async (result: boolean) => { - if (result) { + if (result && agencyId.value) { if (modalEdit.value) { await editData(); } else { await saveData(); } + } else if (agencyId.value == "") { + dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน"); } }); }; @@ -1761,6 +1767,8 @@ const saveData = async () => { * บันทึกแก้ไขข้อมูล */ const editData = async () => { + console.log(agencyId.value); + showLoader(); await http .put(config.API.profileSalaryEmployeeId(id.value), { @@ -1970,7 +1978,7 @@ const clickHistory = async (row: RequestItemsEmployee) => { .get(config.API.profileSalaryHisId(row.id)) .then((res) => { const data = res.data.result; - // console.log("clickHistory", data); + console.log("clickHistory", data); rowsHistory.value = []; data.map((e: ResponseObjectEmployee) => { rowsHistory.value.push({