From ef992ac55919c1eb7892143bbfa728f40ef89a99 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 27 Jan 2025 11:52:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=20(=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/PopupPersonalNew.vue | 10 +- .../04_registryPerson/views/detailView.vue | 2 +- .../components/06_dismissOrder/DetailEMP.vue | 409 ++++++++++++++++++ src/modules/06_retirement/router.ts | 24 + .../06_retirement/views/06_dismissOrder.vue | 2 +- .../views/08_dismissOrderEmp.vue | 16 +- 6 files changed, 449 insertions(+), 14 deletions(-) create mode 100644 src/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index be801f939..5bb0f24ac 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -99,7 +99,7 @@ async function fetchInformation(id: string) { .get( config.API.orgProfileById( id, - `${empType.value == "employee" ? `-${empType.value}` : ""}` + `${props.type == "employee" ? `-${props.type}` : ""}` ) ) .then(async (res) => { @@ -143,7 +143,7 @@ async function fetchProfileGov(id: string) { .get( config.API.profileNewGovernmentCard( id, - `${empType.value == "employee" ? `-${empType.value}` : ""}` + `${props.type == "employee" ? `-${props.type}` : ""}` ) ) .then(async (res) => { @@ -172,7 +172,7 @@ async function fetchProfileGov(id: string) { } function redirecToRegistry() { - router.push(`/registry-${empType.value}/${props.id}`); + router.push(`/registry-${props.type == 'employee' ? 'employee':'officer'}/${props.id}`); modal.value = false; } @@ -422,7 +422,7 @@ async function fetchProfile(id: string, avatarName: string) { :model-value=" goverment.positionType ? goverment.positionType : '-' " - label="ประเภทตำแหน่ง" + :label="props.type == 'employee' ? 'กลุ่มงาน':'ประเภทตำแหน่ง'" />
@@ -434,7 +434,7 @@ async function fetchProfile(id: string, avatarName: string) { ? goverment.positionLevel : '-' " - label="ระดับตำแหน่ง" + :label="props.type == 'employee' ? 'ระดับชั้นงาน':'ระดับตำแหน่ง'" />
{ - await router.push("/retirement/dismiss-order"); + await router.push(`${empType.value === "-employee" ? `/retirementEmployee`:`/retirement/dismiss-order`}`); await success($q, "ดำเนินการสำเร็จ"); }) .catch((e) => { diff --git a/src/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue b/src/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue new file mode 100644 index 000000000..79942f876 --- /dev/null +++ b/src/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue @@ -0,0 +1,409 @@ + + + + diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index a6e9f27e3..5ad3f78fc 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -58,8 +58,12 @@ const dismissOrderEmp = () => import("@/modules/06_retirement/views/08_dismissOrderEmp.vue"); const outDetail = () => import("@/modules/06_retirement/components/06_dismissOrder/Detail.vue"); +const outDetailEmp = () => + import("@/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue"); const outDetailOnly = () => import("@/modules/06_retirement/components/06_dismissOrder/Detail.vue"); +const outDetailOnlyEmp = () => + import("@/modules/06_retirement/components/06_dismissOrder/DetailEMP.vue"); /** รายงาน*/ @@ -311,6 +315,16 @@ export default [ Role: "STAFF", }, }, + { + path: "/retirementEmployee/dismiss-order/:id", + name: "outDetailEmp", + component: outDetailEmp, + meta: { + Auth: true, + Key: "SYS_DISMISS_EMP", + Role: "STAFF", + }, + }, { path: "/retirement/dismiss-order-detail/:id", name: "outDetailOnly", @@ -321,6 +335,16 @@ export default [ Role: "STAFF", }, }, + { + path: "/retirementEmployee/dismiss-order-detail/:id", + name: "outDetailOnlyEmp", + component: outDetailOnlyEmp, + meta: { + Auth: true, + Key: "SYS_DISMISS_EMP", + Role: "STAFF", + }, + }, { path: "/retirement/report", diff --git a/src/modules/06_retirement/views/06_dismissOrder.vue b/src/modules/06_retirement/views/06_dismissOrder.vue index 6091089bb..37ab5f30b 100644 --- a/src/modules/06_retirement/views/06_dismissOrder.vue +++ b/src/modules/06_retirement/views/06_dismissOrder.vue @@ -154,7 +154,7 @@ function openModalOrder() { async function getData() { showLoader(); await http - .get(config.API.retirementOut) + .get(config.API.retirementOut+`/officer`) .then((res: any) => { const data = res.data.result; rows.value = data; diff --git a/src/modules/06_retirement/views/08_dismissOrderEmp.vue b/src/modules/06_retirement/views/08_dismissOrderEmp.vue index df760b20d..c34ce6568 100644 --- a/src/modules/06_retirement/views/08_dismissOrderEmp.vue +++ b/src/modules/06_retirement/views/08_dismissOrderEmp.vue @@ -154,19 +154,19 @@ function openModalOrder() { async function getData() { showLoader(); await http - .get(config.API.retirementOut) + .get(config.API.retirementOut + `/employee`) .then((res: any) => { const data = res.data.result; rows.value = data; rowsData.value = data; filters.value = data; + hideLoader(); }) .catch((e) => { messageError($q, e); - }) - .finally(() => { hideLoader(); - }); + }) + .finally(() => {}); } async function clickDelete(id: string) { @@ -209,7 +209,9 @@ onMounted(async () => {