From 4b473d34ba27263f30211828bea205f96a4e8fba Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 18 Oct 2024 13:33:28 +0700 Subject: [PATCH 1/5] =?UTF-8?q?update=20=3D>=E0=B8=84=E0=B8=B3=E0=B8=A3?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B8=82=E0=B8=AD=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/requestEdit/Page01_Detail.vue | 162 +++++++++++------- 1 file changed, 102 insertions(+), 60 deletions(-) diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 6f4b70874..211f83ea1 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -17,8 +17,14 @@ const $q = useQuasar(); const router = useRouter(); const route = useRoute(); const store = useRequestEditStore(); -const { date2Thai, showLoader, hideLoader, messageError, success } = - useCounterMixin(); +const { + dialogConfirm, + date2Thai, + showLoader, + hideLoader, + messageError, + success, +} = useCounterMixin(); const requestId = ref(route.params.id.toString()); const dataRequest = ref({ @@ -55,13 +61,13 @@ async function fetchDataRequest() { detail: data.detail, }; - // formData.status = data.status; - // formData.remark = data.remark; - // if (data.status !== "PENDING") { - // isReadOnly.value = true; - // } else { - // isReadOnly.value = false; - // } + formData.status = data.status; + formData.remark = data.remark; + if (data.status !== "PENDING") { + isReadOnly.value = true; + } else { + isReadOnly.value = false; + } }) .catch((err) => { messageError($q, err); @@ -71,6 +77,28 @@ async function fetchDataRequest() { }); } +/** function บันทึกรายการคำร้อง*/ +function onSubmit() { + dialogConfirm($q, async () => { + showLoader(); + await http + .patch(config.API.requestEdit + `${requestId.value}`, { + status: formData.status, + remark: formData.remark, + }) + .then(async () => { + await fetchDataRequest(); + await success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + }); +} + /** * function ค้นหาคำใน select สถานะคำร้อง * @param val คำค้น @@ -203,64 +231,78 @@ onMounted(async () => { - -
-
- แก้ไขสถานะคำร้อง + + +
+
+ แก้ไขสถานะคำร้อง +
-
-
- -
-
-
+ +
+
+ - - -
+ > + + +
-
- +
+ +
+ +
+ บันทึก +
-
-
- + + + +
- +
From 3e38b022618659e3fd38476e830dec4cd3273fea Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 18 Oct 2024 14:51:16 +0700 Subject: [PATCH 2/5] update workflow --- src/components/Workflow/Main.vue | 8 +- .../components/requestEdit/Page01_Detail.vue | 28 ++- .../components/resign/ResignByid.vue | 183 +++++++++--------- 3 files changed, 117 insertions(+), 102 deletions(-) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 01f20074d..7016296e1 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -185,7 +185,13 @@ defineExpose({ (false); //อ่ายได้อย่างเดียว +const workflowRef = ref(null); //ข้อมูลรายการสถานะ const statusOptionMain = ref( store.optionStatus.filter((e) => e.id !== "") @@ -248,8 +249,12 @@ onMounted(async () => {
{
{ />
-
+
บันทึก @@ -302,7 +314,11 @@ onMounted(async () => {
- +
diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 15b380d4e..529806d8d 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -46,7 +46,7 @@ const { /** ตัวแปร */ const modalPersonal = ref(false); const personId = ref(""); -const roleUser = ref(""); +// const roleUser = ref(""); const dataProfile = ref(); const id = ref(route.params.id.toString()); @@ -210,72 +210,72 @@ function popUp(action: "pass" | "passNot") { } //เงื่อนไขpop up -function conditionPopup() { - if (myFormConfirm.value !== null) { - myFormConfirm.value.validate().then(async (check) => { - if (check) { - if (actionPass.value) { - await confirmpopUp(); - } else { - await rejectpopUp(); - } - } - }); - } -} +// function conditionPopup() { +// if (myFormConfirm.value !== null) { +// myFormConfirm.value.validate().then(async (check) => { +// if (check) { +// if (actionPass.value) { +// await confirmpopUp(); +// } else { +// await rejectpopUp(); +// } +// } +// }); +// } +// } //pop up ยืนยันการอนุญาต -async function confirmpopUp() { - dialogConfirm( - $q, - async () => { - const body = { - reason: reasonReign.value, - }; - await http - .put(config.API.resignConfirm(roleUser.value, id.value), body) - .then(() => { - success($q, "การอนุญาตสำเร็จ"); - closeModal(); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - fetchData(id.value); - }); - }, - "ยืนยันการอนุญาต", - "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" - ); -} +// async function confirmpopUp() { +// dialogConfirm( +// $q, +// async () => { +// const body = { +// reason: reasonReign.value, +// }; +// await http +// .put(config.API.resignConfirm(roleUser.value, id.value), body) +// .then(() => { +// success($q, "การอนุญาตสำเร็จ"); +// closeModal(); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// fetchData(id.value); +// }); +// }, +// "ยืนยันการอนุญาต", +// "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" +// ); +// } //pop up การยับยั้งสำเร็จ -async function rejectpopUp() { - dialogConfirm( - $q, - async () => { - const body = { - reason: reasonReign.value, - date: dateBreak.value, - }; - await http - .put(config.API.resignReject(roleUser.value, id.value), body) - .then(() => { - success($q, "การยับยั้งสำเร็จ"); - closeModal(); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - fetchData(id.value); - }); - }, - "ยืนยันการยับยั้ง", - "ต้องการยืนยันการยับยั้งนี้หรือไม่ ?" - ); -} +// async function rejectpopUp() { +// dialogConfirm( +// $q, +// async () => { +// const body = { +// reason: reasonReign.value, +// date: dateBreak.value, +// }; +// await http +// .put(config.API.resignReject(roleUser.value, id.value), body) +// .then(() => { +// success($q, "การยับยั้งสำเร็จ"); +// closeModal(); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// fetchData(id.value); +// }); +// }, +// "ยืนยันการยับยั้ง", +// "ต้องการยืนยันการยับยั้งนี้หรือไม่ ?" +// ); +// } /** * กดยกเลิก @@ -511,20 +511,20 @@ onMounted(async () => { fetchData(id.value); fetchFile(); const user = await tokenParsed(); - if (user) { - const commander = await user.role.includes("commander"); - const oligarch = await user.role.includes("oligarch"); - const officer = await user.role.includes("officer"); - if (commander) { - roleUser.value = "commander"; - } else if (oligarch) { - roleUser.value = "oligarch"; - } else if (officer) { - roleUser.value = "officer"; - } else { - roleUser.value = "admin"; - } - } + // if (user) { + // const commander = await user.role.includes("commander"); + // const oligarch = await user.role.includes("oligarch"); + // const officer = await user.role.includes("officer"); + // if (commander) { + // roleUser.value = "commander"; + // } else if (oligarch) { + // roleUser.value = "oligarch"; + // } else if (officer) { + // roleUser.value = "officer"; + // } else { + // roleUser.value = "admin"; + // } + // } }); @@ -551,7 +551,7 @@ onMounted(async () => {
ข้อมูลการลาออก
- +
@@ -749,8 +749,8 @@ onMounted(async () => {
@@ -793,7 +793,7 @@ onMounted(async () => { v-model="isNoDebt" label="ไม่เป็นหนี้สหกรณ์" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
@@ -801,7 +801,7 @@ onMounted(async () => { v-model="isNoBurden" label="ไม่มีภาระผูกพันค้ำประกันทุนการศึกษา" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
@@ -809,15 +809,9 @@ onMounted(async () => { v-model="isDiscipline" label="ไม่มีพฤติการณ์ทางวินัย" color="teal" - :disable="!conditions" + :disable="!conditions && !workflowRef?.permission.isUpdate" />
-
@@ -833,8 +827,8 @@ onMounted(async () => { { {
-
+
{
- + From 34be207677048a4235d9e34192c27edf92b885aa Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 18 Oct 2024 15:05:15 +0700 Subject: [PATCH 3/5] fix --- src/modules/14_KPI/views/list.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/14_KPI/views/list.vue b/src/modules/14_KPI/views/list.vue index dbd5edb9e..9882760ef 100644 --- a/src/modules/14_KPI/views/list.vue +++ b/src/modules/14_KPI/views/list.vue @@ -133,9 +133,7 @@ async function fetchList() { page: formQuery.page, pageSize: formQuery.pageSize, kpiPeriodId: store.formQuery.round, - keyword: store.formQuery.keyword - ? store.formQuery.keyword.replace(/\s+/g, "") - : store.formQuery.keyword, + keyword: store.formQuery.keyword, }; await http From 816662cc5c3dd57fbc21850767d380c777889b1b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 18 Oct 2024 15:41:57 +0700 Subject: [PATCH 4/5] Workflow fix --- src/components/Workflow/Main.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 7016296e1..2401ff6a7 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -176,9 +176,9 @@ defineExpose({ : "" : item.isApproveSetting ? item.isApprove === true - ? "อนุมันติ" + ? "อนุมัติ" : item.isApprove === false - ? "ไม่อนุมันติ" + ? "ไม่อนุมัติ" : "" : "" }} @@ -192,11 +192,13 @@ defineExpose({ item.reason === null && item.isApprove === null " + unelevated + rounded @click.prevent=" (dataUserComment = item), (modalApprove = true) " label="แสดงความเห็น" - color="public" + color="blue" /> From a0d9345f2d5d40271fb6d9ed4e8e0668b84c66b5 Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 18 Oct 2024 16:28:52 +0700 Subject: [PATCH 5/5] =?UTF-8?q?fix=20=E0=B8=88=E0=B8=B3=E0=B8=99=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=9A=E0=B8=A3=E0=B8=A3?= =?UTF-8?q?=E0=B8=88=E0=B8=B8=E0=B9=81=E0=B8=A5=E0=B9=89=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalList/PersonalListPage.vue | 6 +++--- src/modules/05_placement/interface/response/Main.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/PersonalListPage.vue b/src/modules/05_placement/components/PersonalList/PersonalListPage.vue index 43f6d086d..2534653bc 100644 --- a/src/modules/05_placement/components/PersonalList/PersonalListPage.vue +++ b/src/modules/05_placement/components/PersonalList/PersonalListPage.vue @@ -30,7 +30,7 @@ const stat = ref({ total: 0, unContain: 0, prepareContain: 0, - contain: 0, + done: 0, disclaim: 0, report: 0, }); @@ -49,7 +49,7 @@ async function getStat() { total: statCard.total, unContain: statCard.unContain, prepareContain: statCard.prepareContain, - contain: statCard.contain, + done: statCard.done, disclaim: statCard.disclaim, report: statCard.report, }; @@ -140,7 +140,7 @@ onMounted(async () => { color="orange" /> diff --git a/src/modules/05_placement/interface/response/Main.ts b/src/modules/05_placement/interface/response/Main.ts index d282bb302..91966a837 100644 --- a/src/modules/05_placement/interface/response/Main.ts +++ b/src/modules/05_placement/interface/response/Main.ts @@ -105,7 +105,7 @@ interface StatResponse { total: number; unContain: number; prepareContain: number; - contain: number; + done: number; disclaim: number; report: number; }