diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 01f20074d..2401ff6a7 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -176,21 +176,29 @@ defineExpose({ : "" : item.isApproveSetting ? item.isApprove === true - ? "อนุมันติ" + ? "อนุมัติ" : item.isApprove === false - ? "ไม่อนุมันติ" + ? "ไม่อนุมัติ" : "" : "" }} diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 6f4b70874..828d38f14 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({ @@ -35,6 +41,7 @@ const formData = reactive({ }); const isReadOnly = ref(false); //อ่ายได้อย่างเดียว +const workflowRef = ref(null); //ข้อมูลรายการสถานะ const statusOptionMain = ref( store.optionStatus.filter((e) => e.id !== "") @@ -55,13 +62,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 +78,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 +232,93 @@ onMounted(async () => { - -
-
- แก้ไขสถานะคำร้อง + + +
+
+ แก้ไขสถานะคำร้อง +
-
-
- -
-
-
+ +
+
+ - - -
+ > + + +
-
- +
+ +
+ +
+ บันทึก +
-
-
- + + + +
- +
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; } 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 () => { { {
-
+
{
- + 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